Playing with my elisp grammar has exposed some interesting corners of the syntax that I haven't seen before.
This is a legal character:
?\C-\M-\S-\H-\s-\A-i
Actually pressing ctrl-meta-shift-hyper-super-alt-i might be a little challenging though :)
miniblog.
I've released tree-sitter-elisp: https://www.npmjs.com/package/tree-sitter-elisp
It supports most of Emacs Lisp, and it should enable you to take advantage of the tree-sitter ecosystem.
(You could even edit elisp in neovim if you really wanted!)
My ideal programming language would have an elegant core that makes reading the implementation a joy.
It would also have one intentional wart, so users write code rather than their own implementation.
(Sometimes I wonder if some languages have already taken this approach!)
I tried tree-sitter today and it's exceptionally good.
The tooling is wonderful: the basic tutorial shows you how to define a grammar, a test suite, and provides a convenient CLI for generating efficient C parsers!
Including poetry in your database protocol, to prevent competing implementations!
I'm still trying to get a good solution for side-by-side display in difftastic. I'm experimenting with .. for line numbers, so it's more obvious when a hunk begins and ends.
(I toyed with -- instead of .., but - really risks confusion in a diff tool!)
If function f1 is unused, and f2 is only called from f1, Rust complains that both f1 and f2 are unused.
I find this confusing: it's useful to know that I can remove both functions, but removing f2 alone gives a compile error.
Not sure what the best tradeoff is though.
Exciting to see Google advocate for a standard linear smear for leap seconds! Smearing feels like the best solution, we just need consensus on how to do it.
https://developers.google.com/time/smear
prism.el is an excellent highlighter that uses nesting depth: https://github.com/alphapapa/prism.el
It has some really compelling screenshots (e.g. it makes the funcall more obvious here) and even works for non-lisps!
On the nuances of Rust inlining, crate boundaries, and what gets inlined by default: https://matklad.github.io/2021/07/09/inline-in-rust.html
Good news: it's super easy to add LTO to Rust projects, and only added 60 seconds to difftastic's link time:
[profile.release]
lto = true
Bad news: It only reduces the difftastic runtime by ~5%.
At least it didn't require much wrangling to try :)
I've started experimenting with inline displays for difftastic. It handles long lines way better, and your eyes don't need to jump around as much.
Here's a mockup of the display I have in mind, along with today's side-by-side display.
I used to think repositories with multiple packages were a niche feature (cargo workspaces in Rust, Lerna in JS), but they're really valuable for the ecosystem.
Large projects will naturally develop mature, reusable code. Making it easy to release their helpers is worthwhile.
rust-analyzer has a really cute feature "highlight related". It will highlight the enclosing loop when cursor is on `break`, or the enclosing `async` when cursor is on `await`:
I've just released difftastic 0.6!
Comment diffing is now much smarter, output alignment is way improved, several major crashes have been fixed, and I've even added Go support :)
Showing 136-150 of 345 posts






