Skip to content

Commit

Permalink
clarify that iolang is not yet suitable to be a dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
zephyrtronium committed Feb 27, 2020
1 parent 78d654f commit 905b23b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# iolang

[![stability-experimental](https://img.shields.io/badge/stability-experimental-orange.svg)](https://github.com/emersion/stability-badges#experimental) [![GoDoc](https://godoc.org/github.com/zephyrtronium/iolang?status.svg)](https://godoc.org/github.com/zephyrtronium/iolang) ![Tests](https://github.com/zephyrtronium/iolang/workflows/Tests/badge.svg)

This is a pure Go implementation of [Io](http://iolanguage.org/). Much of the hard work has been done, but hard work still remains.

To embed an iolang interpreter into a Go program, one would use the `NewVM()` function to get a `*VM`, use `SetSlot()` to make available any extras, then feed the VM code to evaluate with its `DoString()` and `DoReader()` methods. The VM also has methods like `NewNumber()`, `NewString()`, `NewObject()`, &c. to create primitives. The API is currently incomplete and may change.
To embed an iolang interpreter into a Go program, one would use the `NewVM()` function to get a `*VM`, use `SetSlot()` to make available any extras, then feed the VM code to evaluate with its `DoString()` and `DoReader()` methods. The VM also has methods like `NewNumber()`, `NewString()`, `NewObject()`, &c. to create primitives. The API is currently incomplete and will change.

The `cmd/io` directory contains a REPL as an example of embedding iolang.

Expand Down

0 comments on commit 905b23b

Please sign in to comment.