« first day (1637 days earlier)      last day (1459 days later) » 
00:00 - 19:0019:00 - 00:00

12:01 AM
Midnight, finally.
 
I've been thinking the same thing all day.
Hit the rep cap before I even woke up this morning.
 
For once, it was the voting limit that bothered me.
 
Oh, I want the rep. :P
 
12:13 AM
@Dennis Do you speak Spanish?
 
0
Q: Pushing my Hackerrank solutions to github

user5471Is there a way to push my hackerrank solutions directly into my github repo ?

 
I hate having to use a custom close reason for something that's blatantly off topic. I really don't think sending the latest one off to SO is going to be productive, though. It'd be nice to have a sub-reason listed exactly like the initial off topic description:
> This question does not appear to be about programming puzzles or code golf within the scope defined in the help center.
Sometimes that's all that needs to be said.
 
12:29 AM
^^ That would be good.
 
12:40 AM
@AlexA. All day. :P
This isn't about the averages, is it?
 
1:09 AM
I'm giving up if anyone wants to continue where I left off I've left it here
 
@Dennis ? No?
@Dennis Makes sense. You must have a way with languages, given that you're from Germany, speak flawless English, and live in a Spanish-speaking country.
@Geobits SO used to have a close reason like that but one day it vanished.
 
1:33 AM
Now SO has only close vote reasons that direct users to Stack Overflow?
 
Imperative... Functional… Object-Oriented... Symbolic. Long ago, the four programming paradigms lived together in harmony. Then everything changed when the Golfing Languages attacked. Only the Geobits, master of all four paradigms, could stop them. But when the world needed him most, he vanished.
9
 
@AlexA. I can write English (not sure about flawless).
I wrote moco in an answer to that question, which is Spanish for booger.
 
1:59 AM
0
Q: Deep thought: Levenshtein distance

Stephen VorisSo, blatantly plagiarizing from inspired by this challenge and its sequel, I thought I'd add another. The text to match: What do you get when you multiply six by nine The result your function/program/etc. should print or return: 42 An online calculator for Levenshtein distance can b...

 
Oh dear, it's the flags craze all over again.
 
... I sure hope Lev dist doesn't become the next trolling
 
I think, if you were really clever about it, this kind of challenge could be interesting. I don't think what we have so far is that clever.
 
I don't know if I ever put this in the sandbox, but I had an idea once for
The challenge is comprised of two sub-challenges. Your goal is to write two programs to solve the challenges, minimizing not only their length but the distance between them.
I believe the scoring was length of longer program + distance to shorter program
 
We had a proposition like that in the sandbox. Someone pointed out that if(1){code1}else{code2} was a pretty cheap solution to the distance problem.
 
2:09 AM
I actually think that particular answer would be discouraged under my scoring method.
 
Yeah, I think so. I think the other proposal was some kind of product of distance and shortness, so it was a bit more gimmicked. I can't find it right now.
 
@PhiNotPi We've had a challenge like that with twin primes and Collatz
8
Q: Pair-golfing Twin primes and the Collatz sequence

randomraThis is a new kind of challenge inspired by the Recover the mutated source code problem. You should write two programs or functions both in the same language. The first one should solve Task #1 and the second one should solve Task #2. Your score will be the sum of the longer program and the Le...

 
I had the idea first.
 
 
1 hour later…
3:18 AM
What the... did I just become the Avatar or something?
3
 
3:28 AM
Programatar actually sound pretty cool.
 
@Dennis I'd say it's good--I thought you were American.
@Geobits Geobits: The Last Code Bender
5
 
Geobits: The Last Rule Bender
 
He's certainly not the last. ;)
 
3:44 AM
Hmm my (40, 40, 40) Tokyo (Shinjuku?) looks a lot like Geobits' but granier, and takes 10 times longer to generate :/
 
Wat
 
@AlexA. In a way, I am.
 
:O German-Paraguayan-American?
 
You guys are called estadounidenses here. Unitedstatesler or something like that.
 
Haha I definitely haven't heard that before, but I like it.
 
3:55 AM
I always thought it was a little odd that American means "from the USA", given that America is the continent. The proper demonym is US-Amerikaner in German.
 
I think the American == from the US equivalence is mostly due to US arrogance. :P
 
Probably. But as long as you produce 99% of the movies, TV series and internet content I consume, I forgive you. :P
 
Oh behalf of my country, I accept this.
 
@AlexA. Poor Canada
 
They're fine. They have maple syrup or whatever.
 
4:10 AM
Maple syrup is really good btw.
 
