Better HN
topnewbestaskshowjobs
Log inSign up

GrumpySloth

4,901 karma · joined Sep 13, 2020 (6y ago) · 1,641 submissions

Submissions

comment 4y ago · link · parent

The countries which are least trustworthy wrt nuclear weapons are the ones that aren't going to ask the public's permission. An autocracy doesn't need to power itself by nuclear plants in order to have nuclear weapons. On the other hand having a sustainable, clean source of power not tied to autocratic regimes lowers the leverage those regimes hold over democratic countries.

In my particular country, a major chunk of the public budget goes towards paying fines to EU for use of coal, all while our government periodically passes bills allowing it to borrow more money from the central bank, increasing inflation. Negotiations with neighbouring autocratic countries can be pretty tough, when they can threaten us and rest of Europe, which is going to put pressure, with stopping energy transmission. Energy shortages in some parts of the country were a regular occurrence for decades, even before the current political problems.

Lack of nuclear plants does nothing to prevent a nuclear war, while it harms us on many very tangible levels.

comment 4y ago · link · parent

> solar/wind could serve both factors well

Not 24/7.

comment 4y ago · link · parent

Using quotes in DDG used to work for me. Unfortunately, for a couple months now it doesn't. The results are garbage. Often they don't even include most of the words I typed, only the first one.

comment 4y ago · link · parent

Another aspect which is often neglected in movies of today is character development. A character's backstory is either completely unknown, or is told instead of being shown, or is shown in a couple seconds, and then something happens to them that was aimed to supposedly instil some emotions in me as a viewer, but no, I don't care about this character. If they die, I guess they will be replaced by another character I don't care about. Example of this chasm between the old and the new is Moffat-era Doctor Who vs post-Moffat Doctor Who. This YouTube review shows it best: <https://www.youtube.com/watch?v=KMbZkR9vOrw>

Also, romantic scenes all look the same, completely generic. They're basically copy-pasted between movies. They're so flat and devoid of any genuine feeling I end up hitting the right arrow to skip them entirely.

Usually I don't have those issues with older movies (and movies of a couple selected directors still making good movies to this day).

comment 4y ago · link · parent

I used to pay for Netflix and still torrent its content due to the low quality of video, sometimes mysterious network problems (only with Netflix), sometimes not being able to watch a movie without dubbing (???). Generally, no matter how much magic there is on Netflix's backend that I read about, the frontend seems to be a pile of goo.

But over the years, movies kept disappearing from Netflix and at this point anything I may want to watch is typically not available on Netflix, so I cancelled my subscription. I'm probably going to switch to Amazon Prime, since it appears to have the best offer in terms of content.

comment 4y ago · link · parent

Probably FaaS[1]. I.e. they're promoting AWS.

[1]: <https://en.wikipedia.org/wiki/Function_as_a_service>

comment 4y ago · link · parent

> [...] the standard was extended by two options:

> - Increasing the size of the UPD packet above 512 bytes via the Extension Mechanism for DNS (EDNS)

> - Switching the protocol from UDP to TCP

> Alpine Linux, or rather musl libc, doesn’t support either of those options.

It still seems weird to me that such details are decided by libc. My reflex idea when designing a system would be to put DNS functionality in a system service, while libraries would only query the service, without troubling themselves with system caches, TCP vs UDP etc. Then possibly the service could be even swapped for another with a compatible interface, but making different decisions, without perturbing the applications. It sounds like systemd-resolved is a move in that direction, but I still don't understand why putting all that in libc, essentially making all applications perform their own independent DNS work, was the original choice.

comment 4y ago · link · parent

I expect a lot of it comes from people not being aware of what Shift+Enter does in Slack. There is a setting in Slack which makes Enter break lines, and Ctrl+Enter send the message. IMO it should be the default. It could break away with the habit of standalone hellos and with big messages being broken into 7 smaller ones (each generating a notification, and making it harder to judge when the other person stopped forming their message). Instead, sending a message would be a separate action from composing it.

Of course, it's inevitable that some people won't appreciate other's time and attention, but that's probably unsolvable.

comment 4y ago · link · parent

In my experience, people who were taught programming in uni are the ones who know fewer languages. I suspect it's due to the amount of money Microsoft put (still puts?) into making sure that C# is popular in that space. I studied maths, but informatics was in the same department and there was a lot of stuff funded by Microsoft and everyone around was programming in C#. Another popular university nearby produced mostly Java devs, judging from the people I got to know on the job coming from there. My university also had some courses with Smalltalk, OCaml etc., but these courses were not obligatory, and more geared towards people who are actively interested in programming languages.

