HNHacker News
TopNewBestAskShowJobs

haqreu

520 karma · joined March 11, 2016

submissionscomments
haqreu··on Rendering graphics in 500 lines of bare C++
nope, not mine
haqreu··on Tinyrenderer second edition: software rendering in 500 lines of bare C++
A full rewrite to the computer graphics course.
haqreu··on TinyCompiler: A compiler in a week-end
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/

haqreu··on TinyCompiler: A compiler in a week-end
I removed it, no need to offend people with racial slur, especially when it is not intended.
haqreu··on TinyCompiler: A compiler in a week-end
Hum. Did not anticipate that, thank you for pointing out.
haqreu··on TinyCompiler: A compiler in a week-end
Thank you!
haqreu··on TinyCompiler: A compiler in a week-end
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.

haqreu··on TinyCompiler: A compiler in a week-end
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.
haqreu··on TinyCompiler: A compiler in a week-end
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 :)
haqreu··on TinyCompiler: A Compiler in a Week-End
Have you ever wondered how a compiler works, but you never found courage to find out? Then this series of articles is for you.
haqreu··on Building a ternary computer at home: a software emulator
Here is the schematics:

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

two ternary multiplexers out of two dg403 chips.

haqreu··on Building a ternary computer at home: a software emulator
AFAIK it was never built, only partially designed.
haqreu··on Building a ternary computer at home: a software emulator
This is ROM only, not a fully functioning computer.
haqreu··on Building a ternary computer at home: a software emulator
Fun!
haqreu··on Building a ternary computer at home: a software emulator
Setun is the only example, and it had a binary memory.
haqreu··on KABOOM in 180 lines of bare C++
Yes it does, however you'd need to modify CMakeLists.txt, as it is written for g++
haqreu··on KABOOM in 180 lines of bare C++
Funny how you did not notice that the project is focused on the GPU :)
haqreu··on How OpenGL works: software renderer in 500 lines of code
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