Live data from Hacker News

Hexyl: A command-line hex viewer

github.com

31–40 of 119 posts

Re: Hexyl: A command-line hex viewer

#31

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...

There's hexl-mode for emacs that's pretty cool as well:

https://www.gnu.org/software/emacs/manual/html_node/emacs/Ed...

Re: Hexyl: A command-line hex viewer

#34
post #6

While reading this my hope was it not being written in JavaScript. I'm not disappointed ;)

It's comparably slow though :p

    xxd `which hexyl` > /dev/null  0.12s user 0.09s system 99% cpu 0.219 total
    hexdump `which hexyl` > /dev/null  0.19s user 0.05s system 91% cpu 0.256 total
    hexyl `which hexyl` > /dev/null  1.69s user 0.39s system 95% cpu 2.175 total

Re: Hexyl: A command-line hex viewer

#35
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!

Liked that though the boxes seem to be a distraction. Perhaps they could use the dim ansi code or be turned off.

Re: Hexyl: A command-line hex viewer

#38
post #6

While reading this my hope was it not being written in JavaScript. I'm not disappointed ;)

It's comparably slow though :p xxd `which hexyl` > /dev/null 0.12s user 0.09s system 99% cpu 0.219 total hexdump `which hexyl` > /dev/null 0.19s user 0.05s system 91% cpu 0.256 total hexyl `which hexyl` > /dev/null 1.69s user 0.39s system 95% cpu 2.175 total

It takes a second to compute all that color. Nice tool though - but what I would really like to see is a --color argument added to xxd as well, as I'll probably forget about hexyl down the line and start looking for xxd again (which is conveniently already installed on most *nix systems).

Re: Hexyl: A command-line hex viewer

#39

Earlier quoted context omitted.

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…

Cross-platform terminal coloring was solved in the 1980s with termcap and then terminfo, for every terminal that's even come close to seeing mainstream use and which had colors in the first place. The libraries are part of the ncurses library and are shipped with every OS this stuff would build on to begin with.

This also solves the problem of moving the cursor and drawing a screen in general.

Post reply on HN