« first day (1712 days earlier)      last day (3123 days later) » 

12:00 AM
@Sp3000 What's that? :3
 
@Sp3000 I love it already! XD
Though this language is bae
 
Tell that to @Timwi
 
Why?
OH RIGHT HE MADE IT DERP
Shoutout to @Timwi YOUR LANGUAGE IS AMAZING I'M IN LOVE WITH IT. JUST TRYING TO UNDERSTAND IT ^_^
 
12:30 AM
So, one obstacle to creating an MMOKOTH is that I need a process to be running, even when nobody is loading a page.
As in, a daemon or something.
 
so... a server?
(That's generally the more common name for that... :P)
 
Well, the "server" thing I have right now just runs a perl script upon page load, and returns the result of that script.
 
12:45 AM
...except I don't know how to make one
I think I got something.
aww yesh
Now I just need to decide what I'm going to do with it.
Also, would you consider it a security risk to have a text box on a webpage where I can enter Perl commands to be evaled by the server?
(I know the answer is yes.)
 
Definitely.
 
1:01 AM
XD
DROP TABLE("Information");--
(Not perl, but whatever)
 
2
Q: Monday Mini-Golf #3: Anagram distance

ETHproductionsMonday Mini-Golf: A series of short code-golf challenges, posted (hopefully!) every Monday. (Sorry this one's a little late.) I'm sure most of you folks have heard of Levenshtein distance, an algorithm for calculating the distance between two strings. Well, this challenge is about implementing a...

 
Probably more like open(FILEHANDLE,"rm -rf|")
 
1:17 AM
@PhiNotPi nah, not at all. Why would you think that? There's no way that could go wrong. :P
 
2:00 AM
In Python, will testing for a tuple of 2 numbers in a tuple of 2 lists test the number tuple against each item in the lists in the list tuple?
 
Wow, I'm having a little difficulty parsing that. :P Gimme a minute though.
So you're saying like if (1,2) in ([1,2,3],[2,3,4])?
 
tuple tuple 2 list tuple list list 2 list tuple list list 2 tuple.
 
Okay, that will check (1,2) == [1,2,3] and (1,2) == [2,3,4].
 
Alright, thanks.
 
2:03 AM
You can use if (1,2) in zip([1,2,3], [2,3,4]): pass, which is equivalent to if (1,2) in [(1,2), (2,3), (3,4)]: pass.
Which would return true.
 
2:17 AM
sys.stdin.readlines() returns a list, correct?
 
Goodnight ^_^
 
Goodnight
 
G'night!
@The_Basset_Hound Looks like yes. Although input might be a better function to use?
Any reason you can't just try it and see?
 
Part of the problem is that I did not type in the stdin in sys.stdin.readlines() when searching google, whoops.
 
2:46 AM
0
Q: Integer Percentify

DaveAlgerWrite a function which takes in a list of positive integers and returns a list of integers approximating percent of total. All values in the returned list must add up to 100 exactly and you can assume the sum of integers passed in is greater than 0. p([1,0,2]) -> [33,0,67] p([1000,1000]) ->

 
3:08 AM
I've made some progress on my webapp thing.
Mainly, it's that I've been able to create a background process that has access to the database.
@AlexA. hi
 
@PhiNotPi Hello
 
I was worried you quit SE after my tag yesterday.
 
Yes, I gave up being a moderator. The diamond is just part of my username now.
I signed on to let people know I'm going to delete my profile.
Live off the grid for a while.
Reflect on my life.
Swallow sadness.
Send some faxes.
 
Aren't fax machines part of the grid?
 
fax machines were part of the grid before it was cool
 
3:22 AM
I'll send forest faxes.
 
Smoke signals?
 
No, that makes forest fires.
 
my cat is sitting on me
jk he left
 
Did you bring your cat into your dorm room?
 
no
I went home
 
3:26 AM
School underwater?
 
no
 
That's good.
 
Right now it's more of a "cancelled because there's still water supply issues and other things"
 
Ah, okay.
 
tbh, I'm not sure if the school itself had flooding issues. I know some places near the school did, though.
 
3:27 AM
11 hours ago, by PhiNotPi
Woo! My classes for the rest of the week have been cancelled!
That explains why you went home
 
I quit school. Dropped out.
flunked marching band
 
> Woo! My classes for the rest of forever have been cancelled! F*** the police! - 2m ago by PhiNotPi
> I'm very disappointed that you're leaving school, Phi. - 1m ago by Calvin's Hobbies
> Let's all eat burritos. - 20h ago by Peter Taylor
 
[17 hours ago](http://www.thesaurus.com/misspelling?term=lolz&s=t), by Alex A.
> I'm a little teapot, short and stout.
 
@AlexA. I accidentally joined that room, sorry :P
 
3:34 AM
@FryAmTheEggman No need to be sorry, my son.
@Calvin'sHobbies Line breaks cancel formatting
 
> I'm a little teapot, short and stout. - 17h ago by Alex A.
 
I can't find my spout.
Error 404, spout not found.
Error 418: I'm a little teapot, short and stout. Here is my handle, here is...
Error 404: Spout not found
 
@AlexA. have you seen the webapp(?) I'm working on?
 
I think so. The one hosted by Red Hat?
 
Let's time the Sandbox poster - meta.codegolf.stackexchange.com/a/7132/26997 just posted
 
3:45 AM
@AlexA. Yes
 
How's it coming along?
@Calvin'sHobbies Lol @ the title, :O @ you using the sandbox
 
(I'm not sure where in the development process you saw it)
 
Uh, you had just added a random number to the title part
 
I have it hooked up to a database now.
 
Nice!
I added a suggestion.
 
3:48 AM
I also have been able to create background processes.
 
I came to say hi because I heard Calvin used the sandbox
 
He did? o_O
 
Just because I don't want to come up with 14 mini challenges right now
 
@NewSandboxedPosts will tell you about it shortly.
 
1
A: Sandbox for Proposed Challenges

Calvin's HobbiesCramming The Gramming - 14 Tasks In 140 Bytes Your boss has just emailed you a list of 14 programming tasks he needs done as soon as possible. The tasks are simple enough but your boss, being a young software tycoon suckled by social media, insists that you Tweet your solutions back to him in a ...

Ninja'd
 
3:49 AM
I don't think that counts.
 
We're timing the sandbox feed to see how long it takes between Calvin's post and the feed telling us about it in chat.
 
ninja'ing the feed isn't very impressive
 
Haha
Your speed impressed me, Dennis. <3
 
Oh good, this one's not a polyglot
 
Monoglot
 
3:51 AM
CJam/Pyth might be able to do all 14 with some select-code-from-array and eval
 
@Sp3000 Well we'll see ;)
 
;)
 
I need to figure out the "use case" for my KOTH server.
So I can decide what I want it to do.
 
Have you gotten any useful suggestions?
 
not really
just things like "puppies"
 
3:53 AM
Toaster!
 
<.< >.>
 
toaster puppies
 
Toasted puppies?
Puppy oven?
You monster.
 
No, puppies that are toasters. Sheesh
 
1
A: Sandbox for Proposed Challenges

Calvin's HobbiesCramming The Gramming - 14 Tasks In 140 Bytes Your boss has just emailed you a list of 14 programming tasks he needs done as soon as possible. The tasks are simple enough but your boss, being a young software tycoon suckled by social media, insists that you Tweet your solutions back to him in a ...

 
3:57 AM
12 minutes
 
what do you guys think would be the best use of a KOTH server?
real-time KOTHs like stock market stuff
MMOKOTHS with a persistent world
 
You could make a PPCG Nethack MMO
And then shut it down because nobody but Doorknob plays Nethack.
 
a platform to run multiple other "regular" KOTHs
How could the server load up entries and the controller?
 
Where does the code for the site live?
GitHub?
 
it's a git repository (if that's the correct term)
 
4:02 AM
Yes
Hosted by Red Hat?
 
I cloned it on my computer and push it to a server owned by RedHat
 
Okay
 
Is it possible to link it to GitHub, I wonder?
 
You can do a GitHub mirror of the code
Someone set up one for CJam since, for whatever reason, aditsu chose SourceForge with Mercurial rather than GitHub.
 
I don't think that would help with the issue of how it would load submissions, though.
 
4:07 AM
No
But you could do something like Pyrrha did with the sword fighting KOTH, where entries are pushed to GitHub and the controller lives there too.
Some code running on your server could run the programs in the respository and do all the controlling stuff on request without the user having to clone the repo themself.
So, like, I would go to your site and click "Play Phi's Cool Challenge 420" and it would run all the stuff and display results
 
How do I convert the git repository on my computer to a github repository?
Is that even possible?
 
Convert? Not that I'm aware of, but you can set up a mirror.
(I'm not an expert on Git. Perhaps there's someone here who has better answers that are less likely to be false.)
 
I have a few git repositories that are also on GitHub. All I did was create the repository on github.com , add it as a remote on my computer, and then git push origin master after pretty much every commit.
 
4:24 AM
let's say that there is a controller and submissions in a repository on GitHub
and my server code would access GitHub, get those files, and run it?
 
Should be possible.
You can write a bash script that executes the git commands.
 
Or a Perl script, using system or whatever.
 
@AlexA. Did you see my groups answer? I finished the explanation last night after you left.
 
Looking at it now
> The time complexity of the above code is worse than O(n!^n).
Jesus Christ.
 
If your code is efficient, you haven't golfed it properly. :P
2
 
4:31 AM
Hahaha
Very true
 
If I ever post an answer to that, I'm not golfing it in a way that would destroy its efficiency.
It's an interesting problem in its own right, especially if you try to do it efficiently.
 
4:45 AM
256 chars, to answer whomever asked how long that field could be
it's an arbitrary limit I set
 
@El'endiaStarman I'm not aware of a truly efficient solution to this problem.
 
EfficientER.
Is it known to be NP-complete or NP-hard, by the way?
 
@Dennis Even the OEIS listed algorithm is only partial.
@El'endiaStarman It's NP-nuts.
 
No clue. I'm neither an algebrist nor a computer scientist.
 
Nor are you Geobits, yet you still downvoted that post.
 
4:49 AM
I'm thinking about reposting the challenge for Abelian groups.
That's a lot easier.
 
I'll do the challenge for cyclic groups :D
 
Haha
 
^
 
Julia, 4 bytes: n->1
 
4:50 AM
Befunge, 3 bytes: 1.@.
 
Doesn't work for 0.
 
Oh dangit.
 
Python, 4: bool
 
feersum, 420: blazeit
 
CJam, 3: rig
 
4:53 AM
Alternatively: Count symmetric groups
 
5:24 AM
0
A: Sandbox for Proposed Challenges

DennisCounting Abelian groups of a given size code-golf math abstract-algebra Groups In abstract algebra, an Abelian group is a tuple (G, ∗), where G is a set and ∗ is a function G × G -> G such that the following holds: For all x, y, z in G, (x ∗ y) ∗ z = x ∗ (y ∗ z). For all x, y in G, x ∗ y = y ∗...

 
Abelian seems like more of a fun one for fastest code tbh
 
@Dennis The restriction on the use of integer partition builtins isn't my favorite but otherwise this is a nice challenge.
 
It's really trivial with the built-in. Pyth has ./, so that's a slam dunk.
 
So. Many. Builtins :o
 
.- blew my mind today.
 
5:34 AM
Oh, ETH's production?
 
That one.
It's getting harder and harder to compete with Pyth.
The only real advantage CJam has over Pyth is the ability to eval strings.
 
Pyth can't do that?
 
Pyth has "eval as Python", but not "eval as Pyth".
 
@isaacg ^
I bet that's in Pyth 5
 
I've given up on competing with Pyth :P
The CJam-Pyth target is now Pyth + 5 bytes
@AlexA. 18 bytes and I don't even Pyth :P
 
5:45 AM
Is this Abelian groups?
 
Yeah
 
Nice work :)
 
Just showing what it'd be like if partitions builtins were allowed
 
Ah, okay.
 
@AlexA. AFAIK Pyth transpiles to Python, so evaluating a string as Pyth should be a non-trivial modification. (Also, there's no need to rob CJam of its only advantage.)
 
5:57 AM
CJam does have some other advantages though :P just not as useful in general
 
No doubt. But that's the only big one I know. Quine-related and some restricted source challenges are still CJam's domain.
 
If only the comment command wasn't e# :P
Heavily stack-oriented challenges are still somewhat CJam's domain
 
No surprises there. :P
 
Well you wanted another big one :P
"big"
 
I was thinking built-ins, but yes, tje stack can be an advantage.
 
6:04 AM
 
I've gotten Perl to clone GitHub repositories.
 
3:00 already. I should really go to bed...
Good night!
 
'night
@BetaDecay I saw those about 7 years ago.
 
6:29 AM
@Justin Wow, I didn't think things floated around for so long
 
6:46 AM
Can I have a little help convincing myself to do the last bit of homework due tonight?
 
@grc Not sure how much that helped, but thank you
 
grc
then maybe just waste time on ppcg instead?
 
maybe this is a bit overkill for a homework but it is good :)
 
7:36 AM
0
Q: Print out all IPv6 addresses

Gilles This reminds me when a few years ago someone uploaded a torrent "Hacker tool: complete list of all IP addresses". This was, of course, just a generated list of the ~4 billion IPv4 addresses, but thousands of "h4xx0rz" downloaded it. Look mum, imahacker! This was then, but nowadays everybody ...

 
7:55 AM
^^ Hack the real world kit: Download this list of all real numbers!
 
@Sp3000 I started downloading 1 of them, but it is still at 0%...
and I can't even find a list of content for that
 
Hm would that be 0% or 0...... with a 1 at the end %
 
@Sp3000 the second isn't a number
0.999... is 1, but 0.000...01 isn't a number it is just 0.000...=0
 
(That was the joke :P)
 
oh, ok, some people have issues with 0.999..., so I wasn't sure :)
 
8:08 AM
Also Cantor was the other joke, but despite my rationality I guess I'm just not a natural at writing jokes about imaginary lists
On a more serious note, I wonder how many submissions will manage to claim the -20% bonus
I'm trying to see how it'd be worth it
 
I still don't get the which is the Cantor part...
@Sp3000 built-in?
 
(The Cantor part was just the idea of a list of real numbers existing :P, ie Cantor diagonalisation)
Hmm is that what the Perl one does?
 
oh, I haven't realize the word list
just made the same joke "and I can't even find a list of content for that", :P
 
Ah, we're both blind
Oh hey, Python has an ipaddress module. Didn't know that
 
8:57 AM
1
Q: Why? To please the rich programmer!

Stewie GriffinHave you ever wanted to ask the compiler "Why?" Most of us have been frustrated when the code isn't working as it should. Mathworks has therefore implemented a nice little function, why, that answers the question. To give a few examples from MATLAB: why The programmer suggested it. why To fool ...

 
9:13 AM
0
Q: Are Vim script solutions that does not print the output but starts a vim session with output legal?

ryvnfI wrote this answer in this challenge using Vim script. I think I was really creative and got very proud of my solution. But I am not so sure if this is legal because this program does not print its output to stdout but opens a Vim session with the output of the program. This command will run t...

 
 
1 hour later…
10:24 AM
Question for chat: Does anyone know of a C-Javascript polygot/is one possible?
(e.g. in C it prints 1 and in JS it prints 2 or something)
 
What's your method of print in JS? Console?
 
10:41 AM
Either that or alert, although I think if you can do one you can probably do the other
 
11:37 AM
soo .. anyone know what is the equivalent of curl's --user parameter in a normal http call ?
 
grc
12:24 PM
@Optimizer probably the Authorization field in the header
 
yeah.. the catch was the base64 encoding..
I had to run curl with -v to see what was actually going through
 
1:28 PM
@mbomb007 I just saw this comment - I don't think there's anything stopping a user from making a showcase in the same language?
 
> It is suggested that you choose a programming language that has not been posted already but this is not a requirement.
 
Emphasis on "not a requirement" though
 
So? It's allowed. Of course it has a high chance of not being received well (or read at all).
 
I'm fine that it might not be received well, but it's just that the comment made it sound like it wasn't allowed. Also I'm not so sure about the "Give your suggestions on those." part either.
 
I'd probably stay away from that topic. It's already pretty cluttered and huge. Comment on the language if you have a suggestion :)
 
