« first day (655 days earlier)      last day (2000 days later) » 

1:40 AM
Hello all. Have I missed much?
 
hey there @arcfide
how can I use your codfns?
does it require dyalog apl?
 
Yes, it needs Dyalog APL.
If you just want to play with it, then you can:
1. Install Dyalog. 2. Install ArrayFire 3. Copy codfns.dyalog into your user-commands directory. 4. Have fun.
 
where is it documented?
 
You'll want to use the appropriate backend for your system, of course.
README.md
I get the "Where is Co-dfns documented?" question a lot. Is the README.md not obvious for people? Serious question. I thought that I had made things pretty easy to find.
 
it's easy to find, but I don't know what I get from codfns
 
1:45 AM
In what way?
Or, I guess, I mean, what do you mean by that?
 
the readme really looks more like an overview, and the doumentation would then explain how to use the codfns?
 
Oh, huh...
runs over and takes a look.
 
What I'm saying is I don't know what codfns is enough to know what to do with it. I don't know what I get from codfns, it is a compiler, but does it compile to an exe? How is it used, is it used by simply having it installed, or do I need to call into it, how do I call into it aside from the gfx lib tha is mentioned
 
Um, nope, that's really it. Using ]?codfns.compiler will show you how to invoke the compiler.
 
1:48 AM
      ]?codfns

 CODFNS:
  Compile  Compile an object using Co-dfns

]        ⍝ for general user command help
]cmd -?  ⍝ for info on the "Cmd" command or group
      ]?codfns.compile
───────────────────────────────────────────────────────────────────────────────

]CODFNS.Compile

Usage: <object> <target> [-af={cpu,opencl,cuda}]
 
@arcfide
┌───────────────────────────────────┬┬────────────────────────────────────────┬──────────────────────────────────────────────┬─────────────────────────────────────────┬─────────────────────────────────────────────────┐
│No commands or groups match ]codfns││]        ⍝ for general user command help│] -?     ⍝ for list of available user commands│] -??    ⍝ for brief info on each command│]cmd -?  ⍝ for info on the "Cmd" command or group│
└───────────────────────────────────┴┴────────────────────────────────────────┴──────────────────────────────────────────────┴────────────────────────
 
The relevant section of the README.md is: Normal use of the compiler can be accessed through the User Command functionality, and documentation for the User commands is available using the ]?codfns. There are some specific features that require you to have a copy of the Co-dfns namespace in your local workspace. These APIs are described in this section.
 
so it makes code compiled by codfns faster
 
Basically, that's the goal.
 
and dfns is exclusive to dyalog?
 
1:51 AM
It's specifically targeting GPU computation though, so for many things on the CPU you probably won't see significant improvements unless you are working on the kinds of workloads the compiler is designed for.
Not exclusive, but the syntax is best implemented by Dyalog.
 
is the gfx library a direct handle to something like a window or canvas for drawing?
and if it isn't exclusive, then is there a future for portability to another APL?
 
There's a bit of copy overhead right now, but in principle, yes, you would be able to pass Co-dfns objects residing on the GPU and be able to render them directly.
What APL are you hoping to port it to?
 
something open source
 
@nathanrogers, I'd be quite eager to explore such options if you can provide a sustainable funding model that will provide for continued and expanding support for the APL ecosystem into the future, including my own research agenda(s).
Also, Dyalog isn't really opposed to open source.
Co-dfns is itself Open Source, but the reality of the situation is that if I were strictly open source, Co-dfns simply wouldn't exist. The open source community at large hasn't exactly felt the need to fund such things.
I have a bit of a love/hate relationship with Open Source and the community especially, because my experience with them has lead to me to the conclusion that in practice those who derive value from Open Source often don't contribute funding back to the core community in a way that provides for a sustainable model.
The funding for open source at the moment largely comes from the support of people who are able to derive value from the markets through proprietary systems. Open source systems don't seem to be self-sustaining at the moment, particularly language implementations.
Put another way, that's a bit of an FAQ that I get and one that I would love to have a better answer to, but at the moment the Open Source community isn't willing to support Co-dfns existing in the manner they claim that it should be.
Dinner time!
BBL.
 
 
4 hours later…
5:53 AM
hey @arcfide
sent you an email
 
