Skip to content

CMoebus/PCMs_SICP.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

527 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PCMs_SICP.jl

Problem-Solving with Julia - the SICP Way -

  • A 'SICP' (= Structure And Interpretation of Computer Programs) Self-study Diary

This is a personal learning diary when exploring Julia through working with the Scheme scripts in SICP. Perhaps inspired by the fancy characters on the cover, the SICP book is called the wizard book. This should inspire the reader to become a wizard himself.

I love Scheme for its elegance and minimalism. But for production purposes in my various scientific projects I had to use other languages like Fortran, Prolog, R, Javascript, Bugs, Stan, WebPPL and even Python. But I was always looking for a language as elegant as Scheme but with a greater usability and usefulness.

Several year ago David Barber (author of Bayesian Reasoning and Machine Learning) (http://web4.cs.ucl.ac.uk/staff/D.Barber/textbook/180325.pdf) proposed me to give Julia a try. Then I stumbled across the fascinating probabilistic programming languages Gen and Turing, both embedded in Julia. That rose my motivation to get a solid Julian foundation for modeling in Gen and Turing. This foundation seems even valuable to me for modern billion-parameter AI-LLM-Models (like ChatGPT).

Here we present transpilations of SICP-Scheme-scripts into Julia as well as alternatives with idiomatic JULIA constructs within a Pluto.jl-embedding. Pluto.jl offers reactive notebooks very suitable for exploration and educational purposes.

We use Pluto.jl as a learning environment for self-guided learning Julia. The original SICP is expected to be the accompanying study-guide. All SICP-Scheme-scripts are reconstructed in Julia in a stepwise manner. Furthermore idiomatic Julia scripts are added to demonstrate solutions made possible by advanced Julia features.

In the end it is guaranteed that the learner and reader of this diary has acquired several competencies. S|he is competent in understanding CS-concepts, reading Scheme-scripts, and developing new scripts in Julia/Pluto.jl while solving SICP problems.

Learners expecting a gamified learning environment (https://en.wikipedia.org/wiki/Gamification_of_learning) will be disappointed. This is a rather academic (dry ;) ) learning experience. So your intrinsic motivation in studying Julia should be rather high.

The time investment needed is not trivial. Of course this depends on the preknowledge, the aspiration of the learner, and how many SICP exercises are solved in Julia. We estimate that a newbee to programming needs 2-3 hours/day over a 12 month period (2 semesters), whereas an expert (in say Python) will need only a fraction of that time but only if (s)he is openminded.

C.M.

P.S.: The electronic version of SICP can be found here (https://mitp-content-server.mit.edu/books/content/sectbyfn/books_pres_0/6515/sicp.zip/full-text/book/book.html) or here (https://web.mit.edu/6.001/6.037/sicp.pdf).

New content beyond SICP is denoted by nonSICP.

About

my personal reconstruction of SICP in Julia

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors