« first day (1227 days earlier)      last day (1427 days later) » 

5:29 AM
@dzaima But there's no ambiguity, it being the first line. I don't see how position is any worse than say whitespace or symbols or a keyword.
 
5:59 AM
Well, we have a tendency to put multiple function definitions in a single file. I guess the "first line" way breaks down with it, while starting with a symbol or keyword doesn't.
 
6:14 AM
0
Q: Explicit-ify APL expressions involving trains

BubblerRelated: Clearly parenthesize APL trains Background In the most basic form, APL has two kinds of tokens: arrays and functions. For this challenge, we will use a lowercase letter a-z for an array, and an uppercase letter A-Z for a function. Furthermore, we will assume each character is a token o...

 
@AviF.S. yeah just checking out the video...
 
RGS
6:35 AM
@Adám did you suggest this only because I was looking for a tradfn or because you really think it is a nice experience?
 
@RGS I'm not sure I'd call it "nice", as some of it is a mess, but yeah, for tradfns, and general interest.
@Bubbler Of course, hence reusing the Editor symbol as indicator. But it still doesn't indicate a tradfn per se. Outside scripts, it can be used around dfns too.
 
@Adám Btw, right now I'm looking at bracket indexing. I didn't realize there are actually three modes of indexing - simple, choose, and reach. Are they common to other APLs?
 
@Bubbler No.
 
6:50 AM
@Adám Then I guess other APLs mostly have only the first one?
 
Yes, of course. There are a lot of potential extensions to the language where various parameters need nested arrays. When nested arrays were added, even with functions for nested arrays, very few of these possibilities were exploited.
E.g. nobody thought to add multiple masks to or or allow a nested left-argument to or choosing distribution of ? etc. etc.
 
7:08 AM
Hmm, if we classify that notation as a function, what is its arity?
 
7:50 AM
^ Answer: variadic.
 
@Bubbler Not a function. Though Iverson did experiment with making it normal syntax. Cf. J's :.
 
RGS
8:28 AM
@Adám what parts are a bigger mess?
 
@RGS There's a lot of code duplication, and ancient code, code in strange locations, and weird naming going on.
 
 
1 hour later…
9:47 AM
Given the variable scope and shadowing rules in dfns and dops -- in a dop, can I refer to ⍺⍺ in a local dfn inside the dop I'm writing, or would that dfn also have to be a dop?
It seems likely, the more I think about it.
 
@xpqz That would make the inner dfn into a dop, so you can either make it so and pass it in as operand, {⍺⍺{⍺⍺ ⍵}⍵}, or name it and then refer to it, {aa←⍺⍺ ⋄ {aa ⍵}⍵}.
 
Yeah - was thinking I can capture the derived function like fun←⍺⍺ ⍵ and then call fun inside the dfn?
Or in fact just fun←⍺⍺
 
Yes, just fun←⍺⍺, as fun←⍺⍺ ⍵ will apply the function and put the result in fun.
 
RGS
10:25 AM
@Adám and fixing it would be a terrible pain?
 
@RGS No, I just need to get my act together. I hope to do clean up for 19.0.
 
RGS
11:04 AM
@Adám ah nice, so you are going to take care of that? Dyalog releases one version per year? Roughly?
 
Is 18.X now available?
 
@RGS Yes.
@xpqz No.
 
Den som väntar på något gott väntar aldrig för länge?
 
Nu dröjer det inte så länge.
 
11:33 AM
Is there any sensible way to handle equilateral-triangular grids in APL? I have a task that starts with an equilateral triangle with numeric values at each corner, and progressively divides the triangle into smaller triangles by computing the midpoint of the triangle's side as the average of the numbers at the corners plus a small random increment.
 
12:24 PM
@Adám It's of course not ambiguous, but it's still strange and completely avoidable. (there could also be a bit of bias in my messages due to me hating pretty much anything that depends on newlines)
 
A potential enhancement request for a future version: make the debugger skip non-executable lines automatically -- commented out blocks, e.g. Or am I doing it wrong?
 
12:55 PM
@xpqz Set SKIPLINES.
 
RGS
1:06 PM
Was looking through my notes to find some calculations I did some weeks ago, what I found was disturbing:
APL glyphs have pervaded into my TMN in the form of emojis
 
1:48 PM
Unscientific observation comparing my Python and APL implementations of the Advent of Code problems -- 1 row of APL is worth 20-30 lines of Python, even without particular golfing effort.
 
2:13 PM
@xpqz But how long are your lines? (Heh, APL influence causing you to call lines "rows"?)
 
