last day (41 days later) » 

13:09
>>> def WHORU():
...     return os.system("whoami")
...
>>> print(plzz.call(WHORU))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "plzz.py", line 35, in call
    raise result['error']
NameError: global name 'os' is not defined
@MarcoCeppi I need to find out how picloud handles this
Is there a Python autoloader?
it's a security risk to serialise globals (like os), so you've got to "import os" in your function
autoloader?
that worked? I think
>>> print(plzz.call(WHORU))
256
Yeah, php has autoloaders
oh yes, I see
it works kind of differently
there are two objects, globals and locals, and they pass on references to functions and methods
so if you have "os.system" in your function, that's actually getattr(globals()['os'], "system")
I get the function bytecode and, instead of recompiling it, use that to create a new function object. globals() is serialised and injected like any other dictionary
but, uhm, that's a nice idea,
cool, makes sense
I could check if globals()["os"] is actually the os module, then send an instruction to load it
good call, I'll try that
you've used 1 millisecond of cpu time so far ;-)
Oh my! :D
Off to work, see ya
bye
oh blast it. I see a problem
I've just crashed my server by sending it an impossible task
(prime factors of a really really big number)
that's 83 days of uptime :O
14:12
noo! <3 uptime
14:33
I was able to log in after all :)
even got a prime number of out it ;-)
 
1 hour later…
15:35
epic
@StefanoPalazzo If you had to create a new DOM object with jQuery that has several children how would you do it?
what kind of object?
Lets say you have a <ul> and you want to add a new <li> child that has, oh say: a <a> an <aside> and a few <div>'s
let me try something
Previously I created a "template" UL, with an LI child that was just hidden with CSS
though, I know there is a more jQuery pure implementation way to do this
I guess wrapInner would be a method to look at
@MarcoCeppi do these always look the same?
15:44
It's the same for each parent <ul>
I tried using the $.append() which works fine, but when I try creating nested append()'s it doesn't
For instance:
var newli = $('<li>').attr('id', 'new-item').append($('<a>').attr('href', 'http://google.com'));
$('ul#parent').append(newli);
That for some reason won't work
huh. I can't get jsfiddle to work
48
Q: Creating a div element in jQuery

JasmineHow do I create a div element in jQuery?

My source for this madness
I think I see the problem, you should close the tag
(nonsense removed)
but then, uhm, you see
this works:
$("body").append("<a>hello</a>").wrapInner("<li></li>").wrapInner("<ul></ul>");
Right, but i need to assign attributes to the <li>, etc
Nevermind, this seems to work:
$(function()
{
    $('#crap').append(
        $('<li>').attr('id', 'test1').append(
            $('<a>').attr('href', 'http://ondina.co').text('hey')
        )
     );
});
I don't know what I was doing wrong - whatever it was, it was really dumb. I guess I had too much to drink last night :\
huh, okay that seems the right way
15:58
I've never seen the wrapInner before - that will be helpful
For the email interface, I'm just going to inject LI's inline when you press add. Creating a lightbox seems like overkill given the simplicity of the interface
but I have an opinionated design question for you
This is what each looks like (opened and closed) - is there even a point to keeping the lists separated? They're all email addresses in the end
you can combine them, if you can think of a good way to let the user choose whether they're creating an address or an alias
what does the "Create an account" ui look like?
(small point: Email should be spelled "Email")
@StefanoPalazzo Account UI doesn't exist - it will just insert an LI element where you enter the email address you want and the password.
of course, if you do combine them, keep aliases on the bottom and sort both sublists independently
mh. I guess you could add one more input: ([email] [password]) or ([alias to...])
16:05
That's why I went from having the table where you can edit the quota, etc to just inline - who wants to set a quota on an inbox? it's such an old ideology
For now I'll just leave them separated, I've been getting mixed feedback on it
Well both buttons would still exist - so depending on what you pressed you would get either two or three text boxes
One for [email] => [aliases] or [email] [pwd] [pwdpwd]
right, that's too many text boxes on one row
by the way, I think you should replace these double-stroked arrows with normal ones
normal ones?
just like this → with a bit of space to the right of them
and maybe add padding of 2px 4px 2px 4px to the input[type=text]s
I'll be back in half an hour :\
See ya then!
16:31
righto
check the extra padding with a list of hundreds, I'm not sure if it'll look so nice when the page is 20,000 pixel tall
padding on the input?
these <li>s are just about the right height as it is
yes
wonders how long it'll be until the trolls find this room
I need to get cracking on the Victory Chat :\ I'm still waiting for python-openid, so that I can implement it the way it's designed...
Is anyone working on a Python-openid implementation?
16:42
there's openid2rp. They claim to be python3 compatible, but they aren't (last time I checked anyway)
I'll check out the current HEAD and see what's up :)
the horror
I don't understand what's happening
this is from their changelog:
1.10 (2011-09-01):

