« first day (2023 days earlier)      last day (2824 days later) » 

4:00 PM
I've finally gotten off the planet :)
I'm on a space station!
 
What is NMS ._.
Oh, No Man's Sky?
 
@TùxCräftîñg and lack of good enough hardware to play the game.
 
Look ma, I'm on the moon!
It's real snowy
 
screenshot ?
 
i can also crash go on the moon in Kerbal Space Program
 
4:39 PM
fun fact: crashing into an asteroid at 1.5ku (speed measurement) is not fun
@Optimizer sorry, lost it
 
4:52 PM
@ΛεγίωνΜάμμαλϠΨΠʹ what is ku exactly?
 
What is a u?
 
For reference, 150u is normal starship gliding speed
 
Ah.
 
So I guess u ~ m/s?
 
4:54 PM
oh you crashed on a asteroid at 1.5km/s
meh
one day i crashed a spaceship at 4km/s on the atmosphere in KSP
 
> You have learned the Vy'keen word for 'Vy'keen'
...
 
@ΛεγίωνΜάμμαλϠΨΠʹ I wish to learn Vy'keen. :3
 
heh the logo of Neoscript have 3 stars
 
Just got a hyperdrive moving outta dis sytem
it's full of stars.
 
5:25 PM
i have a idea for neoscript
a retry keyword
 
0
Q: Alphabet Spiral

DanTheManYou are to write a program or function that outputs this exact text: OPQRSTU NQPONMV MREDCLW LSFABKX KTGHIJY JUVWXYZA IHGFEDCB May also be lowercase. Standard loopholes are disallowed This is code-golf, so smallest byte count wins. Also, why isn't there an alphabet tag yet?

0
Q: Golf a Brain-Flak Integer

NeilIntegers are tedious to represent in Brain-Flak. There are 8 operators: () Evaluates to 1, but does not push anything on any stack [] Evaluates to an indeterminate value for the purposes of this question {} Removes the top of the stack and evaluates to it <> Switches to or ba...

 
Hmm... I smell a challenge idea
In mathematics, Arnold's cat map is a chaotic map from the torus into itself, named after Vladimir Arnold, who demonstrated its effects in the 1960s using an image of a cat, hence the name. Thinking of the torus T 2 {\displaystyle \mathbb {T} ^{2}} as the quotient space R 2 / Z 2 ...
 
@NewMainPosts yay! My language inspired a challenge! \o/
 
i found a weird way to stackoverflow neoscript: try 1/0;catch _ retry;
 
6:01 PM
Let X and Y be uniformly random variables in [0,1)
What is the distribution of XY?
 
@trichoplax Looks like it wasn't sufficiently aggressive after all...
 
> JavaScript is often used together with Java.
[citation needed]
 
@LeakyNun -log(XY) ~ Exp(1) iirc.
 
@Dennis What is Exp?
 
The negative logarithm of XY has an exponential distribution.
I'm not sure if there's a fancy name for it.
 
6:10 PM
lol, someone just found this out
15
Q: product distribution of two uniform distribution, what about 3 or more

luluSay $X_1, X_2, \ldots, X_n$ are independent and identically distributed uniform random variables on the interval $(0,1)$. What is the product distribution of two of such random variables, e.g., $Z_2 = X_1 \cdot X_2$? What if there are 3; $Z_3 = X_1 \cdot X_2 \cdot X_3$? What if there are $n$ o...

 
There should be a history of golfing langs.
 
6:28 PM
g'n
 
@βετѧΛєҫαγ -1 Try it online link doesn't point to Try it online!... Seriously though, there still seems to be a stray newline somewhere.
 
@Dennis Which answer?
 
All of them.
 
@Dennis They probably resolve to Turbo.run.
 
I'm aware.
 
6:45 PM
huh, lots of sites have community blogs, can PPCG get one?
 
@Dennis Ah yeah, sorry, I need to update the python code
turbo.run has a few new features
BTW the newline is from input()... It adds a newline at the end :P
 
0
Q: Write a Sine-Deriving Machine

user3502615The Challenge Your challenge is to write a program that evaluates the following function: f(x, t) = d^x / dt^x (sin t) That is, the x-th derivative of sin t. In case you aren't familiar with calculus, here is a table of derivatives for the sine function: ... d^-1 / dt^-1 (sin t) = -cos t d^...

 
@βετѧΛєҫαγ turbo.run?
leads to blank page for me
 
