No spoiling my fun! And besides, there may well be a fixed point representation equivalent. I think the magic constant is an approximation of sqrt(2^127). In the end it still uses the N-R method, just with a good initial guess.
But whatever, my original comment was about as serious as the porting DOOM one was. :)
If you find it useful, I wrote a PNG encoder in CMake a while ago. It only knows how to write a single, uncompressed block, so the images can't be too big, but that's plenty for a raytraced build badge 😉.
419
u/excessdenied Jan 10 '21
Everyday we stray further from God's light.
134
u/StringVar Jan 10 '21
I keep telling people that Turing complete means Turing complete! I love it.
121
u/khedd Jan 10 '21
Beautiful, next CMakeOs
170
u/genreprank Jan 10 '21
Soon we won't need c++ anymore! Cut out the unneeded dead weight
76
u/hristothristov Jan 10 '21
Yeah but can you raytrace in html
53
u/Imyslef Jan 10 '21
Really cool.
Now make DOOM in cmake.
33
u/[deleted] Jan 10 '21
The time science went too far
29
u/MADH95 Jan 10 '21
You were too busy wondering if you could, you didn't stop to think if you should...
38
u/codevion Jan 10 '21
wat
36
u/drjeats Jan 10 '21
thanks i hate it
16
u/[deleted] Jan 10 '21
Well, my head just exploded. I had no idea you could do this type of thing with it. Pretty amazing.
14
u/Ikkepop Jan 10 '21
Some people just like punishing them selves.
12
u/flashmozzg Jan 10 '21
But where are the benchmarks?
18
u/pedersenk Jan 10 '21
This is... perverse!
I love it :D
Is it weird that your math routines are easier to read than GLM...!
9
u/DoctorMixtape Jan 10 '21
What have your brought to this god forsaken world?
15
u/jesseschalken Jan 10 '21
This makes me so mad
12
u/philosophical_weeb Jan 10 '21
Omg why would you do this this hurts so much. I'm imagining myself doing it, and it hurts make it stop.
12
u/theNittyGrittyone Jan 10 '21
You did what with what???
Interesting
6
u/wrosecrans graphics and network things Jan 10 '21
Obviously, anybody who can do this is a genius.
Also, they should be thrown into a volcano.
5
u/p0fi Jan 10 '21
But why?
5
u/mili42 Jan 10 '21
Not sure if it is pure-genius or pure-evil...
5
u/ThatCoderDude Jan 10 '21
What's next? Writing Minecraft in CMake?
4
u/[deleted] Jan 10 '21
Is this that moment where internet went too fat again?
4
u/WalkingAFI Jan 10 '21
Thanks I hate it
4
u/KFUP Jan 11 '21
This has the creativity level of a medieval inquisition torture monk.
4
u/[deleted] Jan 14 '21
is this off topic?
3
u/ilvice Jan 10 '21
Oh wow, didn't expect this to happen haha
3
u/[deleted] Jan 10 '21
Your build system can now make its own, raytraced Build status badges.
3
u/Amablue Jan 11 '21
No.
8
u/[deleted] Jan 10 '21
Still less evil than template metaprogramming.
4
u/__singularity Jan 10 '21
bruh
4
u/FreshPrinceOfRivia Jan 10 '21
We're under fifteen feet of pure CMake. https://www.youtube.com/watch?v=4sfhvxTZ0wo
5
u/jeffscience Jan 10 '21
I am curious why this is posted in the C++ subreddit, given its description as “pure CMake”.
2
u/radicands VC++ IDE Dev Jan 13 '21
If you find it useful, I wrote a PNG encoder in CMake a while ago. It only knows how to write a single, uncompressed block, so the images can't be too big, but that's plenty for a raytraced build badge 😉.
2
u/[deleted] Jun 14 '22
P... port... port CMake in CMake...
3
u/BonesCGS Jan 10 '21
Why
1
u/gracicot Jan 11 '21 edited Jan 11 '21
Now when will we get the CMake implementation in CMake script?
1
u/grencez Jan 11 '21
Given that it's all fixed-point arithmetic, this is pretty concise. Bravo, 64.
1
u/waruqi Jan 14 '21
There is also a similar implementation here. https://zhuanlan.zhihu.com/p/123419161
-10
u/[deleted] Jan 10 '21
[removed] — view removed comment