Re: [jupyter] Rich representation of exceptions/tracebacks

2017-11-27 Thread Brian Granger
One further question - do you think there is anything we can do in the
meantime in upstream libraries such as Altair so support rich reprs of
errors? Sure we could just publish a mimebundle, but then then we
can't raise, right?

On Mon, Nov 27, 2017 at 11:38 AM, Brian Granger  wrote:
>> I poked at it some time ago (sorry no branches), and plan to do refactoring
>> of IPython's error machinery to improve that. One issue is that the
>> Traceback fromatter does tokenizing and coloring at the same time (with raw
>> escape sequences) instead of yielding data structures that can be formatted
>> later. This was one of my reason to push Python 3 : to use generators, yield
>> and yield-from in this part of the codebase.
>> It is still _way_ too messy now, but better than it was a year ago.
>
> OK, that is helpful!
>
>> That's technically, for the overview, I also discussed a bit with Kyle at
>> spring dev meeting (and looked at tonic dev). I think that having some "get
>> together" with kernels author from multiple languages would be useful. In
>> particular I'd like to integrate the discussion about a debugger protocol
>> into this as well and/or link from error messages to code cells, which need
>> a bit more coordination than "just" mimebundles.
>
> Yeah I could imagine something more structured that mimebundles might
> be helpful in this context.
>
>>
>> I also tweeted
>> [that](https://twitter.com/Mbussonn/status/933418933994098688) in response
>> to same blog post, so you are 4 days late :-)
>
> :-) Thanks for the update, glad I wasn't alone in thinking about these things.
>
> Cheers, Brian
>
>> --
>> Matthias
>>
>>
>> On Sun, Nov 26, 2017 at 7:04 PM, Brian Granger  wrote:
>>>
>>> Hi all,
>>>
>>> Has anyone done work on using rich MIME based representations of
>>> exceptions and tracebacks in IPython+Jupyter?
>>>
>>> This nice blog post got me thinking about providing more helpful
>>> representations of errors to users:
>>>
>>> https://blog.keras.io/user-experience-design-for-apis.html
>>>
>>> Cheers,
>>>
>>> Brian
>>>
>>> --
>>> Brian E. Granger
>>> Associate Professor of Physics and Data Science
>>> Cal Poly State University, San Luis Obispo
>>> @ellisonbg on Twitter and GitHub
>>> bgran...@calpoly.edu and elliso...@gmail.com
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "Project Jupyter" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an
>>> email to jupyter+unsubscr...@googlegroups.com.
>>> To post to this group, send email to jupyter@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/jupyter/CAH4pYpSCR6o-JFk--t0Sn3SjY%2B%2BZ_%2BFC0WAXSRCqt_Qy%3DEddyg%40mail.gmail.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Project Jupyter" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to jupyter+unsubscr...@googlegroups.com.
>> To post to this group, send email to jupyter@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/jupyter/CANJQusUvjhb%3DZ1HP93cssJ%3Dzk19%2BK0fqO%3DZnm8P4hVAjchrt6A%40mail.gmail.com.
>> For more options, visit https://groups.google.com/d/optout.
>
>
>
> --
> Brian E. Granger
> Associate Professor of Physics and Data Science
> Cal Poly State University, San Luis Obispo
> @ellisonbg on Twitter and GitHub
> bgran...@calpoly.edu and elliso...@gmail.com



-- 
Brian E. Granger
Associate Professor of Physics and Data Science
Cal Poly State University, San Luis Obispo
@ellisonbg on Twitter and GitHub
bgran...@calpoly.edu and elliso...@gmail.com

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jupyter+unsubscr...@googlegroups.com.
To post to this group, send email to jupyter@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/CAH4pYpQgrXNk60bL7wMbOV80RDyzgJzgontpehyAdMvprz%3DoGg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [jupyter] Rich representation of exceptions/tracebacks

2017-11-27 Thread Brian Granger
> I poked at it some time ago (sorry no branches), and plan to do refactoring
> of IPython's error machinery to improve that. One issue is that the
> Traceback fromatter does tokenizing and coloring at the same time (with raw
> escape sequences) instead of yielding data structures that can be formatted
> later. This was one of my reason to push Python 3 : to use generators, yield
> and yield-from in this part of the codebase.
> It is still _way_ too messy now, but better than it was a year ago.

OK, that is helpful!

> That's technically, for the overview, I also discussed a bit with Kyle at
> spring dev meeting (and looked at tonic dev). I think that having some "get
> together" with kernels author from multiple languages would be useful. In
> particular I'd like to integrate the discussion about a debugger protocol
> into this as well and/or link from error messages to code cells, which need
> a bit more coordination than "just" mimebundles.

