« first day (827 days earlier)      last day (1832 days later) » 

11:15 AM
@Adám ⍳1 ?
 
⍞← ⎕IO ≡ ⍳1
 
@Adám 0
 
#tio apl-dyalog-classic f←{⍳1} ⋄ ⎕IO←0 ⋄ f ⋄ ⎕IO←1 ⋄ f
 
@TessellatingHeckler
 ∇f
 
@TessellatingHeckler ‽
⋄ f←{⍳1} ⋄ ⎕←f ⎕IO←0 ⋄ ⎕←f ⎕IO←1
 
11:19 AM
that visually produces 0 and 1 in NARS, not a function output; although I see from your match test that it produces a vector not a scalar
 
@Adám
0
1
 
@TessellatingHeckler Ah, NARS allows niladic dfns.
 
@Adám Ah. Speaking of, why does the terminology switch between *-adic and *-valent ?
I suspect this is the difference between parameters and arguments, or producing sound and hearing sound
 
@TessellatingHeckler Various people use various words for various concepts. At Dyalog, we prefer monadic, dyadic, ambivalent.
 
@Adám fair enough
 
11:26 AM
Some people prefer unary, binary but those are easily confused with radix terminology. I guess variadic would be more consistent with monadic/dyadic, but it usually refers to a (monadic) function that can take a list of any number of arguments.
I personally prefer prefix and infix.
 
11:47 AM
@Adám ⊃⍳1
(Apologies, I am new to the Orchard and not entirely sure regarding the CMC rules.)
Having said that: Hello everyone.
 
@TorstenGrust Hello, and welcome. Don't worry. Everyone was new here once. You absolutely should try out CMCs and feel free to post your own too. The only difference from TNB is that answers must be in any of the APLs.
@TorstenGrust Correct answer, but can be made shorter.
 
Shorter... Well, that was to be expected.
 
 
2 hours later…
1:50 PM
@Adám two
 
@dzaima Right. Well done!
 
 
2 hours later…
ngn
3:51 PM
@Adám ngn/apl, 1 byte: 0 :)
(⎕io←1 is an error there)
 
@ngn Hehe, clever. I suspect it works in SAX too.
Btw, I so think we should add an Easter egg so if the user enters )erase ⎕io APL responds Yeah, that'd be nice.
 
Ven
Would you pick 1?
and ngn 0, I guess
 
@Ven I'd pick 1, yes.
Then I'd make 'c'='abc'[¯1] and 0=2 3 5[0]
 
Ven
@Adám would ⍳/∊ still return 1+⌈/?
 
@Ven Yes, I think so. That's very useful for appending a default after the data.
 
Ven
3:59 PM
maybe there's an idiom for that but I don't know it so..
 
E.g. (ages,'?')[names⍳⊂input]
 
Ven
CMC: 'c'=-1 f 'abc', while keeping 'c'=3 f 'abc'
 
⋄ ages←5 7 ⋄ names←'Juda' 'Aaron' ⋄ ⎕←(ages,'?')[names⍳⊂'Adám']
 
@Adám
?
 
@Adám personally I'd prefer exact cycling (A[X-1] is always the element before X) than a strange empty 0
 
ngn
4:01 PM
@Adám a quote in latin would be cooler :)
 
Ven
Errore humanum est? :)
 
@ngn ⎕IO delenda est.
 
ngn
@Ven ^
@Ven i would not only pick 0, i'd also make 1 unpickable :)
 
@ngn would did
⋄ f←{(|⍺)⊃⌽⍣(⍺<0)⊢⍵} ⋄ ⎕←¯1f'abc' ⋄ ⎕←3f'abc'
 
@Adám
c
c
 
ngn
4:05 PM
@Ven f←{'c'}
 
@Adám that works in ⎕IO←0 too, and even better, as the index is just
 
@dzaima I don't like that the 3rd element is 2 but the 3rd-last is ¯3
 
@Adám ⎕IO←0 positive, ⎕IO←1 negative :P
would you have 'abc'[4] be a or error?
 
@dzaima positive non-negative, sure, but the fact that (n⊃v) ≢ (-n)⊃⌽v disturbs me.
@dzaima Error.
 
@Adám so the negatives is just another way of accessing items but with the same syntax, and minus doesn't really signify anything?
 
Ven
4:11 PM
@ngn now that's cheating ;)
 
ngn
@Adám think of it as ⊃n⌽v
 
@dzaima It signifies "in reverse" exactly like f⍣0 doesn't mean apply once, and 0⌽ doesn't mean rotate one step.
@ngn I knew you were going to say that, but there's nothing preventing you from using that expression if you want cyclic picking. From a human perspective, using 1 and ¯1 for the first and last is much more obvious, imho
 
@Adám another stupid joke: view all numbers in binary two's compliment, then negating makes much sense
 
Ven
.oO( as obvious as perlisms go )
 
@dzaima Sure, why not use base 2 for all literal numbers? That makes much more sense for the computer! /s
 
4:17 PM
@Adám from a human point of view hard-coding a single number to get the last or second-to-last number, yeah, but a bit beyond that, i think ⊃n⌽v makes more sense
 
@dzaima How often do you actually pick the nth-last something? How often is n not hard-coded?
 
@Adám and there's nothing preventing you to do a simple , since you're (hopefully) not gonna mix & match negatives & positives
 
n↑ takes the first n elements. n⊃ picks the nth-first element. (-n)↑ takes the last n elements. (-n)⊃ picks the nth-last element.
 
4:31 PM
@Adám from that point of view, it'd make sense. but has different restrictions to data requirements than , and it feels strange that the 0 from 0⊃ isn't included anywhere in s results (though i'd personally very much prefer 0⊃ to error). it very much matters on perspective - whether you see (-n)⊃ as a completely alternate syntax or extension of array accessing
@Adám also, if that logic is followed, shouldn't 6⊃1 2 be 0?
(again, i don't like s padding with 0s, or really the whole prototype thing at all (though i'm not opposed to a built-in with the purpose of padding))
 
ngn
@Adám you're mixing up cardinal and ordinal numbers there. the n in n↑ is a different kind of "number" from the n in n⊃
 
5:15 PM
@dzaima Maybe. I think the error is too useful, though.
 
 
3 hours later…
8:43 PM
Are there other commercial APLs around? Is IBM APL2 or Sharp APL still earning zillions in maintenance contracts quietly on mainframes I'll never hear about?
 
9:19 PM
@TessellatingHeckler Probably yes for IBM's APL2. APL+Win is for Windows, but probably also rakes in a bit. Neither vendor adds significant features lately.
 
 
2 hours later…
10:51 PM
@Adám Ok. The APL+Win site starts by introducing why they have a website, and then disclaims support for Google Chrome; that feels dated.
 

« first day (827 days earlier)      last day (1832 days later) »