« first day (1475 days earlier)      last day (3466 days later) » 

3:00 PM
new topic. Today I am annoyed because the collections.deque class has a popleft method and not pop_left.
 
DSM
While I've never tried to teach someone Java -- and prior to this summer I'd never done anything nontrivial in Java -- I'm pretty sure I could get someone writing useful code in Python faster than I could in Java.
@Kevin: yeah, there are a number of naming issues I wish we'd fixed in 2-to-3. When I fork Python as a response to how ugly the new typing is going to make code look for no reason, I'll deal with it.
 
Tell your department head that he only thinks that Java is harder to learn than Python, because he learned Java first and his brain has been calcifying over time so learning in general becomes harder.
 
@Games what's up?
 
@DSM Thanks.
 
@davidism In most SA orm examples I see, the ForeignKey to a different table is always like <object_name.lower()>_id. When using this in conjunction with relationship, it magically understands that *_id is a link to another table. How is this so, and can you just name the ForeignKey whatever you want, and relationship will still work, and cascade all your change for you?
 
3:05 PM
opinion based, unless there's an official style stance from the BDFL or PEP 8 or something
 
DSM
Flat is better than nested.
 
@Games If there is one foreign key to the related model, the relationship will use it automatically. If there are multiple foreign keys to the same model, you need to explicitly tell the relationship which one to use.
 
@DSM I think I'll tell him that.
 
You can name the keys whatever you want, putting _id at the end is just a convention.
 
@davidism I assume that you do so by changing the __mapper_args__ in your class?
 
3:08 PM
Same way that people name "somedatabase_db" and "someuser_user"
which annoys me somewhat
but can live with it
 
wb @Paolo - good to see you around two days in a row :)
 
@jon :D
 
@PaoloCasciello Hey man! Long time no see, how ya been?
 
user559633
i like how the "answer" starts with "in my opinion" media.tumblr.com/a63a9364cfe8cd9e617f9d5d670e0df7/…
 
3:09 PM
@GamesBrainiac heya! :) All fine thanks. you ok?
 
@GamesBrainiac I'm not sure what you would use mapper_args for in this case.
 
@PaoloCasciello Yup pretty good mate, how ya been?
 
def howyabeen(x, y):
  finemate()
  howyabeen(y, x)
 
oh noooooo, an infinite loop
 
@davidism Then how do you tell mapper, which id is the one you want to map it to? Do you change primary_join or foreign_keys argument?
 
3:11 PM
:D :D
 
"I'm fine, and you?" "I'm fine, and you?" "I'm fine, and you?" "I'm fine, and you?"...
 
DSM
This is why I never talk to people.
 
@PaoloCasciello oops, SA seems to have messed up my mind somehow. So, what have you been up to?
Yes yes, I'm a horrible automated octocat response bot :(
 
@GamesBrainiac you declare the foreignkey on the id that is mapped, normally. it's the relationship meta-column that needs to specify which foreign it belongs to, and normally it discover it by the tables it refers to.
 
3:14 PM
I think I may be some kind of mutant, because I have never said "you too" when a waiter says "enjoy your meal". It's the one piece of social interaction where I dominate.
 
I've never said that and never heard anyone else say that.
 
Me neither.
 
@Ffisegydd I have a habit of saying 'you too' when someone wishes me happy birthday. It's very embarassing.
 
DSM
.. I do sometimes, when I'm not paying attention. And I've taken to saying "Happy birthday to you too!" when someone tells me about someone else's birthday.
@Alex: makes sense, though. "I hope you also enjoy my birthday, which is a happy occasion for all."
 
imagine saying you too at a funeral...
 
3:16 PM
Why can't I find a good produce-a-dict-with-multiple-values-per-key post?
 
I know SO has that question because I've seen it before...
 
DSM
@Martijn: too many to choose from, probably. I think I've seen one or two which gave all the standard options (setdefault, defaultdict, sorted-groupby).
 
@MartijnPieters I think there is one, like where they use defaultdict to create a tree.
 
@Martijn It would be easy if he didn't want keys that weren't in the keys of the original dictionary. Otherwise it would just be a simple defaultdict case.
 
Hello
 
3:18 PM
"The server is experiencing an unusually high volume of requests and is temporarily unable to process your request." that's fine server, I'll just spam F5 until you give me my damn paper.
 
In the last two days, I've seen two posts of the form "Q: why is my recursive function returning None? A: because you aren't explicitly returning the result in one of the branches". If I see it again, I'm liable to write up a canonical post
 
