« first day (2156 days earlier)      last day (2798 days later) » 

12:00 AM
speaking of space. Did anyone see Interstellar?
I still don't know how I feel about it....
 
I still haven't yet.
 
ok...let me know if you do.
 
Maybe that'll be tonight's project.
 
bleh
 
Hmm. I always forget to watch it
 
12:00 AM
That's how I felt about Gravity.
 
^
 
that was megableh
 
user6568562
@MorganThrapp You saved me from blathering for a couple of hours, at least
 
Did not get anywhere near the hype.
 
is gravity the one with clooney and sandra bullock?
 
12:01 AM
I hated Gravity
 
user6568562
Now that I can't spoil it, I have the force to be quiet about it
 
yes, idjaw
The Martian was surprisingly good
 
that I haven't watched
yet
 
@JGreenwell Was it?
Mark that on my list too then
 
i think i mentioned it here but i saw snowpiercer
 
12:04 AM
@JGreenwell Oh yeah, The Martian was awesome. The book was fantastic too.
 
user6568562
You'll love Interstellar, then
 
yeah, I expected it to be pseudo-science crap at its best (don't know why and never read book) but it was surprisingly accurate, given time considerations of film, and had a good pace
 
@idjaw you only mentioned the plan to watch it
how bad was it on a scale of -10 to -5?
 
hmm...I'll check out Intersteller then
 
@JGreenwell Yeah, the author worked closely with NASA scientists. The book is even more accurate.
 
12:07 AM
@JGreenwell brace yourself
 
@AndrasDeak ah....I give it a solid "meh"
don't regret seeing it
but at the same time, I wasn't too happy with its execution
 
user6568562
@AndrasDeak : D
 
alright, cousin is here. Have a good night
 
I give it a solid "not as bad as Gravity"
 
:)
 
12:07 AM
@idjaw rhubarb
 
@idjaw Good night, rbrb
 
cheers
 
user6568562
@idjaw Laters [ :
 
user6568562
@AndrasDeak What ! You didn't like the old twist-actually-fragment-of-imagination switcheroo :D ?
 
@AndrasDeak will it give me one of those "I don't even know physics that well and that is obviously wrong bangs head against wall moments?"
 
12:09 AM
@JGreenwell yes
 
Oh no..
 
and it will be sneaky at first, to still your suspicion
then BAM
 
I'll keep watching Futurama then - its accuracy I like (cause its just enough to make scientist snicker without taking itself seriously)
 
like a Pan Galactic Gargle Blaster
 
Ah, Photons. I don't know if you're waves or particles but you go down smooth
nothing can be as bad as Clooney's portrayal of an astronaut.....except maybe the idea of hitting things in space at high speeds in that movie
cause it's space - speed doesn't matter &$#(&@
 
12:15 AM
it matters in Python
 
user6568562
Good night [ :
 
@randomhopeful Good night : ]
 
 
1 hour later…
1:36 AM
rhubarb
 
see ya Andras
 
 
3 hours later…
4:32 AM
TIL this place has chat.
 
 
2 hours later…
6:11 AM
Anyone here have experience with PyOpenCL?
 
 
1 hour later…
7:39 AM
Cabbage
 
Cbg
 
7:51 AM
wat
I got just 1 upvote to my horrible codegolf :D
 
cbg
@JGreenwell it was the most awful movie of the year.
 
With the kids jingle belling and everyone telling you be of good cheer?
 
"yeah yesteryear Argo took Best Picture, if those stupidos choose this as the BP, I'm done with Hollywood"
 
8:07 AM
Argo was ok. But I was upset to learn that their plan of pretending to make a movie of Zelazny's Lord of Light basically prevented it from being actually made into a movie. OTOH, I don't know if a Hollywood movie could do the book justice.
 
ok?
:D
I am not sure if you watched the same film :D
 
Great book (Lord of Light)
 
"A recent research of VICE Magazine based on the Freedom Of Information Act[16][17] revealed in April 2016 that the CIA was also involved in the production of Argo (2012) itself, as it was in a number of American entertainment productions (such as the well-established case of the 2012 film Zero Dark Thirty[18])."
well, if true, this explains a lot...
 
8:25 AM
@AnttiHaapala In the Ben Affleck movie Argo they were pretending to make a science fiction movie called Argo in Iran in order to smuggle the US embassy staff out of Iran. That science fiction movie was an adaptation of Zelazny's _Lord of Light. The CIA had actually bought the film rights so that anyone investigating them so-called movie-makers would think they were a legit movie crew.
From en.wikipedia.org/wiki/Argo_%282012_film%29#Production The screenplay used by the CIA to create their cover story was an adaptation of Roger Zelazny's 1967 novel Lord of Light. Producer Barry Gellar had spearheaded an earlier attempt to produce the film with the book's original title. After that production attempt had failed, the screenplay was renamed Argo and used by the CIA.
 
No, I mean that you said the Ben Affleck film was OK, and I said I am not sure we watched the same film.
 
@Ffisegydd I haven't read it since my teens, but I loved it back then, and I'm sure I'd enjoy it if I read it again. I might have it somewhere here at my parents' place, in deep storage...
@AnttiHaapala Ah, fair enough. :)
 
