« first day (1487 days earlier)      last day (1152 days later) » 

7:30 AM
@MartinJaniczek Can you report the result of ⎕SE.Link.Version, and retry the failing command after
]udebug on
?
 
 
6 hours later…
1:43 PM
has anyone experimented with a typed apl? i'm thinking of an apl belonging to more of the circles in the diagram at mlochbaum.github.io/BQN/doc/functional.html
 
@user41805 I bet most with any implementations have thought about it, but it's understandably incredibly difficult to get that to be usable
e.g. what's the type of ↑'abc' (1 2 3)? ⊂⍣N⊢'foo'? (2,x)⍴5?
 
@dzaima some operations would have to be limited, but as you said, the challenge is not sacrificing usability significantly for better type predictability (or whatever the term is)
 
2:10 PM
@user41805 There's some conflict, or inefficiency, in that arrays already provide a lot of the benefits of static typing. They're static in terms of length and fast implementations optimize for element type as well. I discussed this some in my Outer Product talk.
Personally I think that dependent typing has a very valuable interaction with array programming because the definition of an array is basically that its axes are independent. But as far as I know, practical dependently-typed languages just don't exist yet.
There are also some newer projects mainly targetting machine learning, that focus mainly on flat homogeneous arrays. Arguably TensorFlow fits here but Dex and Futhark are closer to APL. Work on these is ongoing.
@user41805 By the way, the "typed" circle in that diagram is for typed functional programming, which is different from just having static types and first-class functions. I don't think there's a good concensus definition for this, but I used support for ADTs as the criterion and some other common features are typeclasses and monads. I think every statically-typed language should support ADTs but I don't know if you'd want all the other machinery in a typed array language.
 
ngn
2:32 PM
@RGS no no, i still prefer #! scripts of course, and i'd rather have no middle-man (]link) between me and git
you do whatever you want
 
RGS
Ah ok, makes sense :D
 
@Marshall i just listened to what you said on the "Arrays are like static typing for lists" slide, fair point i hadn't thought of it that way before
 
ngn
@Marshall "arrays [..] static in terms of length" - you mean c arrays, not apl arrays, right?
 
@Marshall how so? yeah i'm not thinking of 'practical', just experimental being curious how such an apl (if it can still be called so) would look like and work
 
@ngn APL arrays: I mean that every cell of a given rank in an array has the same shape. So in a given array there's only one length in each dimension.
It's not static over the whole program but over a particular array.
 
2:46 PM
@user41805 "how so?" i mean i am wavy on dependent types, so i don't get what you mean
 
ngn
@Marshall that's "rectangular". "static" means you can figure it out by just looking at the source code.
 
I've implemented the foundations of specialised array support doing a summarion or product over an array specialised on integers resulted in a speedup of between 10 and 15 times.
That's pretty good I think.
 
ngn
@EliasMårtenson speedup compared to.. ?
 
Compared to having only boxed arrays
In concrete numbers, that meant that a +/ over 1 billion numbers now takes 0.5 seconds instead of 5 seconds.
The code is still generic, in the sense that I don't have special optimised loops for certain common functions. The speedup is purely from not boxing the numbers.
 
@user41805 It's hard to define what is and isn't practical. To explain some, most dependently-typed languages (Coq, Agda) are designed for writing proofs and the fact that they can be used for programming is incidental. Idris is for programming but is still working out usability issues in the language design and has a very slow compiler, even after a ~10x speedup in Idris 2, which is not fully released.
 
ngn
2:54 PM
@EliasMårtenson is that faster than dyalog?
 
@ngn I used "static" as a metaphor there, to highlight that arrays must be rectangular but can be detected as homogeneous. I'm obviously aware that APL doesn't have static types.
 
@ngn that's a strange question to ask about a generic sum impl in java :)
 
ngn
@Marshall of course. i'm just being a terminology nazi.
@dzaima well, "speedup of between 10 and 15 times" is a strange statement to make :)
 
@ngn Probably fair to point out though. I was more careful in my talk.
 
@ngn how so? of course not storing a heap-allocated object for each number in an array is gonna be much faster
 
3:04 PM
Looking back at the talk, the telltale sign that something is like static typing instead of dynamic typing is that you know the type (which can be any metadata) even if there are no values. Array shape is like that, although Mix/Merge and the Rank operator can break that property.
 
ngn
@dzaima it's meaningless to compare your own impl against itself. it's like those n% discounts in the holidays season - "30% off" after having 40% above-market prices in the first place :)
 
