« first day (1500 days earlier)      last day (1451 days later) » 

10:00
What is the difference between (FN0 FN1) and (FN0∘FN1) ?
They seem to be identical to me.
@EliasMårtenson the dyadic case ⍺(f g)⍵ is f ⍺g⍵ whereas ⍺(f∘g)⍵ is ⍺ f g⍵
but there also is , for which f⍤g and (f g) are exactly identical (except required parentheses, usability in trains, grouping, etc)
So it seems to be identical to FN0⍤FN1 ?
Ao assuming all uppercase letters are functions, how is (A B C D E) parsed?
@EliasMårtenson yep, that's what i said
@dzaima Yeah, I saw. I was testing while you typed it.
@EliasMårtenson (A B (C D E))
10:04
I see.
a 2-train is only ever parsed as the leftmost thing in a train
Got it.
J does things differently right? I seem to recall it having 5-forks and stuff?
so 2-trains must almost always be parhenthesized to add anything more to them, and that's where comes in to be a bit more helpful
@EliasMårtenson There's no special 5-forks in J. 3-forks are the same, and 2-forks happen to be different
J: x(f g)y → x f (g y), (f g)y → y f (g y)
And a special case for a 3-fork in J is a "capped fork" [: g h, which is the same as a 2-train in APL.
Normally the cap [: is a function that always errors.
(In all the examples, f g h are functions and x y are arrays.)
10:25
And the J 2-train is simply ⊣ f g in APL.
10:49
@Adám I see. I always found J trains incomphrehensible.
11:00
Can someone help me write a very simple test of a 2-train where the code is X (A B) Y and the result is either a scalar number or an array of numbers. The question is what A, B, X and Y should I choose such that any change in order of X and Y or A and B would result in a different result?
The input should be integers (or arrays of integers) and the output should be scalars or arrays of integers as well. The reason for that is that the same test is run multiple times with different array specialisation to ensure that optimisations are correct.
@EliasMårtenson 2(-*)6 should work
RGS
RGS
3 (⍴-) 5
@dzaima Thanks. I'm going with this one.
@RGS Thanks. This one suffers from a different limitation that I never made clear: If I replace the input with 3.0 and 5.0, the output is still integers.
RGS
RGS
@EliasMårtenson np, I did my best :P
@EliasMårtenson does your * output integers on integer args?
11:07
@dzaima No, not at the moment. But it should.
As long as the output fits in a 64-bit integer.
It seems I've managed to implement 2-trains and 3-trains in Kap that matches Dyalog behaviour.
 
2 hours later…
13:29
@Adám no, spiderwire has a few APL characters but not enough
ngn
ngn
13:45
@Wezl does it have static html hosting?
ngn
ngn
@Wezl i'm in :)
@Wezl well spotted :) I only took it up as I saw you used them. Nice and simple, and you can have private accounts. I like it so far.
Now would be the time where I make a contract with them, if they weren't non-profit :)
 
2 hours later…
15:43
is there a way to retrieve a list of cells using squad without each?
@nathanrogers do you want a vector of all cells, or specific ones by indexes?
I want to retrieve indies in a particular order without using arr[idns]
@nathanrogers (⊂inds)⌷arr?
thanks @dzaima
This was a fun silly problem. adventofcode.com/2015/day/3
s03←{≢∪+\(⊂0 0),(⊂'v<>^'⍳⍵)⌷,∘.,⍨¯1 1} how would you go about golfing this?
example inputs with expected results:
s03_tests ← ('' 1)('<>' 2)((400⍴'<>') 2)('^v' 2)((400⍴'^v') 2)('<^v>' 3)('<^v<' 4)('^>v<' 4)
s03_tests,← ((4⍴'^') 5)(('<^'[?500⍴2]) 501)
I don't see anything obvious that stands out, but my golfing technique bag is small
16:04
@dzaima Added a few new system functions to the spec. •Eval and •Fmt are new names for and , and •BQN and •Using are new functions (I don't think •BQN can be written easily in terms of •Eval because it needs to block out parent scopes). I think these are all reasonable names but maybe there are better ones.
I couldn't figure out what the left arguments to dzaima/BQN's are; could you explain them?
@Marshall a vector •args‿•name‿•path because Reasons™
(i didn't remember either, i just followed through the chain of calls on github ¯\_(ツ)_/¯)
@nathanrogers maybe (⊂0 0), to ↓0⍪↑?
@dzaima I guess •path‿•name‿•args is easier to remember because it follows the ordering you'd have in a shell call. I've only ever used •path so that works out well for saving typing too.
@Razetime then I can get rid of the↓ and just use +⍀
great
@nathanrogers Can (⊂0 0), not be 0, ?
16:10
@Marshall i've used none, the left arg is just directly the internal format of file-specific data ¯\_(ツ)_/¯
I have just updated kapdemo.dhsdevelopments.com with a version that implements the Dyalog-style trains. I'd be very happy if someone could write a few expressions to see if it does the right thing.
@Adám no because each cell is a 2vec
Since I don't normally use these features myself.
of permutations of 1 and ¯1
@nathanrogers Ah, but if you do as per Razetime, then 0⍪ should work.
16:11
s03←{≢∪+⍀0⍪↑(⊂'v<>^'⍳⍵)⌷,∘.,⍨¯1 1}
yeah that had the nice effect of eliminating the ↓ by using ⍀
@nathanrogers You might get away with going tacit there.
Probably not shorter, though.
Nah, too many monadic calls.
@EliasMårtenson there's also the (A f g) train, with which (¯1+≢)"abc" would be 2
Or in 18 words, A f g is A⍨f g
@Adám well, Kap doesn't have A⍨ either ¯\_(ツ)_/¯
@Adám I can only count 7 words there ⍨
16:15
@Razetime 18≡18.0 in APL :)
:P I know
@EliasMårtenson unrelated: ,(∘.×⍨⍳4) works, but ,∘.×⍨⍳4 doesn't
@EliasMårtenson Didn't you kill ∘.?
16:28
@Adám do you have a link to 2015 APL solutions? I see something in APL cart, but not specifically for 2015
watched JF's video becaues of aplcart. Such a neat tool you've built up
@nathanrogers 2015 what? Competition?
@nathanrogers You can have mine
sorry, Advent of code
@nathanrogers apl.wiki/aoc
16:30
bubbler has most of them I think
Guys, they are all on the wiki.
ah yeah
@nathanrogers you mean aplcart.info/pub? That's just placeholder data. I wish I had the time to actually populate that table to the same level of completion as main APLcart.
hmm I can help with that
16:35
hoo boy
The wikilink to @ngn's solutions is dead -- what should it be, or have you binned them, @ngn?
@Adám is there some way to set an entry point to a namespace? as in just call the namespace as a function?
@nathanrogers No. That'd always return a reference to the namespace. However, you can have a class with a default property (which when queried is simply a function call) that you can invoke with
I thought ⎕IO is inherited from the root NS?
something up with link, setting ⎕IO in root directory doens't solve things
 
1 hour later…
17:54
@Adám potentially linking namespaces before ⎕.a files means that they get the default ⎕ settings when imported, and not effected by linking ⎕.a files?
how do I tell dyalog where to look for text files when using things like ⎕NGET?
aside from specifying the fully qualified path
18:16
@nathanrogers ]cd
]link my stuff
]cd to mystuff
read mystuff

