rustc is the only self-hosted compiler I've seen that uses external packages in the target language. Are there others?
miniblog.
I refactored some Rust string splitting logic:
old: &[&str] -> Vec<String>
new: &[&str] -> Vec<&str>
It's a little faster, but it's an interesting type signature. You can figure out more of how the new one works! It must be slicing into the input string.
One underrated advantage of ORMs: it's significantly harder to write code vulnerable to SQL injection.
Bytecode interpreters vs tree walkers, and beating GNU Awk performance in GoAWK:
Ooh, today I learnt that terminals support italics! Difftastic now uses italics for comments.
Bold/italics are great because they're still visible even when you're showing text in green or red. They compose nicely :)
tagref is a cute tool where you write `// see [tag:foo] and it ensures that `[tag:foo]` actually exists somewhere in your codebase.
"Minus 100 points", an article on deciding how to add features C#, remains one of the best introduction to PL design principles I've seen: https://docs.microsoft.com/en-us/archive/blogs/ericgu/minus-100-points
(Design is hard, combinatorial complexity grows easily, saying "no" needs to be a default.)
Measuring Go program (GoAWK) performance from 1.2 to 1.18: https://benhoyt.com/writings/go-version-performance/
The Go 1.3 runtime led to a 2x speedup in GoAWK, and performance wins have continued since. It's easy to see popular PLs as largely finished, but the wins here show there's still opportunities.
> try wrapping the expression in `summary::FileContent::Text`
This rust-analyzer feature amazed me. I'd changed an API from taking a &str to a Text(String) and it offered a quick fix to correct the call sites!
An incredible 2,200 commit series that organises headers in the Linux kernel and cuts incremental build times in half: https://lwn.net/ml/linux-kernel/YdIfz+LMewetSaEB@gmail.com/
Lovely example of using fuel to debug compiler optimisation passes in GHC:
I've released difftastic 0.18! Lots of good stuff in this release:
* Better display: a ton of bugfixes and added support for light terminals
* Improved CLI: better --help and discoverable options
* Small performance and parsing (OCaml, Lisp) fixes
Here's another fun example where syntactic diffing really helps.
Even though the syntax has changed (`attr` was a named argument, now it's a record), the nesting has changed, and the line has changed, difftastic has successfully matched the `attr` in the code afterwards!
TIL that Ada was the result of a language competition, seeking to replace the 450(!) programming languages in use at the department of defence: https://ocw.mit.edu/courses/aeronautics-and-astronautics/16-01-unified-engineering-i-ii-iii-iv-fall-2005-spring-2006/comps-programming/15_robertdewar.pdf
Today I learnt that racing IPv4 and IPv6 connections to use the fastest is called "happy eyeballs"
Showing 331-345 of 384 posts






