« first day (1492 days earlier)      last day (1163 days later) » 

4:25 AM
<ldbeth> does anyone have aplweb workspace converted to atf?
 
 
3 hours later…
7:19 AM
ldbeth: What is "aplweb"?
 
 
1 hour later…
8:33 AM
funniest thing I've read in a while
 
8:44 AM
<moon-child> originally from john earnest @ beyondloom.com/blog/denial.html
 
9:12 AM
Oh it's the creator of oK
no wonder
 
9:35 AM
is there a way to use with two parameters?
I can think of ({function}/⍣n)(⍺ ⍵)
 
@Razetime You mean until stable or at most n times?
 
at most n times
I want to modify both ⍺ and ⍵
 
@Razetime At most, but stop early if…?
 
loop exactly n times, modifying ⍺ and ⍵
 
Why not just take ⍺ ⍵ as a vector argument and let the function return a vector result?
 
9:38 AM
yeah that's what I've put up there
 
No, a reduction will return a scalar, so you'd need (⊃{function}/)⍣n
 
scalar meaning a boxed array, right?
 
Yes. But I think it'd be much simpler to use {(x y)←⍵ ⋄ function …}⍣n⊢⍺ ⍵
 
yeah might be
I'll see which is shorter
 
Depending on how many times you use the arguments, you may be able to get away with not even doing the assignment,
Also remember you can do stuff like {y function⊃x y←⍵}
 
9:41 AM
lol, never done that
But I'll keep it in mind
 
 
1 hour later…
10:50 AM
@Adám so I tried this: 108 bytes: {'@'@(⊂9 11○⊃⍵)⊢3⊃⍵}{p s g←⍵⋄(p+s)(s←s×0j1ׯ1 1['_#'⍳g[x]])(('_#'~g[x])@(x←⊂9 11○p)⊢g)}⍣⎕⊢9J9 0J1(17 17⍴'_')
 
Ugh.
 
turned out way longer than I thought
 
What is it supposed to do?
 
Keeps track of position, step and the grid basically
Decided to use bigboi imaginary numbers
 
Does that actually help with anything? Doesn't look like you use them for fancy rotations or anything.
 
10:53 AM
I do use them for rotations s×0j1ׯ1 1['_#'⍳g[x]]
 
Ah, I see.
 
hm that can be shortened
 
Maybe if you store the entire grid, @(x←⊂9 11○p)⊢g can become @(grid=p⍨)g
 
store the entire grid, meaning?
the coordinates?
 
Yes, as a matrix of complex numbers.
 
10:57 AM
ah
 
∘.{⍺+0j1×⍵}⍨⍳17
 
I still need to store x somewhere
 
Ah, right. Oh, well.
 
(or omit its usage somehow)
 
It'd be nice if one could index a matrix with complex numbers…
 
10:58 AM
is that possible in extended?
 
No.
And I think it'd clash with ⎕IO←0
 
11:14 AM
:(
posted it
what if
tradfn returning multiple values used with ⍣
 
RGS
It just struck me that APL uses arrows pointing in all directions 😂 ←→↓↑
 
<moon-child> and tacks ⊢⊣⊤⊥
 
RGS
⊃⊂∩∪ and round things
 
<moon-child> no sideways versions of ⍒⍋ sadly
 
11:33 AM
<>∨∧
 
<moon-child> <>
 
moon-child: how many characters were there in my msg?
@lambda Hi there. Interested in APL?
 
@RGS we need diagonal ones
@Adám APL, 108 bytes: {('@','#'/⍨≢2⊃⍵)@(9 11∘○¨∊⍵[0 2])⊢17 17⍴'_'}{p s g←⍵⋄(p+s)(s←s×0j1ׯ1 1[p∊g])(⍎1⌽'pg',',~'[p∊g])}⍣⎕⊢8J8 0J1⍬
generated the imaginary numbers first and then replaced them
somehow, the same length
 
 
2 hours later…
RGS
1:45 PM
@Razetime what would they do? ⍥
 
Take/drop diagonally extending along the diagonal maybe
 
@Razetime ↖↙ are on the BQN keyboard. I was planning to use them for load/store in the implementation code but I probably won't end up doing that. Maybe in a BQN skin for Singeli.
 
@Marshall ok I have to obey my curiosity and ask what a "BQN skin for Singeli" could possibly entail :)
 
