« first day (1613 days earlier)      last day (3348 days later) » 

12:00 AM
but ... the trouble with queues is that once a thread reads a value from it, it's gone from the queue
I assume you'd want the collection of seen URLs to persist, and grow; and each thread would occasionally examine it
for all I know, adding to a set, and testing for an item's existence, are thread-safe; if that's the case, then I'd think that's the simplest way to do it
 
don't some queues (like aws sqs) require you to explicitly delete from the queue or the message will resurface after N seconds? (also, what's that called?)
 
quitting time. cbg
 
@TravisLeleu dunno -- the only queue I'm familiar with is the one in the "queue" library
 
gotcha. i think many message queues have this feature
 
Cabbage
 
12:10 AM
saurkraut
 
Sorry to ask here but it seems I'm unable to chat on the meta site. Here is the question: Can someone with a reputation of 1 edit his own question? I'm asking because someone told me "he couldn't find how to edit". Is he just blind, or is it normal? :)
Ich hasse Sauerkraut... :)
 
dunno
I would hope that anyone could edit their own question
 
12:38 AM
Well, I would also guess so, but I can't find a proper clue in the help.
 
 
4 hours later…
4:15 AM
cbg
 
Cbg
 
5:08 AM
anyone know good django 1.7 tutorials? besides official documentation/polls app
 
5:25 AM
besides?
I do not think it is a very good tutorial
 
5:40 AM
hi
 
6:12 AM
Hi
 
@AnttiHaapala could you please tell me some ways to login. I tried these on other versions but to no success. I f i give it a new try all together whats the best way to atleast login to an https website stackoverflow.com/questions/28985724/…
 
@AnttiHaapala it was cool for me coming from scratch to Python
Ps. cbg
 
hmm
seems to be better than i remembered
@user1977867 what's wrong with my last code?
using requests
 
What I love most about the Django docs is that they go into detail about what's changed between versions, and give at least one detailed example of how to upgrade your code
That's very reassuring
 
@AnttiHaapala I mentioned it in my question
TLSv1 and SSLv23 both give similar errors.
error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure' and
error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure'
 
6:18 AM
then try forcing TLSv1
neither of those come from trying to use TLSv1
when I connect with mozilla it uses TLSv1.2
the sslv3 alert handshake failure means just that:
SSLv3 fails
 
yes i too understand the "sslv3" written in error msg, but according to my code it shud force it to use my specified version

try:
# self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file, ssl_version=ssl.PROTOCOL_SSLv23)
self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file, ssl_version=ssl.PROTOCOL_TLSv1)
except ssl.SSLError, e:
print("Trying SSLv3.",e)
# self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file, ssl_version=5)
self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file, ssl_version=ssl.PROTOCOL_SSLv23)
 
@RobertGrant pyramid does not do that a lot, they don't change apis :D
 
isnt the above code forcing v23
 
and if they do then deprecate it properly with warnings
did it say: "Trying SSLv3: error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure'"
or what?
it should not say any such error wit TLSv1
 
exactly
tjhats y im confused
 
6:22 AM
how can you get a SSLv3 error when your ssl_version is forced to TLSv1
 
y is it giving error msg for sslv3
 
and why do you still have that fallback btw
shouldnt need it, it is not safe even, if the first one fails, there is no guarantee that you can do the second anymore
 
ok u mean i shud just try
1. self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file, ssl_version=ssl.PROTOCOL_TLSv1)
except ssl.SSLError, e:

then try
2.
self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file, ssl_version=ssl.PROTOCOL_SSLv23)
 
no except, nothing
that code just will have more problems so stop using it please
 
ok i'll remove the except also
 
6:28 AM
@AnttiHaapala haha
Oh blimey are we still on this ssl thing
 
yes
I can't understand why is it happening
@user1977867 can't you just try to upgrade your python?
in this time you could have compiled a new version of python on a pocket calculator :D
 
cbg
 
@user1977867 tell your client that the version of python they're forcing you to use is hard to get right in terms of security, and they should upgrade
 
@RobertGrant @user1977867 has a new SSL that supports TLSv1.2, and old Python, but I tried even older python and I get no handshake failure; I try a newer python and I get no handshake failure.
and connecting with openssl command line client works for him :D
 
Oh well, I dunno :)
 
6:33 AM
can i show some online python compiler to confirm handshake error
 
