7 ms·
Does anyone actually use Scheme for real projects? The only places I've ever seen it used have been in classrooms.
by tedivm 3y ago
Does anyone actually use Scheme for real projects? The only places I've ever seen it used have been in classrooms.
- duncan-donuts 3y agoLike all lisps it is niche. I don’t use scheme but have used Common Lisp and clojure for a few years. Racket has a thriving community as far as I can tell. You just don’t see lisp much in the wild but it’s there.
- fuzztester 3y agoMy totally uneducated and uninhibitedly snarky guess is that people who use any Lisp family language (except maybe Clojure) don't go around talking much about that fact, or thumping their chests about it, unlike (some) Ruby, Python or JS users. They probably just quietly go about using it and having fun, and talk about it when they meet each other.
- senkora 3y agoGuile Scheme is used extensively in the Guix linux distribution, and works quite nicely there.
- _zoltan_ 3y agoextreme niche on extreme niche.
- Zambyte 3y agoWhich is terribly unfortunate, because it solves very non-niche packaging problems in a very elegant way.
- bjoli 3y agoI had to use Nix in a project of mine and was surprised at how clunky it felt compared to guix. Writing packages meant string concatenations and juggling outputs to the command line. I prefer guix. Every day of the week.
- Zambyte 3y agoSame here. I used NixOS as my desktop operating system for a few months I think. It did not go great. After hopping a to a few other distros, now I've been using Guix as my OS for a few years.
- pxc 3y agoGuix is niche, but it's very much 'real software'. It does useful things well, and it solves some problems that very few competitors adequately do. It's used for reproducible scientific computing on some HPC clusters, which is a pretty cool niche if you ask me. The Guix package collection is also sizeable and growing exponentially-- within a few years, it'll probably outgrow most Linux distros in terms of size.
- deleted 3y ago[deleted]
- kdmccormick 3y agoUnless they have quietly rewritten it, HN itself is written in Scheme. Or, more precisely, it is written in Arc, which is implemented in Scheme.
- johncowan 3y agoFor "precisely" read "correctly". Unless the implementation language is exposed to users of the implemented language, it doesn't matter what the implementation language is. gfortran is written in C and C++, but that does not mean Fortran programs are written in C or C++.
- kdmccormick 3y agoOkay, I think what I said was clear enough, but if we're splitting hairs, I'll say: that's a bad comparison because gfortran is compiled to machine code. When you run a gfortran program, you're not executing anything that was written in C. When you run e.g. Python, the runtime written in C is indeed being executed. If nothing else in the world was written in C except the Python runtime, IMO it would still be fair to say that C is widely used. A security flaw in C compiler could potentially cause a vulnerability in any Python program. The question was "is Scheme used for anything in production?" and it is correct to say "yes it is used for HN" even if HN is not directly written in Scheme.
- retrac 3y agoIt's currently used as a back-end for the Idris language. (Which is primarily a research language, admittedly.) It's a fairly popular target for languages to compile to, for similar reasons that C is -- small, well-defined, minimal, many implementations, runs just about everywhere. Very nice compilation target for functional languages in particular, as call/cc can, with reasonable efficiency, implement just about any kind of control flow/evaluation/threading model that you can think of. Also, used as a scripting language in the GIMP.
- tmalsburg2 3y agoC is neither minimal nor well-defined, as has been discussed extensively. Random blog post illustrating only some of the issues is here [1]. Just google “undefined behavior c” for a lot more. There are also a bunch of famous rants by Linus Torvalds on his topic. [1] https://blog.regehr.org/archives/213 https://blog.regehr.org/archives/213
- PennRobotics 3y agocan we all agree that the undefined behavior is pretty well identified and documented? Plus, if you understand the entire language and then limit your imagination, C can be quite simple!
- mrguyorama 3y agoIt's so simple to avoid undefined behavior, just never add two numbers, or dereference a pointer that you can't statically guarantee the value of.
- spookie 3y agoYes, it's a simple language. That's why there are no safe guards around INT_MAX + 1, or variants of that.
- fluoridation 3y agoYou can add two numbers. If the operands are signed you just need to check the operands before the addition to make sure you won't cause an overflow.
- chongli 3y agoI think the biggest issue with any lisp is that it's just too damn powerful of a language. This makes it super easy for developers to create their own little ecosystem of macros and functions that nobody else can understand. This can be absolutely disastrous for large teams and companies looking to hire. Languages that force you to be more verbose and don't let you build your own ultra-powerful abstractions seem to work better for large teams where you can force everyone to adopt a standard style. This makes onboarding much easier too.
- remexre 3y agoI dunno, I got a (Common) Lisp job, and I don't think I've ever had a problem where I didn't understand the semantics of a macro; people aren't just making a ton of them all the time for no reason, and the ones that are popular are from popular libraries (e.g. alexandria and iterate) and have clear semantics. I think the same problem applies perfectly well to developers who "create their own little ecosystem of classes and functions nobody else can understand" -- I don't think [0] would be made any harder to understand by having macros involved. [0]: https://old.reddit.com/r/programming/comments/15s0lp6/how_we_reduced_the_cost_of_building_twitter_at/jwcdhil/?context=3 https://old.reddit.com/r/programming/comments/15s0lp6/how_we... (only picking on it because I saw it recently)
- tikhonj 3y agoPeople say this, but it hasn't been my experience in practice—the worst, most complex codebases I've seen have been in Python and Java. But I guess they look simple and uniform at a superficial, syntactic level. If you can't follow that it's your fault, if you can't follow Lisp code it's Lisp's fault...
- matrix12 3y agoWe use Gerbil/Gambit scheme in production. The new actor system makes it a very compelling.
- all2 3y agoHow do you handle Gerbil's incomplete docs? I'll admit, when I was looking at them I had no clue how Schemes worked, but I found the lack of documentation to be a very difficult barrier.
- BaculumMeumEst 3y agoi would wager that anyone ballsy enough to use gerbil in production is at a minimum very active on gitter and probably a contributor to the language
- matrix12 3y agoRemember Gerbil is a layer on top of Gambit, which has been 30 years in the making.
- matrix12 3y agoGitter has been a great resource. Vyzo is very helpful in answering questions. The docs could use some work. But the code is fairly trivial to follow on most things.
- kkylin 3y agoIsn't Julia's parser still in Scheme?
- cbkeller 3y agoFemptolisp, a "Scheme dialect"
- sundarurfriend 3y agoFor now, yes. The upcoming 1.10 release (which is now in beta) will switch to a pure Julia parser as the default (with the old Scheme parser available as an option). Not because of any fault with Scheme per se (afaik), just that contributors to Julia are more likely to know Julia than Scheme, so it makes sense from a maintanence point of view.
- adgjlsfhk1 3y agonote that in 1.10 scheme is still used for lowering (simplifying AST to IR which is a lot of code for julia)
- MadcapJake 3y agoChicken Scheme is a high performance source-to-source (C) Scheme that supports the R5RS and R7RS (work in progress) http://www.call-cc.org/ http://www.call-cc.org/
- evdubs 3y agoI use Racket (a Scheme) for option trading. https://github.com/evdubs/renegade-way https://github.com/evdubs/renegade-way
- sph 3y agoGreat example, very readable and with a GUI as well!
- dharmatech 3y agoFascinating! If you hadn't gone with Scheme, what's another language you'd have considered for this project?
- evdubs 3y agoJava and JavaFX.
- whartung 3y agoHow was your experience with Racket in this case vs Java (assuming you've had some FX experience to contrast it to)?
- evdubs 3y agoWith Racket: * I really enjoy using numeric towers and it is upsetting to me every time I go to another language where I can't just work with rationals as a default. * Having statistics functions, a GUI library, and a plot library all part of the standard distribution is wonderful. Dependencies are kept to a minimum, which I appreciate. Everything feels coherent and not over-engineered. * Poking around in the large standard library was straight forward and not difficult. I added candlesticks [1] to the plot library without understanding much of the plot library's design or implementation details. I think this would have been much more involved in many other languages. Where I perceive Java as nicer than Racket: * I wish Racket had real threads like Java. Having futures and places for actual concurrency / parallelism is not as nice. * I wish Racket had the rich data structures built in as Java has. You need to reach for an external library for a sorted data structure; this is not ideal. * Java's performance is great and its future is promising. Java already has some great GCs including low pause time GCs, Project Valhalla will add value objects to Java, and Project Loom will enhance the concurrency functionality offered in Java. I don't have much JavaFX experience, but my perception is that it would be fine and just as "cumbersome" as Racket's GUI and plot libraries. [1] https://docs.racket-lang.org/plot/renderer2d.html?q=candlesticks#%28def._%28%28lib._plot%2Fmain..rkt%29._candlesticks%29%29 https://docs.racket-lang.org/plot/renderer2d.html?q=candlest...
- dxbydt 3y agoI used it just the other day to work an aime problem for my middle schooler. scheme@(guile-user) [5]> (exp (* (atan 1) -2)) $9 = 0.20787957635076193 scheme@(guile-user) [5]> (expt 0+1i 0+1i) $10 = 0.20787957635076193+0.0i a problem c/c++/java/js/python/rust/go can't handle after decades of progress. even my favorite R can't work this problem. scheme ftw.
- satya71 3y agoHmm. Python 3.11 (didn't test in earlier) >>> from math import atan, exp >>> exp(atan(1)*-2) 0.20787957635076193 >>> 1j**1j (0.20787957635076193+0j)
- dxbydt 3y agothank you. i tested this on lc playground and yeah it does work.
- vinaypai 3y agoWhat's the "aime problem" and why can't c/c++/java/js/python/rust/go handle it?
- dqv 3y agoI did a little googol and found out it's like an accelerated math thing https://artofproblemsolving.com/wiki/index.php/American_Invitational_Mathematics_Examination https://artofproblemsolving.com/wiki/index.php/American_Invi...
- vinaypai 3y agoOkay, I was just wondering if there's something non-obvious here. I guess OP is just woefully misguided about languages other than scheme or "these languages can't handle it" means something more like "I don't know how to use those languages".
- 3y ago
- cosmojg 3y agoYes, the very website[1] on which you posted this comment is written in Scheme[2], for example. [1] https://en.wikipedia.org/wiki/Hacker_News https://en.wikipedia.org/wiki/Hacker_News [2] https://en.wikipedia.org/wiki/Arc_(programming_language) https://en.wikipedia.org/wiki/Arc_(programming_language)
- wk_end 3y agoNaughty Dog used Racket as part of the development of The Last of Us. [0] https://www.youtube.com/watch?v=oSmqbnhHp1c https://www.youtube.com/watch?v=oSmqbnhHp1c
- alexott 3y agoAround 20 years ago I worked on commercial email filtering/archiving system implemented in MzScheme (now PLT) - it was relatively small code base, but very powerful. I wrote an article about it in Russian (almost 15 years ago), for some reason google translate doesn’t work for archive url: https://web.archive.org/web/20210506123442/http://fprog.ru/2009/issue2/alex-ott-using-scheme-in-dozor-jet/ https://web.archive.org/web/20210506123442/http://fprog.ru/2...
- chriswarbo 3y agoI chose Racket for a project that involved lots of AST manipulation. Those ASTs were already in s-expression format, so Scheme seemed a natural fit. The lack of static types was annoying; Typed Racket helped, but was so slow I only enabled it during unit tests (more precisely: Typed Racket functions can be faster than those written in normal Racket, but calling them from normal Racket functions will be slow as it performs run-time checks) https://github.com/Warbo/theory-exploration-benchmarks/tree/master/scripts https://github.com/Warbo/theory-exploration-benchmarks/tree/...
- kryptiskt 3y agoI assume that Cisco is using Chez Scheme for something since they bought it (and open sourced it).
- deleted 3y ago[deleted]
- nextaccountic 3y agoRacket is very used in the PLT community (programming language theory) for prototyping programming languages. Lots of cool stuff in this area. For example, the MIR formality [0] project of the Rust programming language to formalize MIR (their intermediate language) was first prototyped in Racket [1], then rewritten in Rust. [1]'s readme give a rationale: > For the time being, the model is implemented in PLT Redex. PLT Redex was chosen because it is ridiculously accessible and fun to use. It lets you write down type system rules and operational semantics and then execute them, using a notation that is very similar to what is commonly used in published papers. You can also write collections of unit tests and fuzz your model by generating test programs automatically. > The hope is that PLT Redex will prove to be a sufficiently accessible tool that many Rust contributors will be able to understand, play with, and extend the model. > One downside of PLT Redex is that it doesn't scale naturally to performing proofs. We may choose to port the model to another system at some point, or maintain multiple variants. [0] https://github.com/rust-lang/a-mir-formality https://github.com/rust-lang/a-mir-formality [1] https://github.com/rust-lang/a-mir-formality/tree/1f40120f09b0560db21497673e9a0158fc69dd57 https://github.com/rust-lang/a-mir-formality/tree/1f40120f09...