HNHacker News
TopNewBestAskShowJobs

atq2119

4,058 karma · joined September 12, 2018

submissionscomments
atq2119··on Traits are a local maximum
Maybe I'm missing something, but the compiler can tell whether an implementation is an orphan. That's how you get an error message today if you try to write one. So I don't know what difficulty you have in mind.
atq2119··on Traits are a local maximum
Essentially, yes. What I don't see is their claim that it's a "much greater annotation burden". Compared to what? Rust today just doesn't allow this at all, and if you use a wrapper type to simulate it, you definitely end up with more "annotations" (boilerplate).
atq2119··on Traits are a local maximum
Right, but what I'm describing is a tradeoff point that's between the extremes, where implementations are unnamed but can still be explicitly imported.

Making my example more explicit, you'd need syntax along the lines of

    // inside crate C
    use A::impl std::hash::Hash for i32;
This syntax would explicitly be limited to orphan implementations.

I suppose to further clarify, there's still some coherence requirement there in that crate C can't import the conflicting implementations from both A and B. Which could then perhaps be worked around by adding syntax to spell types along the lines of

    HashMap<i32 + A::impl Hash, V>
Which you could argue is a form of naming implementations, I suppose? I'm not familiar with ML. You could maybe also think of it as a more ergonomic way of doing (more or less) those wrapper types.

In any case, the annotation burden only exists where it's actually needed to enable orphan implementations.

And either way, multiple different impls can safely coexist within the overall set of code that's linked together, with everything being statically checked at compile time.

atq2119··on Traits are a local maximum
I'm not convinced by your example of hashing.

Let's assume for the sake of argument that the standard library didn't implement Hash for i32.

You could then have two crates, A and B, with different implementations of Hash for i32, and both could instantiate HashMap<i32>.

This can be made to work if we recognize the HashMap<i32> in crate A as a different type than the HashMap<i32> in crate B.

This only really works if orphan implementations are exported and imported explicitly to resolve the conflict that arises from a crate C that depends on A and B.

If C wants to handle HashMap<i32>, it needs to decide whether to import the orphan implementation of Hash for i32 from crate A or B (or to define its own). Depending on the decision, values of type HashMap<i32> can move between these crates or not.

Basically, the "proximity to code location" is made explicit in a way the programmer can control.

This makes type checking more complex, so it's not clear whether the price is worth it, but it does allow orphan implementations without creating coherence problems.

atq2119··on Traits are a local maximum
How about explicitly declaring orphan trait implementations as public (or not) and explicitly importing them (or not). Trait implementations are resolved at the point where a concrete type becomes generic, and the set of available traits can depend on that context.

This isn't exactly trivial, but it avoids coherence problems.

atq2119··on Tiling with Three Polygons Is Undecidable
And then you read the abstract and realize that this is an improvement of an earlier result using five polygons (which in turn built on a history of earlier results).

So, still a great result, but not as out there as one may think.

I think it's also worth pointing out that in theoretical CS and most of math, it is common to list authors alphabetically. I don't think we have a way of knowing the relative contribution of the two authors. Demaine is obviously accomplished, but I find the kind of hero worship found in this thread distasteful and the facts don't support it here. Give credit to Langerman; Demaine surely would!

atq2119··on Europeans spend 575M hours clicking on cookie banners a year
This is a common misunderstanding. Cookie banners are not required. It is your[0] active choice to invade your website visitor's privacy which leads to this degradation of usability. Stop with the cookie nonsense and you don't need a cookie banner.

[0] Royal you, speaking to a significant fraction of the HN audience.

