« first day (1712 days earlier)      last day (3236 days later) » 

4:00 PM
@Dracunos you say after having checked your DVD shelf? :p
 
user559633
Talk about hard evidence HUREHRHUHEUH
 
I haven't paid for porn since AOL : p
 
user559633
You pay. But like in 'sadness bucks'. Obscure genre? Yeah, that's about 1500 $sadbucks
 
Actually, I don't think I've ever paid for porn
But yeah, there's that feeling of disgust immediately after. I've paid that way, you're right
 
With your very soul, @Dracunos. With your very soul.
 
4:02 PM
@tristan wow - you've got this scripted in your head or something?
 
Semi - serious business plan: Make a porn site free to use for all, but whilst you watch the porn, you mine for bitcoins.
 
Huh, so many of us on slack chat today.
 
@IntrepidBrit Nah, you gotta create your own altcoin. Bonecoin.
 
I do. Intrepid Fun Bucks
 
user559633
@JonClements nah, just avoiding tedious work
 
user559633
4:03 PM
@davidism are you calling this 'slack chat' or is there a separate one?
 
By "so many" I mean "four", because there's usually zero.
@tristan other site
 
user559633
@davidism Thanks for inviting me
 
Is that like the VIP room for this chat?
 
user559633
sobs and runs up the stairs and slams his bedroom door
 
(dammit, quiet everyone) No @tristan there is no separate one. Reminder: The Dark Council Does Not Exist.
 
4:04 PM
@davidism ahh... you just made me login to see what I was missing :)
 
The second foundation
 
Uh, yeah, there is no other room. What are you talking about? >_>
 
user559633
So can homeboy get an invite or what
 
if every function called in pool.map(func, args) returns None, will I get an empty list after joining the subprocess results?
 
user559633
Whose CV do I have to PLS to get an invite?
 
4:06 PM
@AutomaticStatic Wouldn't you get a list of Nones?
Damnit - missed a perfectly good opportunity for a church based joke there
 
I don't know...would I? Sorry I'm new to multiprocessing.
 
user559633
[please feel free to delete or destroy above comments :)]
 
yep
I do get a list of Nones
 
Thought so from the output of the example on the official docs - docs.python.org/3/library/…
 
Do I remember correctly that I shouldn't modify a list item while iterating through the list?
 
4:13 PM
@AutomaticStatic That is correct.
 
hmm
so what's the pythonic way to remove all None type items from a list?
 
[x for x in my_list if x is not None]
 
ok that's what I figured
 
filter(None,my_list)
also works
 
ah
that's pretty
thank you
 
4:15 PM
it may be an iterator instead of a list depending on python version
ehh that might remove all "falsy" values actually ... I cant remember
 
looks like pool.map just returns a list, so I should be fine filtering it like that
 
I have a feeling that jolly rancher bites is going to be one of the things that we find out years in the future was actually really damaging to various internal organs
 
along with many other candies I suspect
 
user559633
mostly the heart and pancreas because of the sugar, most likely
 
warheads probably give you ulcers
 
4:17 PM
i know its probably not the correct room here. I have a few questions regarding GPG. who can help me? :)
 
I once ate a huge stash of Warheads with my friend when we were kids. We ate so many our tongues started bleeding.
 
user559633
You're correct, not the right room. Also, against the room rules to ask to ask
 
so which is the correct room?
 
most likely not the right room ... but dont ask to ask is a rule here
 
user559633
Some other one?
 
4:18 PM
just ask if someone knows they might tell you...
 
ok, but be prepared :D its a bit complicated
 
I've gotten horrible kanker sores from eating too much candy
 
--snipp-- so I generated a new key using gpg --gen-key (this automatically created a subkey with capability "e" (encryption)). I added my private email address, let's name it private@home.com. I then added my office email address (gpg --edit-key.. adduid): work@office.com.
then i generated two new subkeys, one for "e" and one for "s" (encryption and signing) using gpg --edit-key.. addkey. question: what to do now? my "master key" contains two email addresses, one private and one for work, and several subkeys, two of them i want to use for office stuff ("s" and "e").
but how can i export them? also i want to make sure that my office subkeys cannot decrypt my private emails. is this possible?
 
