MurphyA/hacker-news huggingface dataset:
by nathell | 2025-05-30 11:15:38+00:00
My pet peeve with C++ RAII is that it uses destructors for cleanup, so it can’t throw an exception from within the destructor if that fails somehow. E.g. from the manual page of close(2):

> A careful programmer will check the return value of close(), since it is quite possible that errors on a previous write(2) operation are reported only on the final close() that releases the open file description. Failing to check the return value when closing a file may lead to silent loss of data. This can especially be observed with NFS and with disk quota.

Last time I checked, GCC’s implementation of ~ofstream() ignored failures from the underlying close().
by kragen | 2025-05-30 11:16:17+00:00
I appreciate the correction and amplifications. Archimedes was killed by a soldier of Marcellus, not Sulla.

For me the central problem of the Index was not so much its secular effects (though it is easier to find those than you say; the secular prohibition on teaching Descartes, for example) but that by its nature it proclaimed that ignorance was a moral virtue.
by flohofwoe | 2025-05-30 11:17:00+00:00
Because shared_ptr (and also unique_ptr) nudges you towards keeping each object in its own heap allocation, and that quickly gets inefficient with large number of objects. E.g. a handful of large objects managed through shared_ptr is usually fine, but managing many tiny C++ object individually through smart pointers usually isn't. Instead store large groups of objects of the same type and similar lifetime by value in a std::vector (and then maybe put that std::vector behind a smart pointer).

Also if you lean in too much on shared/unique pointers for large amounts of tiny objects you'll most likely end up in a situation where Java-style garbage collection would be more efficient.

E.g. manual or semi-manual memory management is mostly about controlling the overall memory layout of your application's data to improve throughput, reducing the number of individual heap allocations is just a useful side effect.
by _zaey | 2025-05-30 11:17:34+00:00
Bouldering (indoor climbing) is the most social sport I’ve tried, and I’d highly recommend going on your own as you will find opportunities to meet new people, and others will talk to you (as long as you’re not wearing headphones!).

Bouldering provides an open space you can move freely in, with no inherent social hierarchy (no tutors, teachers), just people trying varying difficulties of bouldering routes. If someone can do a route you can’t, just ask them for tips, or if someone can’t do a route you can, ask if they want help, or cheer someone on when they do something difficult.

Bouldering provides lots of easy conversation starters, and as with all social situations, going on your own and showing vulnerability will always be endearing to others.
by SideburnsOfDoom | 2025-05-30 11:17:40+00:00
> It took so little, too: good (but not great) salaries, mediocre tech, and a small amount of fearmongering.

IDK, I think a major motivator was the "American dream", stories of the few who though talent, hard work, being at the right place and the right time, and a lot of sheer dumb luck, got immensely rich.

"the hackers see themselves not as exploited office workers but as temporarily embarrassed billionaire start-up founders." to paraphrase Steinbeck.
by diggan | 2025-05-30 11:18:13+00:00
> because I wanted to have an FM radio for emergencies

Just make sure you have batteries/a way to run it!

When we lost electricity for 1.5 day here last month (Spain), I thought I'd be clever and use my SDR too, but since we didn't have electricity at all, and none of my laptops were charged, I was out of luck. Wife's Macbook had battery available, but since I never used it with her Macbook, of course it didn't have the software/drivers needed, and the internet didn't work as all ISP equipment was also without electricity. Ended up listening to the radio in the car which was more than cumbersome :/

TLDR: get a shitty battery/hand-crank powered FM/AM radio for emergencies
by rxtexit | 2025-05-30 11:18:13+00:00
I think many people just settled in while we had no real technological change for 15 years. Real change, not an update to a web framework.

When I graduated high school, I had never been or knew anyone who had ever been on the internet at all. The internet was this vague "information superhighway" that I didn't know really what to make of.

If you are of a certain age though you would think a pointless update to react was all the change ever coming.

