ra’s avatarra’s Twitter Archive—№ 38,662

  1. the F# rewrite of jn now has a reader, analyzer, compiler and emitter, and is capable of generating runnable code! here's some expressions and some defs and the modules they compile to.
    oh my god twitter doesn’t include alt text from images in their APIoh my god twitter doesn’t include alt text from images in their API
    1. …in reply to @ra
      there's a lot missing (function invocation/resolution, inline bytecode, specialization etc.) but the basic architecture is in place and working. as of now we're juuuust shy of 1K SLOC (993 SLOC) which is *very short*! stretch goal is to get the whole compiler under 5K SLOC
      1. …in reply to @ra
        SLOC is kind of a silly thing to stress about/optimize for, but i do think it matters. you can read and internalize a 5K SLOC program in a weekend, but not a 50K SLOC one. and if the compiler is deliberately kept small then more is put into the language itself, which is best IMO
        1. …in reply to @ra
          porting to (and learning) F# took about two weeks, which is quicker than i expected. the previous C# codebase was due for an overhaul and was already saddled with technical debt from incorrect assumptions and pivots. this codebase seems like it could be a final thing.