>..I’ve been (slowly) working my way through The Little Typer. It’s a deep dive on dependent types, starting with the very basics and building up a toy language one step at a time. I can feel it gradually changing how I think about programming (heck, how I think about thinking).
>..It’s really, really enjoyable. The format is very approachable, even fun. Rigorous and demanding, yet doesn’t take itself too seriously. Some lisp experience is helpful, but probably (maybe?) not necessary. But do yourself a favor and learn lisp anyway ;-)
Maybe some day I'll motivate myself to even figure out how to first install Racket/Pie (first, I have to figure out what even these are).
Thanks for the motivation/educational resource, OP.
Inially wasn't sure if your comment was "a joke," but thanks for the real introduction:
amazon.com/Little-Schemer-Daniel-P-Friedman/dp/0262560992/ [link to book]
https://www.edx.org/learn/coding/university-of-british-colum...
I think you'll really like it. It uses Racket and is based upon the How to Design Programs book. It is absolutely perfect for someone new to coding.
If you're retired and don't need to do the Webrogrammer grind of employable skills, that's a great time to learn advanced/alternative topics of programming like this.
(But if you instead want a paying second career, you probably want to either focus on Web or phone app development instead of this, or have a personal connection to get a job in some less-common area of software development. The Little Typer probably won't help you with that.)
I suspect that the book will do a good job of explaining its topic, from scratch. Here's how to install the software that the book uses:
1. https://download.racket-lang.org/
2. > Open DrRacket and select "Install Package" from the "File" menu. In the package name field, type pie and then click the "Install" button.
There's an expectation that you're following along and typing nearly every line into the appropriate REPL. I found this difficult to do while juggling the hardcopies and not any easier on an ebook reader -- I could stop worrying about cracking the spine but the digital copies I sampled or purchased always completely ruined the typesetting. All the REPL interactions are transcribed as images, and the constant focus-and-pinch-zoom disrupts the engagement.
I ended up just reading through and hoping to catch enough of the gist of things then doing my usual side-project-as-learning instrument thing. I hope somebody tries to build an interactive playground for this book or the Little Learner, complete with guiding dialog.
The typesetting in the hardcopies is really unique and impressive.
1: Terence Parr's chapter "Enforcing Static Typing Rules" from Language Design Patterns.
2: Eli Bendersky's Python implementation of Hindley-Milner type inference.
--
1: https://pragprog.com/titles/tpdsl/language-implementation-pa...
https://news.ycombinator.com/item?id=18046745 - Sept 22, 2018 (132 comments)
https://news.ycombinator.com/item?id=31465368 - May 22, 2022 (23 comments)
https://news.ycombinator.com/item?id=33162971 - Oct 11, 2022 (96 comments)
I found those two outstanding. I think A Little Java has been reprinted. But last time I checked, The Little MLer was bloody expensive. Standard ML, OCaml and F# need a lot more exposure. They are simple and practical. The Little MLer does a great job introducing the basics.
To close the circle, the Little Series is missing a book about concurrent and distributed paradigms à la Erlang. They already have functional programming, typed functional programming, declarative programming, dependent types, theorem proving, object-oriented programming and machine learning.
Here is the result of my research so far, in order of preference according to the above requirements:
Guile: most active community, GNU glue language, Guix
Chicken: most pragmatic one with a package manager but older
Chez: most performant one, less active community and libraries
Racket now runs on Chez under the hood (inheriting the performance), and has a pretty decent ecosystem as far as schemes go.
(I TA for Dr. Friedman’s programming languages course)
Racket is probably the most frequent choice. But I really like some aspects of Chicken, Gambit and Bigloo.
Even Clojure or CL could also be used, with a bit of friction of course.
MIT/GNU Scheme comes with its own editor, edwin, which is a terminal-only Emacs-like. I don't know how much it complies with the various RnRSes, but I do believe it's good enough to work for the Little series.
Gauche is R7RS-small (and I believe -large up to Tangerine) compliant so it should just work. It also has fairly good Geiser support and comes with an enormous standard library, 'batteries included' as they say, though its performance is a bit lower than some of the other implementations.
Cyclone is R7RS-small compliant so it should work. It seems fairly fast and it has a package manager, but because it's fairly new I don't know how well it works with Geiser.
Loko is R6RS compliant so it should work. I believe the documentation says that it should work with Geiser using the Chez module, but I may be mistaken.
Gerbil is R7RS-small compliant (and I believe -large through Red, maybe through Tangerine?) so it should work. I believe it's also quite performant, though I haven't used it.
Kawa is R7RS-small compliant if I'm not mistaken. If so it should work for the Little series. It also has a Geiser module.
And then there are a few implementations of which I'm not entirely sure which version of the spec they comply with and how well they're supported by various editors (though I think SLIME has Scheme support, although that may only be for MIT/GNU Scheme): Gambit (I think R5RS? Gerbil is built on top of it), Bigloo (I think R6RS?), Larceny, Chibi Scheme, Biwa Scheme, S7, and IronScheme. For any of those, as long as they support post R4RS macros (so using `define-syntax' and `syntax-rules' instead of `defmacro)' they should work for the Little series without any adjustments. If they're still using `defmacro' then you'd need to translate the macro definitions from Reasoned (and later?), which isn't that hard... but if you're gonna do that you may want to read On Lisp after Seasoned.