4:36 AM
When I saw this Exercism problem I figured it was a great fit for APL and a stencil operator exercism.org/exercises/minesweeper - so far I have this solution and I'm wondering what can be improved - the output should be spaces instead of zeroes so I just do a final `@` replace at the end. I'm also bad at parentheses, so maybe some of these aren't necessary
```  board←4 5 ⍴ ' * *   *    *       '
sweep←({+/,'*'=⍵}⌺3 3)
(' '@{0=⍵})('*'@{'*'=board})(sweep board)```
4:47 AM
@JonathanCarroll You have a mixture of types (numbers and characters) in your result, so it looks more spaced out than specified. Also, I'd do the entire job in `sweep←{5⊃c←,'*'=⍵:'*' ⋄ ⊃(×⍴⍕)+/c}⌺3 3`
Slightly longer Same length, but no conditional: `sweep←{⊃('*'∩5⊃c),(×⍴⍕)+/c←,'*'=⍵}⌺3 3`
I'd have to check the tests for each language, but I'm not sure it was strictly required to be an entirely character output :-P
Cheers!
We should add APL to Exercism.
I'd very much love that - and would be willing to help out

10 hours later…
3:20 PM
ideas on how to make this diagram less ugly?
4:09 PM
S-shaped curve instead of the straight diagonal line? Putting a gap around lines at crossings so one line is visibly "on top" of the other (either one, as long as it's a consistent ordering) could also help.
yeah i was talking about this in the code golf room, i changed it and now it looks like this:
like the gap idea but not good enough at svg paths to know how to do that (:
You put a thicker white line just behind each black one.
i don't think that really works because the background of the docs page isn't pure white and i don't really want to depend on knowing the color of the background of the page
i think it now looks way better than before anyways, though.
definitely clearer
Hm, I think you can get that working with the lines in a mask element but it's not too easy.
uiua makes the lines slightly transparent
not sure if i like this look with the overlaps being lighter or not
also uiua has this weird vaguely-curved-lines style choice which is weird, i think i like mine more:
4:48 PM
@RubenVerg You don't like the BQN style seen at aplwiki.com/wiki/File:Function_compositions.png?
5:17 PM
@Adám I don't like that the arguments to a dyad aren't always to the left and right
in my system, dyads always get arguments left and right and monads always get arguments from the bottom
hmm, i guess the bqn style has dyad arguments slightly left and right, except for forks
mine takes up more space but it's less ambiguous
I think I pretty much just used the same angles as slashes in the ASCII art diagrams, going back to Phrasal Forms. I never drew trains for BQN docs though. The ones in my "Tacit Techniques" talk are shaped differently but there the main idea is to emphasize the function backbone and not the arguments.
5:33 PM
yeah, i was looking through the bqn docs for inspiration but noticed there's no forks
i think the fork doc page and/or the combinators paragraph could use some diagrams
hmm, do forks count as combinators? from a mathematical pov they are but not in the apl sense of "operator that only moves its arguments and operands around without doing any operation on them"
hmm, does valences count as a combinator?
i never thought of it as one but maybe it fits the above definition
I think I'd call a fork a combinator but not a combinator operator. Same with Left and Right.
I classify valences as a combinator. Every "combinator" is secretly two of them glued together; for valences the two sides are just very simple and also end up doing totally different things.

2 hours later…
7:31 PM
do these look decent for valences?
i thought it wasn't clear that the function that returns a value is the one that gets the arguments so i added a line to indicate that
is it redundant?
another alternative could be just omitting the not-used function but i think that's more confusing

1 hour later…
8:42 PM
Hmm, is the dyalogscript broken in Dyalog 19?
I got `apl: syserror 999.Opening in existing browser session.` and the program stuck

1 hour later…
9:54 PM
That (or similar Chromium issue) has been fixed this week - in the meantime setting ENABLE_CEF=0 should let you use dyalogscript