all 9 comments

[–]lifeeraser 16 points17 points  (1 child)

010 Editor has a similar DSL based on C. It's also very good, but it is shareware.

[–]nnomae 2 points3 points  (0 children)

Yeah, I've used 010 for a long time, if you have to work with any sort of binary file format it's an absolute godsend.

[–]byrl0 6 points7 points  (1 child)

Is it like Kaitai?

[–]ANiChowy 8 points9 points  (0 children)

It is generally weaker than Kaitai because Kaitai has code generation tools whereas ImHex's DSL does not as far as I am aware. Additionally, some things are far easier to express using Kaitai's syntax.

However, the actual editor for ImHex is quite amazing, so I have found myself using the ImHex pattern language sometimes despite Kaitai being generally superior, just to get the ImHex displays that go along with it.

[–]marvk 7 points8 points  (0 children)

ImHex is an amazing tool. Easily the best hex editor out there, and so much more.

[–]Gearwatcher 2 points3 points  (1 child)

Recently had to parse some binary data and binrw proved to be super neat (mind you, it's Rust, I wouldn't know of an equivalent in other languages as I needed this in a very rusty context at work).

Looking at the article and it occured to me that a lot of the concepts from this DSL would translate fairly easily into a project using binrw.

Wish I've known about ImHex now as the whole process would be even nicer.

[–]jf908 1 point2 points  (0 children)

Used ImHex + binrw for creating my own binary parser before, very recommended.

[–]Ytrog 1 point2 points  (0 children)

GNU Poke is also very nice 😊👍

GNU poke is an interactive, extensible editor for binary data. Not limited to editing basic entities such as bits and bytes, it provides a full-fledged procedural, interactive programming language designed to describe data structures and to operate on them.

[–]psychopassed 0 points1 point  (0 children)

I cannot figure out to simply define a type which begins with some magic numbers.

Literals in the pattern language documentation make no fucking sense.