« first day (1691 days earlier)      last day (3482 days later) » 
00:00 - 14:0014:00 - 00:00

14:00
the documentation of that is a pig to find: help.github.com/articles/searching-code . It is one of my mini triumphs that I know that. I am easily pleased.
None of the search queries log10 path:libgcc and log10 path:gcc/libgcc and log10 path:gcc-mirror/gcc/libgcc return any values, so I guess Antti is correct that I'm looking in the wrong place
@AnttiHaapala Ok, so the third argument to __kernel_standard changes depending on whether you're using log or log10. Now to figure out what __kernel_standard does.
Oh well - that saved you a lot of looking through pages of results to find that out
@JRichardSnape @Antti you fools! This was the ideal time to distract @Kevin from continuing his quest for dominating the starboard! sighs :p
double
__kernel_standard(double x, double y, int type)
    return exc.retval;
}
14:04
@Kevin no, what you want to find is __ieee754_log10
cabbage all, someone got experience with moving average in python?
Thanks a lot :-)
bleh, nodejs is dumb sometimes
cabbage @RowanKleinGunnewiek. Don't forget the rules - people can get a bit particular y'know ;) Ask what you want - if someone can help, they will
14:07
since all of them use the base-2, base-2 is more exact
So, if you have roles and users, should assigning a user a role in a GLOBAL_GROUP, shouldn't he technically belong to all groups?
I see that the fyl2x instruction @QuestionC mentioned, is present in the log10 file, but fyl2xp1 is used in the log file.
Oh sorry, there's actually two related functions.
> FYL2X Compute Y * log2(x)
> FYL2XP1 Compute Y * log2(x+1)
Or, no, the log10 file calls both...
14:09
According to wikipedia, FYL2XP1 is more accurate if x is close to 0.
http://en.wikipedia.org/wiki/X86_instruction_listings
@corvid you're using the word group there. Do you mean role, or do you actually mean group?
@Ffisegydd yeah
I only have half a semester's worth of assembly knowledge so I guess my journey ends here.
I got a lot closer to the metal than usual, so I consider this a moral victory.
@RobertGrant Err, groups with roles for each user.
14:11
It's set in Boston though. Everyone will have Boston accents.
I tried to play Fallout 1 once but I gave up during my first combat.
@corvid it's hard to work out from that earlier sentence what you mean :)
I could only do damage to the rat I was fighting in increments equal to 1% of its health
What's assigning a role directly to a user got to do with the second bit?
burning the roof of your mouth - never good sighs
bloody pizza wasn't even that hot... just a tiny bit on one slice and youch
14:13
@RobertGrant so, this package has a method, where the parameters are userId, role, group and then has an object for GLOBAL_GROUP. So I add a user to the global group with the role player. However it says this user has no groups.
Pop quiz, hotshots: what other sentences are made better by appending the phrase "of your mouth"
@JRichardSnape hi!, yea I know, I didn't break any rules now right? :P by the way good news. My interim supervisors were very happy with my application. They offered me a job for the vacation to improve my application.
It might be worth replaying if you enjoy video games. Fallout 1 is a short game.
@RowanKleinGunnewiek congratulations!
@corvid I'd ignore the role bit, as it doesn't seem to have any bearing on the rest of it
14:14
I don't think it has much relevance to the modern games though.
And yeah I guess I don't know the framework you're using, but I'd expect something called GLOBAL_GROUP to do what you're expecting
You're adding the user to that group, right?
Yeah, the json comes back right.
{
  __global_roles__: ['internal']
}
14:32
Hi, I have a question. I learn python for few months. Now I use django, I created simple apps like blog or something like that. I search company to intern and I want create bigger project which I could show on job interview. What could it be?
Something you're passionate about
So you actually work on it
This question reminds me of the Louis CK joke where he's shouting at his daughter "because some things are, and some things are not, ok???"
"Why" ceases to become meaningful once you drill down far enough.
I like travel so I created a blog and I write there about my trips but it is very simple app, maybe i can create a page where we can plan our travel, book hostel, is it good idea?
Go for it dude
Apparently we now need to switch from DVCS to DDVCS
14:42
What matters is the how, not the what
ok thanks if you have ideas too you can write ;)
I would just expect Roles.getGroupsForRoles(userId, 'internal'), it would return all groups.
Why?
Surely that is primarily opinion based. In this situation.
As in many
Very tempted to answer with simply "Why not?"
DSM
DSM
Double-my-usual-travel-time cabbage for all. (Two separate fire investigations, somehow.)
The first fire investigator was so incensed at not finding any fire, that he started one himself just on principle.
DSM
DSM
14:56
I've considered less likely ideas to explain the odd clustering I keep seeing.
Has @davidism been about? I can't get a multipart/form-data requests post to work with both data and files with a flask receiver, and I don't know where my error is -- the code people post in SO answers doesn't seem to work for me.
Whenever I see a fire fighter in public, there's always a fire nearby. From this correlation I can only assume fire fighters are serial arsonists.
@DSM paste code?
DSM
DSM
Let me plug in my USB key and get the files.
Something like
files = {'file': ('userfile', open("h5consumer.py", "rb"), 'application/octet-stream')}
data = {'account_id': 23}
headers = {'content-type': 'multipart/form-data'}
res = requests.post(url + "/api/data/load", files=files)
Means that I can pick up the files on the flask side in request.files (yes, I'm not passing the headers here).
If I add data=data, without headers, I can't seem to find it in request.
Seeking a dupe target for Array to tuple conversion python. I refuse to believe that this is the first time it's ever been asked.
DSM
DSM
If I do add headers, I get nothing in args or files, which makes me think I'm building the header incorrectly.
The above was modified directly from an SO answer which seemed to work for the OP, so I'm not sure where my error is..
15:10
@Kevin stackoverflow.com/questions/23006428/… is one. I'm surprised not to see a canonical from about 2009
...yet...
I'll add it to the canonical questions list.
stackoverflow.com/questions/21303224 somewhat earlier. I'll vote it as dupe for that one
Whoops, already dropped the hammer :-)
Ahh - forgot you had Thor-like powers ;) I don't think it matters too much
Especially if I also hammer the one I used as a dupe of the one I didn't use.
Now what I'd really like to happen, is for someone to say "that's a bad dupe target, [this] one is much earlier".
Exploiting the average SO user's "well, actually..." instinct, in order to find canonical sources :-)
15:16
thus triggering a hammering cascade. My instinct is now exhausted. I'm fickle like that
Merrily installs stuff in pythonanywhere
DSM
DSM
Oy, the picture of corvid's future glorious cat is no longer accessible! :-/
I don't like cats with imperious expressions.
DSM
DSM
But there was a real authenticity there. It wasn't that he was looking down on you, it's that he knew how great he was and because of that didn't feel the need to condescend. He was simply legendary, and you could accept it or not, but it wouldn't change.
@DSM I'll check it out in a bit
15:28
Perhaps that's too broad. I don't like would not want to have as a pet, cats with imperious expressions.
I accept without complaint the fact that imperious cats exist, and that other people appreciate them.
DSM
DSM
@davidism: tx. I can work around it, so it's not critical, but usually when something works for other people and not for me it's a sign my mental model of how things work is way off..
@Kevin wow. Maybe we're not the same after all.
If I'm personally responsible for providing food shelter and hygiene to an animal, I want derpy gratitude over "of course this is the way it should be, humans are my servants"
BOW BEFORE FIRECAT
DSM
DSM
Awww. Firecat.
16:11
is there a term for when you break one collection into multiple subcollections?
vandalism
*phew' - that was close - teamviewer session... sharing my desktop - almost forgot to close down a radio tab, a netflix tab, an iplayer tab, loads of SO tabs, my email tabs etc...
(would like to make it appear that I'm at least paying some attention to business!)
@IntrepidBrit :)
We would also have accepted: being overly taxonomical
If there are no serious suggestions, looks like we get to coin the term ourselves.
Corvidulation. noun. The act of breaking one collection into multiple subcollections.
DSM
DSM
"partitioning"?
16:20
Division?
Sorta. It's kind of like a "pseudo-collection" because it is a subset of another collection but not a collection on it's own, if that makes sense.
DSM
DSM
Not really. ;-)
The web scale is real.
I wish I was web scale ;_;
that sounds terrifying
16:26
I don't think you want to shard yourself
web scale. With that. Rhubarb
DSM
DSM
@Ffisegydd: you passed your viva; shiny new analytics position; what do you have to ;_; about? Everything's coming up Fizzy!
3
bah davidism you're so quick at answering flask questions
Re: Dupes. Related list is usually a good spot for dupes. If it's not in there then the dupe target probably has a bad title.
DSM
DSM
"I'm going to give the name Teddy to this bear here." "I'm going to dress Teddy in this smart raincoat." In the real world the difference between these two doesn't seem to confuse people.
16:30
I'm not web scale though am I? ;_;
Looks like I'm going to have to move for this job. I hate moving.
Will be nice to finally get my own place though.
it's kind of a silly example, I use bytesio to read the data from the file
notice that I don't mess with headers at all, requests will do that for me
also, I use form not args to get the data. args is for query params
DSM
DSM
@davidism: trying it now.
16:38
@corvid Interesting to know that @davidism works with Flask. Been looking for someone to annoy about that.
DSM
DSM
@davidism: hmm, no hello world for me-- not sure what data.encode() is meant to do.
@holdenweb ask away
@DSM, like I said, that was just a silly example to read the uploaded file. BytesIO.encode is just like bytes.encode, bytes being what you get in a file upload
what do you get?
Nothing specific just yet. Been investigating the differences between SQLalchemy in Flask and native
DSM
DSM
@davidism: BytesIO doesn't have an encode attribute, so I thought maybe you meant to read from the stream and then encode decode the result?
uh yeah, that was my dumb mistake
should be data.getvalue().decode()
16:45
@DSM That metaphor you were looking for yesterday about fixing one thing causes everything else to fall apart? Would Can of Worms work? It's not exactly the same.
DSM
DSM
Ah, that's better. :-)
@davidism @DSM Interesting that this is a very common error, even for experienced programmers
@dsm spinning plates?
It's been bugging me because the idea you're trying to get across... it would be really useful to have that saying.
16:46
@dsm don't know if you saw it, but I suggested "yak shave"
@holdenweb I literally had just written bytes.decode too, I just copied it wrong for some reason. Doesn't help that I can't en/decode straight from an IO object.
DSM
DSM
@davidism: much obliged! This seems to be working now. So it looks like in this case, what was previously put in the query-string and args is now in form, and I can put the data from the files into a variable via this save method.
You can, of course, also use params when making the request and get args in flask. They all work together.
DSM
DSM
(goes away to try it) Yep, there's my good ol' ImmutableMultiDict.
DSM
DSM
16:53
The backstory to this is that I've written an HDF5 store to handle some very big objects for performance reasons, and now I want to write a lightweight API for it. If this can work, it can replace a lot of complicated code with something which is both simpler and faster.
Nedroid is p. cool
"Check it out, I got us all headstones. Can never plan too far ahead."
"Here lies reginald. Killed by a ghost in a hall of mirrors."
"... How do you kn--" "I JUST KNOW."
SURVEY: Stop writing classes (news.ycombinator.com/item?id=3717715) vs Start writing more classes (lucumr.pocoo.org/2013/2/13/moar-classes) Your opinion please!!
That's a lot of text so I'm just going to continue writing the same number of classes I usually do
would if I could
17:02
I guess synonymizing them is the right thing to do meta.stackoverflow.com/a/295647/2301450
@AaronHall if I remember the first video correctly, they're actually both saying the same thing: write better classes.
That's an interesting resolution.
The first video is saying "don't use a class when it literally makes no sense to", not "don't use classes, ever". Armin is saying that the title of the video has mislead many new programmers to think the second phrase instead of the first, and shows how to correctly write classes.
ok, any other opinions? I don't even have enough for a t-test yet... :D
Isn't the implementation of a module very similar to a class?
So unless you need to instance it several times... doesn't seem worth it
17:07
Use classes whenever it seems like a good idea to use classes.
Anyone know how to delete a database in pythonanywhere?
burn your harddrive.
Through interpretive dance.
This "don't use classes" talk reminds me of something I read on I think Joel's Blog. It basically said "If you have to make a choice, do whatever has less lines."
Don't use classes, got it.
Refactors
17:14
ok, survey: premature optimization, or sensible and Pythonic coding strategy:
>>> class A(object):
...     def __init__(self, foo):
...         self.f = {}
...         for f in foo:
...             self.f[f] = f
...
>>> class B(object):
...     def __init__(self, foo):
...         self.f = self_f = {}
...         for f in foo:
...             self_f[f] = f
...
>>> timeit.repeat('A(xrange(100))', 'from __main__ import A, B')
[10.20199990272522, 10.19700002670288, 10.188000202178955]
>>> timeit.repeat('B(xrange(100))', 'from __main__ import A, B')
[6.770999908447266, 6.759999990463257, 6.771000146865845]
I guess python can't into aliasing optimizations. TIL
thing was working so well until I changed it :\ any mongo friends here?
I guess it's up to you. Making aliases for efficiency is normal programmer stuff in C++. On one hand it's faster, on the other hand it opens up the door to shooting yourself in the foot.

