« first day (2238 days earlier)      last day (2710 days later) » 

wim
12:00 AM
>>> {'key': locals().get('v'+ s) for s in ['']}
{'key': None}
 
12:11 AM
why won't it work
screw this
why can't I just compile and run without issues?
 
wim
12:33 AM
because you use windows, probably.
nobody in the python world cares about windows
 
well they better start
 
DSM
1:19 AM
@idjaw: I'm probably going to regret this but right now I'm kind of wishing we'd made a little wager..
...
 
wim
@DSM context?
 
DSM
@wim: the two of us live in different Large Canadian Cities, whose soccer teams are playing against each other at the moment.
 
 
2 hours later…
DSM
3:05 AM
We are pleased.
 
We're solving Advent of Code during December! Join our leaderboard: 41753-59ea35f1
19
Starts in ~2 hours. You might already be on the board from last year.
Ping me if that code doesn't work, it might have changed.
 
3:44 AM
@DSM hehe that would have been pretty fun. Well, I would have loved to see it the result go the other way, the fact that this is the first Canadian MLS final representation is still a big win. Good show! :) cheers. Hope the final is as thrilling.
 
4:09 AM
stackoverflow.com/q/40902388/2301450 someone found a good duplicate
 
wim
@vaultah you have python gold badge, why didn't it close for your vote?
 
I added the tag
 
wim
you voted to close before editing tags ?
ok, weird edge case
 
No, I voted to close after I edited the tags
 
wim
4:25 AM
so if you added the python tag, you are not allowed to hammer it ?
also weird edge case
if someone is trusted enough to hammer they should be trusted enough to retag appropriately ..
 
To clarify: the hammer doesn't work if the question didn't have the tag initially and the user added the tag himself
I think it's reasonable
 
wim
5:01 AM
I always thought that tags here need a hierarchy
like, python3 should have a 'parent' tag python
so that if something is tagged , you don't need to additionally use
 
wim
5:19 AM
@MartijnPieters How long should cpython test suite take on a macbook (sierra) these days? I'm 13 minutes in and it's still testing pickle and multiprocessing stuff, don't remember it being quite this slow last time I submitted a patch ...
 
 
2 hours later…
7:33 AM
@wim I have no idea, I never pay attention to how long it runs TBH.
 
@idjaw well, someone should tell Teemu Selänne to shut up.
 
cabbage
 
now that he doesn't play any more, he has started to comment about politics. So now we read stuff like "good that Trump won, didn't appreciate Obama and his policies" and some half-assed analysis follows...
@wim but one can still hammer a Python question as a duplicate of a Java question with just gold.
and @BhargavRao cbg
 
7:55 AM
OK
the one who knows what the following prints on Python 2.7.minors where it doesn't crash, without running the example, really knows this stuff:
>>> class X(long):
...     def __oct__(self):
...         return 'foo'.upper()
...
>>> '%o' % X
 
user6568562
Cbg
 
Cbg
 
Cbg
 
8:17 AM
cbg
 
8:52 AM
Cbg.
 
Cbg
Antti: I presume you meant '%o' % X()?
 
cbg
 
cbg, cbg, cbg
 
9:15 AM
anybody has a JShit tutorial for last minute interview preperation?
 
@AnttiHaapala Can you pass a type to %o format? I'd expect it to error. With % X() it might Do Something (TM)
As usual, my guesses with this stuff are probably wrong though (goes off to run a py 2 interpreter)
 
hands one to JRS
 
cbg
 
as holdenweb noted, Antti probably meant X(), and even then the result is weird
cbg
 
hey @manuzi1
 
9:23 AM
@AndrasDeak Ah, I missed holdenweb's comment
 
@khajvah ask once more, Perhaps 3rd time's the charm :D
 
Yes - the result is indeed weird
 
hhh :D
 
@BhargavRao let's flag the spammer
 
@BhargavRao oh wow, SO got messed
 
9:23 AM
In fact:
 
it showed me that if failed to send
 
OO, the result is weird
 
:D
@khajvah Clear your browser cache, history. It happens to me all the time
 
@BhargavRao I switched to a VPN in the middle
maybe that's why
 
9:25 AM
Ah, Yes. That too.
 
