Closed drandreaskrueger closed 7 years ago
I'm in the process of updating the way IJavascript handles asynchronous output. It looks like the beta version (ijavascript@5.0.11-beta.0) has broken that example. It should work with the previous version ijavascript@5.0.10.
IJavascript@5.0.10 handles asynchronous outputs by showing them in the last active cell.
IJavascript@5.0.11 wraps console.log
to ensure the asynchronous output is shown in the cell where the asynchronous code was executed. I haven't updated the documentation yet, but I described the new API here.
I don't test IJavascript regularly (or very thoroughly) on Windows. I rely on reports from users like yours. If I remember correctly, when I tested IJavascript on a Windows machine, I installed it locally. Could you check whether a local install works for you (npm install ijavascript
)?
I've fixed the issue with the above asynchronous example in nel@0.4.0-beta.3
. To pick up the latest changes, you can run:
npm update ijavascript nel
Could you check whether a local install works for you (npm install ijavascript)?
Done.
Yes, the installation itself seems to work:
> zmq@2.14.0 install D:\javascriptLearning\node_modules\zmq
> node-gyp rebuild
D:\javascriptLearning\node_modules\zmq>if not defined npm_config_node_gyp (node "C:\Roaming\npm\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
binding.cc
..\binding.cc(642): warning C4244: 'argument' : conversion from 'int64_t' to 'const int', possible loss of data [D:\javascriptLearning\node_modules\zmq\build\zmq.vcxproj]
..\binding.cc(643): warning C4244: 'argument' : conversion from 'int64_t' to 'int', possible loss of data [D:\javascriptLearning\node_modules\zmq\build\zmq.vcxproj]
..\binding.cc(644): warning C4244: 'argument' : conversion from 'int64_t' to 'const int', possible loss of data [D:\javascriptLearning\node_modules\zmq\build\zmq.vcxproj]
..\binding.cc(645): warning C4244: 'argument' : conversion from 'int64_t' to 'int', possible loss of data [D:\javascriptLearning\node_modules\zmq\build\zmq.vcxproj]
..\binding.cc(646): warning C4244: 'argument' : conversion from 'int64_t' to 'const int', possible loss of data [D:\javascriptLearning\node_modules\zmq\build\zmq.vcxproj]
..\binding.cc(647): warning C4244: 'argument' : conversion from 'int64_t' to 'int', possible loss of data [D:\javascriptLearning\node_modules\zmq\build\zmq.vcxproj]
..\binding.cc(648): warning C4244: 'argument' : conversion from 'int64_t' to 'const int', possible loss of data [D:\javascriptLearning\node_modules\zmq\build\zmq.vcxproj]
..\binding.cc(649): warning C4244: 'argument' : conversion from 'int64_t' to 'int', possible loss of data [D:\javascriptLearning\node_modules\zmq\build\zmq.vcxproj]
..\binding.cc(650): warning C4244: 'argument' : conversion from 'int64_t' to 'const int', possible loss of data [D:\javascriptLearning\node_modules\zmq\build\zmq.vcxproj]
..\binding.cc(651): warning C4244: 'argument' : conversion from 'int64_t' to 'int', possible loss of data [D:\javascriptLearning\node_modules\zmq\build\zmq.vcxproj]
..\binding.cc(665): warning C4244: 'argument' : conversion from 'int64_t' to 'const int', possible loss of data [D:\javascriptLearning\node_modules\zmq\build\zmq.vcxproj]
..\binding.cc(666): warning C4244: 'argument' : conversion from 'int64_t' to 'int', possible loss of data [D:\javascriptLearning\node_modules\zmq\build\zmq.vcxproj]
..\binding.cc(667): warning C4244: 'argument' : conversion from 'int64_t' to 'const int', possible loss of data [D:\javascriptLearning\node_modules\zmq\build\zmq.vcxproj]
..\binding.cc(668): warning C4244: 'argument' : conversion from 'int64_t' to 'int', possible loss of data [D:\javascriptLearning\node_modules\zmq\build\zmq.vcxproj]
..\binding.cc(669): warning C4244: 'argument' : conversion from 'int64_t' to 'const int', possible loss of data [D:\javascriptLearning\node_modules\zmq\build\zmq.vcxproj]
..\binding.cc(670): warning C4244: 'argument' : conversion from 'int64_t' to 'int', possible loss of data [D:\javascriptLearning\node_modules\zmq\build\zmq.vcxproj]
..\binding.cc(671): warning C4244: 'argument' : conversion from 'int64_t' to 'const int', possible loss of data [D:\javascriptLearning\node_modules\zmq\build\zmq.vcxproj]
..\binding.cc(672): warning C4244: 'argument' : conversion from 'int64_t' to 'int', possible loss of data [D:\javascriptLearning\node_modules\zmq\build\zmq.vcxproj]
..\binding.cc(673): warning C4244: 'argument' : conversion from 'int64_t' to 'const int', possible loss of data [D:\javascriptLearning\node_modules\zmq\build\zmq.vcxproj]
..\binding.cc(674): warning C4244: 'argument' : conversion from 'int64_t' to 'int', possible loss of data [D:\javascriptLearning\node_modules\zmq\build\zmq.vcxproj]
D:\javascriptlearning\node_modules\nan\nan_new.h(208): warning C4244: 'argument' : conversion from 'int64_t' to 'double', possible loss of data [D:\javascriptLearning\node_modules\zmq\build\zmq.vcxproj]
..\binding.cc(593) : see reference to function template instantiation 'v8::Local<v8::Number> Nan::New<v8::Number,T>(A0)' being compiled
with
[
T=int64_t
, A0=int64_t
]
..\binding.cc(647) : see reference to function template instantiation 'v8::Local<v8::Value> zmq::Socket::GetSockOpt<int64_t>(int)' being compiled
D:\javascriptlearning\node_modules\nan\nan_new.h(208): warning C4244: 'argument' : conversion from 'uint64_t' to 'double', possible loss of data [D:\javascriptLearning\node_modules\zmq\build\zmq.vcxproj]
..\binding.cc(593) : see reference to function template instantiation 'v8::Local<v8::Number> Nan::New<v8::Number,T>(A0)' being compiled
with
[
T=uint64_t
, A0=uint64_t
]
..\binding.cc(649) : see reference to function template instantiation 'v8::Local<v8::Value> zmq::Socket::GetSockOpt<uint64_t>(int)' being compiled
win_delay_load_hook.c
Creating library D:\javascriptLearning\node_modules\zmq\build\Release\zmq.lib and object D:\javascriptLearning\node_modules\zmq\build\Release\zmq.exp
Generating code
Finished generating code
zmq.vcxproj -> D:\javascriptLearning\node_modules\zmq\build\Release\\zmq.node
D:\javascriptLearning
├── d3@3.5.16
└─┬ ijavascript@5.0.11-beta.0
├─┬ jmp@0.4.0
│ └─┬ zmq@2.14.0
│ ├── bindings@1.2.1
│ └── nan@2.0.9
├── nel@0.4.0-beta.3
└── node-uuid@1.4.7
is in log.txt when I do this:
D:\javascriptLearning\ijavascript-testing>npm install ijavascript > log.txt
which prints to console this:
npm WARN enoent ENOENT: no such file or directory, open 'D:\javascriptLearning\package.json'
npm WARN javascriptLearning No description
npm WARN javascriptLearning No repository field.
npm WARN javascriptLearning No README data
npm WARN javascriptLearning No license field.
BUT then ijs
still does not work:
D:\javascriptLearning\ijavascript-testing>ijs
results in:
'ijs' is not recognized as an internal or external command,
operable program or batch file.
Hah. Found the way (local installation with npm install ijavascript
) :
D:\javascriptLearning\ijavascript-testing>..\node_modules\.bin\ijs
so I have to manually address the correct path
..\node_modules\.bin\ijs
then ijs gets executed:
[TerminalIPythonApp] WARNING | Subcommand `ipython notebook` is deprecated and will be removed in future versions.
[TerminalIPythonApp] WARNING | You likely want to use `jupyter notebook`... continue in 5 sec. Press Ctrl-C to quit now.
[I 05:29:27.289 NotebookApp] Serving notebooks from local directory: D:\javascriptLearning\ijavascript-testing
[I 05:29:27.289 NotebookApp] 0 active kernels
[I 05:29:27.289 NotebookApp] The Jupyter Notebook is running at: http://localhost:8888/
[I 05:29:27.290 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
npm update ijavascript nel
Great.
Yes, fixed:
undefined
1
2
3
4
5
Done!
Very nice. Thanks a lot!
:-)
I'm sorry to here there is still a problem executing ijs
. I will try to reproduce it in my Windows machine. Could you describe what method you used to install Node.js?
Oh thanks. That is kind.
1) uninstalled old nodejs (v4.2...) 2) installed https://nodejs.org/dist/v4.4.2/node-v4.4.2-x64.msi 3) npm --version && node --version 3.5.2 v4.4.2
After some initial problems ...
(ijs only works when I open cmd.exe as administrator; in contrast when I open cmd.exe as normal user and then type 'ijs' I am getting a
'ijs' is not recognized as an internal or external command, operable program or batch file.
)... I am totally excited about this great system you have created for us.
Kudos!
I am working through the tutorial, and all is going well.
BUT the one example not.
http://n-riesco.github.io/ijavascript/doc/async.ipynb.html
the result is only:
without any counting to 5.
This is my system:
P.S.: The $$async$$ snippets are working.