« first day (2995 days earlier)      last day (1848 days later) » 

12:36 AM
just posted a sandbox post re: exploding dice, I couldn't find a challenge on it
but I could've sworn we had one, anybody remember/know where that one went?
 
1
A: Sandbox for Proposed Challenges

RɪᴋᴇʀSimulate Exploding Dice Your task is to make a program that takes in an integer n, and outputs the roll of a single n-sided die. However, this dice follows the rules for exploding dice. When you roll the die, check what value you rolled. If you got the maximum for that kind of die (on a standar...

 
 
4 hours later…
4:40 AM
 
 
2 hours later…
6:44 AM
@Riker haha, these are even worse than my puns :D
 
 
4 hours later…
10:51 AM
@PhiNotPi you mean they have eye tracking macros
 
@PhiNotPi too bad s.tk doesn't have subdomains or anything like that :|
 
@DJMcMayhem If taking the input as a 2D character list is allowed, it could be 05AB1E (legacy) 3 bytes and 05AB1E 4 bytes instead.
 
O_o
@DJMcMayhem Charcoal, 13 bytes: ∕⪪S¶«⭆ι⌈⁺λ§κμ. needs output to be padded though
argh. i was planning to use null byte tricks but turns out Charcoal doesn't specialcase them as much as i thought it did
Charcoal, 15 bytes (with newline): F⪪S¶«⸿↑Fι¿›κ κ→
 
12:02 PM
@ASCII-only Print(Maximum([k, Peek()])) saves another byte
 
12:12 PM
0
A: Sandbox for Proposed Challenges

Artemis FowlThe Forest Game (KotH, WIP) Summary You have been given a space of land to plant trees in. Unfortunately, due to an administrative mix-up, so have 4 other people. You are in a competition with them to make the most money out of your trees within the next 100 years. The map A 10 by 10 grid, re...

 
 
1 hour later…
1:24 PM
class Foo(object):
    def __init__(self):
        pass
    def __setattr__(self, name, value):
        print(name, value)

a = Foo()
for a.printing in range(5):
    pass
 
lol that's cool
 
right?
 
didn't think that using attributes as a loop var would work
 
Good grief. Do that in production code somewhere, people will love it.
 
inspired by this SO question
@AdmBorkBork I just might... maybe I should take this abuse to the logical extreme
 
1:29 PM
I don't know why you would ever want to do this, but now I know you can — Nathan 10 hours ago
Same.
 
@ConorO'Brien hmmm so it kinda looks like u can loop over any lhs
 
yeah... I think I can replace at least maps with this mechanic, not sure if reduce/folding is possible elegantly
 
oh so that's why u can
do
for a, b in ...
its not symbolic, its actually just using the lhs
u can even do for a, *b and things like that
cool
 
I have made maps
 
1:47 PM
That's now gotten complicated enough that I, and my limited Python knowledge, can't follow along, but I'm sure it's cool.
 
0
Q: Make it rain characters

AdmBorkBorkInspired by this chat mini-challenge. Given a string as input (ASCII printable characters only), output the string with the letters "raining" down. Each letter must be a random number of lines downward (random between 0 and the length of the string, each having non-zero probability), and only on...

 
2:10 PM
0
A: Sandbox for Proposed Challenges

Martijn VissersMake a markdown Table of contents parser A simple Code Golf challenge in the likes of the Markdown parser. The parser should ignore normal text (without an # before it) and it should ignore whitelines since it would generate them accordingly. Sample input: # Hello Hi this is normal text ## T...

 
2:22 PM
CMC: Output a random number following the standard normal distribution (to a reasonable degree)
maybe you're given an input which is given to follow the standard uniform distribution
as a source of "absolute" randomness
 
Eye halve rune this add threw the spelling chequer that came with my pea sea. It did not marque any miss steaks four my revue, and eye kin knot sea any mist aches their. — Cody Gray ♦ yesterday
 
@LeakyNun Normal distribution between 0,1?
 
@ExpiredData normal distribution with mean 0 and variance 1
the range is all the real numbers
 
Yeah ok
of course that's what i meant
 
3
Q: Simulating Exploding Dice

RɪᴋᴇʀYour task is to make a program that takes in an integer n, and outputs the roll of a single n-sided die. However, this dice follows the rules for exploding dice. When you roll the die, check what value you rolled. If you got the maximum for that kind of die (on a standard d4 that would be 4, or ...

 
2:29 PM
@LeakyNun -smOZK100cK2
 
central limit theorem
 
@LeakyNun APL (Dyalog Extended), 17 bytes (√¯2×⍟?0)×1○○2×?0 without built-ins
 
Wolfram Language (Mathematica), 35 bytes: RandomVariate[NormalDistribution[]]
 
2:36 PM
Thanks lol
 
@Maltysen that's (U_1 + ... + U_n) - n/2 which approaches N(0,n/12)
when n=100 the variance is 8.3333
 
o
 
@LeakyNun Attache -nstats, 12 bytes: RandomNormal (not updated on TIO yet)
 
@LeakyNun so can I divide by n/2?
err
srry
by n/12
 
@Maltysen by sqrt(n/12)
 
2:45 PM
ah yeah, thats what i meant
 
Groovy, 27 bytes: new Random().nextGaussian()
I don't know why i always use a semi-colon when I write groovy code
 
maybe you're storing expired data in your brain
 
^
@LeakyNun Octave, 12 bytes: normrnd(0,1)
 
 
2 hours later…
4:47 PM
0
A: Sandbox for Proposed Challenges

Robin RyderLetter Boxed The New York Times has a daily online game called Letter Boxed (link might be behind a paywall), presented on a square as follows: You are given 4 groups of 3 letters (each group corresponds to one side on the picture). The aim of the game is to find words made of those 12 lette...

 
5:07 PM
0
A: Sandbox for Proposed Challenges

billpgVisit every tuple Write a program, given an input n, will generate all possible n-tuple using natural numbers. n=1 (1),(2),(3),(4),(5),(6)... n=2 (1,1),(1,2),(1,2),(2,2),(1,3),(3,1),(2,3),(3,2),(3,3)... The output may be in any order, but must output each tuple exactly once. The program mus...

 
5:25 PM
1
Q: Adventurers in the Ruins

BeefsterTest Driver • Challenge Discussion • Submit Adventurer (Image Source) Several rival adventurers are raiding the ruins for treasure, but they can only carry so much at a time and have their limits of endurance. They want to get the most valuable treasure and get out before they become too tired...

 
 
5 hours later…
10:49 PM
@Maltysen I did edit re: randomness, yea probably but we do have a standard for randomness (see comment), pinged some other user in the comments so I'll just ping you here
 
Anonymous
$ ls -sh package*.json
4.0K package.json  652K package-lock.json
 
Anonymous
node why are you the way that you are
 
11:06 PM
0
Q: Are non-uniform random distributions allowed?

RɪᴋᴇʀI posted a challenge that requires programs to generate a random number in a range, and one answer used the rgeom function from R. This function uses a geometric random distribution. Is this allowed by default for challenges requiring random values? I'm inclined to think not, since the dictionar...

 

« first day (2995 days earlier)      last day (1848 days later) »