when watching it I was like... "what, is this a remake of Team America or something"
 
I tried to not let that aspect of it annoy me too much. I didn't say it was good, just ok.
 
and team america is good, because it is a satire of such "historical" films such as Argo :P
I am very tolerant of crap films :D
the only 2 movies that I've regretted seeing in a theater within 5 years have been Argo and Gravity, and I see at least 15 films a year.
I guess Gravity was OK to see in a cinema, because if I didn't then if later watching it from TV I'd have wondered if it were any better on big screen (well, it wasn't).
 
8:38 AM
It had Sandra Bullock - so worked for me :)
 
8:56 AM
Wowsers... big wall of code for calculating age... stackoverflow.com/questions/39424329/…
along with nested functions and recursion... impressive stuff...
 
@JonClements My God..
 
What the yam? That's insane!
Jan 13 '15 at 8:41, by PM 2Ring
One day, I won't be able to stop myself from commenting: "Perhaps programming is not for you. Have you considered finger-painting?"
5
 
I'm trying to get into the mind set of what they're trying to do there... I'm struggling to get around why "current year" - "input year" is not an obvious starting point...
 
@JonClements It makes me want to.. Apply for 2020 Mars One or something
 
Heh just looked at that mutation code golf. I had to learn all those rules when I was younger @Morgan :p
 
9:06 AM
@Slayther hopefully they don't end up blagging a job programming the control systems for it :p
 
@JonClements Plsno
:D
That code wouldn't even apply for
 
@Ffisegydd so can you beat mine? :D
@Ffisegydd can you give me a nice word that would start with th? :D
 
@Antti theatr
 
9:27 AM
and something starting with g :P
gorsaf
 
@PM2Ring oh - it got answered...
I don't know how to think and would love if anyone could help me! ummm.... slightly unfortunate phrasing there...
What dupe do we normally use for stackoverflow.com/questions/39424749/… ?
heya @Moshe - new pic?
 
10:03 AM
16
Q: Why do backslashes appear twice?

Zero PiraeusWhen I create a string containing backslashes, they get duplicated: >>> my_string = "why\does\it\happen?" >>> my_string 'why\\does\\it\\happen?' Why?

print(a) gives correct output . But i want to use variable in following way: b = 'This is path %s' %a — user3501405 9 mins ago
garlic
 
Hmm... and that answer is my comment rephrased slightly... :)
 
cbg
 