6:44 AM
@thefourtheye I was shocked that I didn't find that "reverse a string" dupe on sopython's common questions. Adding it now.
 
@AdamSmith Strange... Sure... If it is not there please add it.
 
It's there now
I had a whole set of bookmarks with canonical questions for dupes at one point. sopython has ruined me for that.
 
7:07 AM
Yeah, voted.
 
maybe it's something like projecteuler. Anyway, /closed
 
7:26 AM
@user1977867 the online pythons are not trustworthy at all
there was just recently one online python that would think that a day has ~53234.54564589 seconds
 
7:37 AM
1
Q: Using a time-based, rotating hash or string for security

phirschybarIn a CMS app I occasionally need to open an iframe of another domain. At the moment I am setting the URL for that iframe to something very obscure. Like http://domain.com/iframe/jhghjg34787386/. This works but theoretically that iframe source url will get saved in the user's history and could be ...

php <3 had to edit my answer a bit, 0 upvotes
0
A: Javascript Insert into Array

Antti HaapalaI would go even further than any previous and point out that the moment that your $var1 contains a ' (because it comes from the user or you insert it by accident), you will shoot yourself in the foot. Do yourself a favor and use the json_encode: var pl = [], il = []; pl.push(<?php echo json...

lol
 
an answer that as XSS by 85k user is +9 and accepted and mine is at 0 :D
 
7:50 AM
@AnttiHaapala Rob to the rescue
 
@RobertGrant thanks :d
I am still re-editing
 
@MartijnPieters pew pew!
 
just was going through my "crap answers" but it seems they are not that much crap
 
Typo.
Where are the 20k+ users when you need them..
@Antti: hurry up, you are nearly there!
All you need is to hit the rep cap + 1 more accept.
 
yeah, I need to do some work too
wish rep was cash
I'm a senior JavaScript engineer
 
8:02 AM
If rep were cash then we'd have worked out some complex arbitrage system between all the different SEs
 
that sounds scary
I mean senior javascript engineer
though I guess the arbitrage also sounds scary
 
I relearnt it after reading XKCD today :)
 
senior javascript engineer to me sounds like ... deputy line manager of right-foot boot quality assurance
 
Hey up
 
Yo
 
8:07 AM
Dentist, DDS, left lower jaw.
 
@Ffisegydd cbg
@Ffisegydd don't think I haven't noticed your recent lack of adherence to the salad ways
 
@Ffisegydd yo, cbg, hey
 
wowo
I have 13 upvotes in PHP
 
@AnttiHaapala I almost have a bronze tag badge in PHP...
 
@Ffisegydd there is no life worth living outside the ways of the salad.
so hard to get the 15 in php
I have 13 tags towards generalist
mysql, php, html5 seem to be now at 13 upvotes
 
8:11 AM
@AnttiHaapala ah, yeah. I think I have 37 or so..
 
:D
lol
 
Salad is stu... pendously awesome...
3
 
omg avinash has the latest generalist
 
Regex
 
I want generalist :(
it is really hard to find answerable questions in the rest of the tags
earned at least 200 reputation on 35 days
hmhm
>1/5
 
8:18 AM
@Ffisegydd Don't make me try out the kick feature for the very first time, now.
 
getting more 20k users to the room couldn't be easier :D
 
@JonClements cbg
@JonClements: one more delete vote: stackoverflow.com/questions/29051919/…
that'll complete re-burnination of the tag.
 
@Martijn done
 
@JonClements thanks. I'll now salt the earth around the tag.
 
8:34 AM
Did anyone else get my USERS reference on this ?
 
8:56 AM
@JonClements it's gone
 
re-hey-up
 
re-yo
 
Think I've just convinced my mate's dev shop to start using Python
Now to explain the dumbassery of v2 vs v3
 
Make sure they use 3.
 
9:07 AM
Yeah I will
 
@Intrepid have a look at this crazyness carbon3d.com
 
@Ffisegydd okay that video is AMAZING
Although to me, any video is amazing, because most are youtube ones and I can't see them at work
WOW THAT PICTURE IS MOVING
 
so now me know the step 2
1. collect underpants
2. scrap that idea and make a video about 3d printing, call it carbon3d
3. profit
 
 
skills, lol
 
9:18 AM
suppresses the inner NapD
 
mncs wouldnt become mncs if there wasn't any skill involved...
however anyone can do a startup with no skill whatsoever.
 
I've seen job adverts for startups requiring a 1:1 from Oxbridge, Durham, Birmingham, or a couple of other top UK universities
I think that's what it's trying to criticise
 
Upper first
Which I think is just a first in most places
 
ermehgerd in Julia you can do f(x) = 2x^2 to define a function. Don't need the * for multiplication.
We should steal this for Python 4.
 
9:27 AM
@Ffisegydd and we're back on for the PEP!
 
μ = 3
println("The sine of $μ is $(sin(μ))")
# The sine of 3 is 0.1411200080598672
That is sweet.
 
Although we just need to make sure it's totally not compatible with Python 3
As in, that version 3 crap won't even run
 
lol
 
lool
Just read imdb on saving private ryan, and someone had written "just before dieing"
which means the same as dicing
 
9:45 AM
And that's a pretty rare thing to say. Autocorrect should've made it "dieting"
 
Cabbage btw.
 
@poke cbg.
 
What do you think? Is it the job of a template engine to allow you to keep control over the indentation?
 
@MartijnPieters Flagged
@poke I would quite like that, but it's probably not a big deal, and I haven't seen one that does it with template includes as well
 
@poke be cool if it ran a linter over the output :)
 