Not too long:
Day16←{size←⍺⋄Checksum⍣{2|≢⍺} size↑Dragon⍣{(≢⍺)≥size} ⍵}
 
2:29 PM
If I'm producing windows of a vector using a stencil
(f⌺Jm)Y
can I change the default fill element?
 
2:45 PM
@xpqz (≢⍺)≥sizesize≤≢⍺
@xpqz No, but you what are you trying to do?
 
I have a long binary vector. I want to stencil it into groups of three, but the stencil op places a 0 as the first element of the first group, and as the last element of the last group. I'd like the extra elements to be a 1. Not a huge hassle to manually tweak two elements, but just wondered if there was a better way.
More specifically:
 
@xpqz You could simply do ~⊢∘⊂⌺3~vec
 
{1 3 4 6∊⍨2⊥⍵}⌺3⊢ V
But the calculation gives the wrong value at the edges.
 
1 3 4 6∊⍨2⊥¨~⊢∘⊂⌺3~V should be faster too.
@xpqz Better: 0 2 5 7∊⍨2⊥⍉⊢⌺3~V or 0 2 5 7∊⍨2⊥⍤1⊢⌺3~V
 
3:01 PM
Hang on - what does
~⊢∘⊂⌺3~⍵
 
@xpqz Negate, enclose each run of 3, negate.
 
I can just about wrap my head around those. What makes the latter two suggestions 'better'?
 
@xpqz They use entirely to "reshape" the data, avoiding looping and nested arrays. Oh, and then they avoid one negation, of course.
@dzaima Further nice symmetry by adding :
-⍵ ≡ 0-⍵
÷⍵ ≡ 1÷⍵
√⍵ ≡ 2√⍵
 
3:19 PM
@Adám heh. Not nearly as helpful though :p
 
3:47 PM
@user95592 I'm on it!
 
4:24 PM
Please welcome @user95592 (Marshall) of local fame. He's an absolute genius, and you can ask him even the most involved mathematical and high-rank array questions.
 
Hi Marshall.
 
4:41 PM
Hi everyone! So the news this week is that I have now left Dyalog. I've started working on implementing an APL-like language with new symbols and semantics and have plans for another array language as well. More on both later.
6
 
@user95592 So many questions! Is it likely to have its own character set or be like J? Where have you gotten so far? Is this just a fun project or something you want people to use (I guess you left your job for it...)? (Don't bother answering that now.)
 
@user95592 What breaking news! Sounds super duper exciting. Should be on the cover of all the celebrity gossip magazines; it's so recent that Dyalog hasn't even updated the site :p Would also be really interested in hearing more about it!
 
@Wezl There is a working prototype based on ngn/apl, but no documentation. You could look in the examples folder, such as github.com/mlochbaum/BQN2NGN/blob/master/examples/4-life.bqn, to see what it looks like. I'm restarting to do it self-hosted in WebAssembly, and Dyalog probably owns all the BQN2NGN code so I'm leaving it behind.
I don't intend to make either commercial, but I want both of them to be usable (this wasn't a goal for I), and I think the second could be a very big step forward in array programming for actual humans.
 
4:59 PM
@user95592 Darn super curious to parse those examples but have to go now... Also, curious re: choosing ngn vs dzaima (vs abrudz/extended) APL (gnu isn't even in the running, is it?) to base the prototype?
 
@AviF.S. It just turned out to be easier to modify. I actually started with dzaima before finding that ngn's compact source and dynamic features made it easier to work with.
I'm kind of glad I ended up with ngn though because it's a bytecode compiler, so I got to see how compiling APL works. BQN has a context-free grammer, so it was really cool to get to the point where I could separate the identifier resolution from the expression parsing step.
I do want to be transparent about these languages and involve the APL community but I probably won't be online here so much initially just because I am busy implementing them. I expect the discussions will be more useful when there is a serious implementation and some documentation.
 
What does BQN stand for?
 
@user95592 :D it's interesting that you found even my impl as a better starting point than just rewriting from scratch (it's definitely what i would do in a similar situation, a simple APL parser isn't that hard to make for a prototype)
 
It doesn't necessarily stand for anything, but it shares the initial letters of "Big Questions Notation".
 
@user95592 that's understandable. If I had a solution for namespaces containing both arrays and functions (that isn't extremely clunky, and i do want namespaces/maps), i'd definitely switch to some intermediate representation
 
