HNHacker News
TopNewBestAskShowJobs

gnubison

340 karma · joined December 6, 2020

submissionscomments
gnubison··on Who Says C is Simple?
This feels like one of those “you’re a fan of X? Name every Y” memes. If someone has some examples that a reasonable person would write, specifically examples that look like the simplest way to do something, then I’d love to hear them. Negative shifts and infinite loops with counters are just not things you normally encounter.
gnubison··on MDN Redesign
Damn, it sure would be terrible to keep the UI the same even when the users say it’s, you know, fine the way it is. Ugh.
gnubison··on Vim – Minimal Setup Explained
‘:!ctags -R’ and ‘:ta function’ (or ‘^]’ for the identifier under the cursor). Works well enough for me, even in Real Vi (TM).
gnubison··on I collect and read old computer manuals
On a BSD, try ‘man -Otag=l ls’ or ‘:tl’ (from less) for e.g. ls -l. This also works for larger man pages: ‘man -Otag=OCRNL termios’. More specifically, this requires the mandoc man implementation, which is also available on Linux — it’s what I prefer for all my machines.

tl;dr: it’s groff(1), not the -man and -mdoc formats, which is primitive (in this sense).

gnubison··on Frawk: A fast, JITted, statically-typed AWK written in Rust
If you’re writing the kind of script that should be written in Awk, then the upsides will far outweigh that downside. Awk is not designed for 500-line, 50-function scripts, it’s designed for 50-line, 1- or 2- function scripts.
gnubison··on On iPhone sideloading: it’s ok, I’m changing my mind
> such as a real Unix shell with native code compilers

??? macOS does have a real Unix shell. It’s called zsh. And it’s not that hard to get whatever compilers you want.

Shells are not the entire UNIX environment, they’re just one part of it. (And I don’t think you meant it this way, but please don’t say it’s not a “Unix shell” because it doesn’t have GNU extensions.)

gnubison··on CR+LF Has a Long History
For the record, ONLRET is the relevant flag and you can disable it with “stty -onlret”. Then output newlines will stay newlines (which typically results in bizarre behavior if those raw newlines are sent to a terminal).
gnubison··on Handling argc==0 in the Linux kernel
argc==0 is a well known part of the API, even if not everyone handles it correctly. I guarantee that >95% of kernel developers (if not 100% of them) understand this design and its flaws.
gnubison··on Late career Unix engineers refuse to concede on decades long debate
Busybox vi is definitely a thing … but even then it probably has ed.
gnubison··on Why and How I Got My Own ASN
This is usually the case for people who’ve been running them since the 90s because of IP address trust and all that, as far as I can tell.
gnubison··on The old internet shows signs of quietly coming back
Because some of us enjoy the “dollhouses”…?
gnubison··on Gemini is Solutionism
Gemini doesn’t aim to replace the web.
gnubison··on Kakoune Code Editor
Have you used cat recently? [Edit: scrolled down, looks like several other people already beat me to it. Whoops.]
gnubison··on Kakoune Code Editor
> is when I accidentally click in the terminal, which was going to mess me up with any editor.

Well, most terminal editors don’t capture the mouse at all — this is what I personally prefer (let the terminal emulator handle it) and as a bonus it fixes this problem.

gnubison··on Rich: A Python library for rich text and formatting in the terminal
Exact same thing happened to me. At one point I tried out not even including $(pwd) in the prompt, and … turns out it actually works fine.
gnubison··on Most Important Linux Commands Cheatsheet
Pedantic-er note: ^D isn’t necessarily the VEOF character — you can change it with tcsetattr() after modifying termiosp->c_cc[VINTR] or by using stty(1). And it doesn’t send an “EOF character” (EOF is a condition/convention more than a character). All it does is make read(2) return immediately with whatever data is currently in the line buffer. You can try it now:

    $ cat
    something^Dsomething^D
    $ cat
VEOF causes the tty driver (tty(4)) to send “something” to cat immediately; and cat echoes that back out to the terminal as intended.

If there’s nothing in the line-buffer (because you pressed VEOF at the start of the line) then read(2) returns 0, which is interpreted as an end-of-file condition by your libc in fread() and friends.

You can checkout OpenBSD’s termios(4) for a more detailed explanation :)

gnubison··on The burden of an Open Source maintainer
> why don't you stop maintaining those projects if you can't do it properly?

Well, perhaps they are doing it properly, and everyone else has the wrong definition of “proper”. Good stewardship does not mean accepting every patch and every new feature.

gnubison··on Dev corrupts NPM libs 'colors' and 'faker', breaking thousands of apps
> Our society very much puts a premium on protecting victims.

… is this a bad thing?

gnubison··on Dev corrupts NPM libs 'colors' and 'faker', breaking thousands of apps
> Eg. Perhaps he would have been able to change the license and demand compensation from all non-profits? That would provide both cash and publicity.

Then everyone would use the old code under the old license and he’d have even less of a chance to get funding.

gnubison··on Why “process substitution” is a late feature in Unix shells
Where does sed come into this?
gnubison··on Why “process substitution” is a late feature in Unix shells
> Can you please cite examples? I've never seen any software do that.

Well, almost no one actually says “input is read from fd 0 (stdin) and 4”, for example. Generally you say “input is read from file1 and file2”, and then the user can pass “/dev/fd/0 /dev/fd/4” as arguments. This copes better when the parent process doesn’t want to close any of its inherited file descriptors.

gnubison··on Vim prank: alias vim='vim -y'
Regular SIGINT will probably do the same thing (or SIGQUIT) if that doesn’t work. It’s absurdly easy to create software that misbehaves after a ‘kill -9’, because the only real use for it is 60 seconds after starting the shutdown process for the rare program that just won’t exit.
gnubison··on Vim prank: alias vim='vim -y'
Well, the real solution here is to set them in ~/.profile.
gnubison··on Consuming Articles Offline
I’m sure you’ve already heard of this, but for anyone who hasn’t: check out Gemini, a protocol and format (gemtext) that might appeal to users with this philosophy.
gnubison··on Entire website in a single HTML file
> we will anyway need JS to convert the markdown to HTML.

You could compile the markdown to HTML server-side …

gnubison··on Entire website in a single HTML file
Do you think you could elaborate on how this works? It seems like a very ergonomic alternative to traditional footnotes.
gnubison··on Fq: Jq for Binary Formats
Interesting project. Unfortunate that its name conflicts with one of nq’s executables (https://github.com/leahneukirchen/nq), but I’m not sure anything can be done about it.
gnubison··on Windows 11 Officially Shuts Down Firefox’s Default Browser Workaround
…you know that there are more than three operating systems, right…?
gnubison··on The growth of command line options, 1979-Present (2020)
None of them should respect IFS — that’s only for the shell.
gnubison··on Some thoughts on writing
Is this really your only takeaway? I agree, defining the acronym would be nice, but certainly it’s not infuriating.
← PreviousPage 5 of 8Next →