user6568562
Howdeeho [ :
 
cbg
 
10:49 AM
@Ffisegydd See, so the challenge should be nice and easy for you.
 
user559633
cbg
 
cbg
 
Definitely homework morning...
 
user559633
yeah, i woke up to continue working on my overcomplicated form handling and now i'm on SO instead
 
11:00 AM
overcomplicated hey?
 
@tristan just pretend that your brain is simplifying your form handling as a background process
 
user559633
When just using HTML, I could just use <input> and type into that box. Not with react and redux!
 
you need an active distraction to fully utilize your reptilian brain for software design
 
user559633
Oh sweet summer child, you think <center> is more elegant than 3kb of CSS or JS? You foolish, naive simpleton.
 
says the guy who uses python 2
 
user559633
11:03 AM
â–¶ python -V
Python 3.5.0
 
:O
did you give up on speed?
 
user559633
No, and I've been using Python 3 almost exclusively for > 2 years.
 
all I know about centering in CSS is that site:P
 
user559633
Yeah, you thought I was being cute?
 
no, I thought you were a rebel, fighting the tides of our times:(
 
user559633
11:04 AM
> Centering in CSS is a pain in the ass.

Or you could use <center>, but if you teach a man to fish and he realizes it's easy, he'll set to work on convincing others that it's hard.
 
user559633
@AndrasDeak Oh no, not at all.
 
I gather you don't need half a dozen parameters to center something with html?
 
Still, it would be nice if Python 3 had a flag / environment variable to use ASCII / Latin1 strings, when you don't need Unicode and want the extra speed...
 
Wow - it'd have been 15 years tomorrow - doesn't time fly...
 
user559633
@PM2Ring ^ That's exactly my point. Free 15-20% bump when you know it's going to just be ASCII
 
user559633
11:06 AM
18 hours ago, by tristan
If Python 3 had a "--yes-i-do-want-ascii-no-unicode-penalty" I'd be pretty happy
 
@PM2Ring wtf are you smoking?
 
is that 20% difference really due to unicode?
 
user559633
and to prove that i'm not just agreeing because I like you.
 
or you mean specifically 20% with respect to string operations?
@tristan I remembered that one:)
 
user559633
Largely ASCII, last I checked.
 
11:07 AM
@PM2Ring in Python 3.5 your "ascii" strings use 8 bits per character :d
 
@JonClements 15 years what?
 
same for latin1
 
oh, I get it
 
there is no penalty
 
time does fly
 
11:07 AM
so I don't know what are @PM2Ring and @tristan complaining about
 
user559633
Yes, if you say "well, diet soda is the same calories because we just removed some flavor and left in all the sweeteners", then yes.
 
additionally they've now optimized the ascii codec...
 
I think they mean performance, not memory
 
same thing
 
is it?
 
11:08 AM
yes
 
ok then:)
 
there are other inefficiencies methinks
 
user559633
I think you're moving the goal posts.
 
@PM2Ring @tristan you should make a benchmark case...
 
user559633
I would but I kind of don't care anymore.
 
11:09 AM
the one big inefficiency in Python 3 is the stupid int->long
 
Antti, you're being ableist again
 
user559633
Not lifting heavier characters allowed for my machine to run the code faster in 2.7 vs 3.4.
 
"not lifting heavier characters"
 
user559633
meaning unicode.
 
why do you think it was the reason :/
 
11:10 AM
The Hulk is a big one
 
@AndrasDeak I just want to have a benchmark case, not FUD.
 
user559633
Because doing python2 something.py vs python3 something.py where something.py is mostly string handling ran reliably differently.
 
and now, they're making string handling faster in 3.6 than ever before...
 
user6568562
@AndrasDeak Eyyyy : D
 
including python2
>>> timeit.timeit('b"asdf" * 10')
0.08169752103276551
>>> timeit.timeit('"asdf" * 10')
0.11408180301077664
this is a benchmark!
 
user559633
11:13 AM
Strings are bigger, that's fine, I don't super care anymore, if the car is comfortable, I'll get used to the shitty gas mileage
 
>>> timeit.timeit('b"asdf" * 10')
0.08667802810668945
>>> timeit.timeit('u"asdf" * 10')
0.1129770278930664
@tristan they aren't bigger though
 
