« first day (653 days earlier)      last day (2002 days later) » 

12:16 AM
I'm getting really frustrated learning stuff
I want the simplicity of K, the libraries of J, and unicode X(
is it just me, or is J basically defunct? most of the libraries I find don't have much documentation and/or are completely broken. either they're completely broken or the limited documentation that there IS is woefully outdated, by like a decade from the last update I see on many of them
and not to mention noone is ever in #jsoftware
questions for days and noone answers
 
1:01 AM
there is an equivalent of ⍣ for k. does anyone remember what it is?
{x,+/-2#x}[0 1;10] thought it was something like this
({⍵,+/¯2↑⍵}⍣10) 0 1
 
 
4 hours later…
5:06 AM
@nathanrogers I think N f/ A applies f to A N times.
@nathanrogers You're not alone; hence RAD by Zacharý. K is officially deprecated in favour of Q. Yes, J is dying. Its top devs now work for Dyalog making APL. Its top dev is teaching his child APL.
 
 
2 hours later…
7:39 AM
such a sad story
 
 
6 hours later…
2:09 PM
T'ai chi Master: Four ounces deflects a thousand pounds #APL Guru: Fifty characters solve a thousand problems. Aaron Hsu and @mkromberg teach to 'think in the APL way' in a workshop at #FnConf18 https://confengine.com/functional-conf-2018/proposal/7714/apl-workshop-intensive #DyalogAPL #FunctionalProgramming #ArrayOrientedProgramming
#Dyalog are getting involved at Functional Conf 2018 @FnConf where @mkromberg is holding an APL Workshop (with Aaron Hsu) as well as presenting. #FnConf18 #APL
 
 
6 hours later…
8:14 PM
@Adám where can I find anything about RAD?
@Zacharý
 
9:06 PM
@nathanrogers Yeah, just note it does not have depth/rank distinctions. And I'll probably start working on it during 2019. So, seems like everyone is in the APL extension/derivation business now, heh.
 
what is the difference between , and ∊ in normal apl
 
@nathanrogers flattens everything, so the result is an array of scalars. , is (×/⍴A)⍴A
 
which... what is the difference?
×/⍴A will be a scalar reshape of A
so it will be 1 rank
@Zacharý what does it mean to have no rank? depth?
 
@nathanrogers it means that arrays are like "normal" language arrays
 
what is the consequence of that?
if they're like normal arrays, why have enclose?
 
9:18 PM
@nathanrogers I have found myself doing arr = [item] in js often, it's not that useless
 
it just seems to me anyway that if you're going rank free then go scalar free also, where "scalars" are just vectors of 1 value
because under what circumstances is 1 + 1 2 3 and 1 + 1 so different that 1 needs to be a different data type?
 
@nathanrogers ..what? That's just stupid, then doing 3⍴N⍴ can accidentally disclose and reshape the inner array if N is 1
 
but you're still thinking that there's something to enclose or disclose
N is a vector
 
1↑arr should give an array with one item, but you're saying it should disclose?
 
no, I'm saying that there is no disclosing
conceptually it's a 1 item vector
 
9:24 PM
@nathanrogers and it is..
 
maybe I'm missing something
 
Basically, rank and depth are the same thing.
 
I have no experience in language implementation, so I'm spitballing.
 
Basically, if you know how arrays work in C++/JavaScript/Java/Python/etc., it's exactly the same way, pretty much.
(Only weird thing being ''≡⍬
 
that seems normal to me
 
9:27 PM
@Zacharý is there a way to reshape the outermost array (e.g. 3⍴(1 2)(3 4)(1 2)(3 4)(1 2))
 
No, I don't think so.
 
@nathanrogers are you suggesting that the last expression in this should return just 2?
 
I might do another reprogramming of the entirety of RAD, since I still cannot get variables to work within dfns for the life of me.
 
@Zacharý variables are a mess. My most frequent reoccurring bug probably is forgetting to materialize a variable/variable array
 
Yes, they are.
I'll also probably do an actual parser instead of a massive memoized/cached regex.
 
9:36 PM
wait no you're right yes 2
1 2][3 4

is the same as
1 2
3 4
 
@nathanrogers and if I then were to do a 7⍴ after (not the RAD reshape, but reshaping the outer array), you'd expect the outputs to be (7 2), (7 2), (7)? That breaks a lot
 
no I'd expect it to be
7 2][7 2][7 2][7 2][7 2][7 2][7 2
 
Is this dzaima/APL's multirank array notation?
 
no
i just don't like typing
 
@nathanrogers why would it not be 1 2 1 2 1 2 1? You want no distinction from [1 2] & 1 2
 
9:40 PM
exactly
well because there's (1 2) and ((1)(2))
those are different
 
@nathanrogers how is 1 different from (1)?
you said no 1-item vectors..
 
no I didn't I said no scalars
scalars are 1 item vectors
 
@nathanrogers there are no scalars
 
that's news to me
 
is create a 1-item array..
 
9:43 PM
and I'm saying that if x is already a 1 item array there is no need for ⊂x
there's no need for ⊃x either
 
@nathanrogers you're that you'd like arrays like JS/python/java/C but that didn't allow one item arrays? o.O
 
no what are you talking about. I'm saying that I don't think there needs to be a distinction between 1 and [1]
just have [1]
be a list
 
@nathanrogers it is..
 
of one value, then everything is an operation accross lists
but 1 isn't a list
 
@nathanrogers it is
@nathanrogers it isn't
 
9:45 PM
⊃[1] is 1
those are 2 differen't shapes and types
 
is just RADs way of making a one item vector
 
⍴1 is 0
that's what I'm saying, why the distinction
 
@nathanrogers you mean ?
 
yeah
I'm saying that I think it's a meaningless distinction
 
@nathanrogers between [1] and 1?
 
9:46 PM
yes
 
Do you know of R, nathan?
 
yes I know of R
 
@nathanrogers how can you know whether appending 3 to [[1, 2]] should equal to [1,2,3] or [[1,2],3]?
 
Two different appending methods?
 
@Zacharý so if I have a loop adding items I should have an if for the special case of just 1 item in the array?
 
9:48 PM
Yeah, that is a problem.
 
@Zacharý and it extends to pretty much every APL builtin
 
Isn't there already a language that does this?
 
@Zacharý I hope not..
it's just plain stupid and disallows ever doing N⍴ with an arbitrary N
 
Yeah. I need to try to figure out a neat trick for the outer layer thing.
 
imagine a table implemented as an array of rows. (1 2 'apple')(2 4 'banana') is a fine table with 2 rows and 3 collumns. Then I decide to remove the banana and now the table is (1 2 'apple'), which is a three row table, the first being 1, second - 2 and the third - 'apple', which is nothing like the original.
@nathanrogers imagine your position arrays with that system - (x1 y1)(x2 y2)(x3 y3) is an array of 3 XY positions. Now I remove two balls, resulting in (x1 y1), which now looks just like a 2 ball array, the first ones x & y position being just x1, and another with the position array being y1, which is incredibly wrong
 
10:12 PM
no you should just assume that youre appending to the list
and catenate is a nested list
1 2 is (1 2) 1,2 is ((1)(2))
1 2 3 is (1 2 3) (1,2 3) is ((1) (2 3))
no it doesn't, what you're saying is a presumption upon the rest of the language being in tact with this one change. the fact is that the whole notion of vectors would have to change if there is no such thing as a scalar
after all #300 in k is 1
 
@nathanrogers so is it in RAD
 
what I'm saying is that if #300 is 1, that means it's an array of length one, not a scalar. if there is no such thing as a scalar then there is no need for ⊂ or ⊃ because everything is already boxed and there is no such thing as unboxing a value
 
@nathanrogers {G.pt ⍵}¨(x1 y1)(x2 y2)(x3 y3) draws 3 points. What the hell would one pass to {G.pt ⍵}¨ so it'd draw one point?!?
 
like, there is no difference between ['a', 'b', 'c'] and "abc"
in apl 'abc' is 'a' 'b' 'c', to make "abc" i need ⊂'abc'
which is archaic and ridiculous
{G.pt ⍵}¨1↑(x1 y1)(x2 y2)(x3 y3)
 
@nathanrogers ? no, strings in APL are made to behave as similar to numerical arrays
 
10:19 PM
but a string is conceptually different than a list of characters
so have the distinction, perhaps 'a' and "because it just makes sense"
 
@nathanrogers 1↑(x1 y1)(x2 y2)(x3 y3) would result to a 1 item array, which you say should automatically be converted to just the item in it
 
no
i never said that
you're conflating the idea of a 1 element vector and 1 item
i'm saying there is no such thing as 1 item
 
@nathanrogers both are the same?!?!
 
in the context of my original question
yes
just like in k
#300 is 1
 
RAD doesn't have anything other than a one item array for scalars
 
10:20 PM
not ⍬
@dzaima perhaps we're talking past each other
I'm speaking in context of a hypothetical question
if a, why not then also b?
 
@nathanrogers RAD writes exactly that as ⊂x1 y1
 
so in the case of b, I'm asking why is it that we need ⊂ and ⊃ if there are no ranks
I don't need boxes
I'm suggesting writ it as x1 y1
and skip the ⊂
if you want a list of 2 vectors then x1 y1, x2 y2, x3 y3
 
@nathanrogers oh, you're suggesting that a b c is automatically wrapped in a 1-element array?
 
or better yet, rename ⊂ as compartmentalize, so that you could do f¨2⊂allLocations
 
so the shape of 1 2 3 is 1 3?
 
10:22 PM
yes
 
@nathanrogers you mean 3 vectors, right?
 
..
 
i meant 3 2d vectors
I'm used to a library that calls them 2vec and 3vec
so I was thinking in terms of "a list of '2vecs'"
 
so {⎕←'hi'}¨1 2 3 prints hi only once?
and a←1 2 3⋄⎕←1⊃a prints 1 2 3?
 
10:25 PM
no because its a 3 item vector
 
@nathanrogers but it's automatically enclosed in a 1 item array?
4 mins ago, by nathan rogers
and skip the ⊂
 
{⎕←'hi'}¨(1,2 3) would print twice because its length is 2
no scalars are automatically enclosed in a 1 item array
#anyscalar is 1
 
@nathanrogers x1 y1 is not a scalar, why would it be enclosed then
 
#scalar1 scalar2 is 2
 
so dont do this?
 
10:27 PM
yes x1 y1 is not a scalar, but x1 y1, x2 y2 catenates two lists
⎕←⍴0 0, 0 0 instead of this returning 4, it would return 2 2
 
@nathanrogers
VALUE ERROR
 
so again, since x1 y1 doesn't automatically get enclosed as you've just reclarified, how would one pass one point of (x1; y2) to {G.pt ⍵}¨
 
eh? yes it does
I'm saying there is no such thing as enclosing as in throw it away
x1 is a 1 element vector, x1 y1 is a 2 element vector
x1 is [x1]. x1 x2 is [x1 x2]
I would write it like this {G.pt ⍵}¨x1 y1,x2 y2,x3 y3 draws 3 points?
 
@nathanrogers so {G.pt ⍵}¨ x1 y1 draws one point. {G.pt ⍵}¨(x1 y1)(x2 y2)(x3 y3) draws 3 points?
 
I would write it like this {G.pt ⍵}¨x1 y1,x2 y2,x3 y3 draws 3 points?
I'm not sure why it did that up there
because it delimits one list from another list
they are all after all lists from the first element.
because there is no concept of a scalar
therefore no need for ⊂ or ⊃
what I'm saying is there is no difference between a list of vectors and a table, but there is a difference between iterating over each in a table and iterating over each in a row
or in a column. but apl doesn't draw distinctions along those lines, which is a constant source of frustration because I have to do 12 rearrangements of my data just to get to the appropriate data structure
if I had 2 10⍴⍳20, I would expect ¨ to refer to each in terms of the table because i have a table, but instead it refers to each cell.... but hey that's iteration over a 1d vector
tables have rows and columns, but columns and rows have cells. so why is it that when I ¨ over a table I get each cell, so I have to convert the table to a vector of vectors, but a table IS a vector of vectors, so.... why?
so instead of allowing any sort of reference to a scalar, instead only perform vector operations. there are no scalar operations. just vectors of length ≥ 0
then do axis matching, (+ -) ⍨2 2⍴⍳4
is
1 2 + 1 2
3 4 - 3 4
the same way that regular matrix arithmetic is done
everyone ran away.
or with the idea of compartmentalize {G.pt ⍵}¨2⊂x1 y1 x2 y2 x3 y3
@dzaima to pass one it's simply {G.pt ⍵}¨x1 y1
it's just that there is no notion of boxing or unboxing. In any other language are you familiar with a way of making a list that isn't enclosed?
no, they're all inside a box already.
a list is enclosed by default
and you can't unbox a list
there's no such thing
the concept is redundant in the extreme. why would I ever want to say [[1,2,3]] I wouldn't. I'm suggesting that , should instead mean listify the thing on the right and on the left, there are now 2 lists, not 1. [1,2,3],[1,2,3], would result in [[1,2,3],[1,2,3]]. if you want [1,2,3,1,2,3], just write (where a←[1,2,3]) a a
because after all 1 is the same as (1) and therefore 1 1 is the same as (1 1) therefore (1 2 3) (1 2 3) is the same as 1 2 3 1 2 3
but (1 2 3), (1 2 3) is the same as ((1 2 3)(1 2 3))
which would be the same as
1 2 3
1 2 3
because a table is a vector of vectors
and a scalar is nothing but a 1 item vector
 
11:26 PM
@nathanrogers You just summed up what I meant by no rank/depth distinction.
 

« first day (653 days earlier)      last day (2002 days later) »