@AlexThornton I know, but I am looking for a canonical post.
 
@AureliusPhi Welcome.
 
@GamesBrainiac you use the foreignkeys argument to the relationship to tell it which key(s) to use
 
Man, still only 11:20 over here. Slow day.
 
3:21 PM
@davidism Thanks mate.
@davidism One last question. I see that in your basic_flask repo, you use groups = db.relationship(Group, lambda: user_group, backref=db.backref("users")), in essence a lambda for the secondary argument. Why do you use a lambda, and not just secondary=user_group?
 
because user_group is defined after that class
 
@Martijn you've worked on mad systems :)
 
Cant you just put it in quotes? @davidism
 
what are the search times I'm looking for if I want to limit a CPU core to a single process?
 
yeah, but that doesn't work as well with refactoring (although pycharm can sometimes figure it out now)
 
3:24 PM
is it possible to "reserve a core" ?
 
whatcha guys think of this quick writeup proposal?
 
@davidism Thanks, will do that.
 
@JonClements ? Not following you there.
 
@Jon maybe affinity?
 
I have a 4 processor, 8 core each system
 
3:25 PM
I really need to update that basic_flask repo, it's a bit out of date compared to what I do now.
 
I don't want to reserve the processor
I want to reserve a core on a processor
 
@corvid "Corvid by @DarkCrowz would like permission to access your account." That's a bit intrusive just to read a list.
 
@Jon a cpu in this case is one core
 
A dict with multiple values per key? I just use a defaultdict(list)
 
user559633
3:26 PM
pythonic check please:

>>> values_set = {'a':'a', 'b':'b'}
>>> values_missing = {'a': '', 'b':'b'}
>>> bool([k for k in values_set.values() if bool(k) != True])
False
>>> bool([k for k in values_missing.values() if bool(k) != True])
True
 
@AureliusPhi Again, I am not looking for the solution, but for the canonical Stack Overflow post explaining it.
 
user559633
If you saw that quick one liner, would you think the original coder is a jerk?
 
Are you putting together a FAQ of some sort?
 
@AureliusPhi Just closing a dupe.
 
I prefer not k to bool(k) != True, I think
 
3:28 PM
I found a few more that could be closed in the process.
 
@tristan No love for any() or all()?
 
@AureliusPhi we try to close duplicates with the "best" target, the "canonical question"
 
Yeah, any would probably be useful here
 
Can someone help me find a dupe of this: stackoverflow.com/questions/26657021/…
 
@davisism Thanks -- forgive my ignorance, haha
 
3:29 PM
@AureliusPhi we then collect these targets here for future use
we are also writing a machine learning system to identify dupes for us
 
Sounds rather nifty
 
user559633
@AureliusPhi meh. near equal length and i don't like any/all as built ins
 
@tristan how so... I think the biggest stumbling block for 'em is when people expect the opposite of something like:
>>> all([])
True
 
user559633
good call @Kevin
 
DSM
I use any and all pretty much every day. I'd have to reinvent them if they didn't exist.
 
3:33 PM
besides, I wouldn't have two gold badges if it wasn't for any :p
 
DSM
@Jon: I'm not even going to click, because I know exactly what that link goes to. :-)
 
user559633
any is fine or whatever, but in a list comparison, it's +2 function calls that don't need to exist
 
Trying to puzzle out the equivalent expression... not any(values_set.values())?
 
well, 108 upvotes is not enough!!! I need more!!! Feeeeeeeeeeeeeeeeeddd the puppy!? :(
 
I feel like there's a way to do this with no comprehensions
 
user559633
3:34 PM
as k for k is a list comp and any() does a generator expression
 
@tristan To each his own, I suppose -- I find any() / all() to be quite useful
 
user559633
Yeah, they're fine for beginner programmers.
 
Cabbage!
 
user559633
cbg @Iplodman
 
3:36 PM
I'm feeling particularly active today, so I'm doing exercise today! :)
 
user559633
awesome
 
I'll use any/all iff doing so causes the code to resemble the logic in English that I've constructed in my head.
 
same
 
DSM
Just remember not to do from numpy import *, or any environment which implicitly does the same..
 
"Now I need to see if any of my widgets are blue. Ah, perfect if any(widget.color == "blue" for widget in widgets)"
 
user559633
3:37 PM
Oh, I started out with C++, so my brain is more of a "for each thing in thing array look at the thing"
 
I grew up with C++ myself, but it's not my real dad and I don't have to do what it says anymore
I told C++ to go fork itself, but that only multiplied my problems
 
