Total Pageviews

Thursday, 18 May 2023

Hydrogen is an interactive coding environment/ide

Run code interactively, inspect data, and plot. All the power of Jupyter kernels, inside your favorite text editor. hydrogen animated logo

CI

Hydrogen is an interactive coding environment that supports Python, R, JavaScript and other Jupyter kernels.

Checkout Medium blog post to see what you can do with Hydrogen.

Atom Sunset Notice

Atom is sunsetted. It is not possible to publish new packages anymore. If you have Atom working offline locally, it should continue to work, but the servers are down.

You can export ipynb from Hydrogen using this method and migrate to the following alternatives:

Contents

  1. Background
  2. Features
  3. Plugins for Hydrogen
  4. Useful external packages
  5. How it works
  6. Why "Hydrogen"?
  7. Contributing
  8. Changelog
  9. License

Background

Hydrogen was inspired by Bret Victor's ideas about the power of instantaneous feedback and the design of Light Table. Running code inline and in real time is a more natural way to develop. By bringing the interactive style of Light Table to the rock-solid usability of Atom, Hydrogen makes it easy to write code the way you want to.

You also may be interested in our latest project – nteract – a desktop application that wraps up the best of the web based Jupyter notebook.

Features

  • execute a line, selection, or block at a time
  • rich media support for plots, images, and video
  • watch expressions let you keep track of variables and re-run snippets after every change
  • completions from the running kernel, just like autocomplete in the Chrome dev tools
  • code can be inspected to show useful information provided by the running kernel
  • one kernel per language (so you can run snippets from several files, all in the same namespace)
  • interrupt or restart the kernel if anything goes wrong
  • use a custom kernel connection (for example to run code inside Docker), read more in the "Custom kernel connection (inside Docker)" section.

Plugins for Hydrogen

Hydrogen has support for plugins. Feel free to add your own to the list:

Useful external packages

Here is a list of external packages that could be useful when using Hydrogen (without using Hydrogen plugin API, as such they're mostly only related to the UIs):

If you find/create a package that you think can be useful when used in combination with Hydrogen, feel free to make a PR and add it.

How it works

Hydrogen implements the messaging protocol for Jupyter. Jupyter (formerly IPython) uses ZeroMQ to connect a client (like Hydrogen) to a running kernel (like IJulia or iTorch). The client sends code to be executed to the kernel, which runs it and sends back results.

Why "Hydrogen"?

Hydrogen atoms make up 90% of Jupiter by volume.

Plus, it was easy to make a logo.

from https://github.com/nteract/hydrogen 

-----------------------------------------------

Atom is sunsetted. It is not possible to publish new packages anymore. If you have Atom working offline locally, it should continue to work, but the servers are down.

You can export ipynb from Hydrogen using this method and migrate to the following alternatives:

You can directly download the code from here, copy it to ~/.atom/packages/hydrogen and run apm install at the root
https://github.com/nteract/hydrogen/archive/refs/tags/v2.16.5.zip

from https://github.com/nteract/hydrogen/releases

---------------------------------------------------------

Installation

Hydrogen requires Atom 1.20.0+ and kernels for the languages you intend to use Hydrogen with.

To install Hydrogen run apm install hydrogen or search for Hydrogen in the Install pane of the Atom settings.

If you are using Linux 32-bit follow the installation instructions here.

NOTE:

apm seems to have a bit of issue in the latest version 1.23.0-beta1. If you get an error that starts with:

fs.js:640
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^

Error: ENOENT: no such file or directory

we recommend you to install Hydrogen via console command: apm install hydrogen.

Kernels

Checkout nteract.io/kernels for instructions on how to install the most popular kernels.

Tested and works with:

But it should work with any kernel. If you are using Hydrogen with another kernel please add it to this list or post an issue if anything is broken!

Note that if you install a new kernel, you'll need to run Hydrogen: Update Kernels for Hydrogen to find it. For performance reasons, Hydrogen only looks for available kernels when it first starts.

Troubleshooting

We have a troubleshooting guide! It's pretty sparse at the moment, so please share with us the resolution to any rough spots that you find.

from https://github.com/nteract/hydrogen/blob/master/docs/Installation.md#installation 

--------------------------------------------------------------------------------------------------

Hydrogen: Interactive computing in Atom

Hydrogen is an open source package for GitHub’s Atom text editor that allows users to run their code with an interactive REPL session with your language of choice.

Hydrogen executing code in Atom

What does interactive coding mean?

Hydrogen lets you choose which code to execute based on your needs. Run the whole file, a single line, a selection, or let Hydrogen decide which code to run based on the current cursor position.

Furthermore, you can structure your code with cells like you would in a Jupyter Notebook.

The interactivity doesn’t stop there. We support various rich media types so your output will be rendered in the most beautiful way possible. Hydrogen can render images, SVGs, HTML, Markdown and even LaTeX.

Code completion and a inspector for displaying metadata, like documentation, are there to make your coding experience seamless. There’s no need to leave your favorite text editor to get the information you need to fuel your development process. Watch expressions are also included and provide instant feedback on your written code every time you hit execute.

And last, but definitely not least, we have the ability to execute code in a variety of languages such as Python, R, Julia, JavaScript and a lot more. You can even connect to remote kernels running inside Docker containers or on a remote server.

We want you!

Hydrogen is part of the nteract organization and we want your involvement. How can you become involved with the project?

  • Star the project on GitHub and share it with your social networks.
  • Download, use our releases, and be sure to report bugs!
  • Submit a pull request with a new feature or bug fix.
  • Present a talk on Hydrogen at a local Meetup or conference.

from https://blog.nteract.io/hydrogen-interactive-computing-in-atom-89d291bcc4dd

 

 

 

 

 

 

No comments:

Post a Comment