This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-01-18
Channels
- # bangalore-clj (1)
- # beginners (60)
- # boot (98)
- # cider (8)
- # clojure (158)
- # clojure-dusseldorf (16)
- # clojure-france (3)
- # clojure-hamburg (2)
- # clojure-mke (2)
- # clojure-russia (11)
- # clojure-serbia (1)
- # clojure-spec (123)
- # clojure-uk (59)
- # clojurescript (44)
- # code-reviews (16)
- # community-development (51)
- # core-async (46)
- # cryogen (1)
- # cursive (9)
- # datascript (5)
- # datomic (36)
- # emacs (3)
- # events (12)
- # hoplon (57)
- # jobs (1)
- # juxt (3)
- # klipse (55)
- # lein-figwheel (3)
- # leiningen (5)
- # luminus (3)
- # off-topic (8)
- # om (75)
- # om-next (9)
- # onyx (17)
- # pedestal (7)
- # portland-or (3)
- # proton (36)
- # protorepl (6)
- # re-frame (3)
- # reagent (33)
- # remote-jobs (1)
- # ring (23)
- # ring-swagger (2)
- # rum (1)
- # specter (1)
- # untangled (36)
- # yada (11)
@cfleming just ran across http://lists.inf.ed.ac.uk/pipermail/mlj-users/2009/000082.html
guessing you never got it to build š
@alandipert No, I didnāt.
My SML knowledge was approximately nil at that point, so it might not be too hard - it involved updating the CM so that it will build with a more recent SML/NJ
However even if that happens it still doesnāt compile all of SML - no functors IIRC.
I investigated various other options - converting http://SML.NET to emit JVM bytecode rather than IR (probably a largish project) or writing a bytecode backend for Hamlet (probably a big project, and you end up with no interop).
Depends what you want it for - if you want JVM I assume you want interop, and there arenāt many good answers there.
i still like it, i just continue to hobby around
@alandipert BTW http://www.ocamljava.org/ in case you havenāt seen it.
interesting, tho i've yet to get into ocaml
Wow Alan, there is a boot-yeti task? Nice š
Yeti looks very nice actually, and there is also a js transpiler
noob boot question please: When using boot to make an uberjar, is there an equivalent to the leiningen option of :omit-source true
?
@limist you can use sift
or just make sure your sources are not in resource-paths
@martinklepsch Thanks, know any examples of this use-case (excluding all *.clj sources from the jar) please? And currently, my :resource-paths
only has the project's resources
dir.
@limist are you using bootlaces?
@martinklepsch Yes, got it require'd, but not currently using its build-jar
@limist a call to bootlaces as well I guess?
@limist since you want an uberjar I guess this is an āapplication projectā?
@martinklepsch One call to (bootlaces! +version+)
@limist do you need build-jar
?
(usually itās only useful for jars used by other maven-using projects)
So what happens is that build-jar
is meant for library code and automatically includes src
as resources since thatās where Clojure code is located in the (opinionated) bootlaces setup
if you only build uberjars from this project you may not need it at all can can just remove bootlaces/build-jar/etc
@martinklepsch Ah, by those criteria, I don't need build-jar
. Just want to keep a deployed jarfile as lean as possible.
So I suggest: try commenting out the call to bootlaces!
and check if thatās still covering all your needs. If yes remove it completely.
@martinklepsch OK, life without bootlaces!
is fine, š but is there a way to prevent the *.clj source files from being included in the final jar? Not seeing much on the topic in the code, wiki, etc. Thanks again for the help.
@limist: use the sift task after you compile the cljs and before you build the uberjar.
is there a way for a deftask to collect all the args without explicitely declaring them?
The use case, I have task that is basically calling -main
and I would like to just pass all args to it
oh cool
(deftask run
"Run the -main function in some namespace with arguments"
[]
(comp (init-extractor)
(with-pass-thru _
(let [main-ns 'rest-resources-viz.extractor]
(require main-ns)
(if-let [f (ns-resolve main-ns '-main)]
(f *args*)
(throw (ex-info "No -main method found" {:main-ns main-ns})))))))
it is simple š
oh no wait
yeah, I am trying a couple of things, one thing I cannot do is to override -h
for instance
the problem is that deftask
does the parsing before calling the task
is there a way to skip parsing or I am hammering stuff in š
you mean skip the parsing?
umh it looks like...I am trying on my side too
here if I try -g
for instance, it complains: java.lang.IllegalArgumentException: Unknown option: "-g"
ok thanks let's see if I can make it happen, it is more for CI š
so I need cmd line unfortunately
yes no I mean, I cannot do it from the repl
boot extract -- -g
/ java.lang.IllegalArgumentException: No such task (-g)
what I mean is that I have to make it work from the cmd line..
no ok, does not work from the cmd line, it keeps parsing boot -- extract -g
Unknown option: "-g"
maybe a bash script calling the uberjar will be easier
No such task (-g)
wow magic š it works
boot [ extract -- -h ]
{:o {}, :a ("-h")}
(-h)
{:help true}
Dump resource data to disk.
Usage: program-name [options] action
Options:
-f, --family-xml FILE-PATH Dumps an xml with all the families defined
-g, --graph-edn FILE-PATH Dumps an edn containing the graph data
-p, --pretty Pretty prints the output
-h, --help Prints out the help
TIL, as usual from you Micha, thanks!
yep, and btw (f *args*)
is enough
(deftask extract
"Run the -main function in some namespace with arguments"
[]
(comp (init-extractor)
(with-pass-thru _
(let [main-ns 'rest-resources-viz.extractor]
(require main-ns)
(if-let [f (ns-resolve main-ns '-main)]
(f *args*)
(throw (ex-info "No -main method found" {:main-ns main-ns})))))))
boot [ extract -- -g data/graph-data2.edn -p ]
(-g data/graph-data2.edn -p)
{:graph-edn data/graph-data2.edn, :pretty true}
awesome
sorry for not mentioning my project, I've open-sourced it just to resolve these issues, the address is https://github.com/ViniciusAtaide/presidios-pb/
I try running boot repl