racket/gui is cross platform
I’m trying to run the racket stories code on glitch and I’m having trouble fitting the minimal 7.5 linux x86–64 install in the 200MB allowed by the container
I’m deleting the installer and lib/gracket
- are there other things I can delete to minimise the disk use of the racket install?
You can delete “lib/libracket3m.a”.
And the “include” directory, assuming that you’re not compiling any new C code.
Thank you @mflatt
Ok definitely something wrong - the dependencies seem to download future-visualizer.zip and other things I associate specifically with DrRacket plugins. Not expected for a web bc app.
That does sound odd. But is tricky to restrict the dependencies. When I installed racket-stories on the web-server, I attempted to avoid installing doc-related packages, but some packages don’t have a separate doc-lib - so at some point I gave up.
Deinprogramm gui-lib.zip
Is that also a dependency?
I think Urlang is dragging some unwanted dependencies into the mix. It’s not the only package though.
Is that module browser?
racket-stories % raco dependencies-graph server.rkt
Nice
I can’t find anything DrRacket-related though.
@the.universe.hole has joined the channel
The graph shows the modules used. The module urlang/html
is used. The html stuff is a little corner of urlang.
The file html.rkt
and a few related files are shown - but the other parts of Urlang aren’t shown. The same must be true for the other packages that are belong to multi
packages. So the graph, can’t be used to spot “what’s dragged in”.
I’m rebuilding and adding a package at a time to see when it happens
deta
appears to be the culprit
Not sure how tho
It may also be threading
Is seems to be triggered on raco pkg install of deta urlang or threading
@soegaard2 im only guessing but urlang has a build-dep on racket-doc
? Am I barking up the wrong tree?
I want to suppress the user break
message on stderr when I break a thread. Is there a cleaner way to do that than temporarily redirecting the output to nowhere?
I thought doing nothing with the exception on with-handlers
could accomplish that, but nope.
Ah, disregard. with-handlers
was sufficient in the REPL. I must be doing something else wrong.
That’s right. Urlang is just one package. It’s not divided into -doc and -lib.
@spdegabrielle it may not solve your current issue, but you may also want to make sure the built catalog is in your catalogs list and that you install with the --binary-lib
flag.
Does it need racket-doc?
It will install already built versions of packages for the current Racket, so it skips all of the build dependencies.
If there is a package that has doc stuff as a regular dependency it won’t help though.
Ugh. I think I need to split some packages into -doc & -lib versions
@deactivateduser60718 My memory is a little fuzzy so take this with a grain of salt but: I think it’s something to do with breaks going to the main thread. So with-handlers
for some other thread won’t see it. Also it might be that you can’t use with-handlers
at all for exn:break
, and instead you need to use call-with-exception-handler
.
The pkg-dep-draw package is helpful here
Also maybe depending on deta-lib?
Relevant bit from the docs for with-handlers
:
> Before any predicate or handler procedure is invoked, the continuation of the entire with-handlers expression is restored, but also parameterize-breaked to disable breaks. Thus, breaks are disabled by default during the predicate and handler procedures (see Breaks), and the exception handler is the one from the continuation of the with-handlers expression. It seems like call-with-exception-handlers
does the same thing, but with-handlers*
does not disable breaks within the actual handler’s body.
As for how that relates to the REPL/main thread, I guess it triggers the default error display handler.
i can’t find test cases for cond
in the racket source. anyone know where i could find them?
i decided to implement racket’s cond
in Clojure (my main language) and don’t want to have to rewrite the test suite if it already exists
see pkgs/racket-test-core/tests/racket/syntax.rktl
thanks, i’ll check it out!
neither deta, urlang or threading had binaries available for 7.5
To get built binaries, use https://pkg-build.racket-lang.org/server/built/catalog/ as the catalog. See also https://pkg-build.racket-lang.org/about.html
Is there a syntax class for something that looks like an “application”?
I’m using something like [pattern e #:when (list? (syntax->datum #'e))]
if you mean “looks like”, why not (e arg …)
?
I think part of this might be that exn:break
isn’t necessarily an exception in a particular thread, it could be a break signal from the operating system. So I think the original /main thread gets it.
If that main thread has some better idea, it could break-thread
some specific thread, then continue itself. That’s what I do in Racket Mode for example.
In that case it’s obvious which specific, other thread should be the target.
If you’re doing something with multiple other threads all running, I’m not sure how you’d want to handle a break.
The extra match clause there IIRC is because exn:break?
also is true for exn:break:terminate
and exn:break-hang-up
so if you don’t want to act on those, only on exn:break
you need to do something like that.
:blush: that’s why I asked. I thought I may have been overthinking the obvious.
you’ll need to look for (#%plain-app e arg ....)
if the input’s been expanded
Does this need #%plain-app
in the #:literals
?