« first day (1843 days earlier)      last day (3104 days later) » 
00:00 - 17:0017:00 - 00:00

12:03 AM
unless of course that is the desired result
 
True. Ultimately in a large project you can see both being used. With respect to what is being done with the headers. For the re-direct, however I think I would stick with redirect.
 
yes, of course.
 
Is there a way to set a recv callback on a plain socket? Or will I need asyncio or something? I just want the recv event to start a new recv.
 
12:28 AM
You can easily set up a separate receive thread.
It's either that or asyncio or poll, really.
 
1:05 AM
@PatrickMaupin Darn; thanks.
 
CV. Give. Now.
 
2:06 AM
Should any of the IDE's listed here be pruned? stackoverflow.com/q/81584/541136
 
Can't speak for that, but I did notice there wasn't a 'Y' for PyCharm under Code Templates
 
ok, I adjusted the wiki and left a comment on the Google Docs spreadsheet.
 
what qualifies as integrated db support?
 
I dunno, maybe a config that lets you automatically connect to a db by default?
probably valuable
maybe trivial
 
2:20 AM
why not
ok, edit submitted
 
If error markup is the same as error syntax highlighting. That is totally in PyCharm
among several other errors
 
Hey, I think it's time for you to start editing it yourself. :)
 
silly assumption...apologies. I thought locked meant I couldn't edit :)
off I go :)
 
@idjaw (or any other room members) if you're feeling extra contributive, why not google them all and see if you can come up with a list of proposed IDE's to remove. With the support of the Python room, we can probably prevail with such an edit, and it would be good to prune the cruft from that answer.
 
Yeah, "Error Markup" needs to be defined. If it means linting and marking of errors, then Sublime has it too, again via plugins. I went ahead and added it :)
 
2:31 AM
@AaronHall :) going through stuff now. I'm trying to figure out what exactly qualifies an IDE for Rapid Development
well PyCharm is looking like the most feature complete now! :) w000
 
Yeah, if you have a proposal for useless dimensions, get a list of those with justifications.
 
2:49 AM
I think BlackAdder can be removed, it's both ancient (from brief Googling) and commercial (which means that nobody's using it).
I'm sceptical of BlueFish
Looks like DABO's wiki was last edited 7 or 8 years ago
 
stackoverflow.com/questions/33470020/… let's close this one fast. :) too-broad
 
@idjaw weren't you working on IDE's?
 
I have a new issue tab open. I see (1) my ADD kicks in...I have to click :)
 
Maybe we could have a canonical "Please do my homework for me?" with the answer "No" so we can more easily close these with dupe-hammers.
 
there is the "It looks like you want us to write some code for you..."
 
3:01 AM
Link or it didn't happen
 
Google can't find it
 
haha, a moderator declined a flag for low quality answer when the person answering used reduce which is no longer a builtin in python 3
 
downvote and move on
 
hello..
Any Idea how I can convert this to a ORM Query Set for Django
SELECT HOUR( sms_sms_log.date_log ) AS hour , COUNT( * ) AS total, sms_sms_log.date_log FROM sms_sms_log WHERE status_log = '%s' GROUP BY hour
Need to return the Hour and the total number of results for that specific hour
 
@AaronHall a good bunch of these IDE's don't seem like they would be very fun to use
but a lot of them seem to have some form of activity
 
@idjaw yeah, IDLE should stay because it's in the distribution.
otherwise I'd suggest removing it
 
@Aaron you'd be surprised how many questions from newbies mention IDLE...
 
3:46 AM
PSF distibution
 
E-Texteditor ... do windows users really touch that?
 
I went ahead and pruned the worst of them.
Too bad you can't have one answer per IDE and then people could vote for their favorites and vote down their most hated.
And the answers could point you in the right direction of setting it up for Python development...
 
can always get a mod to fix that, buuut that gets into the realm of opinions which SO is supposed to frown upon.
 
