« first day (1968 days earlier)      last day (2998 days later) » 

3:11 PM
cbg
@PM2Ring you called? :d
@PM2Ring I disagree
file as a generic variable is perfectly ok
file itself was deprecated long time ago
 
I don’t even know what file is?
 
uhuh
 
someone thought that with all the type unification it would be handy to have file as a type
how stupid they were.
that just exists to break duck typing.
 
That looks like one of them 2ish functions...
 
3:15 PM
/me reads Python 2 exclusive… /me removes file from the brain again…
 
23 mins ago, by PM 2Ring
Still, it makes me uncomfortable seeing file used as a generic variable. :)
^shadows the most useless builtin ever.
 
I actively use file as a variable as a big "middle finger" to Python 2. Even when the name file makes no sense.
6
 
all in all I start to think that whatever happened in python 2 over time was just against the zen of python.
 
We should start every file in Python 2 with the following:
from __future__ import print_function
file = None
 
Btw, what is the best/most concise way to say that my library will always support 2 latest stable minor versions of Python?
for example, currently they are 3.4 and 3.5
 
3:22 PM
I’d say that goes into a README
 
PyPI has tags that you can add also.
For example see the "Categories" pypi.python.org/pypi/Gwydion
Programming Language :: Python :: 2 might be what you're looking for. Not sure if that means "the latest only" though.
 
If Python 3.6 comes out, your library does not magically support 3.6 and 3.5. It still stays on 3.5 and 3.4 (regarding “official” support), so you will have to update that manually anyway.
 
@AnttiHaapala Hey, I never claimed that file was actually useful. :) And even fairly ancient Python 2 docs say you shouldn't use the file constructor to open files.
 
@poke Yeah. I'd like to warn users of my library that I will update it as soon as the new version of Python comes out and that it will support Python 3.5 and Python 3.6 only
Thanks and sorry for being unclear
 
@vaultah why to drop support for 3.3, 3.4 if you can reasonably test against them
 
3:31 PM
@vaultah is that because you're using the new async keywords, or something specfic in the 3.5 stdlib?
 
for example ubuntu 12.04 or 14.04 still can see new software but getting everything on 3.5 there is just too much work
 
I'd be explicit in what you do support then. So say "I support 3.3, 3.4, 3.5" and when you push to git with your 3.6 changes you also add "3.6" to the list.
 
I'd personally do automatic tests for every feature
then use travis build to ensure that there are no regressions for 3.3 say
 
@JonClements yes, unpacking generalizations, some new features from pathlib, etc.
 
I'd hire someone on fiverr everytime someone ran my unit tests on their computer.
 
3:33 PM
if it becomse too burdensome or if you need new features (it is asyncore, or typing)
@vaultah or in any case, declare in documentation when you drop support for the last versoin
or use backports in setup.py
 
3:56 PM
@MartijnPieters why speedy del on flask :D
 
@AnttiHaapala question-ban evader.
 
hehe, I guess I need to tune my trolldar
 
That wasn't going to go anywhere, I've had it up to infinity with that user re-creating account after account.
 
@Martijn is that "our friend" again?
 
@JonClements: yup.
I deleted another 3 accounts just now.
 
3:57 PM
hoho
 
@MartijnPieters I deleted one late last night - can't believe they're still bothering...
 
Isn't there some IP filter option? Or is it dynamic/overkill?
or you don't want to ban the original account, just the new sprouts
 
@AndrasDeak That's not something I can disclose.
 
@MartijnPieters Maybe get the SOCVR people to keep a watch for him; I think their spam-detector bot may be able to do that. Of course, a mod will still have to do the dirty work of deleting the accounts.
 
4:28 PM
Nah, we are good; best left to the moderators in this case. Thanks!
 
Understood
 
@MartijnPieters pardon
didn't mean to intrude
 
@Andras I doubt it was taken like that - don't worry about it :p
 
OK:) Thanks.
 
4:46 PM
Umm... Nancy Reagan has apparently just died
 
94 years. Not a bad run.
 
5:16 PM
what are all you wonderful internet friends up to this Sunday
 
I'm looking around on SO right now. Later I'll be socializing with my family.
 
Cooking Chilli Con Carne.
 
Wooo hooo - it's my 4 year anniversary on SO!
 
Congratulations.
 
(what have I done with my life! :p)
 
5:18 PM
You have been dedicated to helping other people.
 
Congrats @JonClements . I just gave you another fake AWESOME internet point to congratulate you as well.
So far, @Ffisegydd is winning Sunday. Try harder everyone else.
 
...fake?
 
aww - thanks - I appreciate your presence - presents aren't necessary :p
 
@Ffisegydd Fixed. :)
 
Phew.
I thought I'd wasted 2 years putting thousands of hours into something that is worthless!
 
5:19 PM
Okay. I'm eating waffles and drinking beer (NOT). Is that better?
 
Hey zondo. I finally fixed JohnPal's file renaming problem, but it took almost 2 hours.
 
What have you figured out?
In the comments, I told him to print the name before he tried to use os.rename(), and he said that his mistake was that he had used the file object instead of the file name.
 
Ahh... instead of the .name of the fileobj ?
 
He had two variables: the name of the file, and a file object open for writing. He wrote to the file, renamed it, and then closed it. He was told to close it before he renamed it to prevent errors about another process using it, so he did that and got a TypeError. The problem was just that he used the wrong variable when he used os.rename().
 
today's challenge. Read through this in one shot. http://stackoverflow.com/questions/35829934/producing-pseudocode-for-python-game

I couldn't
 
5:26 PM
For some strange reason he's edited out the code where he was trying to use the file handle in os.rename
 
@idjaw I did it. As a test, just ask me any question about the game. (please be easy)
 
jeez man. Why? :P
 
Why not?
 
Do you actually expect anyone to read that horrible wall of text? — PM 2Ring 2 mins ago
 
5:32 PM
@PM2Ring I read that.
 
I was just about to paste that as "a wise man once quoted"
 
I didn't like the plot though.
 
5:44 PM
How do I combine two statements into one function in f1 = lambda: 1+1; print (1)?
Currently, it prints me 1 when I enter the expression, which means that print 1 is not a part of the lambda.
 
You can only put a single expression into a lambda. If you want to do more, create a proper named function using def
 
LOL
i have started my explaining the external behaviour of the code now i need some pseudocode to go with it enjoy your future MBA :) — Robert Grant 19 mins ago
 
:)
I'm becoming more cranky
 
I totally get it. I'm getting more sarcastic these days.
 
Savage.
 
5:55 PM
You'd be savage if you were reading about OSGi fragments
 
cabbage
 
wowowo
That was a nice dinner break... returned to stackoverflow and saw this: "You've earned the "Epic" badge (Earn 200 daily reputation 50 times)."
 
congrats!
I only did that 3 times so far hehe
 
@RobertGrant That's possible is it? :p
 
6:01 PM
Sick burn.
 
@AnttiHaapala I'll have to stop giving you up-votes... :)
 
only 100 more insane days and...
 
Everyday's an insane day
 
What are the criteria for legendary?
 
150 days of capping
 
6:09 PM
oh jeez
I feel like there was a "once upon a time" in the age of SO where this was more realistic. Now, some of these achievements are just insane to get.
 
legendary is like: 150 days, you answer 2 questions about "what is wrong with my code", say "you're missing a semicolon on line 473", get 10 upvotes on each.
 
Hey Jon. Do you like Harry Chapin? I figured you might, because he's a great story teller, in some ways similar to Billy Joel. Eg Taxi
 
@idjaw The Beta badge is pretty hard to get these days :)
 
It's still possible. I know a guy.
It'll cost £200 each, get me the money in unmarked bills.
 
Only if you give me chili
 
6:15 PM
Chilli costs extra.
I have too many Lynda videos to watch.
 
@PM2Ring I'll try that out later - thanks
 
No worries.
 
Cabbage to you all
:(
 
You greet us then immediately become sad? :(
 
That's fair.
 
6:19 PM
XD
 
I also get sad whenever I see Jon idjaw Bob.
 
Well - tbh - it normally takes a bit longer for that to happen... but I guess everyone's different
 
@Ffisegydd that is kind of my thing
 
I was originally sad because of the lack of response
Yes, totally
 
Okay team - everyone respond to @ThatOneRandomScrub within 5 seconds else he's going to cry :p
 
6:21 PM
@ThatOneRandomScrub sorry!
 
cri
(stops crying)
That's fine :D
 
It's good to see you're an emotionally stable individual :)
 
I'm not sorry. I enjoy when others suffer.
 
I understand
I even endorse it.
 
That's why I make fizzy sad; I'm so happy all the time
 
6:22 PM
@Ffisegydd are you a Cenobite?
 
He's the Marquis de Sad
 
Puntastic.
I didn't know what a Cenobite was until I googled it.
 
I had to google that, then monastic
Ah google, you're my true friend.
 
6:45 PM
This 1 rep OP has been a member for over 2 years. You'd think they'd have read some help pages by now...
 
Wow....
I have been a member for like 3 days
even I know that question is bad...
 
And it looks like they just dumped the question and ran away, which is rather rude, IMHO. I find it very annoying when the OP doesn't hang around to respond to requests for clarification.
 
@PM2Ring That's why I dumped an obnoxious answer in the comments. :)
 
Sure, sometimes unexpected things happen and people have to go & do other stuff. But that OP doesn't have a good track record.
 
oh, you weren't talking about what I thought you were talking about.
 
6:59 PM
So what do we think, -9001 downvotes in the gutter?
Because that's how far down he seems to be
 
cabbage
 
cbg @BhargavRao
 
Cbg idjaw o/
 
\0 what fun and exciting things are you up to today
 
How do you count specific elememnts of the list? len(filter(list))?
 
7:05 PM
cabbage
 
@idjaw Ntn much, Enjoyed watching a game of cricket
 
@ThatOneRandomScrub How you vote is your decision. We don't want this room to be a voting gang.
 
@ValentinTihomirov Yes, that'd work, provided you filter properly. Do you have an example?
 
@BhargavRao a good friend of mine is a huge cricket fan. I remember we were studying for exams together and he warned me that for 3 days he would not be available because he and his family had organized an event to watch India vs. Pakistan. Because of the time difference, they slept during the day to stay up all night to watch it. :)
 
@PM2Ring I don't want that, just estimating his current downvote streak.
 
7:07 PM
@ValentinTihomirov you will have to be more specific, what are you trying to do, and what have you tried?
 
I am asking if there is a special shortuct function for len(filter(given_list))
 
@idjaw India vs Pakistan matches are quite crazy. I have never got a chance to buy a ticket for those matches. They get sold out within an hour :P
 
there is count in Scala, for instance
 
Are tickets expensive for cricket matches?
 
@idjaw Starts at Rs 150, That is around 2.5 USD. But if you want some good seats, 10USD.
 
7:08 PM
WOW
 
@BhargavRao Well it is more refined than football, rugby and baseball
 
@ValentinTihomirov [1,2,3,3,4,5].count(3) --> output 2
 
Only a true gentleman or lady could appreciate cricket more than those. And fakers.
 
@ValentinTihomirov Are you using Python 3 or Python 2? In 3, filter returns an iterator, but in 2 it returns a list.
 
The better seats cost 10USD, with the max cap at 70USD.
 
7:10 PM
@BhargavRao To give you context of my reaction. For hockey games here in Canada, the "worst" seats will go for about 30/40 CAD. The best tickets can very easily climb anywhere between 300-800$
 
@idjaw Or for arbitrary iterables: sum(1 for el in iterable if el == 3) (plus it's the same for 2 and 3)
 
I am using 2.x and count does not accept the filter.
 
@ValentinTihomirov You need to call the .count method on the list produced by filter
 
@JonClements Absolutely. I was contemplating which one to use.
 
It seems that len(filter) is shorter.
 
7:12 PM
But in python 3.x - it won't work
 
Or sum(el==3 for el in iterable)
 
any 2k+er with a minute: can you rollback and merge the two original questions this OP had
 
>>> l = [1,2,3,4]
>>> filter(lambda x:x%2,l).count(1)
1
 
@PM2Ring true... I just - I'm not sure why - have never felt that comfortable using that :(
 
I do like python 3.x so much more, it is simply easier for a scrub to understand,
 
7:14 PM
I'd suggest an edit but it is difficult to do a rollback with suggest (as people usually auto-reject do to the amount of the question it "looks" like one is changing)
 
@JonClements I think I did some timings a while ago, but I suspect my version is a little faster since it skips the if.
 
Thanks Bhargav
 
@idjaw Lol, that is incomparable. When I was there I spent 19CAD on a medium veg pizza, here it's 4CAD :D
 
oh jeez. .count is significantly slower @JonClements Just did some timings against it. Lesson learned on that.
 
@PM2Ring wouldn't surprise me - I think it's just the implicit True/False to 1/0 that just irks me
@idjaw it really shouldn't be for a list
 
@JonClements hmmm....I wonder what I'm doing that is causing such a huge difference between the two.
 
@JonClements Fair enough. To me, it's just the other side of the coin of treating 0/non-zero or empty/non-empty as False/True.
 
@BhargavRao yep, had just deleted mine and was writing a new one when your's came up, thanks again
 
@Jon any chance you could unlock chat.stackoverflow.com/rooms/93197/rec-sopython-social ? We don't use it very often, but we do use it (typically to take game chat out of real chat when it's busy)
Ta love
 
What is the right procedure to ask for un-freezing a room? (other than throwing Jon a cookie :P)
 
7:26 PM
Meta.
 
Fine, Ta.
 
I feel a little bit guilty answering this; I guess it could be classed as a typo... but I couldn't resist the oportunity for a few quick points. :)
 
@Ffisegydd Says he that asked in chat :)
 
He asked for the "right" procedure, not the quickest.
 
bbias
 
7:28 PM
:P
 
rbrb Jon, BBF <-- Be Back Fast
 
@PM2Ring don't feel guilty. Sometimes, you just have to.
 
:) And it's nice compensation for that GTK question I spent over an hour on yesterday that the OP didn't accept, even though he gave me an upvote.
 
I have quite a few answers that I've dumped a lot of time in to only get an accept, or at best an up and an accept.
 
@PM2Ring that OP has 0 accepts since 2010 (0/6 questions)
maybe you should gently inform them that it's an option
 
7:33 PM
@AndrasDeak Yeah. I noticed that after I posted my code...
 
wait, maybe I will
that seems better, hold on
 
@AndrasDeak I did that. And I'll mention it next time he turns up here with another GTK question.
 
I'm blaming a lazy Sunday for this. But I understood this one backwards, and now reading it again, I just can't get my head around what they are trying to do. Anyone understand what OP is trying to get done here? It seems like they provided enough info.

http://stackoverflow.com/questions/35831322/is-there-a-way-to-set-a-value-and-an-attribute-of-an-object-simultaneously/35831348#35831348
 
@PM2Ring but not on your gtk answer?
 
7:35 PM
@AndrasDeak I mentioned it in here. But I guess he might've logged off by then.
 
@BhargavRao any reason you ask?
 
Hi there: I am planning on selling my desktop software written in Python, and I would like to enable the software for a ceratin time (a month, a year...) by entering a license code previously sold. I tried searching for Python libraries or services which help me implement this, but haven't found anything. Do you happen to know of any similar library/service?
 
yesterday, by PM 2Ring
@Anes I just noticed that you haven't accepted any of the answers to the questions you've asked on SO. Please see here for instructions on how to accept, and why it's important.
 
@JonClements Unfreeze room? Yep ... The R help chat has been frozen since a few days, and I ain't get help ;_;
 
7:42 PM
I know R have 2 chat rooms, one for maintaining the tag and one for help.
 
Yeah, they should've merged both. (like us)
 
@BhargavRao why?
I think it's a nice way of doing things.
We started out merged, so I don't see much use in splitting us up.
 
@Ffisegydd To prevent the present state, No activity so the help chat got locked. :/
 
However if I had to start the room afresh and it was up to me, I'd definitely consider it.
@BhargavRao R musn't get much traffic then, but that's no reason for saying "Don't split the rooms"
We'd be different as we have a steady stream of people looking for Python help.
 
For a high traffic tag, split is a nice way. But for a low traffic tag, I still prefer a single room.
 
8:11 PM
@BhargavRao Is it going to get used at all? If it's not been active in 2 weeks (so automatically) frozen - is it still of any use?
 
@JonClements It has been mentioned in the tag info as the place where we can go if we have R queries.
perhaps a few users might have gone away after seeing it's state :P
Ah, Thanks :)
 
Okay - I'll give it the benefit of doubt for now... if it gets inactive again, well, we'll cross that bridge if/when we come to it
 
@JonClements I'll post a message everyday :P
 
Needs to be more than one user doing so though :p
 
Eh I have no life
 
8:14 PM
Oh damn.
 
Where do you want me to spam stuff
On a daily basis?
 
@ThatOneRandomScrub good - you'll fit in great here then :p
 
Yaaaaaayyyyy
(help me....)
 
@ThatOneRandomScrub my ears perk up at the word "spam" :p
 
What do
You mean
 
8:15 PM
aswerfdsdv <-- Spam
 
By spam?
Oh come onnnnnn
That's the joke
You ruined it!
 
Lol
 
To Stack Exchange mods, the term "spam" specifically means unsolicited commercial material, and it's a big no-no.
 
@PM2 You in a different place? Or just awake late-night/early-morning?
 
8:18 PM
I had only just realised what time it was down under.
 
So which room do you want me to TotallyDefinetlyNotSpamGaizBelieveMe
 