Actual maple syrup is good. Unfortunately the most common "maple syrup" in the US is actually just flavored corn syrup.
Come to think of it, I think a lot of the most common US foods are just corn syrup...
 
Honey?
 
A lot, not all. ;)
Foods, that is. I mean honey is excluded from that. I think most honey is actually honey.
 
When I read corn syrup in the ingredients, I already know where it's from. :)
 
It's certainly a reliable way to tell, however unfortunate.
 
4:23 AM
@AlexA. I guess you could call it arrogance. Or realize that most countries do the same thing. The United States part is like the Federal Republic part for Germany, or the People's Republic for China, etc. Nobody says them, it's just German or Chinese.
The only arrogant part came long ago, when we namedourselves after the continent itself ;)
 
We namedourselves!
 
Yep. It's frustratingly difficult to edit messages longer than the input field on my phone.
 
We named ours elves?
 
@Geobits That's what I meant
 
Well I named mine elves. I assumed we all did.
 
4:28 AM
Yeah, you named yours elves Devon or something, right? :P
 
Singular elf in that case.
 
Geobats name his elve Devon
 
elve looks like a motorcycle
4
 
Geobets: Geobits in Las Vegas
 
4:31 AM
Only been there once, for a couple weeks. Nice (?) place.
 
Geobots: Drones that chat and program in Java
 
Geobot should be singular, too. Long story, but you're basically right.
 
Geobats: Responds to the Bat Signal, i.e. chat pings
Geobuts: Self-explanatory.
 
Geoburt - dirt flavored yogurt
 
Well you guys look like you can handle this without me. I need sleep :)
 
4:35 AM
Aw, okay. Goodnight!
 
I'm not really sure whats happening
 
Fun fact: The question mark in b?t can be replaced with any vowel (aeiou) and still form a valid word. What other three-letter patterns share this property?
 
h?t
 
@Calvin'sHobbies Me always in The Nineteenth Byte
 
4:36 AM
looks up het ... oh
 
@Sp3000 hahaha I actually didn't know that, I forgot about the letter e
 
What's a tet?
 
Vietnamese New Year celebration?
According to Google
 
I was thinking tete-a-tete
 
That's French though
 
4:38 AM
It's used in English conversations though, loanwords
But yeah extra e
 
qu?te
 
Big bog bugs begged for bags
 
b?g works - what's a quute? XD
 
What isn't a quute?
 
4:42 AM
quate has no definition but is still valid?
@Sp3000 a quaint lute
 
@Calvin'sHobbies Has a definition in the Scrabble dictionary
 
p?tted
 
patted petted pitted potted putted -- nice!
t?n
 
I guess p?tting would also work, and maybe with a bit of a stretch p?ttings
Nice :)
 
just p?t would work, wouldn't it?
 
4:49 AM
Yep
 
I was thinking p?n, but I don't think pon is a word
 
[bghp]?t
 
Maybe if you're playing mahjong
"also 'pon, 1550s, shortened form of upon." Hmmm
 
English speakers were really lazy in the 1550s.
 
4:54 AM
yeah, that sure changed ;)
 
ohrly?
 
idk
 
tru dat
 
And suddenly I'm reminded of the earlier discussion of acronyms.
 
\(^.^)/
 
4:55 AM
\_(**/)_/
(ô.ô)
Anyway, I'm going to get my lazy Unitedstatesler geobutt to bed.
 
Is there any set of 25 valid words with the form CVCVC for 3 constant consonants and 2 variable vowels?
 
Have a good night, everyone! (Well, everyone except for Sp, who should have a good day.)
@Calvin'sHobbies Nope
 
There's not many words with ?u?u? to begin with
 
5:59 AM
@Dennis I prefer to use USian in English.
@Calvin'sHobbies The best you can get with SOWPODS is 15 for M.N.S : MANAS, MANES, MANIS, MANOS, MANUS, MENES, MENUS, MINAS, MINES, MINIS, MINOS, MINUS, MONAS, MONOS, MUNIS
 
6:21 AM
What happened over night ? I was owning the starboard and now its all gone..
 
@Optimizer It was BrainF***ing time
 
It really was
 
 
2 hours later…
8:10 AM
0
A: Sandbox for Proposed Challenges

MoartemSave the bunny! This King of the Hill competition is about a 2D flawn populated with bouncing balls and bunnies. The balls will collide with each other and the boundaries. If a bunny gets hit by a ball, it´s dead teleported away (for cuteness sake). Your task is to write a AI for the bunnies, su...

 
9:05 AM
0
Q: Make the Stretchy Snakes Kiss

