« first day (2099 days earlier)      last day (852 days later) » 

00:28
@Adám cant happen
@Adám the entire list is of integers
00:47
that are > 0
 
3 hours later…
03:40
@Sʨɠɠan AH, then you can also do ⍸1↓0= saving a character.
03:57
… or ⍸0=1↓
 
9 hours later…
13:02
@Adám i found a different solution to my problem. thanks for the help tho
 
1 hour later…
14:19
@rak1507 Fixed in 19.0
14:47
@Adám - Some questions re: 18.2/Windows: (1) Must I/Is it recommended that I uninstall 17.x before installing 18.2? (2) Does 18.2 install over/alongside 17.x? (3) Is there a free runtime for projects that will be distributed to other users for free (hobby/toy programs)?
@JeffZeitlin (1) No. (2) They will not affect each other, however the newer will grab file associations. (3) dyalogrt.exe is located adjacent to dyalog.exe
@Adám - OK, thanks!
 
1 hour later…
16:15
hello, im messing around with recursion and attempting to do things without loops in apl. im currently tackling the power operator, trying to use it to give me the nth element of a sequence, provided the nth element is beneath a certain limit.
i have the mathematical sequence: {2, 10, 50, 250,...}
and i wish to get the last element of it before the elements go over 10000.
in this example, the value i would be looking for is 6250, as the next element after that is 31250, which is more than 10000.
16:30
i thought about several possible workarounds for it, and this is maybe the best one ive come up with for now: ⊃1↓{⍵,⍨5×⊣/⍵}⍣{1e4<⊃⍺}2
it returns 6250, as i wanted.
i followed an example of a fibonacci generator, {⍵,+/¯2↑⍵}⍣n⊢1 to produce n+1 fibonacci numbers.
using the idea of trailing older ⍵-values i came up with the above solution.
now im just wondering how you could improve upon my solution, maybe using the same core idea.
i should maybe note that ⎕IO←0 for all code so far
 
2 hours later…
18:12
@Slimey You could use knowledge of the function to re-state the criterion: ⎕←5×⍣{2000<⍺}2
@Adám 6250
But of course, that doesn't work if the function doesn't have an inverse. ⋄ f←5∘× ⋄ f⍣{1e4<f⍺}2 does what you want, but computes f twice as many times.
@Adám 6250
It would indeed be nice to have a version of that returned intermediary values. ⋄ p←{⍺←⊢ ⋄ r⊣⍺ ⍺⍺{⍺←⊢ ⋄ r,∘⊂←⍺ ⍺⍺ ⍵}⍣⍵⍵⊃r←⊂⍵} ⋄ ⊃⌽¯1↓5×p{1e4<⍺}2
@Adám 6250
19:36
i thought of the mathematical function analysis way of solving it, as well as thinking of a possibility of solving the problem by computing twice, but didnt want to do those. cool solutions, thanks!

about your last solution: what do the ⍺←⊢ in the dfns of p do? i havent played much around with combining tacit and dfn forms, as it might look like here.
i assume p works so that it takes a left function and left argument and maybe "binds" it to the function like ⍣ composes its left argument with its left function. p also takes a right function and argument, where the right function is the con
@Slimey ⍺←⊢ is just a clever hack to handle both monadic and dyadic cases without two different code pathways. ⍺←⊢ sets to the identity function if called monadically. This effectively makes ⍺ ⍺⍺ ⍵ equivalent to ⍺⍺ ⍵.
ooooh, thats really clever. was my understanding of the function p correct? if i understand how it works ill likely figure out how to read it
Yes, it is exactly a drop-in replacement for but including intermediary values.
19:56
awesome! thank you so much!
i really like where this path of ⍣ is leading, i feel learning to use it will be really useful. im excited!
20:24
so im trying out trains rn, and ive got this deduplicate function: {(≠⍵)/⍵} (which works). im trying to convert it into a tacit function (≠/⊢). by my understanding, this is a monadic fork that should translate to {(≠⍵)/(⊢⍵)}, but it doesnt behave the same way. what am i doing wrong?
Nothing. There's a historical quirk with slashes. See apl.wiki/hybrid
So you can write it as ≠⊢⍤/⊢ but hopefully we'll be able to write ≠⍛/ in 19.0. Also, this is just
@Adám i know about , just trying to do it myself
@Adám ah, thanks
i better be careful then :P
You can define a cover function for / which doesn't have the issue: R←⊢⍤/

« first day (2099 days earlier)      last day (852 days later) »