« first day (1799 days earlier)      last day (858 days later) » 

10:00 AM
how do i write {⍵ ⍵⍴⍳×⍨⍵} tacitly?
ok i got the rightmost part
⍳⍤×⍨
,⍨ is the ⍵ ⍵ part
and now i'm stuck
@Adám ^ help
 
@PyGamer0 ,⍨⍴⍳⍤×⍨ :-)
@JayantChoudhary Welcome to the APL Orchard!
 
@Adám and here i was using atop, and beside :/
 
This is exactly the type of job where which forks shine.
 
10:32 AM
@Adám so is ,⍨⍴⍳⍤×⍨ a 3 train?, and it consists of ,⍨; and ⍳⍤×⍨?
 
That's correct: ⎕←,⍨⍴⍳⍤×⍨
 
@Adám
  ┌─┼─┐
  ⍨ ⍴ ⍨
┌─┘ ┌─┘
,   ⍤
   ┌┴┐
   ⍳ ×
 
Note the ┌─┼─┐ on the first line, indicating a 3-train.
 
11:07 AM
@FawnLocke I'm adding links to your vocabulary on APL Wiki. How do you want to be named there? Fawn "awagga" Locke?
 
Hey there @Adám here from discord
 
Nice.
 
does ravel mean flatten?
whats the difference between ravel and enlist?
 
11:26 AM
@PyGamer0 Ravel (,Y) is equivalent to ×/⍤⍴⍴⊢ while Enlist (∊Y) discloses all enclosures and returns a depth-1 vector.
 
@Adám Yeah, that sounds good.
 
 
1 hour later…
12:36 PM
Tacifying this {(⍴⍵),⊂⍸<⍀' '≠⍵}↑' *'[?5 5⍴2]
Can I do better than (⍴,⊂∘⍸∘(<⍀' '∘≠))↑' *'[?5 5⍴2]?
 
@MasterQuiz What is supposed to do here?
@MasterQuiz ⍴,⊂∘⍸∘(<⍀' '∘≠)⍴,∘⊂∘⍸<⍀⍤≠∘' '
 
@Adám Nothing, I was doing ↑ followed by random strings
@Adám Can you explain this? I'm lost from ⍸, and the tree version confused me much more
Also on TryAPL it isn't rendered correctly ⋄⍴,∘⊂∘⍸<⍀⍤≠∘' '
 
@MasterQuiz
┌─┼────┐
⍴ ∘    ∘
 ┌┴┐ ┌─┴─
 ∘ ⍸   ⍤
┌┴┐   ┌┴┐
, ⊂   ⍀ ≠
    ┌─┘
    <
 
Ugh, that's pretty bad.
@user9691923 Hi Syd ElCid. If you want to participate here, please email access@apl.chat
 
@Adám It eliminates quotes. Also here ⋄⍴,∘⊂∘⍸<⍀⍤≠∘'1' ⋄'-----' ⋄⍴,∘⊂∘⍸<⍀⍤≠∘1
 
12:46 PM
@MasterQuiz
┌─┼───┐
⍴ ∘   ∘
 ┌┴┐ ┌┴┐
 ∘ ⍸ ⍤ 1
┌┴┐ ┌┴┐
, ⊂ ⍀ ≠
  ┌─┘
  <
-----
┌─┼───┐
⍴ ∘   ∘
 ┌┴┐ ┌┴┐
 ∘ ⍸ ⍤ 1
┌┴┐ ┌┴┐
, ⊂ ⍀ ≠
  ┌─┘
  <
 
@MasterQuiz You want to apply a bunch of monadic functions to the result of but ⊂∘⍸∘<⍀∘≠ doesn't work because < is bound to the left. Instead, we make ⊂∘⍸ a pre-processor for the right argument of , as ,∘⊂∘⍸ and move the space to the other side of (it is commutative) and make <⍀ a post-processor for as <⍀⍤≠
 
Adám are there any ways in which you think the train trees could be improved? (Just curious)
 
Yeah, I think it'd be helpful if 2- and 3-trains had the "root" function in the junction.
 
Gotcha
 
E.g.
  ┌─┼─┐
  ⌿ ÷ ≢
┌─┘
+
could be
  ┌─÷─┐
  ⌿   ≢
┌─┘
+
 