That time is over and we are back to reality.
by 6stringmerc | 2025-05-30 11:18:14+00:00
See, the tariffs are working as they traditionally do - in that they are turning nations into scenarios where they look to local development rather than importing. Unintended consequences resulting in the US being on the losing end? I’m not surprised in the least considering the clearly sunsetting mental state of a failed businessman narcissist trying to run the nation via social media and spurious dictates.
by grues-dinner | 2025-05-30 11:18:15+00:00
Modern C++ does give you move semantics, which makes RAII a lot more expressive, especially with smart pointers.

One things about RAII that I find is that, a bit like inheritance, it's actually not something you have actually do nearly as much as the emphasis it gets in the first chapters of all the books implies. How often do you actually write a move constructor or even a destructor in workaday code? Most of it is done for you by the stdlib (unique_ptr, say) or libraries. Of course it needs to be understood, and understood well, but it feels like landing a plane: you have know it well and it's not unusual and certainly not wrong, but also flying is mostly doing things other than landings.
by andrewzeno | 2025-05-30 11:18:49+00:00
Features that make the same browser binary have a different browser fingerprint with a fresh user profile.

For example, faking location data, fonts, browser version, user agent, ssl certificates, available browser features, etc. Different anti-detect browsers offer different sets of features, but none will allow you to, say, pretend to be a Firefox user on Linux when you are a Chromium user on Windows, because it is possible to detect the engine and underlying system based on JavaScript and CSS behavior, if the website really wants to know that.

AFAIK, the most common use case for anti-detect browsers is competitive research, bypassing restrictions (not just location-based), and emulating specific user profile.
by fakedang | 2025-05-30 11:20:07+00:00
> Again, in transliteration, those names are all different ways of spelling the same word, borrowed even from Sri Lankan Tamil, even. It is unclear whether they are descriptive of a variety, or they are just varying because a different chef in a different region wrote in Latin characters in a different way.

This is what I was arguing against. All of the above examples I quoted are different products with just the same root word. The only similarity might be the base ingredients and the shape.

> It is not my favorite appetizer, but the restaurants all seem to prepare them about the same. This is in the American Southwest with restaurants advertising cuisine of North India (vegetarian), Punjab, New Delhi, Pakistan, etc.

That's because all of those restaurants are still North Indian cuisine. A South Indian restaurant will have the other kind. And honestly, they aren't supposed to be eaten as appetizers, but rather along with the meal. The pappadom with chutney and sambar combo was something I only learnt of when I went to the UK the first time.
by lurk2 | 2025-05-30 11:20:14+00:00
Interesting notes. I’ve made a few of these observations on my own and came to largely the same conclusion; clinical psychiatry is inherently normative. Viewing behavior as disordered in particular requires a frame of reference for what constitutes desirable behavior.

Humans being made to conform to the requirements of (industrial) society, rather than the other way around, is one of many cart-driving-the-horse norms that emerged around the turn of the 20th century; the invention of jaywalking, mills waking up entire towns with steam whistles, leisure time being sacrificed to purchase consumer goods, etc.

There is a balance to be struck. It’s entirely natural that the behavior of every individual will need to be regulated to the extent that coordination is possible (else, it becomes impossible for us to even engage in a conversation mediated by language); even so, there is a tendency to assume that it is the duty of the individual to radically change himself, or else to be blamed and categorized as a good-for-nothing in the event that he fails to so change himself. This can appear sensible until it is considered that small accommodations here or there will not inconvenience us much, but will make a world of difference to the person being accommodated.

