Live data from Hacker News

Hexyl: A command-line hex viewer

github.com

61–70 of 119 posts

Re: Hexyl: A command-line hex viewer

#61
post #40

the author appears to be a true rust master, he wrote quite a few neat programs in rust, very impressive and that actually got me interested in rust lang

261 lines of Rust. Hot damn, I couldn't do it in Python.

As someone who is considering learning Rust, this may just have pushed me over the edge.

Re: Hexyl: A command-line hex viewer

#62
post #59

One ludicrous nitpick: the logo doesn't show anything hexyl, that's 1,2,3,5-tetramethylbenzene. If it was a functional group, it might be 3,4,5-trimethylbenzyl or something like that. Hexyl would look like: R \/\/\/

The logo shows a small part of this molecule: https://en.wikipedia.org/wiki/Hexanitrodiphenylamine

.. which is apparently also called "Hexyl". Granted, I was just looking for a short word that starts with "Hex" and I was never good at organic chemistry :-)

Re: Hexyl: A command-line hex viewer

#63
post #4
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!

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

It's illegible in my terminal. Not a fan of the trend to hardcoded unicorn vomit.

Re: Hexyl: A command-line hex viewer

#64
post #53
post #44

Sorry to ask, but what is he use case for a hex viewer like this? What are the kinds of projects you might be working on when you use something like this?

Your lab manager goes "hey, can you generate these proprietary binary files (currently made with a horrible gui) to control this robot programmatically".

But shouldn't one use an editor, like vim, in those cases?

Re: Hexyl: A command-line hex viewer

#66

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…

xxd is distributed with Vim.

I've never thought of xxd as being anything but a "Vim thing".

That it had its own history (1990-1998) before being pulled into Vim is a TIL for me.

Here you go:

https://github.com/vim/vim/tree/master/src/xxd

There might still be other versions of this out there, but I suspect most OS distros pick up xxd by way of packaging Vim.

So if you work on some other xxd, you're probably in a dead fork.

The man page is also from Vim:

https://github.com/vim/vim/blob/master/runtime/doc/xxd.1

My first patch to xxd, if I were to work on it, would be to fix the man page to indicate clearly that it's the xxd bundled with Vim.

Re: Hexyl: A command-line hex viewer

#68
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?

Because the author wanted to do his own, personal thing?

I get the idea behind your question, but it irks me a bit since it implies a sort of responsibility to contribute to an existing piece of software. This is a net positive of course, but the beauty of open source is the freedom to work on the things you want to work on.

Re: Hexyl: A command-line hex viewer

#69
post #7
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!

I have to admit, my first question in mind was how to disable colors because I do not use syntax highlighting at all.

Me neither.

I did use it religiously for a long, long time; then tried without for a week and never went back.

It's not like telling the difference between string literals and keywords was ever a major issue for me. I guess it could help short term when learning a new language, but I'm pretty sure it slows down overall progress.

Post reply on HN