« first day (2318 days earlier)      last day (343 days later) » 

4:43 AM
For fun: Generate the Van Eck sequence -- oeis.org/search?q=van+eck&language=english&go=Search.
 
 
1 hour later…
5:48 AM
@B.Wilson That page lists a J solution: , # <:@- }: i: {:)^:({.`}.
 
6:35 AM
Hi! I've modified this aplcart entry to find non-unique values of each row in a matrix and defined a function f, but when I run ]defs I see that f is displayed in form that I think isn't correct (although when using it, all work as desired). Am I wrong or should it be displayed like with parenthesis? [Below the function when I define it, and the result of defs]
f ← (⊢∊∪(⌿⍨)1≠⊢∘≢⌸)⍤1
f ← ⊢∊∪⌿⍨1≠⊢∘≢⌸⍤1
 
@MasterQuiz Yes, it is a known problem that ]defs removes too many parens in its display. A clearer repro of this is:
      g←(,∘1)(1∘,)
      ]defs
g ← ,∘1 1∘,
It shouldn't be too hard to make ]defs include all parens (like ]repr) but removing as many parens as possible is very difficult.
 
@Adám Is this because trains aren't saved as defined but with another structure?
 
Yes, but you might want the system to remove redundant parens, not just echo back what you wrote.
Btw, it isn't just ]defs that suffers from this. ]box -trains=def does the same. Set ]box -t=parens to include all parens.
 
7:10 AM
@RubenVerg |2+.÷⍨2-/⍤×∘⌽/⊆,⍬⍴⊆ :-D
@user3268094 If you want to participate here, just email access@apl.chat
 
7:22 AM
@Adám Two exotic inner products: |2+.÷⍨2-.×∘⌽/⊆,⍬⍴⊆
 
 
2 hours later…
9:39 AM
What's the simplest/best way to invoke `Enlist`?
Localizing quadML feels hacky.
Perhaps some recursive Ravel...
Or is there a quadUnnnn that I'm not aware of?
 
@mappo For now, I think {⎕ML←1 ⋄ ∊⍵} is the best you can do. Once we have array notation, (⎕ML:1).∊ will work. Note that it is only with ⎕ML←0 that Enlist is unavailable. I'm pushing for monadic to be Type so ⎕ML←1 folks can move to ⎕ML←1.
(⊃,⍥,/)⍣≡ I think. Not feeling confident.
Nope, fails on a simple scalar, but a ravel on the right should do the trick.
 
@Adám: I didn't think of localizing in a dfn - great suggestion and much less hack than in the tradfn - in my humble but correct opinion
 
(⊃,⍥,/)⍣≡, has the same length as {⎕ML←1⋄∊⍵} but the former fails on empty arrays :-(
 
the dfn causes less nosebleed =)
and I don't think we have Over in v16
 
9:55 AM
@mappo Without Over, but with more nosebleed: (⊃,⍨∘,⍨∘,/)⍣≡,
Here's a recursive Enlist: {0∊⍴⍵:,⍵ ⋄ r⊣{0=≡⍵:r,←⍵ ⋄ ∇¨⍵}⍵⊣r←0⍴⍵}
This is probably how the interpreter actually does it.
 
that's pretty cool, thanks!
 
Maybe a slightly neater version: {r⊣{0=≡⍵:r,←⍵ ⋄ ∇¨⍵}⍣(~0∊⍴⍵)⊢⍵⊣r←0⍴⍵}
 
 
2 hours later…
12:11 PM
@Adám nice
 
The one with two inner prods is even nicer, but unfortunately, these solutions are terribly slow.
 
 
2 hours later…
2:23 PM
Announcement: BAA Vector Webinar in 40 mins. britishaplassociation.org/webinar-schedule-2023
 
 
7 hours later…
9:50 PM
@Adám ⸘Why would you just Look Up a solution and spoil the fun‽
 

« first day (2318 days earlier)      last day (343 days later) »