maybe irc.lc/efnet/pgp/t4nk@@@ is the IRC channel for pgp
although im suprised there is no encryption.stackexchange.com
 
There is, but you have to decrypt it to get in
 
4:22 PM
you might want to try asking @ superuser.stackexchange.com
 
@JoranBeasley I can second that. I've had good luck asking superuser about GPG.
 
there's also security.stackexchange.com and their chat rooms
 
that also sounds like a good place to ask perhaps
 
ok, will try. thank you :)
 
if I have myList of len(5), why does myList[6:] not return an error?
6 is obviously out of range
 
4:28 PM
because slicing works like that
 
It's the beauty of slices
 
magic
 
just like myList[:1230123] will only be 5 elements long
 
Until it hides a bug from you
 
that's lovely but I'm still confused...the starting point for the slice is out of range
I guess I just don't know how slices operate on lists on a more basic level
should look that up
 
user559633
4:29 PM
That's a good question @AutomaticStatic
 
user559633
I'm looking for the relevant file in CPython where it's implemented.
 
yeah, so slicing there is an empty list. If you assign to the slice beyond the range, it truncates it to start at the next valid index
 
Think of a slice as a kind of window onto the list. If you look through the window at a part that's not there, it's not an error but you don't see anything.
 
so it's creating a new list on the fly when I slice?
 
yes essentially ... its a copy of a section of the list
 
4:30 PM
data = range(3)
data[10:] = range(3)
data == [1, 2, 3, 1, 2, 3]
 
Interesting
 
data = range(10)
data[5:8] = range(3,0,-1)
 
@AutomaticStatic With lists, yes. That's not guaranteed to be the case for all iterables, but you probably don't need to worry about that for now.
 
moving code is so much fun.
I wrote a script to use difflib to make sure things do go off the rails.
 
still fixing your test cases that depend on their own path?
 
4:32 PM
why oh why ... absoluteimports you suck ... that is all
:P
 
Nope, finished that one.
 
good, good
 
@tristan definitavely answers Automatic's Q
 
user559633
in cpython, if you try to call something outside of bounds, it will just catch it
 
4:33 PM
well it trims it to the bound
 
user559633
i didn't mean try/catch... c doesn't support exceptions
 
Seeing "slice" and "Py_ssize" there triggered the pizza desiring section of my brain.
 
user559633
when i get back to the states, i'm going to have so many calzones
 
user559633
calzones: the thinking man's pizza
 
I have three more slices of pepperoni and jalapeño at home you can have
 
user559633
4:35 PM
@Dracunos that's not how the internet works, cmon man, get it together
 
Every third commit or so I run my script to ensure the only change happens in the header...
 
I can mail it
 
user559633
Okay, you might not like the postage though
 
if I have a function that deletes an object from a listbox, as well as the list the provided it; Can I use this sames code to edit the object's(which is a dictionary) data on the listbox and the list.
 
We just need an RFC for POIP.
 
4:36 PM
any reccomendations?
 
(Pizza Over Internet Protocol)
 
recommendation: ask a clearer question
 
*recommendations
 
my "reach through the computer screen and pull items out" gloves aren't quite ready yet... I can reach through, but all I can pull out is, like, cathode ray tubes and shards of glass.
 
recommendation: press up to edit your previous messages
 
4:36 PM
Definitely not pizza.
 
@Kevin Also, blood. Lots of blood.
 
@tristan pop fact: "calzones" is Spanish for "underpants".
 
Yes, the Internet is surprisingly full of blood.
 
@Kevin You must be the only person that has a CRT :)
 
user559633
@ZeroPiraeus Great, now I like them more.
 
