« first day (1786 days earlier)      last day (3043 days later) » 

3:00 AM
I just thought of an idea for a challenge: "prove" the Law of Large Numbers wrong, .
Then I immediately threw it away because underhanded.
 
is best handed.
 
@Doorknob冰 I like chess, but strict time limits kinda suck the enjoyment out of it IMHO.
 
3:05 AM
@Dennis ¯\_(ツ)_/¯ It adds another element to the game, especially at really fast time controls.
At a certain point (like ½+0, which ProgramFOX just implemented on lichess) it begins to become a contest of "who can throw pieces around with some semblance of knowing what they're doing the fastest," though...
 
ProgramFOX is a cool dude
 
One hoopy frood
 
Meh, if you don't have enough time to think your strategy thorugh, you might as well play rock-paper-scissors-lizard-Spock.
 
> RoodBonk
:D
 
@Dennis My favorite is the two-handed version.
 
3:08 AM
@Dennis Yeah, that's why I typically find time controls such as 5+8 more enjoyable than crazy stuff like 0+1.
 
I wondered if the FOX in ProgramFOX was related to the very unfortunate news network, an acronym, or a reference to the animal.
 
5+8 is still way out of my comfort zone.
The slower, the better IMHO.
 
Yeah, lichess goes anywhere up to 180+180 and has correspondence (n days per move) also.
 
180+180 sounds good. I don't own a chess clock and prefer to play with actual pieces, so I mostly play without time limits...
 
I don't know how to play chess and I don't care enough to learn.
 
3:12 AM
I learned it when I was three yo. One of the few things my dad and I enjoyed together.
 
Aw.
 
Three, yo.
 
Yup. Chess, guns and computers.
2
 
Uh, what?
 
stars just for the sake of total lack of context
 
3:17 AM
Things I did with my dad. Play chess, fire guns and toy with computers.
 
Did you discharge firearms at the age of three? o_O
 
Haha, no.
I think I started with air pressure rifles when I was eight-ish.
 
Was that when you were in Germany?
 
Yeah. My dad was member of a firearm club and went to shooting practice every other weekend.
 
So I take it private citizens can own guns in Germany? For some reason I thought that wasn't the case.
I'm probably thinking of a different country
 
3:21 AM
Goodbye for now.
 
You can, but there are laws. For example, you have to pass a written test before you can even buy a gun.
IIRC anyway. I never owned one in Germany.
I have a shot gun now, but that's just for protection.
 
I wish that were the case here. There's a supermarket near my parents where you can walk just a couple aisles from childrens' toys to assault rifles. ._.
Do you live in a fairly safe area?
 
Well, a civilian can't own an assault rifle in Germany. There are limits. My dad was into old-fashioned guns, which you had to load with black powder and stuff. Jack Sparrow style.
 
Like muskets? :O
 
Pretty much.
 
