After learning QBASIC and then quickly pivoting to Python thanks to the advice of my peers on 711chan IRC, I read ESR's "How to become a hacker" which lauded Lisp as this magical language that will forever change the way you think. Wow, powerful stuff for a teenager to hear. I want to have elevated, magical thinking. So I downloaded DrRacket.
Years later, after a few years that were the beginning of a career in software, I was in jail. I took some math classes where they gave us programmable calculators. I was fucking enthralled to be able to code again. I used TI-BASIC to make a little lisp interpreter, which I called Prison Lisp.
So many games, all the glee of a child in gradeschool (which is comparable to incarceration in many other ways). The people in my pod (shared living dormitory type thing) all asked to play the games, it was like having a gameboy.
Out again, mid twenties, start to code again. Somehow, a few years with no computers hadn't affected my ability to code in the least. I was actually much better than before. I start competing for gigs on Upwork, supporting myself pretty comfortably. I get married, start a family.
My wife loves coding challenges, but has no professional ambitions in tech. So I show her Racket, she loves it. My daughter is curious and wants a different lisp, so I show her Clojure. She hates it, sticks with Python. No judgement, I'm a lifelong Pythonista at this point.
I think back, to a friend from that 711chan IRC chat. He was learning Perl and I had recommended he try out something else, taught him a bit of Racket. I Googled him a year or so ago, turns out he ended up making several contributions to the Racket source code, and is a big shot electrical engineer. Good for him.
That's the second-coolest prison story I've ever heard. (The coolest involved the narrator meeting a guy in the joint, who took Dragon Ball Z very, very seriously, and taught martial arts classes for his fellow inmates based on the Saiyan moves from the show, which turned out to actually be pretty serviceable self-defense techniques.)
As someone who is not a beginner the feedback on errors / stack traces is absolutely miserable, some of the worst of any high level language I've used. This is doubly true for clojurescript.
Yeah, this is true. Lots of people start using Clojure without knowing the underlying hosts (the JVM for Clojure, JavaScript for ClojureScript) which I also did, with zero experience of the JVM before I learned Clojure, and it can get very daunting very quickly the first times you come across endless JVM stack traces. Fortunately when I started to use ClojureScript, I was already deep into the JavaScript ecosystem, so those stack traces were not a problem, and by now the JVM ones no longer scare me.
Practice makes perfect, but without previous experience in the host languages, it's completely understandable that the stack traces are a huge turnoff.
And even more languages than that! Erlang, Dart, and a couple more are some that I've come across recently. And my point is valid for all of those language, if you don't know the host, the errors/exceptions coming from using Clojure in those languages will confuse you initially, no matter how well you know Clojure itself.
It was mostly the tools. We couldn't even get Calva to run properly in VS Code on her computer (we just gave up, mysterious errors and none of the recommended fixes online helped).
Plus she liked that Python has an "intuitive" feel, just looking at code it kind of makes sense, whereas Clojure looked crazy and meaningless unless you "knew". Which would have been mysterious and exciting for me, but was intimidating and dreadful for her.
If this was gpt-generated, this is what you'd get - same first line but altered to focus on the programming language and not the sports equipment.
"""
I was first introduced to Racket in college. It was the language of choice for a class on functional programming. I was immediately taken aback by the strange syntax and even stranger function names. But, I was also intrigued by the possibilities of functional programming and the expressiveness of the language.
I spent the next few years dabbling in Racket, picking up new tricks and learning more about functional programming. I even wrote a few small programs in Racket, but nothing too serious.
And then I got a job as a software engineer.
At my job, I use Racket every day. It is the language we use for all of our backend services. And, over the past year, I have come to appreciate Racket in a whole new way.
Racket is a strange language, but it is also a powerful language. It has a unique syntax that can take some getting used to, but once you get the hang of it, it is actually quite expressive. And, the functional programming paradigm is incredibly powerful for writing robust and correct code.
I am still learning new things about Racket every day, and I am sure I will continue to do so for years to come. Racket is a language that is worth learning, and I am glad I made the effort to do so.
In my experience, this is already possible (though it might be cribbing from elsewhere). AI Dungeon has made some pretty excellent jokes while i've been playing.
You should be able to know the difference between the two because my GPT-3 friend has a full-time job using Racket. GPT is capable of saying invalid predicates ;)
I'm fascinated by Racket-lang team's constant updates. It feels like there is always some activity in that space. Does anyone know about any companies where it's used in production environments? Is it particularly good for certain use cases? Thank you.
The activity is mostly the core professors doing research, a lot of teachers and students, and a number of enthusiasts.
It's been used by only a handful of companies that I know of (not counting Naughty Dog). Usually as one-person projects for which the person is allowed to choose fringe tools. A couple of those turned into major projects, but they still needed only a couple/few (super-capable) people.
Maybe the most interesting thing about the user base is the enthusiasts: as a resume keyword, Racket is effectively unemployable, and there's large opportunity cost in the current "tech" job market, of spending time on "technology" that doesn't facilitate job-hopping. So the enthusiasm seems to be for the genuine technical and community merits.
I looked a while ago and apart from some scripting at Naughty Dog it sounded like it's strictly used in academia and hobby projects. It is however probably my favourite language at the moment and if you're willing to learn something for fun, I recommend it. I've learned a few things that are language-agnostic, like some streaming stuff, so I guess it's not a total waste purely from a work perspective either.
It's not widely used in industry, but certainly some people do use. Bogdanp, commenting further down, has a business using racket, other people do web development consulting with it, people have built internal tools with it, etc.
Yes, of course. Glad you're enjoying programming in it. I'd love to learn it for fun if I didn't have any time constraints. Dabbling in a bit of StandardML and F# at the moment. Just to get a basic understanding of functional programming. I'm a data analyst, not a developer. So as you can guess, I write Python and SQL mostly. These languages are quite different from what I'm used to.
One thing I loved when looking at F# was Type-Driven Development that I imagine could be quite applicable to data modelling (as in, piping stuff around and sanitising). This has possibly had the biggest impact on how I think about programming out of anything I've done! https://fsharpforfunandprofit.com/series/designing-with-type...
Another thing - if you find you write small scripts in Python to read a file or parse some stuff or plot a couple things but these aren't for production, Racket has an amazing library of basically everything you could need. It's actually very practical as a scripting language.
I keep responding to you just by your comments triggering some things I am interested in, lol, but if you're interested in data science and F#, check out .NET Interactive notebooks in Visual Studio Code and the Plotly.NET package.
hahaha.. Thank you for comment. Yes, I actually signed up for a course on Udemy and did some F# after a few lessons on SML from Dan Grossman on Coursera. My company has bet big on .net and our products have been developed on .Net. So that's another reason to learn F# for me. I find it quite interesting and am surprised that it doesn't have as much adoption as Python or R!
I love Racket. As Lisps go it seems one of the more accessible for
beginners and so I dabble with the idea of using it in teaching just
to spice things up from Python all the time.
The one MAJOR downside, for me personally, is that a lot of the
online presence cowers behind Cloudflare, the dreaded nemesis of
privacy oriented text-based browser users. Why hide such a beautiful
programming language behind so much ugly digital razor-wire and
barking dogs?
Sorry, I have no idea what you mean. DrRacket is a binary you download and run on your desktop. What parts of Racket are "cower[ing] behind Cloudflare"?
I think the poster is referring to racket-lang.org, which is served through cloudflare. But wait! I have a solution. If you want the web site content locally, the whole thing is built from the public repo at `https://github.com/racket/racket-lang-org`. The readme contains instructions for building it locally. The CSS on the local blog posts probably won't render correctly, but if you're reading the text, that probably won't bother you.
Exactly this. I actually just pulled the whole source tree and built
it for FreeBSD this morning.
What I'm really referring to is the community. Especially for things
like forums and docs that need only be read-only. The fixation with
Cloudflare bewilders me. Surely most technically minded people know
it's a mixed blessing that offers as many ills as advantages?
With respects, I don't really want a conversation about the merits and
madness of Cloudflare. Been there and done that. I'm simply pointing
out, in case any Racket community people are here, that small details
like this can have a serious impact on the uptake and enjoyment of
something valuable.
From the Racket website maintainer side, CloudFlare provides us both with a free CDN as well as free https in front of the S3 buckets that comprise the web site. Unfortunately, S3 and other AWS costs are real and Cloudflare provides a high quality and free service.
I will note that we don't host our forums ourselves so those should not be affected.
The domain racket-lang.org is entirely behind the Cloudflare estate.
Obviously there is no single locus for a language as such, but
racket-lang.org dominates the search results and carries the most up
to date documentation under the subdomain docs.racket-lang.org. It is
also listed as the Official Website on wikipedia.org.
I counter this. I had a couple of years of experience and a Masters degree in CS when I first picked up SICP. Then I understood computation . I wish I could go back in years and learn from SICP first. I would could save myself from a lot of dead end perspectives and frustration. SICP is a peerless jewel imo
Thank you kind stranger. I actually chose to learn a bit of StandardML to understand functional programming, but every now and then when I see a post like this I get tempted to try Racket as well. I've got a copy of SICP on my desk and I've barely read 30 pages. Someday, I will.
Why would you want to learn racket after having learned sml? racket is great, no question about that, but it is mostly an educational tool and a "first language". I personally would rather choose a language with a broader real world user base. if you're interested mainly in functional programming, haskell would be a reasonable choice after sml. if not, there are plenty of other possibly more rewarding choices (on the long term).
It's far more flexible than SML. I'd pick Racket over SML for production use any day of the week. (And I have indeed shipped code in both SML and Racket.)
Racket's student languages are "mostly an educational tool" and designed to be a "first language". Racket, the whole language, is a large, batteries-included, industrial-strength system. It is not less or more powerful than SML, it's different, including offering various strengths that SML does not.
Actually, you're correct. The only reason I can think of is curiosity. Beyond that it has very little importance, to me personally. That's why I may never do it. But it definitely looks fun. I don't know about Haskell but I'm more interested in F#. Some of my colleagues have worked on Haskell in the academia.
I liked SICP when I read it as a teenager, but these days it's far from the best book even for a 'mathematically-strong person to learn a huge swath of computer science through experimentation and thinking about the results.'
I don't know that arguing for beginner students to learn what is basically the early version of Haskell as their intro to computing is a compelling alternative.
The basics of computing are hard enough to learn when you aren't focused on type theory, lazy vs eager evaluation, etc at the same time.
> I don't know that arguing for beginner students to learn what is basically the early version of Haskell as their intro to computing is a compelling alternative.
See when that text was published. The author would probably argue for a slightly more modern language these days.
I think HTDP is a great way to learn Racket and quite helpful patterns for thinking about programming in general. Also much more entry level than SICP.
SICP uses Scheme. Racket is a rather different, much larger language.
Racket's default #lang isn't even compatible with SICP -- for example its cons cells aren't mutable. (Though it's perfectly fine to use Racket tooling with SICP or other Scheme books -- just set #lang scheme instead of #lang racket).
You can very easily use Racket for SICP with minimal translations, even without the `#lang sicp` package. Racket's default cons cells aren't mutable, but Racket still has them. The `#lang sicp` package mainly provides the drawing needs that SICP uses as well as defaults for the MIT Scheme used in the book.
"Racket CS runs on platforms where native-code generation is not currently supported"
It looks like this means "Racket-on-Chez-Scheme"(i.e. "Racket >= 8.0") will run, but it won't use Chez Scheme it'll default to the old system: https://github.com/racket/racket/issues/3802
> It looks like this means "Racket-on-Chez-Scheme"(i.e. "Racket >= 8.0") will run, but it won't use Chez Scheme it'll default to the old system: https://github.com/racket/racket/issues/3802
No, that item means Racket CS runs on platforms where native code generation isn't available via a portable bytecode backend.
The documentation on docs.racket-lang.org isn't updated to the new release yet, which is why realms are missing. The hold up is that it needs to build all 2k packages with 8.5 first.
This trips me up almost every release. New feature announced, go look up what it does and how to use it, not there yet. By the time it is updated I've usually forgotten about it.
What made it not a practical competitor to CL before for you?
Racket has a nice runtime (much nicer than what you get with CL, though with some downsides (eg. memory usage is higher in Racket)), a large standard library, a comparable number of packages (~1800 on pkgs.racket-lang.org versus ~2100 on quicklisp), good editor support and a pretty great distribution story (via `raco exe`, `raco distribute` and the relatively-new `raco cross` for cross-compilation). All things that make it very practical in my book.
Racket is slow which impacts the entire dev cycle, has even less use of ad-hoc polymorphism than CL (very annoying to have to use the monomorphic functions all the time), editor support isn't great (SLIME still contends well here, the speed is an issue here too), and the package story is a bit more difficult to get familiar with. Not as interactive in dev as CL, because safety.
Cool arrows in Dr.Racket though, nice macro system, and so on.
I agree that Racket development is less interactive than CL development partly because of the slower compile times and partly because of the way the editors choose to reload modules on change. Nothing inherent prevents fast reloading[1], though, and Racket development is still plenty interactive[2].
I would say the package story is more complicated in CL as a consumer of packages. As a package creator, they're similarly complex.
Racket is definitely slower than Common Lisp. But it is one of the fastest Schemes on the market currently^1. But it also has the ability to create static executables, runs on M1 macs, has a statically typed sister language, a build in package manager, and gui library. And it's faster than other dynamically typed languages like Python when looking at pure implementations (not written in C). So there are still a lot of reasons to use it over Common Lisp if any of those things appeal to you
I agree it is slower than the fastest CL implementations, depending on what you test, because some of the features present in the language make optimizations harder. The compiler is definitely also slow. As far as dynamic languages go, however, Racket is very fast in general and you can push it very far.
> use in production was not its main focus.
What makes you say this/what do you think it's missing as far as "use in production" goes? Instrumentation? Something else? I've deployed both production web apps and desktop apps with Racket, and the experience has been as good or better than other languages I've deployed similar things in.
Racket is a competitor to Python, that is IMO a better Python than Python itself. The only thing lacking is popularity, which is probably both a good and bad thing.
On some fronts. Im envious of their out of the box experience for beginners. Eg Their docs are nicer, and DrRacket seems very cool. (Emacs + Sly/Slime are nice, but very alien to the uninitiated)
Obviously CL is going to win wrt perf. and interactivity.
After learning QBASIC and then quickly pivoting to Python thanks to the advice of my peers on 711chan IRC, I read ESR's "How to become a hacker" which lauded Lisp as this magical language that will forever change the way you think. Wow, powerful stuff for a teenager to hear. I want to have elevated, magical thinking. So I downloaded DrRacket.
Years later, after a few years that were the beginning of a career in software, I was in jail. I took some math classes where they gave us programmable calculators. I was fucking enthralled to be able to code again. I used TI-BASIC to make a little lisp interpreter, which I called Prison Lisp.
So many games, all the glee of a child in gradeschool (which is comparable to incarceration in many other ways). The people in my pod (shared living dormitory type thing) all asked to play the games, it was like having a gameboy.
Out again, mid twenties, start to code again. Somehow, a few years with no computers hadn't affected my ability to code in the least. I was actually much better than before. I start competing for gigs on Upwork, supporting myself pretty comfortably. I get married, start a family.
My wife loves coding challenges, but has no professional ambitions in tech. So I show her Racket, she loves it. My daughter is curious and wants a different lisp, so I show her Clojure. She hates it, sticks with Python. No judgement, I'm a lifelong Pythonista at this point.
I think back, to a friend from that 711chan IRC chat. He was learning Perl and I had recommended he try out something else, taught him a bit of Racket. I Googled him a year or so ago, turns out he ended up making several contributions to the Racket source code, and is a big shot electrical engineer. Good for him.
Life is so beautiful and strange.