News for hackers. Stuff that matters.
Re:Learn C and Build Your Own Lisp (2014) by drblast on Saturday July 07, 2018 @12:00PM (#17479065)
http://www.lispworks.com/documentation/HyperSpec/Body/02_b.h...

That's the algorithm for the common lisp reader. Writing a recursive descent parser based on that spec is fairly straightforward.

And once you hand write your own recursive descent parser you'll probably not want to give up the control that gives you to a parser generator. Yuck.

Re:Learn C and Build Your Own Lisp (2014) by _d8fd on Saturday July 07, 2018 @01:55PM (#17479602)
I was playing with a parser generator last summer, and it was immensely frustrating to bump into bugs it had & features it lacked. In the end, it was much easier easier to write the entire parser myself. So if I understand the point you're making, I agree that giving up control can suck!
Re:Learn C and Build Your Own Lisp (2014) by Jugglerofworlds on Saturday July 07, 2018 @07:43PM (#17481307)
You should check out parser combinators. I've also used parser generators in the past and experienced similar frustrations. Parser combinators are just so much easier to use.
Re:Learn C and Build Your Own Lisp (2014) by atomical on Monday July 16, 2018 @08:23PM (#17546315)
Hey, I saw your comment on ketamine but couldn't reply. Are you still taking it?
Re:Learn C and Build Your Own Lisp (2014) by andrepd on Saturday July 07, 2018 @02:08PM (#17479658)
And then you will write a parser generator with Parsec and you will not want to give up the ease compared to writing your own recursive descent parser :)
Re:Learn C and Build Your Own Lisp (2014) by fiddlerwoaroof on Sunday July 08, 2018 @07:10PM (#17486822)
Yeah, parser combinators are basically magic, and not in an “overly clever code that you’ll regret later” sense.

And, while a Haskell-style type system makes them nicer, they work really well in dynamically typed languages too. (e.g. https://github.com/drewc/smug )

Re:Learn C and Build Your Own Lisp (2014) by pjc50 on Saturday July 07, 2018 @02:09PM (#17479667)
I'd love a good parser generator to save me writing recursive descent ones roughly annually in my career, but the ones I've encountered are awful.