« first day (795 days earlier)      last day (1862 days later) » 

7:52 AM
Zilde is represented as 0---0 there is someone can explain what is the meaning of 0---1 so one element of zero element that contain 1... Where is the useful of that
Logic as geometry came back from God think... Do you believe you (as I ) invent something????
 
8:36 AM
Than I not understand why one has to have for know the result get the first element of U/sets... There is something I do not understand at full is not ok... Better Axiom way for all this...
 
 
4 hours later…
ngn
12:27 PM
@RosLuP does --- mean ? which dialect of apl is this?
 
1:04 PM
@RosLuP Are you asking what exactly the concept of prototype is? As in: 0 is the "first" element of , but is there another empty vector with 1 as prototype?
 
 
1 hour later…
2:09 PM
I say:
o←⎕fmt ⍝ o is the output function
o ⍬ ⍝ this is Zilde and its type
┌0─┐
│ 0│
└~─┘
o ,(⊂1 2) ⍝ this is a vector or a set of one element (1,2)
┌1─────┐
│┌2───┐│
││ 1 2││
│└~───┘2
└∊─────┘
o 1↓,(⊂1 2) ⍝ this is what remain if cut one element above array
┌0─────┐
│┌2───┐│
││ 1 2││
│└~───┘2
└∊─────┘
⍬≡1↓,(⊂1 2) ⍝ it is not Zilde or i fail to find the void set in Zilde
0
 
ngn
2:26 PM
@RosLuP the result for 1↓,(⊂1 2) seems wrong. i would expect it to be equivalent to 0⍴⊂0 0 like in dyalog
⍬≢1↓,(⊂1 2) makes sense, as the prototypes are different
 
@ngn so the void set in APL what is?
 
ngn
@RosLuP what do you mean by "void set"? first of all, apl doesn't have sets (in the mathematical sense) - there always is some defined order in them, so we call them vectors. an empty vector still has a prototype - it could be an empty vector of integers like ⍬, or an empty vector of characters like '', or of something more complicated like 1↓,⊂1 2
 
1↓,(⊂1 2) or 1↓,one element what want type are void set
Can not be different
 
ngn
it's like in that old joke: a man walks into a shop and asks “you don't have any meat?” - “no, here we don't have any fish. the shop that doesn't have any meat is across the street"
whether prototypes are a good or a bad idea - that's a separate question
 
@ngn wrong sets are array with no repetition element
 
ngn
2:41 PM
@RosLuP ok, but in mathematics we consider {1,2} and {2,1} to be the same set
in apl we consider 1 2 and 2 1 to be different vectors
 
example 1 2 3 is array but set too; 1 2 2 3 is array not set
It depends if one use = operator for array or = for set
 
2:56 PM
@ngn NARS does indeed output that for ⎕FMT 1↓,⊂1 2
 
ngn
@dzaima i see, so it's nars. it would be interesting to check if (1↓,⊂1 2) ≡ 1↓,⊂1 3
 
@ngn they are not equal
@RosLuP forget about sets in APL, APL only has ordered arrays. An empty array in APL stores a version of an item it used to have so you'd be able to get info from it - e.g. so here the last line would have something logical to print
 
@ngn it return 0, are array with 0 elements and different types (in what seems to me) so void set in APL would be each element of the set has ≢ = 0
Void a
Void set each element of {x:≢x is zero}
@dzaima Nars has already one symbol (psi) that use with the not operator or others seems the one operate in sets
 
3:15 PM
@RosLuP ah okay, but I'd assume it still takes regular arrays as arguments/outputs arrays
if you'd stop thinking about as arrays as sets, the idea of there not really being a single void set would make sense
(personally i don't really like prototypes though, and they're mostly non-existent in my APL)
though i didn't expect this, hmm
and why is this a thing :|
 
4:09 PM
@dzaima What is the prototype of an object? Our chief architect is leaning towards a deep copy of the object where all variables (recursively) are replaced by their prototypes… but this has many serious issues. That's why Dyalog gives a NONCE ERROR (a.k.a. not implemented yet) for now.
However, for instances of a class, the prototype is a new instance of the class.
 
@Adám personally I'm fine with an error when getting a prototype of non-arrays
 
@dzaima Yeah, it rarely makes sense, except it is annoying that things like {⍵.value}¨ breaks on empty lists of namespaces.
 
