6 ms·
Practical Scheme
- svenha 4y agoGauche Scheme is a beautiful and mature Scheme implementation that comes with a large supporting code base.
- eatonphil 4y agoGerbil (built on Gambit) has a really impressive-looking standard library (probably the biggest reason most Schemes don't get great adoption). It's got builtin JSON libraries, HTTP server and client libraries, protocol buffers, database drivers (builtin MySQL and PostgreSQL), etc. https://cons.io/reference/ https://cons.io/reference/ Actually looking at the libraries on this page for Gauche and comparing it to Gerbil, Gerbil seems way more practical for the kind of web/data work I normally do. The only big extensions this page lists on top of R7RS libraries (which are fine for programming but don't include much for typical development work on web/data/etc) seems to be for programming desktop apps. So for me the most practical Schemes (because of built in libraries) I can think of are Gerbil or Racket. But it's been a while since I've looked into Schemes.
- jgon 4y agoDoing a little bit of digging into the Gauche manual would have led you to a listing of the various utility libraries that it offers: http://practical-scheme.net/gauche/man/gauche-refe/Library-modules-_002d-Utilities.html http://practical-scheme.net/gauche/man/gauche-refe/Library-m... As you can see it is pretty extensive, and could likely handle most of the needs you mentioned in your comment. I would call this pretty “practical”.
- bicolao 4y agoOr this [1]. A bunch of gauche.* modules are not listed there. [1] http://practical-scheme.net/gauche/man/gauche-refe/Module-Index.html http://practical-scheme.net/gauche/man/gauche-refe/Module-In...
- mhitza 4y agoI'll have to give Gerbil a second look. I've written some small programs with Chicken Scheme (which honestly should be in any practical scheme list IMO) and while the standard library is not that big (my pet peeve as well with most languages) I really liked a scheme I could statically compile into a binary. For my project I also wanted to have some untrusted user code execution sandbox, and found such libraries for both Chicken and Guile. While the later one had better/fine grained execution environment options, Chicken won because of the possibility to easily compile.
- eatonphil 4y ago> I've written some small programs with Chicken Scheme (which honestly should be in any practical scheme list IMO) Yeah I've done some work with it too and I considered including it in my list except for exactly: > the standard library is not that big (my pet peeve as well with most languages) Not putting down any of the implementations. It's just that Gerbil and Racket have the most built in AFAICT.
- mmcdermott 4y agoI hadn't heard of Gerbil. The last Scheme I really hacked with was Chicken Scheme, but now I want to give Gerbil a run and see how it compares.
- ar-nelson 4y agoFrom my experience working on Schemepunk, Gerbil has a lot of interesting functionality but it's also very immature. Frequently modules will not quite match their documentation, or a simple mistake will cause a segfault. I wouldn't feel comfortable using it in production for something internet-facing.
- bsima 4y agoSchemepunk is awesome, thanks for making it! I’ve been meaning to attempt porting it to guile when I get some free time one of these days
- ar-nelson 4y agoiirc I wanted to port it to Guile originally but there was one major bug in Guile R7RS support that was stopping me. I think it was something about the way imports were named. I submitted an issue but it languished for at least half a year, I think because the dev in charge of that part of the code was busy with something else and not actively working on Guile. I haven't looked at the issue in a couple years, maybe it's fixed now. And thanks! (edit: I looked it up, they merged my fix for the bug in May 2021, maybe supporting Guile would be feasible now? https://debbugs.gnu.org/cgi/bugreport.cgi?bug=40252 https://debbugs.gnu.org/cgi/bugreport.cgi?bug=40252)
- hajile 4y agoMost Schemes have a very large standard library, but you have to know that the standard library is referred to by SRFI -- a bunch of random numbers rather than names. They don't list docs either. You have to know that you must go to the SRFI website and look up the API from the spec itself. I believe this has single-handedly done more to hurt scheme than any other thing the language has done.
- eddsh1994 4y agoWhy would you use Scheme over Racket, when Racket has so many basic libraries for useful things?
- adenozine 4y agoWhy would you use Racket when it barely resembles Scheme anymore? Also, Akkuscm exists now, so you can get free r{6,7}rs libraries for most scheme implementations from there, in a sane, pragmatic Scheme environment.
- mmcdermott 4y ago> Why would you use Racket when it barely resembles Scheme anymore? In fairness, they stopped calling themselves a Scheme for a reason. More innovation in the Lisp space is a good thing.
- BeetleB 4y agoCan't you write Scheme in Racket? https://www.monolune.com/articles/running-scheme-programs-using-racket/ https://www.monolune.com/articles/running-scheme-programs-us...
- erjiang 4y agoTotally, and Racket is cool because you can see it as a framework for creating languages. But Racket is built on top of Chez Scheme so you can also use that directly if you just want a Scheme.
- graboid 4y agoNever used any Scheme, so I wanted to make sure I interpret that site correctly. It provides packages written in any Scheme, which you can use from any other Scheme (which works because they follow the same specification (R6RS/R7RS))? That's pretty cool.
- adenozine 4y ago
- ar-nelson 4y agoI started a project a few years ago with the goal of making more Schemes practical like this: Schemepunk (https://github.com/ar-nelson/schemepunk https://github.com/ar-nelson/schemepunk) The idea was to make a standard library as widely compatible with existing Schemes as possible. If it worked, then I could write code (with this library) that was "just Scheme", not a particular implementation, and would run equally well on any Scheme. And it would make bootstrapping new Scheme implementations easy: all you'd need is a bare minimum of R7RS Small functionality, and Schemepunk could do the rest. I haven't worked on it for a while, since I've moved on to other things. But I still think the idea has a lot of potential.
- dmux 4y agoPrevious thread about the author of Practical Scheme [0]. Turns out he has an IMDB page and everything! [0] https://news.ycombinator.com/item?id=24089601 https://news.ycombinator.com/item?id=24089601
- cdcarter 4y agoI tried to get started with Guile a few months ago, to write a little command line app. I'll admit, I got pretty lost trying to figure out libraries/modules/how to use R7RS etc... This looks like a good getting started, though I'm not sure if Guile is still the right choice.
- davexunit 4y agoI think Guile is great, and especially so for command line things. Great POSIX support.
- llanowarelves 4y agoOne nice thing about Guile is that you can use it drive Guix. Not that using another Scheme for your stuff would seriously hamper you from using Guile in Guix anyway.
- neilv 4y agoMost of the content on this page looks like it could be 20 years old with minor updates, which isn't so practical, IMHO. If you want to start with practical Scheme, consider starting with one that has a community actively using it (and growing the open source libraries, and creating reason for the core to be maintained and maybe developed). The most obvious one is Racket, and there's also Chicken, Gerbil, Guile, Gambit, and a bunch of others. Beware: there's also a ton of personal side projects (making your own Scheme is a rite of passage), and a lot of abandoned things (often great, but still abandoned).
- eatonphil 4y ago> making your own Scheme is a rite of passage 100%. The ecraven benchmarks though are a good test of completeness (can the implementation actually run all the tests?) and quality (what is the ranking of the implementation): http://ecraven.github.io/r7rs-benchmarks/ http://ecraven.github.io/r7rs-benchmarks/.