soegaard2
2021-3-21 08:22:18

Stating the obvious: Since documentation comes in forms of programs (scribble files), installing a package brings in all the dependencies used in the documentation. This often includes full racket, graphical libraries etc. The intention is of course to split packages into foo-lib, foo-doc etc, but if you happen to use a package, that weren’t split up, you’ll end up installing quite a bit more than just minimal racket. Apart from shipping pre-rendered documentation (which isn’t simple), I don’t see a solution.


soegaard2
2021-3-21 08:27:58

@sorawee Wrt the dynamic linking problem: I think, there is a fair chance, you are running into this issue:

https://stackoverflow.com/questions/35568122/why-isnt-dyld-library-path-being-propagated-here



soegaard2
2021-3-21 08:33:07

I suppose you could temporarily turn off “System Integration Protection” to check, that it is indeed this issue.


sorawee
2021-3-21 08:34:08

That’s too scary. I probably won’t do it, but I will post these links in the issue in case it helps whoever looking at the issue.


soegaard2
2021-3-21 08:44:00

It is not clear to me, if raco make should propagate, or whether the dynamic library should use RPATH instead.

https://stackoverflow.com/questions/39927235/alternative-for-the-dyld-library-path-trick-since-mac-os-10-11-el-capitan-with-s


soegaard2
2021-3-21 08:44:25

In any case, dynamic linking is always tricky.


sorawee
2021-3-21 08:48:33

One workaround that works for me is to avoid DYLD_LIBRARY_PATH and adjust lib-search-dirs directly


soegaard2
2021-3-21 08:49:28

That sounds like a good solution.


sarna.dev
2021-3-21 10:55:04

sorawee
2021-3-21 10:57:51

IIUC, that package is severely outdated and it is strong discouraged to use it.


sarna.dev
2021-3-21 10:58:42

oh damn. thanks @sorawee


sorawee
2021-3-21 11:00:17

It was used for displaying Racket docs several years ago (probably more than ten years), but we now use a proper browser for that.


soegaard2
2021-3-21 11:01:38

sarna.dev
2021-3-21 11:01:43

I see. I’ll go with using the browser myself then :)


sorawee
2021-3-21 11:08:59

Is there a way to instantiate racket/gui only once across phases? Otherwise, I will get “cannot instantiate `racket/gui/base’ a second time in the same process”.


mflatt
2021-3-21 12:56:16

No. The only thing that realy works is to avoid using racket/gui anywhere except at phase 0 in the main thread of the main place.


samth
2021-3-21 14:40:17

Another solution that would work is to rewrite all the underlying gui libraries on all three platforms to be thread-safe


suzanne.soy
2021-3-21 15:10:55

@suzanne.soy has joined the channel


sorawee
2021-3-21 16:27:48

Thanks! Turns out this is very easy to fix (https://github.com/takikawa/racket-rsvg/pull/8)


phillip
2021-3-21 18:29:00

@phillip has joined the channel


phillip
2021-3-21 18:31:47

Hi all. New to Racket and trying to use create-embedding-executable . When I run my app that was built I get cleanse-path: contract violation expected: (or/c path-string? path-for-some-system?) given: '#%embedded:racket/base: Im struggling how to overcome this.


soegaard2
2021-3-21 18:33:04

@phillip I don’t know anything concrete, but OS and version of Racket might be relevant here.


phillip
2021-3-21 18:33:14

macOS 8.0 CS


phillip
2021-3-21 18:34:00

I think its something with the bundling. If I do racket myapp.rkt "/path/to/file/to/compile" it works great


phillip
2021-3-21 18:34:12

its the raco exe produced version of my app that blows up


soegaard2
2021-3-21 18:36:29

I don’t know for sure - but I think this could be a bug in Racket.

If you have time, wait for someone that knows more. If not, I would try 8.0 BC instead.

Racket has two backends, the traditional BC and a new one CS. Version 8.0 is the first that uses CS, so this might be one of those things, that simply hasn’t been discovered before.


phillip
2021-3-21 18:37:54

ty. I will try BC


phillip
2021-3-21 18:53:14

no go with 7.9 BC either. Whats interesting is if you use compiler/embed it seems to assume you’ll be using it from racket vs a wrapper app. My wrapper app throws: find-exe: can't find Racket executable for variant cs I ended up hacking the module to hard code the path to my racket file to get things working. Which makes sense, I want to use the base racket binary as the starting point for a new compilation.

I’m just stuck on the embedded modules not being read properly.


laurent.orseau
2021-3-21 19:47:03

Is there an undocumented caching mechanism for get-pure-port? I’m doing (port->string (get-pure-port (string->url aurl) #:redirections 10) #:close? #t) right before and after updating a raw gist at aurl, and the second time it returns the same text as the first time, even though my browser displays the update version.


soegaard2
2021-3-21 19:55:41

laurent.orseau
2021-3-21 19:56:45

Thanks. This is weird. This was inside DrRacket (that’s the use case) and even after restarting it’s not updated


soegaard2
2021-3-21 19:59:05

Maybe there is a proxy server somewhere? It’s worth trying get-pure-port/headers with a header, that says “no caching”.


laurent.orseau
2021-3-21 21:12:45

Just tried again now, and the result is the new text. It must be some caching. I’ll try the headers next.


alexharsanyi
2021-3-21 22:29:02

kellysmith12.21
2021-3-21 23:12:20

Is there a way to “lift” a binding from phase n to phase n + 1, other than requiring for-syntax?



kellysmith12.21
2021-3-22 03:45:58

I’m sorry, I’m having trouble figuring out how to use it so that I can use the binding at a higher phase.


kellysmith12.21
2021-3-22 03:46:39

An example, say there is (define fun ...), and I’d like to lift fun so that I can use it in a begin-for-syntax block.


kellysmith12.21
2021-3-22 03:51:29

Hm, it looks like I can take the entire definition form and lift it, but I can’t simply lift the variable.