48 Commits

Author SHA1 Message Date
Massimiliano Ghilardi
42d0037565 add special command '%cd [path]' 2021-05-03 18:06:45 +02:00
Massimiliano Ghilardi
87da03efb9 improve jupyter-qtconsole support: return "invalid" if Parse() on input produces an error 2021-04-13 20:18:53 +02:00
Massimiliano Ghilardi
df600ce276 improve jupyter-qtconsole support: distinguish between incomplete and invalid inputs 2021-04-13 20:13:12 +02:00
mackong
35242e9be1 support is_complete_request 2021-04-13 11:44:08 +08:00
Massimiliano Ghilardi
39e156a960 update dependencies to latest gomacro, fixes #208 2020-06-07 18:40:54 +02:00
Massimiliano Ghilardi
1e54350980 shell commands: improve parsing and error messages 2020-04-22 20:00:49 +02:00
Dale Campbell
29b2c79210
Implement stdout/stderr pipe to Jupyter kernel. Issue #196 2020-04-22 00:49:10 -04:00
Dale Campbell
7408543f28
First stab at implementing shell command. Issue #196 2020-04-12 23:15:31 -04:00
Sebastien Binet
f86965e17b all: zmq -> zmq4 2020-02-27 13:06:40 +01:00
Sebastien Binet
428fab0392 all: use pure-Go implementation of zmq4
Fixes #199.
2020-02-27 13:06:40 +01:00
Massimiliano Ghilardi
7faaaffc30 fix #199 Frequent kernel crashes if compiled with Go 1.14 2020-02-27 12:51:34 +01:00
Massimiliano Ghilardi
ffed719d50 implement special commands %help and %go111module {on|off} 2020-01-09 20:03:21 +01:00
Massimiliano Ghilardi
d957030e54 * update go.mod to latest gomacro for runtime support of Go 1.11 modules:
import "/path/to/some/package" is now module-aware
* require Go compiler >= 1.11, the first version with modules support
* delete vendor/ directory, replaced by versioned dependencies in go.mod
2019-11-28 22:08:37 +01:00
Massimiliano Ghilardi
7c3ca4e0f5 update vendored gomacro to fix #172 2019-06-01 22:30:37 +02:00
Massimiliano Ghilardi
a079f39dab As per @SpencerPark suggestions, try all auto-rendering interfaces
instead of stopping after the first successful one.
Adds support for types that implement more than one of HTMLer, JPEGer...
2019-04-13 22:57:40 +02:00
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
d6c102d3b9 Merge branch 'display_image' of https://github.com/cosmos72/gophernotes into cosmos72-display_image 2018-06-14 20:51:22 +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
5825f06bbc implement code autocompletion by adapting @jpark-dev https://github.com/jpark-dev/gophernotes/tree/feature/autocomplete_new_gomacro
to use gomacro/fast/Inter.CompleteWords()
2018-06-02 21:31:33 +02:00
Massimiliano Ghilardi
be43b70e79 merge @SpencerPark commit 710233fed6
From SpencerPark <spinnr95@gmail.com>:
    Lock writes to the sockets to fix a bug with interleaved publishes.
2018-06-02 18:50:13 +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
3c56c86024 Merge branch 'master' into display_image 2018-06-02 16:07:12 +02:00
Massimiliano Ghilardi
720be35622 update vendored copy of gomacro; update kernel.go for API change in gomacro/fast/Interp.RunExpr() 2018-06-02 16:04:58 +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
Massimiliano Ghilardi
3ddbe1f6aa doEval(): preallocate a slice of values with required length 2018-04-07 15:19:55 +02:00
Massimiliano Ghilardi
404fc477b0 simplify doEval() 2018-04-07 15:16:20 +02:00
SpencerPark
873dcc7608 Wrap all shell request/reply with busy-idle. Fix #99 2018-03-16 11:35:32 -04:00
SpencerPark
4cf4c6eade Switch from the classic to fast interpreter 2018-01-06 19:09:50 -05:00
SpencerPark
1d6b207c06 Clean up comments and remove unused channel synchronization 2017-10-31 21:37:12 -04:00
SpencerPark
7b3403f054 Discard output messages from the interpreter 2017-10-20 23:21:48 -04:00
SpencerPark
e90ecb710c Output all return values from the last expression if not all nil 2017-10-20 23:12:12 -04:00
SpencerPark
8094aa554b Refactoring and code cleanup.
*   Refactor named returns to explicit where possible.
*   Add/improve comments relating to the new heartbeat channel and
evaluation semantics.
2017-09-30 01:56:37 -04:00
SpencerPark
910ee8add3 Set execute_result value to the first non-nil value returned by the last
expression in a code cell.
2017-09-25 17:55:37 -04:00
SpencerPark
8463a09ef7 Publish stdout/stderr as it is written. Capture evaluation panics. 2017-09-24 21:28:21 -04:00
SpencerPark
200eb36644 Run heartbeat on seperate goroutine to support long running executions 2017-09-24 17:13:50 -04:00
SpencerPark
f75e44fd9f Remove unused types/methods and clean up the messages interface. 2017-09-12 11:14:31 -04:00
SpencerPark
1d4547ee71 Add 'date' and required 'version' field to the message header 2017-09-12 10:18:28 -04:00
SpencerPark
e287c995dd Handle errors from publish messages, clean up protocol wrappers, and
fix godoc comment formatting.
2017-09-07 20:51:43 -04:00
SpencerPark
825aefddc2 Update messages to the 5.0 spec and encapsulate. 2017-08-30 22:23:35 -04:00
Daniel Whitenack
efb80d8aee Add tests for the actual Kernel 2017-08-30 14:14:12 -04:00
Daniel Whitenack
64a2d66834 add vendor and dep files 2017-08-04 10:30:31 -04:00
Daniel Whitenack
8b938dbeae get error messages printing back to the notebook 2017-08-04 10:13:18 -04:00
Daniel Whitenack
d5844d3c4e get printing working and capture stdout 2017-08-02 11:39:58 -04:00
Daniel Whitenack
328216c31c get v1 compiling and interacting with Jupyter 2017-08-01 17:22:40 -04:00
Daniel Whitenack
e779a2a956 initial commit version 1 2017-07-22 16:49:22 -04:00