« first day (1594 days earlier)      last day (1055 days later) » 

2:22 AM
New job posting for an APL Developer: aplwiki.com/wiki/Talk:Jobs#Needed%3A_APL_Developer
 
 
4 hours later…
6:36 AM
@JoshD Thanks for pointing that out. I've notified aplwiki.com/wiki/…
 
6:59 AM
@user Thanks for taking it up (again) on SOM. Let's wait and see what decision is made there before we begin mass-edits.
 
7:54 AM
I think I found a quite comprehensive tutorial of APL, "Notation as a tool of thoughts"

https://www.eecg.utoronto.ca/~jzhu/csc326/readings/iverson.pdf
 
@WongJiaHau It is good, but not comprehensive, as modern APL has moved far beyond that with the introduction of nested arrays and additional operators. See apl.wiki/Learning_resources instead.
 
@Adám thanks!
 
@WongJiaHau On the other hand, it is of course an excellent introduction to APL, and as such, you'll find it on the list at apl.wiki/Introductions.
 
 
1 hour later…
9:21 AM
@Adám Btw I keep making typos and hitting tab to complete a symbol on tryapl.. it switches focus if the character pair before cursor is not convertible. That's kind of frustrating, and it'd be nice to have the option for tab to be no-op when it can't convert.
 
@goof Ah, that's a good point, and maybe Tab isn't really the right keystroke for it, though I am not sure what else could be used. Problem is that by disabling Tab altogether, keyboard navigation is hampered. Maybe it'd be an idea to give you one "grace" Tab without moving, but then any subsequent Tab does move?
@goof Btw, is your frustration only due to actual typos (you hitting the wrong key unintentionally) or are there substitution pairs that make sense but don't work?
 
I think they're just actual typos
 
Ideally, I'd want some kind of visual indicator that Tab substitution is currently available.
 
I don't really have any use for keyboard navigation there; to me it could be just like a shell prompt with nowhere to switch focus to. Of course I can't speak for everyone.
(It seems that navigating with tab would be pretty hard anyway, considering all the things it starts cycling through)
 