RGS
@ngn It's not meaningless: it shows you are improving.
It just doesn't tell you how you stack up against others.
 
@ngn it is meaningful if the impls aren't comparable (KAP has lazy evaluation which changes things a lot), or you don't indend one to be competitive with the other
 
@ngn It's valuable for other implementers to know, because if their implementation boxes every value like KAP did before then they can expect a similar speedup. It's not useful to someone choosing languages.
 
ngn
4 against 1 :)
 
3:07 PM
@ngn you're also assuming "10-15x speedup" implies "my impl is the best now muhaha" which it definitely doesn't
 
ngn
i wanted to know if it's time i should abandon k and start using kap instead :)
 
@ngn well, the message wasn't written for that specific question of yours
 
ngn
@dzaima ok. i'm looking forward to that muhaha moment.
 
ngn
3:26 PM
@EliasMårtenson how do you represent a "box", is it a java.lang.Double or some generic apl object with meta-info like shape, type..?
 
@ngn a generic object, but it doesn't appear to have any other overhead over a Double (e.g. shape is a function)
@dzaima actually i'm not sure - this specifies vals, but interfaces can't have fields. i'm assuming kotlin auto-generates getters and just uses functions
 
ngn
@dzaima probably. some of the val-s there have an explicit get() on the following line
 
3:50 PM
I wish dyalog didn't reformat code on errors
it's a strange choice
also changing 1E5 to 10000 and stuff
 
@rak1507 afaik it's more that it just doesn't store the formatted code (or at least doesn't/didn't often enough)
 
yeah
 
ngn
@dzaima yeah, a decision made ~30y ago when ram was expensive..
now known as the "this isn't what i typed" problem. the joys of backwards compatibility.
 
@Marshall actually, i think it was reading leanprover.github.io/about that led me thinking of this, particularly, "Lean is a functional programming language [...] You can also use Lean as an interactive theorem prover"
i found myself !aplwiki'ing, perhaps this should be suggested as a ddg bang?
(if no one else already has tried so)
 
RGS
4:12 PM
@user41805 There's an aplcart bang for ddg so I'm guessing it should be possible to get one for aplwiki
 
@user41805 Well, you can take a look at Github repositories in Lean and decide whether that's accurate emphasis.
 
@dzaima (@Marshall posted thing in the singeli room)
 
lean 4 is new though, i don't recall seeing this emphasis on the former aspect on the site with lean 3
 
What is a core subset of APL? As in, primitives that can't reasonably be implemented in terms of other primitives
 
@rak1507 BQN's runtime-provided functionality might be a decent estimate, although it also includes a few non-primitives.
 
4:15 PM
thanks
 
If "reasonably" doesn't include performance, then you could use the smaller set from the runtime specification (everything up to "Commentary on other primitives").
 
what is singeli's intended purpose? i don't understand 'simd kernel'
 
@user41805 be a language in which to write manually vectorized things (in cases where the alternative is the mess of C intrinsics or assembly)
 
@dzaima would this be usable on a normal computer or do you need special parallel computers? (i.e. is this more theoretical)
 
@user41805 definitely normal computers (but pretty much all "normal computers" have SIMD).
 
4:24 PM
@user41805 It's for CPU code. Probably targetting x86 or C with intrinsics to start with.
 
@dzaima "(but pretty much all "normal computers" have SIMD)." ah i see
@RGS done
 
RGS
@user41805 wdym? Is that something "anyone" can do and then it becomes usable by everyone?
 
oh i just submitted the request for it
 
RGS
Ah I understand :P
 
ngn
4:46 PM
@RGS ducks should help other ducks :)
 
RGS
5:25 PM
@ngn Yeah, it just felt like there was this random registry where people could add ddg "bangs" (?) and then they would immediately become usable.
 
