Hacker News new | ask | show | jobs
by mlochbaum 2428 days ago
Go ahead. Incidentally boolean tricks like the windowed reduction are fairly common knowledge in the APL community, even though they're considered esoteric outside of it. It might be helpful to know that every function with boolean arguments and result which depends on both arguments has its own primitive (one of ∧∨⍲⍱<≤=≥>≠). Once you know you're transforming pairs of booleans to booleans, you just have to figure out which one it is.

We're not sending anyone to Code Mesh. I hadn't heard of the conference, but given how close it is maybe we should apply in the future.

2 comments

Do you have an explanation handle on the windowed reductions? Specifically what the number on the left means in this case (or in general)? I've tried it and it looks like `(n+1)</v` is basically `2</(n</v)` for `n>1` but I also see some things that don't exactly fit that pattern.
The left argument is a window length. Windowed reduction groups the argument into overlapping windows with that length and does a reduction on each one of them. So if y has row length n, (n ?/ y) is the same as (?/ y) but the rank isn't reduced by one (there's an extra 1 at the end of the shape). For a numeric vector you can use ,/ as a windowed reduction to see the subvectors that are reduced over, but for a nested vector that trick doesn't quite work because it messes up the nesting.

You can email me with my first name at the company site to talk more. There's also a chat room at https://chat.stackexchange.com/rooms/52405/the-apl-orchard which is good for asking questions.

I definitely heard at least one mention of Dyalog APL there last year (not in a conversation I was in, I was literally walking past some others who were chatting).

I hope to see some of you there sometime in the future.