8000 GitHub - maoif/cspp: ChezScheme Programming Platform · GitHub
[go: up one dir, main page]

Skip to content
7FFF
maoifPublic

About

ChezScheme Programming Platform

Resources

Stars

11 stars

Watchers

1 watching

Forks

Repository files navigation

Chez Scheme Programming Platform (CSPP)

CSPP provides libraries for Chez Scheme and a Make-based build with a cspp launcher. Import (cspp) for the default language environment; import other libraries explicitly. The default exports are chez, utils, control, match, adt, list, string, vector, for, and iter. See library imports.

Download and run

Download a Linux .tar.gz archive for your architecture from the master snapshots: x64, arm64, riscv64, or loongarch64. Extract it, enter the extracted directory, and start CSPP:

./bin/cspp

The archive includes Chez Scheme and native dependencies. Your system must meet the glibc requirement listed in the package's README.txt and BUILD-INFO.json. See Linux packages for compatibility and release details.

Features

  • Language tools: algebraic data types and records, pattern matching, for loops, iterators, transducers, data navigator, control helpers, and list, string, and vector utilities.
  • Collections: arrays, bit vectors, bit trees, doubly linked lists, sets, heaps, queues, stacks, and ordered maps and sets.
  • Parsing: parser combinators through (cspp parser) or (cspp parser combinator).
  • Formats: CSV, JSON5, TOML, XML, Scheme, ELF, WebAssembly, and Protocol Buffers through (cspp format) or focused libraries such as (cspp format toml) and (cspp format protobuf).
  • Files and system APIs: file and port helpers, paths, globbing, processes, signals, filesystem and user information, UUIDs, hashes, and optional-library probes.
  • Networking: sockets, IP and DNS helpers, URIs, TLS, HTTP/HTTPS, FTP/FTPS, SSH, SFTP, SCP, WebSocket, and gRPC APIs.
  • Cryptography: random data, digests, encodings, MACs, KDFs, AEAD, ciphers, keys, signatures, key agreement, passwords, envelopes, and certificates.
  • Application support: command-line parsing, logging, terminal rendering, benchmarking, and test helpers.
  • Concurrency: threads, thread pools, atomic boxes, spinlocks, futures, and fiber libraries. Fibers and fiber-aware network operations are available as (cspp concurrency fiber) and (cspp concurrency fiber-net).

Some features use optional native libraries detected at build time. See the build guide for dependencies and configuration.

Build

Requires GNU Make, GCC or Clang, Git 2.36.0 or newer, and ncurses and X11 development packages. pkg-config is recommended. CSPP builds its bundled Chez Scheme; a system installation is not required.

On Ubuntu 24.04+ or Debian 12+:

sudo apt-get update
sudo apt-get install build-essential git pkg-config libncurses-dev libx11-dev
git clone --depth=1 https://github.com/maoif/cspp.git
cd cspp
git submodule update --init --depth=1 --filter=blob:none --recursive
make clean && make -j8

Adjust -j8 for your machine. See the build guide for other Linux distributions, compiler options, and optional libraries.

Use

Start the REPL, run a script, or evaluate inline code:

make run
./cspp --script=path/to/program.ss
./cspp -c='(display "Hello from CSPP") (newline)'
./cspp --help

Exit the REPL with (exit) or Ctrl + d. Import CSPP in a Scheme program:

(import (cspp)
        (cspp io)
        (cspp transducer))

(displayln
  (into 'list
        (tmap string-upcase)
        '("chez" "scheme")))
;; Prints (CHEZ SCHEME).

See examples and benchmarks for runnable programs, including match and for examples.

Install

Install the built library, launcher, and bundled Chez Scheme under an absolute prefix:

make install PREFIX=/absolute/path/to/install

See installation details for the installed layout.

Test

After building, run all tests or select individual suites:

make test
make -C tests test vector.ss list.ss

Use make test-non-net for all registered non-network suites. See testing details for optional features and regression fixtures. See test and benchmark usage requirements for controlling-thread APIs, assertions in worker threads and fibers, failure propagation, and measurement scope.

Documentation

About

ChezScheme Programming Platform

Resources

Stars

11 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

0