miniblog.

Should programming language docs come with exercises for the reader to test their understanding? This feels like a great way to help people learn, and you could even measure docs by pass rate. I've seen online books occasionally use this format, but never official resources.
I've started using Logseq for note taking: it's roughly in the same space as Roam/Obsidian but OSS and using markdown on your local disk. So far it works really well. I like using [[Link]] syntax for cross-referencing themes that I mention in several places.
I've never seen a JIT with an "eject" option. If I'm happy with the steady-state performance of my system, I'd rather disable the JIT and lose additional optimisation in favour of removing the tracing overhead. Do any languages offer this?
It's interesting how [.] is increasingly the standard for talking about dangerous domains: http://evilsite[.]com It's not a format that needs to be consumed by anything, although I suppose a standard makes grepping easier.
Google changing Goobuntu to rolling release based on Debian testing, rather than big-bang releases every two years based on an LTS: https://cloud.google.com/blog/topics/developers-practitioners/how-google-got-to-rolling-linux-releases-for-desktops
A really nuanced take from the Department of Defence on the economics of OSS and why people contribute fixes: https://dodcio.defense.gov/open-source-software-faq/#q-how-is-oss-typically-developed
Difftastic 0.31 is released: * Two new languages: Hacklang and SQL * Updates to: C#, Dart, Elm, Gleam, Haskell, HCL, Java, JSON, OCaml, PHP, Python, Ruby, Scala and TypeScript The tree-sitter parser maintainers have been busy!
Photo Photo
I'm really flattered that IntelliJ users are requesting structural diffs and referencing difftastic! (FWIW I'd love to eventually ship a reusable library, but APIs are just changing too fast right now.) https://youtrack.jetbrains.com/issue/IDEA-291212
Fascinating deep dive on Twitch deliberately constructing a 10GiB array to reduce the number of GC cycles in Go: https://blog.twitch.tv/en/2019/04/10/go-memory-ballast-how-i-learnt-to-stop-worrying-and-love-the-heap/ (This trick is no longer necessary in the new Go 1.19 apparently, as it's added a GOMEMLIMIT environment variable.)
Difftastic 0.30 is out! In this release: * Added support for both Julia and HTML * Better Unicode support * Substantially improved dumb textual diffing performance too!
Photo Photo
Compile times of 30-60 seconds are particularly challenging: they're too short to do something else, but too long to get into a flow state. I find music helps avoid context switching at least.
When adding a new language to difftastic, it's hard to find interesting git repositories to test against. I've started just querying GitHub for the most starred repos for a given language. For example, here's Haskell: https://github.com/search?l=&o=desc&q=stars%3A%3E500+language%3AHaskell&s=stars&type=Repositories
I've started playing again with A* search instead of Dijkstra for difftastic. So far it's only saved me visiting 3% of graph nodes, which is negligible. A* works best when you have a good heuristic, but finding a good heuristic is hard. Currently: https://github.com/Wilfred/difftastic/blob/3b9474d9fe360a4122d63efbecda2ac7b3b36d30/src/diff/dijkstra.rs#L39
Framing documentation work as creative solving of problems, not just writing up stuff made by other people: https://idratherbewriting.com/2018/11/19/avoid-being-secretary-for-engineers/
Using a Box<str> in Rust: https://mahdi.blog/rust-box-str-vs-string/ (Unlike String, it isn't resizable, so it doesn't need to store capacity. Box<str> is only two words, unlike the three words in String!)
TIL that C++03 considered a file without a trailing newline to be undefined behaviour! https://stackoverflow.com/a/72377 This was fixed in C++11, but the problem was that #include was a textual operation that could produce invalid syntax if no newline was present.
If I were coming up with a new syntax today, I'd be tempted to put a deliberate marker in it. "In funkylang, you declare functions with `funk foo() {}`." https://twitter.com/_wilfredh/status/1540126802554654720
Choosing a syntax for a new programming language is hard. You want to be similar enough to an established language to avoid scaring off users. You still want to be sufficiently novel to be recognisable. Which languages do this well?
The Rust docs include a surprisingly readable example of how `for` loops desugar into essentially a while loop with a pattern match: https://doc.rust-lang.org/nightly/std/iter/#for-loops-and-intoiterator
An excellent review of the V language and the features it promotes: https://mawfig.github.io/2022/06/18/v-lang-in-2022.html The code samples are a great example of how you do PL work: you learn about the intended semantics and try to write programs that are broken in interesting ways.
Showing 181-200 of 384 posts