Hmm, so why does it take one and only one character off the front of the string, I wonder...
 
@holdenweb yes :D:Dd
>>> class X(long):
...     def __oct__(self):
...         return 'foo'.upper()
...
>>> '%o' % X()
@JRichardSnape in Python 2, __oct__ returns an octal representation of a number...
including the 0 prefix.
 
Yeah - I got that far, but I'm wondering where the prefix is stripped off without checking.
Not even saying that's a wrong thing to do, just intrigued.
You have successfully nerd-sniped me.
 
@JRichardSnape it used to cause an abort instead :D
 
9:40 AM
better? :D
 
I feel relieved.
 
9:55 AM
@AndrasDeak ok, now sonnuvabit...pm complains here that the state funds the "sh*t institution" that is the national broadcaster
 
@AnttiHaapala haha:D
hilarious
 
and yes, the original FB update used the word sh*t.
 
good job
 
Now I am starting to regret that I too wanted the TV license scheme to go away and be replaced by gov funding.
exactly because now they're under the control of these cronies.
 
9:57 AM
could've warned you:PP
 
I didn't listen to those who were worried about it...
 
well, not really, I wouldn't expect this to happen in Finland
 
@AndrasDeak ah in case you read it wrong, it was a son of the pm, not that pm is sonnovab... :P
 
Cabbage
 
ah, I did:D
 
9:58 AM
so not that bad ... but even then...
 
cbg, PM2R
 
cabbage PM
 
@AndrasDeak if PM said that "Yle is a sh*t institution" then surely even here they'd be forced to resign already.
 
maybe:P
 
Cabbage!
 
ours should be orange (colour of the government)
 
is there a way to send a private message?
 
@TheOneWhoLikesToKnow no
 
@TheOneWhoLikesToKnow you'd not like to get one.
 
10:04 AM
:D
Bhargav fist pumps
 
who is participating in the advent of code
 
@TheOneWhoLikesToKnow is it on?
I did last year
 
@AnttiHaapala see pinned message:P
 
@AnttiHaapala you're even on the leaderboard
 
10:05 AM
the top one
 
possibly from last year
 
@TheOneWhoLikesToKnow I blew the last one so I didn't make it into the public leaderboard... :/
 
public leaderboard looks stressful
 
im in the private leaderboard
 
having to do them quickly
 
10:06 AM
I was on the priv leaderboard often until the last one :d
 
@AnttiHaapala In Australia, TV + radio licenses were abolished in the early 1970s when Labor (our main left wing party) won the Federal election after a record 23 years of rule by the Liberal-Country Party coalition (our main right-wing party). The ABC (our national broadcaster, similar to Britain's BBC) has long been proud of its tradition of being independent from government influence and its freedom to criticise the government when appropriate.
But after 23 years of right-wing control of parliament, the ABC had become a haven for left-wing journalists, and that culture has persisted into the present to a fair degree, despite various changes in government, and in funding.
@khajvah FWIW, I like the way Python does integer division & modulus, using floor division, and with the sign of the remainder agreeing with the sign of the divisor. But no matter what convention you use for that stuff, if q, r = a // m, a % m then a == m * q + r has to be true.
 
Morning all.
 
cbg
 
10:22 AM
I'm actually getting to protoype some New Stuff today, which is nice.
And also reminds me how terrible I am at front end. :D
 
god I just cooked an amazing steak
from a cheap cut
 
10:38 AM
deliver to me plx
 
is it open-source?
open sauce
 
> I'd just like to interject for a moment. What you’re referring to as steak is in fact, GNU/steak, or as I’ve recently taken to calling it, GNU plus steak. Steak is not an operating system unto itself, but rather another free component of a fully functioning GNU system made useful by the GNU corelibs, shell utilities and vital system components comprising a full OS as defined by POSIX.
 
@manuzi1 Sorry, khajvah lives in Armenia. They don't have FoIP (Food over Internet Protocol) there.
 
> Hello this is khajvah, and I pronounce steak as steak.
 
hahaha :D
 
11:01 AM
I just noticed that advent of code challenges are posted at 6 AM for me, so I have no choice but to take it easy:D
 
11:21 AM
Ohh, there’s a new advent of code?! Nice
 
That guy I was complaining about yesterday who deleted & reposted his question, and then deleted the new version, has just un-deleted the new version and edited it into something really inane. stackoverflow.com/questions/40886504/…
 
good morning
 
@hmmmbob cabbage
 
for fn in os.listdir('.'):
    print (fn)
    image = mpimg.imread(fn)
    imageg= grayscale(image)
    plt.imshow(imageg)
 
@PM2Ring bro, why is it edited by Community?
oh, anon edit
nevermind
 
11:24 AM
@Andras Was edited by anonymous user
 
@AndrasDeak I guess that'd make it 4PM for me, which is a fairly convenient time. I didn't do AoC last year, but maybe I should take a look at it...
 
it gives me sucessfully the names of the files in the dir( more than 1.. but shows only 1 image )
 
– Does anyone remember what service I used to login to Advent of Code last year?!?!
 
I can see your name on the list...so no.
it has your full name, if that helps
 
@AndrasDeak My guess is that it was edited by the OP when he wasn't logged in.
 
11:25 AM
@PM2Ring yes, that's my impression too:)
@hmmmbob because you keep overwriting the same figure
call plt.figure() before each call to plt.imshow()
 
thank you and i am sure you are right :)
just have to think about it for a moment :)
 
