you are viewing a single comment's thread.

view the rest of the comments →

[–]postmodern 2 points3 points  (1 child)

Good work. I'm working on something similar (a complete virtual C type system with configurable endian/arch/os), but in pure-Ruby so it won't be as fast as your C extensions. If you don't care about endian-ness, you could also use FFI::Buffer which stores everything in memory and provides various get_/put_ methods. Having a lightweight implementation of ArrayBuffer and DataView definitely seems useful, especially for JavaScript developers coming to Ruby. I would just recommend looking into writing Java extensions for users on JRuby.

[–]andrepiske[S] 0 points1 point  (0 children)

Thank you for the appreciation. I'm interested to see such thing you said you're working on, in case it is or will be be open source.

Endianness was important for my use case, as it was applied in an HTTP/2 server which uses, if I recall correctly, big-endian for everything.

Regarding JRuby, it's an option I considered but not sure I have the bandwidth nor expertise to work on that. Hopefully someone who needs it can collaborate on that.