« first day (1156 days earlier)      last day (1488 days later) » 
00:00 - 17:0017:00 - 19:00

12:00 AM
@Adám Has there been any attempt to have a language with a choice of index origin, but instead of being controlled by an invisible (possibly global) state, it's explicitly separate functions? e.g. squad could be index-1 and squad+circle overstrike could be index-0, and so on. A choice, but the same code always predictably does the same thing.
(not necessarily @ Adám, but in response to that link)
 
@TessellatingHeckler Almost, kind of. Iverson suggested a "Custom" operator : (which eventually became J's !. and Dyalog APL's ) to give a parameter to primitives. One could (but Iverson never suggested doing so) have ⌷⍠0 be index origin 0.
One of the issues with that is that it isn't clear which option should be altered. E.g. is both subject to ⎕IO and ⎕CT.
A more general (and verbose) approach will become possible with the adoption of my array notation: (⎕IO:0).⌷ and (⎕IO:0 ⋄ ⎕CT:0).⍳
@TessellatingHeckler Of course, you can easily create such functions yourself: S0←{⎕IO←0 ⋄ ⍺←⊢ ⋄ ⍺⌷⍵} ⋄ S1←{⎕IO←1 ⋄ ⍺←⊢ ⋄ ⍺⌷⍵} etc. Or simply create two operators IO0←{⎕IO←0 ⋄ ⍺←⊢ ⋄ ⍺ ⍺⍺ ⍵} ⋄ IO0←{⎕IO←0 ⋄ ⍺←⊢ ⋄ ⍺ ⍺⍺ ⍵} to write ⌷IO0 and ⌷IO1 or even a single dyadic operator IO←{⎕IO←⍵ ⋄ ⍺←⊢ ⋄ ⍺ ⍵⍵ ⍵} to write ⌷IO 0 and ⌷IO 1
 
12:29 AM
@Adám interesting; The custom operator syntax privileges one of them as the default, and the other as a wordy second-rate choice; custom operators I hadn't considered at all
 
@Adám "so you can do +/All myMatrix — but why not write +/∘,myMatrix or even +/,myMatrix ?" -- agreed, i was saying i'd like a builtin adverb with that meaning. again, it doesn't amount to much of a change in characters or practice... it's just seems a more fitting mental model. at least, it fits the way i seem to think about naturally.
 
@Jonah Btw, it is an interesting question whether +/∘, actually ravels the array before summing. It certainly wouldn't need to, and not ravelling would drastically speed the summation up.
 
Right, does APL have "special forms" for things like that similar to J?
 
@Jonah Yes, both "idioms" that are specific character sequences recognised at tokenisation time, and special-cased derived functions where the operator (conjunction or adverb) recognises its operand(s).
 
1:10 AM
@Adám right, as far as I remember you mentioned that changing rank requires copying all data.. (in dzaima/APL, the cost of ,A is just that of allocating 2 constant-size objects - the new shape array (of length 1), and the new object, pointing at the old data)
 
 
2 hours later…
3:38 AM
A very small working subset of APLambda is out. Everything that takes arguments is just a function, not a function or operator.
Implementation detail: It was fun to write a piece of code that runs gracefully (without throw/catch) even if it runs into an error somewhere. Either monad FTW.
 
 
3 hours later…
7:03 AM
@dzaima Clever. Do you have a max-rank, btw?
 
7:50 AM
@Adám ¯1+2*31 (32-bit signed integer max) so practically, no.
 
 
3 hours later…
11:16 AM
Anyone interested in solving this one or this one before I self-answer?
 
12:14 PM
@Jonah The way I see it is this: there is a 3-item array on the left, and a 3 item array on the right, and the division is done item by item. Because the left side items are scalars (the redundant parens may obscure this) , the right side items can be different lengths or shapes or depths. Not a theoretical explanation, but maybe it helps.
 
 
1 hour later…
1:21 PM
@Adám - Is the Cultivation going to happen (and if so, when)?
 
@JeffZeitlin Yes, in a little over an hour.
 
OK, cool! :)
I'll be here!
 
1:36 PM
@Adám is there a topic for this Cultivation?
 
@JamesHeslip Yes, .
 
@Adám Sounds good. I'll be lurking, but a bit too tied up to participate with my full attention today, unfortunately.
 
ngn
2:00 PM
@xpqz still thinking about the problem from yesterday. i tried to combine the two approaches - "under {⌽⍉⍵}\" and "⌽@": e~⍨{⍉⌽⍵}\⌽@(2⍲/1,×)¨{⌽⍉⍵}\4⍴e←⊂m. with an actual it could be even shorter.
note that when the right operand of @ is a function, it shoud return a boolean matrix, not a list of coord pairs
 
I am also still thinking about it -- the penny finally dropped on:
{⌽@i ⍵⊢m}
That's a very useful construct.
I see you put ⎕rl←1 at the top; what is that?
 
@xpqz Randomise.
 
ngn
@xpqz sets the random seed
 
I see.
 
I wonder why they used the word "link" for "seed". Is that a proper synonym in English?
 
2:06 PM
I'm not a native speaker, but not to my knowledge.
 
Not really.
 
There are quite a few of the original APL system names I don't quite get the name or abbreviation for. Random Link being only one. Names: Atomic Vector, Canonical Representation, Latent Expression ("auto-exec"). Abbreviations: CopY, FiX (i.e. define), DeLay (i.e. sleep), SEssion.
 
ngn
@Adám i guess in the 60s the field of computing hadn't developed its contemporary jargon yet
 
@ngn OK, that explains the odd (in our ears) names. But why the strange abbreviations? Wouldn't CP make more sense for CoPy?
 
How can I test two matrices for equality, meaning that shape is the same and all values are the same? A=B gives a boolean matrix.
 
2:19 PM
@xpqz
 
In a lot of cases, there were previously-defined meanings for the 'obvious' abbreviations.
For example, in the IBM mainframe world, CP might have meant 'ComPact'.
 
Good point.
 
RL for Random Link might originally have been a literal link to the system random function.
 
Or maybe because all the generated random numbers were linked together in a predetermined looping chain, but you could choose which link in the chain to start with.
 
Possibly.
And the "Atomic Vector" is literally a vector of the 'atoms' that a program can be made from.
They're probably not 'characters' because early APL relied on the overstrike mechanism, so e.g.,⍋ wasn't a character in the system character set, but it probably was an 'atom' in the Atomic Vector.
 
2:27 PM
That sounds reasonable.
 
@PaulMansour Thanks. The "the redundant parens may obscure this" is what was tripping me up -- also the analogy with J where a box is always a single solid thing. It makes sense now, though :)
 
Hello and welcome to APL Cultivation!
 
Hello.
 
Today's subject is in depth, as a continuation of the previous lesson, in depth.
is known as "Encode" or "Represent"
It takes a number (or multiple numbers, in the same way as with ) as right argument and generates a representation in the (mixed) number base(s) given in the left argument.
I like to call it N-code ("encode") to remember that it is typed with APL+n
(While is clearly a "base", and indeed evaluates numbers in custom bases, B for base; type it with APL+b.)
 
I've learnt you can "zero-pad" an int as 4⊤⍨5⍴10.
 
2:34 PM
@xpqz Sure, but that splits the digits too.
 
Yes.
 
Is everyone clear about how works?
 
It's the inverse, sort of?
 
