« first day (1498 days earlier)      last day (1139 days later) » 
01:00 - 22:0022:00 - 00:00

1:11 AM
@Adám I have another question, sorry to keep bugging you. from inside a dfn, I want to call ⎕NR¨#.⎕NL¯3, but once inside that function, it reports dfns that are lexically declared from within the function as part of the root namespace
How can I ⎕NR¨#.⎕NL¯3 and return ONLY THOSE FUNCTIONS actually declared in the # namespace?
before I ran clear and relinked, even dfns from within other dfns not related to this one in any way were being reported
by reordering the call so that the expression above is the first line in the dfn, it doesn't report the dfns that are defined below it. But that assumes I won't need to call it another time on another namespace
 
1:40 AM
@Adám interesting!
 
 
4 hours later…
5:33 AM
Where in the Dyalog documentation can I find a description of how ∘ works? I was reading the trains documentation, and they just introduce the use of ∘ in the middle of a description and never explains what it does: help.dyalog.com/latest/Content/Language/Introduction/Trains.htm
 
@user41805 Thank you. That helps.
However, since I have never used this, its behaviour is still not entirely clear to me.
In the example: ⌽∘⍳¨ 3 4 5, I presume this is equivalent to {⌽⍳ ⍵}¨ 3 4 5
 
@EliasMårtenson yes that's right
 
Oh, now I think I get it. "bind" is a separate form, and it's always bind or compose, not both.
I can see how compose can be useful.
I need to find a different symbol to use for it though, since my parser would need a pretty ugly hack to handle both outer-join and compose for the same symbol.
Now, maths use ∘ for function composition, which is an argument in favour of dropping the ∘.FN syntax for outer join.
But then again, the traditional outer join syntax is very established.
 
you may be interested in seeing how j does it jsoftware.com/help/dictionary/d420.htm (it's the dyadic form of /, so that's the right gray box)
 
5:49 AM
@user41805 Yes, they have a dedicated operater for outer product. I actually also have that (written as FN⌺), and the ∘.FN syntax is just there fore APL compatibility.
At least that was the original thought. However, the traditional form is so common that ∘.FN becomes the natural form.
 
 
2 hours later…
7:58 AM
@nathanrogers If you have the latest Link then ]add ⎕IO should work. Otherwise you can hand-create an ⎕IO.apla file that just contains 0
@nathanrogers That's why I wrote my code the way I did. Best is maybe to put the utility function in a different namespace. (Also, for completeness, function declared in a function in # also live in #. Namespace scope ≠ function scope.)
@EliasMårtenson But that form is so anomalous. You may be interested in how Iverson rationalised it, namely that ∘.FN is an archaic spelling of 0 .FN i.e. . is a normal dyadic operator which can take either an array or a function left argument. If you make . prefer being an operator over being a decimal point (or alternatively disallow 1. for 1.0) so one isn't forced to insert a space; 0.FN
Then the only "bad" thing is that you'll often have to parenthesise x(0.+)y since x 0.+y will parse as as (x 0).+y
 
@Adám So you are advocating in favour of dropping the ∘.FN form and use ∘ only for function composition?
 
@EliasMårtenson Yes, especially since ∘.FN is simply FN¨⍤0 99
 
Which symbol would be appropriate for outer product then? As I mentioned, I currently use ⌺ but that's just because it looked like something enclosing something else. Very poor analogy, I know.
 
If you want to hark back to the origins, could work. I've also advocated f\ or f⍀ in the past.
Another option is
 
8:14 AM
Actually, this makes the implementation simpler. ∘ is actually a real function in Kap (called NullFunction). Calling it raises an exception. The . operator explicitly checks if the left function is the NullFunction and if so delegates to the implementation of outer product.
It's really ugly, and if I get rid of ∘.FN then I can remove that code too.
 
 
1 hour later…
9:19 AM
@nathanrogers Wow, missed all this yesterday. Thank you, I like your approach.
 
9:35 AM
@Adám looking at some of the code you pointed to yesterday, what does it mean when the result and/or the left argument to a tradfn are {in braces}, e.g. github.com/Dyalog/link/blob/master/StartupSession/Link/…?
 
:) I see. I should get used to the fact that APL cart is extending beyond its "how do I...?" credo. Although I don't think I would have thought to search like that.
Anyway, that's a nice feature of tradfns, being able to see from the header which things are optional,.
 
