« first day (1449 days earlier)      last day (1502 days later) » 
00:00 - 13:0013:00 - 00:00

13:01
@RGS The definition of Unpack is super hacky, but once defined, the functionality is neat:
      Unpack←'⎕THIS'{this←⍵ ⋄ 'this'⎕NS⍺}∘⍎⍨⊢⊣⎕SHADOW⍤{⍵.⎕NL-⍳10}
      options←⎕NS⍬
      options.Activation←{2×⍵}
      options.Loss←{⍵<0.1}
      ∇ NN o
       Unpack o
       Activation 10
       Loss 1 ¯3 0
       ∇
      NN options
20
0 1 1
RGS
RGS
@Adám Thanks for this, but I don't mind having things packed, I think.
@dzaima Now that I think of it, that's not so bad, and it could even be extended to rename: (newA:A ⋄ myB:B)←obj
@Adám a good question would be whether that'd be (newA:A ⋄ myB⋄B) or (A:newA ⋄ B:myB)
RGS
RGS
@dzaima in the array notation isn't the syntax name:value for namespace values?
@dzaima The former, as it'd be a short form of ⎕THIS⎕NS obj.(newA:A ⋄ myB⋄B)
13:08
for reference, {a:newA} = {a:4}; in JS is newA = 4;
@dzaima That seems very backwards. : declares that what's on the left has the value on the right.
@Adám a result of the JS way is that after {a:newA} = {a:4}, executing {a:newA} gives {a:4}, which is what you'd expect from an assignment
@dzaima Sure, that part is fine, but the {x:y} should be the mirror of that.
@Adám which of the 4 {x:y}s in my message are you talking about? :p (and why should there be mirroring?)
@dzaima just as after a ← b I expect a to be equal to b, I would expect that after (a:b)←(a:4), (a:b) would be equal to (a:4)
it is the same in haskell
data R = R {key :: String}
f R{key=k} = k
pattern match on records like that
13:15
@rak1507 the same as which?
javascript
f=({key:k})=>k in js
@dzaima Actually, maybe (:activate ⋄ :loss)←⍵ is better, as a short form of (activate:activate ⋄ loss:loss)←⍵
@dzaima the BQN case is a bit stranger because is actually an assignment character, and you don't even make namespaces with ⟨⟩ (so a full example of destructuring would be ⟨newA⇐a⟩ ← {a⇐5} is newA←5)
@dzaima Right, so the new name is on the left.
@Adám if you did (:a ⋄ :b)←⍵ would it error if there weren't keys called a and b?
13:18
@rak1507 Not sure. On one hand, that'd be useful, on the other, it'd be nice to allow omitting for defaults.
@Adám I think it'd be nicer to have defaults be part of the destructuring syntax, and error if there's no default
agreed (I think)
@dzaima So maybe (name1:def1 ⋄ name2:)←⍵ would use def1 if name1 is missing but error if name2 is missing.
Any ideas on how to pad an array with a number different than the prototype 0? Can I somehow do that easily nicely with/after ↑ rather than something along the lines of A,pad⍴number?
@MartinJaniczek What type of content in your array?
13:24
@Adám if you pass (name1: 'foo', name2: 'bar') to that, what do you end up with?
name2='bar'?
Yes.
I'm not sure I like having to use the name of the key to refer to the value
@Adám The one that matters is boolean and I want to pad with 1. The others are fine with padding with 0 and ''
@MartinJaniczek ~n↑~x
beat me to it
13:27
@dzaima Obligatory: ↑⍢~
Alright let's see how fast double negation is on 416m items :)
@Adám doesn't actually work, needs to be n∘↑⍢~
@dzaima Oh, right.
Thanks everybody.
@dzaima (i keep thinking about a version of under only applying ⍵⍵ to the right arg. Same issue as ¨ᑈᐵ, just that there's no tacit solution without the only-left-right variants)
13:29
@MartinJaniczek whoa, that's a few items you've got there
@rak1507 Real-world data, I don't make the rules
hooray for bit booleans
@MartinJaniczek I'd expect memory-throughput speed.
But on very large data, it may be worth computing how much padding will be needed, and adding that separately.
@MartinJaniczek shouldn't be much slower than copying the array. But if possible (and the array is only stored in one place), it might be worth trying to do arr,←(n-≢arr)⍴1 for in-place appending
I'll measure both ways
13:33
@MartinJaniczek my testing gives an estimated 7ms, but the would probably have its own overhead depending on the circumstances
13:58
and I still have to do a strange dance every time I reboot in order to use the APL keyvoard.

1) run alplkeys.sh
2) Open a new editor and use the Windows key to type an APL character
3) Close the edit window and type in Ride or elsewhere using APL symbols to my heart's content.
@RomillyCocking Did you read the APL Wiki article on troubleshooting?
When I raised an issue (years ago) the response was "yes, keyboard in Linux are a pain, aren't they."
So no, I have not looked around for help.
I will now.
@RomillyCocking that seems awfully complicated. my setup is running a single script (on a hotkey) to set xkb to my preferred APL setup, and clear /opt/mdyalog/*/64/unicode/aplkeys.sh on Dyalog updates
@dzaima (10!)
@dzaima Do you collect a list somewhere?
@Adám follow the link. i just searched me saying 9 in the transcript :)
14:04
Sure, but a central repository might be nice. Maybe on the talk page of the APL Wiki's article?
We should set up a bot that tweets to @DyalogAPL every time another one complains.
@Adám of my rants about it? why?
@dzaima No of references to users that complain.
Or maybe we should use one of those online petition sites.
@Adám alternatively, count linux users in the APL orchard, done :p
That's much harder to show Dyalog.
@Adám well, you already have 10 specific complaints (though some might be from me)
14:08
I'm not Dyalog.
@dzaima It is. It's a pain. Today is the first day anyone has shown any inclination to help me solve the problem, and I had long ago stopped seeking a solution.
@Adám you're more Dyalog than me
@RomillyCocking You didn't ask me.
@Adám you didn't know the reasonable solution before i said it either
@Adám And that was a mistake on my part.
14:10
@dzaima No, and Matt did a good job of writing things up. But since then, I do advise people.
matt? where?
Look at the APL Wiki history for the relevant pages.
@Adám until this afaik there was no published way to start RIDE without it eating the super key, and that's imo unreasonable
@dzaima (apart from of course manually launching RIDE and RIDE_INIT=… dyalog -nokbd separately, but that's just stupid and makes the default RIDE+dyalog shortcut useless)
:56733759 Right, you're correct that I didn't know before.
14:48
The solutions on the wiki or given by @dzaima do not work for me. I still have to run aplkeys.sh in a terminal and then open a text editor and type an APL key :(
@RomillyCocking what does your aplkeys.sh do? what does the opening of the text editor fix? what configuration are you trying to achieve?
aplkeys.sh is not mine - it is the one that comes with the DYALOG distribution.
ah, so you want the super key to be your APL key?
Until I have typed an APL key in the text editor, I cannt type APL characters (using the Win key) in RIDE or a browser.
@dzaima You bet
@RomillyCocking huh, the default aplkeys.sh will happily hijack my super key immediately with no issues ¯\_(ツ)_/¯
14:52
Lucky you
It never has for me
OK, this is embarassing... but somehow I have managed to avoid becoming aware of this Linux "super key" keyboarding problem until about 30 minutes ago. I actually use Linux quite a bit, but only via RIDE or PuTTY - almost never with a graphical IDE. But I see the problem and it will be fixed in the next release cycle.
@MortenKromberg :O
I have the problem with RIDE, but it's local RIDE.
It's another case of picking what seemed to be a sensible option... Windows key on Linux? Well, nobody uses that ... /s
@MortenKromberg but that's what I want to use for APL???
14:55
Geoff Streeter and you :D
Seriously, the ability to do that should be retained.
@MortenKromberg fwiw RIDE still hijacks the super key for me
Well, you don't get much higher class than that combo :)
But RIDE having the interpreter set this even though it has absolutely no use for it, is just bizarre.
@RomillyCocking did you start using Dyalog APL before using Linux? :P
ngn
ngn
@MortenKromberg i have a house on my super key. i've also seen keyboards with penguins on that key.
14:57
No, I used linux from 1993, Dyalog APL from around 2008
@dzaima (oh, that was by using RIDE actually remotely)
@dzaima I should have pointed out that I am running RIDE on my Windows machine, of course... So it is the Windows IME that is providing me with my Windows keyboard.
This is a problem for people who use a Linux desktop.
@RomillyCocking and at that time you didn't hate that it just consumed your super key without your permission?
@MortenKromberg understood
@dzaima Nope. That's what I wanted it to do.
@dzaima Did Linux GUIs use the Super key much in 2008?
14:58
So it didn't need my permission
@Adám Not at all
@RomillyCocking ah, that answers it. Well, nowadays it's usually the OS key
and in 1993 linux users didn't use X much. Linux took 3 days to download at 9600 baud onto 5 floppy disks and X took another 5. And it took 40 bins to boiot on my 4 Mb 386SX.
@dzaima Not for me it aint :)
time for ⎕APLKEY
@RomillyCocking how about just invoking setxkbmap -layout au,apl -variant '' -option -option 'grp:win_switch,more:options' (with "more options" coming from setxkbmap -query that you use and whatever you use in place of au)?
did not work for me
ngn
ngn
15:09
@dzaima 2 "-option" in a row?
@ngn yes. the first one clears the list, the second sets it
otherwise, it would slowly end up with an infinite amount of grp:win_switch,s in the options :)
ngn
ngn
interesting. i didn't know.
shouldn't -variant contain a comma if you use two -layouts?
@ngn probably. ¯\_(ツ)_/¯
@RomillyCocking weird. No clue why could "text editor" and RIDE differ in behavior here
15:28
Can someone explain this to me?
most convoluted way of getting the first n square numbers ever! {¯2-/{⊃¯2-/+/+\+⌿↑∘./⍨⍳⍵}¨1+⍳⍵}
@Adám I'm stumped, ⌈/V-⌊V is 0
@rak1507 it's not 0, it's the biggest fractional part
yeah, but if there are no fractional parts, it's 0
@rak1507 V isn't said to be of integers
Maybe it should say V-⌊/V?
15:32
Ah maybe
@Adám that'd definitely be less strange though
@Adám assuming that, it just normalizes the input to the range 1…N
what's the buckets thing
there's an esoteric language called buckets
@rak1507 if you did V{⍺⍵}⌸R afterwards, you'd have a result with N items, each with numbers in some range
⋄ V←⍳10 ⋄ N←5 ⋄ V{⍺⍵}⌸+/(A×N÷⌈/A←V-⌊/V)∘.≥¯1+⍳N
what am I doing wrong
      ⋄ V←⍳10 ⋄ N←5 ⋄ V{⍺⍵}⌸+/(A×N÷⌈/A←V-⌊/V)∘.≥¯1+⍳N
┌──┬─┐
│1 │1│
├──┼─┤
│2 │1│
├──┼─┤
│3 │2│
├──┼─┤
│4 │2│
├──┼─┤
│5 │3│
├──┼─┤
│6 │3│
├──┼─┤
│7 │4│
├──┼─┤
│8 │4│
├──┼─┤
│9 │5│
├──┼─┤
│10│5│
└──┴─┘
thanks
@rak1507 you're doing it correctly, V←⍳10 is just a boring input. Try 100+?⍨30
Aha, works better with ⌸⍨
Cool
15:47
@rak1507 right. dzaima/APL has them swapped ¯\_(ツ)_/¯
It's similar to ⍋⍋
in fact it's ⌈(N÷⍨≢V)÷⍨⍋⍋V
⌈⊣×⍋∘⍋⍤⊢÷≢⍤⊢
@rak1507 that behaves differently when N>≢V, but it's a good question which is better. Probably shouldn't be used in that case anyways
Oh
I didn't even consider that
Yeah
16:01
@Adám Yes. Given V, divide the range of V into N equal divisions and for each element of V return the index of the division (bucket) it should go into.
@Adám You beat me to it
Where was that from?
Looks like something from Perlis' idiom list
@RomillyCocking It is. I'm going through it to add everything to APLcart.
Imo there's not much value in that one as it's better expressed through things like ⍋⍋
There are typos, as you just discovered.
+/∘.≥⍨ is just ⍋⍋
@rak1507 It dates from the 70's so a lot of its idioms could be improved.
16:06
Ah that makes sense
Not just because we have more primitives but because we know more cool stuff with the old ones
yeah, I assume ⍋⍋ would have worked back then but maybe it wasn't well known
I think there were papers about⍋⍋ (and fokelore discussions) in the late 70s
but not before
ISTR that ⍋ was not available in the early versions of APL\360
interesting, how did you sort things?
very likely traditional sorting techniques
16:13
Not sure they did. I never used APL\360 (well' apart from one 30 minute session in 1968)
But it would have been in by the mid 70s.
RGS
RGS
(Erm, when writing (Dyalog) APL code with the intent that the most people can use it as-is, what other things other than ⎕IO and ⎕ML are worth setting?)
@RGS ⎕pw?
⎕pp, ⎕fr if those are applicable
RGS
RGS
@RomillyCocking That does not change behaviour of primitives, right? Only output style?
first time I've heard about ⎕PW
ngn
ngn
16:21
@RGS use plain text (not jupyter, not .dws)
RGS
RGS
@dzaima Same for ⎕PP, right?
@RGS it changes the behavior of
Yes, but that can matter if you have arrays that woudl wrap in 80 but not 132 width as I often do in examples.
now that I know about this I'm going to use ⎕PW←200
RGS
RGS
@ngn You mean to hold the source code, correct?
As per your suggestion, .apl* files would be appropriate, no?
ngn
ngn
16:23
@RGS yes, whatever you give them to download, if anything
@RGS i think .apl or .dyalog are appropriate. i don't understand what purpose * serves.
RGS
RGS
@ngn I've seen .aplf files for functions, .apln for namespaces, e.g.
Does Dyalog have the equivalent of Ken's Quick Reference Card? That had all of APL on a credit-card sized bit of paper
RGS
RGS
@dzaima Alright, thanks.
and .apla for data
ngn
ngn
@RGS right, but apl code is apl code. why should there be a distinction?
16:26
@ngn Cos sometimes you want to load the fns but not the vars
RGS
RGS
@ngn Dunno if there should, but I cannot see a reason not to have the distinction. You can guess what is in the file just by looking at the name.
(btw, I am not looking to golf my file names)
ngn
ngn
@RGS um, yes.. apl code :)
@RomillyCocking data as apl code or data in binary format?
RGS
RGS
@ngn Hopefully :P
APL vars in Array Notation, as perfected by wossname.
AKA @Adam
and Phil Last, I think
ngn
ngn
@RGS what if you want to put a ns and a function in the same file? .aplnf?
RGS
RGS
16:28
@ngn Then I'd pick either .apl or .dyalog. Probably .apl
ngn
ngn
@RomillyCocking that's still apl code, isn't it?
@RomillyCocking Reference card
3
@Adám bigger but still very good. (Of course,APL is lots bigger now). Thanks.
Oh, it's R 16.0. So it will need to be even bigger!
RGS
RGS
Here's the result of ]map on my interpreter right now:
·   ActivationFns
·   ·   LeakyReLU
·   ·   ·   ~ leaky
·   ·   ·   ∇ df f
·   ·   ReLU
·   ·   ·   ∇ df f
·   LossFns
·   ·   MSELoss
·   ·   ·   ∇ dloss loss
·   Utils
·   ·   ∇ makeNormalRandomArray
ActivationFns, LossFns and Utils are 3 dirs.
along those 3 dirs I want to have a namespace that references objects inside those dirs
(I'm using link)
So I created a new namespace with )ed ⍟ ANN and edited its contents. In particular, I added the line loss ← LossFns.MSELoss. When I try to fix the Dyalog interpreter kind of complains with a Value ERROR.
So what is the way to develop a set of namespaces that may or may not reference each other?
16:44
@RGS that line would be executed inside ANN, which doesn't have a field LossFns. You need either #.LossFns or ##.LossFns or something
ngn
ngn
@RGS why so complicated? is there really that much code there that you have to put it in separate files and dirs?
RGS
RGS
@dzaima Ah, that does seem to work and it makes sense. Thanks.
@ngn Maybe not. I reckon the separation is just helping me structure everything.
Although I wouldn't say it is complicated. It is just compartmented.
RGS
RGS
17:20
@dzaima Turns out this doesn't seem to work when creating the link for the first time.
@RGS i guess then it'd depend on the execution order
RGS
RGS
Yup.
Do you know any way that does not depend on the execution order?
Surely there must exist something.
i barely know anything about namespaces :)
RGS
RGS
@dzaima -← 1 :'(
i'd just not access other namespaces outside of functions
17:39
@RGS ⎕CT, ⎕DIV, ⎕IO, ⎕ML, ⎕PP, ⎕RL, ⎕RTL, ⎕WX, ⎕USING, ⎕AVU, ⎕DCT, ⎕FR
so much configuration
I don't know what most of these even do!
@RGS You can :Require to specify order, but really, it is the mixture of scripted and unscripted namespaces that is messing you up. Consider adding an init function that sets those parameters.
RGS
RGS
@Adám I've currently gone with that init function, but I don't necessarily like it.
If all my namespaces were (un)scripted then I wouldn't have a problem?
No, because there'd be no such thing as "floating assignments" in a namespace. Either you have a constant value, or a function.
You could do:
∇ f←loss
  f← ##.LossFns.MSELoss
∇
RGS
RGS
@Adám I'm confused as to what this does.
It looks like it sets the return value of the tradfn to be a function, but that can't be right...?
17:48
@RGS That's right.
Every time your namespace would use loss, it'd actually call that function.
and as a bonus, if LossFns.MSELoss is changed, the value of this loss will also change dynamically
RGS
RGS
So tradfns can return functions? Then why can't they take several functions as args?
Missing syntax to do it neatly. However, they kind of can; you just have to arrayify them with ⎕OR first.
RGS
RGS
What the heck.
@Adám This is neat but turns out it doesn't fit my needs right now.
But this is a neat trick.
 
2 hours later…
19:53
Is there something more idiomatic for generating a boolean array with 1s set at particular indices, than ⍸⍣¯1?
nope
RGS
RGS
@MartinJaniczek That seems pretty good BUT has the issue that the length will correspond to the last index given and may not be the same as the total length you wanted.
yeah true
RGS
RGS
If idx are the indices and n the total desired length, you can also do idx∊⍨⍳n
or 1@idx⊢n⍴0
RGS
RGS
19:55
⋄ n ← 10 ⋄ idx ← 3 4 5 ⋄ idx∊⍨⍳n
@RGS
┌→──────────────────┐
│0 0 1 1 1 0 0 0 0 0│
└~──────────────────┘
that has the advantage that you don't need to sort the indices as well
if they're unsorted for some reason
RGS
RGS
⋄ n ← 10 ⋄ idx ← 7 2 5 ⋄ idx∊⍨⍳n
@RGS
┌→──────────────────┐
│0 1 0 0 1 0 1 0 0 0│
└~──────────────────┘
20:08
looks like the ⍸⍣¯1 masively outperforms at least the ∊⍨⍳ approach. (I'm having trouble running the @ one)
  {(⍸⍣¯1)⍵}random    → 6.8E¯6 |      0%
* {(∊∘⍵)¨⍳⌈/⍵}random → 1.6E¯3 | +23757% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕
you have marshall to thank for that (I think)
@MartinJaniczek Note the * there. The results differ. Also, use ∊∘⍵ instead of (∊∘⍵)¨
  {(⍸⍣¯1)⍵}random → 8.6E¯6 |   0% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕
* {∊∘⍵⍳⌈/⍵}random → 1.1E¯5 | +25% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕
not as drastic anymore
I'm still worried about the differing results.
⍸⍣¯1 seems to hate unordered list of indices, fair enough
20:13
Right.
@Adám I'm aware of the *, but I probably won't be pursuing the other fn so I don't waste time with finding the differences
If random has duplicates, ⍸⍣¯1 will count the number at each index while stops at 1.
@MartinJaniczek 1@random⊢0⍴⍨⊃⌽random assuming ordered list.
RGS
RGS
      idx ← 2 5 7
      n ← 10
      ⍸⍣¯1 ⊢ idx
0 0 1 0 0 1 0 1
      idx∊⍨⍳n
0 0 1 0 0 1 0 1 0 0
@RGS Should be n↑⍸⍣¯1⊢idx no?
RGS
RGS
20:15
@Adám I'm pointing one key difference, so no :)
Oh.
But then why not idx∊⍨⍳⊃⌽idx?
RGS
RGS
@Adám That's to match the (⍸⍣¯1) approach, doesn't make obvious the difference between my proposal and Martin's.
Strange comparison then, imo. This is either a monadic function running until the last index, or a dyadic function with the length given.
RGS
RGS
I am not saying my code is a drop in replacement for (⍸⍣¯1).
Right, ok. Full utility functions with optional left arg:
{⍺←⊃⌽⍵ ⋄ ⍵∊⍨⍳⍺}
{⍺←⍬ ⋄ ⍺↑⍸⍣¯1⊢⍵}
20:22
  (1@random) 30⍴0 → 4.2E¯7 |   0% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕
  30↑(⍸⍣¯1)random → 3.8E¯7 | -12% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕
  {∊∘⍵⍳30}random  → 4.0E¯7 |  -7% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕
(admittedly smaller values)
random are unique here?
random←0 5 10 15 20 25
RGS
RGS
Changed to a scripted namespace. Those name → #.ActivationFns.name mean that each namespace can see the neighbouring ones?
20:23
:)
It was random the first time around
but then I got tired of printing out 10000 random bools
@RGS That's a pointer.
@MartinJaniczek You use ]box right? Have you looked at ]rows?
RGS
RGS
@Adám Which, in practice, mean I can use the neighbouring namespaces inside one another, right?
@Adám I haven't used ]rows and it looks useful, thanks
@RGS Sure, but it is when Link loads in stuff that things go awry.
RGS
RGS
20:25
What do you mean? This ]map was after a ]create in a clean interpreter.
If I edit one of the namespaces will Link go wild when trying to save the changes..?
@MartinJaniczek bigger:
      random←{⍵[⍋⍵]}1e5?1e6
      ]runtime -c 1@random⊢1e6⍴0 1e6↑⍸⍣¯1⊢random random∊⍨⍳1e6

  1@random⊢1e6⍴0  → 1.7E¯4 |     0% ⎕
  1e6↑⍸⍣¯1⊢random → 1.9E¯4 |    +9% ⎕
  random∊⍨⍳1e6    → 5.3E¯3 | +2946% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕
interesting that eventually the @ wins
@RGS Are these all unscripted namespaces?
RGS
RGS
@Adám Makes sense.
@MartinJaniczek I'm not sure that's significant. Also, it probably depends on how many there are. I used 10%.
RGS
RGS
20:29
@Adám I have a file ActivationFns.apln which, inside, defines the 3 namespaces ReLU, LeakyReLU and Sigmoid.
I thought this meant they were scripted, but maybe I messed up the terminology.
@Adám Likely >80% will be ones
randomly changing 1e5 to 8e5:
  1@random⊢1e6⍴0  → 1.3E¯3 |    0% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕
  1e6↑⍸⍣¯1⊢random → 1.4E¯3 |  +10% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕
  random∊⍨⍳1e6    → 2.6E¯3 | +108% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕
      random←{⍵[⍋⍵]}0.8e6?1e6
      ]runtime -c 1@random⊢1e6⍴0 1e6↑⍸⍣¯1⊢random random∊⍨⍳1e6

  1@random⊢1e6⍴0  → 1.5E¯3 |    0% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕
  1e6↑⍸⍣¯1⊢random → 1.5E¯3 |   -4% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕
  random∊⍨⍳1e6    → 4.9E¯3 | +222% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕
RGS
RGS
:Namespace ActivationFns
    :Namespace ReLU
        ⍝...
    :EndNamespace
    :Namespace LeakyReLU
        ⍝...
    :EndNamespace
    :Namespace Sigmoid
        ⍝...
    :EndNamespace
:EndNamespace
That's how the ActivationFns.apln file looks
@Adám Looking at how it oscillates sign, they're probably roughly equivalent
RGS
RGS
And inside each sub ns I define the dfns F and DF.
20:33
@RGS Then you can only refer to contents of a namespace above the current one.
@RGS Yeah, I think I remember this bug.
@RGS What is the relevance of those?
RGS
RGS
20:52
@Adám I don't understand the question. What is the relevance of what? Each f and df?
@Adám So is this a bug in ]map?
@RGS Yeah F and DF.
@RGS No, in the interpreter. It exposes sibling namespaces in a script to each other.
RGS
RGS
@Adám Each activation function is needed in the forward pass and in the backward pass of a network. The idea is that a user can select the act. function used in each layer, but when you pick an act function, you need the function and its derivative to match, of course.
According to the documentation, it should only do so for classes, not for namespaces.
RGS
RGS
I could leave it up to the user to set both F and DF, but I prefer to have them bundled together, so I create a little namespace for each pair.
OK, got it.
@RGS OK, found it. It is issue 18768 which was logged 2016-03-24. For some mysterious reason, it was reassigned to me (though this is not my dept at all) on 2017-12-11. I'll kick it back.
21:17
@MortenKromberg I've finally done the padding experiment. Padding 8 makes it somewhat faster, padding 64 has more pronounced change. I'll upload some measurements just for fun...
(I'm missing units, whoops. It's [ms] per request. 5000 requests, 15 concurrent clients, no rate limiting. 8 Dyalog Jarvis servers under nginx load balancer.)
21:32
what does Pn mean
Percentile
P50 = median, and so on
Ah right
@MartinJaniczek So up to a third of the time saved by padding to 64. That's pretty good. And I presume the code for padding and dealing with the unnecessary data isn't too bad?
Not bad at all. 28 additions and 9 deletions, GitHub says.
Dealing with the unnecessary data: There's two new ANDs and one OR to ignore the padding when aggregating at the end. Hardly a problem.
Cool. What do your colleagues say?
21:43
Nothing yet, it's 10PM here. I try to not tease them much, but I uploaded the comparison chart on company Slack too of course :) I expect another "I am obviously not going to sleep well until Go version is the best…" (verbatim quote!)
Heh, so they already know the answer, they just need to make reality fit it.
Of course, for every APL program, there exists a C program that does the same task faster. The tricky bit is constructing that C program.
Yup I don't envy anybody trying to jumping through the same SIMD hoops you Dyalog folks already did for me :)
RGS
RGS
@Adám Alright :P
@MartinJaniczek Have you tried co-dfns btw? I wonder if this massively parallel problem could benefit from running on GPUs.
@Adám I worry too much of my code will be unsupported by co-dfns. I didn't try.
21:51
Isn't co-dfns massively restrictive?
For example I nest promiscuitly. That alone would be a pain to rewrite I assume
It just became much less restrictive, as it has begun to support nested arrays.
@MartinJaniczek You're OK for now anyway. If your colleagues approach the same order of magnitude as you, you can begin looking into compilation…
(And they said interpreted languages couldn't be fast‽)
@Adám Shame the APL->TAIL->Futhark pipeline is bitrotting already
this looks painful
Is that the Clojurist guide to ... article?
Oh no that's Futhark docs?
22:01
yeah
 
2 hours later…
RGS
RGS
23:51
TensorFlow, beware! ANNAPL is coming for you! github.com/RojerGS/ANNAPL
<moon-child> neat
<moon-child> does it use codfns?
RGS
RGS
@DyalogAPL @moon-child Hell no, this is something I created this afternoon.
It is mostly a toy project.
And full disclaimer, TensorFlow has nothing to worry about :P
<moon-child> yet
RGS
RGS
@moon-child but what is it with the co-dfns? They can speed up APL code? Maybe I can have a look and explore it a bit. Thing is, even though neural networks are based heavily on matrix operations, in order for me to create a flexible "framework" I have plenty of namespaces flying around...
<moon-child> it compiles apl code onto the gpu. Haven't actually used it, but I believe you can interop co-dfns with dyalog, so you can write the core kernels with co-dfns and call them from dyalog
00:00 - 13:0013:00 - 00:00

« first day (1449 days earlier)      last day (1502 days later) »