Well, is quite simple. In a way, it is a fancy +.×
It just gives the given "digits" weights, and sums the result.
The weights being determined from the reverse cumulative product of the left argument. (And there's some transposing going on too.)
is much more complex, computationally speaking, but not really conceptually, where it is basically the inverse operation.
I think the best way to explain it, is to show how constructs its result. As a simple example, let's take:
      0 7 24 60⊤12345
1 1 13 45
The 0 7 24 60 here represents a number system with 60 of the basic units in the next larger unit, 24 of those larger units in the next larger, etc.
It could e.g. be 60 minutes in an hour, 24 hours in a day, and 7 days in a week.
The 0 means that there are no larger units, and we'll keep stacking large value multiple in that position no matter how big the "pile" gets.
Compare this to making cash change. There's nothing larger than a $500 unit, so even if we have to pay a million, we'll have to use lots of $500s.
OK. What are our weights?
      ⌽×\⌽1,⍨1↓0 7 24 60
10080 1440 60 1
That is, there's 1 minute in a minute, 60 minutes in an hour, 1440 minutes in a day, and 10080 minutes in a week.
We can check the result that gave us, by using these weights:
      1 1 13 45+.×⌽×\⌽1,⍨1↓0 7 24 60
12345
Yup, that worked.
How did get the result then?
Let's do it step-by-step. We build our result from the right.
The first unit rolls over at 60, so we can find how many of the smallest units (here, minutes) we need to get the exact total value by applying division remainder:
      60|12345
45
There's our right-most "digit". Let's put that aside in our result. How many minutes are left?
      12345-45
12300
The next unit (the hours) consist roll over at 24 hours of 60 minutes each.
So any multiple of 24 hours will be days instead. We only want the remainder of 24-hour-periods, that is, 24×60 minutes, to be counted in hours:
      (24×60)|12300
780
This is how many minutes we want counted as hours. How many hours is that, though?
      60÷⍨(24×60)|12300
13
Hey, there's the second-from-right element of our result. Let's prepend it to get a preliminary result of 13 45
So we've used 780 minutes this time around. How much do we have left (which will be counted in days and maybe weeks)?
      12300-780
11520
Next up are days, which we'll use to fill until we have a value that can be counted in whole weeks.
A week, of course, being how many minutes?
      7×24×60
10080
So we need the division remainder when divided by that.
      (7×24×60)|11520
1440
That's how many days (stated in minutes) we have. How many actual days does that add up to?
      (24×60)÷⍨(7×24×60)|11520
1
Well, that's the next value in our result, giving us 1 13 45. And left is how much?
      11520-1440
10080
Which you might recognise as a single week (expressed in minutes), i.e. we get another 1 in our result: 1 1 13 45
@all How was that? Still alive?
 
2:57 PM
/me nods
 
Any questions so far?
OK, I'll take the silence as a no.
Now for the classic question. Why doesn't this work for making change?
      4 2.5 2 5⊤42 ⍝ 4 quarters in a dollar, 2.5 dimes in a quarter, 2 nickels in a dime, 5 pence in a nickel
1 1.5 0 2
0/10 — I can't pay 42 pence as 1 quarter, 1.5 dimes, and 2 pennies!
 
Is it because of the fractional multiplier?
 
I mean, sure, mathematically, it'd work, but I'm not sure the US mint will be too excited if I start chopping dimes in half.
@JeffZeitlin Yes, but what exactly happened?
Let's walk through the process again.
We start by finding what the remainder is, which we'll have to pay in pennies:
      5|42
2
That leaves 40 pence.
Since 2 nickels go into a dime, we do a mod-10 to find how many nickels we need:
      (2×5)|40
0
None, of course. So we still have 40p or ¢40 if you want.
Continuing on, how many dimes?
 
Should be 4
 
@JeffZeitlin But it can't be, because the dimes roll over at 2.5:
      (2.5×2×5)|40
15
So only 15 pence will need to be paid in dimes. Herein lies our problem.
That's of course 1.5 dimes. Hence our result.
And left over is 40-15, that is, 25 pence, enough for a single quarter.
Actually, proper change-making with arbitrarily valued coins is a weakly NP-hard problem.
 
RGS
3:10 PM
@Adám how so?
(I do not want to disrupt! I assumed it was ok to ask questions, please let me know if it is not!)
 
@RGS Look at the total amount as a knapsack you need to fill. You only have items of fixed volume to put in there. There's no obvious way to see exactly how to fill the bag fully.
@RGS (no, by all means, this is intended to be an interactive lesson, not a monologue!)
 
RGS
But for coins there is!
A greedy algorithm works
Assuming you want to minimize number of coins used, ofc
 
Ah, this is because mints are careful to only issue pieces so that the greedy algorithm works.
 
RGS
Really..?
 
I had no idea.
 
RGS
3:13 PM
Can you provide an example?
Ah nice, making 12 with coins of sizes [10, 7, 5, 1]
Greedy would do 10 + 1 + 1 but I would be better off with 7 + 5! Nice :D
 
US coins are 1 5 10 25 50 and 100… UK coins are 1 5 10 20 50 100…
 
(UK +2?)
(UK +200, too)
 
a 20p coin? Must be a legacy from the Lsd days...
 
RGS
So if the next coin is at least the double of the previous one, it always works, right?
 
Hm, I think so.
 
3:18 PM
In the simple case, where each value "rolls over" at the same number of previous values, I have to specify all of the places - e.g., I can't just say 2⊤13 to get 1 1 0 1; I have to explicitly extend the left argument. I don't have to do so with ⊥. Why the difference?
 
@JeffZeitlin gives you the possibility of running a custom counter or odometer which rolls over eventually. Think of the case 24 60 60⊤. If it didn't "chop" (mod, really), there'd be no way to know what the next digit value would be.
So what 2⊤13 means is a base-2 odometer with a single digit display, rolling over whenever the value exceeds 1.
Now, you could complain that this equates 2 and ,2.
You'd be right. There probably never any reason to use a scalar as left argument for . If you want mod, use |
 
So, really, ⊤ is less useful for simple (homogeneous) base conversion than inverting ⊥ - but is absolutely more useful for heterogeneous conversions.
 
The only difference between and | for scalar left arguments, is comparison tolerance (⎕CT) which | cares about, but ignores.
But if you want ⎕CT←0, you should set it explicitly rather than obscuring your code with and a scalar left argument.
 
(unless you're golfing...) :)
 
Yeah, never happened to me.
So, as Jeff said, if you want a variable number of digits, just depending on the how many are needed, use ⊥⍣¯1
@all Any more questions before we look at some neat tricks with ?
 
3:30 PM
/me is ready for the tricks
 
You can use 0 1⊤ to split a number into its integer part and fractional part:
      0 1⊤3.14
3 0.14
      0 1⊤3.14 2.7 100.23
3    2   100
0.14 0.7   0.23
 
Oh, nice! DivMod!
 
You can use to split "packed integers":
      0 100 100⊤20200326
2020 3 26
A golfing trick is getting 0 0⍴0 (an empty numeric matrix):
      (0 0⍴0) ≡ ⍬⊤⍬
1
 
@RGS - Bot's down; @Adám is running them on a local terp and then cutpasting.
 
RGS
@JeffZeitlin k, thanks!
 
3:37 PM
If fact, you can "silence" anything by making the leading axis have length 0 using ⍬⊤:
      ⍬⊤2 3⍴⎕A
 
So that adds a dimension - that is, it converts the rank-2 array created by 2 3 ⍴ ⎕A into a rank-3 array of ⍴ 0 2 3
(determined experimentally in the terp)
 
If you have a multi-dimensional array, but want the Nth element without having to ravel the array, how do you find the multi-dimensional index of the sought element?
Consider:
      4 5⍴⎕A
ABCDE
FGHIJ
KLMNO
PQRST
 
RGS
You use this thingy you have been talking about with the lengths of the axis?
 
@RGS Yes. It is called Encode or Represent.
Using 0-based indexing, this is very simple:
      ⎕IO←0
      4 5⊤13
2 3
      (4 5⊤13)⌷4 5⍴⎕A
N
      13⊃,4 5⍴⎕A
N
@all Do you understand why?
 
Why force ⎕IO to 0?
 
3:47 PM
Because of how works. It does a mod (|) all the time. When we "roll over" from one row to the next, we end up in position 0.
 
OK.
But that means that getting the "N"th item is really getting the "N+1"th item, considering the ordinals in the 'natural' way.
 
@JeffZeitlin True.
 
Briefly getting back to the problem of making change... The problem in the US model happens because we have that fractional multiplier. Would it actually work for UK coinage, where you have the 20p piece instead of the quarter?
 
@JeffZeitlin No because there are 2.5 20p coins on a half-pound.
 
OK. We theroretically do have the half-dollar, but I can't remember the last time I actually saw one - for the most part, day-to-day coinage stops with the quarter, plus the occasional dollar coin thrown into the mix.
If the 50p is more common, I can see the problem simply shifting a bit.
 
3:59 PM
OK, if there are no more questions. then that's it for today.
 
No, I think I'm clear on it.
 
Thank you for participating!
 
RGS
@Adám this was an APL Cultivation session, wasn't it?
 
@RGS Yes, it was.
 
RGS
Cool :)
 
4:03 PM
@RGS They are all listed here.
 
RGS
Can I ask you a couple of questions that you probably answer a lot? :P
 
@RGS Always :-)
 