@βετѧΛєҫαγ Let me know when you write this up in the Sandbox/post this. It seems very interesting :D
 
@βετѧΛєҫαγ No, the newline is from print() on line 182.
 
6:53 PM
@Quill halp istanbul is severely borked
 
@Downgoat I didn't pull Cheddar last night because somebody said it was broken. Should I pull it now?
 
oh no no no no no
its very borked
npm package manager is worst package manager
 
Aug 10 at 18:11, by Dennis
Aug 7 at 0:01, by Dennis
Is Why on Earth did you choose Node? a valid question?
 
@Sherlock9 Sure, I'll start working on it tomorrow afternoon the blurring challenge
@Dennis Alright, I edit it ASAP
 
7:06 PM
Aw, timeitonline.net is already taken. :(
 
@Dennis 2f.cvbparked by godaddy
 
Nah, it belongs to an individual who just happened to use GoDaddy.
Also, wtf is 2f.cvb?
 
its vim
 
@Downgoat 4WcW
 
Hey @Dennis, I've just done a bit of an update
 
7:09 PM
@Doorknob that works too but its less flexible. what if i added a word
 
@Downgoat Who cares? It's golf. :P
 
@Downgoat The reason everybody and their grandmothers use s/// is because it's universally understood. 2f.cvb is just noise for half of us.
 
@Quill pls halp i think istanbul/mocha is broken. -x seems to be using normal node?
@Dennis .___.
 
@βετѧΛєҫαγ Pulled.
 
that's your fault for not using vim :P
 
7:10 PM
I don't want to play Super Mario in my source code.
 
hahaha
 
@Quill nvm i should of juse been using istanbul.ymlm
 
2
A: Alphabet Spiral

βετѧ ΛєҫαγFourier, 143 141 bytes Not a particularly interesting answer except that it stores newlines (ASCII code 10) as the variable T... Uses isaacg's golfing program. 79a^a^a^a^a^a^a10a~T78a81avavavava86aTa77a82a69avava76a87aTa76a83a70a65a^a75a88aTa75a84a71a^a^a^a89a10a74a85a^a^a^a^a^a65aTa73avavavava...

Edited
 
\o/
 
link to fourier github?
 
@DestructibleWatermelon try FOG
@βετѧΛєҫαγ #fail
.org
 
...
damn it
 
7:24 PM
Pretend that never happened
 
Fun fact: NMS lets you spin chairs
 
What's NMS?
 
No Man's Sky
 
7:28 PM
Ohh
 
@ΛεγίωνΜάμμαλϠΨΠʹ pls stream teh gamez
@quartata me and conor were thinking about starting an amateur tf2 tournament, any feedback/ideas?
 
@EᴀsᴛᴇʀʟʏIʀᴋ how 2 stream gaemz
 
What's the difference between NMS and Elite: Dangerous?
 
@ΛεγίωνΜάμμαλϠΨΠʹ obsproject.com
 
@βετѧΛєҫαγ Erm... NMS has more stars?
 
7:29 PM
@EᴀsᴛᴇʀʟʏIʀᴋ @ΛεγίωνΜάμμαλϠΨΠʹ et twitch.tv
 
@ΛεγίωνΜάμμαλϠΨΠʹ Meh, I like my universes smaller
 
@zyabin101 twitch was always a bit weird for me, and you can stream to twitch with OBS
 
@EᴀsᴛᴇʀʟʏIʀᴋ lemme set it up
 
7:29 PM
@EᴀsᴛᴇʀʟʏIʀᴋ You know about newbie mixes right
 
yes
theoretically with small prizes, maybe up to a key or so
 
I love it when everything lines up perfectly like this.
 
is that rust?
 
Yep.
 
@Doorknob Some() 10/10
What is Some(), anyway?
 
7:32 PM
It's Rust's Option type. An Option<T> can be either Some(T) or None. Like Haskell's Maybe.
(Here None represents a user who is not logged in, while Some(123) means the user is logged in as user 123.)
 
I've been meaning to learn rust for a while...
 
is there a problem with adding the code golf tag to new users' challenges that don't say it?
 
(I agree though)
 
7:36 PM
@Doorknob Martin would not be impressed
43
Q: Avoiding Rivers

Martin EnderBackground In typography, rivers are visual gaps in a block of text, which occur due to coincidental alignment of spaces. These are particularly annoying since your brain seems to pick them up more easily in peripheral vision, which constantly distracts your eyes. As an example, take the follow...

 
@MartinEnder that's just sad
@xnor no
50 secs ago, by Martin Ender
(I agree though)
 
@MartinEnder surely there's something better he could have said in that space
Also, hey, their line lengths are 19 bytes.
 
@EᴀsᴛᴇʀʟʏIʀᴋ @βετѧΛєҫαγ ^^^
 
Woah, freaky
 
Well, Rob's text was anyway
 
Also, please don't ping me, one can hear it several times in the stream
 
@GamrCorps Why doesn't your answer work on Tio!? Afaik, it runs the latest version.
 
7:51 PM
LegionMammal, switch off the sound of the notifications?
 
@Dennis I'm not entirely sure yet, I believe it has something to do on my end with the command-line arg parsing. I'm currently looking into it...
 
In case it helps, this is the wrapper I use.
#!/bin/bash

export LANG=en_US.UTF8

java -jar /opt/Convex/out/builds/convex-dev/convex/convex.jar "$@"
"$@" gets replaced with code (name of the source file), then the command-line arguments.
 
@Dennis I found the problem, it was stupidity on my part: s.substring(0,0).matches("\\d")
 
Hahaha
 
7:58 PM
@Dennis How many languages does TIO support? (The language for the interpreter, that is)
 
@GamrCorps But why does it work on your machine?
@βετѧΛєҫαγ Whatever is available on Ubuntu.
And free, of course.
 
@Dennis Oh, neat
 
@Dennis Because I was using the Shell and IDE, never tried it using the command line I guess. I'm pushing a fix right now.
 
@GamrCorps But wouldn't that mean that the answer is non-competing?
 
8:01 PM
That is a good question. I'm not sure on our rules about that.
 
Lemme search meta
 
Languages are defined by their implementations. If it didn't work in any interpreter that was available at the time the challenge was posted, it's non-competing.
I know this because I've been there with Jelly many, many, maaany times. ;-;
14
A: What's the policy on interpreter bugs?

DoorknobThe interpreter(/compiler) defines the language A spec is not a language. For the purposes of PPCG, a programming language is defined by its implementation. If the interpreter is fixed after the challenge is posted, the answer must be marked as non-competing—just like any other answer in a lang...

 
29
A: Loopholes that are forbidden by default

mbomb007Creating a new compiler for a language after a challenge was posted There is some debate arising from this answer. He created his own compiler for the C programming language that extends the language specifications. It seems pretty obvious that this will be declared a loophole, to me at least, b...

Also relevant
 
@Dennis But that means you can always use an older version where it does work, right?
Or have I been doing it wrong
 
@Adnan right, provided that older version is still available somewhere
(and it should be explicitly mentioned in the answer, I guess)
 
8:05 PM
Github saves each version of the interpreter iirc
 
@Adnan Of course. Just link to a working commit.
 
Like some Python answers post the exact interpreter version
 
Okay thanks :)
 
