« first day (1565 days earlier)      last day (3377 days later) » 

3:00 PM
so in pathological case it is not that good...
 
Oh, it doesn't just start dropping out older/faster to recompute cached items? Craziness.
 
@Antti interesting - I'd have expected (naively?) to drop the oldest entries using an OrderedDict or something
 
that's "good enough"
 
@JonClements it's batteries included, not good batteries included
 
I guess the split() copying strings needlessly does not matter at all since re.sub seems to be written in python
so it needs str()s for all matches
 
3:05 PM
@thefourtheye what are you going on about? :p
 
@JonClements I think I don't understand how timeit works... :(
def using_bisect():
    item = lst.pop()
    bisect.insort_left(lst, item)

def using_sort():
    lst2.sort()
timeit will first invoke using_sort and it sorts lst2. So, in the next iteration, when it calls using_sort, lst2 is already sorted, so sorting will not happen at all, right?
 
ahhhh... very good point - my bad
 
@JonClements Lets clean up the comments quickly...
 
@thefourtheye I've cleared my comments on that... you're absolutely right
 
3:09 PM
:) :) :)
 
@thefourtheye thank you puppy - have a box of scooby snacks - I'll just go sit in the corner and put my dunce hat on :)
 
Rbrb
 
rbrb @RobertGrant
 
Come on Puppy, you made an interesting point... Even I was thinking about that... Theoretically what he proposed might be good, but it would be interesting to test this on a long list.
 
I'm sulking in the corner with my dunce hat... leave me alone :(
 
3:12 PM
pls close the question above, it is the bastard child of and
 
runs to bite Jon's tail
 
GOOOONNNNGG
 
@AnttiHaapala pyhton
 
@IntrepidBrit here!
@AnttiHaapala how do you know?
 
since net has betrayed you and I saw your photo somewhere :D
I mean have beard and yes :D
but the avatar looks like a 70-year-old grandpa wearing checkered shirt and having bad posture :d
 
3:17 PM
@PeterVaro Was wondering if you had ever used netfabb before, or had tried boolean differences/intersection on separate STL mesh files in Blender before?
 
> I wrote the following pseudo code, is it correct?
It's unclear what this means, especially since they didn't say what the code is supposed to do
 
To paraphrase George Harrison, "If you don't know where you're going, any [code] will take you there"
 
cel
python and pseudo-code are basically equivalents
so you may have mentioned the syntax errors
 
Not necessarily. "x <- y" is valid syntax in some languages meaning "initialize variable x with value y"
 
3:22 PM
or x -> y
and don't I love the introduction to algorithms that does for example length[A]
that means the same as python's A.length
 
I was thinking of TI-83+ BASIC in particular, but upon further research, the operator is actually "->"
 
it is not -> but arrow
 
Sorry, I thought that was understood from context. I didn't feel like uploading the image from ticalc.org's site and thought a two character approximation would suffice.
Ok, for the sake of technical accuracy, errata: the operator is actually (continued on next message):
 
Does Google prefer IPv6 addresses over IPv4 ones?
 
Umm... not sure cleaning my monitor with febreeze instead of the normal spray stuff I use is a good thing... but it smells nice...
 
3:33 PM
@vaultah I would
 
When I type "ip" into google it shows my IPv6 address. Plus I get US ads (instead of local ones) on YouTube, and the only explanation is because my IPv6 is American
 
I wish it would show my ipv6 address :(
yeah pretty much all ads are based on geoip everywhere
 
@Antti appears I got the accept for that dict/set thingy
 
@JonClements obviously since you have more rep :D
the halo effect
 
nah - it's the cutest avatar effect, surely? :p
 
3:38 PM
or
answers identical and stupid stackoverflow just says "1 hour ago" :D
I started answering before you me thinks (but finalized after) :D
-1
Q: how do you read data in csv file and print specific ones?

Eric Westin my program i ask the user for a number and then proceed to read a csv file using DictReader. I want to output the values in the csv file that are larger then the users number.... import csv limit_amount = raw_input("Please Enter a Limit Amount: ") with open("transactionsample.csv","rb") as ...

 
@AnttiHaapala two mins diff... but I only posted one revision :)
 