Calvin's HobbiesA stretchy snake looks something like this: <||=|||:)~ Each separate sequence of vertical bars (|) in a stretchy snake, known as a stretchy portion, is individually extendable to twice its width, and is drawn with alternating slashes (/,\) once extended. The particular snake above has two suc...

 
^ Probably the most controversial question in recent times.
Where is the PPCG censor board ?
 
har har
 
 
3 hours later…
12:00 PM
@Optimizer It is delegated from the HNQ readers
 
12:14 PM
@MartinBüttner for Retina an "exit on match" while loop might be nice e.g. [`.... ]`condition_regex for cases when you can't stop easily the effect of the loop regexes
 
sounds useful
feel free to open an issue on github
 
will do, idk how much it helps for golf but it is often convenient
 
Can stretchy snakes give consent?
 
@orlp If one isn't stretching, it can be sketchy.
If both are stretching they are clearly consenting.
 
@randomra The other one always has an option to stretch in the opposite direction.
If it is not, then I think its not sketchy
@Optimizer and then unstretch back
 
12:29 PM
@randomra you can link to yourself? cool
 
Apparently, you can talk to yourself too.
@Optimizer PPCG is full of forever alones!
 
@Sp3000 sorry, forgot about your ping. no I don't have an optimal solution for multiplexer yet. my best attempt was 272.
 
@MartinBüttner what are the rules surrounding popularity contests without clear winning conditions?
 
what's not clear about winning condition? most votes wins.
there's a meta post about vague pop-cons though (inspired by that challenge): meta.codegolf.stackexchange.com/q/1947/8478
 
a while back I suggested a challenge where I'd add graphical output to the GOLF, allowing people to write graphical demos, and making a popularity contest of the coolest demo in under 4KiB
but it was met with resistance, as not having a clear winning condition
 
12:43 PM
more like, not a clear objective. I'm not sure if a challenge as open as tweetable maths would still be acceptable
 
Jul 18 at 19:58, by orlp
'output the most interesting image in a 1kB GOLF binary'
@MartinBüttner the following messages show resistance ^
 
yeah. it's likely to get closed as too broad these days.
 
=/
I think it would be a cool challenge
 
(I'm not gonna be one of the close voters though, so don't ask me.)
 
@orlp GOLF has merit in scoring algorithms precisely, I think in a pop-con it loses this advantage, and is basically the same as image in X language, Y bytes (still could be interesting this is just one viewpoint)
 
1:06 PM
Personally, I think that questions like Tweetable Maths should still be on topic here. A pretty insane amount of golfing went into several of those answers.
 
1:23 PM
I haven't really played with GOLF, but intuitively, it seems there'd be a big difference between three 140-char functions in C and 4KiB of GOLF.
 
yeah if we had given tweetable maths a 4KiB limit, then it wouldn't really be much of a programming challenge. The size limit should be set low enough that almost every interesting submission barely fits.
 
1:54 PM
@MartinBüttner My empirical rule of thumb is that if the question is closed quickly enough then the site policy is followed, but it's open long enough to hit the HNQ then there will be enough people with reopen votes who think that coolness is reason enough to keep it open that it will never stay closed.
I don't think tweetable maths was ever acceptable as a matter of policy, but I don't think that the voter pool has changed significantly since then so if it were posted for the first time today I expect that the outcome would be the same.
 
2:32 PM
0
Q: What day is it (on Flooptonia)?

ipiYou are a space tourist on your way to planet Flooptonia! The flight is going to take another 47,315 years, so to pass the time before you're cryogenically frozen you decide to write a program to help you understand the Flooptonian calendar. Here is the 208-day long Flooptonian calendar: Month ...

 
hey, I've got an idea for a programming language. What if you could store code in a variable (like a function), but then be able to modify that code at a later point?
 
You can do that in a tonne of existing languages.
 
examples?
 
C. JavaScript. GolfScript.
 
I don't know C well enough, but I don't know how you modify a function in Javascript
 
2:44 PM
One option is to store the code as a string and execute it later with eval. Another option is to store a function, toString() it, parse the result, and then modify that... The second option is less portable.
 
I think if you actually weigh the available languages, it's closer to a ton than a tonne.
 
that's not really what I'm talking about
that's basically using eval()
 
I'm trying to understand. Do you mean something like this? f = x*x; f(3) -> 9; f *= x; f(3) -> 27
 
a = function(){line1; line2; line3}
a.getLines()
would return an array of the three lines
 
Ah
 
2:46 PM
a.setLine(2, code);
not sure how the syntax would actually look like
 
That would take a pretty precise definition of "line".
 
That's easily doable in JS by extending the techniques I mentioned above.
 
peter, but that actually creates a new function
 
LISP is also famous for storing its code as an abstract syntax tree and allowing you to modify it.
 
@Geobits correct. to make something modifiable, you have to be able to piece it into attributes
it sounds like LISP is more what I'm looking for
 
2:48 PM
So? A mutable wrapper around an immutable object is a standard pattern in any language which has immutable objects.
 
Why does it matter if it's internally mutable or not if the behavior is the same?
I've never had qualms about using a+="ed" or whatever to concat strings (in many languages at least). It's not the same string, but it doesn't matter 99% of the time.
 
(Just don't do it in a loop if strings are immutable. Use a StringBuilder or some-such)
 
Well yea, just an example :)
 
I could reference a mutable function to lots of places, and then modify it, and those changes would spread to everywhere else
rather than making a function that at runtime changes its nature (through if statements and such), you can make a function that is changed before it is run
 
To change a function before it's run, I normally use a keyboard :P
 
2:53 PM
In computer science, self-modifying code is code that alters its own instructions while it is executing - usually to reduce the instruction path length and improve performance or simply to reduce otherwise repetitively similar code, thus simplifying maintenance. Self modification is an alternative to the method of "flag setting" and conditional program branching, used primarily to reduce the number of times a condition needs to be tested. The term is usually only applied to code where the self-modification is intentional, not in situations where code accidentally modifies itself due to an error...
 
the example it lists was what I was trying to get at
function(){
   if (something){
      do x;
   } else{
      do y;
   }
}
vs
a = function(){
    do x;
}
 if (!something){
   a.statements = {do y;}
}
 
a = something ? function(){do x;} : function(){do y;};
(works for simpler cases best, I'd imagine)
 
b = a
if (!something){
    a.statements = {do y;}
}
b();
 
eww ;)
 
maybe the language would have a global function
the language continuously runs the function over and over
and to get code to run, you have to add it
that'd be even better :P
 
3:12 PM
Hmm. Think of your code as a set of statements. After each is run, the interpreter jumps to a (psuedo)random one based on a supplied seed. So, to have it run "correctly", you need to know the correct seed (or find a collision).
 
Apparently that's the only starworthy thing that's been said in the last ten hours or so. Odd.
 
Someone probably misclicked
 
Either that or they like stickman-on-a-roller-coaster emoji.
 
Stupid backslashes
 
3:19 PM
@Sp3000 nice job on prelude-to-befunge! somehow I missed that happening
 
:/
 
Ah thanks, forgot that was there
 
now I'm waiting for @PhiNotPi's tetris simulator Game of Life :)
 
