codereport / jello

A Python script for wrapping Jellyfish (a fork of Jelly) so you can more easily play with the language.
MIT License
48 stars 4 forks source link

FEATURE: Lazy algorithms #32

Open tom-huntington opened 4 months ago

tom-huntington commented 4 months ago

For advent of code 2023, I did each part in a single expression, using infix binary operators, hacking the language's builtins as I did the problems.

My key insight was that to get an elegant solution you need these algorithms:

I think these algorithms expand the problems array languages are adept at solving. They encapsulate control flow.

Perhaps, if you post some "cute" problems you currently cant solve in array languages, but want to, I'll try to devise something.

story I was trying to devise some syntax to do more advanced chaining than my noulith fork allows, when I stumbled across your Jello stream and you said no ambivalence, I knew this is what I was looking for (it's essential to enable advanced chaining/treeing). Being able to write dyads point free was what I needed. Point free advent of code 2024.