4:38 PM
It's probably best to keep my nice monitor away from the prototype stage.
 
user559633
"YO PIZZA GUY, GIMMA A KNICKERS OVER HEEERE"
 
user559633
FUHGETTABOUTIT YA MOOK WHO RAISED YA
 
afaik its "Pizza over ethernet" or POE not POI
 
I really wish I hadn't eaten lunch already, because I really need pizza now. :/
 
user559633
you come to me, offering a one-topping pizza? show some respect, in my day we had 3 toppings minimum. minimum!
 
4:41 PM
I ate far too much pizza in my youth ... I cant stand it now ... well mostly ... I have to be in a very specific mood to really enjoy pizza
 
@JoranBeasley I wish I had that issue. :/
 
user559633
it's also painful because the best-rated pizza place near me has an owner-uploaded photo of using a fork with the pizza.
 
:-O
 
The only time I don't want pizza is immediately after far too much pizza. And even then it could go either way.
 
Oh stock photos.
 
user559633
4:42 PM
@MorganThrapp i think it's a professional shot that the owner paid for
 
avi
Hey there guys :)
 
Yo
 
hey
 
@tristan I was trying to give them the benefit of the doubt. :P
 
user559633
"WASSUUUP" y'know from that commercial on the television
 
4:43 PM
there is a very good artisan pizza place here in town that sells 10 inch pizza's for 20.00 ... they are some very tasty pies, however that is a steep ticket
thats like a smallish medium pizza for any of you metric ppls
 
user559633
worth it. when i buy my apartment, i'm going to have a brick oven put in.
 
Goat cheese pizza day was my favorite day when I interned in downtown Philly
 
@Kevin THAT'S A DAY? Why did I not know this.
 
Thai food day was nice, but I had to order and their English was spotty, so it was stressful
 
yeah they have a pizza that is goatcheeze pine nuts pesto and locally forage nettles (weird...) but its super dank
 
4:45 PM
@JoranBeasley That sounds amazing.
 
@MorganThrapp Sure, it goes MON TUE WED GCP THU FRI SAT SUN ...
 
@Zero well... the python datetime module needs an overhaul... they might as well fix that oversight at the same time... :)
 
user559633
@Kevin yes this is starlord and i'd like three orde... starlord. STAR LORD deep sigh ESS TEE AYE...
 
I think it was Pietro's Coal Oven Pizzeria, off of Rittenhouse Square.
 
avi
Need some help with python regex. I trying to match something like this: https://www.something.com/url/23. I am interested in that number field also. And I want to make https and www to be optional. My regex so far is r'^https?://www\.something\.com'. But I can't seem to figure out how to make www optional. It should have .www or none. How do make this?
 
4:48 PM
One of these days I'm going to refactor and replace pymssql with something else. One of these days.
 
@avi (?:www.)? (that's not a question, the question mark is part of the regex)
 
avi
so far, is, r'^https?://www\.something\.com/url/(\d+)
 
I'm looking at it on google street view... Looks familiar. I also feel like the guy in the movies who looks longingly through a happy family's landscape window to see them enjoying a christmas goose while he stands in the dark and cold street.
 
avi
@davidism: let me try that
 
But that may be unrelated.
 
avi
4:49 PM
yup, got it that its not a question mark
:P
 
user559633
@Kevin i was raised by wolves, so i'll choose to imagine my family tearing apart a pack of geese while i look on mournfully from the bottom of the hill
 
Same principle, yeah.
 
Are regular expressions inherintly faster than manually analyzing text through methods? What is the major benefit?
 
re.findall("something\.com/url/(\d+)",my_string)
 
avi
@JoranBeasley nice, that also works!
and much cleaner I think
 
user559633
4:52 PM
@corvid what does your profiling show? :)
 
@corvid no they are just more powerful
 
IIRC regexes can use like O(N^2) memory in the worst case.
 
(well you can make your own manual parser as powerful as you want)
 