@PeterVaro - is there any sane way to grab the "shell" of a 3D model?
 
If by "shell" you mean "convex hull", you could use the gift wrapping algorithm
 
Hi Kevin, that's exactly what I'm looking for
 
user559633
3:48 PM
cbg again
 
I don't think it's possible, but here's an interesting question.
 
Or at least, it's enough to get me started. Much obliged
 
user559633
@PeterVaro you were looking for me?
 
Maybe some magic headers that are sent with the response from Flask and captured by Nginx?
 
I was like "omg a question" without answer, I'm going to answer that, but then I laureled.
@davidism how stupid is that :D
like how do the unauthenticated users get to the login form then :d
 
3:50 PM
yeah, I was going to comment about that
 
other than that it is pretty damn easy, did it in apache, just set a cookie, can do anything based on a cookie in apache, so why not nginx too
 
ah, makes sense
 
the one thing is how do you authenticate the cookie though :d
 
@thefourtheye removed my comment on your answer puppy
 
user559633
you could do that question by having a path that's only served by ssl
 
3:52 PM
If one of you wants to answer, go for it. I don't know enough about routing rules to answer.
 
user559633
so users going to that endpoint would hit the nginx rule to get served by SSL, and then in your application, you could be sure to serve all interesting paths over ssl
 
it is like the most stupidest question ever :D
world will be better if it is not answered
 
I thought it was interesting, maybe the idea is flawed but it's still answerable.
 
user559633
eh, it's a decent question, but i don't want to spend my morning writing nginx configs for a stranger
 
3:54 PM
no it is not a decent question, why in hell would you want to do anything in http if you need https :D
just redirect to https for everyone on front page
 
user559633
you don't always need https and there's largely different performance characteristics for http v https
 
user559633
 
DAMNIT
i wanted to flag it as not an answer
but I am still flagbanned
 
I guess the argument now is that even if your site doesn't need to be secure, https still prevents ad injections and other stupidity that isps are doing now.
 
I have grown to hate https because my corporate VPN is improperly configured, so that it simply refuses to load any https site.
 
user559633
3:57 PM
Yeah, that's true @davidism
 
Crucially, this includes all google searches.
 
user559633
I don't even understand how content injection is legal
 
cel
0
Q: Why does pip say "No module names commands.install"?

DePianomanI have installed pip, and I have moved my directory in cmd to C:\Python27\Scripts. I try this code: 'pip install whatever.whl' It says at the bottom of random code(looks like python): 'ImportError: No module named commands.install' What is happening?

someone found the solution to all pip problems. :D
 
Nice answer @GamesBrainiac
 
4:01 PM
What's the easiest way to get exactly 5 reputation points?
 
question upvote
 
Yeah, apart from that :D
 
answer upvote and then downvote 5 answers
 
Hmm, thanks
 
or just use developer tools, and modify your rep to show 7777, then screenshot it? :p
 
4:03 PM
I wonder how the community would react if you posted a good question and specifically requested that it not get upvoted if it already has one upvote
 
@JonClements this is kind of a hack :)
 
@vaultah there you go, now find 5 to downvote
 
Probably a mix of "I don't know how you hope to game the system by getting fewer points than you deserve, but something suspicious is happening here" and "sorry, I vote purely based on a question's merit, with no regard for the OP's desires"
 
should be easy since everyone's linking them all the time today here
 
@AnttiHaapala Oh, I sure will
To the PHP tag!
 
DSM
4:05 PM
Morning cabbage for all!
 
user559633
morning dsm
 
or... you downvote one answer, then we downvote two of yours? :p
 
DSM
Upvote all the answers!
 
@JonClements Thanks Puppy :)
 
4:08 PM
wow... seriously - another one ?
 
DSM
I think once I caved and gave the "Why don't you give us your prof's email and we can cut out the middleman?" response.
 
