miniblog.

One of the challenges with PLs that build on top of others (Typescript to JS, Scala/Clojure to Java, C++ to C) is documentation. You often have to read two sets of docs with two distinct syntaxes. Which languages do this best? Sometimes I wish there was a TS version of MDN.
I certainly see the appeal of ChatGPT as a conversational interface for knowledge questions, but it's wrong often enough that I can't trust it. Prompt: What does :extend do to an Emacs font face? This is wrong (it's confused with :inherit) and it's hallucinated a version constraint.
On storing ASTs in flat arrays for performance, and the relationship with bytecode interpreters: https://www.cs.cornell.edu/~asampson/blog/flattening.html
A wonderful article explaining how compiler drivers work, clarifying the relationship between the preprocessor, the compiler proper, and the linker: https://fabiensanglard.net/dc/driver.php
Reflecting on the niceties and tricky parts of building systems with OCaml: https://borretti.me/article/two-years-ocaml (The author's experience match my own in a bunch of cases.)
I'm never sure what version of Rust to target for my projects. For difftastic I pinned to rust 1.57 and I haven't needed to bump it so far. Debian stable is still on 1.48 though! https://tracker.debian.org/pkg/rustc
@nihilazo @eli_oat @technomancy @csepp The thing I like about lisps is the ability to build functions around snippets until I've written a whole program. It's interactive and pleasant. I agree that the advocacy is distracting. The book Let Over Lambda has interesting ideas but it's *so* convinced that lisp is always the best. I sometimes find it hard to read too. It's easy for different patterns to look visually similar.
Tests may not guarantee correctness, but they are often suggestive. When I have a bunch of regression tests for *real* issues, I feel a lot more confident. I'm covering ways I've failed in the past.
I'm impressed by how many options I'm offered in Common Lisp (in this case sbcl on Sly) for a simple error like an invalid variable name!
I still find it odd that non-OO languages use the term "object" in their docs. I've seen it in both C and Emacs Lisp. Example: https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3018.htm
Are there any languages that have both pattern matching and statement oriented syntax? In principle these are orthogonal, but I'm struggling to think of a language with pattern matching that isn't expression oriented.
I'm super impressed that LLMs are scaling down and WebGPU is improving to the point that you can run a reasonable LLM in the browser! https://simonwillison.net/2023/Apr/16/web-llm/
In Python I can choose any name for my instance variable when defining a method. In practice people almost always use `self`. Go has the same flexibility, but using other names for the instance is totally normal! https://gobyexample.com/methods
Every time I implement an interpreter with recursion, I regret it. As soon as I want TCO, or userland control of stack limits, or resumable exceptions, I need my own stack. This is awkward because it's an upfront design decision. Changing the stack model is a big refactoring.
Which programming languages follow the "cathedral" design philosophy, where they provide most of: the runtime, stdlib, debugger, LSP, test harness, code formatter and package manager? Go, Dart and Smalltalk are the closest I can think of.
Having a conversation with a PDF is a really fun application of LLM technology: https://www.chatpdf.com/
I enjoyed this interview with Lukas Wirth, one of the maintainers of rust-analyzer: https://rustacean-station.org/episode/lukas-wirth/ I didn't realise how little code was shared between rustc and rust-analyzer (only lexing and type layouts). This makes it hard to track new Rust features.
I'm really impressed with this Rust error message: if you write %s instead of {} in your format string, it helpfully tells you that your syntax is wrong!
I'm a huge fan of languages that require you to explicitly export your functions (e.g. pub in Rust or export in JS). It's much easier to change than a separate header file (.h in C, .mli in OCaml) and it enables local reasoning. You can see from the definition if it's exported.
Thoughtful article about building older software with Nix: https://blinry.org/nix-time-travel/ It's striking how a project that does so much excellent work on build reproducibility still has some build errors in this scenario. Bitrot is scary.
Showing 361-380 of 7,506 posts