
What I mean is, the library code you want to clean up after can’t attach custom cleanup logic to custodians safely (register-custodian-shutdown
is unsafe and runs the callback in atomic mode). So if you want to shut down some library code, shouldn’t you create both a new plumber and a new custodian, first flush the plumber, then shut down the custodian? That way if the library code needs to clean something up that the runtime doesn’t know about (so not a file descriptor or socket or something) like a weird custom data structured managed by some FFI library, it can register a flush callback instead of risking locking up the vm with a buggy custodian shutdown callback.

That’s my mental model of why you’d bother with plumbers instead of custodian shutdown callbacks, anyway.

if you can make it to run also for just modules without submodules, this is going to replace racket
for the most part! :slightly_smiling_face:

raco: it’s racket, just with more stuff!

just wait until we get raco raco

Is there no way dynamic-wind fits into all this?

I doubt that a plumber is ever the right solution for an FFI clean-up. Custodians or finalization are the way to go. If there are dependencies among custodian-managed or finalized things, that’s a complication you have to deal with. (There’s an order built into finalization, at least.)
A dynamic-wind
can help with break-thread
-style cleanup, but kill-thread
and custodian-shutdown-all
cannot run winders because they’re supposed to be immediate and atomic from the perspective of safe code.

I have a bunch of tests that I run with raco test
but I also run to run them a second time with some different environment variables. Is there a way to do that directly with raco test
, or should I create a bash script?
The problem with the bash script is that it’s not going to be run automatically by servers like pkgs and drdr.

or is there a way to make raco test
run a bash script instead of a racket file, without starting racket first?

Oh wait, there’s a --drdr
option to raco test
, that might be even better

Actually, maybe not. I need a fresh preference directory, and --drdr
doesn’t seem to do that

I would first try creating a file that first sets the env variables and then dynamic-requires the relevant file.

If that doesn’t work, you could create a racket file that uses system

When we switched to the name racket
, and created the raco
command (subsuming a bunch of separate binaries) we considered unifying it all into one and having racket run file.rkt
be the way to run a file.

ok I’ll try that, thanks

I was thinking about without submodules, but I was trying to keep the arguments uncluttered

As implemented I think you could run (unless there is something in dyanmic-require
which would block it) raco run raco-run runner raco-run runner ...

FWIW I like having racket
and raco
separate.

Yes, I think we made the right decision.

We also considered naming it rico
instead of raco
as a further joke about “racket”, but decided that was excessive.

rico would be the racket killer

@pykosdevelopment has joined the channel

Hello there

I am new to Racket, but I am wondering why it’s taking so long to install make install
is running for 3 hours already, which is kinda long for compiling a language AFAIK

Crystal which is a LLVM-based language has a kinda slow compiler, and it has to do bootstrap, but that takes around an hour

@pykosdevelopment if you look at what the current output of make install
is, it probably tells you what’s currently happening. Racket takes a long time to build because that command compiles and installs millions of lines of library code as well as millions of words of documentation.

raco setup: running: <pkgs>/redex-doc/redex/redex.scrbl

What does this mean?

@pykosdevelopment it means that it’s executing that file, which is part of the documentation for Redex

Usually installing/documenting all the files takes long?

Yes

You can install precompiled versions which will of course take less time to install

@pykosdevelopment Just in case, do you know you can download compiled versions of Racket? https://download.racket-lang.org/ That will of course be way faster to install.

There arent precompiled binaries for aarch64

Btw, is there something similar to a range? In Ruby 1..10 can be expanded to [1, 2, …, 10], which is a list

(range 1 11)
or simply (range 10)
.

Oh cool

Well, (range 10)
gives you
(0 1 … 9)`, but since indices in Racket starts from 0, that usually what you need.

@pykosdevelopment even though there aren’t binaries for aarch64, if you use the “source + built packages” download it will go much faster

@pykosdevelopment Just in case you’re not already compiling with --enable-csdefault
, that can also help a lot. Racket BC does not have an AArch64 JIT, while Racket CS compiles to machine code on AArch64.

Is this easier for me to report here, or, do an issue or PR? If here: setup/collection-search
has a buglet in its use of error
. (collection-search #f)
reports error: format string requires 0 arguments, given 1; arguments were: #f
. In its source I guess that (unless (normalized-lib-module-path? mp)
(error 'collection-search "normalized-lib-module-path?" mp))
either wants a ~v
appended to the string, or, was intended to use raise-argument-error
instead of error
.

If easier for me to open an issue or PR, let me know.

@nchutch has joined the channel