@ab5tract Hopefully just a bunch of lines like operator × = mul.
Singeli in case you missed it.
 
2:01 PM
@Marshall that was the missing piece :)
all i was getting from duckduckgo was results for a specific genre of electronic music
 
@ab5tract With Singeli, maybe your language can be as fast as that music.
 
@RGS Change program direction muhahahah
I am a sucker for 2D languages
 
RGS
@Razetime Never fiddled with any, should be interesting
 
@RGS befunge is the grandmother of them all, super interesting!
 
RGS
But is befunge the grandmother that takes the kids to play and runs after them? Or did she not age well?
 
2:09 PM
befunge is still pretty great
 
befunge is the grandmother in sunglasses and wearing an n-dimensional spec that one could mistake for a psychedelic tie die
*tie dye
@Adám, is there a recording of the livestream from the 22nd up yet?
 
RGS
2:26 PM
When doing something like name ⊢← value what do you call this modified assignment? Can I call it a no-op modified assignment?
 
@RGS what's the use case of that, ooc?
 
If you want to set the value of a variable defined outside your innermost scope,
@RGS In my head I say ← = "gets" and ⊢← = "set"
 
<kritixilithos> modified right tack assignment? modified identity assignment? what do you call x+←y?
 
@RGS updating assignment
 
Modify? Mutate?
 
2:42 PM
@xpqz ah, I see. thanks for explaining. I've been studying older APL texts and that's obviously not something one needed to worry about in the age of tradfns (not that modified assignment of any kind existed back then either)
 
2:55 PM
@ab5tract From the 23rd, I presume. They are always available on Twitch for 2 weeks and on YouTube forever.
2
@RGS I say "rightack-gets"
 
@Adám ah, now I have subscribed to your channel :)
I am used to seeing your video output arrive on the main dyalog channel but it makes sense that the twitch streams would land elsewhere
 
@RGS APLcart calls it "Update"
 
@Adám that doesn't sound very official or explanatory :)
 
RGS
3:11 PM
I was looking for something more like "update" because I am using it explicitly in that nested scoping context
 
RGS
3:52 PM
If I copied several lines of text from somewhere and want to create a character array with it, what is the easiest way to do so?
In particular, what if I'm working with jupyter notebooks?
 
@RGS What do you mean by copy?
Crtl-C Ctrl-V?
 
RGS
@RikedyP Yes.
I CTRL-C'd some text that I want to use as character data in APL
 
and you want a single char array with embedded new lines?
 
RGS
I don't really care about what it ends up being, I just want the simplest thing that works :P
And, ideally, something that works in jupyter notebooks.
 
And you'd prefer to paste all at once than have to do one at a time? And you want the end user of the notebook to be able to paste in?
 
RGS
3:56 PM
@RikedyP I do not understand the questions.
with )ed - text I can open an editor window and paste several lines of text
and now I have a character matrix with some text I copied.
 
@RGS Well if it's static text then pre-loading it yourself (by copy pasting each line and doing string,←'next line'
 
RGS
But I can't do )ed -text in a jupyter notebook.
@RikedyP What if I just copied 100 lines of text? Am I seriously going to type ,← 100 times?
 
@RGS You can in Windows if you go to the systray and click Show Session
:P
@RGS I'm with you, I'm trying to think of something
 
RGS
not helpful xD
@RikedyP the best I could think of was to paste it in a file and open it
 
@RGS That is likely the best thing yeah
 
