Hacking. Coding. System Architecture. Management. Startups. Technology. Greatness.
Tuesday, July 12, 2016
A Bucket List Item: SICP
The Wizard Book!!!
Yes, The Wizard book.
TheHackerCIO finally got to go to this Meetup: Computer Science Reading Group. It's based on reading the classics of Computer Science, and working actively on solving the problems found therein.
At present, they are working through the classic book, available free online!, by Abelson and Sussman, Structure and Interpretation of Computer Programs. Commonly "initialized" as SICP, this book is a LISP based advanced beginners "introduction" to programming languages. Instead of focusing on the mechanics of languages, the focus is on the abstractions used within computer science.
You must have heard of this book! It's a classic! A.K.A., "The Wizard Book," from it's cover, this book is written by MIT professors and became for many many years the basis of a class at MIT. Thanks to the new MOOC trend, you can now see/take this class for yourself here. Go on! I recommend it!
The LISP of choice for the Meetup is Chicken Scheme, available on the MAC through a Homebrew install. Or, if your a building kind of guy, you can get the source code here. I was going to build it, but I had a client MacbookPro without XCODE loaded. And building from source code required GNU Make, which in turn required a Homebrew install! So, I gave in, and put up homebrew, to save time. Then it was a simple command to install Chicken-scheme:
brew intstall chicken
you also want some "eggs," apparently some kind of module or library system. In this case, you want an sicp "egg," so you should issue:
chicken-install sicp
Then you invoke the Chicken-scheme by entering this command:
csi
Which puts you into the chicken scheme interpreter or REPL prompt: Next you load the "egg" by this:
(use sicp)
You'll see messages that libraries were loaded. Finally, the acid test is the simple Functional "Hello World" equivalent:
(+ 2 2)
Which for those of you having some Functional style experience, is the way that you add two and two in LISP. You should get the answer of four, naturally.
The previously mentioned wiki has a special place to then "get started," so that's a good place to do just that. Documentation is also available here.
Three or four of the attendees had to get installed, so we spent a good bit of time going through the above steps.
Then, Mac pointed us to an interesting article on building a scheme from scratch, by Peter Michaux. There was also mention about a special github, where the source for special things to be used in the book is kept. I'm not that clear on what exactly this was, but the account is here.
Then Frankie discussed and presented his attempts to solve problem 5.52, a garbage collector in C. Apparently the book structure, toward the end requires you to implement your own lisp in lisp, and then in C.
All in all, this was a wonderful meetup! For many years this book has been on my "bucket list," and now I have an excuse to work through it in the company of like-minded individuals. It doesn't get any better than that!
I remain,
TheHackerCIO
Subscribe to:
Posts (Atom)