What I wonder is whether the Chez base might massively improve Racket's concurrency capabilities.
In Common Lisp, one has pthreads-like concurrency capabilities which seem very well suited for fine-grained parallelism as well as for server tasks. I am thinking in such things like parallel backtracking and optimization algorithms for robotic control or board games, for example.
However, threads are notoriously difficult to handle cleanly and safely in larger programs. Here, Clojure (which in my eyes is a very Scheme-like Lisp) offers a very elegant solution with its concurrency primitives of Futures, Atoms, Agents, and STM. After some experimenting, I believe they are very, very attractive for many concurrent server tasks (like a web server), but not that well suited for computing-intensive parallel algorithms like the ones I mentioned above, which I am highly interested in. Part of the reasons are that such algorithms can become quite GC-heavy. Also, the Clojure compiler has limits on how much primitive types can be passed as parameters in one functions. This means that a complex backtracking algorithm in Clojure can still be two orders of magnitude slower than in C (which is somewhat disappointing, but one has to remember that Clojure was not designed for this).
Racket has had, so far, only limited concurrency capabilities. It had Futures, however they could easily become blocked by GC. It also has Places, which are a very safe and clean solution of splitting parallel computations into separate processes. However, I think that places are not the first choice for heavily parallel algorithms with strong interdependencies.
Now, Racket can run on top of Chez, and Chez has fine-grained concurrency capabilities on top of pthreads, which seem to be on par with Common Lisp. Also, Racket has strong support for functional and side-effect free programming, including some data structures. In my impression, this seems to open a wide range of new possibilities, including providing look-alike primitives for Clojure's Futures, Agents, and Atoms. I would be very interested to know more whether this impression is correct.
It is difficult because there are a lot of minor details that has been added to Chez Scheme or to the patched version of Chez Scheme that is used by Racket.
Question from someone who knows barely anything about the Scheme ecosystem:
It seems that the one of the motivations for starting this effort, besides performance, was to move away from a C code base. Is Chez Scheme primarily written in Scheme?
Yes, Chez Scheme is mostly written in itself, including most primitives and the entire compiler. Additionally, the way Racket CS is architected, significant parts of the C-implemented Racket runtime are instead written in Racket and compiled to Chez Scheme ahead of time, such as the thread system and the IO library.
Yes, Chez Scheme is mostly implemented in Scheme. The garbage collector and some support routines are in C, but the compiler and libraries and most other system stuff is written in Scheme.
Racket is more of a meta language. For another example, see Gerbil Scheme (cons.io). It is a meta language written on top of Gambit Scheme. Gambit was chosen because it can compile to portable, efficient and fast C code. Gerbil on Gambit currently tops the R7RS benchmarks [1].
Actually, Gerbil used to be written on Racket. As you can see, it now benefits from Gambit's strengths without having to re-implement them...
I think the reason is more maintainability, when basing on a solid and faster other Scheme. It's much easier to write in terms of that other Scheme's primitives, than writing a C core, avoiding all kinds of C typical bugs. Furthermore, many improvements in Chez Scheme will carry over to Racket and the 2 communities might join forces in improving Chez and thus Racket in effect.
What that other Scheme is based on is a secondary consideration. Chez Scheme is also said to be implemented very well, however.
About the only notable thing with it (apart from inspiring the target for Idris 2) is that it implements the C FFI, so it will handle Idris programs made to target C.
The result is super fast: if you use if after using Idris1 you'll be blown away by how much quicker it type-checks. I'd never have thought a Scheme could perform noticeably faster than Haskell, but maybe most of the improvements are just due to algorithmic improvements made during the rewrite.
I never played with Idris2, but I recall running some idris1 programs using the chez scheme backend instead of thebc one and got instant 5x speedups. Across the board.
Not that it wouldn't be possible to make the C code fast. It is just that the chez backend was a one man job.
Thank the Chez Scheme developers for an absolutely fantastic compiler, and also Idris for being designed so that it's possible to feed any of the IRs to the particular backend. There's not much of an impedance mismatch between Scheme and Idris lambda output, so the overhead is small. I could have made it a bit better if I had represented Idris lists and bools as the corresponding scheme types, instead of being mapped as all the other types by their structure.
They changed the name of the project from Racket 2 to Rhombus to make it clear that it was not about replacing Racket.
And even in the original announcment it was stated
" * `#lang racket` is not going away and will always have its current
parenthesis-oriented syntax. In the same way that Racket still
supports `#lang scheme` and `#lang mzscheme` and even `(module
<name> mzscheme ....)` and even top-level programs, the Racket
compiler and runtime system will always support `#lang racket`
programs. We believe that Racket's `#lang`-based ecosystem makes it
uniquely positioned for trying new language variants while
preserving and building on our past investments."
They have only made that statement stronger since then.
Racket’s whole schtick is that it allows for language oriented programming. Sure it’s a scheme and it has parenthesis, but a lot of languages in it’s toolkit do not. Not only that when you design a new language the reader converts your new language code into s-expressions and the expander gets it all the way to Racket code. Which is how Rhombus will more than likely work as well. So knowing #lang racket is still a requirement when creating a new language on top of the Racket VM
Plus as a former Perl programmer having watched Perl 5 lost almost everything, chasing a never to have come to reality Perl 6. I can say, given all this, the future of Racket as a language, for its core uses and users is pretty much dead in the years to come. Like dead totally. Racket doesn't even have as much the share of dev mind share or a resource like CPAN at its disposal. Languages like Racket will fade away into oblivion a lot more quickly.
It can be hard to see this in all the enthusiasm in the early stages of the project. But when you embark on multi year project journeys. People's priorities change, people get into health crises, lose jobs, move on to better projects, recessions happen. Core teams that started these projects change so much, newer one's pretty much give up and see no point in it after a while. Many people prefer a perfectly working tool improved over time, than a pie-in-the-sky idea that will never come to see the light of the day. While all this is happening, your existing language, libraries, dev mindshare, tooling suffers. Merely supporting small time fixes means nothing, because no one likes to use a tooling in hospice care. Your core dedicated set of users, who did most of the evangelism for your cause move on to newer tools and languages, for the obvious reasons that they don't see their future with existing tool they like, the newer one is taking for ever and isn't even the same goodness as the current one. Once you lose those users, the newer users you wish to attract from the crowd of Java and Python programmers won't even bother to try, why should they? They have something proven to work in production with tooling, libraries, books, and production success stories for decades.
That is when you realize you lost both your old and new language.
Racket was awesome for what it was. An awesome lisp, a top successor for Common Lisp and a playground for experiments and initiating people into Lisp.
It's not late. Probably it's time to stop right now.
Racket (and PLT Scheme before it) has always been a bunch of languages, keeping a few different syntaxes and semantics around isn't anything new. I don't get why having another take on the surface syntax should cause all that much anxiety.
Because you are not exactly running Rhombus as a side toy language, but as a successor to Racket. This requires Rhombus to eventually replace Racket. Anything less than this and it makes Rhombus a non-successor to Racket. While at the same time much needed resources to make Racket win, will go to making Rhombus happen. Even if Rhombus comes along, it won't have any of the current Racket goodness to begin with. Rhombus will take years to just exist. Meanwhile precious resources for improving Racket to a better Racket over the years will be taken by Rhombus.
Net result is a stagnated Racket, and a non-attractive Rhombus.
Plus C based languages have their winners already. Racket is a kind of a winner in the Lisp family. With Clojure it makes the only other choice. Now if you change the syntax, you are going after users who don't really care what you have to offer, at the same time, you are taking away what your existing users like.
Recently, Perl 6 has indeed become a lot less real, as it has been renamed to Raku (https://raku.org using the #rakulang tag on social media). But it is still very much a real thing (with regular releases since December 2015). And it actually has its own IDE: https://commaide.com .
> I am a nobody in front of people like Matthew Flatt, but this feels like Seconds Systems Effect taken to its extreme definition:
I think you are mistaking working time for bloat; they can be inversely related; it's easier to add lots of ideas, it's harder to pare things down.
> Plus as a former Perl programmer having watched Perl 5 lost almost everything, chasing a never to have come to reality Perl 6. I can say, given all this, the future of Racket as a language, for its core uses and users is pretty much dead in the years to come. Like dead totally.
This isn't Perl 6.
> Many people prefer a perfectly working tool improved over time, than a pie-in-the-sky idea that will never come to see the light of the day.
Pretty much everyone does, but Racket remains the former. Neither the schedule nor the ambition of new Racket development has been scaled back for Rhombus. It's not even clear that they would once Rhombus was generally available and hosting Racket, though there would also be a place for improvements that didn't fit in Racket.
I know that some well-known Lisp hackers left for Racket, but I've never been clear on how it is really a successor. It does have a great community and ecosystem, but it inherits a ton of the mistakes of Scheme, is unspecified and as such is susceptible to derailments like Rhombus. I think that performance is not that great either, which isn't necessarily a huge deal for many problems but is for some.
What I am genuinely curious about is: from your point of view, what makes Racket a preferable successor to Lisp (which can't easily be grafted into a Lisp environment)? The two things which leap to my mind are the sane read case and the community mindset.
I also think that language oriented programming like in Racket is overrated. As a Lisp programmer I'm happy to have different paradigms integrated into one language, and not have them added as 'languages'. For some amount of languages it makes sense, but generally it's more like an academic exercise and makes the whole machinery more complicated - which for many use cases is not needed. Working on a hosted platform with deep integration into the host language environment was during the last years preferred by a lot more users - that's more compatible and reusable (since more reusable libraries work).
> An awesome lisp, a top successor for Common Lisp and a playground for experiments and initiating people into Lisp.
As good as its development environment might be for learning purposes and research, it is no match for neither LispWorks nor Allegro Common Lisp, so it is hard to be a top successor.
In fact there isn't a single commercial Scheme has successful in the market as those Lisp environments, with exception of ChezScheme, used commercially by Cisco.
Not to be rude, but apart from Clojure, other Lisps are non-existent in production compared to the software world at large.
One could even consider Scheme as more widely used than CL.
The biggest production use case for Lisp today is to learn Lisp.
The biggest use case for Scheme, CL, or Racket is to use to learn Lisp. Racket that way was quite successful.
With all this going on now. Scheme is the only serious Lisp for learning purposes. What new in sights will Rhombus provide here? The biggest use case for trying out scheme was while working through books like SICP.
really, if they are concerned about the 'teaching' aspect and parens being less new user friendly, why not just do a LUA-on-racket, maybe with some small extensions for the 'teaching' language - LUA maps to scheme pretty well, and its already 'done'.
Because the teaching isn’t just about the syntax. It’s the concepts. How to Design Programs, does exactly what your says, and it also teaches test driven development. A guide to Racket with pictures allows you to leverage DrRacket’s ability to display graphics inline to become familiar with programming in a more visual way, Making a language in an hour shows you how languages are parsed, and how Racket makes it easier to design your own. All of these things introduce you to concepts and ideas that are useful even if you forget everything about Racket the Language later on.
In Common Lisp, one has pthreads-like concurrency capabilities which seem very well suited for fine-grained parallelism as well as for server tasks. I am thinking in such things like parallel backtracking and optimization algorithms for robotic control or board games, for example.
However, threads are notoriously difficult to handle cleanly and safely in larger programs. Here, Clojure (which in my eyes is a very Scheme-like Lisp) offers a very elegant solution with its concurrency primitives of Futures, Atoms, Agents, and STM. After some experimenting, I believe they are very, very attractive for many concurrent server tasks (like a web server), but not that well suited for computing-intensive parallel algorithms like the ones I mentioned above, which I am highly interested in. Part of the reasons are that such algorithms can become quite GC-heavy. Also, the Clojure compiler has limits on how much primitive types can be passed as parameters in one functions. This means that a complex backtracking algorithm in Clojure can still be two orders of magnitude slower than in C (which is somewhat disappointing, but one has to remember that Clojure was not designed for this).
Racket has had, so far, only limited concurrency capabilities. It had Futures, however they could easily become blocked by GC. It also has Places, which are a very safe and clean solution of splitting parallel computations into separate processes. However, I think that places are not the first choice for heavily parallel algorithms with strong interdependencies.
Now, Racket can run on top of Chez, and Chez has fine-grained concurrency capabilities on top of pthreads, which seem to be on par with Common Lisp. Also, Racket has strong support for functional and side-effect free programming, including some data structures. In my impression, this seems to open a wide range of new possibilities, including providing look-alike primitives for Clojure's Futures, Agents, and Atoms. I would be very interested to know more whether this impression is correct.