Hacker News new | past | comments | ask | show | jobs | submit login
Node.js Notebooks (github.com/donjayamanne)
179 points by iddan on Feb 20, 2022 | hide | past | favorite | 21 comments



I'm a huge fan of Don Jayamanne. He also made the original python extension for vscode.

I always wondered why no one made a better node.js repl. I wish there was something like ipython for nodejs.


This might not be exactly what you’re after, but it’s close.

https://observablehq.com/


There's a jupyter kernel for node, several of them actually. https://github.com/jupyter/jupyter/wiki/Jupyter-kernels This is probably the one you want to check out: https://github.com/n-riesco/ijavascript There's one built specifically for typescript evaluation too.



The official Python VSCode extension from Microsoft is itself a further development of that one (indeed, you can still see that it's a fork on GitHub: https://github.com/microsoft/vscode-python).


https://github.com/nteract/nteract has a somewhat Jupyter-like Node.js Kernel


To try out simple things I like to use https://runjs.app/


Pretty neat. But seems to lack Quokka (https://quokkajs.com/) ease of use at the moment.


After some light testing, this seems to work really well. I've had issues with other Javascript kernels for Jupyter and I personally don't care for the UX of Observable, so this is exciting.


Out of curiosity: what is it about Observable that you don’t care for?


Nothing huge, just don't personally care for evaluated output above the cell. Kinda breaks all the conventions of the command line, Jupyter, etc. Not that I couldn't get used to it, but originally Observable output below the cell but then switched in some update and I never really went back. Such a minor little pet peeve, I know.


I realise this is probably obvious to most people who're familiar with the author's work, but I was looking at the README trying to figure out if this is just a VS Code thing or not. It doesn't say (though it has screenshots of VS Code, nothing in the README says it's a VS Code extension). It does say it in the "about" section of the repo, which I rarely actually look at on Github.


What are some use cases you use this for or could use this for, for an average developer or generic things.


Something I've experimented a bit with in the past is having something like Storybook for API modules. Rather than jumping out to postman, you could just have your notebook that calls your API functions. So far the stumbling block is always ES Modules. Usually the client code uses them and Node always makes them a pain to deal with. Hopefully the situation will be better in another couple of years.


not sure myself, but could be useful to make some quick visualization of some database. often I just want to know some random stuff, so I'll use a SQL query, this looks like a neat way to do that, get some graphs too.


This looks very cool. Especially the ploty integration. As a frontend JS dev - I feel like I need a good walkthrough blog post to really understand how this works - the REPL/notebook concept is new to me but it's instantly attractive


Iodide was THE notebook format. I was very sad to hear the project was abandoned. :/


That's cool, it's what hedonjs tries to achieve, but much nicer.


Definitely going to test it!


what is this good for?


impressive




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: