Interested in a port of Ruby's String#unpack
Hey Everyone: I'm working on a project in Clojure that involves parsing binary data files. Specifically, I'm building a tool for analyzing Redis (http:// redis.io) dump files (.rdb format). The very beginnings of this nascent project are here: http://github.com/mrb/pianist . I am a beginner to Clojure and Lisp in general, but I'm a long time Ruby programmer with experience in C, Java, etc. During the course of working through some Clojure learning materials and general poking around the web and #clojure in IRC, I've noticed that one of my favorite tools for working with binary data from Ruby is missing in the Java/Clojure world. This is String#unpack: http://www.ruby-doc.org/core-1.9.3/String.html#method-i-unpack After a brief Twitter conversation with @abedra, and while I get the chance to submit my contributors agreement in order to access Clojure- dev, I thought I'd bring this topic up here. For what it's worth, I've checked out Gloss, which is interesting but a bit too opinionated for me. Plus I believe that something to this effect should be part of clojure core - it seems that easy interface for lazily handling binary data as seqs doesn't exist as such right now. If anyone has comments on the beginnings of my codebase (be gentle), or thoughts about implementing something similar to String#unpack, or a suggestion of an alternative set of tools I could use, that would be great. Thanks! Mike twitter.com/mrb_bk github.com/mrb -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Interested in a port of Ruby's String#unpack
I also thought I would mention that I've been hanging out in #clojure as mrb_bk - please hit me up if you would like to chat about this. On Dec 26, 10:08 am, mrb_bk wrote: > Hey Everyone: > > I'm working on a project in Clojure that involves parsing binary data > files. Specifically, I'm building a tool for analyzing Redis (http:// > redis.io) dump files (.rdb format). The very beginnings of this > nascent project are here:http://github.com/mrb/pianist. I am a > beginner to Clojure and Lisp in general, but I'm a long time Ruby > programmer with experience in C, Java, etc. During the course of > working through some Clojure learning materials and general poking > around the web and #clojure in IRC, I've noticed that one of my > favorite tools for working with binary data from Ruby is missing in > the Java/Clojure world. This is String#unpack: > > http://www.ruby-doc.org/core-1.9.3/String.html#method-i-unpack > > After a brief Twitter conversation with @abedra, and while I get the > chance to submit my contributors agreement in order to access Clojure- > dev, I thought I'd bring this topic up here. > > For what it's worth, I've checked out Gloss, which is interesting but > a bit too opinionated for me. Plus I believe that something to this > effect should be part of clojure core - it seems that easy interface > for lazily handling binary data as seqs doesn't exist as such right > now. > > If anyone has comments on the beginnings of my codebase (be gentle), > or thoughts about implementing something similar to String#unpack, or > a suggestion of an alternative set of tools I could use, that would be > great. Thanks! > > Mike > twitter.com/mrb_bk > github.com/mrb -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Interested in a port of Ruby's String#unpack
This looks great, take-ubyte is basically exactly what I needed. I'll let you know if it works when I try it out this afternoon -- not sure what kind of work needs to be done to bring it up to date. On Dec 27, 1:03 am, Geoff Salmon wrote: > Hi, does the unpack function in this library do what you're looking > for?https://github.com/geoffsalmon/bytebuffer > It unpacks values from Java's ByteBuffer objects instead of strings, > which seemed more appropriate in Java-land. > > I haven't touched the code since Clojure 1.2, but if it looks useful I > can try to bring it up to date. > > - Geoff > > On Dec 26, 10:03 pm, mrb_bk wrote: > > > > > > > > > I also thought I would mention that I've been hanging out in #clojure > > as mrb_bk - please hit me up if you would like to chat about this. > > > On Dec 26, 10:08 am, mrb_bk wrote: > > > > Hey Everyone: > > > > I'm working on a project in Clojure that involves parsing binary data > > > files. Specifically, I'm building a tool for analyzing Redis (http:// > > > redis.io) dump files (.rdb format). The very beginnings of this > > > nascent project are here:http://github.com/mrb/pianist. I am a > > > beginner to Clojure and Lisp in general, but I'm a long time Ruby > > > programmer with experience in C, Java, etc. During the course of > > > working through some Clojure learning materials and general poking > > > around the web and #clojure in IRC, I've noticed that one of my > > > favorite tools for working with binary data from Ruby is missing in > > > the Java/Clojure world. This is String#unpack: > > > >http://www.ruby-doc.org/core-1.9.3/String.html#method-i-unpack > > > > After a brief Twitter conversation with @abedra, and while I get the > > > chance to submit my contributors agreement in order to access Clojure- > > > dev, I thought I'd bring this topic up here. > > > > For what it's worth, I've checked out Gloss, which is interesting but > > > a bit too opinionated for me. Plus I believe that something to this > > > effect should be part of clojure core - it seems that easy interface > > > for lazily handling binary data as seqs doesn't exist as such right > > > now. > > > > If anyone has comments on the beginnings of my codebase (be gentle), > > > or thoughts about implementing something similar to String#unpack, or > > > a suggestion of an alternative set of tools I could use, that would be > > > great. Thanks! > > > > Mike > > > twitter.com/mrb_bk > > > github.com/mrb -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en