@Adám yeah, in that case, no prototypes at all would be better. i don't think there's any good solution - e.g. {'ab'[⍵.x-1]} would fail for a prototype if otherwise ⍵.x is guaranteed to be in 1…2
(though that's applicable to prototype arrays, or just anything, too :|)
 
@dzaima When dealing with arrays of objects, I tend to define EachOf←{⍺←⊢ ⋄ 0∊⍴⍵:⍵ ⋄ ⍺ ⍺⍺¨⍵}
 
i don't think of prototypes as giving "values" to work on but as a temporary display of the structure, so evaluating complex things on them shouldn't be done, but that's kind of hard to do without ^
 
4:23 PM
@dzaima Sometimes maybe J's "fit" operator which provides the fill element to be use would be a better solution.
 
@Adám if there'd be a new built-in to deal with prototypes, imo it should be your EachOf (or a more sophisticated version of it)
 
@dzaima But ¨ isn't the only primitive that could need special treatment for prototypes. What about ⊃ ↑ ⍴ ⍤ / etc?
@dzaima If instead it was a prototype operator %, you'd write something like {'ab'[⍵.x-1]}¨%(x:1)⊢objList
 
@Adám i'd like to have nothing done in the case of no items given though
 
4:38 PM
@dzaima For that, it'd be more general to have an "if" operator , like but where f⍡g is f⍣(g ⍵) so you'd write {'ab'[⍵.x-1]}¨⍡(~0∊⍴)
 
@Adám those imo are fine - and explicitly request data, works just fine, don't see why / would be much of a problem. though i'm not in a position to say much about
 
@dzaima Ah, maybe not / but \:
 
@Adám though the operator may be useful, writing that everywhere imo is a bit too much for a language that's supposed to be good at arrays
 
⍞←¯2\⍬
 
@Adám 0 0
 
4:43 PM
@dzaima is much like ¨ but for rank instead of depth:
⋄ {⎕←⍵}⍤0⊢⍬
 
@Adám
0
 
@Adám I'd classify that under explicitly requesting data - usually i'd expect to depend on anyways, and the generated to be empty for an empty
@Adám ah, yeah, that may be a problem, but as it changes the viewable shape there's not much doable without special-casing
 
@dzaima Btw, notice that more and more system functions have a built-in "EachOf" exactly because of the issue with ¨. E.g. ⎕NDELETE can take a list of files to delete, because if you try ⎕NDELETE¨0⍴⊂'abc' you end up erasing the file \ \ \
 
@Adám again showing why regular ¨ and state-modifying functions don't go well together
 
@dzaima Right, so for consistent results, you really do want to call the function on a prototypical element, but it can be hard to determine what exactly is appropriate as prototype.
@dzaima Yup, one case where :For is better than ¨, as it doesn't run through the body if there are no elements.
 
4:56 PM
@Adám for at least, but auto-generating the prototype is bound to do bad
 
@dzaima nah
 
@Adám well that just explicitly avoids prototypes :|
another idea is to have an "indeterminate" value in empty arrays on which things aren't attempted to be executed
actually that doesn't make much sense
 
@dzaima How would you specify that an array should have indeterminate prototype?
@dzaima Uh, ok.
 
@Adám leads to another idea - have a built-in to "indeterminize" an array if it's empty, making it truly have 0 elements in it, making ¨ do nothing, & 2↑ error, etc
 
@dzaima With the above prototype operator, that'd be %#.
 
5:06 PM
@Adám wouldn't {1+⍵}%#⊢⍬ error though? i said "do nothing" instead of error for ¨
@Adám that'd be a thing to operate on a specific function (also abusing #), whereas my idea would apply to an array and all further operations on it
 
@dzaima Ah, changing the meta-data of the array, kind-of like hashing does now.
@dzaima Yes, I missed that.
 
e.g. if it's , then ⍴{⎕←⍵}¨ {1+⍵}¨ ⌦ 0⍴1 2 3 does nothing and returns 0
my APL pretty much functions as if was applied to every array, so i can't really implement it :p
 
@dzaima ''≡⍥⌦0⍴1 2 3 ?
 
@Adám good question.
 
@dzaima And follow-up question: ⍬≡⌦⍬ ?
 
5:11 PM
@Adám also good question. no idea ¯\_(ツ)_/¯
 
IfNonEmpty←{⍺←⊢ ⋄ 0∊⍴⍵:⍵ ⋄ ⍺ ⍺⍺ ⍵} is much simpler conceptually.
 
5:24 PM
@Adám having ≡⍨⌦⍬ be 0 imo is exactly pointless, so probably 1
@Adám giving 1 would break transitivity, so 0
 
@dzaima So essentially, sets a flag that prevents coercing a value out of the prototype and tells ¨ and etc. to not apply their operands.
@dzaima Hold on, are ^^ and ^^^ not contradictory? Oh, no, they are not.
So "no prototype" is kind-of a special prototype such that ⍬≢⌦⍬ but with the additional effect that ¨ etc. become no-ops.
@dzaima What is ⊃0⍴⌦1 ?
 
@Adám yeah, but depending on the implementation (e.g. if prototypes are a secret regular element) it could be way easier to think of them as removing the idea of a prototype
@Adám on a non-empty thing is a noop, so 0
aactually that's a good question, misunderstood the example
@Adám as array structure modifying functions can change the prototype (or really any operation at all), i don't think the flag should persist
 
5:47 PM
@dzaima Model:
NoType←{0∊⍴⍵:1↓⍵⍪⍨⊂⎕NULL⍴⍨15⍴1 ⋄ ⍵}
Each←{(0∊⍴⍵)∧(⎕NULL⍴⍨15⍴1)≡⊃⍵:⍵ ⋄ ⍺←⊢ ⋄ ⍺ ⍺⍺¨⍵}
 
missing ⋄⍵ at the end of NoType?
 
@dzaima Close call.
 
more side-effect-full model that errors in places it should
 
@dzaima You need (⍴⍵)⍴# rather than 0⍴#
 
@Adám oh yep
 
6:24 PM
@Adám that'd give problems if non-IfNonEmpty-ied functions are run after on the array though, forcing putting it on everything
 

« first day (795 days earlier)      last day (1862 days later) »