Elegant code search for literals in Cuis Smalltalk: https://www.youtube.com/watch?v=7mRwtRvw5Vo
You can search for e.g. the literal 1, a literal expression 5-1, or a datatype literal 1@2. Really nice demonstration of AST search.
miniblog.
Related Posts
In LSP, a position is represented as a line number and a column offset (in Unicode code units): https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#position
This is pretty elegant. You'll get the correct line regardless of encoding bugs, and the editor already knows the line number so it's cheap to compute.
Go has an elegant approach to defining example functions, which are shown in docs as `main()` with the output:
Bril is a cute intermediate language for teaching (think simplified LLVM IR): https://www.cs.cornell.edu/~asampson/blog/bril.html
The idea of providing a standard JSON format to help students write basic passes is really elegant.