« first day (1510 days earlier)      last day (3442 days later) » 

12:08 AM
Lisp that compiles to Python AST
 
how the hell has this made it into the charts: youtube.com/…
 
@corvid Yes, sick leave means "with pay"
 
One company I was with for ~7yrs, I had 60 days holiday a year, plus 2 yrs full sick pay if needed
 
Yeah, leave accrual rates can get pretty ridiculous when you've been with the same company for a while.
60 days vacation a year is very nice. Sort of like having a 4-day work week, except I doubt most employers would let you use your leave that way.
 
@JonClements You're not all about that bass? Bout that bass? No treble?
 
12:22 AM
is it a common beginner "mistake" to assume that functions with long names are like
slower or less efficent that short named ones
 
apparently not @QuestionC
 
like, builtin functions rather than custom made ones
 
@user22723 the length of a function name doesn't matter - what it does, does
 
@user22723 No. In fact, I have never heard that before in my life.
Like, ever.
 
yeah ofcourse, but i feel i had some subconscious bias against using methods with long names
 
12:24 AM
naming something foo rather than f won't make it 3 times slower :)
 
We call that laziness. Cherish that habit. It's the foundation of the programming industry.
 
hahahaha
 
names get interned so they share a common lookup.... blah blah blah... so doesn't matter in the least
 
it still blows my mind that dictionaries are considered fast though
like how can such a powerful construct be fast
mad
 
if_you_start_naming_functions_like_this_to_add_two_numbers - only humans will complain :)
 
12:25 AM
i mean, im sure they are, but its still, idk weird
hahaha
 
dictionaries are fast
most things in python are backed by dictionaries, so the implementation is going to be pretty optimized
there's a new review queue:
43
Q: Help us test question triage!

Shog9tl;dr: there's a new review queue. It'll be getting somewhere around 1-2 questions per minute. The only thing they have in common is that the system is unsure of what to do with them. Some are great, some are awful, some are in-between. We need you to help the system decide which category these ...

looks like we're directly teaching a machine learning process
 
seems cooler than my bug report
 
it is cooler :-P
 
hoping it works out - seems another one of those "ideas"
still waiting for the analysis stuff they were supposed to do re: silver tag badges having heavier close weight for dupes and stuff
 
I like this idea, I've seen basic ideas like it floating around here and there when people complain about the queues. They're saying if it works it will cut down on the close queue and replace the VLQ question queue.
yeah, cv weights for tag badges would be nice
 
12:40 AM
That'd be weird to see the close queue actually go away.
 
nah, it would just get smaller I think
 
I gave up on the SE queue because of badge hunters
got a bit fed up, spending time reading through edits, then disapproving and spending time writing a message only to have found it approved anyway
then going back to the post to roll it back
 
I got gold in the CV queue and silver in a couple others, but I've pretty much stopped using the queues since then
now I just vote directly on queustions in the three tags I watch
there was a suggestion a while ago to impose penalties for edits that are rolled back, or to be able to flag edits/those who approved them
 
well, depending on situations next year, I might still run for mod - 'cos I really want to get chat sorted and the review queues (mods can suspend reviewers and chat access)
@davidism just get to 10k and you get to see all historic reviews on stackoverflow.com/review
 
working on it, 2.5k to go
Estimating February or March.
 
12:53 AM
do it by mid Feb and I'll gift you a SoC extension? :p
 
lol, we'll see
 
oh - what's the status on the wiki edit thingy?
 
well, now that you reminded me: in progress
 
yay - I remembered stuff... yay for me - working all kinds of odd hours, almost forgetting what day it is :)
oooops - might have just printed something to a wrong printer
 
1:17 AM
@davidism not sure how much code I can disclose, but I came up with a (possibly nasty) "require auth" on all routes
so will try to see when I've finished this project, what I'm allowed to publish
 
You mean like require authentication by default, and exempt certain routes?
 
yup
I hate NDAs... can't even acknowledge two of the clients I do work for :(
 
We actually already do that in sopython, see the admin views
the blueprint has a before_request that calls require_login()
this could be generalized to the app's before_request, as well as an if statement to check if the view was marked exempt
 
done something similar... but anyway :)
got more involved with iptables and separate instances and routing blah blah blah
 
I wrote a crazier one for work, the user has to accept a banner and login, unless of course they're on the banner page, login page, or a static resource.
 
1:28 AM
soo... is this problem meant to just be easy, but tedious?
Find all functions from X = {a,b} to Y = {u,v}
 
talking about iptables, one sec
 
@corvid It's to prove you know what a function is.
I wouldn't say that's tedious. And it's only easy if you know what a function is.
 
