Coder Social home page Coder Social logo

sicp-meetup's Introduction

Structure and Interpretation of Computer Programs Meetup

This repository contains notes, examples, and local environment provisioning for following along with Abelson and Sussman's Structure and Interpretation of Computer Programs text, available in the public domain at this website, hosted by MIT.

The MIT-hosted SICP now appears to 404 at the above link. The new site hosted by MIT uses JavaScript examples. The best resource we're aware of reflecting the original text in Scheme is here, created by Li Xuanji: https://xuanji.appspot.com/isicp/index.html.

Also, the sarabander version

The repo reflects working through the text at a twice-monthly Meetup hosted in Madison, WI in 2022.

Setup

Scheme

SICP uses the Scheme programming language.

Implementations

Scheme goes by many names. The language specification is small, so available features vary between implementations. Any implementation that's R5RS+ compatible should be able to run most of the examples in SICP, though adaptations may be necessary. We will attempt to address these if/when we encounter imcompatibilities throughout the course of the book. Consider using one of the following:

  • Guile ๐ŸŽ: Should be compatible with examples provided by SICP. This is the primary implementation used by Wes and Jacob. Reference this documentation to enable a nicer REPL experience with completion, history, command line editing, etc.
  • Racket, with #lang sicp ๐ŸŽ: Comes with its own IDE: (DrRacket). An implementation of the picture language used in SICP is available here
  • Chicken ๐ŸŽ: An implementation of R5RS and R7RS Scheme that has a large library of practical extensions called Eggs. Egg are available for
    • SRFI-203: a picture language in the style of the one used in SICP.
    • SRFI-216: an SICP prerequisites library that aims to smooth over incompatibility of some SICP examples with modern Scheme
  • mit-scheme: Commonly used Scheme implementation The Vagrant environment described below may be used to run mit-scheme.

An ๐ŸŽ denotes native Apple Silicon support.

All of the implementations listed above should be available for Linux and macOS (with or without native arm64 support). They are likely available for Windows, too---reach out to Jacob or Wes if you need help finding a suitable Scheme implementation on Windows.

Vagrant

This project contains configuration for Vagrant to provision an Ubuntu 22.04 VM with mit-scheme installed for working through the text. If you'd like to use an isolated local VM for the purposes of the meetup, ensure Vagrant is installed on your machine.

To create the environment, run

vagrant up

Once provisioned, you can ssh into the local VM:

ssh -p 2222 [email protected]

When prompted, use the password vagrant.

To destroy the environment, run

vagrant destroy
vim

The Vagrantfile copies a ~/.vimrc file from your host environment to the VM and installs vim-plug. If your vimrc contains directives to install your plugins via Plug, you can run :PlugInstall when first launching vim in the VM.

Editor/REPL

Lisps are best written with a REPL at hand. It's even better when code can be sent directly to a running REPL from your editor. Here are some recommendations for editor/plugin combos with great Scheme REPL support.

Neovim

Conjure is an excellent neovim plugin that enables interactive development with a variety of Lisp-y languages. The wiki has guides for setting up Scheme (MIT, Chicken, Chez), Guile, and Racket

Emacs

The quintessential Lisp operating system editor. Geiser provides interactive Scheme development support for Emacs.

If you're new to Emacs and want an easy way to get started, it's recommended to use an Emacs distribution:

  • Doom Emacs is great for those who want Vim-flavored Emacs.
  • Spacemacs is another Emacs distribution with Vim-centric bindings and an opinionated "layer" system for functionality.
  • Prelude provides a more traditional, but potentially easier to use Emacs experience.

All of the above offer interactive Scheme functionality with Geiser pre-configured.

If you're new to Emacs and are not using a Vim/Evil keybinding configutation, cua mode may make Emacs more approachable with by enabling the common Ctrl-C, Ctrl-V, etc. keyboard shortcuts.

DrRacket (w/ Racket)

DrRacket is the IDE that comes with the Racket programming language

Editors without REPL Support

If your chosen editor doesn't have REPL support, the REPL can be used from the command line. Depending on your chosen Scheme implementation, you may be able to call the load procedure to load the procedure definitions in a Scheme file to call them interactively. Most Scheme implementations (like Guile) also allow execution of a Scheme file as a script.

Contributing

If you'd like to contribute to this project, please feel free to make a pull request.

sicp-meetup's People

Contributors

theschmocker avatar wesdoyle avatar orbnose avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.