« first day (1896 days earlier)      last day (2939 days later) » 

11:00 PM
@NathanMerrill Fine. Come to #gcj2 and talk about it. :-P
 
oh google code jam just started
 
@NathanMerrill Dam Son, I signed up for that. I should probably participate. .-.
I don't think it's too late
This is the qualification round IIRC
 
@AlexA. It's not too late. Start now. Go join #gcj2 and I'll see you there. :-)
@AlexA. Hydroelectric child. :-P
 
Isn't it open for like 24 hours or so?
 
@AlexA. 27 hours.
 
11:01 PM
@ChrisJester-Young XD
 
@ChrisJester-Young Okay good. I desparately need to get something done that I've been procrastinating on for days.
 
@AlexA. ;-)
 
@DrGreenEggsandHamDJ Oh, the latter is what I was thinking of when I saw yours. I knew there was a similar one. No I don't think they're duplicates but they're closely related I'd say.
 
Okay, that's what I thought. I found helka's challenge while I was writing that last one, and I was worried.
 
11:02 PM
There is another similar one I'm pretty sure, besides mine
 
Oh, speaking of @HelkaHomba, he's here right now!
 
@ChrisJester-Young freenode?
 
@Winny Naturally.
 
Is there even other IRC?
 
Is there a distinction between "Duplicate in spirit" and "Duplicate in rules"?
 
11:04 PM
How am I supposed to know when to print insomnia, must I solve the Halting problem??
 
Otherwise, you could take an old challenge, change a couple of rules, rewrite it, and call it your own.
 
@DrGreenEggsandHamDJ I wouldn't call it a duplicate in spirit. More like fraternal twins than identical twins. :P
 
Haha, thanks. But in general, is there a distinction?
 
@Downgoat First you play Amnesia: The Dark Descent, then you play Amnesia: A Machine for Pigs. The latter made me so tense that I felt physically ill.
 
@AlexA. There are many other IRC networks, including OFTC, but freenode is definitely the biggest. Kind of like there are many git networks, but GitHub is the biggest.
 
11:06 PM
s/Insomn/Amnes/g
 
@DrGreenEggsandHamDJ If answers can be copied from one to the other with minimal or trivial modification, the challenges are considered duplicates.
 
