SICP Environment
An opinionated setup for studying "Structure and Interpretation of Computer Programs" (SICP) using Racket, SICP language support, and VS Code.
Goals
- Provide a clean, opinionated setup for studying SICP
- Use Racket with SICP language support
- Provide a REPL for interactive evaluation
- Use VS Code as the editor
Features
- Preconfigured Cursor/VS Code environment for SICP study
- Integrated REPL support
- Automatic file loading
- Clean terminal handling
- Recommended extensions
Setup
Prerequisites
- Install VS Code
- Clone this repository:
git clone https://github.com/myleshenderson/sicp-vscode.git cd sicp-vscode
Install Dependencies
Run the installation script to install Racket, SICP language support, and configure your PATH:
./scripts/install-deps.sh
Racket PATH Configuration
The installation script will automatically configure your PATH. If you need to verify the installation:
macOS/Linux
- Open your terminal
- Run
which racket - If no path is returned, add Racket to your PATH:
# For bash (add to ~/.bashrc or ~/.bash_profile) export PATH="/path/to/racket/bin:$PATH" # For zsh (add to ~/.zshrc) export PATH="/path/to/racket/bin:$PATH"
Verify the installation by opening a new terminal and running:
VS Code Configuration
This repository includes:
.vscode/tasks.json: REPL task configuration.vscode/extensions.json: Recommended extensionsscripts/: Utility scripts for REPL handling
VS Code will automatically prompt you to install the recommended Scheme extension when you open the project.
Recommended Keybindings
This project includes recommended keybindings in .vscode/keybindings.json. To use them:
- Copy the contents from
.vscode/keybindings.json - Open the Command Palette (
Cmd+Shift+P/Ctrl+Shift+P) and search for "Preferences: Open Keyboard Shortcuts (JSON)" - Paste the keybindings into your IDE keybindings file
These keybindings configure:
Ctrl+Option+N/Ctrl+Alt+N: Start REPL
Usage
- Open any Scheme file (
.scm), such as the src/test.scm file - Start the REPL:
- Use the keyboard shortcut you set up in the previous section:
Cmd+Option+N(Mac) orCtrl+Alt+n(Windows/Linux)
- Use the keyboard shortcut you set up in the previous section:
- The REPL will:
- Start with SICP language support
- Load the current file
- Allow interactive evaluation
- Exit the REPL with
Ctrl+D
License
This project is licensed under the MIT License - see the LICENSE file for details.