@janriemer@mastodon.technology That's a valid use of dbg! as far as I can see, what's stopping you doing that?
Wilfred Hughes
One interesting feature of Rust: it has both print and dbg, so you don't need to use print for debugging very often. I don't even use print that often.
Wilfred Hughes
Given the number of game companies that have re-released old games by bundling an OSS emulator, perhaps it's only a matter of time before Microsoft includes Wine in something!
Wilfred Hughes
One nice thing about quadratic algorithms: if you can reduce your N, you get a really nice speedup.
Wilfred Hughes
I think I've used fewer third party libraries in bash scripts than in any other language. I just use the built-ins and invoke binaries.
I can't think of any other programming language where the stdlib felt like it was sufficient.
Wilfred Hughes
YAML is a funny language: it's not Turing complete, but it can have arbitrary code execution bugs.
Wilfred Hughes
On the limits and perils of being data driven:
https://twitchard.github.io/posts/2022-08-26-metrics-schmetrics.html
(Worthwhile improvements are often not amenable to A/B testing, and metrics can harm intrinsic motivation.)
Wilfred Hughes
I've just released difftastic 0.34:
https://github.com/Wilfred/difftastic/releases/tag/0.34.0
Minor release, but it fixes some build issues introduced in 0.33, so worth upgrading if you've had any issues with 0.33 :)
Wilfred Hughes
It's perhaps appropriate that a programming language database has its own syntax for entries!
https://github.com/breck7/pldb/commit/bde872b5b8e1cf9fb3114c1fbf3c40e405b5388d
It looks like a simplified YAML I think.
Wilfred Hughes
PLDB is an ambitious project to catalogue all the different programming languages out there:
https://pldb.com/lists/languages.html
It's showing a ton of potential (over 4,000 items recorded!) although it's still pretty young (I just fixed the LLVM IR comment syntax).
Wilfred Hughes
The bottom type has a different name in a bunch of languages. I've seen nothing, _|_, !, never and empty.
I don't know which is the most approachable to users though. `List[Empty]` reads very nicely for an empty list, whereas `never` reads nicely for error functions.
Wilfred Hughes
I've heard of quines, but today I learned about radiation-hardened quines!
https://en.wikipedia.org/wiki/Quine_(computing)#Radiation-hardened
These are quines where *any* single character can be removed and they still function. Fun concept, seems easier in a language with eval().
Wilfred Hughes
TIL about the box.leak() method in Rust:
https://doc.rust-lang.org/std/boxed/struct.Box.html#method.leak
This leaks the box, but it also gives you a reference that can live longer! E.g. you can leak a Box<u64> and treat it as 'static.
It makes sense, but being able to use a value after leaking is new idea to me.
Wilfred Hughes
@takloufer@fosstodon.org
@emacsomancer Fascinating, an authoritative slide! Thanks for sharing :)
Wilfred Hughes