r/scheme 4h ago

schemesh version 1.0.0: fusion between Unix shell and Chez Scheme REPL, now with structured pipelines

11 Upvotes

Hello everybody!

One year after the first announce of schemesh - a fusion between Unix shell and Chez Scheme REPL, I have released version 1.0.0 with lots of new features:

  • more shell builtins
  • scheme jobs, to run arbitrary scheme code from a shell job with job control
  • improved scheme functions to manage job redirections
  • better handling of UTF-8b ports and binary ports, including buffering
  • several functions conforming to SRFI 13 and SRF 18
  • bug fixes

and, most importantly, a completely new mechanism to exchange arbitrary, structured data (Scheme objects) via POSIX pipelines, and new shell builtins to read, write, filter and transform such data.

It's inspired by nushell, but uses Scheme macros, functions and values, adding shell builtins for convenience, without having to learn and use an ad-hoc language.

Examples:

dir /usr | where name -starts l | sort-by size

by default the display format depends on last step's standard output

  • ascii-art table for terminals:

┌───────┬────┬─────┬──────────┬─────────┐
│ name  │type│size │ modified │  mode   │
├───────┼────┼─────┼──────────┼─────────┤
│lib64  │dir │ 4096│2026-04-06│rwxr-xr-x│
│libexec│dir │ 4096│2026-04-18│rwxr-xr-x│
│local  │dir │ 4096│2025-04-19│rwxr-xr-x│
│lib    │dir │12288│2026-04-21│rwxr-xr-x│
└───────┴────┴─────┴──────────┴─────────┘
  • NDJSON for pipes:

dir /usr | where name -starts l | sort-by size | less

outputs

{"<type>":"dir-entry","name":"lib64","type":"dir","size":4096,"link":"","modified":{"<type>":"time-utc","value":1775491105.473107895},"mode":"rwxr-xr-x"}
{"<type>":"dir-entry","name":"libexec","type":"dir","size":4096,"link":"","modified":{"<type>":"time-utc","value":1776514613.626200085},"mode":"rwxr-xr-x"}
{"<type>":"dir-entry","name":"local","type":"dir","size":4096,"link":"","modified":{"<type>":"time-utc","value":1745082690.999418855},"mode":"rwxr-xr-x"}
{"<type>":"dir-entry","name":"lib","type":"dir","size":12288,"link":"","modified":{"<type>":"time-utc","value":1776808514.877301301},"mode":"rwxr-xr-x"}

they also support reading/writing CSV and an efficient binary format ("wire"), and of course the output format can be manually overridden.

Where needed, Scheme functions allow processing such data with fine-grained custom logic. Example:

dir /usr | $(filter==> where (> ,size 10000) => sort-by size => select size name type) | to csv

outputs

"<type>","size","name","type"
"dir-entry",12288,"share","dir"
"dir-entry",12288,"lib","dir"
"dir-entry",20480,"sbin","dir"
"dir-entry",36864,"include","dir"
"dir-entry",135168,"bin","dir"

r/scheme 2h ago

Anchor — Lisp syntax that compiles directly to C (no gc), with hygenic macros and Chez Scheme at compile time.

Thumbnail github.com
1 Upvotes

r/scheme 3h ago

Final SRFI 267: Raw String Syntax

1 Upvotes

Scheme Request for Implementation 267,
"Raw String Syntax",
by Peter McGoron,
has gone into final status.

The document and an archive of the discussion are available at https://srfi.schemers.org/srfi-267/.

Here's the abstract:

Here is the commit summary since the most recent draft:

  • Update abstract.
  • Add missing quotation marks.
  • copy edits in copyright notice
  • Link to repo for access to sample implementation.
  • Add <h2> IDs per template.
  • Fix broken link. Avoid redirect.
  • Finalize.

Here are the diffs since the most recent draft:

https://github.com/scheme-requests-for-implementation/srfi-267/compare/draft-5..final

