Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »

Activity for RubenVerg‭

Type On... Excerpt Status Date
Answer A: Roll n fair dice
Dyalog APL, 2 bytes ```apl ?⍴ ``` Dyadic 2-train, takes $n$ as its left argument and $m$ as its right argument The Roll function `?` expects an array of maximum bounds and replaces each item with a random number between 1 and that bound (ie `?2 6 5` returns `(random between 1 and 2) (rando...
(more)
over 1 year ago
Edit Post #288899 Post edited:
does the leaderboard like this more?
over 1 year ago
Edit Post #288899 Initial revision over 1 year ago
Answer A: Can you give me half?
[Extended] Dyalog APL, 4 bytes 10 bytes, 4 unique ```apl '÷'÷⍥≢'÷÷' ``` This computes the length of the string `'÷'` divided by the length of the string `'÷÷'` Alternate solution (extended only) (6 unique, 6 bytes) ```apl ⊢÷+⍨×∞ ``` This computes \[ \left(\lambda x.\frac{x}{...
(more)
over 1 year ago
Comment Post #288897 I think this has also a hard limit after n = 17 (if I remember correctly), because an intermediate step is generating a n-dimensional array and 17 is the maximum rank allowed in dyalog
(more)
over 1 year ago
Comment Post #288897 I was trying to come up with a closed form solution, but realized it would almost definitely be longer than just generating all the cases, which is quite short in APL. I suppose I'll try to get a closed form anyways and see if I was right
(more)
over 1 year ago
Edit Post #288897 Post edited:
over 1 year ago
Edit Post #288897 Initial revision over 1 year ago
Answer A: Expected value of highest dice rolled
Dyalog APL, 16 bytes ```apl {(+/÷≢)⌈/¨,⍳⍵/6} ``` Explanation: `,⍳⍵/6` generate a list of all the possible sets of rolls `⌈/¨` find the maximum of each `+/÷≢` find the average (sum up all values and divide by the length of the list) this is incredibly slow and expensive memory-wise ...
(more)
over 1 year ago