These are chat archives for ipython/ipython

13th
Nov 2014
epifanio
@epifanio
Nov 13 2014 01:48
nevermind .. i tryied to use the nbconvert —to latex output file .. as input to context and it didn’t worked
there are subdole changes in the syntax of course
Sylvain Corlay
@SylvainCorlay
Nov 13 2014 16:25
Hello
Kyle Kelley
@rgbkrk
Nov 13 2014 17:27
Is the dev meeting in 3 minutes?
With our newly adjusted time?
Min RK
@minrk
Nov 13 2014 17:29
I think so, but @takluyver isn't here yet
Kyle Kelley
@rgbkrk
Nov 13 2014 17:31
k
I'm going to run away real quick, will be right back
Jonathan Frederic
@jdfreder
Nov 13 2014 17:32
Can you link it?
Sorry I hear noise but don't see it anywhere
Not in my inbox \
Not in my hangouts
Not on my phone
Jonathan Frederic
@jdfreder
Nov 13 2014 17:33
but I hear the invite noise on my computer
Min RK
@minrk
Nov 13 2014 17:33
@ellisonbg meeting now?
Kyle Kelley
@rgbkrk
Nov 13 2014 17:35
okee doke
I'm going to see if Ash can join for the start too
Jason Grout
@jasongrout
Nov 13 2014 17:38
standing by too
Min RK
@minrk
Nov 13 2014 17:39
about to hit it
Jason Grout
@jasongrout
Nov 13 2014 18:16
we use payloads in the sage cell server
thanks for including me in the payload discussion
Min RK
@minrk
Nov 13 2014 18:19
@jasongrout can you point to the payloads you add?
Min RK
@minrk
Nov 13 2014 18:21
thanks
Jason Grout
@jasongrout
Nov 13 2014 18:21
when user code runs, I have a payload of what files they created so I can send links to the frontend
Min RK
@minrk
Nov 13 2014 18:21
nice
Jason Grout
@jasongrout
Nov 13 2014 18:29
@jdfreder: wait, what was the conclusion about the promises stuff?
Thomas Kluyver
@takluyver
Nov 13 2014 18:34
@jasongrout : I will implement another PR using promises in a simpler way, while @jdfreder tries to work out what the issues with promises on phantom are. If we can't get those issues worked out, the fallback plan is to leave widgets off the Travis tests, and test them on Jenkins using slimer
Jason Grout
@jasongrout
Nov 13 2014 18:34
ssl is usually better- at least when the internet is not broken. I thought someone from google was complaining that ssl didn't work in their evironment
Brian E. Granger
@ellisonbg
Nov 13 2014 18:34
And I will keep making jokes about "broken promises"
Jason Grout
@jasongrout
Nov 13 2014 18:35
@takluyver - do you have an idea about how you are going to simplify it?
Thomas Kluyver
@takluyver
Nov 13 2014 18:35
sorry, I meant using promises for another, simpler purpose - namely, the contents API
Jason Grout
@jasongrout
Nov 13 2014 18:35
ah, okay
Jonathan Frederic
@jdfreder
Nov 13 2014 18:37
Strange, had to refresh the page, only some of the gitter messages were showing. @jasongrout , what @takluyver said :) I typed it into the PR too.
Jason Grout
@jasongrout
Nov 13 2014 18:40
yeah, I've had the 'messages disappear until refresh' happen too. It's probably a broken promise somewhere :)
Jonathan Frederic
@jdfreder
Nov 13 2014 18:40
haha :D
Kyle Kelley
@rgbkrk
Nov 13 2014 18:47
Well @jhamrick is on this path right now!
Jason Grout
@jasongrout
Nov 13 2014 18:48
so what if there was a button in the notebook that submitted the notebook?
Kyle Kelley
@rgbkrk
Nov 13 2014 18:49
[Submit HW 1]
Jason Grout
@jasongrout
Nov 13 2014 18:49
Yeah, or just "submit this notebook"
Kyle Kelley
@rgbkrk
Nov 13 2014 18:50
[Submit this notebook into the ether]
Jason Grout
@jasongrout
Nov 13 2014 18:50
just have some %%javascript code that creates the button...
Jason Grout
@jasongrout
Nov 13 2014 19:06
@minrk: bye
From: the internet
Min RK
@minrk
Nov 13 2014 19:08
@jasongrout is new_files the only payload you guys add?
Jason Grout
@jasongrout
Nov 13 2014 19:08
I think so.
I think we used to have more, but then we restructured our code
IIRC, the nice thing is that the payload is structured data tied to the computation
Sylvain Corlay
@SylvainCorlay
Nov 13 2014 19:12
@minrk . We have a Union traitlet type we are thinking of contributing upstream, which is quite convenient for us.
Do you think that it is in scope?
Jason Grout
@jasongrout
Nov 13 2014 19:17
(a Union(Int, Float, String) uses the validation function of the int, then the float, then the string. It basically allows for unions of types
Jonathan Frederic
@jdfreder
Nov 13 2014 19:41
That's interesting, blends the line between the strongly typed and the not.
Sylvain Corlay
@SylvainCorlay
Nov 13 2014 19:44
It is pretty convenient for us. Especially when there is a validation stage that depends on the traittype. Any does not do the Job
ok, opened the PR. let me know what you think
Scott Sanderson
@ssanderson
Nov 13 2014 19:47
@SylvainCorlay @jasongrout I'd be very +1 on product types; I've written the same thing for myself as Either() that just allows 2 types
Jason Grout
@jasongrout
Nov 13 2014 19:53
I think any sufficiently advanced type system will have a union of some sort
(like julia :)
Sylvain Corlay
@SylvainCorlay
Nov 13 2014 19:53
unlike java
Andreas Klostermann
@akloster
Nov 13 2014 20:36
or python
anyway, I don't find the Union name fitting. This sounds more like a fallback validation thing
which also reminds me I wrote a widget to display/validate/evaluate django forms in the notebook
Sylvain Corlay
@SylvainCorlay
Nov 13 2014 20:41
Well, python is not statistically typed, there is no need for a Union.
Traitlets are, then a Union type makes sense as it is pretty generic. People know what to expect.
Jason Grout
@jasongrout
Nov 13 2014 21:53
In python everything is part of The Union - there is only one type, a pyobject.
Kyle Kelley
@rgbkrk
Nov 13 2014 22:05
lol
Sylvain Corlay
@SylvainCorlay
Nov 13 2014 22:55
Is there a way to have a regular class-level attribute in a HasTrait class ?
the metaclass machinery tries to instanciate it
Thomas Kluyver
@takluyver
Nov 13 2014 23:00
I thought we had classes that mixed traitlets and regular class attributes
Does it work for simple built-in things like True?
Sylvain Corlay
@SylvainCorlay
Nov 13 2014 23:03
Yes it does
class un(HasTraits):
    w = Bool

print un2().w  # returns False, while I expect Bool
however, if it is a traitlet type, it instantiates it
Thomas Kluyver
@takluyver
Nov 13 2014 23:04
ah, I see
Sylvain Corlay
@SylvainCorlay
Nov 13 2014 23:04
I just wanted to have the type information without instantiating it to have access to static methods.
Thomas Kluyver
@takluyver
Nov 13 2014 23:04
probably a convenience thing
Sylvain Corlay
@SylvainCorlay
Nov 13 2014 23:05

We end up using

class un(HasTraits):
    w = Any(Bool)

but it feels wrong