Ancestors

Written by gosha on 2025-01-31 at 13:59

Fuckin' 'ell, finally finished #SICP exercise 1.11. That iterative process bit was super tough for me.

=> View attached media

=> More informations about this toot | More toots from gosha@merveilles.town

Written by tomasz stecko on 2025-01-31 at 14:31

@gosha was the sudden increase in compute time on higher numbers a tricky part?

=> More informations about this toot | More toots from tomasteck@merveilles.town

Written by gosha on 2025-01-31 at 14:33

@tomasteck Can't say it was, partly because I haven't tested with higher numbers 😁 The tough part for me was to translate the recursive process (which I find straightforward to write) into an iterative one. Took a lot of drawing on paper to figure it out.

=> More informations about this toot | More toots from gosha@merveilles.town

Written by tomasz stecko on 2025-01-31 at 14:44

@gosha oh right there's an iterative version to write too. if you did both then the iterative process 'fixes' the problem with recursive one - what was your approach? i tried to make use of a 'window' of previous three values

=> More informations about this toot | More toots from tomasteck@merveilles.town

Toot

Written by gosha on 2025-01-31 at 15:05

@tomasteck Yep — I used a window too:

=> View attached media

=> More informations about this toot | More toots from gosha@merveilles.town

Descendants

Proxy Information
Original URL
gemini://mastogem.picasoft.net/thread/113923582847673107
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
274.671966 milliseconds
Gemini-to-HTML Time
0.992107 milliseconds

This content has been proxied by September (3851b).