« first day (2489 days earlier)      last day (2462 days later) » 

12:37 AM
@enderland I see your "caffeine" and raise you an "inadvertently"
for some reason I keep messing that up
 
yeah but aren't you a non native english speaker?
 
Indeed I am not.
 
oh. I guess I assumed you were
 
I mean
I am not a native English speaker
one too many negations there
 
you are not an english speaker either
I think it's time we broke the news Andras
 
12:43 AM
am I a speaker?
 
We've been having to throw everything in to Google translate. You haven't been typing in english ever in room 6
 
"no, I am not a native English speaker" == "yes, I am a non native English speaker"
 
my comments are purely for trolling purposes
 
@idjaw the twistiest of plot twists
like, Lost final season level
 
In the made-for-tv-movie of room 6...I have to say if this was a plot reveal 3/4 in to the movie, I'd be shocked as well.
 
12:45 AM
in a movie we could claim that it's a Gene Roddenberry-esque stunt to prevent viewers from being distracted
"sure, everyone speaks Alienese in reality"
 
Everything is translated for all parties to understand each other
(just looked up Hungarian actors and most of them are dead...wtf Hungary?)
at least the chain of images that first popped up when I looked up "Hungarian actors"
was trying to find who would play you in the movie
 
"Hungarian actors that Canadians know about", FTFY
 
lol
 
we don't have very famous actors nowadays
no Lugossy Béla's nor Gábor Zsa-Zsa's
There was an actress who played in Underworld, I think?
that's about it as far as I know
 
Houdini!
 
DSM
12:56 AM
I think I mentioned once hearing about an AI project which managed to hypothesize that everybody before 1800 or something was famous.
 
damnit, Sziget Festival has begun
 
@DSM that's really interesting. If there is some kind of article about that would love to see it
 
1:09 AM
bah, past 3 AM again
rhubarb
 
rbrb
 
2:09 AM
Guys, is there a way to add query monitor in django frontend?
Similar to this
or Symfony has a similar one as well
 
at work this client insists on not using an XML library to access our XML web APIs
they keep sending us syntax errors then wondering why it's not working >.<
 
 
2 hours later…
3:48 AM
I'm trying to figure out how to debug a python program that is hanging, without producing any visible output. It uses asyncio. I'm looking for general troubleshooting suggestions, and tried searching SO, but without success. If I should just make a Question anyway, I'll do so, but thought it better to ask here first.
The program is github.com/jjjake/iamine and I'm running it with a million item list -- it freezes near the end (60 from the end the last time I ran it).
 
you can write your app in modular fashion
and write unit tests
 
yes, I've done that. :-)
 
instead of attempting to debug your system as a whole
so each module has desired input and output
 
I'm not sure how unit tests would help with a hang...
 
and in your core app all you need to do is bind together perfectly working modules
hang?
what's hanging?
 
3:52 AM
iamine (the program) sits there not producing any output, i.e. hanging.
 
you can use pydebug
set a break point
and step through your code
 
yes
It basically exposes a port number
you just need to hook it up with an IDE or terminal CLI
 
either
 
3:55 AM
hm, they don't seem equivalent -- but I'm probably missing something.
 
sorry, i didn't have a look at the bottom one
basically, debugger would help you out
 
heh. Well, I'll look at pdb (that's the bottom one) in more detail.
 
4:35 AM
OK, this answer (quoting from a blog post) was helpful: stackoverflow.com/a/25329467/450246
I'm now running the job again, and either it will work, or I can enter the debugger and look around.
 
5:04 AM
Anyone here know much about consumer desktop hardware? I have a LGA1150 mobo with a Z97 chipset, Celeron G1840 2.8GHz Dual-Core Processor, and 8 GB DDR3 RAM. Is it worth sinking money into upgrades for the CPU, RAM, getting a GPU, etc? Or should I put my money into a whole new mobo?
A new mobo means I will have to have enough money for just about every component which is a lot of outlay at one time. But I can upgrade individual components one at a time for my current mobo.
 
@Code-Apprentice Hi
Bye
 
Good morning cbg
 
5:50 AM
Good morning cbg
 
Good Night cbg
 
 
1 hour later…
7:09 AM
Good Morning :)
Looks like everyone is sleeping zzZZ
 
