« first day (1928 days earlier)      last day (3245 days later) » 

09:00
@Rishav file exists error
Searched for topic on SO. Nothing to do with Python. Still answered by Martijn. o_o He is everywhere
btw, how do you make multi-line code in chat?
You can use Shift+Enter to get new lines, you can select text and press Ctrl+K to get code formatting.
You cannot have code and non-code in the same message though.
ok
thanks
user559633
that new jobs/linkedin integration doe
09:10
Let's make a website for UX designers/users/developers
where users/desginers can test and review prototypes
might help low-budget open source projects
user559633
Go for it.
would you use it?
for personal projects
user559633
depends on what it does and who uses it.
I guess, SE-like reputation system would attract UX designers
user559633
yesterday/earlier this morning i asked for feedback in this room because the feedback from people i've grown to deeply respect is important to me. there's a number of geniuses and very accomplished people in here, so the information that i obtained has a certain weight that wouldn't be present in advice from complete strangers
09:16
@Ffisegydd Where was I this time?
I need to start keeping tabs on all my sub-processes more.
supervisorctl question :P
@tristan When you ask a somewhat opinion-based or "best practive"(assuming you do) question in SO and a stranger with 100000+ reputation answers you, do you trust her/him?
@Ffisegydd ah, yes. If it is a Chris McDonough project, I've probably used it and have been able to answer questions about it.
Haven't used supervisord in way too long.
user559633
09:20
@khajvah not implicitly. if the user was on SO early and answered easy/common java/html/css/JS questions, that high rep could come from near common sense answers.
I am using it right now
True
And if that user has 100,000 rep in C but I'm asking a JS question?
@Ffisegydd There is an easy solution for that problem.
user559633
To make it concrete - here's such a case: stackoverflow.com/questions/24347683/…
09:21
@khajvah I'd trust the voting on their answer more than their reputation. You could look if they have posted other answers in the same tags and how those fared.
I never trust anyone's answer
I almost always even check :D
user559633
The only answer is from a high-rep user and it's a non-answer where he just talks past the question. In fact, his question is an opinion and incorrect.
@tristan primarily opinion based!
technically correct place is to put alongside the project
user559633
That's not technically correct at all.
it is
if you have a self-standing application with installation directory, the venv should be there
user559633
09:23
Read the question, it totally covers it and I completely disagree for a number of reasons.
user559633
If you share the venv with anything else or if it's not variadic data, that's plain wrong.
@tristan average per-answer score in the Python tag: 1.75.
@tristan no, you never share a venv with anything else.
@tristan: your average: almost 2.5.
that is what the venv is for, that you do not need to share it with anytihng else.
user559633
09:24
Please believe the fact that I typed more than 500 words about file hierarchy standards suggests that I gave it more thought than "dump the requirements next to the code that changes"
user559633
Not sharing a virtualenv with other projects is a personal preference and isn't objectively why they exist.
@tristan If we consider the UX design's case, you still don't have to fully trust somebody. I hope there are logical reasons why a text is italic or bold.
of course it is objectively why they exist
user559633
@MartijnPieters Oh wow, go me.
the virtualenvwrapper is just plain stupid
09:25
@tristan ahem. That is why virtual envs exist.
user559633
@AnttiHaapala I'm not talking about virtualenvwrapper and no, per-version of code requirements is not the only reason they exist.
then what is the other use case?
Yeah I keep my venv with my source code. I have a venv folder which is in .gitignore.
user559633
It's to create a set of versioned python assets/modules.
user559633
There's no objective reason why two projects with the same pinned requirements can't share those files.
09:26
@tristan what if requirements change?
Then suddenly you have to decouple.
user559633
Then separate it out.
user559633
That's fine.
of course. but the question is pretty much "are the 2 projects really separate then"
and of "usr not changing"
user559633
You don't have a hackspace/junk drawer virtualenv?
it is fine to have the venv in usr
09:27
Yeah, global :D
@tristan sure, in my home folder.
/usr tends to change all the time
but.... if you think that the user should be changing the stuff all the time
then it shouldn't be in the /usr
user559633
@MartijnPieters Different thing then -- those are your files and they belong in /home insomuch as the linux file hierachy "standard"
user559633
@AnttiHaapala yes, then it would be in var
but the FHS has nothing to say about where I put my personal files.
user559633
09:28
all these surface arguments/opinions are why i typed so many words fwiw
@tristan if this is your computer then FHS hardly cares
user559633
@MartijnPieters it would suggest /home for stuff that only you use
if it is someone's else then be nice and put them in /home :D
user559633
@AnttiHaapala i'm not talking about my personal macbook
@tristan yes, and other people shouldn't have to live with my scratchpad choices.
For projects, always use a separate venv.
user559633
09:29
but if it's a shared project with multiple devs and the box is providing a service, then that's not at all a /home scenario
if it is indeed a "not-scratchpad" in general use
then make a venv in /usr/local/
If two projects have the exact same requirements, ask yourself if they are separate projects.
user559633
@MartijnPieters Sure, that's a 'best practice'
like a custom python interpreter
user559633
N-microservices on the same box. I don't see an issue.
09:29
@tristan so why ask a FHS question then? That's a best practise guideline.
Best practice is to keep your venv with your project.
... and FHS pretty much concerns how the operating system and the apps should be laid out...
user559633
@MartijnPieters the question isn't only asking about scratchspaces
not what the sysadmin could do
user559633
i'm not sure that venv alongside a deployed code dir is the best practice
user559633
at least not what i do anyway as i just rotate and dispose of the codedirs between deploys
09:31
@tristan it is part of the code for the project.
well...
the reason why some stuff is split in FHS
is that /usr can be mounted ro, as you said
and everyone knows that /var/logs is for logs
etc.
if you have "code that changes, and requirements that change as the code changes", then to me it does not make sense to put these in a separate place.
user559633
@AnttiHaapala yup. and if homedir isn't the ideal place, which i think it's not, that's the point of the question.
@MartijnPieters Can't you bring the same argument when considering .so libs?
user559633
FWIW, i use /usr/local/project_name for my virtualenvs and /srv/project_name_version for my projects
@khajvah no, because they're .so, shared objects
they need to be in 1 common place to save RAM
09:33
@AnttiHaapala Why can't a Python library be shared?
user559633
On a deploy, I just swap out which /srv/project_name_version is "hot" and point to the properly versioned /usr/local/project_name/req_version
@khajvah for projects we've deployed, we've always used buildout; and used that to manage all dependencies as much as possible, so that we could redeploy on different OS targets very quickly. That means that .so files are included in the buildout.
It's like a venv with full control over the build process of everything else.
user559633
Anyway, the answer that the question received is why I brought this up as it's an example of a "high rep answerer; kind of garbage answer"
So yes, that applies to .so files too.
@MartijnPieters Isn"t it violating the "standard" way of handling dependencies?
for example, in Linux
09:36
and including the http server (nginx), and the caching proxy (varnish) and all their configuration. We basically only relied on logrotate (symlinking in the configs to the /etc/logrotate.d dir)
@khajvah not really. There are guidelines, there is no real standard. The guidelines help you achieve certain goals (partitioning schemes, packaging applications for end-user distribution, etc.).
We had different goals, and those were far better met with using a 'bottle' approach; everything in one place that can be nuked and re-built at will.
That then facilitates automation and troubleshooting.
yeah, I guess for computers/servers that are meant to perform one task, it's an easier approach.
user559633
nothing about that approach would make it so the computer could only handle that one service.
Exactly. And any configuration changes, updates, version changes, all go in one place (a set of buildout files) and are versioned.
user559633
for production environments, that's actually somewhat of a gold standard
user559633
when i start spending big-boy money on this project, that's what i'll be going towards
09:42
@tristan Windows
user559633
@khajvah Doors
@tristan skylights?
user559633
if i understand why you mentioned windows, a limiting behavior (if it even does) of an OS doesn't mean a thing in this argument
@khajvah if it is changing, it cannot be shared
user559633
unless the things that use it are changing too
user559633
09:44
@khajvah if it can be shared, then why isn't it in the system site packages
user559633
reminder for 26-jan, this logo rules
@MartijnPieters you're talking about facebook?
@AnttiHaapala Yeah. I am just saying, for desktop usage, I find Linux's approach to be far better.
@MartijnPieters if so, could you get ppl to contribute TLS termination to Varnish O:-)
09:45
Package managers handle stuff pretty well
@AnttiHaapala about buildout? No.
@AnttiHaapala FB doesn't use Varninsh, this is all about past projects before I joined FB.
Sorry.
@AnttiHaapala: go see this talk at FOSDEM if you want know what FB does with TLS: fosdem.org/2016/schedule/speaker/chris_down
my setups always use Makefiles, and store source tarballs - which kind of gets sucky because you'd really want to have compiled
and of course confs in SCM
but no runnable software
wish it would be more straightforward to build wheels now
There will be talk about neat tricks such as cert switching. But you'll note that Varnish is not part of this.
09:57
Cabbage
user559633
cbg
@AnttiHaapala At least it's now easier to find questions on SO, now that Martijn has created that tag.
10:37
@PM2Ring I didn't create the tag.
I merely retagged existing + questions to use that tag instead.
Okay, I think I may have created the tag as well, but back in December 2014..
10:53
Ah, rightio. :)
BTW, Happy Australia Day, from the greatest country on the planet. :)
user559633
@PM2Ring You're in America now?
:slaps Tristan:
user559633
You said "the greatest country on the planet," so you must understand my confusion if you're not talking about America
user559633
especially as the United Federation of Steaks and Whisky isn't a real country (yet)
Some classic Aussie rock: Cold Chisel - Bow River - Live in Hamburg, Germany, 1982.
user559633
11:01
although seriously, happy australia day @PM2Ring
Thanks, Tristan. It's been a nice mellow day here. A bit rainy, but I guess that's better than the 30°C days we've been having lately.
user559633
what are the celebrations like for aussie day? drinking and barbecues?
@tristan Definitely. Games of "backyard" cricket also feature heavily.
On the more serious side, we also have lots of recent immigrants taking part in citizenship ceremonies on Australia Day. And prominent Australians get recognised for their contributions to the country. See Australian honours system for details.
A more recent Aussie classic: Sunsets, by Powderfinger.
11:20
Is that me or this question is asked already for Nth time for few days: stackoverflow.com/questions/35012507/…
11:33
@PM2Ring I love the Live in Hamburg, Germany part there..
:) I suppose I should've looked for a clip of a local performance, but hey. :)
user559633
12:08
not sure i love python 3's bytes string object vs python 2
TBH, that's one of the main things holding me back from embracing Python 3. Sure, Python 3 (allegedly :) ) has better Unicode handling, but I wish that a plain "..." string was a byte string not a Unicode string.
WHy?
user559633
i ~~feel~~ like the trade off is "known ad-hoc fixes" (py2) to "a maintainer said it was better on twitter, so just trust that it's technically superior"
user559633
it's stepping through a default encoding and eating the overhead instead of just trusting that the coder knows what he's doing
user559633
again, ~~feelings~~, but maybe i just write code incorrectly or write the wrong kind of code to enjoy these changes
12:52
@PM2Ring greatest by which metric?
@PM2Ring the most down-under country?
@PM2Ring and obligatory growling
@AnttiHaapala It's traditional for Australians to say that Australia is the greatest country, especially on Australia Day. :)
it is because of your kind @tristan and @PM2Ring that I am having very shitty days with Python 2 and Unicode in particular. :d
user559633
@AnttiHaapala what do you mean?
exactly these "I know my 8-bit strings better" guys are the ones that I absolutely refuse trust in all matters related to text and string encodings
;)
user559633
eh, for a service that needs to listen to any encoded data and can get/guess the encoding from a side channel, the "trust me it's better" approach is just in the way
user559633
12:59
it's just another one of the "we changed it, trust that it's better because it fulfilled the way we do things" like super or cmp
user559633
not that super being magic is in the same league as "removed: my workflow is fine without" category
cmp really doesn't have that many uses
but sometimes I've missed it too (cmp()) that is, not the sort(cmp=))
13:15
>>> '=><'[cmp(1,0)]
'>'
>>> '=><'[cmp(0,0)]
'='
>>> '=><'[cmp(0,1)]
'<'
god I fell asleep at work
@AaronHall Cute
Thank you.
Alright, the survey has been taken offline.
user559633
reminds me of
user559633
Jan 12 at 17:11, by tristan
>>> def ret_false():
...   return False
...
>>> def ret_true():
...   return True
...
>>> cond=True
>>> (ret_false, ret_true)[cond]()
True
13:30
I'll bet that David Robinson is on it.
user559633
? Google suggests a basketball player for that name
The survey
user559633
What survey?
user559633
Why are you making me guess what you mean?
13:32
Dude, we had the developer survey link posted for weeks.
user559633
So far I have "some guy on stackoverflow that works for stackoverflow probably has something to do with a survey"
user559633
Did you mean "the stackoverflow survey is no longer linked, i believe an employee of SO is looking at the data?"
Well, the link is still in the room history, that's how I clicked it.
But it says the survey has been taken down.
13:34
interesting conversation
Is that adventure time? I watched the first few episodes and really liked it.
user559633
great show.
user559633
k bai
13:58
cbg
Morning cabbage.
Hiya Morg o/
guys, I really hate working with datetime objects, in every language
I really hate JavaScript right now
why? What's going on?
14:07
I have no idea. Programming is like playing poker. I get mad, I start being terrible.
@corvid Dates and times are intrinsically messy. The French tried to (partially) decimalize dates and times, but it wasn't very popular. See French Republican Calendar
Gotta love projects that produce a bug that a year later is still present and producing upvotes on my answer explaining the bug..
It'd be funny if the bug was actually removed
@BhargavRao there are comments on the report (now marked closed) with 'This is still present in the released version, why?' from August.
Corvid, just be grateful that you're not doing astronomical work that requires you to handle a whole bunch of time systems: that can get really confusing. :)
14:20
evil antti
released version, why? Lol, I would like to do that to some issue :D
@AnttiHaapala What'd ya do Evil?
Ah, 3.5 (from November last year) actually includes the fix. I'll update my answer now..
@MartijnPieters which one
@BhargavRao downvoted all answers to 1 question
@MartijnPieters ?
@AnttiHaapala Martijn take note ^ (Parellel downvoter) :D
@AnttiHaapala Tweepy
@BhargavRao guilty as charged. When answers are wrong, they are wrong.
14:23
@MartijnPieters while at it, you could update this as well :P stackoverflow.com/questions/12333061/…
@AnttiHaapala or did you mean 'which answer' rather than 'which project'?
well I found it
Lol, @Antti Martijn's eyes have fallen on your act, be wary :P
anyway, if only people used python 3 only, this would be a good case for kwonly args
GRRR
I cannot fscking install matplotlib
Don't install it through pip
use package manager
14:26
@AnttiHaapala done. August 2012, that's ancient!
@MartijnPieters You could've added the year there after Aug 19th
@BhargavRao look again. makes hand movement Perhaps it was there all along..
Lesson learned - Don't trust Ninjas, they do a lot of hand movement
Hey I forgot @Martijn, someone else was using your prof picture. Is the prof pic under copyright?
@BhargavRao there are others that used it before me.
no, they are not impersonating me. If there is a copyright claim, it'll probably be used against both me and those other users.
I always thought you made that cute Ninja ;_;
14:31
why are there so many front end dev jobs?
And while we are on the subject, no, this user is not impersonating me either, they really have the exact same name as me.
@BhargavRao I got it from a google image search, sorry.
That user has a space after s in Pieters.
@corvid Web generation.
I just want a server-side dev job :\
@BhargavRao no they don't.
14:34
@corvid Node.js is rulingthere
@MartijnPieters I noticed now. There's a space after all our names in the UI, except for you (mods in gen) have it after the diamond.
Hrm, 2 more posts to 15k visible answers.
arbitrary milestones are arbitrary
Martijn has 13 times more answers than I have reputation.
cool
ok 10 times
14:49
cbg
Does anyone here have a startup? Just curious.
I work at one
Oh yeah? which one?
Rhubarb
Does anyone know if a JS: location.reload() clears the session in flask?
14:54
@PatrickBassut it's called Links Analytics. You probably haven't heard about it.
@Markus I don't think so. Sessions are done through cookies, reloading a page doesn't clear them.
@khajvah Now I do: linksanalytics.com :)
yeah
:D
@khajvah sounds right.. I'm storing something in my session, the do a reload, and the data seem to be gone... must have missed something...
@Markus note that I am not completely sure
15:10
@Markus why would a js function clear the cookie?
I mean, it's a normal reload, right? Why would flask clear it out?
yes, of course. I found out what the problem was and as you say the reload didn't have any effect on the session.
111
Q: Developer survey: how many pennies were there?

