I've released difftastic 0.32! A small release, but well worth upgrading:

* Difftastic is now smarter at discarding obviously unchanged content, producing much faster diffs in a bunch of cases
* Fixed a crash on Windows when a whole file is added/removed

github.com/Wilfred/difftastic/

Smart contract security assessments are surprisingly readable: certificate.quantstamp.com/ful

It's clear what's being audited, the issues identified are clearly categorised, and the maintainer responses are shown.

Rust is exploring ideas that allow it to generalise over effects, so you don't need foo and foo_async.

It's an unusual name, and potentially complicates error messages, but it's good problem to examine.

blog.rust-lang.org/inside-rust

I haven't found a nice way of reporting "N/N tasks done" in progress interfaces.

Users don't like seeing "Baking cakes 10/10 (100%)", especially if the last cake is slow. It's weird to them to see 100% when you haven't finished, but mathematically it's logical.

Update: I should have noticed that calling .get() and .insert() on a hashmap is slower than using .entry(), it saves a lookup!

Fixing this saves up to 6% of runtime -- not huge, but doesn't hurt.

Show thread

If I created a brand new programming language today, I'd be very tempted to write a bootstrap compiler in JS.

This would make it much easier to provide web playgrounds for people to write small programs and play with the language.

Difftastic spends a remarkable 49% of its runtime just reading and writing to a FxHashMap of ~1 million items. This hashmap stores the predecessor vertex when calculating the shortest route.

I'm running out of ideas. I can't use perfect hashmaps, are there other speed tricks?

Today I learnt that it's incredibly hard to scale these algorithms in the literature.

doi.org/10.1145/3381878 -- you probably can't do better than O(N^3)

doi.org/10.1016/0020-0190(92)9 -- unordered tree diffing is NP-complete!

Show thread

Difftastic is effectively computing the "tree edit distance" between two ASTs, and there's a bunch of papers on this topic. Literature review is hard though: sometimes a paper takes a while to digest, only to realise that they're solving a slightly different problem.

The Carbon language has a notion of a 'painter', a designated person to handle design debates that are just bikeshedding ("choosing the colour").

Less dramatic than a BDFL, and a cute name.

github.com/carbon-language/car

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: cloud.google.com/blog/topics/d

A really nuanced take from the Department of Defence on the economics of OSS and why people contribute fixes: dodcio.defense.gov/open-source

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!

github.com/Wilfred/difftastic/

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.)

youtrack.jetbrains.com/issue/I

Fascinating deep dive on Twitch deliberately constructing a 10GiB array to reduce the number of GC cycles in Go: blog.twitch.tv/en/2019/04/10/g

(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!

github.com/Wilfred/difftastic/

Show older
Mastodon

The original server operated by the Mastodon gGmbH non-profit