r/csharp • u/Ok_Breadfruit5793 • 15h ago
Showcase Man tries coding for the first time, ends up making gambling code
Pretty self explanatory. I tried C# and after some goofing around made this.
r/csharp • u/Ok_Breadfruit5793 • 15h ago
Pretty self explanatory. I tried C# and after some goofing around made this.
r/haskell • u/Embarrassed-Ride-519 • 1h ago
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.
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.
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.
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 • u/SandPrestigious2317 • 14h ago
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.
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.
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 • u/mattlianje • 19h ago
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 • u/Sensitive-Training22 • 31m ago
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 • u/JoelTorcato_ • 15h ago
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 • u/TheNextGenNL • 1h ago
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 • u/arthurno1 • 16h ago
r/perl • u/birdsintheskies • 1d ago
r/csharp • u/gevorgter • 13h ago
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 • u/briandfoy • 1d ago
r/haskell • u/adamgundry • 1d ago
r/haskell • u/arjunswaj • 1d ago
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.
Plugin: haskell-test-runner
Source: GitHub
r/csharp • u/CreakyHat2018 • 1d ago
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:
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?
Is there an existing library (paid is fine) I've missed?
If I carry on, would anyone be interested in testing it against their own reports? Edge cases are what I need most.
r/csharp • u/Rhythm__2004 • 1d ago
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/csharp • u/JoelTorcato_ • 1d ago
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 • u/briandfoy • 2d ago
r/perl • u/briandfoy • 1d ago
r/lisp • u/turtle_bazon • 2d ago
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 • u/sperbsen • 2d ago
Berlin, Feb 26
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.
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 is open - many discount options - including limited early-bird discounts - are available, as are grants for members of groups underrepresented in tech.
r/csharp • u/Upset_Geologist_2371 • 2d ago
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?