12:52 PM
Mhm, I think that's nice. Almost makes trains self-explanatory
 
or possibly
    │
  ┌─÷─┐
  ⌿   ≢
┌─┘
+
or
    ÷
  ┌─┴─┐
  ⌿   ≢
┌─┘
+
Similary
  ┌┴┐
  / ,
┌─┘
+
could be
  ┌,
  /
┌─┘
+
or
   │
  ┌,
  /
┌─┘
+
or
   ,
  ┌┘
  /
┌─┘
+
or even
  ,
  │
  /
┌─┘
+
 
@Adám Still can't got ,∘... I'd imagine it as monadic
 
Interesting, thanks! I think the last revision of +⌿÷≢ is my favourite. Not sure about the 2-trains
 
@MasterQuiz f∘g is equivalent to f except that g is used to preprocess the right argument of f just before f is applied..
@FawnLocke Agreed.
 
@FawnLocke +←1
 
12:59 PM
@Adám i like this
@Adám imo this is best
 
@Adám I've never thought of trains like this
 
That's not trains, that's apl.wiki/Function_composition
But yes, it all became much clearer to me when I realised that
f⍤g uses f to post-process the result of g
f∘g uses g to pre-process the right argument of f
f⍥g uses g to pre-process both arguments of f
And then we realise that there's a missing composition:
f⍛g uses f to pre-process the left argument of g
 
@Adám knew it you would mention that
what about under?
 
That's not a pure composition, as it doesn't just apply functions.
 
That's a nice way to remember them. I always just thought of them in terms of derived functions
 
1:05 PM
f⍢g is g⍣¯1⍤f⍥g
 
@FawnLocke imo diagrams of these compositions are easier to understand
 
I agree
 
Too bad I've lost the source for the APL Wiki diagram.
 
@Adám i was always wondering what's the difference between this and the structural under
structural under seems much more powerful if i understand it all right
 
now whats structural under?
 
1:07 PM
@KamilaSzewczyk Yeah, I personally regard computational under as a cute trick, but structural under is genuinely useful.
@PyGamer0 Same thing, but g is a selection/structural function.
E.g. -⍢(¯2∘↑) would negate the last two.
 
@Adám ⍙ ← {⍵⍵⍣¯1⍤⍺⍺⍥⍵⍵} heh
 
@FawnLocke Unfortunately, dfns can't return functions, so you have to write {⍺←⊢ ⋄ ⍺ ⍵⍵⍣¯1⍤⍺⍺⍥⍵⍵ ⍵}
 
@PyGamer0 lol
 
Ah, true
 
1:11 PM
@Adám why not make a new one?
 
Yeah, I'll have to.
 
"cute APL" brought me an interesting chain of thought/silly logo idea for APL
 
Hurry up then; only a couple of days left!
 
oh no, please don't pick this one
 
Hey, I've uploaded logos I definitely don't want.
 
1:14 PM
Will the next BAA webinar discuss the logo? Haven't kept up to date about voting, etc. I'll check out the logo wiki page
 
I think the next BAA webinar will announce that the polls are open.
 
Good to know :)
 
Looks right to me.
 
ok what happens if f⍛g is called monadically?
 
1:24 PM
doesn't really exist.
 
i think the eyes should be maybe a bit bigger and lower
but otherwise, cute APL concept has been finished
 
o_o
 
that's the most cursed thing i made this week
 
Oh dear
 
post it in TNB
lol
 
1:28 PM
@KamilaSzewczyk How do you expect me to sleep now‽
 
is that an evil laugh?
 
no, it's just a "this is hillarious" laugh
 
@PyGamer0 There are a couple of options. E.g. back-hook {⍺←⍵ ⋄ (⍺⍺ ⍺)⍵⍵ ⍵} and the questionably useful {⍺←{⍵ ⋄ ⍺⍺} ⋄ (⍺⍺ ⍺) ⍵⍵ ⍵}
 
What did you go with in Dyalog extended?
 
1:32 PM
The latter.
 
@Adám well if this is different from the other 3, i think the other 3 should be unique
 
@PyGamer0 I don't understand.
 
@Adám so, will my logo be featured on the suggestions page? /s
 
@KamilaSzewczyk It clearly blows they others out of the water. Why don't we just use that and forget this whole election process‽
 
