HNHacker News
TopNewBestAskShowJobs

gloria_mundi

45 karma · joined September 12, 2022

submissionscomments
gloria_mundi··on On Rendering Diffs
I don't understand the point of the inverse sticky technique. Scrolling too fast still breaks the experience (content refuses to scroll), and in a way that, at least to me, feels more disruptive than blanking for a fraction of a second. I might just be too used to blanking.

Also ... shouldn't browsers just be able to render the diff without any of the trickery? Is the browser's job actually that hard for long pages, or are they just not optimising for this? Or is there some other reason for the virtualisation (e.g. memory usage)?

gloria_mundi··on Show HN: Outperforming VByte for Large Integers Using Phi-Encoding
I haven't read all of that, but the problem at hand seems significantly less complicated.

We're mapping the numbers from 1 to 1000 to distinct numbers up to 8258, and the README claims that we should expect 2.1% of the resulting numbers to be prime. I see no reason for this claim, and as I understand it, the 2.1% comes from pi(1000) / 8258, which seems like nonsense to me.

gloria_mundi··on Show HN: Outperforming VByte for Large Integers Using Phi-Encoding
I'm not sure I understand the prime density thing. Of the numbers up to 8258, about 12.5% are prime. Accounting for the fact that about a quarter of these primes ends in 101, i.e. cannot occur, I would expect about 10.7% = 12.5% * (3/4) / (7/8), which is fairly close to the observed 9.4%.

The 2.1% in the README seems to be the density of primes < 1000 among numbers up to 8258. That's not what was counted.

gloria_mundi··on Functional languages should be so much better at mutation than they are
Remember that transformers are "inside-out", i.e. `StateT (ExceptT e m) a` is isomorphic to `m (Except e (State a))`. If we want to keep state if an exception occurs, you need a `m (State (Except e a))` which is `ExceptT e (StateT m) a`.
gloria_mundi··on Functional languages should be so much better at mutation than they are
Isn't mixing of effects exactly what monad transformers are for? AFAICT you want an `ExceptT e ST` for some exception type `e`.

https://hackage.haskell.org/package/mtl-2.3.1/docs/Control-M...

gloria_mundi··on Amber: Programming language compiled to Bash
Both, since a transpiler is a type of compiler.
gloria_mundi··on Solving the minimum cut problem for undirected graphs
Not actually all-pairs max flow, you can fix the source and consider all possible sinks. In the AoC problem we also know that the min-cut is 3, so we can abort the flow algorithm as soon as we have found a 4-flow.
gloria_mundi··on Show HN: Purl – A Simple Tool for Text Processing
grep doesn't eat the colours, apt detects that it is not outputting to a TTY and suppresses the colours. Try `printf 'a \e[36mb\e[0m c\n' | grep a`, the colour is preserved just fine.

Some tools have an option to force coloured output regardless, e.g. GCC's `-fdiagnostics-color` or grep's own `--colour=always`, but apt doesn't seem to have anything like that.

In theory one could have a command in the style of nohup or stdbuf which sets up a PTY to trick the command into outputting colours. So one could run `fakepty apt search whatever | grep another` ...

gloria_mundi··on British Placename Mapper
Recently came across something similar for Germany, although less versatile: https://dfiuhsfdfiu.neocities.org/
gloria_mundi··on British Placename Mapper
Some switch around the "s" and "sh" sounds, so it is pronounced roughly like "shtratsiatella". "st" at the beginning of a word is pronounced as "sht" in German.
gloria_mundi··on Decimal Time
The International Fixed Calendar: https://en.wikipedia.org/wiki/International_Fixed_Calendar
gloria_mundi··on Nature: Programming language to experience the joy of programming
It is, of course, still freely available if you plug the title into your favourite search engine.

From the US Defense Technical Information Center: https://apps.dtic.mil/sti/tr/pdf/AD0296046.pdf

Also in the Internet Archive: https://archive.org/details/DTIC_AD0296046

The mentioned quote is on page 22.

gloria_mundi··on An INI Critique of TOML (2021)
Unicode is useful for languages other than English, and has nothing to do with anyone's libido.
gloria_mundi··on Show HN: exaequOS - a new OS running in a web browser
Note that there's also a /usr/bin, with complete GNU coreutils (or at least most of them), and vim.
gloria_mundi··on Carrefour puts ‘shrinkflation’ price warnings on food to shame brands
They also got the conversion wrong: 1.5 liters is 0.4 gallons, not 0.3.
gloria_mundi··on Asteroid crater 520km in diameter buried in southeast Australia, scientists say
Another related Trek episode - the one I expected you to link: VOY's "Distant Origin" - https://wikipedia.org/wiki/Distant_Origin
gloria_mundi··on Why is DNS still hard to learn?
There are 13 root name server addresses, but most (all?) of these use anycast, i.e. there are actually several servers with the same address, and your traffic will usually be routed to the one closest to you. There are over 1500 root name servers.

https://wikipedia.org/wiki/Root_name_server

gloria_mundi··on Tor’s history of D/DoS attacks and future strategies for mitigation
On the same site:

> Benefits of Tor over I2P

> ...

> - C, not Java (ewww)

It's a joke.

gloria_mundi··on Dynamic programming in Haskell: automatic memoization
> To be absolutely clear, the expressions `seq f (putStrLn "hello")` and `seq (f undefined) (putStrLn "hello")` should both not evaluate anything and cause the string hello to be printed rather than raising an exception.

This does actually work here, because the array is created lazily.

> This often occurs in cases where the above hypothetical function `f` requires an intermediate value that's expensive to compute but only relies on the first of its two arguments. Then do you evaluate that expensive intermediate with a partial application of a single argument, or do you not? Neither is satisfactory and so this problem is best avoided.

Computing the intermediate value with a partial application does not actually take away laziness, it only adds sharing. (At least it can be done this way.)

gloria_mundi··on The EARN IT bill is back, seeking to scan our messages and photos
That's just how government works in general though. [0]

"Why is someone privileged to arrest me but I can't keep them locked up in my house?"

[0] https://en.wikipedia.org/wiki/Monopoly_on_violence

gloria_mundi··on “Fixing” the rules of division
> In fact, I think we could replace the corner with just normal slash, "/", write = to the right of the divisor and spell out the digits of the result to the right of it; the substraction chain will still go down the page.

That's exactly the way I was taught long division (in Germany).

gloria_mundi··on A database without dynamic memory allocation
It's called $^M, and you have to explicitly fill it with garbage.
gloria_mundi··on Canonical shows ads in the Ubuntu CLI
I did exactly that about a year ago (except it was testing instead of unstable). You need to pass some extra flag to APT because Ubuntu and Debian use different version schemes, so you wouldn't get updates anymore -- might have been '--reinstall', but don't quote me on that.

It worked quite well for me, although there were a few issues (for instance, I didn't get kernel updates anymore, and when I fixed that, the Wifi driver was missing). There are probably still a few issues that went undetected and might cause problems later.

It's certainly possible, but I wouldn't recommend it unless you're willing to spend quite some time on it. And don't count on it working at all. (And backup your data. I didn't, and got lucky, but in retrospect, that was irresponsible.)

gloria_mundi··on Show HN: Tombl – Easily query .toml files from bash
Probably this: https://github.com/dflemstr/rq