This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-11-16
Channels
- # admin-announcements (9)
- # beginners (112)
- # boot (223)
- # cbus (10)
- # cider (19)
- # clara (2)
- # cljs-dev (81)
- # cljsjs (3)
- # cljsrn (45)
- # clojure (239)
- # clojure-conj (12)
- # clojure-poland (2)
- # clojure-russia (56)
- # clojure-taiwan (1)
- # clojurescript (57)
- # cursive (28)
- # datomic (5)
- # events (14)
- # immutant (1)
- # jobs (1)
- # ldnclj (8)
- # off-topic (28)
- # om (80)
- # onyx (121)
- # re-frame (10)
- # sneer-br (1)
- # spacemacs (40)
- # yada (44)
how can i require stuff in my repl by default?
i saw there is a boot.repl/*default-middleware*
, but not sure how to write one...
i guess is just have to check its source
i just want to require a bunch of defaults to my repl so i can interact with my api from the command line. is it not the recommended way to start a repl or why i can't find examples about it?
@onetom: maybe the --eval option of repl?
in your profile you could do task-options and require a bunch of stuff
@alandipert: that worked... almost... but it seems to run in a separate pod as the http server and that is the pod which have the reference to our in-memory datomic db
or you could make a namespace that is all set up the way you want it and then use the --init-ns option of the repl task to start your repl in that namespace
in the 2nd case probably the whole localhost:4334/some-db-name
becomes the name itself
hm... we were using boot-http until now. im not sure what that web task is for, but thx for the pointer
the web task creates web.xml files, which are used to deploy applications in servlet containers
i.e. if it works in boot-jetty in dev it'll work if you make a war file and upload to beanstalk etc
-n, --nrepl REPL Set nREPL server parameters e.g. "{:port 3001, :bind "0.0.0.0"}" to REPL.
i was also wondering if it would make sense to pass pods as parameters to boot tasks, so u can wire different pods together within boot where all of them could sit in the same lexical scope... 😕
you can refer to them by name now, in 2.5.0, and get a reference by calling afunction with the name as an argument
so instead of starting a repl within any pod, the repl would start itself within the pod u give it as a parameter
i'm not sure about passing actual references to pod objects around, because it could interfere with garbage collection
ok, i just saw thats how boot-http hooked in the cleanup code for its pod https://github.com/pandeiro/boot-http/blob/dce8fa0f63802155a8793e93de0d259d39e96dff/src/pandeiro/boot_http.clj#L70
i guess you'd still need to get a reference to the pod anyway, before you could pass it to a task, so you'd have to look it up by name in the pod registry
https://en.wikipedia.org/wiki/Mati_Klarwein -- @ayaz helped to find it w google image search
> During the 1980s and 1990s, Klarwein would occasionally search for cheap paintings at flea markets and "improve" them, painting over them or adding things at his whim. Klarwein made over a hundred of these "improved paintings" throughout his career.
bill gates should do something like that, buy priceless works of art and "improve" them
Still don't think he could touch this one: https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcTVfRCqH83UBDxqfl1lVvIVqxfSyMnjCBgpiYVqKWXzP4zf-06q40XetD0G
How do I get back in the cljs-repl after I killed it? When I just do boot repl --client
(start-repl)
again, it hangs waiting for a client connection.
@mbertheau: is your browser tab still open?
you might need to reload it
I reloaded it, the browser says Opened Websocket REPL connection, (start-repl)
is still waiting.
I interrupt (start-repl)
with Ctrl-C, (start-repl)
again, and it's still waiting for a client connection.
Only thing that works is killing the tab, the repl and the boot dev server, and starting them up again.
let me see if this happens for me as well
works for me: 1. boot repl —client 2. (start-repl)
3. reload page 4. eval stuff 5. :cljs/quit
6. (start-repl)
7. reload page 8. eval stuff
In the boot dev
terminal there's ERROR - increase :queue-size if this happens often
strange I got that error too but just ignored it and things worked fine
@mbertheau: if you can provide a reproduction case please open an issue in the boot-cljs-repl repo
@martinklepsch: I was back at the clojure prompt after this error.
Hi. If I have project P1 and lib L1, where lib might be useful in much more than one project, I'd deploy one to Clojars (via bootlace commands). But, if I'm producing new versions of it in parallel with development of P1, can I make some "development dependancy" (i.e. not to re-push and re-install L1 each time I change it)?
@andrewboltachev: boot checkout -h
ah, exactly what I needed. Nice how my thoughts and needs fit with yours guys 👍
btw, does this README say that I should actually fork bootlaces in order to use it? https://github.com/adzerk-oss/bootlaces#bootlaces
ah. so probably I want this also
i.e. my project will be divided into many libraries, even (likely three) layers of them
aha. but in order to use forked repo, one must deploy it also with bootlaces, or?
recursion detected then!
but if the bootlaces configuration conventions work for you you might just use that for a while
ok. anyway deployments are about practice
good. btw, is there an explicit format for version numbers? or a convention?
though they're rather "version strings"
ah, and e.g. 2.1.4-alpha10 is prior to 2.1.4
2.1.4 is release
@andrewboltachev: http://stackoverflow.com/questions/13004443/how-does-maven-sort-version-numbers
@andrewboltachev: if you feel like adding some notes to a page on the boot wiki with info that would have helped you get going that would be greatly appreciated
aha, got it
it can be sth like "start my own series of developments"
i.e. few projects and libs
with boot tools
btw, trying to run boot w/o arguments
always produces an error: http://dpaste.com/2DFZJNY
@andrewboltachev: can you delete ~/.boot/cache/boot.properties
and try again?
yep, the same
and it acually refused working
after I renamed boot2 to boot
(and boot to boot1)
all works, thanks!
and, may be add this or the like to FAQ?
(if there is one)
btw, just realized I would need some of my stuff to be avaliable to Java guys LOL 😄
and would Clojars work then?
but, each Java guy I ask says that "IDE does every single thing for me, so I dunno what happens behind the scenes"
@andrewboltachev: afaik clojars is just a maven repo with some clojure focused web ui so when your people add clojars as a repo it would probably work
good, thanks!
hi. i’m trying to tweak cljs options a bit a change default location where generated js should be placed. is something like this
(task-options! cljs {:compiler-options {:output-to "js/entry.js"} :optimizations :none})
correct? seems it does not really work...@michal: may be :cljs ?
@andrewboltachev: you mean
(task-options! :cljs …. )
? it produces ClassCastException as task-options!
expects Symbol instead of Keywordoh true, with task-options! 1st arg is name of the task which is symbol
@michal: btw, do you have many places in your code (I guess in build.boot
) where cljs
is used?
you can probably solve it like replacing bare (cljs)
with (cljs :output-to "..." :optimizations :none)
@michal: to change output location it’s best to move cljs.edn files (see multiple builds section in readme)
@michal: and and yep... :optimizations
should be sibling of :compiler-options
, not child of it
See there: https://github.com/adzerk-oss/boot-cljs/blob/master/src/adzerk/boot_cljs.clj#L186
> The --compiler-options option can be used to set any other options <...>
No, :output-to
doesn't work. It is always set by boot-cljs.
btw, are tasks like checkout and watch re-run their "tail" when they are triggered?
i.e. when they do detect a change?
I was trying to reinstall boot on OS X, and I’m running into a strange problem. After I install boot from the github instructions, I try to run boot -h
and I get
Downloading in thread "main" java.io.FileNotFoundException:
why would it be trying to download such an old jar version when I’m installing boot 2.4.2?
@adamfrey: Check if you have old boot.properties file at ~/.boot/boot.properties
or ~/.boot/cache/boot.properties
This should probably be pinned somewhere until 2.5.0 is released
someone said FAQ earlier. Probably worth adding to README/wiki
My checkout
does successfully re-run the next task (which is dev
and it just outputs the string from the module), when the module-of-interest-which-is-in-development is changed (when I save a file there), but it doesn't seem to be reloaded then. How can I fix that?
Playing with all the checkout
stuff finally got this: http://dpaste.com/3KTK20Z 😛
you are on java 9?
➜ regexpforobj git:(master) ✗ java -version
java version "1.9.0-ea"
Java(TM) SE Runtime Environment (build 1.9.0-ea-b81)
Java HotSpot(TM) 64-Bit Server VM (build 1.9.0-ea-b81, mixed mode)
yep... I can't remember why I upgraded it
probably for no reason
btw, has boot became self-containing? https://github.com/boot-clj/boot-bin/blob/master/build.sh
i.e. the same way C compiler is written in C
Boot requires boot to build it
some parts can't be built by boot yet, because compiling a different version of a namespace that is already loaded is tricky
got it
@micha, btw, can you suggest on how to make checkout
work for me properly? Otherwise I'm about to start digging into boot's source (which might be cool btw) 😄
Well, that sounds a little awkward. I'll anyway try to learn boot's source, 'cause it should be very interesting (from any point of view)
@andrewboltachev: how are you setting up your checkouts?
hey guys,
anyone deploying to heroku?
Got some questions?
yeah im using exactly that package
the build portion is great and im super happy with it, plus the new docker container with boot is also great!!
but it seems that boot is to slow for Heroku and doesnt bind to the available port in time (1 minute max.)
oh, are you using boot to run the app? rather than an uberjar with a java -jar
command?
yeah I just started down the road of uberjar
yea, i definitely recommend that. also, have you checked that the port is configured right (in the app), and it's not actually trying to connect some default (like 3000)?
that's a pretty common mistake, and if it binds to 3000 or whatever instead of $PORT you'll get that error (R10)
yeah I have the port as a env var
micha: hello
flyboarder: worst case scenario, we (Heroku) can increase the boot timeout for you. but you have to open a support ticket and request it
i work at heroku
well i’d like to keep everything within the limits
i've been meaning to get a nice heroku based deploy setup worked out for hoplon, so this would be a good way to start
micha: ping me if you need any help
i’d like to make boot my single build tool across all my projects so I started on a docker and heroku wrapper tasks
the docker container is awesome but im having issues getting anything to run docker properly
@micha: yeah thats the one im using thanks for the work!! 😛
who do you guys have hosting your docker images? or is that just internal?
for deployment i mean
most of the docker things are deployed to beanstalk, where the images are built and then cached
yeah i’d like to get RancherOS running in S3 or azure
for container management http://rancher.com
i’v played around with the rancher container it’s pretty neat, the OS is the really cool part, docker as PID 1
@micha: http://www.slf4j.org/codes.html#StaticLoggerBinder this error started poping up the other day