Massimiliano Ghilardi
b7e97ff1e2
pass around *interp.Interp and xreflect.Type and use them to detect
...
if an interpreted type implements one of the rendering interfaces.
2019-04-12 22:13:29 +02:00
Massimiliano Ghilardi
644268658a
use auto-rendering interfaces, as decided in #166
...
TODO: keep []xreflect.Type returned by eval(), to preserve interpreted methods
2019-04-11 22:22:37 +02:00
Massimiliano Ghilardi
f5d22ffe2c
simplify display functions and types in preparation for interfaces dedicated to rendering - see issue #166
2019-04-10 22:15:44 +02:00
Massimiliano Ghilardi
9e18fedcb8
if the only non-nil result returned by REPL is an image.Image or display.Data, publish it with "execute_result" Jupyter message, not with "display_data"
2018-06-11 01:51:40 +02:00
Massimiliano Ghilardi
568d6d7e60
automatically display image.Image or display.Data returned by REPL only if it's the only non-nil result
2018-06-10 23:09:07 +02:00
Massimiliano Ghilardi
bfa25f88c4
As per @SpencerPark recommendation, split the 'func Display(data DisplayData) error' function that sends multimedia to Jupyter for displaying
...
from the various factory functions 'func display.*(...) DisplayData' that create and return DisplayData values.
Also remove the global variable globalReceipt and use a closure instead.
2018-06-04 21:55:35 +02:00
Massimiliano Ghilardi
c75e6bc5ee
simplify @SpencerPark branch https://github.com/SpencerPark/gophernotes/tree/mime-rendering to implement rendering of HTML, JSON, JPEG, PNG, SVG, LaTeX...
...
New functions: display.PNG([]byte), display.JPEG([]byte), display.HTML(string), display.SVG(string) ...
2018-06-02 17:55:12 +02:00
Massimiliano Ghilardi
e7a966350e
display images: show as image each expression result that implements Go interface 'image.Image'
2018-04-07 16:34:50 +02:00