Where N is, uh, the length of the regex I guess
 
4:53 PM
@tristan they don't seem much faster for small amounts of text, ie something like in an input field
 
user559633
keeping in mind that re is a python module and string ops can happen at C speed :)
 
err i think its length of search space
 
Basically the regex decomposes into a non-deterministic finite automata, and you have to maintain a state table of all possible combinations of states where the pointer can be, so if you're spectacularly unlucky that amounts to 2**(number of states) combinations
 
abc
hello folks, can some of you please look at this question and help me out: stackoverflow.com/questions/31019452/…
 
... According to my half-remembered college class from long long ago.
Also it took place just after lunch time so I was probably in a stupor at the time.
(more so than the stupor I'm usually in always)
 
4:56 PM
so "[a-z]*" has one state ... you are asserting that the worst case complexity is 2**1 for any length string?
 
Yyyyyes. Memory-wise.
 
avi
@davidism and @JoranBeasley worked, thanks guys :D
 
oh i dont think of complexity in memory terms :P I think computational complexity
:P
and im pretty sure that is worse than O(2)
ahh tbh I guess its 3 states (initial,middle,final) ... so O(8)
 
Nothing is worse than O2. Amirite UK mobile telephony customers?
 
DSM
I misread that as O(N^2) and had flashbacks to my master's thesis.
 
5:08 PM
hehe I think that we are saying that (regex complexity is O(N**2) ...) however Kevin says N is the number of states ... I think N is the length of the search string
(the target string that you are searching for a regex match)
 
I guess search string length could have an impact on complexity if you have something fancy like lookaheads
 
24
Q: What is the complexity of regular expression?

Ahmad FaridWhat is the complexity with respect to the string length that takes to perform a regular expression comparison on a string?

ahh maybe we are both wrong ... its O(N) where N is length of search string ... at least according to this
 
four upvotes on merging dicts today... I'm the merging dicts guy... :(
 
@AaronHall I'd merge my dict with you any day.
 
If we're talking hash-tables and Python, you're on.
Well, I don't care, that answer's going to put me in the top 1% by EOY.
 
5:29 PM
Cross posting from SSC: trucks driving off aircraft carriers.
So, is this part of some kind of test, or...
 
@Kevin budget cuts - cheaper to shoot cars at things than expensive missles...
 
cbg
 
I thought it might be something like that. Improvised offensive measures for when they run out of ammunition.
 
afaik there is no way to solve this other than brute force (I really really tried to solve it smartly ... but there was a counter example to every single non-exaustive method I tried) ... apparently I like it looks like the dupe has a non-brute force method — Joran Beasley 23 mins ago
 
@Kevin It's footage from the new season of Top Gear. ;)
 
5:33 PM
@JoranBeasley Antti and PM sat over that for a whole week to make the answer in the dupe perfect :D
 
Does MongoDB have some way to make a collection into a large ordered queue?
 
Oh yeah, you guys were talking about regex performance. Ok, here's someone else's answer that might help: http://stackoverflow.com/a/21742190/541136
See, I'm not always self-promoting... (Sometimes I promote other people who are promoting me... :D )
 
No wonder you are an MBA. I guess u are MBA in Marketing stratergies
 
The question was about finding a list of words in a string.
My set intersection answer performed best, and my regex answer performed 2nd best, of the half-dozen + other solutions offered...
Interestingly, the regex answer got zero upvotes.
But what string is too big to throw into a set?
 
5:55 PM
How can pearl regex be turing complete? Maybe I'm misunderstanding what Turing complete means
 
Just checked in with inspectorG4dget, his mum is doing okay.
They spent a month in Canada having therapy and such and they're now back in India.
He's heading back to Canada in the next month or so to resume his PhD (which is good).
 
:-)
 
i hate this idiot
wasting my time
turns out his text file really looks like
"i thought it wasn't important to tell you that there are massive amounts of indents in my text file"
 
