@EliasMårtenson and phantomics: NARS2000 is pretty advanced too (doesn't do symbolic manipulation, though), including rationals, various forms of complex numbers (including quaternions and octonions), multi-, arbitrary and infinite precision, and ball arithmetic. E.g.:
<phantomics> Elias Mårtenson: CL also has native support for all the array types you need for implementing APL, and so I can easily pass data into and out of April invocations within a CL program
<phantomics> The main difference between CL arrays and APL arrays is that in an APL array, all elements must be scalar so any nested array must be enclosed in a 0-rank array.
@Adám Yeah, my intention was to write one once I have created a web site I can link to.
I have two primary personal projects, with KAP being one of them. For the last week I've been doing work on the other one (Climaxima), and I'll return to finishing the core functions in KAP once I'm done with the current task.
Having two projects to alternate between helps with dealing with the tedious parts.
@Razetime Well, it's intentionally not "an implementation of APL". In other words, if something APL does is incompatible with the KAP goals, then it will not be compatible with APL.
For example, the evaluation order for the \ operator is intentionally opposite that of APL.
But yeah, when compatibility is possible, it is compatible. So I guess @Adám has to decide whether that makes it a derivative or not. :-)
@EliasMårtenson dzaima/APL does that too, but I also explicitly don't go for compatibility where it makes sense, so if anything, KAP is a more "proper" APL than mine
@Adám Just realized that tryapl.org has changed a bit compared to the last time I visited it. Easier for me to select APL symbols. Cool, I am going to use it tomorrow to mention and show APL a few minutes in a talk for non-engineering students when I will discuss computational thinking and the fun of recreational programming. APL is great to learn but hardly known here in TW universities especially in non-CS / non-MATHS departments.
@EliasMårtenson I don't think KAP is using the based array model because it has 5≡⊂5. To me it just looks like the nested/floating model, although there's some strange behavior like ⍬⍴,5 giving an enclosed 5 and 5≢(,5)[0] (but 5≡⊂(,5)[0]!).
@EliasMårtenson I knew you had a glyph on top of the first vowel after the M, but I thought it was Mo- and not Ma-, sorry for that. "Martenson" is a reasonable variant, no? "Mortensen" is just butchering your name, I apologise for that.
[nats] is similar to operator →big← except that it:
- deals only in non-negative numbers,
- accepts only dyadic operand functions,
- is quicker for large numbers.
@RGS Oh, no I was saying that ⊃∘⍒ would be the one to optimise for that.
@RGS It should be O(n) for floats and arbitrary arrays (simply traverse and remember the value and index of the greatest so far) but less than that for integers, because if we hit the maximum value that can be held by the type, we're done.
The remembering is basically nothing. Problem is having to compare every value to the current k largest as we traverse. So I guess it is whatever complexity ⍒ has, but based on k instead of on n.
@RGS Yes, @Adám is right. That said, the o isn't quite pronounced as English e. Swedish has a lot more vowels than English, so no need to worry about it :-)