This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-06-15
Channels
- # admin-announcements (90)
- # beginners (36)
- # boot (169)
- # cider (18)
- # clojure (84)
- # clojure-australia (1)
- # clojure-brasil (20)
- # clojure-czech (2)
- # clojure-france (5)
- # clojure-germany (1)
- # clojure-india (8)
- # clojure-italy (39)
- # clojure-japan (14)
- # clojure-korea (2)
- # clojure-russia (9)
- # clojure-sg (1)
- # clojure-spain (16)
- # clojure-ukraine (1)
- # clojurebridge (20)
- # clojurescript (146)
- # code-reviews (48)
- # core-typed (1)
- # datomic (24)
- # editors (59)
- # euroclojure (6)
- # ldnclj (25)
- # off-topic (6)
- # onyx (3)
- # reagent (7)
@bsima: You can create a task to start a NodeJS REPL this way:
(deftask noderepl []
(comp
(cljs.repl/repl (cljs.repl.node/repl-env) :watch "src")))
I'm trying to add dependencies with an :extension
other than jar
. However, while the dependencies are downloaded properly, they are not made available on the classpath.
(set-env!
:repositories #(conj % ["rubygems-releases" ""])
:dependencies '[[org.clojure/clojure "1.7.0-RC1" :scope "provided"]
[boot/core "2.1.2" :scope "provided"]
[org.jruby/jruby-complete "1.7.20.1"]
[rubygems/ffi "1.9.8-java" :extension "gem"]
[rubygems/fpm "1.3.3" :extension "gem"]])
is
a Maven compatible Rubygems proxy?
@ragge: have you run across https://github.com/tobias/boot-jruby? might be helpful
sorr i didn't think to send it your way earlier. it uses https://github.com/tobias/clj.rb
@alandipert: ooh, cheers, will have a look at that
I can actually eval ruby perfectly fine, my current problem is just getting jruby to find the gems
iirc it has gem capabilities
Hi Guys, I had some issues getting the reloaded pattern from stuartsierra working
'(defn reset [] (let [reload-dirs (->> (or (try (require 'boot.core) ((resolve 'boot.core/get-env) :directories) (catch Exception _ nil)) (do (require 'clojure.tools.namespace.dir) ((resolve 'clojure.tools.namespace.dir/dirs-on-classpath)))) (remove #(.exists (io/file % ".no-reload"))))] (apply set-refresh-dirs reload-dirs)) (stop) (refresh :after 'user/go))'
This is te way I got it working but it feels very dirty...
Hmm I used the wrong words I mean that this took me way to long to figure out. I found it in an example repo after an hour. You did have some documentation about it, but it was hard to figure out how to actually use this in your user.clj
But I am pretty noob with boot so that might be the problem
I use trapperkeeper but that does kind of the same thing
it's going to be weird using things that mutate a stateful environment like they do i think
basically stop and start a system
Ok what would be a good
Oke so component and boot are not a very good fit?
because boot doesn't necessarily expose just a single mutable environment in which everything runs
Yes I get it
did you see this https://github.com/danielsz/system
Yeah that might be a much better fit
I want to drop trapperkeeper anyway it's starting to get on my nerves
No they built something themselves with some macro's
But it's the same idea
This is how you reference services
And this is how you define them
And you can use protocols with that services
But i have also used component and I liked that more
It feels easier
mitchelkuijpers: If you try out system and you have a problem or a question, please do not hesitate to contact me.
Thanx! It is kind of a big job, so I hope I get some time this week
Sure. there’s a tutorial that may be useful too. https://github.com/danielsz/holygrail
Looks like there is another boot plugin for component: https://github.com/IB5k/boot-component Not sure how mature it is.
boot-component is for components that you want to orchestrate yourself, boot-system is for ready-made components, as it relies on the system library, one step higher on the abstraction ladder.
danielsz: i’ve been following system since you first published it, but we had already gone with trapperkeeper. curious if you had looked at TK before you wrote system and if so what drove you to roll your own?
boot-system indeed does not rely on set-refresh-dirs, I don’t remember why, maybe because of the immutable set, I just didn’t explore this avenue. If you feel there is an advantage to using it, you are welcome to do a pull request.
@danielsz: not sure about it, I was just wondering if there was some subtle difference
ok, cool another batteries-incl. Component framework which uses Prismatic’s Graph to do dependencies, and comes with a config and nrepl services and all the goodies for dev vs prod vs test
jeluard: you can import your own components and namespaces, and use those when assembling a system. https://github.com/danielsz/system/blob/master/examples/boot/src/example/systems.clj
yes, but a previous incarnation, aka jig
malcolm was in flux with it when we were getting going, and then TK came along
Right the relative proximity of system
and https://github.com/juxt/modular actually prevented me from using both..
jeluard: I talked with malcolmsparks when I released system, we are aware of each other’s libraries
this repo demonstrates the workflow I’m referring to: https://github.com/danielsz/holygrail
@danielsz: Have you considered using modular
components for system
? Looks like it is their strong points while system
apparently provides higher level features.
@danielsz: does system deal with the issue you get with tools.namespace if you reset with code that fails to compile?
i have an emacs binding which will invoke user/reset in the repl. i’m pretty close to writing one that recompiles user and resets afterwards, as i break it all the time!
robert-stuttaford: Ha! I remember that. The good old times. That was solved since then, I think in component.
… i should update my deps
i have noticed that i don’t need to reset to use freshly recompiled defmethods now, too. is that new in 1.7?
but of course you can always have stale state, and I will occasionally reset the JVM, but not often
jeluard: modular components should be identical to system components. In reality they may diverge due to idiosyncrasies. But you can see that we’re dealing with the same beasts.
jeluard: Modular comprises :- a set of pre-written components a template system for creating new projects some optional utility libraries
No one has a problem with syncing the components across libraries. We could do that.
@danielsz: exactly that's why it's difficult for a user to choose between both. I'd rather use both that pick one but because of the overlap it's not obvious. Now I understand I can actually do that.
jeluard: yes! also compare the components. For example, http-kit is present in both. https://github.com/danielsz/system/blob/master/src/system/components/http_kit.clj
https://github.com/juxt/modular/blob/master/modules/http-kit/src/modular/http_kit.clj
@danielsz: I feel like if there was a single set of 'official' components and both projects building on them it would help with adoption.
I'm of the exact opposite opinion re sharing components, everyone has their own quirks, wants to expose different levels of integration with underlying library. I don't think it's valuable to try and standardise.
jeluard: I understand. But that is also the beauty of OSS. There’s room for many approaches.
ragge: I’ve posted the announcement on the Clojure mailing list, and it seemed like people have noticed. But any other idea would be very welcome. I did a video tutorial and a repo tutorial (holygrail).
the sys
param here https://github.com/danielsz/system#boot-system
ragge: yes, it’s a system var, as in https://github.com/danielsz/system/blob/master/examples/boot/src/example/systems.clj
was wondering how I could use that with a system that's parameterised, but I guess I can just do like in the example, have different system vars (with no params)
(defn make-system [config] ...)
(defn prod [] (make-system prod-config))
(defn dev [] (make-system dev-config))
the system var is the "official” system à la Stuart Sierra https://github.com/stuartsierra/component#systems
ragge: at the risk of saying something obvious, please note that when I assemble my components, we use an environment map instead of a hard-coded config.
For example, http port is read at runtime from the environment map .https://github.com/danielsz/system/blob/master/examples/boot/src/example/systems.clj
and how in build.boot we use this for maximum convenience: https://github.com/danielsz/system/blob/master/examples/boot/build.boot
@danielsz: yeah, I saw that. personally not a fan of using environment variables in that way for config... I know it goes against the 10 factor thing or whatever... I guess the nice thing is it's not forced upon me, so I can do what I want and people can ignore me
those who have previous experience with the environ library by James Reeves will recognize the pattern.
Should tools.nrepl
show up in the list of dependencies that’s printed? Or is that isolated through a pod?
current workflow: lein install; boot -d markdown-clj repl
😄