Also, Hydroelectric Cat had better leave my stuff alone. >:-(
 
what
 
@AlexA. I have played neither of those nor will I ever
I don't see much entertainment in scaring yourself silly with jumpscares, to be honest.
 
Haha, I love it. Outlast is one of my favorite games of all time.
 
11:09 PM
:28876115 Anyone think we swear too much here? I'm not personally offended but parents of new younger users might not want their kids in here after taking a glance.
 
@quartata I don't recall any jump scares in A Machine for Pigs.
@HelkaHomba This didn't ping me. o_O
 
Well you removed the message
 
¯\_(ツ)_/¯
 
@HelkaHomba Somewhat amusingly I think the younger users are the ones who swear the most in here. But you have a point
 
Maybe :P
 
11:10 PM
I think we're pretty reasonable for the most part though
 
how to I get STDIN python?
and how do I print in Python??
version two
 
raw_input()
 
I don't see any problem with it as long as we remain respectful of others. Like, don't swear at people.
2
 
and print
 
@quartata Gross Python 2
 
11:11 PM
@QPaysTaxes That's only Python 3.
@AlexA. He specifically asked for Python 2
 
@AlexA. There's nothing wrong with python 2.
 
@quartata Don't make it any less gross :P
 
print raw_input() isn't working in python 2
 
@DrGreenEggsandHamDJ I prefer Python 2 actually
 
@DrGreenEggsandHamDJ Python 2 is a garbage language. Python 3 is an actually usable language. :P
 
11:12 PM
@Downgoat It totally works for me
 
@Downgoat It's working fine for me. What does your console output look like?
 
$ python -c "print raw_input()" <<< "test"
test
 
nevermind
 
Are you sure you're using Python 2? :P
Because it's just input() in Python 3.
 
0
A: Sandbox for Proposed Challenges

flawrPolynomialception code-golfmath Given two polynomials of arbitrary degree over the integers, your program/function should evaluate the first polynomial in the second polynomial. Details Builtins are allowed. You can assume any reasonable formatting as input/output,but the input and output for...

 
11:13 PM
@AlexA. Agree to disagree.
 
Okay :P
 
What are your main beefs w/ python 2?
 
@AlexA. Fluff you
 
@HelkaHomba haha
 
@HelkaHomba ( ͡° ͜ʖ ͡°)
Jan 24 at 14:54, by Doorknob
censor your profanity please... h*** fuck
 
11:15 PM
would this work? [a, *b] = [1, 2, 3] -> a = 1, b = [2,3]
 
@AlexA. oh dear I can't unthink this now
@AlexA. Doorknob is an exception to basically every assumption about children and their behaviors which is why I usually don't make assumptions about children and their behaviors
 
Doorknob isn't a child :P
 
@AlexA. no he's a doorknob
 
@AlexA. Doorknob is Hydroelectric Child. :-P
 
hahaha
He powers my home
 
11:16 PM
:-D
 
According to https://www.google.com/search?sourceid=chrome-psyapi2&ion=1&espv=2&ie=UTF-8&q=define%20child&oq=define%20child&aqs=chrome..69i57j0l5.1712j0j7:
>a young human being below the age of puberty or below the legal age of majority.
 
done with #1!
took me way to long to parse the output
 
@NathanMerrill Easy, wasn't it?
 
@DrGreenEggsandHamDJ Interestly, the ages of puberty and legality are quite different
 
how do i get raw_input in python 3?
 
11:17 PM
well, I threw myself for a loop trying to think of cases except for 0
 
@Downgoat input()
 
tanks
 
I use:
with open(file_name+".in", "r") as f:
 
@NathanMerrill I use redirection and standard input/output.
 
Can you use any language for GCJ?
 
11:18 PM
Can't stand to clutter my contest code with file handling.
@AlexA. Yes as long as there's a free implementation of the language.
 
Is there a way I can stop notifications on a challenge? -.-
 
so that other people can verify submissions.
 
@HelkaHomba hahaha
@ChrisJester-Young Oh okay, cool. Thanks.
 
@HelkaHomba That's a problem I wish I had.
+334?
 
@AlexA. So, for example, you can't use Matlab but you can use Octave.
 
11:19 PM
@HelkaHomba I think the majority of my rep has come from that challenge
@ChrisJester-Young Okay. I was going to use Julia (of course)
 
oooh, I like challenge 2
 
Oh wait, they made a special exception for Matlab, Excel, and Visual Studio. Lol.
Those are allowed even though non-free.
@AlexA. Not Jelly?
 
please use Jelly
 
I don't know how ;-;
 
Note: your language statistics are reflected in go-hero.net/jam so choose your languages appropriately.
 
11:21 PM
Nobody does.
@AlexA.What do you think about this as my next profile picture?
 
@DrGreenEggsandHamDJ +1
 
@ChrisJester-Young Two poor souls used SQL
Good god, someone used Shakespeare
More people used LOLCODE than Mathematica. O_O
 
how would I check if a string contains all digits 0-9 in python?
serious answer please
 
@Downgoat all(c in "0123456789" for c in s)
¯\_(ツ)_/¯
 
thank you so much
 
11:27 PM
Idk if that's idomatic or anything
But it should work
 
oh, codejam time \o/
 
If I do a = b in python, a be a copy of b or a reference?
 
haha @Downgoat use .isdigit()
not what I said
 
Following the discussion earlier about encouraging less common languages, would it be useful to have a meta post where people can suggest languages which could do with encouragement, and then each week/fortnight/month the highest voted language is chosen as the language of the week/fortnight/month and the best answer in that language gets a bounty at the end of that period? Or would that be too much voting what with having to vote on which answer is best across all questions?
 
46
A: How do you check if a string contains ONLY numbers - python

mhlesterYou'll want to use the isdigit method on your str object: if len(isbn) == 10 and isbn.isdigit(): From the isdigit documentation: str.isdigit() Return true if all characters in the string are digits and there is at least one character, false otherwise. For 8-bit strings, this met...

 
11:30 PM
I need to check if it contains all digits
 
Yes
It does that.
 
@Downgoat Depends on what b is.
 
b is a string
I figuired it out myself \o/
 
It'll be a copy.
 
all(c in s for c in "0123456789")
@El'endiaStarman yay
 
11:31 PM
s.isdigit()
s = "123456" returns true
 
>>> "123456".isdigit()
True
>>> "123.456".isdigit()
False
>>> "-123456".isdigit()
False
 
> contains only numbers
twitches
 
@Dennis Why are you twitching?
 
Should be digits?
 
^
 
11:33 PM
Oh
¯\_(ツ)_/¯
 
I didn't twitch, but I considered it
 
hahaha
 
bah, the second question is harder than I thought
 
Code Jam?
 
yeah
I was taking a greedy approach
but found out it won't work
 
11:34 PM
imagines @trichoplax experimentally raising an arm, shaking his head, and putting it back down
 
lol
 
Haven't started yet. I'll have to wait until it gets more quiet here...
 
oooh! I know how to do it
 
@Dennis I haven't started yet because I've been trying to get something done all day and haven't really done it.
 
I get years like that
 
11:39 PM
I've started it, but I'm sitting in a tiny space in an uncomfortable room with my laptop waiting for a 7:30 event, so I'm not sure how much I'll be able to get done :D
 
ಠ_ಠ to that message that was flagged
 
What's at 7:30?
 
3D art exhibition
 
I'm a genius!
 
@CᴏɴᴏʀO'Bʀɪᴇɴ the first one or the second one?
 
11:42 PM
I watched an amazing adaptation of Monty Python's Spamalot this afternoon :D
 
@Downgoat the one about giles
 
oh, yeah
 
@Doorknob You do a lot of things
I don't do shit
 
haha
I'm only here because of school, though. It's a 3-day event
 
wtf python. Why is r='1'+1 output ['1', '1']
how do I convert integer to string in python?
 
11:45 PM
str
 
str(number)
 
tanks
 
*BOOOOOOOOMMMMM...*
Not anymore.
 
?
 
Tanks? What tanks? :P
 
11:46 PM
@Downgoat That's crazy. Wouldn't happen in Python 3 :P
 
yes it does
 
Really? I just tried it in 3.4.2...
 
@Downgoat Err, ye sure?
>>> r = '1' + 1
Traceback (most recent call last):
  File "<pyshell#12>", line 1, in <module>
    r = '1' + 1
TypeError: Can't convert 'int' object to str implicitly
>>> r = `1` + 1
SyntaxError: invalid syntax
 
@Downgoat Doesn't work for me in Python 2, nor 3
 
Are you using orlp's future version of python??
 
11:48 PM
orlp: The Future of Python™
 
maybe my python won't work for me because I'm a JS user so it's imitating JS by having dumb types
 
I'm using 3.5.0.
 
@Downgoat screenshot?
 
Yeah, you probably shouldn't have told it you use JS
 
What's special with orlp's python?
 
11:49 PM
 
@PhiNotPi It's 3.6
 
Python 2.7.9 gives me errors:
>>> r = `1`+1

Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>
    r = `1`+1
TypeError: cannot concatenate 'str' and 'int' objects
>>> r = '1'+1

Traceback (most recent call last):
  File "<pyshell#1>", line 1, in <module>
    r = '1'+1
TypeError: cannot concatenate 'str' and 'int' objects
 
@Downgoat Who did you buy your copy of python from...?
 
\o/ \o /my code jam solution worked
 
Nice :)
 