Ok. But here is a question: when the challenge was posted, there were two interpreters that could run that code: the command-line version and the IDE version, both available on GitHub. Both run with the same spec, but the command-line version has a bug that breaks the solution. Does the solution still count as competing if the IDE version does not have that bug?
 
8:07 PM
So the IDE version was on Github?
If so, the answer is valid
 
yes
 
I think you're fine then
 
I just edited the answer to explain the problem, but since the question is on hold now anyways, it shouldn't be a problem in the future now.
 
REPL answers are in weird place. On one hand, we have our defaults that are supposed to apply to all code golf challenges, and they require a full program or a function. On he other hand, we have this.
10
A: When is code that requires a REPL acceptable?

lirtosiastAlways— but a REPL is a different language. We usually define languages by their interpreters. My Python shell is an interpreter, which satisfies our definition of a programming language. Therefore, it is a valid language. "Wait a minute", you say, "won't REPLs usually be shorter than their ful...

So I guess you could label your answer Convex Shell or Convex REPL to make it valid.
@GamrCorps Pulled it on Tio!.
 
@Dennis, the IDE is not a REPL, it is a full IDE, like TIO:
@Dennis Thanks
 
8:20 PM
@GamrCorps OK, Convex IDE then.
 
what is this shape called?
 
trisection of a 360° angle
 