user559633
Fine, then slower.
 
user559633
If your suggestion is "well, if you time travel, things are faster" then great
 
>>> sys.getsizeof(u"asdf" * 1000)
16052
>>> sys.getsizeof(u"asdf" * 1000)
4049
guess which one is python 3
 
The one on the left!?
 
11:15 AM
I think it is a more interesting question why is the *10 still slower with unicode strings?
 
user559633
 â–¶ python2 -c "import sys; print(sys.getsizeof('a'))"
38
→ python3 -c "import sys; print(sys.getsizeof('a'))"
50
 
@tristan wow
 
user559633
much wow very morning
 
user559633
the suggestion was "when you know you don't care about unicode for some script"
 
nice. in Python 2 str is 4 bytes larger than bytes in python 3,
same for unicode <-> str
 
user559633
11:17 AM
cool, then something else was slower in 3.x around string operations back when i did my comparison
 
yes^
I said above ^, the b'' vs u'' benchmark is interesting
4 mins ago, by Antti Haapala
>>> timeit.timeit('b"asdf" * 10')
0.08667802810668945
>>> timeit.timeit('u"asdf" * 10')
0.1129770278930664
this one
 
user559633
by the problem description, you can infer how much it interests me now :P
 
user559633
why is that interesting? (legitimately curious)
 
because they should be equivalent
 
Blimey... stackoverflow.com/questions/39425491/… - anyone happen to know what the order of two unordered objects should be? :p
 
11:19 AM
@JonClements upgrade to python 3.6
 
user559633
â–¶ for i in {1..5}; do python2 -c "import timeit; print(timeit.timeit('b\"asdf\" * 10'))"; done
0.107429981232
0.101013898849
0.112821102142
0.090628862381
0.0955240726471
â–¶ for i in {1..5}; do python3.5 -c "import timeit; print(timeit.timeit('u\"asdf\" * 10'))"; done
0.11028243601322174
0.10778890101937577
0.09557884797686711
0.1094637589994818
0.10037993697915226
 
user559633
roughly the same for me
 
yes but Python 3 was faster for b''
ahha
 
user559633
Ah, I see what you mean now.
 
user559633
Maybe I'll upgrade to Go
 
11:22 AM
@tristan do you notice actually bytes handling is faster in Py2
or is this a timing anomaly
ah too small repetition
ahha :d
@tristan test with repetition of 1000
 
user559633
I'm testing from the outside, which includes the import tax, so I figured that within .005 is roughly equivalent
 
% for i in {1..5}; do python3.5 -c "import timeit; print(timeit.timeit('u\"asdf\" * 1000'))"; done
0.24372485495405272
0.24453968001762405
0.2470850480021909
0.2637395220226608
0.2182755820103921
% for i in {1..5}; do python2.7 -c "import timeit; print(timeit.timeit('b\"asdf\" * 1000'))"; done
0.243273973465
0.249868869781
0.237541913986
0.232662200928
0.23893904686
they're equivalent in speed: 3.5 unicode vs 2.7 bytes :P
and then
% for i in {1..5}; do python2.7 -c "import timeit; print(timeit.timeit('u\"asdf\" * 1000'))"; done
0.44739985466
0.566654920578
0.392348051071
0.396561145782
0.395657062531
 
user559633
Yeah, I wasn't talking byte strings though, just normal ascii. I wasn't making a statement about unicode in py2 vs 3.
 
user559633
I was talking more about:
 
user559633
$ python2.7 -c "import timeit; print(timeit.timeit('\"asdf\" * 50000'))"
9.37550806999
$ python3.5 -c "import timeit; print(timeit.timeit('\"asdf\" * 50000'))"
10.419522255950142
 
11:31 AM
I am using b explicitly there, though naturally it is the same in ...
I wonder if we've got the same processor :D
comparable timings for everything
 
user559633
1.7ghz i7?
 