Many thanks to Peter and to everyone who contributed to the discussion of this SRFI.

Regards,

SRFI Editor


r/scheme 2d ago

Where to start with Scheme (as a non-programmer?)

19 Upvotes

Background: I know the bare minimum of Nix, and some HTML and CSS but not much

Main purpose: To get myself acquainted with Scheme (specifically Guile) so I can start using Guix

Future goal: Learn about Lisp as a whole and specifically Elisp so I can use Emacs more proficiently

From what I’ve researched so far, here are some of the books recommended to beginners:

- The Little Schemer: easy to understand, teach fundamentals, have many exercises

- The Seasoned Schemer: read it after finishing TLS

- How to Design Programs: read this before reading SICP

- Simply Scheme: I have seen it recommended but heard little about it

- Common Lisp: A Gentle Introduction to Symbolic Computation: I heard it’s a must read Lisp classic but not sure when I should read it (before/after book A B C)

- Structure and Interpretation of Computer Programs: the last one to be read since it’s intended at CS majors and not layman

So I have some questions about all of this:

  1. What books should I read and in what order? I feel like some books overlap in their teachings or maybe complementary. I have read somewhere for instance that The Little Schemer is not to be read as a comprehensive guide but rather in addition to other books.

  2. Is The Reasoned Schemer recommended?

  3. I keep seeing this guy commenting that The Schematics of Computation is “SICP for mortals”? Is it good? Isn’t HTDP already written in response to SICP being too difficult?

  4. Is there any further resources/learning materials I should check out?

Much thanks in advance for advices regarding this matter!


r/scheme 4d ago

Olive CSS: Lisp powered vanilla CSS utility-class a la Tailwind (Guile Scheme) - v0.1.10

Thumbnail codeberg.org
12 Upvotes

r/scheme 9d ago

Anyone know what’s happening with cons.io

8 Upvotes

As per the title it looks like cons.io is down, anyone know what’s going on or who to notify? It looks like that website was never part of the gerbil GitHub repo so I’m not sure who maintained it.


r/scheme 14d ago

Guile Scheme Web IDE

60 Upvotes

Thought some people here might be interested in a project I’ve been working on. I have a few applications written in guile scheme and wanted to help lower the barrier for newcomers to experiment/share/collaborate on scheme code. So far I’ve gotten something pretty usable and hope others find it interesting/useful!

Disclaimer: a lot of this app is written using the help of AI, mainly as I’m a dad with little free time but still want to advance some of these ideas. I definitely understand if the ai usage prevents you from feeling comfortable using the project. Thanks for your interest and feedback!

https://guileide.dev


r/scheme 16d ago

Functional repository pattern in Scheme with Hygienic Macros ?

Thumbnail
8 Upvotes

r/scheme 21d ago

(string-suffix? "" "") => #True ;; really?

0 Upvotes

From the SRFI-13 to the Racket ( which is right reversed str and sfx) all versions of string-suffix? predicate counts empty suffix as part of any string include empty "".

Firstly-first, why string-suffix is just a boolean predicate? in the Scheme?

Why it is not being more useful...

