@AdamTornhill Please DON'T do this.
What was once a direct lookup table access + jump is now (basically always) an entire process of hashing, iterating, checking and THEN jumping. 12-24 clock cycles are now often more than 2000, (depending on implementations, access time/amount, etc)
@tsoding it seems to me like it's a useful mechanism.
Very often if you load asset foo1 you want to load foo2 and foo3 right after, if they are sequential in the hash table it would be a faster lookup since it's hot in cache, right?
@Jonathan_Blow The Timeless Way Of Building - Christopher Alexander, 1979
it might seem like a stupid suggestion since it's an "architecture book", but the content is SOOO valuable far far beyond that. You won't regret it.
We apparently live in the clown universe, where a simple TUI is driven by React and takes 11ms to lay out a few boxes and monospaced text.
And where a TUI "triggers garbage collection too often" in its "rendering pipeline".
And where it flickers if it misses its "frame budget".
It was a mistake to make an exception the default for divide-by-zero on x86 instead of an optional debug MSR you enable only during development. I'd have made DIV take two operands (instead of one) and produce the second operand when the divisor was zero.
It was a mistake to make an exception the default for divide-by-zero on x86 instead of an optional debug MSR you enable only during development. I'd have made DIV take two operands (instead of one) and produce the second operand when the divisor was zero.
OOP story time!
About 1.5 years into my professional programming career, I wrote a background job for something very business-logic heavy. It ended up being a single python function ~1200 lines of code.
It got some raw data, did validation, some preprocessing, then a bunch of logic, and then some finalization steps, whatever.
But then I watched this talk that had example of a job situation very similar to mine, and it looked super convincing, because I really didn't know better. So I took my 1200 lines of function and split it into "losely coupled composable reusable classes that all had only one reason to change". And I was very happy with the refactoring. It was SOLID af! Performance of the job got about 10% slower, but who cares, maintainability is very important, right!
Then, about a month later, I got a new requirement for the job, and I was eager to show how cool new architecture is and how easy the change will be.
And well, after a day and a half of trying to fit new functionality into my redesign I ended up reverting a week of refactoring and implemented it in 20 minutes by adding a logic into a single function.
Do I even have to mention that I covered all these new classes with some good boy testing pyramid coverage? Yes, had to undo all that and only leave integration tests that test the actual work.
All these OOP gurus from late 2000s and early 2010s are just snake oil sellers, I'm very happy they all fell into obscurity and you don't really find them peddling this nonsense anymore. And John Carmack's email about code inlining is still as relevant as ever.
Suppose that to publish a video game, you needed to submit your game to anonymous reviewers... all of them video game designers. The video game designers would review your game, and either reject it, or demand changes. And you'd need to satisfy them before you get your game published.
Of course, people would tune their video games to please the other video game designers.
Do you think that the games would be good?
Well. Since the 1970s, science works this way.
I’ve been writing Python the past 3 days and I am not joking this is harder than writing Verilog or C.
I have no clue what half the code is doing it’s all exotic syntax fentanyl wtf is
“Path(__file__).parent.parent / “config” / file_name 💀
Why is Path a library you need to import? 🥸
@peach2k2 how about using digraphs?
%:include <iostream>
int main() <%
std::cout << "Hello, World!" << std::endl;
%>
i think this compiles unless i made some weird mistake, it should work!
This is ... almost 100% false. Sorting doesn't matter for opaque objects (most games do a Z prepass now which eliminates most difference in sorting anyway), and for translucents, this would look flickery. If you are learning game graphics, make sure you listen to people who have actually shipped games that render at high quality. Games are great but also hard!
I only call this out because the original tweet has 60k views, which means it's misinforming a lot of people.
https://t.co/xeaS5MSY4C
Rust fans: "The world MUST use Rust cause it's memory safe"
~shit goes wrong with Rust code~
Rust fans: "Bad code. Skill issue. It's down to the dev"
Motherfucker if it's down to the dev, stop trying to force this shit everywhere, and let people use whatever the fuck they want