notjack
2020-10-23 07:04:42

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.


notjack
2020-10-23 07:06:35

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


laurent.orseau
2020-10-23 08:15:51

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:


jesse.alama
2020-10-23 09:24:12

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


jesse.alama
2020-10-23 09:50:22

just wait until we get raco raco


hoshom
2020-10-23 11:08:30

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


mflatt
2020-10-23 12:18:45

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.


laurent.orseau
2020-10-23 13:30:32

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.


laurent.orseau
2020-10-23 13:32:29

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


laurent.orseau
2020-10-23 13:39:40

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


laurent.orseau
2020-10-23 13:48:40

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


samth
2020-10-23 14:12:24

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


samth
2020-10-23 14:12:37

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


samth
2020-10-23 14:14:25

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.


laurent.orseau
2020-10-23 14:15:30

ok I’ll try that, thanks


samdphillips
2020-10-23 14:31:07

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


samdphillips
2020-10-23 14:39:55

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 ...


badkins
2020-10-23 15:00:50

FWIW I like having racket and raco separate.


samth
2020-10-23 15:01:08

Yes, I think we made the right decision.


samth
2020-10-23 15:01:47

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


jesse.alama
2020-10-23 15:02:14

rico would be the racket killer


pykosdevelopment
2020-10-23 15:12:10

@pykosdevelopment has joined the channel


pykosdevelopment
2020-10-23 15:12:33

Hello there


pykosdevelopment
2020-10-23 15:14:38

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


pykosdevelopment
2020-10-23 15:16:00

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


samth
2020-10-23 15:19:28

@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.


pykosdevelopment
2020-10-23 15:33:38

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


pykosdevelopment
2020-10-23 15:33:47

What does this mean?


samth
2020-10-23 15:48:38

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


pykosdevelopment
2020-10-23 15:59:57

Usually installing/documenting all the files takes long?


samth
2020-10-23 16:03:58

Yes


samth
2020-10-23 16:04:31

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


laurent.orseau
2020-10-23 16:23:00

@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.


pykosdevelopment
2020-10-23 16:54:48

There arent precompiled binaries for aarch64


pykosdevelopment
2020-10-23 16:56:04

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


soegaard2
2020-10-23 16:56:32

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


pykosdevelopment
2020-10-23 16:56:39

Oh cool


soegaard2
2020-10-23 16:57:27

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


samth
2020-10-23 17:57:33

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


mflatt
2020-10-23 18:02:20

@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.


greg
2020-10-23 19:07:32

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.


greg
2020-10-23 19:09:24

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


nchutch
2020-10-23 19:58:36

@nchutch has joined the channel