We improvised a marble elevator with some lego technique and regular legos, for a duplos marble run we had around.
13
8
370
30,492
Replying to @iquilezles
This is an improved design, with paddles at 100 degree or so, which improves throughput by almost 4x (can't do 90 degrees exactly because paddles would collide).
1
0
51
10,371
Drawing a character with mathematical equations
22
162
1,271
72,439
Replying to @iquilezles
Forgot to shared the link! desmos.com/3d/sgcfkpatmq
0
2
38
8,260
Here's a game - Can You Guess the Function?

hint - it's way shorter than you're probably thinking
72
12
843
124,546
Replying to @iquilezles
For those who didn't peep the comments, f(x) is:

∣x∣ˣ

or in code

pow( abs(x), x )

Beautiful, but unfortunately the derivative f'(x) = (1+ln ∣x∣)⋅∣x∣ˣ shoots to -∞ at the origin.
6
1
112
12,399
A library I'm considering uses Boost for a few basic containers (small_vector, bimap, etc). Because of Boost's non-modular design (every header includes most other headers), build times are ridiculous.

I removed the Boost dependency and implemented equivalents to all required containers in less than 120 lines in standard C++ each, which was trivial and very quick.

* Lib build times are down from 3 minutes to 7 seconds.
* Lib package is down from 800 MB to 0.5 MB.
* Lib no longer interferes with other modules' requirements.
* Lib is easier to install, debug, customize and maintain.

I understand that always avoiding all dependencies shouldn't be a goal. But I'm still bewildered by the opposite mindset of bloating everything, especially for cases like this library design where the pros to cons are really one sided, and doing it right was actually less work than doing it wrong.
31
71
796
53,058
I've been giving a serious attempt at using Cursor in a C++ code base. I might still be using it wrong, but I've only managed to get it to write code that compiles and is also actually useful, once every 20 attempts or less. When it does succeed, it's limited to very narrow tasks, never large enough to offset the time wasted by commanding and helping the AI do the work.

So as of today, the more I use Cursor, the bigger the productivity loss (and frustration), very far from the advertised claims. I haven't tried other competitor products though, but I'd expect the same unless there's some model out there trained through reinforcement learning instead of basic pattern memorization?

Regardless I'll keep trying though because I really want the super-powers; live is short and I have lots of ideas to try. Or is my experience an outlier, and are other C++ developers actually successful with these tools?
106
37
639
90,320
I talked to @wookash_podcast about some low level programing, C++, graphics, 3D, shadertoy, VR and many other (sometimes rabdom) things: youtu.be/F1ax1iJTHFs?fe…
6
51
412
39,042
I think calling them the "laws" of physics is misleading, it makes it feel like the universe has some sort of obligation to follow a set of external rules.

Maybe the "models" or "behaviors" of physics, whether you need to highlight the human should be in the loop or not?
22
8
164
14,755
Hey, don't "optimize" conditional moves with mix()+step(). Please stop advising that. Why: iquilezles.org/articles/gpuco…
42
200
1,520
125,249
Replying to @iquilezles
Also GOOD:

float c;
if( x<0.5 ) c=a;
else c = b;
3
2
148
18,402
I did a comparison of Posit32 vs Float32 numbers. Posit gives such better precision for the same bit size, but is 1.7x slower (I compared software implementations).
10
39
589
38,906
The reason I've never been able to use any open source library is that "you only need python, npm, node, yarn, make, ninja and ssh, but only some pecific versions, and then type these things in the command line like it's still the 90s, only they never work, fuck this shit".
46
35
684
42,941
25
233
3,698
320,904
Replying to @iquilezles
0.92387953 = cos( π/8)
0.38268343 = cos(3π/8)
0.70710678 = 1/√2

Shader here: shadertoy.com/view/M3ycWd
1
2
173
16,166
// Any three (non colinear) points define a circle
// { .xy=center, .z=radius }
vec3 getCircle( vec2 a, vec2 b, vec2 c )
{
vec2 ba = b-a, cb = c-b, ac = a-c;
float de = ba.x*cb.y-ba.y*cb.x; // zero if colinear
vec2 ce = 0.5*(a+b+vec2(ba.y,-ba.x)*dot(ac,cb)/de);
ngth(a-ce) );
}
22
76
1,233
73,821
Replying to @iquilezles
0
1
27
10,786
2025 is a square number (45^2), the only one you'll get to live. Use it well.
26
160
1,227
57,292
I think @NASAJPL missions are like the cathedrals and pyramids of our time.

Some take 2 or 3 generations over many excruciating decades to plan, design, fabricate, test, travel, do the actual science in location, return the results, and study them to plan the followup mission.
1
2
93
12,966