This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-01-23
Channels
- # aatree (72)
- # aws (12)
- # beginners (34)
- # boot (256)
- # braid-chat (12)
- # cider (20)
- # clara (8)
- # cljs-dev (1)
- # cljsjs (1)
- # cljsrn (38)
- # clojure (61)
- # clojure-dev (10)
- # clojure-ireland (1)
- # clojure-japan (1)
- # clojure-sg (2)
- # clojurescript (48)
- # community-development (3)
- # conf-proposals (3)
- # core-async (6)
- # cursive (8)
- # datomic (4)
- # emacs (9)
- # hoplon (1)
- # leiningen (1)
- # mount (9)
- # off-topic (4)
- # om (109)
- # parinfer (26)
- # perun (4)
- # proton (5)
- # reagent (14)
- # vim (3)
All our new Boot-based stuff is in production, along with Clojure 1.8.0 (yay!). No more Leiningen in production!
A lot of our little shell script cron jobs have become /path/to/boot some-task
as well.
Well, technically cd /path/to/project; ./build/bin/boot some-task
😸
Yeah, that mostly helps when I’m developing FOSS projects on my little laptop while watching TV
We only have Macs for desktop (DEV) and Linux for servers at work.
We’re beginning to Dockerize a lot of our stuff so moving stuff out of Ant and into Boot tasks simplifies that process (since we don’t need anything but a JVM and our project in the image — with our Boot wrapper and the boot
script itself).
Glad to hear it, @seancorfield , and glad to find another windows user.
--I'm a bit bummed over today, but I'm thinking if I can't unit test, I can always write demos.
Ah, did I miss what has you bummed out?
Ah, a pain we haven’t felt yet. We abandoned our proof of concept cljs app early last year.
@laforge49: do you have access to something like virtualbox?
@micha my plan now is to focus on system tests via demos. Demos are important anyway. Also, I avoid linux except when there is someone around willing to give me a lot of help. I'm really pathetic at it despite having worked 2 years on solaris and another year on a unix box.
Looking at your counters demo. I'll copy it and add some logging. Just what I need. Starting by creating a demos repository under aatree, of course.
I'm already reaching my level of incompetence learning clojure and now clojurescript.
Right now I want to create enough value that folk will be willing to put up with my boneheadedness!
I also feel that catering to boneheads will open things up for a wider community. So I don't mind asking the dumb questions and then writing up my understanding.
Does sift :add-jar
accept a symbol and a regex only? not a set of regex like all the other utilities?
yes it is super cool, just wondering whether it accepts a regex only or multiple...
it looks like one only
would you be interested in a patch for multiple regex there?
or if there is another way to do it
well, I guess is the same as --include
for uber
it accepts a set
(boot (built-in/sift :add-jar {jar #"(?i).*\.(clj|cljs|cljc|js)$"}) (built-in/show "-f"))
this works, where jar
is a symbol
yes one yes, but no more
well ...... yes
yes true, because it is a compound option
one thing is, sift
has --include
already -> https://github.com/boot-clj/boot/blob/2.5.5/boot/core/src/boot/task/built_in.clj#L395
so if add-jar
accepted just the jar (symbol), and --include
is specified, it could process from there
what I mean is {jar regex}
<- looks redundant and --include
could be used
like uber
yes but is uglier 😄 then why not a task, but again it is a matter of taste I guess
just wanted to raise the issue, if you want I can open one and discuss there
and on the other end, if you plan to add more actions
this is a good starting point
and it make sense because sift is more like a util function
for example now I don't think you can combine add-jar
and add-meta
which is a bummer, it would be so handy (for me at least :))
What are some "go to" links to help me map from leiningen to boot? I've seen https://github.com/boot-clj/boot/wiki/Boot-for-Leiningen-Users
One starter question: I want to add tools.namespace as a dev dependency for REPL reloading
and am I correct in surmising that :scope "test" is based on how Maven handles dependencies? (e.g. https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html)
cool. without starting a huge thread about the horror of transitive dependencies, should I expect boot to inherit the usual Maven transitive dependency pains?
boot uses the same dependency mechanism as leiningen, which is the apache aether one wrapped in the clojure pomegranate library
and, thanks to some Hacker News reverse engineering, that power supply is both cute and packed with wise innards
within a particular clojure app, there is always the risk of conflicting transitive versions
ok, what I mean one JVM that, say has a library needing ANTLR X and another needs ANTLR Y
I know about https://code.google.com/p/jarjar/
Re: "maven is probably the best thing around, because it's been through the war" PUN INTENDED!
(require '[boot.pod :as pod])
(def p1 (pod/make-pod (update-in (get-env) [:dependencies] conj '[antlr "1.0"])))
(def p2 (pod/make-pod (update-in (get-env) [:dependencies] conj '[antlr "2.0"])))
;; then use something antlr
(pod/with-eval-in p1
(import antlr.whatever)
(.foo antlrthing))
(pod/with-eval-in p2
...
the reason why i did the update-in there is because i may have maven configuration in the (get-env)
This helps. I'll still have to think a bit more about how this would play out in existing projects.
we will hopefully have a thing that lets you create a standalone application that uses pods
but as it is right now you would need to have boot be the entry point for the application that uses pods
because it's the java part of boot that sets everything up for pods to be able to exist
Ah. That relates to my question, which is about with-eval-in
above... does each sub-expression run in some kind of separate JVM? Or at least with a separate classloader? I don't know the details of pods.
And can each sub-expression communicate with the other one somehow? I'm not sure if they are different threads or what...
so a function in one clojure runtime doesn't even implement IFn in another clojure runtime
so the with-eval-in business is serializing expressions and results at the interface between the pods
java objects can pass between pods as long as the classloader the objects are from is visible to both pods
but with-eval-in doesn't expose that, it prints the expression to a java string, which is then passed to the pod
for those who are interested in trying it out: https://github.com/boot-clj/boot/wiki/inf-clojure-REPL
there any books that explain boot/java maven/pom/environment stuff for people just getting into this?
i'm finding i can use lein templates and hack on a project but i have no idea what's going on underneath, and i like boot a lot more cause i can get CIDER to work with it and seems way faster to start
cool will look into those, also this seems immensely useful and what i was looking for: https://lionfacelemonface.wordpress.com/2015/01/17/boot-getting-started-with-clojure-in-10-minutes/
many people like this as a resource: https://github.com/magomimmo/modern-cljs/tree/master/doc/second-edition
hehe - i've been using it a lil bit with a tenzing generated app, but i find that as i want to do more with it i kind of need to back up and start grokking it from the ground up
application templates are immensely useful to get started and i would almost not use boot over lein templates, but certain things seem difficult with lein as well and boot-cljs seems superior to figwheel for me
i liked tenzing but found out the hard way that every dependency it downloaded was outdated
Oh, nice; I knew of https://github.com/martinklepsch/boot-deps but didn't know something like that was already included in built-ins.
@jethroksy: you can use boot show -U
if you want to see snapshots
I'm using only a slightly modified counters demo: https://github.com/aatree/aademos/tree/master/counters
java.io.IOException: Couldn't delete C:\Users\Bill\.boot\cache\tmp\Users\Bill\Documents\aatree\aademos\counters\fgc\mm3x96\index.html.out\goog\labs\useragent\browser.js http://clojure.java.io/delete-file/invokeStatic io.clj: 434 http://clojure.java.io/delete-file io.clj: 430 ... boot.file/delete-file file.clj: 54 boot.tmpdir.TmpFileSet/commit! tmpdir.clj: 236 boot.core/commit! core.clj: 383 boot.task.built-in/fn/fn/fn/fn/fn/fn built_in.clj: 264 boot.task.built-in/fn/fn/fn/fn/fn built_in.clj: 264 boot.task.built-in/fn/fn/fn/fn built_in.clj: 261 boot.core/run-tasks core.clj: 794 boot.core/boot/fn core.clj: 804 clojure.core/binding-conveyor-fn/fn core.clj: 1938 ... java.io.IOException: Couldn't delete C:\Users\Bill\.boot\cache\tmp\Users\Bill\Documents\aatree\aademos\counters\fgc\mm3x96\index.html.out\goog\iter\iter.js http://clojure.java.io/delete-file/invokeStatic io.clj: 434 etc
So it may be having the cljc file on windows, or perhaps just having the cljc file.
I'm moving the cljc file out of the demo. But first I will create a branch for you that creates the error.
the idea was that it should throw an exception if the user writes to those files, because if you write to them you end up with a corrupted fileset
updating those temp files is moderately obscure thing to do. So unlikely that you need to worry too much about novices modifying them.
I think it just syncs the fileset into a given folder and the fileset remains in the temporary directories as it were, so it shouldn't.
this can make things a lot faster obviously, but if you write to a target file while boot is running you will corrupt the fileset
if you are going to be modifying those files while boot is running you can use the --no-link option to the target task
Ah, so it not only hard links between the temp directories, but with target as well. Good to know, for some reason I assumed the results are not hard linked.
the idea is that it can safely link to any of the tempfiles that will become unreachable when boot exists
Right, I just kind of assumed it was a performance optimisation for passing files between the tasks in the fileset and that the results are not optimised in such way, but that was just it - an assumption.
there are a lot of optimizations that are possible if you assume that something isn't going to be modified by the user
@micha I've created this branch for you to preserve the error I was getting on windows: https://github.com/aatree/aademos/tree/watch-delete-issue
I have a git repo in a subdirectory of /resources, and it's getting included in the (watch) task's files. What's the best way to ignore it?:
Starting file watcher (CTRL-C to quit)...
◉ :cp data/.git/objects/28/1e3ddc9b4ecfd2b756ee4709be8018f6b04ba5
◉ :cp data/.git/objects/c8/b9e5a1f12bdb776245f03827b7c19a4f13391e