Iāve been using Racket as an R6RS target in https://github.com/mk12/sicp. It seems like a really cool language, and I find the ālanguage-oriented programmingā idea from Beautiful Racket intriguing. But the installation process and tooling is a buzzkill for me. On macOS, there are two main options:
brew install --cask racket. This pulls in the whole kitchen sink, littering my Applications directory with a host of apps Iām never going to use, including DrRacket but also launchers for documentation, slideshows (?). It reminds me (in a bad way) of installing MacTeX. DrRacket feels like an educational toy, like the Processing/Arduino IDE: not something Iād use for a large project. For all other languages Iām happily living in the VS Code era with high quality LSP-based extensions.
brew install minimal-racket. Just the barebones CLI, this is what I wanted! Oh, but itās really minimal, so I need to raco pkg install r6rs. It prompts me for every single dependency unless I pass --auto ⦠strange. And why on earth is it downloading scribble and dozens of other things? Oh, maybe I need --no-docs? Nope, it still wants to download them all. Turns out I want r6rs-lib. Then to compile a project I need to use raco make, but that subcommand doesnāt exist until I raco pkg install make. This time I canāt figure out a way to stop it from smuggling in all these GUI packages I clearly donāt need. So I wait for several minutes on my M1 Pro machine until it finishes. The CLI for racket/raco reminds me (in a bad way) of autotools or cpan.
Maybe Iām just spoiled by Go/Rust/etc. but polishing the tooling would go a long way for me.
I use DrRacket for professional development on large projects. Of course, you can do it differently but itās widely used in the Racket community.
You can press a to answer yes to all subsequent installation prompts.
raco pkg install r6rs installs documentation because the r6rs package depends on the r6rs-doc package. The --no-docs flag doesnāt build the documentation, but does install it.
The raco make command is in compiler-lib, not in the make package (which is a build system).
In general, the things you have run into are not about the tooling per se, but about what is in what package, and the fact that Racket provides extensive local documentation for everything.
Thanks, thatās good to know about compiler-lib. Is there some way I could have discovered that on my own? It would be nice if it was mentioned on https://docs.racket-lang.org/raco/make.html.
The official installers for macOS are here: download.racket-lang.org
ad 1. The official installer gives you a single folder in /Applications/Racket version-number/
so with the official installer there is no problems with littering Applications.
ad 2. The --no-docs situation is a but tricky. Some package have separate collections for the main library and for the documentation. In that case --no-docs work as expected. However, some collections use only one collection for both. That is, there is no way to install that package without automatically installing its documentation.
If you see this, the best thing to do is to gently ask the developer of the package to split his package in two parts.
I recommend to get the full official installer. Unless we are talking deployment on, say, a web server.
Homebrew just wraps the official installers. It put them in that folder but in Launchpad theyāre all spread out and I have to hide them. The whole āinstall many little GUI apps for various tasksā gives me vibes of old software not tailored to macOS. Thatās what pushed me to minimal-racket, the same way I prefer brew install python rather than running the official .pkg which assumes I want IDLE etc.
I see, thanks for explaining about --no-docs. I guess itās nice if Racket encourages thoughtful documentation (unlike stereotypical Haskell for instance). However, as a newcomer, having raco pkg install take forever because of documentation feels like a strange problem that Iāve never encountered in any other system. If itās typical for documentation to need so much machinery to build, it seems there ought to be a separate set of ādoc dependenciesā similar to how most package managers have separate ādev dependenciesā.
Iāll be honest - I never use Launchpad, so I have no idea what the āstandard practiceā is here.
Bring it up on https://racket.discourse.group/ and see whether the community agrees.
I donāt know who does the brew installers. AFAIK they are not part of the release testing process.
I never have any trouble with either either the official installers at https://download.racket-lang.org/ or building from source on macOS or linux. They are clean and easy to uninstall, putting everything into a single folder.
If you are working through SICP them Iād suggest you use #lang sicp - you do need to install it with raco pkg install sicp, but it provides a variant of R5RS that matches SICP. (it also includes the picture language from SICP)
FWIW R5RS and R6RS are included when you use the full racket installer (not minimal), a community member has also released R7RS. I donāt use any of the scheme implementations as Iām more interested in the Racket language and Typed Racket.
If you donāt want to use DrRacket you donāt have to; you can use VScode. Try the āMagic Racketā VSCode plugin.
My personal opinion is while Dr Racket has capabilities that other environments donāt have, if you are learning you will probably be happier using an editor you already know.
The minimal installers include ājust enough of Racket that you can use raco pkg to install moreā, but my recommendation would be to use the full official installer until you are more familiar.
It is big but you get a lot. Like MacTeX, I think it is worth it. š
Racket isnāt Go or Rust. judge it for what it is, not what it isnāt.
If you are new to Racket and have questions or need a hand getting started: Discourse and Discord
are the most active places.
I appreciate your enthusiasm, and I apologize for being so ranty (wasnāt really thinking from the perspective of a Racket contributor). I think the bar for CLI tooling quality has gone up quite a bit in recent years. Maybe some of it is just changing fads, but there is definitely a trend towards more friendly, consistent, predictable, easy to use interfaces. These first impressions are important the same way having a nice looking website is. My gripe is mainly with raco. Compared to all the other package managers Iām used to ā cargo, go, pip, gem, npm, yarn, elm ā I found it disappointing. Why does raco pkg install make download 100+ packages, most of which seem to be for documentation or GUI, despite --no-docs? And why is the default to prompt y/n ~100 times?
Racket may not be Go or Rust, but as general-purpose programming languages I think itās fair to judge them against one another. And Racket isnāt unique here. I think Haskellās package management is far worse, even with stack. And Clojureās tooling and error messages leave a lot to be desired. All three are great languages but these things hold them back, at least for me. I want a language to be cool on paper and have all the boring stuff (installing packages, running tests, ā¦) work delightfully. I know thatās a lot to ask š
As for #lang sicp, Iām trying to target as many R6RS compliant Schemes as possible, so Racket is just one of them. I chose R6RS because I was really impressed with Chez Schemeās speed and wanted to primarily use it. Of course now Racket is now Racket CS so itās less variety than I had before. I also support Guile.
Racket may not be Go or Rust, but as general-purpose programming languages I think itās fair to judge them against one another.
Sorry forgot to respond to this.
I think fair comparison is to use them as intended. This varies from language to language and with Racket I think it is fair to say you are intended to use the full (official) install.
Why does raco pkg install make download 100+ packages, most of which seem to be for documentation or GUI, despite āno-docs? And why is the default to prompt y/n ~100 times?
Sorry, I donāt know what dependencies #lang r6rs has so Iād suggest asking on the discourse server.
As for #lang sicp, Iām trying to target as many R6RS compliant Schemes as possible, so Racket is just one of them. I chose R6RS because I was really impressed with Chez Schemeās speed
When you are using #lang r6rs you are using neither Racket nor Chez. Rackets r6rs is built on top of Racket which is in turn built on top of Chez.
I think you can access the implementation of chez from the command line by identifying the binary, but if you want to support chez Iād use the definitive version as I believe racket uses a fork https://cisco.github.io/ChezScheme/ Chez is a superset of r6rs
Racket the language isnāt a R6RS implementation. I think they had to change the name (11 years ago?) because calling it a scheme at that point had already become a problem https://racket-lang.org/new-name.html
That said - thank you for making and sharing your R6RS SICP work.
Will you eventually extend to include Common Lisp?
I suppose the recently released SICP javascript edition opens the door to a similar exercise in other languages; C++, Java. I wonder how an SICP in Pharo, Ocaml, Forth, or Erlang would look.
Bw
Stephen
(Edit - added SICP to āsharing your R6RS workā to clarify meaning)
Youāre right, Iām not really using Racket the language. I wanted to avoid tying myself to a particular Scheme implementation by targeting one of the RNRS standards. And the best way to ensure Iām really sticking to the standard is to test with multiple independent implementations. Also I wanted to be able to use modules portably, so R5RS was out, and I couldnāt find enough cross-platform R7RS implementations. So R6RS it was.
I think Iām operating in the spirit of Racketās language-oriented programming though, in that my solutions are not written directly in R6RS but in a custom language that I implemented with macros.
The second best programming language!
What do you mean?
Just a joke. Obviously the best one is your favourite. š
the best one is clearly the one you use racket to build (:
Oh, okay :) I thought it was some kind of a reference!
Iāve been using Racket as an R6RS target in https://github.com/mk12/sicp. It seems like a really cool language, and I find the ālanguage-oriented programmingā idea from Beautiful Racket intriguing. But the installation process and tooling is a buzzkill for me. On macOS, there are two main options:
brew install --cask racket
. This pulls in the whole kitchen sink, littering my Applications directory with a host of apps Iām never going to use, including DrRacket but also launchers for documentation, slideshows (?). It reminds me (in a bad way) of installing MacTeX. DrRacket feels like an educational toy, like the Processing/Arduino IDE: not something Iād use for a large project. For all other languages Iām happily living in the VS Code era with high quality LSP-based extensions.brew install minimal-racket
. Just the barebones CLI, this is what I wanted! Oh, but itās really minimal, so I need toraco pkg install r6rs
. It prompts me for every single dependency unless I pass--auto
⦠strange. And why on earth is it downloading scribble and dozens of other things? Oh, maybe I need--no-docs
? Nope, it still wants to download them all. Turns out I wantr6rs-lib
. Then to compile a project I need to useraco make
, but that subcommand doesnāt exist until Iraco pkg install make
. This time I canāt figure out a way to stop it from smuggling in all these GUI packages I clearly donāt need. So I wait for several minutes on my M1 Pro machine until it finishes. The CLI for racket/raco reminds me (in a bad way) of autotools or cpan.Maybe Iām just spoiled by Go/Rust/etc. but polishing the tooling would go a long way for me.
a
to answer yes to all subsequent installation prompts.raco pkg install r6rs
installs documentation because ther6rs
package depends on ther6rs-doc
package. The--no-docs
flag doesnāt build the documentation, but does install it.raco make
command is incompiler-lib
, not in themake
package (which is a build system).In general, the things you have run into are not about the tooling per se, but about what is in what package, and the fact that Racket provides extensive local documentation for everything.
Thanks, thatās good to know about compiler-lib. Is there some way I could have discovered that on my own? It would be nice if it was mentioned on https://docs.racket-lang.org/raco/make.html.
I agree, I think including that on those documentation pages would be a good idea.
The official installers for macOS are here: download.racket-lang.org
ad 1. The official installer gives you a single folder in
/Applications/Racket version-number/
so with the official installer there is no problems with littering Applications.ad 2. The
--no-docs
situation is a but tricky. Some package have separate collections for the main library and for the documentation. In that case--no-docs
work as expected. However, some collections use only one collection for both. That is, there is no way to install that package without automatically installing its documentation. If you see this, the best thing to do is to gently ask the developer of the package to split his package in two parts.I recommend to get the full official installer. Unless we are talking deployment on, say, a web server.
Homebrew just wraps the official installers. It put them in that folder but in Launchpad theyāre all spread out and I have to hide them. The whole āinstall many little GUI apps for various tasksā gives me vibes of old software not tailored to macOS. Thatās what pushed me to minimal-racket, the same way I prefer
brew install python
rather than running the official .pkg which assumes I want IDLE etc.I see, thanks for explaining about
--no-docs
. I guess itās nice if Racket encourages thoughtful documentation (unlike stereotypical Haskell for instance). However, as a newcomer, havingraco pkg install
take forever because of documentation feels like a strange problem that Iāve never encountered in any other system. If itās typical for documentation to need so much machinery to build, it seems there ought to be a separate set of ādoc dependenciesā similar to how most package managers have separate ādev dependenciesā.Iāll be honest - I never use Launchpad, so I have no idea what the āstandard practiceā is here. Bring it up on https://racket.discourse.group/ and see whether the community agrees.
I donāt know who does the brew installers. AFAIK they are not part of the release testing process.
I never have any trouble with either either the official installers at https://download.racket-lang.org/ or building from source on macOS or linux. They are clean and easy to uninstall, putting everything into a single folder.
If you are working through SICP them Iād suggest you use
#lang sicp
- you do need to install it withraco pkg install sicp
, but it provides a variant of R5RS that matches SICP. (it also includes the picture language from SICP)FWIW R5RS and R6RS are included when you use the full racket installer (not minimal), a community member has also released R7RS. I donāt use any of the scheme implementations as Iām more interested in the Racket language and Typed Racket.
If you donāt want to use DrRacket you donāt have to; you can use VScode. Try the āMagic Racketā VSCode plugin.
My personal opinion is while Dr Racket has capabilities that other environments donāt have, if you are learning you will probably be happier using an editor you already know.
If you want the official āminimalā install you can get it at https://download.racket-lang.org/releases/8.5/
It is big but you get a lot. Like MacTeX, I think it is worth it. š
Racket isnāt Go or Rust. judge it for what it is, not what it isnāt.
If you are new to Racket and have questions or need a hand getting started: Discourse and Discord are the most active places.
We welcome questions š
I appreciate your enthusiasm, and I apologize for being so ranty (wasnāt really thinking from the perspective of a Racket contributor). I think the bar for CLI tooling quality has gone up quite a bit in recent years. Maybe some of it is just changing fads, but there is definitely a trend towards more friendly, consistent, predictable, easy to use interfaces. These first impressions are important the same way having a nice looking website is. My gripe is mainly with raco. Compared to all the other package managers Iām used to ā cargo, go, pip, gem, npm, yarn, elm ā I found it disappointing. Why does
raco pkg install make
download 100+ packages, most of which seem to be for documentation or GUI, despite--no-docs
? And why is the default to prompt y/n ~100 times?Racket may not be Go or Rust, but as general-purpose programming languages I think itās fair to judge them against one another. And Racket isnāt unique here. I think Haskellās package management is far worse, even with stack. And Clojureās tooling and error messages leave a lot to be desired. All three are great languages but these things hold them back, at least for me. I want a language to be cool on paper and have all the boring stuff (installing packages, running tests, ā¦) work delightfully. I know thatās a lot to ask š
As for
#lang sicp
, Iām trying to target as many R6RS compliant Schemes as possible, so Racket is just one of them. I chose R6RS because I was really impressed with Chez Schemeās speed and wanted to primarily use it. Of course now Racket is now Racket CS so itās less variety than I had before. I also support Guile.Sorry forgot to respond to this.
I think fair comparison is to use them as intended. This varies from language to language and with Racket I think it is fair to say you are intended to use the full (official) install.
Sorry, I donāt know what dependencies
#lang r6rs
has so Iād suggest asking on the discourse server.When you are using
#lang r6rs
you are using neither Racket nor Chez. Rackets r6rs is built on top of Racket which is in turn built on top of Chez.I think you can access the implementation of chez from the command line by identifying the binary, but if you want to support chez Iād use the definitive version as I believe racket uses a fork https://cisco.github.io/ChezScheme/ Chez is a superset of r6rs
Racket the language isnāt a R6RS implementation. I think they had to change the name (11 years ago?) because calling it a scheme at that point had already become a problem https://racket-lang.org/new-name.html
That said - thank you for making and sharing your R6RS SICP work.
Will you eventually extend to include Common Lisp?
I suppose the recently released SICP javascript edition opens the door to a similar exercise in other languages; C++, Java. I wonder how an SICP in Pharo, Ocaml, Forth, or Erlang would look.
Bw Stephen
(Edit - added SICP to āsharing your R6RS workā to clarify meaning)
Youāre right, Iām not really using Racket the language. I wanted to avoid tying myself to a particular Scheme implementation by targeting one of the RNRS standards. And the best way to ensure Iām really sticking to the standard is to test with multiple independent implementations. Also I wanted to be able to use modules portably, so R5RS was out, and I couldnāt find enough cross-platform R7RS implementations. So R6RS it was.
I think Iām operating in the spirit of Racketās language-oriented programming though, in that my solutions are not written directly in R6RS but in a custom language that I implemented with macros.