and the login can happen automatically based on a smartcard plugged into the user's machine, or manually via username and password checked against ldap
It's been so long since I've done math stuff, what is that question even asking?
so long = 5 years :-/
 
okay - just copied my key across to the server
 
I can't really say what it's asking without answering the question. It's a math jargon thing really.
 
1:34 AM
still getting login attempts from various places... I guess it's nice to be popular :)
 
Basically, a function is a mapping between two sets. Since the sets have a finite number of elements, there are only a finite number of possible mappings.
 
Sorry to jump in at random. Anyone have an idea whether I can accept a password client side, transmit it my server, and transmit it again to another server without seeing it? I mean manually doing this, not using an oAuth API.
 
@JonClements I haven't deployed anything with login publicly before, I assume this is just the background noise of the Internet, script-kiddies and bots being dumb
how would you not see it, it's been sent to you?
 
If I implement a Login with FB or something, I don't see it.
 
I blocked some IPs from China weeks and weeks ago, that appears the auth.log is down, so year - script kiddies
 
1:38 AM
Is this what you're looking for?

http://en.wikipedia.org/wiki/Cryptographic_hash_function
 
No, not really.
Not that I understand cryptography anyway
Or if I use a payments API, It's transmitted directly without me "seeing it"
 
login with fb is oauth...
 
I know
OK here's the deal
 
@davidism still getting 10 login attempts a minute :)
 
I need to accept someone's FB password, but then log in/access their account via browser, not API. Trying to figure out if I can do that without storing their password.
My guess is no
but I'm a n00b
 
1:40 AM
you use fb's oauth method, you don't have the user send you their fb password
 
your guess would be correct - that's not how oauth works
 
OK
so now I do have to worry about encrypting their password
which is fine
Thanks
 
all you do for oauth is redirect to an fb controlled page and pass some data about your app, the user logs in on fb, and fb sends back the success to your app
 
yeah except I have no app ID
 
then register one? :)
 
1:43 AM
because I'm not using their API in the first place
would rather not. arguably I'm crawling.
it's a catch 22
 
well good luck with that, I don't think anyone here can assist you with the legalities of that, nor to mention if you don't want to do it the "right" way :)
 
Didn't come for legal help. Have plenty of lawyers already. Just wanted some advice on what the technical options are.
 
if I need to give my password or details to a provider I don't trust, I'm not using your product
The technical option is you register a FB app, use their API and OAuth2 accordingly
if you wanna do something different, good luck
 
Their API literally doesn't return the info I'm looking for
so, that's moot
I would be happy to use it if it did
Actually I take that back. The API doesn't accept the args.
 
then research the API - it's not a language specific problem
look at their opengraph and such
if it's not there and accessible, then you're not meant to have it
 
1:48 AM
Fair enough. Thanks.
 
that's why we use OAuth on sopython.com
we don't want to store users/passwords
and the FB API is great if you use it correctly, but it'll only return the info the user says they are willing to divulge... eg: if you're asking for their password and login directly, that's automatically to me a warning sign of something nefarious
 
my feedback on the new review queue:
 
@davidism two typos of "Unalvageable"
 
nooooo
actually, all three were wrong
for some reason it's a really weird word to look at/type
 
welcome to English :)
 
2:03 AM
my typos are forever preserved in the onebox ;_;
 
1 message moved to recycle bin
What one box?
 
Hey, I got a fancy invitation! :)
 
it's hilarious when it does that :)
I see you're the first RO to use the kick/mute :)
 
there's somewhere that shows that?
I always go for the Trash room, but it used to have a better message about "you're here because someone deleted your message", now it just says "ignore kar ignore"
 
I use "recycle" for innocent stuff, "trash" is for more extreme stuff
might be a point that we should address in a next meeting or something
"Where do the ROs move messages to and for what reasons?"
 
2:11 AM
What I really want to know is why the 1-rep user Zephyr has been in this room almost non-stop for months now. Is it some bot?
The traditions, myths, and mysteries of sopython. Someone needs to write a thesis.
 
no idea - I hate to admit I'm not spending that much time on chat... :(
although - it does appear - everyone has a long way to go to catch up with messages :)
 
My message count will pass my rep in a week or two.
 
over 10% is probably not good: chat.stackoverflow.com/rooms/info/6/python
it's good though - we've come from pretty much nothing to a mostly active channel that I have firm believe in is the friendliest and most welcoming on the network
 
I was surprised to see you and Kevin as ROs for the Ruby room :-P
 
think badgergirl just added us for some reason
this is the community I've spent time (and others) trying to build ;)
and with such a fantastic team at the helm, I've been able to step back to some extent
High hopes for 2015
 