7:23 AM
Do we have a dupe for "use raw string literals to avoid accidental escapes in file paths"?
Nvm, found one.
 
@Rawing On that note, what is the convention for a literal % sign? Use a raw string or escape it or leave it as it is?
 
Hmm? When would you ever have to escape a % character?
Oh, is this about old-style string formatting?
 
Nvm, my question was specific to some Django stuff. The strings are later resolved with appropriate variables, so have to use %s for them,.
Apparently we can't use a % without escaping it, when using old-style formatting.
>>> '%s\%'%2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: incomplete format
>>> '%s%%'%2
'2%'
 
I don't know django, but that looks like it's doing old-style string formatting.
 
7:35 AM
Yeah, that's how you do it. Raw string literals wouldn't be of any use there
 
yeah, thanks anyway
 
Firefox finally became usable with the new update
 
7:49 AM
morning guys
was wondering cna someone help me with a bash script problem
when i run this command, ping -t $IPADD | while read pong; do echo "$(date): $pong"; done > ${SERVER}${IPADD}${FILEFORMAT} &
i get this in the file
`Wed, Aug 09, 2017 3:45:55 PM: Ping request could not find host 199.59.149.230
. Please check the name and try again.` and a lot of blank lines below
any ideas why?
 
I guess ping -t $IPADD produces the same output? Either way, I'm pretty sure we need to know what $IPADD is to answer that question.
 
-6
Q: Are there any other communities like sopython?

GypsyCosmonautAs I expressed my problem in an earlier question also, all websites on Stack Exchange are not listed anywhere. You won't know they're there until you stumble upon them. I came across the sopython community today. I went ahead to this website and when I hit on login, I was logged in with my curre...

Anyone else notice ^^^ :p
 
8:07 AM
@Rawing THANKS :) you just highlighted my problem
that was the problem. my variable $IPADD issue
 
Cabbage
@Ming This room is for Python, not Bash. But anyway, you should always quote parameter expansions, unless you actually want word splitting (and generally you don't want word splitting). So that command line should be ping -t "$IPADD" | while read pong; do echo "$(date): $pong"; done > "${SERVER}${IPADD}${FILEFORMAT}" & For more info, please see Quoting in GreyCat's BashGuide.
 
8:37 AM
@PM2Ring thanks. appreciate the help. alright noted on that
will check out that bash guide
 
TIL finally clauses can eat exceptions
def f():
    try:
        raise ValueError
    except ValueError:
        raise ZeroDivisionError
    finally:
        return 1
>>> f()
1
 
@PaulMcG There's a current thread on the xkcd coding forum discussing the Yoda conditional.
 
@Rawing that's kind of what it exists for
 
not really. It's kinda supposed to re-raise the exception afterwards
 
@Ming No worries. Also take a look at ShellCheck. It's not perfect, but it can be very helpful.
 
8:40 AM
thanks :) @PM2Ring
 
@Rawing Annoying, isn't it. Fortunately, the exception doesn't get eaten if you don't have a return in the finally clause.
 
how is it supposed to return something and raise an exception at the same time?
 
@khajvah Good point. I think it's reasonable to assume that raising the exception would take precedence over returning from the function; OTOH, a finally clause is guaranteed to run no matter what.
 
Well I mean it does make sense, but re-raising the exception would also make sense. They should just ban return statements in finally blocks IMO
 
Here's a question about this topic, and there are relevant questions in the Linked sidebar. stackoverflow.com/questions/517060/return-eats-exception
 
8:54 AM
Oh boy. "This is not a genius level question but still worth answering." That's the biggest red flag I've seen in a while!
 
how can i get a list of active ip addresses
i tried going online but alot of them are outdated
 
@Ming I guess you could do Reverse DNS lookup, but as Wikipedia says "it is not an Internet Standard requirement, and not all IP addresses have a reverse entry".
 
What's an "active" ip address?
The IP address(es) of your own device? The IP addresses of other devices in the network?
 
A complete list of all valid IP addresses on the Internet would be rather large... And it would make life too easy for malware writers.
 
9:13 AM
is there a list of top 100 sites and their ip addresses?
@Rawing active meaning the address is available
 
