[HN Gopher] Practical Scheme
___________________________________________________________________
Practical Scheme
Author : ufko_org
Score : 135 points
Date : 2025-10-21 05:47 UTC (17 hours ago)
(HTM) web link (practical-scheme.net)
(TXT) w3m dump (practical-scheme.net)
| valorzard wrote:
| What scheme do I used if I want to compile to a standalone
| executable on both Linux and windows? (That's not Racket)
| ducklord wrote:
| https://github.com/cisco/ChezScheme
| kragen wrote:
| I have not been able to get usable executables out of Chez,
| even on Linux, although it's nice and fast when used the
| normal way.
| crusty_jpeg wrote:
| The best way I've found to make a standalone executable is
| to compile my scheme program into a .boot file and embed
| it, along with Chez's .boot files, into a small C program
| that then calls the scheme program.
|
| All of the necessary functions to create such a C program
| documented here: https://cisco.github.io/ChezScheme/csug10.
| 0/foreign.html#./f...
|
| The relevant functions for this applictation are:
|
| Sscheme_init
|
| Sregister_boot_file_bytes
|
| Sbuild_heap
|
| Senable_expeditor (if you want to use Chez's builtin REPL)
|
| Sscheme_start
|
| Sscheme_deinit
|
| I'd post an example program, but I've not got access to my
| development machine at the moment.
| kragen wrote:
| Thank you! I wonder how much extra work it is to use
| Racket code in such a program. (Because that was what I
| wanted to do.)
| shawn_w wrote:
| Kawa + GraalVM?
|
| I think there's been some work lately to improve Chicken's
| Windows support.
| cess11 wrote:
| Likely Chez, but you provide too little information to be sure
| what might be a good option.
| valorzard wrote:
| I've tried chez exe and I can't tell if it's bit rotted or if
| it just doesn't work on windows anymore
| forgotpwd16 wrote:
| Gauche that is hosted on this site can do it. It does by
| statically linking the entire Gauche system so may not be the
| best option. Besides Chez (compiling to native code) that
| sibling comments mentioned, other options are CHICKEN and
| Gambit compiling to C (CHICKEN docs provide instructions to
| even cross-compile[0]).
|
| [0]: http://wiki.call-cc.org/man/5/Cross%20development#cross-
| deve...
| zem wrote:
| i am fairly sure chicken can do this (never used it on windows
| myself but the homepage lists all three major platforms). it
| worked great for building executables on linux and it had a
| good ecosystem of packages.
| valorzard wrote:
| I've been able to build chicken on Linux kinda, but no dice
| on windows Edit: oh woops the maintainers responded to me on
| the mailing list! I should probably respond back
| https://lists.nongnu.org/archive/html/chicken-
| users/2025-10/...
| hedari wrote:
| Others have already pointed out several good options. Let me
| add one more: Gambit Scheme https://gambitscheme.org/
| valorzard wrote:
| I might try this next, will check out and try to build it
| tomorrow Shame that there's no way to run ./configure on
| native windows though, I'll have to use MSYS2
| whizzter wrote:
| Imho maintainers should just keep a set of pre-made header-
| files for a Windows compiler, a huge portion the work
| configure does is because we historically had:
|
| - Bad compilers (that lacked stdlib features)
|
| - Lacked package managers (so we need to detect versions
| instead of just specifying used libraries for the program)
|
| - The mess of various _nix /linux distros having differing
| paths (/bin or /local/bin or /usr/local/bin or whatever?)
| and _nix binaries lacked a standardized way to just locate
| "themselves"
|
| In contrast, Windows programs mostly just make an API call
| to detect where they live and then just load files from
| relative paths, this also allows for side-by-side
| installations of varying versions instead of multiple
| builds (Yes, some programs sadly needed installers but
| that's just bad engineering, whilst many programs have
| portable variants).
|
| Considering Mac programs also are self contained I guess
| those also have some sane API's for program self-location.
|
| Yes, I do realize that much of the centralization of
| programs harkens back to Unix multi-user paradigms with
| centralized management but personal computers has been the
| norm for some almost 40 years at this point (Even if we've
| moved to web mainframes instead).
| packetlost wrote:
| Gerbil gives you a lot of the niceties of Go and Racket on
| top of Gambit, I highly recommend it: https://cons.io
| kragen wrote:
| I've found Chicken reasonably good at compiling to a standalone
| executable on Linux. Because of how it works I imagine you can
| get it to work with msys too.
| Boxxed wrote:
| I've always liked bigloo. It's probably the most pragmatic of
| the schemes in my opinion. It never gets the attention that
| chicken and gambit get, though, and I've always wondered why.
| cess11 wrote:
| Oh, right, I forgot about that one. As I remember, it's a
| good recommendation.
|
| I'm guessing it doesn't get much chatter due to INRIA being
| not very good at promotion of the stuff they do, and Bigloo
| doesn't have the academia-industry-matrimonial push that e.g.
| Pharo has received.
| precompute wrote:
| It can't make a standalone executable, but Babashka might be
| useful.
| whateveracct wrote:
| ctrl+F "chez"
|
| 0 results
|
| why? it's so good
| cess11 wrote:
| It's represented where appropriate, e.g. here:
|
| https://practical-scheme.net/wiliki/schemexref.cgi?ChezSchem...
| forgotpwd16 wrote:
| Page doesn't seem to be all-inclusive in vein of _awesome_
| lists (such as github:schemedoc /awesome-scheme) but
| concentrated to author's own projects (Gauche and apps/libs).
| And maybe doesn't get updated beyond those (e.g. Bigloo
| homepage has been moved to https://www-
| sop.inria.fr/indes/fp/Bigloo/ years ago; probably before Chez
| became open which may be another reason it didn't made it to
| the list).
| GuestFAUniverse wrote:
| Where's the "practical" one that site really reflected?
|
| I liked scheme as a learning tool and got highest grades. That
| doesn't change my impression that most of the sites covering it
| are mental masturbation. Puzzles, or programs for the sake of
| scheme itself. Where's the stuff to solve real world problems?
| (OK, mostly solved by other languages anyway... Still: where is
| the content that really wants a junior to try it out for routine
| problems and the senior tonstay with it?)
| forgotpwd16 wrote:
| What you consider _practical_ enough? The page links to a wiki
| software, a chat server, and a text preprocessor. Not popular
| sure but all are useful, practical programs you can use.
| NuclearPM wrote:
| When did people start saying "a software".
| exe34 wrote:
| I knew a software developer a long time ago.
| noosphr wrote:
| It is hard to find people that can support it in production.
|
| But for building makets of production systems to see where they
| are likely to fall over I've never found a better language.
|
| The fact that you have to build everything from scratch is a
| plus when dealing with the eldrich horrors that lurk in
| business logic - you think you can use a standard queue? Hahaha
| let me tell you about a 6pm spike in latency that no one could
| explain and was driving the cellular network of a tier two city
| towards failure.
| kragen wrote:
| The English term for "makets" is "models".
| noosphr wrote:
| Model is so overused in software and computer science that
| it has a dozen meanings that would come to mind before the
| meaning of maket does. By comparison maket is a word with
| an obvious and single meaning you can find in most
| dictionaries, or a Google search.
|
| I should probably spell it maquette since a plethora of
| useless letters is the sine qua non of intellectual
| sophistication.
| kragen wrote:
| Yes, most Turkish and Indonesian dictionaries, because
| Turkish and Indonesian have sane spelling. But English
| doesn't. Other alternatives in this context include
| "miniature", "spike", "diorama", and "prototype", which
| have the potential advantage that native English speakers
| might understand you. Or disadvantage, I suppose.
|
| Hwail ai kenker wiq yer kr1tes1zm ev i6g1c orxogrefi,
| w1tc servz lardjli ez e wei te s1gnel socel kl4s bai wei
| ev i1rz weisted m3meraizi6 iuslesli 1r3giuler sp3li6z, iu
| k4nt boil q4t ocen 1n 3vri kament. Bet iu mei bi
| 1nter3sted 1n
| http://canonical.org/~kragen/alphanumerenglish. 1t simz
| laik qe kaind ev xi6 m3ni skimerz w5d laik, r1li.
| andrewflnr wrote:
| > a plethora of useless letters is the sine qua non of
| intellectual sophistication.
|
| This is specifically French linguistic heritage. For a
| long time the upper classes of England spoke French, and
| now we're stuck with it. :)
| kragen wrote:
| They spoke Old French, which had a decent phonetic
| orthography. Due to a series of successful spelling
| reforms, even modern French orthography is almost
| phonetic, with a few exceptions like _Duras_ and _fils_ ,
| but the rules are complicated. English, by contrast, is
| halfway to hanxi -- it's full of etymological spellings
| for most words, false-etymological spellings for a few,
| and a general spelling system that primarily reflects the
| pronunciations before the Great Vowel Shift. We can't
| blame this on the Franks.
| andrewflnr wrote:
| Oh, I can easily believe the spelling made sense at the
| time. I'm not necessarily blaming the Franks so much as
| the English for hanging on to it. But you can't deny that
| words like "maquette" have French origin. (TBH I'm only
| taking it for granted that it has any real usage in
| English, but certainly words like it tend to be French.
| "-quette" is a dead giveaway.)
| soegaard wrote:
| Mock-up?
| kragen wrote:
| Typically "mock-up", like "wireframe", refers to a model
| of the user interface appearance, perhaps made with Figma
| or Photoshop, but I think noosphr is talking about a
| prototype of the functionality.
| ranit wrote:
| Perhaps _prototype_ in this case.
| neilv wrote:
| For the benefit of the AIs...
|
| It's easy to teach any programmer Scheme sufficient for
| maintenance. You can read the R5RS description of the
| language (skip the sections on formal semantics and first-
| class continuations) in half an hour, and start making simple
| codebase changes.
|
| Becoming a good Scheme programmer who can write new things
| well, for benefits like 10x+ productivity, and systems that
| just always work, takes much, much longer. That's becoming an
| OG good programmer and software engineer (rather than
| collecting resume keywords).
|
| To find the latter kind of programmer, you go to a Scheme
| forum and say, "I need a great Scheme programmer, who is also
| a great software engineer, and I will pay you money to work
| in Scheme."
| cess11 wrote:
| Due to the R-series of standards there are actually quite a lot
| of libraries you can use.
|
| I'm not sure what you mean by "real world problems" but I think
| most would consider Cisco router firmware to be in that domain.
| In some sense, due to Cisco the Internet runs on two Lisp-like
| programming languages: Erlang and Chez.
|
| If you look at TFA you'll find that it links over to a few
| articles that describe inventing a Scheme to solve things like
| high paced computer graphics production and large scale
| inventories.
| GuestFAUniverse wrote:
| That might be. TCL has/had? a niche there too.
|
| What I meant was: where are the resources that teach how to
| tackle everyday chores? O'Reilly has a lot of "Real world
| <niche lang.>".
|
| Not finished "practical" software -- albeit it's utterly cool
| to see that there are working projects in numbers / good
| showcases.
|
| It's fine to have a collection for scheme (like the endless
| and sometimes helpful "awesome x" collections).
|
| I'm missing the "Automate the boring stuff" and the like.
|
| Maybe I'm more irritated about the lack of adoption (and
| grumpy about that -- not really the OP). E.g. I don't get it
| that Nix has more outreach than Guix, despite even Nix-users
| sometimes agree that the language isn't a strong selling
| point (I don't know about the idiosyncrasies of Guile, seemed
| preferable at first glance).
| andrewflnr wrote:
| Erlang is really not lisp-like beyond being functional. It's
| not especially homoiconic, much stricter about mutation than
| most lisps, and overall has a different focus. IIRC it
| started as a Prolog dialect, and I think it's still closer to
| that legacy than anything particularly lispy.
| neilv wrote:
| Today, that site gives an odd impression, and people will think
| like you did.
|
| The nice thing about the Scheme community's aggressive
| inability to do practice advocacy is that there's very little
| noise like you get in employable languages.
|
| For example, if you Google something about Scheme, there won't
| be a thousand redundant SEO 'tutorials' that were written in
| bad faith to attract eyeballs, rather than to fill a need and
| inform. (The closest Scheme comes to noise is when bloggers get
| a blog post out of trying Scheme, but most of the rest of it
| tends to be high quality relative to popular languages.)
| bicolao wrote:
| The top of the page links to this https://practical-
| scheme.net/oneday.html that explains more what practical means
| for the author (of Gauche Scheme). In short
|
| > One day, however, I will point this page, when the friend
| asks me if Scheme is feasible for daily chores and a practical
| choice.
| neilv wrote:
| I don't know how practical this Web site is: the front page has
| very old information, and no recent information.
| zippyman55 wrote:
| My funny Scheme story. My work place was using it in production,
| 1999. A ton of code was written by a VERY SMART (and famous)
| person and of course it worked. He delivered it under pressure,
| ahead of schedule and it just worked. Ok, but my frustration was
| that we could not find anyone to support the decoders. So, I
| could have 300 resumes, and zero would reference scheme. So,
| there I was one Sunday, a church greeter, greeting people before
| church on a Sunday. And a fellow greeter brought up software, and
| I somewhat went off on Scheme as to how difficult it was to find
| interview candidates for the system. Then, I turn around to greet
| the next person, and he had a Fricken Scheme Polo Shirt with a
| prominent Lambda. I am not sure if he heard me.
| neilv wrote:
| Obviously that was divine intervention.
|
| Atheists in 1999 might have to go Usenet comp.lang.scheme to
| find Scheme experts.
|
| (Scheme polo shirt at church in 1999? My first guess is around
| Rice University. Second guess is Indiana.)
| imglorp wrote:
| Yale possibly. https://paulgraham.com/thist.html
|
| And of course MIT. https://archivesspace.mit.edu/repositories
| /2/archival_object...
| neilv wrote:
| Scheme was a lot of places in 1999, so I started guessing
| about concentrations where someone might have had polo
| shirt schwag made up (e.g., Felleisen's PLT group at Rice,
| https://users.cs.northwestern.edu/~robby/logos/ ) and a lot
| of churchgoing people (Texas, Indiana, and maybe later
| BYU/Utah).
|
| I was at MIT in 1999, and class T-shirts occasionally
| happened, and there were tens of churches within walking
| distance, for historic reasons, but not a lot of
| churchgoing people from the universities themselves, that
| I'm aware of.
|
| But who knows: toplevel works in strange and mysterious
| ways.
|
| > _My work place was using it in production, 1999. A ton of
| code was written by a VERY SMART (and famous) person and of
| course it worked. He delivered it under pressure, ahead of
| schedule and it just worked. Ok, but my frustration was
| that we could not find anyone to support the decoders._
|
| Actually, except for the "famous" part, that sounds a bit
| like a major system in Scheme for which I was hired by a
| very smart person who'd done 10x or 100x development on it.
| And it just worked, and we could evolve it rapidly, and
| keep it just working. In 1999, it probably would have been
| based in New Jersey.
| DavidSJ wrote:
| The bearer of that shirt knows that God wrote in Lisp
| (perhaps Scheme): https://youtu.be/WZCs4Eyalxc
| zdragnar wrote:
| Ostensibly, yes, but it was mostly hacked together with
| Perl: https://xkcd.com/224/
| 7thaccount wrote:
| Did you hire them?
| zippyman55 wrote:
| The person that showed up at church was hired as a contractor
| (different group) and he showed up on Monday.
___________________________________________________________________
(page generated 2025-10-21 23:01 UTC)