laurent.orseau
2020-11-25 10:14:23

@jbclements rsound seems to be looking in the wrong place on my system (Ubuntu 20.04): $ racket Welcome to Racket v7.9.0.3 [cs]. > (require rsound) ; ffi-lib: could not load foreign library ; path: callbacks.so ; system error: callbacks.so: cannot open shared object file: No such file or ; directory Although portaudio is installed: $ locate callbacks.so /home/laurent/.racket/snapshot/pkgs/portaudio/portaudio/lib/i386-linux/3m/callbacks.so /home/laurent/.racket/snapshot/pkgs/portaudio/portaudio/lib/x86_64-linux/3m/callbacks.so I tried to see where in rsound this is requested but didn’t find a relevant line


laurent.orseau
2020-11-25 11:16:36

Found it! The embedded libraries are only in the 3m path, but i’m on CS. Changing the 3m to cs in the path above worked for me.


laurent.orseau
2020-11-25 11:18:27

Same thing with buffer-add.so. I’ll post an issue on both portaudio and rsound


laurent.orseau
2020-11-25 15:52:37

~Could there be a reason making (flush-output) not flush immediately to disk in a single-threaded program? (linux)~


laurent.orseau
2020-11-25 15:56:00

It’s in the middle of a compute-heavy loop. Any way to actually force a flush?


laurent.orseau
2020-11-25 17:05:15

Can I assume that (current-memory-use) is only a lookup operation? (i.e., no time-consuming computation)


laurent.orseau
2020-11-25 17:05:55

samth
2020-11-25 17:31:51

Note that if you have errortrace enabled, you can get better context information via continuation marks.


samth
2020-11-25 17:34:19

The reason that contract-out and define/contract differ here is that define/contract creates a contract between the immediate context and the value being defined, not between the value and the place the value is used.


samth
2020-11-25 17:35:52

You could imagine a version of define/contract that worked somewhat like contract-out, and there are easier and harder ways to do that. If you wanted the easy-but-inefficient way, just making it a macro that expands to a use of contract would be simple.


samth
2020-11-25 17:56:48

Also I see the same error messages with ->i when I test it out:


samth
2020-11-25 17:56:53

[samth@huor:~/sw/plt (master) plt] r /tmp/b.rkt f: contract violation expected: number? given: "x" in: the x argument of (->i ((x number?)) (res (x) (>/c x))) contract from: (/tmp/b.rkt m1) blaming: /tmp/b.rkt (assuming the contract is correct) at: /tmp/b.rkt:4.26 context...: /home/samth/sw/plt/racket/collects/racket/contract/private/blame.rkt:347:0: raise-blame-error /home/samth/sw/plt/racket/collects/racket/contract/private/arr-i.rkt:976:19: /tmp/b.rkt:4:28 body of "/tmp/b.rkt" [samth@huor:~/sw/plt (master) plt] r /tmp/b.rkt g: contract violation expected: number? given: "x" in: the 1st argument of (-> number? number?) contract from: (/tmp/b.rkt m1) blaming: /tmp/b.rkt (assuming the contract is correct) at: /tmp/b.rkt:5.26 context...: /home/samth/sw/plt/racket/collects/racket/contract/private/blame.rkt:347:0: raise-blame-error /home/samth/sw/plt/racket/collects/racket/contract/private/arrow-val-first.rkt:486:18 body of "/tmp/b.rkt"


rokitna
2020-11-25 18:00:40

oh, hmm, I may have misremembered. I’ll pay some more attention in the future in case there’s something else going on (or in case I made it up)


rokitna
2020-11-25 18:01:06

thank you for checking


laurent.orseau
2020-11-25 19:32:15

Yes, turns out there’s one good reason: Placing it at the wrong place and keeping believing it’s at the right place when reading the code…


mflatt
2020-11-25 19:40:15

Yes, it’s fast.


laurent.orseau
2020-11-25 20:41:59

Fantastic, thanks


plragde
2020-11-26 02:42:52

I use it for course Web pages, textbooks that I write, and slides for presentation.


kellysmith12.21
2020-11-26 05:44:10

What is the correct way to disable certain syntax, if there’s no reader parameter for it? For example, if I wanted to disable prefab struct syntax?