digitalcourage.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
Diese Instanz wird betrieben von Digitalcourage e.V. für die Allgemeinheit. Damit wir das nachhaltig tun können, erheben wir einen jährlichen Vorausbeitrag von 1€/Monat per SEPA-Lastschrifteinzug.

Server stats:

832
active users

#scheme

6 posts6 participants0 posts today

Turns out Chez #Scheme has incredibly unhelpful error messages, basically just fails to parse anything, when you import (instead of include) a file that isn't actually in library form.

It was almost as bad as using Swift, except I didn't have to wait 10 minutes for Xcode to start & grind on each compile.

Replied in thread

@screwlisp The REPL editors can be better than SBCL's awful nothing or rlwrap.

Chez has a seriously powerful editor (microemacs-y, but different). LispPad and Wraith Scheme on Mac (and iOS with LispPad) have a normal visual editor.

But it works just fine to have Vim and REPL in a terminal, which I copy-paste between as I test/develop things. SLIME is just overengineering copy-paste.
#scheme #lisp #vim

Naming and Logic: #Programming Essentials with Scheme is now available in #print at epubli:

epubli.com/shop/naming-and-log

»from your first define to deploying your application in 64 pages«

If you order now, it might arrive in time for the 42nd birthday of #GNU on Sep 27th 2025.

»Guile #Scheme is … the official extension language of the GNU project«

Maybe it’s for you, maybe for a friend who always asked why you think that lisp is special.

More info and sources (cc by-sa):
draketo.de/software/programmin

""
epubliNaming and Logic von Arne Babenhauserheide - Buch - epubliKaufe Naming and Logic als Buch direkt im epubli-Shop und Arne Babenhauserheide verdient ca. 70 % mehr. Jetzt unterstützen!

Years of hitting UP UP UP to find this in my history (yes I know there are history commands, I'm just like this), and finally I add to .zshrc:

alias chezd='chez --debug-on-exception --script'

So I can:
% chezd foo.ss

It launches the debugger when my #Scheme code crashes. Which it never* does.

I have to go back and copy-paste this example for myself every time I inherit define-record-type in R6RS #Scheme

mdhughes.tech/2023/03/30/schem

But at least it's not R7RS where you can't even do that.

(I'm currently rewriting my grid system used in multiple programs which is a mess of records & vectors, and had duplicated code to deal with both)

Mark writes · Scheme Parent Protocols - Mark writesHere's a subtle point of using Scheme (Chez, R6RS) records with inheritance: ;; creates a record, two default fields (define-record-type Foo (fields (mutable x) (mutable y)) (protocol (λ (new) (λ (…

running a #scheme script to check missing localizations

% loccheck.scm -l fr
missing fr in vo.account.avatar.text %@
missing fr in vo.account.avatarname %@ %@
missing fr in vo.account.bio %@
missing fr in vo.account.field %@ %@
missing fr in vo.account.following.since %@
missing fr in vo.account.header.text %@
missing fr in vo.account.name.display %@
missing fr in vo.neo.description %@
missing fr in vo.post.revision.view
missing fr in vo.post.summary %@ %@ %@ %@
found: 521 / 531

wrote a Gauche #Scheme script to query a #mastodon instance blocklist and save it out to an importable file

(define (blocks domain)
(json-link #"https://~|domain|/api/v1/instance/domain_blocks"))

(define (blocklist domain file)
(call-with-output-file file
(lambda (out)
(for-each (lambda (block)
(write-string (cdr (assoc "domain" block)) out)
(newline out))
(vector->list (blocks domain))))))

Going back to Python+Django from Guile+SXML I think what I miss the most is using SXML for the templates.

AFAIK, in Django you need HTML, the Django template language, and templatetags for GUI components, GUI filters and other helpers (I'm not using JS GUI frameworks).

In Guile Scheme, SXML is just s-expressions, you can use regular Scheme as a «template language». Procedures work nicely as GUI components...

Django is great, though, in general.

#django#gnu#guile
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.

Kyou is kyou is kyou is kyou · Why Rewriting Emacs Is HardThere have been quite a few attempts to re-implement (part of) Emacs' functionalities in languages other than C, like JEmacs, remacs, and lem. And we are seeing new efforts in EmacsConf 2024: rune 1, gypsum 2, and the revived Guilemacs 3. (Strictly speaking, Guilemacs is more a fork than a total rewrite, but anyway.) However, a complete rewrite of (GNU) Emacs has always seemed like an insurmountable task, not just because writing editors is hard. This article aims to look into some of these difficulties and the Emacs designs (that of course have been exposed in some Emacs Lisp API) that lead to them.
#tech#software#Emacs

SSS (Supreme Sexp System) releases a feature-packed v3.4.8 ✨

codeberg.org/jjba23/sss

- #dracula palette perfected shown in the #screenshot
- experimental support for #catppuccin palette (#mocha and #latte)
- many improvements and quality of life added to this #gnu #linux quasi - #distro on top of #guix
- improvements to #gnus #email and to #nyxt #browser
- #maak file

SSS is a #rice 🖥️ 🍙 worthy of #unixporn and uses #guile #scheme #emacs #hyprland and more #ViernesDeEscritorio

Curious if anyone here would be interested in a long post on a not very well known #scheme
Specifically Owl Lisp
gitlab.com/owl-lisp/owl
I've got an old talk I gave in the dfw hacking scene on Radamsa, the primary tool written in Owl Lisp, and I think I'm going to try to dust it off and publish it with some extra online material to along with it. Basically a mix of PL theory at work in industry that isn't about dependent types or something complicated like that, just a little language and what that gives you when you devote yourself to authoring tools in your own language. fwiw this is not cheerleading though I love lisp, but an attempt at a sober examination of a somewhat rare phenomenon, a (very) successful lisp project, out in the world that uses its own dialect of scheme.
#lisp #vulnerability #tools #infosec #fuzzers

GitLabowl-lisp / owl · GitLabA functional Scheme for world domination

Over the next few weeks (or more) I want to spend some time with a #Lisp language. I'm now in a kind of embarrassment of riches situation.

I could get deeper into #Clojure which I'm already quite fluent with (e.g. get into macros, understand transducers, core.async.flow).

I could finally learn #CommonLisp. Tried it a few years ago, liked it, never did anything with it.

Or I could dive into #scheme other than #Racket (#Guile, #Gambit, #Gerbil, #ChezScheme), see what's cooking there.

🤔