I've since decided to stop developing the text editor, but a little now and then I went through my git history and found the correct commit where the binary viewer was still functional.
The idea was pretty simple, it took input in the form of
1 2 3 4 5 6 7 | struct Data { U32 magic; U32 size; I32 payload[64]; // Assuming size is 64 }; @0x00 Data |
and would output the data in the file, starting from 0x00, in a formatted way. As this was integrated in my text editor I would get (almost) instant preview when I made a change to the struct. So when I saw the I32 payload[64] actually had a size of 128, I could easily change it... but it got tedious.
Wouldn't it be nicer if I could write
1 2 3 4 5 6 7 | struct Data { U32 magic; U32 size; I32 payload[size]; }; @0x00 Data |
instead?
That's how BEdit started, an overgrown feature that proved more useful than the application I was developing. It has gone from nothing more than parsing a C-like type definition to running its own virtual machine.
It's not very often you deal with binary files, but even in its currently limited state I find it really nice to have when you just want to quickly double-check if that one flag is set.
I hope you enjoy it as well!