not very catchy :/
 
Minimal Starfleet logo
3
 
i approve, as Riker, W
 
8:38 PM
redacted
 
vertex and connecting edges of a hexagonal grid?
 
Okay, PPCG!
Time for you to help someone write a psuedoquine
What I need to do is make a quine that outputs the same program but with with one variable less
and when the var reaches zero go for another behaviour
 
can i add a var then?
 
or just a trick to write a quine postfix
@Optimizer huh?
or a quine template is cool
 
"when the var reaches 0, can I add a var in the next output"?
 
8:51 PM
@Optimizer we just need to call a custom function when it reaches zero
 
please dont ping everytime u reply me.
 
sorry...
 
specially when we are the only ones talking
 
uh
mv those_last_few_messages elsewhere
so any idea?
 
still not sure about ur "when var is zero" behavior.
 
8:54 PM
@EᴀsᴛᴇʀʟʏIʀᴋ @βετѧΛєҫαγ english.stackexchange.com/q/342679/78287
 
@Optimizer it is possible
 
i mean. i dont know what u mean.
 
Oh, lemme explain.
The quine will be run multiple itmes, each time the output will be compiled and run again.
Each time, we should output the same quine with one var decremented.
When the var is zero, the quine shall run a custom function.
 
like the value of the var decremented?
 
@Optimizer ?
really a psuedoquine
 
8:56 PM
can you give a pseudo code example?
 
okay, but without the quine part:
a = <constant here>;
if (a == 0){f();} else{
<quine code to reproduce the entire program with the constant decremented>}
waig
@Optimizer done
 
ok
 
progress?
@Optimizer update?
 
@Dennis Can you reopen that sine question?
OP confirmed it's golf
 
9:13 PM
@quartata I'm not Dennis, but I hope you don't mind that I reopened it anyway. ;)
 
NOOOOO
closes it back so that Dennis can reopen
 
@MartinEnder In regards to the naming of the "three-pronged shape", it looks like the shorthand notation for isopropyl alcohol (C3H8O), which is just that shape but it has an OH at the end of one of the "prongs". Don't know if that helps, but thought I'd mention it.
 
thanks, but probably too technical/domain-specific :)
 
9:38 PM
For some reason, the word triptych comes to mind. Google says that's not it, though.
 
@MartinEnder Is this for a challenge? :P
 
Mercedes Benz has that symbol for a logo
It seems to be a three pointed star. In the tradition of "pentagram", would "trigram" work?
 
Possibly a trigonal?
 
"Trigram" seems to have other connotations, like in the I Ching and in linguistics for a three letter sound like sch-
 
@quartata ninja'd
 
9:47 PM
The Wikipedia page here has your shape in the "simple isotoxal star polygons" section en.m.wikipedia.org/wiki/Star_polygon
No simple name, though
 
Question: Do you think we'd have more fastest code challenges if there was an easy way to time the submissions on an online platform?
 
Probably.
Are you thinking of adding something to TIO?
 
I dont like fastest code challenges. I think lowest complexity challenges make much more sense
run time complexity that is
 
Run time complexity is a lot harder to measure/calculate
 
You can get faster code just by switching compilers, its not always a good programmers job
not really
 
9:56 PM
I like fastest code challenges. I'm disinclined to post them due to having to test them all myself. I'd like to be able to post some if there were a way around that. At present I lean towards "find the best output" challenges, where the code isn't timed but won't find a winning output without optimisation
 
@downrep_nation Yeah, but you can optimize for your compiler, and pick compilers based on that, etc. It takes a lot of programming knowledge to extremely micro-optimize it.
Also that ^^ I've thought of a couple but never gotten around to posting them. Same problem with KOTH
 
This is why I'm leaning more towards stack snippet KotHs too
 
i think it should only apply for challenges which generally take a large amount of time to compute. a millisecond fight wont be very fun
 
Oh, absolutely. That's why they're so much harder to do well
 
Yes it definitely needs to take long enough to make solutions easily distinguishable
 
