Re: [racket-users] Redirecting shared lib stdout

2021-05-14 Thread Sage Gerard
Ah, you're right. I'm still acclimated to BC here. Disregard! On 5/14/21 7:30 AM, Paulo Matos wrote: > > Sage Gerard writes: > >> I ran into this issue with rsound. I'm not sure how standard output can >> be directly captured from a lower-level language in a Racket context >> when that language

Re: [racket-users] Redirecting shared lib stdout

2021-05-14 Thread Paulo Matos
Sage Gerard writes: > I ran into this issue with rsound. I'm not sure how standard output can > be directly captured from a lower-level language in a Racket context > when that language can freely ignore the Racket printer and write > directly to STDOUT within the same operating system process.

Re: [racket-users] Redirecting shared lib stdout

2021-05-14 Thread Paulo Matos
Jon Zeppieri writes: > Can you use BinaryenModuleWriteText instead? It looks like it was > added to address your use case. -J Good point and nice catch. Although it doesn't solve the issue with racket it does provide a way out for me to create a safe binding for this function that works

Re: [racket-users] Redirecting shared lib stdout

2021-05-12 Thread Jon Zeppieri
Can you use BinaryenModuleWriteText instead? It looks like it was added to address your use case. -J On Wed, May 12, 2021 at 3:49 AM Paulo Matos wrote: > > Hi, > > I have a shared library for which I am creating some bindings: > https://github.com/pmatos/racket-binaryen > > There's a function

Re: [racket-users] Redirecting shared lib stdout

2021-05-12 Thread Sage Gerard
I ran into this issue with rsound. I'm not sure how standard output can be directly captured from a lower-level language in a Racket context when that language can freely ignore the Racket printer and write directly to STDOUT within the same operating system process. I'd hate to just add a "me

[racket-users] Redirecting shared lib stdout

2021-05-12 Thread Paulo Matos
Hi, I have a shared library for which I am creating some bindings: https://github.com/pmatos/racket-binaryen There's a function BinaryenModulePrint that prints a WebAssembly module to stdout. When I wrap it in racket, if I do something like: (define mod ...) (with-output-to-string (lambda ()