@Ffisegydd \o/ good news!
 
DSM
@Ffisegydd: that is excellent news.
 
6:00 PM
That is indeed good to hear :-)
 
DDP is cool. Is DDP usable in python?
 
anyways, I think it's trivial to see that my regex solution (noted above) runs in linear time.
@DaPounder was he wasting your time, or was he teaching you something?
 
Hmm, does the answer make sense to anyone? stackoverflow.com/questions/3848923/…
Or am I the only person confused by it?
 
doesn't make much sense to me but I suck at math
 
I think I get it, but it's just a confusing question.
 
6:06 PM
Implement it in Python and implement a virtual 3d printer and find out!
 
Can I 3d print more corvids? Think of all the contextless questions that will be asked on stack overflow chat!
 
model it in Python and find out!
 
@BhargavRao yeah I think I took a couple of quick stabs at it the day it was posted... I did not realize it had been followed up ... but I knew there had to be a way to make it work
 
Woo my face is on wonderb0.lt. Yay being spontaneous
 
@Skylion Basically... he wants to change a planar object into a 3d object by extruding it. Steps 1 and 3 create the top face of his 3d object. Steps 2 and 4 create the sides of his 3d object.
 
6:10 PM
@BhargavRao When people ask my what my MBA is in, I always respond, "Management, with studies in Finance and Statistics."
 
@wonderb0lt \o/
 
@wonderb0lt Your page has the word PHP on it! boo!
 
I guess the programs locally are offering specializations in order to differentiate themselves. But I don't get the value of the specialization, myself. I wanted the do everything MBA.
 
6:15 PM
mta
 
\o/ ... _o_ ... ___
 
I think that little stick man is drowning.
 
Why doesn't Salad Language have it's own feature length film yet? Why haven't we hired Quentin Tarantino to direct it?
 
We're more Rodriguez fans
 
I want to see a Mexican standoff amongst all the regulars.
 
6:18 PM
Seems more of a Pixar concept to me.
 
A constantly circling shot of people saying "cabbage" to each other is not so amazing
 
The short answer is, because Veggie Tales has a broad trademark and very aggressive lawyers.
 
@RobertGrant The trunk shot would be awesome though.
 
We could just dub over the "congratulations" scene from Evangelion and loop it for ninety minutes. It wouldn't be any less comprehensible than it is now.
 
Hmm, yes. But I want to know how to create the sides
 
6:21 PM
> Say 'lettuce' again. Say 'lettuce' again, I dare you, I double dare you peachyammer, say 'lettuce' one more godyam time!
7
 
"Salad, motheryammer, DO YOU SPEAK IT?"
 
I need to go rewatch Pulp Fiction.
 
@MorganThrapp I can't star your comment on mobile :(
 
@davidism I just showed it to the girlfriend for the first time a couple months ago. I was so jealous of her ability to see it for the first time. It's probably my favorite movie.
 
@Skylion Ok. Let's take his 2-triangle square. You know we have the line 10,0,0 -> 10,10,0 (clockwise direction). It's going to connect to line 10,0,z - 10,10, z. So you just complete it to 10,0,0 -> 10,10,0 -> 10,10,z -> 10,0,z and turn that quad into 2 triangles 10,0,0 -> 10,10,0 -> 10, 10, z + 10, 10, z -> 10, 0, z -> 10, 0, 0
It's harder than that and would be easier to explain with a chalkboard.
But the idea is when you "drag out" a line you create a quad face and just turn it into 2 triangles.
That's step 4.
 
6:27 PM
I just had a thought... how do you protect webhooks? As in, if you have a stripe webhook, how do you authenticate it came from stripe?
 
Good question :)
 
Maintaining the right direction for your triangles is hard, when I had to do it I think I just messed with code until it was right.
 
@corvid if it's a static list you maintain, maybe you look at where it's coming from, and check the ssl cert
 
closed
 
