Live data from Hacker News

Run code inline in Atom using Jupyter kernels

github.com

51–56 of 56 posts

Re: Run code inline in Atom using Jupyter kernels

#51
post #48

Earlier quoted context omitted.

That is not even close. EDIT: I guess I should expand a bit on that answer. Take Oberon, which like Java has the misfortune of using the same name for the language and the respective OS. It was based on Niklaus Wirth experience on using the Xerox Star system with Mesa/Cedar environment. The original Native Oberon used as only executable format shared libraries. Depending on the OS variant, they were either fully AOT,…

> That is not even close. Stream processing should be equally mighty as list processing. What about system level access? Edit: > both CLI window and other GUI elements as programmable Sure, X sucks, but it supports that. X might be infamously complicated, but there's a security hole, either way.

Text stream processing is not as powerful as data structures and functional programming composition.

How do you in X protocol select an object that represents a table in a word document and add an extra column with the standard deviation of the other rows?

Just a possible example of the type of composition that was possible.

Re: Run code inline in Atom using Jupyter kernels

#52
post #37

Earlier quoted context omitted.

Same question, but s/running repl in an Emacs buffer/authoring in org-babel/ - I have a hard time seeing Jupyter and friends as anything other than a subset of what people have been using org-babel to do for years, and I'm not really sure whether that's an accurate perception or not.

Thank you for the babel reference, it looks interesting. From what I can tell, it's pretty similar. In a notebook I'm directly editing the code and seeing the results immediately, instead of switching back and forth between emacs and a browser window. That looks like a pretty big win for interactive development. Is there any babel feature that you think is missing in Jupyter?

Babel does the same thing; you just press Control-C twice while the cursor is in a code block, and it's evaluated and the results inserted immediately below the code block. (If there are already results there, they're replaced by default, but you can opt to have new ones appended instead.) It's no less interactive than Jupyter; it's just interactive in the paradigm of an Emacs buffer instead of a browser window.

A major feature Babel offers, which Jupyter doesn't seem to, is passing data among code blocks in different languages. Any language Babel supports [1] can receive results from any other in the receiving language's native idiom, so there's no need to marshal temporary files or what-have-you in order to exchange data among blocks - Babel takes care of that for you. In a case where multiple transformations are necessary to get from source data to results, this makes it very easy to express each in a language well suited to it, without having to spend a bunch of time and mental energy on menial file shuffling.

The same is true for most other representations of data that Org mode supports. In particular, Org tables, which themselves have many features of spreadsheets, can be sourced in code blocks in the same way as the results of other code blocks, and a code block can generate an Org table as a result. These tables can be imported and exported as CSV, too. My work is professional rather than academic, but I can imagine a lot of cases in which this capability would be useful in the latter context, and Jupyter doesn't seem to offer it. (It's hard to tell, because Jupyter's documentation seems pretty thin overall - not something which can be said of Org mode.)

On the whole, Jupyter looks like a pretty nifty tool, and one which would be accessible to people who don't already use Emacs. I'm not sure how I would feel about recommending Emacs to someone just for Org mode, although I've heard several people say they picked up Emacs for precisely that reason and have stuck with it. But, if you already use Emacs and don't have contextual reasons (such as everyone else around you using Jupyter) to choose one tool over another, I wouldn't hesitate to recommend investigating Org mode first, because it is very nearly a strict superset of Jupyter. (It'll be a few years before you can easily embed a video in an Emacs buffer; right now you'd need to use a pre-release version with some extra compile options.)

[1] http://orgmode.org/worg/org-contrib/babel/languages.html

Re: Run code inline in Atom using Jupyter kernels

#53
post #37

Earlier quoted context omitted.

Thank you for the babel reference, it looks interesting. From what I can tell, it's pretty similar. In a notebook I'm directly editing the code and seeing the results immediately, instead of switching back and forth between emacs and a browser window. That looks like a pretty big win for interactive development. Is there any babel feature that you think is missing in Jupyter?

Babel does the same thing; you just press Control-C twice while the cursor is in a code block, and it's evaluated and the results inserted immediately below the code block. (If there are already results there, they're replaced by default, but you can opt to have new ones appended instead.) It's no less interactive than Jupyter; it's just interactive in the paradigm of an Emacs buffer instead of a browser window. A ma…

That sounds really nice, thank you for taking the time to write all this. I do use Emacs for editing, and I miss all the features SLIME offered for Common Lisp. Unfortunately, I'm using Julia now, and while the language is really getting there, tooling support is minimal outside of Jupyter and Atom, so I wouldn't bet on Babel.

I should learn org-mode though. I've heard so much praise for it!

Re: Run code inline in Atom using Jupyter kernels

#54

What Jupyter Notebook is missing is a good text/code editor and what good text/code editors are missing is Jupyter Notebook like write and execute. This is the first example I've seen of the power that using Electron in Atom can give, and it makes me super exited!

Have you tried PyCharm with jupyter notebook?

No, I didn't know they worked together. I'll have a look!

Re: Run code inline in Atom using Jupyter kernels

#55
post #51

Earlier quoted context omitted.

> That is not even close. Stream processing should be equally mighty as list processing. What about system level access? Edit: > both CLI window and other GUI elements as programmable Sure, X sucks, but it supports that. X might be infamously complicated, but there's a security hole, either way.

Text stream processing is not as powerful as data structures and functional programming composition. How do you in X protocol select an object that represents a table in a word document and add an extra column with the standard deviation of the other rows? Just a possible example of the type of composition that was possible.

nowadays, theres possibly a related System-D feature ;)

Re: Run code inline in Atom using Jupyter kernels

#56
post #53

Earlier quoted context omitted.

Babel does the same thing; you just press Control-C twice while the cursor is in a code block, and it's evaluated and the results inserted immediately below the code block. (If there are already results there, they're replaced by default, but you can opt to have new ones appended instead.) It's no less interactive than Jupyter; it's just interactive in the paradigm of an Emacs buffer instead of a browser window. A ma…

That sounds really nice, thank you for taking the time to write all this. I do use Emacs for editing, and I miss all the features SLIME offered for Common Lisp. Unfortunately, I'm using Julia now, and while the language is really getting there, tooling support is minimal outside of Jupyter and Atom, so I wouldn't bet on Babel. I should learn org-mode though. I've heard so much praise for it!

I have been using Julia in emacs, primarily using ESS [1] and ob-julia [2] (org babel julia package). It is relatively well integrated with some basic auto-complete features and nice org-babel integration (as good as python or r).

[1] https://github.com/emacs-ess/ESS/wiki/Julia

[2] https://github.com/gjkerns/ob-julia

Post reply on HN