Yeah, as it is, it's an experiment. So best to let sleeping dogs lie.
oh, yeah, there's an SE site called Software Recommendations, right?
 
4:04 AM
 
So I'm going to write up a canonical Q and some A's, and let's consider pointing people there.
Or maybe they already have one.
Or several based on a few criteria.
 
4:46 AM
@KevinGuan If you feel like it, you could improve your answer here and undelete it, using a bit of short-circuiting to make it stand out: line = line.strip(); line and textlist.append(line).
 
please don't recommend and to get around if statements.
if line: textlist.append(line)
is much more grockable
 
It wouldn't stand out as much, though, and it would demonstrate something that the other answer (mine in this case) doesn't. ¯\(°_o)/¯
 
cabbage
 
even better is extend
textlist.extend(l.strip() for l in lines if l)
 
@idjaw Weird. The OP's edited out the code from their question. Should we bother rolling it back?
 
4:58 AM
@PM2Ring link?
 
@AaronHall Fair call; Python's and & or can be a little mysterious. I still occasionally use them in situations where a ... if ... else ... conditional expression would be far more readable because we didn't have conditional expressions when I first started learning Python.
@idjaw Um, the pi question in your post I just linked to. :) stackoverflow.com/questions/33466115/…
I wonder where the OP got that broken pi algorithm. It looks very similar to the powerful Salamin / Brent / Gauss AGM formula.
 
who has a good canonical Python in Emacs link?
 
a, b = 1, .5 ** .5
s, k = 0, 4.
for i in range(4):
    c = (a - b) / 2
    a, b = (a + b) / 2, (a * b) ** .5
    s += k * c * c
    k *= 2

pi = 4 * a * a / (1 - s)
print('%.15f' % pi)

3.141592653589794
 
from __future__ import division
 
5:15 AM
My code works ok as is because there's always a float operand in the divisions.
 
@TigerhawkT3 Well I think I don't need do that because your answer is good and correct.
 
@AaronHall Also, I'm fond of using && and || in C to avoid if branches. But I guess in Python there's an implicit branch anyway if and or or short-circuit.
 
It's not like it creates a new stack frame.
ok, so I'm thinking maybe the Python IDE answer should link here: softwarerecs.stackexchange.com/questions/26147/…
 
@AaronHall True. And trying to guess how the interpreter implements low-level stuff like that is madness. :)
 
Just profile it - I doubt there's much difference, and as we're using Python and not C, we won't care about that difference as much as we'll care about correctness, readability, maintainability etc...
@idjaw Maybe a PyCharm fan could answer this question: softwarerecs.stackexchange.com/questions/26151/…
ok, that's it for me, I'm going to bed.
Good night everybody!
>>> def foo():
...     for i in (1, 0):
...         i and None
>>> def bar():
...     for i in (1, 0):
...         if i:
...              pass
>>> import timeit
>>> min(timeit.repeat(foo))
0.34937191009521484
>>> min(timeit.repeat(bar))
0.31220102310180664
But foo has to look up None, so it's not precisely the same. Ok, goodnight for real.
 
5:48 AM
Night night. :)
 
>>> def bar():
...     for i in (1, 0):
...         if i:
...             None
...
>>> min(timeit.repeat(bar))
0.4766659736633301
>>> min(timeit.repeat(foo))
0.4629390239715576
had to make it even - ok, for really real, good night.
 
5:59 AM
Morning CBG all
 
Hi, Vignesh.
 
6:19 AM
Hi mate how are you doing :)
 
I'm ok. I just wish there were some decent questions to answer. :)
 
7:01 AM
Maybe it's the sleep deprivation, but I can't figure out a concise way of removing an element with a certain attribute from a list. For example, I'd like to be able to remove any element with x['id'] == 5 from the list [{"name": "foo", "id": 5}, {"name": "bar", "id": 6}]
 
@AaronHall Added PyCharm but requires a lot more thought in to the layout and the formatting needs work, but I wanted to put it up there. softwarerecs.stackexchange.com/a/26152/19113
 