5:10 PM
@dzaima I don't think I saved that much work (I reimplemented the majority of the primitives for one reason or another), but it did let me get something I could use right away. For example, the first thing I did was just to swap out a bunch of symbols.
 
@user95592 that's about what i expected. Makes sense
 
@user95592 Are thunks on the roadmap for either language? :)
 
@voidhawk The plan for BQN is to have a negotiation step where internal formats are decided. Format can include just the array element type, but could include fancier representations like sparse arrays, and also includes representing functions as source code or some kind of IR or a native function. If a piece of code is used a lot its formats could be renegotiated just-in-time as an optimization.
So that more or less covers the use case for thunks.
 
5:28 PM
I'm thinking of creating a new derivative of Dyalog APL, which instead of focusing on backwards compatible extensions, backtracks to fix original sins. I'd separate replicate from reduce (like dzaima/apl) make all functions first-axis oriented, distinguish between ⍳5 and ⍳,5, etc.
Tryalog APL?
 
@user95592 i think for the time being an APL→BQN character mapping (where possible) would be very helpful and not that hard to make/maintain, unless you do have plans to switch the characters around much. searching trough the lb tips is a bit annoying
 
@Adám ÁPL
 
@dzaima I could get started on something like that. A lot of the monad/dyad functions are shuffled around, for example ⥊ is monad , and dyad ⍴.
 
5:45 PM
@Adám I would be very interested in this effort and the changes youd consider
 
@Marshall i'd assume noting args in the APL version would be required either way, especially for ops. But anything works, it'd just be nice to have some starting point, regardless of what's different ahead
 
i also have noticed that theres a few efforts towards a non-backwards compatible, apl "v3" so to speak. It would be interesting to keep the efforts in communication to keep open the possibility of having a more defined specification
i think its something that would provide a lotve benefits over time
i have been helping somebody whos writing an APL implementation, but mostly just writing about the language and giving test targets. it would be useful to consolidate some of the effort (or at least the grammar/syntax) so people can still experiment but we can settle around a few core ideas
 
@cannadayr I have vague plans to work on building a community for people interested in these kinds of "v3" projects. The goals would be to empower people to build their own implementations or contribute (ideas or code) to other implementations, and share knowledge about APL design that isn't so widely known now.
 
im very interested if you want to start a repo or mailing list or wiki or something to start
it touches a lotve ideas ive been mulling over and participating with
 
I was thinking to start with a chat forum like the APL Orchard.
I'm kind of torn between spending time initially implementing or discussing.
 
5:57 PM
im not necessarily interested in splitting the community (its small enough as is!), but there is definitely an opening for different types of communication (email, documents etc)
yea we should talk cannadayr at gmail dot com
 
If it turns out pretty much everyone here is interested in this kind of discussion then I guess there's not really anything wrong with holding it here. It is a hard forum to get into for outsiders though.
 
On the other hand, that also keeps the noise level way low.
 
@Marshall Focusing on implementing definitely makes sense starting out (unless there are things you want opinions on, in which case discussing is obviously good). I'll definitely be exploring it a bit, so you can expect some discussion from me :p
 
[1 sec work meeting]
 
I think a lot of us here are interested in such, and if nothing else, then to be able to observe such discussions progressing.
 
6:05 PM
@dzaima Glad you're on board! I'm hoping to implement as much of the language in itself as possible (the entire compiler, and most of the runtime), so that it will be fast to change the implementation as my ideas about the design shift around. We did discuss it some as part of a broader discussion about new APL ideas in a group at Dyalog.
 
@cannadayr I think keeping discussion here would be good. I don't think it's worth trying to encapsulate other types of communication in other forms, for pretty much everything else everyone will have their own preferences.
 
reasonable. i just meant something longer term (like a repo or a wiki) that we can store things weve come to agreement on
 
@cannadayr There probably won't be much agreement (or at least not enough to be notable). :p
 
might be a little early to talk about this, but its relevant to the discussion, but the engineer who wrote this blog post:
https://medium.com/@gordonguthrie/the-beam-needs-an-apl-y-language-6c5c998ba6d
has started work on an implementation:
https://github.com/gordonguthrie/pometo

that ive been emailing back and forth w/ him and doing (minor) testing.
 
@cannadayr The APL Wiki helps in this role a little. Obviously you can't say "we all agree this is great" on the wiki, but you can say what advantages it has and how it compares to other approaches. All that's left is to tell someone it's generally considered the way to go when you link to the page.
 
