Ancestors

Toot

Written by Walker Boh🛡 on 2025-01-05 at 18:00

The magic 8 ball at Christmas said "try #ocaml " so I did my usual "hello world" in it - the leibniz algorithm for approximating Pi.

Having to change the normal for loop to a recursive 'emulation' of a for loop because variables are immutable (wut ?) felt very alien...

Hmm.

=> View attached media

=> More informations about this toot | More toots from walkerb@infosec.exchange

Descendants

Written by Richard Degenne on 2025-01-05 at 21:14

@walkerb Yeah, that's how a pilgrimage to the world of functional programming usually starts. 😂

=> More informations about this toot | More toots from richarddegenne@mastodon.online

Written by Walker Boh🛡 on 2025-01-06 at 06:02

@richarddegenne feels more math than code and I don't know that I like it.

I will pursue it some more.

=> More informations about this toot | More toots from walkerb@infosec.exchange

Written by Richard Degenne on 2025-01-06 at 06:49

@walkerb Take your time. Took me a couple years before it finally clicked 😅

Having to "un-learn" most of the habits that come with imperative programming is tough, but it's worth it. It's a bit like traveling to a foreign country 😂

=> More informations about this toot | More toots from richarddegenne@mastodon.online

Written by Kototama on 2025-01-09 at 11:38

@walkerb it feels weird at first on the small scale (some local calculation or whatever) but when developing big programs, knowing that a function does not change its inputs make it much easier to reason about the code (and solves many concurrency problems too).

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

Written by Walker Boh🛡 on 2025-01-14 at 05:45

@kototama its been decades since I wrote anything in a functional language.

Have another few things to write that I usually do when learning a new language (game of life, etc). Will see if my brain rebels less on those.

=> More informations about this toot | More toots from walkerb@infosec.exchange

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

This content has been proxied by September (ba2dc).