5:47 PM
2 ~ 1 returns ,2 :(
 
@rak1507 if it returned just 2, then the rank and depth of 2~1 and 2~2 would be different
though maybe it'd make sense for 2≡2~1 but 2~2 to error :D
 
yeah the second makes more sense to me maybe, I didn't consider that they'd be different shapes
argh
anyone have a time machine so they can make 1 element vectors not the same as scalars
 
ngn
@rak1507 i had one in 2022 but lost it
 
lol
 
6:12 PM
@ngn That depends. I can't check how fast Dyalog can sum ⍳10000000000 because I get a WS full.
However, something like {⍺+⍵}/x is very slow on Dyalog and KAP is a lot faster even when everything is boxed.
 
<kritixilithos> @Elias, does your apl handle that instantanteously because of laziness?
 
@DyalogAPL Laziness doesn't make it instantaneous because it still has to perform the computation. Of course the specific case of +/⍳X can be computed with a formula, but I don't see any point in that since it's not an operation one might do ordinarily.
 
ngn
@EliasMårtenson fair point (you and dzaima) - lazy≢eager
 
@ngn Every value in KAP is implemented as an instance of APLValue: github.com/lokedhs/array/blob/master/array/src/commonMain/…
One instance of this is APLSingleValue which has subclasses APLDouble, APLLong, APLComplex, APLChar etc.
There are roughly 70 subclasses that implement APLValue.
Most of them are lazyly evaluated results from various functions, and they generally extend an instance of APLArray.
I'm not sure that helps understanding how it works :-)
 
@EliasMårtenson i wonder how big of a performance difference (if any) would there be if that was an abstract class instead of an interface
 
6:21 PM
@dzaima Easily tested since I don't think there are any classes that implement that interface that needs a different superclass.
That said, to my knowledge calling through an interface is the same performance as calling through an abstract class.
 
@EliasMårtenson maybe under some optimizations, but afaik in theory interface calling is more complicated. A regular vtable won't cut it
 
@dzaima Searching gives me some indication that abstract class calls at least were faster at some point in the past.
May be worth testing. There really isn't a good reason for it to be an interface, other than flexibility. And I haven't actually made use of that flexibility.
I think at some point I had an idea that I could create a subclass of some existing Java class and also implement the APLValue interface.
Anyway, I'm off for a while. Getting late here
 
ngn
me: hugging c and looking down upon those jvm-loving fools
(until they get faster, at which point i'll start hugging them)
c, she is so beautiful :)
 
6:36 PM
@ngn that's my primary complaint about c - it's ugly :)
that hypothetical language of mine (that i still intend to make one day) would look pretty much like java (except there's proper structs), but be able to be transpiled down to C or something (and probably allow for most C programs to be written in it semi-equivalently, though with uglier syntax for things i'd want to be used less, i.e. pointers)
 
ngn
@dzaima yes, c is ugly :(
(don't tell her)
 
RGS
7:20 PM
I wonder why/how you know that C is a she and not a he or even -- who knows -- something else
 
7:35 PM
@user41805 Already suggested, but hey, maybe if they get enough requests…
 
RGS
I don't really use DDG but I don't mind also requesting it if you guys think it'd be useful
 
Certainly can't hurt.
 
RGS
There's a box I have to tick that asks if it'll be useful to more than 500 users
Now I wonder how you got !aplcart to work...
 
7:53 PM
@RGS I don't remember that being there at the time. Anyway, I think there are more than 500 APLers in the world.
 
RGS
@Adám Actually, how many APLers would you estimate there are?
(Define APLer as someone who is at least at the level of being able to complete P1 of the competition, if you must)
 
Very hard to guess. What do you think, @MortenKromberg ?
 
8:29 PM
<leah2> BQN question: given a 2x3 matrix and a vector of 3 numbers, how can i apply / to each column and the vector?
 
leah2: so the result would be a vector of vectors?
 
<leah2> yes
<leah2> two subsets of the 3-vector
 
so like (↕3)/¨<˘3‿2⥊↕6?
 
<leah2> ACTION looks at explain output :)
<leah2> <˘ is the trick, thanks
<leah2> i need to get used to proper matrices again, after using k previously :)
 
9:03 PM
@RGS anyone who's ever programmed then lol
 
RGS
@rak1507 I don't mean conceptually, lol
Unless -- and that's an interesting thought -- "all" programmers are APLers :P
But I meant the people who are already familiar with a (big?) number of the primitives
and the way the syntax goes and whatnot
 
yeah
interesting thought, I wonder how many there are too
 
RGS
Call for suggestions: I'll be making a presentation to uni-level maths students and I want to talk about APL. It will be over Zoom and I want people to interact with me. I also want them to be able to reproduce live whatever what I am doing, perhaps on TryAPL or on their own machines, provided they installed Dyalog APL ahead of time.
I want to showcase the affinity APL has for maths and also showcase its array-oriented capabilities.
Anyone has any clever ideas?
 
Do you know what sort of tasks they might use programming for currently?
 
RGS
You mean for their courses?
 
9:16 PM
Yeah, I was thinking potentially if APL worked well for those things it might be a good example
 
RGS
Because for their hobbies I wouldn't be able to guess. Also, there'll be students from the whole country so I can't assume very specific knowledge about a specific domain.
@rak1507 APL would work great for numerical methods and related things.
 