RGS
3:58 PM
But compared to Python's triple-quoted strings I feel like crying slightly :'(
 
@RGS Wait for Array Notation to be properly supported
 
RGS
true
 
Other than that - given that you are now to spearhead jupyter kernel development, could be a thing you make yourself
 
RGS
@RikedyP But Ctrl-V is something that also doens't work in the interpreter
 
@RGS No but it does work in Jupyter notebooks
@RGS I wonder if it's possible for the code to access the contents of the cells?
 
RGS
4:00 PM
@RikedyP Self-referentially?
 
@RGS It's certainly not an elegant solution
 
RGS
Like I'd paste the text in a cell and then write code that fiddles with it?
 
@RGS You can execute JS using ]HTML I think
@RGS It's an idea - not necessarily a good one
 
RGS
Oh boi, we are going down roads I don't want/need to go down to
 
BAA open session right now. Passcode: ×/1920 12 17
 
RGS
4:01 PM
I'll just stick to pasting in a file
 
@RGS good plan
 
RGS
Thanks.
 
@Adám thanks, nearly forgot!
 
RGS
@rak1507 I think you forgot it, no? You should say "thanks, nearly missed it!"
 
true
 
RGS
4:10 PM
I am sorry I am so annoying :)
 
4:44 PM
@RGS I usually do "\n""' '" in a text editor to convert multiline text to APL
 
4:59 PM
Where can I find docs for HttpCommand? Is there something beyond the HttpCommand.Documentation command?
 
easiest way to display a caught error?
 
@xpqz At present, HttpCommand.Documentation is all that's available. We're creating a new repository for HttpCommand for the next release of Dyalog and it will have more extensive documentation
 
@Adám APLcart ⎕DMX TIO links to ⎕XSI
 
@Brian do you know if it can reuse connections (keep-alive)?
 
RGS
@dzaima Also a neat trick, ty
 
5:11 PM
@xpqz At present it does not. But I'm working on a substantial upgrade to HttpCommand that will have a keep-alive option, allow posting response data to file (for things like capturing a twitter stream), better cookie support, and WebSocket support. This will also be released with the next version of Dyalog, but it's backwards compatible to at least v17.0 of Dyalog.
 
@Brian that sounds great. Http/2, aswell?
@MortenKromberg anecdotally, 18.1 is much friendlier on the CPU than 18.0 under Big Sur.
 
@xpqz I expect we'll subsequently add HTTP/2 support, probably later this year
 
5:32 PM
@Adám do you have that spreadsheet code anywhere? was playing around with something myself just now
 
6:07 PM
this is interesting, does it apply to APL or Dyalog?
"nobody's going to build one as just a labor of love" People do build their own APLs, but they're not really competing
 
the question about consulting is interesting as well as afaik dyalog does do consulting
 
(I have no knowledge of business, so forgive my ignorance)
 
@Wezl Legend.
 
and most people who make APL implementations are not trying to do it commercially, if someone made a more modern open source free APL implementation I can't see any reason why companies would stick with dyalog
 
ngn
@xpqz +1
 
6:12 PM
other than maybe the consulting aspect, and legacy code that couldn't necessarily be ported
 
@ngn shouldn't that be ++ in this case?
 
@xpqz ?
 
@rak1507 "code that couldn't necessarily be ported" is why pretty much none would switch
 
ngn
@xpqz k&r c? right :P
 
@dzaima wonder how hard it would be to make it backwards compatible with dyalog... and then there might be copyright issues maybe
 
6:14 PM
@Wezl Brian Kernighan, in the video you posted. Bit of an all-round legend.
i'm sure he must have written his own APL at some stage.
 
ah
 
@rak1507 you'd probably run into a couple thousand tiny things breaking in most programs. And you'd end up with a language that has all of the warts as Dyalog, so not much gained
 
yeah true
 
@xpqz Good to hear. The main problem that we are aware of is that 18.0 embeds an old version of CEF (Chromium Embedded Framework), which enters a CPU loop after a while on Big Sur. We haven't found out why, since the problem is solved by an upgrade.
 
