r/csharp • • 15h ago

Showcase Man tries coding for the first time, ends up making gambling code

Post image
97 Upvotes

Pretty self explanatory. I tried C# and after some goofing around made this.


r/haskell • • 1h ago

GitHub - poise52/USBview-HS: Native USB inspector for macOS(Swift, haskell). Explore the USB device tree, inspect descriptors, and reconnect devices or hubs from the menu bar.

Thumbnail
github.com
2 Upvotes

Hey everyone,

I’ve been working on USBview HS, an open-source (MIT) native USB inspector for macOS (15+, Apple Silicon).

If you've ever needed to see what’s actually going on behind a tangle of USB-C docks and nested hubs—or wanted to software-reset a misbehaving USB device without crawling under your desk to unplug it—that’s what this tool is built for.

What it does

  • Full USB Topology Tree: Inspect controllers, nested hubs, and even empty ports. It automatically groups the USB 2 and USB 3 sides of the same physical connector when the macOS I/O Registry links them.

  • Software Reconnect (Reset): Reset a USB device or hub directly from the app or the menu bar via IOUSBHostDevice.reset(), and verify whether it reappears on the same port.

  • Deep Inspection:

    • Ports: Awake/sleep current limits, per-link error counters, and USB-C transport info.

    • Devices: VID:PID, serial numbers, negotiated speeds, drivers, interfaces, and on-demand Configuration Descriptors (alternate settings & endpoints).

    • Adapters & Drives: BSD interface names, MAC, MTU, and link state for USB Ethernet adapters; media/partition info and write capability for drives.

  • Menu Bar & Mini Window: Quick access to connected devices right from the menu bar, plus an optional always-on-top floating mini window.

  • Search & Event Log: Filter by name, manufacturer, or VID:PID, with configurable auto-refresh and a log tracking the last 200 attach/detach events.

  • Headless CLI Mode: Query the exact same USB topology from the terminal—dump the tree, export to JSON, watch live attach/detach events, or filter by --network, --storage, and --details.

Under the hood

Architecturally, it’s a bit of an unusual mix: a Haskell backend engine (engine/) reads directly from the macOS I/O Registry via IOKit and constructs the USB topology, while a Swift 6 / SwiftUI frontend (app/) handles the native UI, reads configuration descriptors through IOUSBLib, and triggers device resets.

Installation & Quick Notes

  • Pre-built Apple Silicon .zip binaries are available on GitHub Releases (built via GitHub Actions), or you can build from source with make run.

  • Gatekeeper note: Releases are ad-hoc signed and not notarized by Apple, so if macOS blocks the first launch, you can clear the quarantine flag with xattr -dr com.apple.quarantine "/Applications/USBviewHS.app".

  • Language note: The UI currently defaults to Russian on first launch—you can switch to English right away via Настройки (Settings) → Язык интерфейса (the choice persists across launches)


r/lisp • • 14h ago

sift v1.41.2 - format, lint, LSP for Scheme, Racket, Elisp and CL: hardened documented and contributor-friendly

Thumbnail
gallery
22 Upvotes

an idempotent formatter, a rule-based linter and a language server

/for Scheme, Racket, Emacs Lisp and Common Lisp/

https://github.com/jjba23/sift

After quite some years of dreaming of something like this, and attempting it to several degrees of success (initially some ELisp hackery to lint my Guile and Elisp), and after spending the last month working hard on it, designing, testing, defining rules, implementing, sparring with LLM, I have come to a really feature-full and complete, performant, good language server, formatter and linter for many Lisp dialects.

It is already enhancing my day-to-day work, my hobby projects, my day job and I already have friends using it to clean up their Lisp projects and improve them with the batteries-included sift. It also comes with a WASM playground for you to get a little taste of it (and for me to taste Guile Hoot)

Also available a more in-depth dive in Sift, in my blog: https://jointhefreeworld.org/blog/articles/lisps/sift-the-lisp-formatter-i-kept-trying-to-write/

In an nutshell It is one Guile 3.0 program: no build step, no C dependency, no runtime to install.

It reads a Lisp file (several dialects), reports what is ill-formed in it, and rewrites its whitespace without losing a byte. It is also a language server and a WebAssembly build, so the CLI, the tab and the editor are all 1 exact same code path.

Hardened by construction

  • 95 rules, 119 test suites, 1,160 tests, 2,624 assertions.

  • Formatting is a fixed point, asserted over every fixture, per dialect and per style. "Run the formatter twice" cannot reflow your file.

The architecture is what keeps it relatively small.

One rule is one record in one module: a walker, a sentence, the dialects it applies to, an example and a fix.

Everything else like the catalogue page, the sift explain text, the rules browser on the site, the editor's code actions — is generated from that record, and a test fails when the generated document and the code disagree.

Documented from the source

  • The API reference is generated with guile-dokgen from the modules themselves: 388 exported procedures, diagrams included, republished on every push. It cannot drift from the code, because it is the code.

  • The rule catalogue — 95 rules, each with the finding, the fix and the dialects it claims — is produced from the checker records, and the suite fails if doc/rules.org is not exactly what the code produces.

  • Every rule is readable offline with sift explain RULE, or M-x sift-explain-at-point in Emacs.