@thefourtheye Yeah, lines up quite well with what I was expecting
 
(issue fixed itself, list comprehension. time to sleep.)
 
Ya, no censors
 
7:31 AM
Hey up all
 
Cbg up, Fizz.
 
7:47 AM
@PM2Ring perhaps you should be looking here stackoverflow.com/questions/tagged/… :)
 
Maybe...
 
I don't see you answer a lot ?
 
8:12 AM
@VigneshKalai there's a distinct difference between quality and quantity.
 
These days I seem to spend more time helping new people improve their answers than I do writing my own. You don't win any points or badges, but it does help to improve the site.
 
You can use your imagination to pretend that you earn banana stickers.
 
:)
 
you and your banana stickers :)
 
8:41 AM
cbg
 
cbg
 
cbg!
 
9:19 AM
@Ffisegydd yes indeed :)
 
 
1 hour later…
10:43 AM
Regarding the Code Review by Linus
Contrast Linus's rant with @jdeisenberg's rewrite: http://catcode.com/comments/2015/cf20151101.html - the insults obscured the point, wasted everyone's time.
 
@thefourtheye import context
 
It's like he's a human being with emotions.
All this time, I thought Linus was a penguin.
 
lol
Still, puppies are the best
 
10:50 AM
This is true.
 
Of course it's true... it's a universal constant of truth!
 
11:09 AM
Looks like a dupe to me, but OP insists it isn't. Thoughts?
 
I wouldn't reopen it
 
11:36 AM
Hahahaha... fantastic
 
gone already
 
@PM2Ring is that a summoning request for @TigerhawkT3 :p
 
Yep. :) Or any Mjölnir-wielder...
 
@PM2Ring actually all sum of odd powers are writed as a polynomial function of T(n)
 
@XavierCombelle Not quite, although T(n) appears as a factor, both for odd and even powers. FWIW, the general formula for the sum of the k powers up to n is Faulhaber's formula, which yields a sum of k terms involving Bernoulli numbers.
 
12:10 PM
@PM2Ring It is that what french wikipeida says fr.wikipedia.org/wiki/…
 
12:26 PM
Mathbabe has a nice article about the sum of the cubes being T(n)².
 
Started using python 3.5.0 :)
 
Did someone summon me?
Sorry for the delay; I was sharpening the hammer. It's that kind of hammer.
Anyway, it's time for me to hammer a rhubarb. Night all.
 
Yes... because blunt/flat hammers are so ineffective at what they're supposed to do? :p
rbrb :)
 
Give me six hours to chop down a tree and I will spend the first four sharpening the axe. -Abraham Lincoln but you are doing it the other way around :p
 
12:43 PM
Hi, @AnttiHaapala. There was an interesting "doing dubious stuff with classes" question yesterday that you might like to look at: stackoverflow.com/questions/33463232/…
 
@PM2Ring such a fail :D
argh horrible question makes my head ache :D
and the answer is even more horrible
 
Thought you'd like it. :D
 
the problem with that is that he says "But then I'd have to write r_red.rectangle.area"...
 
@PM2Ring well... must be some "urban dictionary" definition of like there :)
 
isn't it supposed to be in the interface of the Rectangle itself
what is that subclassing there for
 
12:57 PM
@JonClements I know how much Antti likes to hate stuff. :)
 
@PM2Ring if this was in Java, there'd be an interface...
no class.
you have an interface Rectangle then 2 implementations thereof whch other delegating to another Rectangle.
 
The Rectangle should simply be an attribute of ColoredRectangle, not a parent class. And the OP should realise that having to write r_red.rectangle.area is a good thing (Explicit is better than implicit). But even that's a dubious pattern, IMO. I can understand not wanting to replicate thousands of identical Rectangle objects, but sharing them is doomed to end in calamity unless you somehow make them immutable.
 