3:26 AM
I don't think I've even seen a gun like that except in a museum.
(Not that I've seen a bunch of guns or anything)
 
I don't think there are truly safe areas in third world countries. But I used to do shooting practice with my shot gun in my back yard until all the kids of the neighborhood had seen me. Nobody got even near my house since then.
 
Hahaha
 
what in the world
 
myfile.txt 2/10 not very golfy.
 
> the language should be "ruby", and the name should be "booleans".
...
 
3:37 AM
Searches related to 冰 site:codegolf.stackexchange.com
冰毒
冰雪奇缘
冰与火的青春
冰与火之歌
毒品冰壶
冰壶图片
吸毒冰壶
冰毒冰壶
冰壶游戏
冰果
 
translate en: 冰毒 冰雪奇缘 冰与火的青春 冰与火之歌 毒品冰壶 冰壶图片 吸毒冰壶 冰毒冰壶 冰壶游戏 冰果
(from zh-CHS) Ice Ice romance song of ice and fire-ice and fire of youth drug drugs curling curling curling pictures of ice curling, curling game ice fruit
 
> youth drug drugs curling curling curling pictures of ice
Ah to be young
 
hahaha
 
I can't read a song of ice and fire without thinking about South Park.
 
> ice fruit
ice fruit is nice fruit
 
3:47 AM
17 crickets later
 
5.4 tumbleweeds later
 
67 laters
 
I've never seen a tumbleweed, but there are crickets in my yard right now.
 
You told that story here before, didn't you? :P
 
O_O
I did
oops
 
3:52 AM
i am dennis
 
what I didn't just post the same thing
ಠ_ಠ
 
Everyone should be aware of the dangers of radioactive tumbleweeds.
This story should be repeated at least once a month.
 
I did not hear this story before.
It is quite amusing too.
 
@Dennis No flaws in your logic.
I have yet to find a Kannadian word that actually uses ಠ.
 
Suddenly the number of tumbleweed stories on the page goes from 3 to 0.
Nice government hush-up job.
 
3:56 AM
translate: ಠ
...
translate en: ಠ
 
from Kannada: nice try
 
translate es: does this still work?
(from English) ¿Esta todavía funciona?
 
Surely there are some Kanadians who use PPCG.
 
The Bingeling doesn't grok Kannada.
 
So many odd words in that sentence
 
3:58 AM
-_-
 
Translate doesn't like edits
 
translate ja: The Bingeling doesn't grok Kannada.
(from English) Bingeling は、カンナダ語をむずかしきます。
 
The comma is superfluous
 
Wow, it translated "grok" and "Kannada"?
 
Wtf? Bing recognizes and translates grok?
 
3:59 AM
translate ja: grok
(from English) 完全に理解します。
hahaha
translate en: 完全に理解します。
(from Japanese) Fully understood.
wow, I'm impressed
 
It used the kanji 語, so it even recognizes that Kannada is a language.
 
Nicely done, Bingeling.
 
translate: むずかし
(from Japanese) Difficult
That's what I thought
Oh wait
translate: むずかしき
(from Japanese) Muzukashiki
 
I wonder if it does interrobangs
translate es: What‽
(from English) What‽
 
translate: むずかしきます
(from Japanese) Difficulty can be
@Doorknob冰 It appears in the sense that it doesn't just give up immediately when it sees one. :P
 
4:03 AM
translate en: ⸘Qué‽
(from Spanish) ⸘que‽
... nope >.<
 
Good thing translate is a mod privilege. Others might use it improperly.
 
haha
 
looks around innocently
 
Clearly Martin is guilty of translate abuse.
 
translate ja: door knob snowflake thingy
(from English) ドアのノブのスノーフレークのブツ
translate: ドアのノブのスノーフレークのブツ
(from Japanese) Door knob snowflake thingy
\o/
 
4:05 AM
It's not actual Japanese though
ドアのノブ -> doa no nobu (doorknob)
スノーフレーク -> sunōfurēku
 
I'm not sure what you're getting at.
 
It didn't translate anything to native Japanese words
 
I assumed the ツ meant it wasn't being serious.
 
hhahahahahahaah
 
¯\_(ツ)_/¯
 
4:10 AM
translate: ¯\_(ツ)_/¯
(from Japanese) ¯\_(ツ)_/¯
 
At least it got the language name...
 
haha, indeed
 
Aaand the blue streak is broken. :(
 
4:12 AM
Clearly we need to give @Quill a diamond to rectify this.
 
one day maybe
until then, a question, I have (I didn't even star that wtf)
 
Ask it, you should
 
Yoda, are you?
 
before accepting, wait, how long should I?
 
 
4:13 AM
@Quill-HATMANIAC Usually I just wait until there hasn't been a new answer for a week or so
 
Seven days, you must. Patience, young Jedi.
 
@phase I pity you.
 
okay no worries :P
 
Though that looks quite funny.
 
@El'endiaStarman now we sware at him in japanese
 
4:13 AM
Some people accept way earlier, but typically that's seen as not good... "PPCG etiquette"
 
@El'endiaStarman I thought it was a new encryption algorithm or something
 
Wait, so, that's how you always see the shrug emoji?
 
@Doorknob冰 I'll start a hat se and get mod there :P
 
What about ಠ_ಠ? Or (╯°□°)╯︵ ┻━┻?
 
バカのに新しい
 
4:16 AM
translate en: バカのに新しい
(from Japanese) Stupid even though new
o.o
 
わかりませんか?
 
@Doorknob冰 I see those just fine
 
translate en: わかりませんか?
(from Japanese) Can you tell me?
... tell you what?
 
> just file
 
わかりますー> to understand
 
4:17 AM
0
Q: Rules for Multiple Inputs

geokavelThis issue has come up after receiving an answer to one of my questions. For the sake of clarity, I asked programs to take in two pieces of input. This answerer found it easier to read the two inputs in as one string and to not put a separator between them (since been changed). 1) Is it reasonabl...

 
translation: don't you understand
 
@Dennis just directory
 
6
Q: What is toilet?

PeterIs this toilet: Or maybe this (room): Or should I just use "a toilet" and "the toilet". I found similar question but it doesn't answer my question.

lol
 
ok seriously stop abusing toilets
4
 
4:23 AM
ok seriously stop abusing "ok seriously stop abusing"
 
[gasps] Self-reference! Down that path lies unknowable truths!
 
ok seriously stop abusing "ok seriously stop abusing "ok seriously stop abusing""
 
You went too meta too soon.
 
@Quill-HATMANIAC The か and question mark are redundant
 
4:26 AM
どっちでもいいよ
 
translate: どっちでもいいよ
(from Japanese) Which one will be fine
 
closer to either rather than which
that's why でも is in there
 
Yeah
か is more formal though
 
4:49 AM
@Dennis Are there any verbs in Spanish that have an accent in their infinitives, not including verbs ending in -ír (oír, sonreír, etc.)?
(Asking for a PPCG challenge. :P)
 
tacõ - to vigorously make a taco
 
I just looked through this whole list and found nada intro2spanish.com/verbs/listas/all.htm
 
@Doorknob冰 no, only ir verbs would have an accent in the infinitive
 
@es1024 And only on the second-to-last letter?
 
5:17 AM
Is it possible to pass a function as an argument to a function in C++?
@Doorknob冰 ^
 
@AlexA. I know it's possible in C, so it should be possible in C++. But did you mean passing another function as an argument or passing itself as an argument?
 
Passing another function
 
@Doorknob冰 yes, stress falls on the last syllable for infinitives
i is the only weak vowel used for infinitive endings, hence why only ir verbs can have accents in the infinitive
 
I think in C it works like the following:
int a_func(int num, int b_func(int))
{
    return b_func(num);
}
 
int f(int x, int (*g)(int)) {
    return (*g)(x);
}
Looks like it has to be with pointers ^
361
A: How do you pass a function as a parameter in C?

NiyazDeclaration A prototype for a function which takes a function parameter looks like the following: void func ( void (*f)(int) ); This states that the parameter f will be a pointer to a function which has a void return type and which takes a single int parameter. The following function (print) ...

 
5:26 AM
Well, my teacher gave me that code without pointers (I edited the variable names for clarity)
 
In C?
 
Yep
 
In your first and last code examples, the * is not compulsory. Both the function parameter definition and the f function call can take f just as is without *. It might be a good idea to do it as you do though, to make it obvious that parameter f is a function pointer. But it hurts readability quite often. — Gauthier Feb 22 '12 at 12:52
That explains it then
Even better, since this is C++ rather than C, I can use std::function<int (int)> with #include <functional> in the C++11 stdlib.
Thanks for your help, @Sherlock9 :)
 
Not a problem. It's one of the few things I remember about C, given that the exam was such a troll about it :P
 
Haha
 
5:33 AM
In C++, it's often easier to use a template when you need to pass a function-like parameter
Then you don't have to write any sort of function type.
 
I have no idea how to use templates
None at all
 
What's your use case?
 
Learning
I haven't had to really use C++ for anything
 
I mean use for function pointers.
 
Basically making a stack of functions
kind of
 
5:35 AM
That's a weird case where a template wouldn't help anyway.
 
Okay
Isn't there a bigint type in Boost?
 
I have never Boost
 
Incidentally, when I say the exam was a troll about passing functions as arguments, and that I had to change the variable names. It really was a troll
int a(int d, int b(int))
{
    return b(d);
}
int d(int a)
{
    return a * a;
}
void main()
{
    printf("%d", a(19, d));
}
 
The hard part is calculating 19*19!
 
Blergh
I just got really confused on the a,b,d bits, cause the original question looked a bit like this
int a(int d, ...)
{
    return b(d);
}
int d(...)
{
    return a * a;
}
void main()
{
    printf("%d", a(19, ...));
}
And fill in the blanks
 
5:41 AM
LOL I thought they were variadic functions.
 
I... what?
googles Ohhh. No, just confusing
 
 
2 hours later…
7:26 AM
Black folks reacting to street magic is the best thing since slices bread.
 
>__>
 
 
2 hours later…
9:05 AM
@quartata Maybe. I'd still like to find someone else who has LabView and can test that it works, because it doesn't seem to have enough logic to handle all the cases.
But the scoring is really incomparable with bytes, and should only be considered for
@AlexA. It's about as rude as the C-word which someone on radio once accidentally called British politician Jeremy Hunt.
 
9:36 AM
I got Onion Knight, but I don't even know which of the two xkcd challenges it's for. Read is more popular and active, but Convert has been very quiet for much longer.
 
9:49 AM
There aren't many people here at the moment.
 
10:06 AM
typical Sunday
 
I’m here
 
10:25 AM
@MartinBüttner you could add a non 4-digit year example to the "read the date" challenge
 
the format will always be YYYY-MM-DD
 
I know, but that would show it
 
oh right, I thought I already had a 0000 test case.
how about this:
0123-12-30
1 2 3 4
0 1 2 3
4 1 2 3
 
sure, that's good
 
@PeterTaylor @quartata Yeah, I accepted Eumel's answer because I couldn't see anything wrong with it. Should I take it back while people figure out how to test these answers?
 
10:31 AM
@Sherlock9 It's simply not scored in bytes, so it's score is in no way comparable to any other answer.
 
Ah hell
Well, what do I do for now?
 
unaccept it/accept Peter's
 
Well, at least until we can work out a decent scoring system
9
Q: Calculate the Kronecker symbol

Sherlock9Relevant links here and here, but here is the short version: You have an input of two integers a and b between negative infinity and infinity (though if necessary, I can restrict the range, but the function must still accept negative inputs). Definition of the Kronecker symbol You must return ...

 
XD
21
Q: Is q a quadratic residue of n?

Sherlock9Given two inputs q n determine if q is a quadratic residue of n. That is, is there an x where x**2 == q (mod n) or is q a square mod n? Input Two integers q and n, where q and n are any integers 0 <= q < n. Output A truthy or a falsey. Optionally, print any (or all) x that is x**2 == q (mod...

Here I have a question with multiple 9-byte answers
Is it alright if I accept the oldest one?
 
10:40 AM
well, the one that reached 9 bytes first
 
So many higher math ones...
 
15
Q: Write out the Thue-Morse sequence

Sherlock9There's quite a few challenges on this site that ask you to print out a sequence, and this is no exception. (The following explanation of the sequence for this challenge assumes the symbols in the sequence are 0 and 1.) The recursive definition of the Thue-Morse sequence is that T_0 = 0 T_2n ...

Ah nuts, Jakube made their 6-byte answer a CW
I forgot what the rules are for CWs
 
15
Q: Map string to Hilbert curve

wizzwizz4Let's map some strings to 2d space, fractal style. Your task is to compute a Hilbert curve and lay a string along it. Task The task is to take the single-line input string, and lay it out along a Hilbert curve big enough to contain it, but no bigger. Try to make the byte count as low as possi...

Same score Sherlock!
 
Nope, just upvoted
You know I was just thinking that I should really find a good question to answer :D
 
@Sherlock9 You mean...
d:-D
 
10:55 AM
Well, give me a few hours. Hilbert curves are a pain in the butt and I know this from trying to draw many times before
 
@Sherlock9 if it's the shortest, accept it.
 
Does anyone have any tips for creating a 2d esolang?
 
@MartinBüttner Alright, thanks!
 
@wizzwizz4 closed as too broad ;)
what kinda of 2D esolang?
(btw, we have an esolang chatroom for this: chat.stackexchange.com/rooms/27364/…)
 
SuperMarioLANG, loosely based on MarioLANG.
@MartinBüttner Thanks for the link to esolang chatroom!
 
11:04 AM
@wizzwizz4 heh
Oct 31 at 14:06, by Martin Büttner
@PeterTaylor actually, the working title is Super Mario Lang
 
@Sherlock9 in the Thue-Morse sequence do the output symbols have to be single chars or can they be multiple chars, like 1 -1 -1 1 -1 1 1 ..
 
They can be multiple chars
 
rule stretching number 2: can be they a different pair for each input number?
 
You mean, 1 -1 -1 1 vs -1 1 1 -1?
 
4 -4 -4 4 for n=4
5 -5 -5 5 -5 for n=5
 
11:06 AM
Interesting :D Go ahead
 
@MartinBüttner D'oh!
 
Well, I haven't really started working on it, but I've got some ideas written down for it. I'm currently working on something else. So if you wanted to you could certainly beat me to it. ;)
 
(also you don't state explicitly that the 2 symbols have to be different :D, but I can guess that one)
 
Or we could join forces and create it together (provided our ideas for the language work together).
Although I won't be doing much coding for it any time soon, I think.
 
@MartinBüttner Hmm... I have a working draft of the specs, and I'm trying to create a fun-to-play "Hello, World" level.
 
11:10 AM
ah right. if you want to share your draft, I'd be happy to read it.
 
@randomra Yes, but I really should have ;)
 
@MartinBüttner How do I share it?
 
what is it? a plain text file?
 
It's actually a binary file, containing plain text and ESC character codes.
And some extended ASCII
 
try it anyway?
 
11:16 AM
Do you have GitHub? Because I could use the Gist feature.
 
Gtg :-(
 
(gists are also accessible when you don't have a GitHub account, unless you want to make it private of course)
 
added the rule stretching J solution as comment:
{.(,-)^:] works for 9 bytes with some rule stretching (which has been allowed). E.g. for 5 it outputs 5 _5 _5 5 _5. (Added only as a comment because of the rule stretching.) — randomra 3 mins ago
 
Excellent @randomra
Man, I am going to have to delay that Hilbert solution for a few more hours. I forgot I have to be somewhere this evening
Back soon
 
@wizzwizz4 I don't really understand the layers, and the Hilbert curve, but my draft also involves super mushrooms and changing between 1 and 2 block height
 
The Hilbert curve is basically a way of getting each layer (which could be a level in its own right, almost) into one line. Imagine a cube. Each layer is a cross-section of the cube.
 
ah okay. why the mapping to 1D though?
 
Because then you can have one layer per line
 
and entirely unreadable code :P
 
11:45 AM
And you can have all the movement on its own layer, with conditions and a new character to command mapping
Thus cramming more features into each byte
508 as opposed to 254
I hope to make this a glorified Turing Machine
And, of course, for big levels you can DEFLATE it.
 
what do the pipes do?
 
They act a bit like elevators, just not quite. You can go through them.
If you have a 1-way platform character in a pipe, it's interpreted as a 1-way pipe section.
 
k. I think my plan for those is a bit different (although they'll probably be usable in the same way)
 
If anyone wants to help with the implementation, and get some rep while doing so...
16
Q: Map string to Hilbert curve

wizzwizz4Let's map some strings to 2d space, fractal style. Your task is to compute a Hilbert curve and lay a string along it. Task The task is to take the single-line input string, and lay it out along a Hilbert curve big enough to contain it, but no bigger. Try to make the byte count as low as possi...

does some of the tricky stuff
 
I realised ;)
one of my main design goals (and the reason I haven't started working on this yet) is that I want to be able to define a 1:1 mapping between tiles from SMB1 and commands, such that the levels can actually be rendered and look like a real level (and vice versa... real levels should be code, even if it doesn't do anything meaningful)
 
11:50 AM
Comment on the gist or reply to this comment while I'm gone, or I won't read the comments.
 
I'll just wait ;)
 
In my implementation, each level will be valid, but there are many types of Boos... and no Goombas or Koopas yet!
 
yeah, I'm not sure yet what I'll do about enemies
 
 
1 hour later…
1:07 PM
Well, it's been a while, but hello.
 
1:29 PM
@AlienG: You’re always welcome, even after periods of silence.
 
@Timwi Great. :D
 
1:45 PM
@aditsu can we get mz or ez as transpose along anti-diagonal? W%zW% is a bit annoying.
 
how are people abusing toilets?
 
2:18 PM
you don't wanna know.
 
cat
2:38 PM
am i right in thinking mods generally despise empty/unused tags? i don't understand why there are 5 tags with which 0 posts are associated
 
Are there?
Tags without questions associated get auto-deleted within 24 hours.
 
heh, I just found an old-ish challenge which I thought could use a CJam answer... after posting it, I realised that I had already answered that challenge in Mathematica (relatively shortly after starting being active on PPCG)... and looking at that Mathematica answer realised I could golf it from 28 down to 20 bytes o.O
 
3:23 PM
Darn, @wizzwizz4. By the time I finished my answer, @MartinBüttner beat me to it. And he got the bonuses XD
If someone could help me golf this answer, I would very much appreciate it.
0
A: Map string to Hilbert curve

Sherlock9Python 3, 469 bytes The way this works is that I make the Hilbert curve using a Lindenmayer system and follow the left, right and forward instructions along an array of strings. There are probably many ways this could be golfed better, though; especially in the conditionals and in making the arr...

 
Don’t know Python well enough to help you :(
 
That's alright. Frankly, I'm just glad I finished the answer for the moment. Heavier golfing can wait
 
0
Q: Have you been naughty or nice this year?

AdnanIntroduction Santa has too many names to process, and needs your help! He needs you to write a program or a function, which outputs nice, naughty, very naughty or very very naughty. To determine how nice or naughty someone is, Santa had developed an algorithm: Nice (division, math): First of a...

 
3:39 PM
@Sherlock9 The if g==3: part looks like it could be golfed. Would this work?
   if g%2:y+=g-2
   else:x+=1-g
 
4:17 PM
@Dennis Ahh, that helps a bunch. Thanks!
 
I'm not sure how you handled gs2 and CP437, but pl will need that treatment too
You could make input as a hexdump and use xxd also if CP437 is too much trouble
:3
 

« first day (1786 days earlier)      last day (3043 days later) »