9:55 AM
thanks @PM2Ring
btw, how can i do ping of death of my server? @PM2Ring i tried but it didnt work
:loop
ping 10.22.38.111 -l 65500 -w 1 -n 1
goto :loop
or something similar. want to test the limits of my server bandwidth
 
@Ming No idea. But this is getting rather off-topic for the Python room... Sure we discuss lots of stuff here, but we (mostly) try to keep computer-related discussion relevant to Python.
 
@PM2Ring alright. yeah agree too. ok then
 
Just had fun answering a question... It's probably not really what they wanted but more what they sound like they're after. Plus... I felt like trying it anyway...
 
Thanks.
 
10:34 AM
cabbage?
 
@poke cabbage!
 
10:58 AM
I love it when people ask for help here with thinly veiled malicious activities
"Halp how to DDOS a server?...asking for a friend"
 
When using flask should I always use a models.py file when using a database? As currently the apps that I have built I have just included everything that would go in the views.py and models.py file in the init.py files. As I fully don't have an understanding of oop yet, I have been building it this way. Is this a problem?
 
Code:
from pynput import keyboard

def on_key_release(key):
    print('Released Key %s' % key)

with keyboard.Listener(on_release = on_key_release) as listener:
    listener.join()
How can I stop detecting it when i pressed a key at once?
 
11:13 AM
> Call pynput.keyboard.Listener.stop from anywhere, raise StopException or return False from a callback to stop the listener.
This from googling "pynput once".
 
:D
 
oooh this is great
in JavaScript, 4 hours ago, by Ming
ping -t $IPADD | while read pong; do echo "$(date): $pong"; done > ${SERVER}${IPADD}${FILEFORMAT} &
Jan 4 at 10:07, by poke
@Ming Please do not cross-post questions in multiple chat rooms, especially when neither of those chat rooms is actually related to your question.
 
Garlic?
 
well yeah, that was a given
I'm searching for shady questions in their history, because Ming is in my "something's off with some of their questions" mental bin but I don't remember specifics
 
@AndrasDeak January 4th? o.O
 
11:19 AM
yes?
 
I thought I wrote something like that more recently
 
You might have. But perhaps directed at someone else, or it didn't contain "ming" for which I searched in the transcript
 
cbg
@roomowners the educational pinned posts have been unpinned
thanks
 
11:39 AM
/me says in his best Poltergeist 2 Carol Anne voice... "they're baaaaack..."
 
should I watch those movies? :P
 
Depends how easily creeped out you are and how much you can put up with 80's special effects :)
 
there's a reason I haven't seen it...
I was really easy to spook as a kid so I grew up with "horror/thriller = no-no"
I watched classics like Alien(s etc) as an adult
 
@AndrasDeak Huh? Is there an auto-unpin?
 
yup, 14 days
 
11:45 AM
interesting
didn’t know that
 
We watched the original ghostbusters a few weeks ago to prepare for the new movie. There's a scene where hand come out of the chair and grab poor Sigourney. I forgot about it, but then it came back how much that scene terrified me:D And the next 10 or so minutes were completely new to me....I probably blanked them out when I saw it as a kid :D
 
@poke yeah... bit annoying - it'd be nice if it only ran if there were N or more pinned messages and drop the earliest... most rooms want to keep 2/3 items constantly pinned
 
I'm sure there's a work-in-progress feature request about it
 
@JonClements One would think that room owners could also just unpin stuff that’s no longer relevant.
 
11:49 AM
Well, they can... but obviously the system decides that after 14 days it's obviously not relevant for you :)
 
cbg
aaand
rbrb (be back soon :P)
 
nice
 
12:11 PM
Someone was just very bold and actually dared to edit an answer of mine breaking proper typography…
 
0
Q: Alternative of this loop in C for(i=0,j=10;i<j;i++,j--) in python

RahulI tried this mylist=['+','-','+','-'] for i in range(0,len(mylist)-1): k=ord(mylist[i]) if(k is ord("+")or(k is ord("-"))): del mylist[i] i=0 but it exit after one iteration I want to search from starting to end every time So can we pass variable in range()? I am ...

Wow - great example of why writing <insert language here> in Python is never a good thing...
 
That is bad even for <insert language here>
 