this is a lot to do every time I load in a project
what do you recommend?
@nathanrogers no clue how Dyalog is supposed to use relative file paths properly. There's ⎕SE.Dyalog.Utils.CD, equivalent to ]cd which you could insert in your code, but that's also ugly (and the source has a comment of "use at your own risk!"..)
@nathanrogers if you want to just run something on it being loaded, you can write arbitrary code within :namespace
just name is like, zzz.apln or something?
folders are first then files, so I think that's the right way to do it
@nathanrogers no clue about extension conventions. Anything works probably
18:33
@Adám I didn't. I realised it was easy to keep it. I might yet do so :-)
@dzaima I'm going to have to investigate that one tomorrow. I'm going to sleep now :-)
Thanks for finding issues.
@dzaima I currently have no support for having a left argument in a train. It should be implementable, but I haven't bothered with it yet.
@EliasMårtenson right. I just wanted to let you know that it's a thing and that it's useful
@dzaima It doesn't have it, because GNU APL doesn' thave it as far as I know so I never used it :-)
@EliasMårtenson A⍨ is a pretty recent thing (always returns A). It's useful in trains - e.g. (⊢*3⍨) for a cube function as a simple example, and also 2⍨¨A for replacing each item of an array with 2
@dzaima OK, now I know why it doesn't work. I don't think it'll be possible to make it work. The reason is that it parses from left to right, so it first sees , which is a function. It then checks for applicable operators and finds ∘ which is a dyadic operator. It then recurses down to find the right argument to the operator, but finds . and it fails.
There is no backtracking to try to parse it in a different way.
@dzaima But {A} is just one character more, and more readable in my opinion?
@EliasMårtenson but it must re-evaluate A every time it's executed
18:44
@dzaima Also, you can write that code like this instead, which is more concise and clear: ,×⌺⍨⍳4
@dzaima That's not really a problem in Kap :-)
@EliasMårtenson right
@Marshall my (well, the monadic version) currently isn't something i'd call "format". It only accepts as an argument numbers, and character atoms/vectors/matrices, and nothing else
OK, sleep time.
@Marshall "The effect of •Eval should be the same as if its argument were written as source code" you don't expect a←1 ⋄ {•Eval"a←2"⋄a} to return 2, do you?
@dzaima "written as source code in a toplevel scope" perhaps?
Similar to how Common Lisp performs eval in a "null environment".
@EliasMårtenson that'd be the behavior of •BQN, but that's explicitly about •Eval
18:53
@dzaima That's how I expect it to work in APL, but to be fair, I never tried.
I don't think I've ever used eval for real
(I mean, other than to parse numbers and such things)
@EliasMårtenson In interpreted APLs (which include Dyalog and dzaima/APL), ⍎"abc" is pretty much literally equivalent to if abc was executed there directly instead
@dzaima dzaima/APL has lexical closures, doesn't it?
@EliasMårtenson it does, but that doesn't stop from working
@dzaima Yes, you're right of course.
But does that mean that when you close over a function, you preserve all variables, not just the ones referenced in scope?
Since you cannot determine which variables to capture in the closure.
@EliasMårtenson "when you close over a function" the way variables are stored doesn't change between a function being executed and it being stored somewhere
@EliasMårtenson I can't determine that anyways
19:02
I mean like this (in Kap): { a←1 ◊ b←2 ◊ λ{a+⍵} }⍬
In this case, I can return a closure that closes over a only. Since b isn't referenced in the scope of the lambda, there is no reason to capture it in the closure.
@EliasMårtenson right. In that case, the outer function would create a Scope with a hashmap of a→1 and b→2, and that is used both while evaluating it, and as a reference to give to the inner function. There's zero concept of "closing" in dzaima/APL
@dzaima OK, I see. So when you use ⍎ that code will simply reference that same hashmap when looking up variables.
since dzaima/APL is dynamically interpreted & typed, even with no it couldn't understand whether, in { a←1 ⋄ b←2 ⋄ {a f←3 ⋄ a} }⍬, should the a be kept in the closure or not - that depends on whether f is a function or not, which can change afterwards
@dzaima Yes of course. I do spare myself a lot of trouble by not supporting that.
@EliasMårtenson right. You have the luxury of an AST :)
19:07
It's really the thing that makes function invocation so much faster.
I wonder i fthere is some neat way to handle that in an interpreted APL. Perhaps one can cache the tokenised syntax tree, and only reparse if any of the referenced variables changed from value to function or vice versa. That should be a really rare occurence.
@EliasMårtenson iirc something somewhere does that
@dzaima Dyalog doesn't seem to.
And GNU APL don't either.
@EliasMårtenson Not dyalog of course. But its function evaluation is fast enough
@dzaima I'm not sure. Compare the performance of +/V to {⍺+⍵}/V. The latter is horribly slow.
@EliasMårtenson well, the former is vectorized and special-cased to no end too
19:11
Fair enough, but the latter is much slower than even Kap before specialised arrays were implemented (and with specialised arrays, it got 4 times faster)
Dyalog does have function compilation and its own bytecode, but it's not much of an improvement
@dzaima My point is that Kap has no right to win that particular testcase. Since Dyalog is faster on pretty much everything else, there is something wrong with that specific case.
@dzaima I hadn't thought about the case where static code depends on dynamic code. I (currently) think a←1 ⋄ {•Eval"a←2"⋄•Eval"a"} should return 2 but the case where you'd have to redo lexical resolution isn't as clear to me. Is there a model you'd suggest?
@EliasMårtenson there's also this. You'd expect trains to be plenty faster than a function, but no
@dzaima Oh, I didn't know was so limited. The idea with •Fmt is just to give the programmer access to whatever the REPL uses to print.
19:15
@Marshall right. Dyadic does that
@Marshall i think the current is fine, where it creates a new scope for itself. Supporting mutating the variable name list is gonna be messy in any impl
@dzaima Okay, so it creates a scope for each instance of •Eval and reuses it if it's called multiple times. I didn't actually know it did that but evidently it works pretty well.
ngn
ngn
@xpqz i binned them. see conversation here.
@dzaima actually, it doesn't do that, but it should. ¯\_(ツ)_/¯
@dzaima OK, that's strange.
I guess I'll leave left arguments to •Fmt implementation-defined, just like the actual result.
19:21
I'd love to hear what someone who knows Dyalog internals can explain.
But now I really have to sleep :-)
@dzaima even uses LOC_ to access & set outer variables :o
•Eval¨•la∾¨<"←1" would be an O(n^2) operation, but that's expectable i guess
@Marshall I actually think it should always create a new scope, so •Eval doesn't need any special support
gtg now, i'll leave by noting a fun )sci in dzaima/BQN that displays all the allocated variable slots (and when the hashmap for VAR_ exists)
@dzaima That would break most use cases for •Eval instead of •BQN though.
@Marshall how so? you can still read variables and them, just not create previously non-existing ones
An example from JtoLaTeX: process a file with some escapes for BQN code in it, where it's possible to add new escapes from BQN.
•Eval is basically for build-your-own-REPL type things.
It would be reasonable for an implementation not to support it though. But even the file functions are like that so probably all system functions should be optional.
@dzaima Would be pretty easy to make •Eval scopes overallocate variable slots to get O(n log(n)) for that.
@EliasMårtenson I'm somewhat surprised by this result as well, but the basic issue is that the user has to be able to stop and save even if a train is on the stack. So all the information needed to continue the train has to be stored in a pocket in the workspace.
19:45
@Marshall oh, that's awful
@Marshall oh, hmm
(also, with the mutating •Eval, you can't allocate the variable slots inline with the scope/closure object, but that's less of a problem)
Oh, even for inline processing where you could statically extract all the strings (like md.bqn), a •BQN that doesn't save scopes would be pretty inconvenient. You want a result out for each input string, and I don't see an easy way to do that.
@Marshall Right. mutating scopes is plenty useful
I'd rather use •BQN for evaluating code in markdown because it doesn't use any variables from md.bqn (unlike the svg/html generation, which does), but that's not that important. There won't always be a function with the exact features you want.
@Marshall •BQN saving scopes would be less of a problem - you can guarantee there isn't any code currently running inside the scopes you're about to modify
@dzaima Is it? Isn't F←{b+𝕩} followed by b←6 the same issue? Or would you just reject the first part?
19:59
@Marshall F←{b+𝕩} without a preceding b definition currently falls back to VAR_, which I'd assume would be an error otherwise
Oh, you can also pass the •BQN instance into a function that it was used to define, so there's definitely no difference in level of weird problems.
@Marshall oh right, its return value could be a mutable namespace..
@dzaima Or just a closure.
I was imagining that •BQN would be a completely closed-off interface, but that breaks that fantasy
so i guess there's no way around having arbitrary mutation if you want some mutation
@dzaima I think I'm now convinced that only •Eval should save scopes.
20:06
@Marshall and •BQN makes a new one on every input?
@dzaima Yes, it would just be an embedded instance in the same manner of bqn.bqn. Or •Import I guess.
ok, so that's that. next: •Using, what?
And it seems like it's not any harder to implement •Eval in the current scope than in its own saved scope, so I guess we're back to what I wrote initially.
@dzaima I guess my argument for •Using is that sometimes there's a framework so central to what you're doing that you really want to write •Using •Import "JQuery" (okay probably not) instead of importing every single name in it.
@Marshall I understand wanting it, but does that not just force VAR_ usage?
I have a matrix I want both the identity and the negation of that matrix as a 3d matrix
(+⍪-) was my guess, but that's not it
20:12
@nathanrogers (+,[.5]-) or something
ngn
ngn
don't use + as "identity"
@dzaima I guess you could resolve names once it's evaluated or something like that. VAR_ is probably the easiest way to support it.
If the file just starts with some •Using •Import "..." statements you could special-case those before even compiling.
And it should give an error if there are name conflicts, so you can assume names declared in the scope in question won't change.
@ngn why?
@nathanrogers Because it isn't, it conjugates complex numbers.
my domain is ¯1,1
also, none of these things are giving me what I want
ngn
ngn
20:18
@nathanrogers ⊢ is the same number of characters
@nathanrogers maybe (⊢{⍺⍵}-) ?
that's it
@nathanrogers so you didn't want a 3D array
I definitely thought I did, is that NOT a 3d array?
@nathanrogers it's a vector of matrices. That's a different thing to a 3D array, or a vector of vectors of vectors
↑(⊢{⍺⍵}-)0⍪↑(1 1)(1 0)
etc
ngn
ngn
20:21
@ngn also: (⊢,⍥⊂-) ⍝ in a recent enough version of dyalog
In case it's relevant, note that dzaima's ,[.5] is really ,[⎕IO-.5] so you have to use ,[-.5] if ⎕IO is 0.
@ngn I got this nasty mess on that same structure ⊃,/↓¨+⍀¨
I want a vector of items for the row-wise sumscan of each 2d matrix
@nathanrogers That's ,↓↑+⍀¨, I think.
Or ,↓+⍀⍤2 on the ,[.5] version.
ngn
ngn
20:37
      ⊃,/↓¨+⍀¨(⊢,⍥⊂-)0⍪↑(1 1)(1 0)
 0 0  1 1  2 1  0 0  ¯1 ¯1  ¯2 ¯1