I wrote an equation generator for a Puzzles question the other day, and it's surprisingly difficult to find all possible equations. Iterating over all possible nested parentheses is tricky.
My first attempt missed a few possibilities, like ((a op b) op (c op d))
 
I found 3 answers to downvote and then some OP accepted my answer wtf
 
DSM
I tend to build expressions up recursively with an interior loop over all one and two-argument operations.
 
@vaultah time to downvote 17 more answers then
 
4:13 PM
Exactly!
 
I forget the thought process that got me there, but my conclusion was that I needed to generate all binary trees such that each tree contains N leaf nodes, and each non-leaf node has exactly two children.
 
Or we just downvote Vaultah's answer so it's -1 or less, then delete it? :p
 
Aaand that equation question is devolving into an argument about Bill Cosby. :-|
 
@davidism In my defense, installing 2.7.9 makes everything ok because it has ensurepip.
 
4:20 PM
I agree that it's fine to answer the question, but is there really a compelling reason to prevent two users from signing up with the same email address?
Alice and Bob of alice_and_bob@gmail.com will be unhappy with this design choice.
 
user559633
it's not all about signups -- sometimes it's just about noticing
 
For some reason, Amazon Music recommends Blue by Eiffel 65 when I'm listening to the Riven soundtrack.
 
Re: "It's easy for spammers to remove the alias". Here's my crazy scheme: only ever sign up for things using aliases, and outright reject 100% of incoming emails that don't have an alias.
I expect the regular gmail client doesn't have this capability, but assume that I'm sufficiently determined to write my own.
 
user559633
@Kevin i mean, sure, go for it, but i don't want to contribute to a site in which someone can say "i don't like it if people can do that in c++, because I use ruby, so this question shouldn't be answered"
 
DSM
It is true that I downvote all non-ruby questions. :-/
 
user559633
4:26 PM
Same. Why anyone would want to use some nerd coding language is beyond me posted from my segway
 
@tristan I think we're in agreement here. I have written my fair share of answers that are like "you probably shouldn't do this in the first place, but..."
 
ruby bwahaahah
 
rbrb in a bit
 
re-cbg
 
DSM
More cabbage for you.
 
4:33 PM
167 pages. Progress!
 
having WoW on linux makes everything SO much better
 
DSM
I can't remember: is your registered scienceman status going to be confirmed this spring or this summer?
 
Whenever I see a question like "Here is my code, I think my problem is caused by [some ridiculous concept]", I can never think of a tactful way to say "what could you possibly be seeing that led you to conclude that?"
 
@tristan I finally managed to make my Same Origin Privacy challenging JS app wotk without cors or any kind of header manipulation
simply by loading the file and pass it back as a local statoc data
 
I really sincerely want to know what output they're getting, and the thought process that led them to the ridiculous conclusion. If their reasoning is good 90% of the way through and then they misstep, that information could be quite valuable for finding the right answer.
 
4:38 PM
@Jon I like the ChainMap answer.
 
But a patronizing comment will just make them clam up.
 
@Kevin "it's more likely due to [some logical reason]"
 
Because
In [37]: int('cbg', 25)
Out[37]: 7791
 
@corvid That's a good approach when possible. But in this case, the OP's diagnosis was "statements are being executed out of order somehow", and we don't yet have enough information to suggest a better alternative.
 
@vaultah niiiiiice.
 
4:45 PM
The other commenter's comment concisely captures my concern: "it's nothing short of absolutely essential that you explain what it making you think that out-of-order execution occurs, so we can address that immediate cause"
But I still don't like the tone there
 
@Kevin "use pudb to see if it is executing out of order"
he can't argue with the debugger
 
Bottle is some kind of web framework, right? I think that complicates the matter somewhat, in regards to debugging.
 
Yes, but I would say it's pretty simple
 
yeah, but he can still test the function under the decorator, as the decorator just calls that function
@davidism, you use xfce?
 
Baby crow :3
 
4:52 PM
I WANT IT so I can raise it as my own!
 
Will you use it for good or for evil?
 
DSM
@vaultah nicely played!
 
Can I have a sanity check here guys?
Nobody's house looks like that does it?
 