Self-taught programmers on the other hand more often have the intrinsic curiosity and motivation to learn those topics. Also diving deep into topics is their strength, since the uni counterparts often know the names of concepts, but after a while it's quite clear that this knowledge of names is rarely coupled with familiarity with the topics they represent. I'm sure just knowing the names of things gets you far when you want to pass an exam, but for actual work it's scarcely different from knowing nothing at all. As Feynman said, there's a big difference between knowing the name of something and knowing something.

Now, those are just generalizations from experience. I've also met plenty of counterexamples in both groups.

comment 4y ago · link · parent

I tried it on Linux and it appeared quite buggy, and unpolished. Although it may have been the fault of Debian patches (it's quite obvious that it's not the vanilla version). From videos on YouTube, it seemed that ACDSee is quite polished and exactly what I want on the other hand, so I'm going to try that - first with a trial version and then if I like it, I'll buy it.

comment 4y ago · link · parent

I've taken up photography as a hobby (quite some time now) and Affinity is sure worth its price. Surprisingly, there is even an open source app (RawTherapee) which beats Lightroom with no sweat. I still don't have a solution for organizing photos, but I think I'm going to settle on ACDSee, which seems pretty well geared towards my needs. So while the desktop doesn't feel as vibrant as it used to, there is still quite a bunch of players in this field who keep up the good work.

I'm not going to buy any subscriptions. And luckily I don't need to, since the classic funding model in this space still brings better apps.

comment 4y ago · link · parent

Ok, heating water makes mild sense, but heated seats would gross me out.

comment 4y ago · link · parent

Ability to wash my butt is one of the best perks of remote working. I'm not going back to the office.

comment 4y ago · link · parent

You can have a handshower mounted next to the toilet seat. Also: what bidets require electricity? (Except the Japanese toilet and bidet in one thing.)

comment 4y ago · link · parent

In my experience, types which prove certain properties are usually a lot simpler than the tests verifying the same (at least tests which actually have a good chance of catching transgressions, instead of just checking a single hard-coded input). So more expressive type systems bring me a higher level of satisfaction, because they lead to simpler code than the code I'd need to write if I needed to test the same things. They also provide valuable documentation. On the other end of the spectrum, when I look at untyped Python code, I feel completely lost and find myself scouring the documentation for information that should be obvious from function definitions, but is instead specified in prose 3 links away from documentation of the function I was interested in.

comment 4y ago · link · parent

When I have a chain of commits pending review on Gerrit, and I fixed some flaws in the first commit in chain and need to rebase the dependent commits, merging is not an option. And rightly so: when I look at the master branch, I don't want to see random corrections someone made during review, they're just irrelevant once the reviewed changes are merged.

There are many reasons why linear history is important. Rather than saying that "you shouldn't want to do that", I'd prefer it if the tools people use were fixed to better serve the things people actually want to do.

