I made a thing! Learning Scheme for reals while contributing to the ecosystem…living the dream ☺️

https://wiki.call-cc.org/eggref/5/lru-cache

#scheme #chickenscheme

lru-cache - The CHICKEN Scheme wiki

#scheme ports and processes :)

I open a process of "/bin/sh"
and then write the string "ls" to it and then
a newline (return).

This is like typing "ls" at a shell and those are indeed
the files in that directory.
It hangs because the shell is still open and nothing
is happennging after it is done with the output.
(so maybe don't read a port that is blocking because
you will be stuck :P)


#;2> (define s (sh-test))
#;3> (define pout (cadr s))
#;4> (define pin (car s))
#;5> (write "ls" pout)
#;6> (newline pout)
#;7> (read pin)
Makefile
#;8> (read pin)
NOTES
#;9> (read pin)
README
#;10> (read pin)
mail-file
#;11> (read pin)
main.exe
#;12> (read pin)
main.scm
#;13> (read pin)
scsh-tests.scm
#;14> (read pin)
(read pin)
[it hangs here ...]


I'm guessing if I write "exit" plus a newline to the shell
process before doing the reads it would not hang
because the port would close.

Regardless this is pretty good starting primitives
for me to run unix stuff from chicken, like sending
email from terminal command.

Next I want to get piping to work so I can pip in the body of the
email like you do when you send an email on the commandline.


echo msg-file | mail -s 'email subject 123' [email protected]


What's not in my profile?

I used to be a huge Wirth-ian in the 1990s and spewed excellent tirades against the evils of C. Niklaus Wirth is also my "PhD grandfather" via Michael Franz at #UCIrvine.

I prefer lecturing sitting down in front of a laptop and talking while I do stuff on said laptop. I very much dislike slides and prefer chalk and blackboard for things like data structures.

I got my "15 minutes of fame" served unexpectedly:

https://www.insidehighered.com/news/2013/02/12/students-boycott-final-challenge-professors-grading-policy-and-get
https://boingboing.net/2013/02/19/students-get-class-wide-as-by.html
https://archive.nytimes.com/economix.blogs.nytimes.com/2013/02/14/gaming-the-system/

But it still was fun.

I got my undergraduate degree from https://www.cs.hm.edu/ which back then was not allowed to feed into PhD programs. It's a thing in Germany: Everything is tiered and changing the tiers requires a change to the constitution of the republic (I am joking, but not really) so it takes a while. (Nowadays it would be easier to go on to a PhD from there.) The "plus" was that I spent two semesters in industry. In one I quickly out-FORTRAN-ed my boss, in the other I learned C++ from Stroustrup in two weeks while riding the bus. Beat that Ivy League!

I grew up on #c64 #basic and #mos6502 (well, #mos6510 I guess) assembly, went on to #m68k assembly, #gfabasic and lots of #oberon. Of course I was dabbling in #modula2, #prolog, #scheme, and more. Then it was mostly whatever I needed so #fortran, #cpp, #java, lots of #python, lots more #c, lots more #arm and #x86 assembly, some #golang, some #ocaml, some #csharp even if you can believe it. Nowadays it's pretty much #c all day with chunks of #python and bits of #rust now and then. And chunks of #bash too.

(Proudly self-plagiarized off of a few 2023/2024 posts from my previous account.) #introduction #SorryItsLate

Students boycott final to challenge professor's grading policy (and get As)

To test limits of Johns Hopkins professor's scaled grading policy, all of his students boycott the final -- and all get As as a result.

Inside Higher Ed | Higher Education News, Events and Jobs
Spring Lisp Game Jam 2026

A game jam from 2026-05-15 to 2026-06-01 hosted by technomancy & David Thompson. Lisp Game Jam is a recurring game jam taking place for a full 10 days. After the jam has finished, 7 days are given to everyone to try out the game su...

itch.io

I just cannot stand it when people say the emperor’s new clothes are resplendent, yet I look at the imperial person and the poor ruler of the empire is completely undressed. The man is stark naked!

That is why I am adamant there is no such thing as ‘entanglement’ or a ‘quantum computer’ that actually works. Only a dope or a dupe believes one part of the EM field can affect another at a distance!

And R⁶RS is a HUGE PITA to use, bereft of features, yet THIS is the ADVANCED Scheme? Golly!
#scheme

If you want to build this with recent Chez: https://github.com/gwatt/chez-exe

Then try this patch:
https://pastebin.com/kZ7cC4bV

#scheme

GitHub - gwatt/chez-exe: Chez Scheme self hosting executable

Chez Scheme self hosting executable. Contribute to gwatt/chez-exe development by creating an account on GitHub.

GitHub

If you do Facebook and want to share in my gentle rage at the suggestion R⁷RS is ‘reactionary’: https://www.facebook.com/share/p/18QM6HJAAY/

#scheme

Barry Schwartz

I came across Kent Dybvig years ago referring to R⁷RS as an ‘unfortunate reactionary movement’ or some such and begrudgingly admitting that Chez Scheme should have some limited concessions to the new...

Here, on the other hand, is the output of (iota_ 10) from Gauche Scheme, using only R⁷RS-small:

(0 1 2 3 4 5 6 7 8 9)

With SRFI-1 and R⁴RS or R⁵RS you can use the same definition. Just substitute (circular-list 1) for ´#0=(1 . #0#)

(SRFI-1 is also (scheme list) of R⁷RS-large.)

It is R⁶RS that steps backwards and is reactionary, by rejecting the request for implementation of a list library that recognizes the usefulness of circular and dotted lists!▪️

#scheme