11:52 PM
how do I completely clear a file in vim?
 
d
 
I want to delete all lines
 
:q<enter>rm filename.py<enter>!vi<enter>
 
@Downgoat ok, so delete all lines
 
@Downgoat which one?
the first one?
 
11:53 PM
@Downgoat ggdG
gg goes to the start of the file, dG deletes to the end
 
python has infinite prescision correct?
 
@El'endiaStarman What's !vi?
Also who uses vi???
 
@AlexA. Does the previous vi command.
 
@AlexA. I do
 
@Downgoat I thought you used Vim
 
11:55 PM
I have vi mapped to v which is mapped to nvim
 
Well, vi is an alias for vim on many systems, apparently...
 
@AlexA. >:-(
 
@Downgoat ???
 
@El'endiaStarman it is on mac
 
@El'endiaStarman Okay, that's different
 
11:55 PM
/me is currently observing a rather amusing game of BS
it seems to be devolving into physical violence
 
@ChrisJester-Young ¯\_(ツ)_/¯
 
@MarsUltor as in do integers overflow?
 
@Doorknob Do you know Egyptian Ratscrew?
 
@AlexA. I use vi. Happy now? :-)
 
@Doorknob BS = bullshit?
 
11:56 PM
@ChrisJester-Young No. You should drop that and use Vim.
Or even better, NeoVim.
 
@Downgoat Python has bignums.
 
\o/
 
@El'endiaStarman nope
 
@Doorknob It's fun play it
It's also called War
 
oh, then yes
 
11:56 PM
@AlexA. War to me is an entirely different card game.
 
@AlexA. >:-(
 
@ChrisJester-Young And implicit promotion to bignums, correct?
 
@AlexA. Yes.
 
War doesn't even have any skill involved.
 
@ChrisJester-Young ¯\_(ツ)_/¯
 
11:57 PM
@AlexA. no the the integer boss has to do it
 
ಠ_ಠ
 
> It has a happy face made of chocolate chips on one side (the "happy side")
since when are pancakes happy?
 
Pancakes are happy makers
 
Does julia have complex numbers?
 
Yes
 
11:58 PM
Yes
wait really??
 
Yeah. Why would you say yes if you didn't know?
 
¯\_(ツ)_/¯
 
how do I use one?
 
brb addign eompex numebrs to chedaar
@CᴏɴᴏʀO'Bʀɪᴇɴ does -5i work?
 
@CᴏɴᴏʀO'Bʀɪᴇɴ Uh, however you want?
@Downgoat No
 
11:59 PM
Python has complex numbers too.
 
D:
 
im is the imaginary unit
 
@El'endiaStarman but python sucks
 
-5im
 
11:59 PM
cool
 
2 mins ago, by Alex A.
ಠ_ಠ
 
julia> 5(3)
15
 
fatal: Unable to create '/home/phase/dotfiles/.git/index.lock': Permission denied
 
this seems very error-prone
 
halp
 

« first day (1896 days earlier)      last day (2939 days later) »