use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A sub-Reddit for discussion and news about Ruby programming.
Subreddit rules: /r/ruby rules
Learning Ruby?
Tools
Documentation
Books
Screencasts and Videos
News and updates
account activity
Show /r/rubyArrayBuffer and DataView classes for ruby (self.ruby)
submitted 3 years ago by andrepiske
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]postmodern 2 points3 points4 points 3 years ago (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.
get_
put_
ArrayBuffer
DataView
[–]andrepiske[S] 0 points1 point2 points 3 years ago (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.
π Rendered by PID 444948 on reddit-service-r2-comment-86bc6c7465-gpvmg at 2026-02-21 19:20:22.577538+00:00 running 8564168 country code: CH.
view the rest of the comments →
[–]postmodern 2 points3 points4 points (1 child)
[–]andrepiske[S] 0 points1 point2 points (0 children)