6:16 PM
i think it would be a good opportunity to attempt to guide his implementation (he comes from an erlang/BEAM background not an APL background).
and im far too much of a novice w/ apl to speak definitively about apl-related stuff
but like, hes qualified to write production-grade languages on the BEAM, and is devoting a lotve time to it atm, so its a rare opportunity to maybe get something very useful built
i was thinking that a complimentary implementation would target the data plane (vs the control plane that BEAM represents so nicely)
leveraging the BEAM gives a lotve functionality that would otherwise be impossible
(not impossible but far too much work to be feasible)
for example, one thing i was considering was a daemon that spoke eetf natively where you could offload large operations to
 
Yeah, I agree that this is a good place where newer designers could come in and say "hey, the ISO standard is 35 years out of date and we have found some better ideas now".
I don't want to push anyone towards some kind of "consensus" APL, but communication about APL has degraded so that a lot of good ideas that new implementors would choose to pick up on their own just aren't known.
For example, I think Raze (aplwiki.com/wiki/Raze) should pretty much be mandatory in a new APL, but it's rare.
 
6:40 PM
i think a few things that every1 has questions about would be useful
- current problems with APL that can't be fixed without breaking backwards compatability
- advances from J or K that haven't/can't be included in APL without significant re-working
- syntax, grammar, array representations
- core operators (⍤ for example)
like, even "what would apl v3 even look like" is something I think about from time to time
 
my initial thoughts on BQM: strands are more annoying to type but much better pretty much everywhere else (i still instinctively add ⊢/parens ._.); ↩ - finally a good character for that (never occurred to me that other.. arrows.... might be good for that), so much so i might want to implement it; ´ is the insertion version, enclosing the inputs for vector arguments, making it pretty much useless to me; ∘/⊸/⟜ are very nice (and very much expected with a symbol remapping); hard to say much about other symbol changes but what i've seen seems reasonably logical (no {𝕨‿𝕩} though?)
 
@dzaima Yes, you have to write ∾○< or ≍○< for {𝕨‿𝕩}. I'm kind of conflicted about that; maybe if I had a good symbol for it I would add it.
⊸/⟜ are extremely magical and make tacit programming like 20% easier.
Reduction is one of the really big issues with BQN and I guess array nesting in general. It's really valuable to make it work on higher-rank arrays, but then reducing a vector gives you a scalar. For non-nested arrays this isn't a problem obviously; floating arrays hack around it but fail if the result isn't a simple scalar.
In Language Number 2 (it's called Iridescence) I pretty much discarded reduction in favor of application with multiple arguments. But this doesn't work well when 2-argument functions are privileged.
 
7:03 PM
I'm sad to see Marshall leave us at Dyalog, but hey, maybe this is what was needed to give all the good things from APL a fighting chance. Anyway, have a good weekend, everybody, and as always, keep the rank high!
 
@Marshall True. i did consider making a separate primitive for sane vector reduction, but for my use-cases special-casing regular / was good enough. But ignoring vectors, i do prefer insertion reduction.
 
 
2 hours later…
ngn
8:38 PM
@Marshall are you going to optimize your new language for performance?
 
@ngn Is there another reason to implement a self-hosted compiler in WebAssembly?
 
ngn
@Marshall the obvious choice is c, not wasm
 
The main goal of the implementation is to do as much as possible in BQN itself. I would say performance is second.
@ngn I plan on doing machine code backends as well, but wasm is easier and portable.
 
ngn
@Marshall some c compilers can produce wasm, i think.. it was discussed in the k tree but i never became interested in it
 
@ngn Currently I'm writing the binary version by hand or with the BQN prototype so I can understand the target language. I haven't gotten too far and might get tired of it but it's all right so far.
 
ngn
8:43 PM
@Marshall regarding bytecode: bear in mind that was my first attempt at implementing an apl-like language. the bytecode there is a mix of ints and js function objects (i.e. pointers to functions, in c-speak). i wouldn't do it that way if i were to start again.
ngn/k is a much more successful attempt (but, ofc you should know some k to understand the bytecode compiler/vm)
 
@dzaima Is this the kind of thing you were after? github.com/mlochbaum/BQN/blob/master/FromDyalog.md
Starting to add the README at github.com/mlochbaum/BQN...
 
9:00 PM
@Marshall That's a bit more useful than what i thought of. No operators yet it seems though
 
@dzaima Working on those. It's a little harder since there are more operand/argument combinations and they tend to scramble things around a lot more. For the ones that don't have an obvious Dyalog equivalent it's probably best to just learn them from scratch.
But I will add all cases to the README, of course.
 
@Marshall do you think It will be good for golfing purposes (as short or usually shorter... or something like that compared to APL)?
@Wezl Maybe I'll just try it out...
 
@Marshall For ops i'd just make multiple rows (or in your case, columns) per each, A⊸g → A∘g, f⊸g → g⍨∘f⍨ etc.
 
@Wezl Probably a little shorter than APL, unless it's missing one of the more esoteric APL operators.
 
ngn
@Marshall you should fit it into 256 codepoints or else it's no good for golfing
 
9:11 PM
@Marshall More important right now would be adding it to TIO, and encourageing people to try it @ngn yes!
 
@dzaima Sure, but every case of ⊸ is covered by {(𝔽𝕨)𝔾𝕩}˜˜. Easier to learn from scratch.
@ngn Have to do that anyway because working with UTF-8 in wasm sounds like a really bad idea.
 
@Marshall my original question was more about transitioning from APL, so i'd know what to do in-place of, say, , without having to go trough all the docs. It's of course better for learning, but not for quickly trying out
@Wezl 1) there's no proper implementation; 2) Dennis, the maintainer of TIO, hasn't been working on TIO much
 