@xpqz tbf, it does say "Tell me about", so the phrase "Tell me about tradfn left argument in braces" should be natural
 
Perhaps it should.
 
@xpqz Yes, and similarly, you can see if they are shy or not. Dfns can be both shy and not shy (confident?) at the same time.
Tradfns can also require a vector right argument with a fixed number of elements (a.k.a. a fixed number of "arguments") so you can let the APL system do that check instead of having to code it as (,N)≢⍴⍵:⎕SIGNAL⊂('EN'5)('Message' 'Right argument must be a vector of correct length')
 
 
1 hour later…
11:02 AM
@EliasMårtenson ⌺ is stencil because it looks like a Gaussian blur (if you squint)
 
@MortenKromberg Thanks. I did not know about that function.
Please let me read the Dyalog docs on the topic.
 
@MortenKromberg Really? I thought it was a stencil laid upon an array .
 
https://help.dyalog.com/18.0/#Language/Primitive%20Operators/Stencil.htm?Highlight=stencil
https://www.dyalog.com/blog/2017/07/stencil-lives/
https://www.dyalog.com/blog/2020/06/towards-improvements-to-stencil/
@Adám Same thing, really
Gaussian blur is just a fuzzy stencil
 
11:23 AM
Is ]LINK.List removed? aplcart.info/?q=%5Dlink.list# doesn't work in my Dyalog:
 
@xpqz It has been renamed Status
 
 
3 hours later…
2:06 PM
damn, working on a golf problem, scrolled down and there's already a better J one
shame I can't read J
I have a 39 in extended and a 40 in regular
 
2:21 PM
@rak1507 I can't either, but it is possible with some effort to translate: jsoftware.com/help/dictionary/vocabul.htm
 
'some' is quite the understatement
golfed down to 37 so the same number as the J answer but I feel like APL should be golfier than J
 
2:42 PM
We need a J→APL transpiler.
 
an auto explainer would be cool, something that syntax highlighted it and provided links to each part
 
2:55 PM
@rak1507 The first part does something like: ↑{10|⍨⍣⍵⍳10}¨⍳10
 
 
1 hour later…
3:55 PM
@rak1507 Got this down to 33 in BQN. In Dyalog the 1↓(…)¨⟜» would just be 2(…)/¨ so this might actually come out shorter. Also the ⍟× wouldn't be needed, since 0|n is n instead of NaN. But you can't use an array right operand like ↕1+𝕩 for Power so that part would be worse.
 
nice
 
Announcement: I'm about to live-code implementing a user command on twitch.tv/adambrudz
 
aw, I'm going to miss this one, doing a CTF soon :(
 
 
2 hours later…
6:26 PM
i followed @ngn's advice to show beginners what's bad about APL, so i started with classes and tradfns
but unfortunately my friend liked them more over the idiomatic APL style.
3
 
ngn
haha :)
 
ngn
@KamilaSzewczyk did you demo a tradfn modifying its caller's environment?
 
yes
he treated it as a nuissance that he says can be avoided
 
@KamilaSzewczyk That's true.
 
ngn
6:42 PM
idk, i'd rather spend my time thinking about the problem than avoiding nuissances
 
@ngn I doubt most APL users are in a position to create their own implementation
 
ngn
@dzaima ?
 
@ngn thinking about tradfns being bad is completely pointless unless you can actually change them (or dfns) for the better somehow
 
ngn
@dzaima just use a sane language
 
@ngn ok, give me an array-oriented language with separated rank and depth and high performance :)
 
6:45 PM
@dzaima J?
 
ngn
@dzaima what does that have to do with dynamic scoping?
 
@Adám ok, that is writable
@ngn your solution to dynamic scoping in Dyalog is to use a different language. I'm asking what that different language is
 
ngn
@dzaima k
 
@dzaima why separate rank and depth?
 
@rak1507 because that's what I prefer
 
6:47 PM
fair enough
 
ngn
@dzaima is that more important than the constant threat of your locals being modified by the functions you call?
 
