hara.runtime.jep

*bus*

dynamic

*interpreters*

dynamic

+init+

+startup+

close-interpreter

added in 3.0

(close-interpreter itp)

closes the shared interpreter

eval-command-fn

added in 3.0

(eval-command-fn op)(eval-command-fn op key)

helper function to input command

eval-command-jep

added in 3.0

(eval-command-jep {:keys [id bus]} command)

inputs command input jep context

@(eval-command-jep +jep+ {:op :exec :body “a = 1”}) => nil

@(eval-command-jep +jep+ {:op :get :body “a”}) => 1

eval-exec-interpreter

added in 3.0

(eval-exec-interpreter itp string)

executes script on the interpreter

eval-exec-jep

(eval-exec-jep jep body)

eval-get-interpreter

added in 3.0

(eval-get-interpreter itp body)

gets a value from the interpreter

eval-get-jep

(eval-get-jep jep body)

invoke-ptr-jep

added in 4.0

(invoke-ptr-jep {:keys [lang], :as rt} ptr args)

invokes a pointer in the runtime

jep-bus

added in 3.0

(jep-bus)

gets or creates a runtime bus for thread isolation

jep-handler

added in 3.0

(jep-handler interpreter)

creates a loop handler from interpreter

(jep:temp-interpreter itp (let handler (jep-handler (atom itp)) (handler {:op :exec :body “a = 1”}) (handler {:op :get :body “a”}))) => 1

jep:temp-interpreter

macro

added in 3.0

(jep:temp-interpreter itp & body)

gets a value from the interpreter

kill-jep

added in 3.0

(kill-jep jep)

kills the jep runtime

make-interpreter

added in 3.0

(make-interpreter)

makes a shared interpreter

(jep/make-interpreter) => jep.SharedInterpreter

rt-jep

added in 3.0

(rt-jep)(rt-jep m)

creates and starts the runtime

rt-jep:create

added in 3.0

(rt-jep:create {:keys [id bus], :as m, :or {bus (jep-bus), id (f/sid)}})

creates a componentizable runtime

rt-jep?

added in 3.0

(rt-jep? obj)

checks that object is a jep runtime

start-jep

added in 3.0

(start-jep {:keys [id bus state interpreter], :as jep})

starts up the jep runtime

stop-jep

added in 3.0

(stop-jep {:keys [id bus state interpreter stop-fn], :as jep})

stops the jep runtime