A merge would only make sure that I don't need to resolve the same conflict multiple times. It wouldn't result in the conflicts not being generated in the first place, or them being saner. The only difference in conflict resolution between rebasing and merging is that the sides are flipped (what's shown on left in rebase, is on the right in merge, and vice-versa). Which doesn't address the second issue I listed: conflicts are not only repeated, but the conflicts themselves are pretty crazy. In my example, often-times C would never even touch files which were detected as having conflicting changes with A or B. It was pretty absurd that I would have a 3-line change in C, several hundred-line changes in A and B, yet the biggest conflicts would be triggered when rebasing C on top of B, and those would be in files C did not touch. Other times diffs in conflicts would have most of the lines added and removed actually identical, with only a couple in the middle different. Why would git mark them as conflicting, is beyond me. And then there was the issue of git not detecting conflicts, when it should have, instead merging changes in a way that broke source code. None of those issues is better handled by merging than by rebasing. Most of them however have pretty good solutions in a patch-based version control system, as opposed to snapshot-based like git (conflicts in files which weren't changed? not going to happen). An even better solution would be binary formats with domain-specific merge logic, like the one in KeePassXC.

comment 4y ago · link · parent

No. That's the first I'm hearing of it. Thanks. I'll try it in the future.

comment 4y ago · link · parent

The idea is pleasing, but when you specifically look at Git, its UX is rather disappointing. I'm not even talking about the CLI (after a while you can get used to it). I'm talking about resolving conflicts. If I have a sequence of changes A -> B -> C, then I change A and rebase B on top of A resolving any conflicts, then rebasing C on top of B will most of the time mean that Git will most likely ask me to resolve the same conflicts all over again and more. The kind of conflicts is also staggering. Each time I look at the conflicts it generated, I cannot explain how it could come up with that craziness. And all the while it also merged some changes without signalling conflicts, but instead breaking something in significant ways, without notifying me in any way, i.e. silently breaking something potentially important.

From what I've read, Pijul should fix at least the problem of needing to resolve the same conflicts multiple times over and over again. However, I feel that version control focused on text breaks, because the merging algorithm doesn't know anything about the semantics of what's represented in text. So yes, I'd say that version control in more areas would be nice, but one based on binary formats understood by version control. One glimpse of that may be KeePassXC, which can merge password databases and has never done it wrong in my experience.

comment 4y ago · link · parent

> I've heard macros slow for largely the same reason, it's not the macro execution itself that's slow, it's compiling all the generated code.

If that were true, the same issue would apply to hygienic macros, yet it doesn't. It's distinctly a problem with proc macros.

comment 4y ago · link · parent

Rust does compile slower than Go, but it's not due to generics. It's mostly due to LLVM codegen and procedural macros. Go has the benefit of not relying on LLVM and not having procedural macros.

comment 4y ago · link · parent

Although monomorphization takes a significant chunk of a typical Rust compilation, it pales in comparison to LLVM codegen and execution of procedural macros. So although it's academically worthy of note, optimization-wise it's not where the focus should be. Personally, I'd like to see someday a Rust compiler which is not based on LLVM. Both Zig and Jai compile much faster when using their non-LLVM backends than when using LLVM, so Rust is not the odd one here either.

comment 4y ago · link · parent

In short, fork() mixes poorly with multi-threaded code (and has some security footguns like needing to explicitly unshare elements of environment which may be sensitive, such as file descriptors (suddenly you need to know all the file descriptors used in the whole program from a single place in code)). Here is a well-written comment about fork() from David Chisnall: <https://lobste.rs/s/cowy6y/fork_road_2019#c_zec42d>

Additionally, the fork()+exec() idiom practically forces OS designers into a corner where they simply have to implement Copy-on-Write for virtual memory pages, or otherwise the whole userspace using this idiom is going to be terribly slow. Without the fork()+exec() idiom you don't need CoW to be efficient.

comment 4y ago · link · parent

Sorry. Won't happen again.

comment 4y ago · link · parent

A while ago one of commenters here hinted to me at the existence of such a proposal. I didn't know the exact proposal then, but after a while of struggling with this part of Rust I decided to go looking for it. I've found it, but, to my dismay, the proposal was rejected. Posting here as a curiosity for others.

1165.

Enum Variant Types(github.com ↗)

3 points · by yakubin · 4y ago · 1 comment

comment 4y ago · link · parent

What tags and searching do not provide is context. One affordance that putting files into a folder provides is reminding oneself that when I look at file A, I should probably remember about file B too. Later I may even forget about the existence of B, but when I go searching for A I'm going to see B as well.

Search and tagging are not contradictory to cataloguing. They're complementary.

It's also not true that old media didn't have any search facilities. Old technical books would each have an index of keywords at the end. That's search, just analog and requiring a bit more work from the publisher. This index didn't make the table of contents redundant.

comment 4y ago · link · parent

Rename being atomic doesn't imply that after a rename completes, it's flushed to cold storage. It just implies that a rename is either completely flushed to cold storage, or the data in cold storage looks as if there was never a rename.

Also, the data you wrote to a file before the rename may not have been flushed completely to cold storage. Rename doesn't change here anything. The data may still be served from the disk controller's cache.

The rename trick is mostly useful for "committing" long operations, which even on the high level are not atomic. But it has nothing to do with flushing.

Also, renaming a file is a filesystem-level operation. From the POV of a disk, it looks the same as any other write. So if you can't make sure that normal writes are flushed, you can't make sure that renames are flushed.

Another note: rename(2) used not to be even atomic wrt power loss on ext4 (which was later fixed), so it's not guaranteed. POSIX itself only guarantees atomicity wrt other filesystem operations. Atomicity against power loss is a distinct checkbox. You need to check your specific filesystem.

comment 4y ago · link · parent

I know some mathematicians print all the supporting material they need in advance and then work on paper for weeks without internet. Although admittedly that's a fringe option. And contrary to the expectation that they will probably need to look up things that come up later, they are actually very productive. (That's just an anecdote from second-hand, as in: I know a mathematician who knows a mathematician who does this.)

For my own coding, I usually don't use the internet anyway. I browser offline documentation of the stuff I use, vendor all my libraries (i.e. building doesn't require internet access), so maybe I'm going to try disconnecting my computer during those sessions. That's of course not counting coding at work, due to the tyranny of Slack.

comment 4y ago · link · parent

"Random ad vs targeted ad" is a false dichotomy. There are also contextual ads. For example, the audience of Linus Tech Tips regularly gets their fair share of contextual ads delivered by Linus in-band. You're not going to see an ad of a toilet paper on LTT. Instead you're going to see ads of hard drives, Squarespace, online shopping platforms, etc. The ads are the same for all viewers (i.e. definitely not targeted) and don't require any JS spyware. Moreover, LTT (and other creators) get more money from those ads than from YouTube ads. Everybody wins (except Google and Facebook).
1
383940
55