user559633
search your feelings, you know it to be true @Kevin
 
Must resist obvious starbait.
 
I'm pretty sure I made that joke last month anyway.
 
user559633
you're right, it's not your real dad. if your real dad was C++, you'd remember what happened last month.
 
DSM
3:41 PM
This is why we need a steady stream of new room visitors, so we can reuse classic material.
 
if any(joke in used for joke in jokes): print "Repost, downvoted."
 
user559633
ha ha jokes about memory allocation differences between languages are why i'll die alone ha ha
 
Random Q of the day: does everyone here have a CS degree?
 
user559633
@AureliusPhi no. some people in here aren't old enough to drive.
 
DSM
Nope.
 
3:43 PM
hahahaha
appears I forget an invoice - client's phoned me asking for one
 
Nope. I'm sitting my GCSE this year though. :)
 
user559633
in this room, no one knows if you're actually a dog. or 14.
 
I see
 
I have a degree.
 
this happened 2/3 months ago as well
 
3:44 PM
stackoverflow.com/q/26657414/3005188 gone for unclear but it could also be Kevin's input answer I think
 
DSM
@Jon: don't take this the wrong way, but you seem to mention invoice difficulties pretty often..
Maybe you should get a minion to track these things?
 
@Kevin yeah, I actually put that there so I could see if students would log in at all on my github panel
 
user559633
I also have a degree. 2 of them. (1 is in advanced trollology from the university of phoenix down)
 
fanfare
 
I wish there really was a University of Phoenix Down and you weren't just lying ;_;
 
user559633
3:46 PM
I set "remember to send invoices to" reminders on my calendar at the beginning of each contract.
 
University of KerokeroCola would be pretty cool, too.
 
user559633
yeah, i got my masters in giant swords at UPD
 
stackoverflow.com/q/26657094/3005188 opinion based. OP wants to know if his data code will "work", how the hell are we to know?
 
@tristan you could be a dog and 14.
 
user559633
with a minor in gender studies and chocobial veterinary science
 
3:47 PM
I'm currently listening to the FF piano soundtrack.
 
user559633
no @hochl. I said OR. EXCLUSIVE CASE
 
@tristan did you actually grind your way there or just find the Masters laying around?
i'll show myself out now
 
@AureliusPhi Yes
 
user559633
@AureliusPhi yes
 
user559633
argh, welcome to the room @hochl, you'll do well here
 
3:48 PM
stackoverflow.com/q/26657492/3005188 set a variable by a string dupe
 
@tristan ok it seems i am missing some part of the discussion then ^^
 
14 in dog-base or human-base?
And would it ever make sense to be !dog and 14 but in dog-base?
 
DSM
@Ffisegydd: I'm wondering what "a character C" is.
 
user559633
@hochl because we're testing for identity and not membership.
 
I assumed he meant a variable C = 'arrayname'
 
user559633
3:49 PM
No, he's an old timey gangster. "A character seeeee?"
 
:-)
 
Nyeaaaaaa
 
I found what I think is a dupe and voted.
I need to stop closing questions and instead answer them...
 
Lunchtime just around the corner. :X
 
What a mess at home.
 
3:51 PM
Time dilation is strong today for some reason
 
First, kitchen cabinet almost fell of the wall.
Shoddy hangings, so it failed.
 
Lunch? Where are you living
 
Handyman came today, drilled through an electricity cable.
 
But drove off thinking his work was done.
 
3:51 PM
@hochl I live in Jersey / NYC
east coast time
 
Now electrician came; cabinet work is at fault, get the handyman back to take it off so I can fix this.
 
@AureliusPhi Ah ... xD
 
All this with no electricity at home so my wife cannot look up the numbers to call anyone.
 
No smartphone?
 
user559633
You can't live in Jersey/NYC. They're two different states.
 
3:53 PM
@Martijn UK life.
 
@tristan NJ right next to NYC. :P
ex-NYC
 
user559633
There you go.
 
@AureliusPhi not everyone has a smartphone. I'm the only one at home with one.
 
@MartijnPieters I know -- was just asking
 
You could live in NYC, but sleep in a coffin filled with NJ soil. Pretty standard practice.
 
3:56 PM
what the? What has my system suddenly gone from extending to external displays to mirroring... that's weird
ahh... drag something around and it goes back... a bit disconcerting
 
I spend a lot of time between both NYC and NJ so they both feel "home-y" to me XD
 
@jon it was only an illusion of your mind...
 