RGS
I just want a bit of help to understand what is the best way to tackle APL
 
@RGS Tackle? Learn?
 
RGS
Because maybe if I give you a bit of my background you will be able to point me in a more specific direction
 
4:05 PM
@RGS Sure, go ahead.
 
RGS
I'm finishing my MSc in maths and I am not very dumb, so there's that
and I've been programming for some time now. I am fluent in Python but I have used languages like Java, JavaScript, C, Mathematica, Matlab
so I don't need to learn the standard programming concepts
Except those that are different in APL
 
@RGS With that background, APL might well a pleasure for you to use.
 
RGS
The problem(s) I can guess I will have are with the things that are more different from wtv I am used to
For e.g., the issues with typing the glyphs
(already noticed this: abrudz.github.io/lb/apl )
But if someone tells me upfront what the main differences are, I think I'll have an easier time learning APL
(e.g. I remember the first I tried using matlab, it was very annoying because no one told me that, for me to define a function that I could use in a different file, the function file should have the same name as the function!)
 
@RGS That's only for browsers. You may want to check out this list.
@RGS OK, I'll try.
 
RGS
@Adám cool, installed an extension for VS Code
 
4:12 PM
The main thing would be that in APL, all data is held in arrays. Even objects (which you are free to use or ignore) are arrays.
 
