miniblog.

Some delightful examples of good compiler error messages in the latest Gleam release: https://gleam.run/news/context-aware-compilation/
I really like pattern matching in Rust, but I find myself using it less and less. `if let` and `let ... else` require substantially less indentation, and I often use them for Option values. I don't miss this syntactic sugar in OCaml though. Maybe it's just because OCaml has a 2 space indent, unlike Rust's 4 space indent?
I'm playing with DOT output for debugging syntax trees from difftastic. Here's an F# snippet, the Debug representation, and the DOT rendered as an image. I'm pleased with the information density on the graphic, but we'll see how often I end up using it.
I'm implementing an interpreter, and wondering how often I should check for interruptions (e.g. Ctrl-C). I don't want to spend too much CPU time checking whether I've been interrupted, but I also want slow programs to stop promptly. It's tricky.
It took me way too long to realise that Arc<Mutex<T>> is basically a way to create multiple &mut T references (with runtime constraints). This means that you can use plain &T and &mut T in the vast majority of your code. Most code doesn't need to care there's a mutex.
It's incredibly hard to explain adversarial problems to users. I see gamers sincerely asking "why doesn't the publisher just fix the cheater problem?". This is exacerbated by the fact that sharing too many details of anticheat can make the problem worse.
I'd heard the conventional wisdom that UX research states that mice are more efficient than keyboards, but turns out there's virtually no research on this! https://danluu.com/keyboard-v-mouse/
It's a small thing, but I'm much happier with the output of --version in the latest version of difftastic. It shows the release version number, the commit hash, and the commit date. This gives you a sense of the age of release, but you still have a reproducible build (unlike build time). It also shows OS, arch and compiler, because those are common requirements in bug reports.
New version of difftastic is out! In this release: * Improved git integration * Polished the side-by-side display, particularly on large screens * Fixed a nasty crash https://github.com/Wilfred/difftastic/releases/tag/0.61.0
An interesting feature of the Grok TiddlyWiki interface: it has the sidebar on the right. I see a sidebar on the left way more often, but arguably it makes more sense on the right for a wiki? The content is effectively more prominent. https://groktiddlywiki.com/read/
In praise of Tcl, and reflecting on syntax features for a good command shell: https://yosefk.com/blog/i-cant-believe-im-praising-tcl.html
Whilst LLMs don't always give an accurate answer, the UI is really compelling. I keep finding users whose favourite way of doing research is an LLM.
TIL Drupal has a credit system to give preferential treatment to people and organisations who contribute regularly! https://dri.es/solving-the-maker-taker-problem
It's odd how lazy evaluation is generally seen as a niche design choice, yet the vast majority of languages treat `foo() || bar()` as short-circuiting.
It feels like rename is by far the most important refactoring operation. If I had an IDE with only one refactoring, I think I'd want rename.
@krinkle A surprising number of PL design workarounds are "just add another equals sign" 🙃
I really like the MELPA model of packaging directly from git. It solves the problem of forgetting to release something -- just merge a PR and you're done. It also makes version number bumps much less important. You could go even further in a statically typed language and also figure out when breaking changes occur.
TIL Tcl has a notion of 'safe interpreters', a mode where you can run untrusted code in a sandbox: https://www.tcl.tk/man/tcl8.4/TclCmd/safe.htm Not many programming languages have this, but it's way safer to include in the implementation than try to build as a userland library.
I'm adding a += operator to my programming language, because writing `x = x + 1` is tedious. This opens the tricky design question of which operators should support this. Is += and -= sufficient, or do you expect things like >>= and **= to be available?
I would *love* a terminal emulator that treated each command as an atomic unit, so I can efficiently scroll between them. Line-based scrolling is annoying when you've just run a command that output 1,000 lines. Do any such tools exist?
Showing 121-140 of 7,506 posts