I get by without modules or header files in my C++ projects by using the following guidelines:
- Single translation unit (main.cpp)
- Include all other cpp files in main
- Include files in dependency order (no forward declarations)
- No circular dependencies between files
- Each file has its own namespace (e.g. namespace draw in draw.cpp)
This works well for small to medium sized projects (on the order of 10k lines). I suspect it will scale to 100k-1M line projects as long as there is minimal use of features that kill compile times (e.g. templates).
You still organize the big file into sections to keep things together that are semantically related. For Git it mostly doesn't matter whether it's 100 small files or a single big one.
Reid Hoffman seems to be one of the few SV founders with a spine. The rest are content to do business with authoritarian regimes as long as profits keep flowing.
Why is this article flagged? It's directly relevant to the readers of HN.
This is a nuanced point that anti-science people often get wrong.
The existence of fraudulent studies, dishonest researchers, the replication crisis, etc. does not invalidate science as an institution. It just means we need to be careful about distinguishing between individual opinions and the scientific consensus. We also need to keep in mind that the consensus is never 100% correct; it's always subject to change and we need to update our beliefs as new evidence comes in.
Ironically, being anti-science is pro-science. Skepticism of institutions and consensus is the scientific method.
The main reason being scientific consensus can lag reality significantly, especially when career incentives discourage dissent. The history of science includes many cases where consensus was wrong and critics were marginalized rather than engaged.
Deference to science as an authority is the opposite.
Feynman has a quote on this:
"Science is the belief in the ignorance of experts. When someone says, 'Science teaches such and such,' he is using the word incorrectly. Science doesn't teach anything; experience teaches it. If they say to you, 'Science has shown such and such,' you might ask, 'How does science show it? How did the scientists find out? How? What? Where?' It should not be 'science has shown' but 'this experiment, this effect, has shown.' And you have as much right as anyone else, upon hearing about the experiments — but be patient and listen to all the evidence — to judge whether a sensible conclusion has been arrived at."
Somewhere there's a quote about how the old guard has to literally die out before certain new ideas can take root; even if the new idea is obviously correct.
I think we've been pampered by a few hundred years of rapid "scientific advancement" and now we're firmly in the area where things are not grade-school science fair easy to see or prove.
"A new scientific truth does not triumph by convincing its opponents and making them see the light, but rather because its opponents eventually die and a new generation grows up that is familiar with it." - Max Planck
>Ironically, being anti-science is pro-science. Skepticism of institutions and consensus is the scientific method
skepticism is necessary, but not sufficient.
if they merely nay-say institutions and then go with their gut, it's certainly not.
only when someone attempts to rationally disprove a position, offering alternate testable theories and actually performing those tests is science done.
if you suspect an institution is wrong, that's fine, but it's just a hunch until someone does a test.
I was a witness of wrong prescribing medication by doctors many time. For example Novalgin for mother releasing from hospital after painful birth. This medicament is not suitable for breastfeeding mothers!
> Skepticism of institutions and consensus is the scientific method.
Which is why one of the core tenets of practicing Science is “trust, but verify”.
Science is based on the trust of what came before.
But the fallible, ego-driven, and dishonest nature of humanity means that trust alone cannot be relied upon. Hence the “but verify”. That is why replication studies and falsification tests exist - to cull that which cannot be reliably replicated.
Unfortunately, capitalism has stepped in and f*ked up even that, when for-profit universities who rely on public funding place “publish or die” mandates on researchers. This makes any repeat experiments untenable because it takes researchers away from publishing new data. So they just cite prior papers and chase the latest shiny -- because their continued employment is predicated upon publishing.
We have perverse incentives in place that have distorted science, sure. And almost all of these distortions come directly down to a violently coercive economic system that forces you to be profitable to someone else least you suffer homelessness, destitution, and even death.
But what else is there? Belief in an insane, evil, and omnicidal sky-daddy?
Sorry, but no. We should counteract the sources of distortions by crushing capitalism and the corrosive influence of money, not switching over to systems that have always proven themselves to be supremely untrustworthy.
Skepticism needs to be calibrated based on the weight of the evidence. There's a broad spectrum from being skeptical about the latest overhyped study in subfield X to being skeptical about quantum mechanics. If you want to challenge established science, you need to bring the receipts. To quote Carl Sagan, "extraordinary claims require extraordinary evidence".
We can only have "scientific consensus" in maths (and even there there are doubts), every other science is a social science if one digs hard enough. Even particle physics.
It means we need to be careful about distinguishing scientific consensus, and truth. Science can be used to find truth, but that is the science itself, not the consensus.
The mistake is thinking of entertainment as a fungible resource. Film is its own art form. The novel is its own art form. They serve completely different purposes and each gives the audience a unique experience that can't be replicated in any other medium.
It's sad to me that people think like this. It's a very limited and superficial way to experience the world.
Giving a certain number of hours dedicated to passive entertainment, many more people prefer to watch a terrible tv show on Netflix than to read a masterpiece of literature.
It could be because the tv show is more "entertaining" (which is tautological), a desire for social conformity (people can discuss more easily with others the latest tv show than Anna Karenina), or escaping the cognitive effort required when reading literature, which is almost always greater than the one asked for when watching a movie or tv show, or a tiktok.
It's not even about quality. I consider films like There Will Be Blood or TV shows like Deadwood to be comparable in quality to the greatest works of world literature. I've also gotten a lot of joy and entertainment out of reading crappy books.
My problem is with statements like "paper is an inferior entertainment platform". To me, this is assuming that these different media are fundamentally providing the same kind of experience, which I disagree with.
I see your point about the cognitive effort of reading, though. I guess it depends on how fluently one can read, which depends on how much exposure to books one got as a kid.
The problem is that you are talking about your experience, and not about the distribution of experience of people, which is why I wrote "at the population level".
For the more intellectually sophisticated person (does not mean "better" person, to be clear), "entertainment type" is not fungible (movies as art, advertisement as investigation into the psychology of the masses, etc.) but for the vast majority of people, it is just a way to spend time.
You are referring to critically acclaimed movies and tv shows, but for the majority of people, leisure time in front of the tv is not spent bouncing between Fellini, Von Trier, PTA, Kubrick, et similia, but binge-watching the latest terrible Netflix tv show.
It is the same with food: we like to think that what prevents the masses from enjoying fine dining is the cost of the experience, but in reality, to many (myself included, most of the time), French fries with mayonnaise, a burger, and some ice cream is just a better proposition.
I disagree myself wiht the statement that paper is inferior, entertainment-wise, to tv, games, and tiktok--they all overstimulate me, I feel dirty after being on tiktok for 20 minutes and I feel as clean as a whistle after reading for 3 hours, in addition to the subtle intellectual stimulation I get from reading-- but in terms of choices made by people, books are certainly the losing party.
The comment I am responding to is referring to their own experience, which, at the population level, does not appear to be largely shared, as, at the population level (i.e., people in general, not intellectuls, not academics, all of them), it is evident that people consider tv shows, games, and tiktok superior (i.e. revealed preference) forms of entertainment with respect to books.
How was it not clear? I would prefer to engage with more substantive comments.
What's not clear to me is how aggregate preferences about entertainment media should affect my choice of entertainment media. TFA is worded to suggest that because "nobody" reads fiction, it should be dismissed when considering what to read.
I'm perfectly willing to accept that most people prefer Netflix to Umberto Eco. However, I don't. And that is one reason I reject the analysis in the article.
Sure, I don't think anybody is forcing you or anybody else to watch Netflix or play GTA instead of reading a mystery novel.
I find those types of articles and the comments following them to be starting points for broader conversations. In this case, broader than "I like to read books, and I will continue to do so".
As always: use standard libraries first, profile, then write your own if the data indicate that it's necessary. To your point, the standard library probably already uses the OS primitives under the hood, which themselves do a short userspace spin-wait and then fall back to a kernel wait queue on contention. If low latency is a priority, the latter might be unacceptable.
The following is an interesting talk where the author used a custom spinlock to significantly speed up a real-time physics solver.
> which themselves do a short userspace spin-wait and then fall back to a kernel wait queue on contention.
Yes, but sadly not all implementations... The point remains that you should prefer OS primitives when you can, profile first, reduce contention, and then only, maybe, if you reeeally know what you're doing, on a system you mostly know and control, then perhaps you may start doing it yourself. And if you do, the fallback under contention must be the OS primitive
With Windows 10 EOL, I had to decide whether to upgrade my laptop to Windows 11 or Linux. I've been a Windows user for decades, but with all the user-hostile bullshit coming out of Microsoft and the degradation of performance on Windows 11, I decided to go with Ubuntu instead.
I'm still on a Windows 11 desktop for the time being, but seriously considering switching there as well. The main thing stopping me is the undeniably better ecosystem on Windows for professional video editing and music production, with no comparable open-source options. I've spent hundreds if not thousands of dollars on high quality virtual instruments and effects plugins. But if I can manage to run these under emulation on Linux or find equivalent Linux-native versions, I will happily abandon all Microsoft products at this point.
Recommend to split your music workstation from your personal files machine to get some privacy back. Then run cleanup scripts to pare Windows down to the bone. Also Mint over Ubuntu.
Why Mint over Ubuntu? I like the Ubuntu experience out of the box. It seems to handle high-DPI and per-display UI scaling well, due to Wayland. From what I've read, Mint still uses X11.
Not all casino games are played against the house. The best analogy would be a game like poker, where the house takes a small percent of every pot (the rake). Other than that, money changes hands between players. The game has an element of randomness and luck but there is also a large element of skill. Players have a wide range motivations and skill levels, from casual players and thrill-seekers to professional players.
Prediction markets perform the valuable function of information aggregation, at least in theory. When there is a financial incentive to make a correct prediction, the market should converge on the probability an ideal observer would assign to the event.
Of course in practice, there are issues like low trading volume, market manipulation, etc. And whether or not a particular market is performing better than, say, super-forecasters or experts in a given field is an empirical question.
That said, it seems a bit excessive to dismiss prediction markets as merely gambling platforms that add no value to society.
I listened to the song in question. It's truly awful. Simplistic and cliche in every way musically possible, and it sounds like it was written about 15 years ago at the height of the indie folk craze.
That said, it shouldn't be illegal to like trash, or to make money off of trash if people want to buy it. It's trivial for a human musician with moderate talent and experience to make better music than this. The musicians who are afraid this is going to replace them are probably not doing much original or creative in the first place.
>or to make money off of trash if people want to buy it
The article is about a chart, not a distribution platform. Regardless, we make laws controlling the ability to make money off of things people want to buy all the time - laws protect humans (idealistically) and our economy/incentives (realistically).
>The musicians who are afraid this is going to replace them are probably not doing much original or creative in the first place.
This is a lie. People of all creativity/originality levels are justified in believing that AI will improve.
You're right, I shouldn't have used the word "illegal". But banning something from the charts is basically saying "people are wrong to listen to this". Why can't people make up their own minds about what to listen to?
I think the end product is what matters, not what tools were used to make it. I don't see a principled argument for drawing the line at AI tools but not other software tools like DAWs or plugins that generate chord progressions and melodies using techniques other than machine learning.
They can listen to it, it's just not being considered to be in the charts. You are again implying something that isn't there, people do listen to this crap but the chart producers created a rule for their system where it won't show there.
No one is stopping people from listening at all, it's just someone's rule for their thing, nothing else.
>Moxie Marlinspike sounds like some 90s intelligence guy’s understanding of what an appealing name to hacker groups would sound like. Put a guy like that as so-called creator of some encryption protocol for messaging and promote the app like it’s for secret conversations and you think people won’t be suspicious? It screams honeypot like nothing else.
This criticism has absolutely zero substance and honestly just reads like paranoid rambling. The Signal protocol has been independently formally analyzed [1] and has no known security issues.
The example you linked is about push notifications in general, nothing specific to the Signal app. If the concern is that your OS is compromised or spying on you, that's not something E2E encryption can protect against, whether it's Signal or any other app.
I don't think so, you could use the official Linux build as far as I know. I think it needs a phone number but not necessarily a mobile device. I might be wrong though.
> Are you against using an Android (or LineageOS) emulator to do so?
1. It's annoying and inconvenient.
2. It's the result of an artificial restriction by Moxie, for which I can't see any good reason, making me suspicious. In my opinion, this is basically an attack on true mobile freedom.
3. I do not believe in a good app isolation of Waydroid, so I would prefer to use as rare as possible. I also do not trust Android too much. And I will have to run two Signal apps simultaneously.
- Single translation unit (main.cpp)
- Include all other cpp files in main
- Include files in dependency order (no forward declarations)
- No circular dependencies between files
- Each file has its own namespace (e.g. namespace draw in draw.cpp)
This works well for small to medium sized projects (on the order of 10k lines). I suspect it will scale to 100k-1M line projects as long as there is minimal use of features that kill compile times (e.g. templates).
reply