« first day (1641 days earlier)      last day (3301 days later) » 

12:19 AM
about this year's candidates:
 
@Bonifacio2 lol
 
have anyone here used Ferris framework for google app engine development??
 
@rogcg not I
 
hey guys, just quickly, let's say: for a vowel in a word, if this vowel is preceded by another vowel ... How would you write that in pythonic language
 
regex
[aeiou]{2}
 
12:28 AM
can it be done with loops?
 
12:41 AM
well i guess i`m gonna use this ferris framework.
 
1:31 AM
is filters will work in BS? like
soup.select('li:first')
I tried like the above but it returns an empty list.
 
1:44 AM
postimg.org/image/5zp77dy0z
It's for an exercise like this. I'm trying to test for the preceding letters of other letters.
 
Guys I'm not sure if Martijn will be a mod ;)
Also how does sopython.com/wiki/Birthdays this have my birthday
 
@TerryA cbg
 
cabbage to you!
And best of luck for the election
 
I think we had a list (or poke had a list) or someone went through the transcripts etc.... to dig out birthdays...
@TerryA cheers buddy
 
2:12 AM
Hello, it's been a while.
I cast my mod vote.
 
@Owatch quite a while indeed - how ya been?
 
I've been alright, I guess you haven't seen me much since last summer.
 
Okay - well glad you've been okay :)
 
Was I feared dead?
 
I don't think that crossed our minds... it'd be somewhat pessimistic to have done so really :p
 
2:17 AM
I didn't realise you could downvote in the election
Have you downvoted everyone Jon :)
 
I see. I've been absent since I moved out of SA in the summer. I decided to pick up Objective C and try to make myself some money. So I mostly hang out in NSChat now, and occasionally in one of the math.stackexchange chat rooms.
 
How you finding ObjC ?
 
It's alright I suppose. It's different, but I'd say your impression is more or less shaped by Apple's classes and ways of structuring applications than the language itself.
 
Has it ended up getting you work though?
 
Nope. I've not tried. I'm working on finishing my first Application. But it's proving very stressful with school, and I may be moving again this summer which will shake things up again.
In anycase, I stopped by to say you got my vote, since I've gotten more than enough help from you and others in this room when I first started out.
 
2:21 AM
That's kind of you - don't forget to vote in the main election as well...
right - it's after 3am... I need to get some sleep - don't be a stranger... pop by more often :)
 
I'll try. Goodnight!
 
take care
 
 
1 hour later…
3:41 AM
Got a python dupe hammer. Hereafter no duplicate question escape from me.
 
3:53 AM
I'm 64 upvotes away from the hammer ...
Soon, my pretties ...
 
Where contains list of canonical python questions?
 
thanks..
 
 
1 hour later…
5:13 AM
cbg
 
what should I name my Python 2 forward ported features module...
that is python 2 features in Python 3
should i call that python28
 
cbg
 
@AnttiHaapala Hahaha, if you want notoriety :-)
 
5:17 AM
python28 sounds suspiciously like python 2.8 to me
 
python28 is free on pypi
 
What features?
 
what features are these anyway?
I'd just call it "eight"
like the "six" library is 2*3
yours can be 2^3
 
hehe :D
that's a good idea
... if it is free
 
"two raised to three"
it even makes sense
 
5:19 AM
I did already do iterkeys, itervalues, and bytes % formatting (from 3.5)
backwards to 3.4, 3.3 and soon to 3.2
there is nine
 
I know there is/was a "five" = 2+3; have a vague feeling there's an "eight" somewhere but it's not an easy google target.
 
it exists
 
5:21 AM
too bad. It was too good an idea to last unclaimed :D
 
How about __past__ ;-P
 
hahaha that I like
 
hey that's a good idea :P
 
Cbg!
 
cbg vaultah!
 
5:22 AM
then I can format them as modules in the package
so from past import bytes_formatting
but ... these are not module-local
they are global
hmhm
actually I can use really ugly module hacks :P
 
so there's already six and eight and nine and future
 
one can do the armin ronacher
 
wow, even past already exists
so what's new in your lib that isn't covered by all those?
 
so many to choose from :(
 
not to knock, just curious :)
 
5:24 AM
cbg
I just ALMOST made a fatal error on my system
 
actually the bytes formatting has been stated as a reason to not port to python 3
 
cbg adam
 
hi. I am a mostly a .net developer with lots of javascript as. I have been coding for the last 3 yrs now. where is the best place to start learning python
 
ended up reinstalling Windows basically for performance reasons (running integrated graphics while my video card is RMA'd and the ubuntu drivers for that are crap)
 
bttf :D
 
5:25 AM
re-setting up my system and went to mkdir ~/.virtualenvs
 
hi newton! LPTHW is pretty well recommended I think, although I haven't used it myself
 
except I'm on windows now, so ~ doesn't point to C:\users\username
 
so it literally made a directory named ~ with a subdir named .virtualenvs
 
another thing is that troubles me
 
5:26 AM
@tzaman @NewtonSheikh LPTHW has some problems ... it makes recommendations that many experienced Python developers strongly disagree with.
 
how do I legally use python source code in my project :D
 
so I went to remove it with rm -rf ~. Since I have git installed and git/bin is in my PATH, it worked
 
@ZeroPiraeus ah fair enough.
 
except rm internally maps ~ to %USERPROFILE%
 
@ZeroPiraeus: any good IDE?
 
5:27 AM
PyCharm!
 
pyCharm?
its an editor for python?
 
Awesome...(y)
 
There are other options, but they're not as good
 
It's an IDE for Python. I use vim; lots of people seem to like PyCharm.
 
5:28 AM
I use vim too
but not for any real reason
 
if you're experienced with vim it's great
 
other than being used to ssh'ing into remote machines to hack away at some code
 
a lot of people also like Sublime
 
I have been using Sublim for all my javascript
 
@JonClements upvote for moderator election.
 
5:29 AM
and generally being upset by the state of VCS integration within PyCharm
 
ill go ahead with Suublim
 
Sublime is definitely the best GUI pure text editor I've seen
 
pyCharm has got debuggers?
 
Yeah PyCharm is a fully-functional IDE
 
okay ...
 
5:30 AM
@JonClements : If possible please remove my ban on asking questions :P. Wish you good luck!
 
thanks guys...:)
 
@d-coder he can't :P at least not yet if it is possible after a few days
 
Yeah puppy, you go unban!
 
Because that's a thing that you can do...
 
5:31 AM
Follow the link :-)
 
I think sublime has plugins / etc. that add more python IDE tools
 
hmm...
 
I got Sublime working enough to run Python code in-editor and that's about it. It might be plug-in-able to debug and test and etc too
 
I definitely like PyCharm though.. I tend to do all VCS operations besides "annotate" from cmdline anyway so that doesn't bother me
 
but if you're going to spend the time setting up a 3rd party app to develop from
why not set up one that's intended to do that?
instead of hacking away at one that's not
I've heard good things about Atom too
as far as text editors go
 
5:33 AM
I was just reading...pyCharm seems a good choice
:) thanks a lot for your help and quick resposes
 
@AnttiHaapala : Hello to you too :).
 
@MartijnPieters : My oh my! You are leading I guess. I did upvote for you too! :) Best of luck!
@AnttiHaapala : It says its all software controlled for question ban. Is it true ?
I had got my ban removed by answering the questions, editing my questions but again it got banned with no reason :(
 
@d-coder could you copy the exact phrase here
 
"You have reached your question limit"
@AnttiHaapala Stack Exchange has automatic filters in place to ban questions from accounts that have contributed many low-quality questions in the past. These filters help keep the quality of our sites high. The exact formula for the bans is not disclosed, but users are only banned if they have a significant number of heavily down-voted, zero-voted, or deleted posts. One or two bad posts will not cause you to be blocked from using the site.
 
5:42 AM
124
Q: The Complete Rate-Limiting Guide

Lance RobertsI noticed that I can only perform certain actions such as commenting a finite number of times in a given period of time. Obviously, rate limiting is in place to prevent accidental misuse or intentional abuse of certain features. Where else is rate limiting applied on Stack Exchange sites, and wh...

 
6:09 AM
lol, I think I just went entirely overboard answering a newbie's first question
once the code-review itch strikes, it's hard to resist
 
@MartijnPieters looks like you'll be our next supermod. :)
 
@tzaman Good answer. It gives me warm fuzzy feelings when I see people going out of their way to help inexperienced users; nice to see the "SO are jerks" stereotype challenged :-)
 
6:26 AM
@ZeroPiraeus thanks! I try. :) anyway, past time I went to bed. rbrb!
 
rbrb :-)
 
user4433485
6:38 AM
Hii all
 
Can somebody help with an approach to write solution for below problem in python? constraints are about using only tuple operators like slicing/indexing/concaten/*
>>> X = (1, 2)
>>> Y = (4, 5)
>>> cartesian_product(X, Y)
((1, 4), (4, 1) (1, 5), (5, 1), (2, 4), (4, 2) (2, 5), (5, 2))
X and Y can be any size tuple.
 
@overexchange itertools.product does what you want
 
Cbg
@tzaman that doesn't sound like a tuple operator
 
user4433485
cbg @RobertGrant
 
@RobertGrant Sure it is, he just wants product(x,y) + product(y,x)
it's in a funky order, but that's what it is
 
6:50 AM
I mean I think his exercise is to implement something like itertools.product, not to use it.
 
oh. In that case, using a stdlib function probably doesn't count. :) Still, looking at the docs for itertools.product isn't a bad place to start.
anyway! rbrb for real this time
 
Hello, Python.
 
Rbrb
 
I would like to share with you a Meta SO question because I think it's quite important:
1
Q: Create a separate 'code' box with automatic code formatting

CinchI think that it would be great for Stack Overflow if we could have input boxes entirely dedicated to code. Perhaps we could have a two-box system composed of the main body and our code snippets, and allow people to insert code snippets via tags. Additionally, what if we could insert code snippet...

 
>>> a = ()
>>> a += (1, 2)
>>> a
(1, 2)
>>> a += (3, 4)
>>> a
(1, 2, 3, 4)
>>>
 
7:00 AM
Voted!
 
I was expecting ((1, 2), (3, 4)), Am I not appending tuples as elements of a?
 
This should've been your first clue :)
>>> a = ()
>>> a += (1, 2)
>>> a
(1, 2)
If it were doing what you expected, that result would've been ((1,2))
 
cava(french), but my question is, why am I not suppose to expect ((1, 2)) when am concatenating a tuple as element
 
Think this to be equivalent to list.extend
 
am yet to learn list mutable type
 
7:08 AM
+ adds the elements in the new tuple to the existing tuple, as you can see already?
 
@overexchange addition of tuples works like this:
>>> (1, 2) + (3, 4)
(1, 2, 3, 4)
a += b is the same as a = a + b
 
@overexchange maybe writing code will help here
 
... which is why this doesn't work:
>>> t
(1, 2, 3, 4)
>>> t += 5
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: can only concatenate tuple (not "int") to tuple
 
cava
new_tuple += ((itup_1, itup_2),)
 
Martijn is close to 5k O_o
 
7:15 AM
Yeah, crazy
JC doing well also
In fact he's doing ridiculously well, it's just that @MartijnPieters is throwing off the curve
 
Yeah I don't think the order will change much now. At least in the top few.
 
This is kinda mesmerising ...
 
Is election time an interesting time? I got some notification today. If yes, then Félicitations @MartijnPieters
 
Cbg :)
 
how do I add header files to the source distribution?
 
7:19 AM
@overexchange it's always interesting, but particularly so for us this time, because two of our superstars are in the running (and doing rather well).
 
What is the exact purpose of this election? this is my first experience about knowing this event
 
I can't believe that Jeremy, the guy who effectively admitted he only ran to stop others, is nearly in the top 10.
 
Good luck to the both of you :D - I'm sure you've got the backing of everyone here :)
 
Regarding the Deputy badge - can I check how many helpful flags I've raised?
 
7:23 AM
@RobertGrant I wrote something like this..
def cartesian_product(tup_1, tup_2):
    """Returns a tuple that is the cartesian product of tup_1 and tup_2

	>>> X = (1, 2)
	>>> Y = (4, 5)
	>>> cartesian_product(X, Y)
	((1, 4), (4, 1), (1, 5), (5, 1), (2, 4), (4, 2), (2, 5), (5, 2))
    """
    new_tuple = ()
    for itup_1 in tup_1:
        for itup_2 in tup_2:
            new_tuple += ((itup_1, itup_2),(itup_2, itup_1), )
    return new_tuple
without for loop how do I do that?
 
@Ffisegydd Wondering exactly when he's planning to drop out, I must admit:
> I'll concede if my winning would knock out anybody with a 40/40 candidate score.
 
@Ffisegydd Where did he admit this? :P
 
@Ffisegydd cbg
 
@IanClark in his comments
And the first revision of his nomination
 
7:28 AM
@vaultah Don't think I can see them any more :(
Oh, no, found it :)
 
@Ffisegydd Well, I voted for him
 
Where is stack overflow office located? Do moderators(who are elected) report to stake holders of stackoverflow?
 
@AnttiHaapala Why this:
 
Stakeholders are only needed when there are too many help vampires
7
 
>>> from bttf import install
>>> install('bytes_mod')
rather than:
from bttf import bytes_mod
 
7:34 AM
@overexchange Um... Doesn't Joel Spolsky own SO and is CEO?
 
@ZeroPiraeus bc I decided I don't want implicit installs :D
 
But what you're doing is analogous to from __future__ import division etc., no?
 
cbg
 
no, cannot do it per module basis :D
 
7:38 AM
Hrm. Feels kinda like wheel-reinvention :-/
 
@Cinch ok, thank you for this info
 
@overexchange uh huh...
 
@ZeroPiraeus howso :D
@ZeroPiraeus I can change it :P
does not work on py32 yet
 
It just seems to me that install() is doing the same thing, conceptually, as import – admittedly I don't know how complex the mechanics of making it work the same way as from __future__ import ... are to implement, but it just feels kinda hacky at first glance.
 
it is easy.
to do those
but... the problem is I cannot provide any metadata
and inspecting the module would cause it to be installed etc :P
if one's not careful
 
7:42 AM
@Cinch Why? It's not that hard to paste in code in the existing interface. Sure, SO code block formatting can be a bit puzzling at first to newbies, but they mostly seem to work it out fairly quickly. And if they can't, then perhaps they don't have what it takes to be a programmer...
 
@PM2Ring That's not th eproblem.
 
Cabbage!
 
cbg :-)
 
The problem is the people often don't really include code and increasing the visibility and ease would help that
It would also be an inherent reminder in the system that code is expected.
 
@overexchange Offices are in NYC. No moderators don't report to the owners.
Moderators are community elected.
There is a moderator agreement, but for the purposes of protecting privacy.
 
7:43 AM
Are you paid for this effort of being a moderator?
 
Oh that mean you are helping the software society
 
And getting some sweet sweet codementor interviews
 
There was a post on Meta about moderators and pay but it was deleted.
 
@overexchange Why would you want to do it without a for loop? I guess you could use recursion, but as I said yesterday, recursion in Python should be reserved for situations where it's really needed.
 
7:45 AM
There was a nice answer there from Tim Post about how moderators get all sorts of perks, but moderators must be independent and pay would change that relationship.
@overexchange yes, moderators help keep SO clean and healthy. Just the way we want it.
 
@PM2Ring I would like to do using recursion, because for me, it is tough to do. performance measurement is a secondary aspect for me.
 
@overexchange from itertools import product
return tuple(product(tup_1, tup_2))
 
@AnttiHaapala I like you can limit the config scan to certain files. Feels neater.
 
and scan is slooooow
 
1 hour ago, by tzaman
@overexchange itertools.product does what you want
57 mins ago, by Robert Grant
I mean I think his exercise is to implement something like itertools.product, not to use it.
 
7:47 AM
@overexchange do you realize that no one else has your problems :D
@overexchange your problems are inside your own head.
 
I refactored something at work that replaces ~15 files by 2. Deleting all those files makes me feel somewhat bad.
 
@AnttiHaapala for example?
 
for example: you ask "how to do things without for loops"
it is like "how can I speak English without any consonants"
 
@overexchange don't believe @Martijn ... moderators are paid in rare, valuable gemstones‌​.
 
He isn’t a moderator yet :P
 
7:49 AM
Yeah, looking at the votes it isn't a lock at all
 
It means that he isn’t paid in diamonds yet though ;P
 
Is there only one moderator for SO? or something like top 3 top 4?
 
77
Q: Who are the diamond moderators, and what is their role?

Brad MaceSome people have a diamond after their username (ex: Jeff Atwood♦) What special privileges do diamond moderators have? How can I become a diamond moderator? Who are the diamond moderators? How many are there? For more information, see Who are the site moderators, and what is their role h...

There are fifteen at present (and will continue to be after the election; three are standing down).
 
I have a Meta question. A new user posted stackoverflow.com/questions/29430625/… (which I answered). He tried to chameleon me, so I told him to post a new question, which he did: stackoverflow.com/questions/29603334/…
But it got no response, so he posted stackoverflow.com/questions/29606645/… 3 hours later. His new question has been answered, so I told him to delete the earlier one, as it's essentially a dupe. Was I right to do that?
 
@AnttiHaapala I agree with you, but I learnt that 60% of problems are solved with recursive approach. Exclude my problems which are not relevant to recursive approach
 
7:54 AM
of course they solve but you are using recursion wrong even for scheme
 
wrong even for scheme? I did not get u
 
even in scheme your recursive loop will run out of memory unless Scheme can use tail-call optimization for you
and if you use tail call optimization in Scheme, what you get is a loop
and in Python the way to write a loop is to, well write a loop
in scheme you do it by TCO recursion
 
@ZeroPiraeus I know of two that have stood down already.
@ZeroPiraeus: Animuson became a SE employee end march, don't know why Andrew Barber stood down.
No idea who the third would be. But before the election there were at least 17 moderators, if not 18 and I missed one.
 
Ah, my mistake. I knew the final result was going to be the same number of mods. One is apparently standing down after the election.
in Stack Overflow 2015 Moderator Election Chat, 2 hours ago, by Michael Myers
or, more precisely, we have lost two in the last month and will lose another after the election
 
@PM2Ring: you could also dupe vote the unanswered post to the one that was answered.
@ZeroPiraeus check.
 
7:58 AM
@MartijnPieters Sounds like a good plan.
 
let me go and vote for martjin now.
 
@MartijnPieters On the xkcd forums, moderators freely admit that they can be bribed with gifts of alcohol. :)
 
I'm still not sure what funds SE
 
At university, I was a member of the silk screen printing studio at the fraternity.
 
@PM2Ring Some of us are more inventive :-)
My Ninja status confirmed: just received a super cool USB Ninja from @Schesis / Zero Piraeus. Thanks! :-D http://t.co/sTuiMfX7bu
 
8:00 AM
I ran it for one year as chairman.
@ZeroPiraeus It hangs from my monitor at the office!
Anywho, the studio ran on alcohol.
 
cough (not that I would ever try to curry favour with our elected moderators of course)
 
If you had a t-shirt printing order, you paid for materials, and the printer's time was paid for in hard liquor.
 
@RobertGrant funds? I remember an enterpreneur who was part of netscape team has recently funded some millions of dollars
 
Beers and snacks while working, gin or wine or whiskey when the job is done.
I got to stack my student room with some pretty sweet high quality alcohol :-P
 
@MartijnPieters That sounds awesome!
 
8:04 AM
The cool thing about SO and youtube, the database is designed to be scalable for more queries and videos respectively on day-to-day basis. Am not sure, what kind of database design is that?
 
@Cinch Fair point, too many newbies don't post code but expect us to debug it for them using our crystal balls. OTOH, some newbies include too much code - they just dump their whole badly-written mess (often without the traceback) instead of creating a MCVE. Your proposal might encourage even more of that.
 
@PM2Ring True that, but more code is perhaps better than less because we get a better view of the situation.
 
Ugh, why am I awake at 5AM? Rhubarb, everyone ...
 
rbrb Zero :p
 
I have tried to ask on stackoverflow — Minh Bang 45 mins ago
Brilliant
 
8:11 AM
meta.stackoverflow.com/questions/289995/… <- love those. And holy f*** Martijn…
 
Sometimes, I think it'd be good to actually make it harder to post code. Don't let people type or paste code into the reply box - they have to upload a file from their computer. That way, we'd know that the code we see is the code that's on their disk. And there'd be a much better chance that they'd actually tried to run the code. :)
 
Yeah but then you might get a load of code :)
 
@PM2Ring File uploads are a whole different problem
 
Yeah, people are going to upload unmodified code then.
 
"Hi guys I need help debugging my code. Here is the pyc file. kthxbai."
 
8:19 AM
cbg
 
@Ffisegydd That won't stop downvotes
If anything, we consolidate two problems into one or solve one
 
What have you tried so far? — Rahul Desai 57 mins ago
I have tried to ask on stackoverflow — Minh Bang 54 mins ago
^ made my day.
 
It was a joke @Cinch. If someone uploaded their pyc file they'd have their figgin placed upon a spike.
 
8:31 AM
cbg
 
@AnttiHaapala docs bug: docs.pylonsproject.org/projects/pyramid/en/latest/tutorials/… - the code underneath The preceding lines must be added before the following view_page route definition: is wrong; should be config.add_route('view_page', '/{pagename}')
Ouch, someone from the waitress project rejected a small PR 5 months after I submitted it.
 
@RobertGrant without forloop..
def cartesian_product_recursive(tup_1, tup_2):
    """Returns a tuple that is the cartesian product of tup_1 and tup_2

	>>> X = (1, 2)
	>>> Y = (4, 5)
	>>> cartesian_product(X, Y)
	((1, 4), (4, 1), (1, 5), (5, 1), (2, 4), (4, 2), (2, 5), (5, 2))
    """
    lenght1 = len(tup_1)
    length2 = len(tup_2)
    def product(tup_1, tup_2, index1, index2):
        if index1 == length1:
            return ()
        elif index2 == length2:
            product(tup_1, tup_2, index1 + 1, 0)
        else:
            return ((tup_1[index1], tup_2[index2]), (tup_2[index2], tup_1[index1]), ) + product(tu
 
Pet peeve: people saying "arbitrary" when they mean "any"
 
Pet peeve: Robert Grant.
 
Cabbage
 
8:46 AM
bonne après-midi
 
@overexchange index1, index2 don't exist?
 
oh shit!!!
 
@overexchange also you aren't calling inner function.
 
@Ffisegydd That sounds like an arbitrary pet peeve.
 
8:48 AM
i forgot to write that code
 
Why did someone star that?
 
@poke less so if you read arbitrary of his chat history
 
Not that I mind stars. but, it seems quite... arbitrary :)
 
It probably was a “thank you” star, we can remove it later ;)
 
@Robert tell me, how do you feel about people who literally use literally when the literally mean figuratively?
 
8:51 AM
@RobertGrant arbitrary arbitrary arbitrary
 
@Ffisegydd I'm happy with it
 
(who needs words?!)
@RobertGrant Literally happy?
Or arbitrarily happy?
 
Dear all language style gurus: the word "literally" is allowed to be used figuratively, just like any other word.
 
@InbarRose I need one help here again
 
@Ffisegydd That is relatively upsetting.
 
8:54 AM
Obviously that tweet has a linguistic issue in it as well, but I don't think I had enough characters to construct it correctly
 
@InbarRose why does python say: NameError: name 'length1' is not defined when am not asigning length1 in innermost function? Do i ned to say nonlocal
 
@RobertGrant That's an amusing thought
 
@overexchange You have a typo.
 
haha
@InbarRose there is another bug, when I say return (), what is that?
 
cbg @Inbar :)
 
8:58 AM
@JonClements Cabbag indeed.
@overexchange I don't know. Do you have a stacktrace/code to show me?
 
@overexchange If all you're looking for is generic help, please refrain from pinging individual members. For all you know, Inbar is very busy at the moment.
Better yet, try to solve it yourself first?
 
@Ffisegydd For all anyone knows, I am actually a goldfish.
 
I have always had suspicions...
 
>>> cartesian_product_recursive(X, Y)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "cartesian_prod.py", line 35, in cartesian_product_recursive
    return product(tup_1, tup_2, 0, 0)
  File "cartesian_prod.py", line 34, in product
    return ((tup_1[index1], tup_2[index2]), (tup_2[index2], tup_1[index1]), ) +
product(tup_1, tup_2, index1, index2 + 1)
  File "cartesian_prod.py", line 34, in product
    return ((tup_1[index1], tup_2[index2]), (tup_2[index2], tup_1[index1]), ) +
 
A very busy goldfish
 
8:59 AM
@Jon gratz on the 3k :P
 

« first day (1641 days earlier)      last day (3301 days later) »