#SchemeLang

2025-12-15
#Schemacs Update

I have partially resolved the issue I mentioned in my #EmacsConf2025 presentation, regarding the closure of a lambda not correctly capturing it’s environment.

I say “partially” resolved because although my current solution results in correct program behavior, it does not consider let-bound variables inside of the closure. So variables declared locally to the closure using the let keyword will mask variables of the same name in the closure environment. A correct implementation will simply not include those masked variables in the closure environment at all. This can sometimes impact garbage collection, since a closure may be holding a variable which retains a large amount of memory, but that variable not accessible anywhere since it is masked by the let-bound variables in the closure.

However, I am eager to keep things moving, so I am merging this PR and opening a new issue to resolve the let-bindings problem later. To find out more, see issue #62 on Codeberg.

#tech #software #Emacs #EmacsConf #Scheme #R7RS #SchemeLang

2025-12-07
I decided it was time to add a Code of Conduct to #Schemacs

https://codeberg.org/ramin_hal9001/schemacs/src/branch/main/CONTRIBUTING.md

I have been getting a lot of inquiries about Schemacs lately, and so I think it is best to settle on a Code of Conduct (CoC) right now before I find myself in the awkward position of accepting a lot of patches from various people who later on turn out to hate each other. Hopefully we wont ever find ourselves in such a situation, but it is best to be prepared.

I decided to go with the Contributor Covenant 3.0, which provides a template for a CoC that adapts well to various projects. If I recall correctly, I believe I learned about it from Christine Lemmer-Webber @cwebber on one of her podcasts.

I am open to recommendations for changes to be made to the CoC as well, I understand that my knowledge of such things is imperfect and I am willing to learn about various opinions regarding codes-of-conduct if anyone is willing to teach me more.

And of course, #Schemacs is free software, so anyone is welcome to fork it and develop it separately if you disagree with the CoC. But as long as I am the project manager for #Schemacs I will make the executive decision about the CoC.

#tech #software #CodeOfConduct #Scheme #SchemeLang #R7RS #Lisp #Emacs #FLOSS #FOSS

2025-12-06
My EmacsConf presentation on Schemacs

— will be live in about 5 minutes.

https://emacsconf.org/2025/watch/dev

Questions can be posted to this live chat: https://pad.emacsconf.org/2025-schemacs

EDIT: Thanks for all the great questions everyone. It is so encouraging for me to see that there is so much interest in this project, it really keeps me motivated to keep working on it.

#tech #software #Emacs #SoftwareDevelopment #EmacsConf #EmacsConf2025 #SchemeLang #R7RS #Scheme

2025-11-28

@dpk (chair of the R7RS Scheme programming language standard working group) had designed a new, extensible #R7RS #Scheme pattern matcher library which generates optimal decision trees, and she has written a fantastic blog post about how it works: https://crumbles.blog/posts/2025-11-28-extensible-match-decision-tree.html

#tech #software #ProgrammingLanguage #SchemeLang

Christian Himpegramian@fosstodon.org
2025-11-25

"Naming and Logic" by @ArneBab is cool little booklet about Guile Scheme, see yourself: draketo.de/software/programmin
#SchemeLang

2025-10-16
The official steering committee of the Scheme programming language is calling a vote to replace themselves

Quoting the memo:

The outgoing Steering Committee was elected in 2009 and successfully oversaw the production and ratification of the R7RS small language report until 2013. Unfortunately, during the protracted initial development of the R7RS large language after that, it fell dormant.

The current Scheme Working Group resolved in September 2025 to ask the Steering Commitee for a new election because it felt that after such long dormancy the outgoing Steering Committee was no longer able, as a group, to make and implement decisions effectively.

The Scheme standardization process charter says, ‘The Steering Committee itself shall establish procedures for replacing its members.’ The outgoing Steering Committee unanimously decided to delegate this task to the current Working Group. The Working Group has very closely modelled the procedure to be used this time on the procedure used last time.

The Working Group has written a statement to candidates and voters explaining what it hopes for in a new steering committee.

Lobste.rs thread

#tech #software #Scheme #SchemeLang #ProgrammingLanguage #R7RS #R7RSLarge #Lisp #FunctionalProgramming #Guile #GuileScheme #ChezScheme #ChickenScheme #GambitScheme #RacketLang #Racket

2025-10-10

@jnkrtech you can read the original “Lambda Papers,” particularly AI Memo 349 “ Scheme: An Interpreter for Extended Lambda Calculus“ by Sussman and Steele where (I believe for the first time) continuation passing style was described in Section 3.4 “Continuation Passing Recursion”.

The rest of the “Lambda Papers” are all available on Wikisource.

#tech #software #FunctionalProgramming #Scheme #SchemeLang #R7RS #GerrySussman #GuySteele #AIMemo #MIT #LambdaPapers

