3 ms·
What a timely post. I actually just finished implementing an S-expression lexer and parser written in Python; I'm going through the LISP 1.5 Programmer's Manua
by linguae 6y ago
What a timely post. I actually just finished implementing an S-expression lexer and parser written in Python; I'm going through the LISP 1.5 Programmer's Manual and my next step is to implement that manual's legendary Page 13 that describes a basic LISP 1.5 interpreter written in itself. All of this is in preparation for teaching an undergraduate-level course on programming language paradigms beginning next month, where I plan to teach my students the foundations of programming languages as well as introducing them to functional programming, logic programming, and Smalltalk-style message-passing object oriented programming (my students will be mainly third-year undergraduates with years of experience in Java but with likely no previous experience in languages like Lisp, Scheme, Haskell, Prolog, and Smalltalk).
Alan Kay said that "point of view is worth 80 IQ points." I want to show my students the value of thinking of problems in ways that are different from the dominant programming paradigm used by languages like Java and Python. I've been meaning to read some of the early Scheme papers; it looks like "The Art of the Interpreter" is exactly what I'm looking for.
- cellularmitosis 6y agoNice! A while back I went as far as implementing '(+ 1 1)' in Python [1], then went as far as implementing lambda in C [2]. 1: https://gist.github.com/cellularmitosis/a46efbf32544cde3a1d156e4903e051f https://gist.github.com/cellularmitosis/a46efbf32544cde3a1d1... 2: https://gist.github.com/cellularmitosis/d8d4034c82b0ef817913a01138b115bf https://gist.github.com/cellularmitosis/d8d4034c82b0ef817913...