Live data from Hacker News

Hexyl: A command-line hex viewer

github.com

21–30 of 119 posts

Re: Hexyl: A command-line hex viewer

#22
post #3

I admit, my first thought on seeing the title was "What's wrong with xxd?" This is nice! I like the colorization a lot -- it's like with source code, you don't realize how much you rely on the colors until you get a new computer and need to download syntax definitions for your editor again. Only feature I really think is missing is line numbers. Nicely done!

Looks like the screenshots on Github are outdated. I just ran it locally and it does print out offsets in a new left-most column.

edit: Added in this commit: https://github.com/sharkdp/hexyl/commit/91a119f4537f746045c8...

Re: Hexyl: A command-line hex viewer

#28

I use hexer for this, which is an editor too. http://blog.metaclassofnil.com/?p=757 There's also a vim mode for hex, which I use less often: https://vi.stackexchange.com/questions/2232/how-can-i-use-vi...

One of the problems with vim+xxd (and many other hex editors) is that it loads the entire file, so you can't easily use it to look at large files (archives, disk images, etc).

Many moons ago I wrote a very bare bones ncurses hex viewer/editor, after not really being able to find one that fit my needs. I still use it pretty regularly: https://github.com/quo/hex.py

Re: Hexyl: A command-line hex viewer

#29
post #4

Earlier quoted context omitted.

haha, had exactly the same thoughts. the colours really makes it much much easier on the eyes to recognise things. well done!

Same thought except, I wonder why this isn’t a patch to xxd?

I'm struggling to even find the canonical source code for xxd, let alone a way to provide a patch. You could probably email the address in the man page, but that's from 1997 so I wouldn't be too optimistic about getting a response. And even then it's quite likely that the original author considers xxd finished and would be reluctant to accept patches for it anyway. On top of all that the hard part of this work (cross-platform terminal colours) had already been done for the author, so the implementation was probably far easier than adding colour output to xxd would have been.
Post reply on HN