In accordance with our meta agreement, since one candidate received more votes than the others, we have a new featured language! Throughout May 2021, our Language of the Month will be:
Vyxal
What's a Language of the Month?
See the meta post for nominations. In short, during May, those who wish ...
basically every month we have a featured language to encourage a wider variety of languages to be used, and you can get bounties for being a new user in that language
oh lol stack exchange is p quirky, i used to be active on stack exchange when i was in grade 8 (now i'm in grade 12) and then after a while i was fed up with the quirks and told customer support to delete my account
I don't want y'all having a bunch of conversations after I'm gone, so I'm going to use this message to induce an awkward silence: Code Golf is a completely useless activity and all of you are wasting your time here when you could be out there building good, useful applications.
I wouldn't say that this question is unclear. Sure, the concept of "infinite expected value" can be somewhat counterintuitive but the problem is perfectly solvable.
The St. Petersburg paradox or St. Petersburg lottery is a paradox related to probability and decision theory in economics. It is based on a theoretical lottery game that leads to a random variable with infinite expected value (i.e., infinite expected payoff) but nevertheless seems to be worth only a very small amount to the participants. The St. Petersburg paradox is a situation where a naive decision criterion which takes only the expected value into account predicts a course of action that presumably no actual person would be willing to take. Several resolutions to the paradox have been proposed...
Also, I don't exactly understand how the St. Petersburg paradox explains what exactly "produce infinite expected output" means; does it mean to write a non-deterministic program whose expected output is infinite but actual output might not be? Like, there isn't a formal specification for what a submission actually needs to do; can I just submit while 1:print(1)?
Ah. In any case, if randomness is expected (I just noticed it's tagged random too so I think that makes sense), like with any random problem, the theoretical requirement of randomness has to be defined.
In any case, since I had to read up two wikipedia articles to get the challenge and then discuss it in chat, it's not clear enough.
Write a program with infinite expected output.
Inspired by St. Petersburg paradox.
Shrtest code wins. Would be quite small for lots of language though.
Yeah, HN is right. The challenge should be self-contained enough that someone could solve it naively just from the challenge info alone
External links are good for when there's extra information/research available that could help people shave those extra few bytes off their answer or when the challenge is connected to a rabbit hole of interesting information
Generate ticks of graph
A challenge many developers face when drawing a graph from scratch to plot some data is generating its ticks. In below graph, there are 6 horizontal ticks (1750, 1800, 1830, 1860, 1880 and 1900) and 11 vertical ticks (0, 10, 20, 30, 40, 50, 60, 70, 80, 90 and 100).
The ho...
Although there's some good news, turns out the college I want to go to actually accepts a 4 (second best score) for that test, unlike most others, which means I'm quite a bit less likely to waste my time taking that class :p
(Although it wouldn't be a waste anyway, it's an awesome class and I've learned a ton)
The websockets are too fast...someone with malicious intentions could probably determine who upvoted and downvoted their posts with close to 90% accuracy
the former, especially not. the latter probably isn't really needed much either; we could probably get a meta concensus on that alongside whether or not to replace the feeds with your bot
Output the first n terms of the Van Eck sequence. Not the nth term.
The Van Eck Sequence is defined as:
Starts with 0.
If the last term is the first occurrence of that term the next term is 0.
If the last term has occurred previously the next term is how many steps back was the most recent occur...
well, I mostly agree with the closure and it seems xnor does too (at least, that it doesn't offer much more that makes it worth being separate from the other challenge), so consider it a three-vote close :P
if the other challenge were super old and inactive and poorly specified i might be inclined to make this challenge follow the standard sequence I/O and close the old one as a duplicate but that doesn't apply here
pretty sure this was prompted by the addition of a Van Eck challenge to code.golf anyway, not actually to patch the old challenge's strict I/O
Should we have chat events? - now featured. The blog no longer really needs to be an active meta discussion so now we just need to actually write it (and I have a suspicion that nobody's really gotten much progress on that yet...), so I think I can bring this back up since it's been two weeks.
For this challenge, I figured out that if you have score s, and have answered n times, the largest possible code you can submit next is floor(2*s*n + s).
I posted a King of the Hill challenge recently, but I'm not sure if this answer is in the spirit of KoTH challenges. It chooses a random number at the start of the challenge and repeats that number throughout the challenge. This means that each time I run the game it changes the playing field dra...
Swap encoding is an encoding method where you iterate through a string, reversing sections of it between pairs of identical characters.
The basic algorithm
For each character in the string:
Check: Does the string contain the character again, after the instance you found?
If so, then modify the st...
Welcome to the 1st game of ASCII logos. This will be a monthly game, if I hopefully didn't get suspended. I want everyone to enjoy making these. But I wanna talk about something.
No one, and I mean no one, responded to my contact messages from my original account, and I wanted to have a chat wit...
Time bomb KoTH
In this challenge, players need to temper with a time bomb as late as possible without getting blasted in the face.
Mechanics
Each round, each bot receives the following argument:
numbers played by all bots last round in the ascending order.
number of points it received last round...
Self-Interpreter But Never Loops
interpreter code-golf
I'm afraid that this might look too intimidating. Is there any way to improve it?
Ever since Gödel and Turing, it is widely assumed that a reasonable programming language that contains a self-interpreter can never be terminating. Here, I pres...