nope
there is no point to call the other class ColoredRectangle...
it could be Coloring or sth.
 
how can I install pyevolve in anaconda?
hello
 
why would it even call the shape a Rectangle
 
user559633
1:22 PM
morning/afternoon :)
 
1:45 PM
morning everyone
 
:( no cabbage found
 
But, but....??? Cabbage is eternal!
 
Pictures of cabbage aren't allowed, though - graven images and all that
 
YES!!!!! The cabbage was found!
Agreed jon...image removed to avoid a riot.
 
1:59 PM
Does python have an event emitter type class?
 
I just discovered this for myself. Is this an already well known thing?

https://github.com/vinta/awesome-python
haha...I just found it in my dev bookmarks....looks like I did know about this but forgot about it!
 
user559633
@corvid describe the nodejs behavior you're asking about
 
@tristan So you can emit events, and respond to events asynchronously
 
user559633
signals
 
DSM
2:42 PM
Morning cabbage for all.
 
Morning.
 
anyone wanna dupe hammer this one?
https://stackoverflow.com/questions/33480293/difference-between-app-and-app-in-flask
 
3:01 PM
Busy morning. Got my project from "completely broken" down to "mostly broken" B-)
 
^- Honest things you can't say in your status report.
 
Slowly unraveling the rat's nest that Past Kevin wrote. I would see his works driven to ruin.
 
Look on my code, ye mighty, and despair!
(Seems like a wasted opportunity: github.com/ozymandias)
 
Anonymous
 
cbg all
 
3:13 PM
looks nice, but quite pricey
 
Anonymous
@idjaw That is Switzerland for you :)
 
Anonymous
Everything is expensive here
 
In an unrelated project, I am trying to write a Tkinter application that can have two or more frames of widgets that can be scrolled separately. I am not sure this is possible.
 
@samayo I just checked Canada, it's 100$ more expensive haha
but wait...must check conversion
 
Anonymous
It can't be :)
 
3:16 PM
oh my goodness, yes...it is much more expensive
 
Anonymous
link?
 
I might be able to do it with Canvas.create_window but it would require somewhat tricky arithmetic
 
I just used google's currency conversion to get canadian dollar equivalent: 2654.68
 
I don't remember giving up this easily as a student.
I don't know if that sounds harsh...but I just find that it seems like patience runs out quickly and research and experimenting is just not an option.
 
3:21 PM
woah somebody answered it
 
oh that guy
he's been doing that all weekend
have a look if you're interested
 
I fixed nearly every race condition in my project. Not sure if that's good, considering they probably shouldn't have been there to begin with
 
that's great. You fixed things. :)
you should look at it that way ;)
 
Anonymous
I don't know why module names are case sensitive. It creates a lot of confusion. I remember spending some minutes why MySqlDb was not working :)
 
Yeah, but you didn't go and take the time it would have taken you to figure it out to write up a whole post on a site to have someone else figure it out. :)
 
3:25 PM
Can you assign modules to variable names, if needed? Eg: FancyClass = import some_fancy_module
 
Anonymous
definitely not
 
Yes, but not like that.
import some_fancy_module as FancyClass instead
 
Anonymous
With support for namespaces, case sensitivity is not that important.
 
(or use __import__ if really necessary)
 
Horrible alternative: a,b = [__import__("modulenamegoeshere")] * 2
 
Anonymous
3:27 PM
s/horrible/evil
 
Oops, I read that as "can you assign modules to multiple variable names" which overcomplicates things
 
or derp. I have been away from python for too long ._.
 
ah crud! People came back from the OpenStack summit at work today and I'm working remote. I'm missing all the swag... :(
 
@Kevin This might be helpful.
 
now hating: ppl who stick python- in front of packages they post to PyPI
 
3:38 PM
@PM2Ring Thanks :-) this is very close to what I'm going for.
 
@AnttiHaapala I join your hating
 
(also I am a the maintainer for the python-Levenshtein, though not guilty) :D
 
