« first day (869 days earlier)      last day (1778 days later) » 

10:16 PM
⎕←⍴⍬
 
@TessellatingHeckler
0
 
⎕←⍴'WORD'[⍬]
 
@TessellatingHeckler
0
 
⎕←⍬≡'WORD'[⍬]
 
@TessellatingHeckler
0
 
10:18 PM
How do they not match? What else can be shape 0?
 
Mar 31 at 14:36, by 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"
seriously speaking, 'WORD'[⍬] is an empty array of characters, you can test that by doing ⊃'WORD'[⍬], which gives a space - the "default character"
is an empty array of numbers, so ⊃⍬ is 0
I personally don't like the behavior though
 
⊃⍬ being .. unbox? disclose? first?
 
@TessellatingHeckler monadic is first. It'll pick the first element of the array
 
@TessellatingHeckler the first item of the empty array, here that being the prototype. You can think of empty arrays as secretly having a single element in them, inaccessible by many things.
 
:|
ok, I guess that makes some behaviour align somewhere else
so, thanks for explaining :)
empty character array answers my question of how they don't match, I didn't realise that could be a thing, since I've only heard of Zilde
 
10:28 PM
@TessellatingHeckler you can have empty arrays of arbitrary things - 0⍴⊂thing
 
who says APL doesn't have a type system
 
@TessellatingHeckler the usual reasoning is that it gives some default cases, i.e. if you've got an array of equal length arrays, if the outer arrays length is 0 it might still be good to know what would've been the size of the inner arrays. imo it just brings way too much unnecessary complexity
⎕← ⊃ 0⍴ ⊂'hello' (0 (0 (0 2)))
 
@dzaima
┌─────┬───────────┐
│     │┌─┬───────┐│
│     ││0│┌─┬───┐││
│     ││ ││0│0 0│││
│     ││ │└─┴───┘││
│     │└─┴───────┘│
└─────┴───────────┘
 
@TessellatingHeckler i'd think what's usually said is that APL doesn't have a static type system, as APL definitely has an overly annoying dynamic type system (well, as far as the distinction between variables of functions, arrays & operators is concerned, which is none, until you're just away from executing a line and everything goes wrong)
 
10:34 PM
⎕← 0⍴ ⊂'hello' (0 (0 (0 2)))
 
@TessellatingHeckler
 
oh; in TryAPL that renders a blank space the height of the invisible data
how is it picking the 0 0 0 2 out after reshaping it so they don't exist anymore
 
@TessellatingHeckler there is an element in the array, it just isn't counted in its shape, tally, etc.
⎕← ⊃ {⎕←1 2,⍵,'!'}¨ 0⍴⊂'¨ also sees the prototype, which can easily break non-functional code very often'(0(0 2 3))
 
@dzaima
┌─┬─┬────────────────────────────────────────────────────────────────────────────────┬─────────┬─┐
│1│2│                                                                                │┌─┬─────┐│!│
│ │ │                                                                                ││0│0 0 0││ │
│ │ │                                                                                │└─┴─────┘│ │
└─┴─┴────────────────────────────────────────────────────────────────────────────────┴─────────┴─┘
 
"WELL WHAT CHANCE DOES THAT GIVE ME?" - Brian
⎕←⊃0⍴⊂'AAA'
 
10:44 PM
@TessellatingHeckler
 
that neither gives a space, nor 'AAA'
so it's not as simple as "the thing zero-reshaped is the prototype of the empty array returned"
 
@TessellatingHeckler that does give 3 spaces, but it's hard to see:
⎕← ⎕UCS ⊃0⍴⊂'AAA'
 
@dzaima
32 32 32
 
oh that's three spaces; I did space match
 
@TessellatingHeckler god that's a confusing sentence, but that definition should include that numbers are converted to 0s and chars to spaces (and other types result in nonce errors:)
⎕← ⊃0⍴⊂⎕NS⍬
 
10:48 PM
@dzaima
NONCE ERROR
 
@dzaima sorry, can't easily type APL characters; ' '≡
what's NONCE in this context?
can't be cryptographic "number used once"
 
@dzaima TIL. Never got that error before
 
@TessellatingHeckler search nonce here, can't figure out how to link stuff from there ಠ_ಠ
@J.Sallé I didn't either before Adám let me know
i guess copying from the network usage log works :|
 
NONCE has a meaning in the UK, and it's not polite; I was at least expecting it to stand for something technical
it just means "not implemented"; I hit it a lot when typing random stuff in not knowing what I'm doing
 

« first day (869 days earlier)      last day (1778 days later) »