240 karma · joined November 18, 2019
{+⌿⍤2(∘.≤)⍤1⍨⍵}
{ ⍵} ⍝ single argument (monadic) function with argument ⍵
{ ⍨⍵} ⍝ "selfie" - ⍵ f ⍵ where f is (∘.≤)⍤1
{ ⍤1⍨⍵} ⍝ on each row (1 dimensional element)
{ (∘. )⍤1⍨⍵} ⍝ cartesian (outer) product of each row with itself
{ (∘.≤)⍤1⍨⍵} ⍝ ≤ comparison of those elements - produces 6 30×30 boolean matrices
{ ⍤2(∘.≤)⍤1⍨⍵} ⍝ on each of those matricies (2 dimensional element)
{+⌿⍤2(∘.≤)⍤1⍨⍵} ⍝ sum the columns
leading to:
{+⌿⍤2(∘.≤)⍤1⍨⍵} ⍝ compare each row (⍤1) to itself (⍨) and count (+⌿) how many cards that beatsThat make sense?
Indeed, and sometimes not needing a computer to quickly splash out an idea you're thinking/talking about is extremely useful!
Over Christmas, I showed my brother {+⌿⍤2(∘.≤)⍤1⍨⍵} as a small expression to explore attribute to pick playing Top-Trumps admist a discussion. Not something you'd be able to do in many other languages!
Hmm, makes me wonder about potential similar situation with APL programmers - a language I know quite a few large companies use.
Yep, designed to be single pass, recursive descent friendly
Is tenK←{(10=≢⍵)∧⍵[9]='k'}¨words better?
Feel that better matches the problem spec, although requires the each
This feels very similar to an APL or K solution.
Are those languages you're aware of?
I wanted to point towards a programming paradigm that's approach enables you to take advantage of the parallel execution possible within chips today due to the notation being both precise in intent yet vague in execution. Take summing an array (`+/vector`) or selecting values given a boolean mask (`mask/values`) - both these very simple expressions are expressible directly in SIMD instructions, as there's no for loop index enforcing an order.
Indeed, quite frightening at times seeing the value of firms using Dyalog APL.
Some of the SIMD operations feel very reminicent of APL primitives
Which leads to the funny footnote in section 4.1.1 when discussing implementing conditionals
6 [...] Contemplation of the meaning of true? here yields expansion of consciousness without the abuse of substance.
That so far has been my frustration when not remote debugging linux vm, where it becomes a gdb front-end
I have a limited understanding of continuations and never used them myself.
Haven't heard the song for awhile.
>No: jails are VM-like in functionality.
Could this be implemented though if moving between sufficiently similar operating systems?
Seems like might be useful to imprison a suspicious acting process or to release once seen to be safe.
Potentially one if a large customer's paying you for it.
At work, I'm helping a client upgrade from a decade old version (v12) of our product and having to copy over the switches to keep the even older (v11 and previous) behaviours
Indeed! Much of APL programming is using idioms (≠⊆⊢ for example as split on delimiters)
https://aplcart.info has a good selection too
[0]https://github.com/nornagon/jonesforth/blob/master/jonesfort...