miniblog.

Programming is a team activity: the vast majority of projects have multiple contributors. Yet all the films I've seen show a solo programmer at a keyboard. Have any movies got this right?
Proper tail calls were added to the JS standard, but most implementations don't provide it. V8 even built it then removed it! The concern is worse developer experience. An opt-in syntax has been proposed (cf loop/recur in Clojure) but no consensus. https://www.mgmarlow.com/words/2021-03-27-proper-tail-calls-js/
I find myself writing .iter().map(|x| ...).collect() really often in Rust. I'm wondering if I should write a helper method on Vec, but it seems less idiomatic. Iterators compose, but they're less versatile (no indexing) and awkward to return from functions.
Many languages use docstrings rather than doc comments: it certainly makes extracting them easier. You just parse the code. Could you go further and require all comments to be string literals? I'm struggling to think of many downsides.
Today I learnt that Rust has an API guidelines book, with a ton of helpful advice on idiomatic style. For example, naming: https://rust-lang.github.io/api-guidelines/naming.html Readers expect `to_foo()` to do more work than `as_foo()`, which was new to me.
A charming text editor UI where you can doodle line drawings alongside text: https://akkartik.name/lines.html This shows the effectiveness of doing a small number of things in the interface.
I've released difftastic 0.29.1: https://github.com/Wilfred/difftastic/releases/tag/0.29.1 Minor release, just fixing a nasty performance issue that cropped up in 0.29.0 on large textual diffs.
Encountered a type of bug I've never seen before: upgrading the malloc implementation had a catastrophic effect on performance! I suspect one of my libraries is allocating large arrays and not writing to them. https://github.com/Wilfred/difftastic/commit/ae42762a6d94e702e0e81e5181f11f33fca6c0eb
Difftastic 0.29 is out! * A ton of optimisation (30% shorter runtime) from smaller data structures * Improved cases where the outer delimiter is preferred (lisps, JSON) * Better detection of binary files (thanks @OnlyXuanwo) * Improved Perl, added Elvish
Photo
When I first learnt VCS, I focused on history. It was only later I realised that it's wonderful for temporary notes too. I write a lot of `// here` and `// here?` comments now, as I can easily discard them once I've committed the interesting bit.
One underrated aspect of print debugging: it forces you think about which state is relevant to look at. It's often a useful exercise.
So far, all of the people trying difftastic with huge files have been using C or C++ source code. Maybe it's more common in those communities? (Difftastic will eventually fall back to fast, dumb, line-based diffing if you give it a multi-megabyte source file.)
Inform, the programming language built for writing interactive fiction (i.e. text adventure games), is now open source. The compiler and toolchain may also be the largest literate programming codebase to date! https://intfiction.org/t/inform-7-v10-1-0-is-now-open-source/55674
User profiles on websites have gone from "paste your CSS here" to "here's a smaller set of options that all look good". I feel like app theming is following the same trend. So many apps just offer a dark mode and nothing else.
@janriemer@mastodon.technology Wow, that's a cunning trick. Hash map size remains a bottleneck for my difftastic project, I wonder if I can do something similar.
I've changed the difftastic slogan to " a structural diff that understands syntax". Previously I just said "a diff that understands syntax", but users sometimes assumed it was just a diff with syntax highlighting. Hopefully this communicates the purpose better.
On the engineering effectiveness of shared internal communications, rather than siloed emails. https://www.mattritter.me/?p=526
It's strange how AOT compilers usually have different modes for optimising time or space usage, but JITs rarely have modes like "prefer fast startup". The vast majority of JITs seem to focus on runtime of hot code after warming up.
A remarkable amount of Rust optimisation is just finding ways to avoid allocations.
Shopify is funding PL researchers to look at Ruby! https://shopify.engineering/shopify-ruby-at-scale-research-investment
Showing 201-220 of 384 posts