@nathanrogers Thanks for the email, reading through and pondering it now.
Maybe you would prefer to have a video/voice chat?
 
 
4 hours later…
ngn
9:59 AM
@pierre i'm learning about 2: and wondering about all i/o verbs: what's the point of using "file symbols" instead of good old strings? is there any benefit to paths being interned scalars or is it just more convenient to type?
 
10:32 AM
@nathanrogers HOW many times do I have tell you, don't change the definitions! (sorry im getting a bit mad of you always doing that after me telling you to not) My question is about how to convert the single point array to an array where it's the only object.
I want b to be a single point object, such that b[1] is its X position, b[2] is its y postition, b[3] is its color. Now I want c to be an array of those points, such that c[1] is b. How do I initialize c? In dyalog that'd be c←,⊂b, but you're saying that shouldn't exist, so how the hell would you do that?
the reason I want c to be like that is because b,←⊂1 2 'gray' would make b 4 5 'red' 1 2 'gray', which I don't want, but c,←⊂1 2 'gray would be (4 5 'red') (1 2 'gray') which is what I do want
 
11:00 AM
I know that that might not be the best thing to do in APL, but I just want a basic understanding of your model before I try to do anything "correctly" in it
 
 
1 hour later…
ngn
12:22 PM
@dzaima c←1↑b b ?
 
@ngn that's very ugly is my problem
I don't understand why that's better code than c←⊂b
 
ngn
@dzaima in a language in which everything is a vector you wouldn't need , in the dyalog sense, so maybe k's , would be more useful (like ,⊂ in dyalog)?
then it would be c←,b
 
@ngn yeah, sure, i don't care whether it's , or , what matters is that a built-in for that should exist and is seems like nathan is against it
 
ngn
12:46 PM
this idea (no scalars, only vectors) appears attractive at first, but (1)(2)1 2 seems too inconsistent
@nathanrogers suppose you have a←1 2. you make it heterogenous with a,←(3 4)(5 6) and drop the last two elements: a↓⍨←2. what would a be then? i expect (1)(2), which is different from the original 1 2
 
 
2 hours later…
2:25 PM
I honestly have no idea what @nathanrogers problem is even after reading this several times
 
3:11 PM
@ngn symbols are scalars and convenient to type
 
 
1 hour later…
4:18 PM
@fftwj Welcome. If you want to be able to chat here, just send me an email to adam@ with the domain as in www.dyalog.com
 
4:53 PM
@ngn in that example, why would appending to a list make the existing data heterogeneous? a←1 2 is a two element vector. a,←(3 4)(5 6) is a 4 element vector.
1 2 (3 4)(5 6)
if you drop the last to you still get the vector (1 2)
 
ngn
@nathanrogers so that's a mixed array of scalars and vectors then? wasn't the initial idea "no scalars"?
 
there is no concept of a scalar
1 is already (1)
just as in any language a list of on item is [1]
1 ≡ (1). 1 2≡(1 2). 1 2 3≡(1 2 3)
 
ngn
@nathanrogers is 1 2(3 4)(5 6) the same as (1)(2)(3 4)(5 6)?
 
no it would be the same as (1 2(3 4) (5 6))
but since we're just assuming that everything is already in a vector, we don't need the concept of enclose and disclose
here's a for instance.

1 2 + 2 5 ⍴⍳10
if 1 and 2 is already a "closed" list, then it will apply accross the matching dimension. for instance
1 + 1 2 3 4 5
2 + 6 7 8 9 10
 
