« first day (1389 days earlier)      last day (3562 days later) » 

12:00 AM
@Alexxio Well, glad it works - don't see why your code was hated though :)
 
Haha, Thanks, been battling with it for the last 2hrs :-)
@IntrepidBrit I don't understand too
 
@Alexxio Happens. Always glad to help with sanity checks - assuming I'm feeling sane at the time
 
haha, Thanks man, really saved a lot
 
@Alexxio Onwards!
 
 
2 hours later…
2:33 AM
@Kevin OMG-OMG-OMG-OMG!
Have you noticed, that Submarine was actually directed and written by Richard Ayoade? And who is he? Our dearest Moss -- from the IT Crowd !!!!!!
 
@PeterVaro I'm sorry, but @Kevin is not available to take your call right now. Please leave a message after the Python. Ow.
 
@IntrepidBrit LOL. I know, I know..
 
@PeterVaro I just felt like going slightly early-morning mad
 
@Kevin.. I noticed this, after watching The Double -- which was an interesting movie (his second one) and I still don't know what should I think of it..
 
OH
Google you saucy minx, how long have you done that for?
Didn't realise that Google search attempts to auto-draw one's graphs
(accidentally pasted into google rather than wolfram)
 
3:07 AM
Anyone available for a quick sanity check?
 
 
2 hours later…
4:54 AM
cbg
 
@DSM about functions, the most annoying is that inspect dose not even recognize an instance with ` __call__`
 
 
2 hours later…
7:37 AM
Cbg :)
 
8:04 AM
32
Q: Explaining Python's '__enter__' and '__exit__'

zjm1126this is i saw in someone's code: def __enter__(self): return self def __exit__(self, type, value, tb): self.stream.close() thanks from __future__ import with_statement#for python2.5 class a(object): def __enter__(self): print 'sss' return 'sss...

this is pretty shitty question and answer
 
8:14 AM
The question in particular
 
8:25 AM
isnt there any better
 
8:37 AM
cbg all
 
8:58 AM
cbg
@Ffisegydd didnt see any good question/answer on context mgrs, see above ^
 
 
1 hour later…
10:03 AM
Working on a beautifulsoup script to parse the chat transcripts.
 
I'm writing a thing in F# for the same thing
Want to scrape out all links posted.
 
I'm looking to simply save the chat transcript to a database. Then maybe set it up so it updates whenever someone says something.
Not entirely sure what I'm going to use it for yet, but I'm sure I'll think of something :P
 
user559633
SO chat isn't covered by the API?
 
Heh nah.
Chat is the disowned child of SO.
I've never used requests/bs4 before so it's a bit of an excuse to play too.
 
user559633
Can you see where the web browser connects to and pretend you're a chat client?
 
user559633
10:11 AM
[status-Javascript]
 
user559633
heh, it thought about it
 
I remember one person writing a script to connect to chat via the command line
 
user559633
insert coin
 
user559633
<(?:"[^"]*"['"]*|'[^']*'['"]*|[^'">])+>
 
user559633
hehhhh neat.
 
10:13 AM
wut?
 
user559633
copy and paste that regex looking thing. possibly into the sandbox room
 
Ah I think I've seen this before
 
user559633
But yeah. I'd connect to the chat server instead of parsing html on a loop
 
You mean to update in real-time, but what about the old transcripts? chat.stackoverflow.com/transcript/6/2014/8/4/0-24
 
user559633
heh, have fun. i'm sure you can send the server requests to programmatically grab history though.
 
10:19 AM
You mean have it return as a json or such?
I freely admit I know little about such things, damnit Jim I'm a physicist not a web developer.
 
user559633
Sure, something beyond polling for a bunch of crappy HTML to parse
 
jquery + javascript to handle client inputs or pure JS?
 
Whichever you prefer.
 
okay
: )
cbg
 
user559633
but pick an approach and stick with it
 
10:24 AM
is mixing Jquery and JS good?
i mean using both of them?
 
jQuery is JS.
 
Yes
 
: )
if Jquery is JS, why a different name?
 
user559633
it sucks to maintain a project in which the javascript 'dev' jumped back and forth between libs and copy/paste SO answers like a jack russell terrier
 