@AnttiHaapala Yeah, it's so important to distinguish their package from all the non-Python stuff on PyPI :rolls eyes:
 
For the same reason, I dislike SO post titles ending with "... in Python". That is what tags are for. #preaching_to_the_choir
 
> Pls help me, I'm smadonnandoning a murt
I think your issue may be that you're having a stroke.
 
3:50 PM
Have you tried florbing the murt? Remember to wumbo the trixby first.
 
DSM
Google doesn't even know that word.
 
Could be a typo of the "touch-typist was one key farther to the left than expected" variety.
In which case the true word is either "nyer" or ",ity"
 
anSIBBbsibubf NYER.
Yup, makes much more sense.
 
being one key too high or low is unlikely since they would have intended to hit the number keys or the space bar
 
DSM
I've done that. Also I noticed that the D, C, and N keys almost have their letters rubbed off on my keyboard. They're not that common, so I think we've learned where my fingers tend to rest.
 
3:53 PM
OTOH touch typists usually notice their "wrong position" typos before submitting, since they're looking at the screen.
 
Also, the OP just edited their question to add an error message, but that's still there.
 
If the OP wasn't looking at the screen or the keys, where was he looking? Maybe he was driving at the time.
 
I took part in a trial at work on texting/Facebooking while driving (in a simulator, not on live roads) - it's really quite hard.
 
I'm slowly mutating into a distracted driver. I look at my phone during red lights.
 
@Kevin Yeah, I do that. :/
 
3:57 PM
A cop almost gave me a ticket for that once
 
I was all high-and-mighty back when I had a dumb-phone that could only call & text. Now the villain is me.
I resisted for a good year and a half after getting this phone, but it's all downhill from here
 
@Kevin Oh, see, I was much worse about texting when I had a t9, because I could do that one handed without looking at the phone as much
 
I think we should withhold any advice for OP until he explains what a murt is.
 
DSM
It apparently means "bricked" in Norwegian, but nothing in Italian, that I can tell.
 
@jonrsharpe I was about to answer that unittest question, the link is actually deleted. What was the solution? Because I was going to suggest using longMessage = True
 
4:04 PM
thx!!! smadonnandoning is used when you code for hours and nothing works as it should because of a small error and you call all the saints from the paradise — Domenico Picerno 12 secs ago
 
oh nvm...duplicate flagged
 
Suddenly I understand nothing.
 
DSM
Maybe it's supposed to be something like S(alve) Madonna (ndoning)?
> smadonnare: (intransitive) To curse, swear, blaspheme
So really it's just "curse a lot"? That's somewhat disappointingly mundane.
 
But then what about murt?
 
DSM
He says it means "a lot".
 
4:10 PM
Google translate says it means "To murt".
 
Reminds me of a fad that occurred on Something Awful, where one user accidentally appended "wom" to the end of his thread title.
The thread erupted into dozens of pages analyzing its meaning, totally obliterating any on-topic discussion.
 
DSM
Did the thread arrive at an accepted meaning?
 
No, but someone did pay $25 for a wom emoticon, so you could wom anywhere on the forum.
I believe its still usable to this day, although it isn't very popular due to its incomprehensible meaning.
I'd say it's used about as much as the "stop throwing bakon at me" emoticon.
 
Oh, apparently it doesn't work if they're already deleted
> I'm terribly sorry. I accidentally edited your post....when I thought I was on mine. @idjaw
Awfully bad form!
 
yeah...very embarrassed by that...
 
4:17 PM
lol
 
Now you must perform the apology dance.
 
teach me the ritualistic ways. I will do the dance of shame.
 
user559633
Never apologize.
 
