« first day (1448 days earlier)      last day (1503 days later) » 
00:00 - 20:0021:00 - 00:00

00:00
@MartinJaniczek If you express a mathematical function tacitly, then you can find a (you don't get to choose which) solution by inverting it, even if it cannot be done symbolically.
@MartinJaniczek inverses and under are my favorite part of APL
@Adám huh, so it does
⋄ ((1∘+)⍣¯1) 3
@MartinJaniczek 2
@MartinJaniczek ⋄ f←(2×*∘4)+(¯3×*∘2)+(9∘×)+¯5⍨ ⋄ f 10 ⋄ f⍣¯1⊢19785 solves 2x⁴-3x²+9x-5=19785
2
@Adám
19785
10
00:05
@dzaima (though i don't particularly like the numerical solver overloading)
Is that done for all....surjective(?) functions?
Not all, there are certainly things it will fail on, but it is pretty good.
Find an x such that x+sin x=1: ⋄ 1(○+⊢)⍣¯1⊢1
@Adám 0.5109734294
@dzaima (and fwiw if dyalog could be started on android, my local unpublished version could attach to it just fine (reminds me to polish it and push finally aaa))
@dzaima Yeah, we really should get on with that. I suppose Apple moving to ARM might accelerate that, and we already have 32-bit Pi support, so why not…
00:10
<moon-child> I wonder if the linux version could be coaxed into running under termux or similar
Wouldn't there be a better chance of making the Pi version run on Android?
The silly thing is that we've already compiled for Android long ago.
<moon-child> I mean, presumably the pi version is running under raspbian or some other linux?
Yeah.
ngn
ngn
00:46
@rak1507 if G is the adjacency matrix of a graph, ∨.∧⍨⍣≡G is its transitive closure; for a weighted graph, ⌊.⌈⍨⍣≡G is shortest paths
2
appears the dyalog pi builds are armhf which is not my aarch64 (or arm64 on an ubuntu shell/vm thingy) :/
01:19
Finally. After all this time, ⍤ now works in kap.
That was some journey, some 20+ new testcases, implementation of a lot of missing functionality in ⊃, fixed subtle bugs in ¨, etc.
But now the test cases you guys provided pass. Thanks a lot for the help. I don't think the implementation would have been this complete if you didn't push me to do it.
01:58
Not to mention it all starting with implementing support for numeric arguments to operators as well as a detour implementing support for suer defined operators.
 
3 hours later…
ngn
ngn
05:12
@Adám interesting. when i was solving this challenge i tried ⊥∘coefs⍣¯1 (just out of curiosity, built-in solvers are banned). it didn't occur to me to try the verbose form
 
2 hours later…
07:27
I just discovered this gem: archive.vector.org.uk/art10001190 which has information about the implementation of APL\1130. The IBM 5100 followed a similar route. It emulated S/360. It ran a patched APL\360 interpreter from ROM.
I owe an apology to everyone involved in last week's discussion about English Grammar and Split Infinitives. I am not normally so prescriptive, and I was wrong about current usage.

Thanks to @RikedyP for setting me straight!
07:47
@xpqz noted. Would you be willing and able to send me an e-mail with the most important user stories that are failing for you on the Mac today, as input to our Mac review meeting (it will be at least a week or two before we get to it)?
@RomillyCocking I have heard about that and I always wondered why they went that route. Surely it's easier to implement an APL interpreter than a CPU emulator?
And performance would be a lot better as well.
The article explains why they went that route for APL\1130. The 5100 is another story, and I can only guess parts of the story. Here is my guess:)

I know that the machine that turned into the 5100 was a research prototype. I guess they needed a 360 emulator for its original purpose.
I guess that they put the APL\360 interpreter into ROM because someone wanted to play with it. I know that T. J. Watson (then head of IBM) saw the prototype and said @That is going to be an IBM product'. ANd so it was.
@RomillyCocking Btw, feel free to improve apl.wiki/APL\1130 if you want.
@Adám I will add that to my queue :)
In fact, you probably have a lot of historical insight you could contribute with,
07:55
And I will expand (or create) an entry for the 5100.
Right, that's missing.
@Adám I'm gradually writing 'a history of computing in six languages' which spans my programming life from 1958 (!) to now. Quite a lot of it talks about APL. I'll probably publish it in draft form when it is >30% complete, and add a link to the wiki.
2
@RomillyCocking You might actually be a reliable original source for Wikipedia's currently unsubstantiated claim about "code golf" that "a similar informal competition is known to have been popular with earlier APL hackers."
@Adám The 1130 article in vector explains more of that. Since the very first version was an emulator that ran with 0.5 K of free RAM, conciseness would have had a huge effect on performance. Also v1 only supported single letter names, and the use of single-letter locals persists to this day.
@Adám I'm not a primary source; I heard much of what I know from Phil Abrams, Al Rose and Adin Falkoff.
@RomillyCocking That doesn't necessarily contradict you having experienced early "code golf" personally.
08:07
The other game we played in them days, which may be unique to APL, was "dead key" puzzles, where you had to solve a problem without the obvious primitives.
I didn't come across code golf until quite late in my career. By the time I had finished my first project (a paid job that required me to write a dis-assembler for an obscure computer) I had never seen the code of another APLer apart from the code in the IPSA reference manual. And from then on most of the APLers I met were as new to the language as I was.
@MortenKromberg That's called a challenge on Code Golf Stack Exchange.
Sure, but APL is probably the only language where restricted source rules take the form of "imagine the T, Y and E keys are dead on your keyboard ..."
@MortenKromberg What is the earliest occurrence you remember of APLers competing for shortest code?
@MortenKromberg do you know if AL Rose is still around? Phil Abrams is alive and kicking - I'm about to see if Kevin Weaver will (re) introduce us on FB in the hope that Phil can flesh out some of the stories about APL\1130
08:13
Hard to be sure, but I think this kind of game was common at IPSA when I arrived in 1979.
Should go read the old newletters and my piles of hard copy output down in the basement, but that may have to be after I retire :D
... so don't hold your breath
J puzzles where the . key is dead might be fun :)
@Adám The first time I can remember something like that was when a member of the team at Atkins (which included John Scholes, Geoff Streeter and John Daintree) introduced me to ∧.=
That would have been ~1974.
but that was more a question of efficiency than brevity
In 1997 (aged 12), I wrote N~N∘.×N←1↓⍳N while visiting Anthony Camacho in Bristol. He and my father had shown me the classic (2=+⌿0=N∘.|N)/N←⍳N
@MortenKromberg Especially on Danish keyboards where that also prevents using :
@Adám My grandson is expected to arrive in the next month or so. My aim is to introduce him to APL before he is 5 :)
and displace you from your current world-record status :)
@RomillyCocking Surely not John Daintree then, if he was hired in '91 right after graduating.
@RomillyCocking What world-record?
@Adám Learning APL at the age of 5
I thought John was at Atkins but I must have mis-rememebred.
At 11 I was doing BASIC programming.
@MortenKromberg Was Kristoffer at APL 86 too?
@Adám I must have seen you there, but I don't remember it.
@RomillyCocking I don't either.
Do you recognise the person in the corner?
@Adám The face looks vaguely familiar but I don't know who it is.
09:00
@ngn whoa, that's really cool, I need to learn more graph stuff because I bet it competitive programming problems can actually be done decently ok in APL
ngn
ngn
@rak1507 in competitions there's usually a small set of approved languages
I know, unfortunately, but it would still be fun to try
@MortenKromberg Med glädje.
09:26
Does anyone know where I can find Ray Cannon's code that does svg animation in APL? The link from the BAA is broken.
@Adám Kristoffer was at APL86, I think there is a picture of him (and me) in the issue of Vector that reported on the conference, receiving a prize for winning the Year Game competition that was held at the conference. We shared babysitting duties with your parents.
Gitte and I submitted the winning entry by generating expressions on the IPSA internal timesharing system (and a bit of thinking), so we didn't feel we should enter ourselves in the competition.
09:47
@ngn aplcart gives (∨.∧⍨∨⊢)⍣≡ as the transitive closure
ngn
ngn
@rak1507 my version relies on every vertex being connected to itself, i.e. 1s along the diagonal
Ah right
Do you mind giving an example for the shortest paths one?
Also, my competitive programmer friend is saying 'that's cool but what's the time complexity' so do you know what the time complexity is?
ngn
ngn
opens wikipedia..
@rak1507 how about the graph on the right? en.wikipedia.org/wiki/Shortest_path_problem
thanks
ngn
ngn
@rak1507 the complexity should be slightly worse than floyd-warshall's algorithm, which is O(n^3)
09:54
what should I put if there isn't an edge between the two nodes?
ngn
ngn
@rak1507 0 for self, otherwise infinity :)
100 is basically infinity right? lets go with that
ngn
ngn
morten should look away :)
@rak1507 yep, as long as there are no cycles in the graph, you could also use the sum of all edges
regarding the complexity: ⍣≡ here converges quickly. if ∨.∧ uses a fancy matrix-multiplication-like algorithm, the complexity could even be subcubic
but i'm not smart enough to do the formal analysis
of course, in practice big O doesn't matter much
@rak1507 argh, what nonsense did i write again..
shortest paths should be ⌊.+
Ah, I thought there must be a + in there somewhere, thanks
10:26
@ngn what am I supposed to look away from?
ngn
ngn
@MortenKromberg infinities
There is a myth circulating that I object to infinities, I've had this thrown at me several times. It is absolutely not the case. The thing that I have vowed to keep out of APL while I have any influence on implementations is anything resembling "NaN". NaNs destroy pretty much any idiomatic use of array languages.
@MortenKromberg So in all cases where IEEE 754 NaNs come about, Dyalog APL defaults to 0 or throws or something?
We throw an error if the .NET bridge or some other FFI returns an array with a NaN in it.
ngn
ngn
@MortenKromberg ah, then sorry for reinforcing the myth
10:36
@MartinJaniczek for 0÷0 has ⎕DIV, and in every other case it errors
If you allow NaNs into APL arrays, developers have to map them and exclude them from any operations, which will make life pure hell. You are far better off rejecting them immediately.
@MartinJaniczek 5
So, defaults are chosen I take it
In our ODBC interface (SQAPL), we return NULLs as 0 or '', and you can request a boolean mask of the same shape as the data to tell you where they were.
10:46
Speaking of that, I need to put SQL support in KAP. Is the Dyalog SQL interface considered good (as in, should I use it as a model?)
@dzaima wait, is there actually no case when there are errors because of NaN? o.O
@dzaima Yeah looks like everything's extended to complex numbers where it can
1÷0 was the only class of expressions that errored out for me
@MartinJaniczek that's an infinity, not a NaN though. Dyalog does actually error on infinities
ngn
ngn
⋄ ⎕io←0 ⋄ 645⎕dr 64↑⍸1 12
@ngn
┌→─────────┐
│3.143E¯319│
└~─────────┘
ngn
ngn
11:01
max 64bit float is supposed to be ≈1e308
@ngn were you trying to get a NaN?
ngn
ngn
@dzaima yes
⋄ 645⎕DR ¯64↑1 1 1 1 1 0 0 0 1 1 1 1 1 1 1 1
@dzaima DOMAIN ERROR
ngn
ngn
@dzaima was my bit order wrong?
11:03
@ngn byte order. Needed a ,⊖8 8⍴
ngn
ngn
@ngn oh.. this is one of those subnormal floats
@ngn yeah. You can go down to 2*-1023+51
ngn
ngn
@dzaima typical of apl :) functions are associative in one direction, operators in the other. indices go in one direction, reductions and scans in the other. why shouldn't bits and bytes go in different directions :)
@ngn i'd guess it depends on system endianness such that a memcpy (or just changing the header) is enough. Kinda pointless when it has to scan through it for NaNs though
ngn
ngn
@dzaima it's strange to favour big endian over little endian
11:16
might be some APL-on-mainframe legacy?
ngn
ngn
probably something like that
should i try mmapping a NaN stored in a file? they must have thought of that.. i need something more cunning
hm, did it work? 645 ¯1⎕map gives me 2.696539702E308
@ngn that's unfortunately not a NaN (and I get the same result)
though 1287⎕map appears to allow NaNs
ngn
ngn
@dzaima how do you know? what do you have in the file?
@ngn I thought I knew what one was from a previous bug that allowed accessing one, but that was only in ⎕FR←1287
ngn
ngn
$ hexdump -C nan
00000000  00 00 00 00 00 00 f8 7f                           |........|
00000008
^this is my file
11:32
oh maybe it is a NaN
ngn
ngn
@MortenKromberg look away :)
either way, the 1287 NaN is prettier (I just copied the 645 nan twice in the file and that appears to have worked)
ngn
ngn
ok, enough trolling from me for now
0000 0000 0000 0000 0000 0000 0000 0078 for 'I.nfinityE9998' ≡ ⍕1287⎕map'nan'
@dzaima (that bug)
11:52
I'm not surprised you can get NaNs into APL by memory mapping, it would kind of defeat the whole purpose of memory mapping if we had a look at the entire file right away. Hopefully the airbag deploys most of the time when the wheels come off.
@MortenKromberg You can actually get NaNs with ⎕map, it's just that they look like regular numbers (as opposed to the 1287 ones, which look ..fun)
@dzaima oh, ⎕CT was getting in the way of things. With ⎕CT←0, inf≠ninf
@dzaima (oh, misread message. ¯\_(ツ)_/¯)
 