ngn
@nathanrogers ok, i understand singleton extension but that's beside the point
@nathanrogers let me try to understand this...
a←1(2). what are a[0] and a[1]? (0-indexing, but for the sake of argument i'd switch to 1-indexing if you prefer it)
 
5:02 PM
@Quintec I don't exactly have a problem. We were talking about RAD and I had a question about why ⊂⊃ if everything is rankless. if everything has no rank then functions could apply across lists with no need for¨ if there is no ¨ then why need scalars at all? Just have 3 "basic" types, rows, columns, and tables. Functions apply across any of these, where "scalars" are already enclosed 1 item vectors that are extended to adjacent "scalars"
index0 is [1] and index1 is [[2]]
 
ngn
what about a[0 1]?
 
@ngn think about it this way. How would I write 1 2 3 4 5 in any other langauge?
[1,2,3,4,5], already in a a box so if I "enclose" something else in that list, it will have depth two 1 2 (3 4) 5 [1,2,[3,4],5]
 
ngn
@nathanrogers but in other languages 1 is a scalar, not a list
 
a [0 1] returns 1(2) but is equivalent to (1 (2))
exactly
so since everything is already a list, no need for the concept of enclosure
just drop them from the notation because it's already in a list
1 2 3 4 is the same as [1,2,3,4] in other languages from APL to C ALREADY
they're conceptually equivalent. the cognitive issue that I have is that we need extra crap to transform the data to say, no wait really this is a list.
no wait stop, this isn't a list of items, its a """""BOXED"""""" list, so now we can refer to it as the list that it already is?
 
ngn
@nathanrogers this makes no sense to me, but i've been wrong before, so who knows, maybe you're on to something. i think you should try to implement it
 
5:13 PM
I was thinking about it when I heard about RAD
Hence my line of questioning. There's probably a whole class of problems that can't be solved, or elegantly simplified with this approach
@ngn so I'm probably oversimplifying and daydreaming. I'd like to implement something just so I can get over my mental hurdles in understanding APL. I spend most of my time finagling with different transformation on the data, unsure if its a bug in my code, my data, the language, or something else
so the eliminating the need to transform the data in all possible ways would simplify things immensely
 
@nathanrogers I think you just need to get more into storing your data in multi-dimensional arrays, and then learn to use the rank operator .
 
@Adám if not for @dzaima 's awesome processing app I don't even know what problems I should be solving. Really, I feel like I'm floundering outside of using that processing app, but even then in using that app, I'll spend several hours trying to debug something, unsure if its the function, the data, the implementation, or the app... what's interesting to me, is that 90% of the time its the structure of the data being passed to the function
 
Right, with time you'll get a feel for an appropriate data structure so that functions can be applied naturally.
 
so there's probably some fundamental issue with how I'm structuring the data, but since I don't know APL well enough, often times I mistake tables as vector of vectors
because they're the same thing... why have the distinction at all?
why does ,0 work on each row, but other functions don't?
 
@nathanrogers They are definitely not the same in APL.
@nathanrogers I'm not sure what you mean. Can you give concrete examples?
 
5:25 PM
⎕←(3 3⍴⍳9),0
⎕←(3 4⍴⍳12),0
 
@nathanrogers
1 2 3 0
4 5 6 0
7 8 9 0
 
it doesn't apply [1 0][2 0][3 0]...
but other functions DO
it would make more sense to me that functions either apply to a vector of vectors or to each cell in a table, not have special rules for one or the other
either all built-in functions apply to tables, or they apply to each vector, or they apply to each cell
 
@nathanrogers It is neither in this case. , applies along the trailing dimension. Again, look into rank and function rank.
 
⎕←(3 4⍴⍳12),0
 
@nathanrogers
1  2  3  4 0
5  6  7  8 0
9 10 11 12 0
 
5:28 PM
@Adám but RAD is supposed to be rankless
 
@nathanrogers APL isn't RAD.
 
and I never get this leading trailing dimension stuff
the trailing dimension in 3 4 is 3?
 
@nathanrogers No, it has length 4.
@nathanrogers That is really just a short way to write:
⎕←(3 4⍴⍳12)(,⍤1 0)0
 
@Adám
1  2  3  4 0
5  6  7  8 0
9 10 11 12 0
 
⎕←(3 3⍴⍳9)⍪0
 
5:30 PM
@nathanrogers
1 2 3
4 5 6
7 8 9
0 0 0
 
@nathanrogers That is really just a short way to write:
⎕←(3 3⍴⍳9)(⍪⍤2 0)0
 
@Adám
1 2 3
4 5 6
7 8 9
0 0 0
 
it looks like ..,¨0
or ...,⍉¨0
 
@nathanrogers Every function has an implicit ⍤(a b c) attached to itself. However, you can lower a, b and c by using explicitly.
@nathanrogers It isn't ¨!
 
i mean, at some point you're iterating through memory
you must be
 
5:33 PM
@nathanrogers Don't worry about that, though.
 
no but I am
 
@nathanrogers Actually, no, sometimes the processor can chew an entire chunk in one go.
 
because I'm trying to figure out how I'm supposed to be interactnig with my data
 
@nathanrogers Indication that you need to train array thinking more :-)
 