9:44 AM
Some people cannot, or avoid, using a mouse, even if awkward.
Maybe if the language bar changed colour, as if ` had been pressed whenever the two characters before the caret were substitutable?
In addition, the caret itself could go orange or something.
 
10:22 AM
`{IsPrime ⍵; 0=2|⍵} 8`
` ^` I'd like it to return here because even numbers can't be prime, how would i do this correctly?
well that arrow is suppose to point to 0=2... though probably with ≠
 
{0=2|⍵:0 ⋄ IsPrime ⍵}
The : is a guard and ⋄ (diamond) is a statement separator
@JosephAdams yeah I think
tbh @0xACE I'm slightly confused what the semicolon is there
 
@RikedyP yeah, I had the same -- you beat me to it :D
 
Perhaps this is a confusion due to execution within statements being right-to-left, but between statements is left-to-right
 
the semicolon is there becase i dont understand apl and needed a way to present my problem. I can't find : in the symbols list (meaning i can't read the tooltip/info), what does it do?
 
RGS
@RikedyP You can always rejig it as multiline :P
{
    0=2|⍵: 0
    IsPrime ⍵
}
 
10:28 AM
@0xACE The colon is a guard. If the statement preceding the guard returns 1, the subsequent expression executes and the function terminates
if the statement preceding the guard returns 0 then execution continues to the next line if it exists
@0xACE to be fair in that sense we did seem to understand what you meant so that is good
 
Oh, that's a good one to have. is it listed in ride's symbol table? Cause I thought all useable operators were listed in the topbar
 
Although recently I've also read that the guard style can be converted to a tacit fn, if the left argument isn't referenced: dfns.dyalog.com/n_tacit.htm
 
@0xACE not sure - maybe because it's ASCII it's not? Is ? and | and / listed?
anyway: also check aplwiki.com/wiki/Dfn
 
? and / seems to be listed
 
@0xACE no idea then
it's only used for guards {cond:expr ⋄ else}, error guards {6::'exec if value error' ⋄ 'try this first'} and keywords :If :For :ForEach in tradfns
 
10:31 AM
Alright, but : and ⋄ was useful and "due to execution within statements being right-to-left, but between statements is left-to-right" new to me
 
@0xACE what resources are you using for learning mostly?
 
atm i try to once a day go through 1 section of course.dyalog.com (only because i can remember the url and I cant spend dedicated time on apl, my goal being to slowly learn the language)
 
RGS
@JosephAdams That's not what I read there, maybe I misunderstood? I think what the link shows is that guards can be written as trains, but the code in the guard is executed twice.
 
why double colons? ( ::)
 
RGS
If ⍺ is not used, then we can make sure that the guard is only executed once in the train.
 
10:37 AM
@0xACE I am working on course.dyalog.com - maybe I'll think about putting the stuff about rtl/ltr and guards earlier on
 
Ah, that's why i recognized your name
Well I think i had more questions etc. I could try to ping you the next time I encounter issues
 
Although @xpqz's book will be more of a get-to-the-point quickly kind of resource, the course is obviously excercise-driven
 
@0xACE please the more you ask the better
 
what xpqz's book called?
 
10:39 AM
Not published yet
 
At the moment my workflow is checkout course.dyalog while commuting, so most of it is done via the phone, and the videos are a relaxing way process the information, unfortunately i need breaks inbetween the constant action through out the day :P
Ah, my bad, read your sentence too hastly
 
@RikedyP bit of a strange title
 
Oh ok so you're not even past outer product then? Cos the videos stop after that
 
@0xACE Current title is 'Learning APL'
 
haha
 
10:41 AM
@rak1507 Well from my pre-release copy the title is either "Introduction" or "x (+⌿ ×⍤¯1)⍤1 2 y"
 
 
@xpqz I think this works fine - the file name cookbook is problematic because of github.com/5jt/dyalog-cookbook
 
Now that guards and diamond came up, I also wanna point out that I learned of this just yesterday (or was it the other day?) when someone posted a recursive solution to my problem. Thing is, tryapl has help for ∇ but both examples use multi-line dfns and you can't enter a multi-line dfn in there.. @Adám
 
@xpqz ooh, cool
 
Yeah, I was advised to change it (I think you probably/possibky have an old copy)
 
10:43 AM
@goof you could one line it with statement separators I suppose
 
Yes, that is the thing I learned just a day or two ago
 
@rak1507 right but the examples don't indicate that
 
@goof But you can use
 
Ah, true
Will tryapl be updated to 18.1 with multiline input?
 
@Adám Yeah, all I'm saying is it would be helpful if the examples given showed that
 
10:44 AM
@goof You mean in the Primer? Yes, good point.
 
@rak1507 The multiline support of tryapl is not dependent on multiline support in the interpreter
 
@Adám Yes, the primer has been my go-to reference
 
oh alright, well, in that case any chance of adding multiline support to tryapl?
 
@RikedyP I suspect that it isn't seen as syntax, like parens, brackets, and . in numbers and object access, but really they should all be there. Let's suggest adding {} [] () : (which includes ::) and add mention of the other uses to .
@rak1507 Yes, it is on the to-do list.
 
great
 
10:45 AM
The backend actually supports it; we just need to update the frontend.
 
But I will try to prioritise some time in the next 6 months to upgrade tryapl a little bit - although it's supposed to encourage people to download the full terp, and people seem to like using it as their only terp
I'll make an issue re: tryapl primer examples and multiline
it'll get resolved either by the enabling of multiline on tryapl or changing the examples
 
Let's prefer the former ;-)
@RikedyP Tbf, it is the only reasonably usable Dyalog APL for mobile…
 
@Adám true if by "using APL" you mean as a desktop calculator, there isn't an application programming Dyalog for mobile any more
 
If we would just release Android builds, then dzaima's frontend could work.
 
@RikedyP is there anything else to use Dyalog APL for ;)
 
10:51 AM
@rak1507 On a mobile, you mean? Probably not.
 
yeah
how much programming are you really going to do on a phone anyway
 
Exactly. But having APL in your pocket for quick calculations in the store etc. would be useful. I end up using my phone for that, but the built-in calculator is anaemic, to say the least.
 
oh i use dzaima's android apl ide everyday. if it had dyalog support that'd be very useful :D
 
@Adám yeah, that would definitely be cool
 
@Adám Yeah I also sometimes use tryapl on my phone as a calculator
 
10:53 AM
But TryAPL requires internet, and connection is often spotty when deep inside a supermarket.
 
RGS
What a bunch of geeks :P
Why don't you just do all the calculations in your head, like a normal person? :P
 
alright einstein
 
I do all the calculations in my tail.
3
 
RGS
@rak1507 It's not that hard, really, you just imagine the APL expression for your calculation and then trace through the C code that implements the primitives.
 
lol
 
RGS
11:02 AM
Try it a couple of times with pen and paper, and you'll be doing it in your head after a couple of tries.
 
how do you deal with undefined behaviour
 
@RGS 8○8
 
RGS
@rak1507 I don't think doing your groceries will lead you to calculations that lead to undefined behaviour.
 
@RGS This requires access to Dyalog's proprietary source code. Works for you and me, but not for non-Dyalog people.
 
11:33 AM
does dyalog have performance utilities? or do I have to save my code and run it with time dyalog mycode.apl ?
 
RGS
@0xACE dfns.cmpx or ]runtime are the most widely used, I believe
      ]runtime -c "3+3" "1+1+1+1+1+1"

  3+3         → 8.1E¯8 |   0% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕
  1+1+1+1+1+1 → 1.4E¯7 | +78% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕
 
]runtime seems nice. how do you use dfns.cmpx ? i tried reading the documentation but didn't understand it
 
RGS
     'cmpx'⎕CY 'dfns'
     cmpx '3+3' '1+1+1+1+1+1'
  3+3         → 8.8E¯8 |    0% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕
  1+1+1+1+1+1 → 1.9E¯7 | +116% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕
 
yikes, I'll save that for now and figure out what 'cmpx'⎕CY 'dfns' means at a much later stage
 
RGS
@0xACE read it more or less as from dfns import cmpx, if Python is a language you can read.
But you can also type ⎕CY into your interpreter and press F1 to open the docs on it.
It's copying the cmpx function from the dfns workspace into your session.
 
11:49 AM
@Adám if Dyalog released android builds and there was literally any way my app could interact with it, I would make it work
 
Oh i see. My fav lang is C but i code in whatever is necessary for the problem
 
@0xACE alternatively, after copying cmpx in, you can do 1cmpx'∘.=⍨⍳1e4' to just get the raw second number
 
RGS
@dzaima Right, that's probably addressing the initial issue of timing things, not necessarily comparing different things :P
Ty ○/
 
@dzaima or you can do something like ]runtime -r=2s "∘.=⍨⍳1e4" (-r=2s repeating until two seconds have passed, and averaging) if copying in cmpx is too complicated
 
these tips are all useful, but I guess my brain isn't really ready tounderstand it all. but i wrote it down on my notebook
 
11:53 AM
@RGS yeah I meant exactly the same passage you're referring to: since the IsPrime only needs the right argument I suppose you could do ((0=2∘|){⊃IsPrime/(⍳~⍺),0/(⍳⍺)}⊢)5 for avoiding the guard and statement separator -- but that is 10x more unclear IMO
 
RGS
@JosephAdams Only 10×? :P
 
and with the other info on the same page I linked it would/should be possible to turn that dfn into a train
@RGS haha yeah, maybe missed a few zeros there
 
CMC: Covert a permutation vector to a permutation matrix, e.g. 1 4 2 5 3 becomes:
1 0 0 0 0
0 0 0 1 0
0 1 0 0 0
0 0 0 0 1
0 0 1 0 0
 
4 in BQN.
 
12:11 PM
7 in APL
 
12:38 PM
anyone got a pointer to some resource that shows the difference between the different versions of K? In the (me thinks) latest episode of the ArrayCast Podcast they mention that Whitney thinks of K3-K9 as different languages rather than just different versions of the same fundamental language. But I don't see any major differences...
 
@JosephAdams i guess there's this
 
@Adám 6 in APL and 5 in BQN.
 
I have a 6 in APL
↑1↑¨⍨-
 
@dzaima yea knew about that page, but I'm looking more for a "look, in K3 you do this, whereas in K9 you do this...because of X"
 
the builtins definitely shuffle around between each k version, but syntax stays approximately the same. Though k7 did get some unicode characters for a bit of time
 
12:41 PM
I think ^ and ~ are the most unstable.
@rak1507 Yes, I had that and 1↑⍨⍤0-
 
hmm okay so no major, major changes -- if the primitives stay approximately the same with slight variation across versions
I got ⊢∘.=⍳∘⍴
 
@Adám also i think the slashes (or maybe slash-colons?) vary somewhat sometimes?
 
@JosephAdams Nice. That looks like a candidate for 4 in BQN.
@dzaima Yes, and whether or not you need : for monadic operands, or something.
 
@Adám (i found the 4 in BQN too, but more my accident than intentionally figuring out the thing it relies on)
 
Yes, this is my 4-character version. Sort instead of indices.
 
12:45 PM
@JosephAdams (you can probably ask in the k tree from people who actually know what they're talking about)
 
@Marshall Ah, clever. Then =⌜⟜∧ too, which avoids parens.
 
@Marshall oh, i just went with index origin 0 and this
 
Was just in the middle of writting about .
 
 
=⌜⟜∧ was my initial version, but I wrote a train to match the APL one.
 
12:49 PM
CMC: Convert a permutation matrix to a permutation vector, e.g.
1 0 0 0 0
0 0 0 1 0
0 1 0 0 0
0 0 0 0 1
0 0 1 0 0
becomes 1 4 2 5 3
 
3 in BQN, with 0-origin of course.
 
5 in APL
@Adám @dzaima Thanks for the pointers (k tree and about the different interpretations of the left/right folds), I'll check those out :D
 
4 in APL.
 
RGS
I've got 4 in APL as well.
I've got 2 different 4-byters.
 
@Adám i believe i have 2
 
12:52 PM
@dzaima Huh. Vanilla Dyalog?
I've got a very different 4 as well.
 
I got 4 now too
 
@dzaima yep, passes a bunch of random tests. So 2 in both classic APL and BQN, with the same code
 
Found it. 2 indeed.
 
Me too.
 
Probably terrible performance compared to the 4s.
 
RGS
12:56 PM
I have a total of 3 different 4-byters, but I have no clue as to what the 2-byte solution is :P
 
@dzaima (originally i thought i had 1 char, but that didn't actually work :p)
 
"With the same code" is a big clue.
 
@Adám Of course, just wanted to get an opinion on it to propose an alternative in my question
 
RGS
@Marshall I'd need to know any BQN to know what things are the same.
 
12:59 PM
The three-character BQN one was ⥊/˘, so basically the same as your first.
 
@JosephAdams (that wasn't actually about folds, i think those have stayed roughly the same. It's about the overloads of slashes - various iteration stuff, what's encode/decode, and whatever else people managed to squeeze on top of those)
 
I had 2⌷¨⍸
 
@RGS Well it can only use characters on the BQN keyboard, which narrows things down a lot.
 
Yeah, I had 2⊃¨⍸ and ,⍸⍤1
 
RGS
@Marshall Right, I can open the BQN keyboard :P
 
1:01 PM
@Marshall Surely, ,⍸⍤1 (⥊/˘) are the most performant, no?
 
@Adám ahaa! Changing the rank of where was what I was missing for another 4. I kept ending up with ⍸¨↓ but everything's still enclosed
 
@JosephAdams Right, you could do ∊⍸¨∘↓
 
@Adám Something like ≠|/∘⥊ might be better since it gets indices all in one go.
 
RGS
I got a 2-byter, was that the one you found?
 
Yes.
 
1:04 PM
Clever :P
 
I I seriously doubt there are other 2s.
@Marshall But fails in ⎕IO←1
 
@RGS i actually had a different one, but that works too (and is the same idea)
 
@Adám Fortunately ⎕IO←1⋄≠|/∘⥊ is not likely to execute.
 
:-P
@Marshall Do you not want •io←1 to throw an elaborate error of some sort? As an Easter egg
 
@dzaima (mine)
 
1:07 PM
If Rank doesn't copy cells (Dyalog's does) then you could cut a factor of 2 on large arrays by searching for the first 1 instead of all of them.
 
I've suggested that Dyalog does something fun for )erase ⎕io
And in principle it was accepted; just needs someone to implement it.
@Marshall ⍳∘1⍤1
@dzaima Wow. That might actually perform better than the all-grade one, as I suppose is O(n) while grade is O(n log n) (or something clever like that)
 
@Adám The VM does system value lookups so it has this option. But it won't know whether the user is trying to assign •io (which is a syntax error) since the lookup is part of tokenization.
 
@Adám it performs worse. The second is most likely precisely O(n)
 
@Marshall I guess you could blow up at tokenisation time, if •io appears anywhere?
 
@dzaima (the test)
 
1:12 PM
Also is O(n²).
 
Oh. (Literally.)
 
@Adám If "Unknown system values (see •listSys for available): •io" counts as blowing up, then that's what it does.
 
@Marshall "Evil system value (see •listSys for available): •io" would be more fun.
 
@Adám Turns out ⊐⟜1˘ doesn't have depth issues, so that's the translation.
It would be fairly reasonable to define an •io namespace with values like •io.ReadNum or •io.Error (for stderr output).
 
:-(
Now, what should I put on APLcart? ⍳∘1⍤1 or the more elegant, but slower, ⍋⍒ ?
 
1:22 PM
Use (++<)⌿⍉ and confuse everyone.
 
hehe.
⍳∘1⍤1 it is, because it maps nicely over rank>1 arrays, matching its inverse 1↑⍨⍤0-
CMQ: Does the (non-APL) world have a name for a permutation vector?
 
Wait but (⌈+<)/ does the mapping thing too.
 
whats the name in an apl world
 
@Adám In a maths-context I would also call that a permutation (vector)
 
@Razetime Uh, "permutation vector"… although I'm a bit confused by your using "an" instead of "the".
@JosephAdams Calling it just "a permutation" is confusing, though. (10,30,20) is a permutation of (30,20,10) using the permutation (2,3,1).
 
1:31 PM
Here's Wikipedia but I think mathematicians basically never say any of this stuff as they are studying the actual permutations and not their representation.
 
@Adám I'm thinking as in: de.wikipedia.org/wiki/Symmetrische_Gruppe#Zweizeilenform the first line is often implied (especially here)
not to be confused though with the (syntactically identical) cycle notation
oh it even warns about that at your link @Marshall
 
Ah so word representation? Weird.
 
@Marshall also, not quite -- I'm no group theorist, but examining subgroups (of permutations) that have special representations is of interest (famous undergrad exercise: prove the group of all permutations if generated by 2-cycles)
 
RGS
@JosephAdams I think what Marshall meant by "representation" was not the mathematical concept of a representation, but instead the objects we are permuting.
 
@JosephAdams 2-cycles are interesting independent of how they're written though.
 
1:35 PM
along the same lines one generalizes to "generated by permutations whose structure is X"...though I've no good example on hand for non-cycle representations of permutations
 
RGS
Like Adam just said (10, 30, 20) is a permutation of (30, 20, 10), and Marshall said we don't usually care about the elements themselves, only about the actual permutation we used: (2, 3, 1)
 
@RGS I don't think anyone was invoking representation theory, if that's what you mean.
 
RGS
@Marshall isn't Joseph?
 
No wonder people have problems understanding when then don't even have proper language for the result.
 
@RGS no, I was also referring to the representation of a permutation (as a cycle etc.) -- I only mentioned group theory as that's where these kinds of "simple" permutations crop up mostly
 
1:37 PM
"⍋y is the permutation of y which would sort it" must sound very strange to someone understanding "permutation of y" as a reordered y.
 
i propose "index permutation" or permutation of indices or something like that
 
@Adám You need "permutation which would sort y". A permutation of y is a reordering, but a permutation with no subject is its own thing. Maybe "permutation on ≢y elements" to be more precise.
 
@dzaima (huh)
 
@Marshall Maybe I'll just create en.wikipedia.org/wiki/Permutation_vector :-)
 
I second both "permutation of indicies" and "permutation of ⍳≢y"
 
1:43 PM
@dzaima Okay I would very much like the answer to that question because every grade algorithm I know is pretty weak compared to pdqsort for sorting.
 
@Adám i mean, "⍋y is the permutation vector of y which would sort it" isn't much more clear
 
Really? If you knew what a permutation vector was?
Anyway, APLcart currently says of ⍋Y: "Indices to reorder Y into ascending order" which I think is clear enough.
 
@Adám well, your version would also be reasonably clear if just "permutation" was the term, and was known by the reader
 
@dzaima So would "grade" if "grade" was known by the reader ;-)
 
Maybe "index representation of the permutation that would sort y" is okay.
 
1:48 PM
"index representation" would be a new term, though.
 
but you can sort of guess what it means
@Adám so all that matters is that someone who doesn't know the term can understand that they don't know it. And "permutation vector", to someone who didn't know about it, would be synonymous to "permutation"
 
I think it is slightly clearer because it describes the shape. A permutation matrix is also "a permutation".
 
@Adám but the sorted array itself is also a vector
 
I'm guessing anyway that nobody's going to rely solely on aplcart and I think grade is best explained with an example call...which the Dyalog terp has anyhow
 
@dzaima Not necessarily.
 
1:54 PM
@Adám but there's a 99.99% chance that someone's first interaction with one would be
"⍋y identifies the permutation of y which would sort it", optionally followed by "as the list of indexes to take each item from"
s/identifies/represents/ maybe
 
@dzaima I wish I could just explain it with (∧≡⍋⊇⊢)Y
 
2:40 PM
@Adám "dyadic indexes sanely" haha :P
how does Extended Dyalog APL work, i.e. how does the terp know what symbols to use/parse? is it all just in the name, because wouldn't there be a lot of ambiguity with all the different unicode characters for essentially the same symbols?
 
@JosephAdams The transpiler looks at the first "word" in the comment on the first line of each file.
 
aha, so right about here, thanks :D
 
2:55 PM
Is there a way to get Dyalog to expand ~ in file paths?
         ⊃⎕NGET '~/.clou'1
FILE NAME ERROR: ~/.clou: Unable to open file ("No such file or directory")
      ⊃⎕NGET'~/.clou' 1
 
@JosephAdams Btw, aplcart.info?q=THE%20indexer is better.
@xpqz That is a feature of your shell. You can use ⎕SE.Dyalog.Utils.Config'HOME' but have you tried ]get?
]get ~/.clou:n should work.
 
@Adám Sure -- was after something like Python's full_path = os.path.expanduser(path), but with ⎕SE.Dyalog.Utils.Config'HOME' I can make one of those.
 
@xpqz No need to make it yourself:
      ]get ]get
#.get
      get.ExpEnv
 
]get is too clever for my liking :)
 
You're not alone in that sentiment. That's why it is marked EXPERIMENTAL.
 
3:05 PM
However:
      get.ExpEnv '~/.clou'
/Users/stefan/.clou
is nice.
 
Maybe ExpEnv should live in ⎕SE.Dyalog.Utils… but really, we need a stdlib.
 
That would be nice on a quad or i-bar
 
Not even ⎕SE.Dyalog.Utils.Config was made built-in. How much more so not ExpEnv. Does it bother you to use other people's APL code?
 
I don't think I'd discovered that as ]get ]get though
 
No, of course. Hence my idea of putting that fn into Utils.
But it belongs in the non-existing stdlib :-(
 
3:09 PM
@Adám Not in the slightest -- others' APL code is likely better than mine. But I do mind (a bit) relying on experimental/non-universal stuff, and I find the transition a bit awkward between "APL" and a set of user commands that need to be run first in order for my code to work.
 
@xpqz Ah, right. I was thinking you'd dig that code out and put it into your own code, not that yours would actually use ]get ]get at run time.
 
That's what I do, more and more frequently, actually -- like snippets from dfns etc, rather than pulling them from the ws.
 
For now, unfortunately, that's my best advice.
But I will ask my superiors about putting ExpEnv into Utils.
 
That's completely fine. Maybe the ]get ]get handy trick could find a place in APLCart?
 
@xpqz It already lists ]uload and ]get hasn't been released yet…
The basic idea of ]get is to replace all the (way too many) ways of loading "stuff" in Dyalog.
 
3:15 PM
:) oh, it's an 18.1ism? Is the ⎕SE.Dyalog.Utils code open-source somewhere? I can't see it on Dyalog's github, so assume not.
 
It is open source, but not on GitHub, as it is tracked using SVN instead of Git.
 
Public-facing svn?
 
@xpqz No, but the latest version of each branch is available at dyalog.com/tools/user-commands.htm
 
3:30 PM
@xpqz OK, so it looks like it'll go into Utils, but I notice that in Python's util ~ expands to the user's home dir even on Windows. Do you think it should do that?
 
4:15 PM
@xpqz Thank you for your contribution. ⎕SE.Dyalog.Utils.ExpandConfig is now in 18.1
 
4:55 PM
:) awesome.
 
5:16 PM
Well, that's the good news. The bad news is that 18.1 might well get delayed.
 
5:32 PM
@Adám Is that so you can pack in more goodness into it?
 
@xpqz I wish, and maybe we will add more quality-of-life things, but the only important reason is to fix the 18.0 mess.
 
Maybe squeeze in Under under the radar!
 
6:02 PM
I can promise you that that won't happen.
@MarekKowalczyk Hi there. Interested in APL?
@alexgibbs Good to finally see you here.
 
 
2 hours later…
8:24 PM
div5←{⍵[⍸0=5|⍵]}
SYNTAX ERROR: Can't change nameclass on assignment

Huh?
 
you already have something called div5 that isn't a function
 
Do )erase div5
@rak1507 Or an operator.
 
btw you can use / instead of indexing and ⍸
 
)erase fixed it
 
div5←⊢∩5∧⊢ ;)
 
8:26 PM
@rak1507 like: {0=5|⍵/⍵}
?
 
@0xACE nearly, but remember it's right to left so that will be 0=5|(⍵/⍵) which is not what you want
 
div5←⊢∩5∧⊢ ;) why 1 parenthesis? What's semicolon and what's applied to the last ⊢ ?
 
oh, the ;) is an emoji the actual solution is (⊢∩5∧⊢)
abusing the fact lcm(5, x) is x if x is divisible by 5
 
@rak1507 I avoid punctuation (and smilies) adjacent to APL code for that exact reason.
 
Haha, i've seen memes about using emojis as variable names in other languages, but in APL i actually fell for it... so you solution works because it's a prime?
 
8:33 PM
it works for any positive number, lcm(n, x) is x if x is divisible by n
it's much slower than the filtering approach though
so I wouldn't use it in any practical solution
⊢∩∧ is just so nice though
 
but how is x (which i presume is ⍵) inserted in this case?
 
The article only mentions 2-train and 3-train, im, still not sure how/where ⍵ is inserted in your case
maybe i should read the number of the beast thing
 
(⊢∩5∧⊢) a
(⊢ a) ∩ ((5∧⊢) a)
(⊢ a) ∩ (5 ∧ (⊢ a))
a ∩ 5 ∧ a
 
@0xACE f g h i j is a 3 train where the rightmost carriage/tine is itself a 3-train: f g (h i j)
@rak1507 Conceptually speaking, yes, but not technically so.
 
8:41 PM
@Adám oh, where was the error?
 
I think im way to tired to grasp this topic for now. I guess I should save this topic for another time. I'll try the rest of the workshop and call it a night soon :( (feeling really tired tonight for w/e reason)
 
@rak1507 You combined steps, whereas the left isn't actually applied until everything to the right of has been fully evaluated.
 
@0xACE It's a tough topic to get at first, dw
@Adám didn't know that! interesting
 
@rak1507 Experimentation framework:
      {⍎⍵,'←{⍞←''',⍵,'''}'}¨⎕A
      (A B C D E)⍬
ECDAB
The semantic HTML5 way of marking up assignment of a dfn:
<code><dfn>assert</dfn> ← {⍺←'assertion failure' ⋄ 0∊⍵:⍺ ⎕signal 8 ⋄ shy←0}</code>
 
do you think 'evaluation order of an n-train' would make an ok code golf challenge?
 
8:54 PM
Yes, but:
10
Q: Explicit-ify APL expressions involving trains

BubblerRelated: Clearly parenthesize APL trains Background In the most basic form, APL has two kinds of tokens: arrays and functions. For this challenge, we will use a lowercase letter a-z for an array, and an uppercase letter A-Z for a function. Furthermore, we will assume each character is a token o...

22
Q: Clearly parenthesize APL trains

Erik the OutgolferIn APL, you can write tacit functions, called trains. How they work is irrelevant for this challenge. Here are the different ways they can be grouped, using ⍴ as the function: ⍴ -> ⍴ ⍴⍴ -> ⍴⍴ ⍴⍴⍴ -> ⍴⍴⍴ ⍴⍴⍴⍴ -> ⍴(⍴⍴⍴) ⍴⍴⍴⍴⍴ -> ⍴⍴(⍴⍴⍴) ⍴⍴⍴⍴⍴⍴ -> ⍴(⍴⍴(⍴⍴⍴)) ... The order remains t...

 
that's quite a different challenge I was thinking something along the lines of n=11 as input -> 11 9 10 7 8 5 6 3 4 1 2
although the pattern is probably too simple
 
Nah, looks fun. People could come up with interesting solutions.
 
@rak1507 Will you cross-post?
 
to the main site? I don't generally
but I could do
 
I can do it, if you give permission.
 
Sure
 
9:31 PM
@rak1507 Important typo discovered: 6 4 5 3 2 16 4 5 2 3 1
 
oh no! thank you
 
Got it to 8 in BQN, but no time to write it up right now.
Transliterates to APL as well.
 
2
Q: Evaluation order of an APL n-train

AdámFrom Codidact with permission. Description APL trains are a series of functions, that get applied to an argument in this way: (f g) x = f g x (f g h) x = (f x) g (h x) (a b c d e f) x = (a (b c (d e f))) x = a (b x) c (d x) e (f x) Trains evaluate from the right to the left, so in the last examp...

 
from rather than to codidact. I like that :D
 
10:08 PM
@mo523 Welcome. Interested in APL?
 
10:19 PM
Is there a short way (in APL that is) to do a 2 f/ but where the windows are disjoint? e.g. 2,/⍳4 ≡ (1 2) (3 4) -- something similar to {(¯1↓(⍴⍵)⍴1 0) / 2,/⍵} but shorter...behaviour for non-even length lists doesn't matter
 
@JosephAdams f⍤⊢⌺(⍪2 2)
 
Ah of course -- with the (new) stencil...why didn't I think of that. Thanks!
 
@JosephAdams Thank you. I've now added some appropriate keywords to APLcart.
 
That's where I looked first too :D though also besides the Dyalog language doc there's not much out there about stencil (i.e. apl.wiki)
 
@JosephAdams Nope, a few operators still need articles. Want to volunteer writing one about Stencil?
 
10:32 PM
yeah, I'll give it a try! quite surprised also that in the language doc there's no mention of how to configure the stride (as you did with ⍪2 2)
but bed first for me now :P
 
@JosephAdams Did you click through from the landing page to the full docs?
 
No, I came from the Language Elements page to stencil
 
Right, then click "Stencil".
 
ahhh now I see what you mean -- yeah that was my bad for not noticing the link
 
@JosephAdams For when you write the article, there's a relevant presentation and blog post.
But for now, sleep well!
 
11:21 PM
@rak1507 The solution is an 8-train! It's a function that tells you how to evaluate itself.
 
Much amazing. So self-reference. Wow.
 
11:41 PM
unfortunately, Jelly doesn't have grade down, otherwise I could port that into a 7-byter
 
But caird already found an alternative 7-byter.
… And porting the J answer got it down to 5.
 
ah
i'll leave both solutions in probably
 

« first day (1594 days earlier)      last day (1055 days later) »