I'm not, so try it;)
take your time, I'll be here
 
@AndrasDeak was that RE me?
 
yes.
 
Uhh, that’s interesting...
 
11:27 AM
why do i keep overwriting it, i read it into image.. then turn it into grayscale then show it.. then next iteration the loop.. atleast that is what i think it should work ( in my messed head)
 
@poke the list seems to be from last year, Antti was on it too before he realized it's on again
 
Does the leaderboard have a public URL?
 
@hmmmbob try calling plt.imshow() twice, manually
see what happens
 
nothing ?!
 
@poke dunno if it's public, and I suspect you can't see it without being logged in
 
11:28 AM
still get only one image
 
you should ask someone on slack to be sure
@hmmmbob exactly
 
Hmm, is my name clickable?
 
so why not do what I suggested to do?
@poke none are:(
 
meh :(
 
I tried
 
11:28 AM
oh i will... i just also wanted to understand it :)
why i am wrong :)
 
@hmmmbob OK:)
matplotlib appends to existing axes by default
I can't tell if imshow really overwrites the old one, or just plots on top of it
we could check the children, but it doesn't matter
what matters is that you need a new figure each time, or save the old one before overwriting it
 
haha yes it worked :)
obviously
 
@Andras But it has my full name, right?
 
@poke dude:P
5 mins ago, by Andras Deak
it has your full name, if that helps
 
:D
Just making sure I heard everything right!
Guess that should be Google then, I’ll give it a try!
Yes, it was Google :P
So non-clickable name == Google
 
11:31 AM
no.
 
clickable name == service it links to
 
3 mins ago, by Andras Deak
@poke none are:(
please have your coffee
 
.. okay, in the private leaderboard, nothing is clickable.. public leaderboard is clickable though :/
 
public shmublic
 
anyway, thanks for your help!
<3
rbrb for a bit
 
11:32 AM
rbrb, no worries:)
 
are you talking about this: adventofcode.com
?
 
possibly
(look at the pinned messages ---> )
 
11:50 AM
hah, ty
 
@AndrasDeak lol, PM has full confidence in the editor-in-chief of the Yle... The journalists working under him have 0.
 
the said editor-in-chief was formerly active in the youth league of the party of the PM.
and mind you, there are 4 parties currently at ~20 % support...
 
> Unfortunately, the stars have been stolen... by the Easter Bunny.
What a dramatic preface
Also: Are we sure it wasn’t Bowser?
 
12:07 PM
@poke bowser is tripping on magic mushrooms
 
Again?! geez
 