9:58 PM
"this could be computed in 2 minutes or until after the universe ends. i advise writing a good algorithm"
 
I'd say if a naïve implementation takes a minute or two, that's the perfect difficulty level.
 
I'd want to know that even the winning implementation takes at least a minute, so I'd lean more towards a naive implementation taking much longer
Ideally a range of test cases so even a naive implementation can finish the easy ones in a minute, but the harder cases take ingenuity
 
something that scales terribly with a bad complexity
where n = 100 is a minute and n=120 50 years
if you dont write a smart solution
 
@trichoplax That would be an interesting challenge where you have a hard time limit, but are scored on how hard of test cases you can finish.
> find as many primes as possible in under 10 minutes
Idk
 
a time completed/cases completed with a minimum quota of cases needed?
that could be interesting
but people will optimize for certain cases
 
10:02 PM
Yes I like that way round too - if you can define the problem in terms of some input N, and the score is the highest N for which the problem can be solved in the allotted time
 
Would that be a or a ?
 
Although not everyone likes them, I quite like challenges where there is no input and you just optimise to one specific case, to see who can get the best time/best output in a fixed time/best output at all
@DJMcMayhem The tag wiki includes "Largest input successfully processed within a fixed time limit." and "Largest valid output produced within a fixed time limit (e.g. for number searches)."
 
3 mins ago, by DJMcMayhem
> find as many primes as possible in under 10 minutes
Would that be a decent challenge?
 
also i find the challenges shouldnt be math based because the solution might be smart but dont have too much to do with programming
 
Or am I overlooking something?
 
10:06 PM
another thing to consider is byte length
 
@DJMcMayhem Might be worth having an input for that one, to avoid hardcoding
 
golfing languages usually use pretty unoptimized prime functions
 
@downrep_nation I disagree. Being smart about math has everything to do with programming.
30
A: Is it a Proth number?

DennisPython, 22 bytes lambda N:N-1&1-N>N**.5 This is a port of my Jelly answer. Test it on Ideone. How it works Let j be a strictly positive integer. j + 1 toggles all trailing set bits of j and the adjacent unset bit. For example, 100112 + 1 = 101002. Since ~j = -(j + 1) = -j - 1, -j = ~j + 1...

 
@DJMcMayhem Everything to do with everything
 
well but it doesnt make your code smart, it makes your math smart
 
10:07 PM
Afaic, it's the same thing
 
if you want a smart mathematical way to solve things i find code-golf isnt the right place
but maybe thats because im pretty bad at it
 
The people that do best at it tend to have a good insight into both mathematics and the inner workings of the language
 
Dennis often just bit shifts 3 things and finds a solution that would take a naive implementation way more steps to complete
 
I think code-golf is even more mathematical then regular programming, since choice of algorithm is so important
 
is really cool but i dont think thats the point of the site, but im biased so i might be mistaken
 
10:08 PM
Like that Dennis answer I linked is one of the most impressive I've seen in a long time
 
@downrep_nation I think the point of the site is to enjoy competition, so as long as such solutions are explained well I think they contribute to the fun of trying to learn and do better
 
These answers will take the cake for the fastest code challenges every time
 
The nice thing about fastest-code (similarly to code-golf) is that what you expect to be the best solution often isn't
 
people will generally choose a low level language right
 