2:25 AM
Python appears to be one of the only rooms that has the critical mass so you don't feel like you're talking to an empty room, while also maintaining a balance between on and off topic chat, as well as noob and advanced discussion. You should write a book about how you did it.
 
I found a good team!?
 
Well, it will be a short book...
How to Start a Successful Chatroom, page 1: I found a good team?! The end.
Choosing a Mascot: animals are good, and strange deformities seem to boost popularity
 
well, this time last year... for the good of the channel: chat.stackoverflow.com/rooms/6/conversation/…
that's how seriously I took things - but it's in K&K's hands now
 
A physicist and a comedic gravity well so strong he pulls in all nearby stars. Good choice. :)
But yeah, you really turned on the serious there.
 
hopefully, understandably so :)
 
2:40 AM
I watched Cloud Atlas over the weekend, and now I can't get the soundtrack out of my head. It's so good.
 
@davidism thanks again for pointing out my stupid import errors on the flask project last week... was really getting annoyed with that and knew I was doing something stupid - it was most appreciated
ooo... love orchestral
 
yep, happy to help
did you see the movie / read the book?
 
nope - try fitting that in 18 hours days mate :(
 
Well, if you get the time, start with the book, well worth it.
 
/me makes a note
 
2:47 AM
It's interesting that the soundtrack doesn't filter out (non-musical) noises from the musicians moving around. Something you only pick up on outside the movie.
Not sure what the significance is, but it's there.
 
my favourite 'cos I grew up when the film was about is still this youtube.com/watch?v=rvuteGIuAbc - use to have the CD in the car, made me drive too fast
 
Aww yeah, Neverending Story. Loved that movie.
 
mind you - was difficult to not drive fast in the car I had, but hey ho
And this one use to be on the multi-changer
 
3:04 AM
Hmm, what to do for dinner? Rhubarb for now. I should have that wiki fix up later tonight.
 
no worries - rbrb
 
 
1 hour later…
4:25 AM
cbg
 
5:01 AM
some people really don't get that the development server should not be used in production: github.com/mitsuhiko/flask/issues/1266#issuecomment-65537641
@JonClements @Ffisegydd fixed the wiki and canon bugs and deployed a new version
 
 
1 hour later…
6:15 AM
cbg
 
6:28 AM
cbg
 
cbg
 
cbg
 
7:03 AM
Cbg
 
Stackoverflow in 2038
user image
11
 
Amazing
 
ok, closed
 
 
1 hour later…
9:14 AM
And I've now read all of those comics.
 
 
1 hour later…
10:20 AM
Cabbage folks
 
@IntrepidBrit cbg
 
Up to anything this morning/afternoon Robert?
[Cabbage/Hello](Delete as appropriate) @danuker @user4320545
 
Work :) but it's nice when it's so busy that the PM has to attend the meetings for other stuff we've done and deal with those people :)
Flying to the UK on Saturday morning though, can't wait
 
@IntrepidBrit Hello :)
 
@RobertGrant I love escaping meetings myself. Must be glorious to send him instead xD
 
10:27 AM
Yeah it's actually brilliant
 
Sweet. How long has it been since your last confession visit?
 
But having attended those meetings every week for almost a year, I'm pretty sure I've earned it
Stopped attending about a month ago
 
Jealous! But then again, too busy to attend meetings...
How long are you sticking around in the motherland for?
 
Til the 29th
Mostly see family etc, which will be cool
How often do you get back to the US?
 
10:43 AM
@RobertGrant Missing Hogmany then. Shame. In all of my travels, I've generally been disappointed in (Western)New Year's celebrations except for here in the UK.
(I don't know why I pinged you that time. Sorry). As for the USA, I don't tend to visit regularly because I can't just use the 90day visa waiver (ie- just step on a plane and visit visa).
Takes about 2-3 months to go through the process and sets me back a couple of hundred £
 
Maybe my brain is broken, but aren't you from the US?
 
Nope!
 
trawls through weeks of chat logs
I think you said something about that but I had just joined, and you were probably joking :)
I thought you were from the US, but had really got stuck into UK stuff lol
Mind blown
 
Haha sorry bud
Where in the states did you think I was from?
 
I have no idea :)
 
11:04 AM
Alternative meanings at Edinburgh (disambiguation). Edinburgh /ˈɛdɪnbɜrɡ/ is a town in Bartholomew, Johnson, and Shelby counties in the U.S. state of Indiana. The population was 4,480 at the 2010 census. It is part of the Columbus, Indiana metropolitan statistical area. Edinburgh was named in honor of Edinburgh, Scotland and for many years was pronounced the same way. Edinburgh is the home of Camp Atterbury, a National Guard training facility. The Big Blue River and Sugar Creek join to form the Driftwood River 1 mi (1.6 km) west of Edinburgh. == History == Edinburgh was laid out in about 1822....
 