1:52 PM
Lots of confusing challenges lately.
 
1
Q: Mutating variable

QuillionOutput n number of lines (where n is from 10 to 30, each run is random) where each line is either Array of n chars (or String with n characters) int divisible by n double whose first two decimal digits is n boolean No two consequent lines may be same type (so you can't have true followed by f...

 
Looks like an odd collection of trivial tasks, thrown together for no apparent reason. I have no motivation to do this.
 
Neither, but I hope I asked the questions we're all wondering
(Took three re-reads to get the spec - I wonder how the upvote came so quickly)
 
2:20 PM
0
A: Sandbox for Proposed Challenges

PyrrhaThe Drunken Knight Inputs a: Starting location of the knight, e.g. A2 b: Target location of the knight, e.g. B4. The starting and target locations may be the same. n: An integer equal to or greater than 0. Output The probability that a knight starting at a, moving at random for n turns, end...

 
This mutating variable challenge..........
 
...is really great?
 
Is very strange...
 
That seems to be the general consensus in chat at least. Of course, it's only a couple fast answers away from getting into HNQ and blowing up, like any other.
 
So the array of n chars can be any char?
And when they say same type... do they mean same data type or one of the four lines?
 
2:31 PM
Since each line is a different data type, I'm not sure what you're asking.
 
I guess the question author would be the person to ask this.
No two consequent lines may be same type (so you can't have true followed by false or true, or an int followed by an int).
He seems to be saying data type, which is strange.
 
1 is a string (or char[]), 2 is an int, 3 a double, 4 a boolean. So if you don't have two consecutive data types, you also don't have two of the same "line" consecutively.
It's worded a bit oddly, I'll agree to that.
 
Also, there is no reason to output more than 4 lines since you can just repeat the same 4 lines and it doesn't violate the rules.
 
> For any line, you can not always output same thing, it must be random (any type of random you choose).
Well, I'd assume that's what this is supposed to mean.
 
What should I do for the boolean? Due to how the question is phrased I don't think truthy/falsy is ok.
 
2:42 PM
@Sp3000 Hmm. Well, I thought 2 was enough. I guess you can undelete if you think I was wrong.
 
I can't undelete :P
 
But datatypes such as "double" or "int" do not exist in data, they exist in code. What if the max precision in my language is "single"? I think he means decimal/real numbers, or integer numbers. Also what @quartata said. You can't output a "boolean". He has to define what true/false is for this data.
(or she)
 
This is annoying.
I'm just going to make an answer.
 
I mean, I agree that 2's probably enough, but I wouldn't mind if someone else wanted to start their own little thing - I just thought the community could figure it out by votes
 
Whoever upvoted this earlier just reverted his vote to a downvote?
 
2:52 PM
@Sp3000 "Vote to undelete" then.
@Sp3000 I suppose. I just think they'll end up duplicating material. Especially if the user doesn't view the revision history of both other Python showcases (since users edit their posts later on to take up less space).
 
@minxomat the voting is +1/-2
(not sure if you have the check votes privilege)
 
@PhiNotPi Yes. Now. It changed since I've posted ...
 
Hmm...
btw mbomb, unrelated but string addition's shorter than rjust for the arrow challenge
 
It was +1 first, then changed to +0/-2 and now it's +1/-2
@PhiNotPi
 
Some progress on my website thing... I've gotten it to call git commands to download stuff from GitHub
 
2:59 PM
The Github API can't?
(I have no idea)
 
I've tried the Git API
It works on my own computer but not the server for some reason
The GitHub api works though.
Technically, it's Perl's Git and Net::GitHub modules
instead of
Git::Repository->run( pull => $url)
I just do
`git pull $url`
I've looked through the Net::GitHub module and I've found a ton of stuff about fetching/managing metadata
 
Does CJam's mr generate random numbers between 0 and the number on top of the stack or 0 and the number on top of the stack - 1?
Which one does it do :P
 
You didn't answer the question :D
 
The both answer.
 
Sorry, I saw "between 0" on the first line and "stack - 1" on the second line and went "yep"
 
3:09 PM
OK, so it's stack -1?
So 21mr10+ generates number between 10 and 30
 
When in doubt, just try: link
3
 
I think the "Mutating variable" question sounded more appealing when it was just an idea.
It flew off the frontpage...
 
How exactly does do-if work in CJam?
 
Do you mean {}& and {}|?
 
Do you push the block and a string containing the conditional and then do-if?
Or does it work some other way?
 
3:19 PM
 
OK. So it's like a conditional trampoline in ><>.
 
0
A: Why have whales and dolphins not evolved to have gills?

AnyiI can't understand why many of us have chosen to cling to theories which would only lead us far from the best answers. The simple and true answer to this is that GOD CREATED DOLPHINS AND SHARKS WITHOUT GILLS. There is no evolution of creatures. In fact if you ask me, I'll say God purposely did it...

It's always fun to stumble across something like this before it gets taken out.
 
Chat puzzle: find the next element: 12 18 20 24 28 40 44 45 48 50 ? ...
generating this sequence might be a future golf
 
@Geobits This is beautiful.
He made his SE account just for that too.
 
3:33 PM
@Sp3000 I checked on OEIS, that there is no entry of it, but there was a mistake in that :(
 
OK. I can't tell if this is doing what I think it is doing or not.
21mrA+,{[{_c*}{_10/}{_%2}{_}]mR~Np}/
It should be making a random number between 10-30, making a range out of it, iterating over the range and then executing one of those four blocks.
 
it was meant to be oeis.org/A242416
 
Is that what it is doing?
 
but with an OEIS entry, it's not that interesting
 
Now that I look at it, the answer would have been 52 either way :P
 
3:36 PM
but it's density is 1/e, which is nice
 
@quartata If you remove the N... then yes, basically
You get division by zeroes every so often though
 
Oh oops...
It shouldn't be doing that.
Oh I see the problem.
The number from the range needs to be popped off first.
 
I think it's 2% instead of %2
 
OK.
I'm proud of the fact that this is my first CJam program and it already looks like spaghetti code.
Hmm. Adding a discard in front of that to pop off the number from the range gives me an array index out of bounds.
Actually, I don't think I want to pop that off anyways.
 
Don't worry, when you start out all code looks bad
 
3:40 PM
@quartata Most CJam programs look more like chopped noodle bits to me, rather than spaghetti.
 
Kinda like if you did this in Python:
for i in range(100):
    i = i + 1

    if i % 15 == 0:
        print("FizzBuzz")

    elif i % 5 == 0:
        print("Buzz")

    elif i % 3 == 0:
        print("Fizz")

    else:
        print(str(i))
 
Most likely because I haven't bothered to learn it :D
 
This is for the mutating variable challenge btw.
Nvm.
Der.
I don't need that.
I see the problem with this now.
, pops the number off the stack.
 

« first day (1712 days earlier)      last day (3123 days later) »