My house looks like that tiny square (from above) :P
 
Well that's something
Phew :P
 
4:56 PM
@corvid yes
 
@davidism is there any sort of short cut to move the frame with the current focus over to the left or right workspace?
@Ffisegydd well, I'd probably teach it JavaScript...
 
That's animal cruelty.
 
@corvid move workspace or monitor?
 
workspace
 
ctrl+alt+arrow changes space, ctrl+alt+shift+arrow moves active window while changing
I really wish there was a move between monitor shortcut though, although I haven't checked in a long time.
 
user559633
5:02 PM
@PeterVaro elaborate? you had JS tell flask to render it as static and then served it?
 
yeah, I think I should really hook up a second monitor
 
user559633
after i move to a new apartment, i'm going to get a third monitor
 
@tristan the problem i faced with was simple: i wanted to modify an image from a different source inside html5's canvas -- and here comes the tricky part -- get the byte data out of it. now all i did was ask the server to download the file and pass it to me as same-origin one
 
user559633
oh cool. i get the sneaking suspicion that you do much cooler work than i do
 
actually it totally is ;)
 
user559633
5:17 PM
i was being earnest
 
i guess i'm doing nice things but sometimes i have to hack webapps together too
actually this is the third app now
but the next big project will be awesome: low-level embedded python based smart watch :)
(with micropython)
 
user559633
O_O that's really cool. i'd love to read a writeup on that
 
Peter always sounds like he's working on really awesome things
 
I've seen this mistake before, I think..
 
user559633
The weird thing is when I see that error, it's not from people with a background in C
 
5:22 PM
two other posts, but neither of them is generic enough.
This one doesn't provide a helpful answer for the int(name) = value case.
 
@tristan well, I convinced my boss to release it as an open sw and open hw project, so we'll see
we've already hired a hardware guru.. he will work for us for 3 days in a week
 
@PeterVaro embedded python watch? how are your sw guys :D
 
@AnttiHaapala yeah well "embedded" => micropython.org
 
Raz
hi Martin
and all
i am trying to figure something out and would appreciate some help
 
5:37 PM
Hi Raz
 
Raz
yeah hi]
 
You posted:
 
Raz
Thank you @Martin

So for this for loop:

for n in range(2, 10):
for x in range(2, n):
if n % x == 0:
print n, 'equals', x, '*', n/x
break
else:
# loop fell through without finding a factor
print n, 'is a prime number'

x can be multiple values for every value of n.

So if n = 6, the second for-loop will iterate for x = 2, x = 3, x = 4, and x = 5 - BUT will still return 6 as not being a prime number.

So does this mean that the condition of the second for loop is that n will output as a prime number IF it cannot divide by x with remainder 0 for ANY of the values that x holds per iteration?
 
for n in range(2, 10):
    for x in range(2, n):
        if n % x == 0:
            print n, 'equals', x, '*', n/x
            break
else:
    # loop fell through without finding a factor
    print n, 'is a prime number'
I fixed the indentation of the last two lines too.
 
Raz
that is what i posted, and i find it a bit confusing how that code outputs prime numbers when there are iterations that produce x values that dont divide into n by 0
thank you!
 
5:38 PM
The else will always be executed.
 
Raz
what i mean is, if n = 6
 
because it is part of the outer for loop; if you never break out of the outer loop, the else is executed.
 
Raz
the 2nd loop will iterate as x = 2, x = 3, x = 4, x = 5,
 
Yes, the inner loop will go over 2, 3, 4, and 5.
 
Raz
and for x = 2, x = 4, x = 5, and x = 6, n % x >0
 
5:39 PM
In mathematical terms, [2, 6).
 
Raz
but for n to not return as a prime number, x = 0
n % x = 0 *
 
6 % 2 is 0.
 
Raz
yeah but in the same iteration of n = 6, x = 2, x = 3, x = 4, and x = 5
see what i mean?
6 % 4 != 0
 
for n in (4, 5), 6 % n will be non-zero.
 
Is that else properly indented? Is it supposed to be paired with the outer loop or the inner one?
 
