Follow

@rml
Do you know any small (?) projects I could browse to learn by example?

I've been trying to get into for ages, but most tutorials are either philosophical/historical or only cover the basics. Take hautils[1], a collection of small POSIX utilities written in /#harelang, which demonstrates digestible common programming practices, which would be out of scope for the official tutorial. Is there an analogue project for scheme?

Feel free to boost.

[1]: git.sr.ht/~sircmpwn/hautils

@torresjrjr
I have a shell I'm working on that I'll put online next week, and part of its purpose is to make it dead simple for ppl to get started exploring interactive system scripting in scheme. it mimics common unix commands to simplify linux in lisp, and its only around ~500 LOC.

at the same time, it makes heavy use of Scheme's more advanced syntax-case and delimited continuations, which are honestly hard & take time and dedication to use effectively. tbh, no PL has been more challenging to grok than scheme personally, and many now seasoned Schemers on the #guix mailing list shared similar experiences. & I dont think its because scheme is minimal; most big schemes probably cover as much ground as common #lisp tbh, but w/more modern tools. what makes it difficult is that everything in scheme is extremely general; its entire philosophy is that features are paid for in the decisions they require implementers to make when navigating the trade offs in non-determinism decided in reduction strategies, forfeighting powerful tools like continuations from the onset for ux, features the biggest langs like Java spent millions overhauling their infra to include in recent years. so scheme's staple features were chosen bcs they're capable of expressing a great number of features extremely concisely.

every staple feature of scm is in a way its own discipline, its hard work; but youll be able to create things ex nihilo u didnt know possible. Before I switched to scheme I felt good at #racket. scheme was surprisingly a shock to the system. but I've grown as by leaps & bounds. and I don't think I would so much with racket.

I wish I had better repos to recommend; most notable scheme repos tend to all be relatively advanced. but just start reading all the literature, papers, it'll make sense w/time & effort. but I can't recommend Guix enough, theres no more interesting body of code I've ever studied, and it levels up gradually, from packages up.

Also, Kent Dybvig's The Scheme PL. The book proper is only 90 pages long, covering all the essentials, followed by hundreds of examples, lower level stuff, metacircular evaluators, a toy cursor text editor.. it gets steep, but I return all the time.
www.scheme.com/tspl4

JRM's syntax-rules primer:
gist.githubusercontent.com/tom

Kristopher Micinski's courses
youtube.com/@krismicinski/vide

@torresjrjr Mike Gran's #Guile100 project seems to have been abandoned a while ago, but, as far as it goes, it appears to fit your needs perfectly: a series of small shell utilities in #Guile (think cat, ls, echo, etc.) a bit like hautils. As I said, it's no longer maintained, but I found it very useful for this purpose.

github.com/spk121/guile100/

@rml

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.