A starter leiningen project for Dunaj lite
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src/dunaj_starter
.gitignore
README.adoc
build.boot
epl-v10.html
project.clj

README.adoc

dunaj-lite-starter

A starter leiningen and boot project for Dunaj lite.

Requirements

  • Oracle JDK 8

  • Leiningen or Boot

  • Git

Usage

  1. Clone this repository with git clone https://github.com/dunaj-project/dunaj-lite-starter.git

  2. Run REPL with lein repl or boot repl

  3. In REPL, eval following to start working with Dunaj

    user=> (require 'dunaj.core)
    nil
    user=> (dunaj.core/dunaj!)
    #object[clojure.lang.Namespace 0xf273036 "dunaj.user"]
    dunaj.user=>

To use Dunaj lite in your sources, disable refering clojure.core vars and call dunaj.core/dunaj-api! macro.

(ns dunaj-starter.core
  "See http://lite.dunaj.org for documentation and examples."
  (:refer-clojure :only [])
  (:require [dunaj.core :refer [dunaj-api!]]))

(dunaj-api!)

(defn bar :- String
  [s :- String]
  (str (print "Hello %s!" s)))

(defn foo :- nil
  [s :- String]
  (println! (bar s))
  nil)

(foo "World")

See dunaj-starter/core.clj file for a bit more elaborate example. See Dunaj homepage for documentation and examples.

License

Copyright © 2013, 2015, Jozef Wagner.

The use and distribution terms for this software are covered by the [Eclipse Public License 1.0](http://opensource.org/licenses/eclipse-1.0.php) which can be found in the file epl-v10.html at the root of this distribution.

By using this software in any fashion, you are agreeing to be bound by the terms of this license.

You must not remove this notice, or any other, from this software.