Raz
5:42 PM
else must be aligned with the 2nd 'for', so 4 spaces in
 
@Kevin: as it was originally posted (10k+ only, deleted), it was level with the outer for.
So you really had this:
for n in range(2, 10):
    for x in range(2, n):
        if n % x == 0:
            print n, 'equals', x, '*', n/x
            break
    else:
        # loop fell through without finding a factor
        print n, 'is a prime number'
?
 
Good news, everyone! I'm off to get a route canal. cbg and cauliflower to you all.
 
@CodyPiersall party time! :-P
 
@Martijn I've seen you participate a lot on Meta, so I wanted to get your feedback before I ask a possibly stupid question. I just noticed here in the code block that do is being highlighted as a keyword. Is that something to bring up on Meta, or is that an issue for whoever wrote the highlighter (can't remember who ATM)?
 
Raz
yes I did
 
5:44 PM
I suggest avoiding break and for-else difficulties entirely, by using a function:
def is_prime(n):
    for x in range(2, n):
        if n % x == 0:
            return False
    return True

for n in range(2,10):
    if is_prime(n):
        print n, 'is a prime number'
 
@MattDMo it's an issue with the highlighter.
@MattDMo: Google Code Prettifier.
 
(although depending on your actual use case, it's probably better to use a prime sieve or something)
 
@Martijn OK, thanks, I'll go send a bug report. Is there the possibility that SO is using a kind of "generic" version for Python and Ruby?
yeah, I have that page bookmarked
 
Raz
im trying to understand the logic of that for loop i posted
coz there is a rule to it i dont understand
i found the loop in pydocs and its been annoying me all afternoon
 
@MattDMo You can check what language was picked by looking at the source.
The class on the pre tag sez: class="lang-py prettyprint prettyprinted".
So it picked Python.
or more likely, Python was picked by Stack Overflow because that's the language associated with the tags on the question.
 
5:47 PM
why/how is this question getting upvoted stackoverflow.com/questions/28198831/raspberry-pi-analog-read
 
Raz
Martin any idea?
 
What part is annoying you?
The else suite of a for loop is only executed if the loop completed.
so no break was used to end the loop 'early'.
 
Raz
so does it work in the sense that if in one iteration of the second loop, x =2, x = 3, x = 4, x = 5, but with only two of the iterations (x = 2 and x = 3), n % x = 0,

Then overall n % x = 0?
it seems a bit weird.
 
The moment n % x == 0 is True, the loop is ended.
 
Raz
RIGHT ok.
 
5:49 PM
Not sure if you know this, but it's worth mentioning. When you break inside a loop, the loop stops running. Ex. when n is 6, then for x in range(2,n) will only iterate once, with x=2, before it breaks and n moves on to 7.
 
so the other values of x are not tested for.
 
Raz
even if there were many false values before that?
 
When there are false tests before that no break has been executed.
So the loop continued.
 
primality testings? :D
 
Raz
ok, and if there are false tests for 2 iterations and at the third iteration the test ends as true, the for loop for that iteration value runs as true anyway?
Im veyr new to all of this
 
5:50 PM
@Raz what do you need prime testing for?
 
Raz
apologies for being a pain
im trying to grasp a concept in pydocs
section 4.4 of that page
 
This appears to be more of a "trying to learn how X language concept works, using prime testing as a useful example" exercise than a "tell me the best way to test primes" exercise
 
@Raz I'm not sure what you mean by that part.
 
ah I was afraid that you are using that algorithm for real :D
 
The for loop has no boolean value.
It just runs until it runs out of things to iterate over, or you end the loop explicitly.
During each iteration of the loop, code is executed.
So the if test is part of the loop body.
 
5:51 PM
also, if you are new to python langauge, justt wonder why python 2 :D
 
Each iteration a test is done, if that test is True, break is executed and the loop ends.
So for n = 6, first you get x = 2.
6 % 2 == 0 is True, so break is executed. The loop ends.
For n == 6, first you get x = 2.
 
My current theory regarding why new users adopt Python 2 over 3 is, Python 2 tutorials are older and more established, and thus have better search engine rankings.
 
5 % 2 == 0 is False, so nothing else happens and the loop continues
 
5:53 PM
x = 3, 5 % 3 == 0 is False, we continue.
 
the python3.4 tutorials have much nicer colors
 
x = 4, 5 % 4 == 0 is False, we continue.
The loop ends because there are no more values to iterate over.
No break was executed, so the else branch is executed and prints that 5 is a prime number.
 
Raz
thank you!
 
@Raz np, glad to have been of help!
This was best resolved in a chat room, not in extended comments.
 
I still dont understand why teach for loops with python 2 :D
hmmm...
maybe I should make an interactive script for python 2
 
cel
6:05 PM
why using for, when there's goto? entrian.com/goto
 
so that when I launch python 2 shell, it would notice that stdin isatty, and after that automatically would switch to python3
packaging = pkg_resources.packaging
AttributeError: 'module' object has no attribute 'packaging'
 
Raz
Yes I will be coming back to this chatroom
It's paradise for those learning it
 
user2555451
oh, nvm. A mod got it.
 
DSM
It's true. Talking about Python is a refreshing break from the norm. We wouldn't want to do it too often, of course, but as an occasional treat it's nice.
 
6:25 PM
I'm now puzzling through my third or fourth half-baked idea for KevinScript's type system. heretofore codenamed "Operation: what if everything was dicts?"
 
is anyone here familiar with matplotlib?
 
We are currently at alert level orange, aka "that's just crazy enough to work"
With a potential to shift to alert level red, "that's just crazy"
@Inthuson I know some of us are, but they may be hiding. I suggest asking your question anyway, and they may reveal themselves.
 
DSM
Don't take this the wrong way, Kevin, but you're not great at coming up with codenames.
 
I also considered "Operation: Mighty Odin's Thunderous Wrath", but I remembered that name is already taken by my family's ancestral chocolate chip cookie recipe.
 
DSM
The Kevinson clan has proud traditions, I see.
 
6:34 PM
@Inthuson check out the room rules: sopython.com/chatroom - Just ask your question, and if anyone can help, they will.
 
We have a tradition of having many traditions.
 
I'm trying to write a code to plot graphs using pyqt4 but my labels and titles aren't displaying when i use axes.set_xlabel('Quantity Sold')
axes.set_ylabel('Product')
axes.set_title('Total Number of Items Sold per Product')
any ideas as to why?
 
Let's see, maybe set_xlabel's documentation has any useful information regarding cases where it wouldn't show up... Nope.
 
how did you define your axes object?
 
DSM
Well, if axes is an AxesSubplot instance, that should work; or at least that's how I'd do it, which admittedly isn't the same thing.
 
6:40 PM
axes = self.figure.add_subplot(111)
my graph shows up just not the axes labels
even the ticks show up for the x axis
axes.spines['top'].set_visible(False)
axes.spines['right'].set_visible(False)
axes.cla()
axes.bar(x_pos, y)
pylab.xticks(x_pos + 0.5 , x)
self.canvas.draw()
i thought it might have something to do with the spines but nope :S
 
Maybe the labels are far away enough from the graph that they are being rendered off screen. Is it possible to increase the size of the canvas?
 
It's within a pyqt layout box
so either way it would show in the VBoxLayout
but it doesn't :s
 
6:58 PM
In this recent question, we learn that the interpreter does not optimize away "useless" assignments to variables that will never be read. I wonder why this is.
 
DSM
Probably not worth the headache to save you typing #.
 
The old "mutable default argument" gotcha
 
I create a class class Abstract(metaclass=abc.ABCMeta), then inherit another class from it class Real(Abstract). Can I define a class attribute (of the Real class) without getting TypeError: Can't instantiate abstract class Real with abstract methods ...?
 
DSM
Unfortunately he went -2.7 so I can't hammer it.
This guy seems to be doing his homework piece by piece..
 
Oh, so he did. This disappoints me because I wanted to test whether I had the golden hammer, as I just recently acquired a total score of 1000+ in , but the daily recalculation hasn't awarded me the badge yet.
 
DSM
7:04 PM
Soon you can ♫ ragnarok the house ♫
 
@DSM Voting as unclear there, since his code doesn't match his output.
I'd be more charitable here if he wasn't trying to get us to do his assignment for him piece by piece
 
@DSM I hammered it.
 
Phew, it was lingering there for a while.
Thought that would be a closed-in-seconds slam dunk. I guess I don't know how other people are likely to act.
 
DSM
Possibly not many people saw it. I know not everyone follows the version-specific tags.
 
Yes, and I think everyone is napping, if the idle users list in this very room is any indication ;-)
 