I think putting `self.f = {}` and `self_f = self.f` on separate lines is more clear because it makes it explicit that the purpose of self_f is to shortcut the member lookup operation.
Since my code's going to be used by everyone, I think I need to make sure it's as efficient as can be without sacrificing readability.
I'm not using your code, so nyah.
17:23
does python have a string library akin to underscore.string?
what?
import string?
Rbrb :)
Or its part of the string object itself?
DSM
DSM
There are a few things like Template which are stringy but not methods of string.
@JoranBeasley that provides a decent amount of it. Really what I am after is a humanize type of method
17:28
Seems pretty simple to write one up yourself
ah perfect thank you good sir
Their use of ize vs ise disgusts me
In javascript you can ify and ize anything
You have a problem with Americanized suffixes?
I think you'd have a hard time reading thru my code.
Webster standardized English before the Brits did, so I think the Brits should just get used to it. :D Guantlet thrown down
17:45
You're lucky I'm on my mobile son or I'd have booted your yank ar*e out :p
I think we should just split into independent languages.
Do the French get mad at the Germans for using "de" instead of "le"? It will be the same deal with English using "ise" and Americanese using "ize".
Or vice versa. Whatever.
It still grieves me when I have to use color as a kwarg
DSM
DSM
17:53
me: "[PS: I really hate that I have to drop the 'u' when working with matplotlib..]" from here
@Kevin That's like saying Python 2 should split off and be a separate language from 3. No way, 3 is the future!
user559633
3 is a bigger number than 2. This all checks out.
5
Precisely.
18:08
everyone seems to either love or hate meteor :|
user559633
@corvid i have no opinion of it
Can't unhear "nakkivene" :| youtube.com/watch?v=J9-Lwpgfd1E
"wiener boat" from Finnish. Can't believe they made a site devoted to that song nakkivene.net
grr... dumb javascript name collisions everywhere
18:27
lol
I thought javascript was good with lexical scoping. Maybe it's the programmer...
Reject the incoming edit please stackoverflow.com/q/30627937/2301450
Everyone seems to love extending on _
@corvid What do you mean by that?
underscore.string, underscore, and lodash all use _ as their namespace.
18:38
lodash forked from _ only
@vaultah rejected, but needs more votes
The revision history looks odd
Yeah, I thought it looked strange
DSM
DSM
I don't understand Zizouz212's comment there. urlopen doesn't return a context manager, so isn't that the error you'd expect?
I think they've misinterpreted
18:48
Omg, please reject that edit D: It already has 2 approve votes...
> king.code has approved 725 edit suggestions and rejected 2 edit suggestions
Somehow I doubt this is a bug, he does look like a robo-reviewer
I'm proud of rejecting more than I've accepted :D
Hey up
cbg Adam
18:58
@vaultah Gone
Thank you! :)
That edit would also remove the from the question, so the formatting wasn't the only issue...
ok - missed that, but that type of formatting is a pet hate of mine anyway :)
@vaultah always use "reject and edit", that way you immediately reject the suggested edit
I used all my votes today :(
19:13
@direprobs cbg
56 more upvotes than downvotes on the python tag for my gold
hooray.
I've started counting down haha
I need to get around to making a functioning se api / dupe id system, preferably before I get gold.
Nidaba
Hmmm, how are we determining the dupes?
19:25
I have a lot of time though, still need 161 points
@thefourtheye machine learning, you'd have to talk to Fizzy
We've also got the canon, it just needs to be populated with more dupes, and for that we've got the data dump.
ML :O
I hear that its very tough
@Ffisegydd Why don't you teach us a bit of ML? I would be happy to learn :-)
too broad
Sure @thefourtheye, I'll charge by the hour on codementor :p
Only if I attended the classes I paid money for properly :D
DSM
DSM
Aaargh, beaten by 26 seconds, because I was describing how it worked. :-/
That'll learn ya.
DSM
DSM
Never answer questions!
19:54
Never explain! Drop the code and then move on!
Guided a user to a low-traffic site :[ stackoverflow.com/q/30629392/2301450
20:15
guys I harness trained cat. Now I'm that weirdo walking a cat in the city.
that's gonna be me someday
cat gif
"There's been a minor cat-lision on the freeway"
Bah. I should stop trying to help those that present as desperate :( Solved the python programming problem, I think, but alas no accept. Any quantum physicists in the house that want to take a look who might have a better intuition/recognition regards the context? stackoverflow.com/questions/30605526
20:26
I was going to suggest moving that to physics or math yesterday, but then forgot.
rhubarb all
rbrb
I am far too soft, davidism. You would have been right to do so. I think I might edit that into my answer. There is a programming (or at least a numerical computation) issue, but my intuition is that there's a misunderstanding of the physics at the core
No idea what the question is going on about
good answer though, it was my guess too, I just didn't know enough about the topic to try different values
20:39
Not sure what units gamma is meant to have either.
Don't have any paper to sketch it out either.
DSM
DSM
20:54
aargh jsf why
Java, that's why.
21:16
If I have a nested while structure
say
while <condition>: while True
^ two while loops nested inside
Then how often would the <condition> be evaluated ? if the inner while loop is an infinite loop ?
It's evaluated each time that loop loops. What happens inside the loop has no bearing on that.
Oh, got confused on some basics, thanks anyways
21:46
My last upvote is on an answer that's destined for necro greatness.
22:20
Is this guy full of shit or does he have a point? reddit.com/r/learnprogramming/comments/38ejr2/… (the yellow post)
I'm confused. It seems like an entirely arbitrary distinction to me
A function is a reusable grouping of code that stands alone. A method is a reusable grouping of code that is bound to an object.
It's the difference between "foo".upper() and str.upper("foo")
22:51
oh my god
I just realised that nearly all python code I wrote is wrong
Why wasn't I forewarned?
you fool!
Now you've released the mutable demon!
the anguish of a thousand runtime errors await thee!
I honestly wonder why default values act like this in python
And why they aren't just re-evaluated each time the function is run
because scoping.
@AdamSmith Coming from C++ that sentence made literary 0 sense.
23:04
"Although initially unintuitive, this occurs because the function itself is an object and the default values are stored and evaluated at run time. When you append to the list, it appends to the default value attached to the function."
It's in the module scope, not the function scope
Yes but WHY is that design decision made. Why are default values "module scope"
Doing the binding inside the function would mean that x is effectively bound to the specified default when the function is called, not defined, something that would present a deep flaw: the def line would be "hybrid" in the sense that part of the binding (of the function object) would happen at definition, and part (assignment of default parameters) at function invocation time.

The actual behavior is more consistent: everything of that line gets evaluated when that line is executed, meaning at function definition.
from the question linked to that page
"a function is an object being evaluated on its definition; default parameters are kind of "member data" and therefore their state may change from one call to the other - exactly as in any other object."
@AdamSmith I don't get it, how exactly is that a "deep flaw"? Can you rephrase that?
Hmm I can see that. But I guess I'll just disagree with the "actual behaviour is more consistent" considering the amount of trouble and uglyness it adds. As now it's incosistent that in the body the "variable" is silently transformed/added as a local one.
@phant0m all the text I just dropped was copied and pasted from the canonical question -- read that instead! :)
23:10
Instead of having to (more consistent to me) write self.myArgument or func.myArgument to refer to arguments.
@AdamSmith Is the canonical questions thing a new thing? I haven't dabbled in Python in a while, but I've never come across that resource before
it's an sopython thing
^ Having to do that would actually also show more clearly this problem and make it easy.
We try to keep listings of canonical questions so they're easier to point dupes at
cool
00:00 - 14:0014:00 - 00:00

« first day (1691 days earlier)      last day (3482 days later) »