how that data is being stored is most of my confusion
no beccause apparently things aren't arrays
they're series of scalars untill they're put in a box
THEN they're an array
 
5:35 PM
@nathanrogers You need to free yourself. Don't worry — you're not alone. It is notoriously difficult for "traditional" programmers to free their minds and become APLers. Those with no programming background have a much easier time.
@nathanrogers In APL, everything is an array — even scalars.
And indeed, if you actually inspected how Dyalog uses memory, you'd see that there is no difference in how a scalar and any other array are represented.
 
@Adám I'll tell you what I know. The pluralized notation, thinking, operations that can be performed via abstracting away the concept of iteration and map and filter and etc is the best thing that has ever happened in the computing world. Having this notation in C++ would be better than having it as a standalone language however because of the library support and APIs available
the pluralized computation is it's own reward, and I can't fathom how I live in a branch of the universe where it wasn't universally adopted
 
Though you don't need to know this, I can tell you that every array is stored as rank,shape,data
 
I don't care about all that
It gets in the way of expressing what I want to do. "Notation as a tool of though" when the implementation details of your data have to be expressed, then your notation is broken
 
@nathanrogers Exactly, hence I wrote "you don't need to know this".
I'm just trying to convince you that there is no fundamental difference in the nature of a scalar and any other array. Free yourself from the notion and you loose one more unnecessary complication of thought.
 
I'm not the one who is saying there is a fundamental difference. Every big of reading I've done on APL suggests that there is a difference
there are even "scalar functions" which operate on scalars
there is no inference from the length of arguments
either scalar or matching length
which also makes no sense to me. who not infer 1 2 + 2 5 ⍴⍳ 10 that the LIST OF 1 2, which is a list, and therefore enclose, should apply accross the dimension of length 2?
 
5:43 PM
@nathanrogers Scalar functions don't operate on scalars. They are just pervasive. Unfortunate choice of names, maybe.
@nathanrogers Good point. What if there are two dimensions of length 2?
 
then it would apply accross the first
1 1 +2 2⍴⍳4
1 + 1 2
1 + 3 4
 
@nathanrogers That concept has a name. It is called prefix agreement and J has that. Unfortunately, the powers at be have not heard my cries for the same in APL.
 
in that case you could do the same for a vecctor of functions
2 3 (+ ×) 2 2⍴⍳4
2 + 1 2
3 × 3 4
 
@nathanrogers Indeed, one could devise such a system, but I question the utility.
 
I've encountered several where I must pass several terms to a function, but then through mangling they wound up in a matrix because it was the least obtuse way I could figure to get all that data into the function
once there, I had to perform further mangling to separate them into their respective parts
so I ould 2 + 1 2 and 3× 3 4
but
it would have been so much nice just to leave them in the table which took me forever to figure out how to make in the first place, and just apply out accross a vector of functions
 
5:48 PM
@nathanrogers Sounds like the issue was with the representation. If you need to apply different functions to parts of an array, then they don't belong in the same array.
 
no they don't, but they do apply to the relational information accross said arrays
think about it in terms of excel where each column has operations that need to be applied in unison
a matrix is not always homogeneous data, it's often relational data, as a matrix is just another word for table
 
an excel table translates to separate collumm vector variables in APL imo
 
yes it absolutely does, but then we were talking about the case when the computation is dependent upon the relationship in the row itself
 