@RobertGrant Me too, and that’s why I submitted a 88 line pull request to a template engine with exactly that functionality (well-tested, behind an opt-in!). And this person thinks it’s out of scope for a template engine…
 
10:12 AM
So does it basically add spaces to each line of included output equivalent to the spaces in front of the include?
That sort of stuff?
 
Yeah, except that it also figures out the correct indentation, and makes sure it works with multiple levels of inheritance.
 
Yeah, I'd say that's fine in a templating engine
 
It’s for the JS port of Jinja2 btw., so I’ll eventually backport it to jinja2.
 
@poke js port of jinja2?
anyone wanna write a jinja2 parser for tonnikala templating engine :d
 
@Antti Nunjucks
 
10:16 AM
@poke are you using es6 string (tagged) templates?
 
my js templating is: I compile templates to javascript on server (with inplace localization)
 
Julia is weird. It uses multiple dispatch for the operators like + and you can define your own, so you can say +(x::MyClass, y::MyClass) = MyClass(x+y) or something.
 
@Robert Not yet, no. But I don’t think they are suited for complex website templates anyway. It’s more like str.format
 
@poke fair enough. The tagged templates seemed pretty powerful.
But maybe not powerful enough
 
Absolutely! JS has been struggling with string concatenation (followed by implicit type conversion) far too long. So it’s nice to have this now. But yeah, some formatting sublanguage like in Python would have been nice.
 
10:34 AM
@AnttiHaapala once you've made a Pyramid project, can you rename it?
 
With a downvote. Then a close vote. Then a delete vote.
 
@Ffisegydd check on 1 and 2. Lets see if we need 3.
I don't see the need to delv that one; I'll leave it to the roomba to clean up.
 
Can some one tell me what it wrong with this piece of code? dupe but not originally tagged as never mind :P
 
10:49 AM
I also think the question should live a bit longer for OP to recognize the issue.
@Ffisegydd I want a py-3 gold tag too :(
Still so far to go though…
 
I'm worried that given we vote on such similar things, SO is going to think we're puppets
perhaps we are
 
Ignore the strings...
 
I'd suggest you start reading up on real-word issues, it'll be easier than trying to learn programming for one assignment. — Ffisegydd 5 mins ago
xD
 
@Ffisegydd I want that to stick around to be downvoted more.. Is that the wrong motivation?
 
10:57 AM
There should be a 50k permission that allows voting on deleted questions xD
 
Oh god. I wasn't going to go to my graduation, but I just realised that my robes are basically the Gryffindor Quidditch robes from HP. I may have to go now O_o
 
@Ffisegydd find a Sorting Hat replica
 
I'll need a broomstick of course.
 
And someone to punch you with a lightning bolt-shaped object
 
@RobertGrant only the obvious way :P
that is rename and search+replace
 
11:00 AM
@AnttiHaapala ah :) thought I'd check
Would be cool to have a command to do that
 
@RobertGrant a pyramid project is just another package
I guess pycharm could refactor easily?
 
Yeah, maybe
 
+ also you need to rerun setup.py develop, egg_info and change .ini files ... .:D
better to pick a proper name first :D
 
11:02 AM
@Ffisegydd Are you getting robes out of paper, or why isn’t there an actual photo?
 
