229 points · by Decabytes · 3y ago · 100 comments
[1] Example gif: https://docs.racket-lang.org/define-attributes/examplecodear...
[2] > Lexical Structure: The lexical structure is shown with arrows overlaid on the program text. When the mouse cursor passes over a variable, DrRacket draws an arrow from the binding location to the variable, or from the binding location to every bound occurrence of the variable.
The once a year RacketCon conference was two weekends ago, and in addition to the technical talks, I enjoyed hearing the 4 academics who are primary implementers and maintainers taking questions from the audience about why Racket is not targeted at industry. I am just finishing up writing a Racket book, that really just consists of my own little code experiments (no big deal). You can read it free online https://leanpub.com/racket-ai/read
What I said was (in part) "I am sure there are ways we can improve to attract people inside of academia, outside of academia, in open source, in commercial development, and we want to improve in all of those ways".
That's interesting. That seems like a flip from a few years ago. What was the summary regarding this?
It would allow you to define variables which were actual images. The image was a thumbnail in the code, which you could assign and print. It was mind blowing.
Also your Lambda keywords could be replaced with an actual Lambda symbol, which was the pinnacle of coolness.
This, as well as the super snappy and responsive split REPL, made the overall development experience with Scheme feel super futuristic and just a pure enjoyment all around.
What's missing from my life is a good FOSS equivalent. There are several wonderful tools which do similar things, e.g. Jupyter, org-babel, TeXmacs, Sage, mathics. None of them feel quite right though.
I did recently pay for an entire year of Wolfram Desktop in the hope of really getting into it. I have code experiments for all the stuff I love (machine learning, deep learning, LLM, semantic web, etc.) but to be honest using the Wolfram Language does not give me the joy that I get using Common Lisp,and various Schemes, and, for some things Python is the most practical language.
(so, not much chance of adding that to my Chez extension ;)
If you don’t mind Smalltalk, the modern Pharo ecosystem is also amazing.
Just like Notebooks are miles away from that experience, and yet they allow millions of programmers to have an experience that wouldn't have otherwise, even with Lisp Machines/Interlisp-D providing a much better one.
Like in many free tooling most people rather do with what they have instead of improving them, hence why all great developer experiences are either commercial or corporate sponsored.
GNU Emacs disagrees.
Someone said they might be possible with CodeMirror https://codemirror.net/
(Just in general - not specifically for racket- I’d love to see this for rust and elixir)
They are possible, but not using the "normal" editor window, you need a "custom" one: https://code.visualstudio.com/api/extension-guides/custom-ed...
(This current submission is really nice; you get to hear more from Matthew about what’s going on.)
Chez Scheme (pronounced “shay-scheme”) is the most performant and compliant Scheme implementation out there. [1] For a long time it was closed-source, but was recently open-sourced.
It now forms the foundation of the Racket language. (So, I guess that means HN relies on it, provided Arc is using a recent version of Racket.) I asked Matthew why he picked Chez to base Racket off of, and I want to say that he picked it because it implemented continuations really really well and had a good garbage collector too. I could be wrong.
(Maybe I'll find a way to resume using Scheme/Racket. The last few years, I've been using Python, JS, and Rust, partly for employability reasons. They have their merits, but I'm aware of what I'm missing.)
* https://defn.io/2023/08/10/ann-franz-source-available/
HN itself runs on Racket.
In the way those Dyson bladeless fans pull more air through. In your case, many folks know you (some from UIUC too like me) and know your upvote is worth reading, ending up upvoting too.
Racket is used extensively in education and research relating to Scheme and programming languages in general. Lots of work on gradual typing, programming language semantics comes out of the Racket community. Many colleges around the world use Racket. Scheme/Racket is very pared down language and lends itself to this kind of work -- the principles of whatever you are studying shine through quite easily in a way that it may not if you were using C, Rust, Python etc. in the problem domain.
As noted elsewhere in the comments, Idris 2, an important dependently typed language outputs to Chez/Racket Chez. Previously it output C code which was then compiled.
See: https://en.wikipedia.org/wiki/Racket_(programming_language)#...
In general, Chez is probably a great language to use as a "base". It lends itself to embedding and is performant. Lua and some Javascript implementations come to mind as comparables. In general, we might not know much about Chez being used a lot in the wild because it could be tucked deep into various proprietary company products.
I know racket is very static in this regard.
IIRC every lisp and scheme I've used has supported this. It's pretty typical, but not universal.
But some implementations use an interpreter for evalulating code at runtime. ChezScheme uses the compiler.
What I was saying is that every implementation I have used did this, not that all of them do. It seem common.
FWIW I've done a lot more CL than scheme, though.
[1] Assuming that the merge has happened since the announcement was on Oct 16
Rather, this announcement is about going the other way around, and about merging changes back into Chez: when Racket was migrated to Chez several years ago, as a matter of practicality they had to fork it and significantly modify it to maintain feature parity with the existing implementation. The changes were very large; multiple new supported ISAs and ABIs, new compiler optimizations, an entirely new build system, etc. For years, nobody was totally clear about what would happen with this fork, but the hope was that it would all go back to the upstream Chez codebase. That is finally happening, and so this post is not about merging code from Chez into upstream Racket, but rather merging code from Racket back into upstream Chez.
The hope is changes will soon be available as a new major Chez Scheme release, version 10.0, and so the fork and the upstream version will finally be unified. (Racket will likely continue to use its own fork of Chez scheme as a practical matter of engineering, but presumably it will only need very minor tweaks and small patches, if any, for it to work.)
https://github.com/cisco/ChezScheme
There is more work to be done before release 10.0.
https://docs.racket-lang.org/sicp-manual/
(SICP Scheme isn't quite standard, and there's also some SICP-specific libraries.)