Better HN
topnewbestaskshowjobs
Log inSign up

consteval

1,210 karma · joined Jul 19, 2024 (2y ago) · 1,613 submissions

Submissions

comment 2y ago · link · parent

Oh come on now, everyone who programs in C++ knows operators don't work like that. Operators are tied to types, those enums don't have operator < defined.

You also can't add them, or subtract them.

Yes behind the scenes their integers, but almost certainly this is the case in Rust too. You can SOMETIMES coerce an enum class instance back to an int if you do unsafe casts (on purpose).

comment 2y ago · link · parent

That's because the web is cross platform, truly. It's not a separate issue - the prevalence of the web is exactly due to platforms like .NET being limited. If .NET (and others) were cross platform much earlier, I think many applications would be true apps instead of web apps right now.

comment 2y ago · link · parent

To be fair I don't think this is enough to say automatic memory management, otherwise C++ would be automatic memory management too (and maybe it is, just poorly implemented?)

comment 2y ago · link · parent

Most GC langs have these features too they're just not in your face. Technically C# has true value types like C++.

Rust makes the distinction between stack and heap references, like C++. Other, more high-level languages don't - there's only one kind of reference, you can't take a reference to a stack object. Maybe you implement that by making all objects heap allocating (Java) or you just say they have to be copied every time (C# struct). That's really where the difference is.

There's a lot of juicy, juicy performance there. The problem is taking references to stack variables is problematic. Tracking heap objects with a GC or a ref counter is really trivial in comparison IMO, at least when you try to combine the systems.

comment 2y ago · link · parent

> Somehow the fact that users want features systemd lacks never comes up

These? Don't exist.

Systemd is the most feature complete and it's not even close. Runit has nothing to offer that systemd cannot provide, but the inverse isn't even close to being true.

You have to realize these distros are usually general purpose who serve A LOT of use cases. They target desktops, home servers, professional servers, enterprise. That's a lot of different users with a lot of different needs.

Now you may think some of those needs/features are stupid, unnecessary, or (everyone's favorite word) "bloat". But the reality is some people rely on them so they push for them to be added.

Now you have a problem where you need all these features. Distros can choose to maintain 2 init systems (hard) or just go with the one that provides features. The choice is, and was, obvious.

> EEE

Oh, drop the delusion. Systemd didn't do anything, the distros chose this and they chose it because it's the best. If that makes you uncomfortable I don't care - in fact nobody cares.

comment 2y ago · link · parent

> I don't want to fork and maintain a distro

Right, so the problem isn't "choice" it's you being lazy.

Alpine HAS the opportunity to make a choice and you're arguing "no don't make a choice that makes it harder for me!"

The only anti-choice position here is YOU. Objectively. Now, I think your position is 100% fine and justified. But don't try to bullshit me with some "oh choice!" argument if that's the case. It makes it very hard to take these anti-systemd arguments seriously when people seem hell-bent on covering them in some ideological bullshit.

There's lots of good arguments against systemd in something like alpine. Use one of those, drop the political, made-up stuff.

comment 2y ago · link · parent

> Bash/Busybox ash does the exact same thing and it's also written in C

Yes, with the added benefit of an interpreter and shell implementation in between. Yippee!

> dev don't care about efficiency

systemd IS efficient. The hard truth is that it outperforms every other init system and it's not even close.

You could argue "well you don't need a fancy shmancy init system at all!!" - but even embedded applications grow and new requirements are added. Then what? Your "efficient" solution sucks, and isn't fast. Whoops!

comment 2y ago · link · parent

> We should not be so open-minded that our brains fall out, but we should also be very wary of repeating our old mistakes

Precisely, which is why it makes absolutely no sense to me to say that AI can't be granted a right to freedom.

I mean, what are you even arguing here? Do you not understand that this statement is in support of my position, not against?

> Sentience is the ability to feel. All that's needed for learning is the ability to perceive and have thoughts.

Highly debatable. You just made this up. These aren't the definition of anything. Once again, you need to bring something tangible to the table or people will call you crazy.

> therefore I see no reason to connect the two

Once again, this is your problem here. You're starting off, beginning, with an assumption that favors your stance. You can't do that, especially when said assumption has never, not even once, been true for all of human history.

Au contraire, I see no reason NOT to connect the two and you certainly haven't given any reasons why. These rights have always, only, applied to humans. I say we retain that status quo until someone gives something to show otherwise.

comment 2y ago · link · parent

> It’s hard to image scenarios where the American economy shrinks while other countries have growing prosperity

I don't understand this viewpoint - this seems like the obvious end result of the last 50 ish years of tomfoolery.

The US doesn't make anything anymore, our economy is purely theoretical. We're lying on a huge scale and scamming, and that's how we have our economy. We gave up entire industries - and almost all of them - to foreign countries. China, Korea, Japan, Bangladesh and on and on.

Yes, these companies are "American". In name only. All the capital, all the means of production - which is the actual "economy" here - is being held by not us. We literally just gave up our means of production.

What we did then is made up a bunch of fake jobs to justify these companies in the US and to extract money from these developing countries.

It's only a matter of time before they wisen up and realize they have all the capital.

Granted, not all industries are like this. Just most.

comment 2y ago · link · parent

> Indentured servitude prevents switching jobs

No it doesn't, you're fully allowed to switch once you've paid off your debt. The debt that people chose to take on in exchange for housing, transportation, a new shot at life.

That's not my argument of course, but it's a hypothetical argument if you want to appeal to the "free market always good" type people.

> If Amazon doesn't like a worker, they can fire them.

> If a worker doesn't like Amazon, they can quit.

False dichotomy, you've run head-first into the hypocrisy of modern Capitalism. These actions do not have equal power because the labor market is not a free market.

Amazon firing a worker can literally cost them their life, whereas a worker leaving does nothing to Amazon. This is because the labor market is almost perfectly tipped, rigged, in the employer's (buyer's) favor.