% python3.5 -c "import timeit; print(timeit.timeit('\"asdf\" * 50000'))"
10.293728777032811
% python3.5 -c "import timeit; print(timeit.timeit('b\"asdf\" * 50000'))"
10.619309586996678
% python2.7 -c "import timeit; print(timeit.timeit('\"asdf\" * 50000'))"
10.5127160549
didn't make these numbers up
I see no timing difference
 
user559633
A mystery for the ages then.
 
hmm I had firefox spending 100 % cpu
killed it, reran
% python2.7 -c "import timeit; print(timeit.timeit('b\"asdf\" * 50000'))"
10.3569860458
% python3.5 -c "import timeit; print(timeit.timeit('\"asdf\" * 50000'))"
9.429826810024679
and again
 
user559633
Why are you making it a byte string?
 
11:36 AM
python 3 unicode is 10 % faster than 2.7 byte string now
@tristan in python 2 there are no bytestrings remember :D
b is no-op
% python2.7 -c "import timeit; print(timeit.timeit('\"asdf\" * 50000'))"
10.512198925
% python3.5 -c "import timeit; print(timeit.timeit('\"asdf\" * 50000'))"
9.38313927600393
these are both stock Ubuntu pythons
 
user559633
Oh, I see what you mean, just being explicit with the b?
 
yes
the question is why is your python 3 so slow?
you're using a bad compiler :d
 
user559633
lol, sure, that must be it.
 
@PM2Ring ^some unicode tax for you
 
otp@ubuntu:~$ python2.7 -c "import timeit; print(timeit.timeit('b\"asdf\" * 50000'))"
10.4107928276
otp@ubuntu:~$ python3.5 -c "import timeit; print(timeit.timeit('\"asdf\" * 50000'))"
10.91627635806799
otp@ubuntu:~$ python2.7 -c "import timeit; print(timeit.timeit('b\"asdf\" * 50000'))"
10.9832642078
otp@ubuntu:~$ python3.5 -c "import timeit; print(timeit.timeit('\"asdf\" * 50000'))"
10.72157408297062
otp@ubuntu:~$ python2.7 -c "import timeit; print(timeit.timeit('b\"asdf\" * 50000'))"
10.790225029
 
11:38 AM
interesting
 
user559633
I'm slightly curious to dig out the code that 2.7 smoked 3.4 (maybe 3.3?) on to see if it's the same on 3.5+, but that's not at all what I'm supposed to be doing right now
 
@JonClements what's your ubuntu version, python subversion?
@JonClements the difference is not at all that big between your python 3.5, 2.7
 
@AnttiHaapala Sorry, I've been preoccupied trying to come up with slow Python 3 string code. :) Here's a short example, but I guess it's cheating...
from timeit import Timer
from random import randrange
instr = ''.join([chr(randrange(256)) for _ in range(1024)])
t = Timer('outstr = instr.lower()', 'from __main__ import instr')
print(sorted(t.repeat(3, 10000)))
#Py2.6
[0.062839984893798828, 0.065397024154663086, 0.065523862838745117]
#Py3.6
[0.2847476410024683, 0.2851937419982278, 0.2877790050006297]
If I change it to chr(randrange(256)), Py3 wins.
 
2.7.10/3.5.0+ - Might be Ubuntu 16.04
 
11:42 AM
Ahhh.... no - it's 15.10
 
@PM2Ring .lower() does full unicode casefolding in Python 3...
>>> print('Ä'.lower())
Ä
 
@AnttiHaapala Yes, that's why I chose it.
instr = ''.join([chr(randrange(128)) for _ in range(1024)])
t = Timer('outstr = instr.lower()', 'from __main__ import instr')
print(sorted(t.repeat(3, 10000)))
#Py2.6 [0.091020822525024414, 0.095940828323364258, 0.097849845886230469]
#Py3.6 [0.024393511997914175, 0.03530973400120274, 0.04745662999994238]
 
>>> print('Ä'.lower())
ä
it is again a bad example
 
