News for hackers. Stuff that matters.
Re:Show HN: I made a Chrome extension to reveal zero-width c... by TheAceOfHearts on Wednesday April 04, 2018 @12:12PM (#16756114)
A bit tangential, here's a few unix utils you can use to inspect text:

`vis`: display non-printable characters in a visual format

`cat -e`: Display non-printing characters and display a dollar sign (`$') at the end of each line.

`hexdump -c`: Display the input offset in hexadecimal, followed by sixteen space-separated, three column, space-filled, characters of input data per line.

`od -a`: Output named characters.

Re:Show HN: I made a Chrome extension to reveal zero-width c... by LVB on Wednesday April 04, 2018 @01:43PM (#16757063)
Further tangent: a colleague and I talked about creating a derivative of one of the programmer fonts, replacing smart/curly quotes and another such nuisances with unmistakeable indicators.
Re:Show HN: I made a Chrome extension to reveal zero-width c... by sharpercoder on Wednesday April 04, 2018 @01:54PM (#16757180)
This would be a useful feature for any programming font. I can totally imagine writing exploits through zero-width characters; smart insertion into interpreted strings (scanners/parsers) can potentially insert a security leak by an attacker. Though input can come from many places off course, this would at least make one vector visible.
Re:Show HN: I made a Chrome extension to reveal zero-width c... by peteretep on Thursday April 05, 2018 @12:25AM (#16761758)
You could probably just invert any non-ASCII character, and you could probably do this programmatically over an existing font.
Re:Show HN: I made a Chrome extension to reveal zero-width c... by cyphar on Wednesday April 04, 2018 @01:16PM (#16756817)
> `vis`: display non-printable characters in a visual format

Or `cat -v`, the namesake of http://cat-v.org/. :P

Re:Show HN: I made a Chrome extension to reveal zero-width c... by logicallee on Wednesday April 04, 2018 @01:45PM (#16757098)
what is cat-v.org? (Obviously I visited that link, read the about page - I'm asking for your summary. it's still not clear to me after my initial visit.)
Re:Show HN: I made a Chrome extension to reveal zero-width c... by scbrg on Wednesday April 04, 2018 @01:52PM (#16757165)
I'm sure there are better people to answer this question, but cat-v.org is the personal blog & collection of interesting stuff by former plan9 personality uriel (sadly no longer with us). It hosts random thoughts and lots of interesting stuff (including man pages) about plan9 and early unix systems, and miscellaneous other unix trivia.

It really is a treasure. Take the time to browse, it's well worth it if you're somewhat interested in unix history and not overly familiar with the subject already.

Re:Show HN: I made a Chrome extension to reveal zero-width c... by logicallee on Wednesday April 04, 2018 @02:04PM (#16757286)
Thank you, I found your summary helpful and yes I will look through it.
Re:Show HN: I made a Chrome extension to reveal zero-width c... by gkya on Wednesday April 04, 2018 @04:15PM (#16758583)
Nostalgic Unix nerds hating on everything that (i) was not in original Unix, or (ii) in Plan9, or (iii) not implemented by authors of these.
Re:Show HN: I made a Chrome extension to reveal zero-width c... by Volt on Wednesday April 04, 2018 @10:35PM (#16761325)
Cynical and disingenuous.
Re:Show HN: I made a Chrome extension to reveal zero-width c... by B1FF_PSUVM on Thursday April 05, 2018 @05:03AM (#16763114)
Bitterly invidious Lisp nerd?

(They give off rays or something ... took a cursory look to see if I was being unfair, and booom - https://www.gkayaalp.com/blog/20170206_emacs-argument.html )

Re:Show HN: I made a Chrome extension to reveal zero-width c... by gkya on Thursday April 05, 2018 @07:27AM (#16763768)
Yeah that's me :) At least the second part, because with Emacs I don't really need to be invidious.

TBH I do actually like Unix and Plan9, but having read a big part of cat-v website in the past, most of the views there are fanatical, and are more bitter, cynical and disingenuous than I can ever force myself to be. Especially the way incredibly useful and important OSS projects are denigrated and misrepresented is really annoying (see the harmful stuff section, for example).

Re:Show HN: I made a Chrome extension to reveal zero-width c... by B1FF_PSUVM on Friday April 06, 2018 @04:08AM (#16771731)
Well, I apologize and withdraw the 'bitterly invidious', you aren't.

One part is a matter of taste, and having been around both styles, I like better the 'keep it simple' approach. Too many functions/options overload my simple brain ;-)

Re:Show HN: I made a Chrome extension to reveal zero-width c... by Flimm on Thursday April 05, 2018 @05:06AM (#16763126)
Do you have any useful commands like these that can handle multi-byte characters in UTF-8? For instance, handling the zero-width space U+200B, which in UTF-8 takes up more than one byte. I've got some custom scripts that do, I was wondering if there was already something out there.
Re:Show HN: I made a Chrome extension to reveal zero-width c... by wpietri on Wednesday April 04, 2018 @02:02PM (#16757264)
Ooh! I adore `od`, and know too many options for it. But I didn't know about the others. Thanks!

I'll also add my favorite companion to `od` and hexdumps: `man ascii`.

P.S. May we please have a basic Markdown parser for HN?

Re:Show HN: I made a Chrome extension to reveal zero-width c... by pavelbr on Wednesday April 04, 2018 @12:16PM (#16756171)
Is `hexdump` not `xxd`?
Re:Show HN: I made a Chrome extension to reveal zero-width c... by lainga on Wednesday April 04, 2018 @12:58PM (#16756606)
`hexdump` is part of util-linux, `xxd` is not. They do the same thing though, up to formatting differences.
Re:Show HN: I made a Chrome extension to reveal zero-width c... by dotancohen on Wednesday April 04, 2018 @01:14PM (#16756798)
And on Debian it's called `hd`.
Re:Show HN: I made a Chrome extension to reveal zero-width c... by gkya on Wednesday April 04, 2018 @04:16PM (#16758599)
xxd is part of vim IIRC.
Re:Show HN: I made a Chrome extension to reveal zero-width c... by na85 on Wednesday April 04, 2018 @11:05PM (#16761457)
Re:Show HN: I made a Chrome extension to reveal zero-width c... by gkya on Thursday April 05, 2018 @09:40AM (#16764790)
Yep:

  $ apt-cache show xxd | grep Source:
  Source: vim (2:8.0.1453-1)
  Source: vim
Re:Show HN: I made a Chrome extension to reveal zero-width c... by na85 on Thursday April 05, 2018 @11:23AM (#16765729)
Oh I must've misunderstood what you meant by "part of" vim.
Re:Show HN: I made a Chrome extension to reveal zero-width c... by agumonkey on Wednesday April 04, 2018 @01:40PM (#16757039)
and under emacs whitespace-mode (just in case)