miniblog.

I've added basic sum types to my programming language project, and it simplifies a bunch of stuff. Bool and Unit no longer need to be built-in types! I'm now working on wrapped data, so I can implement Option :)
I still find C-style format strings to be more readable than Rust format strings. "Player %s has score %d" vs "Player {} has score {}". The former feels a little easier to visualise how it will look in practice. Have I missed anything? Every format string specification I've ever looked at is surprisingly big.
Clippy has a delightful lint against 'A'..'Z' because this is an exclusive range, so it only covers 'A' through 'Y'! https://rust-lang.github.io/rust-clippy/master/index.html#/almost_complete_range Saved me a tedious bug today.
I've written a simplistic backtrace for runtime errors in my toy programming language. Underlines feel useful on the top stack frame, but pretty useless on all the other stack frames, which are just calls. Any opinions?
Which languages do you consider to have the biggest/smallest standard libraries? JS and Rust have a reputation for being pretty small. C has fewer data structures, but a bunch of system APIs. Python feels more like a kitchen sink. Where are other languages on this spectrum?
Really thoughtful critique of the Language Server Protocol, what IDEs need to express, and the design decisions made. https://matklad.github.io/2023/10/12/lsp-could-have-been-better.html
JSON Lines is such a delight to use. It's particular nice as a CLI interop format. You can use dumb, fast tools (e.g. grep to quickly filter large outputs) as well as structured tools (e.g. jq).
I feel like increasing visibility of a function/type should require more verbosity. I don't know of any PL that follows this design principle for >2 levels though. Ordered by verbosity: public, private, protected , pub, pub(crate) Has any PL solved this?
I've released difftastic 0.52! In this release: * Support for XML and JSONL * Word-level diffing in text nodes (in HTML and XML) * Improved syntax highlighting https://github.com/Wilfred/difftastic/releases/tag/0.52.0
A fun idea for a Ruby test runner: run all the tests, most relevant first, but never run for more than 1.8 seconds! https://blog.testdouble.com/posts/2023-10-03-introducing-the-tldr-ruby-test-framework/
Achievement unlocked: when trying to work around an Emacs bug with long lines and pipes: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=6149#19 I hit a bug in Cask, the Emacs environment manager! https://github.com/cask/cask/pull/596 Software is hard.
I'm amused (and kinda surprised) to learn that shells have their own equivalent of blink tags, a blink escape code! https://stackoverflow.com/questions/17439482/how-to-make-a-text-blink-in-shell-script Seems equally annoying, I can't see a good use for it.
TIL about actionlint, a static analysis tool for GitHub action YAML files: https://github.com/rhysd/actionlint Seems really useful, developing actions can be tricky.
Today I learnt that a continually blinking caps lock on Linux signifies a kernel panic: https://unix.stackexchange.com/questions/3840/the-caps-lock-and-scroll-lock-lights-are-flashing-and-everything-is-frozen (On the plus side, it's the first time I've encountered this despite using Linux for years.)
OSS components are so common in software stacks now. It might be an interesting exercise to try to build a e.g. a web service with 100% proprietary components.
Are there 2D games focused on collaborative world building? I know of text based games (MUDs/MOOs) and a few 3D games (Second Life, Roblox) but nothing for 2D.
I find myself using a "splatter then clean up" technique when working with code. I add a ton of prints/logs/asserts/type annotations until I've found the issue. I then throw them all away! It feels like redundant work, but I don't have a nicer solution.
TIL rustc has a style guide for suggestions! https://rustc-dev-guide.rust-lang.org/diagnostics.html#suggestion-style-guide They recommend avoiding 'did you mean' or 'the following' in favour of direct suggestions and highlighted positions.
Amazon is using LLMs to summarise product reviews! Seems like a great application of the tool, but I haven't seen many deployments of AI summaries in the wild yet.
Uniform function call syntax treats `fido.bark()` the same as `Dog::bark(fido)`. This seems like a really nice way of representing methods in a language. Are there any downsides? There are plenty of languages without this.
Showing 261-280 of 7,506 posts