cbg
 
cabbage @Ffisegydd @Mirac7
 
cbg
 
" for many years was pronounced the same way" oh dear
 
guys, why is this returning empty string:
for i in range(item_count):
    request.POST.get("{0}_aaa_input".format(i))
fetching from this
{% for item in lst %}
    <input name="{{ item }}_aaa_input">
{% endfor %}
when the elements are in range(item_count)
 
11:08 AM
There's nothing that gets on my tits more than Edinburg or Edinboro (slight facial twitch). I'll happily call Edinburgh, Indiana "Edinburg" if that's how the residents want it to be called...
are the items in lst, numbers ranging from 0 to item_count?
 
"gets my tits" or "gets on my tits" is such a fantastic (and British) saying.
 
@Mirac7 you're not saving the result of the POST.get anywhere
 
I wonder what the historical etymology of it is?
 
that's not the entire code. i'm saving dozens of input values to dict. all inputs which are in a for loop in the template return "" regardless of contents entered by client
 
11:12 AM
even though source code sent to client doesn't differ from non-looped inputs
 
@IntrepidBrit wow
 
@Mirac7 Without seeing the rest of the code - all I can hazard is that the items in lst are not numbers
Therefore, when they're converted to strings for the template view, it's comes out like:
<input name="GARY SMITH_aaa_input">
 
okay, i was wrong... it returns the dict correctly, but it fails to return the values back to the client... how should i return the values in render to get this code:
{% for item in lst %}
    <input name="{{ item }}_input" value="{{ item.aaa }}">
{% endfor %}
to fill in item.aaa?
 
What framework are you using?
 
django 1.7
 
@Mirac7 Firstly, why aren't you using Django Forms?
Secondly, I don't see what's wrong with the above? What's the output html?
@Ffisegydd (I confused)
 
everything is correctly parsed except for value attributes:
<input name="0_input" value="">
 
What is item.aaa?
What kind of data?
 
in this example it was "asdf"
it's always string recieved from text input field
 
Well, since the input name was determined correctly, the item object must exist and be valid - but I don't think aaa exists or isn't valid string data
 
11:31 AM
how am i supposed to send the data through render? I tried a dict of dicts and a list of dicts which return "" and "None" everywhere, respectively
 
Why are you using render anyway?
 
on submitted form, the form is supposed to expand, while keeping all previous data for additional edits if necessary
 
Wait a second. Rewind
What is item?
When it's defined in your view?
 
in my case item is "0", "1", "2", ...
dict key
 
Right, I think we're close to solving this
So, lst is a list of strings? Those strings are key values from a dict?
OR, is lst a list of dictionary values?
If you're just wanting to iterate over your key/value pairs in a dict, you don't use:
 
11:42 AM
I agree with @IntrepidBrit, now I know he's from the UK after all. This does feel a bit like a problem Django Forms could solve. But I could be wrong.
 
{% for item in lst %}
You need something like: {% for key, value in lst.itervalues %}
(If you're stuck in python2.x land like me)
 
Does 1.7 support 2.x?
 
Dunno, I'm still on 1.5/6
 
lst is [str(f) for f in range(item_count)] and each item is a key in a dict which contains input values
I'm using Python 3, don't know if 2.x is supported
 
(and if you're in python3.x land, you'll want to use something like: {% for key, value in lst.items %}. We can all agree it's a bit more readable.
 
11:46 AM
Hopefully by Python 8 we'll be able to say {% for key, value in lst %}
 
NO ROBERT.
 
BAD.
 
Otherwise nobody would ever use SO ever again
 
hides
 
@Mirac7 So, why aren't you using Django Forms to solve this problem for you?
@Mirac7 And why not just send the dict through, rather than the roundabout madness?
@RobertGrant And appreciate the voice of support ;). Would it change things if you knew I lived in Scotland? :P
 
11:49 AM
Fun fact: in South Africa, roundabouts are called circles
 
I had some problems with importing from forms at the start and now i'm too far to turn back and start over
 
@IntrepidBrit that's fine :)
Although you could be one of the 45% who hate me personally, as I understand it
 
i can't send a dict because i'd need nested variables in templates which don't work
 
Ah it must have been before your time here, the room was awash with Scottish politics.
Daily discussions.
Hardly any Python got done.
 
I was party to some of them :)
I'm still not quite sure why they thought it was better to leave, but I guess that's just beyond my ken
 