I_hate_numpy_matrices.append(mymat[0][0][0][0][0][0][0][0,1]==mymat[0,1])
(it's true)
Hmm... ipython handles the @ operator properly, but highlights np.random.rand(...)@np.random.rand(...) as if @np was a decorator:D
 
12:22 PM
mhh. My ★1 solution is incompatible with the ★2 task…
 
back to the drawing board..
 
12:37 PM
@AndrasDeak eww
 
I like that the guy asking the question PM2ring was talking about has 'software engineer at amazon' as his job title. :D
 
wow
bro guy?
woooow
 
yeah, the dude you bro'd.
 
rather, disengineer
 
@Withnail I just counterbro'd him
 
12:39 PM
'counterbro' - totally going to use that.
 
“the first location you visit twice” – That refers to any “location” you pass, not just those where you turn, right..?
 
@AnttiHaapala had to search. Found it on a Finnish Swedish news site. Sigh......
 
@poke yeah
 
derp.
 
@idjaw rather easy to guess without translation :D
 
12:41 PM
Heheh fixed :p
 
@idjaw that's a Finnish news site ofc,
 
> Teemu Selänne i Apu: "Trump ett bättre alternativ för USA"
"Daddy says Trump is a better alternative" (apu means daddy in Hungarian)
 
i = in, ett = a
Apu is the name of a magazine.
 
You're killing me here Antti
It's too early for me to get jokes. I'm still in bed
 
@idjaw the website is written in Swedish, but it is from Finland :D
 
12:42 PM
@poke it seemed to me that the example input doesn't even return...
 
obviously
 
svenska = Swedish (language/speaking)
 
but I didn't draw it on paper
 
but, anyone considering migration to nordic countries, should just learn swedish, so easy :D
 
or arabic
 
12:44 PM
NOMNOMNOMNOMNOMNOMNOM. That's the sound of pycharm eating all my RAM. As bad as a browser. :(
 
Real pythonistas don't use pycharm
covers head, ducks
 
@marxin that remark sounds very right-wing for someone with marx in their name:P
 
So i've heard. :P
 
@idjaw sometimes swedish is written rather differently but pronounced much closer, like: "säger" pronounced rather close to "say-er" = says
@BhargavRao why'd you cover ducks?
 
so they cook faster
 
12:46 PM
ah, makes sense
 
@AndrasDeak lol, i've never think of my nick this way, I should change it probaly
 
are you dabbing?
 
@marxin marxout?
 
chants GET YER MARX OUT FOR THE BOOOOOYYYS
etc
 
my name is marcin in polish
x is becuase marcin was not available
 
12:47 PM
@AnttiHaapala err the verb duck not the noun duck
 
@BhargavRao yes sensei.
 
Dear Python God, I just had to write the following:
for …:
    …
else:
    continue
break
I feel bad for it and I want you to know that I’m sorry.
 
@poke I think you might be working on the same codebase as me
 
@poke indentation?
 
12:48 PM
But it works, and I got a star to save Christmas…
 
continue works in else??
 
@AnttiHaapala for in python has else
and continue is for upper for
 
@Antti There’s an outer loop I am not showing
 
which is not included
 
12:49 PM
hence the break after the for…else
 
now I got it...
 
btw makes sense
i like that in java that you can assign names to loops
and you can break a loop by name
if you have nested loops
 
or just visit it with goto?
 
@marxin Python didn’t go through with that idea.
 
Hii
 
12:51 PM
@poke :|
 
> What this PEP is not

This PEP is not a proposal to add GOTO to Python.
:D
 
I kind of agree with that decision though. If you need labeled loops, you are doing something wrong and should apologize to the Python God.
 
Sometimes i wish people said hi back
 
(which is what I did :P)
@Kevin.a hi back
 
Awesome
1 hi back already
can i get 2
 
12:52 PM
i prefer labels over your solution (which was forced of course because there are no labels)
 
@marxin My solution is broken, and I’m fully aware of that :P
 
user6568562
@Kevin.a Yo
 
user6568562
There seems to be a Kevin outbreak
 
proposal A was the best
 
Usually, this is a sign that you need e.g. another function to make this prettier
 
12:53 PM
Yeah, we have been over it.
we are sending kevin.m to mars
 
good thing that the python god doesn't see all
 
@KevinMGranger
 
rbrb for a meeting
 
rbrb
 
.rb
ruby
 
user6568562
12:58 PM
I'm digging this Westworld show, I have to admit. It's like Red Dead Redemption MMORPG meets 4th wall and HBO boob shower
 
^ lo'd
lol'd*
 
sounds interesting :P
 
You sneaky @AndrasDeak
 

« first day (2238 days earlier)      last day (2710 days later) »