News for hackers. Stuff that matters.

haqreu

Re:Rendering graphics in 500 lines of bare C++ on Tuesday January 06, 2026 @08:30AM (#46511989)
nope, not mine
A full rewrite to the computer graphics course.
Re:TinyCompiler: A compiler in a week-end on Friday February 21, 2025 @06:55AM (#43126514)
I'll definitely test maximal SSA + DCE in tinyoptimizer when I'll get to it. For the moment I made [1] somewhat-pruned mem2reg pass, not even sure how to call it. But it indeed required to compute dominance frontiers.

[1] https://ssloy.github.io/tinyoptimizer/mem2reg/

Re:TinyCompiler: A compiler in a week-end on Friday February 21, 2025 @06:14AM (#43126280)
I removed it, no need to offend people with racial slur, especially when it is not intended.
Re:TinyCompiler: A compiler in a week-end on Friday February 21, 2025 @05:48AM (#43126141)
Hum. Did not anticipate that, thank you for pointing out.
Re:TinyCompiler: A compiler in a week-end on Friday February 21, 2025 @05:40AM (#43126071)
Thank you!
Re:TinyCompiler: A compiler in a week-end on Friday February 21, 2025 @05:04AM (#43125856)
Thank you for the reference, I'll check it.

Why not fully maximal SSA + DCE? I mean, other than timings consideration. Fully maximal does not even need any graph traversal, it is entirely local to each block.

Re:TinyCompiler: A compiler in a week-end on Friday February 21, 2025 @02:15AM (#43124921)
I'd argue that Lengauer-Tarjan is overrated. While it is neat, it's premature optimization IMHO. Fully maximal SSA (at the entry of each block insert a phi-node for each variable) + dead code elimination (we need it anyways) is much simpler.
Re:TinyCompiler: A compiler in a week-end on Thursday February 20, 2025 @06:54PM (#43122193)
The "week-end" part refers to the fact that I wrote it in one week-end with little to no experience in compiler design. You can check the commit history, 12 to 14 Jan, 2024 :)
Re:TinyCompiler: A Compiler in a Week-End on Wednesday February 19, 2025 @04:51PM (#43108217)
Have you ever wondered how a compiler works, but you never found courage to find out? Then this series of articles is for you.
Here is the schematics:

https://hsto.org/webt/4a/mb/ad/4ambad_bocdk6_0khdqve6grzjs.p...

two ternary multiplexers out of two dg403 chips.

AFAIK it was never built, only partially designed.
This is ROM only, not a fully functioning computer.
Fun!
Setun is the only example, and it had a binary memory.
Re:KABOOM in 180 lines of bare C++ on Monday January 28, 2019 @12:18AM (#19015462)
Yes it does, however you'd need to modify CMakeLists.txt, as it is written for g++
Re:KABOOM in 180 lines of bare C++ on Sunday January 27, 2019 @05:38PM (#19014198)
Funny how you did not notice that the project is focused on the GPU :)
Let me cite one thing:

https://github.com/ssloy/tinyrenderer/wiki/Lesson-6:-Shaders...

"Recall that all my source code here is meant to be compared with yours. Do not use my code, write your own. I am a bad programmer."

If you want to improve the text, the wiki is open. If you want to improve the source code, fork -> code -> pull request