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

          1. i have a read-analyze-print-loop working in my F# rewrite of jn. dont tell the dynamic types mafia but i am *really* enjoying the ML-style type system and pattern matching. i've even encoded invalid states and incomplete work (TODOs) in the type system!
            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 APIoh my god twitter doesn’t include alt text from images in their API
        1. …in reply to @ra
          F# really does what it says on the tin. the resulting code is amazingly terse and much more robust than my C# equivalent. here's the code to recognize, destructure and analyze jn's special forms, barely 60 SLOC and very communicative as to its intent.
          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
        as with anything there are tradeoffs. this code is very closed compared to what i had built in C#. adding a special form means editing the source of this file, whereas in my first draft dispatch was more dynamic and it was easier to extend from the outside.
    1. …in reply to @ra
      thats fine for something rigid like the internals a compiler, but i imagine there are other applications where the closed nature of pattern matching would be disqualifying.
  1. …in reply to @ra
    im having a blast in any case! next steps: finish porting the analyzer and start porting the bytecode generator (my favorite bit) ✌🏽