@randomra Thanks :) I still need to find a day when I'm bothered to shrink everything down to 2 or 3 lines though
 
3:22 PM
My what? I didn't sign up for this.
 
@PhiNotPi weren't you thinking about that?
(I know it is extremely difficult)
 
I did actually have an idea, using about 4 extra layers of abstraction.
- Use GoL cells to create the big, customizable-rule meta-cells.
- Use sets of meta-cells to create giant cells that work like wireworld wires
- Use the wireworld wires to build a computer
- Program the computer to have tetris
 
- Use tetris to implement GoL
 
what OS are you planning to use?
seriously though, the first step seems difficult to me, did you have some ideas/results on that?
 
The first step is this thing: conwaylife.com/wiki/OTCA_metapixel
 
3:32 PM
ahh, so it is done already
 
The metapixel can be programmed with any "life-like" rule (two states, 8 neighbors). The next hurdle is that wireworld does not fall into that category.
Which is why I need the next level of abstraction to create a functional "wire" with them. Thankfully, each metapixel can be programmed to have a different life-like rule.
 
I see, I would might use the existing GoL Turing machine, a tool which converts standard code to Turing machine code, and an output visualizer
 
4:38 PM
0
Q: Can we have "golfinated C++" please?

Alec TealI see some of these questions and I'd really like to get C++ involved. However the language is (as it turns out!) quite verbose. So I propose that we be allowed to implicitly include a bunch of defines that shorten what we need into 1 character. For example: #define C class #define M int main(...

 
Isn't that basically a rehash of the language handicap post?
 
@Geobits Are you going to drop your standard "I golf in Java and I don't care" comment? :P
2
 
4:58 PM
I figured this pretty much covered that:
The point of golfing in C++ isn't to beat Pyth or CJam, it's to be the shortest C++ it can be. — Geobits 4 mins ago
 
He..just doesn't get it..
 
Now you've brought "defining a new language" into this - Grr! Can you lock a thread so only people who understand the topic can contribute? — Alec Teal 3 mins ago
... says the guy with zero answers in the [code-golf] tag?
 