11:52 AM
@RobertGrant I can't decide if I love it or hate it
@Mirac7 Nested how?
@RobertGrant Trust me, I'm not!
 
From the sounds of the Euro chaps re membership etc, it would probably have been 6 months of "let's all pull together during this transition time" followed by "oh crap"
 
@Ffisegydd Gloriously terrifying days
@RobertGrant Ultimately, I feel there's two kind of Scottish nationalists. The ethnic nationalists (ie - irrationally hate the English) and the civic nationalists (those who are fed up with Westminster)
The latter I can appreciate
@RobertGrant Nah, I think if Scotland was still run by the SNP - Scotland would have become the new UK of the EU. The annoying whining neighbour
 
Yeah, everyone who doesn't live in London could leave for the latter reason :)
 
stackoverflow.com/questions/27290929/nested-variable-calls
 
Did you hear that the SNP were threatening to deny EU members access to Scotland's territorial waters if their ascension to the EU was hindered?
 
11:56 AM
@IntrepidBrit lol not surprised
I assume by "hindered" they meant "not given special accelerated treatment"
Ironically Scottish MPs had more influence over England than the other way round, but apparently that's getting fixed
 
@Mirac7 Welp - if Daniel Roseman says no - then I'm not going to contradict the top Django answerer.
Wait a bleedin' minute
That's NOT the problem
All you can't do is {{a{{b}}}} in Django template rendering
To use a dictionary, you DON'T need to use {{a{{b}}}}
 
deletes
 
fails
 
Depending on how you structure your data - you can use the above suggestion of: {% for key, value in lst.items %}
 
falls
 
12:05 PM
@Mirac7 And finally, sometimes it's really worthwhile to go back and re-factor your code to "do things properly" because it saves time in the long run :)
 
falalalala lala la la
 
Yeah I agree with that - don't throw good money after bad. Unless you're playing poker with me, in which case, please do.
 
but how do i structure my data?
 
How long's a piece of string? I'm running on so little information, I'm surprised we've gotten here at all ;)
 
how should the data be structured to correctly get values?
 
12:06 PM
Depends on a) the data b) how you're going to use the data
 
@Mirac7 he can't tell that from the very little info he has. Remember he doesn't know anything about what you're doing, and hasn't written any of the code you have in front of you.
 
at the moment i have {"0": {"variable": "aaa", "another_variable": "bbb"}, "1": {"variable": "ccc", "another_variable": "ddd"}, ...}
 
And what are you trying to do on the screen with that?
 
{% for key, value in lst.items %}
    <input name="{{ key }}_input" value="{{ value.variable }}">
{% endfor %}
 
<input name="0_input" value="aaa">
<input name="0_another_input" value="bbb">
 
12:13 PM
That should output: <input name="0_input" value="aaa">
 
but it outputs value=""
 
Okay, then try:
 
hang on the class is starting... will be back in 45 minutes
 
I hope (s)he's not teaching it
 
{% for key, values in lst.items %}
    {% for var_name, default_value in values.items %}
        <input name="{{ key }}_{{var_name}}" value="{{default_value  }}">
    {% endfor %}
{% endfor %}
Disclaimer: Usual- untested, untried. May contain traces of nuts.
Can't help to think there's a more elegant way of doing the above/structuring the data
Other than, you know. Using Django forms. Which I suggested initially.
 
12:17 PM
I'm surprised the first way doesn't work
And yes, DF are amazing
 
shrugs I'll guess we'll see what magic will occur in 45 minutes
Hey. Check me out. I haven't gone off topic in ages...
 
Pretty cool
From the Django docs, what you did first time still makes sense
 
The first dict for loop?
 
12:33 PM
Aye - it'll work if his dictionary was flat
 
12:44 PM
Yeah I see what you mean. Still weird that it's not accessing that inner property
 
morning friends
 
cbg again
 
@corvid Morning
@RobertGrant Well, since we've only been shown snippets of his code. Could be anything going wrong...
 
I think something just clicked in my brain on this math subject... suddenly it all seems so easy
 
12:56 PM
'Tis sleep. I'm the same. Will struggle on something all day. Wake up in the morning with the solution.
@Ffisegydd re-cabbage
 
Algorithm (n): from Medieval Latin algorismus, a mangled transliteration of Arabic al-Khwarizmi "native of Khwarazm," surname of the mathematician whose works introduced sophisticated mathematics to the West
 
My grandfa expired... rbrb guys
 
@corvid I always thought algorithms were people too
 

« first day (1510 days earlier)      last day (3442 days later) »