@nathanrogers that's where I disagree - a matrix should only ever be used if in both axis the length isn't constant, otherwise its pointless to have them in a matrix
 
but then when each cell is actually a nested datastruture
then you have a table in each row
if you have a 2d or 3d vector of location, dimension(size), acceleration, velocity
then one column is a table in and of itself
so hence a matrix
and I need to calculate the locations velocity by its own acceleartion, and draw it's own specific dimension
so I need to apply several different operations to the "matrix" at once
yes they're all column vectors, but why should I need to then break them apart to do the calcualations when most of it can be accomplished through a vector of functions
it's just adding more notation and steps to breaking apart the table
 
6:03 PM
@nathanrogers if you have a matrix of rows of (x, y, velx, vely), how would you add the velocities to position without breqking them apart?
@nathanrogers then don't ever store them in a table..
 
but how do I pass them to a function without first having them in the table?
 
@nathanrogers Maybe you should look into tradfns which make it easy to pass multiple arguments and return multiple results. You could also pass namespaces with named arrays. Finally, you can use a single matrix, but then use indexing to easily pick the pieces you need. For ease of reading, define some names that just hold the column numbers.
 
or just have a vector of functions. that'd be great. instead of a dozen different ways to do what a vector of functions would do
Excel tables are often almost exactly that. relational data that have functions for each column
 
@nathanrogers you usually name excel collumns though - why not name them in APL?
 
notation is supposed to be a tool for simplifying thought. so do THAT instead of coming up with ways to work around the notation
 
6:06 PM
@nathanrogers But then you always act on columns by name or index.
 
I already have, but again, in some instances you want to pass your separated column vecctors to the same function
if you do that, they become a table
and having the ability to operate on that table as a table instead of separating them out again is the simple way of thinking about it
 
@nathanrogers Nope, just pass them as a vector of (column) vectors.
 
@nathanrogers pass them as a vector of columns
 
which
is a table
 
@dzaima Ninja.
@nathanrogers Nope. Not in APL, it isn't.
 
6:08 PM
that's what I'm saying about the notation arguing with itself
APL is requiring over specificity for something that's conceptually the same
notation is supposed to simplify thought, not make it more pedantic
 
@nathanrogers I do agree that the notion of prefix agreement together with arrays of functions sounds intriguing. I have not seen a language do that to be able to judge it though.
 
@nathanrogers a matrix is for things where both dimensions can be anything. A vector of vectors is for when there's a specific amount of collumns to deal with
 
but what about a table
a table is just a special case of a matrix where the columns must match length and rows match length for every entry
 
@nathanrogers Uh, no, a table is a matrix. It is true for both that rows and columns must all match lengths.
 
Ok, then let me try again. A table is a special case of a matrix where the contents of each column is homogenous, but not necessarily each row
 
6:15 PM
@nathanrogers I disagree. The rows of a table have to be comparable. So too for a matrix. Find me a table on Wikipedia where this isn't so!
 
but a name column has text, and an age column has integers, but a salary column could have a float
so the data accross a row is not homogenous
or maybe homogenous is the wrong word
homogeneous perhaps
 