atq2119··on Backdoor attempt on Exolabs GitHub repo through an innocent looking PR
You need ability, means (as in -- have the money to spend time on it), and motive. Many people have the ability. Many people have the means. (And there is some overlap, but the overlap isn't that large.) Few people have the motive.

The combination of all three tends to mostly appear in nation states. They have the motive, and they have the money to fund people with the ability to pull off this kind of attack.

atq2119··on M4 Mac mini's efficiency
Failing to block ads is also bad security practice.
atq2119··on Trump wins presidency for second time
There are a number of issues with this comment. One of them is that debt and saving are just sides of the same coin.

More importantly, everybody can see that debt for investment allows more growth. Just think about how many more people can afford to own their own home thanks to taking on debt. This allows them to pay a mortgage instead of rent, which allows them to build up wealth.

Equivalent effects exist in industry.

Debt is an extremely useful tool. We made the right choice here as a society.

atq2119··on Only 5.3% of US welders are women. After years as a professor, I became one
This is an interesting question, so here's a bit of speculation.

Banter is a matter of wit. You could call it an intellectual pursuit.

Blue collar jobs are primarily not intellectual pursuits. They need their own kind of smarts, but these smarts are relatively orthogonal to the kind of linguistic smarts used in banter, and most importantly the work output itself is not intellectual. There's little chance of the banter directly getting into the work output, and so there's little direct motivation for bosses to police it.

Software development is basically entirely an intellectual pursuit that very much overlaps the wit of banter, and banter is likely to leak into the work output. Hence easter eggs are a thing. So, bosses are more likely to want to police banter-adjacent activities, which has a likely chilling effect on banter itself.

Another, more recent, factor is that more software development activity is online/remote and therefore lower bandwidth. The subtleties of banter don't convey as well as they would in-person.

atq2119··on Trump wins presidency for second time
Allowing abortions up to some reasonable time limit is the compromise.
atq2119··on Ternary Operators
It actually isn't, that's what makes it fused.

If you separate the operations like that, the intermediate result is rounded. The final result is then often different from the result of the FMA, which doesn't do the intermediate rounding.

atq2119··on Nvidia to join Dow Jones Industrial Average, replacing Intel
A single Zen5 core can do 32 single precision FMAs per clock.

That's using SIMD, but so is Nvidia for all intents and purposes. Those "cuda cores" aren't truly independent: when their execution diverges, masking is used pretty much like you'd do in CPU SIMD.

A lot of the control logic is per-SM or perhaps per-SIMD unit -- there are multiple of those per SM. You could perhaps make a case that it's the individual SIMDs which correspond to CPU cores (that makes the flops line up even more closely). It depends on what the goal of the comparison is.

atq2119··on Nvidia to join Dow Jones Industrial Average, replacing Intel
Nvidia's marketing is misleading. Those "cuda cores" are more SIMD lanes than cores. Number of SMs is a more appropriate equivalent to CPU core count.
atq2119··on M4 MacBook Pro
Yeah, a lot of it is just market forces. I guess going to four channels is costly for the desktop PC space and that's why that didn't happen, and laptops just kind of followed suite. But now that Apple is putting pressure on the market, perhaps we'll finally see quad channel becoming the norm in desktop PCs? Would be nice...
atq2119··on Jaywalking legalized in New York City
It's a bit more subtle than that.

In Germany, crossing at a red light is very frowned upon. Many Germans even wait at a red pedestrian light in the middle of the night when there's zero traffic.

Crossing streets in places without pedestrian lights or designated crossings is very common, though, and I believe usually legal. (I certainly haven't heard of anybody being fined for it.)

atq2119··on Care Doesn't Scale
Nit: That's not the defining property of capitalism. The defining property of capitalism is that the means of production are privately owned, as opposed to e.g. market socialism.
atq2119··on Care Doesn't Scale
On your last point: I think it's useful to think in multipliers and desired outcomes.

Do you want the best doctors involved in care for patients and training juniors, or do you want them to spend time jockeying for a position in the hierarchy because that's a plausible but also the only way to 2x their income?

This doesn't fully answer the question, of course, but it suggests that large pay disparities are extremely wasteful for society as a whole.

atq2119··on Controllable Fast and Slow Thinking by Learning with Randomized Reasoning Traces
It's also not really true.

Consider a problem like edit distance, which is solved using an n^2 dynamic program. What are the n separate problems there?

Sure, you're filling out a table with a nested loop, but that's a very mechanistic view. I don't believe that treating the n outer iterations as separate problems gives any real insight.

atq2119··on OSI readies controversial open-source AI definition
There's code for training and inference that could be open-source. For the weights, I agree that open-source doesn't make sense as a category.

They're really a kind of database. Perhaps a better way to think about it is in terms of "commons". Consider how creative commons licenses are explicit about requirements like attribution, noncommercial, share-alike, etc.; that feels like a useful model for talking about weights.

atq2119··on USGS uses machine learning to show large lithium potential in Arkansas
This is the kind of story that may say more about the story teller than the place it's about.

(I have driven in Italy as a foreigner several times without ever receiving a ticket.)

atq2119··on AI engineers claim new algorithm reduces AI power consumption by 95%
> I almost forgot how much it sucks having to jump to google every other minute

Even allowing for some hyperbole, your programming experience is extremely different from mine. Looking anything up outside the IDE, let alone via Google, is by far the exception for me rather than the rule.

I've long suspected that this kind of difference explains a lot of the difference in how Copilot is perceived.

atq2119··on C++ proposal: There are exactly 8 bits in a byte
Computers are not beings with 10 fingers that can be up or down.

Powers of two are more natural in a binary computer. Then add the fact that 8 is the smallest power of two that allows you to fit the Latin alphabet plus most common symbols as a character encoding.

We're all about building towers of abstractions. It does make sense to aim for designs that are natural for humans when you're closer to the top of the stack. Bytes are fairly low down the stack, so it makes more sense for them to be natural to computers.

atq2119··on Adobe's new image rotation tool is one of the most impressive AI tools seen
The second L in LLM stands for "language". Nothing of what you're describing has to do with language modeling.

They could be using transformers, sure. But plenty of transformers-based models are not LLMs.

atq2119··on Life expectancy rise in rich countries slows down: took 30 years to prove
This honestly feels like the kind of thing where 20 years from now we'll be more aware of the side effects and people will shake heads about how stupid "we" were today.

If this is going to be an exception, it'd be truly interesting.

atq2119··on The Strict Aliasing Situation Is Pretty Bad (2016)
That is understood.

However, it is generally too hard (in C and C++) for compilers to tell whether you were wanting to do the thing at any one particular place.

So compilers have two options: Assume that you never do the thing, or always assume that you don't do the thing.

The former is often better for performance in practice, and it's true most of the time, so here we are.

As has been pointed out elsewhere, one of the strengths of Rust is that it shifts how pointers (references) work and allows the compiler to more often know for certain that you don't do the thing, without making assumptions.

atq2119··on John Carmack on inlined code (2014)
Regarding compound statements returning values: There are a number of languages which have that, including Rust. Ironically, it made me wish for a reversed form of the construct, i.e. something like

    { ...; expr } --> x;
    // x is a new variable initialized to expr
I feel like this would help readability when the compound statement is very large.
atq2119··on What P vs. NP is about
In the usual model of how these problems are defined, problem inputs must be represented in binary, so the edge lengths are discrete by definition.

What problem formulation do you have in mind?

atq2119··on Don't squander public trust on bullshit
... enforcement of property rights ...
← PreviousPage 11 of 34Next →