In order to fix the leverage and create a free market, the employees would need to unionize, which is the correct solution here. Then, if Amazon does something evil, the employees can say "fix it or we walk" and that actually means something.

> The people who choose to work at Amazon want to work there

Your understanding of choice is infantile, almost comically so. You're purposefully leaving out the pressure of life from this decision. I think you'll find starvation a powerful coercive technique.

comment 2y ago · link · parent

> because people are too lazy to write their own init scripts

Why would I bother writing an init script when an existing solution, written in C, is right there?

comment 2y ago · link · parent

I don't know where this widespread hallucination that systemd is "forced" came from.

You're allowed to use another init system, and the distros CHOSE systemd. Nothing is stopping you, it's just that nobody does it because:

1. Pretty much nothing is as good as systemd as a whole project. Stringing together 30 random packages is a huge pain.

2. Other init systems are much slower, and turns out people care about performance.

3. Other init systems are less functional, with less features which some users want.

4. Writing a competing init system is very hard, while complaining is both easy and fun.

In the hypothetical case of Alpine switching to systemd, you're 100% free to maintain your own Alpine distro or even maintain your own init system or just switch to a different one.

comment 2y ago · link · parent

Why are these the only options? Because you said so?

Other truckers have UNIONS. Their cockpit recorders can only be accessed under strict guidance and policy - not willy nilly to piss off the truckers. Plus they get reasonable quotas so they don't have to bust their asses and drive sleep deprived.

> the solution in a free market...

... is to create a fair labor market. The labor market is not a free market, because companies have infinitely more leverage. If you're truly a free market activist, you must be pro-union. Introduce a little competitiveness into hiring practices.

comment 2y ago · link · parent

This argument is absurd. You can tell how absurd it is because if you just take it to it's logical conclusion, suddenly you're supporting indentured servitude in Dubai.

Do you support that? Almost certainly not. So the only resolution is you don't actually believe this argument.

comment 2y ago · link · parent

> but I wouldn't personally dismiss the intent and approach out-of-hand

I would. Every time I've seen an Amazon driver they're busting ass, sprinting across lawns. Of the drivers I've talked to it's incredibly stressful, and to make your quota you have to drive a bit more "confidently". And let's not even get into the piss bottle stuff.

If their intent was truly safety, they would probably want to start there. But they're not. Because keeping high quotas is important for the bottom line. Hiring employees, scaling vans and infrastructure is expensive. So it follows to optimize cash you squeeeeeeze each employee as far as they can go.

comment 2y ago · link · parent

> no listening to music

Do they get to keep a gun in the glove box? You know, for when they need to kill themselves?

comment 2y ago · link · parent

> Huh?

