google / evcxr Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
Probably by integrating with RLS, although I'm open to other ideas if anyone has any.
This project looks great! Two elements don’t feel Jupyter-like though:
:command
isn’t how things are usually done there. Instead, there’s %line-magic
and %%cell-magic
EVCXR_BEGIN_CONTENT
is hacky. There should rather be a module that can be used to construct and publish mimebundles, and that contains a trait one can implement to have a struct displayable.
We could introduce a standard name for a feature that %dep
automatically activates in installed crates. With that feature active, crates would depend on aforementioned module and implement its trait for their most important structs.
I confirm evcxr_jupyter works on my mac box. But I spent more time than expected to make it work because I couldn't find any relevant documentation.
Below is what should be added to the docs.
$ brew install zmq
$ evcxr_jupyter --install
Writing /Users/CC/Library/Application Support/jupyter/kernels/rust/kernel.json
Installation complete
$ jupyter kernelspec install ~/Library/Application\ Support/jupyter/kernels/rust
[InstallKernelSpec] Removing existing kernelspec in /usr/local/share/jupyter/kernels/rust
[InstallKernelSpec] Installed kernelspec rust in /usr/local/share/jupyter/kernels/rust
It would be nice to have an option (or a default behavior) to format cells with rustfmt
Can possibly use syn to parse what's been written and keep asking for more lines of input until syn reports that there's a complete token tree.
Alternatively, perhaps we can use a key modifier - e.g. shift+enter to execute. Perhaps need to first see what other REPLs do. Jupyter notebook uses shift+enter to execute, but then it's not a command line REPL (although jupyter-console is)
Hello, first I'd like to thank you for this project!
This issue is a feature request that would make the usages of cargo
commands compatible with the sccache
(caching for compilation).
I'm using your rust integration for jupyter labs, and I have confirmed that after installing https://github.com/mozilla/sccache (via cargo install sccache
) and setting export RUSTC_WRAPPER=sccache
before starting jupyter, the compilation calls indeed are sent to sccache - but for some reason they can't be cached - observed via watch sccache --show-stats
.
I think the kernel restarting should not be a problem for sccache, since cargo clean
on normal projects still benefit from sccache, and also regarding normal projects, different projects (different name on different paths) also benefit from the caching of external libraries from other projects.
I also tried manually running cargo rustc -- -C prefer-dynamic --error-format json
on /tmp/.tmpza75ej/evcxr_meta_module
and also on other user_code_x
directories and they appear to use scchache correctly.
But somehow, when jupyter asks for it's execution, they fall as "Non-cacheable calls" on the sccache stats and thus are never cached. I don't know what is causing this behaviour.
Here's a rust-specific info from sccache: https://github.com/mozilla/sccache/blob/master/docs/Rust.md
If you'd like more info, please let me know!
I think compilation caching could be very welcome for the rust+jupyter use-case, since the initial compilation duration is quite apparent whenever a couple of crates are used.
Since the same target directory is being used for every cell from the same notebook, there is already some standard caching. But if evcxr were compatible with scchache, I think it'd be a boost for first-runs and also for the multi-notebook case.
mod hello;
^^^^^
file not found for module 'hello'
I used the "mod" keyword to import files, but it didn't work. How to solve this problem.
$ rust
Welcome to rust. For help, type :help
>>
Like with scalac
/scala
or clojurec
/clojure
.
In Cargo.toml, one can specify dependencies by path:
hello_utils = { path = "hello_utils" }
But this seems not working in repl.
:dep hello_utils = { path = "hello_utils" }
will cause an error.
Compared to a Python Notebook, the speed feels slow. Running :timing, each block execution even for simple code is 5 to 10 seconds, and extern crate is really slow.
I was hoping for something like notebook driven development like you can do in Python, but the speed doesn't seem to allow me to do so.
I'm curious if you have seen the Adapton project? It could be a way to help optimize a notebook.
Apologies if this isn't the right way to provide suggestions; I didn't see a mailing list or other community information.
The example given in the readme fails with the following error:
error[E0308]: mismatched types
--> src/lib.rs:21:60
|
21 | evcxr_variable_store.put_variable::<String>(stringify!(m), m);
| ^ expected struct `std::string::String`, found struct `user_code_0::Matrix`
|
= note: expected type `std::string::String`
found type `user_code_0::Matrix<{integer}>`
error[E0277]: the trait bound `user_code_0::Matrix<{integer}>: std::marker::Copy` is not satisfied
--> src/lib.rs:22:22
|
22 | evcxr_variable_store.assert_copy_type(m);
| ^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `user_code_0::Matrix<{integer}>`
error: aborting due to 2 previous errors
$ rustc --version
rustc 1.37.0-nightly (37d001e4d 2019-05-29)
Seem like you already detect when fields of structs are not pub, with the error message:
Items currently need to be explicitly made pub along with all fields of structs.
Could it be possible with syn to rewrite the AST and add pub
automatically ?
= note: libzmq-50f4a406b22aace0.rlib(zmq-50f4a406b22aace0.zmq.adwk1sko-cg
u.4.rcgu.o) : error LNK2019: unresolved external symbol __imp_zmq_msg_gets
referenced in function _ZN3zmq7message7Message4gets17h7fa806d7747a2351E
libzmq-50f4a406b22aace0.rlib(zmq-50f4a406b22aace0.zmq.adwk1sko-cg
u.0.rcgu.o) : error LNK2019: unresolved external symbol __imp_zmq_proxy_ste
erable referenced in function _ZN3zmq15proxy_steerable17h28199adb82db8604E
libzmq-50f4a406b22aace0.rlib(zmq-50f4a406b22aace0.zmq.adwk1sko-cg
u.0.rcgu.o) : error LNK2019: unresolved external symbol __imp_zmq_has refer
enced in function _ZN3zmq3has17h8a1799c5696eeb89E
C:\Documents\rust\evcxr\target\debug\deps\evcxr_jupyter-04a8e2112
da4bb74.exe : fatal error LNK1120: 3 unresolved externals
I'm on Windows 10, first tried to cargo install evcxr-jupyter
, got an error described here, then cloned the master branch and trying to build it.
I've installed ZeroMQ 4.0.4 via installer, renamed lib and dll files as recommended and added .dll dir to PATH.
As per this it seems like the install operation should choose to use $JUPYTER_CONFIG_DIR/kernels
where possible for installing the kernel.
Looks like there was a fix for dependencies in 38a9485
but I think Im still having trouble with top level :dep that have hyphens
:dep generic_array = { git = "https://github.com/fizyk20/generic-array"}
extern crate generic_array;
error: no matching package named `generic_array` found
Currently adding support for evcxr within emacs,
I wanted to request that a prompt is added in the repl.
>> || evcxr > || ~~
This will simplify the prompt-regex parsing in order to provide a more
full experience from within emacs.
Thanks!
It would be nice to support destructuring assignment, eg. unpacking a tuple. Currently, attempt to do it results in Unhandled pat kind
:
# use std::sync::mpsc::channel;
# let (tx, rx) = channel::<i32>();
Unhandled pat kind: Tuple(PatTuple { paren_token: Paren, front: [Ident(PatIdent { by_ref: None, mutability: None, ident: Ident(tx), subpat: None }), Comma, Ident(PatIdent { by_ref: None, mutability: None, ident: Ident(rx), subpat: None })], dot2_token: None, comma_token: None, back: [] })
error: failed to run custom build command for `zmq-sys v0.8.3`
Caused by:
process didn't exit successfully: `/tmp/cargo-installo751eq/release/build/zmq-sys-38aba20ccedde92d/build-script-build` (exit code: 101)
--- stderr
thread 'main' panicked at 'Unable to locate libzmq:
Failed to run `"pkg-config" "--libs" "--cflags" "libzmq >= 3.2"`: No such file or directory (os error 2)', /home/omar/.cargo/registry/src/github.com-1ecc6299db9ec823/zmq-sys-0.8.3/build.rs:31:17
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
warning: build failed, waiting for other jobs to finish...
error: failed to compile `evcxr_jupyter v0.3.4`, intermediate artifacts can be found at `/tmp/cargo-installo751eq`
However
libzmq3-dev it's already installed (4.3.1-4).
Any thoughts on this?
How can I run the jupyter kernel on nightly?
I tried installing it using a different channel, but it won't stick to the one I used.
Also tried downloading locally the repository and installing from there, no success either.
Hi.
It seems this particular overflow causes the repl to always generate wrong code on subsequent expression:
$ evcxr
Welcome to evcxr. For help, type :help
>> 10u8.pow(5)
thread '<unnamed>' panicked at 'attempt to multiply with overflow', /rustc/4560ea788cb760f0a34127156c78e2552949f734/src/libcore/num/mod.rs:3686:24
stack backtrace:
⋮
Child process terminated with status: exit code: 101
>> 1
A compilation error was found in code we generated.
Ideally this should't happen. Type :last_error_json to see details.
error: linking with `cc` failed: exit code: 1
⋮
Looks like it's been broken for at least 10 days, but I didn't have build failure notifications set up so didn't notice. Will be adding a notification to the Travis config.
Seems that the formatting of type errors has changed in rustc. Still assessing what needs to change to cover everything.
Is there any way to print the type of a variable/expression? I couldn't find it in the docs and it's commonly used in REPLs to learn about types of expressions.
Sorry if this has already been asked or assumed knowledge but when I include a :dep [crate] where does it actually go?
Great work btw.
With the following kernel:
Server Information:
You are using Jupyter notebook.
The version of the notebook server is: 5.7.0
The server is running on this version of Python:
Python 3.6.6 |Anaconda, Inc.| (default, Oct 9 2018, 12:34:16)
[GCC 7.3.0]
both in SoS and running bare, I cannot replicate the performance of optimized Rust code outside of the notebook. In particular, I've been running the following in a Jupyter cell:
:opt
:dep zip = "0.5.0"
#[derive(Debug, Clone, Copy)]
pub struct CompressionResult {
pub dt: f64,
pub MBps: f64,
pub shrink: f64
}
impl CompressionResult {
pub fn new(dt: f64, MBps: f64, shrink: f64) -> CompressionResult {
CompressionResult { dt, MBps, shrink }
}
pub fn from(dt: f64, old_size: u64, new_size: u64) -> CompressionResult {
let MBps = ((old_size as f64)/(1024.0*1024.0))/dt;
let shrink = (new_size as f64)/(old_size as f64);
CompressionResult {
dt: (dt*1000.).round()/1000.,
MBps: (MBps*100.).round()/100.,
shrink: (shrink*1000.).round()/1000.
}
}
}
let compression_source = "speed.log";
let compression_target = "speed-rust.zip";
pub fn compress_the_target(cs: &str, ct: &str) -> CompressionResult {
use std::*;
use std::io::Write;
let source_p = path::Path::new(cs);
let target_p = path::Path::new(ct);
if target_p.exists() { fs::remove_file(target_p); }
let data = fs::read(source_p).unwrap();
let t0 = time::Instant::now();
{
let target = fs::File::create(target_p).unwrap();
let mut zw = zip::ZipWriter::new(io::BufWriter::with_capacity(65536, target));
zw.start_file(
source_p.file_name().unwrap().to_str().unwrap(),
zip::write::FileOptions::default().compression_method(
zip::CompressionMethod::Deflated
)
);
zw.write(data.as_ref());
zw.finish();
}
let elapsed = {
let d = t0.elapsed();
(d.as_secs() as f64) + (d.subsec_nanos() as f64)/1e9
};
let old_size = fs::metadata(source_p).unwrap().len();
let new_size = fs::metadata(target_p).unwrap().len();
CompressionResult::from(elapsed, old_size, new_size)
}
println!("{:?}", compress_the_target(compression_source, compression_target));
and getting 20x worse results than the equivalent code run externally with cargo run --release
, and roughly equivalent to cargo run
.
It makes no difference whether or not I leave off :opt
.
(The file speed.log
can be any ~10 MB file that isn't just noise. Note also that the zip crate has mediocre performance even when optimized compared to e.g. zip
on the command-line, but the slowdown here is far more.)
Compiling backtrace-sys v0.1.26
....
Compiling backtrace v0.3.9
error[E0308]: mismatched types
--> .../.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.9/src/symbolize/libbacktrace.rs:154:60
|
154 | STATE = bt::backtrace_create_state(ptr::null(), 0, error_cb,
| ^^^^^^^^ expected enum libc::c_void
, found enum std::ffi::c_void
|
= note: expected type extern "C" fn(*mut libc::c_void, *const i8, i32)
found type extern "C" fn(*mut std::ffi::c_void, *const i8, i32) {symbolize::libbacktrace::error_cb}
Looks like depending on a old version of backtrace no longer compiles.
Fix coming soon...
>> :dep regex = "1.0"
>> let rx = regex::Regex::new(r"(\d+)=(\w+)").unwrap();
A compilation error was found in code we generated.
Ideally this should't happen. Type :last_error_json to see details.
error[E0603]: module `re_unicode` is private
--> src/lib.rs:14:37
|
14 | evcxr_variable_store.put_variable::<regex::re_unicode::Regex>(stringify!(rx), rx);
| ^^^^^^^^^^^^^^^^^^^^^^^^
Edit: the problem must come from regex::Regex
being a pub re-export of this type.
Generally a good practice.
It would be nice if the :dep
command would handle relative path dependencies. The problem is that cargo is not invoked in the same directory as evcxr
, thus a command like :dep foo = { path = "../foo" }
will fail.
Maybe also a support for paths starting with ~/
could be added.
I often want to sanity check some math or similar, and evcxr_repl works wonderfully for this for the most part (previously I had been using lldb/gdb for this which works about as well as you might imagine...).
Unfortunately, if doing bitwise math, I often want to see hex output. Doing so requires outputting something like format!("{:x}", <expression I want to check>);
each time, which is tedious.
Taking a look at the source, it seems somewhat tricky since you don't know the type in advance, but one (somewhat hacky) option would be something like allowing specifying a list of formatting options to try, which would be used here, or something. e.g. if I set :fmt ["{:x}", "{:?}"]
(or whatever), then the system would try {:x} followed by {:?} for things where evcxr_display doesn't apply.
That said, I'm flexible and willing to accept something that requires annotating things manually if the above solution is undesirable for some reason.
Test case to reproduce:
#[test]
fn variable_assignment_compile_fail_then_use_statement() {
let mut e = new_context();
assert!(e.eval(stringify!(let v = foo();)).is_err());
eval!(e, use std::collections::HashMap;);
assert_eq!(eval!(e, 42), text_plain("42"));
}
It seems that something is going wrong with the macros. Here is what I put in a single Jupyter cell:
#[macro_use]
extern crate serde_derive;
extern crate serde;
extern crate serde_json;
#[derive(Serialize, Deserialize, Debug)]
pub struct Point {
pub x: i32,
pub y: i32,
}
Output:
#[derive(Serialize, Deserialize, Debug)]
^^^^^^^^^^^
cannot find derive macro `Deserialize` in this scope
#[derive(Serialize, Deserialize, Debug)]
^^^^^^^^^
cannot find derive macro `Serialize` in this scope
Such a command would give an idea which version is currently in use, for example to check if version upgrade was successful.
Also evcxr_jupyter --version
would be helpful.
In the unlikely event that it already works on Mac OS, please let me know.
If you'd like to work on this, feel free to reach out with any questions. I'm not really sure what will be involved, since I don't know what the problems will be.
With the Rust Edition 2018 new keywords were added and the raw identifier syntax was added to allow using keywords as identifiers.
One of the new keywords is async
which is also used in real code, for example reqwest::async::Client
.
This small example
pub mod q {
pub mod r#async {
pub struct X;
}
}
let abc = q::r#async::X;
results in this error message:
expected identifier, found reserved keyword `async`
In the error json it can be seen that evcxr emits the path to the type X
but without using any raw identifiers thus the error message about the keyword.
evcxr_variable_store.put_variable::<q::async::X>(stringify!(abc), abc);
One solution might be to always use the raw identifiers when emitting types even if not strictly necessary.
{
"rendered": "error: expected identifier, found reserved keyword `async`\n --> src/lib.rs:93:40\n |\n93 | evcxr_variable_store.put_variable::<q::async::X>(stringify!(abc), abc);\n | ^^^^^ expected identifier, found reserved keyword\nhelp: you can escape reserved keywords to use them as identifiers\n |\n93 | evcxr_variable_store.put_variable::<q::r#async::X>(stringify!(abc), abc);\n | ^^^^^^^\n\n",
"children": [
{
"children": [],
"code": null,
"level": "help",
"message": "you can escape reserved keywords to use them as identifiers",
"rendered": null,
"spans": [
{
"byte_end": 3140,
"byte_start": 3135,
"column_end": 45,
"column_start": 40,
"expansion": null,
"file_name": "src/lib.rs",
"is_primary": true,
"label": null,
"line_end": 93,
"line_start": 93,
"suggested_replacement": "r#async",
"suggestion_applicability": "MaybeIncorrect",
"text": [
{
"highlight_end": 45,
"highlight_start": 40,
"text": "evcxr_variable_store.put_variable::<q::async::X>(stringify!(abc), abc);"
}
]
}
]
}
],
"code": null,
"level": "error",
"message": "expected identifier, found reserved keyword `async`",
"spans": [
{
"byte_end": 3140,
"byte_start": 3135,
"column_end": 45,
"column_start": 40,
"expansion": null,
"file_name": "src/lib.rs",
"is_primary": true,
"label": "expected identifier, found reserved keyword",
"line_end": 93,
"line_start": 93,
"suggested_replacement": null,
"suggestion_applicability": null,
"text": [
{
"highlight_end": 45,
"highlight_start": 40,
"text": "evcxr_variable_store.put_variable::<q::async::X>(stringify!(abc), abc);"
}
]
}
]
}
We should add external dependencies with the :dep keyword.
However, how can one run a local crate? I tried starting jupyter notebook from my crate directory, yet it wasn't able to find my crate.
As far as I can see, the actual code is run in a subprocess, so it could be killed and reinitialised when an interrupt_request
is received.
I'm having trouble loading a relative path dependency on Windows. The cell looks like this:
:dep num = "^0.2.0"
:dep num-complex = "^0.2.3"
:dep organic-snout = { path = ".." }
:dep plotters = { git = "https://github.com/38/plotters", default_features = false, features = ["evcxr"] }
And the output is:
Compilation failed, but no parsable errors were found. STDERR:
error: failed to parse manifest at `C:\Users\ANDREW~1\AppData\Local\Temp\.tmpxYNfAx\Cargo.toml`
Caused by:
could not parse input as TOML
Caused by:
invalid escape character in string: `C` at line 25
STDOUT:
I've verified that the organic-snout dependency is the one causing the problem. If I comment it out, the cell evaluates cleanly.
If I go and look at the Cargo.toml
that the error message refers to, it looks like this:
[package]
name = "ctx"
version = "1.0.0"
edition = "2018"
[lib]
crate-type = ["cdylib"]
[profile.dev]
opt-level = 2
debug = false
rpath = true
lto = false
debug-assertions = true
codegen-units = 16
panic = 'unwind'
incremental = true
overflow-checks = true
[dependencies]
num = "^0.2.0"
num-complex = "^0.2.3"
plotters = { git = "https://github.com/38/plotters", default_features = false, features = ["evcxr"] }
organic-snout = { path = "\\?\C:\Users\Andrew Watts\Projects\organic-snout" }
I'm not sure what that goofiness is at the beginning of the path, but clearly Cargo is confused by it, too.
I am on Debian Stretch (on a server) and running jupyterhub.
The kernel is detected and I can create rust notebooks, but the kernel won't start.
The debug log is not very helpful for me and I dont get the purpose of the random ports:
[D 2019-04-16 20:27:51.406 SingleUserNotebookApp manager:257] Starting kernel: ['/home/joshua/.cargo/bin/evcxr_jupyter', '--control_file', '/home/joshua/.local/share/jupyter/runtime/kernel-4efeab69-259f-4a47-b2e2-791c485dea1a.json']
[D 2019-04-16 20:27:51.420 SingleUserNotebookApp connect:542] Connecting to: tcp://127.0.0.1:38513
[D 2019-04-16 20:27:51.423 SingleUserNotebookApp connect:542] Connecting to: tcp://127.0.0.1:60423
[I 2019-04-16 20:27:51.426 SingleUserNotebookApp kernelmanager:164] Kernel started: 4efeab69-259f-4a47-b2e2-791c485dea1a
[D 2019-04-16 20:27:51.427 SingleUserNotebookApp kernelmanager:165] Kernel args: {'kernel_name': 'rust', 'cwd': '/home/joshua'}
Error: JustMessage("No such file or directory (os error 2)")
[D 2019-04-16 20:27:51.544 SingleUserNotebookApp zmqhandlers:300] Initializing websocket connection /user/joshua/api/kernels/4efeab69-259f-4a47-b2e2-791c485dea1a/channels
[D 2019-04-16 20:27:51.549 SingleUserNotebookApp handlers:141] Requesting kernel info from 4efeab69-259f-4a47-b2e2-791c485dea1a
[D 2019-04-16 20:27:51.550 SingleUserNotebookApp connect:542] Connecting to: tcp://127.0.0.1:60475
[I 2019-04-16 20:27:54.423 SingleUserNotebookApp restarter:110] KernelRestarter: restarting kernel (1/5), new random ports
[D 2019-04-16 20:27:54.425 SingleUserNotebookApp manager:257] Starting kernel: ['/home/joshua/.cargo/bin/evcxr_jupyter', '--control_file', '/home/joshua/.local/share/jupyter/runtime/kernel-4efeab69-259f-4a47-b2e2-791c485dea1a.json']
[D 2019-04-16 20:27:54.435 SingleUserNotebookApp connect:542] Connecting to: tcp://127.0.0.1:58567
Error: JustMessage("No such file or directory (os error 2)")
...
and the control file:
{
"key": "5ec08ec1-91b7d026239a28cf264b8a34",
"shell_port": 35521,
"hb_port": 39183,
"signature_scheme": "hmac-sha256",
"iopub_port": 52037,
"control_port": 57881,
"stdin_port": 49191,
"ip": "127.0.0.1",
"kernel_name": "rust",
"transport": "tcp"
}
When I run /home/joshua/.cargo/bin/evcxr_jupyter --control_file /home/joshua/.local/share/jupyter/runtime/kernel-4efeab69-259f-4a47-b2e2-791c485dea1a.json
manually I don't get the Error and evcxr_jupyter seems to be running fine:
TCP localhost:39183 (LISTEN)
TCP localhost:35521 (LISTEN)
TCP localhost:57881 (LISTEN)
TCP localhost:49191 (LISTEN)
TCP localhost:52037 (LISTEN)
What am I doing wrong? Is this a timing issue (evcxr_jupyter execs before control file exists)?
Thanks in advance!
Love your project and trying hard to get it working 👍
Example: prettytable-rs.
$ evcxr
Welcome to evcxr. For help, type :help
>> extern crate prettytable;
error: no matching package named `prettytable` found
>> extern crate prettytable_rs;
error: no matching package named `prettytable_rs` found
>> :dep prettytable-rs = "*"
(waiting)
can't find crate for `prettytable_rs`
>> extern crate prettytable;
error: no matching package named `prettytable` found
I tried to use the crate prettytable-rs
in evcxr_jupyter, however I cannot get it to work. I think the problem is that even though the crate name is prettytable-rs
, the library is only called prettytable
(you use extern crate prettytable;
).
Writing :dep prettytable-rs = "0.7"
prints
can't find crate for `prettytable_rs`
on the terminal. Trying extern crate prettytable;
results in the error
error: no matching package named `prettytable` found
being shown in the Jupyter notebook.
When I run
cargo install evcxr_repl
on my Mac running High Sierra version 10.13.6, the build fails with
error[E0046]: not all trait items implemented, missing: `description` --> /Users/alan/.cargo/registry/src/github.com-1ecc6299db9ec823/evcxr-0.1.2/src/errors.rs:314:1 | 314 | impl std::error::Error for Error {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `description` in implementation | = note: `description` from trait: `fn(&Self) -> &str` error: aborting due to previous error For more information about this error, try `rustc --explain E0046`. error: failed to compile `evcxr_repl v0.1.2`, intermediate artifacts can be found at `/var/folders/9t/_qss6y9544v29s4y30lkz5jr0000gn/T/cargo-install5FRvBt` Caused by: Could not compile `evcxr`. To learn more, run the command again with --verbose.
I am running
cargo 1.26.0-nightly (008c36908 2018-04-13)
One clue to the problem is that I am using the Failure crate, which has its own Error trait.
Hi,
The kernel doesn't seems to work with Jupyter Lab (0.34.12): I mean sometimes I have response for printlnl!("...");
but often no response.
I started to investigate (I open the ticket to inform about the issue, and my progress).
After reading jupyterlab/jupyterlab#470 I noticed some similarities. I try to add status: idle after every shell request, and that seems to fix the issue about println! and lot of kernel_info_request. But not with the support of evcxr_display. I plan to check the protocol 5.x implementation and to make PR asap.
PS: It's my first day with Jupyter Lab and the kernel / client api.
let mut a = String::new();
use std::io;
io::stdin().read_line(&mut a)
.expect("Failed to read line");
This code never finishes compilation.
Ideal behaviour: A text field must pop open for user input.
I love this project and it already works surprisingly well.
So far only :vars
is documented to be used in a Jupyter notebook. However, all the other special :
-commands also work and are quite useful. But :vars
is the only command shown in the Jupyter notebook, all the others only print to the terminal.
It would be great if the other commands would also show their output in the Jupyter notebook, e.g., to see the output of :help
.
When I start evcxr i get this error
Error renaming '"/tmp/.tmpv1xw2x/target/debug/deps/libctx.so"' to '"/tmp/.tmpv1xw2x/target/debug/deps/libcode_1.so"': No such file or directory (os error 2)
But it also happens after every expression put in the repl
In the unlikely event that it already works on Windows, please let me know.
If you'd like to work on this, feel free to reach out with any questions. I'm not really sure what will be involved, since I don't know what the problems will be.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.