2025-09-17

@plantarum hey, I’m the author of Schemacs.

Yes, there are Emacs-like editors written in a whole other language which make no attempt to clone Emacs Lisp.

  • Lem is a text editor written in Common Lisp, but it relies on SBCL-specific features so you can only build it on SBCL. The nice thing about Lem is that you have access to the entire SBCL ecosystem, which is pretty close to Python in the number of useful packages you can use with it. It uses SDL2 to display. It at one point had an Electron front-end but I think they abandoned that.

  • Edwin is a text editor written in Scheme, and comes bundled with the MIT Scheme implementation, which is compliant with the R7RS-Small Scheme standard. I believe it includes some of the original code used to teach the Scheme course at MIT back in the late 80s, and it is still minimally maintained even today. When I say “minimal,” I mean there have really been almost no new features added to it in like 30 years. It clones Emacs version 18 which was released back in 1992. All the maintainers do is make sure it runs on modern computers, and they otherwise leave it alone.

  • Lite is a text editor implemented and scriptable in Lua on top of a minimal C-language kernel. This makes it more like Emacs, which is Lisp running on top of a small C-language kernel. I think you can even use libluagit5 to JIT-compile your Lua packages, which probably makes it extremely fast.

That said, I don’t find any of these especially useful because they lack the huge package ecosystem that exists for Emacs. Emacs “apps” that I use all the time include Magit (Git porcelain), Hyperbole (a cross-referencing app), TRAMP (remote access), Org-Mode, Mastodon-Mode, ERC chat, Elfeed (RSS), as well as the built-in Dired, Proced, and Shell modes, plus all the integrations Emacs has for shell utilities like Find, Grep, GPG, SSH, Tar, Zip, and so on. Without these, I would not have nearly as easy a time getting my work done.

That is why I have put so much effort into cloning Emacs Lisp. I want Emacs users to be able to use the Emacs code they have already written for themselves, and rely on, while being able to transition over to an editor with a better scripting language.

@llewelly

#tech #software #Emacs #ProgrammingEditor #CommonLisp #SchemeLang #R7RS #EmacsLisp #Lisp #ComputerProgramming

2025-09-03
Why rewriting Emacs is hard,” by @kana

Yes it is, I can tell you from experience. Of course, I was never under any illusion that it would be easy.

@kana , a.k.a. “Gudzpoz,” wrote a blog post which was shared on Lobste.rs, and they kindly mention my own Emacs clone Schemacs, though they refer to the old name of it “Gypsum” because they are citing my EmacsConf 2024 presentation done before the name changed.

It is a pretty good post going over some of the odd details about how Emacs edits text, e.g. the character range is from 0x0 to 0x3FFFFFF rather than the Unicode standard range from 0x0 to 0x10FFFF, issues with using a gap buffer as opposed to a “rope” data structure, attaching metadata (text properties) to strings to render different colors and faces, and issues with Emacs’s own unique flavor of regular expressions in which the \= symbol indicates matching on the point in the buffer. (I did not know about that last one!)

Apparently, they know these things because they are also working on their own clone of Emacs in Java for the JVM called Juicemacs (the name “Juice” upholding the theme of Java-based applications being named after drinks), and I deduce that their approach is to read through the Emacs C source code to ensure better compatibility. This is now the fourth modern Emacs+EmacsLisp clone that is still under active development that I know of, fascinating work!

My approach is to clone Emacs well enough to get it to pass regression tests, and I don’t read the C source code, I do black-box testing (because those tests become regression tests for my own source code).

Also, the goal with the Schemacs project is more to provide a Scheme-based Emacs that is backward-compatible with GNU Emacs. You use Schemacs because you want to program it in Scheme, not Emacs Lisp, but Emacs Lisp is there for you so you can still use your Emacs config. As a result, I will ignore a lot of these fussy details of the GNU Emacs implementation unless it is going to prevent regression tests from passing.

#tech #software #Emacs #GNUEmacs #Schemacs #EmacsLisp #Lisp #Java #Scheme #R7RS #SchemeLang #LispLang #JavaLang

J. Croisant 🌼jcroisant@sunny.garden
2025-08-19

I made a thing! It's not much to look at, but the important thing is how it was made. This is the first time I've been able to program a "game" in Scheme and get it running in a web browser! This opens up so many possibilities! :blobcataww:

croisant.net/projects/crunch-s

I'm planning to do a full write-up once I've developed the concept further. But briefly, the Scheme code is compiled to C with CRUNCH, then to WASM with emscripten. It uses SDL3 for the graphics. What is extra exciting is that CRUNCH generates really portable and performant C code, so this same technique could also be used to develop native PC games, mobile games, or even console games!

#SchemeLang #GameDev #WASM

2025-08-18
#Schemacs minor milestone reached

With pull request #50 the Schemacs Elisp interpreter is now able to load all of two very important Emacs Lisp source files:

