Skip to content

KelvinJin/iSwift

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Update 2018-01-29

I had to shut down the Demo server because someone is using it to mine bitcoins. (by default, jupyter will allow anyone to create a terminal and there's no way to disable it easily.) If anyone is interested in setting it up locally, I'm glad to help.

iSwift

Build Status

iSwift is the kernel IPython/Notebook implementation for Swift programming language.

It can:

  • Execute swift code on the Jupyter Notebook web editor, Jupyter console as well as Jupyter qtconsole.
  • Import Foundatation/Dispatch and other Buildin libraries.
  • Autocomplete swift code by pressing tab ↹.
  • Support encryption.
  • Support Linux/macOS

Demo

Imgur

Requirements

  • macOS/Linux
  • Swift 3.0
  • ZMQ  + Jupyter 5.0

macOS Installation

Clone this repo locally. And:

  1. Follow this script to install the libzmq on your machine.

  2. Build the project.

swift build
  1. Currently, in order to run swift kernel locally, you need to create a file named kernel.json. Put the following content to the file and replace the Path/to/iSwift with your local clone path.
{
 "argv": ["Path/to/iSwift/.build/debug/iSwift", "-f", "{connection_file}"],
 "display_name": "Swift",
 "language": "swift"
}
  1. Install Jupyter kernel: (replace the Folder/that/has/kernel/json with the path of the folder that contains the kernel.json file)
jupyter-kernelspec install Folder/that/has/kernel.json
  1. Run Jupyter Notebook (token needs to be empty):
jupyter notebook --NotebookApp.token=

Linux Installation

  1. Install Swift 3.0.
  2. Check if you have libzmq installed.
  3. Continue from step 2 in the section above.

Docker Installation

Simply clone this repo and run docker build -t iswift .. It will build the docker image.

Author

Jin Wang

Contribution

Contributions are welcome. Simply create an issue if you have ideas on how we can improve iSwift.

License

MIT

About

A Swift kernel for IPython.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published