oK

From The K Language Wiki


oK

oK mobile logo
Developer John Earnest (beyondloom)
Released Jan 4, 2015

Dialects K6, K5
Temporal types none
Table support none
Prototypes yes

Implemented in JavaScript
Platforms Web, node.js
License MIT

Website Github
Documentation oK Manual
Run Online repl

oK (open K) is an open source implementation of the K5 (and later K6) dialect created by John Earnest. The main aim of oK is to be an easily accessible environment to learn and understand the fundamentals of K. oK was hence written as a learning oriented toy language with code simplicity in mind, and is not very suitable for use in bigger projects.

History[edit]

oK was released in January 2015.[1] It was one of the first open source K implementations alongside Kona (K3), which was released in 2014.

In early 2015[2], work had begun on the oK docs.

On 4th August 2015[3], interactive K environment (iKe) was introduced to oK. Alongside the existing interpreter, iKe was originally intended to be a Processing-like 2D drawing and animation tool.

On 16th October 2016[4], the initial prototype for the oK mobile UI was added.

Learning Resources[edit]

oK has comprehensive documentation on its primitives and syntax, which is now situated in its manual.

The oK repository also contains resources and learning materials for programming in K, a general rarity in K implementations.

The docs folder in the repository contains articles on programming in K, Trees, and the manual.

The examples folder in the repository contains many examples of simple programs in oK, some with line-by-line explanations.

Running[edit]

The main method of running ok is via the online repl.

oK.js can be used in HTML+JS websites as a tool to enhance the expressiveness of your code.

Another way to use oK is with the help of node.js. node repl.js will open a REPL in the terminal, similar to the browser based REPL.

oK has a package.json file for the npm registry, but it is not available from npm.

Interactive K Environment[edit]

iKe logo.

iKe is a toy frontend for oK which allows users to create graphical, event driven programs in K. Some notable features are:

  • mouse and keyboard support
  • iKe gists
  • gif recording functionality
  • Sound support
  • builtin color palettes and bitmaps
  • AJAX HTTP requests
  • image and vector imports

iKe is not built as an embeddable tool, but there are ways to use its source to draw on the HTML canvas using K.

oK Mobile[edit]

oK mobile interface

oK Mobile is a mobile-oriented interface for oK which allows display of graphs and plotting. oK mobile comes with an in-site keyboard which has convenient symbols and digraphs for quick use in the oK REPL.

References[edit]