samth
2020-2-11 12:53:10

racket/gui is cross platform


spdegabrielle
2020-2-11 13:28:15

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

https://glitch.com/edit/#!/spdegabrielle-racket-stories\|https://glitch.com/edit/#!/spdegabrielle-racket-stories

I’m deleting the installer and lib/gracket - are there other things I can delete to minimise the disk use of the racket install?


mflatt
2020-2-11 13:46:32

You can delete “lib/libracket3m.a”.


mflatt
2020-2-11 13:48:33

And the “include” directory, assuming that you’re not compiling any new C code.


spdegabrielle
2020-2-11 13:53:56

Thank you @mflatt


spdegabrielle
2020-2-11 15:15:33

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.


soegaard2
2020-2-11 15:39:33

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.


spdegabrielle
2020-2-11 15:45:17

Deinprogramm gui-lib.zip


soegaard2
2020-2-11 15:52:10

Is that also a dependency?


soegaard2
2020-2-11 15:56:55

I think Urlang is dragging some unwanted dependencies into the mix. It’s not the only package though.


soegaard2
2020-2-11 15:57:03

spdegabrielle
2020-2-11 15:58:13

Is that module browser?


soegaard2
2020-2-11 15:58:32

racket-stories % raco dependencies-graph server.rkt


spdegabrielle
2020-2-11 15:58:50

Nice


soegaard2
2020-2-11 15:59:19

I can’t find anything DrRacket-related though.


the.universe.hole
2020-2-11 15:59:50

@the.universe.hole has joined the channel


soegaard2
2020-2-11 16:06:42

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


spdegabrielle
2020-2-11 16:10:04

I’m rebuilding and adding a package at a time to see when it happens


spdegabrielle
2020-2-11 16:14:33

deta appears to be the culprit



spdegabrielle
2020-2-11 16:18:39

Not sure how tho


spdegabrielle
2020-2-11 16:21:42

It may also be threading


spdegabrielle
2020-2-11 16:36:25

Is seems to be triggered on raco pkg install of deta urlang or threading


spdegabrielle
2020-2-11 16:46:21

@soegaard2 im only guessing but urlang has a build-dep on racket-doc ? Am I barking up the wrong tree?


deactivateduser60718
2020-2-11 16:53:37

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?


deactivateduser60718
2020-2-11 16:54:19

I thought doing nothing with the exception on with-handlers could accomplish that, but nope.


deactivateduser60718
2020-2-11 17:14:15

Ah, disregard. with-handlers was sufficient in the REPL. I must be doing something else wrong.


soegaard2
2020-2-11 18:02:18

That’s right. Urlang is just one package. It’s not divided into -doc and -lib.


samdphillips
2020-2-11 18:30:39

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


spdegabrielle
2020-2-11 18:31:30

Does it need racket-doc?


samdphillips
2020-2-11 18:35:28

It will install already built versions of packages for the current Racket, so it skips all of the build dependencies.


samdphillips
2020-2-11 18:36:30

If there is a package that has doc stuff as a regular dependency it won’t help though.


spdegabrielle
2020-2-11 18:38:38

Ugh. I think I need to split some packages into -doc & -lib versions


greg
2020-2-11 18:52:31

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


samth
2020-2-11 19:11:19

The pkg-dep-draw package is helpful here


samth
2020-2-11 19:11:32

Also maybe depending on deta-lib?


deactivateduser60718
2020-2-11 19:44:00

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.


deactivateduser60718
2020-2-11 19:45:15

As for how that relates to the REPL/main thread, I guess it triggers the default error display handler.


nbtheduke
2020-2-11 19:57:47

i can’t find test cases for cond in the racket source. anyone know where i could find them?


nbtheduke
2020-2-11 19:59:49

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


samth
2020-2-11 20:01:05

see pkgs/racket-test-core/tests/racket/syntax.rktl


nbtheduke
2020-2-11 20:01:16

thanks, i’ll check it out!


spdegabrielle
2020-2-11 20:11:31

neither deta, urlang or threading had binaries available for 7.5


mflatt
2020-2-11 20:13:52

samdphillips
2020-2-11 21:35:10

Is there a syntax class for something that looks like an “application”?


samdphillips
2020-2-11 21:37:16

I’m using something like [pattern e #:when (list? (syntax->datum #'e))]


capfredf
2020-2-11 22:01:29

if you mean “looks like”, why not (e arg …)?


greg
2020-2-11 22:06:17

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.


greg
2020-2-11 22:07:05

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.



greg
2020-2-11 22:08:47

In that case it’s obvious which specific, other thread should be the target.


greg
2020-2-11 22:09:14

If you’re doing something with multiple other threads all running, I’m not sure how you’d want to handle a break.


greg
2020-2-11 22:10:52

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.


samdphillips
2020-2-11 22:13:52

:blush: that’s why I asked. I thought I may have been overthinking the obvious.


ben
2020-2-12 02:06:23

you’ll need to look for (#%plain-app e arg ....) if the input’s been expanded


sorawee
2020-2-12 07:04:55

Does this need #%plain-app in the #:literals?