My open source work is supported by the community
Special thanks to:Botpress is an open-source conversational assistant creation platform.
They welcome contributions from anyone, whether you're into machine learning,
want to get started in open-source, or just have an improvement idea.
Clarence is a dynamic, embeddable scripting-language. It's syntax are highly inspired by Clojure. However, it features aweful new modifications on it's vm. With Clarence, you're allowed to write code, that even writes code for you! The entire core (vm, parser, interpreter, bytecode) is pretty small. It was implemented using artesian ECMAscript 16 (JavaScript).
Clarence features a fast dynamic bytecode compilation. Similar to Just in Time compilations. You can use it for scientific computations, embeds of large projects and much much more... It's vm is written in Clarence itselfes so it got self-hosted. That's quite nice, cause while compilation, you are allowed to get some parallel compilations using macros!
clar-http | A server sample for Clarence
cclarence | A stable C to Clarence compiler WIP
clar-mongoDB | A mongoDB plugin for Clarence
clar-stdlib | The stdlib of Clarence WIP
Your's not there? File an Issue or a PR to add your project in clarence.
Sounds great? So take a look in the samples directory or get even an Installer for Clarence!
As already said, Clarence is implemented in JS so install it's module from NPM:
$ git clone https://github.com/clarence-lang/clarence.git
$ cd clarence
$ npm install clar
Done!
You can run your programs like this:
Note: this is an executed example using the samples\simple directory!
cd simple
node run <yourFile.clr>
# or do that:
node run hello.clr
Sample stylish clarence apps:
(ns web.server)
(def http (js/require "http"))
(defn handler [request]
{ :status 200
:headers { "Content-type" "text/html" }
:body "Hello, World!" })
(defn process [req res handler]
(let [response (handler req)
status (get response :status 200)
headers (get response :headers {"Content-type" "text/html"})
body (get response :body "")]
(.writeHead res (status (to-object headers)))
(.end res (body))))
(defn run [handler port]
(.listen (.createServer http ((fn [req res] (process req res handler)))) (port))
(println "Server listening at port " port))
(run handler 3000)
It's a simple webserver using a http module that is parsed to clarence. It will run on http://localhost:3000
Made by Timo Sarkar
Domo Arigato!
... And happy coding!