joker

Discuss all things joker, the Clojure interpreter/linter on top of Go. https://github.com/candid82/joker
dxlr8r 2020-02-18T11:16:20.009Z

new to joker, wonder how entry points works.

(ns k3os.foo)

(defn -main [](println "entry point?"))
(defn main- [](println "entry point?"))
(defn main  [](println "entry point?"))
And when I run it: $ joker foo.joke I get no output

gleisonsilva 2020-02-18T14:03:55.011Z

I think you'll be better off just calling (println "...") on the bottom of your script... What I've done a lot is using joker.tools.cli to parse the arguments and then calling the right function...

👍 1
gleisonsilva 2020-02-18T14:05:01.012600Z

Hey guys! I'm trying to find a practical way to parse some XML files using Joker inside a script that I already have... Some ideas?

dxlr8r 2020-02-18T14:07:37.014100Z

calling main from the script leads to issues with unit testing etc.

dxlr8r 2020-02-18T14:12:09.014600Z

for now that seems to be an option. But ideally, joker should use the clojure standard of -main IMHO

👍 1
dxlr8r 2020-02-18T14:13:11.015200Z

I'll do that

👍 1
gleisonsilva 2020-02-18T14:30:54.017400Z

Joker has an implementation of xml-seq... all references that I found for this fn use it with clojure.data.xml or clojure.xml where there is a parse fn... but has Joker a function like that? If not, how should this fn xml-seq be used?