@dzaima (oh, and i also very much like lexical scope, so k isn't sufficient)
 
ngn
@ngn (it doesn't have to be k, most modern languages use lexical scoping of course, but since you asked about my solution..)
 
@ngn right, you have an acceptable solution for dynamic scoping in tradfns. That doesn't mean it works for everyone as you yourself said, and for those eating the small inconvenience of the occasional misuse of tradfns is easier to deal with than creating a new language for themselves
 
ngn
@KamilaSzewczyk did you show reductions and scans?
 
6:55 PM
yes, I did
that person already knows J to a somewhat basic but usable degree
that person also knows Haskell, to an intermediate degree
 
ngn
it may be worth mentioning that apl reductions go in the wrong direction and scans can be O(n^2). another minor inconvenience :)
 
@ngn wait, reductions are foldl in k?
 
not that annoying, RTL is a deliberate design choice rather than a mistake like other things
 
ngn
@xpqz yes
@rak1507 a deliberate design choice can be a mistake
 
maybe but in this case imo it isn't
 
7:02 PM
That's one thing I wish APL did, although I understand why it is the way it is.
 
ngn
@rak1507 you like slow scans?
 
Not particularly
 
@ngn reductions go in the right direction.
:)
 
ngn
@xpqz presumably because syntax is right-associative. but i say what matters here is the direction in which indices grow.
@KamilaSzewczyk ^
 
@ngn if there was an actual initial element, the direction would probably be much more important (i'm saying this as BQN has rtl reduction with an initial element...), but as-is, reduce already just sucks for non-commutative things.
 
7:08 PM
I also think RtL reduction and scan is right in APL. Now when it comes to LPA
By now, I'm fairly convinced that the RtLness of APL is sub-optimal. A lot of things just fall out nicer when made LtR.
 
(imo the right-associativity of functions doesn't at all deserve to be related to reduction direction. even the simple fact that is the accumulator is more useful to me)
 
ngn
@dzaima maybe the indices should be thought of as a different axis from the left-right line of syntax, and then the fact that the initial-value is on the left wouldn't matter
@Adám for k suboptimal≡not right :)
 
The entire K family, being RtL, is sub-optimal imo.
 
@dzaima (that is to say that / being RTL is pretty much pointless. I do think LTR would be better, but it's still a very very tiny problem (compared to scans or dynamic scoping); anyways gtg)
 
ngn
@dzaima +1 (about scans and scoping being much more important than rtl syntax)
@Adám syntax doesn't have a noticeable effect on performance. but tbh i'd prefer ltr too, for aesthetic reasons. if only it could be done elegantly..
 
7:21 PM
I don't see why LtR would diminish elegance.
K, with its simpler syntax than APL, would probably be easier to adapt to LtR than APL.
 
ngn
@Adám it's not clear what to do with monadic verbs and adverbs. maybe it can be done elegantly.
 
Is there any downside to monadic functions being postfix?
 
ngn
@Adám matter of opinion, but it doesn't feel very natural to me
 
monadic prefix but still LTR? is that even possible
 
@xpqz I did a lot more on it. Too much to TIO comfortably. I'll get you a link once I've set it up in github, with working examples in a project structure.
 
ngn
7:27 PM
@rak1507 maybe. what about adverbs and assignment?
 
assignment can still be foo←bar and adverbs... still +/ etc? not sure
Would probably introduce a bunch of annoying precedence rules
 
x! and Aᵀ and x² and f′ are already postfix in TMN with no ill effects.
 
]add ⎕IO
* Command Execution Failed: DOMAIN ERROR
or am I doing that wrong?
 
@nathanrogers Wrong Link. Upgrade to 2.1
 
so 1++/1 2 3+5 would maybe be... 12?
 
ngn
7:29 PM
@Adám negligible minority
 
How many prefix functions are there really in TMN? - and the trigs?
 
ngn
@Adám sqrt, ln, sgn, ..
generally, f x reads better than x f at least when x and f are english letters/words
 
√ is a grouping function like |x| and ⸻ (division).
@rak1507 Is there any downside to monadic operators taking their operand on the right? 1 2 3/+ "one two three reduced by plus"
 
will current versions of link be included in regular builds of future "current" dyalog versions?
 
@Adám Don't know
 
7:33 PM
I think f x looking better than x f is a matter of what we're used to. x.f looks fine, right?
 
Looks like it might be fine
 
@nathanrogers 18.1 will come with the new Link (which will then be 3.0) out of the box.
 
ngn
@Adám right
 
release date?
 
I can't promise anything, but 18.1 is shaping up nicely, with a planned code freeze in 4 weeks, and release somewhere in Q2.
 
7:36 PM
groovy
 
Another benefit of LtR is consistency with the object.dotting.notation
@nathanrogers No, APL, actually ;-)
 
accessing from a namespace should be a function rather than special syntax
if there was a 'sane indexing' function imo that would be good
or a function application
 