@Adám shouldn't this be mentioned there? afaict it's the only thing allowing for the alt- modifier key globally on windows
 
@dzaima Uh, yes. I don't know how I missed it. Feel free to add it.
 
RGS
For example, looking at the ~38 APL Cultivation lessons, they all seem like they assume some knowledge in APL
@Adám I can live with that
 
@RGS Yeah, they are not really introductions, except maybe lessons 1 and 2. I'll be happy to introduce you, but there is also APL Wiki's list of learning resources for non-APL programmers.
@RGS So, all arrays have zero or more axes (dimensions) with the total number of elements being the product of the lengths of the axes. (Like in C.)
The difference from C would be that even single elements (scalars) are arrays of the exact same array model, simply without any axes. The product off the empty list is 1, so scalars have exactly one element.
 
RGS
@Adám does "0 axes" go for constants?
ok ok
(do you recommend a particular extension for VS Code to help me type in the glyphs?)
 
4:18 PM
@RGS Which OS are you on?
 
RGS
Windows 10
I noticed the link dzaima sent
 
@RGS Yes, you can use a global keyboarding method, or use the plugins mentioned here.
 
RGS
but if there's a good extension for VS Code I would prefer that over installing the keyboard layout
@Adám found that page, giving it a try
 
@RGS Another thing to notice is that APL arrays are fully pass-by-value (i.e. immutable), with the only exception being references to objects.
 
RGS
that means "changing one element in an index" will create a copy of the whole array with the modified index?
 
4:21 PM
@Adám i wouldn't compare APL array ranks to C arrays at all - rather, I'd say that APL arrays are like Python/JS arrays, just that every array also holds its shape as a bit of extra data, and a proper interface with that
 
@RGS Hope you don't mind be butting in, but I assume you have a full installation of the Dyalog interpreter installed? Have you tried the IDE? I'm curious as to why new folks might want to use VS code vs the IDE.
 
RGS
@PaulMansour no idea what you are talking about :)
 
