This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-02-18
Channels
- # announcements (43)
- # aws (28)
- # babashka (32)
- # beginners (80)
- # calva (13)
- # chlorine-clover (2)
- # cider (11)
- # clj-kondo (15)
- # cljs-dev (1)
- # clojure (151)
- # clojure-dev (11)
- # clojure-europe (11)
- # clojure-italy (3)
- # clojure-losangeles (3)
- # clojure-nl (4)
- # clojure-spec (20)
- # clojure-uk (58)
- # clojured (3)
- # clojuredesign-podcast (2)
- # clojurescript (37)
- # core-async (4)
- # core-typed (1)
- # cursive (53)
- # datascript (5)
- # datomic (26)
- # duct (23)
- # emacs (3)
- # fulcro (22)
- # graalvm (1)
- # jobs (2)
- # joker (11)
- # juxt (24)
- # lumo (1)
- # mid-cities-meetup (2)
- # nyc (1)
- # off-topic (54)
- # parinfer (1)
- # reagent (13)
- # shadow-cljs (16)
- # sql (9)
- # tree-sitter (9)
- # vim (9)
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 outputI 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...
Yes, Joker, like most Lisps AFAIK, just executes code like a script. So if you want to invoke a main-style function you've defined... ...just do that:
user> (main)
...
Look into *main-file*
and *file*
then. E.g. compare them to determine whether running the script directly or within a unit test.
for now that seems to be an option. But ideally, joker should use the clojure standard of -main IMHO
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?
Yes, Joker, like most Lisps AFAIK, just executes code like a script. So if you want to invoke a main-style function you've defined... ...just do that:
user> (main)
...
Look into *main-file*
and *file*
then. E.g. compare them to determine whether running the script directly or within a unit test.
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?