#clojure logs

2013-01-10

00:09arrdemyou could modify this to show value changes...
00:09arrdembut (gensym) would be involved.
00:10gtrakwell, the solution I'm thinking of is to let clojure manipulate the forms, not paredit
00:10arrdemhaha that'll be a good start
00:15blackdogis there a reason (doc :>) doesn't work?
00:15blackdoghow do you look up symbols?
00:15gtrak,(doc +)
00:15clojurebot"([] [x] [x y] [x y & more]); Returns the sum of nums. (+) returns 0. Does not auto-promote longs, will throw on overflow. See also: +'"
00:15gtrak,`doc
00:15clojurebotclojure.repl/doc
00:16gtrakmight be a clue
00:16arrdem,(cons :foo #{:bar :bas})
00:16clojurebot(:foo :bas :bar)
00:17gtrakha
00:17arrdemherm.
00:17gtrak,(second (cons :foo #{:bar :bas}))
00:17clojurebot:bas
00:17gtrak:-D
00:17blackdoggtrak: ah, i think i see what's going on. it's just a symbol, and there's some cascalog macro that does something evil/clever with it
00:18gtrakcascalog is mostly cleverness, so I don't doubt it
00:18blackdoggtrak: so i'm gathering :)
00:19gtrakcascading on its own makes me poke my eyes out
00:20gtrakbut I suppose it's better than straight map-reduce
00:23tomojwhoa
00:25tomojdatomic.db/->Datum looks like a customized record constructor
00:25gtrakoooo
00:25tomojits last arg is a number which gets converted into a boolean in the Datum
00:26tomojoh, no
00:26gtrak*when* in evaluation do those get created? right after a defrecord? I honestly don't know.
00:26tomojit's just a custom ILookup and custom printed repr
00:26gtrakah
00:26tomojright at the end of the macroexpansion of defrecord
00:26gtrakI wonder if you could wrap one and give it the same name, though
00:27gtrakI can't think of why not
00:27gtrakah, it's just a defn
00:31arrdemOkay. I'm being too clever for my own good, but this'll print temporary values from rebindings as well. https://www.refheap.com/paste/8315
00:31gtrakhahaha
00:32gtrakyea, that's totally incomprehensible
00:32gtrakit should be in core
00:32arrdemhaha. what's illegible about it? seems obvious to me...
00:32gtrakwell, b/c you wrote it
00:32arrdemthere is that.
00:34gtrakvec's nice instead of apply vector..
00:34mattmoss&(*(+(*)(*)(*))(-(*(+(*)(*))(+(*)(*))(+(*)(*)))(*))(+(*)(*)))
00:34lazybot⇒ 42
00:35loliveirahow do I perform
00:36loliveirahow do I perform a multiiple insert using clojure.java.jdbc?
00:38jkkramerloliveira: insert-records
00:38loliveirait is only possible when each value is passed to insert function.
00:39gtrakhuh, I was hoping datomic was flexible wrt lucene.. disappointed, going manual..
00:39loliveira(sql/insert-values :x [:a :b] [1 2] [3 4]) is ok but (sql/insert-values :x some-vector) not.
00:40jkkramerloliveira: (apply sql/insert-rows :x [:a :b] collection-of-rows)
00:41gtrakarrdem: I see, you so you just rename the symbols if they're rebound
00:42jkkramerinsert-values, rather
00:42arrdemgtrak: I don't rename... I create a new "intermediate state" one which will preserve the value to be destroyed and then faitfully include the rebinding
00:43arrdemso [a 1 a 2] -> [a 1 a_rebinding_1 a a 2]
00:43gtrakah, yea
00:45loliveiragtrak: ty. i will try.
00:46gtrakloliveira: think you meant jkkramer
00:46loliveira=)
00:46loliveirajkkramer: ty
00:49loliveirajkkramer: it worked. ty.
00:54arrdemgtrak: alternate implementation... thoughts? https://www.refheap.com/paste/8318
00:55arrdemI'm concerned that it'll suck because I recalculate the frequencies map every itteration but I don't know how much of that Clojure'll optimize out.
00:55gtrakarrdem: if it happens at compile time, then it'll just slow down compile
00:56gtrakso, read, macro-expand... then you've got just code... so the let bindings in the end map to locals, no cost
00:57arrdemat runtime sure.
00:57arrdembut in something "large"... this is gonna be O(N!)
00:57gtrakhaha
00:57gtrakmeh
00:57gtrakit's good to have the dirtiness grow proportionately on multiple axes
00:58gtrakconsistency :-)
00:59gtrakclojure doesn't optimize much really
00:59arrdemwell.. no.. O(1/2 x^2)
01:00gtrakit mostly just relies on the JIT and not doing bad things in code-gen
01:00gtrakI guess with the exception of primitives
01:01gtrakthe compiler's only aware of special forms
01:02gtraki think there's gotta be a limit on how many locals in a stack frame
01:03arrdemright... but it should be frikkin huge
01:03arrdemcouple hundred ish
01:05arrdemOkay... so 255 is the limit for java function arguments...
01:10arrdemOkay... well (print-let (vec (interpose (map gensym (range 1000)) (repeat 1)))) has had over two minuted of compute time I'll call that dead
01:13gtrakbut is it web-scale?
01:13arrdemgtrak: probably not... I'm kicking and it's still down
01:19augustlis there a good way to process just the values of a map?
01:19augustlI did a group-by, but now I need to process the values before I'm done
01:19augustlI need to do the grouping first for the processing to make sense
01:20arrdem,(vals {:foo [:bar :baz] :bung [ 2 3 4 ]})
01:20clojurebot([:bar :baz] [2 3 4])
01:21tomojdon't think of anything better
01:21augustlI should also mention that I need to return a map :)
01:21augustlso {:foo 1 :bar 2} should essentially return {:foo (process 1) :bar (process 2)}
01:22tomojI wish it were (r/map process {:foo 1 :bar 2})
01:22tomojbut that doesn't work
01:22gtrakaugustl: seq functions and into are your friend
01:22augustlI usually use zipmap, but then I need to assign the map to something :)
01:22arrdemtomoj: all I've got is a nested function application...
01:23tomojoh, I thought you were someone else
01:23tomojand thought you had a different question
01:23tomojoh
01:23gtrak,(into {} (for [[k v] {:a 1 :b 2 :c 3}] [k (inc v)]))
01:23tomojnevermind :)
01:23clojurebot{:a 2, :c 4, :b 3}
01:24arrdem(inc gtrak)
01:24lazybot⇒ 5
01:25arrdemgtrak: I fixed an infinite sequence issue and now (let) and my rebinder are handling 10,000 symbol lets manfully
01:25arrdemerp no that's a stackoverflow.
01:25gtrakah, neat
01:25gtrakhopefully that's more than you can read
01:25arrdemas is 5k....
01:25arrdem2k is OK
01:25ivan(defn mapvals [f m] (into {} (map (fn [[k v]] [k (f v)]) m)))
01:26arrdem3k is OK
01:26arrdem.... oh I was using the fast (loop) one.
01:26arrdemlemme try the (reduce)
01:27gtrakivan: for makes you look more l33t
01:27arrdemgtrak: yeah 3k worked with the (reduce) but took about half a second instead of being instant
01:28arrdemholy shit
01:28gtrakarrdem: sounds like locals
01:29gtrakwell, I can't tell what's slowing it down specifically
01:29arrdemanyone got a better stress-test idea than (rebinding-expand (vec (take 3000 (interleave (repeat `foo) (repeat 1))))) ?
01:29gtrakarrdem: why do you avoid frequencies in the the loop-recur?
01:30arrdemgtrak: because in the loop-recur I build the frequencies map by hand
01:30arrdemif I processed a previously seen sym I (inc) it...
01:30arrdemand if I haven't seen it I set it's count to 1
01:31gtrakah, you could probably pass that around in your accumulator then pull it out in the end
01:31ivanclojurebot: why is startup slow is busy compiling the `for` macroexpansion
01:31clojurebotOk.
01:33arrdemgtrak: is the (reduce) really sufficiently more readable that you would hack it into what is, in terms of datastructures exactly the loop-recur?
01:34arrdemI mean there's no appreciable speed difference between the two on a "modern" pc for any sane number of symbols so it just comes down to style.
01:34gtrakit's equivalent, reduce is closer to the data side of code is data
01:35gtrakand has some built in benefits, like 'reductions'
01:36gtrakreifying a computation into a seq is what lazy seqs are all about
01:36arrdemright... but by nature this isn't a lazy seq.
01:36gtraksure
01:36gtrakif looking at it as data is useless, then it's not worth the effort :-)
01:37arrdemidk. this whole thing is just an "exercise for the reader" don't mean to harp on about it.
01:37arrdemhaha if only all languages were as pragmatic...
01:37gtrakuseless and interesting :-)
01:38arrdemwell IDK about useless... I intend to use that let-print but the rebinding-expand is me being silly.
02:44dyresharkdoes clojure have a way to check to see if two lists contain the same elements, regardless of order? i.e. (foo '(1 2 3 4) '(4 2 3 1)) ; => true
02:47tomojno
02:47tomojregardless of order and multiplicity or just order?
02:47tomojfor the former, #(apply = (map set %&))
02:47tomojfor the latter, I guess #(apply = (map frequencies %&))
02:51pppaulhello
02:51pppaulwhat clojure books are easiest to digest?
03:06amalloye-books. paper is too pulpy
03:07Raynesamalloy: Thank you, man.
03:07Raynesamalloy: I'll never understand people's fascination with paper books.
03:08RaynesI have no desire to own a paper programming book.
03:08amalloy<3 paper books
03:08RaynesWhy though?
03:09pppaulthey taste better
03:09arcatanfor non-fiction books, i like the ease of browsing the book by just leafing through it or opening it from random places
03:09pppaule-books sting
03:09taliostoilet paper :)
03:09taliosI wipe my a*** on scala :)
03:09RaynesYour asss?
03:10pppaulit's better than just a normal ass
03:10taliosits bigger than a normal one thats for sure ;p
03:10pppaul(inc ass) -> asss
03:11Raynes"I like the feel of a paper book in my hands" is a big one. Whatever, hold a book in your left and and a kindle in your right.
03:11ro_stpretty hard to write a thoughtful note on the inside cover of a digital book when gifting it
03:12RaynesAmazon lets you send a comment when you gift a book, IIRC. Or you can include the pdf as an email attachment if you bought it elsewhere.
03:12RaynesSeems like a weird reason for preferring paper books.
03:12ro_stcollectability?
03:12ro_st-looks at his complete Terry Pratchett collection-
03:12RaynesI have a nice big organized kindle library and tons of shelf space.
03:13amalloylendability too
03:13amalloy*shrug* that's not an ebook
03:13ro_stpaper books don't need batteries
03:13ro_stor amazon/itunes accounts
03:13ro_stthat makes them far more lendable
03:13RaynesIf you don't have electricity you have bigger problems than books.
03:14Raynesamalloy: What is an ebook then?
03:14RaynesI was under the impression that ebooks came in various formats.
03:14ro_sti've decided to stop throwing baseballs at you :-)
03:15ro_stare you going to Cwest, Raynes?
03:15RaynesI don't know if I'm ever going to another conference ever again.
03:15RaynesBut definitely not that one.
03:15ro_stit's only 12 hours away by train
03:16ro_st(or so i am told)
03:16amalloysomeday, a pdf may be an ebook. right now, pdfs aren't nearly as flexible on an ereader as, say, a .mobi or a .epub. graceful resizing, a sane TOC, the ability to highlight/note stuff "in the margins"
03:16RaynesWhatever /me sends amalloy an epub
03:16ro_stdecent search
03:16Raynesro_st: I'd probably have to use vacation days to go, and I'd have to pay for it.
03:17amalloyebooks are more convenient most of the time, for sure. easier to get
03:17RaynesI really don't think I'd go to any conferences I have to actually pay for, even if I did have the money. It doesn't feel worth it for most conferences
03:18ro_stRaynes: sorry to hear that. i realise i'm incredibly lucky to have the company pay for me to go, especially considering i live in cape town
03:18amalloybut amazon can take them away from you whenever they feel like it, and sometimes that happens. and you don't *own* them, you only own a license to read them. it's against the rules to let someone borrow one, for now
03:18amalloyor to inherit from your parents
03:18RaynesIIRC, we're going to get to go to a conference again someday.
03:18ro_stcwest looks like a cracker, esp with the minikanren bolt-on.
03:19RaynesI wish I was more interested in all the logic talks, but I mostly just feel like taking a nap during them,
03:19ro_stRaynes, are you/will you be using Clj for work?
03:19RaynesWe use Clojure.
03:20ro_stwhat sort of thing do you work on? web stuff?
03:20RaynesI work on backend stuff.
03:20echo-areaIs there ACL related stuff in nREPL? I can telnet on localhost, but cannot telnet from another host
03:21ro_stecho-area: we use ssh tunneling
03:21amalloynrepl is probably only listening on localhost, not on 0.0.0.0, echo-area
03:21ro_stmap a local port to a remote port over ssh, and then nrepl to the local
03:21echo-arearo_st: Oh, let me try
03:22Raynesro_st: How did you know I was moving to LA?
03:22RaynesSneaky.
03:22ro_stsaw you mention it a couple times
03:23RaynesYou're like a ninja, waiting in the bushes.
03:23ro_stwe're watching you, Raynes.
03:25ro_stRaynes: what do you think of the luminus additions?
03:25ro_stto lib-noir
03:26RaynesWell, I approved them.
03:26ro_sta pal just started with clojure, doing web stuff. i recommended he start with the luminus template and lib-noir
03:27RaynesI'm pretty biased since I maintain lib-noir. :P
03:27RaynesBut yeah, luminus is a great start (and includes lib-noir).
03:28ro_stwe have like 80 defpages and pre-routes to convert
03:28ro_stgoing to be nice to get it upgraded. compojure is much more composable
03:29ro_sti like how you can compose routing groups with contexts
03:30echo-arearo_st: Thanks, it is not convenient that way but it works
03:30ro_stecho-area: cool. i've yet to find a clever way to disable auto-complete in emacs when connecting to a remote nrepl. it's soooo slowwww.
03:31ro_stecho-area: ping cemerick. whatever he's doing is the right way :-)
03:33echo-arearo_st: It's not slow here
03:33ro_sti'm in cape town and we ssh into ec2
03:33ro_stdefinitely slow for us
03:33ro_stwe had a local VPS which was nice and fast
03:33ro_stso… lucky you :-)
03:33echo-areaOh, that's another story :)
03:40tomoj&(= (:foo :bar))
03:40lazybot⇒ true
03:40tomojbad typo
03:40ro_st&(:a :b)
03:40lazybot⇒ nil
03:40ro_stinteresting
03:41tomoj&(:a (Object.) 42)
03:41lazybot⇒ 42
03:41ro_sthow long'd that take to hunt down, tomoj?
03:41tomojprobably 1min
03:41tomojwas in existence without my knowledge for maybe 3
03:46ro_stnice. high five
03:46ro_styou're clearly a landoflisp.com/#guilds warrior!
03:52tomojeh, function was 5 lines long, not many places to look
03:54dyresharkthanks tomoj
04:31rahcolaany recommendations for a simple parsing library to use when writing macros?
04:32rahcolamaybe something like what Scheme has?
04:48Sgeo_,(fn name [] name) ; I forget whether this is a thing
04:48clojurebot#<sandbox$eval27$name__28 sandbox$eval27$name__28@7be1232c>
04:48Sgeo_,(fn name [] (name))
04:48clojurebot#<sandbox$eval55$name__56 sandbox$eval55$name__56@3fe2135c>
04:48Sgeo_,((fn name [] (name)))
04:48clojurebot#<RuntimeException java.lang.RuntimeException: java.lang.StackOverflowError>
04:54echo-area&(+ 3 4)
04:54lazybot⇒ 7
04:54foodoo,((fn name [] (recur)))
04:54clojurebotExecution Timed Out
04:55foodooSgeo_: use tail calls to avoid stack overflows ;)
04:55Sgeo_Or I could just use a language with TCO >.>
04:56Sgeo_Or perhaps implement a Clojure-like language in that language
04:56foodooSgeo_: Or add TCO to the clojure compiler. It's not really a language issue, but a compiler issue, isn't it?
05:01noidifoodoo, I think the compiler could only change self-calls into loops, but it can't support mutual tail recursion as that's not supported by the JVM
05:02noidii.e. when fn a calls b from tail position, a's stack frame can't be optimized away
05:03foodoonoidi: I don't know much about JVM bytecode, but isn't there some kind of goto, that could be used to avoid building stack frames/function calls?
05:03zamaterian_jahluv Discrete Mathematics and Its Application - Kenneth H. Rosen.pdf
05:05noidifoodoo, I don't know, but a quick google turned up this http://stackoverflow.com/questions/105834/does-the-jvm-prevent-tail-call-optimizations?lq=1
05:05foodoonoidi: okay. So it's a security thing. Thanks. Nice to know
05:06noidiI've yet to encounter a situation when the lack of TCO would have really bothered me
05:08noidiusing trampolines is a bit of a bother, but I think I've only used them once
05:08noidiand I actually prefer the distinction between recur and stack-consuming recursion
05:19Raynes$latest lein-gitify
05:19lazybot[lein-gitify "0.1.0"] -- https://clojars.org/lein-gitify
05:19Raynes$latest lein-bin
05:19lazybot[lein-bin "0.2.0"] -- https://clojars.org/lein-bin
05:20Raynes$botsnack
05:20lazybotRaynes: Thanks! Om nom nom!!
05:20Raynes$latest bultitude
05:20lazybot[bultitude "0.2.0"] -- https://clojars.org/bultitude
05:21ejackson$Raynesnack
05:21ejacksonRaynes, dude, laser is cool.
05:22Raynesejackson: As an ice cube.
05:22ejacksoni've always liked enlive for its awesome factor, but this comes with all that AND....
05:22ejacksondocs
05:22ejacksoncrazy
05:23ejacksoni hope you enjoyed my MVPR (minimum viable pull request)
05:23RaynesI did, indeed. :P
05:23RaynesI never proof-read that guide at all.
05:24ejacksoni read it yesterday, and its pretty clear, thanks for taking the effort
05:24Raynes:D
05:24ejacksoncommunicating these libraries is the uberkey
05:25Rayneshrm
05:26Rayneslein-bin isn't resolving.
05:26RaynesI even just pushed a new version, but leiningen can't find it.
05:26RaynesBizarre.
05:26RaynesAnd extremely annoying.
06:18pmaesI'd like to provide some preprocessing functions to use my library with others. At the moment I rely on a dependency to these projects. This isn't ideal. Is there a better way to do this?
06:21ro_stmove the code out to its own project and have its previous project use it as a dep, and then share that same project with your 'others'
06:51tomoj&(Math/pow 2 0x2000)
06:51lazybot⇒ Infinity
06:51tomoj&(= 0x2000 (* 8 1024))
06:51lazybot⇒ true
06:53Raynesejackson: Are you using (or planning to use) laser for anything?
06:54ejacksonnot right now, although I certainly will soon
06:54Rayneso/
06:54ejacksonI'm forever parsing HTML and XML
06:54ejacksonthe next one I write will be in laser
07:06wingyis there a way to trigger a fn when heroku run my app?
07:06ro_stcall it from your main fn ?
07:06ro_stor do you mean, how do you do a 'main' fn?
07:07wingyro_st: i mean do i have to call it in my :main fn
07:07wingyi mean :main namespace
07:08ro_styour main namespace should have a defn -main in it
07:08wingyok
07:08ro_stdoesn't the heroku clojure guide cover this?
07:11vijaykiranwingy: you can add a procfile to run whatever the lein command you want to use as "start"
07:44Ember-hey, I have a problem with with-redefs-fn and multiple bindings
07:44Ember-for some reason this doesn't seem to work:
07:44dbushenkohow to set context path in a ring/compojure application (for deployment on tomcat)
07:44dbushenko?
07:44Ember-(with-redefs-fn {#'foo.bar/bloo (fn [] "ubr") #'foo.bar/blergh (fn [] "ubr")}
07:45Ember-how should I place the multiple binding arguments?
07:45Ember-if not that way
07:47Ember-oh, my bad just found out what I was doing wrong
07:47Ember-not there :)
07:54Sgeo*mechanism
07:54SgeoWhere the interesting thing is how it's extendable
07:58SgeoWait, does rhickey have something against pattern matching?
07:58tomojis there an easy way to compile new cljs in a compatible way with previously compiled js already loaded in a browser?
07:59dbushenkohow to set context path in compojure application?
08:16ejacksonSgeo: you mean the complected comment ?
08:17Sgeoejackson, I've never really seen the complecting talk
08:17ejacksonoh, ok then.
08:18ejacksoni think he gave pattern matching as an example of complection.
08:18ejacksonie having the dispatch and functionality in the same place in the code
08:26pjstadigi think the complection was that it is ordered
08:26pjstadigit complects dispatch with the order of the matching clauses
08:27ejacksonaaaah, that makes even better sense
08:27ejacksonthanks
08:31gfredericksI guess it's always hanging on retrieving the closure jar
08:43aroemersNice word, complecting. I used it in my master thesis, and my supervisor was like, is that a word? Well, yes it is!
08:46clojure-newbhey guys… whats a nice way to generate an arbitrary number of td tags to go inside a tr tag (from a map maybe) in enlive ?
08:46clojure-newbI kind of want to avoid writing a string of html content
08:46gfrederickslooks like crate removed the string functionality all together?
08:53tomojupdate-proxy: "Note that this function can be used to update the behavior of an existing instance without changing its identity. Returns the proxy."
08:53tomojwow!
08:53tomojthat's nuts
08:54gfrederickstomoj: wat why does that exist
08:55tomojI think I've wanted that before
08:56ejacksonclojure-newb: you need to use do. I'd suggest you switch from enlive to laser by Raynes, as its similar but well documented.
08:56ejacksonclojure-newb: look at Seq of Nodes in https://github.com/Raynes/laser/blob/master/docs/guide.md
08:57RaynesHas anybody ever written a lazy version of clojure.walk?
08:57clojure-newbejackson: thx, I will go take a look
09:06samratany idea why this do form isn't working? https://www.refheap.com/paste/8328
09:09dbushenkohow to set context path in compojure application?
09:09weavejesterdbushenko: The context macro
09:09dbushenkocan you please point me at any example?
09:10dbushenkoI've seen the discussions where you have already advised :context and :path-info and other ways
09:10dbushenkobut couldn't get any of them working
09:11dbushenkoeach time I deploy my app to tomat, the resources and requests go to "/" but not to "/myapp/"
09:13dbushenkoweavejester ...
09:13weavejesterdbushenko: Oh, you're deploying to Tomcat?
09:13weavejesterdbushenko: Via lein-ring?
09:14dbushenkoyep
09:14weavejesterlein-ring will automatically set the :context and :path-info keys
09:14weavejesterBut some Ring middleware doesn't currently use :path-info
09:14weavejesterLike wrap-resources
09:14dbushenkoso what should I do?
09:15weavejesterThe compojure.route/resources will work
09:15weavejesterAnd is recommended if you're using Compojure
09:15dbushenkook, let me try...
09:18yogthosweavejester: got a question, about lein ring server, is it possible to bootstrap it from a main?
09:18weavejesteryogthos: Bootstrap it?
09:18yogthosweavejester: and would there be any downsided vs using run-jetty
09:19yogthosweavejester: what I mean is that when run-jetty runs you can't hook in init/destroy
09:19dbushenkoweavejester, so I did the following: (route/resources "/myapp/"). But that still didn't help
09:19yogthosweavejester: but when it runs as a war or with lein ring server then those get picked up
09:19weavejesteryogthos: "lein ring server" uses the ring-server library underneath
09:20weavejesteryogthos: So you could include ring-server and then use ring.server.standalone/serve
09:20weavejesteryogthos: https://github.com/weavejester/ring-server/blob/master/src/ring/server/standalone.clj
09:20yogthosweavejester: any pros/cons between that and run-jetty?
09:21Raynesweavejester: Do you plan to add a crouton-to-html function or the like to crouton?
09:21weavejesterdbushenko: What exactly is going wrong?
09:21yogthosweavejester: looks like it would be more consistent for me to use ring-server in the template
09:22weavejesterRaynes: What would that do? Render a Clojure XML map as a HTML string?
09:22weavejesteryogthos: Why do you want to use a -main method in the first place?
09:23weavejesteryogthos: I mean, why manually create a -main method?
09:23yogthosweavejester: heroku needs a main for example
09:23Raynesweavejester: Yeah. I was actually just curious if you had already written something like that, because I'm probably going to rewrite hickory's to-html function (which isn't stack safe) soon.
09:23dbushenkoweavejester, each time the resources point to localhost:8080/css/file.css instead of localhost:8080/myapp/css/file.css
09:23Raynesyogthos: It doesn't.
09:23yogthosRaynes: no?
09:23Raynesyogthos: You can run your code however you like on heroku.
09:23RaynesI run refheap with lein ring server-headless, IIRC.
09:24yogthosRaynes: ooh, I didn't realize that
09:24weavejesteryogthos: I'd be tempted to use "lein ring server" in production, but set something like...
09:24RaynesWhatever is in your Procfile.
09:24yogthosRaynes: ah that makes sense
09:24weavejester:profiles {:production {:ring {:open-browser? false :stacktraces? false :auto-reload false}}}
09:25weavejesterRaynes: I haven't written anything like that, but I imagine JSoup might have something for rendering HTML that we could use in Crouton
09:25yogthosweavejester: you'd have to have lein on the target machine for that though
09:25Raynesweavejester: I need to write something that works with maps.
09:26weavejesteryogthos: Yes, but Lein-Ring 0.8.0-SNAPSHOT has the "lein ring uberjar" command
09:26weavejesteryogthos: Which creates an executable jar file with a main method
09:26yogthosweavejester: ah nice
09:26weavejesterSo if you want to deploy it to Linux with an nginx proxy
09:26weavejesterlein ring uberjar
09:27weavejesterAnd then: java -jar <project>-<version>-standalone.jar
09:27yogthosweavejester: right right
09:27tomojif you make your proxy class implement clone sanely
09:27yogthosweavejester: I guess my only other use case for a main is actually running it from something like eclipse
09:28tomoj.. can you?
09:28yogthosweavejester: but yeah that might not be worth the trouble
09:28weavejesterdbushenko: I don't understand what you mean by "the resources point to localhost:8080/css/file.css"
09:28weavejesterdbushenko: Do you mean the links in your HTML file don't point to the right place?
09:29weavejesterdbushenko: If so, that's something that needs to be solved by whatever generates the HTML
09:29weavejesterdbushenko: Hiccup, for instance, has wrap-base-url
09:30dbushenkoweavejester, thanks
09:30dbushenkothough I use Enlive
09:30dbushenkowill look into it
09:30weavejesterdbushenko: I don't believe Enlive will automatically change your links for you
09:30dbushenkoso what would you suggest?
09:30weavejesteryogthos: My current thought is that you should only manually have to create the handler
09:31weavejesteryogthos: How the handler is deployed, either as a war, or with an embedded Jetty server, or whatever, is an compilation detail
09:32yogthosweavejester: right that makes sense
09:32weavejesterdbushenko: You can still use Enlive. You just need to be aware that it's a templating solution - it doesn't have an awareness of anything outside that. (as far as I know)
09:32yogthosweavejester: but then what's the option for starting it from the repl?
09:32weavejesterdbushenko: So you have to ensure your links are created with a context you can change depending on how it is deployed.
09:33dbushenkook, thanks
09:33weavejesteryogthos: ring.server.repl … when I get around to writing it :)
09:33yogthosweavejester: haha, alright as soon as it shows up I'm on it :)
09:34weavejesteryogthos: Or just use run-jetty… REPLs are a little trickier because they don't have a connection to your project options directly
09:34yogthosweavejester: that's pretty much what the -main is doing right now
09:34weavejesteryogthos: So you'd need to manually enter them I guess. Or somehow pull the project map into the REPL
09:34weavejesterBut rather than starting a web server from a REPL
09:35yogthosweavejester: but I really like the plan of leaving it up to lein-ring to create the standalone jars and wars
09:35weavejesterI wonder if it might make more sense to start a REPL server from the web server with something like drawbridge
09:35weavejesterNot sure whether that's a good idea or not
09:35yogthosweavejester: could be a security hole :)
09:35yogthosweavejester: if you forget to disable it for production for example
09:35weavejesteryogthos: If it's just turned on in development
09:36weavejesteryogthos: Technically speaking, things like stacktraces are a security weakpoint if you leave them on in production
09:36yogthosweavejester: yup
09:36yogthosweavejester: the more of that you can minimize by default the better though I think
09:37weavejesterI think technomancy disagrees with me on my slight phobia of the -main method
09:37yogthosweavejester: I'm a big fan of reasonable defaults, and then let the user tweak them if they feel they need to
09:38weavejesterBut he works for Heroku, where all the web apps are standalone apps with main methods :)
09:38yogthosweavejester: I think for short term I'll switch my main to use ring-server, so at least it'll be consistent and I'll document that proper way to build stuff for deploying is by using lein ring uberwar/uberjar
09:56AnderkentException in thread "main" java.lang.IllegalStateException: Pop without matching push - any ideas?
09:56knobGood morning everyone
10:13yogthosweavejester: is the lein-ring 0.8 snapshot generally stable enough to switch to from from 0.7.5?
10:14weavejesteryogthos: It should be. I was going to release 0.8.0 in the next day or two, once I've run a few more tests
10:15yogthosweavejester: excellent, I think what I'll do is just provide a start-server/stop-server functions for repl dev, and then the only way to build a war or a jar is via lein ring
10:32shafirehi
10:32shafireis someone using jamaicavm with clojure?
10:32bosieanyone has this book https://leanpub.com/fp-oo and started with clojure with it?
10:59julienXXAnybody know a solution? I'm using Clojure 1.4 with http.async 0.5
11:02neilmockjulienXX: you need :timeout -1 added to the stream-seq options
11:03TimMcRaynes: Just so you know, I'm expecting a Colin Percival-style incident analysis report regarding clojail. (ref: http://www.daemonology.net/blog/2011-01-18-tarsnap-critical-security-bug.html)
11:04julienXXneilmock: unfortunately it doesn't solve the issue, the stream is still being stalled after 19 heartbeats
11:04clojure-newbejackson: how do I get a nested element with a selector in laser, maybe <html><body><div><ul> (the ul) ?
11:04neilmockjulienXX: strange. i was having the same issue and it solved it for me
11:17yogthosRaynes: ping
11:49ejacksonclojure-newb: sorry, AFK.
11:49clojure-newbno probs
11:49clojure-newbI'm cheating with a different way in :-)
11:49ejacksoni've not actually run it yet, but I think you want to compose a bunch of child-of selectors with and
11:50clojure-newbI've just put a class on the element
11:50clojure-newbeasier for now
11:50ejacksonor an id.
12:08no7hinghas anybody used cemerick's friend library and did start the opened workflow manually?
12:08no7hingopenid/opened
12:12cemerickno7hing: if you're having an issue, maybe post a question to the clojure or clojure-sec lists?
12:12cemerickI'm going afk for a while
12:13no7hingthanks and i've found a ticket on github: https://github.com/cemerick/friend/issues/17
12:13cemerickno7hing: ah; do update the ticket with your use case, as I still don't grok it
12:14no7hingwill do
12:44sshackOkay, I'm having a weird failure. I've setup speclj in a brand new project. I run leon spec -a, and about 50% of the time it dumps me a stack trace. No files in the project have changed (editor is closed).
12:47sshackhttp://pastebin.com/RRmykDPJ
12:48sshackAn example. Run right after each other.
12:52TimMcSome kind of AOT issue?
12:53hiredmanI prefer to see it as the universe telling you not to bother with speclj
12:59TimMchaha, I was waiting for that
13:02sshackTimMc: I'm not sure what it is. or why it would happen intermittently.
13:16alexnixonI can see there are several clojure validation libraries out there: mississippi, clj-schema, bouncer, validateur, metis, validation-clj (and valip and corroborate, though they look abandoned). Is this a NIH syndrome epidemic, or are there substantial differences between them? Any recommendations on which one to look at first?
13:17AimHereHeh, the first 2012 conj video is almost no clojure and almost all music theory
13:18ibdknoxAimHere: it was the last scheduled presentation, so it fit really nicely as a closing
13:18technomancyalexnixon: I'd start with the clojurewerks one; at least you know you'll have docs =)
13:19AimHereI approve. Like inviting Scala guys to talk about Scala data structures and Scheme guys to talk about relational programming and guys talking about the etymology of words like 'Simple'. Clojure conferences could be the starting point of a general-purpose education
13:20ram9ooh - a clojure conf??
13:20lazybotram9: Definitely not.
13:20ram9ahaha
13:21AimHereram9> ClojureTV on youtube is starting to put up the videos for the latest conj conference
13:21alexnixontechnomancy: so that's "validateur". Thanks, I'll take a look.
13:27TimMcalexnixon: Validation libs are the kind of thing that are easy to start writing. :-)
13:29alexnixonTimMc: yeah I could see someone starting writing a small function to validate their specific use-case, then growing it over time into something more fully-fledged, then releasing it as a library
13:30TimMcOr making something half-assed and releasing it.
13:30TimMcI haven't looked at any of the validator libs, but I suspect a goodly number of them are just good enough to address the original author's needs.
13:30TimMcs/good/comprehensive/
13:31nickmbaileyright
13:31nickmbaileyerr wrong window, sorry
13:31alexnixonthat's the impression I get, although clj-schema looks fairly comprehensive (at first glance)
13:31TimMcnickmbailey: It's OK, I don't mind you agreeing with me!
13:32nickmbaileywithout reading any context your statement sound agreeable enough to me :)
13:37ZerkerT
13:37Zerkertar -cvzf
13:39duncanmanyone going to the Boston clojure meetup tonight?
13:40amalloyif it's any help supporting TimMc's claim, i've released a half-assed validation-related library
13:40rbxbxTimMc fwiw I've had good experiences with validateur thusfar.
13:41rbxbxEasily extensible to usecases that aren't provided out of the box.
13:42alexnixonamalloy: what's the name of it?
13:42technomancyI'm going to be disappointed if no one releases one called VALIS
13:43amalloyit's at https://github.com/flatland/schematic but doesn't really have any doc aside from the tests (which is one reason it's never been formally announced)
13:50TimMcduncanm: Yep.
13:51TimMctechnomancy: Sounds like a job for... you.
13:51TimMcI mean, being a literature reference and all.
13:51amalloygfredericks: real men create tarballs with `tar cz`. the -vf characters are for wimps
13:51alexnixonit looks like clj-schema is more composable than validateur (schemas can contain each other, whereas validateur doesn't appear to support that, as far as I can tell)
13:52jkkramerfwiw, I released a validation lib recently, too - with a rational - https://github.com/jkk/verily
13:52alexnixonjkkramer: why does clj-schema not fit your needs?
13:53metellus$findfn 23 5 4
13:53lazybot[clojure.core/quot clojure.core/unchecked-divide-int]
13:55jkkrameralexnixon: clj-schema is very elaborate
13:55jkkramerI wanted something based on simple function composition
13:55jkkramerwith multi-key map validations
13:58mattmoss&(-(*(+(*)(*))(+(*)(*)))(*))
13:58lazybot⇒ 3
13:59alexnixonjkkramer: can you come up with (and perhaps add to the readme?) some examples showing why, for those specific cases, verily is preferable to clj-schema?
14:00jkkrameralexnixon: I would need to spend time learning clj-schema's api to do that
14:01alexnixonjkkramer: up to you, but I suspect that would be worthwhile
14:01TimMcmattmoss: You saw this? http://hypirion.com/musings/swearjure
14:04pppaulhey, i've been doing swearjure for a while
14:04pppauli like it
14:04magnarsWhy do I have to do (vec (map ...)) to make sure I still work with vectors, and is there a better way?
14:04technomancymagnars: you can do mapv
14:05magnarstechnomancy: oh, that's great - thanks mate!
14:05pppaulhey technomancy i would like to get the values of my project configuration in my running problem. easy?
14:05technomancybut don't do that if you're just doing it to avoid laziness; it's sometimes abused for that
14:05technomancypppaul: yeah, check out configleaf
14:05pppaulthanks
14:06technomancypppaul: leiningen is designed to have no effect on the project at runtime, but the configleaf plugin gets you access to that
14:06pppaulcool
14:06pppauli'll add it now
14:11magnarsAny better way of doing `[~elem ~@list] than (into [elem] list) ? (cons elem list) makes me a seq instead of vector.
14:12technomancymagnars: into is reasonable there
14:12magnarsthank you
14:12technomancymagnars: nice work on dash and friends btw; looking forward to trying them out next time I need to write some elisp
14:13magnarstechnomancy: thanks :-) scratching my own itch, glad it can be of use for others too!
14:14technomancywish I had found it before I started nrepl.el =)
14:15aaelonyis anyone here familiar with storm-starter? https://github.com/nathanmarz/storm-starter/blob/master/src/clj/storm/starter/clj/word_count.clj
14:16magnarstechnomancy: I'm using nrepl.el in a major-mode I've written, to communicate with a clojure app as a backend for the heavy lifting. I had a lot of fun doing that - and it was a joy to work with.
14:16technomancycool
14:16aaelonythe storm-starter word count basically uses rand-nth to choose from sentences it then consumes
14:16technomancymagnars: I haven't been following its development much since swank has been deprecated
14:17aaelonywhen I change rand-nth to next, it runs then bombs out
14:17aaelonya more apt use case is something that consumes something, rather than select a random line.
14:17technomancyaaelony: you shouldn't expect to be able to replace a call to rand-nth with next
14:18technomancyrand-nth returns a single element and next returns a seq
14:18aaelonywhat
14:18aaelonywhat is the
14:18aaelonybest way to get the next element to hand off to nextTuple?
14:20aaelonyperhaps some way to call first i guess… but unclear to me
14:23aaelonytechnomancy: that helps. Calling "first" works without bombing (even if it doesn't do anything useful). Next to is to see if some kind of first & rest thing will work. thanks...
14:25danostrowskihey all
14:28knobhey
14:28knob=)
14:28technomancygoing to release leiningen 2.0.0-RC1 today; if you have any open issues that you'd like addressed please let me know
14:29abptechnomancy, leiningen is great, but I don't think that's an issue.
14:40TimMctechnomancy: sweeet
14:41TimMcWill we get a lein-newnew 0.3.6?
14:41technomancyoh, thanks for the reminder
14:42TimMctechnomancy: Reminder: It's gonna break lein's tests.
14:44technomancyoh, we're on 0.3.6 on master already
14:47technomancyit's 0.3.7 we want
14:49TimMcHuh, OK. I don't see a 3.6 tag on lein-newnew's repo, by the way.
14:49TimMc$latest lein-newnew
14:49lazybot[lein-newnew "0.3.7"] -- https://clojars.org/lein-newnew
14:49technomancythanks; tagged
14:51wei_is it possible to run cljs and clojure code in the same process? my goal is integration testing where I can run clojurescript and observe backend changes
14:55TimMcwei_: What do you mean by "in the same process"? CLJS runs on JS VMs, CLJ runs on the JVM.
14:55technomancyrhino/nashorn?
14:55pjstadigtechnomancy: jinx
14:55aaelonymade a list of my storm-starter questions https://www.refheap.com/paste/8335. The storm-user irc channel is silent and likely doesn't use clojure so I am asking here. thanks in advance.
14:55TimMcAre you saying you want to launch a headless browser or something?
14:56danostrowskiHey all. So this is a really noobie question, but, what is Maven's relationship with Clojure? I am about to start learning Clojure and while I currently use Python, in past lives I've done Java. I remember Maven being particularly complicated and painful so I was glad to see that lein looked more like pip or easy install.
14:57danostrowskiHow much Maven will I have to know to get started writing a Clojure project? At least one of these "start here" things for IDEs I'm familiar with say to make a Maven project.
14:57wei_i guess the JS VM and the JVM don't have to be "the same process" as long as they can interact. I thought though that you could get a clojurescript repl from within a clojure repl
14:57TimMcdanostrowski: You *can* use Maven when building/running Clojure, but almost everyone uses leiningen instead.
14:57danostrowskiTimMc, that's exactly the answer I was hoping for. :)
14:57TimMcA lot of online guides are completely out in left field.
14:58danostrowskiRight. OK. Cool. I think I'll give CCW a try. Not sure I'm committed enough for an Emacs excursion.
14:58danostrowski... yet anyhow.
14:58TimMcdanostrowski: How about vim?
14:58TimMcThere's some decent support there as well.
14:59danostrowskiTimMc, I've used vim-clojure on our servers for editing Riemann scripts already.
14:59danostrowskiWhich is fine, but I find that now that I'm spoiled on IDEs, I like to have a lot more files open than I prefer to have open in Vim. I don't konw, there's something psychological about it I suppose. If CCW is not great, I will probably fire up vim-clojure.
15:00TimMcI last tried CCW like a year ago and didn't find the experience pleasant, but I hear that it has come a long ways.
15:02TimMcAs long as it has syntax highlighting, identation support, and paredit (or similar), I'm happy.
15:02TimMc*indentation
15:02danostrowskiTimMc, my experience is that the debugger is always better in a JetBrains project, but that Eclipse maybe has better paredit capabilities.
15:02danostrowskiI may try La Clojure, too, since I use PyCharm every day and love it.
15:03danostrowskiOf course, since I don't even know what paredit means really I may not miss it at first, haha.
15:04amalloyyeah, if you don't know what paredit is you won't miss it...but you'll be missing out, all the same
15:06arcatandoes vim-clojure have a paredit-equivalent?
15:07jlewisyeah that's a paredit plugin, it's separate
15:10arcatanah, okay
15:10arcatanparedit is the main reason i'm using emacs for clojure coding, while i usually use vim for everything else
15:11bultjearcatan: isn't there a paredit-a-like for vim?
15:11jlewishttp://www.vim.org/scripts/script.php?script_id=3998
15:11bultjethat one ;-)
15:12arcatanyeah. i have to try it out at some point.
15:12jlewisor https://github.com/vim-scripts/paredit.vim for the github happy
15:12jlewisi can vouch for its awesomeness.
15:12bultjejlewis: thanks, will try it out now...
15:12bultjecame in here to check up on the whole clojure-vim combo status
15:13bultjeand erm... *dumdum* on windows... :P
15:17avidalIs there a recommended jar for connecting to unix domain sockets in clojure? Preferably something that has a native clojure API, and perhaps supports both domain sockets and tcp/udp sockets?
15:19avidali guess i can ignore unix domain sockets for now and use pocket from clojars
15:19Bronsahttps://github.com/meh/clj-sockets this is being written
15:20bultjeis there a 'sanctioned' method of connecting to nrepl via vim already?
15:20bultjeor is that still wip?
15:22brainproxyavidal: there's also the aleph library, but I don't tihnk it supports domain sockets, only tcp/udp
15:22brainproxyalso, http, websocket and some others
15:23amalloyaleph is based on netty, which doesn't support domain sockets
15:29avidalroger
15:29avidali'll skip sockets for now anyway
15:29weavejesterHas anyone heard of a "chunked readahead" function for consuming lazy seqs?
15:29avidali'm new to clojure, trying to generate requests to an scgi socket which can be configured to listen on tcp or on a unix socket
15:29weavejesterSomething where it would read ahead N spaces
15:29avidalso i'll try to generate the actual request first
15:29amalloyweavejester: seque?
15:30weavejesteramalloy: Ah, I've never used that one before
15:31amalloyweavejester: be aware that the version in clojure.core will leak a thread under some circumstances. if you're not on a 1.5 prerelease, you probably want to use useful's seque*
15:34weavejesteramalloy: I'm spawning off a bunch of threads anyway, so… it might be okay
15:35amalloyweavejester: i mean, each time you call seque, it leaks a new thread (or can, depending on race conditions based on how you consume from it). if you only call seque once, that's fine; but we had a powerhouse of a machine grind to a halt after leaking thousands of threads
15:35weavejesteramalloy: Ohhhh. That's worse.
15:35weavejesteramalloy: So where's this seque*?
15:36amalloyweavejester: https://github.com/flatland/useful/blob/develop/src/flatland/useful/seq.clj#L322
15:38arrdemsomeone said that there's a vimclojure replacement?
15:39weavejesteramalloy: Awesome, thank you
15:40amalloyyou're welcome! that's the functionality you meant by chunked readahead, then, i hope?
15:42bosieis there a loop function that i can use which produces no output/end result?
15:44bosiehttps://gist.github.com/4505549
15:44bosieproblem is the output in line 7
15:48mmitchellis there a function like select-keys but for vectors? something like select-indices?
15:51amalloyit couldn't efficiently return a vector, mmitchell
15:51jkkramer,(map [:a :b :c :d] [1 2 0]) ;mmitchel
15:51clojurebot(:b :c :a)
15:51jkkramer,(mapv [:a :b :c :d] [1 2 0])
15:51clojurebot[:b :c :a]
15:51mmitchellinteresting!
15:51mmitchellthanks!
15:54TimMcbosie: Every Clojure expression has a return value.
15:54bosieTimMc: hm
15:54daydreamtbosie:If it's the printing that troubles you, you only get the end result because of the repl. If you were to compile and run the program, the last line wouldn't be printed.
15:55bosiedaydreamt: but wouldn't i feed it regardless?
15:55bosiedaydreamt: if i want a generic output function that prints every Nth iteration
15:56TimMcbosie: The problem is that you are in a REPL, which will print the return value.
15:56bosiedaydreamt: i could wrap it in reduce (as i did) but then reduce itself has a return value
15:56TimMcTry (do (reduce ...) "ignore me!")
15:56bosieTimMc: k
15:57TimMcIf you have an application, the only time this will be relevant is in your -main function, where you can return nil.
15:57TimMc*where returning nil doesn't result in printing.
15:58bosiehm
15:59bosiehttps://gist.github.com/8e6ad0c6087af8cd6dd7
16:00TimMcWell, sure.
16:00bosiethe output is there
16:01TimMcmap doesn't operate on STDOUT, it operates on values you pass to it
16:01TimMcYou're throwing away the 0, 2, and 4 after printing them.
16:03bosiebut map doesn't let me "sum up" a counter like i do with reduce?
16:04bosieoh
16:04mefisto`this is strange... I'm in emacs, and fire up nrepl, and any time I try to do anything, an empty *nrepl-error* buffer appears
16:04bosiehm
16:04bosiei could use iterate and pass it into map i guess
16:05arrdemin ring if I want to use $PROJ_ROOT/resources/public/$PATH for my static files I just use (route/resources "resources/public"), right?
16:05bosiethanks TimMc
16:06amalloy(resources "/"), i think. might be "/public", but i don't thinks o
16:06weavejesterarrdem: No, (resources "/"), because "/" is the path
16:07weavejesterarrdem: The default root is public, e.g. (resources "/" {:root "public"})
16:07mefisto`never mind, figured it out
16:08TimMcmefisto`: What was it?
16:08arrdemweavejester: thanks
16:11mefisto`TimMc: misspelled :use in my ns declaration. The error message went to *Messages* only, and *nrepl-error* was empty, oddly enough
16:12arrdemwoohoo! weavejester is there a reason that I had to do route/resources _first_ and _then_ my routes?
16:13weavejesterarrdem: The routes are matched in order, so route/resources should probably be after your other routes.
16:13weavejesterarrdem: But it shouldn't really matter, because ideally you won't have a resource named the same as a route.
16:14arrdemweavejester: right.... if I define a "/" page and have resources on "/" won't that bug it?
16:14weavejesterarrdem: No, because "/" is just the prefix.
16:15weavejesterarrdem: For instance, let's say you have a file "resource/public/foo.html"
16:15arrdemmmkay cool! thanks for the help, I'm learning to subsist w/o Noir atm
16:15weavejesterarrdem: Since the "resources" directory is on the classpath, that means you have a "public/foo.html
16:15weavejesterresource
16:15TimMcmefisto`: THanks. I'm filing that away for when I next try to use nrepl in Emacs.
16:16weavejesterSo (route/resoures "/static" {:root "public"}) would give you a "static/foo.html" route
16:16weavejester(route/resources "/" {:root "public"}) would give you a "/foo.html" route
16:16weavejesterAnd since the default root is "public", you can just write (route/resources "/")
16:21devinusare there any other advanced clojure books like JoC?
16:23AimHereMaybe not clojure, but you could try pinching ideas from other lisp books, like On Lisp
16:26yogthosarrdem: btw, I'm trying to fill the Noir niche with Luminus http://www.luminusweb.net/
16:27arrdemyogthos: oh yeah didn't you mention that you were doing a post-noir CMS a while back?
16:27yogthosarrdem: yeah, it's been moving along steadily :)
16:27yogthosarrdem: unlike noir though, I'm not adding any new ways to define routes, so once you create the project from the template it's just plain compojure
16:28arrdemthat seems to be the only thing that noir really *added* that lib-noir doesn't encompas
16:28arrdemsp?
16:28clojurebotLisp isn't a language, it's a building material.
16:28yogthosarrdem: main goal is to provide good defaults via the template
16:29yogthosarrdem: I'm putting all the functionality into lib-noir, which has some updates already
16:32arrdemyogthos: very cool, will definitely check it out when I start my next web project I think I'm past the "find sane defaults" step on the current one XP
16:32yogthosarrdem: haha sure thing, it'll get more polish by then too :)
16:42zepardhey
16:53mattmoss$findfn 1 2 5
16:53lazybot[clojure.core/bit-set clojure.core/bit-flip]
16:54aaelonyin my quest to learn Storm, came across this gem: (defmacro dofor [& body] `(doall (for ~@body))) Now that's something I've needed for some time!!
16:55technomancyaaelony: you don't need that
16:56aaelonytechnomancy: it's pretty common to get unrealized lazy seqs that I actually do need
16:56technomancythen you should call doall on them
16:57aaelonyI do, but it's annoying
16:57loganlinnso you call dofor instead?
16:57technomancynot as annoying as creating a macro for a single call composition
16:57aaelonyhaha, maybe
16:58aaelonyjust looking through this… https://github.com/nathanmarz/storm/blob/master/src/clj/backtype/storm/util.clj
16:59aaelonyline 294
16:59technomancygross =(
17:00aaelonyhaha
17:00technomancythere are a lot of things wrong with that file; not sure where to begin
17:00technomancyseriously though, don't write a macro for something so trivial
17:01aaelonyactually, though I understand macros, I haven't yet needed to write one.
17:01aaelonybut I need to use doall almost every time i need for
17:01gtrakI thought I understood macros until I wrote a few
17:02amalloythen you're not using for very well. having to doall them is very rare
17:02aaelonyfine
17:02technomancyif you need doall a lot then you should probably re-examine your use of dynamic scope
17:02nDuff...that, or you're using for in a place where you should be using doseq
17:02aaelonythe use case is typically a large data structure with many nested levels
17:02amalloyi hate that storm util file too, personally, but i can't really object to its having been written; the whole point of util files is to capture patterns for personal use. so it's a great util file for whoever wrote it (nathan?) but shouldn't be stolen from
17:03technomancyamalloy: bare use and trailing parens though
17:03ibdknoxit's old
17:04ibdknoxthe vendetta against bare use wasn't a thing until about 8-9 months ago
17:04hiredmanthat is not true
17:04amalloyibdknox: that's not true at all
17:04technomancybare use has always been bad form
17:04ivanit's obviously bad in other languages
17:04amalloyand the file is only a year old; it's not like nathan was just learning clojure
17:05ibdknoxvirtually every piece of code I looked at in clojure land a year ago had uses in it
17:05ibdknoxincluding stuff from core
17:05ibdknoxso
17:05technomancythe change is that all use calls are now discouraged
17:05hiredmanibdknox: yes, that just means they are all behind #clojure
17:06ibdknoxhiredman: sure, my point was more generally that isn't surprising that there's still lots of code out there with them in it :)
17:06amalloynothing was wrong with use; use-without-only was the problem
17:06ibdknoxand I don't think you can fault the code writers for it, since the greater body of Clojure work used them
17:06aaelonylook what I've started ...
17:06yogthosI find use to only be really offensive when referencing code within the project
17:07amalloyi think the :use's in that file are a pretty small portion of the problem
17:08aaelonyis the problem that it's inelegant? or done for speed?
17:08ibdknoxamalloy: technomancy: hiredman: to be clear, I'm firmly against bare use as well - just don't think you can get upset with people over it given the history
17:08technomancyamalloy: I was starting at the top and working my way down =)
17:08technomancyibdknox: just saying it's not a good example to crib from. I don't have the context to make a value judgment beyond that.
17:09hiredmanibdknox: that implies a sort of "no one was ever fired for buying ibm" mentality towards coding practices
17:09amalloymost of it is in fact already cribbed from old-contrib
17:09hiredman"you can't say this code is bad, because it does the same thing all the other code does"
17:10systemfaultI'm reading joy of clojure at the moment, I'm at the beginning (Quoting) and it's saying that quote is more used than ' , is that true?
17:11amalloyi doubt it
17:12mpanis it the case that clojure applets in general need to run as signed?
17:12hiredmanheh 2009:Jun:08:07:32:16 drewr : Ugh. I'm seeing more and more :use without :only. We need a PEP 8 for Clojure.
17:12yogthosdon't people generally prefer to use vectors to lists?
17:12ibdknoxhiredman: conventions aren't always determined by the few, in this case whatever prevails in common use is what becomes convention to new people. Which in this case happens to be unfortunate
17:13ibdknoxlol too many "in this cases" in there
17:15ibdknoxdo we have a good place to learn best practice for Clojure? (books aside)
17:15ibdknoxa tiny percent of the population will ever visit #clojure
17:16yogthossomebody started this https://github.com/bbatsov/clojure-style-guide
17:16hiredmanhttps://github.com/bbatsov/clojure-style-guide/pull/31
17:17aaelonyibdknox: this started for me because i need to understand storm-starter well enough to apply it to any input source. https://www.refheap.com/paste/8335 that got me having to start source diving...
17:17ibdknoxhiredman: haha
17:17pjstadigis it pragmatic to have a bare use or not?
17:17yogthoslol
17:17arrdemthe consensus seems to be not...
17:17hiredmanbbatsov has a bunch of "style guide" repos for a number of different languages
17:17technomancypjstadig: it's nice and short to type in the repl
17:18amalloysystemfault: you misread that sentence
17:19amalloy"In other Lisps, this need is so common that they provide a shortcut: a single quote. Although it’s used less in Clojure, it’s still provided." - quoting is less common in clojure than in other lisps, but ' is still provided
17:19hiredmanI can't say I recognize him as any kind of style authority
17:19systemfaultamalloy: Ahh, my bad.
17:20yogthosamalloy: would that be related to the fact that Clojure has a literal notation for vectors?
17:20technomancyhiredman: maybe if he submitted a pull request to https://github.com/PharkMillups/thought-leaders
17:20hiredmanyes
17:20hiredmanonly if he makes the thought-leaders list
17:20loganlinnlol
17:22amalloybeats me, yogthos. i'm just explaining what fogus/chouser meant, not agreeing or justifying
17:23pjstadigi think that's what it means
17:23pjstadigin clojure you usually just quote symbols
17:23pjstadigin other lisp you're often quoting lists of data
17:24pjstadigthere's more data as data forms in clojure, so there's not the need to "escape evaluation to make some data"
17:24AimHereAlso, don't other lisps use quoted symbols where clojure uses keywords?
17:24arrdemmany do...
17:24yogthosamalloy: I find I practically always use vectors unless I have a specific reason to use a list, which isn't often
17:25pjstadigright many cases where you might use a quoted symbol you go for the keyword instead
17:25pjstadigso it becomes pretty rare to have quote things
17:25yogthospjstadig: mostly in macros :)
17:25AimHereOr maybe the repl
17:31pjstadigtechnomancy: it seems the thought leaders list is missing "Mark Phillips: thought leaders"
17:31pjstadigshould have been the first one :(
17:32bprtechnomancy: is there any chance that the lein-otf will get folded into leiningen as default behavior?
17:32technomancypjstadig: there's a pull request for that
17:32pjstadigah
17:32technomancybpr: probably not since AOT is typically a good idea when creating distributables for purposes of error-catching and startup time
17:33bprtechnomancy: ah. ok thanks
17:36bpri'm not fully up to speed with how profiles work, but can my dev profile attach a ^:skip-aot to my :main class while my :release profile doesn't?
17:36technomancybpr: in the latest version of leiningen having :main does not trigger AOT
17:36TimMcnice
17:36technomancyso you could have :aot 'all in the base
17:37technomancyand then put :aot ^:replace [] in the dev profile I think?
17:37technomancyhm; is that what you meant by lein-otf behaviour as default?
17:37arrdemweavejester: is there a "best practice" to structuring your route definitions?
17:37technomancyit's not quite the same as it doesn't provide its own gen-class'd :main
17:37TimMctechnomancy: Do yopu advocate AOT for libs?
17:37technomancybut you can always use clojure.core -m whatevs.main
17:37bprnot exactly, but that does what I'm looking for too
17:37technomancyTimMc: not if there's any way around it
17:38TimMcOK, just checking. "distributables" has an ambiguous target.
17:38technomancyah yeah, should have said end-user distributables
17:53Farehi
17:56cemerickFare: hi :-)
17:56TimMcFare!
17:57cemerickin #clojure, even ;-)
18:00amalloylamina gets really sad if you plug a channel back into itself
18:00FareI'm now on the ALU board, and I'm trying to widen its scope.
18:00mattmossAm I being stupid and missing some builtin that effectively does this?: (if (nil? x) [] (if (coll? x) (vec x) [x])))
18:00ne1_1<technomancy> bpr: in the latest version of leiningen having :main does not trigger AOT - sounds great, not AOTing speeds things up a lot for me
18:01FareI know that things didn't end nicely when Rich Hickey left the board a few years back -- but water has passed under the bridges since.
18:01ian_noob here. I'm using a (for) to iterate over a vector. Is it possible to get the index? e.g. 0 for the first element, 1 for the second, and so on. Or maybe there's some type of zip operation? What is the idiomatic way to do this? (FWIW, i'm storing all the elements in a DB and need to store the position.)
18:01S11001001&(doc map-indexed)
18:01lazybot⇒ "([f coll]); Returns a lazy sequence consisting of the result of applying f to 0 and the first item of coll, followed by applying f to 1 and the second item in coll, etc, until coll is exhausted. Thus function f should accept 2 arguments, index and item."
18:01S11001001^^ ian_
18:02bbloommattmoss: there isn't a native coll-ify or vec-ify sort of wrapper like that. every time i've wanted one, i find out later that i didn't want it :-P but that said, take a look at ##(doc fnil) which should help a bit
18:02lazybot⇒ "([f x] [f x y] [f x y z]); Takes a function f, and returns a function that calls f, replacing a nil first argument to f with the supplied value x. Higher arity versions can replace arguments in the second and third positions (y, z). Note that the function f can... https://www.refheap.com/paste/8352
18:02arohneris there a way to "apply" core.logic constraints? I want to take a seq of constraints as arguments to a fn, and apply them in a run*
18:02ian_S11001001: Thanks
18:03S11001001Fare: going to boston-clojure tonight?
18:03bbloommattmoss: i guess the reason it doesn't exist is because there are two variables: what test to use and what collection to create. you'd need the cross product of seq? coll? vector? X list vec etc
18:03mattmossbbloom: Thanks, I'll check fnil again, see if it fits in nicely. Basically, my multi-select form will return nil, a single string, or a vector of strings depending on what the user selected.
18:03bbloomoh add to that sequential?
18:04TimMcWhat's ALU, besides a CPU component?
18:04FareS11001001, oh -- what / where / when -- lemme check the web
18:04S11001001Fare: akamai, 8 cambridge center (near kendall), 6:30
18:04TimMcOh right, I was about to head over to Basho.
18:04S11001001heh
18:04mattmossWhich I then need to have a vector (or some sequential) before passing it on into library code.
18:05Farehttp://www.meetup.com/Boston-Clojure-Group/events/95400612/
18:05FareI might be a bit late.
18:07cemerickTimMc: Association of Lisp Users, IIRC
18:20clizzini've got a compojure app that is intended to respond to most requests with json, so i'm using the wrap-json-response middleware from ring-json. however, there is one route that i want to return plain text. i'm imagining that i need to merge two sets of routes, but one of those sets of routes needs some middleware attached to it first. how can i do that?
18:20ian_Um... I got map-indexed going, but it's not doing anything. I'm guessing this is because it's a lazy seq. How can I force this to run?
18:21gtrakian_: dorun doall doseq depending on what you want
18:22ian_gtrak: Thanks!
18:23gtrakyou should try to avoid needing to care about that though, if there are side effects you should postpone them until transformations are finished
18:23weavejesterclizzin: You can attach middleware to whatever set of routes you like
18:23callentechnomancy: goddamn you, I'm writing CSS and keep typing lein-height
18:23weavejesterclizzin: A route is just a Ring handler
18:23Raynescallen: Hahahahaha. I do that. All the time.
18:23gtraklein height plugin
18:24xeqiclizzin: (defroutes app (-> json-routes wrap-json-response) plain-text-routes) I think
18:24callenRaynes: the CSS is scorching my brain.
18:24callenRaynes: none of it makes any sense.
18:24callenI clearly need to just sit down and read the spec end to end.
18:24systemfaultcallen: It won't help you that much..
18:25callensystemfault: haha, you were in #css right?
18:25systemfaultcallen: Yeah.
18:25clizzinweavejester: xeqi: ah, great, i think i just forgot that i needed to wrap *all* the routes in one of the compojure handler wrapper fns. as a result, my plain-text-routes weren't being handled properly
18:25ian_gtrak: I think I understand. I'm inserting into a DB. That's pure side-effect, so I have to force it.
18:26gtrakian_: yea, I'm guessing you're mapping the side effect over the result of map-indexed?
18:26callensystemfault: we are forever cursed re: CSS?
18:26callenthere'
18:26callenthere's no deeper understanding? it'll always be batshit?
18:26systemfaultcallen: We should be fine in about 5 years...
18:27gtrakian_: not sure if there's a better way, but I would always hope to avoid explicitly forcing stuff
18:27gtrakisn't the entire web stack batshit?
18:27systemfaultcallen: We'll have a logical box model.. real columns.. real typography support.. etc
18:28systemfaultgtrak: I'm a fan of the simplicity of the HTTP protocol
18:28gtrakyea, http doesn't bother me too much, though implementation caveats wrt browsers are pretty heinous
18:29gtrakie, use POST
18:29weavejestersystemfault: HTTP is kinda a bit weird too, but all protocols from that era are.
18:29systemfaultI'm the kind of guy who touches himself while thinking a REST/HATEOAS/Hypermedia APIs
18:29weavejesterNowadays we'd write a protocol to pass around basic data types, like bencode
18:30systemfaults/a/of
18:30weavejesterBut older protocols seem to be designed to be human readable over a TCP stream
18:30callenHATEOAS is fascism.
18:31gtraksystemfault: I don't know about the latter 2, but I think if I did I'd still say that's unfortunate
18:31systemfaultcallen: how?
18:31callenand based on a religion of similar provenance to the Christians.
18:31callensystemfault: it's all based on one little thing a dude wrote
18:31weavejesterI like the idea of REST, but Rich argued me round to his point of view regarding things like URLs.
18:31callensystemfault: they took it too far.
18:31callenweavejester: what's his point of view WRT URLs?
18:31systemfaultcallen: That dude is one of the creators of the HTTP protocol, not some weird unknown dude
18:32Raynescallen: Careful now, you'll summon pitchforks.
18:32Raynescallen: Also, you should listen to Somebody Told Me by The Killers.
18:33systemfaultHmm...
18:33gtrakI'm not sure what's so special about the web that makes call stacks an unsuitable abstraction.
18:33systemfaultDid your boyfriend looks like a girlfriend I had back in february of last year?
18:33callenRaynes: firing it up right now.
18:33weavejestercallen: That there should be some way of telling the difference between a "value" URL and a "reference" URL.
18:34weavejesterbrb
18:34Raynescallen: I think you're the only person who consistently listens to music I tell him to listen to, and you listen to nearly the exact opposite of what I do.
18:34weavejesteror maybe bbl :)
18:34RaynesYou're fascinating.
18:34technomancyhttp://wondermark.com/282/
18:34callenRaynes: I am an excellent discriminant of advice.
18:35callenmy CSS classes are all in lolcat today.
18:36systemfaultI'm surprised we got so far with CSS...
18:38gtrakI don't know, I'd say the web was doomed to fail if it wasn't a natural monopoly.
18:40systemfaultHow difficult is it to run a clojure(servlet?!) web application?
18:40gtraksystemfault: super easy
18:40gtrakpick a level of abstraction
18:40systemfaultIs it "fast enough"? Do I require a server with a lot of resources(mainly ram?)
18:40gtrakit's better than spring, probably
18:40systemfaultAh, nice
18:42gtrakthere's no pervasive runtime overhead, except just the number of classes
18:42gtraklein-ring is the easiest way to do it right now
18:42systemfaultIs that something like compojure? (I'm still at the "Learning the language" level)
18:42gtrakif you want to code-gen your own servlet, that's also pretty trivial
18:42amalloysystemfault: 4clojure.com runs with a 60MB heap. resident set size is 126MB at the moment
18:43gtraklein-ring is a leiningen plugin, compojure is a bunch of functions and macros that you use as a library
18:43callenRaynes: Killers is one of those bands I don't listen too often, but am happy when I remember when they exist. Good timing on the song.
18:43amalloycould probably squeeze out another 30MB or so if it were necessary, but not a lot more
18:43systemfaultamalloy: Looks acceptable to me, no permgen space errors or things like that?
18:44Raynescallen: :D
18:44amalloywelllll, it's hard to say because 4clojure is somewhat unusual: its purpose is to run unsafe user-submitted code
18:44amalloythere are problems pretty frequently where someone accidentally realizes an infinite seq
18:45gtraksystemfault: you can see how the integration is done here: https://github.com/rmarianski/ring-jetty-servlet-adapter/blob/master/src/ring/adapter/jetty_servlet.clj
18:45jkkramerif you use a servlet container like tomcat, there's a bug which can cause permgen errors
18:45systemfaultAh! It embeds a jetty server
18:45gtraklein-ring can also do a WAR
18:46Raynescallen: This is the first song I've ever listened to by them.
18:46RaynesOr at least the first that stood out to me.
18:46RaynesThe chorus is brilliant.
18:46Raynessystemfault: Permgen is set separately from heap space.
18:46RaynesWe mainly just limit the heap.
18:47gtraksystemfault: here's the other piece of the puzzle: https://github.com/mmcgrana/ring/blob/master/ring-servlet/src/ring/util/servlet.clj
18:48systemfaultThank you :)
18:48gtrakbut unfortunately, if you have a more complicated need, like multiple servlets or filters, you're on your own and should do your own code-gen.
18:48gtrakthe abstraction doesn't account for that
18:48systemfaultI'll start with something simple, I still have a ton of things to learn.
18:49Raynessystemfault: The most important thing when writing a Clojure web app is using laser.
18:49systemfaultWhat's laser?
18:50RaynesA perpetual infomercial.
18:50Rayneshttps://github.com/Raynes/laser
18:50systemfaultHmm, html templating
18:51ivanif someone grepped everything in clojars for hiccup I'm sure there would be many exciting XSS holes
18:52systemfaultI'm not of fan of describing a document using code but I'll still take a look at Laser once I'll start working on my website.
18:52gtrakdoes laser sanitize user input?
18:52callensystemfault: I ended up switching to hiccup from stencil. I just hate mustache too much even if dsantiago's work is good.
18:52Raynessystemfault: What do you mean? You write HTML in HTML.
18:52Raynesgtrak: Yes.
18:52callensystemfault: I want django/jinja templates in Clojure.
18:53Raynesgtrak: Well, hickory does, which laser uses, so it's all good.
18:53gtrakwell... I definitely need to use that, then!
18:53Raynesgtrak: Any strings you put into your HTML are escaped on the way out. If you want to insert HTML anywhere, you have to parse it from a string and insert the nodes.
18:53gtrakneat
18:54RaynesBecause I prefer people not do (html-content "<a>somecrap</a>") and instead do something like (laser/node :a :content "somecrap").
18:54Raynesyogthos: Mornin' beautiful.
18:55systemfaultRaynes: Can a selector be more complex?
18:55gtrakah, I haven't done enough html to feel like "<a>somecrap</a>" is better to write, but I could see experienced people wanting to do that.
18:55Raynessystemfault: A selector can be as complex as you want it to be.
18:55gtrakRaynes: is it fast, though?
18:56Raynesgtrak: Is laser fast?
18:56gtrakyea
18:56systemfaultRaynes: How would I select the second row of some table for example?
18:57gtrakone nice thing about hiccup is I can just eval a template at compile-time and include the emitted string
18:57callenRaynes: I GAT SOUL BUT I'M NOT A SOULJAH
18:57gtrakthough I don't know if that makes sense at scale
18:57RaynesIt doesn't seem to be slow. I used the same benchmarks tinsel uses and it appears to be about as fast as enlive is for those.
18:57callenbut enlive is slow.
18:59Raynessystemfault: I don't have any built in select-nth sorts of things yet, but you can write a selector to do it. I think the selector would be sort of like child-of. It would answer: am I a child of a table? If so, do I have one sibling to the left of me?
18:59systemfaultAh ok
18:59RaynesIt's definitely possible. Not even hard, really.
18:59RaynesI just haven't written anything to do it in a general case yet.
19:00Raynesgtrak: Well, you can do that sort of thing in laser too. (def foo (my-template args)), etc.
19:00RaynesI think Enlive does some sort of caching too.
19:00hiredman /win 11
19:00RaynesLaser can probably do that.
19:01RaynesBut even if laser didn't you could probably easily wrap caching around it.
19:01RaynesIt's all pretty flexible.
19:01gtrakyea, I think there's probably an optimization in stringbuilder for strings, if you're escaping everything you might take a hit.
19:02Rayneshickory's escape stuff uses a stringbuilder.
19:02RaynesThe to-html function isn't particularly efficient though. Hoping to improve that soon.
19:02gtrakright, I just mean the java code might not have to go character-by-character necessarily, if escaping, it definitely has to
19:03gtrakjust my speculation
19:04muhoohiredman: isn't that supposed to be win \o/ ?
19:05gtrakRaynes: just verified, it uses arraycopy to do the work, so I should be right, unless it's not significant.
19:06gtrakarraycopy is necessarily better than what you get if you check every character
19:06callenweavejester: in what respect can a URL refer a value or a reference?
19:06callenweavejester: they are by definition all references. They're URLs.
19:08devntypical evening surfing clojure github repos: find yet another Raynes repo (fs)
19:08Rayneslol
19:09devni like this.
19:10gtrakso if there's a way to box up a string and mark it as safe, it might be beneficial
19:11gtrakwhitelist instead of blacklist (having to manually escape everything)
19:13devnRaynes: one thing about laser i noticed that isn't that big of a deal, but was a little awkward IMO was (l/and (l/element= :div) (l/class= "foo")) -- :div and "foo", keyword and string, seemed like maybe it would be better to just have the opinion that in every place you can expect to use a kw
19:14Raynesdevn: I didn't give it much though, but that seems fair. I can just call name on the input.
19:14devnit could also just as well be a string everywhere
19:14RaynesI did it that way because that's the actual internal representation (that I did not come up with).
19:14RaynesTags are keywords, attributes are strings.
19:15RaynesBut there isn't anything wrong with doing (name ..)
19:15weavejestercallen: A URL can point to a resource that never changes
19:15weavejestercallen: Effectively a value.
19:15devnRaynes: what do you think about saying everything is a string?
19:15gtrakdevn: no!
19:15RaynesI think I'd prefer to just work with keywords.
19:16RaynesWith the the option of strings.
19:16devni can imagine someone doing something clever where they want to prepend something to every class they're adding in a template
19:16callenweavejester: it's an ontology created from a distinction that is trivial.
19:16callenweavejester: that is exceptionally weird.
19:16RaynesThe internal representation will still be strings, devn.
19:16callenweavejester: you should write a templating library.
19:16gtrakstring literals are not used for semantics in clojure, keywords are
19:16weavejestercallen: A templating library?
19:16RaynesAll I'm proposing is letting them pass keywords to functions like class= and what not.
19:17callenweavejester: yeah, for templating HTML. for web apps.
19:17weavejestercallen: Like Hiccup?
19:17weavejestercallen: Or Comb, my Erb clone?
19:17callenweavejester: you mean CL-WHO's Revenge?
19:17devn(str "prefix-" thingy) vs (str "thingy" (name :thingy))
19:17callenwait, Comb. need to see this.
19:17devnRaynes: yeah i like the "either one works" idea
19:18RaynesIt can be as consistent as people want it to be in that case.
19:18weavejestercallen: https://github.com/weavejester/comb
19:18devnRaynes: double agree. like it.
19:18weavejesterIt's basically just Erb
19:18callenweavejester: yeah looking at it. intriguing. just wish it had extends/include.
19:18ibdknoxcallen: I've sent you comb multiple times :p haha
19:18devni go looking for new templating libs in clojure maybe once a month
19:19Raynesibdknox: How are things?
19:19callenibdknox: I ended up looking at a few that are analogous to comb.
19:19callendevn: have you found any that don't make you piss blood?
19:19Raynesibdknox: Are you going to move to LA so we can go out?
19:19callenI suffice with Hiccup, but meh
19:19ibdknoxRaynes: haha, I don't think I'll be moving in the near future :p
19:19callenRaynes: he's in the bay area. this place is a black hole.
19:19callenIIRC, anyway.
19:19ibdknoxRaynes: I did, however, get JS eval working last night...
19:20technomancywhat if recompiling an ns form after adding :refer-clojure :exclude could unmap it for you?
19:20ibdknox0.3.0 is going to be a bigger release than I thought :)
19:20Raynesibdknox: Haskell and Python or gtfo.
19:20ibdknoxlol
19:20weavejesterThere are a few mustache libs around
19:20weavejesterLike Stencil: https://github.com/davidsantiago/stencil
19:20devncallen: of all of them hiccup has been my go to, but i mean, here's the rub: I like views being more like functions than something like erb
19:20ibdknoxRaynes: so picky :p
19:20Raynesibdknox: Also, paredit.
19:20devnwhich is why laser is appealing (and enlive before it)
19:21gtrakibdknox: I played around with the new version of light-table, is it ready for folks look at source and try to extend and such yet?
19:21ibdknoxRaynes: I think that may be on its way
19:21devnalthough i think i like the simplicity of laser right now
19:21callenweavejester: I love stencil's underpinnings but hate mustache.
19:21Raynesibdknox: Someone working on an efficient version?
19:21ibdknoxgtrak: not yet, that'll be part of the beta that goes to the KS people
19:21callenweavejester: I want django/jinja templates. If I'm really lucky, that hybridized with comb.
19:21ibdknoxRaynes: yep, talked to someone who wants to help out
19:21gtrakibdknox: ah, I don't remember if I'm that high on the KS
19:22devncallen: i think after all of this time staring at different templating thingies, i wind up thinking enlive, laser, or hiccup make the most sense to me
19:22gtrakibdknox: ah, guess not :-)
19:22devni dont like littering the filesystem and eval'ing in the context of a thingy
19:23callendevn: I like being productive.
19:23devncallen: so why ever learn anything new?
19:24callendevn: sometimes new things are more productive.
19:24Raynestechnomancy: You're a proponent of ex-info right?
19:24devncallen: but they have an initial opportunity cost sometimes
19:24devnit's like learning a lisp
19:24devnenlive was like that for me, it was a different way of thinking about templates for me
19:25callendevn: you're misunderstanding me, taking that misunderstanding, lighting it on fire, and then complaining about burnt hands. hold on.
19:25Rayneslol
19:25devnbahaha
19:25callendevn: I said new things are more productive sometimes. That includes the cost of learning the new thing. That's fine.
19:25technomancyRaynes: always have been; always will be
19:25Raynestechnomancy: How does it work?
19:26callendevn: I'm saying that hiccup/enlive/stencil are categorically inferior to some alternatives that I currently use and it pains my soul that it prevents Clojure being a "practical" choice for me.
19:26Raynestechnomancy: Like, I want to throw a nice exception. That's what this is for, right?
19:26devncallen: i think we probably are dancing around some sort of violent agreement.
19:26technomancyRaynes: (throw (ex-info "ex-info needs explaining" {:explainer "technomancy" :explainee "Raynes"}))
19:26Raynestechnomancy: Sounds excellent.
19:27technomancyit really is
19:27devncallen: i hate to be "that open source guy" but, if there's a templating language that's better, why not port it to clojure?
19:27technomancyRaynes: if you use slingshot, you can destructure ex-infos <3
19:29cemerickcallen: enlive is slow? o.O
19:29devncemerick: he's right i think
19:29devn:X
19:30devnwait, before you respond
19:30devni retract that because i have no idea
19:30cemerickit'd be interesting to see numbers
19:30cemerickI know cgrand spent a ton of time optimizing it *shrug*
19:30ibdknoxsomeone benchmarked all the common libs a while back
19:30callencemerick: I don't hold myself accountable to the fascism of numericism.
19:30ibdknoxand enlive was quite a bit slower
19:30callenibdknox: stop proving me right.
19:30ibdknoxnow whether or not that has any practical implication...
19:30Raynescemerick: dsantiago has some benchmarks on his tinsel page, and I have some on laser's page. Laser and Enlive are the slowest templating engines in Clojure.
19:30devnyeah, i'd be interested to see that -- all i'm basing that on is ancedotal evidence from dealing with some particularly messy DOMs
19:31callendevn: wanna know how slow enlive is?
19:32devnHOW SLOW IS IT?
19:32callendevn: REAL DAMN SLOW BRO!
19:33callenibdknox: the practical implications are obvious. It's a templating library for quiche-eaters.
19:33devnaw, i was hoping for a "it's so slow, that the chariots of fire theme song plays every time you render a template"
19:33callendevn: clearly you have more panache for this.
19:34devncallen: quiches aren't easy to make
19:34gtrakcallen: are you blaming the french?
19:34callengtrak: dude. you seriously don't know this famous bit of hacker lore?
19:35devndude, i don't know it either.
19:35gtrakah, no! too young.
19:35gtrakI will learn it
19:35callenhttp://en.wikipedia.org/wiki/Real_Programmers_Don't_Use_Pascal
19:36callengtrak: I'm not old :|
19:36devnhttp://www.th-soft.com/zzJargon/
19:37wei_re: a previous question, is it possible to drive cljs and clojure with the same code? goal is to write an integration test that manipulates a javascript widget and then looks in the database to observe changes
19:37devnwei_: i think that's what crossover is about???
19:37lazybotdevn: Oh, absolutely.
19:37ivancan't be slower than that old version of Genshi
19:38callenivan: you are from the land of snakes...what do you use for templating?
19:39ivanI use jinja2 in my Python programs but for Clojure want a fixed hiccup that escapes everything
19:39callenivan: sigh, I use jinja2 in Python.
19:39ivanI might change my mind if s-exps for HTML turn out to be problematic
19:40ivanbut I find this unlikely
19:41wei_devn: thanks, just read that. seems like crossovers are for sharing code between cljs and clojure compilers. but, is it possible to run cljs code, and then clj code within a single test?
19:41ivansure, you can run cljs code with rhino
19:42Raynesdsantiago: Are you trying to keep 1.3.0 support in hickory?
19:42ivando you want to test with a real browser?
19:42RaynesClojure 1.3.0, that is.
19:42wei_phantomjs
19:42dsantiagoRaynes: Hadn't thought about it.
19:43Raynesdsantiago: I'm playing around with using ex-info to improve error messages, but IIRC it is 1.4.0-only.
19:43dsantiagoMy usual policy is to just use new features if they are worthwhile, and if you need to work with an older Clojure, use an old version.
19:44RaynesSounds reasonable. I'll see what I come up with and show it to you later.
19:44dsantiagoSure
19:44gtrak1.3 to 1.4 is not a big jump, and are you testing against 1.2?
19:44Raynesgtrak: ex-info
19:44gtrakyea
19:44RaynesThat's why the jump would be necessary.
19:45RaynesUnless I'm misunderstanding what you're trying to say.
19:45gtrakI'm saying, I'm not sure why someone would avoid 1.4 if they're already on 1.3. If they're on 1.2 I get it.
19:45ivanwei_: well, phantomjs is running your compiled JS in that case
19:45RaynesOh.
19:46gtrak1.2 to 1.3 was a month or so for us, 1.4 was a couple of days
19:46wei_ivan: yes, the tests references dom elements so I'd need a browser, or a headless browser like phantomjs
19:46technomancyagreed there's no reason to stay on 1.3
19:48frozenlockLanguages like clojure have spoiled me... now I get mad when I do 1 / 2 and get 0.
19:48gtrak,(1 / 2) ;; :-)
19:48clojurebot#<ClassCastException java.lang.ClassCastException: java.lang.Long cannot be cast to clojure.lang.IFn>
19:48gtrakway better
19:49arrdemanyone got a compelling reason for me to try a new DB before I start writing more congomongo?
19:50frozenlock"You cannot have nested FORALL statements within a FORALL statement." Why the hell not? Raaaaa
19:51yogthostechnomancy: I noticed something funny with project.clj if there's a new line between :min-lein-version and "2.0.0" then v2 does not get picked up
19:51frozenlockarrdem: Still in mongodb, or in another db type?
19:52arrdemfrozenlock: suggest something. mongo's the only thing I've used more than once, but I'm open and at the point of needing to pick a backend.
19:52technomancyyogthos: on heroku or inside leiningen?
19:53yogthostechnomancy: on heroku
19:53yogthostechnomancy: is it something heroku does?
19:53frozenlockarrdem: I can't really suggest anything, I've only used congomono :p
19:53frozenlockcongomongo even
19:53arrdemhaha well then I guess I'm doing ibdknox's simpledb -> mongodb again
19:54technomancyyogthos: the script we use to detect that has to be written in bash, so we don't have access to a full Clojure reader
19:54tomojshould hickory include a function for converting hiccup to hickory?
19:54technomancyit's a fallible heuristic by design unfortunately
19:54tomojand/or does it already?
19:54yogthostechnomancy: ah ok, I ran into this when I was injecting stuff into the project file and then pretty printing it :)
19:54hiredmantime to write a reader in bash
19:55yogthoslol
19:56arrdema task I do not envy...
19:56yogthosis there anything else to watch out for or is it the only heroku specific flag? :)
19:56yogthoshiredman: I'm sure somebody's written a lisp parser in bash :P
19:57technomancyyogthos: leiningen will issue a warning, and it has the proper map to work with rather than grep
19:58yogthostechnomancy: yeah I saw the warning, but took me a few min to figure out what was causing it ;)
20:03yogthosargh pretty printer really doesn't like the idea of putting them on the same line even with *print-right-margin* set
20:04yogthosI guess because the structure is a list, it reasonably decides to put each item on its own line
20:05technomancythe pretty printer is beyond the scope of puny human minds
20:05yogthoslol
20:05yogthosit's technically doing the right thing
20:09bpris there a way to query a multimethod for a list of methods registered with it?
20:10Fareyes
20:12technomancyleiningen 2.0.0-RC1 is out my friends
20:12technomancyhttps://github.com/technomancy/leiningen/blob/master/NEWS.md
20:13frozenlockYay!
20:13jkkramertechnomancy: congrats!
20:13frozenlockCan it make sandwiches now? :)
20:15brainproxytechnomancy: congrants, and THANKS!
20:15technomancyfrozenlock: better make a plugin
20:15amalloy&(doc methods) ;; bpr
20:15lazybot⇒ "([multifn]); Given a multimethod, returns a map of dispatch values -> dispatch fns"
20:15bprthanks: amalloy
20:16amalloyreally just search for "method" in clojure/core.clj to find all the public features; and look in MultiFn.java for a few that are secret and not a good idea to use
20:16bpryeah, i searched for "-method" :-/
20:17bbloombpr: i'll also keep pushing my dispatch-map project :-) https://github.com/brandonbloom/dispatch-map
20:18bprbbloom: i was looking at that earlier. it looks really cool!
20:20brainproxydang, lein-ring is bombing after upgrade to rc1
20:20brainproxylein2 rc1 i mean
20:20brainproxyweavejester: ^
20:20frozenlocktechnomancy: I'm impressed by the number of changes VS the last version
20:20brainproxywill investigate, see if I can fix and work up a pull request
20:21technomancyfrozenlock: this one kept getting pushed back because of issues with clojars
20:21frozenlockI also realize I'm not using lein to its full potential...
20:21weavejesterbrainproxy: Try lein-ring 0.8.0-SNAPSHOT
20:22brainproxyweavejester: will do
20:22yogthostechnomancy: gross :) https://www.refheap.com/paste/8355
20:24brainproxyweavejester: works great!
20:24weavejesterI'll release 0.8.0 sometime tomorrow or this weekend
20:25brainproxyweavejester: cool, thanks for the heads up
20:29xeqiweavejester: could I persuade you to upgrade the version of leinjacker used by lein-ring
20:29xeqiit keeps pulling in a thneed 1.0.0-SNAPSHOT
20:30weavejesterxeqi: Already done- oh wait, maybe I haven't pushed...
20:30xeqihurray
20:30xeqithakns
20:31weavejesterxeqi: I've already pushed it to clojars, so 0.8.0-SNAPSHOT should work if you test it out
20:32xeqiheh, kinda defeats not relieing on a snapshot
20:32weavejesterxeqi: 0.8.0 will be released tomorrow, probably
20:33xeqino rush, just happy its in the pipeline
20:40andrewma`Does anyone have any recommendations for clojurescript testing frameworks? I've been looking around but haven't had all that much success finding anything
20:46yogthosweavejester: it doesn't look like the jar produced by lein ring uberjar accept a custom port, is there a way to specify it?
20:47callenyogthos: getenv?
20:47callenyogthos: 12-factor that shit up?
20:47weavejesteryogthos: It checks the $PORT env variable
20:47yogthoscallen: weavejester: ah ok that works
20:47weavejesteryogthos: Maybe it should also take the port as an argument
20:47callenlike I said.
20:47yogthosweavejester: as long as it's documented I think env is fine
20:55callenyogthos: I'd told you lumnius was going to probably need to shift to a 12-factor style at some point :P
20:55yogthoscallen: yup I do recall that :P
20:56yogthoscallen: I've just done a huge refactor to finally use ring-server for everything :)
20:56clojurebotExcuse me?
20:56callenyogthos: written by Herokuites: http://www.12factor.net/
20:56yogthoshandy :)
20:57callenyogthos: yeah ring-server should save some effort.
20:57yogthoscallen: yeah it's a lot cleaner and it pushes stuff like reloading into project profile where it belongs
20:59callenyogthos: aye. good call.
21:00yogthoscallen: weavejester set me straight on that this morning ;)
21:00callenyogthos: the more best practices that get embedded in Luminus, the better off we all are.
21:00callenyogthos: have you looked at Kiln?
21:00yogthoscallen: briefly
21:00callenyogthos: I've been considering testing a request context thingy.
21:01callento replicate something really useful in Flask.
21:01yogthoscallen: looks kinda neat, what's the use case you were thinking for it?
21:02callenyogthos: best if I just link it: http://flask.pocoo.org/docs/api/#flask.g
21:02callenyogthos: insanely useful for things like getting, "is there a user logged in for this request lifecycle?"
21:03yogthoscallen: it sounds similar to lib-noir sessions no?
21:03callenyogthos: sessions are for users.
21:03yogthoscallen: you can do a flash session with it
21:04callenI don't like mixing request lifecycle state with sessions.
21:04yogthoscallen: ah, but the functionality is similar right?
21:04callen'ish but it squicks me out.
21:04yogthoscallen: hehe
21:05yogthosbut yeah that's what we've got there so far http://www.luminusweb.net/noir-api/noir.session.html
21:05callenStore a value that will persist for this request and the next.
21:05callenyogthos: and the next?
21:05yogthoscallen: appears that way :)
21:05callenyogthos: that's no bueno man.
21:05callennot what I was talking about.
21:06callenFlask.g is *not* for users. it's expressly server-side and per-request only.
21:06yogthoscallen: don't shoot the messenger :P
21:06callenyogthos: I'm just saying, it's something I need.
21:07yogthoscallen: gotcha, would probably be easier to do with middleware than going fill klin though :)
21:08yogthoscallen: depending how much functionality you need of course, if you just want to persist some value from one request cycle I'd do it via middleware with an atom or something
21:08callenyogthos: middleware with an atom is my point, but I want to explore the problem and codify "best practice"
21:09yogthoscallen: I could add that to lib-noir if Raynes likes it :)
21:11yogthoscallen: then document it on luminus and voila it's a standard feature :)
21:16Raynesyogthos: I don't see what we're supposed to add
21:16RaynesWhat does he want?
21:16RaynesI just read what he said, but I don't get it.
21:17yogthosRaynes: I think he wants a variable which will persist for a single request lifecycle, kind of like session/flash-put
21:17yogthosRaynes: but he doesn't like that it's conflated with the session
21:17yogthosI'd like to see an example of it in action :)
21:18yogthoscallen: is that about right?
21:18Raynesyogthos: Okay. That's kind of what flash sessions used to be, and they were pretty painful to use so we changed them. If you find something that's useful and you're fairly confident that it's useful for people who also aren't named Chris Allen, go for it.
21:19Raynes:p
21:19yogthosRaynes: haha that's pretty much what I'm thinking, if I can see a general use case and make an obvious example then I'd add it :)
21:20yogthosI think the fact that we're not getting how it's supposed to be used is a bit of a red flag :)
21:22yogthosweavejester: oh maybe update clojure toolbox to mention luminus and remove noir, seeing how it's deprecated now :)
21:24yogthosweavejester: also liberator is worth mentioning http://clojure-liberator.github.com/
21:27xeqiweavejester: I think clj-webdriver could go under the Web Testing heading
21:43SegFaultAXAnyone heard of Sonain?
21:43SegFaultAXErr, Sonian?
21:43amalloyi bet hiredman has
21:44SegFaultAXamalloy: Is that where he works?
21:44amalloylast i checked
21:44SegFaultAXhiredman: Ping. :)
21:58rbxbxDoes clojure make any guarantees that keys and vals return in the same sort order?
21:58rbxbxThey currently do, but that seems counter intuitive knowing that hash-maps don't guarantee ordering
21:59yogthosrbxbx: in a sorted-map they do
21:59rbxbxyogthos they do in a std hash-map as well, currently
21:59rbxbxis the difference if it were to execute on a separate thread?
21:59yogthos&(sorted-map :x 1 :b 2 :c 3 :a 5)
21:59lazybot⇒ {:a 5, :b 2, :c 3, :x 1}
21:59weavejesterrbxbx: In a hash-map? Not just an array-map?
22:00yogthosweavejester: ping re: libs :)
22:00rbxbxuser=> (keys {:a 1 :b 2 :c 3})
22:00rbxbx(:a :c :b)
22:00rbxbxuser=> (vals {:a 1 :b 2 :c 3})
22:00rbxbx(1 3 2)
22:00weavejesteryogthos: Oh yeah, I'll add them to the toolbox tomorrow
22:01yogthosweavejester: awesome :)
22:01rbxbxweavejester ^^
22:01weavejesterrbxbx: But that's an array map
22:02weavejesterrbxbx: Does it work with a hash map as well?
22:02jkkramerrbxbx: I believe the BDFL has said they are guaranteed to return in the same order, so that (zipmap (keys m) (vals m)) would always hold true
22:02jkkramerbut I'm not sure where or when that was said
22:02weavejesterIt makes sense, obviously
22:03weavejesterI was just curious as to whether it held in all cases.
22:03yogthoswouldn't it be safer to just iterate the map as a vector? eg (vec {:foo 1 :bar 2})
22:03amalloyyes, jkkramer, that is a thing that he has said but nobody with permission to document it seems interested in doing so
22:03rbxbxweavejester works with hash-maps as well
22:03rbxbxjkkramer that was the use-case that sprung this
22:03rbxbxGood to know. Thanks everyone.
22:04yogthosso it is guaranteed?
22:06amalloyyes. i agree with yogthos, though: it's generally a better idea to consume the map as a seq of kv pairs if you're doing this anyway
22:07devnbah, im blanking, if i want to (comp myfn .toLowerCase), how do I do that?
22:08devnI thought it was memoize?
22:08rbxbxdon't you just need to wrap the method in an anon fn?
22:08rbxbx(comp myfn #(.toLowerCase %))
22:10devnyep :)
22:10cantsin`guys, im having problems installing lein. i get "Could not find artifact lein-newnew:lein-newnew:jar:0.3.7"
22:11cantsin`i dont have http_proxy set or anything like that, anyone have any ideas?
22:11rbxbxdevn :)
22:11cantsin`(lein version is 2.0.0-rc1)
22:12jkkramerthere's also (comp myfn (memfn toLowerCase)) but hardly anyone uses memfn
22:13rbxbxjkkramer didn't know about that. Why don't people use it? Seems it more clearly expresses intent.
22:14jkkramerI dunno. maybe because it's a dirty macro
22:14rbxbxAlso doesn't seem to work?
22:14rbxbxuser=> ((memfn .toLowerCase) "FOOBAR")
22:14rbxbxIllegalArgumentException No matching method found: .toLowerCase for class java.lang.String clojure.lang.Reflector.invokeMatchingMethod (Reflector.java:53)
22:14rbxbxuser=> (.toLowerCase "FoOOBAR")
22:14rbxbx"fooobar"
22:15tpoperbxbx: extra dot
22:15jkkramer&((memfn toLowerCase) "FOOBAR")
22:15lazybot⇒ "foobar"
22:15rbxbxdoh.
22:15rbxbxtpope thanks.
22:16rbxbxI should work on that whole thinking before speaking thing.
22:16tpopeincidentally, you're also including an extra . at the end of each line
22:17technomancycantsin`: run `lein version` inside a project first and it'll fix that
22:17technomancycantsin`: we'll have a final 2.0.0 soon
22:17cantsin`technomancy: thanks :)
22:19cantsin`technomancy: worked like a charm, thanks once again
22:19devni tend to do this kind of thing a lot: (defn thing->otherthing [thing] ...), and then make another fn (defn things->otherthings [things] ...)
22:19devnam i doing it wrong?
22:29devnhm, i think i need to build a fancy shmancy music server thingamabob in clojure
22:29devnso people can jam to my excellent tunages
22:30devn(.trustMe (> my-music your-music))
22:30taliosmmm distributed concurrent overtone
22:31tomojthe latency on my audio interface is already bad enough
22:31devnwhine whine whine
22:31devndo you want free music or not?
22:31tomojoh, yeah
22:31devn:)
22:31tomojI was referring to collab overtone over wan
22:31devnoh!
22:32tomojseems tricky
22:32devnman, i'm not that old. i'm 27
22:32devni remember wanting to be able to "jam" online with other musicians in real time, using analog inputs
22:32devnthis was in like 2000
22:32devni've seen lots of attempts
22:32tomojcan't really let people play live
22:32devnbut nothing satisfying
22:32devnit would be glorious if that could happen
22:33tpopetechnomancy: can we get a bump to nrepl 0.2.0-RC2 into lein?
22:33ibdknoxcollaborative overtone probably wouldn't be that hard
22:33devnyou know how there's the new york jazz scene, and the paris scene, etc.? imagine if you could just get online and play with dizzy gillespie or something.
22:33devnibdknox: someone already did it
22:33technomancytpope: definitely; can you open an issue so I remember?
22:34tpopeI can
22:34technomancygreat
22:34tomojbut there's too much latency to have your local play-time sync'd with your local listen-time, isn't there?
22:34ibdknoxdevn: with overtone?
22:34devnibdknox: yeah, can't remember what it was called now! blast!
22:34tomojif play/compose-time is ahead of listen-time I can imagine it
22:35ibdknoxtomoj: it's based on a metronome, so long as you sync the very first beat
22:35tpopewhoa, I've never seen "Please review the guidelines for contributing to this repository." before
22:35tpopeI want that on all my projects, NOW
22:35devndo you guys know about yaxu?
22:35devnalex maclean?
22:35ibdknoxtomoj: yeah, but that's true of overtone anyways right?
22:35ibdknoxI mean I guess you could come close to real time if you use some other input device
22:36ibdknoxbut if you're actually writing the code, it's hard to imagine that working
22:36tomojby 'live' (play-time ~= listen-time) I'm thinking of e.g. left click = drum hit, where I click along with what I'm hearing
22:36tomojoh, yeah
22:36devnhttp://yaxu.org/dorkcamp-and-new-demo/
22:36devnalex mclean makes everyone mortal
22:36ibdknoxI've tried out basically every real-time music jam service
22:37ibdknoxit never worked
22:37ibdknoxlike you said, the latency kills it
22:37devnibdknox: do you have a "best" if you had to pick one?
22:37ibdknoxanything more than about 30-40ms
22:37devnibdknox: or do they all just fuck it up?
22:37ibdknoxthe speed of light fucks it up ;)
22:38tomojbut how about a mashup jam, you each get a few tracks and queue up voices from samples on those tracks, which get auto mashed, and you have to pass 'solo' rights around
22:38devnibdknox: hence the number of services/apps/projects/whatever that allow you to download some editable version of music and collaborate on it, version control
22:39devnone idea that i havent seen is people collaborating on LOOPS in real time
22:39tomojyeah, was thinking that too
22:39devnpeople either seem to go for true real-time collaboration, or async collaboration
22:39ibdknoxthe loop thing is how I would imagine a collaborative overtone working
22:39devni think you probably need to meet in the middle
22:40devnsure, pile on after i have a great idea! ;)
22:40tomojI don't really want to write code in a browser, but some collab loop interface with clojure-extensible controls/effects would be cool
22:40devnbut no, i think that's something that is surprisingly close to real-time, whether people know it or not
22:40devnthat's how "grooves" happen
22:41devnyour bass goes: "bum _ _ _ bum bum bow" for 4 measures, and then i figure out some embellishment or addition that is satisfying and hit the enter key on my keyboard
22:42tomojjust need to coordinate change seconds in advance instead of, uh, shorter
22:43devnmaybe the one thing that sucks the most about any sort of async collaboration is that there usually isn't an immediate "no!"
22:43rbxbxdevn that's essentially how real time electronic music works anyway
22:43rbxbxie: playing with someone next to me on a pile of drum machines is going to be the same way
22:43devnrbxbx: but it's 1 person
22:43devni disagree. there needs to be a meeting of the minds
22:43devnsometimes people get to veto one another
22:44rbxbxI mean, it's easier irl because you have the feedback loop of their facial expressions and body language
22:44rbxbxbut that could be emulated as well via skype or some such
22:44rbxbxmuch like pair programming
22:44rbxbxin fact, overtone, skype, tmux, ssh. Find some way to pipe the audio realtime
22:45rbxbxdone
22:45rbxbxforget the browser
22:45devndown to brass tacks: I fucking love overtone. Overtone is bad ass. Truly bad ass. But I have to say that usually my experience with anything close to programming music goes like this: Cool. Wow. That's great. Holy shit. ...2 hours pass... Oh, I can play guitar. Why am I not doing that? That's *way* more fun.
22:45rbxbxdevn totally. but you were just trying to come up with realtime overtone collaboration
22:45rbxbxand I've given you that.
22:45rbxbx:D
22:46devnhaha. yeah. literally the last 8 years I've thought about this a lot, and it's really, really hard.
22:46devnI don't think you can emulate real-time collaboration even with a tiny murmur of delay in the signal
22:46devnit just doesn't work
22:46devnpeople are way more flexible
22:46devnthat's the joy of it
22:46rbxbxI think with loop based music you'd be fine
22:47rbxbxThat said I've not done extensive research.
22:47devnah but!!! I'll be the naysayer here
22:47devnmy experience with loop-based music is something like this:
22:47rbxbxyou typically vibe for a few bars anyway before adding components
22:48rbxbxdevn we should maybe take this offline, not sure #clojure is the appropriate venue anymore.
22:48devncool static loop! oh wait! it changes every single time you play it!
22:49devnrbxbx: meh. no one is saying anything.
22:49rbxbxWe're still filling the backlog with rubbish ;)
22:49devnPEOPLE OF #CLOJURE: IF YOU HAVE A QUESTION OR SOMETHING SUBSTANTIVE YOU WANT TO DISCUSS PLEASE MENTION IT NOW.
22:50seangroveDoes clojurescript modify js prototypes?
22:50devnagain: meh. the backlog is always filled with rubbish.
22:50seangroveI'm seeing some problems with other plugins on the same page, wondering if it's my/cljs' fault for modifying expected js primitive behavior
22:52devnseangrove: first question's answer: no.
22:52devnseangrove: second question'
22:52devnsecond question's answer: you didn't ask a second question.
22:52seangroveYes, glad you noticed that ;)
22:52seangroveGood stuff, back to trial and error
22:52devnseangrove: godspeed!
22:53seangroveMuch appreciated
22:53devn(keep going 50mph and you'll survive)
23:14alex_baranoskydevn: question 'what is the meaning of life'?
23:29wei_what's lein cljsbuild doing in the 30 seconds after it says "Successfully compiled …" and when it returns? hard to debug since there's no output.
23:29wei_since the targets seem to be generated, is it safe to kill the "lein cljsbuild once" process?
23:52Rayneswei_: Calling it's mom and talking about its dad's bowel movements.
23:53wei_hah.