3 ms·
A while back I wrote a Scheme interpreter in Prolog. I would recommend nobody use it. Nor would I recommend writing Scheme in Prolog. https://github.com/FigBug
by FigBug 14y ago
A while back I wrote a Scheme interpreter in Prolog. I would recommend nobody use it. Nor would I recommend writing Scheme in Prolog.
https://github.com/FigBug/scheme https://github.com/FigBug/scheme
- sea6ear 14y agoIf you have time, I'd be curious for your reasons not to use Prolog to implement scheme. I've been playing with Prolog lately and to my newbie eyes it seems like it would be a good host language for interpreters. My email is in my profile if you'd rather email me directly rather than dumping something controversial here.
- FigBug 14y agoIt was a long time ago, and I was a newbie as well, but I just remember it being one of the more painful things I've done. Coming from C, I remember it being a mix of amazing easy and amazingly hard. Things that would be 100s of lines of C were one or two lines of Prolog. But sometimes figuring out those few lines and debugging them was a huge pain. I still find Prolog hard to follow, you can't just read it in order like imperative languages.
- zura 14y agoYou might find interesting to read: "Syntax and Semantics of Programming Languages" http://homepage.cs.uiowa.edu/~slonnegr/plf/Book/ http://homepage.cs.uiowa.edu/~slonnegr/plf/Book/ this is a free version of: http://www.amazon.com/Formal-Syntax-Semantics-Programming-Languages/dp/0201656973 http://www.amazon.com/Formal-Syntax-Semantics-Programming-La... the implementations are in Prolog.
- sea6ear 14y agoThanks for the links, I'll take a look at that.