DSM
I seem to remember a certain member of our room (who I won't call out) who accidentally edited the OP's question..
 
user559633
I just edit questions I can't answer into ones that I can.
 
4:18 PM
@DSM hey - I'd just gotten edit privs. :)
 
DSM
Yeah, but you probably shouldn't edit your answer into the original Q. :-)
 
Do we have a tag for rejecting edits, because: stackoverflow.com/questions/33482014/decipher-program-in-python
 
user559633
 
@tristan that's a classic political tactic, "I think the question you're really trying to ask is this unrelated one I've prepared an answer for"
 
I know you asked about the implications of the Teapot Dome scandal, but I'd really like to discuss the importance of ATP in multicellular organisms.
 
user559633
4:22 PM
@jonrsharpe classic fabian strategy
 
Just commented on that post. Pretty sure I'm about to get "well actually'd". "functions without a return don't not return anything; they return None"
Is None a member of the set "anything"? Discuss.
 
user559633
Yes, because it's not explicitly Nothing. Wait no, I'm wrong.
 
Next up, someone with more science education than me explains what's going on in the apparently empty space between atoms.
 
user559633
>>> arr = []
>>> None in arr
False
 
@Kevin it's basically just a party we aren't invited to
 
user559633
4:28 PM
math happens in there
 
I accept both of those explanations.
 
Feynman talked about that some point in that BBC show where he's just sitting around talking about physics.
 
Does anyone else understand why the OP didn't expect the outcome they got here: stackoverflow.com/q/33481527/3001761
I cannot understand why this behaviour surprised them.
 
4:44 PM
@jonrsharpe errr.... nope?
 
@Kevin There is no empty space. They're not marbles.
 
now hating: python, which does not pickle closures
 
It's really better to think of sub-atomic particles as probability clouds.
 
seriously, even java can do that!
 
Though I'm not a physicist.
 
DSM
4:48 PM
I saw Ant-Man this summer, so I know what the very smallest structures look like.
 
I meant to see that. How was it?
 
quite ok
 
@FaheemMitha Save perhaps for the atoms that literally comprise actual marbles.
 
DSM
Not bad, I think. And I liked that it was smaller in scale-- not every story needs to have the universe itself as the stakes.
 
@Kevin :-)
 
user559633
4:51 PM
I like to think of subatomic particles as religion because then I can just make up whatever I want to pretend
 
@DSM True. There are plenty of good stories that are small in scale.
 
I prefer whichever physical theory makes my cell phone work.
 
user559633
Your phone works, it's just that no one is calling you :/
 
@Kevin That would be quantum mechanics.
 
Incidentally, can we get popular media to stop using "quantum leap" as "a huge advancement"?
 
DSM
4:55 PM
No. All things considered, I don't think we can.
 
"The gilette 5 is a quantum leap in razor technology". Do you mean it's only barely measurably better than the gilette 4? Thanks for your honesty I guess.
 
"This new product is the smallest possible improvement over the previous one" is often unindented honesty, though!
 
Or, if you define "quant-" as "having to do with a single countable unit", then it just means "we increased the number in the name and that's it"
 
user559633
While we're asking for things that won't happen, can we also stop pretending that basic shit requires magic? e.g. shaving
 
user559633
it's a sharp edge. i don't need jetfighter 20 blade technology to scrape hair off my skin
 
user559633
4:57 PM
or soap
 
Alternatively, can we get actual magic instead of technology that is indistinguishable from it?
 
user559633
exactly. I saw what you typed. I can still see what you typed. And I agree.
 
user559633
It's dead tree that's been bleached.
 
@Kevin I don't like it either; OTOH, a quantum leap is a quantized, discontinuous change rather than a smooth one. But yeah, a physical quantum leap tends to be rather tiny due to the small size of Planck's, constant, h.
 
user559633
Weird society in which cellphones are marketed as being incredibly simple and toilet paper is described as if it's the printing press whenever manufacturers change the oil content.
 
4:59 PM
Kind of reminds me of that "Dear advertisers - if you're going to say a car is 'best in class' don't also say it's 'in a class of its own'" :p
3
 
00:00 - 17:0017:00 - 00:00

« first day (1843 days earlier)      last day (3104 days later) »