@nathanrogers what should the result be?
that looks about right
I was doing the wrong thing anyway
i needed a different fucntion than ~
er, -
{(⊂⍵)⌿¨⍨(⊢{⍺ ⍵}~)2|⍳≢⍵}
that's what I was after
I want a list of odd and even rows separated
I guess key could do that?
ngn
ngn
@nathanrogers what's the larger problem you're solving?
@nathanrogers Key is bad because the ordering depends on the data. You want group.
{((≢⍵)⍴0 1){⍵}⌸⍵}
that works
Oh, you're safe here because you know 0 comes before 1 in the left argument.
20:41
@nathanrogers you could also reshape, transpose, and split
I have a 2d matrix, I need to split even and odd rows
@nathanrogers not particularly if you have 0 items
that's the primary problem I'm trying to solve now
in my case ther eis a base case so 0 items isn't possible
I just need a 2d matrix split into even and odd rows
@dzaima {↓⍉(2,⍨2÷⍨≢⍵)⍴⍵}
20:43
from a matrix?
@Marshall (but fails for 0 items)
@dzaima depends on the input
for my case the base case is 1 item
so can't have 0
@nathanrogers but it's not a nice solution in general
ngn
ngn
@nathanrogers note that ⌸ mixes the result, so you might get an extra row of zeroes or spaces
,↓+⍀⍤1{(0 1⍴⍨≢⍵)⊢⌸⍵}
20:48
@ngn Yeah, you probably want {⊂⍵}⌸.
@nathanrogers If you know you have an even number of rows, you could reshape it from (2×n)m to n 2 m and then use plain +⍀.
are you saying because it will pad 0s?
I don't carea bout that, 0 is the identity element in this case so its not important if it pads 0
so... no that doesn't work what?
oh yes it does nvm
Assuming even lengths, ,⍉↓+⍀(((2÷⍨⊃),2,1∘↓)∘⍴⍴⊢)mat works. Have to do an overtake first for odd lengths though.
21:05
{≢∪,↓+⍀⍤2{(1 0⍴⍨≢⍵)⊢⌸⍵}0⍪↑(⊂'v<>^'⍳⍵)⌷,∘.,⍨¯1 1} 100⍴'v^'
101
this is a working solution to day 3 AOC 2015
part 2
crits plz
how I defined it generally to avoid repetition with part 1
my favorite insight of this solution is the insight of a diagonal coordinate system
ngn
ngn
@nathanrogers complex numbers could be of use there
yes I see bubblers answer
that's pretty keen
21:51
my solution ≢∪,+⍀0⍪(⊢⍴⍨2,⍨2÷⍨≢)⌊*0J1×○2÷⍨'^<v>'⍳input
oh, bubblers is very similar, cool
and I overcomplicated the complex number bit oops
I think the complex numbers is the more obvious version for people who math harder than me
Like, I see it now, but I wouldn't have found that way
instead, I intuited a progressive list of cells in a 2d coordinate system, but the regular 0 1 combinations I've used before wouldn't cut it
I thought maybe evens and odds could do it, but finally intuited that 1 and ¯1 each coordinate in x and y is updated each movement
22:20
here's a question
+⌿⍣≡∘↑ this works, +⌿⍣≡⊢↑ this doesn't, and I don't understand way
ngn
ngn
@nathanrogers in isolation, those would be trains - the second one a fork. what's the larger expression you used them in?
+⌿⍣≡∘↑{(×/⍵) ,2× ⍵[2↑⍋⍵]}¨
ngn
ngn
@nathanrogers no argument at the end?
s02_2 ← +⌿⍣≡∘↑{(×/⍵) ,2× ⍵[2↑⍋⍵]}¨ ⍝ 2_2 Sum total of double the 2 shortest
⍝ ... plus the volume of the input
ngn
ngn
@nathanrogers ah, i see. so s02_2 itself is a train
22:26
just trying to find some way to add clarity
some spacing
some... something, but I don't see it
I'd really be keen to get rid of [] if I can
but its longer no matter how I slice it
and also hides the clarity of the existing expression
ngn
ngn
if you use 2 functions in a row without an argument, it's an "atop": f g ←→ {f g ⍵}. but if you use 4, they go like this: f g h i ←→ f (g h i) ←→ {f (g⍵)h i⍵}
s02_2 ← +⌿⍣≡∘↑{(×/⍵) ,2× 2↑ ⍵[⍋⍵]}¨ ⍝ 2_2 Sum total of double the 2 shortest
or I could move it
but there doesn't seem to be much to wring out of this one
ngn
ngn
+⌿⍣≡∘↑ is a single function. +⌿⍣≡⊢↑ is a sequence of 3.
you add another one to the right - the first case becomes an atop (works fine), the second case becomes like i described above and it obviously isn't what you intended
@nathanrogers if you're gonna code in apl long-term, it would be good to memorize this: codegolf.stackexchange.com/a/43084/24908
ahah +⌿⍣≡∘↑(×/,2 ×2↑ ⊂∘⍋ ⌷ ⊢)¨
@ngn I'm getting there. rewatched a bunch of the trainspotting in apl yesterday
I ask myself, I need ⍵ to go to ⌷ on the right and I need ⊂⍋⍵ on the left, so it needs to be in the middle, and I need to compose the other 2
no something is wrong :c
ngn
ngn
22:42
btw, i was just describing the way it is with trains in dyalog. i'm not saying it should be that way.
no harm in practicing
unless there is
then you shouldn't
@ngn when would you say something in dyalog is as it should be!
ngn
ngn
@rak1507 the core apl notation is great of course (not: oop, not: trains, not: namespaces..) except for unfixable bugs
no I had it right
why is it right
really? I thought you didn't like unicode
ngn
ngn
22:47
@rak1507 i like squiggles, actually. it's just the inconvenience of setting up fonts and keyboards, i would complain about that. but that's minor compared to other defects.
fair enough
ngn
ngn
and yeah, i'd rather have overloads and be able to type them anywhere
(×/, 2× 2↑ ⊂∘⍋ ⌷ ⊢ ) I read this as a fork of ×/ , (...) with 2 atops 2x and 2↑ and a train of (⊂⍋) ⌷ ⊢
is that right?
ngn
ngn
try pasting it in the repl with ]box on
┌─────┬─┬─────────────────────────┐
│┌─┬─┐│,│┌─┬─┬───────────────────┐│
││×│/││ ││2│×│┌─┬─┬─────────────┐││
│└─┴─┘│ ││ │ ││2│↑│┌───────┬─┬─┐│││
│ │ ││ │ ││ │ ││┌─┬─┬─┐│⌷│⊢││││
│ │ ││ │ ││ │ │││⊂│∘│⍋││ │ ││││
│ │ ││ │ ││ │ ││└─┴─┴─┘│ │ ││││
│ │ ││ │ ││ │ │└───────┴─┴─┘│││
│ │ ││ │ │└─┴─┴─────────────┘││
│ │ │└─┴─┴───────────────────┘│
└─────┴─┴─────────────────────────┘
I did that
I don't really understand how to read this either
ngn
ngn
22:50
it's more like 4 nested forks: ×/ , (2 × (2 ↑ (⊂∘⍋ ⌷ ⊢)))
my question is, what does ×/ get? does it get the result of (2× (2↑...)) or does it get ⍵ ?
{(×/⍵) ,2× 2↑ ⍵[⍋⍵]} this is the dfn
ngn
ngn
@nathanrogers ⍵
so it parses down , not from the right
question mark
ngn
ngn
@nathanrogers parenthesization is from the right
(parenthesization - a made up word)
that doesn't help answer my question
and I don't see how they're 4 forks
ngn
ngn
22:53
if you have more than 3 functions in a row, the last 3 become a fork
does the existence of the constants 2 make them atops?
or they're just forks with constant arguments
ngn
ngn
@nathanrogers no, the constants act as if they are functions returning those constants: A g h ←→ {A} g h
oh
yeah that makes sense
so if I were to express the application
(×/⍵) , (...)⍵
...(2 ⍵) × (...) ⍵
......(2⍵) ↑ (...) ⍵
.........(⊂∘⍋ ⍵) ⌷ ⍵
is that right?
ngn
ngn
@nathanrogers does "..." mean you're replacing it with the content of the following line?
yeah
bceause there's no indentation in SE chat :C
ngn
ngn
22:57
@nathanrogers then, it's mostly right, except 2⍵ should be just 2
I just meant that {2}⍵ sort of thing
discards ⍵ and returns 2
ngn
ngn
well, {2}⍵ is 2 but 2⍵ is a pair (2-vector) of 2 and ⍵
what I'm saying right now is I meant {2}⍵
but I can't edit it anymore
ngn
ngn
okay
(×/⍵) , (...)⍵
...........({2} ⍵) × (...) ⍵
..........................({2}⍵) ↑ (...) ⍵
.......................................(⊂∘⍋ ⍵) ⌷ ⍵
that actually makes a ton of sense to me

« first day (1500 days earlier)      last day (1451 days later) »