1 hour later…
13:11
@dzaima I suspect they don't behave like regular numbers if you do math on them. Hopefully the worst thing that will happen to you is DOMAIN ERROR.
@Adám Some ultra productive developers require an inverted management pyramid: you need more than one manager to deal with the flow produced by one person.
13:40
nan of course does regular nan things
What does ≠⍨ produce
lol that's quite something
ngn
ngn
nan comparisons are evil but fixable
@ngn they are not fixable in useful ways. I believe the recommendation is that nan≠nan. So you cannot even figure out where they are in an array, since ⍸array=nan will always return an empty result.
13:54
@dzaima get yourself a NaN with this
@Adám Do you know if the code for that early chess program "THE FOX" in APL is still available ? Was this the first chess program in APL ? Charles Wilkes co-author with his son of this chess program was working for IBM approximatively at the same time period than your father. The program was known by chess players at IBM.
@Adám Here are the links chessprogramming.org/The_Fox and all details are from a letter from Charles Wilkes from page 6 of archive.computerhistory.org/projects/chess/related_materials/…
ngn
ngn
@MortenKromberg you don't have to follow the recommendation. for a total order you can compare floats as bit patterns. only the first bit needs to be compared in a special way (⎕ct is a much more nasty complication)
by "first bit" i mean the most significant bit, the sign
@ngn but if you don't follow the recommendations, should you not expect that hardware instructions will not do what you expect, meaning that you can't use vector instructions for floating point, and so on, but have to write your own special code to do everything related to floating point?
@ngn needing to manually handle comparison would be a big performance loss
Anyway, there is nothing anyone can do to convince me to add NaN to Dyalog APL. We have discussed it thoroughly and it is all downsides. There is nothing of any use to real users by adding this support.
ngn
ngn
14:02
@MortenKromberg only the comparisons are problematic. if you embrace nans, other simd arithmetic should just work and you may even get a bit of speed-up by not testing for nans.
@dzaima not big. if x is the 64bit float reinterpreted as a signed 64bit int, x>>63 ^ x gives you a comparable value
@ngn Pretty much all idiomatic use of APL breaks down if you have to take NaN into account. What does (+⌿ ÷ ≢) mean?
@MortenKromberg NaN is a virus… It'd give NaN
Indeed, almost any array algorithm is likely to result in NaN after a few reductions etc
ngn
ngn
@MortenKromberg whatever it meant before. only the domain is extended.
@ngn is that >> arithmetic or logical?
ngn
ngn
14:07
"domain" as in "set of valid values"
@dzaima remind me, what's the difference?
@ngn it's that "real users" argument again. Yes, NaN would make APL "more complete". But if application developers have to deal with NaNs possibly appearing in arrays, they need to write two lines of code for every line of code they had before, or start by getting rid of all the NaNs.
@ngn arithmetic extends last bit, logical pads with 0s
ngn
ngn
@dzaima arithmetic (i mentioned "signed")
@MortenKromberg I don't think the invention of nans would mean they would pop up loads, surely any code that exists at the moment that doesn't produce a nan would still continue to not produce one
nans exist in python, but I barely use them at all
@rak1507 If we did not police data on entry into APL and reject NaNs, then functions which received data from .NET or other external sources would need to do additional validation, or risk producing meaningless results, or crash.
14:12
@ngn Not sure what that accomplishes. Doesn't handle -0 vs 0, and makes some things that aren't equal, equal
The potential benefits of adding NaNs do not stack up against the potentially HUGE pain of APL users having to guard against NaNs and either issue errors or eliminate them from input.
I think I agree in general but I doubt introduction of them would suddenly make them commonplace
(Meetings for the rest of the day, gotta run)
ngn
ngn
@MortenKromberg for me the stronger argument is that that's how hardware works. testing for nans everywhere just slows you down. floating point is dirty anyway, and i think it shouldn't be mixed with int arithmetic.
It doesn't matter whether they are commonplace. If you have a function called mean it always has to calculate the mean. The beauty of idomatic array thinking breaks down.
14:16
@ngn hardware for fp = doesn't work preferably with NaNs though, is the problem
@MortenKromberg imo a NaN is a perfectly acceptable result for the mean of an empty array
In theory yes, in practice I have yet to see an application that would want that result.
It would want the mean of all the non-NaN elements'
@MortenKromberg sure, they wouldn't want it, but they shouldn't really want 0 or 1 either
@MortenKromberg ah, you're taking about (+⌿÷≢)NaN 2 NaN 5, not (+⌿÷≢)⍬? In that case, just don't have NaNs in the first place, and everyone's done that so far
Right, and Dyalog APL ensures there are no NaNs at the boundary.
(+⌿÷≢)⍬ is 0÷0 which should be an error, none of this ⎕DIV stuff...
14:21
@MortenKromberg I just don't see how that fact has anything to do with mean. If Dyalog added NaN in the next version, things shouldn't break (unless you catch errors from things that would result in NaN, in which case you deserve it)
(to be clear, imo no NaNs is perfectly acceptable. i'm just discussing for discussion's sake and because I can regardless disagree with things)
@dzaima I'm sorry I don't have a better explanation for why it is bad other than that based on 40 years of writing APL systems and reading the code that others have written, NaNs would add no significant value and open up lots of cans of worms.
... and now I must run ...
I agree that NaNs wouldn't add much. It's just that handling them differently from pretty much every other language and needing to constantly check for them is a bit weird
They're also the wart part of the languages that support them, in my experience
@dzaima We don't constantly check for them, as you can see when you ⎕MAP them. We only check when we copy them into the workspace on receipt from the outside.
⎕MAP is a very sneaky way of loading stuff, by definition
hm, i guess ÷ is the only builtin that needs to check for NaNs in the result. Infinities, though, must be handled in pretty much every arithmetic builtin
14:34
@dzaima *
14:45
@dzaima with two references to the same array is optimized to return all 0s, but it also has special code for two scalar arguments that I guess skips that.
@Marshall hence "expected"
@Adám * would need to check anyway for complex numbers. is interesting though - so on 2 scalar args it's exactly like ÷ but instead of following ⎕DIV it errors?
@dzaima Yup, which means you could get erroring ÷ with ⌹⍥0 if we had the Depth operator.
15:21
@brgal Never heard of it. Maybe ask in comp.lang.apl?
Do BQN answers count for the APL bounties with no deadline?
No.
alright
You'll note that J isn't on the list either. BQN and J both use significantly different "spelling" of traditional APL primitives.
yeah, derivatives aren't there, just thought I'd ask anyway.
15:37
What are the APL bounties?
15
A: List of bounties with no deadline

