λ🐫, -Ofun
probably a Luddite
we need frugal computing
Posts
Until about 2022, I loved to program in Raku, the language formerly know as Perl 6. (Sadly, since then, genAI has ruined that for me.)
Raku has neat feature called Junctions. A junction is a lazy expression of values of any type combined with Boolean-like operators `|`, `&` and `^`. When an operation is applied to a Junction, it is carried out for each junction element, and the result is the junction of the return values of the operations. You can optionally evaluate a Junction in a Boolean context using `so`.
So you can do things like
my \jj = 1&2;
say so jj; # True
say so (->\x {x-1})( jj ); # False
Back in 2020 I pointed out an issue with Junctions, [The strange case of the greedy junction](https://limited.systems/articles/greedy-junctions/). Junctions are *greedy*, they turn anything they are combined with also into a Junction. This is not always desirable. I proposed an additional operation ("collapse") to undo this behaviour.
In a second post [Reconstructing Raku's Junctions](https://limited.systems/articles/reconstructing-raku-junctions/) I provided a proof for both the observed behaviour and the need for a "collapse" operation, by formalising Junction semantics in terms of polymorphic algebraic data types. I just re-read it and I still think it is very cool.
The `collapse` method never made it into the language (https://github.com/rakudo/rakudo/pull/3944) but my implementation still works.
What I think is neat is that my formalisation lets you implement Junctions in any language.
🎶
I lived in magic solitude
cloudy-looking mountains
a lake made out of crystal raindrops
roamed through space
ten thousand years ago
seen the giant city of Atlantis
🎶
I started on my final study of the Major from from Ghost in the Shell, using a mechanical pencil and nice watercolour paper. Next, apply my new watercolour paint to it, then inking.
#theStudio #theAtelier
#GitS #Japanese #drawing #art #traditionalArt
I'm following the Yokohama Kaidashi Kikou panels bot because I like those images in my timeline.
It is interesting also because it exposes the limits of AI-generated alt text: it is almost always somewhat inaccurate but frequently plain wrong, and has absolutely no context.
@damaru@merveilles.town I love them, and your studies!
I don't like that name for that flower, I think it does the flower a discourtesy. I much prefer the Japanese name "higanbana", or the other name Cluster Amaryllis.
There is a novel where these flowers have a key role, and I wrote an article about it on my blog: