« first day (962 days earlier)      last day (3989 days later) » 

12:01 PM
Oops, my answer isn't actually correct...
 
I hate it when that happens.
 
Well, I actually learned something
 
As a part of my attempts to regain my sleep, I shall head off to bed.
 
Ooh, there we go
 
I love it when that happens
 
12:04 PM
I actually figured it out
@Volatility Night
 
(both, going to bed and learning something)
adios @Volatility
 
Rhubarb peaches and pears ;)
 
@akkatracker talk to me !
 
less than 10 rep?
 
Rhubarb @Volatility
 
12:05 PM
Mmmm ... Sounds delicious
 
Wait, you need 10 rep to talk in chat?
 
I think it's 15
 
Quick, upvote his question!
 
haha
 
:-P
 
12:06 PM
Lol
 
@MaxPower Because the first positional argument is the output file.
 
It's fine, I'll talk to him tomorrow
 
Someone was looking for this? Salad Language
16
 
yea I was :p
Quick, everyone star the pastebin so it doesn't get lost again!
 
Already did!
 
12:07 PM
Lol.
 
*hopes a mod doesn't come around ...*
 
I pinned it. So now it won't disappear.
@mgilson How come?
 
@InbarRose then should i leave it empty? if i type in a file that already exists it will return no file specified? doesnt make sense
 
let me explain, there are 2 things you need to know, positional arguments, and key-word-arguments.
 
How do I explain what <addinfourl at 4554702720 whose fp = <socket._fileobject object at 0x10f3c23d0>>
means
It's.. a raw object?
 
12:09 PM
I dunno... something about continually staring that pastebin as interesting ...
 
c.compare(1, 2, 3)
there are three possible arguments.
the first is the output, the second two are the files to compare.
so if you give only 2 arguments, it will be the output and one of the files.
 
@InbarRose I'm not sure if people will recognize the link without the z7zQqzCw
 
Anyone know?
 
So if you want to specify only the two files, you can do c.compare(first_file='', second_file=''):
 
@Haidro -- Where'd you get that?
It looks like an instances's __repr__ output.
 
12:10 PM
Or, you can change the method
instead of:
def compare(self, output_file='my_file_compare_results.txt', first_file=None, second_file=None):
to be:
 
urllib2.urlopen(url)
Returns in
it*
 
def compare(self, first_file=None, second_file=None, output_file='my_file_compare_results.txt'):
And then the first two arguments are the compared files, and the third is the output.
This might be more sensible - unless you create your class with pre-sets.
Then when you want to only modify the output_file, you HAVE to use keyword argument.
But it all depends on how you most often use the class.
 
@InbarRose Alright thanks for the explanation
though now i get an invalid syntax error ^^
 
um.....
No idea what to tell you.
 
@Haidro -- I wouldn't really try to explain what that is. After looking through the source for about 5min, it's pretty convoluted what type of object is actually returned there.
Just rely on the docs -- It's a file-like object with a couple extra methods
 
@MaxPower that is a problem with the literal_eval . means the file is not written in a format that can be converted into a pythonic object.
 
Wait, that wasn't a link to Salad definitions...
 
I shall never know what mgilson said
 
Is there a better/builtin function to get all methods of a class than inspect.getmembers()?
 
he saiad "
* star as interesting * "
 
12:19 PM
@InbarRose ok thanks
 
@InbarRose -- You're giving away all my secrets!
 
How many do you have?
 
@PeterVaro -- What are you looking for exactly?
I would think that inspect.getmembers(klass,inspect.ismethod) would be what you want.
 
if there is no builtin equivalent (like vars() -> methods() or something..) then it is
 
BTW - @PeterVaro about join that we talked about yesterday. docs.python.org/2/library/string.html#string.joinfields
 
12:22 PM
@InbarRose HAHA! Thanks!
 
stackoverflow.com/questions/16905764/… I'm not understanding how this got 3 upvotes
 
lol he marked "Well, yeah, I think you can say that." as the answer
 
I would have accepted "yes" as an answer, but this is so insecure about itself, as to be practically meaningless.
 
Huh, it just got deleted
 
@InbarRose I've never seen that function in my life
 
12:29 PM
@mgilson Yeah, melon, I tried it, that is what I was looking for.
 
@Haidro he couldn't handle the preassure :P
 
Lol
 
@Haidro -- Maybe I can petitiion to get those 3 upvotes transfered to my answer
No, it was deleted by a mod
 
Here has one :3
 
George Stocker
 
12:31 PM
I actually did flag the answer as low quality
 
Well, your flag was responded to apparently
 
Was helpful
 
Zac
If I create a socket in a function how do I access it in other functions ?
 
The best way to access anything created in a regular function return it from the function and pass it to the other functions
Depending on what you're doing, sometimes a class instance is more appropriate ...
class MyCoolThing(object):
      def create_socket(self):
             self.socket = ...
      def use_socket(self):
             #do something with self.socket
Finally, you could use the global keyword, (though this is NOT RECOMMENDED)
def func():
      global my_socket
     my_socket = ...
def other_func():
     #use my_socket here...
 
I really need to sleep...
 
12:37 PM
@Haidro Oh, Shush you.
 
I've answered like a bajillion questions today
Surprinsingly
Surprisingly
 
Forget about the edit button again?
 
huh?
 
Surprinsingly
Surprisingly
 
Oh, I never use it
Anyways, 80 rep today. I'm very happy
 
12:40 PM
@Haidro How come? (this is actually peeking my curiosity)
 
I prefer to type everything as I type it
If that makes sense
Also, I see what you did there :)
Amg, I'm almost 3k
 
Does reputation from Arqade carry over to SO? ;)
 
I don't know what you mean.
 
Nah
 
12:42 PM
All stackexchange sites are under the same "roof"
 
You only get an association bonus (100 rep)
 
but each individual site is independent when it comes to rep.
 
If you have like 1k on arcade I think
 
Oh i see
 
@Haidro Except for what Haidro just said.
 
12:43 PM
You mean @MaxPower
 
@ception
 
@Haidro No.
 
"@freude yes if you want, you should really try some of these things too – jamylak 11 secs ago"
Lol'd
 
@Haidro What is that?
 
@freude yes if you want, you should really try some of these things too — jamylak 4 mins ago
 
12:50 PM
oh
lol
took me a while :P
 
Yeah, I upvoted that comment.
 
If all my answers which weren't accepted and were the highest voted on the question, suddenly became accepted, I'd have more reputation than Jon Skeet
 
@Haidro -- Yeah, I think we all feel that way sometimes.
Some people campaign to get people to accept their answers
"If this was helpful, please consider accepting an answer" kind of comments
(and there's really nothing wrong with that)
Accepted answers are better for SO than not-accepted answers (IMHO)
 
Definitely. Represents if a question has been answered or not
 
@mgilson why exactly? aren't unanswered questions pushed down anyway?
 
1:01 PM
If someone else has the same problem, an accepted answer will be the first thing they look at to solve their problem. If it worked once, it's likely to work again.
(and if it's the highest voted answer, it's likely to be at least as good as the other answers provided)
 
@mgilson yeah that makes sense
@mgilson i'm kind of new to how SO works even though iv'e had this account for like 8 months now
 
1:18 PM
But I would read the segments into a list using comprehension and strip there.
str_list = [s.strip().strip('"""') for s in strings.read().split(',')]
 
@InbarRose way nicer, thanks!
fix that
 
fix that?
Do it yourself :P
Should rename "strings" to "f"
Because the object you are getting is not a string, or a list of strings.
 
@InbarRose that is also correct! I fix that
I forgot to write 'I' before, I didnt mean to say to you: fix it for me
 
could probably just use .strip(' "')
 
1:27 PM
no
Because he wants to strip whitespace.
 
@InbarRose thanks for the prettify
 
Zac
Just when you thought it was safe to enter the chat room
0
Q: How to implement non blocking socket server in python

ZacA similar but different question: I have an IRC client that generates strings. This IRC client uses a hook to call a method (somone_said) whenever someone says something. I want to send this string over a socket to my flash client. I have a working server in flash but the problem is that it blo...

 
Ahh okie dokies - just looks odd for some reason
 
cabbage @JonClements :)
 
1:29 PM
cabbage all
 
@JonClements cabbage to you too, potato?
 
well then .strip('\r\n\t "') or something similar.
 
So so - still suffering from a wretched yamming headache
@mgilson that works - seems a bit nicer instead of two calls
 
@mgilson -1 character and -1 method calling -> nice:)
 
The extra method call is what I would want to eliminate. It's too bad that .strip doesn't take a tuple
 
1:31 PM
@mgilson yup to both
 
line.strip((None,'"'))
 
that's right, btw -> I changed it to your version
 
It would work similar to line.startswith
I wonder if that would have significant performance implications...
Or, perhaps just using *args: line.strip(None,'"')
 
Cabbage
 
After all, line.strip needs to do a *args -like resolution already (although it may be implemented via a kwarg)
 
1:34 PM
Cabbage @HarryBeasant
 
I am having an issue with accessing Queues within a class
In different functions
 
rbrb
 
In the processQueue function, it will alwauys return that the queue is empty
 
Is this user getting SO to do his job for him? stackoverflow.com/users/2400160/rhk-s8
 
Because he barely has any code in any of his questions?
 
1:45 PM
@HarryBeasant are you trying to use // as a comment ?
 
I'm gonna start using `\* *\` as my comments :-)
 
and { and } instead of indentation yeah ?
 
Yep...
 
He thinks this is C# :P
 
and ; instead of \n
 
1:47 PM
And using instead of import
 
@InbarRose -- I was thinking more along the lines of #include
 
meh
 
:-P (I don't know C# or C++ -- Only C)
 
Sorry, your replies take ages to come up, this chat has weird issues with my internet
 
I like to kick it old-school
 
1:48 PM
for (int i = 0; i++; i < 100) {
}
 
// was just to show you where my code was
That i cant show
 
Better yet, my comments will now consist of a c in the first column of the source and nothing else until column 6
But nothing beyond column 72
 
@HarryBeasant despite other bits that are wrong with your code - that obviously for some reason I can't show ;)
 
(line continuations will have any character in column 5 on the continued line)
 
Whats wrong with my code?
 
1:50 PM
Of course, statement labels are allowed in columns 1-5 as well (seriously, we need something for our goto and arithmetic if statements)
 
of course.
 
@HarryBeasant your logic reads as: 1) If the queue is empty, print that it's empty, and don't do anything else 2) do other stuff...
 
(sorry, I'm done now -- I think)
 
Um - I think someone just went through an upvoted a bunch of my answers >.<
Not that I have anything against that - I would just like to know why :s
 
I could take credit for it and say that it is because of your invaluable contribution to the SO community :)
(For the record, I didn't do it, but I do appreciate your contributions to the community)
 
1:52 PM
If the queue is empty, i dont want it to do anything else, it requires the data from the queue to run
 
woot :)
 
Every once in a while, I get a flag in chat that I'm supposed to check to see if it is offensive. It seems like SO should be able to know when a comment has the word f***, It's probably offensive to someone...
(f*** = yam for all you salad eaters)
 
yamin 'ell :P
 
@HarryBeasant yes, but you only put something in the queue if there's something in the queue....
 
1:56 PM
Because of the daemonic threads?
 
This function
 def queueJobs(self, data):

    self.jobs.put(data)
    print(self.jobs.qsize())



    return True;
Is called by other modules when it needs to queue something
Then the queueProcess processes the data thats in the queus
 
Okay - Didn't realise we were also trying to solve a jigsaw puzzle with missing pieces ;)
 