user559633
@tilaprimera jquery is a library for js
 
10:25 AM
jQuery is a JS library. Like numpy is a Python library.
 
ohhh : )
 
user559633
numpy is black magic. alchemy.
 
hehe
sounds like i am gonna be using jQuery
 
11:10 AM
@tilaprimera what do you mean "is mixing jQuery and JS good?" as others have said jQuery is a library for JS. Technically, it adds lots of abstractions layers, so you can jump in and out of it if you'd like - it depends on the context as to whether that's a good idea.
 
cucumber
 
if jQuery does it, i am not gonna bother using its JS's equivalent code
lesser the code the better : ) for me right now, a mere 3-5 lines.
 
cbg
what are we all working on today?
 
user559633
11:25 AM
adding parallelism to a blocking call in my pluggable chat bot. you?
 
using jQuery to handle mouse click events to fetch x,y.
 
user559633
worth asking in case I can avoid doing anything heavy: is there an existing idiom for

`turn_into_non_blocking(some_blocking_function(x))`
 
user559633
the blocking call is just sitting and listening for events from the network. i want to keep from re-writing a company's module if possible.
 
@tilaprimera Flask project and two online pair programming sessions.
Oh, and prepare for a presentation tomorrow.
 
presentation about?
 
user559633
11:36 AM
@MartijnPieters do you know if that hangout will be recorded for future replays?
 
@tilaprimera Python internals and how they affect your python code.
plus a Q&A
 
hmm
 
@tristan I think that was the idea, yeah.
 
RSVP is for the hangout ?
 
user559633
Great, thanks. I'd be interested in hearing your presentation, but I'll be in the middle of something then
 
11:38 AM
i most likely will be in the middle of a trek too...
thank you for the link!!
 
11:50 AM
@PeterVaro wow :-o He's multitalented, that one :-)
 
user559633
 
A good comic.
 
@tilaprimera There is a limited number of spaces, but the hangout is also broadcasted.
 
is it saved up ?? it is shame that i will miss it tmrw. : /
 
If by "saved up", you mean "recorded for future replays", then refer to this previous conversation :-)
If you mean "have all the spaces been reserved?", good question.
I suspect one could scan Twitter for RSVP messages. I'd do it myself but I'm not familiar with their interface.
Interesting video from MIT: Extracting audio from visual information. "Algorithm recovers speech from the vibrations of a potato-chip bag filmed through soundproof glass."
One of Reddit's comments on the video was, "The Oval Office has vibrating windows just for the purpose of preventing eavesdropping like this". Interesting if true.
 
12:14 PM
cbg
 
Greetings
 
user559633
@Kevin That's amazing. The video, the idea that this approach would already be known and counter-acted by the government
 
I'd better check up on my overnight process, see how it went... brb
 
@MartijnPieters only 8 spaces? :(
 
@JonClements With the airpair conference you can submit questions in the chat on the broadcast page.
Perhaps you can do so here too.
 
user559633
12:18 PM
@JonClements 8 spaces is the limitation of google hangouts multi-player.
 
@tristan ahhh... that'd make sense
 
I'd be interesting in listening to it but I have no questions to ask really so I'll probably just catch the re-run.
Plus I don't use Twitter to RSVP with.
 
user559633
argh. annoyed when I type up an answer to a question and the asker deletes it
 
@tristan was there a genuine reason for deletion? Could always try and get it un-deleted if you still have the link.
 
Same. Rather discouraging when you're trying to answer a neglected question and it vanishes
If he had just held on a little longer :'-(
 
user559633
12:27 PM
it's fine. i only installed py3 on a linux VM to give the guy an answer.
 
user559633
@Ffisegydd the reason he deleted it because I think he realized what he was doing wrong and it was a sort of trivial thing to catch.
 
Ah ok
 
@tristan suppose that's fair enough... as long as it wasn't a hit and run delete kind of thing :)
 