@dzaima Ok I amend that to "adding it to TIO would be convenient in the future", which is pretty obvious
 
@dzaima I see. My inclination with compositions specifically is to say just learn the six composition operators ˜∘○⌾⊸⟜ and forget about any old systems you have used, but I guess it makes sense to have a big table of Dyalog operator -> use instead associations.
Since I replace a lot of the other operators with functions and that's not obvious.
 
@Marshall I guess that'd work too, with a mention of them all for search results. A rough mapping would be nice is all
 
9:31 PM
{⍬∇⍬} chuckles evilly while crashing browsers and consoles, (⍬‿⍬) stares blankly onwards with its contents of nothing and nested nothing :)
 
@Wezl (I may remove ⍬ since you can just write ⟨⟩; it's retained from ngn)
 
@Marshall well it works elsewhere with , instead of ‿ , and you could just use 0s
 
9:50 PM
@Marshall I noticed in the bio that you started in the family with J. I've hardly picked up any of it yet, but I did notice from your first example 'rho-iota' that to make:
0 1 .. 4
5 6 ... 9
... ... ...
20 21 ... 24
You did the equivalent of 5 5 ⍴ ⍳ 25. Whereas if ⍳ worked like i. in J, one would need only do ⍳ 5 5. Of course, this does something different in Dyalog (don't know about other dialects). Curious which extension of you're going with; it seems like you're following Dyalog/APL, but perhaps you just hadn't decided?
Also, am I missing the part of the conversation where you explained why you're remapping all the characters? The file is even called rho-iota, despite using different characters...
@Adám Two things:
First, to clarify my hesitation re: being a general solution. I meant general re: classifying all types, rather than just numbers. Not general re: working on any array. Sorry for the confusion!
Secondly, I hadn't noticed it applied the function recursively! I've never seen such a thing!!
Unfortunately, I can't for the life of me figure out how the devil works. How do I figure out what this 0⍴... is holding? & give 0. But ⊃ makes a structure pop out of nowhere! Yet 2⊃, 3⊃,... render an error. So I'm having trouble figuring out how it works and what's happening...
 
@AviF.S. 0-item arrays "contain" a prototype element that describes what elements would look like if there were any. Most of the time that doesn't show up anywhere, but allows you to access it. It's the reason ⍬≢''
 
@dzaima Ah thanks, I figured they just had a type, which is why it worked (char vs num), but I didn't realize it also preserved structure!
But then what exactly does it store?
It stores the structure with a 0 wherever there's a number and a ' ' wherever there's a character?
 
10:05 PM
@AviF.S. Exactly.
 
@dzaima What other data types are stored uniquely?
Eg, complex numbers seem to be stored as 0s also...
 
@AviF.S. i think those are the only ones. Note that namespaces don't have prototypes, so ⊃0⍴⎕NS⍬ errors
 
I'm trying out each of the different ⎕DR types, since that's all I know about Dyalog internal types...
 
@AviF.S. from the users view of the language, all numbers are complex numbers.
 
But I can't figure ⎕DR out to even test it. Eg, 1 bit boolean should be 11, yet ⎕DR 1=2 returns 83, a regular 8 bits signed integer
@dzaima Very interesting, thanks!
@dzaima Of course! Not at all saying it doesn't make perfect sense. Just an example of something it occurred to me to try, when brainstorming other potential types
 
10:10 PM
@AviF.S. it probably doesn't think it's worth storing a single number as a bit-boolean. 1=2 2 works though
 
@dzaima Terribly confused... Why should that be any different?
Evidently, these also aren't worthy of booleans:
      ⎕DR¨ 1 2 3=1 2 4
83 83 83
      ⎕DR 1 2 3≡1 2 4
83
 
@AviF.S. again, there you're testing a scalar number, and scalar numbers, for one reason or another (performance problems, implementation complication, etc), were decided to never be bit-booleans.
 
Back to the original question, though still curious about ⎕DR, looks like even boolean booleans, are still not boolean enough:
      0=⊃0⍴⊂1 (2 'h' (2 'e' 3) 'y' 4) 5 '!' (0=3 5)
┌─┬───────────────┬─┬─┬───┐
│1│┌─┬─┬─────┬─┬─┐│1│0│1 1│
│ ││1│0│1 0 1│0│1││ │ │   │
│ │└─┴─┴─────┴─┴─┘│ │ │   │
└─┴───────────────┴─┴─┴───┘
@dzaima Understood, thanks! I didn't realize the whole vector was one bit boolean type. I thought every boolean within it was ⎕DR 11!
 
@AviF.S. that's a scalar boolean! so they do exist, but = & choose to not use them
 
@dzaima That makes it even weirder, doesn't it?
      ⎕DR¨⊃0⍴⊂0 0
83 83
So here it can't just not be a scalar; it can't be a simple scalar vector!
 
10:25 PM
@AviF.S. seems ¨ prefers 8-bit ints over keeping scalar bit booleans too
 
Well I was going off:
      ⎕DR¨⊃0⍴⊂0 (0 0)
11 11
But maybe:
      ⎕DR¨¨⊃0⍴⊂0 (0 0)
┌──┬─────┐
│11│83 83│
└──┴─────┘
Ruins my argument? I can't even tell left from right anymore...
 
@AviF.S. there, the argument to ¨ was a pointer vector, for which bothering with any conversion is gonna just add time converting. Getting items from a bit-boolean array must do some conversion (you can't have a pointer to a specific bit of an integer, even less so an Dyalog-APL-array pointer), so the implementation had to pick some wrapper type, and someone decided 8-bit ints over a bit-boolean array
 
@dzaima Shoot, maybe I've misunderstood what it means to be a bit-boolean...
I thought it meant just storing booleans with one bit, but are you saying that it's a vector thing, so that 1 0 1 0 is stored as (boolean: 18)
I'm figuring this from 'you can't have a pointer to a specific bit of an integer', but I may very well have misinterpreted what you mean...
 
10:42 PM
@AviF.S. 11=⎕DR is indeed a thing about the whole array. Storing bit-booleans outside of arrays doesn't make any sense, as the overhead would be much more than 1 bit, making it completely pointless.
anyways gtg
 
@dzaima Makes a lot of sense! Thanks very much :)
 
@AviF.S. "you can't have a pointer to a specific bit of a byte in memory" might have been clearer
 
Whoops, I don't think I'm normally that dull! I meant to ask if 1 0 0 1 0 is stored as (boolean: 18)...
@dzaima No, you were perfectly clear and it looks like I understood correctly! Just wanted to make sure I did interpret it right. More due to my lack of knowledge in the subject than any lack of clarity in your explanation!
@dzaima Anyway, so the original question was about trying to figure out the types stored in ⊃0⍴... And clearly even boolean vectors are still stored individually as numbers:
      0=⊃0⍴⊂1 2 3 (123=1 2 3)
┌─┬─┬─┬─────┐
│1│1│1│1 1 1│
└─┴─┴─┴─────┘
 
ngn
11:08 PM
@AviF.S. "rho-iota" is my fault
 
@ngn But 5 5⍴⍳25 works just fine in ngn?
 
ngn
@AviF.S. yes
 
@AviF.S. Examples 0 to 7 are ngn's. I just translated them, except for the second Game of Life function. I did choose the Dyalog version of Index Generator deliberately, because I think it fits better with the overall language design, but I also think J's is useful more often and might switch to it.
 
ngn
@AviF.S. i could have named it like "square-of-integers", without relying on apl's mapping of greek letters to operations
 
Note also that Index Generator is a little more sane in based array theory where you distinguish between a number and its enclose. The result is an array, and its contents have the same structure as the argument: a plain number, or a vector (enclosed scalar arguments aren't allowed).
 

« first day (1227 days earlier)      last day (1427 days later) »