yep, twitter is down
yep, twitter is down
voilΓ‘ π€
Finally managed to recreate recreate something similar to TSoding's Haskell homemade parser combinator implementation using F#. I was stucked in the error of the first image, but after some research I learned that I could solve this using lazy evaluation!!
medium.com/@lanayx/depe...
TIL about #fsharp flexible types.
function to return a list of a single char instead of an arbirtrary length.
I'm also getting more used to working in the "elevated world" as I lift normal functions to the Parser world
In order to be able to parse Floats, I created a parser that combines the following sequence.
Parse Int -> Parse Dot -> Parse Int
Combining a char sequence parser such as Parse Int and a single char parser such as Parse Dot wasn't feeling ergonomic, so I "Promoted" the initial Parse Dot [+]
'a
The road so far [2/2]
The road so far [1/2]
I have never had any kind of contact with interpreters/compilers before. Just me, Haskell Docs, F# in my Vscode and a Dream hahahah.
Just watched Tsoding's JSON Parser tutorial in Haskell and felt inspired to try and implement my own parser in F# from Scratch.
My goal is to resemble the same subset of lisp that Norvig was able to Parse with his Lispy :))