HN user

drougge

35 karma
Posts0
Comments21
View on HN
No posts found.

Those that have some git status information in their shell prompts should probably make sure they are not bitten by the same git issues. I currently have to following (zsh syntax) setup for that:

   git=(git -c core.hooksPath=/dev/null)
   fsmonitor=$($git config core.fsmonitor)
   if [[ -n $fsmonitor && $fsmonitor != true && $fsmonitor != false ]]; then
           git+=(-c core.fsmonitor=false)
           echo "Worrying git core.fsmonitor setting: $fsmonitor"
   fi

Probably inspired by Vinum's "NO FUTURE" for destructive operations. (Vinum was a raid system used on older versions of FreeBSD.)

This seems interesting, but I got stuck fairly early on when I read "all 32,385 possible input combinations". There are two 8 bit numbers, 16 totally independent bits. That's 65_536 combinations. 32_285 is close to half that, but not quite. Looking at it in binary it's 01111110_10000001, i.e. two 8 bit words that are the inverse of each other. How was this number arrived at, and why?

Looking later there's also a strange DAC that gives the lowest resistance to the least significant bit, thus making it the biggest contributor to the output. Very confusing.

I have a related complaint about modern consoles: They are frequently unreadable, because they just have to use all the pixels. I booted Debian (IIRC) on a laptop with a 13" 4K screen and got something like 426x135 characters. No chance for me to read them, but there sure were a lot of them. My eyes aren't the best, but I think most people would find that unreadable.

Defaulting to 80x25 (or anything else reasonable) in an almost infinitely ugly font would be a vast improvement.

One thing that really annoys me about the HTTP standards is that some older version used to say that text/* without a declared charset was definitely latin-1 (don't remember which version exactly). Then a later version said no, text/* without a declared charset is definitely utf-8. In practice I feel this means they said "not declaring a charset is definitely not ok", but in a way that no one will understand.

Possibly a newer version that I haven't read fixed how they said that. As long as I don't check I can hope.

Using "#!sh" at the top of the file does work, but not predictably. It may execute sh in your current directory, which is what Linux does, but your shell may override that (zsh does if the first attempt fails). So it works, but not the way you want it to.

And I'm sure other kernels do other things too.

I think it's worth pointing out that the example in the article contains a bug caused by not having shadowing: "const foo3 = try foo.addFeatureB();" should not be using the original foo, but foo2.

I have now found the documentation for ExecStop (in systemd.service(5)), which hopefully improves my understanding.

It definitely seems to be both "cause to stop" and "after (unexpected) stop" in one. You can look at $MAINPID to see which case you have. This design apparently makes sense to you, but to me and several others in this thread a service that has already stopped isn't in need of being stopped and shouldn't execute commands intended for that. (There is a separate ExecStopPost for "after stopping, for any reason".)

The name sounds like it means "this is how I want you to cause the service to stop" to me (and clearly to others as well). That would be symmetrical with ExecStart meaning "this is how I want you to cause the service to start". If it runs after the service stopped it should be called "ExecAfterStop" or something like that.

VGA is much easier to produce, and the RP2040 can do 1280x1024@60 no problem. The official examples use several clock cycles per pixel (2 IIRC, but it might be even more), but you don't have to.

I made half a terminal with that output, aiming for something that ran the original VT100 ROM. I never finished the emulator part, but I did write video output (including scan line emulation) for VT100 memory -> VGA. Adding SSH once the rest works should be perfectly possible. (Not bit banging ethernet at the same time, but using some external chip.)

I should probably put that online somewhere. Or finish it and then put it online.

I have felt for a long time that this half closed state was a mistake. It fails to match naive expectations and can be hard to handle correctly even if you know about it. And as far as I can see there is no real benefit to having it. Is there some real use case for it (i.e. not just a minor convenience)?

I consider myself an old unix person, but I use dc. Possibly to make it more confusing to anyone who looks at what I'm doing.

It also gives the math result here of course.

  % dc
  9999999999999999.0 9999999999999998.0 - p
  1.0
  %

These modern useless scrollbars really anger me.

I can theme some things (unless some modern packaging tech makes the app ignore my theme), I can make the ones in Firefox usable but ugly (with widget.gtk.overlay-scrollbars.enabled and widget.non-native-theme.scrollbar.style), and so on. But I can see where we are heading. Scrollbars are one of many UI features that were too useful, so they must be destroyed.

I did not expect to feel so old at such a young age.

His mention of Google also links to DDG, so I think it's all intentional. Possibly because the modern word for searching the internet is "to google".

I'm someone who likes to use fork() and then actually use both processes as they are, with shared copy-on-write memory. I'm happy to use it on things consuming much more than 100MB of memory. In fact that's where I like it the most. I'm probably a terrible person.

But what would be better? This way I can massage my data in one process, and then fork as many other processes that use this data as I like without having to serialise it to disk and and then load it again. If the data is not modified after fork it consumes much less memory (only the page tables). Usually a little is modified, consuming only a little memory extra. If all of it is modified it doesn't consume more memory than I would have otherwise (hopefully, not sure if the Linux implementation still keeps the pre-fork copy around).

(And no, not threads. They would share modifications, which I don't want. Also since I do this in python they would have terrible performance.)

Colon is the correct separator there. Semicolon separates different instructions, a group of values that is a single instruction is colon separated. For example \e[38:5:196;1m specifies red and bold.

Using ";" is popular, and some parsers even require it, but it makes little sense. A terminal that doesn't know about 38 (anything old) will interpret that 5 as blink if you use ";", which is not what anyone wants.