too broad, asking for string parsing and image creation etc etc with no work done yet
 
Don't make me post: youtube.com/watch?v=WEhS9Y9HYjU @Paolo :)
 
Also it's unclear because the image linked is not actually the output they want
 
3:59 PM
@jon you'r right.. don't post it! :D
 
DSM
If an answer's worth accepting, isn't it usually worth upvoting? #mysteries
 
Unless they're accepting begrudgingly?
 
see you :)
 
@Ffisegydd may I add an item to the agenda for the forthcoming (as yet specified when) room meeting?
 
DSM
4:00 PM
"Sure, this answer solves my problem. But I don't like it. So there."
 
@Jon NO OF COURSE YOU MAY NOT! Yeah sure.
I think it'll be the week beginning 10th sometime.
 
no worries... where do I add anything?
 
As poke is away next week until Thurs and I'm busy on the Fri.
@Jon wherever you want in the wiki, put it first if you like.
You are after all the top dog.
 
lol... I've added it
 
I'm interested in knowing whether we're going to be using the RABBIT code that's already on the Github page, or if poke will donate the chatbot code that he already has.
 
4:03 PM
lol, you not liking the number of cv-pls that's going on? :P
@Kevin I believe poke will use what he already has, but he can discuss that in his RABBIT section.
 
I have no reason to expect he would, other than the fact that he was showing it off in here the other day
 
I'm elaborating the reasoning :)
(or lack thereof)
 
I personally don't like the idea of a separate flag room, but it can be discussed at the meeting.
stackoverflow.com/q/26657953/3005188 tool or too broad, take thy pick.
 
okay - updated
 
DSM
Things I like: the use of epigraphs from imaginary books (historical studies and memoirs) at the start of chapters in epic novel series. Makes me feel like the events are more real somehow.
 
4:14 PM
@DSM Malazan Book of the Fallen does that, it's very good. Epic poems and books and such.
 
heya @Ruraj
 
I'm tempted to write a wiki page on "Putting together MWEs" that we can link to people. Too many people say "Oh well I would give you the code but I have to load my data from 17 files on my system and the International Space Station twitter feed!"
 
hi @jon
and everyone
 
cbg @ruraj
cbg @jon
 
user559633
MWEs?
 
4:17 PM
cgb @tilaprimera
 
cbg @Ffisegydd how is your mood at this hour?
 
Minimal Working Example.
 
user559633
Ah. yes.
 
@tila my mood is the same as every other hour, bad.
 
@Ffisegydd not sure if that's better than my "mostly asleep" or not :)
 
4:19 PM
@Ffisegydd you are probably hungry..
 
Nope, just Welsh.
 
sqlalchemy.exc.ProgrammingError: (ProgrammingError) column "timestamp" of relation "comments" already exists
 'ALTER TABLE comments ADD COLUMN timestamp TIMESTAMP WITHOUT TIME ZONE' {}
:|
 
Mind you - will be interesting to see if you can pull off 100 hour weeks for a year @Ffisegydd :)
 
then it must be the slow internet..
100 hour weeks as in??
 
user559633
@tilaprimera working 100 hours a week.
 
4:20 PM
@Jon or not, I could just not work as much :P
 
user559633
I've been doing ~80 hour weeks, 100 is really impressive.
 
@tristan it's great... until you spend 5 minutes trying to get out a door
 
:D melons
 
user559633
@JonClements omg yes. I locked myself out of my apartment last week and was like "well, at least it's saturday" and went to the bar. Thursday.
 
then realise it opens inwards not outwards
 
4:22 PM
Did 100 hr weeks during a summer in college once... never again
 
user559633
I think. Hold on, let me check my git logs
 
if all goes well, I'm taking January and February off in 2015
 
DSM
! Nice.
 
@Ffisegydd We already have stackoverflow.com/help/mcve and sscce.org , which no one reads, so a third would have little impact. Still, I see the appeal of writing a manifesto on the one true way to ask a question.
 
@Kevin yeah I know, I think for added punch I'll write it in the blood of the innocent and/or people who move goalposts on you.
 
4:24 PM
@Kevin as co-exec do you have initial opinions on sopython.?com/wiki/13?
 
user559633
@JonClements yeah, i was planning on not working when i go to russia, but now it looks like i'm taking on another job, so there goes that.
 
Nov. I only need to do 80 hours, then in Dec., can get away with 60 hours
so w00t
then I'm really going to try a 45hr week
take two months off
 