Same for his "do you even golf" comment.. Unless he means real golf
 
0
Q: Find a better way to generate a FizzBuzz lookup table

Christian KiewietI've just come up with this ugly fella: function fb() { return [3=>($f="fizz"),6=>$f,12=>$f,5=>$b="buzz"),15=>$f.$b]+array_fill(0, 15, null); } function f($i) { return fb()[$i&15]?:$i; } echo join(PHP_EOL, array_map("f", range(1,100))); Can anybody come up with an even shorter way to generate...

 
5:18 PM
@Geobits I am resisting the temptation to reply that the only way we can stop him from contributing to his own question is to delete it.
 
I came so close to saying something like that... glad it's not just me.
 
But it's not stopping me from voting to close as a duplicate of a question about defining new languages with standard preludes.
 
It's hard for me to deliberately misspell centre like that, but I managed it. — Peter Taylor 11 hours ago
^^ Not sure that's a misspelling, actually :P
 
I thought it was self-referential, but he really should have said "like this".
 
Well.. I don't think he can delete him self unless I delete too
 
5:22 PM
just to chime in the handicap talk: with the right header&footer any language is identical to Pyth
 
header-> port to pyth(code)
 
6:04 PM
Must... beat... Pyth again (before isaac or someone posts a much better answer :P)
 
6:17 PM
too bad it has to be a full program
a recursive function would do nicely, i think
 
My thoughts exactly - also too bad that the last range starts from 141, which is just outside the range for bytes
 
i guess it's up to the OP, but i feel like in general we should more strongly encourage people, especially new users, to stick to the defaults
2
it's awkward to work a while on a submission only to realize that what you did is not allowed because the OP disallowed some format
 
Have you got something better? Or was that just when you were working on a function?
 
nope, i'm at the same byte count
 
Python 2 or 3?
 
6:26 PM
3
the compression seems worth the int()
 
I thought it would be, so I didn't even bother to try 2. Also print(*[n,x][-c:]) is pretty nice
 
yeah
 
Hmm well I'd like to see yours when you're done, to see if we can break the 150 barrier :)
 
@xnor Alternatively, by the letter of the rules here once it's posted it doesn't belong solely to the OP any more. This would be bound to piss people off in most cases, though ;)
 
0
A: Sandbox for Proposed Challenges

mbomb007Quit Whining and Quine code-golfquine Goal: Write a function or program that, given an integer n, will output a program. Description of Output Program: The output program needs to be a program that, when run, ... will output a program... that will output a program... etc, until the nth progra...

 
6:41 PM
@Sp3000 it's nothing special, just the same thing with zip
n=int(input())+1
for c,m in zip(b"\x16\x11\x18\x11\x01\x1c C","Qupu Blinkorp Paas Karpasus Floopdoor Dumaflop Lindilo Fwup".split()):c>=n>0and print(*[n,m][-c:]);n-=c
 
][-c: cute little character you've included there
 
I'm somewhat surprised that's the same bytecount
Hang on... no... that's 148 isn't it?
 
oh yeah :-)
bytecounting is hard
 
Half the reason I don't normally like to use unprintables :P
Will you be posting that or should I edit it in?
 
no, please do edit it in
 
6:51 PM
k :) thanks
Hmm unless there's something better than "...".split() that's looking pretty close to optimal...
 
here's a comparison of methods to iterate over 2 lists:
for x,y in zip(a,b):x,y
for x in a:y,*b=b;x,y       #Python 3
i=0 for x in a:x,b[i];i+=1
usually the second one would win, but here, b is fixed so the first avoids initializing it
 
Ah, I see :) that would go nicely in the length reference
I also considered exec(""*8) at one point, but that was far too long
 
i seem off on the bytes here
usually the second one wins by 3
but an assingnment costs 4
so zip should win by 1
but here it wins by 2?
 
Depends on what a is, if it can lose the preceding whitespace
 
oh, interesting
we could flip the role of the two lists
because the bytestring starts with b but the month-list starts with a quote
oh, the second one usually wins by 2, not 3, that fixes it
 
6:58 PM
Yeah, we could flip but -3 +4 puts it at 149 :)
But that's pretty neat, didn't think of flipping
 
what were you doing with exec, btw?
 
Don't know python well, but isn't there a short way to split on capitals? You could get rid of seven spaces in the list if so, right?
 
I think no language would have a short way to do that
 
python doesn't have any way to split on a condition, or even a set of chars unfortunately
 
00:00 - 19:0019:00 - 00:00

« first day (1637 days earlier)      last day (1459 days later) »