4 ms·
This is an extremely cool project, thank you for sharing! Edit: I'm not familiar with scheme/guile (only dabbled with Racket and later Clojure). Are these re
by dgb23 2y ago
This is an extremely cool project, thank you for sharing!
Edit:
I'm not familiar with scheme/guile (only dabbled with Racket and later Clojure).
Are these real bytes that behave like actual bytes when you manipulate their bits (unlike Java etc.) and are stored as actual bytes?
https://www.gnu.org/software/guile/manual/html_node/Bytevectors.html https://www.gnu.org/software/guile/manual/html_node/Bytevect...
- davexunit 2y agoYeah, bytevectors in Scheme are just some linear chunk of memory that you can get/set however you'd like. Funny that you mention this because this is actually another area where Wasm GC needs improvement. Hoot uses a (ref (array i8)) to store bytevector contents. However, Wasm GC doesn't provide any instructions for, say, interpreting 4 bytes within as a 32-bit integer. This is in contrast to instructions like i32.load that work with linear memory. The workaround for now is that you read 4 bytes, bit shift appropriately, and then OR them together. Wasm GC is fantastic overall but these little issues add up and implementers targeting GC feel like they're not on even footing with linear memory.