I had a best output challenge (which is similar to fastest-code in that without an optimised program you'd have no hope of finding a competitive output) and python competed well with C++
It was more about the approach than the language
 
10:12 PM
Thats why i prefer them over fastest code because there is an even playing field
i feel like code-golf is a playing ground for esoteric languages and interesting ideas
 
@DJMcMayhem I'm thinking about creating a sister site. Timing is harder. The server can only time one submission at a time.
 
@downrep_nation The right algorithm can make much more difference to speed than the choice of language
 
@Dennis Out of curiosity, how long did it take you to come up with that Proth algorithm? Was it original, or did you get the idea somewhere?
 
@Dennis Also generally where does your mathematical knowledge come from?
 
@Dennis Would you need to have a fairly short maximum time before terminating?
 
10:16 PM
Let's everybody ping him at the same time. :P
 
@DJMcMayhem If you're talking about the n&-n part, that's a well known bit hack.
@downrep_nation I have a math PhD.
 
@Dennis Do you pay the same for your online processing power regardless of how much is used?
 
@trichoplax Sure, but a well tuned fastest code challenge shouldn't run for that long. Of course, if the expected run time is minutes or hours, a web server might not be the best option.
@trichoplax Yes, I pay per wall hour, not CPU hour. Having the CPU constantly running at 100% doesn't cost any extra.
 
Interesting. So you could set it up to do something else whenever it is not in demand?
 
Unfortunately, timeitonline.net is already taken. I'm considering itonline.run for Tio! 2.0, with try.itonline.run and time.itonline.run subdomains for both services, with SSL and everything.
@trichoplax My plan is to pay for a second server that the main one would connect to to time submissions.
Could also be used for load balancing when no submissions are being timed.
Results would be cached so when somebody accesses the service to verify the score, the program wouldn't have to be run again.
I enjoy participating in fastest code challenges every once in a while, but the delay between updating my answer and the official rescore is a bit off-putting.
 
10:26 PM
Would it be feasible to run TIO and the timing on the same server, and just queue up golf code to be tested whenever there isn't something being timed? Perhaps delaying timing by enforcing gaps between each one to allow catching up with queued golf code?
 
Eh, if I have a maximal run time of one minute, I'd have to freeze the entire server during that time.
 
23
Q: The alphanumeric spiral

AdnanThe task is very simple, when given an input, output one of the following spirals: Input = 1 gives a spiral with the letter A beginning in the top left corner: A B C D E F T U V W X G S 5 6 7 Y H R 4 9 8 Z I Q 3 2 1 0 J P O N M L K Input = 2 gives a spiral with the letter A beginning in the t...

Is this new challenge a duplicate of this one?
 
its only related
im trying to solve it but its too complex for a non literal solution..
the increment flip is really annoying
 
@zyabin101 Sure. You can use my cmc ideas
 
@Dennis Alas not... I've since edited it to make it even clearer but I'll be bearing this in mind for future challenges
 
10:35 PM
Could be used of KotH as well, but it gets more complicated. Another option would be to get a server with multiple cores and dedicate one core and part of the RAM to timing, but that's also more complicated.
 
Raspberry Pis are down to $5 for the cheapest model...
I guess you still have to pay for the internet connection if you host a raspberry pi cluster though
OK for a KotH cluster that you just run yourself and post the results, but not so much for leaving it online 24/7
 
@DJMcMayhem I disagree. I cannot math for my life yet I'm fine at programming
 
Greetings
 
10:50 PM
Greeting to you, fair golfer
 
How's it going?
 
Which would be a better syntax for function definition? f∷exp or f←exp ? (pretzel)
 
@IsmaelMiguel decent
writing rules for a tf2 tournament
 
IMO. To me marks a signature
 
10:52 PM
@Cyoce Depends on how many bytes the arrow uses
 
@IsmaelMiguel they're both 1
 
@EᴀsᴛᴇʀʟʏIʀᴋ I'm not really a fan of that particular game, but it is good to know you're "decent"
@Cyoce 2nd one looks prettier in my opinion. Also, it has an arrow pointing to "where" the exp is "going"
You know what I mean, I hope
 
Oh yeah. I forgot to mention. This would also be used for a type signature. For example, 00←exp or 00∷exp means the function takes two arguments, f←exp or f∷exp means you're making a function called f, and 00f←exp or 00f∷exp means you're making a function called f that takes two arguments
 
I still prefer the arrow
Everytime I see ::, I think of PHP
 
Why?
 
10:56 PM
@IsmaelMiguel ;_; y u relat ches to PHP
 
@Downgoat I don't understand
 
@IsmaelMiguel cheddar uses :: for casting
e.g. String::123
 
@IsmaelMiguel "Why, good sir, do you relate my language Cheddar to that abomination PHP?"
translation ^
 
@trichoplax Local internet is rather crappy. Way too much downtime for a web service.
 
PHP uses :: to access static method/values/constants in classes
 
10:57 PM
^ ruby too
@Cyoce latter
 
I don't do ruby
 
@Dennis Great to live in a world where that doesn't have to stop you running a hired server from elsewhere. :)
 

« first day (2023 days earlier)      last day (2824 days later) »