@rak1507 This might not be official, but if I remember right I think we considered this, but uniform distributions weren't considered the interesting part of the problem or even particularly faithful to the problem domain - if someone wants to submit a solution with non-uniform distributions I don't think we want to punish them, but we did need some definition of random that was a bit more concrete than just the word "random"
IOK, you need the full story I guess. I use two flavours of markdown. One has code blocks surrounded by three backticks; the other indents code blocks by ffour spaces. I am wrigin some code to interconvert them. I'm currently using old skool APL ^.+
For quite a while I've had the beginnings of an APL intro book up on leanpub. I know of two alternatives: xpqz's 'Learning APL' and the updated online 'Mastering Dyalog APL'. I think they are both better, so I'm planning to retire mine and point readers to the alternatives. Does that make sense?
I was thinking what type of knowledge do you assume they have, but if it is for kids, then I'd love to see it finished, as that type of material is missing. xpqz's book is for non-APL programmers, and Mastering is too heavy for kids.
Well, I don't want to burden you. xpqz loves writing about APL. Maybe he'll be willing to help. If you're interested in that, you can just ping him here using @xpqz
@RomillyCocking I concur: if you have the cycles, it'd be great to see it finished -- the more material there is out there, the more it benefits adoption. I have my "APL time" accounted for right now, so not sure if I could contribute much to the effort, I'm afraid.
@RomillyCocking Some of the things you write should be updated to account for modern developments. Let me know when it is relevant, and I'll be happy to assist. While I hope you'll be around for a good many (healthy) years, consider publishing the source such that others can contribute to your work.
OK, here it is, lightly adapted from Paul Mansour's original, in all its glorious horror:
Fibonacci←{⎕IO←0 ⍝ First ⍵ fibonacci numbers.
s←⎕NS'' ⍝ Class
s.(f←{⍺←⎕THIS ⋄ ⍺.i<2:⍺.n ⋄ ⊢⍺.n←+/⍺.a[⍺.i-1+⍳2].n}) ⍝ Method
0::⍬ ⍝ NONCE on next operation if ⍵=0
v←⎕NS¨⍵⍴s ⍝ Collection
v.i←⍳⍵ ⍝ Item number
v.n←⍵↑1 1 ⍝ Initialize
v.a←⊂v ⍝ Each knows all
v.b←(1+⍳⍵)⍴¨⊂v ⍝ Each knows self and previous?
v.f 0 ⍝ Compute
}
Try it online: https://tio.run/##bZK/T8JAFMd3/oq3ASHUlpFoHAhEBmHAzTgc5SoXj7umV/BXWIxhwNTowOji5OCmLIz@KfeP1HfXQkzxLX13@Xy/7943JSGvj24Jl5dp2mFDKYjvM714udfPq24fGxfy0skbdFikYuzWEGxZENPJkEbKKRlIoQKVvUG5DH/LiFucKJVRTiWwM5JNxp@ddAegnx6R2zjssNE0X5HdLN/tAcHagenIuYXqXk0nX40LR8yr1v6UxmM5sv5uEw0@oVAG6vV7rTZIAYLexCBDGpGY4ZEFZqsj18pn2yV@PvBSJ9@quInknPpGmPGOSQxfY4LZG9mN6SQPKaeFpdd68eqBV6QFixnh7I7mMDHw8mG2b9wm/hiuhLxWQDjP8SHiFRsNTqji23GHnbqgUpQHQMQIwojOmJyq49wkAPef7FpyEk5jWpqXMBwcs/tdwHPT9Bc
@KamilaSzewczyk i'm fine with it, it wouldn't be too hard to find it anyway; all I care about is there not being any page containing both my real name and "dzaima" in any relation