Torsten Grust

 The APL Orchard

apl.chat ― Learn, teach, ask, code, golf, & discuss usage. See ...
Sep 10, 2019 15:16
(I too love Haskell, by the way ;-).
Sep 10, 2019 15:16
≢⍴42 → 0
Sep 10, 2019 15:15
A scalar is dimension-less and has rank 0. Vectors have rank 1.
Sep 10, 2019 15:05
Try ≢⍴⊃numbers to see that you have, indeed, extracted a scalar (with empty shape) from numbers.
Sep 10, 2019 14:12
@Nathan on the big screen in Elsinore!
Sep 9, 2019 07:42
Hello from Dyalog'19, Helsingør (Denmark).
Aug 5, 2019 15:44
"To infinity and beyond"
Aug 5, 2019 15:34
:-)
Aug 5, 2019 15:33
Thanks, @Adam.
Aug 5, 2019 15:33
I am floored, really.
Aug 5, 2019 15:31
It says "Phase II – Winning Professional Entrant" on the web page. I haven't heard anything yet, though.
Aug 5, 2019 15:28
Oh, looks like I'll travel to Denmark in September?!
Aug 5, 2019 14:56
{ e(x) | x ∊ X, p(x) } ≡ [ e x | x <- X, p x]
Aug 5, 2019 14:56
I also like the comprehension style: [ min (x-y) (y-z) | [x,y,z] <- chunksOf 3 A ]
Aug 5, 2019 14:51
This is practically all we use in my group to create written material.
Aug 5, 2019 14:51
I can highly recommend taking a look at it.
Aug 5, 2019 14:50
In Markdeep, to be precise.
Aug 5, 2019 14:49
Thanks, I should know better. I create all of my lecture material and notes in Markdown. For years now.
Aug 5, 2019 14:48
Thanks, I'll make copies of this for future uses.
Aug 5, 2019 14:47
Urgh ;-)
Aug 5, 2019 14:46
`\` is the lambda
Aug 5, 2019 14:45
@Adám map (\[x,y,z] -> min (x-y) (y-z)) . chunksOf 3
Aug 5, 2019 14:35
{x y z←⍵⋄(x-y)⌊(z-y)}¨3,/ A is the Haskell version.
Jul 26, 2019 09:32
Thanks for the link.
Jul 26, 2019 09:04
@Adám 2000! Where do you source the upcoming entries from?
Jul 14, 2019 11:57
I fully agree regarding the utility of the construct. Have found myself counting the length of the input, instead. Not nice.
Jul 14, 2019 11:55
Ah, I see now.
Jul 14, 2019 10:35
⍬2⍴...? Useful!
Jul 13, 2019 19:31
select sum(t.x) from (values (null::int),(null),(null)) AS t(x);null (not 0).
Jul 13, 2019 19:30
@PaulMansour Hi Paul. One detail: SQL's sum doesn't treat null as zero. null is ignored/skipped by almost all aggregate functions except count(*).
Jul 12, 2019 08:12
@ngn cliick
Jul 12, 2019 07:11
My life would be complete. ;-)
Jul 12, 2019 07:11
Do people code golf using SQL?
Jul 10, 2019 08:48
Cool. Thanks.
Jul 10, 2019 08:48
It's a prevalent pattern, for sure. Haskell has similar combinators (e.g., comparing) and it'd be a great addition to the APL vocabulary.
Jul 10, 2019 08:46
@Adám Yes, that's what I was after, I guess.
Jul 10, 2019 08:39
@ngn Thanks. Here, shaving bytes wouldn't be as much of a concern. It is more about clarity and intent. We're not comparing X and Y but their f-values. I was looking for a form that mentions f once.
Jul 10, 2019 07:53
@Adám "all the way to the right"? — Genius. ;-)
Jul 10, 2019 07:26
Is there a nicer way to express (f X)g f Y than (f⊣)g(f⊢)? This mentions f twice and I bet there's an idiom I am overlooking.
Jul 8, 2019 21:00
@Adám I didn't notice that until now! Great. (Works on Safari, too.)
Jul 8, 2019 20:59
Uh, quite the difference.

Wait, does it say "any type array" where it displays "any" for me?
Jul 8, 2019 20:56
@Adám Hmm, since I'm living in an macOS-only environment right now I cannot compare...
Jul 8, 2019 20:55
@Adám Yes, it appears so.
Jul 8, 2019 20:54
Chrome on macOS.
Jul 8, 2019 20:54
Jul 8, 2019 20:51
APLcart's utility (to me) is phenomenal. Definitely deserves some stage time, if you ask me.
Jul 8, 2019 20:43
@Adam, yes, better now.
Jul 8, 2019 20:43
Jul 8, 2019 15:11
(Resizing the browser window does not fix it.)