…which are two files that define most of what you could call the the Emacs Lisp “core” language (by which I mean macros like defun and lambda).

With these files now loaded, I can proceed to the next task, which is implementing enough of the C-level built-in functions in Scheme to be able to run ./lisp/emacs-lisp/cl-lib.el, which is in-turn one of the dependencies for running the Emacs Regression Tests (ERT) suite.

Once ERT is up and running, it will be much easier for anyone to contribute code to this project as you will just be able to pick a failing regression test and write whatever code is necessary to make it pass.

#tech #software #Emacs #EmacsLisp #Lisp #Scheme #SchemeLang #R7RS #FOSS #FreeSoftware

2025-08-16

My submission to ICFP/SPLASH 2025 was rejected ☹️ . Although if I am honest, the reviewer’s reasons for rejecting it makes perfect sense, I can’t disagree with their decision.

The work I am doing on Schemacs really isn’t novel in any way at all, it is just a run-of-the-mill engineering project, everything I do has been done before. I mean, there is no need to invent some new technique to solve an already-solved problem. Not really the kind of thing that makes for a good conference paper. The biggest problem, of course, is that the application isn’t complete yet, so there is not much to share.

Well, my readers here on Mastodon can expect a series of blog posts pretty soon as I re-format my paper for publishing on my blog.

#tech #software #scheme #r7rs #SchemeLang #ICFP #icfpsplash2025 #splash2025

2025-06-16

What I’d like to have is getting asserts and types checked at compile time and at run time.

@khinsen It is interesting you say that, because I had just started reading this paper which seems to discuss a technique that does what you are asking:

“A Practical Soft Type System for Scheme.” Andrew K. Wright, Robert Cartwright

I haven’t read the whole paper yet, but their approach apparently rewrites a Scheme program to a new output file, and it does a type inference and static type checking pass in the process. They apparently declared types for every API in the R4RS Scheme standard library. The rewritten program also has assertions for runtime type checking inserted wherever the type checker deemed that it was not able to check the type statically.

@screwlisp @mdhughes

#tech #software #scheme #SchemeLang #TypeChecking #TypeTheory #StaticTypes #StaticTypeChecking

2025-05-21
Thinking of publishing a paper about #Schemacs at ICFP/SPLASH 2025

…except there is not much in the way of original research. But I have received a lot of positive feedback about my project from the Scheme and Emacs community. So let me ask the Scheme/Emacs fediverse: if you would be interested in using or contributing to a Scheme-based Emacs that is mostly backward-compatible with #GNUEmacs , what is it about this prospect that is most interesting to you?

Personally, I live inside of Emacs and program most of my personal workflows in Emacs Lisp, though I feel that Scheme is a more interesting and fun language to use when compared to other #Lisp-family languages. So I would just like to be able to use Scheme as the language in which I program all of my personal workflows. Also I am curious if it is possible to write a large application in #R7RS Scheme such that it runs on many different Scheme implementations.

So does anyone else agree, or are there other things about a prospective Scheme-based Emacs that interest you that might be worth mentioning to a the audience of the Scheme-related chapters of the ICFP?

I was talking with William Byrd, who is one of the conference organizers of ICFP/SPLASH this year, and he says the committee could possibly accept anything of interest to the Scheme community, for example experience reports and “position papers” (helping others understand an opinion or philosophy on the topic). And they would judge these papers on different criteria than a paper about novel scientific research.

Anyone feel free to comment, but I am going to ping a few people in particular who seem to have opinions on this, like @dougmerritt @jameshowell @david_megginson @tusharhero @arialdo @lispwitch @cwebber @dpk and also @PaniczGodek who published on GRASP at this conference last year, if I recall correctly.

#tech #software #FOSS #FLOSS #SchemeLang #ProgrammingLanguage

2025-05-17
[SOLVED] Question about how to use Akku packages with Chez Scheme

I can setup the project to build using Akku-R7RS:

akku add akku-r7rs;
akku install;
./.akku/env;

But then how should I build each of the .sld files to binary using the Chez compiler?

@mdhughes @civodul @wasamasa do any of you know how to do this?

#tech #software #Scheme #SchemeLang #R7RS #ChezScheme #Akku #AkkuScm #AkkuScheme #AkkuR7RS #Lisp #ComputerProgramming #LispQuestions #LispAskFedi

Christian Himpegramian@fosstodon.org
2025-05-14

KiloLISP ( t3x.org/klisp/index_d.html ) by @AverageDog is a 13KB #SchemeLang / #Scheme -like #Lisp for #DOS / #MSDOS / #FreeDOS / #DOSBox providing only symbols and pairs as datatypes. What's not to love?

2025-05-08
Progress on my clone of the Emacs Lisp interpreter

This took me three months (a month longer than I had hoped), but I finally have merged it into the main branch!