@PM2Ring Ugh, I never liked that syntax, and it was purely about capturing errant '=' assignment when '==' was intended.
 
12:27 PM
^ yeah
 
There are 550 unicode characters that can be converted to int using int. There are many additional characters (I have the number in my notes somewhere) that return True for isdigit() that will raise an exception if int()'ed. Most notably are the superscript 1, 2, and 3 in the 8-bit ASCII range, but also include the many "digit inside a circle"-type symbols.
And cbg btw
 
cbg, Paul
I was surprised to see that pyparsing parsers parsed result thingies happily return an empty string if you try to access arbitrary attributes
 
Yes, it was a moment of weakness
If you use the dict notation for a non-matched result name, you will get KeyError
I'm going thru adding unicode constants to pyparsing, to expand on the default alphas and nums string constants for Word building
 
I didn't even know results can be accessed like that, I was only surprised that .toDict and .toList were empty strings ;)
 
Thus my unicode observations
 
12:34 PM
yeah, I figured there's a connection
 
I think I'll implement unary '+' and unary '-' to return .asList and .asDict
Or maybe "@ <type>", like print(parsed_result @ list)
 
ah, yes, the obvious way
perhaps next() and send()?
 
@PaulMcG I've been playing with the regex module on pypi - have you considered maybe making use of that in pyparsing if possible (or you're not already)?
 
> from a funk module.
I don't even know
 
There are a number of internal re's already, but I try to minimize the dependency footprint, so I just use the stdlib's re
For example, all the Word objects use an internal re for their matching
And there is also a Regex class if you want to get down and dirty with a particular parsing expression. What parts of regex are you especially drawn to?
 
1:04 PM
There are a couple of extension modules that I look for, and fallback to less elegant means if they aren't present, so I could do similar with regex if there were some true sexiness to be had
 
