Better HN
topnewbestaskshowjobs
Log inSign up

bmandale

234 karma · joined Mar 11, 2025 (1y ago) · 122 submissions

Submissions

comment 1w ago · link · parent

Many GCed languages have any number of useful features. But when the discussion is focused on systems programming, they are quite off topic.

comment 1w ago · link · parent

A toy example is meant to demonstrate a principle. Toy examples often have alternative ways they can be written, but the concept they are meant to demonstrate requires the whole machinery being employed. Furthermore, how do you think .sum is implemented?

comment 1w ago · link · parent

> that loop in particular isn't better than total = reduce(a, +, 0).

it is, in fact, better

comment 1mo ago · link · parent

> I’m presenting from a presentation, I want to switch to a live demo environment, and to do so I need to turn off the presentation entirely?

While a bit annoying, that seems like the optimal solution within the constraints of apple's design culture.

comment 2mo ago · link · parent

There is no such trick. Python is only now getting those sort of JIT style optimizations, and that one in particular still hasn't hit. Do not use += on strings in a loop unless you are certain the iteration count will be small.

There is an optimization for lists, and maybe that's what GP is remembering. l += is functionally different from l = l +. The former mutates l, whereas the latter creates a new l. The difference matters when the line above is m = l. The mutation version will mutate m as well (they're the same reference), the creates new version will not. This optimization can just as easily turn into a footgun if the programmer is unaware of it, and in that sense is unpythonic.

comment 2mo ago · link · parent

It doesn't practically matter whether the ads are from google. They're shown on a third party site, not using google won't get rid of them, only not using that site will (or installing an adblocker...). Users very reasonably blame the site, who have direct agency to remove the ads.

comment 2mo ago · link · parent

debugger;

comment 2mo ago · link · parent

weird f*ing site. apparently doesn't like hn visitors and doesn't want me opening the console. i know when im not wanted

comment 2mo ago · link · parent

It tells you a lot about the best value. It certainly doesn't tell you everything, and you might well pick a more expensive phone with less ram for other reasons, but all else being equal a phone with more ram will be better.

comment 2mo ago · link · parent

The mercator projection has neither a top nor a bottom, it extends infinitely upwards and downwards. Hence all visualizations of it cut it off at some arbitrary point. Making antarctica humorously large does nothing besides make a point.

comment 2mo ago · link · parent

People who actually care about their money often like to compare competing products and decide which one provides them the best value.

comment 2mo ago · link · parent

There shouldn't be "mass layoffs" for that reason. If they are both reasonably large companies, the size of the HR department depends on the number of employees. When you merge the companies, the number of employees initially stays the same, hence there is no HR to be fired. You might consolidate the HR departments, and this might lead to some roles becoming redundant, but not on a mass scale. Similarly for accounting, marketing, etc.

The fact is that there are no synergies for many companies, even companies operating in the same industry. The reason for promoting a merger between such companies is exactly that they will see reduced competition and hence greater profitability. The ideal merger is actually between companies making different products, where the one company can benefit from more vertical integration.

comment 4mo ago · link · parent

Was it released with it? Iirc they tried moving to such a license from bsd, which contains no patent grants whatsoever, and hence they thought it was a strict upgrade. The community did not agree so they moved back.

comment 5mo ago · link · parent

It requires the claim to be made with "willful disregard for the truth". Notifying someone, especially with a cease-and-desist on fancy letterhead, makes it legally clear that they know better, and thereafter would be definitely libelling you (assuming the claims are in fact untrue and harmful). But you can still sue them for the claim prior to the notice, you just have to prove they should have known better prior to making the claim.

comment 5mo ago · link · parent

A lot of these style of reframings seem to completely lack a theory behind them, as if reframing things will magically solve a problem. In this case, further vilifying or antagonizing drivers will do absolutely nothing to increase road safety. How would it? These memes won't reach the majority of drivers. Those it does, rather than feeling mollified, will feel accused, and hence will be more likely to drive recklessly around cyclists.

A reframing that would have the power to lower collisions between cars and bikes would be to blame the road design, or even the car design. These are things that can be easily changed for a large number of people if enough political will exists.

comment 6mo ago · link · parent

People misunderstood your original reply. Correcting you is not pedantry.

comment 6mo ago · link · parent

Language is a communication tool. If you misuse language you will be badly understood. The solution is to use the correct word for what you mean, not to accuse others of sophistry.

comment 6mo ago · link · parent

Having assets under management doesn't mean you have that money. You don't own it, you are just taking care of it for somebody. When describing a company as an $X billion company, conventionally this is referring to the market cap. You could use it to describe other things they possess if you wanted to, but assets they manage will never be something they possess.

comment 6mo ago · link · parent

> One of our developers was compromised by a recent supply-chain compromise on Tanstack

...which in turn was caused by bad design of github's CI pipeline. Funny how it all comes back around like that.

comment 6mo ago · link · parent

Interestingly fails as well, in two ways. First:

> The string may begin with an arbitrary amount of whitespace (as determined by isspace(3))

Second is that it only applies to signed long long, not unsigned.

comment 6mo ago · link · parent

Some people would set up tooling to look for compromises the moment they get published. What's neat about this is that as an attacker you have no way to determine beforehand whether you'll get caught by this. So you would run your attack, it would lead to a compromised package being published, then the world would get a chance to look at it and see if they can detect the issue with it. This would of course lead to attackers being a lot sneakier. But I think due to the opaque nature of what checks people are running against packages and what they might notice, a much smaller number of attacks would make it through. Of course the ones that did by definition would be the ones that were impossible to detect and would thus stick around a lot longer.

comment 6mo ago · link · parent

open source does not mean open community. you can just throw tarballs over the wall

comment 6mo ago · link · parent

Missed the original. That seems like a reasonable way to highlight software that you believe is fundamentally insecure. Obviously you can't be on the hook to fix deep architectural issues yourself, but just submitting a single PR will be treated as "problem solved". Since most of any software contains some vulnerability, just saying "this software has an RCE" isn't actually a disclosure at all. The real issue is that the given vulnerability was (supposedly) easy to find, which if true is not something that will be fixed by targeting just that exploit chain, and needs deep changes to fix.

comment 6mo ago · link · parent

There are no "defaults that work for everyone". Well designed tooling acknowledges that and makes it easy to tune the software to your preference.

comment 7mo ago · link · parent

Politics are generally off topic and tend to be flagged.

comment 7mo ago · link · parent

>How do they get money for free?

market power

>What is stopping everyone else from doing the same?

see above

comment 8mo ago · link · parent

That's protection money, though trump so far hasn't demonstrated to be particularly worried about honoring those payments.

comment 8mo ago · link · parent

> tabs and spaces being mixed in the code

Python banned this in python3. Problem solved.

comment 8mo ago · link · parent

Clearer for the computer, but not for the human. Many errors, some severe, have been caused by a human only looking at the indentation and not realizing the braces don't match.
12345