A tail-recursive version written in OCaml that should not reach stack limits easily. (Not an expert in OCaml, so this might be stupid. But I tried it with 10000 iterations, and it worked without any issues.)
<span style="font-weight:bold;color:#a71d5d;">let </span><span style="color:#0086b3;">gnu </span><span style="font-weight:bold;color:#a71d5d;">=
</span><span style="color:#323232;"> </span><span style="font-weight:bold;color:#a71d5d;">let rec </span><span style="font-weight:bold;color:#795da3;">aux </span><span style="color:#323232;">s </span><span style="font-weight:bold;color:#a71d5d;">= function
</span><span style="color:#323232;"> </span><span style="font-weight:bold;color:#a71d5d;">| </span><span style="color:#0086b3;">0 </span><span style="color:#323232;">-> s
</span><span style="color:#323232;"> </span><span style="font-weight:bold;color:#a71d5d;">| </span><span style="color:#323232;">n -> aux (s</span><span style="font-weight:bold;color:#a71d5d;">^</span><span style="color:#183691;">" is Not Unix"</span><span style="color:#323232;">) (n</span><span style="color:#0086b3;">-1</span><span style="color:#323232;">)
</span><span style="font-weight:bold;color:#a71d5d;">in</span><span style="color:#323232;"> aux </span><span style="color:#183691;">"GNU"</span><span style="color:#323232;">;;
</span>
That was the idea. But I’m not a functional programmer (not a programmer by profession at all lol), so I might’ve done something stupid. Hence the disclaimer. Thanks for confirming.
Hello, i am looking for a self hosted application for sharing files like with wetransfer. I have tried the discontinued Firefox Send which has nice features like link expiry and works great in general but lacks authentication (only offers simple password protection). I also want the option to share with registered users. Is...
I had the same fucking experience setting up a modem. I was doing everything on their instructions, but it simply won’t register on the network. Customer service kept trying to get me to rent their first party modem. I had to spend almost a day, calling 4 separate times until finally someone forwarded me to an engineer. And boom, fixed in 30 seconds.
Zulip is a little better in this regard. I’m involved in Lean, which uses Zulip as the primary mode of support and documentation. While it’s usable, I still think that a Discourse style forum is the way to go.
Adding to the discussion, if you want to watch anything that’s not mainstream (i.e. non-western, or arthouse), you’re basically supposed to either wait for it to stream on Mubi or get a Blu-ray/DVD (that are often out of circulation if it’s more than 5 years old). So the only real option is pirating.
When was that last time? In the last 5 years, except for brand new graphics cards, I’ve never had any hardware that didn’t simply work out of the box.
And for the first question, it works much better and breaks less often (these memes exaggerate for comedic effect, usually it’s rock solid), has much greater privacy, and it’s free.
I saw this post and wanted to ask the opposite. What are some items that really aren’t worth paying the expensive version for? Preferably more extreme or unexpected examples.
Old is stability (lemmy.world)
[gasp] (i.imgur.com)
Yuzu Nintendo Switch Emulator Lives On With The Nuzu, Suyu Projects (wccftech.com)
Died from reading this (lemmy.world)
Study finds anti-piracy messages backfire, especially for men (phys.org)
Tipping culture npcs (lemmy.world)
Self hosted Wetransfer?
Hello, i am looking for a self hosted application for sharing files like with wetransfer. I have tried the discontinued Firefox Send which has nice features like link expiry and works great in general but lacks authentication (only offers simple password protection). I also want the option to share with registered users. Is...
What's stopping you from coding like this ? (lemmy.world)
Lol (lemmy.world)
Never again (lemmy.world)
Streaming Pirates Are Hollywood’s New Villains - Illegal subscription services that steal films or TV shows bring in $2 billion a year in ads and subscriber fees. (www.bloomberg.com)
Can't relate to be honest, I still use MBR boot (sh.itjust.works)
What are some items that really aren't worth paying the expensive version for?
I saw this post and wanted to ask the opposite. What are some items that really aren’t worth paying the expensive version for? Preferably more extreme or unexpected examples.
Lemmy Recap - See your stats for the past year (recap.pangora.social)
Finished up a recap site for lemmy similar to the recaps other sites like spotify, etc. have been doing!...
I can't stress enough how much I don't care. (lemmy.world)
Do any of you have that one service that just breaks constantly? I'd love to love Nextcloud, but it sure makes that difficult at times (lemmy.world)
Prosecutors Refuse to Drop Charges Against Texas 11-Year-Old Put in Solitary Confinement (themessenger.com)
A school district and local prosecutors in Texas are refusing to drop charges against an 11-year-old who was held in solitary confinement....
rule (lemmy.blahaj.zone)
Kinda accurate lol (lemmy.sdf.org)
Google admits it's making YouTube worse for ad block users (www.theregister.com)
The fashion industry is still pushing crazy thin body images (sh.itjust.works)
Apologies for the low resolution. It was a mobile ad and all I could get was a screenshot.