I wholeheartedly agree
 
1:34 PM
Fun fact: /// is a valid function.
 
now that's surprising
reduce of reduce of scan?
 
No, N-wise reduction reduction.
 
oh!
fun
i don't know why i said scan tbh
clearly there's no \
 
And if used dyadically, it is N-wise N-wise reduction reduction.
 
function/operator overloading is terribly cursed sometimes :)
 
1:36 PM
almost as cursed as the unspeakable logo
 
⋄ /// ,42 ⋄ 1/// ,42
 
@Adám
42
42
 
Being able to pass a derived function to an operator which is later treated as an operator is amazingly bad
 
Oh you mean like ⋄ /{+⍺⍺⍵}1 2 3
 
@Adám 6
 
1:42 PM
@Adám This is kinda funny, the new symmetric generation ⋄1, \\∘/⍤\∘// ,1⋄
 
@MasterQuiz 1
 
Yes
 
I wouldn't call that amazingly bad. I've never experienced it giving any trouble.
It is / (when intended as function) catching the function on its left that is problematic.
@MasterQuiz You've seen the grand palindromic phi video, right?
 
@Adám Sure
 
@PyGamer0 @FawnLocke Any other ideas for what f⍛g Y should do?
 
1:44 PM
Yeah. I think it's one of the uglier aspects of APL tbh, I can get over ⎕IO and such historical baggage. If only John Scholes had advocated for first class functions
 
The good thing is that it is easy to fix through addition of glyphs. ⫽←{⍺⌿⍵} and ⑊←{⍺⍀⍵}
 
I'm not sure. Give me a moment to think on it
 
@Adám i don't think there are any useful functional combinators besides the ones APL already has
 
@KamilaSzewczyk well, the {⍺←⍵ ⋄ (⍺⍺ ⍺) ⍵⍵ ⍵} one is certainly very useful, from my experience with in BQN
 
all the fancy stuff e.g. in Haskell, like Kleisli composition depends on monads and a sane side effect model which isn't a thing in APL for good
@dzaima hmm, so it's like beside, but reversed?
and forced to a "dyadic" case
 
1:56 PM
Yeah, it'd be a hook out of the box, so you don't need
 
@KamilaSzewczyk kill it with fire xd
 
@Adám i don't think i ever needed this sort of construct
 
@KamilaSzewczyk (f⊢⍤/⊢), i.e. a filter, could be f⍛/
 
I always wrote filter as a dfn
 
I was about to write ^ and also ⌽⍛≡ for palindrome checking. Similar pattern for lots of other such "property checks"
 
1:59 PM
well, fair enough i guess
 
@KamilaSzewczyk well, you would indeed always write anything that sucks to write in one way, in a different way
 
lol
I swear, APL occupies a different part of my brain than esolangs :)
 
random translated examples from my BQN AoC solutions: ⊃⍛=; (-2|≢)⍛↑; ≢⍛-; «⍛f (where « is 0,⍨1↓); f⍛⊆ (where is Sane Indexing), and like 29 filters
 
2:16 PM
Further examples from APLcart: ×⍛| +⍛= ⌊⍛= +⍤≠ ∪⍛≡ ∪⍛⍳ ⍉⍛≡ ⍕⍛≡ ⌈⌿⍛= ∪⍳⍛∨ ≠⍀⍛∨ ⍳∘≢⍛, ⊃∘⍋⍛⌷ ⊂∘⍋⍛⌷ ⍋∘⍋⍛≡ etc.
 
@Adám so in short: reverse composition is useful for code golfing
 
Every composition can be written as a dfn/dop, so yes, I guess.
Still, "fixes" as ⊂⍛⌷ much like fixes / as ⊢⍤/
 
what is anyway
the RIDE description of it is incredibly bad
i know that you can use it for indexing, and that's it
mostly describes "materialize" which looks super irrelevant
 
that's the monadic case
 
hmm, i think i know why squad index requires ""fixing""
but I like the brace indexing syntax much more
 
2:30 PM
⊂⍛⌷ is for the dyadic case
 
shame we can't use it in tacit expressions - never wondered why
 
the brace syntax does not at all work in trains
 
i guess so
but we could make it work with trains, couldn't we?
 