@JonClements I put it at the bottom of the class i pasted you, sorry, should have mentioned what it did :)
 
** SPOILER ALERT ** (A Game of Thrones Season 3 Episode 9)
http://www.theonion.com/articles/oh-shit-i-totally-forgot-that-happens,32673/
This is EPIC - and HILARIOUS.
 
So does anyone know why my queues are no accessible
 
2:06 PM
@InbarRose lol that's awesome!
i wonder what would happen to Arya
I guess she will go meet that faceless man (forgot his name) and grow up to be a deadly assassin
 
Dude.
 
atleast i hope she will
 
No spoilers.
 
that's a speculation lol i have no idea what will happen
 
I am just saying - stop writing things about the show.
Trust me when I say, even in the 5th book she is still just a little girl.
And she has not grown up to become a deadly assassin.
 
2:09 PM
spoiler! she will still be alive by then ;)
 
Everyone dies.
That is a spoiler.
 
ahahah
I wouldnt be surprised if this is what eventually happens
My favorite character is Tywin Lannister
He is a badass
 
Oh no please!
I will not watch that
I want to keep the badass image in my mind
 
Hahaha.
 
2:14 PM
Tyrion is quite awesome too
for some odd reason i sympathize with the Lannister's the most
I just feel like they are the most fleshed out house in the show even though i don't think that's how its portrayed in the books
@InbarRose but wait isn't the onion fake news only?
 
yes
:)
Took you long enough.
 
LOL
 
Anyway - in the books all the houses are fleshed out.
 
this game of thrones...
 
I didn't even notice that it was the onion news thing
 
@limelights yes :P
 
@limelights It is a shame.
But, at least read the books.
 
I got too many informational books to read so i don't think i'll be reading the game of thrones to be honest... kinda sad i know
 
You have time.
 
Do you recommend starting from book one even though i watched the first 3 seasons?
 
2:22 PM
@InbarRose i really have no interest in it since i heard that it doesnt feature dragons and magic all that much
 
isn't that a good thing?
 
@MaxPower yes.
 
or are you a fan of fantasy settings
 
i love fantasy
 
I prefer sci-fi to be honest but fantasy is alright
 
2:25 PM
and the fact that they threw some dragons in there and some magic got me riled up
but when i heard that they didnt feature it as much i lost all intrest
 
I like the sort of realistic setting that GOT features... it oddly resembles our world
with the addition of some magic / mystery
The last fantasy books i read were the lone drow trilogy
i mean "The dark elf trilogy"
The Dark Elf Trilogy is a prequel to the Icewind Dale Trilogy by R. A. Salvatore. Drizzt Do'Urden, a drow, or dark elf, was originally written as a supporting character in the Icewind Dale Trilogy to Wulfgar the barbarian. However, the author soon realized how popular the character was, and Drizzt became the main character. The final book Sojourn made the New York Times Best Seller list. Works included The trilogy consists of: #Homeland (1990) — Homeland follows the story of Drizzt from around the time and circumstances of his birth and his upbringing amongst the drow (dark elves). The ...
totally awesome
I bought the Watchmen and V for vendetta graphic novles a few months ago and still havent got to finish reading those
I know i'm like 20 years late though...lol
 
@mgilson you were 1ms faster than me, I wrote the same answer for the "waitTime" question
 
cabbage
 
cabbage @CarlosV
 
@MaxPower I read those, I read a lot of the Drizzt books, and lots of R.A. Salvatore.
 
2:38 PM
@InbarRose really? that's awesome! I only read the first 3 though.
 
um
did SO just update the way you edit posts?
Or is that just me
maybe not
 
Looks the same to me
 
I clicked edit and it made me approve someone elses edit
Didnt realise it did that
So i thought it was a pop-out editor
 
Zac
2:59 PM
I'm still struggling to write a non blocking socket server in python guys
pleeeeease help me
 

« first day (962 days earlier)      last day (3989 days later) »