@JonClements Agenda looks fine, although since Daylight Savings ends next week, I'm worried people will show up an hour early/late
 
DSM
@tristan: Russia? I thought you were going to someplace in Western Europe? Or is that the other job?
 
any fellow math-nerds here?
 
4:27 PM
@JonClements where is the brandy? open it up and lets cheers to that!
 
Are people free on November 12th for the meeting? Does that sound reasonable?
 
user559633
@DSM looking to move to Germany in the spring for work/living, but I'll be in Russia for a few weeks before then.
 
@AureliusPhi :D that would be you looking in the mirror?
 
DSM
@tristan: ah, gotcha.
 
@tristan do you ride a bike or scooter or something which one rides? lovely helmet!
 
4:28 PM
@tristan, are you fan of commander keen too?
 
DSM
@AureliusPhi: I'm an editor-in-chief of the Online Encyclopedia of Integer Sequences. Is that nerdy enough?
 
12th is fine with me. my attention may be divided due to my daily 11:45 conference call.
 
user559633
All of a sudden attention about my awesome avatar
 
i used to spend whole nights playing commander keen
 
user559633
@Ruraj it's a cool game and i like the art from it
 
4:28 PM
i just noticed :)
 
@Kevin I've changed the date and also the time, can you confirm that 3pm UTC is actually midday Kevin-Time?
 
@tristan i remember asking you that previously too..
 
@DSM That... is indeed nerdy enough.
 
user559633
UTC is +4 hours kevin-time
 
user559633
(kevin and I are on the same time zone)
 
4:30 PM
I love OEIS <3
 
jealous
 
user559633
Oh wait, daylight savings happens on Nov 2 for us.
 
Yeah, 3pm UTC is 11 AM local
 
Yeah exactly. Will DST have affected it correctly by then?
 
4:32 PM
cbg@AlexThornton
 
yeah I think so
 
user559633
Will set it back to 10am from UTC.
 
Ok so 3pm UTC/10am KT.
 
Whoa, you guys live near me
 
I typed Kevin-Time into worldtimebuddy.com but the stupid thing didn't recognise it.
 
user559633
4:33 PM
Yes. Kevin is in NJ. I'm in Brooklyn
 
Where in NJ?
 
Kevin Town.
 
burlington-ish. ten minutes from philly.
 
Cool
 
DSM
The coincidence of a man named Kevin Kevinson living in Kevin Town on Kevin-Time has been noticed before, but eh-- sometimes things just happen.
 
4:35 PM
@DSM starred it
silencing silence
 
@DSM Are you familiar with Project Euler?
 
projecteuler.net?
 
Yes
 
@AureliusPhi I've been working on problem 483 for a little while.
 
user559633
project bueller
 
DSM
4:44 PM
@AureliusPhi: yep. Made it through a fair number of them but eventually stopped when I realized I was spending more time looking up half-remembered theorems that I couldn't remember the specifics of than coming up with clever algorithms.
 
user559633
has says, after googling
 
@DSM A lot of the later problems do a better job of avoiding that issue
much more algorithm-oriented
 
stackoverflow.com/questions/26658647/… Unless anyone can be bothered to sift through all that.
 
@____@
 
I don't have any brandy left! @Ffisegydd was supposed to get me some :(
 
4:48 PM
WAT? Don't be blaming me for your alcoholism.
 
@JonClements he is drunk pupping around
 
alco - alco errrr... alcoh... errr....
dwink!
em nit dwuk
 
sounded more like a fart than :D a drunk pup
 
ah no way to whisper?
 
DSM
Okay, time to accomplish some pre-lunch work. Rhubarb for all.
 
4:51 PM
on a more serious note... need to get dinner cooked - had a chilli in the slow cooker all day
 
Hi there!
 
what's for dinner??
 
chilli con carne with rice, melted cheese and dorito chips
followed by a toffee & fudge cheese cake
rbrb for now
 
rbrb
yelps for doritos more like wanting, what is the word?
 
@Ffisegydd @RobertGrant @AlexThornton I followed your advice of using Windows's Task Scheduler task creation with batch... but... the client finally had XP Home Edition, and schtasks.exe is not part of XP Home edition!
So I had to explain him by phone how to create a Scheduled Task manually ;)
It's exactly what I feared ;)
(I'm not complaining, just saying that sometimes it's better to do all with one tool - python, than to expect that the user has many different tools installed)
 
user559633
4:57 PM
ohhh i'd like some chili
 

« first day (1475 days earlier)      last day (3466 days later) »