Adám50 – 500 rep for an APL answer I will reward 50 rep if all of the following conditions are met: The answer is in Dyalog APL Classic/Unicode/Extended/Prime, APL2, APL+, APLSE, GNU/APL, Sharp APL, sAPL, SAX, NARS, APLX, A+, dzaima/APL, ngn/APL, APL\iv, Watcom APL, or APL\360. Feel free to suggest ...

7
A: List of bounties with no deadline

Bubbler100-500 rep for APL answers to Bubbler's challenges To celebrate me (Bubbler) reaching 25k rep (with over 100 answers in APL, 50 challenges written, and several thousands of rep gained from Adám's APL bounties), I will share some of my rep for even more APL answers! Specifically, I offer 100 (or ...

One day... One day, I'll post a golf answer in KAP :-)
16:27
@dzaima with a dpkg --add-architecture armhf and adding the RPi repos to the ubuntu thing, dyalog starts, and immediately exits with a segfault.. ¯\_(ツ)_/¯
16:54
<frasiyav[m]> Hello everyone
<frasiyav[m]> @dzaima I was wondering, how does ⌊⌾| work in your BQN implementation? I was under the impression that Under could not work with functions that throw away information so I'm curious if Absolute Value is a special case or if there is some way to extend it to work on such funcitons?
<dzaima[m]> <frasiyav[m] "@dzaima I was wondering, how doe"> in dzaima/BQN, there are 8 ways to "call" functions. takes three of them. | just defines it to be something more special than usual
oh that's a bit ugly on the SE side. Links persisted though, which is fun. Should really (how many times have i said "should really do ___"?) finish my SE-Matrix bridge
<dzaima[m]> There's often a separation of "structural under" and "computational under". dzaima/BQN (and dzaima/APL) make no distinction between the two, other than under defaults to calling inverses if there's no special under code
<dzaima[m]> as a result it's possible to have ⌾| be a bit of both
<frasiyav[m]> So the special definition is like if you had an Under header case and just wrote your own definition?
<dzaima[m]> yep. Though an under header like 𝕨 f⌾𝕊 𝕩: isn't allowed currently, I've thought about it
<dzaima[m]> (actually, fwiw, 𝕨 f⌾𝕊 𝕩: is invalid. it'd need to be F⌾𝕊 𝕩:/F⟜b⌾𝕊 𝕩:/b⊸F⌾𝕊 𝕩: for the 3 cases)
<dzaima[m]> so the | thing would be {F⌾𝕊𝕩: (×𝕩) × F|𝕩}
<frasiyav[m]> Thinking about Under as "transforming to a new domain" there are a lot of cases where being able to preserve some information is useful.
<dzaima[m]> a fun thing you could almost do with a pure under in dzaima/APL was take a string of the form #RRGGBB or #AARRGGBB, and, say decrement each non-alpha channel with just a -∘1⍢(...)
17:24
@dzaima That would be awesome :-)
how it looks currently (3 bridges bringing messages from the matrix room to my local one yay); The part left to do is converting arbitrarily long arbitrary HTML on the matrix side to SE's 500 char messages with its messy ""markdown""
tryapl.org is giving me: 504 Gateway Time-out
@RikedyP i believe you're the one to ping for tryapl problems?
Question: say i have a nested list:
2,/⍳5
┌───┬───┬───┬───┐
│ 1 2│ 2 3│ 3 4│ 4 5│
└───┴───┴───┴───┘
How do I use index to get the 1st and 3rd sublists
@code_report ⋄ (2./⍳5)[1 3]
17:34
@dzaima
┌→──┐
│1 2│
└~──┘
@dzaima ⋄ (2,/⍳5)[1 3] typo :|
@dzaima
┌→────────────┐
│ ┌→──┐ ┌→──┐ │
│ │1 2│ │3 4│ │
│ └~──┘ └~──┘ │
└∊────────────┘
<dzaima[m]> oh huh message order gets lost here in transmission (on SE it's all in one message)
hmmm, that works for the 2,/i code
but my real example it says RANK ERROR
@code_report what's the shape of your array?
oh, so actually it isn't a nested list (I simplified the problem incorrectly)
it is the result of {(≢⍵),⍺}⌸...
basically im trying to sort and get the top N frequently occuring things from the use of Key
17:38
for getting 1st and 3rd row/column you can do x[1 3;] or x[;1 3]
Or change the operand to {⊂(≢⍵)⍺}
@dzaima Thank You!
that was the incantation I was looking for
ngn
ngn
@code_report you really wanna use ⎕io←1?
no, im just too lazy to change it
and that is the default on tryapl
studies show like 90% of ppl just choose the default. and most of the time it doesn't make a difference
im not actually typing indices, i am doing
t←{(≢⍵),⍺}⌸2{⍺,' ',⍵}/' '(≠⊆⊢)input⋄t[5↑⍒t;]
ngn
ngn
ok, fair :)
17:44
So I'm reading about SQAPL. There are some ideas there that I could use> The concept of generating tables, and using commands to read entire tables without using any SQL statements at all is intriguing. Almost like an ORM for APL.
@ngn on a different topic, you mentioned the primitives vs algorithms earlier
KAP can really leverage this, since it has support for axis labels.
what is the difference? I know about verbs & adverbs VS functions and operators. I sometimes refer the the verbs/functions as algorithms
but colloquially ppl don't use primitives to refer to the APL glyphs?
@code_report I call them builtins, but primitives is also fine (i'm just more leaning towards builtins as i called simple scalars "primitives" in dzaima/APL/BQN)
builtins makes sense for Python (docs.python.org/3/library/functions.html), but as Guy Steele pointed out in his Growing a Language talk - APL-ers can't actually write "functions" that look like the APL glyphs
17:48
@code_report "algorithm" to me implies a specific implementation. A single doesn't say anything about implementation (what sort algorithm? is it even doing anything by alone even?)
@code_report What do you mean?
so calling them builtins seems a bit odd - b/c for python it is to disambiguate between user written and builtin functions
ngn
ngn
@code_report just word usage. "algorithm" is a particular sequence of steps to perform a task.
@code_report that works for APL too - + is a builtin, {⍺+⍵} is not
ngn
ngn
@code_report that's my favourite talk that mentions apl :)
17:50
@dzaima - my point exactly ... user can't define a single "new" glyph
they can only write anonymous functions vs { ... } or dfns
which look nothing like the single character APL glyphs
@code_report what's the problem about it? do you want a single name for all of + {⍺+⍵} {⍺⍺ ⍵⍵ ⍵}?
@dzaima no, my point is that the term "builtin" comes out of a need to disambiguate - APL does not have that need
@ngn re:algorithms ... I guess coming from other languages ... APLs "builtins" are C++ (insert other language) algorithms: en.cppreference.com/w/cpp/algorithm
Note C++ algorithms include: reverse, rotate, take, drop, etc
@code_report there's still sometimes a reason to separate builtin from custom fn/op (especially when teaching). Otherwise, just call them functions/operators
@code_report imo C++s <algorithms> is a horrible collection of random stuff :)
@dzaima that is a really uninformed and not nice thing to say
@code_report in what world would I expect binary sort and a max function to be in a single package?
ngn
ngn
17:56
i would say "qsort" is an algorithm and "sort" isn't
^ +1
@dzaima "Despite the name, C++, C, and POSIX standards do not require this function to be implemented using quicksort" oh maybe not
@dzaima If you knew the history of the standard algorithms in C++, you would know that almost all of the algorithms build up towards std::stable_sort
Alexander Stepanov (the father of the C++ Standard Library) was a big fan of Ken Iverson and APL
std::partial_sum, std::inner_product, std::accumulate all came straight from APL
@code_report if learning the history of <algorithms> is required for it to not be considered stupid, I think it's worth still being called stupid
wow @dzaima ...
@dzaima (and yes, it was intentionally not nice (noone's ever nice against java, why can i not be nice against C++? :P))
@code_report (i'm just complaining about the name, not the contents. having sort, partial_sum, binary search, etc out of the box is good. Just packaging it under the same name as max and equal is a bit weird is all)
@dzaima s/why can i not/why can i not not/ :|
18:03
@dzaima There should be a note in your "differences from Dyalog APL" about ↑ not taking numbers larger than the dimensions of the right argument. (I hope I'm not mistaken about Dyalog adding 0s / ''s when it gets past the source data)
⋄ 3↑2 2⍴1
@Martin Janiczek
┌→──┐
↓1 1│
│1 1│
│0 0│
└~──┘
@MartinJaniczek true, i'll add it (might take ±forever to be pushed though as i've got the commited but not pushed half-broken android app update)
ngn
ngn
@code_report would you call c's + operator an algorithm?
(also note that dyalog silently allows 10↓1 2)
@dzaima it is really discouraging to know this is how you (as a community leader) respond to people coming to APL from other programming languages that are excited about APL.
ngn
ngn
18:08
apl itself is full of bad terminology coming from historical accidents, for instance "operators" or the very name "apl"
@code_report me, community leader? (i'm trying to not be offensive, but i also won't not say that something is bad when it's bad)
ngn
ngn
if we want to open up to the wider world of programming, we should be adopting more popular words in their popularly perceived meanings
it pisses me when i read about "iterators" or "names" or "expressions" in k
@dzaima (and yes, that message is still mostly tongue-in-cheek)
@dzaima when i try explain that APL & C++ actually have shared history, Stepanov was a big APL fan, and that knowing the motivation adds meaning to all the different algorithms your response is:
> if learning the history of <algorithms> is required for it to not be considered stupid, I think it's worth still being called stupid
that isn't "trying to not be offensive"
ngn
ngn
@ngn (for those not familiar: "iterator" = an adverb, like apl's operator; "name" = symbol, i.e. atom like in lisp; "expression" = a function with 0 args)
18:13
@code_report that i just completely misinterpreted, sorry (i thought you were trying to justify the naming)
@dzaima misinterpreted or not - you are clearly trying to be offensive and inflammatory with your responses
@dzaima and raising your hands and saying
> me, community leader?
is also disappointing. as if you saying that you aren't a community leader, means you have no responsibility for your words
@code_report that was still tongue-in-cheek (and more about the term than the implications). probably should stop with that now
you have the super useful: https://dzaima.github.io/paste/
you have an APL implemention on TryItOnline
and you have a ton APL Orchard kudos
ngn
ngn
@code_report no paying customers though :)
std::iota is the most obviously APL inspired c++ thing imo
18:18
Guy Steele, one of my heroes, said in his PLDI 2020 AMA "I love ALL programming languages" ... after talking about his experience falling in love with APL as a kid
I love all programming languages... apart from PHP
for a language (APL) that is so widely misunderstood and has so many negative things said about it ... shitting on other languages is the last thing I would expect from people in this community - and it is really sad to see it happen
@rak1507 yea, how did i forget std::iota
@code_report I'm really not saying anything bad about C++ as a whole, just the single name "algorithms" for a weird group of functions (as in, the grouping is weird, not the functions). Seems I went a bit too far with how much i demonized it (i've gone on much more intense rants about certain APL builtins (cough scalar,scalar cough \))
@dzaima cough aplkeys.sh cough
The shitting on other languages here is mostly joking, I don't think dzaima was trying to seriously insult c++ and make it out to be trash. On the other hand, in a lot of obscure communities they view whatever their thing is as the best and everything else as inferior, and I think that applies to APL too to an extent. (I'm sure someone else has said something about that at some point too)
@dzaima sorted now - sorry and thanks
ngn
ngn
18:28
@code_report but here we talk shit about apl too. i'm particularly annoying - i'm sure the others would confirm :)
@ngn affirmed
@rak1507 If you watch the first 2 minutes of this lightning talk: youtu.be/tsfaE-eDusg you will understand that I have strong feeling about this. All PL communities don't think their language is the best, and C++ is one of them. Most C++-er's think C++ is the best for certain domains
All PL communities don't, but the more obscure, the more likely to, from my limited experience
@code_report I would hope most programming language users would think their favorite language is the best for at least one domain :p
18:30
I think it is fine to say bad things about your own language and even fine to acknowledge deficits of other languages, but shitting on another language especially when it is directly at someone who is trying to explain why it isn't actually bad is the absolute worst
I disagree I think several languages are really great that are all inferior for actually doing something compared to a different language @dzaima
@rak1507 those must be the best at something (where that "something" can be an arbitrary function of programming efficiency, performance, fun, hard-to-use, etc)
True
the question is how big (and important) is the domain the language is the best at
@code_report this was the only case i did that, and even then it's 1) very exaggerated; 2) based on a misunderstanding; 3) made in a very joking manner (as many of my messages are)
19:15
@dzaima I've tried out both "builtin" and "primitive" a little, and I've ended up somewhat in favor of "primitive" since lots of things like system functions can also be built in. But system functions wouldn't be considered basic building blocks for algorithms, which I think is what "primitive" conveys.
@Marshall That works. + is both a builtin and primitive, but •FChars is just a builtin
ngn
ngn
@code_report in the video you mentioned combinators (i assume you're same person as the voice there). may i ask what other combinators aplers are unaware of, but should be?
and i'm particularly interested if there are any famous combinators that can express non-trivial recursion (not: Y)
SII maybe, it takes an argument and applies it to itself
ngn
ngn
@rak1507 that might be too trivial. i was hoping to see better ways of understanding, explaining, and maybe simplifying this idea
Ah, that looks interesting, I only skimmed it but I'll have to go back and read it later
ngn
ngn
19:29
tl;dr a pentadic (!) combinator that takes a stop-predicate, a finalizer, a divider and conqueror (all functions), and an actual argument, and produces a recursive function
btw the html at the bottom is broken
ngn
ngn
(technically a tetradic combinator, i guess..)
@rak1507 right. if you don't allow js for most sites, you learn to not even notice these things :)
(sorry about the split infinitive)
00:00 - 20:0021:00 - 00:00

« first day (1448 days earlier)      last day (1503 days later) »