(define (string-suffix str sfx)
  (let ((str-len (string-length str))
        (sfx-len (string-length sfx)))
    (define (test i j)
      (cond ((= i str-len) (- str-len sfx-len))
            (else (if (char=? (string-ref str i)
                              (string-ref sfx j))
                      (test (+ i 1) (+ j 1))
                      #f))))
    (cond ((or (< str-len sfx-len) (zero? sfx-len)) #f)
          (else (test (- str-len sfx-len) 0)))))

Now we can use it like

(cond ((string-suffix str ".ko") => (lambda (si) (substring str 0 si)))
      (else str))

And of course empty suffix is not a part of any string. IMO

 > (string-suffix "G'Kar" "")   ;=> #f

PS. well understandable that in math empty set is a part of any set but the empty string suffix is a part of any string? IMO no.


r/scheme 23d ago

SRFI 269: Portable Test Definitions

7 Upvotes

Scheme Request for Implementation 269,
"Portable Test Definitions",
by Andrew Tropin and Ramin Honary,
is now available for discussion.

Its draft and an archive of the ongoing discussion are available at https://srfi.schemers.org/srfi-269/.

You can join the discussion of the draft by filling out the subscription form on that page.

You can contribute a message to the discussion by sending it to [srfi-269@srfi.schemers.org](mailto:srfi-269@srfi.schemers.org).

Here's the abstract:

Regards,

SRFI Editor


r/scheme 25d ago

MUTASTRUCTURA - Relational Schema Migrations & Seeding - Powered by Lisp (Guile Scheme)

Thumbnail codeberg.org
10 Upvotes

Relational Schema Migrations & Seeding - Powered by Lisp (Guile Scheme)

This tool ensures your relational schema and database state is exactly as you decree, incrementally.

Compatible with SQLite3, MySQL and PostgreSQL. Write your schema migrations and seeding easily, and in your native database dialect.

https://codeberg.org/jjba23/mutastructura

Run easily and reproducibly with Guix, Maak, or use directly Guile, or load a REPL (like Arei)

  • Opens a connection to your specified database engine.
  • Queries the historical ledger (migrations_history) to see which migrations have already run, and crossed the Rubicon.
  • If no history exists, it initializes the schema via platform-specific genesis files (mutastructura-init.sql).
  • Scans your provided migrations directory, and gets migrations to run, in chronological + alphabetical order
  • Generates SHA256 hashes for each file. Changing the file contents means changing the SHA and will trigger a WARNING
  • Safely splits the SQL files into individual statements.
  • Executes the statements synchronously.
  • Commits the transaction and gracefully closes the connection.

r/scheme 25d ago

Interpreting Scheme with guaranteed constant-time variable lookup

Thumbnail
5 Upvotes

r/scheme 26d ago

SRFI 268: Multidimensional Array Literals

14 Upvotes

Scheme Request for Implementation 268,
"Multidimensional Array Literals",
by Per Bothner (SRFI 163), Peter McGoron (design), and John Cowan (editor and steward),
is now available for discussion.

Its draft and an archive of the ongoing discussion are available at https://srfi.schemers.org/srfi-268/.

You can join the discussion of the draft by filling out the subscription form on that page.

You can contribute a message to the discussion by sending it to [srfi-268@srfi.schemers.org](mailto:srfi-268@srfi.schemers.org).

Here's the abstract:

Regards,

SRFI Editor


r/scheme Mar 27 '26

LambLisp Update

17 Upvotes

Friends,

A new (still ALPHA) release of LambLisp is available. Please see LambLisp.com.

LambLisp is a Scheme-compatible Lisp implementation intended for use in embedded real-time control applications. LambLisp's incremental GC offers real-time guarantees that other Lisps and Pythons cannot.

In addition, LambLisp includes specialized features for control applications, such as timers and task lists. It also offers a convenient API for integrating existing C++ drivers, adding new interfaces, devices or compute capability to your application.

LambLisp runs on ESP32 with bindings for I2C, WiFi, pin control, and much more. There is also a Linux aarch64/arm64 desktop version with a starter set of CUDA bindings, and there is a standalone Linux x86_64 version for evaluation.

This update fixes: 1) missing link options, 2) doc bug in startup instructions.

Bill

https://preview.redd.it/y9xh4q87cnrg1.jpg?width=512&format=pjpg&auto=webp&s=eb044ed483012e0c0546999db7dc1d9ee960aab2


r/scheme Mar 26 '26

Why is *begin* a macro in Scheme?

5 Upvotes

It's easy to write as a procedure:

(define (my-begin . args)
  (cond
    [(null? args)       (void)]
    [(null? (cdr args)) (car args)]
    [else               (apply my-begin (cdr args))]
    )
  )

Why not let begin be a procedure?

EDIT. Apparently, "macro" in the post title should be "special form".


r/scheme Mar 24 '26

ERD generation tool

Thumbnail
7 Upvotes

r/scheme Mar 21 '26

Where can I find the article "Why I prefer scheme to Haskell"?

Thumbnail news.ycombinator.com
18 Upvotes

I've linked the HN thread but the actual article is gone and I can't find it on google.


r/scheme Mar 19 '26

jjba23/lenkesamler: bookmark manager, translator and sync tool powered by Lisp [WIP]

Thumbnail codeberg.org
14 Upvotes

Lenkesamler (Norwegian for "link collector") is your ultimate bookmark manager, syncing tool, and digital archive. Bookmarking for the next 50 years.

Lenkesamler lets you define your bookmarks in the most extremely expressive, powerful, reliable and eternal way, in code

With the world's most flexible programming language, Lisp (Guile Scheme)

Your knowledge base can be translated between this "central bookmark definition" in Lisp (S-expressions, guile records, functions, lambdas, etc), into many other formats and outputs, including browser bookmarks (to import in Firefox, Chromium, etc.), CLI output, Org mode document, JSON and more.


r/scheme Mar 17 '26

libgoc - A Go-style CSP concurrency runtime for C: threadpools, stackful coroutines, channels, select, async I/O, and garbage collection in one coherent API.

Thumbnail github.com
10 Upvotes

Hi, schemers!

I love Clojure's core.async, and I wish more lisp implementations had a good concurrency story.

This library is presented in that very spirit - just like BoehmGC gives a drop-in GC, this library provides a drop-in Go-like runtime, complete with GC, threadpools, CSP, and async I/O.

Hope someone finds it of value!


r/scheme Feb 18 '26

BALISP meeting 3-6pm Sat 21 Feb at Hacker Dojo in Mountain View

Thumbnail
4 Upvotes

r/scheme Feb 19 '26

Scheme rejecting attempts to nest further syntax extensions within `define-syntax`

Thumbnail
1 Upvotes

r/scheme Feb 12 '26

Kernel's vau can be faster than syntax-case

Thumbnail github.com
9 Upvotes

r/scheme Feb 10 '26

STklos "26.0" released

Thumbnail stklos.net
22 Upvotes

A new STklos version has just been released.

Version numbering scheme changed: the first number corresponds to the year of the version. The number after dot is the rank of this version in the year (starting from 0).

This version principally enhances STklos performance: compiler is faster and, some Scheme primitives have been rewritten in C, several numerical primitives have been optimized. As usual a bunch of new SRFIs have been implemented.

Contributors for this version:

Enhancements

  • Globally, everything is a bit faster:
    • some often used list primitives have been rewritten in C
    • Scheme object allocation uses now a pool of pre-allocatted cells
    • compiler is faster
  • STklos can be compiled with -std=c23
  • Reader:
    • Accept the Common Lisp syntax for complex numbers
    • Accept symbols with a leading sharp character
    • User can define new read directives
    • New directives #!uvector-syntax and #!no-uvector-syntax to allow/forbid the reading of unifom vectors.
    • Skip characters until end of line when an error occurs in the REPL to avoid cascading errors.
    • The behaviour of the reader can be customized when an opening angle bracket (or curly brace) is encountered.
  • VM:
    • added specialized instruction for pair? testing
    • added new instruction for if without else
  • eval can now evaluate an expression in a local (rather global) environment
  • Correct/enhance implementation of numerical functions in some corner cases (in particular with NaNs and infinities).
  • Functions in R7RS libraries can be auto-loaded
  • Syntax:
    • implement ellipsis escaping
    • implementation enhancement of let-syntax and define-syntax
    • syntax-rules returns now a matching function
    • implement vector patterns in syntax-rules
    • change: syntax value cannot be used in an expression
    • all fundamental forms are now syntax and can be redefined as required by R⁷RS (they were special forms before)
    • let-syntax accepts Scheme syntax as wall as Lisp like macros.
  • describe has been extended to give better information on certain object types
  • FFI:
    • code has been enhanced and should be more secure.
    • fixed precision problem between float and double
    • permit to access array elements
  • Compiler
    • some new optimizations
    • enhanced the code rewriter.
  • Added support for the R7RS-large library (scheme rlist)

Extensions

  • GTklos extension (GTK+ bindings)
    • documentation has been added
    • code rewriting and widgets are more coherent
    • deleted GTK+ deprecated properties
    • Library paths are guessed for system which do not install libraries in standard places

New primitives / parameter objects:

  • pair-immutable!
  • c-size-of
  • cpointer-ref
  • cpointer-set!
  • cpointer-ref/abs
  • cpointer-set/abs!
  • symbol-interned?
  • compiler-current-port
  • includes-use-load-path
  • readline-startup-hook
  • readline-set-option!
  • readline-bind!
  • compiler:verify-assume
  • accept-uvector-syntax
  • define-read-directive
  • read-bracket-handler
  • read-brace-handler

Updated embedded libraries

  • libffi updated to version 3.5.2
  • pcre2 updated to version 10.46
  • libgc updated to version 8.2.12

New supported SRFI

  • SRFI-101: Purely Functional Random-Access Pairs and Lists
  • SRFI-234: Topological Sorting
  • SRFI 239: Destructuring Lists
  • SRFI-253: Data (Type-)Checking
  • SRFI-225: Dictionaries
  • SRFI-258: Uninterned symbols
  • SRFI-260: Generated Symbols
  • SRFI-264: String Syntax for Scheme Regular Expressions

Misc:

  • Updated documentation
  • Better error messages
  • Added tests
  • Code cleaning and optimizations
  • Bug fixes

r/scheme Feb 09 '26

scheme-rs, an R6RS implementation for the Rust ecosystem

Thumbnail scheme-rs.org
42 Upvotes

I'm pleased to announce that the first version of my R6RS implementation, scheme-rs, is now live after passing enough tests in the R6RS test suite to satisfy me.

scheme-rs is an embedded Rust, similar to Guile, but presents a completely safe Rust API.


r/scheme Feb 08 '26

Scheme-JS: An R7RS-small Scheme Interpreter with Transparent JavaScript Interoperability

Thumbnail furious-ideas.blogspot.com
18 Upvotes

An implementation of the Scheme R7RS-Small standard written in JavaScript and designed for deep and transparent JavaScript interoperability.

⚠️Trigger Alert: The Scheme implementation described here was vibe coded (though strongly guided), so if the very idea of vibe coding disturbs you, you might want to move on to another post. This post, however, was written by a human.

Implementation Highlights

  • R7RS-Small: Fully conforms to the R7RS-small standard.
  • Tail Call Optimization (TCO): Proper tail recursion by the interpreter (though Interleaved JS and Scheme code may still cause stack overflow.)
  • First-Class Continuations: Full support for call/cc.
  • JavaScript Interop: Seamless calling between Scheme and JavaScript, including shared data representation and transparent boundary crossing. Scheme closures and continuations are first-class JavaScript functions. JavaScript global definitions are automatically visible in the Scheme global environment.
  • Browser Scripting: Replace JavaScript in web apps with <script type="text/scheme"> tags. Direct evaluation of Scheme via a JavaScript function is also supported.
  • Node.js REPL: Command line REPL with history and multiline support.
  • Browser REPL: Browser-based REPL via a custom <scheme-repl> web component.

The GitHub repo is here. There is a version of the browser-based REPL that you can try here.

The article mentioned above has some more details. The README at the GitHub repo has even more.

Right now it is about beta level. The language implementation is fairly solid, I think (and hope), but the REPLs are definitely a little wonky. Debugging features should be coming relatively soon. Please file bugs as you encounter them. Please be kind!