Ah ok
Yeah, you could do newton-raphson, numerical integration/derivatives, things like that
if you implement newton raphson in an a way that works on arrays you can do ∪function⍣≡spread of values to find all roots at once
 
RGS
just noticed that the email that announced the 2021 comp was in my spam folder.
 
lol
 
9:58 PM
@dzaima Looks like dzaima/BQN's Under Select isn't handling negative indices: -⌾(¯1⊸⊏)↕3 breaks.
 
@Marshall I do remember not implementing it
 
@dzaima Found a better approach though so I'm not relying on this right now.
 
RGS
@Adám I'd like to file an official complaint about your keyboard :'( I keep typing ∊´ instead of é and ⍺´/⍺` and instead of á/à
 
@RGS Ah, so you'd like to be able to keep AltGr depressed?
 
RGS
@Adám I don't think so...
The keyboard is great, my fingers are just not coordinated enough when I start typing too fast
 
10:04 PM
Then I don't understand. é is AltGr+Shift+a,e but you are pressing AltGr+Shift+a,AltGr+e or AltGr+(Shift+a,e)
 
RGS
"being able to keep AltGr depressed" would more or less make it a "prefix key", if I understood correctly?
 
@dzaima pushed
 
RGS
I think I said it the other way around. What I type is ´∊ ´⍺ and `⍺
Because I activate the accent, but then type the key too fast, and my right hand doesn't let AltGr go in time
 
@RGS Yes, I understood that. And that's why you need the keyboard to define AltGr+Shift+a,AltGr+e as é.
 
RGS
@Adám Ah, that'd be interesting!
 
10:09 PM
That'll let you type AltGr+(Shift+a,e) for é
I.e. don't let go of AltGr.
You will need to let got of Shift, though, as otherwise you'd get É
 
RGS
@Adám Yeah, that mistake I don't make
:D
 
It will clash with some (probably unnecessary) definitions, like AltGr+Shift+r,AltGr+o gives ⍥ so it can't also give Ö
 
RGS
Yeah, but AltGr+Shift+(asrw) is usually followed by a letter so I don't think anyone would try to use that to actually type APL chars like ⍥, which is just easier as AG+Shift+o
↑ (in the case that we are using AG+Shift+(asrw) for an accent)
 
> probably unnecessary
 
RGS
Yeah, was verbalising my agreement.
 
10:16 PM
@skovorodkin Hi. Interested in APL?
 
10:37 PM
Hi Adám. I'm reading about J now. There's an Android app, so I can play with it in free time. But it'd be nice to learn APL later on. I heard about April, do you think it's a good enough dialect?
 
@skovorodkin I've not tried April, but if you're not using Lisp already, then I'm not entirely sure why you'd go with April.
 
I use Common Lisp a bit, so it's probably one of the easiest ways to get started for me. (ql:quickload 'april) and it's there.
 
Ah, OK.
 
RGS
TryAPL also makes it pretty convenient to, well, try apl :)
 
@skovorodkin OK, I quickly read a bit about April, and it seems to follow Dyalog APL quite closely. If you later need help with learning APL in general, don't hesitate to ask. I can also help with pointing out main differences from J.
 
11:02 PM
Thanks! I'm a slow learner, so don't expect any interesting questions too soon :) But in general, if you know J, it's not that hard to understand APL, right? I assume there's a lot of overlap in concepts between these two languages.
 
Yes, that's correct.
Main differences are the symbols used, and how functions are defined.
 
11:47 PM
@user41805 aaron hsu says he did some experimentation with a typed apl. He gave up on it because the types had to be ~4x longer than the code itself to be at all usable. But maybe you can email him for more details on it
 
Didn't know saying 'no' takes 55 minutes ;)
 
Aaron likes to spell things out.
 
@Adám Except when coding...
 
@Marshall What are you talking about‽ When coding, he'll write en entire doctor's thesis!
@Moonchild Now that you're here. It'd be really nice to split the bot into two, one for executing APL and one for bridging to freenode.
@adelidris Wow, it has been a while. Welcome back!
 
11:57 PM
@Adám When coding and when thesis-writing are entirely different states. Note that about 1200 lines of Co-dfns source (that is, all but 17) are not covered by that thesis!
 
Heh, so an entire thesis about 17 lines. I call that spelling things out :-D
I guess we can expect about 70 more theses…
 

« first day (1487 days earlier)      last day (1152 days later) »