I didn't expect you'd react to that
such a BASIC pun
 
ngn
@nathanrogers react? no, just jQuery or plain js
 
knockout the puns already
 
ngn
7:40 PM
@nathanrogers i can see another one among adam's latest messages, actually :)
there's a golfing language called "actually"
 
@rak1507 Geoff wanted that, but the others wouldn't have it. Though, how would that work when accessing a non-array from a namespace? Also, you know about ?
@ngn Seriously?
 
@Adám well you could access by the name, like with ⍎
I don't see the need for two ways of doing the same thing
 
ngn
@Adám yep, "seriously" too
@rak1507 right. tradfns+dfns <- one of them must die
 
@ngn I agree
/ and \ should also both either be redefined or killed considering they can be defined in terms of ⌿, ⍀ and rank
 
speaking of other languages, has anyone built anything non-trivial with KONA or 3rd party implemenation of K?
 
7:43 PM
@ngn No, I actually meant that Actually is actually called Seriously. Seriously!
 
ngn
@Adám ah..
@nathanrogers how non-trivial?
 
@rak1507 + too. We have -∘-
 
'w⌠iXu⌡Mπ' doesn't seem like a very good golflang compared to something like jelly (or even dyalog extended!)
oh nvm ÷l
@Adám lol
 
I actually like that it is so easy to get both horizontal and vertical reduction in APL.
 
it would still be easy
+⌿⍤1 vs +/ isn't a big deal imo
 
7:47 PM
Often it is +⌿⍤1⊢
Though getting rid of space stranding would fix that.
 
@Adám no big deal imo
it's worth freeing up a symbol for different use
making / purely replicate would be nice so it worked properly in tacit fns
 
dzaima-style?
 
if that's what dzaima/APL does, then yes
I don't know dzaima/APL
 
@rak1507 Yes.
 
that seems sensible
 
8:01 PM
@nathanrogers cool, I was about to hack it about a bit to allow for both left and right args...
@rak1507 that is nice. Probably something that Dyalog can never fix given how much old code that would break.
 
Oh yeah, no chance in dyalog changing the behaviour of primitives realistically
 
For Dyalog APL, right. But maybe we'll create a new language one day…
I'm even protesting against Morten's idea to change the meaning of dyadic grade.
 
Probably wouldn't be profitable to make a new array language realistically
@Adám how come? who uses dyadic grade... it seems a bit pointless
 
@rak1507 I use it here to achieve all sorts of useful orderings.
 
fair enough
 
8:09 PM
And I'm sure there is plenty of code that uses it for simple case-deferring sort too.
 
It probably wouldn't break too much and it would be simple to fix + add potential new things that would be cool
It seems for this case the benefits outweigh the negatives from my point of view
 
@rak1507 I disagree. He wants to make it {(⊂⍋⍵)⌷⍺} a.k.a. ⌷⍨∘⊂∘⍋ or with sane indexing ⊇⍨∘⍋ or with sane indexing and reverse-compose ⍋⍛⊇⍨ so not a whole lot of benefit for the cost.
 
so ⍋⍨ would be a sorting function? where do I sign up
 
I'm advocating for monadic and as sorting functions.
 
ngn
@rak1507 but what about the guys with billions in turn-over? :D
 
8:20 PM
@Adám that would be great
@ngn do people with billions in turnover rely on dyadic grade?!
 
ngn
@rak1507 depends on who you ask
 
@ngn prolific tool or application used in production, a sustainable startup keeping its doors open through something built using the language?
anyone using it irl for srs brsnrs, not some personal toy or pet project
 
ngn
@nathanrogers that would be one of the proper ks, not us the copycats
 
That's sorta what I'm asking
if anyone has built anything non-trivial in the copy-ks
So you're saying "i don't know" and "if there is they probably aren't telling anyone" right?
 
ngn
@nathanrogers who is "they"?
 
8:28 PM
I can't tell if you're being pedantic or if it actually doesn't read well. "they" as in "they who may or may not have built a non-trivial application in one of the 'copy-ks'"
 