user559633
Nah, high rep user with a "what's wrong with the way i'm using exceptions" question, wherein he was not checking the response from subprocess ( he didn't expect the output he was receiving, but it was what he was sending )
 
I only count 3 tweets so far, so there should still be space.
 
user559633
12:32 PM
Are you going to be talking about bytecode and compiler optimizations?
 
@Martijn it's tempting but I imagine I might just get the re-play. Although I think it'd be interesting, it seems somewhat selfish to try and grab a space for someone that I "see" everyday :)
 
Don't worry, I suck at public speaking, so you won't miss much.
 
Your sales pitch also appears to suck :)
 
I've got a bs4.element.Tag and I'd like to get the string from inside of it. I know I can use tag.string but my tag contains html code (<i></i> tags to be exact) and so that's returning None. I could use tag.stripped_strings to return a generator but that loses the italic information. CAN HAS HELPS!?
The tag is from the chat transcript and is:
<div class="content">
                    poor, poor puppy... <i>throws a scooby snack</i>
</div>
 
Oh great... it has to be a post by me that you stumble on :)
 
12:39 PM
Yours was the first post that gave me my Exception! :P
 
Well, looks like I've done my bit assisting you in testing... :)
 
I'm looking at scraping the chat transcript. @tristan suggested querying the server directly rather than scraping HTML but I thought I'd get it working nonetheless.
 
@Ffisegydd so what's the desired output?
 
@Jon I'd like a string that is 'poor, poor puppy... <i>throws a scooby snack</i>'
I could then either leave this as it is or (more likely eventually) convert it to markdown.
 
Umm... not sure of the top of my head... not on my work machine, so don't even have Python installed :)
 
12:43 PM
The code I'm using is
 
I wonder if str(tag) would produce anything useful here?
 
user559633
@MartijnPieters is your talk going to be about bytecode and compiler optimizations? Should I know some C in order to listen to the chat?
 
messages = bs.findChildren('div', attrs={'class':'content'})
message = '\n'.join([i.string for i in messages])
 
@tristan I'll explain what choices have been made that 'leak through'.
So stuff like 255 is 255 being True.
 
user559633
I ask because I'd reserve a spot, but I don't want to waste a good spot if it's something that I'm not fluent in
 
12:44 PM
because small integers are interned. Same for strings, peephole optimisations you can make use of, etc.
 
@Kevin that produces the full str representation (including the div etc). I suppose I could use some fancy string shenanigans to remove that but if there was a builtin bs4 solution it'd be nicer.
 
So it includes the div tag as well. That's what I was afraid of.
 
So no C details, just more 'why is a, b = 'foo', 'foo'; a is b True, while c, d = 'hello world', 'hello world'; c is d is False.
 
user559633
Interesting. I'll see if I can get a spot then
 
Unless you intern "hello world"
 
12:46 PM
That's a bad example actually.
 
user559633
Argh, can't edit. Thanks @MartijnPieters
 
I know, use a regex to remove the outer tag.
 
Because 'hello world' is a constant and reused.
 
Erk! is shot with a sedative dart belonging to the Society Of Preventing Bad Suggestions
 
@JonClements Unless you intern 'hello world' yes. :-)
 
12:48 PM
I might have found a solution
Using tag.contents I get list of strings which I can join back together.
 
I read about format method but I would not like to use new-style formatting because in my point of view it's too complicated and hard to read.
 
@MartijnPieters Might be interesting to talk about the dis module, as a practical method of comparing the relative efficiency of different implementations of a user-made function.
(assuming that the audience isn't already proficient enough to know all about it)
 
user559633
I have never explicitly interned a thing.
 
@tristan perfectly excusable - it's not particularly required :)
 
Argh! Damn you Guido why can't I have PEP-463!?!?!?
I'm gonna go make my own Python. With blackjack, hookers, and Exception-catching expressions!
 
12:54 PM
@Kevin I need to play that by ear.
 
I've never used intern either. If I was so keen on optimization, I'd write the expensive bits in C.
 
I need to suss out how deep I should go, so I'll have that for added flexibility.
@Kevin You rarely need intern.
 
Yes, I'm happy with whatever the environment decides to intern on its own :-)
 
user559633
I mean, I've interned things -- offloading expensive and time consuming functions like getting coffee to interns, but never in Python
 
haha
 
12:57 PM
@tristan learning to acquire coffee is an import life skill - they should be thankful for such extensive training :)
 