@RGS Yes. E.g. given the list MyList←(3,1,4,1,5), you can stick a 0 into the Nth slot with (0@N)myList without affecting myList.
 
RGS
so the answer is definitely no
 
How do you intend to execute APL?
 
4:24 PM
 
To run a program or expression?
 
@PaulMansour I don't think RGS has ever done that yet.
 
RGS
@PaulMansour No idea! I was at the "I can't write programs" problem rn, I would run into the "I can't run my programs" problem later on... !
The only time I ran an APL program was over at TIO
 
@RGS Actually, APLers tend to do that in reverse. First they run stuff, then they write programs!
 
One of the joys of APL is running it first, and writing it later!
Ha!
 
RGS
4:25 PM
What does that mean?
 
@RGS APLers tend to live in the "session" (a fancy REPL) and experiment with code snippets there until it works. Then they collect all that into programs.
 
RGS
ah sure
 
APL is every interactive. Add the Dyalog interpreter/IDE has integrated tracing and editing.
 
RGS
I'm used to that, to some extent :)
@PaulMansour I like that
 
You can try a (dumbed down) session on TryAPL.
@RGS It is quite common to begin one's day with running one's unfinished application until it stops due to an error, then change the code while it is on the stack, continue execution until it halts again, etc. etc. and then at the end of the day, save the state while running, so it can be loaded with its stack the next day.
 
RGS
4:29 PM
oh that is interesting, actually
 
Dyalog APL even does something highly unusual when doing OOP: If you change the code of a class that has existing instances, it will patch up all the instances to match the updated base class.
 
RGS
oh really?
that is interesting :o
 
I'm not saying you should use that, but it is pretty cool when it works.
 
@RGS I asked this question of RGS initially because all the smart people tell me that everyone is coding in VS Code or the editor of their choice. As far as I know, there is no way to interactively edit and trace unless one is using the Dyalog IDE.
(Or will be coding)
 
@RGS Anyway, going back to how APL is different: You don't need parens to apply a function to its argument; you can write f 42 instead of f(42).
@PaulMansour That might change though. Think of RIDE. It is completely separate (can be on a separate machine even) and can still do that.
 
RGS
4:34 PM
@Adám that is also fine by me, I guess
 
@PaulMansour RIDE is good for playing around. But editing a file on disk (which you need to do to get reusable text programs) is a bit more difficult in it.
 
RGS
it is just a syntactic difference, right?
 
@RGS Yes, but by extension, the function f will take everything that appears on its right, as far as it can "see" (stops at statement separators and closing parentheses etc.) as its right argument.
 
@dzaima Its not connected to Link?
 
@PaulMansour see, using Link is that "bit more difficult" I meant. It's way easier to make a file in a regular text editor and start writing to it.
 
4:37 PM
@dzaima Ah, indeed.
 
RGS
@Adám ok , so it is not like Haskell in that Haskell tries to "consume" as many arguments as it needs and whatever comes after doesn't go in the function. Is that it? Kind of
 
(and you still need to somehow call into Link to load the program, at which point you could, instead of running Link, just run your program)
 
@RGS Right, but APL functions can only take one argument (on each side, but each can have multiple elements). The consequence is that APL has a really simple precedence order (compare to the massive tables of C et al.) which is basically just right-to-left.
Also, APL doesn't syntactically differentiate between built-in functions and user-defined functions. You can easily see which is which though. APL built-ins only use symbols. User defined things have names.
 
RGS
alright
wait
so what if I want to write a function that should take 3 arguments?
 
@dzaima How does one execute a program then, as a file on disk? How do you load it?
 
RGS
4:40 PM
would I write it in a way that takes an array with my arguments?
 
@RGS Yes, it'd take a single 3-element list as argument.
 
RGS
ok ok
(installed dyalog apl (y) )
 
Also, creating such a list is as easy as juxtaposing the elements. E.g. if you wanted to call f on the number 42 and the string "abc" and the list (1,2,3) you'd run f 42 'abc' (1,2,3)
Actually, strings don't exist in APL. They are simply character lists.
 
