explaingit

cisco/chezscheme

7,281SchemeAudience · researcherComplexity · 4/5Setup · hard

TLDR

Chez Scheme is a fast, full-featured Scheme programming language system open-sourced by Cisco that compiles code to optimized machine instructions automatically. It runs on Windows, Mac, Linux, BSD, Android, and iOS.

Mindmap

mindmap
  root((chezscheme))
    What it does
      Scheme language runtime
      Automatic compilation
      Single binary output
    Tech stack
      Scheme language
      Native machine code
      C interop layer
    Features
      Continuations
      Hygienic macros
      Multi-threading
      Source debugger
    Platforms
      Windows Mac Linux
      BSD Solaris
      Android iOS
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Run Scheme programs with near-native speed in an interactive shell that compiles expressions automatically without a separate build step

USE CASE 2

Bundle an entire Scheme program and all its dependencies into a single standalone executable binary

USE CASE 3

Write multi-threaded Scheme programs that take advantage of multiple CPU cores using built-in threading support

Tech stack

SchemeC

Getting it running

Difficulty · hard Time to first run · 1h+

Building from source requires a C toolchain and platform-specific steps, binary distributions are available for major platforms.

In plain English

Chez Scheme is both a programming language and a complete system for running programs written in that language. The language is a version of Scheme, which belongs to the Lisp family of programming languages. Cisco developed and maintained it for decades before open-sourcing it. The core idea behind Chez Scheme is speed. Rather than interpreting code line by line at runtime, it compiles code into optimized machine instructions. This compilation happens automatically whenever you load a file or type an expression into the interactive shell, so you do not need a separate build step for everyday use. You can also precompile files into a stored binary form that gets recompiled automatically when the source changes. The compiler can also take an entire program and all its dependencies and combine them into a single binary file. Beyond speed, Chez Scheme supports the full set of features you would expect from a modern Scheme implementation: functions that can be passed around and stored like any other value, proper handling of recursive function calls that do not grow the call stack, continuations (a way to save and restore the execution state of a program), user-defined data types, hygienic macros for extending the language's syntax, and exception handling. The system includes tools for interacting with code written in C and other languages, multi-threading support for taking advantage of multiple CPU cores, and non-blocking input/output for programs that need to handle many tasks at once. The built-in programming environment has a source-level debugger, memory inspection tools, a profiler that shows which parts of your code run most often, and a multi-line interactive editor for working with expressions that span several lines. Chez Scheme runs on Windows, Mac, Linux, FreeBSD, OpenBSD, NetBSD, Solaris, Android, iOS, and several other platforms, covering both x86 and ARM processor families.

Copy-paste prompts

Prompt 1
Write a Chez Scheme program that defines a tail-recursive Fibonacci function and compile it to a standalone binary using the built-in compiler.
Prompt 2
Show me how to use Chez Scheme's foreign function interface to call a C library function from Scheme code.
Prompt 3
Create a Chez Scheme multi-threaded example that spawns two threads and safely shares a mutable counter using a mutex.
Prompt 4
Use the Chez Scheme profiler to identify which functions take the most time in a merge sort implementation.
Prompt 5
Write a Chez Scheme define-syntax macro that adds a simple when-let pattern-matching form.
Open on GitHub → Explain another repo

← cisco on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.