DSM
7:20 PM
Whoa, I just noticed that. Is not logging out the new black?
 
@Martijn in case you're wondering, I found out the scheme behind the keyword highlighting. prettify-full.en.js contains all the highlighting rules. It appears that this list ["break,continue,do,else,for,if,return,while"] is the base for all other rules, while lang-py adds ["and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is‌​,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"].
I'm submitting a bug report to google-code-prettify to see if they want to change it...
 
If we were all in the EST time zone, my claim that people are dozing would be entirely serious. 'tis the time for one's post prandial slump
I guess UTC+1 could be having an after-dinner doze...
 
DSM
I can't prand until some other people get back from pranding, so we can agree on a name for a project and I can upload my results to the repository.
@Kevin: off-topic -- do you have any preferences/suggestions regarding issue tracking software?
 
At work we use Version One, which is mostly satisfactory. at home I use a todo.txt file that grows ever larger.
I do wish it were easier to communicate with other users in Version One - you can leave comments on issues, but there doesn't seem to be a notification system. The issue's owner won't know you left a comment unless they check the comment area periodically.
I wonder how the SOPython devs feel about Trello as an issue tracker. I'm a member of the group, but haven't actually contributed anything (... yet)
 
DSM
7:35 PM
Yeah, me too. Feel like I'm letting the side down..
 
