miniblog.

It's a bittersweet feeling when you trace a crash back to a "TODO: make this robust against X" comment you wrote.
Apparently Google is still offering Google Glass products to enterprises and even developing new apps for it! https://cloud.google.com/blog/products/google-meet/introducing-google-meet-for-glass-enterprise-edition-2
I've started adding some --dump-syntax flags to difftastic to save me inserting random print statements when I debug. I have no good intuition for when I should start adding debugging features. It's easy to do it too late in development.
tree-sitter is really helpful in difftastic, but we still have to do some post-processing. We need to know which tokens are OK to move around (e.g. variables) and which aren't (delimiters). In the second run, I've fixed delimiters in JSX, so you don't get mismatched > on h1.
Photo
GitHub had their own JS hosting platform, but I hadn't heard about it in quite a while. Turns out they bought npm last year! https://github.blog/2020-03-16-npm-is-joining-github/
I've released difftastic 0.7! https://crates.io/crates/difftastic * Experimental tree-sitter parsing! * Better git integration (colours, file renames, file additions) * Smarter diffing (almost-identical comments, closing delimiter alignment) * Lots of smaller display improvements too :)
Yikes, needed this today: $ git clone https://github.com/git/git Fortunately git source is pretty readable and I found what I needed pretty quickly (difftastic can offer colour when GIT_PAGER_IN_USE is set).
The Zork source code reads surprisingly like lisp with <> delimiters! https://github.com/historicalsource/zork1/blob/master/gmain.zil
I am super impressed that tree-sitter has built-in testing facilities for both parse trees: https://github.com/Wilfred/tree-sitter-elisp/blob/main/test/corpus/function_definition.txt and syntax highlighting: https://github.com/Wilfred/tree-sitter-elisp/blob/main/test/highlight/functions.el Syntax parsing is all about the tricky cases and this is a huge help.
https://www.modulecounts.com/ look at the number of packages released per programming language. It's a great way of quantifying language sizes. The PHP ecosystem is way bigger than e.g. Ruby, but I hear about it much less often.
tree-sitter-elisp now has basic support for syntax highlighting and generating tags! https://github.com/Wilfred/tree-sitter-elisp It works surprisingly well and runs very quickly.
Photo Photo
One weird consequence of having '() and nil being the same in elisp: the following function is legal: (defun foo nil 1) It kinda makes sense, but it does read strangely.
I'm a big fan of history-based fuzzy directory switchers like autojump. I used fasd until recently, but I've started playing with zoxide and it's been good so far. This is such an established niche that zoxide can import history from other tools! https://github.com/ajeetdsouza/zoxide#step-4-import-your-data-optional
I'm really excited about the possibility of using tree-sitter in difftastic. I get accurate JSX parsing for free!
Photo
$ tree-sitter parse -- '/home/wilfred/.emacs.d/**/*.el' --quiet --stat Total parses: 2272; successful parses: 2271; failed parses: 1; success percentage: 99.96% It's super easy to test a tree-sitter parser against a large corpus, and to iron out the details!
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 :)
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! https://tree-sitter.github.io/tree-sitter/creating-parsers
Including poetry in your database protocol, to prevent competing implementations! https://dacut.blogspot.com/2008/03/oracle-poetry.html
Showing 121-140 of 345 posts