6 ms·
When I see amazingly compact language implementations like this, the effect on me is not 'I want to use this language' but rather 'I should also write my own LI
by zogomoox 3y ago
When I see amazingly compact language implementations like this, the effect on me is not 'I want to use this language' but rather 'I should also write my own LISP'.
- tjoff 3y agoI misread it as 'I should write my own LSP [for that language]', which might be neat project too!
- stevekemp 3y agoI wrote a lisp, a while back, and then later added an LSP for it. Since lisp is so simple in terms of syntax what I really did was tab-completion, and info-on-hover, for the built-in functions like "car", "cdr", and the primitives I added as part of a more complex standard-library. In my case I was writing in go and I found an LSP-server package which was trivial to use. So getting the integration with emacs, vim, etc, was really trivial: https://github.com/tliron/glsp https://github.com/tliron/glsp
- ranger_danger 3y agoStrange effect however I kinda felt it too. But alas `#include <setjmp.h>` here be dragons.
- mananaysiempre 3y agoUnless you want half your C logic to be error propagation, it’ll have to be <setjmp.h>, all its flaws notwithstanding. Manual unwinding can be done tastefully (see Tcl), but in the single-digit-KLOC weight class it’s not really a choice.
- fsckboy 3y agowhile we're marvelling about how small and compact it is, then just replace them (with something uglier and less performant), it's not rocket science