@nathanrogers Correct, the scalars of a row are not comparable. Neither in a table, nor in a matrix.
E.g. when the classic matrix represents an equation system, each column represents a distinct variable, and so columns are not comparable. However, all rows have the same standing.
E.g. when a table lists countries' data, each column represents a distinct metric, and so columns are not comparable. However, all rows have the same standing.
You always (unless you're doing something really funky) sort the rows of a table, and sorting is done by comparing corresponding items in the rows — never across columns.
 
 
2 hours later…
8:39 PM
@Adám uh... it looks like Stencil is unusable...
 
@EriktheOutgolfer Looks like the default size is 1×3 instead of 3×3. Hm.
 
@Adám and there are too many zeroes padded in
 
@EriktheOutgolfer No, that's intentional so you can do small worlds.
 
@Adám yeah, it was supposed to work for this challenge
I guess it still does, 0s don't affect anything
 
@EriktheOutgolfer This looks right, so what's going on‽
 
8:45 PM
@Adám that clearly doesn't have a 1 in there!
when I try to put an argument, stuff happens...
 
@EriktheOutgolfer But this shows that the operand gets called with 3⍴content.
 
@Adám you mean rank⍴3, right? 3⍴content should result in an error...
 
@EriktheOutgolfer No, in that run, I make the result of every cell be the shape vector of the neighbourhood.
 
@Adám ah, yeah, something's definitely wrong
 
@EriktheOutgolfer I won't look at it tonight, but feel free to trace through it offline. Stencil is just an operator taking operands and arguments straight from TIO's fields.
 
8:51 PM
@Adám heh, alright
(not that an extracted wisdom tooth helps...)
 
@EriktheOutgolfer This should keep your brain off the pain. If you're unsure of the formats, just look at the bash script.
 
@Adám what I'm mostly focusing on is how to organize my painkillers, food (yeah, eating is hard) and antibiotics, currently :P yeah, I can't look through it today
 
what is a problem that uses stencil as a solution?
 
@nathanrogers Anything that resembles GoL.
 
so there's a solution to GOL using stencil?
 
8:55 PM
@nathanrogers Just to avoid any misunderstanding; are you talking about or my golfing language?
 
yeah, it's right in Stencil's homepage
 
you have a golfing language?
yes
 
yep, ⌺ can definitely be used to solve GoL
 
@nathanrogers Here at 6:08.
 
I see
very understandable
what is your golfing language?
 
9:05 PM
@nathanrogers Basically just a thin cover for (hence the name Stencil). It shortens the variant option names, takes care of edge cases, and simplifies specification and usage of neighbourhoods.
(Btw, I have two other golfing languages on TIO, QuadR and QuadS, which again are just thin covers for ⎕R and ⎕S.)
This reminds me that I should add some of Stencil's features to my extended Dyalog APL.
 
9:22 PM
@dzaima Wouldn't you want to swap * too? Actually, * and *⍨ are two quite unrelated functions, no? * has the inverse and *⍨ has the inverse *∘÷⍨.
 
@Adám yeah, forgot the most important one :p
 
So too are ÷ and ÷⍨ very different. ÷ has the inverse ÷ and ÷⍨ has the inverse ×.
And - has the inverse - while -⍨ has the inverse +.
 
@Adám yeah, they are, but only because inverse is defined as inverse of only, which I find strange
 
@dzaima Think of it in the Haskell (?) sense, that application of a dyadic function is really just application of a monadic function with implied left argument.
That makes monadic and dyadic functions syntactically equivalent.
 
@Adám don't you mean swapping dyadic & monadic there?
 
9:29 PM
@dzaima No. Think of 6÷3 as applying the function 6∘÷ to 3.
Why isn't it applying ÷∘3 to 6? Because APL functions take the specifier (if any or if it isn't the default) as left argument, and the primary argument as right argument.
It should be clear from functions like -÷*⍟⌹○ that this is the norm.
 
@Adám if you want that, then change the thinking of 6÷3 to be the application of 3∘÷ to 6, going right-to-left
 
@dzaima But it isn't. Monadic functions are prefix. However, there could be a case for an APL where monadics are post-fix, and all functions are left-associative. There, dyadic - and ÷ and * would fit right in as-is, though the monads would be fairly useless.
 
yeah, it breaks the idea that the monadic version of a function is the dyadic one with a default left arg, but I feel like the idea of that comes from the implementation, not the other way around
 
@dzaima I don't think it is implementation-sourced, but rather as an "obvious" interpretation of the duality of the - and symbols in CMN.
 
CMN?
 
9:38 PM
@dzaima Common Mathematical Notation.
@dzaima … And that idea has been carried over in APL and became quite fundamental to how people wrote code. Did you know that in IBM's APL, the left argument of a tradfn is always optional?
 
@Adám uhh sure, by implementation I could mean that CMN it's taken from
 
@dzaima OK, fair enough. Obviously, APL took a lot of ideas from CMN, even ideas there weren't really present, like reductions and inner products.
 

« first day (655 days earlier)      last day (2000 days later) »