Yeah I could imagine something more structured that mimebundles might
be helpful in this context.

>
> I also tweeted
> [that](https://twitter.com/Mbussonn/status/933418933994098688) in response
> to same blog post, so you are 4 days late :-)

:-) Thanks for the update, glad I wasn't alone in thinking about these things.

Cheers, Brian

> --
> Matthias
>
>
> On Sun, Nov 26, 2017 at 7:04 PM, Brian Granger  wrote:
>>
>> Hi all,
>>
>> Has anyone done work on using rich MIME based representations of
>> exceptions and tracebacks in IPython+Jupyter?
>>
>> This nice blog post got me thinking about providing more helpful
>> representations of errors to users:
>>
>> https://blog.keras.io/user-experience-design-for-apis.html
>>
>> Cheers,
>>
>> Brian
>>
>> --
>> Brian E. Granger
>> Associate Professor of Physics and Data Science
>> Cal Poly State University, San Luis Obispo
>> @ellisonbg on Twitter and GitHub
>> bgran...@calpoly.edu and elliso...@gmail.com
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Project Jupyter" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to jupyter+unsubscr...@googlegroups.com.
>> To post to this group, send email to jupyter@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/jupyter/CAH4pYpSCR6o-JFk--t0Sn3SjY%2B%2BZ_%2BFC0WAXSRCqt_Qy%3DEddyg%40mail.gmail.com.
>> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jupyter+unsubscr...@googlegroups.com.
> To post to this group, send email to jupyter@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jupyter/CANJQusUvjhb%3DZ1HP93cssJ%3Dzk19%2BK0fqO%3DZnm8P4hVAjchrt6A%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.



-- 
Brian E. Granger
Associate Professor of Physics and Data Science
Cal Poly State University, San Luis Obispo
@ellisonbg on Twitter and GitHub
bgran...@calpoly.edu and elliso...@gmail.com

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jupyter+unsubscr...@googlegroups.com.
To post to this group, send email to jupyter@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/CAH4pYpS5HCsy%3DTk1mNFKLZSnVWuo1omHNatDGx601xU7mKc8pA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [jupyter] Rich representation of exceptions/tracebacks

2017-11-26 Thread Matthias Bussonnier
Yes,

I poked at it some time ago (sorry no branches), and plan to do refactoring
of IPython's error machinery to improve that. One issue is that the
Traceback fromatter does tokenizing and coloring at the same time (with raw
escape sequences) instead of yielding data structures that can be formatted
later. This was one of my reason to push Python 3 : to use generators,
yield and yield-from in this part of the codebase.
It is still _way_ too messy now, but better than it was a year ago.

That's technically, for the overview, I also discussed a bit with Kyle at
spring dev meeting (and looked at tonic dev). I think that having some "get
together" with kernels author from multiple languages would be useful. In
particular I'd like to integrate the discussion about a debugger protocol
into this as well and/or link from error messages to code cells, which need
a bit more coordination than "just" mimebundles.

I also tweeted [that](https://twitter.com/Mbussonn/status/933418933994098688)
in response to same blog post, so you are 4 days late :-)
-- 
Matthias


On Sun, Nov 26, 2017 at 7:04 PM, Brian Granger  wrote:

> Hi all,
>
> Has anyone done work on using rich MIME based representations of
> exceptions and tracebacks in IPython+Jupyter?
>
> This nice blog post got me thinking about providing more helpful
> representations of errors to users:
>
> https://blog.keras.io/user-experience-design-for-apis.html
>
> Cheers,
>
> Brian
>
> --
> Brian E. Granger
> Associate Professor of Physics and Data Science
> Cal Poly State University, San Luis Obispo
> @ellisonbg on Twitter and GitHub
> bgran...@calpoly.edu and elliso...@gmail.com
>
> --
> You received this message because you are subscribed to the Google Groups
> "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jupyter+unsubscr...@googlegroups.com.
> To post to this group, send email to jupyter@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jupyter/CAH4pYpSCR6o-JFk--t0Sn3SjY%2B%2BZ_%2BFC0WAXSRCqt_Qy%3DEddyg%
> 40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jupyter+unsubscr...@googlegroups.com.
To post to this group, send email to jupyter@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/CANJQusUvjhb%3DZ1HP93cssJ%3Dzk19%2BK0fqO%3DZnm8P4hVAjchrt6A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.