@PaulMansour dyalog -script < file? I really don't know, i haven't used Dyalog as a full-blown application thing.
 
@Adám - Except there are no 'lists' in APL, either - they're all 'arrays'.
 
4:44 PM
@JeffZeitlin Sure, but "list" is an OK informal term for a 1D array.
Though, APLers tend to say vector and matrix rather than list and table.
 
RGS
@Adám I can also live with that
 
One thing you might appreciate as a mathematician, is that APL uses proper mathematical symbols for basic arithmetic. Times is × and division is ÷.
 
RGS
I do appreciate that, yes
myFunc x ← 3 + x so this doesn't work because "x is undefined"
and myFunc <- 3 + didn't work either
 
@RGS Yes.
 
@RGS what are you trying to do?
 
4:46 PM
@RGS Try myFunc←{3+⍵}
 
RGS
ah I see
the language bar explained what omega does
 
is the rightmost letter of the Greek alphabet, so it stands for the right argument.
is of course the (optional) left argument then.
@RGS However, due to the rule about precedence, some expressions might look deceptively familiar but give a different result. E.g. 2×4-1 gives 6 and not 7
 
RGS
why do I need the {} then?
syntax?
 
@RGS To differentiate between assigning a value and a function.
 
RGS
@Adám I would never expect 2x3 - 1 to give 7
and I can't see how it gives 6
do you mean 2x3-1 gives 4 instead of 5?
or what am I missing?
 
4:49 PM
Sorry, I had a typo.
 
@Adám - Four instead of five, not six instead of seven. :)
OK, with the update it's right.
:)
 
RGS
ok, so there is literally no precedence whatsoever, except for the () that we use?
everything else is right to left?
and why right to left?
 
Correct. For functions, there's no other rule.
@RGS Falls out naturally from f(g(h(x))) → f g h x
@RGS Btw, while a bit advanced for now, you can curry the 3 to the + with myFunc←3∘+
But that's tacit APL programming, and can wait a bit.
 
Right to left is also effectively an 'emergent behavior' to allow for typing f 1 2 3 4 5... - in order for f to be able to operate on the vector, the parser has to see it as a vector, so it 'gathers' them from the right.
 
RGS
@Adám of course, seeing it that way makes absolute sense
@Adám is that circle the "jot"?
the Dyalog APL lang. bar has a couple of round symbols, but this "jot" one says things about function composition
 
4:52 PM
@RGS Yes. It is the composition symbol you know from TMN (Traditional Mathematical Notation).
 
RGS
ok
 
@RGS Another reason is that it loosely models English with functions=verbs and adjectives and arrays=nouns: Turn the heavy blue car. "Turn" goes on "heavy blue car", "heavy" operates on "blue car" and "blue" paints the "car".
 
RGS
and what is it with the square boxes you use a lot? like ⎕IO and stuff like that; are those builtin variables ?
 
English is in fact written and read from left to right, but understood from right to left.
 
RGS
@Adám this is actually nice, never thought of it that way
 
4:55 PM
@RGS For non-core language elements, we have names, but they all begin with the quad character to avoid creating reserved words.
 
RGS
@Adám i.e. so I can name the stuff I create whatever I want?
 
Yes, absolutely no restrictions as long as you stay with Western European names without leading digits.
For and exit and á and FALSE are all valid names.
 
RGS
ok cool :D
(side question, in the Dyalog interpreter, how do I create what I would call a "script" in the languages I know?)
 
/me is waiting for the day when Dyalog APL will support names in Georgian... :)
 
@JeffZeitlin We got a request for Hebrew, which has interesting issues…
 
4:58 PM
RTL vs LTR, yeah, that's a Thing.
 
@RGS Good question. For now, you probably just want a bunch of statements executed together, right?
 
Arabic would have the same issue, plus the whole bit about initial/medial/final/isolate forms of the letters.
 
RGS
@Adám maybe not even that much! :D
but the interpreter feels weird, my cursor can go anywhere in the current empty line
 
00:00 - 17:0017:00 - 19:00

« first day (1156 days earlier)      last day (1488 days later) »