Where this gets complicated is when we get into issues of affirming delusion or being asked to make accommodations for behavior one considers to be immoral, but I suspect that the world would be a substantially more pleasant place to live in if people gave more consideration to the different manners in which we could all potentially be living in it.
by 0xEF | 2025-05-30 11:21:00+00:00
Sort of. We have to understand what a SARA project is, how and where DSP would be employed, etc...hence why I mentioned its pretty niche. Radio astronomy, from my outsider understanding, is not something a newbie just walks in the door and picks up on. You have to have some experience with typical SDR use, data collection, etc.
by ninkendo | 2025-05-30 11:21:29+00:00
> Languages with GC-managed runtimes (Java, C#, Go, Swift, et. al.)

Swift does not have a GC managed runtime in the same sense as the other languages you listed [0], it’s basically a bunch of refcounts inserted by the compiler, with similar performance characteristics to Arc in Rust or shared_ptr in C++. (For classes, at least. Structs are value types and stack-allocated.)

[0] Yes, automatic refcounting is a form of garbage collection, but Java/C#/Go use tracing GC’s and not direct refcounting, whereas with Swift it’s more like the compiler is wrapping all objects in a shared_ptr for you, and so destruction is explicit and happens at exact points.
by ch_sm | 2025-05-30 11:21:45+00:00
> But I was surprised by his choice of Bang & Olufsen for music. For example, his Sennheiser headphones are mostly for hearing sound as it is, while B&O always tries to 'enhance' sound in their own way. It doesn’t match much.

I feel like I can identify with that. I have a pair of AKG studio headphones for recording music and listening for "mistakes" in mixes, but otherwise mostly B&O Hi-Fi speakers. To me, the sound is more "immersive" and emotionally captivating than e.g. studio monitors, and they still have lots of detail. (Plus, there’s the issue of them looking as nice as they do and being very easy to set up — it makes them easy to live with). Just my 2 cents.
by bluGill | 2025-05-30 11:22:09+00:00
productivity counts not hours. If you can get the same work done faster then you cost to the company is lower even - possible even if your salery is higher.

though it isn't clear how much of rust's increased productivity is caused by being a new language where the architecture mistakes of the past decades are not slowing you down. We will need several more decades to answer that.
by williamdclt | 2025-05-30 11:22:20+00:00
> that’s not the story that the article was telling.

It is though? Reading the article, I'm fully getting a sense that its point is that it was an improvement for everyone (despite the article describing it as being triggered from nagging from the women).

Now you can choose not to believe that, but that _is_ the story the article was telling, or at least it's how I understand it.
by m4rtink | 2025-05-30 11:22:21+00:00
Wasn't Ireland used for tax evasion for a long time ? Wondering if that might be somehow related & how irish some of those companies are in practice.

Also there are quite a few successful gaming companies in central and eastern Europe - like CD project (Witcher/Cyberpunk) in Poland and Factorio, Mafia, Kingdom Come from Czech Republic.

Also on the IT driven services are there are quite big companies like like Alza/Allegro (eq. local Amazon), Seznam (eq. local Google), Windy (weather), etc.
by iamtoomas | 2025-05-30 11:22:46+00:00
It has happened to me previously also using BOTH namecheap/godaddy, back then I just shrugged it off, but this time it really pissed me off...

So I guess the best bet is to check for domains on the ACTUAL ENTITY PROVIDER who provides domain names to resellers, such as:

https://www.verisign.com/en_US/domain-names/domain-name-sear...

Plus their brainstorming feature is one of the best out there IMO.
by green7ea | 2025-05-30 11:23:22+00:00
Author here, what you say is entirely correct — I didn't emphasize enough that this was all possible before in a more limited way. Those parts were cut out to try to make the article more focused on understanding RAII.

The modern parts covered in the article are the move semantics making RAII more expressive and the standard library embracing the concept throughout.

I think the idea of modern is to convince everyone to give these 'new' techniques a try if they aren't already using them.
by incomingpain | 2025-05-30 11:23:42+00:00
What's particularly interesting to point out, Japan doesnt even really get impacted by the 2030 worker shortage. If you're Germany, Russia, Brazil, Canada, Mexico, or south korea its a set-in-stone reality that by 2030 your economy screeches to a halt. The workers in 2030 are already born.

The above countries are going to go through ~20% drops. Japan is only going to go through 5% drop and they've analyzed that it's a crisis.

Germany and Canada chose their path. Fill the gap with world war level immigration. Million immigrants per year from now until 2030 and we only drop 14%. Also offer government assisted suicide to the elderly and low productivity people.
by motorest | 2025-05-30 11:24:00+00:00
> It is a diservice to C++, to paint RAII as modern C++.

I think you're missing context. The term "modern C++" is used to refer to idiomatic C++ introduced in C++11. It has been that way for a couple of decades.

https://learn.microsoft.com/en-us/cpp/cpp/welcome-back-to-cp...

The article touches on the topic of move semantics and move constructors. That's modern c++. That's not your C++98 RAII.

In the same vein, "modern CMake" is also the term used to refer to the declarative style that followed the release of CMake 3, which dates back years.
by tonightstoast | 2025-05-30 11:24:32+00:00
Both! Usually outdoor bouldering is a bit more of an undertaking to get into since you’ll have to travel and bring matts & additional gear. But look up “climbing gym” on google and you should be able to find some if you’re in a reasonably sized metro. Not sure if you’re in the USA but the southwest has a ton of great outdoor bouldering.
by mec31 | 2025-05-30 11:25:16+00:00
That’s not the way to look at it. The airline has a total cost hurdle for the flight to make sense. If they don’t cover that the flight doesn’t happen. So in a very real sense, your seatmate paying half what you are could be the difference between the flight going or not. As long as they are covering the direct costs of their flight (fuel, etc.) they are helping the flight take place at all. Since the assumption is the business travelers ‘really, really want that flight’ everyone benefits here.
by sketbr | 2025-05-30 11:25:31+00:00
Hey, I Launch my next game called Sheris ROOM: POWERFUL BALLS (Sorry for my english)

My game is fantasy topdown with enemy horde that tell story of pinguso cat named Kibo Carter that needs save your Syntezia planet of aliens colonizer for drinking your pinga again

Anything, you see my anothers indies games, I look a spammer-like, sorry for my past. I hope it doesn't happen again

The gameplay of sheris room is defeat colorful balls of enemies/monsters, when finalize kill monsters of room, you fall on sky for fight with bosses/aliens

My game is made with GDevelop 5, I spent $0 for make game, but i needs of a computer (If linux, is better OS) or android phone with no lag, OKAY

It took me 3 months for make this game, in the future. I make a new others high quality indie games made with me
by DaSHacka | 2025-05-30 11:26:00+00:00
GP was the one who specifically mentioned "some kind of tarrif on digital services", I merely responded in kind.

The technicalities of whether it's "tax" or "tariff" is irrelevant, in the context they both bring about the same desired outcome.

I skipped right past it because I understood what GP was getting at, and saw no need to get pedantic over the wording.
by Quanttek | 2025-05-30 11:26:21+00:00
> German Chancellor Friedrich Merz’s centre-left coalition agreed to “evaluate” a tax on internet platforms in its treaty signed in early May, agreeing that the proceeds should be used to strengthen the country’s media landscape.

Not sure in what world Merz's coalition could ever be considered centre-left. It's a coalition of the conservative party (which moved much further right under his leadership) and the centrist Social Democrats (who equally moved to the right/center under current and former leadership). Calling them "centre-right" could perhaps be acceptable, all while "conservative" is also a widespread label.
by flohofwoe | 2025-05-30 11:26:49+00:00
This is also a problem when an object referenced by a shared_ptr is destroyed much later than expected because some obscure part of the code still holds a reference to the object.

That's why in many situations it makes sense to have an explicitly called discard() method, while the destructor is 'empty' and only checks that discard has actually been called.

Of course that also means that RAII isn't all that useful for such situations.
by William_BB | 2025-05-30 11:27:02+00:00
I take the following approach: - Stack by default - Unique ptr if needed on the heap - Shared ptr if needed to share ownership

Although unique ptr is zero cost after make_unique(), I avoid polluting my heap unnecessarily. I've never benchmarked this though (keeping various objects on stack vs heap as unique ptr and how that impacts memory accesses)

I'm quite junior. Appreciate anyone pointing out if anything I said doesn't make sense.
by bravetraveler | 2025-05-30 11:27:03+00:00
> I wonder if I’m the type of individual it wishes would attend

You are! A more complete person than myself... and people won't leave me alone! When I hear "Loneliness Epidemic" I can't help but feel it's projection. They're lonely [or not making enough money] and want to convince me, too.

Your relationship search is a good example. People take self-exclusion personally. Why?

A bit of a tangent, but I'm disgusted with the prevalence of Alcohol. I've smoked with homeless people outside of concerts. I don't drink with my coworkers. You might be surprised which has been more of a problem.
by _zaey | 2025-05-30 11:27:10+00:00
In my experience people will start indoors and build experience before heading outdoors.

You could ask people in the bouldering gym whether they have any experience with outdoor bouldering and people will start sharing their favourite spots nearby, and might even invite you along.

Outdoors requires:

- your own climbing shoes

- someone with a bouldering mat

Whereas you will hire shoes from the bouldering gym as a beginner

You won’t need to bring anything to the bouldering gym other than a water bottle and some loose fit clothing
by _heimdall | 2025-05-30 11:27:19+00:00
Very cool! The docs here are a great overview of how MCP works, and a reminder to me of an old lesson:

We never should have abandoned REST. The whole point was for an interface to be self-describing; we wouldn't need MCP (or Swagger, or OpenAPI, etc) if we just stuck to REST instead of diverting down the JSON RPC route we've been on for 20 years.
by nathan_compton | 2025-05-30 11:27:24+00:00
No one is ever themselves, unmodified, when around other people. There are jokes and attitudes that are unacceptable in stereotypical masculine social situations too (having a feminine interest, for example, or simply speaking in the wrong way).

The Overton Window moves. It narrows and widens. That isn't the same as being unable to be yourself.

I agree that men should be socially allowed to have spaces where women are excluded and society does sort of tend to look down on that kind of thing, but I also think that in a world where many professional environments are still male dominated some sensitivity to the exclusion of women is warranted.

I mean plenty of jobs out there are still 95% or more occupied by men only.
by 90s_dev | 2025-05-30 11:27:58+00:00
About a year ago I bought the official C++ book and read through it fully (including most of the reference part) after finding out that Animal Well was written in it. It honestly seems like a very good and interesting langauge, if carefully used, especially for games where memory can be allocated at startup and held forever. Kinda wish I had an excuse to write some C++.
by 6stringmerc | 2025-05-30 11:28:21+00:00
“How does music affect the brain? The answer is, in lots of ways, and on multiple levels. From the most fundamental processes that recognise pure rhythm and beat, to the higher analytical regions that recognise and enjoy complexity and flow. That’s why music can so often be such a rewarding and enriching experience.”

…and this is why AI generated music sounds like shit, because the systems lack those evolved aspects of life, which coupled with emotions, create music.

I absolutely hope the AI sector is forced to pay musicians and writers for copyright infringement whilst trying to put them out of a job and devaluing the economic viability of an already repressed industry. You may disagree with this perspective - I happen to want US copyright reform to correct the overly long terms of protection Disney lobbied for - but I’d like you to present your arguments against my position in response so they can be given consideration.

Also if you’re pro AI music generation without compensation, then show me your playlist and prove to me there’s actually people in this world who listen to that shit. I’m genuinely curious how many pro-AI generated music evangelists actually turn off human music in favor of what they claim to support. Basically arguing against paying artists is a morally bankrupt straw man right now and should be set on fire at every opportunity.
by green7ea | 2025-05-30 11:28:33+00:00
C++ is a difficult language to use well but it becomes a lot easier when you turn on the 'correct' warnings. Turning on the `-Wdeprecated-copy-dtor` warning would help you not forget one of the cases in the rule of 3.

I would have loved it if this warning was on by default but sadly, you have to know to turn it on.
by grumbel | 2025-05-30 11:28:55+00:00
With shared_ptr you completely lose track who actually owns an object or when it will get destructed. It encourages sloppy programming and makes code much harder to read and reason about.

Unlike most languages that have ref-counting build in, shared_ptr also doesn't provide anything to deal with cyclic dependencies, so you can end up with memory leaks.

The most important reason however is simply that you don't need it like 99% of the time, unique_ptr provides enough functionality to work just fine as a shared_ptr replacement in most situations. And in the rare cases where you really need a shared_ptr, you can just convert a unique_ptr into one.
by znkr | 2025-05-30 11:29:16+00:00
When I switched from C++ to a bunch of other languages, I missed RAII initially. However, I quickly learned that other languages just do it differently and often even better (ever had to check an error when closing a resource?). Nowadays, I think that RAII is a solution to a C++ problem and other languages have a better solution for resource management (try-with-resources in Java, defer in Go, with in Python).