I had an internship where my most productive assignment was to order and pick up lunch every other day. I kind of miss that job.
 
user559633
"whatever, i'm just glad he's not calling into question the moral fiber of my mother" - intern
 
Although I don't miss ordering from the Thai food place, as I had great difficulty communicating with the person on the phone.
 
bbc.co.uk/news/world-europe-28656050 heh. "In order to end this bribery trial I will bribe the German court with £60 million."
 
Justice served? :-I
 
user559633
1:00 PM
what's irony, precious?
 
@Kevin I've had to give up trying to order a chinese once... I felt guilty about it... but I just could not understand her at all...
 
A whole $1 million went to a children's hospital though! (...while the other $99 million went to the German government...)
 
@Ffisegydd yeah I love it... avoiding going to jail by buying your way out... certainly ironic :)
Presumably, the German banker that was paid off didn't have enough money to buy himself out :p
 
user559633
Gribkowsky was sentenced to eight and a half years in prison in 2012 for accepting bribes.
 
user559633
Oh, okay, so you can bribe your way out as long as someone else does the time and you have enough money.
 
user559633
1:04 PM
"If found guilty, he could have faced a 10-year jail term and the end of his decades-long dominance of motor racing." (now - (10 - 8.5 years)) == 2012
 
Hmm, "a million dollars to children in need" minus "systematic corruption in a game where you drive around in a big circle"... Is this a net gain for the world?
 
user559633
careful here @Kevin, the regular people won't like the logical following of "a game in which you [kick a ball around | hit a ball with a stick | hit a ball over a net | take turns running ]"
 
Love how bribery is used to waive the bribery charge
 
It's an unfortunate consequence of the mismatch between the ideals of justice and the reality. There's just not enough manpower to put everyone on trial, so a voluntary punitive fine is useful for letting off some of that pressure.
 
It'd be nice if more than 1% of the money went to charity though. I mean in this case it's actually in the authorities interests to let him off with it.
 
user559633
1:12 PM
Well, the point of the law is to fund the state.
 
I forget -- what's the name for a variable you declare in a class, outside of __init__?
 
user559633
I sort of don't understand why this is illegal -- he's paying someone to make sure someone else can pay. I've been hired to make sure that an intermediary can hit demands in the past.
 
@Kevin Bob
 
user559633
@Kevin need more information to solve.
 
user559633
a class variable?
 
1:14 PM
@tristan that'd be "class attribute" :)
 
user559633
Or do you mean descriptors?
 
ah, it was "class attribute". As in, i in this first code block
 
Ummm.... it's a lazy question but I'm shocked by two of those answers...
 
Hmm. @Jon I was tempted to make a post on meta.SE about Nidaba. Basically asking whether the mods/dev team/whoever could provide any of the details of what they did for their ML work (that was discussed on the podcast). Chances are they won't give any of the real juicy details but we might get some more generic advice/information. What thinkest thou?
 
user559633
@JonClements we need an Esperanto for programming languages. you know, a system for naming things in standardized ways that gets totally ignored because it's inconvenient, doesn't understand the wants of its users, and is kludgey
 
1:17 PM
I also assume that meta.SE, rather than meta.SO, would be the appropriate place.
 
@Ffisegydd I think either/or... it's focusing on SO stuff, it might get more notice from the relevant audience (developers) on meta.SO
not everyone bothers with meta.SE
 
Post on all sites simultaneously and let God sort em out.
 
Well you never know who else might be interested from the other SE sites. Mathematics might be interested in such code. But yeah I thought posting on meta.SE would be aiming directly at the devs.
@Kevin all sites? Ok then. I'll handle everything up to (but not including) MyLittlePony.com. If you could handle the rest then that'd be great?
 
Phew, I get the less populated half of the alphabet :-)
 
user559633
It's sorted by relevance.
 
