This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-06-18
Channels
- # admin-announcements (10)
- # boot (260)
- # cider (44)
- # clojure (226)
- # clojure-berlin (24)
- # clojure-dev (68)
- # clojure-germany (5)
- # clojure-india (14)
- # clojure-italy (3)
- # clojure-japan (21)
- # clojure-poland (34)
- # clojure-russia (20)
- # clojure-spain (2)
- # clojure-uk (8)
- # clojurescript (86)
- # core-async (38)
- # core-typed (70)
- # datomic (41)
- # docs (8)
- # editors (7)
- # euroclojure (6)
- # instaparse (2)
- # jobs (8)
- # ldnclj (47)
- # om (17)
- # other-lisps (1)
- # reactive (1)
- # reading-clojure (8)
- # reagent (13)
- # sneer (1)
- # sneer-br (1)
@danielsz @juhoteperi would know better. I’m not sure myself. I assumed that is how you call function inside the pod
(let [metadata {:foo 100 :bar 200}]
(boot.pod/with-call-in p
(io.perun.ttr/calculate-ttr ~metadata)))
@danielsz: that calls the io.perun.ttr/calculate-ttr
function in the pod p
context, with the value of metadata
from the current context
I think it’s basically this right? https://github.com/brandonbloom/backtick @danielsz:
Is there any significant difference from creating tmp-dir outside of with-pre-wrap
vs inside it?
martinklepsch: Outside of with-pre-wrap it is created once (when the boot starts), inside it is run each time e.g. watch triggers build (though it is probably no-op if the dir exists already)
@juhoteperi: I don’t think it’s a no op given that tmp-dir should always give you a new dir no?
micha: You made boot’s pod api (`with-call-in` and with-eval-in
)rely on a templating library while it is possible to achieve the same in pure Clojure, isn’t it? Not criticizing, just asking myself if it wouldn’t be better.
the downside of course is that it causes surprise for those not familiar with the backtick library
In other words, POLA. https://en.wikipedia.org/wiki/Principle_of_least_astonishment
Instead of a template, I would have passed a fn var and regular arguments separately. Like in apply or something like that.
I’m reading this: http://www.brandonbloom.name/blog/2012/11/23/templating-clojures-backtick/
(let [x 100]
(pod/with-eval-in p
(require '[foo.bar.baz :as baz]
'[omg.hihi :as hihi])
(defn somefn [z]
(let [y (hihi/doit 100)]
(baz/print (+ ~x y z))))))
you can also generate clojure code by some other means and run it in the pod with boot.pod/eval-in*
eg (boot.pod/eval-in* p (cons '+ (list 1 2)))
i think he may have meant that you need to use source at all vs. suppling a function value to run in the pod
*supplying
because functions can close over environments, and the pod is a deliberately alien environment
alandipert: boot.pod/eval-in*
is the non-backtick reliant equivalent of with-eval-in
@danielsz: indeed
danielsz: it's kind of a neat little thing https://github.com/boot-clj/boot/blob/master/boot/pod/src/boot/pod.clj#L207-L221
you call the eval-in*
function in the current pod with 2 args, the remote pod and the expression
eval-in*
prints the expression as a string and calls the 1 arg arity of eval-in*
in the remote pod
like if i do the fpm thing and set it up on packagecloud, people can add it to their apt.sources or whatever right?
Is there a way to exclude resources from being included in output? I am trying to get my output to only have the new files I create as part of my build.
boot sift —help
There’s an :exclude
option that should help with that kind of stuff @thickey
@thickey: let me know if it didn’t help
@micha: i don't know the difference between ppa and apt repo
@micha: but i haven't seen the word ppa in their docs so i would assume not, i'm sure we can just ask julio tho
@thickey: btw welcome to the party man!
@martinklepsch: sift worked great
@alandipert: thanks, I’m having a blast!
welcome @jthomson
@martinklepsch made me get a t-shirt with that on it
haha, that’s not true is it?
picture or it didn’t happen 😄
nothing too fancy yet but has made for a nice stress-free dev and deployment experience
jthomson: documentation worked well for you then, since i haven't seen you in here before
yes I got through it and know what a pod is! I think I got stuck on executing user code from a boot task, and did have a little help from martin.
we were having a few issues with CI but they turned out to be due to dependency conflicts and nothing really boot related
@jthomson: you know boot show -p
?
@alandipert: I remember you were looking for testimonials once — @jthomson is your guy 😄
hehe yes - awesome!
Is there a vector version of the boot logo somewhere?
@podviaznikov: in case you’re curious: https://github.com/martinklepsch/martinklepsch.org/pull/2
@alandipert: I desperately need a new supply of boot stickers. My old laptop died and my new one seems so naked
@raywillig: oh damn i forgot to resupply you
those of you using boot2 with Java 7, how high are you finding you have to bump up PermGen to not blow it on a regular basis?
@cpmcdaniel: 128m was working OK for me regularly
does it consume quite a bit more when using using watch to fire off tests on each save?
or maybe, using the reloaded workflow
somehow I managed to blow it up often
@martinklepsch nice! is it still wip? can’t find build.boot
file
@podviaznikov: https://github.com/martinklepsch/martinklepsch.org/tree/boot-perun
@podviaznikov: still very much WIP though
nice, I like that it almost didn’t require original blog files. It was easy migration for my blog too
@podviaznikov: would you consider giving me push access to the repo? there are a few small things I stumble upon that are not really worth creating branches and PRs (for anything significant I’d still create PRs)
sure, I was actually thinking of asking you if you want it
send invitation
I invited @juhoteperi as well
cpmcdaniel: if you're creating pods in a watcher it's a million times better experience all around if you can use java 8
100 commits @podviaznikov
nice, that is a lot for 1 moth old project:)
Github is quite bad at notifying about invites 😄
@podviaznikov: btw, do you own http://perun.io?
yes, I do. I was thinking about creating simple site with perun and put it on http://perun.io
not using it but some people at our latest meetup said there are some nice ideas
Is there some “this are the great ideas” doc?
basically this http://www.dunaj.org/guide.html
i don't see myself using some of those features much at all, but i think they're all good ideas for when you do need them
It’s so cool not needing to care about deps for build steps. Shovel it in a pod. Done.
More people will come to a conclusion faster. That’s how it works right? ¯\(ツ)/¯
Complaint rings true to me. Feels like there is an aristocracy in Durham. Not necessarily a bad thing, though.
There should be some :politics: emoji
oh wait I found it :poop:
@podviaznikov: still around?
yep, I’m online
I just ran full speed in the wrong direction I think hahaa
I was looking at all that permalink stuff and just sort of going at it, ended up writing a slug
task that generates slugs from keys in the metadata but know that I think about it it’s probably wise to keep links match files as titles might get edited etc.
It was fun though 😄
actually, if you have slug task we can include id as separate plugin. Some people might need it. It sounds similar to https://github.com/nsonnad/metalsmith-slug
maybe to avoid title rename problem we can append some generated hash to the end of the slug (that would never change)
reddit has that
Like http://www.reddit.com/r/sports/comments/35lmh6/derek_roses_son_is_an_0g/. You can change any letter in the last part of url. But 35lmh6 is fixed
yeah, I just stuffed it into io.perun.experimental for now.
The thing with reddit is that titles don’t change though
when I edit my post and change the title my post will end up at a different location
In some scenarios that might be ok or data won’t change but in a permalink context it’s rubbish
I personally like generating links from filename, but I also think for some people slug can be useful
I would love to get your opinion on something. I need to write a script that will be a part of Unix pipeline. A simple script, reads from STDIN, writes to STDOUT, but it needs to do some cipher work, so it will rely on the standard library of the language in which the script will be implemented. Clojure seems like overkill, right? What language would you use?
@podviaznikov: I found a use for the slug stuff: slug
task adds :slug
key to metadata which is derived from filename (dates and extensions can be stripped this way; function customizable). permalink
task has a permalink generation function which can be passed as option which just gets the files metadata and builds a permalink from it.
I usually use Bash, C or Python for small scripts, as they are easily available. Bash probably wouldn't work in this case unless there is a already app which does the cipher.
Depends on the cipher also. C stdlib doesn't probably have that kind of stuff but there are loads of libraries which do that and many are probably available in most of Linuxes.
If I can implement the thing without additional python libraries it usually works fine, but it's pain to use external python libraries especially if they are not available in package manager.
I think openssl binary can do that
deraen: oh, yeah, that would completely remove the necessity of a script. Very good idea.
cat build.boot | openssl enc -aes-192-cbc -pass pass:foo
pretty pleased with this @podviaznikov https://github.com/hashobject/perun/pull/21/files
martinklepsch: I think tuples are used usually with (into {} (for [[k v] m] [k (f v)]))
instead of maps
@juhoteperi: thanks for reviewing. I’ve always been using maps 😄 but tuples make kinda sense, you’re right
I was just going to comment about experimental ns :d
I put it into experimental after I thought that whole slug thing was mislead, but then it all made sense 😛
I wonder what would be the best way to pass in the functions to tasks
code
instead of sym
in option type should work, I think?
yeah, just pushed that
code
also seems to be able to just resolve a sym if it’s given one
In the end I used some awk incantations to read fields of interest in a file and piped it to openssl
I’m wondering if the use of metadata on the fileset object is an intended design decision or more of a nice coincidence? Anyone knows?
It looks like an emerging pattern: see https://github.com/boot-clj/boot/issues/129#issuecomment-76080804
@jeluard: right, I remember reading that.
martinklepsch: Yes, a pattern. I did a writeup the other day in the wiki about just that. https://github.com/boot-clj/boot/wiki/Task-Writer%27s-Guide#patterns
Is that code from perun? looks as if it is? 😄
that :metadata
key is arbitrary right?
I so wish I could use this: http://scsh.net/
nice work on the wiki page @danielsz
Alright, time to sleep. Later everyone!
@danielsz: you're crushing it on the wiki man, thanks 👏
thanks
@micha: i think i'm gonna go the path of a boot.App -> servlet shim, if only to level up on boot.App
So I've got about 20 private clojure projects on our jenkins ci server -- and I have a problem ensuring repeatable builds when building SNAPSHOT jars from branches... Obviously this can be solved by not using snapshots -- but then the CI server isn't really automatically integrating the latest work for you... Would switching the projects over to boot help? And if so how?
@rickmoynihan: are these libraries or applications?
libraries and applications -- obviously we don't install applications or deploy them to clojars
basically I'd like to setup jenkins to only install the jar after all its dependencies have passed their builds... but currently it needs to lein install
before hand so they can pick up their dependencies
and then you contaminate the global state
with a potentially broken lib
i see what you mean, because /home/jenkins/.m2 is project-global you mean?
i suppose you can't lein deps && lein test && lein install
for some reason?
not that i'm advocating lein just trying to understand the problem
lol - well the situation is that the lib tests pass -- but it can cause downstream test failures - in which case you want to rollback the install
or only install after all downstream have passed
and downstream projects pick up passing upstream libs because of your use of SNAPSHOT?
hm, so i'm not sure boot would particularly buy you anything
yeah I didn't think so either
as the mechanism under boot for dependency resolution is maven via aether, same as lein
but was wondering whether builds are pure functions would help in this regard
one thing you can do with boot that you can't easily do with lein
is produce multiple artifacts from one 'build'
i don't currently where i work now, but at a previous place we had a lot of private libraries
if boot existed at the time i would have folded them into a single git repo and build, that produced multiple jars all with the same version
then uploaded them transactionally to artifactory
avoiding dependency problems up front
I'd rather not do that -- because there are several different apps with different release cycles... and some of libraries are opensource and others are private
ah, yeah some portion being open source is the kicker