
Is there an API in the standard library (or in a package) to create a temporary directory and remove it after a code block is executed?

No “remove”, but for “create temporary directory”, see https://docs.racket-lang.org/reference/Filesystem.html#%28def._%28%28lib._racket%2Ffile..rkt%29._make-temporary-file%29%29

There’s a pending PR that makes the interface a bit nicer


What you pointed to is make-temporary-file
, but I want to create a directory to create several files in it and want the directory to be removed automatically after the code block. :slightly_smiling_face:

Well, it can also create a directory!

The name is misleading

Hence the above PR which tries to make things less misleading

Ah, I see. Thanks! :slightly_smiling_face:

Thanks @ryanc and @djholtby! Turns out all three methods (vector of hashes, hash of hashes, hash keyed by keys->nat) perform similarly well. Vector of hashes is possible because I know one key is going to be a natural number. I thought of doing hash of hashes, but I had an unfounded fear of an extra hash-ref.

Yes, having make-temporary-file
create a directory when copy-from-file
is 'directory
is quite unexpected. I didn’t even see or remember that from when I read the documentation of make-temporary-file
a week or two ago.

:warning: :warning: :warning: Racket Meetup on Gather this afternoon/evening :telephone: :tv: 1 PM PDT 4 PM EDT 8 PM UTC 10 PM CEST
https://gather.town/app/wH1EDG3McffLjrs0/racket-users :warning: :warning: :warning:

90 minutes from now!

60 minutes to go ( it happens at 8pm UTC)

Thank you to everyone who joined us today
I’m looking forward to seeing more of you at the next meet-up: When: First Saturday EVERY Month UTC: 20:00 (30 minutes but can overrun) Calendar: Google , iCal
The link is free for all - so if you want to organise a meet-up at a time that is better for your time zone please feel free!
stephen

My Racket is suddenly connecting to Neil’s website, although my system OpenSSL still can’t; only recent versions can. I can’t get any version of OpenSSL to connect to <https://expired-r3-test.scotthelme.co.uk/>
without error.
Is the package server still having problems connecting?

Judging from https://pkgs.racket-lang.org/package/csv-reading, I think it’s OK now.

But also, the package website is behaving weird lately. My package is built at pkg-build, but the doc is weirdly not shown in the package website. So I don’t know if there are any staling issues

Hm. Well how mysterious. I give up. OpenSSL is beyond me.