1:22 PM
Oh noooooo :-(
 
@Ffisegydd go for it - I would suggest wording it carefully such that it doesn't come across as advertising/spam
 
@Jon yes I agree. I'll tinker with a question on a wiki post so people can see what I'm saying.
 
ambiguous question; how long did it take to make the SOPython site?
 
@Ffisegydd fantastic :)
 
@corvid ambiguous answer: a while.
 
1:24 PM
meh, I have no frame of reference for how long projects should take
 
user559633
I'll handle narcissism.me @Kevin
 
@Crow work began on 6th July. It was released on 23rd July.
 
Once every million years, a bird flies from the far west end of the Earth to the Mountains of Eternity, in the far east. Once there, it sharpens its beak on a stone, and returns to its home.
 
So say 2.5 weeks of work. But this work was done in evenings/weekends, not necessarily during the day.
 
When those mountains are only dust and memory, then SOPython will be complete.
 
user559633
1:26 PM
Oh great, Kevin got into the drugs again.
 
oh okay, but it was done by experienced people
 
Well it was done 98% by davidism (who is experienced yes).
 
@tristan it's either that - or he's forgotten to take his pills again...
 
My 2% was just some content and some little touches here and there.
@Jon the dried frog pills? Is @Kevin our bursar?
 
@tristan @Jon Either too many or not enough drugs. Certainly not the correct amount.
 
user559633
1:27 PM
@JonClements lol. i'm going to start referring to pills as "web devs"
 
I think I've been programming for ~2-3 years? In python for under 1 year and in web for maybe 6 months so pretty inexperienced
 
@Ffisegydd awww... don't I get at least 0.1% for errr - umm... being a cute yellow puppy?
 
user559633
"yeah, i took a handful of web devs, so i'll be up all night doing css"
 
@Jon you get 100% of the imaginary work in out "complex commit percentage"
So it's 0.98 davidism, 0.02 me and 1.0j for Jon.
 
1:28 PM
haha
This means that, if we had two Jons with multiplicative productivity, nothing would ever get done :-)
 
@Crow also remember that while all the code was re-written we were working using an existing code-base as a blueprint/idea.
 
user559633
1.0 joule percent? i don't understand the metric system at all
 
@Kevin ummm... don't need two of me for that... I'm perfectly capable of getting nothing done by myself thank you!
 
Yes, and we're all happy with you working orthogonal to our goals. (1.0j)**2 would be more like deliberate sabotage.
 
okay cool. I was also wondering, is it inefficient in an ORM to sort by a method contained within the class? Example:
 
What does ML mean, here?
 
user559633
machine learning
 
@Kevin oh no... I've been discovered... how did you know that I'd spent 2 years trying to get this project pushed forward, with my ultimate desire to sabotage it later! :(
 
It is the nature of all living things to create and destroy.
Like building a sandcastle and then smooshing it under your foot.
 
1:41 PM
@Ffisegydd I've added an item to the list - gives context of scope of what we've achieved/trying to achieve - maybe try and kill two birds with one stone
 
@corvid I'm worried that sorting a big list might take more than a second, meaning popularity will return a different value for an article depending on when it's called.
 
yeah, I'm feeling like there's something definitely... not right there
 
Who knows what wackiness may occur if a < b at time T0, and a > b at time T1
 
@Jon ta. I've fleshed out the list a bit now. Will think some more about it before I put pen to paper (or finger to keyboard (but that doesn't sound nearly as poetic)).
 
@Ffisegydd that looks cool in the pool :)
 
1:48 PM
does datetime count milliseconds? If so that would kind of throw a lot of things off
 
Umm, I think that's platform dependent
the datetime object has a microsecond attribute, but the OS may just leave that alone if its timing powers aren't very good
 
Don't you technically have to be 13 to have a Twitter/Facebook account or something?
 
cbg for all!
 
"Sorry Windows but due to a poor d20 roll your timing stat is too low to count to the microsecond level..."
 
cbg @Peter!
 
1:57 PM
okay, so how do people usually handle the xrange / range problem between python 2 and python 3 anyway? Gotta make a PR into ForgeryPy
 
Problem, as in "I used xrange in my 2.7 code and now it won't run in 3.x"? I just never use xrange.
 

« first day (1389 days earlier)      last day (3562 days later) »