#clojure logs

2013-12-19

00:03nopromptbitemyapp: we'll probably have to move our pairing session to sunday if that's cool.
00:04nopromptbitemyapp: i have to attend holiday "events" tomorrow and potentially friday.
00:29deadghost_hmm how I can recover from an exception?
00:30deadghost_(clojure.java.io/reader "http://deadgho.st/this-page-does-not-exist")
00:31deadghost_gives a file not found exception
00:31deadghost_I want to tell it to continue the program
00:32deadghost_or in the case of 503 try a few more times then continue
00:33TEttinger##(doc try)
00:33lazybot⇒ "Special: try; catch-clause => (catch classname name expr*)\n finally-clause => (finally expr*)\n\n Catches and handles Java exceptions."
00:34seancorfielddeadghost_: perhaps use clj-http instead so you have more control over how HTTP status is handled?
00:55blur3ddoes anyone know of an idiomatic way to define an expression once and allow it to be bi-directional (eg. 1 day = 24 hours and 24 hours = 1 day)
00:56blur3dwould something like core.logic be suitable?
00:56bitemyappnoprompt: this weekend works.
00:59nopromptbitemyapp: fantastic.
01:02echo-areablur3d: Will java.util.concurrent.TimeUnit be suitable for you?
01:02echo-areaOh, that is only an example
01:02blur3dI'm looking to use it in a much broader sense
01:03blur3dsomething like this
01:03blur3dhttp://www.algebrahelp.com/calculators/equation/calc.do?equation=a%3D2b&solvf=b
01:04blur3dI'm fairly sure i have seen an example in clojure somewhere... likely in one of the books I've read, but its hard to find
01:04blur3dbasically i want to be able to define something once, and flag it is reversible - and then it automatically adds both variations
01:05TEttingerblur3d, sounds like a use for macros?
01:05TEttingerlike def-rev
01:06blur3dyeah, the macro can be used to define both of them... but i need a way to start with a=2b and get b=0.5a
01:06echo-areaI saw similar things in SICP which introduced a constraint propagation system. Not sure if it exists for Clojure though
01:07blur3dmaybe was I remember was a reverse stack function in C.
01:08blur3dIm hoping to find something I can use generically... so if it knows you can get AUD/USD, then it knows you can get USD/AUD
01:10echo-areablur3d: http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-22.html#%_sec_3.3.5 Maybe implementing something like this is a last resort
01:13blur3dI know the problem is similar to unit conversion, thus you can define a base unit as 1 and then the other units as a factor of the base - and for that you can use multi-dimensional analysis
01:19blur3danyway, ill keep looking out. Thanks @echo-area TEttinger
01:20TEttingernp
01:21TEttingerspeaking of heavy metal in boss fights, Giygas part one has nes-style music, then transitions to http://youtu.be/9gbG_gzgyJI?t=2m6s
01:22TEttingergah wrong chan
01:39blur3dI've found something that I might be able to work off - https://github.com/francoisdevlin/Full-Disclojure/blob/master/src/episode_012/episode_012.clj
01:40blur3dit has a video covering it also http://vimeo.com/9666573
02:10chenglouclojure newb here, why does the let statement take a vector for binding and not a map
02:14blur3dchenglou: http://stackoverflow.com/questions/3859765/why-does-let-require-a-vector
02:15chengloublur3d: ah thanks. Isn't that slightly expensive though
02:15chenglouI've read that the implementation is a 32-way tree
02:16chengloubut I guess usually they dont exceed a certain number of items
02:16blur3dI really haven't looked into it
02:16chengloukk thanks
02:17TEttingerchenglou, I think the trees are used for sorted sequences IIRC
02:17chenglouTEttinger: I read it's the vector's underlying implementation
02:17TEttingerto the src!
02:18blur3dchenglou: IIRC hash-maps are internally vectors, so I would presume they are more performant then hash-maps
02:18TEttingerhttps://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/PersistentVector.java
02:19chenglouTEttinger: yep
02:19chengloublur3d: didn't know that, thanks
02:20TEttingerit appears to be a linked list up to or after 32 items, I cannot make sense of this
02:20chenglouTEttinger: 32-way tree
02:20chenglouTEttinger: http://hypirion.com/musings/understanding-persistent-vector-pt-1
02:20chenglougot it
02:21chengloubtw loving clojure right now, it makes so much sense =)
02:24TEttingeryeah, that kind of data structure seems to be pretty useful in general. I know Judy Arrays (a kind of less-memory-intensive associative array designed to reduce cache misses, but 20K lines of code) internally use a 32 or larger way tree
02:24TEttingererr trie
02:26chengloufirst time I hear about judy arrays
02:27chenglouthat thing looks awesome and has no performance downside...?
02:27seriously_randomhow to rewrite "(condition? (= blah bleh) (cons '() (recursive-fn (+ 1 n) a-seq))" so that function in the end doesn't give back a list with useless '()?
02:28noidi_seriously_random, maybe a list comprehension would work better than explicit recursion and consing: http://clojuredocs.org/clojure_core/clojure.core/for
02:28noidi_seriously_random, the first example on that page demonstrates the use of `:when` to filter out elements
02:29seriously_randomnoidi_, it's got to be recursive
02:30noidi_why?
02:30clojurebothttp://clojure.org/rationale
02:31noidi_http://blog.fogus.me/2011/03/09/recursion-is-a-low-level-operation/
02:31seriously_randomnoidi_, because it's mooc :)
02:32seriously_randomalso, recursions are kinda cool
02:46rurumateHow to pass command line arguments (like input path) to a cascalog job jar?
02:48rurumatenvm I found it in the cascalog-impatient wiki
03:28blur3dis there a version of deref that evals the function if it is not a delay, or derefs it? something like
03:28blur3d(defn do-deref [r]
03:28blur3d (if (delay? r)
03:28blur3d @r
03:28blur3d (r)))
03:50noidi_blur3d, AFAIK, you can implement IDeref if you want to create your own derefable objects https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/IDeref.java
03:51TEttingerblur3d, that function looks perfectly reasonable. I should probably learn more about delays
03:51noidi_,(let [x (reify clojure.lang.IDeref (deref [this] "lol"))] @x)
03:51clojurebot"lol"
03:53nopromptjust wrote a wrapper around BreakIterator. bleh.
03:54nopromptfirst cut: https://www.refheap.com/22037
03:54nopromptbleh
03:59noprompti'm probably never going to use it.
04:02blur3dnoidi_ TEttinger:kk, cheers
04:07dyresharkcan anyone recommend a solid, idiomatic clojure codebase to read?
04:09vijaykirandyreshark: https://github.com/Datomic/codeq perhaps ?
04:09TEttingerdyreshark, I can't say much about how idiomatic it is, but lazybot is certainly fun to work with, and it uses a lot of clojure features (from the written-early parts of the language)
04:11dyresharkvijaykiran: TEttinger: cool, i'll look into them. thanks :)
04:12sm0keany one tried vertx adapater for ring?
04:13sm0keclojure seems to be lagging behind in http://www.techempower.com/benchmarks/#section=data-r8&hw=i7&test=db
04:13sm0keround 8 web framework benchmarks
04:14sm0kealso is there a grizzly ring adapter?
04:25TheBusbyAny creative ways to produce a sorted-map which has random order? (just need to shuffle it once)
04:30sm0keTheBusby: what do you mean by sorted-map with random orders?
04:32clgvTheBusby: sorted-map and random order sound pretty much mutually exclusive ;)
04:32TheBusbyis sorted-map the only mechanism to create a map in one specific order?
04:32TEttingersorted-map-by ?
04:32TEttinger,(doc sorted-map-by)
04:32clojurebot"([comparator & keyvals]); keyval => key val Returns a new sorted map with supplied mappings, using the supplied comparator. If any keys are equal, they are handled as if by repeated uses of assoc."
04:33TheBusby(sorted-map-by get-rand-boolean-value ...) ?
04:34clgvTheBusby: that might not work if you desire a uniform random distribution
04:34TheBusbythat was my first though, then shuffle and array-map?
04:34clgvTheBusby: you could create a random permutation and use that for sorting
04:37TheBusbyclgv: so shuffle the map, then turn it into an array-map to preserve the random ordering?
04:37clgvTheBusby: ##(let [m {:a 1 :b 2 :c 3 :d 4}, order (zipmap (keys m) (shuffle (range (count m))))] (into (sorted-map-by order) m))
04:37lazybotjava.lang.ClassCastException: clojure.lang.PersistentArrayMap cannot be cast to java.util.Comparator
04:38clgvah damn comparator instead of attribute^^
04:39TheBusby,(apply array-map (flatten (shuffle (seq {1 1 2 2 3 3}))))
04:39clojurebot{2 2, 3 3, 1 1}
04:39clgv,(let [m {:a 1 :b 2 :c 3 :d 4}, order (zipmap (keys m) (shuffle (range (count m))))] (into (sorted-map-by #(< (order (key %1)) (order (key %2)))) m))
04:39clojurebot#<ClassCastException java.lang.ClassCastException: clojure.lang.Keyword cannot be cast to java.util.Map$Entry>
04:39clgvTheBusby: no. do not rely on the order of the arraymap since it is automatically converted to a persistenhashmap when growing beyond a certain size
04:40TheBusbyclgv: excellent point, but hopefully I wont encounter that issue as I'm immediately converting the array-map to EDN, JSON, or XML
04:41tarutiWhat is the right way to "pr" a byte-array so that it can be read back?
04:41clgvTheBusby: well, then just try. why do you need it to be ordered randomly then?
04:41TEttingerTheBusby, have you seen the lib Ordered?
04:42TEttingerhttps://github.com/flatland/ordered
04:42TheBusbyclgv: hopefully to keep developers from depending on the order of fields. :)
04:42TheBusbyTEttinger: no, looking now!
04:42clgvTheBusby: o_O
04:42TEttingerthey might use some trick that you would find useful
04:43TheBusbyTEttinger: would the advantage of order-map over array-map be the issue of assoc/dissoc that clgv mentioned?
04:43TEttingerordered's maps are basically the same as Java's TreeMap s, just persistent?
04:44TEttingerno, http://docs.oracle.com/javase/6/docs/api/java/util/LinkedHashMap.html
04:45TEttingerI don't know why it needs to be random though
04:46TheBusbyyeah... Just trying to make the dev API simulate all the different possible types of responses to break developer code before they release it.
04:46TEttingerif you just want to rearrange the order of fields to discourage wrong assumptions, ##(sorted-map-by (fn [l r] (- (rand-int 1000) 500)) :a 1 :b 2 :c 3) would work
04:46lazybot⇒ {:a 1, :b 2, :c 3}
04:46TheBusbychanging field orders, JSON/XML encoding tricks, etc
04:46TEttingerpfft
04:46TEttinger##(sorted-map-by (fn [l r] (- (rand-int 1000) 500)) :a 1 :b 2 :c 3)
04:46lazybot⇒ {:b 2, :a 1, :c 3}
04:46TEttingerthere we go
04:47TheBusbyTEttinger: as clgv was good to point out though, that doesn't ensure an even distribution
04:47TEttingerbut I don't think you need one
04:47davdid the algebraic data types code get lost when the contribs got split into several packages? (https://github.com/richhickey/clojure-contrib/blob/master/src/main/clojure/clojure/contrib/types.clj)
04:48clgvTheBusby: I think your motivation for the whole taks is quite bizarre
04:48clgv$contrib
04:48TEttinger~contrib
04:48clojurebotMonolithic clojure.contrib has been split up in favor of smaller, actually-maintained libs. Transition notes here: http://dev.clojure.org/display/community/Where+Did+Clojure.Contrib+Go
04:48TheBusbyclgv: I found developers "grep'ing out" data from a JSON response already...
04:48clgvTheBusby: why is it your task to forbid that?
04:49TheBusbyclgv: if we make changes in the future, it'll break their code
04:49TheBusbyclgv: in a perfect world, they'd be responible for their own poorly implemented code; and yet 800 pound gorilla's...
04:49clgvTheBusby: but only because they use it wrongly. is it really your task to ensure they are doing it right?
04:50clgvif you start there you'll end up doing a lot of strange things to ensure they are using the service right
04:51TheBusbyI used to feel the exact same way, now I'm willing to do a little effort if it'll head-off potential problems
04:53TEttingeryou know... you could just reverse it at random
04:54TheBusbyTEttinger: yep, that works too ;)
04:54clgvTheBusby: well just go with the array-map approach if you serialize it directly without modifications
04:55TEttinger##((rand-nth [identity reverse]) sorted-map :a 1 :b 2 :c 3))
04:55lazybotclojure.lang.ArityException: Wrong number of args (7) passed to: core$reverse
04:55TheBusbyokay, thanks for the heads up about distribution and the pointer to ordered-map! ;)
04:55TEttinger##((rand-nth [identity reverse]) (sorted-map :a 1 :b 2 :c 3))
04:55lazybot⇒ {:a 1, :b 2, :c 3}
04:57TEttingererr no ##((rand-nth [reverse]) (sorted-map :a 1 :b 2 :c 3))
04:57lazybot⇒ ([:c 3] [:b 2] [:a 1])
04:58TEttingerapparently reverse and rseq will both return a seq not a sorted-map
05:00sm0kei have (defn ring-handler [] (handler/site #'myroutes)) in my code which i add to project.clj :ring {:handler myns/ring-handler}
05:00sm0kebut i seem to be getting clojure.lang.ArityException
05:00sm0kefor every route i try
05:01sm0kewtf is this
05:02TEttingerarity exceptions are just you passed the wrong number of args to some fn
05:02TEttingerdoes it give a line number?
05:02broquaintsm0ke: I think you want def rather than defn there.
05:03sm0kebroquaint: just tried that to no use
05:03TEttingerand of course you'd take out the [] for def
05:04clgvgists with code and stacktraces for the win ;)
05:04sm0keTEttinger: hehe :P
05:05sm0keforgot to take out the []
05:07sm0kewhere do i specify these options? https://github.com/weavejester/lein-ring#web-server-options
05:08mercwithamouthanyone here have any medium sized projects that use enfocus?
05:08clgvmercwithamouth: better ask your question directly^^
05:08bvdeenenhi all, I'm looking for a way to limit the number of digits of a float that's shown in the repl. Any tips ?
05:08sm0kefuck i never knew lein ring server is so awesome for development!
05:08sm0keit has hot swap
05:09mercwithamouthclgv: no question...i just wanted to look over someones project to see how they structure their code =P
05:09clgvbvdeenen: you probably have to overide print-method for floats
05:09TEttingerthere's a way, let me check
05:09clgvbvdeenen: or if you explicitely output them you can use `format`
05:09mercwithamouthsm0ke: hah i didn't know it allowed hot swapping either. c00l beanz
05:10bvdeenenno,no, it's just for during development of a function
05:10bvdeenenI know about format
05:11TEttingerthere's http://clojuredocs.org/clojure_core/clojure.core/with-precision
05:11TEttingerbut that's for BigDecimals
05:12bvdeenenyeah, I found that already. I am developing some math functions that return float sequences, and my screen just fills up like mad
05:12TEttingerfloats shouldn't be very long, hm?
05:13bvdeenenSo it would be nice if I could just limit the number of digits the repl shows. I guess I'll go have a look at overloading core/print-method
05:13bvdeenenWell each float is about 15 characters, and my function returns a vector of 50 :-)
05:13bvdeenenOh worse, 50 vectors of 3 floats
05:14bvdeenenAnyway, I'll check on print-method, thanks for thinking along....
05:14TEttingerhttp://clojuredocs.org/clojure_core/clojure.core/*print-length* ?
05:14TEttingerthat's what clojurebot uses
05:14TEttinger,(repeat 7)
05:14clojurebot(7 7 7 7 7 ...)
05:15bvdeenenyep that works, it helps.
05:17bvdeenenI'll see if I can add this to clojure.core/print-method, maybe even suggest it as a patch, with a *print-round* global
05:17clgvbvdeenen: you can just set *print-length* and *print-level* in your REPL
05:18clgvbvdeenen: print-method would be only for using format to limit the decimal places shown
05:19bvdeenenYep, I'm using *print-length* now, that helps, but I still like the idea of having a global rounding constant for floats in the repl
05:19clgvbvdeenen: that's the approach I meant (defmethod print-method Float [v ^java.io.Writer w] (.write w (format "%.3f" v)))
05:19clgvsimilar for Double
05:20bvdeenenCool! thanks for the tip
05:20clgvbvdeenen: you could also use a dynamic variable for the number of decimal places there
05:21bvdeenenHe dude, you just created my patch! Just add it to clojure.core please, and everone is happy... :-)
05:21clgvbvdeenen: no certainly not. since this influences text serialization ;)
05:22bvdeenenoh :-(
05:22clgvpr-str and such use print-method as well
05:24bvdeenenThat's too cool, it works, ok now I'll try to figure out how it works, because I'm new to clojure
05:25seriously_randomis there tuple assignment like in python?
05:25clgvseriously_random: Clojure has destructuring if that is what you mean
05:26davIs there no decent algebraic data type library for clojure?
05:26clgv,(let [[a b c] (range)] [c a b])
05:26clojurebot[2 0 1]
05:27clgvdav: what do you want to do?
05:28davclgv: pattern matching on algebraic data types
05:29davclgv: as done here: https://code.google.com/p/clojure-contrib/source/browse/trunk/src/clojure/contrib/types/examples.clj?spec=svn596&amp;r=596
05:29davclgv: except clojure-contrib was disbanded and it seems to me that this code is gone
05:29clgvdav: there is core.match for pattern matching
05:29davclgv: it seems to pattern match values.. that's not very interesting
05:30davclgv: I'd want to pattern match type constructors
05:31davI guess I can probably reproduce the functionality with map matching
05:45broquaintThere's a subtlety here I'm not appreciating and could do with some enlightenment - https://gist.github.com/broquaint/8037288
05:53broquaintOh I think it's the REPL not knowing how to stringify it.
05:54seriously_randomhow to write the following for loop in clojure: http://pastebin.com/1WcjHa90
05:55sm0kebroquaint: thats weird there is a default toString for EVERY Object in java which prints the object reference
05:57sm0kebroquaint: working with java apis which do not have Builder patterns is ugly in clojure
05:58sm0keas a sidenote
06:04broquaintDuly noted, sm0ke :)
06:09daGrevisdid I do this koan correctly? "One function can beget another"
06:09daGrevis (= 9 (((fn [] #(+ %1 %2))) 4 5))
06:09daGrevisyodas?
06:20clgvdaGrevis: what is filled in? otherwise I'd say (= 9 (+4 5)) is simpler ;)
06:21daGrevisclgv, it would be simpler, but I would count is as cheating
06:22clgvdaGrevis: why?
06:22daGrevisbeacuse u r just ignoring 4 5 that are passed to the function as arguments
06:22daGreviselegant cheating :P
06:22clgvdaGrevis: I dont know what the exakt exercise is. no + does not ignore 4 5 ;)
06:22daGrevisclgv, can you show me full example of your code?
06:23clgvas said above, I have no clue what part of the expression is fixed and where exactly you need to fill in something
06:23udayHi, We are using core.match for pattern matching. And we want to match a set instead of a vector or sequence like this [([1 2 3 4] :set)]. Can you someone suggest us how we can implement our own matchers like this?
06:24clgvuday: in case you get no answer very soon, try to ask dnolen in several hours
06:26daGrevisclgv, https://github.com/functional-koans/clojure-koans/blob/master/src/koans/06_functions.clj#L26
06:26daGrevisyou need to fill ___
06:26udayclgv: Sure. Thanks
06:26daGrevisyou could just fill it with 9 and it will pass
06:26clgvdaGrevis: ok then I'd use (= 9 (((fn [] +)) 4 5))
06:27clgvdaGrevis: no you couldnt
06:27daGrevis:/
06:27clgv,(= 9 (((fn [] 9)) 4 5))
06:27clojurebot#<ClassCastException java.lang.ClassCastException: java.lang.Long cannot be cast to clojure.lang.IFn>
06:27clgvsee ;)
06:27clgv,(= 9 (((fn [] +)) 4 5))
06:27clojurebottrue
06:28daGrevisclojurebot, ye, cool
06:28clojurebotI don't understand.
06:28daGreviswhoops
06:28daGrevisi got to ask, why 9 doesn't work?
06:29daGrevis, (= 9 (((fn [] 9)) 4 5))
06:29clojurebot#<ClassCastException java.lang.ClassCastException: java.lang.Long cannot be cast to clojure.lang.IFn>
06:29clgvbecause 9 ist not a function but it called as one
06:29clgv,(= 9 (((fn [] (constantly 9))) 4 5))
06:29clojurebottrue
06:29daGrevisclgv, is + a function?
06:29clgv;)
06:29clgvyes
06:29daGrevis, (= 9 (((fn [] '9)) 4 5))
06:29clojurebot#<ClassCastException java.lang.ClassCastException: java.lang.Long cannot be cast to clojure.lang.IFn>
06:29clgv+ is a symbol which is resolved to the function that adds numbers ;)
06:29daGrevisfor something sake ;D
06:30clgvdaGrevis: using (constantly 9) works in that case since it creates a function that always returns 9
06:30daGrevisclgv, why doesn't '9 work?
06:30clgvdaGrevis: it is no function
06:30clgv,(type '9)
06:30clojurebotjava.lang.Long
06:31daGrevisi thought ' had a special meaning
06:31clgvdaGrevis: yeah, it is a shortcut for (quote ...)
06:31daGrevis, (= 9 (((fn [] '9)) 4 5))
06:31clojurebot#<ClassCastException java.lang.ClassCastException: java.lang.Long cannot be cast to clojure.lang.IFn>
06:31daGreviswhoops
06:31clgvbut that does not create functions ;)
06:31daGrevisok, til and gotta learn a lot more
06:31daGrevisthanks :)
06:33clgvdaGrevis: you got a book or know about clojure-doc.org?
06:33daGrevisclgv, currently im walking throught the koan
06:34daGrevisi have some knowledge in programming ;)
06:34daGrevispython, a bit of haskell
06:34daGrevisgotta get book! \o/
06:34clgvdaGrevis: reading about the concepts of the language will speed up your progress ;)
06:35daGrevisclgv, any suggestions?
06:35daGrevisi mean, for book
06:35clgvdaGrevis: "Clojure Programming" is quite recent. I read a few chapters of it which were well written
07:08caspercs
07:23seriously_randomfrom index 1 to 2 in '(1 2 3 4 5) => (2 3) - how?
07:25daGrevisclgv, thanks for book suggestion ;)
07:26clgvseriously_random: ##(->> (range 1 6) (drop 1) (take 2)
07:27clgvups
07:27clgv,(->> (range 1 6) (drop 1) (take 2))
07:27clojurebot(2 3)
07:44seriously_randomI don't want to sound intrusive, but could someone show something like this: http://pastebin.com/1WcjHa90 is done in clojure
07:47seriously_randomI guess I could use destructure, "let [[a b c] '(1 2 3)]". But that will only work if sequence is fixed size
07:48jballancseriously_random: in your pastebin you say "hashset", but sets are inherantly unordered
07:48jballancdid you mean a seq or vec?
07:49seriously_randomhashset is original input, I guess I convert it to sequence first
07:49seriously_randomskipping words, not a good sign :)
07:50jballancso, yeah, you could make it a seq
07:50jballanc'(seq #{1 2 3 4})
07:50jballancwhoops
07:50jballanc,(seq #{1 2 3 4})
07:50clojurebot(1 2 3 4)
07:50clgvseriously_random: since it is swapping back and forth there is no clear functional result. is it only supposed to do the printing side effect?
07:50jballancbut if you want to swap, you probably want a vec
07:51seriously_randomwould vec simplify the task?
07:51clgvseriously_random: what is the task? printing the original sequences with the 3 swaps?
07:52seriously_randomclgv, 1234, 2134, 3214, etc (swapping with index 0)
07:54clgv,(let [v [1 2 3 4]] (dotimes [i 3] (let [i (inc i)] (println (assoc v 0 (v i) i (v 0))))))
07:54clojurebot[2 1 3 4]\n[3 2 1 4]\n[4 2 3 1]\n
07:54jballancheh...I would've used a for comprehension
07:55jballancsaves a form
07:55seriously_randomwhy can't it be something simple, like a, b = b, a in python?
07:55jballancbecause vectors (and seqs and hashes and sets) in Clojure are immutable
07:55clgvseriously_random: persistent data structures, that's why
07:56clgvthis is you a,b = b,a => (assoc v 0 (v i) i (v 0)))
07:57clgvyou could write a separate swap function if it's worth it
07:58jballancactually, since you're only printing the vectors there's not even any need to really do the assoc
08:00clgvjballanc: well it is the simplest. traversing the vetor needs more code ;)
08:00clgvand closer to the semantic in the pseudocode
08:04jballanceh, I guess...
08:05jballancthe pseudocode doesn't really fit with a functional design, though
08:05seriously_randomhere is the actual "pseudocode": http://helloacm.com/a-recursive-full-permutation-in-python/
08:11clgvjballanc: thats right. but we could approximate it with `dotimes` in idiomatic clojure ;)
08:12jballancyou can do a lot of ugly stuff in clojure :)
08:12clgvseriously_random: well there is at least one existing implementation for a lazy sequence of all permutations of a given length...
08:13clgvit was in the old contrib libs
08:13jballancseriously_random: the article you linked, though, is doing something different than your pastebin
08:14jballancyou were just permuting two positions, but the article you link is doing a full permutation
08:14jballancthat should actually be much easier/clearer to do (recursively, as the article suggests) in clojure
08:17seriously_randomjballanc, I was aware of not doing a full perm. set. It was more like a practice before the real deal.
08:17jballancwell, in this particular case, I think you've made the problem harder by not tackling the whole thing at once
08:18jballancwith clojure (and functional programming in general) it's much better to sit and think about the whole problem than to try and piecemeal it together
08:19seriously_randomor you could argue that starting from something will lead to some kind of understanding of what it is that you are doing
08:20jballancyeah, but because of clojure's immutable data structures you're going to have a much harder time implementing the half-solution
08:25clgvjballanc: I think building solutions to problems bottom-up is pretty normal in Clojure due to the testing abilities in the REPL. but you need to think about howto structure the implementation it the needed functions
08:32seriously_randomjballanc, http://pastebin.com/wpLWgzF5 - doesn't seem to do the same thing
08:34seriously_randomone mistake is at dotimes (range)
08:34clgvseriously_random: yeah the mistake is that you wanted side-effect only code before and now you want a return value ;)
08:36mdrogalisMorning.
08:47seriously_randomclgv, know anything about for and how println behaves? http://pastebin.com/x0fCMMT2
08:49stuartsierraclojurebot: for?
08:49clojurebotfor is a loop...in Java
08:56seriously_randomhow to avoid deep nesting? http://pastebin.com/5cP2VQ7i
08:57xsynI all
08:57xsynI'm busy playing with incanter
08:58xsynand I want to do an intersaection on the two lazy-seqs I've got
08:58xsynbut I can't convert them into sets
08:58xsynhow do I find the values that each lazy-seq has easily
09:03silasdavisany recommendations for load testing in clojure?
09:05fredyrxsyn: do you need to keep dups, or why not convert to set?
09:05xsynjust worked that out
09:05xsynthanks
09:05xsyn(set (doall (lazy-seq))
09:13clgvxsyn: just (set your-lazy-seq) should work as well
09:14jonasenBronsa: ping
09:14jonasenBronsa: https://github.com/clojure/tools.analyzer/blob/master/src/main/clojure/clojure/tools/analyzer/utils.clj#L85
09:15jonasenBronsa: that call to 'var?' makes tools.analyzer much less platform agnostic. Is it necessary?
09:21Bronsajonasen: I know, that's something I need to fix before the first release
09:23jonasenBronsa: ok, it's not a real big problem, the ast is returned as ':op :maybe-class' and I can write my own resolve-var pass
09:25Bronsajonasen: FWIW resolve-var will be a dynamic var like create-var. I don't think there's any other option to support arbitrary representation in the ns map
09:28jonasenBronsa: yes, that's probably true. There are a few other places in analyzer.utils where you're using 'var?'. Not sure if that's a problem
09:30Bronsajonasen: no, I don't think those other places will be a problem
09:58sw1nnhiredman: Hi, I set up an instance of clojurebot for #ldnclj, but I just noticed that there's some code to invite the clojurebot from here into that channel. Is that something that might be possible?
10:11romain_p_Hi everyone, could somebody tell me what is wrong with http://pastebin.com/PkR7P6Rk
10:12romain_p_Specifically, I get an error "<! used not in go block"
10:12clojurebotExcuse me?
10:14fredyrare there any clojurescript alternatives similar to Backbone models?
10:17jjl`_what things have metadata attached by default?
10:18tbaldrid_romain_p_: not sure, did you :require <! from cljs.core.async?
10:18tbaldrid_and are you importing macros from cljs.core.async.macros?
10:18`cbpvars have metadata by default i guess?
10:18`cbpthis sounds like some interview question
10:19jjl`_heh, i actually do have a use for this information
10:20`cbpthings that start with def put metadata on the vars, at the very least things like ns, line, file, etc
10:20pepijndevoshiring people in usefull
10:21jjl`_`cbp: that's what i thought, but i've just defined a function with defn in a lein repl and (meta myfn) returns nil
10:21`cbp(meta #'myfn)
10:21`cbpon the var not the function
10:21jjl`_aha
10:22romain_p_tbaldridge: I am using (require [cljs.core.async :refer [<! >! chan go])
10:23tbaldridgeromain_p_: remove the go symbol and do this for go instead:
10:23tbaldridge(:require-macros [cljs.core.async.macros :refer [go]])
10:23romain_p_tbaldridge: OK, thanks!
10:23tbaldridgeromain_p_: in CLJS you have to pull in macros via reqire-macros.
10:23romain_p_I was confused about that one
10:23tbaldridge*require-macros
10:24romain_p_tbaldridge: although it would be nice if the compiler complained, but I guess it cannot be done in such a dynamic language
10:25pepijndevosis there a reason for that other than noone bothered reimplementing the macro system?
10:29stuartsierraIt's more complicated than that.
10:31stuartsierraThe Clojure compiler is partially implemented in Clojure. Macros are part of that.
10:31stuartsierraThe ClojureScript compiler is also implemented in Clojure.
10:31stuartsierraMacros are a compiler feature that also require the full language runtime.
10:32stuartsierraIn ClojureScript, the language runtime (JavaScript) and the compiler (Clojure / JVM) are separate.
10:33tbaldridgeMy only complaint is that go doesn't exist inside cljs.core.async. So I would expect CLJS to at least warn about that.
10:34stuartsierraI think there's a CLJS compiler option for warnings like that.
11:08dnolentbaldridge: romain_p_: there is new sugar now, if you give your macro file the same name as the CLJS file barring extension, :include-macros true works
11:08dnolenalso (:require [foo.bar :as bar :refer-macros [woz]])
11:11lpetitcemerick: hello
11:11cemericklpetit: hi! :-)
11:12lpetitWhat's up ?
11:12cemericklpetit: not much / a lot, depending. :-)
11:12lpetithe
11:30zerokarmaleftI'm getting a weird var resolution error, despite it clearly being interned => https://gist.github.com/zerokarmaleft/8042030
11:37andyfonly on that symbol?
11:40zerokarmaleftandyf: afaict, yes
11:40andyfAnd repeatably with a new JVM?
11:42zerokarmaleftandyf: my bad, get-all-bids and delete-bid also fail to resolve, get-bid resolves but is unbound
11:43zerokarmaleftandyf: yea, just tried with a fresh repl
11:44andyfno errors when loading the namespace?
11:45zerokarmaleftnamespace loads fine
11:46rukorzerokarmaleft: out of curiosity, do you justify your namespace declarations by hand or some Emacs magic.
11:47zerokarmaleftrukor: a little of column A and a little of column B, but that's mostly enabled by M-x align-regexp
11:50zerokarmaleftI wonder if this is some cider/nrepl funkiness
11:51andyfworth trying outside on a plain terminal REPL to check, if that isn't too much trouble.
11:51rukorZerokarmaleft: i see, thanks. I also see some docstrings justified. Any ideas on how to achieve that?
11:53zerokarmaleftrukor: that's part of clojure-mode, I believe...clojure-fill-docstring
11:57rukorAha, thanks. Perfect. Ive always disliked the default fill mode for docstrings. Thanks
11:57zerokarmaleftandyf: same thing
11:57zerokarmaleftrukor: np
11:58andyfzerokarmaleft: I wish I had something more useful to suggest, but I'm not coming up with anything.
11:58zerokarmaleftit's bizarre
11:58zerokarmalefteval'ing directly in the repl creates a working binding
11:59andyfdoes defentity define any other symbols with the substring "bids", like "get-bids", as part of its effect?
11:59zerokarmalefthmm, good question...checking korma docs
12:02hiredmanzerokarmaleft: that form-init bit in a temp file name is something lein does when first launching a project repl, getting it at the repl like that is very weird, what does your project.clj look like?
12:02zerokarmaleftandyf: looks like it just creates a map and binds "bids" to it
12:03hiredmanzerokarmaleft: what repl are you using?
12:04zerokarmalefthiredman: https://github.com/codesy/patronage/blob/master/project.clj
12:05zerokarmalefthiredman: cider/nrepl
12:08hiredmanzerokarmaleft: what happens if you remove the init-ns stuff and try to compile the file in a fresh repl?
12:09zerokarmalefthiredman: same error, get-bid-command doesn't resolve when compiling get-bid
12:11hiredmanzerokarmaleft: I don't think you can use declare like that for defentity, but I don't see how you would get the error you say you are getting from that
12:11sw1nnhiredman: did you catch my clojurebot question earlier? basically - can we invite ClojureBot into #ldnclj?
12:11gfredericks\j #ldnclj
12:11gfredericksslash directions
12:13hiredmansw1nn: http://en.wikipedia.org/wiki/List_of_Internet_Relay_Chat_commands#INVITE might work
12:14hiredmanzerokarmaleft: maybe you can use declare like that, it does like korma's macros explicitly var the names
12:15sw1nnhiredman: I tried it after looking at the code, but there's a flag :on-invite which may not be set?
12:15hiredmanzerokarmaleft: what happens if you run java -classpath `lein classpath` clojure.main, then require your namespace?
12:16zerokarmalefthiredman: same error
12:16hiredmansw1nn: ah, well
12:17hiredmanzerokarmaleft: unlikely, given as I said the form-init bit is lein specific
12:17zerokarmalefthiredman: the context is the actual source file instead of a temp file
12:17zerokarmaleftbut it's the same var resolution error
12:22zerokarmaleftandyf, hiredman: gotta come back to this later, thanks for the suggestions
12:24hiredmanzerokarmaleft: looking at the code in the patronage repo, there is no get-bid-command in that file
12:26hiredmanzerokarmaleft: you have an extra m in your defn
12:31dnolenok so in Om if we decomplect the data path and the render path we can have Datomic style queries to compute children instead of having to write silly functional code for it
12:38pepijndevosdnolen, whats Om?
12:39dnolenpepijndevos: https://github.com/swannodette/om
12:39tbaldridgednolen: pedestal has a 120 line datalog engine you could also snag. or do the queries in core.logic.
12:39pepijndevosah
12:39dnolentbaldridge: excellent
12:40tbaldridgednolen: it's super basic, but it works almost exactly like datomic's q fn https://github.com/pedestal/pedestal/blob/master/app/src/io/pedestal/app/query.clj
12:41dnolentbaldridge: excellent I just want something simple
12:41dnolentbaldridge: this won't be a bottleneck at all, and people will be able to write beautiful queries instead of writing the same tedious map filter reduce ops over and over again.
12:42tbaldridgednolen: nice.
12:43pepijndevosuuh, looking at react now. it has embedded xml!?
12:43dnolenpepijndevos: HTML, and it's optional
12:44pepijndevosI see... weird
12:44dnolenpepijndevos: the website isn't very informative, what is awesome about React is the virtual DOM diffing and the event simulation
12:44dnolenwhich is what most of the React code is actually about
12:44carkdnolen : so Om redraws everything when there's a change in the "dom" ?
12:44dnolencark: no
12:44dnolencark: Om doesn't do any rendering, React does it will only update what actually changed
12:45carkdnolen: ah ok
12:45pepijndevos:include-macros true? hmmm
12:45dnolencark: however Om can drive the React lazy diffing process from the root very efficiently because our data is immutable.
12:46carki'm not familiar with react, maybe i should have a look to it
12:47kmicudnolen: Can you estimate how much work is needed for GClosure Adv. Comp. Friendly React.js ?
12:47dnolenkmicu: no idea but I don't really care about that.
12:47dnolenkmicu: linking to a CDN for dev and :preamble for production works fine
12:48dnolencark: I've got a post coming out later today with lots of details
12:48kmicuFinally.
12:48kmicu:)
12:48dnolencark: CLJ/CLJS will get it immediately.
12:48dnolenCLJ/CLJS users
12:49scottjAre there docs on #js for cljs?
12:49carkdo you mean it will be included in with clojurescript ?
12:49dnolenscottj: not but it I don't see why there needs to be
12:49dnolencark: no
12:49dnolenscottj: #js {} for objects #js [] for arrays, that's it
12:57gfrederickswhat does #js [{}] do?
12:57dnolengfredericks: an array with a map in it
12:58gfredericksa js obj or a cljs map?
12:58dnolengfredericks: the behavior of #js has been through quite a bit
12:58dnolengfredericks: #js isn't magical
12:58dnolens/through/thought through
12:58gfredericksdnolen: I'm just pointing out that it isn't obvious
12:59dnolengfredericks: it is if you think about it
12:59eggnogginit'd just return a js literal like [{}] tho right?
12:59dnoleneggnoggin: no, think about it some more
12:59dnolenand why that's a really bad idea
13:00gfrederickssomething being a bad idea doesn't mean it can be ruled out in the absence of documentation
13:01eggnoggina clojure vector where the 0th elem is a clojure map coerced to js ... wouldn't that be the same as typing [{}] in the js repl?
13:01dnolengfredericks: I think people will figure it out pretty quickly. It should be documented and anyone can do that.
13:01eggnogginaaah
13:01gfredericksdnolen: okay, I thought you had said it shouldn't be documented; my mistake
13:01eggnogginso you'd write #js [#js {}]
13:01dnolengfredericks: far as I know hardly any of the tagged literal stuff in CLJS is documented at all
13:01eggnogginis that?
13:01dnoleneggnoggin: yes
13:01eggnogginbut wouldn't #js [{}] recursively coerce down to the js literals?
13:02dnoleneggnoggin: absolutely not
13:02CookedGryphonin core.async, is it possible to do an alts style statement but where I'm waiting on events *in* from one channel, or the capability to push an event to another channel?
13:02tbaldridgeCookedGryphon: yep, look at the docs to alt! you can mix and match
13:02tbaldridgehttp://clojure.github.io/core.async/#clojure.core.async/alt!
13:03tbaldridgealso: http://clojure.github.io/core.async/#clojure.core.async/alts!
13:03CookedGryphontbaldridge: ah, I've only ever used alts!, I couldn't work out what the docstring for alt! was going on about
13:06CookedGryphonokay, I *think* I get what's going on...
13:06justin_smithI think alt! is like the equivalent of (let [chan val] (alts! [chan1 chan2 chanN]) (case chan ...)) -> (alt! chan1 ... chan2 ...)
13:16nopromptbitemyapp: omfg
13:32jcromartieso, I had previously had a nice prevalent system design going on, but now I have a requirement to have load balancing between two servers
13:33jcromartienow, there is no actual need to balance the load, but they want failover between VM instances in case one goes down
13:34eggnogginjcromartie: are both of your apps stateless between requests? just use a reverse proxy
13:36jcromartieNo, since I use a event sourcing design with state in memory
13:36jcromartieI can just as easily move state outside
13:37jcromartieso long as transactions are still possible
13:37jcromartiethat means MongoDB is right out
13:37pepijndevoswhat if the load balancer goes down...
13:37justin_smithavout can help - it defines refs / atoms that are transperently shared between instances
13:38jcromartiejustin_smith: nice!
13:38justin_smithwith standard atom / ref semantics
13:39justin_smithdepending how you were storing state that can make any changes to go from single instance with in-memory state to cluster a very smooth transition
13:39jcromartieit might be a little tricky if the different front ends have different versions of the app though
13:39justin_smiththough it provides an incentive to make more small atoms/refs with separate parts of state, instead of one big one
13:40jcromartieyeah I am using a ref for state with an agent to write events right now
13:40pepijndevoshow does it perform?
13:40pepijndevosavout
13:40justin_smithI haven't used in in production yet
13:40justin_smithit can be backed by zookeeper
13:40justin_smithwhich is designed for low latency
13:41justin_smithbut I should really load-test it
13:41jcromartiethis might really be overkill though
13:42pepijndevosif you kill a fly with a shotgun, it still dies...
13:42clojurebotNo entiendo
13:45danielszmulewiczwhois gf3
13:45danielszmulewiczsorry
13:45justin_smithavout is pretty lightweight - it is basically a keystore/message queue attached to standard clojure mutation protocols
13:46WWWestHi
13:46WWWestI just updated to clojurescript "0.0-2120", now my project takes ~15secs instead of 4 on every change with lein cljsbuild auto
13:46WWWestis this normal?
13:49danielszmulewiczWWWest: most certainly not
13:49WWWestI also added core.async
13:49tbaldridgejustin_smith: avout also has some fairly bad flaws
13:50danielszmulewiczWWWest: Each version bump is supposed to bring performance improvement, if not, it might be a regression.
13:50WWWestbut I have 2 go's and 3 >!, <!
13:50tbaldridgejustin_smith: https://github.com/liebke/avout/issues/1
13:51justin_smithouch
13:51jcromartietbaldridge: that's quite an issue, #1 from a year ago, still open?
13:51justin_smithluckily I am not counting on watches
13:52mdrogalisAvout not allowing you to read-every-write has burned me.
13:53mdrogalisYeah, the ZK-watch thing.
13:53pepijndevosIt seems to be a "feature"
13:53tbaldridgeyeah, the lib is based on some flawed views of ZK and as such has basically been discontinued.
13:53justin_smithit looks like that is a limitation of the underlying zookeeper
13:53mdrogalisSo I don't know if ZK itself considers them flaws.
13:54justin_smithflawed views as in the implementors do not understand zookeeper sufficiently? or the premise of the lib is based on a flawed understanding of zookeeper
13:54tbaldridgeThe problem is that ZK detaches watchers after each change. So if you attach a watch, then read the value then re-attach the watch you have a race condition.
13:54mdrogalisThe ZK docs say that "it's just something you need to account for."
13:56patchworkThe issue is that zookeeper behavior does not map to clojure watches
13:56patchworkSo you can't expect watches on avout refs to have the same behavior as watches on regular clojure refs
13:56pepijndevosfu, distributed systems...
13:57mdrogalisHas anyone used something like ZK that doesn't have that oddity?
13:57tbaldridgeeh, just use locks/transactions inside a machine and use other systems (message passing) outside machines.
13:57patchworkLeaky abstractions, yadda yadda
13:57mdrogalisEasier said than done, tbaldridge. At least I think so.
13:58tbaldridgetrue, it takes rethinking about your problem. But that's better than trying to get a distributed lock to work.
13:58patchworkSo, avout is good for distributed state, but not message passing?
13:59mdrogalispatchwork: It's not so good for observing every change to a piece of state.
13:59tbaldridgeI wouldn't use it for anything to be honest. It's been like 2 years since any updates were made to it.
13:59mdrogalisIn fact - it can't.
13:59patchworkIt seems if you want to see every change, you really want a message passing system
13:59mdrogalisYeah.
13:59patchworktbaldridge: So what about zookeeper in general then?
13:59mdrogalisI mean, it's emphemeral node feature is pretty great.
14:00patchworkIs avout just a bad abstraction over a good library, or is ZK itself basically flawed?
14:00tbaldridgeNo, ZK is fine for stuff like configs. I just have an issue with storing anything else in it. I wouldn't try to go and keep my application state in ZK.
14:00patchworkAs in, maybe we need a different clojure library for zookeeper then?
14:00tbaldridgeNow perhaps I'd keep a uuid in ZK that pointed to a datastructure on disk somewhere.
14:01tbaldridgeI've used this: https://github.com/liebke/zookeeper-clj
14:02tbaldridgeit works "okay" a bit temperamental. But it works fine for storing configs
14:02patchworklast modified 2 years ago as well!
14:02tbaldridgeyeah
14:02patchworksame guy too right?
14:02patchworkInteresting
14:02tbaldridgeIt all depends what you're wanting to do with it.
14:03mdrogalisYeah, agreed.
14:06mdrogalistbaldridge: What else would you recommend if you needed CAS but didnt want ZK?
14:07tbaldridgeZK is fine for CAS or configs. I'm just saying I wouldn't recommend storing tons of state in ZK. Which Avout seems to be about (e.g. mapping refs to ZK).
14:08mdrogalistbaldridge: Yeah, true.
14:08mdrogalisAh, right. There was a list in that ACID article about which storage engines supported CAS.
14:08mdrogalisMore than I expected
14:09stuartsierraThe Java ZooKeeper API isn't difficult.
14:09dnolenOm post is up feel free to give it some HN love - https://news.ycombinator.com/newest
14:09jcromartiedistributing state just sounds like a bad idea to me
14:09jcromartieso querying the db it is
14:09dnolenalso the React 0.8 is worth upvoting they've been super nice
14:10mdrogalisstuartsierra: Agreed.
14:10noncomkeywordize-keys works fine on multilevel maps, however, what if at some level there is a record and not a map? the keys do not get keywordied.. anyone knows a way around it?
14:12stuartsierranoncom: There's a patch already applied on Clojure 1.6 that lets `clojure.walk` support records.
14:13noncomstuartsierra: nice! but it is still in alpha.. maybe you could recommend a way to go then? :)
14:13stuartsierracopy-and-paste?
14:14stuartsierraIt's open-source, after all.
14:14noncomcool! gonna do it right away!
14:15stuartsierraIf you're interested, https://github.com/stuartsierra/clojure.walk2 is more thorough. I've also submitted that as a Clojure patch.
14:15jcromartieso I threw together a fun little thing that runs "tasks" with rollback
14:15jcromartieI am not sure I can open source it yet, gotta get that cleared up
14:15jcromartiebut it's for doing things with side effects that may need to be rolled back
14:15jcromartieand it supports vectors and sets as shorthand for sequential and parallel groups of tasks
14:15jcromartieso you can say: (perform [a #{b c d} e]) which will perform a first, then b c and d in parallel, and then e
14:16noncomstuartsierra: thank you, I will looks into the sources
14:16mikerodstuartsierra: I'm a fan of walk2
14:17jcromartieand, if any of them fail, everything that was completed is rolled back, which for collections means calling rollback on each completed member task
14:17yedidnolen: how dare you post your own blog post
14:17noncommikerod: sounds promising :)
14:17yedii wanted to reap the karma benefits
14:17mikerodThe docs say "This repo is for demonstration only." in walk2
14:18jcromartieto define tasks that can roll back you can specify a map like {:up #() :down #()} or you can defrecord and implement perform/rollback
14:18mikerodHowever, I've had no issues and do not see any.
14:18mikerodYou can even extend the protocol for Java-land Collections
14:20noncommikerod: will it go to 1.6?
14:21stuartsierraThe ticket is http://dev.clojure.org/jira/browse/CLJ-1239 if you want to keep track.
14:23bitemyappMFW hoplon doesn't use leiningen.
14:24bitemyappstuartsierra: is that RestFn patch going to get merged?
14:24bitemyappthe one Bloom was championing.
14:24stuartsierrabitemyapp: I don't know
14:24mikerodwhich patch is this?
14:24noncomyeah, i think it is a ery useful patch
14:25noncoms/ery/very
14:25SegFaultAXHow useful? Ery useful.
14:25bitemyappnoprompt: I was thinking about data structures for frak.
14:25bitemyappnoprompt: ever done anything with finger trees or PATRICIA tries?
14:26bitemyappor rather, for Frak++.hs
14:26mikerodnoncom: What is the RestFn patch? Is there an issue related to it?
14:27bitemyappnoprompt: https://github.com/quchen/articles/blob/master/loeb-moeb.md
14:28SegFaultAXSpeaking of finger trees... when will we be getting them in Clojure? :)
14:29noncommikerod: i mean walk2. i do not know anything about RestFn... ?
14:29stuartsierraSegFaultAX: https://github.com/clojure/data.finger-tree
14:29mikerodoh :)
14:29mikerodyes, an ery useful patch indeed.
14:30SegFaultAXstuartsierra: Think it'll ever make it to core?
14:30octagonbitemyapp: you're right, hoplon doesn't use lein!
14:30stuartsierraSegFaultAX: Not unless something in core needs it. We want to make clojure.core smaller, not bigger.
14:31bitemyappoctagon: are you the proud author?
14:32bitemyappSegFaultAX: finger trees are a bit tedious in a strict language.
14:32bitemyappstuartsierra: is there a canonical post for ML functors in protocols? I have a utility bag that I'd like to publish for Datomic that would benefit from it.
14:32octagonbitemyapp: i'm Micha
14:32stuartsierraIf anyone has a good benchmark that demonstrates a consistent, repeatable performance improvement from the patch on CLJ-1200, I would like to have it.
14:32bitemyappoctagon: I don't know who that is.
14:32octagonbitemyapp: i wrote it with alan dipert
14:33octagonbitemyapp: short answer: yes
14:33octagonbitemyapp: i still use leiningen too
14:33jcromartieI was accidentally running 2 instances of "yes > /dev/null &" which happens to be exactly how they used to recommend maxing out your MacBook and getting it super hot
14:33bitemyappoctagon: hot.
14:33octagonbitemyapp: leiningen just isn't good for some things
14:34bitemyappoctagon: by all means, explain.
14:34octagonbitemyapp: basically, the idea is that tasks could be middleware like in a ring app, instead of plugins, profiles, tasks, and middleware in lein
14:35bitemyappoctagon: leiningen has hooks for that.
14:35octagonbitemyapp: the priority is for boot tasks to be composable
14:35octagonbitemyapp: boot has only one "watch" task, for instance, that you can compose with any other task
14:35bitemyappoctagon: they're designed around the same principle.
14:35bitemyappoctagon: yes, you can do the same in Leiningen.
14:36octagonbitemyapp: we originally made a lein plugin, but it got unworkable pretty fast
14:36octagonbitemyapp: when it had to compose with lein-cljsbuild and various other things
14:37bitemyapptbaldridge: the edn parsing situation is getting bad enough that we're considering layering an edn protocol on top of JSON.
14:38bitemyappevery little thing is breaking, none of the edn readers/parsers in Python are workable.
14:38logic_progis there a way to write a websocket _client_ in clojure/java rather than cljs/javascript ?
14:38logic_progI want to write a _client_ to stress test my websocket server
14:38tbaldridgebitemyapp: seems that a little time with pyparsing or parsley would get you want you want.
14:38bitemyapplogic_prog: yeah, although that'd be weird.
14:38bitemyapptbaldridge: well, that "little time" is what already exists and those libraries are broken.
14:38bitemyapptbaldridge: I've been incrementally fixing edn_format but I'm losing my patience with it.
14:38jcromartielogic_prog: you can open as many websockets as you want from JS
14:39logic_progyeah, but I want to write my testing code in java
14:39logic_progs/java/clojure
14:39noncomyou can use a JS on JVM
14:39noncom:)
14:40logic_progI would need JVM on JS
14:40noncomyou could try using rhino or such..
14:40noncomyeah, i am mostly joking. it's just that i had the same request some time ago
14:40bitemyapptbaldridge: the edn spec being wrong combined with the terrible, terrible libraries out there makes using Datomic outside of Clojure incredibly painful.
14:40jcromartieJetty has a websocket client library
14:41jcromartiehttp://www.eclipse.org/jetty/documentation/current/jetty-websocket-client-api.html
14:41bitemyapptbaldridge: we've lost a lot of hours to this already.
14:41bitemyappbut the edn spec errors really just digs the knife in.
14:41jcromartielogic_prog: I think that's your answer
14:41jcromartieinclude require org.eclipse.jetty.websocket/websocket-client in your dev dependencies and test away
14:41cespareDidn't nigel (or was it someone else?) send out a proposal for two-valued math functions (like quo, rem := n / d) a while ago?
14:41logic_progjcromartie: very nice, thanks
14:42cespareI can't find the thread on golang-dev
14:42tbaldridgebitemyapp: that's the part that I'm wondering about. What spec errors are referring to? And if every single Python lib breaks, I'm wondering why.
14:42bitemyapptbaldridge: the Python libs break because they're incredibly naive and untested. The edn spec is wrong about what's allowed in a symbol
14:43bitemyapptbaldridge: and its over-restrictiveness relative to what Clojure actually allows in the implementation breaks code that we needed to actually use with Clojure/Datomic.
14:43tbaldridgewhat symbols are being sent from Datomic?
14:43bitemyappI don't really have time for this right now
14:43bitemyappif the divergence between the edn spec and what Clojure allows isn't disconcerting already, then you're not thinking ahead very far.
14:45nopromptgarsh darn internet connection...
14:45bitemyappnoprompt: w/b
14:45nopromptbitemyapp: no sir, i can't say i have.
14:45cespareoops wrong chan, sorry
14:45bitemyappnoprompt: well I was just thinking about the data structures, tries vs. finger trees, that sort of thing - for Frak.
14:45bitemyappnoprompt: also I was pondering a reverse Frak.
14:45jcromartieare there really advantages to "lein ring server" vs just having a main namespace with a fn that starts your app?
14:45tbaldridgeI'm just saying, we use stuff like ruby edn quite a lot and haven't had these issues, so I'm wondering what the difference is. For example, Diametric works great with the REST frontend.
14:45jcromartieI really don't like having a top-level handler
14:45bitemyappjcromartie: no advantages, just more muggle compatible.
14:46jcromartieI see
14:46jcromartieI thought that might be the purpose
14:46nopromptbitemyapp: yeah i've been interested in that as well. ultimately it would be nice to write a regex parser or an api for constructing regex.
14:46technomancyjcromartie: I don't see the point either
14:48noprompti discovered this week i'm going to be a father. looks like i'll be reading technomancy's blog more often.
14:48bitemyappnoprompt: wat.
14:48technomancynoprompt: oh nice; congrats.
14:48bitemyappnoprompt: congrats
14:48TimMcnoprompt: !
14:49nopromptbitemyapp: yep. i mean unless something goes wrong.
14:50TimMcBut chances are you'll have a Little Lisper in a couple years.
14:50bitemyappHaskeller, if I have my way.
14:50bitemyappporque no los dos is my motto though.
14:50TimMc"why not both"?
14:51technomancynoprompt: so far I've only done one "parenting" post, but I'm sure there will be more to come. =)
14:51technomancyyou've got lots of time to prepare
14:51TimMcAnyway, very exciting.
14:51technomancy(not that you can actually ever be prepared for something like that)
14:52bitemyappI mean, all you really have to do is not kill the kid.
14:52bitemyappthat's roughly the standard for perpetuation of the species so far.
14:52noprompttechnomancy: haha, this is true. you know, when i discovered she was pregnant i flipped out internally. then i saw the ultrasound on tuesday and was happy for some odd reason.
14:52arrdembitemyapp: good news, I'll be helping you lurk the channel more
14:52technomancynoprompt: yeah it's understandably gut-wrenching
14:52jcromartie"some odd reason" …
14:52jcromartie:P
14:52arrdembitemyapp: bad news, my hardware startup shut down Q_Q
14:53patchworknoprompt: children rewire your brain. It is evolutionary.
14:53dmpayton noprompt: fwiw, not killing the kid is easier than it looks. kids are pretty resilient.
14:53nopromptbitemyapp: my dad applied similar logic when teaching me how to drive. "the goal is to get the wagon from point a to point b without wrecking."
14:53bitemyapparrdem: :(
14:53bitemyapparrdem: sorry to hear that!
14:54koalallamanoprompt: congrats
14:54bitemyapptbaldridge: most promising alternative to edn_format so far is the lispreader from clojure-py.
14:55jcromartieThe whole "you don't understand until you have kids" thing is TOTALLY true. It's literally impossible to explain without experiencing it.
14:55tbaldridgebitemyapp: well, we accept patches send one over and I'll merge it.
14:55tbaldridge(inc jcromartie)
14:55lazybot⇒ 5
15:00jcromartiewhat's a good way to mock a service for tests that doesn't depend on dynamic bindings
15:00jcromartieaside from implementing the service with protocols+records
15:00jcromartieand I may have just answered my own question
15:01stuartsierrayes you did
15:01danielszmulewicznoprompt: Secretary and core.async is pretty neat: https://www.refheap.com/22046
15:01nopromptdanielszmulewicz: it's fun stuff. gf3 deserves most of the credit though. :-)
15:03nopromptdanielszmulewicz: it'd be great to have clout support cljs so there'd be one unified routing api story.
15:05danielszmulewicznoprompt: Is clout the thing that Compojure uses, or are they separate things?
15:07nopromptdanielszmulewicz: yes. clout is what compojure uses for routing. i like it's design.
15:07nopromptdanielszmulewicz: i also like the strait forward approach secretary takes too.
15:07danielszmulewicznoprompt: Right. +1 for a unified routing api story.
15:08nopromptdanielszmulewicz: the neat idea is potentially being able to reuse routing code on both the server and the client.
15:13akhudekdnolen: your todo app has a bug, if you delete some items then try checking some boxes, the wrong boxes get checked
15:13akhudekdnolen: otherwise, very impressive!
15:14danielszmulewiczIs the todo app going to make it on the README?
15:14danielszmulewiczI mean on the main page of http://todomvc.com/ ?
15:15danielszmulewiczI see a "compile to javascript" section, but no link to Clojure-related technologies...
15:31mikerodI'v read through this https://groups.google.com/forum/#!topic/clojure-dev/9JB-vKjvbhE and then saw hiredman had a gist @ https://gist.github.com/hiredman/921874 . I find this interesting and think I'm being bit by it.
15:32mikerodIs this expected behavior or a defect?
15:39noprompttechnomancy: i've been thinking about creating a modifier key which, when held, would allow me to type numbers on the home row. :-_
15:39noprompt:-)
15:39nopromptthe key travel to the actual number keys is too far.
16:06technomancyjcromartie: with-redefs doesn't use dynamic bindings
16:06jcromartietechnomancy: thanks
16:07jcromartieI already moved to a protocol though :)
16:07technomancy=(
16:07jcromartiewhy so sad?
16:07jcromartieyou're one of those "just use a map" purists?
16:07mikerod,(eval (let [c (comp inc inc)] `(~c 1)))
16:08clojurebot#<ExceptionInInitializerError java.lang.ExceptionInInitializerError>
16:08mikerod:(
16:08technomancynot a fan of using protocols for anything other than extreme perf requirements
16:08mikerod,(eval (let [c (comp inc inc)] (c 1)))
16:08clojurebot3
16:08technomancymikerod: yeah, functions get stripped of unused environment
16:08stuartsierrawith-redefs is still dynamic (time) scope.
16:08jcromartietechnomancy: I think they also make sense when it comes to external services, where a mock is truly useful sometimes
16:08technomancyotherwise you leak a lot
16:08jcromartieotherwise I prefer standard functions and data
16:09jcromartiewhat do you mean leak?
16:09technomancyjcromartie: as long as I don't have to maintain it
16:09technomancyjcromartie: Imean they'd have to carry around a bunch of unrelated junk
16:09mikerodtechnomancy: is there anywhere I could look to understand this more?
16:09jcromartiedoes with-redefs work across namespaces?
16:10technomancyjcromartie: sure
16:10mikerodI guess I have a fn being AOT compiled that closes over its environment during macroexpansion time
16:10technomancymikerod: not aware of any docs on the subject. this channel is surely your best resource =)
16:10mikerodI struggle to see a workaround, I was relying on the closure over the surrounding env
16:11mikerodand AOT compilation is necessary
16:11technomancyyou can get the closure via the implicit &env arg to macros, but not with functions
16:11jcromartieI see… with-redefs would likely fit the bill
16:11technomancysee my serializable-fn lib
16:11jcromartieI'll keep it in mind in the future
16:13mikerodtechnomancy: yes, I have seen the &env before hmm
16:14mikerodI'll bang my head against my desk on this one for a bit I guess. :)
16:14jcromartiebut then again, with protocols I can have different implementations of the services at the same time, while with-redefs is messing with globals
16:14jcromartieand globals are bad no?
16:14technomancyvars are globals
16:15technomancyas long as the extent of the changes are limited they're certainly easier to follow than protocols
16:16jcromartieyes and changing them for short periods of time seems flaky :)
16:16jcromartierather than treating them as permanent always-and-forever values
16:16jcromartieI prefer to think of top-level vars in namespaces as constants, with the option of temporary thread-local bindings. with-redefs seems like a pretty heavy hammer.
16:16jcromartiebut it works for a unit test
16:16zerokarmaleftat what point does dynamic (time) scope become an issue for with-redefs?
16:17jcromartieif I was running my app from a REPL and I ran my unit tests (which used with-redefs for mocks) it would break the app while the test ran
16:17technomancyI haven't run into any problems with them in practice
16:17jcromartiewhich while not likely to cause real (as in production server) problems is not great
16:18zerokarmalefthmm, I can't imagine that disrupting development workflow
16:18jcromartieI can imagine making a mess but I doubt it would really go bad :)
16:18technomancyI would take a bit of yuckiness in tests over making the implementation more complicated simply in order to make it testable any day
16:19jcromartiewell, my implementation went from having a ns full of functions operating on a map, to a namespace full of functions operating on a record
16:19jcromartieand you create the record with a constructor function that takes a map
16:19technomancyreloading issues around records are super annoying to track down in repl driven dev
16:19jcromartieyes they are
16:19jcromartiethat would be one thing
16:20stuartsierratools.namespace fixes that
16:21jcromartiebut then again if you are depending on with-redefs to mock external services then you have to mock everything that might be called by anything else, whereas providing a mock implementation as a record puts the mock in one tidy package
16:21technomancyeven if you save of a record in a one-off def?
16:21technomancyI do that all the time
16:21technomancy*off
16:21stuartsierradon't do that :)
16:21technomancyjcromartie: fixtrues are just functions
16:21devinusis anybody here using OrientDB?
16:21stuartsierrabut yes, it will lwork
16:21technomancystuartsierra: no.
16:22technomancyjcromartie: speaking of "one tidy package" I mean
16:22jcromartieyes
16:22technomancyin fact quite a bit tidier since they are scoped to just the tests
16:23jcromartieso would a reified mock service
16:23technomancybut you've still changed the behaviour of your impl just to support your tests
16:25logic_progdumbass question: what is the reason, in the context of cljs, why I have to define macros in *.clj files and can't define them in *.cljs files
16:27dobry-denSince Datomic isn't ideal for counters, what would be a simple way to keep track of viewcounts for posts in my database without bringing in something like a Redis dependency?
16:27vijaykiranosnr: http://stackoverflow.com/questions/18381052/why-clojurescript-macros-cant-be-written-in-clojurescript
16:27vijaykiranoops logic_prog ^^
16:27logic_progvijaykiran: nice, thanks!
16:27dobry-denThe simplest I could think of is an atom that stores a hash-map of post-ids and incs them. And this gets periodically serialized to viewcounts.edn
16:27mikerodtechnomancy: http://stackoverflow.com/questions/11191992/functions-with-closures-and-eval-in-clojure
16:28mikerodturns out there was already a stack issue on it
16:28dobry-den(I guess I would use an agent, rather)
16:28mikerodthat is comforting
16:28technomancyit's not really an eval issue
16:28mikerodmine isn't coming out of eval
16:28technomancyah, right
16:29mikerodit is the results of a fn call that is called during macro-expansion
16:29mikerodso it is hidden and sneaky, IMO
16:29mikerodI'm not doing this weird eval-syntax-quote thing
16:29technomancyI think I misread your first question
16:30mikerodI have to AOT some Clojure code where a macro, at expansion time, calls a function that returns a map pointing to some anonymous functions that close over their environment
16:31mikerodeh map pointing is wrong, I mean map with anonymous functions as vals
16:41jcromartiesomebody help me out… what's that macro that lets you define a name for the intermediate result of a bunch of forms?
16:41ProfpatschDoes the repl display the output of called Java classes?
16:41jcromartielike (_ it …)
16:41zerokarmaleftjcromartie: as->?
16:42jcromartieas!
16:42jcromartiewhere is that?
16:42technomancyProfpatsch: if they print to an outputstream that the repl is hooked up to.
16:43jcromartiezerokarmaleft: that's not in core right?
16:43jcromartiehm, it is
16:43technomancynot sure which repls reset System/out for you
16:43zerokarmaleftjcromartie: i think so
16:43Profpatschtechnomancy: stdout, stderr?
16:43zerokarmaleftjcromartie: rather, I think it *is* in core
16:43jcromartieI couldn't find it in clojuredocs or google
16:43technomancyProfpatsch: you can try writing to System/out to check for yourself
16:44maravillasit's newer than clojuredocs has
16:45Profpatschtechnomancy: Nope, (.println System/out "foobar") does nothing.
16:45ProfpatschHow to hook it up then?
16:45technomancyProfpatsch: technically it probably went somewhere you're just not looking
16:45technomancythere's something like a System/setOut maybe?
16:46technomancybeen a while
16:46Profpatschtechnomancy: Huh, aren’t you doing any Java interop?
16:46technomancynot doing much of anything these days
16:48ProfpatschHuh, too much maintaining leiningen?
16:48technomancywell, that sounds bad. I am not doing much clojure, but I am learning a hell of a lot.
16:49technomancyno, Leiningen is just really stable and mature
16:49technomancyhttps://github.com/heroku/logplex/pull/71 <- this whole week
16:50technomancyI am using records, and they are terrible!
16:50technomancy(erlang records, but still)
16:50ProfpatschHuh, Erlang. Not something you program everyday.
16:51ProfpatschEspecially at work.
16:51mikerodtechnomancy: https://gist.github.com/mrrodriguez/8046814
16:51mikerodin case you had any interest, this is what I was eluding to
16:51mikerodjust some dummy fn and macro combination to demonstrate
16:52mikerodI'm open to anyone else's insight on this issue as well :)
16:53arubinInteresting. IRCCloud displays gists inline.
16:54bitemyapparubin: that's pretty appealing.
16:54technomancymikerod: not really sure what you're intending there. wouldn't expect that to work.
16:54bitemyappI also like my macro images to be inlined.
16:54ProfpatschHm, not even (with-out-str) works for grabbing stdout in the repl …
16:54technomancybitemyapp: you must trust your co-workers more than I do
16:55technomancyProfpatsch: with-out-str operates on *out*, not System/out
16:56mikerodI don't know why you wouldn't expect it to work. It is a very simplified case.
16:56mikerod*though
16:57technomancyyou have a macro that returns a function object instead of a list that compiles to a function
16:58mikerodIn the case 2 example; I want the macro to return a map that has keys -> fn objects
16:59bitemyapptechnomancy: my coworkers are boring enough that I wouldn't worry. I'm the crazy one, remember?
16:59mikerodso making fn objects during macro-expansion and returning them = bad
16:59technomancybitemyapp: it'll rub off on them eventually
17:00bitemyapp>:)
17:01technomancymikerod: well the return value of the macro gets fed to the compiler
17:02mikerodI added a comment on the gist, where I did macroexpand-1 (to see what feeds to the compiler) ;= {:f #<user$get_map_of_fn$fn__10283 user$get_map_of_fn$fn__10283@7321803a>}
17:02mikerodAnd that fails
17:02mikerodwith the function having the closure
17:03mikerodI guess I can (try) to see that this is bad
17:04zerokarmalefttechnomancy: how would you recommend tracing execution of hook-fns added via robert-hooke?
17:04technomancyzerokarmaleft: if they're vars then c.t.trace should just work
17:04zerokarmalefttools.trace seems to break at the point of the hook
17:05technomancyon the hooked var or the hook?
17:05bitemyappclojure-py is pretty cool, if anyone has a need for something like that.
17:06zerokarmalefttechnomancy: the hook itself
17:06technomancyhm; sorry, I don't know
17:08pdk, (macroexpand-1 (-> 1 2 3 4))
17:08clojurebot#<ClassCastException java.lang.ClassCastException: java.lang.Long cannot be cast to clojure.lang.IFn>
17:08pdkwelp
17:08Profpatschtechnomancy: *out* should default to System/out, but *out* is a PrintWriter and System/out is a PrintStream in my repl
17:09ProfpatschCan I redirect System/out to the *out* PrintWriter somehow?
17:09mikerod,(macroexpand-1 '(-> 1 2 3 4))
17:09clojurebot(4 (3 (2 1)))
17:09ProfpatschLocally if possible.
17:10mikerodI'm not sure why clojurebot just fully expanded that macro
17:10mikerodpdk: You have to quote the form passed to macroexpand-1
17:10AeroNotixkind of new to clojure -- can I use leiningen to find local applications/libraries? Ala $GOPATH or $PYTHONPATH or w/e?
17:10mikerodunless it will be evaluated
17:12justin_smithAeroNotix: lein finds remote deps and installs them to a local archive, you can use lein install to add something to the local archive manually
17:13bitemyappAeroNotix: ls -alh ~/.m2/
17:13AeroNotixjustin_smith: say like I am developing a project locally and I also locally develop a library for it. Does it need to be a remote dependency too?
17:14justin_smithAeroNotix: no, you can use lein install to make it available locally
17:14justin_smithand lein uberjar to pack it up with the rest
17:14justin_smithbut it can be convenient to put it on clojars
17:15AeroNotixhmm, with quicklisp for common lisp you can do this. There's a directory which it scans for quicklisp enabled projects. Anythign like this with leiningen?
17:15technomancyAeroNotix: lein is more focused on ensuring everything works on a fresh checkout out of the box
17:16AeroNotixtechnomancy: what does that mean in this situation?
17:16AeroNotixQuickLisp works fine
17:16technomancyyou can add optimizations for local dev, but that's a step you do after correctly declaring things in :dependencies
17:16justin_smithAeroNotix: it works fine on whose box and after finding the deps how?
17:17AeroNotixjustin_smith: quicklisp is a managed set of repositories. There's an index which lists where dependencies live. (ql:quickload :project-name) then walks the dependencies and grabs them all.
17:17technomancyfrom what I've heard about $GOPATH, "works fine" is not really a good description
17:18AeroNotixPerhaps using it would be a better way to form an opinion.
17:18justin_smithAeroNotix: so if I had a checkout of your source project, that is all I would need? or would I need to go download a bunch of libraries by hand?
17:18AeroNotixjustin_smith: you need to have a quicklisp enabled system, yes. But that's similar to needing to have lein installed.
17:18technomancyhopefully that will never be necessary
17:18AeroNotixtechnomancy: what wouldn't be necessary?
17:19technomancybeing forced to write go at work
17:19AeroNotixI'm not getting into that conversation. You're arbitrary beef is your arbitrary beef.
17:19AeroNotixIt's a language which Clojure itself ripped off to good effect. Not sure where the problem is but whatevs.
17:19AeroNotixYou disliking it still doesn't make me understand lein any better.
17:20technomancyI've made an explicit choice to avoid the slopiness around go's dependency handling
17:20AeroNotixI don't care. I think I made that clear :)
17:20justin_smithAeroNotix: lein is a dpendency manager, it doesn't use a path, instead it uses mvn project coordinates for each project so versions can be installed in parallel
17:20AeroNotixjustin_smith: I see.
17:20technomancyprojects should declare everything they need in order to function
17:21AeroNotixtechnomancy: cool.
17:21AeroNotixjustin_smith: Do I need to understand mvn to use lein?
17:21technomancyif it's not declared in project.clj, it doesn't exist, basically
17:21AeroNotixtechnomancy: cool.
17:21justin_smithAeroNotix: lein generates a specific path for each artifact you need based on your dependency delcarations, and the recursive declarations generated for that
17:21justin_smithAeroNotix: you won't need to understand mvn
17:21AeroNotix(fwiw you demonstrably do not understand go's dependency tracking, technomancy but we'll leave it at that.)
17:22technomancynot worried, there is a huge pile of other reasons to avoid it
17:22AeroNotixjustin_smith: so how do local projects come into this? Are there some docs somewhere about that? I looked at some SO answers and it looked like there were some specific flags for local paths
17:22AeroNotixtechnomancy: cool.
17:22justin_smithAeroNotix: as I said, lein install will put the project in the current directory into the local repo cache
17:23justin_smiththen another project can declare a dep in order to find it
17:23AeroNotixjustin_smith: OHHHH!
17:23AeroNotixjustin_smith: I get it, I get it
17:23justin_smithhow many times did I say "lein install" ?
17:23AeroNotixjustin_smith: sorry, this is new to me
17:23technomancyso you have two projects, right? one of them is a lib? if you can put it on clojars, that will make things much easier.
17:23AeroNotixtechnomancy: baby steps
17:23AeroNotixalso, it may not be public code.
17:24justin_smithAeroNotix: a difference is that every dependency is versioned
17:24justin_smiththat is actually a huge benefit
17:24pdk, (macroexpand-1 '(-> 1 2)))
17:24clojurebot(2 1)
17:24pdk, (macroexpand-1 '(-> 1 2 3))
17:24clojurebot(3 (2 1))
17:24technomancyyeah lein is secretly an attempt to convince everyone to OSS their libs by making private repos a hassle. you heard it here first. =)
17:25AeroNotixtechnomancy: cool.
17:25akhudekAeroNotix: it's trivial to just locally install libraries for local dev
17:25akhudekAeroNotix: we do it all the time
17:26justin_smithakhudek: he may even know the command to do that by now
17:26AeroNotixjustin_smith: :)
17:28AeroNotixhmm this is pretty cool
17:29mikerodtechnomancy: you will make Richard Stallman proud
17:29justin_smithAeroNotix: the ability to select versions without having to uninstall anything or manually set a path is pretty nice, I am spoiled for other environments at this point
17:30AeroNotixisn't this just re-using java machinery?
17:30AeroNotixe.g. mvn
17:30justin_smithyes, but edn instead of xml is a nice bonus
17:30justin_smithand it is more succinct
17:30hyPiRionwell, clojure, rather.
17:31Bronsamikerod: you will make RMS mad at you for confusing Open Source with Free Software
17:31technomancymikerod: it's the least I could do after the whole "writing Emacs" thing.
17:31justin_smithAeroNotix: I am not saying no other language has it, but from what I have seen none has it quite as simple
17:31AeroNotixcool ok
17:31mikerodthat's true, way to give back
17:32mikerodor perhaps it is pay it forward
17:32technomancynpm has a neat thing where you can trivially isolate dependency trees due to the way js modules work
17:32technomancyyou can't do that for java since packages aren't first-class
17:32TimMcBronsa: Not even that; you could still have binary blobs in a public place without having the source there.
17:32technomancyand doing it for clojure without doing it for java is kinda pointless =\
17:35technomancyAeroNotix: but yeah, maven built some very good foundations we're sitting upon. not too keen on how their builds work, but their repo infrastructure is great.
17:35AeroNotixtechnomancy: cool
17:36technomancyI admit I would have made several design mistakes due to my rubygems background if some of those decisions hadn't already been made for me. =)
17:36akhudekthe only thing that would make mvn better would be the ability to use multiple version of one library in one project
17:37technomancyakhudek: it's not really Maven's faund that Java packages are half-assed tohugh
17:37akhudekvery true
17:37TimMcakhudek: I suspect that was omitted because Java doesn't generally allow for that.
17:37technomancyfault
17:37technomancygeez, my fingers
17:37TimMcEven though Maven "isn't just for Java".
17:38AeroNotixso let's say I just `lein install'd something. I fire up a repl, will it be able to access that repo? Or does it need `lein repl'?
17:38technomancyTimMc: well, that brokenness is baked in pretty deep
17:38justin_smithAeroNotix: with alembic or pomegranate it can find and load that lib
17:38justin_smithAeroNotix: but it is often easier to make a project.clj that declares the dep
17:39AeroNotixand *then* `lein repl' in the other project?
17:39technomancyAeroNotix: tl;dr: no, but if the project.clj hasn't changed you can use lein's checkout-deps feature to pick up changes in a library's working copy without restarting the repl
17:39justin_smithright, then require the dep
17:39technomancy(assuming you've already added it to :dependencies)
17:39justin_smithhttps://github.com/pallet/alembic
17:39AeroNotixcool, ok
17:40AeroNotixso basically, I can't just fire up a REPL and find the local cache of stuff without some third-party things.
17:40AeroNotixala Python REPLs
17:40technomancy`lein help faq` tells you about checkout deps
17:40AeroNotixreading
17:40technomancy...I think
17:41justin_smithtechnomancy: I think he is just asking about finding something in a repl after a lein install
17:41justin_smithunless I misunderstand
17:41AeroNotixthat's correct justin_smith
17:41Profpatschtechnomancy: I guess I have to redefine System.out to *out*. However, System/out is static. Is there a way to redefine that in Clojure?
17:42justin_smithAeroNotix: I think technomancy was trying to tell you how to do something more complex
17:42AeroNotixprobably
17:42technomancycheckout deps confuse everyone, so I was pre-emptively over-explaining
17:43technomancyProfpatsch: not sure off the top of my head, but you're on the right track it sounds like
17:43AeroNotixI just want to have a project of code which I import via the repl.. can it be done?
17:44technomancyjust do the `lein install; restart the repl` thing till you get the hang of that
17:44technomancythen once you get tired of having to restart the repl, read up on cehckout deps
17:44AeroNotixso when I `lein install' ALL repls have access to this via the local cache?
17:45justin_smithif it is referenced in project.clj or you use alembic or the like, yes
17:45AeroNotixok. So not just any random repl
17:45technomancy`lein install` means "put this in the local repo"
17:45technomancyso it means that any project on your machine can declare it in project.clj
17:46technomancyas if it were a published dependency on clojars or whatever
17:46justin_smithAeroNotix: a key here is there is no implicit dependency (though there is recursive dependency). Every dependency is declared somewhere.
17:46AeroNotixhmm
17:46justin_smithAeroNotix: though there are workarounds like adding deps to profiles.clj if you want it in every repl
17:46bitemyappyeah so if you want to use Datomic with Python, seriously consider clojure-py.
17:47justin_smithor as I mentioned there are libs that find and resolve and import deps at runtime
17:47AeroNotixok thanks
17:52AeroNotixahaaaa, I got it.
17:53AeroNotixso, if I wanted to. I could use profiles.clj to have a similar workflow to what I get in other languages (a global set of repositories) by dynamically adding the deps in the profiles.clj
17:53AeroNotixwhilst also maintaining dependency happiness with the project's project.clj
17:55technomancyyeah, typically you would do that with dev tools that the project doesn't actually depend on
17:55justin_smithAeroNotix: well I would do it by adding a dep on alembic to profiles.clj
17:55justin_smithAeroNotix: but only finding deps explicitly is a huge benefit
17:55technomancyprofilers, debuggers, refactoring tools, etc
17:55justin_smithAeroNotix: it makes deployment and sharing code much simpler
17:56AeroNotixjustin_smith: if the dependencies are listed properly with project.clj how does that affect things if profiles.clj also has dependencies. Do the deps in profiles.clj get included, too?
17:57justin_smithAeroNotix: only one version of a dep will be pulled in, project.clj should override profiles.clj
17:57justin_smiththey are merged
17:57technomancythe lists get merged. if there's overlap it can be problematic though.
17:57technomancyyou can see the full thing with `lein deps :tree`
17:57AeroNotixohh, I thought the profiles.clj dependencies were separate.
17:58technomancy`lein with-profile production deps :tree` for the "pristine" deps
17:58AeroNotixthanks all
18:14jcromartiealright technomancy: you've convinced me
18:15technomancycool; your next mission is to use clojure.core/when for side-effects, not just for when you have a single-branch condition
18:16bitemyappooooohhhh monad comprehensions
18:16AeroNotixnice using # in macros for gensym. Nice touch
18:16bitemyapptechnomancy: monad comprehensions would be nice in OCaml Async.
18:25technomancyI believe you but don't know what to do with this knowledge.
18:25bitemyapptechnomancy: hum. Does OCaml have list comprehensions?
18:25bitemyappthe syntax in Haskell is repurposeable.
18:26technomancynot sure; I always just use map/iter
18:26bitemyappyeah but I mean generalizing to monads
18:27technomancydunno; I've only ever used two monads on purpose, and one of them was called "The GitHub Monad"
18:28shep-homeAfter watching http://vimeo.com/68383317, my interest in quickcheck and friends is renewed
18:28shep-homemostly because I realized that my generated data can be a sequence of functions that are applied to an initial state
18:29shep-homewhich led me to try it out. It works, but I was less-than-enthused with the output from failing cases
18:29shep-homeIs there some better string representation of functions that would help me here?
18:29shep-homeOr perhaps some tweak to simple-check?
18:30akurilinOh man, exciting day in clojureland today.
18:30akurilinGreat post there dnolen .
18:30shep-homeFor example, ":smallest [1 (#<core$partial$fn__4190 clojure.core$partial$fn__4190@71a40dde>)]" is not helping me narrow down the problem i have introduced
18:37edwHey guys, I pushed a little library in Clojure that allows folks to use etcd for configuration using the same interface they'd normally access environment variables, making development and deployment of Clojure apps on CoreOS simpler. <https://github.com/edw/scallion&gt;
18:39pdktonight is a mini accomplishment
18:39pdkported -> and ->> to common without them overflowing stack or giving stupid results
18:43devndnolen: the link to "Source" in your TODOMvc clone points at tastejs's github repo
18:44devnJust an FYI
18:47logic_progdo atoms have almost no overhead in cljs because javascript is single threaded?
18:52edwlogic_prog: One would hope that you're mostly deref-ing atoms and not modifying them. It's probably the difference between writing "x + 1" and "x[0] + 1" in terms of time and space.
18:53logic_progI need to have a global queue
18:53logic_progI'm using (atom []) to simulate it
18:53logic_progshould I be doing something else?
18:53edwBeen there.
18:53logic_progI was goign to use core.async, ... but core.async has a limit on # of elements on the chan
18:53logic_progedw: what did you end up doing?
18:53logic_progalso, I have no idea the difference between "x+1" and "x[0]+1"
18:54edwProbably quite small.
18:54logic_progdoesn't x+1 and x[0]+1 mean semantically different thigns
18:54logic_progwhen x is a vector?
18:55edwlogic_prog: Yeah. In the first case, x would be your queue, in the second, x is an array, the first and only element of which is your queue.
18:56weavejesterDoes anyone know if there are any issues with using Austin with the latests Clojurescript/
18:57edwI'm very unfamiliar with the performance promises (if any) that JS runtimes give you about performance of adding or deleted single items from the front and/or back of an array. I'd think you could just use pop(), push(), shift(), and unshift() JS methods directly.
18:57weavejesterAh, actually, looking at the source code I might be missing a configuration option
19:01weavejesterHm, that didn't work either...
19:02weavejesterIs anyone using anything other than Austin for cljs REPLs?
19:03shep-homereiddraper: https://gist.github.com/shepmaster/8048392 -- an example of the output that I am getting with simple-check
19:03shep-homePretty nice tool :-)
19:03shep-homeThanks for your work on it!
19:05justin_smithshep-home: one thing that often helps is using named anonymous functions when possible. This comes up with trying to decipher stacktraces too
19:07bitemyappweavejester: what's your impression of Hoplon so far?
19:08weavejesterbitemyapp: I'd hesitate to offer an opinion as I'm not that well-versed in ClojureScript dev as yet.
19:08bitemyappweavejester: I'm a little more so, I'm trying to figure out if it's solving the two-way binding problem or something bigger than that.
19:08bitemyappI need to get noprompt to look at this.
19:08weavejesterI'm still trying to set up a cljs environment for my first cljs library :)
19:09nopromptwhat's?
19:09bitemyappso far it looks like it's eval + two-way binding + stateful vars getting smashed over and over.
19:09bitemyappnoprompt: http://hoplon.io
19:09weavejesterWithout much luck, I might add...
19:09bitemyappno event stream/core.async/FRP though.
19:09nopromptbitemyapp: oh yes, i've seen this. a while back.
19:09bitemyappnoprompt: are my impressions accurate?
19:09bitemyappDOM event streams smashing var state?
19:09weavejesterI'm unable to get a REPL up that can load in any code. And I get weird warning messages.
19:10nopromptbitemyapp: i haven't looked at the code however.
19:11reiddrapershep-home: yeah, you definitely bring up a good point, and some custom output for when a test fails is on the roadmap. you wanna file an issue about it so it can be public?
19:11weavejesterDoes anyone happen to have an example of a working cljs environment with a REPL?
19:11bitemyappweavejester: https://github.com/swannodette/mies
19:12technomancyit's really distressing that people are asking that question in what is nearly 2014 =\
19:12weavejesterbitemyapp: I can get that far, but I can't get a good REPL working.
19:13bitemyapptechnomancy: more distressing that those best positioned to solve the problem have made a habit of denying there's a problem.
19:13weavejesterSo "lein trampoline cljsbuild repl" works
19:13weavejesterBut I was trying to use something tied in with nREPL
19:13bitemyappweavejester: getting brepl/austin REPL working is a "building your lightsaber" rite of passage for CLJS.
19:13technomancyespecially coming from someone who has been doing clojure web programming since before I even heard of clojure
19:13weavejesterLike piggyback or austin
19:13weavejesterI do feel very much like a newcomer to cljs :)
19:14bitemyappweavejester: https://github.com/cemerick/austin/tree/master/browser-connected-repl-sample this is the example project for austin.
19:14weavejesterIronically I've avoided it for so long precisely because it seemed so hard to set up and so tricky to debug.
19:14bitemyappthe debugging story is better than Clojure once you actually get it working
19:14shep-homejustin_smith: good call. Unfortunately, it doesn't help that much. Also, I'd really like to have the arguments included
19:14bitemyappspoiled bastards have a stepping debugger.
19:14weavejesterbitemyapp: Yeah, I've looked at that, too. But I can't get the (ns blah (:require ...))
19:14weavejesterto work
19:15shep-homereiddraper: can do. You want an issue for the generic (custom output) or the specific (partial functions)?
19:16reiddrapershep-home: custom output please, not sure there is much we can do for printing functions. but feel free to motivate with that specific case
19:16weavejesterAustin also gives a strange warning: "WARNING: Symbol IDeref is not a protocol"
19:16shep-homeYup
19:16weavejesterWhich isn't present when I run the REPL through Rhino
19:17bitemyappweavejester: can mostly ignore the warning IIRC
19:17justin_smithshep-home: well (fn invert [x & args] (apply - x args)) will print more readably than #(partial - %) and does the same thing
19:17weavejesterbitemyapp: Oh, okay
19:17justin_smithinvert is a terrible name for it though
19:17bitemyappweavejester: what's the actual error/problem?
19:18weavejesterbitemyapp: I'll just gist it...
19:18bitemyappeggscellent.
19:18weavejesterbitemyapp: https://gist.github.com/weavejester/8048564
19:19weavejesterMaybe it's because I'm not using "src" for my cljs?
19:19weavejesterExcept the warning implies it did load it up.
19:20bitemyappweavejester: lein-cljsbuild has special source dir / prefix parameters.
19:20bitemyappweavejester: you need to specify them so it knows where to find your namespaces.
19:20bitemyappfair warning: I write clojurescript approximately once a month. I've actually written more clojure-py than CLJS in the last 30 day interval.
19:21weavejesterbitemyapp: Oh, cljsbuild works fine. Let me show you the branch
19:21weavejesterhttps://github.com/weavejester/reagi/tree/clojurescript
19:21bitemyappweavejester: "works fine" is relative, you could be working with a brepl that doesn't have your namespaces rolled in.
19:22weavejesterbitemyapp: Well, what I mean is that it compiles and works with "lein trampoline cljsbuild repl"
19:22weavejesterActually, let me just double-check that.
19:22bitemyappweavejester: well, normally it wouldn't matter, but yeah, IDeref isn't a protocol.
19:23weavejesterbitemyapp: what is it?
19:23weavejesterI know in Clojure it's an interface.
19:24weavejesterBut in cljs?
19:24bitemyappweavejester: do something for me first, unfuck that code long enough to test accessing your namespace as if it was a dumb one with a hello-world inside of it
19:24bitemyappweavejester: get that working first, then we can broach the subject of your deftype.
19:25bitemyappone thing at a time.
19:25bitemyapp(defn muh-fn [] (println "lol"))
19:25weavejesterOkay - hang on, rhino-repl is still loading.
19:25bitemyappI want to get your namespace loading and working in Austin.
19:26bitemyappsince that's the workflow you'd most likely want to work with long term.
19:26weavejesterYeah.
19:26bitemyappwhen you mentioned the warning, I thought it was those generic ones you get sometimes when firing up a CLJS repl, I didn't know you were depending on that actual behavior in your code.
19:26weavejesterConfirmed it all works fine with rhino-repl
19:27weavejesterYeah, I assumed IDeref was a protocol, since: https://github.com/weavejester/reagi/tree/clojurescript
19:27bitemyappk, comment out the deftype/protocol crap
19:27weavejesterOops, I mean: https://github.com/clojure/clojurescript/blob/master/src/cljs/cljs/core.cljs#L274
19:27bitemyapptry calling a hello-world fn from your namespace in austin
19:27bitemyappweavejester: In CLJS-land, nothing is true and everything is permitted.
19:28weavejesterOkay
19:28weavejesterJust got one function now: (defn hello [] "Hello world")
19:28bitemyappperfekt.
19:28bitemyappand requiring + invoking does?
19:29weavejesterJust checking. Wiped my out and target dirs, starting up lein repl
19:31bitemyappweavejester: in case you end up needing this information, I've started using clojure-py at work and it's pretty credible.
19:33weavejesterbitemyapp: https://gist.github.com/weavejester/8048656
19:33weavejesterNo joy
19:33weavejesterSame error as before
19:34shep-homereiddraper: done, thanks! https://github.com/reiddraper/simple-check/issues/45
19:34weavejesterI'll try wiping out .repl, then restart. See if it's something wrong with temporary files left around.
19:35shep-homeNow that I've done the hard part of creating the issue, I've no doubt it will be fixed soon :-)
19:37shep-homejustin_smith: is there a way I can do (fn (...construct-a-name...) []) ?
19:39reiddraper@shep-home much appreciated
19:40weavejesterNope, same problem
19:41weavejesterAlthough there's no sign of my function in "out" or ".repl"
19:41Raynesshep-home: You'd need a macro for that.
19:41weavejestercljsbuild compiled it correctly into "target/main.js"
19:41weavejesterBut I don't know how Austin knows about that.
19:41bitemyappweavejester: nuts.
19:43weavejesterbitemyapp: Maybe Austin assumes a source path of src/cljs ?
19:43shep-homeRaynes: yeah, I found a mailing list post and was skimming through that. Thanks!
19:43bitemyappweavejester: I think it only cares about the build artifact from cljsbuild.
19:44weavejesterbitemyapp: But how does it know where cljsbuild put it?
19:44bitemyappweavejester: why isn't austin in your profile plugins?
19:44bitemyappweavejester: also set optimizations to simple
19:45weavejesterbitemyapp: Well, it wouldn't make any difference if it was in profile plugins or at the top level.
19:53weavejesterbitemyapp: setting optimizations to simple doesn't work. I'm taking the config from the sample app directly now. Then I'll try changing directories.
20:03Bronsatechnomancy: ping
20:06weavejesterHm, now my system is dying. brb
20:07technomancyBronsa: hi
20:09Bronsatechnomancy: hi :), I'm trying a branch of tools.analyzer.jvm which requires core.memoize 0.5.6, unfortunately when I try to use "lein eastwood" (a linter that now uses t.analyzer) it crashes because it looks like an older version of core.cache than what core.memoize 0.5.6 needs is in leiningen's process
20:11technomancyBronsa: huh, so the analyzer doesn't run in project-space?
20:12Bronsatechnomancy: I'm.. not really familiar with how plugins work in leiningen, are you saying I should look at the dependency issue in eastwood's dependencies?
20:14technomancywe can bump the version in Leiningen, but I don't have any plans to cut a release in the near future. doing as much as possible in the project's JVM isolates you from problems lik ethis though.
20:14technomancyI guess the analyzer doesn't need to actually eval any code or access any dependencies?
20:15technomancyso technically it could run in either (modulo dependency conflicts)
20:15technomancyand running inside Leiningen's own process is certainly faster
20:17Bronsahm, ok so removing the :eval-in-leiningen true solved the issuse, I guess we'll go with that for now
20:18technomancyoh, I see. eastwood uses eval-in-project, but for plugin projects that's not going to help?
20:22Bronsatechnomancy: I honestly have no idea on how leiningen plugins works and what the eastwood one does. I'll let Andy or jonase handle this, sorry for bothering you
20:23technomancyI would definitely recommend removing :eval-in-leiningen unless you are writing a plugin.
20:24Bronsatechnomancy: eastwood is a plugin
20:25technomancyoh I see; the plugin needs the analyzer; you're not hacking on the analyzer itself
20:26technomancyyeah, it is pretty silly that Leiningen pulls in core.cache just for its templating engine, which is pretty much guaranteed to not need it =\
20:27weavejesterHum, I'm giving up on trying to get ClojureScript to work for now.
20:28weavejesterI'll need to ask how people actually develop in ClojureScript on the mailing list. It's not nearly as straightforward as Clojure.
20:31technomancyBronsa: feel free to inc: https://github.com/davidsantiago/stencil/issues/18 =)
20:31logic_progargh
20:31logic_proghow do I do macro expansion in cljs?
20:32logic_progim getting errors of not ffinding cljs.compiler and cljs.analyzer
20:32Bronsatechnomancy: one-upped, thanks
20:32technomancyBronsa: I'm sure the debian folks would love that too
20:33Bronsatechnomancy: are they packaging lein?
20:33technomancyyeah, they are pretty close to getting 2.x into sid it sounds like
20:34BronsaThat made me die a little inside
20:36technomancythe fact that it currently ships 1.x?
20:36technomancyapparently there was a ton of cleanup they had to do
20:37technomancylots of projects that don't ship with license files; some with internally inconsistent licensing
20:39weavejesterAHA!
20:40weavejesterThe undocumented configuration option I was missing was to set the :source-paths to Clojure and ClojureScript
20:40weavejester:source-paths ["src" "src-cljs"]
20:51technomancyit doesn't let you put them both in src/?
20:52hiredmantechnomancy: you can
20:54hiredmanhe isn't clear about the option though, because while lein has a :source-path(s) so does cljsbuild
20:54hiredmannot sure how or if they overlap
20:54hiredmancljsbuild's is certainly mentioned in the readme too
21:39seangroveWhat's the difference between :foreign-libs and :preamble for cljsbuild?
21:50OldTreeHi, clojure-noob here, was reading through source of "juxt" when I saw "reduce1." (doc reduce1) evaluates to nil, but I found one site that places reduce1 in clojure.core, clodoc.org. I'd appreciate any info on it.
21:59alandipertdnolen: nice work re: om! curious about https://github.com/swannodette/om/issues/9 - is this complection part of why react is so fast?
22:03seangroveOldTree: reduce1 is defined in the same file on line 882
22:04OldTreethanks
22:22dobladezAny suggestions for a CI solution for a Clojure + JavaScript project ?
22:23seangrovedobladez: CircleCI + Phantom/Sauce Labs via WebDriver?
22:24seangrove+ clojure.test + cemerick/clojurescript.test, depending on what kind of tests
22:24dobladezsounds like an option, thanks
22:24dobladezdo you have experience with CircleCI ?
22:24dobladezvs., say, Jenkins ?
22:24seangroveSure, used both
22:25seangroveAlso, worked at Sauce for quite awhile, so a bit biased in that regard
22:25dobladezgreat... so, any pros/cons between Circle and Jenkins ?
22:27seangroveSame argument with Heroku vs Linode. Circle is slick, pretty easy to get setup, and you don't have to worry about it. And when they add things on, they do it in a sustainable way. Jenkins has a much more vast ecosystem of varying quality, it takes longer to tweak and get right, but it very flexible and you can really drill down into the box running it.
22:39bitemyapparrdem: mumbur?
22:40arrdembitemyapp: yeah hang on glue in hand building minis
22:48bitemyappsolid evening.
22:48arrdemiknowrite
22:49bitemyapparrdem: do you like tactical shooters?
22:49arrdembitemyapp: I mean I played MWO, but I don't usually go in for milsims
22:50bitemyapparrdem: hum, what I'm thinking of is more realistic than CounterStrike, but similarly structured - but more fun and focused than ArmA
22:50bitemyappit's on sale.
22:50bitemyappI've been playing it for 4-5 years, they have a new early access thing.
22:50arrdembitemyapp: title?
23:23SegFaultAXdobladez: I've used CircleCI and Jenkins extensively, let me know if you have any questions.
23:25dobladezSegFaultAX: I have quite a bit of experience with Jenkins (from past Java projects)... just wondered if it's easy to make it work with lein and the rest of the Clojure and JavaScript testing ecosystem
23:25dobladezso, was looking for recommendations/caveats or other options besides Jenkins and CircleCI
23:27SegFaultAXdobladez: It's trivial to make Clojure projects work with Jenkins.
23:27SegFaultAXEspecially if you've done it with a similar build system before.
23:27dobladezgreat
23:27dobladezI see there's a leiningen plugin for it
23:28SegFaultAXCircleCI is /really/ expensive, and the UI, while pretty, has some pretty big issues.
23:29SegFaultAXOne of our biggest annoyances with Circle in general was a) it ran builds pretty slowly b) it didn't do a good job of collapsing enqueued jobs for multiple commits on the same branch.
23:29dobladezso, with Jenkins is it easy to capture test runs from, say, Midje ?
23:29SegFaultAXYes. Just archive the artifacts (which includes stdout)
23:30SegFaultAXThen you can go back and look at the at your leisure.
23:30SegFaultAXWe initially started using Circle as a stopgap while we looked for a permanent CI solution. We didn't really realize how expensive it would be.
23:30dobladezoh with "capture" I just meant to auto-detect build failures with at least some minimal reporting about it
23:31SegFaultAXIn the end we just built two custom machines with lots of ram and CPU.
23:31SegFaultAXdobladez: The easy way to do that is return a non-zero exit code.
23:31SegFaultAXJenkins has extensive reporting and tracking features.
23:32dobladezright. OK... looks like I'll play with Circle a bit... (has a 14-day trial)... but knowning I might endup with my own Jenkins on Digital Ocean
23:32SegFaultAXUgh. How big is the sweet?
23:32SegFaultAXI would say don't do cloud-based CI.
23:33SegFaultAXIf you can avoid it.
23:33SegFaultAXOur suite is mid-sized, maybe 13 - 17k tests. It took like 24 - 30 minutes per run on Circle.
23:33SegFaultAX~16 on dedicated boxes ($800 each)
23:33clojurebotExcuse me?
23:34dobladezwell... it's a small project... we are only 1.5 developers... and we don't own (nor plan to purchase) hardware
23:35SegFaultAXOh, well then whatever works.
23:35SegFaultAXProbably circle will be fine.
23:35SegFaultAXOr travis.
23:36dobladeztravis is much more expensive it seems
23:37SegFaultAXJust use whatever works to get CI going.
23:37dobladezWhat I like about a custom Jenkins is that with DigitalOcean I can probably start fine with the $5/mo. option... and easily bump it if needed... and if that ever becomes slow, simply move the installation to local hardware
23:37SegFaultAXFor small projects it mostly doesn't matter, and the costs of switching is low.
23:39SegFaultAXdobladez: Yea, plus it's easy to slave builds with Jenkins.
23:39dobladezSegFaultAX: curious: what are you working on? looks like a pretty big Clojure project
23:40SegFaultAXdobladez: Well the big one I'm referring to is Rails.
23:40dobladezah, ok
23:43SegFaultAXdobladez: One thing I've been thinking about for a while is using Jenkins to run builds inside of docker.
23:44dobladezyep... I think there's already support for that
23:45dobladezon a prior project, we configured it with an internal "cloud" (CloudStack) using Jenkins' jclouds plugin (if I remember correctly)
23:45dobladezso, it launched new slaves as need
23:45dobladezdocker containers are much faster to start though... perfect fit
23:55SegFaultAXdobladez: Yea, that's pretty awesome.
23:56dobladezSegFaultAX: gotta go... 2am here. thanks again