this post was submitted on 16 Feb 2022
40 points (93.5% liked)

Programmer Humor

33322 readers
819 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
top 5 comments
sorted by: hot top controversial new old
[–] [email protected] 8 points 2 years ago

This has no business looking this satisfying

[–] [email protected] 4 points 2 years ago (1 children)

Goofy but aesthetically pleasing impl

[–] [email protected] 1 points 2 years ago* (last edited 2 years ago)

This isn't goofy, this is an extremely diffused "pattern" when you need to use non dynamic number sequences.

[–] [email protected] 3 points 2 years ago

Dynamic programming /s

[–] [email protected] 1 points 3 years ago
ghci> φ = (1 + sqrt 5) / 2
ghci> ψ =  1 - φ
ghci> fib n = (φ ** n - ψ ** n) / (sqrt 5)
load more comments
view more: next ›