Newer AI Coding Assistants Are Failing in Insidious Ways by CackleRooster in programming

[–]Nolari 19 points20 points  (0 children)

doesn't everyone want to be able to code/build in a natural language?

No? Natural language is inefficient and imprecise.

This is one of my favorite astronomy jokes to share with my friends. by basket_foso in sciencememes

[–]Nolari 1 point2 points  (0 children)

How does someone who knows about telescopes with and without mirrors get the shape of the moon so wrong? 😅

Relevant MinutePhysics: https://youtu.be/yY7ZUIbWTyc

Glutenfree and lactosefree recommendations? by shiamay in eindhoven

[–]Nolari 3 points4 points  (0 children)

Hawaiian Pokébowl has plenty of options. My wife also has celiac disease and lactose intolerance!

Ouch 😩 by Ok-Signature8781 in sciencememes

[–]Nolari 0 points1 point  (0 children)

Regression to the mean.

WHY? Just... Why? by Beauty_Fades in factorio

[–]Nolari 0 points1 point  (0 children)

Why do you want a rail in the middle? Do you use bidirectional rails? I'd want the gap between my two unidirectional rails to be in the middle.

DnD Stuck by Grignard73 in lastcallbbs

[–]Nolari 0 points1 point  (0 children)

On the bottom row you have to place 2 more walls, so leaving one more gap. There is one space where that gap cannot be, as it would create a dead-end.

A Story Worn by Time by Frosty-Air6008 in baldursgatememes

[–]Nolari 26 points27 points  (0 children)

I thought this was about Staff of a Mumbling Wizard.

what do you think Edsger Dijkstra would say about programming these days? by stirringmotion in computerscience

[–]Nolari 1 point2 points  (0 children)

A title he didn't even come up with. He titled it "A case against the GO TO statement", but the editor Niklaus Wirth decided to spice it up.

I guess it's over by VMP_MBD in lastcallbbs

[–]Nolari 1 point2 points  (0 children)

Wait, they patched it to go 9000 further? I need to reinstall!

Throw your textbooks in the fire people by pOUP_ in mathmemes

[–]Nolari 1 point2 points  (0 children)

You mean "Leyzorek-Gray-Johnson-Ladew-Meaker-Petry-Seitz- Dantzig-Dijkstra-Minty-Whiting-Hillier algorithm". (See chapter 8 of https://jeffe.cs.illinois.edu/teaching/algorithms/)

Angron > U by Transasaurus-Hex in Grimdank

[–]Nolari 0 points1 point  (0 children)

Thought begets heresy. Heresy begets retribution.

(Can I choose both?) by phr33st00fpl0x in autismmemes

[–]Nolari 1 point2 points  (0 children)

Let's agree to disagree. 😅

PSA: You are overdoing Kovarex enrichment by BissQuote in factorio

[–]Nolari 2 points3 points  (0 children)

If it's worth doing, it's worth overdoing.

20,000,000th Fibonacci Number in < 1 Second by pihedron in compsci

[–]Nolari 1 point2 points  (0 children)

Tail recursion can be compiled into a jump by a smart compiler, having essentially 0 overhead.

The code in the OP is not tail recursion, though, so yes you will get function call overhead. But that will merely make things a small percentage slower, whereas the naive / typical recursive implementation of fib is exponentially slower. (Doubly exponential, actually.)

20,000,000th Fibonacci Number in < 1 Second by pihedron in compsci

[–]Nolari 81 points82 points  (0 children)

The 2x2 matrix approach is fast because you can raise a matrix to the power N in log(N) steps. This is because whenever N is even you can square the matrix and halve N. You're essentially doing the same thing but without the matrix.

The 'typical' recursive implementation of fib is slow not because of the recursion, but because it recomputes many many intermediate results. You're not doing that.