This patch rewrites the Emacs Lisp lexer and parser in Scheme using Scheme code that is 100% compliant with the #R7RS standard, so it should now work across all compliant Scheme implementations. Previously the old parser relied on #Guile -specific regular expressions.

This patch also implements a new feature where a stack trace is printed when an error occurs. This of course makes debugging much, much easier. Previously the old parser did not keep track of where code evaluation was happening, it simply produced lists without source location information. The new parser constructs an abstract syntax tree (AST) and source locations are attached to the branches of the tree which can be used in error reporting and stack traces.

Next I will make whatever minor tweaks might be necessary to get my Emacs Lisp interpreter run on other Scheme implementations, in particular MIT Scheme, Gambit, Stklos, and Gauche. I would also like to try to get it running on Chicken and Chez, although these are going to be a bit more tricky.

Then I will continue with the task of implementing a new declarative GUI library.

#tech #software #FOSS #FunctionalProgramming #Lisp #Scheme #SchemeLang #EmacsLisp #Emacs #Schemacs #GuileScheme

2025-04-01
The #LispyGopherClimate #weekly #tech #podcast for 2025-04-02

Listen at: https://archives.anonradio.net/202504020000_screwtape.mp3

This week we will talk about the Unix Philosophy and how it compares and contrasts with whatever one might call the “Emacs Philosophy.”

The impetus for the discussion is a series of blog posts by @ramin_hal9001 called “Emacs fulfills the UNIX Philosophy”:

…as well as a fascinating discussion that took place over this past week on ActivityPub on the topic of the Unix philosophy and history of Lisp on Unix in which some very knowledgeable people have contributed anecdotes and facts.

#technology #programming #SoftwareEngineering #RetroComputing #lisp #r7rs #SchemeLang #UnixPhilosophy

This weeks #ClimateCrisis #haiku by @kentpitman
within each of us
our loved ones, in tiny form,
caring's innate yield
    company at a distance
    legacy in case of loss

#senryu #poem #ShortPoem #SmallPoem #SmallPoems

2025-03-22

What I don’t like:

  • some stuff breaks “everything is a list” model
  • Common Lisp is not minimal, includes overlapping and legacy stuff

does #scheme address this?

@rzeta0 I would say yes, Scheme sort of addresses those issues.

Scheme’s biggest advantage is that it is minimal enough that you can understand the whole language specification top-to-bottom, inside and out. But that is also it’s greatest drawback: is that it is too minimal to be practical. So for a long time, every single Scheme implementation has a it’s own large and unique set of libraries for solving practical programming problems that were incompatible with other Scheme implementations, making the Scheme ecosystem very fragmented. The Scheme Request for Implementation (SRFI) process is meant to address this fragmentation issue. Fragmentation is still (in my opinion) a pretty big problem, though things are much better than they were 20 years ago.

The R6RS standard, as I understand it, tried to make Scheme more practical, but it started to become too Common Lisp-like in complexity so it was mostly rejected by the Scheme community — with a few notable exceptions, like the Chez Scheme compiler.

The next standard, R7RS, split the language into two parts: “R7RS small,” ratified in 2014, which is more like the original minimal core of the Scheme language, but just a few new features, in particular the define-library macro, for modularizing parts of Scheme programs into immutable environment objects. Then they took a collection of “SRFIs” and declared them to be part of the “R7RS large” language standard. The full “large” language specification is not yet fully ratified, even 11 years after the completion of R7RS “small,” but I think the SRFIs they have ratified so far already make the latest Scheme standard a very practical language. The final R7RS standard may end up being larger than Common Lisp, but that is fine with me since it can be almost completely implemented in the R7RS “small” Scheme standard.

R7RS “small” Scheme, in my opinion, is a powerful but minimal language that exists to implement other languages, but is still useful in it’s own right as a progeny of Lisp. The “R7RS large” language then adds the useful features of larger languages like Python or Common Lisp as a layer on top of the “R7RS small” language.

The current chair of the R7RS working group is Daphne Preston Kendal, and is often on Mastodon as @dpk . She can tell you if I got anything in this post wrong.

#tech #software #SchemeLang #R7RS #ProgrammingLanguage

2025-03-11

@xameer the “R7RS small” Scheme standard has a full numerical tower built-in, including unbounded integers.

(- (+ (expt 10 100) 1) (expt 10 100))

gives you precisely the correct answer without any floating-point operations. Although macros for symbolic computation with optimization that would avoid computation of (expr 10 100) is “an exercise left to the reader.” Haskell might do the optimal computation though thanks to it’s lazy evaluation.

#tech #computers #software #FunctionalProgramming #Lisp #SchemeLang #Scheme #R7RS

Client Info

Server: https://mastodon.social
Version: 2025.07
Repository: https://github.com/cyevgeniy/lmst