⍺(⊂⍛⌷)⍵ does ⍵[⍺]
@KamilaSzewczyk nope
 
(by special casing a few things, i meant)
@dzaima yeah, but bracket indexing also has ;
 
2:31 PM
funcion axis conflicts
 
oh, that.
i forgot anyone uses this.
 
@KamilaSzewczyk right, and that's where things get slightly more complicated
 
is essentially a functional form of bracket indexing, such that x[a;b;c] is a b c⌷x
 
but the vector[index list] case is plenty useful on its own
 
The problem is that more often than not, you want x[a;;] which then has to be (⊂a)⌷x
 
2:33 PM
@Adám oh yeah right it does that. But doesn't allow empty sections, which is like the by far most useful case
 
Ahem, that's my message ^^
 
i think i still like bracket indexing more
 
It does allow trailing empty sections; just omit them.
 
@Adám i'm working with like a 10s delay here, through my client & bridge :/
 
Ah, didn't know. Sorry.
It also (kind of, but sit down and guard your eyes…) allows skipping sections, because that x[a;;b] is a b⌷[1 3]x (!!!ugh!!!)
 
2:36 PM
@dzaima (i assume that's because i went the lazy route and used the built-in SQLite for synapse (matrix homeserver server), and not the fancy, but optional, postgres)
 
@dzaima J uses an additional level of enclosure to indicate inversion (all-but-these, like ^ in regex) so you can write a(⊂⍬)b⌷x for x[a;;b] and then adds a symbol for ⊂⍬ like Iverson retconned ("nil") to be in ∘.g — altogether a∘b⌷x which is pretty neat.
 
2:52 PM
ok how i do print the result of something in J
 
you can often use the "Hello World" button to get an example of how to print stuff
 
@PyGamer0 there's this massive thing
 
@PyGamer0 And also this nice thing
 
oh yeaaah that exists now lol
 
2:59 PM
@Adám i saw the nice thing already :)
 
@PyGamer0 There's this but that's for GNU APL.
 
@dzaima oh, you're talking through matrix?
would you mind sharing how did you accomplish this / do you have a room that i could join?
 
@KamilaSzewczyk through a local homeserver & half-finished bridge
 
oh, i see
 
if someone could offer a public homeserver on which the bridge user could make accounts on, i could publish it
 
3:03 PM
i considered making my own homeserver, but i presume most of my friends wouldn't switch to matrix just to talk to me or something, so i never made it happen
 
i cant find apl vs j in the j wiki
 
do you mean these?
https://help.dyalog.com/18.0/#Language/Primitive%20Operators/Operator%20Syntax.htm#Function_Composition
 
@PyGamer0 That's rendered to png. I had a vector source once.
 
@Adám ah you mean svg?
 
3:12 PM
@PyGamer0 J4APL and APL2JPhraseBook.
 
thanks
 
@PyGamer0 It wasn't SVG, but yes, something like that.
 
can j be run from the command line?
 
I'm pretty sure it can
 
use ijconsole
might depend on your version, for me it's /bin/ijconsole-9.02
 
3:40 PM
@Adám is the expected time for release of 18.2 around April?
 
I'd expect it even before that. It is basically ready to go.
 
February?
 
Before, even.
 
new year?
so in a couple of weeks?!
 
I expect release at some point during January.
 
3:45 PM
hype
 
^
so someone forked vim-apl and added neo-layout keybinds
whats that?
oh its a german layout
 
4:13 PM
⎕←(-@⍳50)⍳100 errors
 
@Fmbalbuena
DOMAIN ERROR
      ⎕←(-@⍳50)⍳100
        ∧
 
@Adám ^
 
@Fmbalbuena Operators bind their operands before any functions are applied, so this becomes ((-@⍳)50)⍳100. You need (-@(⍳50))⍳100. You don't actually need the outer parenthesis, because separates: ⋄ -@(⍳50)⍳100
 
@Adám ¯1 ¯2 ¯3 ¯4 ¯5 ¯6 ¯7 ¯8 ¯9 ¯10 ¯11 ¯12 ¯13 ¯14 ¯15 ¯16 ¯17 ¯18 ¯19 ¯20 ¯21 ¯22 ¯23 ¯24 ¯25 ¯26 ¯27 ¯28 ¯29 ¯30 ¯31 ¯32 ¯33 ¯34 ¯35 ¯36 ¯37 ¯38 ¯39 ¯40 ¯41 ¯42 ¯43 ¯44 ¯45 ¯46 ¯47 ¯48 ¯49 ¯50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
 