My last question didn't make much sense, but now I'm getting a very strange error. Any ideas where can the source of error be?
# Full traceback:
Traceback (most recent call last):
  File "/usr/lib/python3.4/runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.4/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/srv/rwt/app/rwt/accounts/records.py", line 90, in <module>
    print(Record())
TypeError: Can't instantiate abstract class Record with abstract methods collection
 
is there an iterable filter in python?
 
I'm going to hide behind The Mythical Man Month and say that my non-participation in SOPython is a good thing because projects become less effective the more people you add to them.
 
or actually the other way around, a filter that's iterable
 
Since I'm only a coding wizard for programs 100 characters or less, I wouldn't be able to offset my own expenses.
 
7:41 PM
@Reut itertools.ifilter in Python 2, plain filter in Py3k
 
DSM
Ehh? Why can't you iterate a filter object?
 
thanks, @vaultah the source of the error is in /srv/rwt/app/rwt/accounts/records.py :)
 
(in case you mean iterator)
I asked 3 dumb and unanswerable questions in the room today :(
 
I didn't know python has abstract classes
wth
 
When I want an abstract class, I just stick raise Exception("don't call abstract methods") in all the abstract methods. Dunno why you'd go to all the trouble of inheriting from ABC and struggling with class attribute incompatibilities or whatever.
But then, I also use lambda x: x[1] over itemgetter(1), and I never use for-else when I could use a flag or nested functions, so I guess that could just be my "I can do it myself" bias
 
7:49 PM
don't you need to import stuff for itemgetter?
 
Yeah
 
I never use it strictly for that reason
 
@MattDMo Yeah, the project uses a pretty generic setup.
I guess it is a best-effort approach.
 
how do you open a program as a daemon from the command line and not show the output? Redirect it to /dev/null ?
 
Sounds like a good idea to me.
(If you're asking "is this the conventional approach?" rather than "will this work?", I have no idea.)
 
7:53 PM
this is the best approach. just know that the data is still accessible
 

« first day (1565 days earlier)      last day (3377 days later) »