ngn
@nathanrogers i said the non-trivial (according to your definition) application would have to be built with one of the proper ks (read: whitney's). i actually don't know if kona is used in a way you'd find non-trivial. i presume it's not.
@nathanrogers so if they∊{kx,shakti}, i'm sure they are telling someone about the applications, but they are not telling everyone
 
If you ever want to convince yourself tradfns aren't too bad, here's J:
   m =. 1 :('f=.%';'u y')
   - m 4
_4
   (f =. -) m 4
_4
   f m 4
0.25
 
ngn
luxury! in basic we didn't even have functions, only gosub-s
 
8:55 PM
@Marshall Hm, realized a reader might think m is just setting f globally. Not so: the assignment to f is entirely contained in m. Actually, f is passed by name, and to apply it the name is reevaluated in whatever scope it happens to be in at the time. This is known and not considered to be a bug. To fix it, you have to apply Fix before calling an operator to expand all the names (because tacit functions can also contain them).
 
so basically what you're saying is basic doesn't function
 
ngn
@Marshall what is u?
 
or functions poorly
 
@ngn u is the left operand, like ⍵⍵.
m just assigns f, never uses it (or one might think), and calls the operand on the argument.
 
ngn
more like ⍺⍺
@Marshall so, (f =. -) is passed to the adverb as u without being fully evaluated?
 
9:01 PM
@ngn Wait the operands aren't ⍵⍵ and χχ?
 
ngn
@Marshall i was thinking in apl (left operand ⍺⍺, right operand ⍵⍵; if there's only one, it's left)
 
@ngn I guess the value of f =. - is -, not f. I don't actually know how that part works.
@ngn Just joking about how I don't remember how APL works any more.
 
ngn
:D
 
Hey @Marshall how you been?
 
9:12 PM
@nathanrogers Been all right. BQN's doing pretty well, and I'm starting to use it on some stuff that isn't just its own implementation. Been learning classical piano too, actually.
 
ooh piano cool
 
ngn
prediction: next squiggle in bqn - :)
 
lol
 
@ngn No, libraries are the BQN way. Although I do have to admit that b for flat in Note (scale.bqn) could be better.
 
@Marshall I've always wanted to pick up classical piano, but guitar eats up so much time. if I take a day off I can't keep up the pace on what I play.
if I could dedicate my life to piano, I'd learn some liszt, but I'm stuck playing hot cross buns
 
9:28 PM
@nathanrogers Helps that I'm not too concerned about playing things to performance standards. I play guitar and piano for about an hour a day each, and clarinet off and on.
Also not having a job frees up a lot of time.
 
are you seeing many other users for bacon?
 
ngn
what's the difference between classical piano and unicode piano?
 
🎹 ← unicode piano
https://www.youtube.com/watch?v=zGBXA1tBiLw

↑ classical piano
 
@nathanrogers A few. I don't think anyone's started doing anything serious with it but people are definitely experimenting.
 
one is unicode, one is classical @ngn
 
9:33 PM
@ngn unicode has more tones
 
@Marshall with what you're working on, are you able to reveal what you're building?
or is it more along the lines of building up a catalogue of examples?
 
@nathanrogers Everything significant is on Github. Right now I'm working on synthesized music and Singeli, which is a low-level language for to use in implementation.
I also need to see if I can parse NOAA's weather data to get it on my desktop in a format I like. I had something working with Google's weather API a long time ago, but they killed it and NOAA is more complicated.
The Singeli implementation is interesting because I'm using OOP for a few things including AST nodes, so I get to see how good BQN's namespaces are for that. All right overall. No support for inheritance but composition is pretty easy to use instead.
 
Will Singeli be a notational language?
or more c-like?
 
ngn
@nathanrogers still listening. i knew it sounds familiar! i looked it up. it is the same piece motif as "danse macabre"
 
@nathanrogers It's sort of Go-ish, maybe? Except that generics are basically the main feature so that part is not much like Go. But you should be able to declare operators, so you could add all the APL operators and put them at the same precedence and get something readable to an APLer.
 
9:48 PM
@ngn dies irae?
 
ngn
@rak1507 apparently yes
 
now that you know about it you'll notice it in every movie score ever
 
ngn
so what i'd heard before was Saint-Saëns' version
 
How do movies score anyway?
By kicking the ball into the net, by tossing the pigskin into the endzone, or tossing the ball into a hoop?
 
9:55 PM
@rak1507 at the time stamp here's another quotation
 
oh yeah
 
and also a phenomenal album
@Marshall would you say BQN is "production ready"?
Is there any tooling around the language for proper keyboard input/project organization/modularity/ io streams?
 
@nathanrogers The core language is. Interfacing is the issue.
 
as in character input?
 
01:00 - 22:0022:00 - 00:00

« first day (1498 days earlier)      last day (1139 days later) »