Ivaylo StrandjevNow that the survey is over can we please know how many pennies were in the piggy bank?

tl;dr 753
So much for my prediction that it would be a round number.
My guess was right around the median guess, so that's something I guess.
My guess was 400 something ;_;
15:22
I guessed 430
Yeah, I guessed ~450.
The employee in charge of filling the bank must have known about the "most guess-the-number contests have a round number because the filler just dumps full rolls of coins in" phenomenon and added a few more to throw me off.
Next year my prediction will be "round number, give or take five"
Score, I guessed ~700
... Unless the employee will also account for this, and adds 17 coins as a counter-tactic.
It's a very wine in front of me problem.
15:27
Maybe I'll just go with "round number, give or take 25" and be right no matter what.
@QuestionC I got it wrong :-(
Joke's on you. Everyone else was picking a half-round number, give or take 12.
> Your answer means you took this problem to its logical conclusion. Unfortunately for you, most other players did not
Yea. The normal human's recursion limit is surprisingly low if I recall.
Lesson: don't depend on Internet strangers to make sensible choices.
I see some people guessed "100" for that poll, which could literally never be right.
I'm sure I suspect if you got all 61,139 people sitting around a table with poisoned goblets they would have made more thought out choices.
15:34
@QuestionC isn't that number going to tend towards 1? :-)
Bah, I was 4 off
Reminds me of the old riddle: You and N-1 other people are arranged in a large circle of N players. While there is more than one player left, the active player removes the player to his right from the circle, and the next person to his right becomes the active player. You get to choose who the first active player is; who do you pick so you're the last player standing?
(this isn't a WIFOM paradox, just an interesting puzzle)
@Kevin it can be solved mathematically, I know that much.
@MartijnPieters If it were 61,139 Calc 2 textbook readers, then yes it would tend to 1.
I've solved it before at least.
15:39
Yeah, since there are no choices to make, you can simulate it in O(N) time.
At least.
@QuestionC so the question then becomes: guess how many readers are not Calc 2 textbook readers..
@Kevin: IIRC there is a name for that puzzle after a old-testament bible story.
(at most? you can simulate it in O(N) time or maybe better if you're clever)
@QuestionC that's the one!
You can solve it in faster than O(N), for sure.
15:41
not biblical then.
@QuestionC absolutely, no need to simulate. Just calculate.
Each 'ring' around the circle can be done in O(1).
Looks like I forgot about the "eliminate only every Mth player" clause. I guess M=1 for my version.
Or possibly M=2 depending on how you're counting.
DSM
DSM
15:53
Day-of-debugging cabbage for all!
cabbage dsm
Guys, I finally did it, I finally into time in database
Sometimes I toy with the idea of changing my SO handle to something anonymous. Latest idea - "Unacceptable"
DSM
DSM
There's always the semianonymity of initials..
@tristan I think you're to blame for this idea.
16:03
Then you have to change your avatar to lemongrab
I know! Right!?
16:14
The problem with handle change is that you're stuck with it for a minimum of 30 days.
DSM
DSM
If you sign up for a new site I think the changes back-propagate. Or something like that. There's a new-SE-site name-change workaround of some kind, anyhow.
@QuestionC that's a cool one
How can I populate an active django app with a LOT of data. Like I already have an existing web app that has it's own data. But I basically want to make a new table. With a 321 MB csv file
I see that bereal got so many stars from his comment that he was able to retire outright.
16:33
I know one thing: I laughed hard at @bereal's comment
16:48
If anyone plays Destiny, I could use some help :)
Is that a local record by any chance?
Probably yeah.
The data explorer sadly doesn't include chat rooms.
17:15
cbg
@Kevin I'd count backwards
Morning antti
starting from me then adding a person to my left
Beautifulsoup is really frustrating me right now. Am I missing something obvious here?
html = bs.BeautifulSoup(file.read())
divs = html.findAll("div", class_="monologue")
print divs
#result: []
I'm parsing chat.stackoverflow.com/rooms/info/6/python/…, which has about 50 divs with the "monologue" class.
I've also tried
html = bs.BeautifulSoup(file.read())
divs = html.findAll("div")
print [div for div in divs if "class" in div.attrs]
Which also prints an empty list, despite me being able to see several divs with classes if I inspect them individually
What does the page load for someone that isn't signed in as a user?
print divs[59]["class"]
#result: signature
@Programmer I assume it's no different from a signed-in user. It looks normal when I read the contents of file manually.
Ok, attrs is a list of tuples, not a dict, which explains one half of my problem.
17:30
Ahh, okay. I have no experience with beautiful soup though :/
Do I need to do class_=u"monologue"...? No, still getting an empty list.
DSM
DSM
>> stars["max"].sort_values(ascending=False).head()
user
davidism     31
bereal       30
poke         22
roippi       21
Ffisegydd    21
Name: max, dtype: int64
And perhaps unsurprisingly:
>>> stars["sum"].sort_values(ascending=False).head()
user
Kevin           1518
Ffisegydd        778
tristan          673
Jon Clements     468
davidism         437
Name: sum, dtype: int64
stackoverflow.com/q/35018759/400617 mega duplicate, no research, edited python tag in
DSM you obviously did something wrong because I should be at the top of both :p
DSM
DSM
@Kevin: soup.find_all("div", class_="monologue") is working for me.
17:35
I bet it only works in Python 3.
DSM
DSM
What version of bs4 are you using?
Oh, and I guess I'm using lxml behind the scenes.
3.2.1 apparently.
I assume that's the most up-to-date version because I just did pip install beautifulsoup ten minutes ago
@DSM max stars is old data already :P
Or is someone going to tell me "oh that's the out-of-date version's name, you have to do pip install beautifulsoup_ver_4.1.1_new_current"
DSM
DSM
@Kevin: heh.
(3.5) dsm@winter:~$ pip list | grep -i beautiful
beautifulsoup4 (4.4.1)
17:40
@Kevin beautifulsoup != bs4
bs4 = beautifulsoup4, you shouldn't be using "beautifulsoup" for anything.
Ok well I already tried pip install bs4 and it said "no packages found satisfying that" or something
the tarball in pypi is called beautifulsoup4
and the package is bs4
idiotic
DSM
DSM
@Kevin: the package name is the one that shows up on the left of the list.
@DSM too bad we wipe stars < 5.
17:44
man, I don't even like BS. I would kill for an API with getElementsByClassName.
DSM
DSM
getUsedToDisappointment
@Kevin maybe pyquery
If one of you could exactly replicate javascript's DOM interface, that would be great thanks in advance
there's a couple python webkit packages, then you get the full dom

« first day (1928 days earlier)      last day (3245 days later) »