2,663 karma · joined February 19, 2012
>And going further with the sea-of-nodes representation just makes them all more powerful; I really do recommend reading Cliff Click's thesis.
We might have to agree to disagree on this one. I actually found sea of nodes to be a boneheaded idea. It makes one or two optimizations a little more elegant but everything else a huge pain in the ass. At least, that was my experience.
Sure, a graph representation is nice, but that isn't a unique property of SSA. You can have graph IRs that aren't SSA at all.
And sure, SSA makes some optimizations easy, but it also makes other operations more difficult. When you consider that, plus the fact that going into and out of SSA is quite involved, it doesn't seem like SSA is worth the fuss.
So why SSA?
Well, it turns out compilers have sequencing issues. If you view compilation as a series of small code transformations, your representation goes from A -> B, then B -> C, then C -> D and so on. At least, that's how it works for non-optimizing compilers.
For optimizing compilers however, passes want to loop. Whenever an optimization is found, previous passes should be run again with new inputs... if possible. The easiest way to ensure this is to make all optimizations input and output the same representation. So A -> B is no good. We want A -> A: a singular representation.
So if we want a singular representation, let's pick a good one right? One that works reasonably well for most things. That's why SSA is useful: it's a decently good singular representation we can use for every pass.
You might like this article I wrote on the backend: https://pubby.games/codegen.html
It's a spectrum of course. The friends you describe sound like they fall somewhere in the middle of caring about politics vs not. My point of discussion is on the people at the low end, as these are likely to swing. People past a certain threshold of attachment have had their votes locked in for years.
Having a chance to talk to more people in meatspace this year, it was a surprise to find out how many people have only a passing interest in politics, but still vote. Like, the average user here probably reads 5+ news articles a day, but there are plenty of people IRL that will read one a month, or maybe just skim a headline. They don't really keep up-to-date with the race. They mostly vote by feel and pragmaticism.
People always talk about "shy" Trump voters, but what makes me more curious are voters that match the description above. If you put someone in a voting booth who isn't interested by news, who do they vote for? I mean, Trump has a lot of surface-level qualities - he's a tall, confident white man who's a successful boss of business and an anti-establishment outsider - and maybe that's enough to capture this demographic.
In C++ you just drop in std::string and go.
And then half the time it's just your compiler being stupid.
As an adult, I realized buying new was idiotic when I could just buy used. I ended up buying a former lego employee's collection for $60, selling the monorail it contained for $1000, and keeping the massive washing-machine sized rest for myself. Too bad deals like that come once in a lifetime!
Reviews for physical items are super inaccurate. The average consumer doesn't have the money to buy 10 laptops and compare them, so they buy one and hold a biased opinion about it. In 5 years when shitty battery and defective hinge become apparent, the laptop is already off the market and the user isn't interested in reviewing it.
Besides, a ton of reviews are fake these days. You just can't trust them anymore. And for many products, the manufacturer cheapens them oven time without telling the public. So a review from 2 years ago may not reflect the quality of today.