@randomhopeful ??? :D
 
you're lowercasing "latin1" incorrectly
try it with ascii
randrange(128)
then it actually does the same thing in python 2 and 3
 
11:44 AM
@AnttiHaapala My theory was: why bother using full unicode casefolding when you're only processing ASCII?
 
I see there is a bossfight going on
 
user559633
Not really.
 
@PM2Ring because 128-255 is not ASCII.
 
@AnttiHaapala I just posted the results for randrange(128)
 
yes
you're never lowercasing latin1 bytes really, using that algo.
that's my claim...
 
11:47 AM
@AnttiHaapala Sure; I did say it was cheating. :) But I figured I might as well post it anyway.
 
user559633
chr(75).lower() isn't the lowercase representation of 'K'?
 
@tristan yes it is
read above ^
python 3.5 wins for ascii text
 
user559633
I think I'm losing the thread here, but is the suggestion that Python 3 wins "technically" even if not in practice?
 
where it doesn't win is if you have bytes above 128
beause python 3 does full unicode casefolding
whereas in Python 2 it lowercases the ascii letters in your binary data...
which is certainly not something one would do usually.
 
user559633
And if, say for what PM2Ring and I were suggesting, you were not dealing with Unicode at all, Py2 would be faster?
 
11:49 AM
no
python 3 would be faster.
that's the case PM2ring ran above
 
user559633
In timer results, lower numbers mean faster, no?
 
#Py2.6 [0.091020822525024414, 0.095940828323364258, 0.097849845886230469]
#Py3.6 [0.024393511997914175, 0.03530973400120274, 0.04745662999994238]
 
@tristan yes
 
@tristan for ascii^
 
^ and there are the numbers
for ascii strings
 
user559633
11:51 AM
@gowrath Yeah, that's why I'm confused.
 
@PM2Ring ah one more case:
 
user559633
lol, oh. morning everyone :)
 
@tristan that is a double case: python 3 knows the string is in range 0...127 so it uses ascii lowercasing algorithm
 
Py2 is faster only when dealing with strange unicode characters because, Py3 will use the entire unicode unfolding to lowercase the letters whereas py2 will operate on the binary
 
and it is faster with that than python 2 with ascii lowercasing algorithm
 
user559633
11:51 AM
/me increases text size of chat window
 
@PM2Ring one more case :P
 
user559633
lol yeah, in the "please don't remove me as RO and kickban me", my brain was lining that up as 0.09 vs .24
 
@PM2Ring add 'ä' to the end of the string, then strip it :P
 
Also cbg
 
user559633
@gowrath Ah, well said
 
11:54 AM
@tristan well... paraphrasing pm2ring "One day, I won't be able to stop myself from doing that" :D
 
user6568562
@AndrasDeak Your joke, I liked it. Unless it wasn't and I thought it was since I'm noob : D
 
I'll take it
 
@gowrath But that's the point I was trying to make: if you're only using pure ASCII why not just use simple case conversion routines?
 
user559633
@AnttiHaapala lol, go for it, but i'm pretty sure i'm at least an adequate rage-target during hours that other ROs have gone to bed
 
11:57 AM
OTOH, as Antti said earlier, Python 2's str.lower() and str.upper() do not do what you might expect on chars outside the 7 bit ASCII range.
 
hem
@tristan I was trying to make a case infavourable to python3, well
from random import randrange
from timeit import Timer
instr = (''.join([chr(randrange(128)) for _ in range(50000)]) + '\xe4')[:-len('\xe4')]
t = Timer('outstr = instr.lower()', 'from __main__ import instr')
print(sorted(t.repeat(3, 10000)))
 
@PM2Ring No clue :D
 
% python2 x.py
[1.8513870239257812, 1.858957052230835, 1.8591148853302002]
% python3.5 x.py
[0.29533331497805193, 0.2955293540144339, 0.30169434199342504]
... I failed
 

« first day (2156 days earlier)      last day (2798 days later) »