Ancestors

Toot

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

Descendants

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

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

Written by Devine Lu Linvega on 2025-01-31 at 16:00

@gosha the tak() function is especially hard to follow for a person ^^;

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

Written by gosha on 2025-01-31 at 16:56

@neauoire is this a Tak function? But yes, so hard for me!

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

Written by Devine Lu Linvega on 2025-01-31 at 16:57

@gosha It is yes, it's a brutally recursive function. Don't let this throw you off, it's meant to be hard to reflect about.

https://en.wikipedia.org/wiki/Tak_(function)

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

Written by Devine Lu Linvega on 2025-01-31 at 16:58

@gosha I mentioned it in the last talk I gave about programming.

https://100r.co/site/shining_sand

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

Written by gosha on 2025-01-31 at 21:18

@neauoire Ah! Yes, I remember seeing it in this post and my brain being like "ok, I'm not even going to try that one". Feels like some progress! (also, that post/talk was great).

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

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

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