Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
gnubison
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
13 ms
·
121.
▲
by
gnubison
5y ago
Redrawing a TUI from scratch is usually trivial . Certainly far simpler than your average GUI.
122.
▲
by
gnubison
5y ago
For others reading this, binding ^M and Ret separately will only work in a GUI, since they send vim the same bytes in a terminal.
123.
▲
by
gnubison
5y ago
The way I interpreted it was, “if ASCII will suffice, then use that.” In other words, use --- instead of —, " instead of “/”, and so forth. If you’re writing in a different language then obviously (at least to me) this advice doe
124.
▲
by
gnubison
5y ago
> what is the list of UB that nay professional C developer should be expected to know? Off the top of my head, as a non professional C programmer: - can’t read from uninitialized memory - one malloc = one free - signed overflow is undefi
125.
▲
by
gnubison
5y ago
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. Ne
126.
▲
by
gnubison
5y ago
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.
127.
▲
by
gnubison
5y ago
‘:!ctags -R’ and ‘:ta function’ (or ‘^]’ for the identifier under the cursor). Works well enough for me, even in Real Vi (TM).
128.
▲
by
gnubison
5y ago
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 w
129.
▲
by
gnubison
5y ago
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.
130.
▲
by
gnubison
5y ago
> 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
131.
▲
by
gnubison
5y ago
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).
132.
▲
by
gnubison
5y ago
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.
133.
▲
by
gnubison
5y ago
Busybox vi is definitely a thing … but even then it probably has ed.
134.
▲
by
gnubison
5y ago
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.
135.
▲
by
gnubison
5y ago
Because some of us enjoy the “dollhouses”…?
136.
▲
by
gnubison
5y ago
Gemini doesn’t aim to replace the web.
137.
▲
Fascinating Little Programs
(antirez.com)
4 points
by
gnubison
5y ago
|
0 comments
138.
▲
by
gnubison
5y ago
Have you used cat recently? [Edit: scrolled down, looks like several other people already beat me to it. Whoops.]
139.
▲
by
gnubison
5y ago
> 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 b
140.
▲
by
gnubison
5y ago
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.
141.
▲
by
gnubison
5y ago
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 tha
142.
▲
by
gnubison
5y ago
> 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 pa
143.
▲
by
gnubison
5y ago
> Our society very much puts a premium on protecting victims. … is this a bad thing?
144.
▲
by
gnubison
5y ago
> 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
145.
▲
by
gnubison
5y ago
Where does sed come into this?
146.
▲
by
gnubison
5y ago
> 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 u
147.
▲
by
gnubison
5y ago
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 f
148.
▲
by
gnubison
5y ago
Well, the real solution here is to set them in ~/.profile.
149.
▲
by
gnubison
5y ago
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.
150.
▲
by
gnubison
5y ago
> we will anyway need JS to convert the markdown to HTML. You could compile the markdown to HTML server-side …
More ›