@PaulMcG I quite liked the list construct (like your OneOf) I used in stackoverflow.com/a/45587268 today. Equivalent of re.compile(r'\b({})\b'.format('|'.join(re.escape(word) for word in sorted(words, key=len, reverse=True)) kind of thing
 
@PaulMcG I took a regex solution from one of your old answers, to match "any integer or floating point number"
 
Yes, match longer words first, to avoid masking by shorter words. oneOf actually goes to some trouble to try to preserve order, and only reorders the input if there is a potential mask (like oneOf("< = > <= >=")
@AndrasDeak - I finally added those to pyparsing as common expressions. I was trying to prevent further API bloat, so I defined a namespace class 'pyparsing_common', and these common integer, float, IP address, etc. expressions are in that.
 
@PaulMcG ah neat, I'll look into that, thanks
 
I may rethink the implementation of pyparsing_common as a class tho, I might rework it as just a "bag" object.
 
1:11 PM
I might have to patch them still, because I might get fortran style doubles (1.2d-3)
 
I already have such a class internal in pyparsing, I think I called it _Constants
Oh, very nice :/
 
[eEdD][+-]?\d+ instead of just [eE][+-]?\d+ or something
 
Yes - that should do it
 
(that's what I'm currently using I believe)
but if there's a more pyparsing-idiomatic way I'll do that :)
just for the heck of it
 
No that is it - you might want to add a parse action to do the str->float conversion at parse time
Then when you are working with the parsed data, it will already be floatified
 
1:15 PM
that's what I did based on your answer:)
anynumber = Regex(r"-?\d+(\.\d*)?([eEdD][-+]?\d+)?").setParseAction(lambda t: float(t[0].lower().replace('d','e')))
 
Or you can add other parse actions, like a range check .addCondition(lambda t: 1e3 <= t[0] <= 1e4) and the token t[0] will already have been converted to a float
 
thanks; fortunately this is all really basic
 
Oh, yes, because Python's float() builtin doesn't grok "1d3"
 
yup
I don't blame it though
funnily matlab and octave do, due to matlab's deep fortran roots
 
Is there a float converter in numpy or pandas that handles that, I wonder?
 
1:18 PM
meh, I don't think there's a need
you can print both with d-style and e-style if you want to
 
mhm
 
whoever wants to post-process properly should use 4e15.12 instead of 4d15.12
and now I realized this in matlab/octave:
octave:1> str2double('1.d3')
ans = NaN
octave:2> 1.d3
ans =  1000
octave:3>
sorry for the mostly-off-topic by the way
 
@PaulMcG a there sided dice? Huh :)
 
@JonClements - ??? did you mean "three sided"? And where does this come from?
 
work cbg. Only person on the floor. It is really yamming weird
I don't know if I'll stay here if it really is going to be only me lol
 
1:26 PM
@PaulMcG role-playing/board games... 1d6 is a normal single roll, 2d9 is two nine-sided rolls etc...
(So if you were playing yahtzee, your first roll would be a 5d6)
 
Ah of course
 
omg I know what I'm going to do
If I am the only one in the office...I'm going to work at everyone's work station today at least once
 
@idjaw if you hear a chainsaw, run
 
I need to work out the math to make sure the timing works out
 
1:29 PM
everyone has laptops
 
I had someone write a parser that would evaluate those dice expressions, with qualifiers like "take largest 2" or "take smallest"
 
won't work
 
<sounds good, doesn't work .gif>
 
It's a fun little Pyparsing learning exercise
Everyone can relate to dice rolling in some form or another
Even Julius Caesar did
 
:|
he iacta'd all the alea
 
1:32 PM
someone just showed up. Plan spoiled
 
awww
 
\o cbg
 
today's game is refactoring
 
I wish I could refactor more.
The project I am currently working on is god-awful spaghetti code.
 
1:45 PM
What do you do, Code(?), at your new job ?
 
web development...with Cold Fusion.
 
just remember it can always be worst... :P (was directed at spaghetti code)
 
That is difficult to imagine. This project is just one monolithic piece of code. No design whatshoever
 
does it functions the way it suppose to ?
 
yes
but it took 4 hours to figure out a 3 line change
 
1:47 PM
because here in my City, they bought a 17 million dollar program that doesnt function properly.... on top of that, it has to do with medical stuff ...
 
okay...maybe that is worse.
 
i would hate to be the person working on that 17 million dollar software lol :D
 
does the code follow some principles of structured design?
 
Not to take away from what you are feeling....
spaghetti code is terrible and I understand since I have to work with it. I feel like every company has spaghetti code (maybe not the top tier companies)
@Code-Apprentice no clue, I didn't get to look at the software... just read the news paper lol
 
anyone who writes spaghetti code should be drawn and quartered.
 
1:50 PM
mmmm
spaghetti
 
just need some meatballs or clams with em
 
And to top it all off, I found a bunch of <cfabort> tags in the code yesterday. Which is like having returns littered throughout a function at random spots.
 
sounds fun /s, are you working with decent humans though ? hows the work life outside of coding
 
yes, the other guys at the company are good to work with.
There are 4 of us
even though I am the newbie, my suggestions are considered equally
I am like "let's do a slack team" and the boss is like "okay, go ahead and set it up"
 
oh nice. do you get free coffee/lunch? I'm assuming it's flex hours come in whenever leave whenever just work x hours a day?
 
1:55 PM
free coffee is the best. unless its bad coffee
 
I don't drink coffee, but there is some in the office. And lunch once a week with a company meeting.
I found the soda and chips, though.
I've been running a local tech meetup (which is how I got the job) and the company will start providing food for it.
 
I'm thinking I should start looking for a new job
 
@MooingRawr if you want to move......
we have coffee and snacks. :P
 
@MooingRawr I've been doing 9 to 5. I'm not sure how flexible they are about hours. I don't have a key to the office and I'm new enough that I really need to be around while everyone else is so that I can ask questions.
 
Interesting. best of luck to you.
@enderland do you have pet sneks :D ? Also my sister is taking her yearly trip to your area later this month..
 
1:58 PM
@MooingRawr maybe? a lot of people bring their dogs in
I'm not sure if they actually have snacks for them, heh
 
remember this?
Aug 6 at 1:17, by 10 Replies
tkinter is great for designing programs that you might find in the 90s
 
thanks
 
I found the solution to game dev in tkinter
 
@enderland I really hope I don't need to drive her back :P
 
lol yeah
I'm not sure how big our office up there is actually
 

« first day (2489 days earlier)      last day (2462 days later) »