« first day (1003 days earlier)      last day (1646 days later) » 

12:08 AM
I guess I could work from binding strength, but having one would still be handy
 
 
1 hour later…
 
2 hours later…
3:29 AM
@Adám It's happened again! No trees for trains!
I tried the commands again and the output handling system is there, ]rows etc does print dots, and boxing still works on arrays
 
 
4 hours later…
7:36 AM
@Sherlock9 Can you save your session and send it to me or support@?
 
That's a good question. Where in RIDE is the save session button?
 
@Sherlock9 There isn't one: aplcart.info/?q=save%20session%20file#
 
8:14 AM
Now I have to hunt where it saved the file
Found it!
 
8:33 AM
@Sherlock9 Yeah, but generally, posting people's full email addresses in plain-text is a bad idea.
 
9:30 AM
So it happens that both of my top two APL answers have the
 
@Bubbler Yeah, is awesome. I just wish it had 2 as default left argument.
 
Looks like many people agree with that :)
 
9:50 AM
@Adám Ah sorry. Are you able to delete my message as room owner?
And I've sent you the session
 
@Sherlock9 No, only mods can. I've asked Mego to fix it. Flagging is probably overkill, as my spam filter works quite well :-)
 
10:17 AM
@dzaima while at it, in what order should (⎕←1 ⋄ ⎕←2 ⋄ ⎕←3) output the numbers (aka in what order are the expressions evaluated)?
also, should (1⋄-⋄3) 2 error or give 1 ¯2 3?
 
@dzaima ¯2 2
 
@Adám so just ignore the s when parens contain both functions & arrays?
 
@dzaima No, (1⋄-⋄3) 2 is like ((1)(-)(3)) 2
 
@Adám but still have function arrays or not that too?
 
@dzaima I don't really see how the function arrays can work generally. Just use (f⊂⍛,g⍮h) if that's what you mean.
 
10:28 AM
@Adám that's so messy/unreadable & not-obvious-at-all though
 
(⊂⍤f,⊂⍤g,⊂⍤h) looks more consistent.
I don't see how arrays of functions can work if you don't have a way to turn functions into arrays, like J's gerunds, K's f[] and Dyalog's ⎕OR'f'
 
@Adám what i'm suggesting is that (f⋄g⋄h) is exactly (f⊂⍛,g⍮h), and also i still haven't removed `
 
@dzaima Sure, but how do you nounify a single function? How or when are the functions applied as opposed to being used as data? Etc. etc.
 
@Adám again, i'm suggesting (f⋄g⋄h) to be just an alias to an already representable thing, and we've had the discussion about noun functions before and this is what it ended up as
 
@dzaima How does (x⋄y⋄z) know what to do?
 
10:37 AM
@Adám it depends on the types of the variables, which, when known, will be obvious
 
@dzaima And thus you were asking about a mixed type thingy.
 
@Adám exactly, i was asking if mixed types should be acceptable or error
 
 
2 hours later…
ngn
12:51 PM
@Adám what is "K's f[]"?
 
@ngn I thought that was how you nounified a verb: (f[];g[];h[])
 
ngn
@Adám no, you just write (f;g;h). f[] would call f with :: as argument.
 
@ngn Oh. OK then dzaima's syntax much resembles K's.
 
ngn
@Adám s/nounified/nominalized/ (blame Latin)
also, f g h are already nouns :) almost all identifiers are nouns. "almost" because k has (yuck) reserved words
 
1:44 PM
Oh this is turning out to be an interesting problem: What's a good way to write the following function
powermod←{
    a b mod ← ⍵
    r ← 1
    {
        r ← mod | r × a
    }⍣b
}
Because that's obviously wrong. The inner dfn won't be called. But I'm not sure how to get mod|a*b without running into too-large numbers
And {a b mod←⍵⋄1{mod|⍺×⍵}/b⍴a}299 792 458 doesn't work either
 
ngn
@Sherlock9 if b can be large, you should do repeated squaring to make it run faster. it's easy to implement recursively or with 2⊥⍣¯1 and reduction
@Sherlock9 recursive: powermod←{a b m←⍵⋄b=0:1⋄r←m|×⍨∇a(⌊b÷2)m⋄2|b:m|a×r⋄r}
 
2:00 PM
Isn't there an idiom for it?
 
ngn
non-recursive: powermod←{a b m←⍵⋄b←⌽2⊥⍣¯1⊢b⋄(m|×)/b/{⍵,m|×⍨⊃⌽⍵}⍣(¯1+≢b)⊢a}
@Bubbler i don't see it in their idiom list
 
2:15 PM
I just wondered because J has one
 
ngn
j is a lot more mathsy
 
2:32 PM
Not golfed: Try it online!
 
2:48 PM
 
ngn
@Bubbler this is ok for golfing, but ⍺×⍵*2 risks an overflow by doing more than one multiplication without mod
 
3:27 PM
@ngn Yeah, the point was I was trying to make an exponentiation algorithm (mod m) that worked for large enough a and b that it would normally overflow. Thanks a bunch :D
 
Announcement: First Dyalog '19 videos now available!
 
 
4 hours later…

« first day (1003 days earlier)      last day (1646 days later) »