If you write Scheme, Racket, Elisp or CL and something looks wrong, the most useful thing you can send is the smallest file that reproduces it.


r/haskell • • 19h ago

layoutz 1.0: Simple, zero-dep Haskell TUIs ✨🪶 (5x faster than Go's BubbleTea w/ a smaller mem-footprint) now w/ Adaptive Components & Mouse Handling

45 Upvotes

Hello! Released 1.0 of layoutz. It adds mouse handling, layouts that adapt to the terminal size, and widgets (text inputs, select lists, overlays, scrollable viewports). Let me know how the API feels for those. Benchmarks here

Essentially all the breaking API changes are due to the fact the core building block is now `View msg` not `L` so your compositional elements can respond to clicks ...

but the API should feel largely the same, if not more succinct.


r/lisp • • 31m ago

Lisp Speed Demon II: four Lisps in an online optimisation race, every JIT off (29 Jan to 1 Feb 2027)

1 Upvotes

Speed Demon II is an online optimisation hackathon for 26 interpreted languages. Four of them are Lisps: Common Lisp, Guile Scheme, Emacs Lisp and Janet. Each language runs on one pinned interpreter with every JIT switched off. No FFI, native modules or subprocesses.

Four tracks: parse 310,000 log lines, index 25,000 documents, join a hostile CSV, and run shortest paths on a 500,000-edge graph. Each entry is timed against a naive reference in the same language, on one machine. Every push sets your team's car speed on a live 3D race round San Francisco. Each track can use a different language, and four tracks in four languages adds 10% speed.

Teams of 1 to 4. A practice day, then a 48-hour race. $2,000 in prizes.

Details: https://speeddemon.dev/2027/

Register: https://speeddemon.dev/2027/register/


r/csharp • • 15h ago

What is the best book to start learning C#?

13 Upvotes

Hi everyone!

I'm looking for a good book to start learning C#. My goal is to build a solid foundation in the language before moving on to ASP.NET Core and backend development.

I'm not sure which book to choose as my first one. Which book would you recommend, and why?

Thanks in advance!


r/csharp • • 1h ago

Is .NET still one of the most future-proof tech stacks?

0 Upvotes

With everything happening around .NET, C# and cloud-native development, the ecosystem keeps moving forward. If you were starting today, would you pick .NET again? Why or why not?


r/lisp • • 16h ago

Common Lisp POSIX-like Character Class Predicates for Common Lisp

Thumbnail in-parentheses.codeberg.page
11 Upvotes

r/haskell • • 23h ago

Tilia: the little tree that grew

Thumbnail
markkarpov.com
33 Upvotes

r/perl • • 1d ago

question Is perl more complicated to parse than other languages, or is that exaggerated?

29 Upvotes

Tools like semgrep, ast-grep, CodeQL, etc. do not support Perl, and I'm wondering if there is something particularly difficult about parsing Perl compared to other languages.


r/csharp • • 13h ago

EF core linq query syntax vs method.

2 Upvotes

Looking at the query vs method and can not decide which one is more acceptable.

For some un-explained reason i shudder when i see "from q in _db.Queues" in C#. But at the same time some things looks much less intuitive when written as methods.

2 queries bellow produce same result but i am not sure which way to stick with, so please vote #1 or #2. Or please correct #2 for me if there is another way of writing it.

#2 looks more complicated and i actually can not easily tell what resulting query will be. Will there be some unnecessary allocation for new {q,w} just to discard it since i only need queue object but had to pull webSite object to get isActvie into Where method.

1. await (from q in _db.Queues
                           join w in _db.WebSites on q.webSiteId equals w.id
                           where q.publicKey == queueKey && q.isActive && w.isActive
                           select q).FirstOrDefaultAsync();

2. await _db.Queues.Join(_db.WebSites, x => x.webSiteId, y => y.id, (q, w) => new { q, w }).
    Where(x => x.q.publicKey == queueKey && x.q.isActive && x.w.isActive)
    .Select(x => x.q).FirstOrDefaultAsync();

r/perl • • 1d ago

📅 advent calendar PerlAdvent 2026: Over a Year of The Underbar

Thumbnail
perladvent.org
9 Upvotes

r/haskell • • 1d ago

blog [Well-Typed] Not Slop: Haskell in the Age of AI

Thumbnail well-typed.com
75 Upvotes

r/haskell • • 1d ago

GHC 9.14.2 is finally available!

Thumbnail haskell.org
52 Upvotes

r/haskell • • 1d ago

announcement [Visual Studio Code Extension] Haskell Test Runner

8 Upvotes

Visual Studio Code has been my IDE for quite some time. While the official Haskell plugin is great, it always kinda irked me that full test runner support isn't there like other languages have. So I spent some tokens and created a plugin myself. It works with both Cabal and Stack projects (Hspec, Tasty, and custom suites) with Testing sidebar integration, gutter play buttons, and watch mode. I thought I should share it here in case someone wants to run tests through VSCode.


r/haskell • • 1d ago

Advent of Code 2026 Day 2

Thumbnail adventofcode.com
7 Upvotes

r/csharp • • 1d ago

Discussion Reading and rendering Crystal Reports .rpt files in C# without the Crystal runtime: has anyone done it?

4 Upvotes

I'm trying to get some old Crystal Reports off Windows. The goal is plain C# on modern .NET: load the .rpt, bind data, produce a PDF. It should run anywhere, Linux included.

My first plan was to avoid rendering .rpt files at all. I'd use the RAS SDK to read each report and export it into another format I could render elsewhere. That fell apart quickly. RAS is Windows-only, and it doesn't expose the whole report: Display String formulas are missing, cross-tabs are only partly there, and chart styling isn't available at all. The converted reports never matched what Crystal printed.

I also tried a couple of existing .rpt readers, but they didn't cope well with my reports.

So I've started writing my own reader and renderer in C#. Before I sink much more time into it:

  1. Has anyone else gone down this road, either reading .rpt files directly or reimplementing Crystal's layout or formula engine? Anything you wish you'd known?

  2. Is there an existing library (paid is fine) I've missed?

  3. If I carry on, would anyone be interested in testing it against their own reports? Edge cases are what I need most.


r/csharp • • 1d ago

C# .net in 2027

Thumbnail reddit.com
29 Upvotes

Hello everyone, I don't have any coding knowledge before its like starting from scratch , i work as food delivery driver and earn minimum wage only i want to transition to full time programmer, IS C# .net really worth learning as a career option (22M) in 2027? Also, as far as I know AI has already took majority of junior devloper jobs so I am really confused


r/haskell • • 1d ago

AoC Advent of Code 2026 Day 1

Thumbnail adventofcode.com
19 Upvotes

r/csharp • • 1d ago

How much of C# 12 in a Nutshell should I read before learning ASP.NET Core?

4 Upvotes

Hi everyone!

I'm about to start reading C# 12 in a Nutshell: The Definitive Reference, and my main goal is to become a backend developer using C# and .NET.

Should I read the entire book before moving on to learning ASP.NET Core and building APIs, or are there specific chapters I should focus on before making that transition?

I'd appreciate any advice from experienced C# developers.


r/perl • • 2d ago

📅 advent calendar PerlAdvent 2026: Welcome Back

Thumbnail
perladvent.org
43 Upvotes

r/perl • • 1d ago

Perl Net::FTP PASV handling lets a server choose the client's next connection

Thumbnail
dev.to
7 Upvotes

r/lisp • • 2d ago

Common Lisp cl-cht: concurrent hash tables for Common Lisp

13 Upvotes

Common Lisp's standard hash tables are not safe to use from more than one thread. Wrapping one in a global lock works, but under real concurrency it turns the table into a single serialization point.

cl-cht is a small library of concurrent hash tables with two backends: a portable sharded table, and — on SBCL/x86-64 — an open-addressing table whose metadata probing is done with SSE2, using an AVX2 broadcast where the CPU supports it.

https://lisper.nl/blog/turtle/cl-cht-concurrent-hash-tables-for-common-lisp

update: benchmarks with SBCL's synchronized hashtables. https://lisper.nl/blog/turtle/cl-cht-vs-sbcl-s-synchronized-hash-tables


r/haskell • • 2d ago

BOB Conference 2027 (Berlin, Feb 26) - Call for Participation

Post image
8 Upvotes

"What happens when we use what's best for a change?"

BOB conference is a place for developers, architects, and decision-makers to explore technologies beyond the mainstream in software development and to find the best tools available to software developers today. Our goal is for all participants of BOB to return home with new insights that enable them to improve their own software development experience.

Program

The program features 16 talks and 8 tutorials on current topics.

Talk subjects includes formal methods, functional programming, software architecture, event-driven systems, programming languages, and the culture and organization of software development.

BOB tutorial include sessions on functional programming, Idris, accessibility, configuration, unikernels, formal methods, and ethics.

Xavier Leroy of OCaml and CompCert fame will give the keynote.

Registration

Registration is open - many discount options - including limited early-bird discounts - are available, as are grants for members of groups underrepresented in tech.


r/csharp • • 2d ago

Modernizing winforms for practical use

31 Upvotes

Update: I'm building a hardware-accelerated WinForms UI framework with drag-and-drop animations.

Following the feedback on my previous post, I've been working on an experimental framework called LukFrameDX.

Here's what I've implemented so far:

  • Direct3D 11, Direct2D and DirectWrite rendering.

  • 76 customizable and combinable button animations.

  • Automatic panel entrance animations.

  • Independently animated nested panels.

  • Visual Studio Designer integration.

  • Single DLL distribution with no additional NuGet dependencies.

All the entrance animations shown in this video can be configured directly through the Properties window.

The project is still in early development, and I'm using AI-assisted development while learning more about graphics programming and framework architecture.

I'd love to hear your feedback. What features would make a framework like this useful for your projects?