SICP with Julia/Pluto
Contact
Prof. Dr. Claus Möbus
Secretary
Manuela Wüstefeld
SICP with Julia/Pluto
Quotes
Two Julia pearls
*While trying once again to find if there was any Julia version of the Classic Computer Science Problems
by David Kopec (there are versions in Python, Java, Rust, JavaScript and others in GitHub - davecom/ClassicComputerScienceProblemsInPython: Source Code for the Book Classic Computer Science Problems in Python 9), I found these very important pearls from @CMoebus in JULIA Projects // University of Oldenburg 25 a Julia application of the SICP and of the ISLR2, both using Pluto.jl
.*
SICP/JP = Problem-solving with Julia/Pluto
A Self-study Guide
This is a personal learning-diary when exploring Julia by exploiing SICP. I used Lisp and especially Scheme regularly from time to time. I loved Scheme for its elegance and minimalism. But for production purposes in various scientic projects I had to use other languages for pragmatic reasons, 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 gave advice to give Julia a try. In the end I stumbled across the fascinating probabilistic programming languages Gen and Turing, both embedded in Julia. That was the starting point to deal with Julia to have a solid fundament for modeling in Gen and Turing.
Here we present transpilations of SICP-Scheme-scripts into Julia as well as alternatives exploiting idiomatic JULIA constructs within a Pluto.jl-embedding. Pluto.jl offers reactive notebooks very suitable for 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 has acquired several competencies. S|he is competent in understanding CS-concepts, reading Scheme-scripts, and developing new scripts in Julia/Pluto.jl.
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 and the aspiration of the learner. We estimate that a newbee to programming needs 1-2 hours/day over a 12 month period (2 semesters), whereas an expert (in say Python) will need only a few weeks.
C.M.
P.S.: The electronic version of SICP can be found here (https://sarabander.github.io/sicp/html/Foreword.xhtml#Foreword) and here (https://mitp-content-server.mit.edu/books/content/sectbyfn/books_pres_0/6515/sicp.zip/index.html).
New content beyond SICP is denoted by nonSICP.
Topics of SICP/JP
- Building Abstractions with Procedures
- The Elements of Programming
- Procedures and the Processes They Generate
- Formulating Abstractions with Higher-Order Procedures
- Procedures as Arguments
- Basics
- nonSICP: Cantor Set
- nonSICP: Lebesgue Integration
- nonSICP: Stochastic First Choice Voting Models
- Constructing Procedures Using Lambda
- Procedures as General Methods
- Procedures as Returned Values
- nonSICP: Removing Recursion by Fixed Point Operator Y
- nonSICP: You Could Have Invented Monads I
- Procedures as Arguments
- Building Abstractions with Data
- Introduction to Data Abstraction
- Hierarchical Data and the Closure Property
- Symbolic Data
- Multiple Representations for Abstract Data
- Systems with Generic Operations
- Generic Arithmetic Operations
- Combining Data of Different Types
- Example: Symbolic Algebra
- Modularity, Objects, and State
- Assignment and Local State
- Local State Variables
- The Benefits of Introducing Assignment
- nonSICP: Monte Carlo I
- nonsSICP: Monte Carlo II
- The Costs of Introducing Assignment
- The Environment Model of Evaluation
- Modeling with Mutable Data
- Mutable List Structure
- Representing Queues
- Representing Tables
- A Simulator for Digital Circuits
- Propagation of Constraints
- Concurrency: Time Is of the Essence
- The Nature of Time in Concurrent Systems
- Mechanisms for Controlling Concurrency
- Streams
- Streams Are Delayed Lists
- Infinite Streams
- Exploiting the Stream Paradigm
- Streams and Delayed Evaluation
- Modularity of Functional Programs and Modularity of Objects
- Assignment and Local State