6:39 PM
Umm... they've kind of got another Q hidden there - as they're range doesn't have an int...
 
Hrm, you're right. So it's an XY ... reopen?
 
Yeah, my bad. It's really just a problem with how they use the list, the name threw me.
 
Reopened. Who's going to point X out to OP then?
 
Think they're just after: [vtk.VtkQuad() for _ in range(int(header_line.partition(',')[0]))]
If they're happy to live with zero based indexing of course
 
stackoverflow.com/q/22560768/2301450 too broad/unclear/rec and/or the answer
 
6:47 PM
@JonClements I was already writing an answer, I swear I didn't just steal your comprehension. :-]
 
Don't believe him Jon, he's tricksy.
 
Past time for lunch, rbrb.
 
@davidism ahh... looks like you might want [2] instead of [0] to match the OPs code
ninja edit it :)
 
Uh, yeah, [1]
 
6:51 PM
@QuestionC I see so you make it a quad and then divide it, of course!
That's what I was going to do originally, but the other answer confused me slightly
 
Follow your heart.
Because a useful SO answer would be too long for the Q&A format.
 
Cabbage all and my heart is telling me to listen to trance
 
Is this 3d stuff for school?
 
@davidism wanna edit that comment into the Q, so you get another notch to getting a badge, and then flag the comment as obsolete?
 
@AlexanderHuszagh In this instance, you should let your head rule your heart, and listen to some industrial metal instead.
 
6:55 PM
@davidism Errr nope it's definitely [2] - when using partition '[1]` is the separator or an empty string
 
Hahaha ok fine. I'm productive on both actually [won't let slip I listen to pop and Kpop as well]
 
Why do you hate me so much, pymssql? Why can't you just play nicely with my server? WHY?
 
ok Im logging off for a bit some of the dumb questions today on SO are giving me high blood pressure I think ....
 
7:12 PM
Who listens to kids bop?
 
for col in kArray[1:21]:
    for row in xArray:
        print head[row,col]
question -- if I want row to represent an index rather than a value in xArray, what do i do?
 
Use enumerate.
 
what would that look like?
 
for idx, val in enumerate(whatever):
 
@Jon yeah, I switched it to split. Who uses partition? :-P I'll edit when I get back to my desk.
 
user559633
7:20 PM
http://www.youtube.com/watch?v=T7hcAL4Cktc
go 1080, headphones, and loud
 
user559633
favorite album of the year thus far
 
To answer my own query from an hour ago, they're testing the catapult system normally used to help launch planes.
 
it's so electronic
 
Yep, that's rather good.
For contrast: youtube.com/watch?v=t4nN1pzzx6k (no equipment recommendations, but it helps to imagine the Muppets).
 
user559633
jeez
 
7:35 PM
It starts getting really good around 2:10 ...
 
If I have a sqla model A which has a relationship to another model, B, relationship called b, can I filter on an attribute of B's from an A query? e.g. DBSession.query(A).filter(A.b.id==my_b_id)?
 
user559633
@ZeroPiraeus god this would be a great party band
 
Pity I'm known for posting crap music :D
 
user559633
Listening now @vaultah
 
user559633
7:48 PM
@vaultah i put it on in the background while i do work and i'm enjoying it
 
🙌
 
user559633
🙌
 
A commercial was the best version I could find
 
user559633
queued up
 
Hey Arnold introduced me to that opera
 
7:58 PM
for col, kValue in enumerate(kArray[1:]):
for row, xValue in enumerate(xArray):
print col
anyone know why I keep seeing the zero index of kArray if I print col?
don't I avoid printing the zero index by kArray[1:]?
 
No, you have to give the enumerate function an argument telling it to start with 1, not the slice itself
 
DSM
If I give you the letters B, C, and D, and tell you to count them out starting at 0, you're going to say 0 even though there's no A.
 
Well, you'd probably want both
 

« first day (1712 days earlier)      last day (3236 days later) »