From [What makes something spam and when should I flag it?](http://meta.stackexchange.com/a/58035) A post should be marked as spam ONLY when it contains an unsolicited advertisement.

It should NOT be marked as spam when:

The answer contains no useful information, such as an answer that says "I don't care about your problem". Flag an answer as 'not an answer' instead; if you find a weird non-question, then flag it 'for moderator attention' with a custom explanation.

It contains only gibberish, such as "fsdguejgkfdlk". Use the 'offensive' flag for these cases, or flag 'for moderator attent
 
I was joking, sorry
I do in fact know
 
@Ffisegydd it's always beer and barbie time mate!
 
8:21 PM
@BhargavRao I'm just having a very late night. I woke before dawn yesterday, but then I had a rather long rest this afternoon. My sleep cycle is a mess at the moment. :)
 
@PM2Ring for the record, I've left them a comment
 
@PM2Ring Just like the rest of us :D
 
@BhargavRao I go to sleep before dawn, and sleep until the afternoon;)
maybe we all sleep at the same time
I'm in UTC+1:00 :D
 
@AndrasDeak Thanks
 
8:53 PM
Well I think it's time to say rhubarb!
 
Rhubarb o/
 
It's time to work on that game i constantly procrastinate on
I never settled on the setting
Maybe i should take a look at some examples
 
Why the yam is a Python gold badger answering this sort of question? stackoverflow.com/a/35832367/400617
 
Rejected edit on that post.
 
@davidism must be an epidemic, we have similar ones in
 
8:58 PM
@davidism A friendly comment I could understand, but a full answer? Sheesh!
 
I almost closed it fast enough, but he got it in before I clicked the button.
If it had been in the canon I would have gotten it. Added it now. sopython.com/canon/90/input-raises-nameerror
 
He was faster. Probably he lives to the west of your place.
 
Isn't there a 5 minute grace period anyway?
 
@BhargavRao he'd have to be in the Pacific Ocean.
@AndrasDeak yeah, but only if you use the api or edit the dom.
 
@davidism the what now?
I understand neither, sorry:S
I mean sprouts
 
9:16 PM
dupe stackoverflow.com/questions/35832653/defining-remove-repeatmsg . It looks like a bunch of people in the same class don't know how to Google
 
mjollnir'd
 
> Rob, Robbie or even Bob
 
Or Bobert
Bert?
 
What about Bobby?
 
9:29 PM
BOBBAAAY!
 
Boberella?
 
Bobaroonie
 
Boborkey
 
I prefer Boberto myself.
 
Bobbygood
 
9:30 PM
hahah Boberto
 
Bobald?
 
Boberto El Grantioso!
 
Bobism :D
 
Been watching Narcos. Really good.
Have to pay attention to it though as everything is in Spanish.
 
9:32 PM
Nacros is about the drug empire rite?
 
Yes.
 
I remember reading about it in Newspaper.
 
9:44 PM
nevermind, offtopic
 
melon;)
 
Gee, I need to spend more time on U&L. I just scored 125 points on an answer I was just going to put in a comment: unix.stackexchange.com/a/268013/88378
 
@PM2Ring I'm pretty sure there's configuration for both sudo and the graphical prompts to use *** per character
 
Wow, @PM2Ring, 2.5k on UL. Nice.
 
9:50 PM
@davidism Ok; it's not something I've ever given much thought to, to be honest. :)
Ta, BhargavRao!
 
I enabled it once, it threw me off more than no feedback.
 
:)
 
Does no feedback throw you off? I rather like it that way, but then I've never had anything else really.
 
Nah, I'm used to it.
It gets way easier once you realize Ctrl-U deletes the entire line if you think you typed it wrong.
 
Yeah; that makes it really nice. Holding down backspace until your pretty sure you got everything isn't exactly my kind of thing.
 
9:55 PM
TIL that stty -a shows a few useful control-key shortcuts, as well as other terminal info
 
You can put bash in vi mode instead of emacs mode if you're crazy
 
Really? That sounds interesting. My brother uses Vimperator, but I didn't know you could do that in bash.
 
Well, can't be done then can it - even a = 'x'; b = 'y'; c = a + b is using a builtin string method... the last part becomes c = a.__add__(b) hence you're using a builtin method — Jon Clements ♦ 1 min ago
 
@PM2Ring Dam, that's highly useful! Thanks
 
9:58 PM
Reckon I'm being a bit nasty there :(
 
I'm kinda used to the default emacs mode. And I haven't really used either vi or emacs for decades. And even then, I only dabbled for a little while: one Amiga editor I had was vi-based, aother one was MicroEmacs; they were both very primitive & clunky, with no macro support, IIRC:)
 
@zondo even I found that a little strange when i started using linux
 
@JonClements Nice one :)
 

« first day (1968 days earlier)      last day (2998 days later) »