5 ms·
I believe this article is selling Guile short. I think it is the most pragmatic Lisp around. I love Lisp's ideas but I find all modern implementations terrible
by sph 3y ago
I believe this article is selling Guile short. I think it is the most pragmatic Lisp around.
I love Lisp's ideas but I find all modern implementations terrible. I would go so far as to say Lisp aren't popular because what we have today is not good enough. Common Lisp is the most advanced one, but it is like C++: it does everything and the kitchen sink. Design by committee. You want functional programming AND imperative? You want documentation that reads like an IBM mainframe manual? You want a standard library with names as cryptic as ANSI C? We got all that. But frankly, it is the one to build serious production software with.
Racket is the best for a beginner, but it keeps having that academic, "we made it for the kids" feel of being easy to understand but not very pragmatic for a seasoned programmer. And it is one of a kind, so a good Racket developer might never know Lisp itself.
Schemes are fun, but the only standard everyone agrees to relegates to small embeddable languages almost like Lua. They are not made to live on their own almost. Since the standard is very simple, there are half a million implementations that are not very practical. But of these, there is Guile, which has a pretty decent documentation AND standard library (even a built in PEG parser!), actively developed and it is my opinion that is it very underrated and the only Lisp worth my time these days.
To be honest, the most popular Lisp in the world is Emacs Lisp bar none. How's that Guile port coming along anyway?
- velcrovan 3y ago> Racket is the best for a beginner, but it keeps having that academic, "we made it for the kids" feel of being easy to understand but not very pragmatic for a seasoned programmer. And it is one of a kind, so a good Racket developer might never know Lisp itself. As someone trying to write definitively about cold hard reasons Racket remains in relative obscurity, I would be interested to know specifics you can provide for this view. Is it just academia vibes? Or are there specific aspects of Racket that in your view repel “seasoned programmers”? I notice you praise Guile for having decent documentation and standard library. How do you believe Racket’s documentation and standard library compare to Guile’s?
- sph 3y agoSorry, I don't have anything more concrete than "general vibes." Like, there's thousands of libraries and modules in Racket, sometimes competing with each other, that feel like they have been developed for a school project and kept around. And it is no secret that Matthew Flatt, one of the lead developers, is actually a professor at Utah University. In my experience, it is pretty easy to tell when a language and ecosystem is developed in academia, or developed by software engineers by trade. They have two very different goals and approaches to the same problem. The former might focus on educational purpose for newbies, the latter on shipping production-ready software for professionals. (In my humble opinion, this is one of the reasons Smalltalk never went very far in the real world. Too much focus on the educational aspect of it.)
- igouy 3y agoIs "Smalltalk never went very far in the real world" also based on nothing more concrete than "general vibes." ? "A Shipping Industry Case Study" https://seaside.gemtalksystems.com/docs/OOCL_SuccessStory.pdf https://seaside.gemtalksystems.com/docs/OOCL_SuccessStory.pd... How do you know what corporations used to develop custom business systems?
- a1369209993 3y ago> Or are there specific aspects of Racket that in your view repel [competent programmers]? This is anecdotal and over a decade ago, but quite specific: my first exposure to Racket was with a version of the language (I think it was some pragma-type thing like `#lang`, but it's been a while) allegedly intended for CS classes, and included something along the lines of [exact spelling and phrasing almost certainly differ]: > (cons 'foo 'bar) error: cons: 'bar is not a list I immediately deleted the Racket installation and added it to the same set of blacklists as the Java Virtual Machine (and hypothetically any COBOL implementations I ever encounter). That any version of the language would behave that way, much less one purportedly intended for people who are only just learning LISP in the first place, is a insult to everyone who ever bothered to actually learn LISP in the first place. This is the sort of "Dangling by a Trivial Feature"[0] thing that there's just no excuse for, like trying out a new text editor and discoving that pressing backspace inserts the text "^H", except it was clearly deliberately aimed at people who didn't know any better and would 'hopefully' not realise there was a problem, rather than just being a local idiosyncracy[1], because cons did work correctly under other dialect settings. Actively trying to fuck over newcomers who are only just learning LISP (or programming in general) deeply offends me. 0: https://prog21.dadgum.com/160.html https://prog21.dadgum.com/160.html 1: In which case I still wouldn't use Racket myself, but I wouldn't be actively opposed to anyone else doing so.
- drekipus 3y agoI've dabbled in a few lisps and definitely a noobie but I have absolutely no idea what you're talking about
- logicprog 3y agoThat language behavior fundamentally misrepresents how a proper cons should actually work. It's a link between any two values, represented as essentially two joined pointers, one to each value. It represents a linked list when cons cells are nested, but that's just something that falls out of the far more beautiful and fundamental core axiom of the cons cell, not all of what cons cells are. Thus claiming cons cells must be nested (which is what requiring the second argument of cons to be a list (I.e. more nested cons cells or nil) implies) is actually bastardizing what a cons cell is, reducing it to a menial operation for producing lists that means the same thing as "prepend" instead of an elegant core abstraction you can derive further things from. Bastardizing it like this, honestly especially in a language for teaching CS, in the name of talking down to students, is unforgivable. I learned Common Lisp at 12 partially from Land of Lisp and partially from a Lisp 1.5 manual and experimentation. Properly learning the core abstractions was vital.
- davexunit 3y agoYeah Guile should get more love! Very practical lisp that punches above its weight. I've had the fortune of writing Guile as my full-time job for the past year and I've been a user for a lot longer so I can attest that you can get stuff done with it.
- NeutralForest 3y agoLol, a bit scathing but mostly fair from my experience. I haven't used Lisps a lot but I'm a pretty big Emacs user and I've played around with the languages your mentioned and I feel somewhat the same. I'll just add that the ideas and many libraries around Racket are super cool. There's really a bunch of documentation and tutorials for a lot of things, it's fun.
- nerdponx 3y agoThe problem with CL is not that it does everything, but that it does everything with a mish-mash of inconsistent idioms, thick layers of jargon, and implementation-specific behavior in places where you wouldn't really expect, leading to a combination of implementation lock-in and dependence on 3rd-party libraries that is stronger than one might expect at first. My (least) favorite example: (nth needle haystack) (aref haystack needle) Ugh! But then again, what other language provides both AREF and ROW-MAJOR-AREF? And of course CL tooling is just weird if you aren't used to it. Quicklisp is amazing! But it has no CLI and doesn't use HTTPS for package downloads. Swank and Slynk is amazing! But clients other than Slime and Sly are second-class citizens. SBCL can generate a compiled binary, cool! But the routine is called "save-lisp-and-die". ASDF expects you to either put all of your Common Lisp projects in a single directory, or hard-code project locations in a config file. Does Go still do that too? Ancient alien technology for sure, but at least moderately damaged upon crash-landing. Ironically, the only piece of CL tooling that feels mostly not-weird is called Roswell. Of course all of this stuff is completely free-as-in-beer and developed almost entirely by volunteers in their spare time. Hard to criticize: they built it, and I didn't. But there is definitely a cumulative oddball feeling to it.
- sph 3y agoYou hit the nail on the head. And I like the comparison with alien technology: in some ways it feels centuries ahead than our mainstream languages, but in other it feels they have never developed stuff we take for granted in 2024, like first-class hashmaps, Unicode and decent date/time functions.
- gmfawcett 3y agoSBCL has excellent Unicode support, for one, and hash tables are first class objects in all CL implementations. Won't disagree about date and times.
- tmtvl 3y agoBy 'first-class hashmaps' I believe SPH means a type of quasiquoted syntax for hash table initialisation. Something like... (let ((my-map `#M((foo ,foo) (bar ,bar) (baz ,baz)))) (gethash 'foo my-map)) EDIT: almost forgot, thank you for pointing out SBCL's support for Unicode, reading its documentation I found a couple of functions I was in need of.
- neilv 3y ago> Racket is the best for a beginner, but it keeps having that academic, "we made it for the kids" feel of being easy to understand but not very pragmatic for a seasoned programmer. And it is one of a kind, so a good Racket developer might never know Lisp itself. I know why you got that reasonable impression, but there's more to it, which can make it much more interesting to practitioners... The gang-of-professors reasons for Racket are for research platform and education platform. However, at the same time, Racket (then called PLT Scheme) attracted a disproportionate share of a user community of high-powered programmers and software engineers, like you also see with Common Lisp and some other languages. And one of the professors, Matthew Flatt, happens to be a great systems programmer, with good software engineering sensibility. There's some really solid stuff in Racket, and I've used it on important systems with hyper-productive teams (you'd think they had a hundred engineers, when it was only a few). The impression you get might be for two reasons: 1. The gang-of-professors decides most of the customer-facing image for Racket, in various ways, such as writing some introductory books, promoting their zero-prior-experience-student-oriented IDE as the Racket IDE, odd language on the Web site, etc. 2. At times they've also made direction decisions that suit either their education&research goals or, secondarily, their idea of what professional practice wants. On the latter, of course, people who've been professors for decades aren't going to have all the insights of the best people who've been practicing in industry that same period. If you want to approach Racket as a serious and skilled practitioner, one way is to focus on the Guide and Reference books (I wish these were consolidated), and expect that you'll have to creatively build much of the ecosystem bits you need from scratch. That can actually be a great situation to be in, if you're up for it. The governance model, last I checked, is a benevolent dictatorship by the gang-of-professors, and the industry practitioner user community is currently small, so just be aware of that going in. But, there's an open ecosystem for packages, more empowering than most languages, due to all the language-extension mechanisms of Racket, so you can "build out" Racket in a decentralized way, to some extent. If you do that, you'll want to keep on top of what the gang-of-professors are doing, and give them a heads-up on things you're doing, to minimize unpleasant conflicts. I'm not going to make a sales pitch for it; just wanted to add some info for serious practitioners who're already interested, on what to expect, and how to approach it.
- deleted 3y ago[deleted]
- hajile 3y agoIt's here that I'll again get on my soapbox about Scheme. SRFIs suck really badly. The language isn't useful without them, but every implementation uses a different subset. You have to find out which SRFI does what you want (there may be more than one) then find out what number it is then look up the SRFI itself because the spec is pretty much the only documentation you're going to get. This entire situation sucks for experienced devs and simply kills most beginners before they even do anything. Things were supposed to get better with R7RS. It was supposed to have a tiny core language to keep the R5RS crowd happy, but add the R6RS features in the large edition that are needed to get real work done. R7RS-small released in 2013. That's TEN YEARS ago and it STILL doesn't have a standardized library because apparently nobody wants to work on R7RS-large. The whole thing is an unusable mess for no good reason and it's killing the language.
- zilti 3y agoPeople are working on R7RS-Large, a lot of the standard is decided upon by now. I suspect, though, it'll take another five years... https://github.com/johnwcowan/r7rs-work/blob/master/WG2Dockets.md https://github.com/johnwcowan/r7rs-work/blob/master/WG2Docke...
- nsm 3y agoI would like to disagree with this view of Racket. I'm a fairly experienced professional programmer with a lot of systems experience, and I find Racket an extremely well thought out, competently implemented and high performance (particularly with the switch to Chez Scheme) language. I wrote a bit about it at https://nikhilism.com/post/2023/racket-beyond-languages/ https://nikhilism.com/post/2023/racket-beyond-languages/ and Bogdan Popa and Alex Hirsanyi have done amazing stuff with the language https://defn.io/ https://defn.io/ https://alex-hhh.github.io/index.html https://alex-hhh.github.io/index.html including a sophisticated web framework, a Kafka GUI client and so on. I think the only deficiency for a "pragmatic for a seasoned programmer" (beyond the standard "no FAANG is sponsoring it" related lack of resources and presence in popular discussion) is the lack of good editor integration beyond emacs. That said, I've found DrRacket perfectly reasonable for my uses, although clunky. I'm not saying it can replace something like Python, but that is more because of the smaller ecosystem and contributor base than anything wrong with the language itself.
- evdubs 3y ago> Racket is the best for a beginner, but it keeps having that academic, "we made it for the kids" feel of being easy to understand but not very pragmatic for a seasoned programmer. And it is one of a kind, so a good Racket developer might never know Lisp itself. I find Racket to be more pragmatic than Java, Python, and JavaScript. So much so that I trade options with it. Edit: "pragmatic" not for all things, but for many things, including GUIs and charts. Second edit: whoops. I see I've already pointed out this Racket program to you. https://github.com/evdubs/renegade-way https://github.com/evdubs/renegade-way
- nequo 3y agoThis is a very cool project! Have you considered using Typed Racket for it? If yes, then how do you see the tradeoffs?
- evdubs 3y agoI sort of evaluated Typed Racket before I started writing lots of Racket code, and my experience was that "Contract" Racket (regular non-Typed Racket) was more ergonomic and idiomatic. I think the contract system is great and I use it, for example, when sending messages to Interactive Brokers: https://github.com/evdubs/interactive-brokers-api/blob/master/request-messages.rkt https://github.com/evdubs/interactive-brokers-api/blob/maste... This file just includes request message definitions and to-string (->string) implementations. The overall program's performance is adequate for me, so if the contract system is causing overhead, I don't particularly care about it. Maybe that's a scalability concern for more performance-demanding programs which could benefit from Typed Racket.
- natrys 3y ago> How's that Guile port coming along anyway? It's just not. It was someone's GSoC project, and they basically stopped working on it in 2015 and nobody picked up the slack since: https://git.hcoop.net/?p=bpt/emacs.git https://git.hcoop.net/?p=bpt/emacs.git We only got Nativecomp in elisp because a very talented and persistent compiler engineer from ARM saw through it. With the basics done, I think they want to tackle doing more aggressive optimisations with libgccjit. But best not to take things for granted when bus factor is 1.
- a-french-anon 3y ago>How's that Guile port coming along anyway? https://github.com/lem-project/lem https://github.com/lem-project/lem (as a realistic climacs) is probably our only hope for a "new Emacs".
- mark_l_watson 3y agoI also gave up on Guile on macOS a long while ago after having fun with it on Linux. However, now you can work around the lack of Guix on macOS by using this brew tap: https://github.com/aconchillo/homebrew-guile https://github.com/aconchillo/homebrew-guile