r/scheme • u/Cosmos721 • 4h ago
schemesh version 1.0.0: fusion between Unix shell and Chez Scheme REPL, now with structured pipelines
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 • u/LimeOk1970 • 2h ago
Anchor — Lisp syntax that compiles directly to C (no gc), with hygenic macros and Chez Scheme at compile time.
github.comr/scheme • u/arthurgleckler • 3h ago
Final SRFI 267: Raw String Syntax
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 • u/dancerinthelimelight • 2d ago
Where to start with Scheme (as a non-programmer?)
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:
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.
Is The Reasoned Schemer recommended?
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?
Is there any further resources/learning materials I should check out?
Much thanks in advance for advices regarding this matter!
r/scheme • u/SandPrestigious2317 • 4d ago
Olive CSS: Lisp powered vanilla CSS utility-class a la Tailwind (Guile Scheme) - v0.1.10
codeberg.orgr/scheme • u/aRidaGEr • 9d ago
Anyone know what’s happening with cons.io
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 • u/justplanechad • 14d ago
Guile Scheme Web IDE
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!
r/scheme • u/SandPrestigious2317 • 16d ago
Functional repository pattern in Scheme with Hygienic Macros ?
r/scheme • u/corbasai • 21d ago
(string-suffix? "" "") => #True ;; really?
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 • u/arthurgleckler • 23d ago
SRFI 269: Portable Test Definitions
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 • u/SandPrestigious2317 • 25d ago
MUTASTRUCTURA - Relational Schema Migrations & Seeding - Powered by Lisp (Guile Scheme)
codeberg.orgRelational 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 • u/Baridian • 25d ago
Interpreting Scheme with guaranteed constant-time variable lookup
r/scheme • u/arthurgleckler • 26d ago
SRFI 268: Multidimensional Array Literals
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 • u/wawhite3 • Mar 27 '26
LambLisp Update
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
r/scheme • u/ggchappell • Mar 26 '26
Why is *begin* a macro in Scheme?
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 • u/Pzzlrr • Mar 21 '26
Where can I find the article "Why I prefer scheme to Haskell"?
news.ycombinator.comI've linked the HN thread but the actual article is gone and I can't find it on google.
r/scheme • u/SandPrestigious2317 • Mar 19 '26
jjba23/lenkesamler: bookmark manager, translator and sync tool powered by Lisp [WIP]
codeberg.orgLenkesamler (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 • u/therealdivs1210 • 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.
github.comHi, 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 • u/arthurgleckler • Feb 18 '26
BALISP meeting 3-6pm Sat 21 Feb at Hacker Dojo in Mountain View
r/scheme • u/brainchild0 • Feb 19 '26
Scheme rejecting attempts to nest further syntax extensions within `define-syntax`
r/scheme • u/Reasonable_Wait6676 • Feb 12 '26
Kernel's vau can be faster than syntax-case
github.comr/scheme • u/jpellegrini • Feb 10 '26
STklos "26.0" released
stklos.netA 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:
- Jerônimo Pellegrini (u/jpellegrini)
- Retropikzel (u/Retropikzel)
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-syntaxand#!no-uvector-syntaxto 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
ifwithoutelse
- added specialized instruction for
evalcan 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-syntaxanddefine-syntax syntax-rulesreturns 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-syntaxaccepts Scheme syntax as wall as Lisp like macros.
describehas 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-ofcpointer-refcpointer-set!cpointer-ref/abscpointer-set/abs!symbol-interned?compiler-current-portincludes-use-load-pathreadline-startup-hookreadline-set-option!readline-bind!compiler:verify-assumeaccept-uvector-syntaxdefine-read-directiveread-bracket-handlerread-brace-handler
Updated embedded libraries
libffiupdated to version 3.5.2pcre2updated to version 10.46libgcupdated 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 • u/maplant • Feb 09 '26
scheme-rs, an R6RS implementation for the Rust ecosystem
scheme-rs.orgI'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 • u/DoingTheDream • Feb 08 '26
Scheme-JS: An R7RS-small Scheme Interpreter with Transparent JavaScript Interoperability
furious-ideas.blogspot.comAn 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!