* Fix Python 3 incompatibilities
and
  File "/home/stefano/openid2rp/__init__.py", line 215
    raise ValueError, "Unsupported scheme "+scheme
                    ^
SyntaxError: invalid syntax
:eyeroll:
meeting
17:51
when you're back, I've got a question about openid :\
this example has three cases for the "GET /" request: if 'provider' in query, if 'claimed' in query, and if 'returned' in query.
I'm skipping the "claimed" step entirely, and it seems to work fine. what's that for?
18:09
Back
Claimed is a corner case from OpenID 1.X Spec, I think. Let me check the php-openid
cool, thanks
Nope, Claimed is the users unique OpenID URL
huh. then how can I look in without having implemented this step?
or can I? maybe I'm not logged in :D
Do you have a test page?
yes, let me make it publically accessible
@MarcoCeppi okay here it is: mue-88-130-64-170.dsl.tropolys.de:8080
18:16
"openid.identity": "https://www.google.com/accounts/o8/id?id=AItOawlV3KEXvY65YkqwZAYbj5SAVCcKZ8pKm4‌​8", that is openid.claimed_id in older specs
which one of these fields would I use to save a user account to my database?
openid.assoc_handle?
that one
openid.identity since it'll provide the full URL
assoc_handle will only give a unique id to that service. so if you're only doing Google login then that's all you'll need. But since you're not you could end up with a collision
excellent. then, uhm, I guess I should Implement the claimed step anyway
Err, you have a claimed_id as well.
I'm not sure which to use, the php-openid library uses claimed_id for their IDs
yes me too o.o
18:19
maybe, you don't need the claimed step after all?
perhaps it'll choke on that step when I try different providers
or something like a deferred openid url
maybe. It's been about a year since I really dived into the spec. A memory I've tried to bury for months :)
yes, that's how I start to feel :)
but it seems to be working now! that's fantabulous
now to find out what these different fields mean, and how I can get a username out of them
that's going to be a pain in the ass - it all depends on the spec you're working with
not even the email value is guaranteed to be there, eh?
18:29
Although, if you just use X list of providers, it'll be easier.
No, you have to request it. With Ondina I don't request anything - just that they logged in.
You basically have to create a few different types of request objects, one for each kind of spec you support and just throw it at the provider and see what sticks
haha
here are the two more popular ones that most support: AX, and sreg
		// SREG
		if( !empty($_POST['sreg']) )
		{
			$sreg = new OpenID_Extension_SREG11(OpenID_Extension::REQUEST);
			$sreg->set('required', 'email');
			$sreg->set('optional', 'nickname,gender,dob');
			$authRequest->addExtension($sreg);
		}

		// AX
		if( !empty($_POST['ax']) )
		{
			$ax = new OpenID_Extension_AX(OpenID_Extension::REQUEST);
			$ax->set('type.email', 'http://axschema.org/contact/email');
			$ax->set('type.firstname', 'http://axschema.org/namePerson/first');
			$ax->set('type.lastname', 'http://axschema.org/namePerson/last');
AX is the older of the two IIRC. SREG is what Google uses
Just kidding, it's the other way around. Or maybe not.
I've seen sreg data from google
and AX data
but, It's not a big problem I guess. I can just try my best to get a name out of the querystring, and, if I fail, prompt the user for one
18:37
{
    "openid.ext1.value.last": "Ceppi",
    "openid.ext1.value.first": "Marco",
    "openid.ns.ext1": "http://openid.net/srv/ax/1.0",
    "openid.ns": "http://specs.openid.net/auth/2.0",
    "openid.ext1.type.last": "http://axschema.org/namePerson/last",
    "openid.claimed_id": "https://www.google.com/accounts/o8/id?id=AItOawlV3KEXvY65YkqwZAYbj5SAVCcKZ8pKm48",
    "openid.ext1.type.first": "http://axschema.org/namePerson/first",
    "openid.identity": "https://www.google.com/accounts/o8/id?id=AItOawlV3KEXvY65YkqwZAYbj5SAVCcKZ8pKm48",
Stripped out some of the other stuff, it's all AX responses
ah, I see now
they started their example code with "from openid2rp import *"
so the code is full of functions that aren't defined anywhere
19:14
Does the double arrow actually mean something?
not that I know of
I guess the single arrow is more UX friendly?
(it means something if it's pointing upwards, but nothing relevant)
the single arrow, I think, looks much nicer
double-arrow reminds me of the ASCII =>
which doesn't really work with such a curvy, bumpy design
good point
I don't get it
how is this secure, if all I have is the openid identifier
hah, just as I typed this, I spotted the D–H key-exchange part
never mind :)
19:25
:D
19:36
oh my word
what in the name of neptune is that
A wayward white dwarf
{
    "openid.op_endpoint": "https://open.login.yahooapis.com/openid/op/auth",
    "openid.sig": "B7BLymtn4yh8j9aH7RWn81HtIi8=",
    "openid.pape.auth_level.nist": "0",
    "returned": "1",
    "openid.return_to": "http://mue-88-130-64-170.dsl.tropolys.de:8080/login?returned=1",
    "openid.realm": "http://mue-88-130-64-170.dsl.tropolys.de:8080/login?returned=1",
    "openid.ax.value.email": "[email protected]",
    "openid.ns": "http://specs.openid.net/auth/2.0",
    "openid.ax.mode": "fetch_response",
you can turn off sending the name and email address at some providers,
I guess I will just run through a big list of keys and check if they're there, rather than implementing it properly
Yeah, they allow you to uncheck optional stuff, if it's required then you either have to agree or disagree
that'll be plenty until some proper openid-module comes along
nice \o/
20:14
Where I am now
The "Create" button isn't hooked up yet
weird, it's still doing that
I get a 502
makes sense, that suggests that the problem is in the load balancer
hey this is awesome
the comma-separated list for aliases was a bit of a surprise, there should be a placeholder to suggest it's possible
yeah, I want to make that more obvious
it's actually more open than that - comma or space delimited
$('#create-account').click(function()
{
	var uid = $.unique_id(5);
	var domain = $('select#domain').val();
	$('#accounts').append(
		$('<li>').addClass('closed').attr('id', uid+'_edit').append(
			$('<span>').addClass('record').text('@'+domain).prepend
			(
				$('<input>').attr('id', uid+'_address').attr('placeholder', 'address').addClass('record')
			)
		).append(
			$('<aside>').append
			(
				$('<input>').attr('type', 'password').attr('id', uid+'_password').attr('placeholder', 'Password')
			).append(' ').append(
I feel like that could be...simpler
heh
that is some code :D
it looks pretty fair though, the indentation makes it quite readable
even now seeing it for the first time
20:31
I'm pretty obsessed with open and close {,( and indentation :P
Maybe Forwards to isn't needed
Maybe just email1, email2 and then the typical help button
", " always makes me feel safer when I'm asked to input a list of things
and the "one.., two.." will be kind of encouraging
 
1 hour later…
21:35
@StefanoPalazzo is this too "over the top"?
heh, a little bit, yes :)
how about this
you could show the message, and, half a second after domready, have the dropdown flash or glow
just for a second
the big text is fine imo. possibly make it #333 or something, but that's totally okay
yeah, soften the text color is a good idea
some day, not now, there's got to be a second colour
heh, thought of something funny to do
maybe a green? (one day)
after 35 seconds, if the drop down isn't clicked an arrow will appear, then another and another until the user clicks the drop down "beta features" that will disappear after public launch :P
mh.., yeah a very slightly turqoisey green would work
oh yes please :D that's a fun easter-egg
I guess I'm done testing the open id code.. it's a right mess
a normal login would be a password check plus the last four lines of this
21:48
@StefanoPalazzo Pretty much looks like all the OpenID libraries I've seen - I'm sure you've peaked at login.d.php in Ondina, a real mess there :)
yep. it just seems to be an inherently ugly protocol
It had so much promise too. We shall see how the spec evolves
 
2 hours later…
23:55
Ugh, just ran into a weird issue I wasn't suspecting. If you inject dom after the page load you have to re-bind all events.

  last day (41 days later) »