Basically run it in a sandbox? The thing about April is it has no file IO, shell execution or other system interaction features built in unless you explicitly pass them in from the Lisp environment
However, I haven't set up a means to protect from DOS attacks, someone could instantiate a bunch of trillion-element arrays if they wanted
And the other thing to learn is how to set up Emacs with Slime, that will give you a very powerful interactive REPL, you can find videos on youtube of how to do this
If you have more questions, you can find me in ##phantomics on Libera if you do any IRC
Oh, and btw, 'state'⍎ is perfectly valid syntax, although you don't need the quotes.
@KamilaSzewczyk For next time, you can use ]display src instead of actually changing boxing state. Another useful tool is ⎕DR which will give you 326 (pointer array) instead of the expected 80/160 (Unicode array).
I'd say that once you have nested arrays, APL's array model kind of needs it. E.g. it is perfectly normal to have 'Kim' (3 1 4) but then you're supporting a prohibition of ⊃¨ on that?
(And if you say that a b is (⊂a),(⊂b) which shouldn't be simple — although it is in APL2 style APLs — then I'll counter that at least a,b should be simple.)
It's fun tho, that the prototype depends on the type of the first item, so if we have s←'a' 1, then ⊃0⍴s will be a singe space character, while ⊃0⍴⌽s is a zero right?
Here, "fill item" is probably the better term, as that's what it is used as. I guess there's an argument that 3↑'a' 1 should be 'a' 1 0 while ¯3↑'a'1 should be ' ' 'a' 1
@FawnLocke Depending on what you do, it will sometimes not squeeze immediately, but ⎕DR does squeeze before reporting, so… use 181⌶ as a non-squeezing ⎕DR
@MiljanNC I don't think so, I think maybe this falls under the "scalar looping algorithms" that conventional APL implementations don't prioritise in terms of implementation, although sometimes the encoding can still be quite elegant (e.g. dfns.dyalog.com/c_subvec.htm, not the same type of substring as your example, but similar type of searching maybe)
@KamilaSzewczyk Yeah the inline multi-line dfns bother me too. Could do with some comments too. You're using enlisting strands a lot where you probably could concatenate and stay flat. I'd also want a clear(er?) naming convention to distinguish fns and vars, esp. since you use inline dfns. [38] needs no ∘ and [39] needs no ' and [42] needs no ⊢
OOOOHHH so thats how you reverse a list in python! https://docs.python.org/release/2.3.5/whatsnew/section-slices.html i'm gonna abuse this feature so much