Better HN
topnewbestaskshowjobs
Log inSign up

codeflo

9,663 karma · joined Jun 14, 2010 (16y ago) · 1,502 submissions

Submissions

comment 2y ago · link · parent

Solvers aren't magic. But it turns out that many naturally occurring instances of NP-hard problems aren't the "really hard" instances that the NP-hardness proof depends on.

Solvers can also fail for really tiny problems. You simply have to try to figure out how hard (or how well adapted to the solver's heuristics) your particular problem instance is.

comment 2y ago · link · parent

A problem is NP hard if there are instances that other hard problems reduce to. That is, only some instances of the problem have to be hard. NP hardness says nothing about "average" problem instances and even less about hand-picked ones.

And that's what Sudoku puzzles are. They are made for humans to solve. They are specifically crafted to contain challenging, but possible, solution paths.

comment 2y ago · link · parent

I thought that the list of cognitive impairments sounds like a laundry list of ASD symptoms, and indeed, at least some researchers seem to believe that there's a connection between Autism and cerebellum dysfunction:

https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3677555/

comment 2y ago · link · parent

Words sometimes have a technical and a colloquial meaning. Colloquially, "no evidence" means the thing that technically should be called "unconvincing evidence" or "little evidence". This is similar to the word "theory", which has a different meaning colloquially than technically.

Question: If science communicators use the colloquial meaning instead of the technical one, are they bad science communicators? Or especially good ones?

I think it's the latter. I also think if you're smart enough to know the technical definition, you should be smart enough to make this translation without making a stink about it. And given that half of the given examples are about COVID, there's some chance that the author has an axe to grind.

comment 2y ago · link · parent

> That's my only explanation for why someone would say "at the user interface level, Git stores snapshots" when the interface is, i think clearly, mostly about working with commits as changes.

That's what the documentation says, no need to assume a conspiracy. I don't know on what authority you claim to know better, you haven't cited anything.

> About what, exactly? As far as i know, what i wrote is factually accurate (or an opinion, which can not be wrong).

Opinions about facts can be wrong. I've cited the source, maybe you have a better one than the official documentation, but you haven't given it.

> Yes, the git manual writes about snapshots, because it's literally true (and sometimes necessary to understand), but it also repeatedly refers to commits as changes

But it doesn't. Again, you didn't cite anything. Conceptually, and in the documentation, changes are always something that's computed after the fact. I've triple checked just now, the official documentation always talks about the changes between commits, or the change introduced by a commit (which means the changes to the parent commit) -- that's fine and in fact exactly the point. It never uses "commit" as a synonym for "change", or claims that a commit somehow stores a change.

comment 2y ago · link · parent

It’s not a meme, it’s explained in one of the first chapters of the official documentation, in a section titled “snapshots, not differences”: https://git-scm.com/book/en/v2/Getting-Started-What-is-Git%3...

You and some others in this comment section are simply wrong about this. Everybody is wrong sometimes, that’s no problem. But your righteous tone (“meme”, “amazes me”) after clearly having spent zero minutes of research is not what I would consider a constructive way to engage in a discussion.

comment 2y ago · link · parent

> It's easier to read the source code with uppercase keywords.

This is aesthetics, I won't claim that what I'm saying is more than a (perhaps popular) subjective opinion. But I will point out that at least the way I read programs, the KEYWORDS are the OPPOSITE of what I want to EMPHASIZE when reading code.

I actually want the keywords to disappear so that my eyes can focus on the variable names and see the data flow. That, by the way, is also why punctuation to mark blocks { ... } is so much easier for me to visually parse than BEGIN ... END.

comment 2y ago · link · parent

> pilots not having to do an entirely new type certificate

And consequently, their intention seems to be to bend the rules about the validity of the existing certifications to the max (no pun intended). At what point can an agency rule that Boeing no longer follows the spirit of the pilot certification rules?

comment 2y ago · link · parent

I'm not sure if you've found a better version of the original, but this is the document I found: https://people.inf.ethz.ch/wirth/ProjectOberon/PO.System.pdf

It's typeset in Arial. In freaking Microsoft Word.

comment 2y ago · link · parent

Some people rave about Oberon, and I think there are brilliant technical ideas in the system, and this is entirely subjective, but reading the language gives me a headache. At least Pascal allowed lower-case keywords.

Does anyone know why Wirth never modernized his style? I wonder if there's a place for something that's equally minimalist, but more in line with current aesthetic sensibilities.

comment 2y ago · link · parent

Intuition implies a mental model, just not a conscious one.

comment 2y ago · link · parent

The thing I tried to hint at is this: When you approach an incline, you'll naturally push down the pedal to keep your speed. Thus, even if you don't articulate it that way, your model of the gas pedal has nothing to do with acceleration. Yes, "intake manifold" is ridiculous, I grant that, but it's much more likely that the model people develop has to do with something like "effort".

comment 2y ago · link · parent

> Do we think of pressing the gas pedal in a car as "accelerate", or as "regulate the intake manifold"?

I'm just curious -- which of the two do you think is the correct mental model to safely drive a car? If you think its the former, my guess is you've never driven where there are mountains and/or never driven manual.

comment 2y ago · link · parent

The thing that's muddied for beginners are bad YouTube tutorials (which the internet is full of), not Git or the actual documentation. People should really read the Git documentation, it's very well-written and explains the correct mental model.

Also, people really shouldn't teach implementation details to beginners. Or intermediates. Perhaps anyone who casually mentions that Git stores diffs to anyone not currently opening the source code for Git itself should be disqualified from ever giving explanations for technical stuff ever again.

comment 2y ago · link · parent

> I actually really like the generalized "smallest/fastest/simplest way to create new file from old file" explanation.

You might like that explanation because it fits a mental model you may have acquired previously, but at the user interface level, Git stores snapshots. It's not an implementation detail, it's what the entire command line is based on.

comment 2y ago · link · parent

It's an old bit of wisdom that's hard to stamp out. That's partly because anything that you don't understand below you in the runtime stack looks like "I/O" during profiling, so the misunderstanding perpetuates even among people who attempt to take a closer look, but don't know enough.

comment 2y ago · link · parent

> any reasonably performant implementation would be faster not only than NVMe

Saturating NVMe bandwidth is wicked hard if you don't know what you're doing. Most people think they're I/O bound because profiling hinted at some read() function somewhere, when in fact they're CPU bound in a runtime layer they don't understand.

comment 2y ago · link · parent

You're comment history doesn't suggest that you're a Russian troll, so my interpretation is that you're making a pointed remark that you either don't really mean or perhaps haven't fully thought through. So without meaning any offense, let's pick this apart.

To be fair, I disagree with my country's cracking laws as well. We should do better here, the right to one's data is an important freedom. I support the fight for saner copyright laws.

But let's also be real: There's no universe where that injustice somehow outweighs the entirety of human rights violations that go on inside Russia. Persecution of minorities, decriminalization of domestic violence, torture in prisons. Just to name a few.

Western copyright laws aren't good. But there are worse fates in life than not being able to watch old blu-rays.

comment 2y ago · link · parent

A dysfunctional criminal justice system probably doesn't hurt either.

comment 2y ago · link · parent

You can bet that if Kaspersky dares to uncover this in that much detail and with so much publicity, then revealing those details doesn’t go against the interests of the Russian state. (Which, to be very clear, is not the same thing as suggesting Kaspersky is an actor of the state. Just that they would wisely think twice about revealing attacks from a certain direction.)

comment 2y ago · link · parent

Interestingly, this seems to be sponsored by Microsoft Research, which has also heavily supported the development of and research on Haskell.

(Source: https://www.microsoft.com/en-us/research/project/koka/)

comment 2y ago · link · parent

Ha ha, I didn't even realize this when I typed the answer. I hope it was clear that I didn't mean to imply this was your personal opinion.

comment 2y ago · link · parent

I always found it funny that this is printed as a reminder text on Magic the Gathering cards that care about even or odd values: https://scryfall.com/card/iko/88/extinction-event?utm_source...

But thinking about it, I have no doubt that Wizards found out this confusion is somewhat widespread during playtesting, and printing a short reminder was an easy fix.

comment 2y ago · link · parent

Your defense boils down to people having an insufficient understanding of zero as an ordinary number, and still clinging to the concept that zero means "nothing" or is otherwise magic.

This hints at a failure of math education.

As an analogy, many (usually, but not always, weaker) programmers still have magic ideas about booleans and comparison operators, and write nonsensical stuff like if (a == true). When you ask them, it's invariably that in their mind, there's mystic connection between comparison operators and if statements.

comment 2y ago · link · parent

Yeah, what’s going on with those comments? One might argue whether “learnings” is incorrect or just stylistically bad; some dictionaries seem to list it. But why would anyone care enough to create half a dozen sock puppets to make this one point (none of them seem to have any other comments)? That seems completely insane to me.

comment 2y ago · link · parent

The author is not a fan of lambdas:

> Personally, I find code that leverages ranges harder to read, not easier, because lambdas inlined in functions introduce new scopes that have a strong non-linearizing effect on the code. This isn’t a criticism of ranges per se, but certainly is a stylistic preference.

Does anyone know what “non-linearizing” means here?

comment 2y ago · link · parent

It‘s funny that there’s a distinct LLM writing style, and how quickly we’ve come to recognize and distaste it. I pity anyone who might have had a similar style naturally.

comment 2y ago · link · parent

I’m assuming the poster misspoke and meant that metal-poor stars have formed when the universe was relatively young, not that the stars are young. It’s also my understanding that a planet such as ours could only have formed a bit later, after enough supernovae had formed all the carbon and iron and so on that we need to live.
1
101112
51