ngn
@rak1507 languages are generally not copyrightable, only impls are. but you can't realistically compete with dyalog on compatibility. their whole business model is based on a stable equilibrium (trying to avoid the word "lock-in") with a particular set of customers. neither side has enough incentive to disturb it by pushing the language forward or switching to a different (even if still compatible) impl.
 
6:24 PM
@rak1507 One of the "problems" with APL consulting is that you usually need to combine APL programming knowledge with domain knowledge in some field like statistics or finance to be really attractive to the companies that use APL successfully.
@rak1507 it will amuse you to know that Dyadic Systems Ltd was a team of consultants, who decided to write their own APL interpreter for small computers because they thought their lucrative consulting business would die with the mainframe.
 
@ngn Maybe I'm wrong but I can't see how without the language evolving companies over time wouldn't switch to alternative languages where with a single package manager command you have access to infinitely more powerful things than APL can ever provide
 
ngn
@rak1507 fear of change
 
@rak1507 switching and rewriting code (or even just verifying that things don't break) costs way more than doing approximately nothing. Dyalog isn't not evolving too, and package managers aren't exclusive to non-Dyalog languages either.
 
@ngn most of the companies that successfully use APL thrive on change. in the markets that they serve with apl. but they have better things to do with their time than play with technology. Most of them feel that Dyalog is changing its technology too fast for their comfort.
 
I would imagine that over time doing nothing will lead to other companies overtaking them but I know nothing about how things work so I'm probably completely wrong lol
 
6:29 PM
@ngn they use computers to SOLVE problems :D
 
@rak1507 doing nothing pointless, i.e. only necessary/requested things
 
@dzaima Why is it pointless to rewrite legacy code? Who wants APL to end up like COBOL
 
@ngn in order to switch technology or refactor, there needs to be very significant return on investment.
 
@rak1507 presumably the same reason COBOL is still around, whatever that may be
if it ain't broke, don't fix it, or whatever
 
ngn
@MortenKromberg yeah, that's another way of saying it
 
6:31 PM
People might switch from APL to other languages because of better tooling and libraries. But to get a marginally nicer or more powerful array language? That would be insanity.
 
ngn
insanity happens
 
@ngn but you can't necessarily rely on it
(nor can you rely on it not happening, but whatever)
 
It's a shame to me that one of the things people say is good about APL, the ability to rewrite and refactor code, never seems to be true in actual production code. Maybe it is on a smaller scale
 
Sure, but don't bet your savings on it. If you want to beat Dyalog with a new language, you need to go after new business. Aiming for our clients who already have millions of lines of old APL code is not a good way to get rich quick, IMHO.
 
ngn
@dzaima I can't rely on languages other than apl to do vector processing and have nicer tooling?
 
6:34 PM
@rak1507 who's said APL is good for rewriting and refactoring code? afaik, it's quite the opposite
 
@dzaima I'm sure I've heard aaron hsu and others say that
 
@rak1507 One of our biggest client went from our 32-bit version to 64 bit one year, and from Classic (single byte chars) to Unicode the next. Now they are moving to the cloud, which involves massive refactoring. People refactor code all the time, but there has to be a real benefit.
 
^ note that those are concrete differences with expectable results. Switching to a different language is like doing a hundred changes like that, all at once
@rak1507 At least with my reference point (Java), APL absolutely sucks at refactorability. (though Java is like the best at that, so idk)
anecdotally, I ported all of dzaima/BQN to C# in a couple days because why not
 
@dzaima i'd dare to disagree, a bit
for me, the Java object zoo paired together with the amazing verbosity of it makes most java projects unmaintainable for me
 
@dzaima from the few short things I've done in APL at least in the function composition oriented style I prefer in all programming, it's been pretty simple to replace one function without any impact on anything else
 
6:39 PM
nobody writes OO in the correct, i.e. smalltalk style
 
@rak1507 Most big APL users are companies who focus on the problems they are trying to solve, rather than technology - this is often integral to the choice of APL. They think of their APL as executable mathematical notation, which often expresses legal requirements, tax codes, etc. Once you have that stuff working and tested, you do NOT mess with it.
 
ngn
@dzaima finally. a valid argument for static typing in apl :)
 
