#r7rs — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #r7rs, aggregated by home.social.
-
The challenge of writing portable Scheme code is that every implementation has myriad little idiosyncrasies. Today I discovered the #MITScheme tries to read #Emacs -style file header comments (for example
;; -*- encoding: utf-8 -*-) and this can cause the reader to crash for some reason. I am not sure if it is a bug or a feature, but it did throw me off for a whole day while I tried to figure out why MIT Scheme wouldn’t compile a library file.I also happen to be hung-up on a bug in #Guile 3.0.11. It seems to me like the optimizer is emitting bad code, because I get a
SEGFAULTon an expression that #Gauche has no trouble executing. I am still working on a bug report, and trying to figure out a work-around.#tech #software #Scheme #Schemacs #SchemeLang #R7RS #Lisp #GuileScheme #GaucheScheme
-
I am starting to become very annoyed with #Guile Scheme because they are so far behind in providing some very important modern SRFIs.
Of course I could implement these myself and submit a patch, but in the mean time I would have to wait for my patch to be accepted and distributed in the next Guile version. And while I waited I would have to just implement these SRFIs in my own source code for myself. I don’t have time, so I always end up just implementing the APIs that I need for my own project, usually as a wrapper around some other Guile API that does provide that functionality but in a non-standard way.
For the past two years or so I have kept on running into issues caused by the fact that Guile does not provide SRFI-125 (hash tables) and SRFI-128 (comparators). Guile provides SRFI-69 (the old hash tables) but it doesn’t use comparators, and so the semantics for things like
make-hash-tableandalist->hash-tablein Guile are not compatible with most other R7RS-compliant Scheme implementations. I keep having to go back and update variouscond-expandstatements to get around this. Some data structures are so fundamental to modern software that you just can’t do without them. Providing these SRFIs should really be a priority.Also the following would be really nice to have in Guile, like really soon:
- SRFI-160: homogeneous numerical vectors, Guile only provides the older version of it, SRFI-4.
- SRFI-170: POSIX API: Guile provides all of these APIs but not always in a way that follows SRFI-170.
- SRFI-180: JSON, Guile provides all of these APIs but not fully compatible with SRFI-180.
- SRFI-181: Custom ports, Guile provides similar features built-in but not in a way that follows SRFI-181.
#tech #software #Lisp #SchemeLang #Scheme #R7RS #GuileScheme #FunctionalProgramming
-
@momo cool!
Well then, please have a listen to the episodes of the #LispyGopherClimate podcast that me, @kentpitman and @screwlisp did these past few weeks:
- Kent Pitman presents his lisp condition system implemented for python
- Kent Pitman, Scott Zimmermann, Ramin Honary, Screwlisp: Lisp Conditions in Python
- Common Lisp condition handling lore
- Common Lisp condition system, code review of my programming example
- Common Lisp condition handling w/ Kent Pitman, Ramin Honary
#tech #software #Lisp #CommonLisp #Scheme #SchemeLang #R7RS #MITScheme #Guile #GuileScheme
-
@screwlisp @kentpitman I’m just reading up on the MIT-Scheme condition system. Recent efforts to standardize this are defined in SRFI-255: “Restarting conditions”.
An older standards condition systems in Scheme was defined in SRFI-35: “Conditions”. And #Guile users can use the Guile implementation of SRFI-35 to make use of it.
I wish I had known about this two weeks ago when we first started talking about it on the #LispyGopherClimate show, but better late than never, I guess.
#tech #software #Lisp #CommonLisp #Scheme #SchemeLang #R7RS #MITScheme #Guile #GuileScheme
-
The official steering committee of the Scheme programming language is calling a vote to replace themselvesQuoting 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.
#tech #software #Scheme #SchemeLang #ProgrammingLanguage #R7RS #R7RSLarge #Lisp #FunctionalProgramming #Guile #GuileScheme #ChezScheme #ChickenScheme #GambitScheme #RacketLang #Racket
-
Progress on my clone of the Emacs Lisp interpreterThis 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
-
@wingo is asking if anyone knows of a good course on the Nanopass framework (perhaps to recommend to others), but as usual he forgot to add hashtags to his post. So please reply to this post here: https://mastodon.social/@wingo/113956474737820425
#tech #software #Lisp #Scheme #SchemeLang #R7RS #R6RS #GuileScheme #Guile #Compilers #ProgrammingLanguages #PLT
-
what are the differences between resurrected GuileEmacs that was also announced in EmacsConf2024 and Gypsum? At first glance seems like both projects have the same goal.
@ram535 thanks for asking! The goal for both projects are similar, but they are achieved in slightly different ways.
Gypsum is a clone written in Scheme, meaning it is software the behaves exactly like Emacs, but it is written from scratch in a new code base. In this case, it is also being written in a completely different programming language, Scheme instead of C. The larger goal is to have an Emacs that is backward compatible with GNU Emacs but is written in Scheme that runs on any R7RS standard compliant Scheme implementation. There is no C code in this project at all, it is purely Scheme. I would like to also target other compilers such as MIT Scheme, Gambit, Stklos, and possibly Chicken and Larceny as well, though this will be pretty difficult and rely on a lot of
cond-expandcode. The larger goal is to have an Emacs app platform that encourages the use of the Scheme language for creating applications and text editing work flows, regardless of the underlying compiler.@lispwitch ‘s “GuileEmacs” is not a clone, but a fork of both GNU Emacs and GNU Guile, meaning it modifies the existing GNU Emacs code base and some of the Guile source base, replacing some of the C source code in GNU Emacs with other C source code from Guile. Then, the Emacs Lisp interpreter written in C is replaced with an Emacs Lisp interpreter written in Guile Scheme. This allows Emacs Lisp to be JIT compiled using Guile’s JIT compiler, and also make use of all of the Guile software ecosystem to extend Emacs. This is incredibly useful, because there is quite a lot of Guile software, including things like web servers and game engines, and soon it could all be available for use by Emacs programmers. It will probably also be production ready much sooner than my Gypsum project because it only needs to implement the core of Emacs Lisp to work. However, it relies on language features specific to Guile to achieve this, so it is not fully R7RS standards compliant, and will not work on other Scheme implementations.
#tech #software #Emacs #SchemeLang #Scheme #R7RS #Guile #GuileEmacs #GuileScheme
-
I tried using Marc Nieper-Wißkirchen’s Scheme pattern matcherIt’s called
(rapid match), and it is part of the “Rapid Scheme” compiler project, which is a Scheme compiler written in portable, standards-compliant R7RS “small” Scheme.It is tiny, only 300 lines of code, and compiles almost instantly. But it lacks features that other pattern matchers might have, especially matching on record data types, becuase the R7RS “small” standard does not provide any mechanism for introspection of record data. Also it cannot assign a whole pattern to a single variable, you can only match variables to elements inside of the pattern, which is unfortunate.
But it is efficient, and it gets the job done. It will probably cover 80% of all use cases. It’s best features are portability and it’s small footprint. I have decided to use it in my Gypsum software.
I also discovered that unfortunately Guile Scheme does not fully implement the R7RS standard for library definitions, it is missing the
(export (rename from-sym to-sym))declaration syntax. But I was able to work around it and get(rapid match)to build on Guile.#tech #software #SchemeLang #Scheme #R7RS #GuileScheme #Guile #FunctionalProgramming #PatternMatching
-
I am presenting for #EmacsConf2024The presentation is live now, and I am available for questions in the “Big Blue Button” chat room. Feel free to ask me questions here on ActivityPub.
- Stream URL: https://live0.emacsconf.org/dev.webm
- Presentation page: https://emacsconf.org/2024/talks/gypsum/
- Chat room: https://bbb.emacsverse.org/rooms/uqn-ewi-54c-roh/join
The project is an implementation of #EmacsLisp written in portable #R7RS standard #Scheme programming language. The reference implementation is written in #GuileScheme
-
“Question for lispers with experience: If you should start to learn a LISP style language today, which one do you pick up? Why?”
@syntaxerror The R7RS “Small” Scheme standard is roughly 80 pages, so you can learn about all of the language features very quickly. I love it because of it’s minimalism, it is my preferred language.
My take on it is that the “Small” Scheme standard is perfectly designed to construct larger programming languages with more features. One such language is R7RS “Large” Scheme, but you could theoretically use it to implement Common Lisp, Python, JavaScript, or any other language.
The R7RS “Large” standard is still being discussed (10 years after “small” was ratified), but it relies heavily on the “Scheme Request For Implementation“ (SRFI) process to fill out features. The larger portion of the R7RS “Large” standard is already ratified and published, so it is still useful even though it is not complete.
There are many Scheme implementations, but I recommend Guile, as it is almost completely R7RS-Small compliant, and has a ton of other useful features that come with it out of the box. So if you need, for example, a quick web server, or a way to search your filesystem, Guile has modules for that.
Another good batteries-included Lisp is Racket, which is a larger language built on top of Chez Scheme (an R6RS Standard Scheme implementation). You can easily install the R7RS Scheme language pack on Racket and write your code in Scheme as you read through the R7RS standard document.
Both Guile and Racket/CS (Chez Scheme) not only have many useful features, but compile to binary code that runs extremely fast for a high-level language.
Also, if you haven’t already, try to learn to use Emacs.
#tech #software #Lisp #CommonLisp #Scheme #SchemeLang #R7RS #Emacs #GuileScheme #RacketLang