icrystal

Version, currently 0.1.01 version
  • 0.1.0latestMay 13, 2020

github.com/RomainFranceschini/icrystal

Jupyter kernel for the Crystal language

37 stars
0 dependents
License: MIT

Installation

# Add this to your shard.yml
dependencies:
  icrystal:
    github: RomainFranceschini/icrystal
    version: ~> 0.1.0

Then run:

shards install

shard.yml

Crystal
0.34.0
License
MIT
Author
Romain Franceschini <franceschini.romain@gmail.com>
Target
  • icrystal from bin/icrystal.cr

Dependencies

Runtime Dependencies

  • icr*github: crystal-community/icr, branch: master
  • zeromq*github: crystal-community/zeromq-crystal, branch: master

README

# ICrystal

ICrystal is a Crystal kernel for [Jupyter project](https://jupyter.org/try).

It is basically a port from the [IRuby](https://github.com/SciRuby/iruby) kernel.

![icrystal](https://user-images.githubusercontent.com/470056/81830095-f25cd280-953b-11ea-9922-0f6477399cef.gif)

## Installation

Prerequisites

- The latest version of crystal.
- LLVM development files.
- [Jupyter](https://jupyter.org/)
- [ZeroMQ](https://zeromq.org/)

Clone the repository and switch current directory:

```
git clone https://github.com/RomainFranceschini/icrystal.git
cd icrystal
```

Install dependencies

```
shards install
```

Build icrystal

```
shards build
```

## Usage

To register the kernel (ensure jupyter is installed):

```
icrystal register
```

Now run jupyter and choose the ICrystal kernel as a backend for your notebook:

```
jupyter notebook
```

or

```
jupyter lab
```

## How it works

The code submitted to the kernel is compiled using parts of the [icr](https://github.com/crystal-community/icr) shard.

## Development

To run the jupyter kernel testing tool (Python 3.4 or greater required):

```
pip3 install jupyter_kernel_test
python3 test/test_kernel.py
```

## Roadmap

- [ ] Widget support
- [ ] Rich output (images, ...) support
- [ ] Add special commands
- [ ] Support adding/removing shards dependencies
- [ ] Write specs

## Contributing

1. Fork it (<https://github.com/RomainFranceschini/icrystal/fork>)
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request

## Contributors

- [Romain Franceschini](https://github.com/RomainFranceschini) - creator and maintainer

## License

Copyright (c) ICrystal contributors.

Licensed under the [MIT](LICENSE) license.