24 comments

[ 3.8 ms ] story [ 47.0 ms ] thread
I’m going to teach Racket in my PL course next semester. I’m excited to have an excuse to use it again :)
Great! Privileged students. I wish I had learned more and especially earlier with Racket, than I did.

Having gone through the mainstream computer programming education, I can only look back with regret, at all the time I lost, because of mediocre education. How much more I could do or know today, if only I had started learning with courses and books, that actually teach core programming concepts and do not limit themselves with their choice of language.

> Racket CS remains "beta" quality for the v7.5 release, but its compatibility and performance continue to improve.

Does this mean Racket CS is faster than the default Racket?

sometimes yes, sometimes no.

https://blog.racket-lang.org/2019/01/racket-on-chez-status.h...

it seems it's a bit 50-50 in terms of performance gains, but the main gain, from what i understand, is the ability for the racket developers to code in racket and chez scheme now instead of c.

Note that this report is 9 months old. I guess there will be an new report this January. There has been a lot of small improvements.

I'm not tracking all of them, but I think that now there are less checks to ensure that the functions return don't return multiple values in the wrong moment, and there are less unnecessary continuation marks.

It does not mean that. It just means Racket CS is faster in 7.5 than it was in 7.4.
As Racket CS slowly improves towards matching the mainline implementation, those results can give the impression that Racket CS is slow. To put things in context, look where Racket was already at in comparison to another very dynamic language, Python:

https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

I don't know how to directly compare Python 3 and Racket CS on that site, but comparing three ways paints Racket CS in a more favorable light. Hopefully Racket CS will close the gap with Racket, but it’s already doing pretty great relatively... unless we compare to SBCL, Rust, Haskell, etc.

Note that several of these benchmarks use 4 cores on Python but only one on Racket. Time to revisit the Racket programs and use places.

Look at the single core benchmarks to get a more 1-1 comparison.

Please note the URL I provided shows a comparison between Racket and Racket CS (not Python).
Question : is racket still useful if you plan on building a DSL not based on lisp syntax ?
Yes. There are general parser libraries available you can use to parse what-ever you like.

Use the `parser` library if you want a yacc/bison style parser.

Use `parsack` if you like parser combinators.

Use `ragg` or `bragg` if you like an "automatic parser from grammar".

Yes. Some examples:

With the default installation of Racket you get an implementation of Algol 60 https://docs.racket-lang.org/algol60/

You can download and install form the package repository the language Honu, that is a Java-like language https://docs.racket-lang.org/honu/index.html

With the default installation of Racket you get Scribble, that is the language that is used to write the docs. (It's the same spirit of LaTeX where everything is a string unless you use a magical character, but the magical character and the details are very different.) https://docs.racket-lang.org/scribble/

I'm currently creating a SQL dialect with Racket. It's great!
Seems to be a lot faster to start up, particularly loading all the extensions, which will increase the chances of me using it more.
(comment deleted)
Is it used anywhere outside of education?
I like DrRacket's debugger but i can only run it once on a large program! Even if i increase the memory i can only run it once. The second run results in strange behavior. Does anyone else have problems with DrRacket?