@poke that's just the design. I couldn't find a good picture of someone actually wearing it :P
 
I see.
 
@AnttiHaapala yeah exactly :)
 
alternatively create a new project and copy the few modified files over there :D
using git from early on will make undoing easier :D
 
But you think a renaming command is definitely a bad idea? :)
 
11:07 AM
I am new to this chatroom, with javascript you can use jsfiddle and then paste the link here asking for help. is there something similar for python?
 
@lovetolearn there are some websites which offer similar features but they can be a bit crap.
If you want to post code, and it's more than 6-10 lines long, just stick it on dpaste.com or in a Github Gist.
 
so what are my choices, just paste the code here?
 
@lovetolearn You can run Python snippets on ideone.com
 
no not meant to run, a place where i could copy the code and the paste the link here asking for help
on why its not working
 
1 min ago, by Ffisegydd
If you want to post code, and it's more than 6-10 lines long, just stick it on dpaste.com or in a Github Gist.
 
11:10 AM
@lovetolearn @Ffisegydd already told you where you can do that
 
@Prabhakar can we help you or are you just spamming us with links?
We're not an Android room.
 
yes thanks forgot about githib for a minute
 
@Prabhakar someone in another part of the internet will help you
 
I've flagged it as spam, he seems to be going around all the rooms posting it.
Went to a talk by someone from alpha.openaddressesuk.org last night
Was really interesting, never realised how messed up addresses are.
 
here it is, i have two files media.py and entertianment.py. When i run entertianment.py i get movie instance has no attribute show_trailer
but the code i am copying is the same as mine ( its a python tutorial)
 
11:22 AM
Well, I'm stumped
Someone tell me what's wrong with that code
(Seriously)
 
@lovetolearn Can you provide the full error message, and also repost media.py so the formatting is correct?
 
import webbrowser
class Movie():
def __init__(self, movie_title, movie_storyline, poster_image, trailer_youtube):
self.title = movie_title
self.storyline = movie_storyline
self.poster_image_url = poster_image
self.trailer_youtube_url = trailer_youtube



def show_trailer(self):
webbrowser.open(self.trailer_youtube_url)
@RobertGrant were you referring to me?
 
Your tab on show_trailer is wrong
Make it the same level as __init__
 
thank you, it works. Have to get used to python errors being about tabs and not actual code
 
Tabs aren't code if curly braces in other languages aren't :)
And woohoo, I spotted a Python problem
 
12:01 PM
I am not satisfied with the dup target chosen here
 
@thefourtheye Why not? o.O
It’s like, an exact match.
 
The code is the same, but somehow I feel that both the questions are bad
 
yes
 
well, the title in both cases could be made better for sure
 
12:37 PM
How do i write 10^5 in a post so that it appears as it should?
 
What's your favourite thing about space?
 
Huh?
 
@user5061 10<sup>5</sup>
 
@thefourtheye Thanks.
 
cabbage
 
12:39 PM
cabbage
 
@user5061 How should it appear? :)
 
@PM2Ring As it would appear on paper :P Check @thefourtheye's answer :)
Dont know how to describe it.
 
@user5061 Yeah, ok. I figured that was the case, but I was just making sure you were using ^ for exponentiation and not Exclusive Or; after all this is the Python Chat room. ;-)
 
@PM2Ring Yeah, my bad, should have clarified :)
 
You could do it with Unicode, but it may look like crap, depending on the font: 10¹, 10², 10³, 10⁴, 10⁵, 10⁶, 10⁷, 10⁸, 10⁹, 10¹⁰
 
12:48 PM
I always thought it was a shame that SO didn't support LaTeX formatting like, for e.g., Maths.SE
As then you'd just do $10^{5}$ and it'd look all purdy.
 
LaTeX would be nice.
How is it done in Unicode?
 
@Ffisegydd +1
 
morning everyone
 
@user5061 Are you using Linux? If so, the easiest way is to use the Compose key. In most distros that's not set up by default, but it's pretty easy to do.
 
12:52 PM
@PM2Ring Thanks, i ll look it up.
 
A compose key, whether already existent on the computer keyboard or designated to an existent key, is a modifier key used to input a number of characters that are not part of the official keyboard. Upon its use, it signals to the software to interpret the following keystrokes (usually two) as a combination to produce an alternate character. For example, striking Compose, followed by ~, and then n will produce the character ñ; striking Compose, followed by O, and then C will produce the copyright symbol ©. == §Key details == The compose key's behavior differs from typical modifier key behavior ...
 
