This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-03-25
Channels
- # admin-announcements (1)
- # aws (1)
- # beginners (52)
- # boot (78)
- # cider (22)
- # cljs-dev (1)
- # cljsrn (6)
- # clojars (23)
- # clojure (51)
- # clojure-austin (2)
- # clojure-china (2)
- # clojure-dusseldorf (2)
- # clojure-russia (101)
- # clojure-sg (2)
- # clojure-uk (2)
- # clojurescript (53)
- # core-logic (14)
- # cursive (1)
- # editors (4)
- # hoplon (324)
- # jaunt (1)
- # juxt (4)
- # leiningen (2)
- # mount (17)
- # off-topic (4)
- # om (15)
- # onyx (15)
- # parinfer (4)
- # proton (5)
- # re-frame (26)
- # reagent (24)
- # ring-swagger (1)
- # slack-help (5)
- # spacemacs (2)
- # untangled (10)
how do you keep the process running in boot watch
? My code looks not good
(if alone (loop []
(Thread/sleep 400)
(recur))))
just migrated my first project from lein to boot. Noticed by projects based on Node.js might not be ready since boot-reload does not work for Node.js .
I’m thinking of trying to use boot to watch manage and mutate a set of services running from a github backed configuration (.edn file) that might include building docker images, creating new clusters of services and modifying/restarting existing services. I’m guessing creating tasks that wrap command-line tools and perhaps turn the results of commands (like docker inspect) into clj data structures might be useful. Anyone tried anything like this?
Like this one https://github.com/danielsz/boot-shell ? Or even deftask with sh
directly?
@mangr3n: that sounds like something clojure could definitely do and you could put boot in front as the interface. at adzerk we have lots of boot scripts for doing admin stuff
however for infrastructure admin/ops we lean on awscli, bash, and json-table
so i would say if what you imagine is more like a daemon, boot could be good. if you'll be running it a lot, the startup time will be a bummer
I think of modern applications as long running entities with replaceable parts, and the meta-system is an important part of the “system” if that makes sense. The watcher/manager is what I’m envisioning here. I’d like to be in immutable data structures with functional pipelines for that, externally, if I can describe an intention in data and the system rearranges to accommodate the intention… Eventually the system develops an immune system, and other types of analogous infrastructure in service of whatever the prime business function of the system is. One can see how metrics tools like graphite become part of the feedback loop. With all of that nascent in my mind, I’m looking for a flexible tool that can watch a resource and if I were to do a diff, turn the diff result into a command to trigger “recipes” that could be executed, and perhaps a check to validate, and lastly maybe an “undoing” function. Eventually it could watch metrics tools or data analytics tools and develop new “commands” from those inputs for scaling services, or other behaviors, but the way that boot thinks about the world feels like a powerful effective way to model this set of problems.
Thanks for your thoughts. @alandipert, do you have a link to json-table? I’m moving into docker on openstack, and I’d like to move up a level from bash, which is what I’m using now. I want to decompose my functionality into reusable parts. that I can recombine into new patterns. I also want to create templates for deploying N2-Nn of my application. I’d used pystache (mustache with python) to do the template instantiation work, but I’d prefer to use <something> + edn in clojure instead. Everywhere I can use clojure I find myself happier, because I’m feeding my ongoing functional/immutable mental renaissance.
to get data out of nested data structure land and into a tab delimited line oriented format that you can use with shell coreutils
i've tried (.getContextClassLoader (Thread/currentThread))
and also (clojure.lang.RT/baseLoader)
neither had my dependencies on the classpath though
Slightly more complex.. maybe I'm taking it too far though.
(defn find-the-class
[c]
(if (= java.lang.ClassLoader c)
c
(find-the-class (.getSuperclass c))))
(let [cl (.getContextClassLoader (Thread/currentThread)) #_(clojure.lang.RT/baseLoader) #_(first (pod/classloader-hierarchy))
cl-class (find-the-class (class cl))
cl-field (.getDeclaredField cl-class "classes")]
(.setAccessible cl-field true)
(println
(filter #(re-matches #".*hara.*" %)
(map str (vec (.get cl-field cl))))))
I'm trying to find something in datomic, because the free transactor isn't being published anymore as a lib, and I'm wondering if it's been merged into the core lib for distribution
I have added to build.boot
[com.github.bdesham/clj-plist "0.10.0"]
, which uses clj-time
. Now when I run boot repl
and try to require a namespace which uses clj-plist
, I'm getting clojure.lang.Compiler$CompilerException: java.lang.ClassNotFoundException: org.joda.time.YearMonth, compiling:(clj_time/core.clj:1:1)
I don't have clj-time
in build.boot
, I thought it should be picked up recursively, should it?
perhaps it's the wrong version though, so that particular class doesn't exist in the jar
clj-plist depends on joda-time 1.6, but buddy-sign depends on joda-time 2.8.2, right?
The dependencies management is such an easy task with Boot, actually, once the basics set in. Not that Boot can help when different projects require conflicting versions, but the boot show -[pd]
is so sweet.
And there's -u
to avoid hunting for updates. boot show
is now my favourite Boot command ever :)
Hi, I’m new to boot. I installed it through homebrew successfully. When I try running boot
, I’m getting this weird error back.
clojure.lang.ExceptionInfo: Unable to resolve symbol: in this context
data: {:file
"/var/folders/z_/ffgkd2vx1njf0bgs8vvngn600000gn/T/boot.user5783172942691039801.clj",
:line 0}
java.lang.RuntimeException: Unable to resolve symbol: in this context
...
boot.main/-main/fn main.clj: 192
boot.main/-main main.clj: 192
...
boot.App.runBoot App.java: 390
boot.App.main App.java: 467
...
Boot.main Boot.java: 258