thanks
 
4:39 PM
⋄ -@(≢↑(,∘~⍨0⍴⍨∘⌈.5×≢))⍳25
 
@FawnLocke 1 2 3 4 5 6 7 8 9 10 11 12 13 ¯14 ¯15 ¯16 ¯17 ¯18 ¯19 ¯20 ¯21 ¯22 ¯23 ¯24 ¯25
 
@FawnLocke Hairy, but -@(≢↑0,∘~⍨⍤⍴⍨∘⌈0.5×≢)⍳25
 
Couldn't figure out that last step, cool!
 
@FawnLocke -@(0 1/⍨∘(⌈,⌊)2÷⍨≢)
 
Ah, should've seen that.
 
4:47 PM
@FawnLocke -@(≢↑1⍴⍨∘⌈2÷⍨≢)-
 
@Adám as a followup, I think APL would benefit a lot if we allowed i.e. greek characters as glyph names
mainly because e.g. some quantities in mathematics are represented using these
 
@FawnLocke -@(⍳∘≢≥1+2÷⍨≢)
 
That's a fun one
 
@KamilaSzewczyk Yeah, I think so too, but there's of course the issue of ⍺∊⍳⍴⍵ vs αϵιρω
And also AΒΔΕΙΗΚΜΝΟοΡΤΖ vs AB∆EIHKMNOoPTZ
Of course, it is the programmers' responsibility to write sane code, but I bet my customer support colleagues will be very worried about this.
 
5:13 PM
@KamilaSzewczyk How about only allowing non-confusables?
 
@Adám that's a good idea
 
^
 
Of course, it'll prevent/make it very awkward for Greek programmers to use "fake" Greek identifiers.
Per Wikipedia:
> Those Greek letters which have the same form as Latin letters are rarely used: capital A, B, E, Z, H, I, K, M, N, O, P, T, Y, X. Small ι, ο and υ are also rarely used, since they closely resemble the Latin letters i, o and u.
So we're only really talking about ΠΣΨΩγδεζηλμξπςσφχψϖ
Due to , both phi forms would probably need banning as some fonts reverse their looks! φϕ vs φϕ (they'll look switched if you're on Windows with default monospace rendering of Consolas)
 
6:28 PM
@Adám ϖ seems out of place on this list too
for the record, i also can't tell the difference between ⍣ and ⍤ when using shitty fonts.
 
@KamilaSzewczyk Why?
 
confusable with omega?
 
ϖ you mean?
 
except it renders like crap
 
It isn't in APL385.
 
6:30 PM
well, yeah
 
^ is APL386
But yeah, you're probably right, and it is pretty rare too.
 
 
3 hours later…
9:10 PM
What does ⎕R do?
And sometimes I see a ':' in a line of code.
Both I can't find in the manuals.
 
@Richard It's replace. ⋄'_'⎕R' '⊢'Hi_there'
 
@MasterQuiz Hi there
 
Thanks!
 
@Richard Did you try pressing F1 on them?
(Just be aware that by default, ⎕R is regex replace. You can switch to plain-text replace using 'from'⎕R'to'⍠'Regex'0)
 
No, didn't now that :)
 
9:15 PM
You can also type ]help thing like ]help ⎕r and ]help : and it kind of works with the bot too: ⋄]help :
 
and ⋄]help ⎕R
 
ok thanks, I'll do my homework better next time with these lookup possibilities
 
How would you have known? Maybe there are even more tips you could use?
 
9:29 PM
Thought I read most of the information, but probably forgot the most obvious.

For a new user (at least for me) it also is a little bit skattered. Some information is a bit outdated but a lot of good YouTube video's and manuals are indeed available.
Same can be said about the exercises.

But at the same time, maybe the APL info is much more organised compared to other languages because Dyalog is the major player, and most of the info is arranged around them.

By the way, the APL tips is the first link at the 'getting started' menu, so not very bright of me...
Slowly getting there :)
 

« first day (1799 days earlier)      last day (858 days later) »