@PM2Ring Awesome.
 
kinda weird that the meteor community on stackoverflow seems pretty limited but Flask is pretty extensive, but they're both around as old
 
Theory 1: Flask is more popular. Theory 2: Meteor is better documented, so people ask fewer questions.
 
1:04 PM
seems like meteor is more in development and flask is more mature and traditional
 
It's nice to see that GNU Terry Pratchett is taking off.
 
That's an amazing idea.
 
1:20 PM
And I bet Pterry would've gotten a chuckle out of it. He was on the net before the WWW existed. I really regret that I didn't have access to Usenet back in the day when he was a regular participant of alt.fan.pratchett
 
so. I have a dumb question in python.
 
Sounds nice
 
I am kind of interested in how games like world of warcraft renders things with priority in a fast way. Do they have some kind of queue sorted by priority?
 
# python puzzle: Can you predict what this code does? def f(): try: raise KeyError finally: return 42 g = f()
My revised version of the @raymondh puzzle def f(): try: raise KeyErrer finally: return 42 g = f() What happens?
Feel free to pat your back, if you found answer to those puzzles without compiling :D
 
1:31 PM
Both produce a syntax error because you can't have a try and a finally on the same line.
 
On Twitter it is properly formatted.
 
It was worth a shot.
 
And, I don't get it? Surely it must return 42?
I don't understand the challenge? Unless I'm wrong and it doesn't return 42?
 
Yeah, that'd be my guess too
Tried it. It's 42!
 
Same
I think the idea is, the reader is supposed to guess "it raises an exception, because you have no except clause", and then they're surprised when the return succeeds.
But we're too smart for that! Or dumb. Not sure which one.
 
1:37 PM
I liked this one
@raymondh I prefer this one: while True: try: break finally: continue
 
That one is better. I saw the answer that someone tweeted below and I know I'd have gotten that wrong.
I'd have assumed that the break takes you out of the while loop and then you'd get an error from continue not in loop or whatever.
 
I don't really get what dabeaz' variant is supposed to add, though. KeyError or NameError, the behavior is the same.
 
Actually it's weird to me that the continue isn't legal there
 
Maybe the reader is supposed to think "it will give a SyntaxError, because KeyErrer is a typo"?
 
1:50 PM
I vaguely remember a truly weird syntax puzzle, that had a yield inside a list comprehension.
 
Yeah I remember someone (DSM maybe) linking that.
 
user559633
ugh dabeaz's KeyErrer heh spelling error trick question im so cleverrr
 
oh hey. Today is St. Patrick's Day
 
user559633
actually, all of those are trick questions :]
 
user559633
@corvid yeah. the "woo girls" are already walking around here
 
1:52 PM
I expect it to be a little crazier in Boston
 
user559633
yeah, probably
 
user559633
areas in new jersey within commuting distances are kind of the worst though
 
I'm glad to be working at the center of the BigCorp campus, so no woo girls are in earshot.
 
I'm a woo girl ;)
 
notes down in journal that "BigCorp" has a campus
 
user559633
1:54 PM
since it's filled with people that did 'communications' and other BS majors in small cities, so it's the most entitled of the not very bright
 
There are perks to having 300 feet of parking lot separating me from the hoi polloi.
 
user559633
if my daughter ever wants to go for a communications major, i'm going to disown her
 
She'll use her communication expertise to get un-disowned. With the power of clear understandable conversation.
It's like a jedi mind trick.
 
user559633
heh, i've worked in too many BigCorps to not see through a presentation of no substance
 
what even is a communications major?
 
1:58 PM
I assume they design satellite dishes.
 
It's the boss of a communications sargeant
 
user559633
a way to milk $40k out of the parents of not-very-bright students
 
Someone has developed something called "Pythran" - Unlike the Cython approach, Pythran input code remains compatible with the Python interpreter. Output code is generally as efficient as the annotated Cython equivalent, if not more, but without the backward compatibility loss.
 
I wanted to make a Pirates of Penzance joke riffing on "communications major" but the cadence doesn't fit right.
 
I can get you a copy of the pdf if you're interested and can't access it too.
 
1:59 PM
@Kevin perhaps if you were a communications major you could've made it work
 

« first day (1613 days earlier)      last day (3348 days later) »