8000 GitHub - ToucheSir/koka at 0.6.0-dev
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

ToucheSir/koka

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

97 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Koka: a function-oriented language with effect inference

To build Koka from source you need to install:

After installing the above tools, go to the Koka directory and type:

> npm install

which will install any prerequisites. Now build and run Koka by typing:

> jake 

To see more build options, type:

> jake help

Starting out

After running jake, the Koka interpreter will start: __ _ | | | | | | __ ___ | | __ __ _ | |/ // _ | |/ // ` | welcome to the koka interpreter | <| () | <| (| | version 0.5.0-dev (debug), Apr 8 2013 ||_\/||_\,_| type :? for help

loading: std/core

Now you can test some expressions:

> println("hi koka")
hi koka

> :t "hi"
string

> :t println("hi")
console ()

Or load a demo:

> :l demo/collatz
compile: lib/demo/collatz.kk
check  : demo/collatz
modules:
  demo/collatz

> main()
Collatz(27) took 111 steps.

Or a browser based demo:

> :l demo/dom/starfield
loading: demo/dom/starfield
loading: sys/dom
loading: sys/dom/types
loading: sys/dom/document
loading: sys/dom/html/window
loading: sys/dom/html/htmlElement
loading: sys/dom/html/htmlCanvasElement
loading: sys/dom/html/canvasRenderingContext2d
loading: sys/dom/css/cssStyleDeclaration
loading: demo/dom/microsoftLogo
loading: sys/dom/html/htmlTableElement
loading: sys/dom/html/htmlTableRowElement
loading: sys/dom/html/htmlTableDataCellElement
modules:
  demo/dom/starfield

> main()

And quit the interpreter:

> :q

Before the effect one believes in different causes than one does after the effect.
 -- Friedrich Nietzsche

Have fun! Daan Leijen

Development

For development we recommend:

  • The TortoisHg distribution for mercurial source control.

  • The excellent SublimeText text editor. There is a full Koka and Haskell language mode for SublimeText (run jake sublime to install the Koka mode on your system).

About

Koka language compiler and interpreter

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Haskell 68.2%
  • C 15.0%
  • JavaScript 7.6%
  • C++ 2.2%
  • C# 1.8%
  • Swift 0.9%
  • Other 4.3%
0