@KamilaSzewczyk I don't know how most do it, but at least I find my code to be quite refactorable and nice
 
@MortenKromberg That does (unfortunately) make sense
 
for me, C/C++ projects seem the most maintainable
simple, procedural code, which occasionally makes use of features that somewhat reduce the verbosity of the code.
but i'll never understand why C++ committee decided to include inverse modified cylindrical Bessel function in their standard library.
 
6:43 PM
@rak1507 I know we are suspected by many of you of crafty strategies to cause "vendor lock in", but in reality our conservative approach to language design is mostly dictated by the people who actually use APL in anger. But oops, I am wanted in the kitchen - back tomorrow!
 
@rak1507 you can of course replace a function with another one that does approximately the same thing, but that's about it
 
@MortenKromberg I don't think that personally
 
@rak1507 Here's a question for y'all to ponder: WHY has the Java community invested so heavily in refactoring tooling, while the APL community hasn't seen it as a priority? Yes, you can criticise APL for this and see it as a weakness, but you can also wonder why they haven't felt more motivated, after 50 years.

(I'm not saying we don't need more tools, we do)
 
@MortenKromberg because most Java code sucks (and it's got a couple more magnitudes of users, so its tools are a couple magnitudes better)
 
ngn
because they can. java has static typing. apl is too dynamic for automatic refactoring.
 
6:47 PM
^ well, and that. That's the obvious answer
APL could still have some tooling, but there's still none
 
ngn
(to be clear: i'm not advocating adding static typing to apl)
 
@ngn I mean, what could Dyalog even do to not create vendor lock-in? Follow the ISO standard and not change/add anything to the language ever?
 
ngn
@dzaima there's a feature-rich debugger (which i never use..)
@dzaima fixing some old bugs would be a good start :)
my fav example: ⍳,N
 
@ngn to make people move to another vendor which doesn't randomly decide to break your code when it wants to?
 
fixing that would break a lot of stuff, it doesn't seem like it would be a very good decision to fix
 
6:51 PM
@ngn how is it a bug?
 
ngn
@dzaima but why would they want to disturb the equilibrium? they are profitting from it.
 
@KamilaSzewczyk compare ⍳,2 to ⍳2 2
 
ngn
@KamilaSzewczyk ^
 
, makes a vector, right?
 
yes
 
ngn
6:52 PM
@KamilaSzewczyk yeah. ⍳,3 should be (,0)(,1)(,2), not 0 1 2
 
@KamilaSzewczyk compare ≡⍳5⍴2 ≡⍳4⍴2 ≡⍳3⍴2 ≡⍳2⍴2 ≡⍳1⍴2
 
people use one element vectors equivalently to scalars a lot it seems
⍴⍴ for example
 
are there any other fun bugs?
 
@ngn right. I'm just asking what, if anything, they could do even if that wasn't a concern (because there's not much)
@KamilaSzewczyk 1 2 3+(5⍴1)⍴1
 
6:55 PM
is (5⍴1)⍴1 the same as ,1
 
@KamilaSzewczyk (5⍴1)⍴1 is a rank 5 array. ,1 is a rank 1 array
 
no
 
singleton extension seems like a conscious choice rather than a bug
 
@rak1507 well, and so is ⍳,N
 
ngn
6:56 PM
@dzaima fix things that are now, in retrospect, known to have been mistakes. there's plenty.
 
so it's just the same bug where n>1 rank arrays with a single element are treated as scalars?
 
@ngn how is that at all related to vendor lock-in?
 
ngn
@dzaima i was assuming a mutual lock-in, i.e. customers that would bitch about incompatible changes
 
@ngn customers will stay being annoying customers in every scenario
 
ngn
@dzaima idk. publish specs? encourage competition? but of course commercial companies don't enjoy that, understandably
@dzaima depends. some tend to care more about good design than the backwards-compatibility of changes (see shakti's mailing list for comparison). of course, there is self-selection.
 
7:05 PM
@ngn "publish specs" I doubt a complete spec of however many thousands of pages will be at all useful to (or be used by) literally anyone. "encourage competition" is just repeating my question?
@ngn new projects care more about good design. Old and mostly complete ones necessarily need backwards-compatibility, whether they like it or not
I think it's pretty much just impossible to get Dyalog's customers to move away from them, even if Dyalog wanted them to. Best anyone can do is just snag any new ones
 
ngn
@dzaima i think it's a nonsensical question in the first place. they are not going to open up to competition without outside influence. they will be resting on their laurels forever, and fighting for preserving the status quo, because that's profitable. i think the right question is: what can we, the apl community that is not part of dyalog, do to liven up the apl market and improve the language.
@dzaima well yeah, sadly
 
@ngn it's intentionally a nonsensical question. it's just that you're complaining about Dyalog having vendor lock-in, when there's pretty much nothing they could do to avoid it while still existing
 
ngn
@dzaima there could be something you or others could do
apl≢dyalog
 
7:30 PM
Another thing you want to consider is how good it is for a language to be driven by a company that makes a living from consulting. There have been examples of such vendors in the past, and IMHO it has led to less, and in many cases extremely questionable language design. If you think about it, a company that makes most of its revenue from consulting has very little interest in developing the language.
Dyalog has strategically AVOIDED doing consulting under the current management, preferring to leave that to separate companies doing consulting. We do provide consulting services, but generally only for migrations and architecture reviews etc.
We see consulting as a significant threat to the technology. Paying for the things that you actually use is a fundamentally healthy way to organise society. Many of the free things in the world lead to extremely unhealthy human behaviour.
 
@MortenKromberg How is consulting a threat?
 
If the management of Dyalog is more interested in where the next consulting contract is coming from, we will develop the language in ways that is beneficial to our consulting business, rather than the users.
It's like buying cars from the people who sell gasoline
If we have a really good array language consulting team, we would not care if other APL systems were better than ours, we could just starve those companies by taking their consulting revenue away.
When I started my career as an APL consultant, we used to give consulting away for free in order to get customers up and running on the mainframe, paying $1 per CPU second :D
If you don't pay for the thing that you are using, bizarre things happen
 
$1 per second sounds like a lot but it might not have been at the time I guess
 
Suddenly one day the company collapsed overnight when microcomputers came along and everybody could get CPU seconds at 1c each.
About $1 / CPU second, and $1 per 1000 characters of output, for a machine with less power than your cell phone, shared by several hundred people.
Workspace sizes measured in 10's of kilobytes :)
Anyway, I really only wanted to say that the fascination with free things will hopefully fade. Strangely, all the young folk who want to work for us and tell us that really, our products should really be free, still want a salary paid every month :D
 
7:47 PM
Seems like with such a small amount of memory array programming would be much more difficult
 
Having a mainframe, we were able to measure the average size of an array processed by any primitive... that was later, when wss were HUNDREDs of K's...
[artistic pause]
 
Oh that's really cool can you remember roughly what the largest and smallest array sizes were?
 
I believe the AVERAGE was 1.5 elements
 
I imagine things like ⌹ wouldn't have massive arguments
 
The smallest arrays size is easy to know :D
0
 
7:50 PM
Can you remember what primitives on average dealt with the largest and smallest arrays?
 
Although for a while there was a bug where, if you made an array of size (0,¯1+2*31) and then catenated a scalar to it, you could end up with ⍴0 ¯1.
... and then you could read all the bytes in the workspace :D
 
lol that's fun
 
Most big arrays in APL are passed to +/ × ÷, all the logical functions, compression and indexing.
sales←(productcode=42)/quantity×price
Very, very mundane stuff
Even when you are modelling chemical reactions in a refinery, most of the data manipulation is that sort of stuff. Instead of quantity and price you have molecular weight × atom_count
The big advantage of APL is how close the code is you the way the subject matter expert thinks about the problem, allowing extremely fast coding and - yes - refactoring
 
ngn
@MortenKromberg refactoring - tbh, i can't imagine how even something as simple as "find usages of variable" would be implemented for apl
 
Just a simple string search of the source code
 
ngn
8:04 PM
different variables can have identical names, but dynamic scoping blurs the boundaries between them
 
It may not be perfect, but because the source code is so small, the odd false positive is not a big deal.
 
ngn
true
 
Given that you are using the language as a notation, the important functions and variables will have names that are well known to the users, as they have semantic significance. It is when you do lots of abstraction and decomposition that names tend to become meaningless.
Not always true as the system grows, of course - and clever programmers start doing abstraction and decomposition.
 
ngn
and some of us may have extra clashes because we like really short names :)
 
When APL systems get really large, discipline is required and, given that the users are typically not software engineers, sometimes lacking.
A good APL team will have a proper software engineer for every 3-4 domain experts, to help them organise the code.
 
8:10 PM
<DuClare> What makes a software engineer proper?
 
ngn
@DyalogAPL <DuClare> using ⎕io←0 :)
 
"proper" = someone who studies principles of software engineering, as opposed to (for example) a chemical engineer who learned how to write code.
Very often, a preference for ⎕IO←0 does come with that, given that in languages closer to the hardware, offsetting from 0 is more natural than counting from 1.
 
i use ⎕io←1, because it makes sense for me in context of APL
i wouldn't compare APL to systems languages :p
 
Many "problem oriented" languages count from 1: APL, Excel, Matlab I think, Julia
Offsetting and Indexing are really two separete operations. [Un]fortunately, the same APL primitives are really good at both, leading the early implementors to create a switch to allow you to choose mode (⎕IO).
 
8:23 PM
In a :Class with a :Property Indexed, Dyalog APL can index by anything at all :)
:Property Keyed (not something I use a lot)
 
ngn
@MortenKromberg anything or just valid identifiers?
 
Anything at all; you implement your own getters and setters for the property like in any OO language
 
ngn
ah, i see. not functions though.
 
No, only "values"
 
ngn
unfortunately k9 seems to be heading in the same bad direction of not treating functions as first-class
 
8:36 PM
:Class Dict

:Field Public _keys←⍬
:Field Public _values←⍬

:Property Keyed Default Item
:Access Public Instance
∇ r←get arg
r←_values[_keys⍳⊃arg.Indexers] ⍝ Read components

:EndProperty

∇ Make(keys values)
:Access Public
:Implements Constructor
(_keys _values)←keys values


:EndClass
z←⎕NEW Dict (('APL' 'Rocks!')(42 'Bob'))
z['Rocks!' 'APL' 'APL']
Bob 42 42
(shudders, but once upon a time interop with OO frameworks was crucial to APL's survival)
2
(and still is crucial to making APL respectable in some large organisations)
(ignore the comment about components, I missed deleting it in my copy/paste from a class I found in a public workspace)
There are actually only two lines of APL code in that class :)
r←_values[_keys⍳⊃arg.Indexers]
(_keys _values)←keys values
The rest is incantations along the lines of "public static void main"
 
 
1 hour later…
9:47 PM
@Wezl wow, I have only to mention business and the discussion ends ~2.5 hours later, of course including discussion about backwards compatibility vs. change ::P
 
@MortenKromberg I’m stealing that.
 
it's just a wrapper around an array of keys and an array of values
it doesn't have o(1) lookup like a dict in other languages
 

« first day (1492 days earlier)      last day (1163 days later) »