Okay we have to stop with this "huh???" nonsense. You knew what he meant, stop trying to make people seem unreasonable (yes, that is the purpose of this "huh?" even if you don't realize it)

This isn't Reddit.

comment 2y ago · link · parent

Is talking while driving illegal and I somehow missed it?

Do y'all just ride absolutely silent when you have passengers or...?

comment 2y ago · link · parent

There's also nothing wrong with talking on the phone with a hands-free device. It's equivalent to chatting with a passenger.

comment 2y ago · link · parent

Because the US is obsessed with 3 and 4 way stops whenever they can (as opposed to a roundabout).

It's trivial to make a roundabout have yield signs. Some roads here are like that, where every 4-way intersection of stop signs is now a yield + roundabout. You can theoretically get all the way through without stopping.

But you can't have yields at a 4-way stop. Connecting 2 perpendicular roads at low speed is an incredibly common problem - the US chooses to do it in a stupid way.

comment 2y ago · link · parent

> Do you have any non-fictional examples

When George Floyd was killed news stations, independent journalists, and everyday people were trying to find any and all crimes he MAY have committed in the past that would justify his public execution.

As if any past crime could justify a public execution. This is the US, not revolutionary France.

comment 2y ago · link · parent

Sure, but that's only a fraction of the equation. You need cloud people your side too, otherwise how do you build the software?

comment 2y ago · link · parent

> I can select a PDF and ask for facts from it and page numbers where the information is

You can already do this, press ctrl-f and search. Boom, done.

LLMs don't solve new problems much - rather they give you a new INTERFACE into a solution. Natural language.

Before you'd use commands, specific software, processes, formats, configuration. Now you can use natural language (maybe sometimes). To me, this isn't a break through.

comment 2y ago · link · parent

It is relevant, because you require expertise to make rules. That seems fairly obvious to me but I suppose some segments of the political spectrum advocate blind rule making.

> delegated to congress

Right, and Congress has made that law, and that law says it's delegated to the FTC. What, Congress is simultaneously expected to make every single rule ever but they don't even have the rule making power to... delegate? That's too far? Seems absurd to me, almost intentionally insane with the end-goal of kneecapping rule making as a whole.

comment 2y ago · link · parent

Congress already made the law. The law says "these guys make the rules". To me, that counts.

The issue is that congress are not experts. They also move really, really slow.

I don't expect my congressmen to know if Red 40 is safe to consume, how much can be consumed, if it should be reported as an ingredient, etc. There's thousands of ingredients in food, I imagine. If that was written into law the law would be very long, no?

And then wouldn't it go out of date remarkably quickly? Hence, we have the FDA. They know about Red 40 and also medication.

What level of specificity do we actually need here? Does Congress need to list out, specifically, what molecular compounds are and are not allowed? That seems absolutely absurd to me.

It seems to me that once we get to the FTC or <insert any federal agency you personally disagree with>, suddenly the rules change and congress does need to be absurdly specific.

Funny how that works.

comment 2y ago · link · parent

You're in luck, Windows shutdown is now actually hibernate (and has been for a few years). So if you just shutdown your laptop, you've been using this hibernate for a while. Turns out all those people saying "shut down your laptop before you close the lid!" were actually right.

comment 2y ago · link · parent

I'd say Apple is even more arrogant, but at least their software is arrogantly functional.

Maybe I could look past this sleep nonsense if their super cool new sleep actually worked. But it just doesn't, instead it cooks your laptop 10% of the time and it you open it up and it's dead.

comment 2y ago · link · parent

> Chances are, the computer will break or be replaced in five years or less.

I think this is less and less true as time goes on. I have a laptop from 5 ish years ago I still use and it's actually pretty fast.

And, even so, it's not like the ONLY wear on your SSD is the hibernation. So this 5 year figure, I'm not sure it's right. I think, maybe if you're someone who stresses your hard drives a lot (maybe you work with photography or videography?) hibernation might make an impactful difference.

comment 2y ago · link · parent

> That's not the case with S3

How is this the case? Suspend to/from RAM on Linux wakes up in less than a second in my experience. Which makes sense, because everything is still in RAM and systemd doesn't need to do a bunch of work to get everything back online. Maybe Windows has a weird implementation of S3?

comment 2y ago · link · parent

> They are not one market, in any sense.

I agree, but there is a venn diagram here. Many use cases are covered by both products. As time goes on, the venn diagram gets closer to a circle. An iPhone of 2008 was a niche device, but nowadays you can complete 99% of tasks completely on an iPhone (yes I made up 99%, just pretend it's some number higher than it once was).

I think, for most adults, their primary personal computer is a smartphone. Many, not sure of the numbers here, don't own a laptop or desktop at all. They may have one for work, though.

1
414243
54