#clojure logs

2014-05-03

03:38ivanthis lein-figwheel is cool https://groups.google.com/forum/#!topic/clojurescript/sKXiohA4hsw
03:52dbushenkohi!
03:53dbushenkois there a way to get all local variables and all bindings inside one function?
04:26amalloydbushenko: maybe. why would you want that?
05:17winkdefinitely sounds interesting, I only ever needed that for all global variables (in ruby)
05:20dbushenkoamalloy: trying to insert a debugging repl inside the code
05:20dbushenkoneed to evaluate it using the whole environment
05:21amalloyokay. in a macro, you can refer to &env, which will be a map whose keys are the names of locals
05:21amalloythe values of the map are opaque and mysterious
05:22dbushenkois &eve available outside the macro? I tried to evaluate it in the repl and it is not found
05:22dbushenko*&env
05:53amalloyno, that's why i said in a macro
06:01amalloythe idea is to expand into useful code based on the locals
06:01amalloy,(defmacro all-locals [] (into {} (for [[sym _] &env] `['~sym ~sym])))
06:01clojurebot#'sandbox/all-locals
06:01amalloy,(defn foo [x] (prn (get (all-locals) 'x)))
06:01clojurebot#'sandbox/foo
06:01amalloy,(foo 5)
06:01clojurebot5\n
06:52dbushenkoamalloy_, thanks!
06:52dbushenkothat was helpful!
07:33ambrosebsBronsa: can analyze take a keyword argument for the macroexpand-1 function to use?
07:33ambrosebs(analyze frm env :macroexpand-1 m)
07:34ambrosebsotherwise it seems I need to rewrite my own analyze to use my own mexpand?
07:34magopiani'm trying to understand the validation seqs in http://www.braveclojure.com/writing-macros/#7__Brews_for_the_Brave_and_True
07:34magopianand I don't get the "#(or (empty? %) ..." part
07:34Bronsaambrosebs: you mean rather than binding ana/macroexpand-1?
07:34magopianwhy have this (empty?) thing in there? what is it used for?
07:35magopianah, forget it, I just got it :)
07:36ambrosebsBronsa: hopefully I've understood how dynamic binding works, but it seems the body of analyze always rebinds ana/macroexpand-1 to the same fn
07:36magopian(it's to not have this validation error message displayed if the value is empty... it's a bit backwards because the validation function has to return "true" if valid
07:36Bronsaambrosebs: yeah, sure
07:36ambrosebsBronsa: rebinding it doesn't seem to do anything
07:37Bronsaambrosebs: I'll add a 3-arity to analyze and friend taking a default map of bindings
07:37Bronsaso you can do (analyze form env {#'ana/macroexpand-1 my-own-mexpand})
07:38ambrosebsBronsa: seems like a good time to use keyword args
07:38ambrosebsBronsa: but cool
07:38Bronsaambrosebs: not a big fan of kw args tbh
07:39ambrosebsor a flat map of kw args
07:39clgvmagopian: well the logic in the example checks not-empty first. you probably dont want to have two error messages for the same error when the second does not even apply
07:39ambrosebsgah
07:39Bronsahaving a map of var->fn makes it just a matter of (merge default-bindings opts)
07:40ambrosebsjust woke up from a nap
07:41magopianclgv: yup, got that after posting my question ;)
07:42magopianis it more idiomatic to use (get mymap mykey) or (mykey mymap) ?
07:43magopian(or even (mymap mykey) which looks sooooo backwards to me, but I know it works)
07:43magopian,(get {:foo :bar} :foo)
07:43clojurebot:bar
07:44magopian,(:foo {:foo :bar})
07:44clojurebot:bar
07:44magopian,({:foo :bar} :foo)
07:44clojurebot:bar
07:44clgvmagopian: it is idiomatic to have the keyword in first position for keyword access to maps. for everything else you need to put the map first, since otherwise your code might fail
07:45clgv,(:foo {:foo 42 :bar 4711))
07:45clojurebot#<RuntimeException java.lang.RuntimeException: Unmatched delimiter: )>
07:45clgv,(:foo {:foo 42 :bar 4711})
07:45clojurebot42
07:45clgv,(1 {1 2})
07:45clojurebot#<ClassCastException java.lang.ClassCastException: java.lang.Long cannot be cast to clojure.lang.IFn>
07:45clgv,({1 2} 1)
07:45clojurebot2
07:46magopianahhhh, I see, i didn't think of that, of course, you don't need keywords in a map
07:46magopianthanks a lot clgv
07:47magopianI find the forms without the "get" a bit more difficult to read, because you first have to find out what is this "function" you're calling
07:47magopianeg:
07:47clgvmagopian: yeah can use `get` then
07:47magopian,(let [mymap {1 2}] (mymap 1))
07:47clojurebot2
07:48clgvbut sometimes it's really useful to pass in a map where a function is expected
07:48magopianclojure feels very ruby/perl-like to me pythonista used to the TWOOTDI :)
07:48clgvtwoo..?
07:48magopianThere's One Obvious Way To Do It
07:48magopian(it's a Python moto)
07:48clgvarent there multiple ways in python?
07:49clgvafaik it's a multi paradigm language where you can program almost any way you like
07:49magopianthe language and well known, well spread and well evengelized idioms aim to have one obvious way to do things
07:49magopianbeing able to doesn't mean it's a good idea
07:50magopianyou could use a "for" with indexes and stuff, but it's not idiomatic, and you're very very encouraged to do things like "for ... in ..."
07:50clgvin general true but it raises the question why to support multiple paradigms then ;)
07:50magopian(the same way you usually don't use "for" and loops in clojure)
07:50magopianclgv: i'm not talking about paradigms here (programming in a functional/imperative/oo way)
07:50magopianbut really about "is it idiomatic to use this or this form"
07:51clgvthere is no rule to not use "for" in clojure ... it's pretty useful for data processing
07:51clgvbut it's a different "for" than in pythion ;)
07:52clgvmagopian: but than you have one idiomatic form for each paradigm right? so that's more than one way ;)
07:53magopianwell, not really
07:53magopianyou don't need one for each paradigm
07:53magopiani don't have a proper example at hand sadly
07:54magopianand i'm in no way trying to compare oranges and apples
07:54magopianjust telling about my feeling of being a bit lost with so many different possibilities giving the same end result
07:54magopianwhich one should I use?
07:55magopiani understand the freedom of using just any solution I feel like, but then, it's a bit more difficult for maintainers and reviewers
07:55Bronsamagopian: depends on what's your variable. (fn [m] (:key m)), (fn [k] ({:foo 1 :bar 2} k))
07:56magopianBronsa: i see
07:56magopianyou have a point
07:57clgvmagopian: that's the rule from above with keywords in call position
07:57magopianI might always use "get" or the "map first" forms, as they can be used in any case
07:58magopianthe keyword first only works for... well, keywords ;)
07:58clgvyeah but in that case it reads more like accessing attributes of data
08:08scape_not sure where refheaps paste button went, some reason I think I heard someone mention this last night. anyways.. here is a paste I'm curious about: https://www.refheap.com/85069
08:09scape_why does that actually work in the thread? is first some how not actualized until after the thread sleeps?
08:10scape_because the thread, it appears, gets the first element, sleeps (which is when the array is reset), and then somehow still can update the array. I'm confused how this is possible
08:14clgvscape_: what exactly do you expect to happen and what do you observe?
08:15scape_the threads reference to first ele would likely be a1, looking at the code, but its not
08:15scape_let me try somthing
08:16ambrosebsBronsa: in case my last msg didn't work, I mean (analyze form env opt)
08:16clgvscape_: could be b1 as well
08:17scape_https://www.refheap.com/85069
08:17ambrosebs(analyze frm env {:bindings bmap})
08:18clgvscape_: so? obviously b1 otherwise it would fail with an exception
08:18Bronsaambrosebs: uhm to you mean in case more opts will be added? sounds reasonable
08:18clgv,(let [a (promise)] (deliver a 0) (deliver a 1))
08:18clojurebotnil
08:18ambrosebsBronsa: hehe yes
08:18clgvoh wait. that was removed it seems
08:18scape_yes thats my point
08:18scape_:)
08:19clgvwhat's your point?
08:19Bronsaambrosebs: you have a point. let me change that then
08:20BronsaTIL get-in has a not-found arg
08:20clgvscape_: what is your original goal?
08:20clgvscape_: for coordination between threads you should use atoms or refs
08:20scape_ok
08:21clgvwell promises as coordination work for certain scenarios as well. but the array is not really suitable
08:22MorgawrI'm probably missing something but.. how come I can't see the "paste" button on refheap.com anymore? Has it been moved and I can't find it or am I just stupid? :(
08:22scape_yes, i see. figured it out too, array copy is fast
08:23scape_hit ? Morgawr
08:23Morgawrah
08:23Morgawrctrl+enter
08:23Morgawrwhy remove the button altogether?
08:23scape_idk :-\
08:23clgvui improvement? :P
08:23TEttingerpessimization?
08:23MorgawrI appreciate keyboard commands but this confused me a lot lol
08:23TEttingerworse is better?
08:24clgvstart a petition to get back the start menu on refheap ... oh wait, paste button I mean ;)
08:26TEttingerjust use the API and spam it with pastes demanding a paste button back
08:27MorgawrTEttinger: lol
08:36clgv,(slurp "http://refheap.com&quot;)
08:36clojurebot#<SecurityException java.lang.SecurityException: denied>
08:36clgvah clojurebot won't help ;)
08:52cYmen_Greetings clojurians.
09:02cYmen_Cursors are only consistent during the application render phase - that is inside the life cycle methods.
09:02cYmen_man...this om tutorial
09:03cYmen_I know neither what the render phase is nor the life cycle methods. At least there is an explanation of cursor but I'm not sure I understand it.
09:07clgvcYmen_: is there a link to preliminary literature?
09:08clgvcYmen_: otherwise let the author know what's missing
09:10cYmen_I think the authors assumes a little too much knowledge of react or something.
09:10cYmen_This is the basic introductory om tutorial and it says it requires knowledge of clojure/clojurescript.
09:12clgvcYmen_: happens to all of us right? ;)
09:13cYmen_Yeah, I'm in no way surprised and the tutorial is really not bad.
09:13clgvI know nothing of react or om. ;)
09:14cYmen_Well, it's some sort of framework for dealing with events.
09:14clgvyeah, seems to be the next big thing for clojurescript frontends as far as one can read on the ML ;)
09:16cYmen_hm...don't really read the mailing list
09:16cYmen_getting into clojure with a day job and a life is too fucking hard >_<
09:19MorgawrcYmen_: https://github.com/levand/quiescent I found this to be a much simpler and (imo) better implementation of React on top of clojurescript. Om is much more powerful but also much more complicated
09:19Morgawralthough I'm no webdev and I only dabbled with it a bit
09:19Morgawrhaving no knowledge whatsoever about react, I found quiescent to be easier to understand than Om
09:19mpenetit's not the first time I hear this about om... didn't try it myself tho
09:20mpenetthere's "reagent" also I think
09:20Morgawryeah
09:22cYmen_maybe I should try this quiescent
09:22cYmen_at least I'll get a different view on things :p
09:22cYmen_but then again constantly trying something new is a great way to never get anywhere
09:24clgvcYmen_: depends whether you are studying or actually trying to build something for work ;)
09:26cYmen_clgv: if I start asking philosophical questions like that I'll never do anything again ;)
09:32clgvcYmen_: the comparison on the quiescent page could help you^^
09:33cYmen_yeah I'm pretty happy with that
09:33cYmen_and the general backinfo on react, too
09:35ToxicFrogHmm
09:35clgvis "virtual dom" a similar concept like having an invisible buffer image in a gui to draw faster without gui updates?
09:35ToxicFrogThe documentation is ambiguous, but looking at the source, it looks like core.async filter< just flat out drops any messages that don't match p, rather than leaving them on the original channel
09:36ToxicFrogIs there an equivalent that doesn't drop messages? Ideally I want to have a channel with a bunch of different tasks all filter<ing on it with different ps.
09:39ToxicFrogOk, it looks like I want either pubsub or tap
09:51ToxicFrogMan
09:51ToxicFrogThe fact that you can only use <! and >! if you are lexically within a go block is annoying as hell
10:20ashtonkemerlingMorning folks.
10:20ashtonkemerlingNever realized how big this chanel was.
10:41frohello everyone! How do you stub external services? Maybe there is a library, that allows to save function responses somewhere on the disk (fixtures) automatically for using that for tests?
10:42ashtonkemerlingI always found that Midje had very nice semantics for stubbing out functions.
10:43ashtonkemerlingBut alas there was no way that I found to provide a reusable map of stubs.
10:45TEttingerserializable-fn ?
10:46froyes, I just want something, that will save function results automatically for test (better on hard disk). I can do it by hand, but I think this functionality is so obvious and maybe somebody have a solution
10:48ashtonkemerlingIf you have the spare bandwidth maybe write it for the community at large?
10:48ashtonkemerlingIt appears to be something that we're missing at the moment.
10:54froI just wonder maybe somebody have something in "the cache"
10:56Morgawrdoes it make sense that some clojure code runs faster without type notations/hints?
10:56ashtonkemerlingOff the top of my head? No.
10:56ashtonkemerlingUnless if the old type hints were wrong.
10:56Morgawrmm.. wait nevermind, I just had a spike, in average it runs the same
10:56Morgawrfalse alarm
10:57ashtonkemerlingMake sure your JVM is warmed.
10:57ashtonkemerlingThat usually ruins benchmarks.
10:57clgvcriterium^^
10:57Morgawrthanks
10:57MorgawrI'll keep that in mind
10:58clgvMorgawr: warmup and statistical analysis are the winning points here ;)
10:58Morgawryup
10:59Morgawris there a way to define type hints for collection of classes? like I have a vector of bodies (Body is a defrecord)
10:59ashtonkemerlingAnd that's why benchmarks are notoriously hard.
10:59clgvMorgawr: no. it would not have any impact on performance anyway
10:59TEttingerunless it's an array
11:00clgvMorgawr: what do you do with it? accumulating some values?
11:00Morgawrclgv: calling map or reduce (depends on the cases) on it
11:00clgvTEttinger: well but then you need areduce amap and co to have a result from a type hint ;)
11:00TEttingerright
11:00clgvMorgawr: reduce is efficient on vectors so you are safe there
11:00Morgawrso, next question is... is there any advantage in type hinting part of a function's signature but not all of it?
11:01whodidthishit me up with a cool way to add 1 to first 3 elements in vector [5 4 6 3 4]
11:01TEttinger,(apply + (take 3 [5 4 6 3 4]))
11:01clgvMorgawr: type hints only matter for interop with java. so just use (set! *warn-on-reflection true) and see where you get warnings and then apply type hints to get rid of those warning
11:01clojurebot15
11:02Morgawrclgv: I thought type hints helped with performance too?
11:02whodidthissorry, +1 to first 3 elements so [5 4 6 3 4] becomes [6 5 7 3 4]
11:02clgvMorgawr: no not in general only when you call member functions of java classes. type hints remove the need for runtime reflection
11:03Morgawrclgv: ah.. I see...
11:03ashtonkemerlingBecause Java is expecting a concrete type.
11:03Morgawrthis means it doesn't help with defrecord either, right?
11:03ashtonkemerlingSo it's gotta figure it out.
11:03clgvMorgawr: special case are arrays where you need typehints as well
11:03ashtonkemerlingWhereas Clojure prefers protocols & friends.
11:04Bronsa,(mapv + [5 4 6 3 4] (concat (repeat 3 1) (repeat 0)))
11:04clojurebot[6 5 7 3 4]
11:04Bronsawhodidthis: ^
11:04clgvashtonkemerling: well it is actually the clojure compiler, when no type hints are given and the method signature with only object params does not resolve to anything usable it just generates code to call the give java method via reflection
11:05TEttinger,(map-indexed #(if (> 3 %1) (inc %2) %2) [5 4 6 3 4]))
11:05clojurebot(6 5 7 3 4)
11:05ashtonkemerlingRight.
11:05BronsaTEttinger ew
11:05ashtonkemerlingI've always hated map-indexed
11:05MorgawrI've found it useful a few times :P
11:05ashtonkemerling90% of the time I use it I've made a huge mistake.
11:06ashtonkemerlingUsually trying to redo a nasty JS algorithm without thinking it through enough.
11:06whodidthisBronsa: cool
11:06ashtonkemerling.... not that I've done that lately.
11:07TEttinger,(map apply (concat (repeat 3 inc) (repeat identity)) [5 4 6 3 4]))
11:07clojurebot#<IllegalArgumentException java.lang.IllegalArgumentException: Don't know how to create ISeq from: java.lang.Long>
11:07ashtonkemerling,(repeat 3 inc)
11:07clojurebot(#<core$inc clojure.core$inc@6314d9> #<core$inc clojure.core$inc@6314d9> #<core$inc clojure.core$inc@6314d9>)
11:08ashtonkemerlingThat seems an odd way to do that.
11:08TEttingerhaha
11:08BronsaTEttinger you don't want apply there
11:08TEttingerhe was looking for a cool way!
11:08ashtonkemerling,(map (concat (repeat 3 inc) (repeat identity)) [5 4 6 3
11:08ashtonkemerling 4]))
11:08clojurebot#<RuntimeException java.lang.RuntimeException: EOF while reading>
11:08ashtonkemerling,(map (concat (repeat 3 inc) (repeat identity)) [5 4 6 3
11:08ashtonkemerling 4])
11:08clojurebot#<RuntimeException java.lang.RuntimeException: EOF while reading>
11:08ashtonkemerlingDerp
11:08ashtonkemerling,(map (concat (repeat 3 inc) (repeat identity)) [5 4 6 3 4])
11:08clojurebot#<ClassCastException java.lang.ClassCastException: clojure.lang.LazySeq cannot be cast to clojure.lang.IFn>
11:09whodidthisrepeat is also quite cool for exploding lighttable
11:09ashtonkemerlingYeah, figured.
11:09ashtonkemerlingStill not sold on that editor.
11:09ashtonkemerlingBut I'm thinking of using it to sell my coworkers on Om.
11:09whodidthisi heard chris grang working on new editor now
11:10ashtonkemerlingHope not
11:10ashtonkemerlingThat's how you end up with a mess of half-finished things.
11:12whodidthishttps://www.youtube.com/watch?v=L6iUm_Cqx2s
11:12ashtonkemerlingI don't feel that LightTable is done.
11:13ashtonkemerlingIf only sound worked on this machine....
11:13ashtonkemerlingRight folks, time for me to go do things. Catch you all later.
11:13whodidthisim also quite saddened but maybe he has a plan
11:13Glenjamindoes he say LT is done?
11:16Morgawras far as I know there are other people working with Chris on LT/Aurora (not too sure), and I think he's going to have Aurora run inside LT or something
11:16Morgawrat least the design is similar
11:16Morgawrmaybe he's going to have a suite of editors for Clojure (and other languages) that run in a shared "engine" or something
11:20Glenjaminthe impression i got was more that aurora was a research project
11:20Glenjaminand lighttable was a product
11:25rolfb,(apply map list '((1 2) (3 4) (5 6)))
11:25clojurebot((1 3 5) (2 4 6))
11:25rolfbhi, could someone explain to me what's happening with the combination of apply map list?
11:27Bronsa,(map list '(1 2) '(3 4) '(5 6))
11:27clojurebot((1 3 5) (2 4 6))
11:28rolfbmap iterates over each column?
11:28bbloom(doc map)
11:28clojurebot"([f coll] [f c1 c2] [f c1 c2 c3] [f c1 c2 c3 & ...]); Returns a lazy sequence consisting of the result of applying f to the set of first items of each coll, followed by applying f to the set of second items in each coll, until any one of the colls is exhausted. Any remaining items in other colls are ignored. Function f should accept number-of-colls arguments."
11:28cYmen_map simply iterates over all collections always taking one element from each and applying the function
11:28rolfbaha
11:29bbloom,(map + [5 10] [1 2])
11:29clojurebot(6 12)
11:29cYmen_but map wants its parameters like this (map function list1 list2 list3)
11:29rolfbthat's the part which was missing for me then
11:29cYmen_you need apply because your list1...list3 are in a list themselves
11:29cYmen_so basically if you have (param1 param2 param3)
11:29cYmen_and a function foo which takes 3 parameters you can call it with apply
11:30cYmen_(apply foo (...params...))
11:30cYmen_well.. (apply foo params)
11:30cYmen_,(let [params (1 2 3 4 5)]
11:30clojurebot#<RuntimeException java.lang.RuntimeException: EOF while reading>
11:30rolfbthanks cYmen_; i think i've got it now. the confusing part was map iterating over columns instead, but it makes sense now
11:30cYmen_,(let [params (1 2 3 4 5)] (apply + params))
11:30clojurebot#<ClassCastException java.lang.ClassCastException: java.lang.Long cannot be cast to clojure.lang.IFn>
11:30cYmen_,(let [params '(1 2 3 4 5)] (apply + params))
11:30clojurebot15
11:31cYmen_,(let [params '(1 2 3 4 5)] (+ params))
11:31clojurebot#<ClassCastException java.lang.ClassCastException: Cannot cast clojure.lang.PersistentList to java.lang.Number>
11:31rolfbcould have used reduce instead of apply here?
11:32cYmen_sure
11:32rolfb,(let [params '(1 2 3 4 5)] (reduce + params))
11:32clojurebot15
11:32rolfbmaps and lists is new to me
11:32rolfbbut it's very cool
11:33cYmen_most languages have that these days
11:33cYmen_often it is more like "for each"
11:33rolfbcYmen_: i'm used to map iterating over the top elements
11:33rolfbnot taking the first of each collection
11:34cYmen_"top" elements?
11:34rolfbyeah, if you have a nested structure, it doesn't map the first column in each collection to the method you are mapping over
11:35rolfbit maps the entire structure as one argument
11:35cYmen_oh yeah, map does that as well in clojure
11:35Glenjaminrolfb: (map f coll) does that, but (map f coll1 coll2) is similar to (map f (zip coll1 coll2)) in other languages
11:35cYmen_but since you're using apply you have several structures
11:36rolfbyup, the difference Glenjamin points out it why I was confused
11:37rolfbthanks everyone
11:56cYmen_Why is this rotten cljs browser repl not working.
11:56bhaumancYmen_: if its not working its probably because you are using it correctly
11:57cYmen_YES!
11:57cYmen_Excatly what I thought.
11:57cYmen_But using it incorrectly didn't help.
11:57bhaumanlol
11:58bbloomcYmen_: yell at cemerick... or yell at dnolen to yell at cemerick :-)
12:00bhaumancYmen_: you could try this lein plugin I just wrote and see if it meets you needs
12:00cYmen_bbloom: I'd rather have some debugging advice. :)
12:00cYmen_bhauman: What does it do?
12:01bhaumanit’s a live coding plugin it depends on how you wrote your code base
12:01bhaumanhttp://rigsomelight.com/drafts/interactive-programming-flappy-bird-clojurescript.html
12:01bhaumanits replaced my REPL workflow
12:02Glenjamini read that article this morning, seems like a great concept
12:02jonasenbhauman: It worked great for me! I'm definitely going to use it more.
12:02Glenjamin(inc bhauman)
12:02lazybot⇒ 2
12:03jonasen(inc bhauman)
12:03lazybot⇒ 3
12:03cYmen_I don't have a code base yet.
12:03bhaumansweet I’m up to 3 :)
12:03bhaumancYmen_: then I would try it
12:03Glenjaminthe app i'm working on at the mo has records in its main atom, so a code reload screws up the state
12:04Glenjamini don't suppose you have any tips for that, beyond "don't use records"
12:04cYmen_bhauman: Going to try it later. Looks great!
12:04bhaumanGlenjamin: so the records turn into striaght up maps?
12:05Glenjamini treat them as maps, but i have a few hundred thousand and i was using records for efficiency
12:05bhaumanjonasen: Glenjamin: thanks for the props guys
12:05Glenjaminthis is server-side
12:06Glenjaminbut when i try and reload my code but keep on using the same state atom, i had issues because the record classes weren't the same anymore
12:06cYmen_bhauman: How are you using react with this? Should be save to use with om, right?
12:06bhaumanGlenjamin: ahh … but I don’t see how that messes up the client side
12:06bhaumanGlenjamin: records had different fields
12:06bhauman?
12:07Glenjaminno, same record, but tools.namespaces had wiped out the old one
12:07bhaumancYmen_: yep the same or better with om
12:07cYmen_Crap, have to go.
12:07cYmen_Will try it as soon as I get back. Stick around so I can bother you!
12:07Glenjamini'll have to give it another go when i get a chance - having to rebuild the state after a reload was getting annoying
12:08bhaumanGlenjamin: Don’t hesitate to reach out. I’d like to understand any workflow problems that happening
12:09jonasenis om meant to be used with react-0.10.0 or react-0.9.0?
12:10jonasenbhauman: the figwheel template includes react-0.9.0
12:10bhaumanjonasen: yep, that is just for convenience, I’m pretty sure om is on 0.9.0 right now
12:11bhaumanhttps://github.com/swannodette/om/blob/master/examples/animation/index.html#L4
12:59hugodeul135@$^
14:04rolfb(doc subseq)
14:04clojurebot"([sc test key] [sc start-test start-key end-test end-key]); sc must be a sorted collection, test(s) one of <, <=, > or >=. Returns a seq of those entries with keys ek for which (test (.. sc comparator (compare ek key)) 0) is true"
14:04rolfbwhat does "ek" mean here?
14:24michaelr525hi
14:25fifosineDoes anyone know of clojure programs that utilize self-modification?
14:32michaelr525here is a question: I have a function which reifies a Java type and returns the object, later a method on that object is called somewhere from the Java code. It seems that Clojure's runtime is having a hard time to dynamically load the required namespaces and so I'm getting errors like: Attempting to call unbound fn. I included a call to require the needed namespace to the method of the reified object and it seems that it helped. The
14:32michaelr525question is how to do it in a more elegant and correct way?
14:47michaelr525why are you so quiet, #clojure channel?
14:51cshellWhat’s the common pattern for deploying a ring app to production? Is it just ‘lein ring…’ from a git repo or do people prefer uberjars?
15:03michaelr525here is a question: I have a function which reifies a Java type and returns the object, later a method on that object is called somewhere from the Java code. It seems that Clojure's runtime is having a hard time to dynamically load the required namespaces and so I'm getting errors like: Attempting to call unbound fn. I included a call to require the needed namespace to the method of the reified object and it seems that it helped. The
15:03michaelr525question is how to do it in a more elegant and correct way?
15:07amalloymichaelr525: that's about all you can do. require the namespace once, before attempting to use the stuff in it
15:10michaelr525amalloy: is it a known problem?
15:10michaelr525it looks like the object's method is called from a different classloader or something like that
15:14amalloyis it a known problem that you can't run clojure code that hasn't been compiled yet? yes
15:16michaelr525hmm
15:16michaelr525The whole thing is AOTd, is it the same?
15:16michaelr525isn't
15:17michaelr525amalloy: ^
15:19amalloyprobably not
15:20michaelr525amalloy: the thing is Clojure usually resolves namespaces and loads them on demand automatically, I just wonder why it fails here?
15:21amalloyhuh? no it doesn't. it loads namespaces when, and only when, someone requires them
15:22michaelr525amalloy: of course I require them in the (ns) clause of the namespace which contains my reifying function..
15:22michaelr525but AFAIR, the actuall loading at runtime happens on demand
15:23amalloymichaelr525: it's quite possible i don't understand the scenario you've described
15:23amalloyperhaps you could put together a minimal paste that demonstrates the problem
15:23michaelr525amalloy: ok, don't go anywhere :) it'll be ready in a minute
15:28michaelr525https://gist.github.com/michaelr524/eb09034134b6fab964f0
15:28michaelr525amalloy: ^
15:29michaelr525the object returned by create-scheme goes to Java land which later calls (deserialize) which results in an unbound fn exception
15:31michaelr525if I put there (require '[avroclj.avro :as avro]) just before calling (avroclj.avro/deserialize), it resolves the error
15:32michaelr525like this: https://gist.github.com/michaelr524/14cc830a36e7c7d296c9
15:32ptcekAnyone doing MILP or LP in clojure/lisp (in particular creating the model and converting to .mps/.lp files)??
15:32lazybotptcek: Definitely not.
15:33amalloymichaelr525: sounds like a different classloader to me, or even a different jvm? storm probably does some weird stuff with your objects
15:34michaelr525amalloy: different jvm?
15:34michaelr525hmm
15:35michaelr525amalloy: i thought I could probably insert an (init) function in there which will require everything I need for this to work..
15:35michaelr525but it sounds dirty
16:07cYmen_phew
16:14cYmen_Is there a guide/howto on how to properly set up a brepl?
16:16cespare(let [n Double/POSITIVE_INFINITY] (case n Double/POSITIVE_INFINITY "yes" "no")) ; "no" ??
16:16lazybotcespare: Uh, no. Why would you even ask?
16:18cespare(let [n Double/POSITIVE_INFINITY] (= n Double/POSITIVE_INFINITY)) ; true
16:18cesparethis doesn't make sense to me.
16:18amalloycespare: case clauses aren't evaluated (ie, they're quoted). 'Double/POSITIVE_INFINITY is a symbol, not a number
16:19cespareok thanks
16:19cesparecase bites me again :)
16:19bbloomcespare: use `condp =`
16:19bbloom,(let [n Double/POSITIVE_INFINITY] (condp = n Double/POSITIVE_INFINITY "yes" "no"))
16:19clojurebot"yes"
16:20cYmen_Is there some way to check if the js part of the brepl connect is being executed?
16:30kenrestivothe chrome network debug tab?
16:35cYmen_hm..crap looks like it's not even getting called
16:35cYmen_I must be missing something. :/
16:37kenrestivoi use weasel instead and life is joy
16:38cYmen_weasel?
16:39kenrestivo~weasel is https://github.com/tomjakubowski/weasel/
16:39clojurebotIn Ordnung
16:39kenrestivoweasel?
16:39kenrestivo~weasel
16:39clojurebotweasel is https://github.com/tomjakubowski/weasel/
16:39clojurebotweasel is https://github.com/tomjakubowski/weasel/
16:39kenrestivooh clojurebot, you so laggy
16:41amalloykenrestivo: the lag is on your end. clojurebot answered you instantly
16:41kenrestivobig win for me with weasel was being able to refresh the page and not lose my nrepl connection
16:42cYmen_yuck
16:42cYmen_spotify application
16:42cYmen_just...yuck
16:43kenrestivoi have no idea what spotify is, and have never used it
16:44hiredmanclojurebot: clojurebot |exploits| differences in network latency to appear to violate causality
16:44clojurebotYou don't have to tell me twice.
16:44hiredman~clojurebot
16:44clojurebotclojurebot is perhaps the definition of a legacy software system
16:44hiredmanthat too
16:44kenrestivoi thought clojurebot has a poetic soul?
16:45kenrestivoas for lag, i've got znc and ppp and mobile involved, so yeah, it's prolly me
16:46kenrestivoclojurebot rules and knows all
17:05ToxicFrogWhat is the equivalent in clojure of 'import java.io.ServerSocket'?
17:06ToxicFrogI figured (require '[java.io :refer ServerSocket]) would do it, but that gets me a confusing and unhelpful "no namespace: spellcast.net" error message (which is the name of the file's ns)
17:06ToxicFrog:refer [ServerSocket], rather
17:07bbloomToxicFrog: see (doc ns) and (doc import)
17:07bbloomrequire is for clojure namespaces, use import for java types
17:07ToxicFrogAah
17:07ToxicFrogThat worked!
17:07ToxicFrogUnfortunately, now that I'm past that, I have a syntax error.
17:07ToxicFrogWhere? NO-ONE KNOWS.
17:08ToxicFrogFucking hell, at least tell me what line you were parsing before you crash!
17:15amalloyToxicFrog: fucking hell, at least paste a proper stacktrace before you complain about uninformative stacktraces!
17:17ToxicFrogamalloy: here you go: https://gist.github.com/anonymous/7761258d238c96edc7af
17:18ToxicFrogIf you can figure out from that even what file the error was in, let alone exactly where, I will be amazed.
17:18amalloyhm, that is pretty bad. i would have expected to see a Caused By in there somewhere
17:18ToxicFrogNope. That's the whole thing.
17:19ToxicFrogThere's not even a "... n more" truncation.
17:19ToxicFrog(I did in fact find and correct the error by manual inspection of the entire codebase, which thankfully this program is still small enough for)
17:19bbloomToxicFrog: you've got a defn somewhere without a arg list in it
17:20amalloyyeah, that's obvious enough, bbloom, but i was surprised to see this doesn't say where
17:20ToxicFrogbbloom: well, yes, the question is where?
17:21bbloomToxicFrog: it's probably wherever you last changed something ;-)
17:21bbloomthat's the sort of error that git diff can find for you instantly, heh
17:21bbloom(not making excuses for bad errors, just saying)
17:21ToxicFrogActually, it wasn't anywhere near where I'd just changed something; I'd started writing something, then decided it was better off elsewhere and ended up writing a complete addition file without deleting the original (defn ...) I'd started writing.
17:21ToxicFrogYou're right that git diff would probably have found this pretty quick.
17:31dbaschthis is a pretty crappy error message: https://github.com/clojure/clojure/blob/master/src/clj/clojure/core.clj#L6826
17:32dbaschor at the very least the exception should be thrown higher up, where there’s more information
17:37visofhello
17:38Frozenlockdbasch: How so?
17:38FrozenlockUsually when I see this msg it's because I forgot to include the params vector
17:39dbaschFrozenlock: yes, but you don’t know where it happened
17:39visofCaused by: java.io.FileNotFoundException: clojure/foobar/native/.gitignore (No such file or directory) how can i dolve this error?
17:39Frozenlockdbasch: Ah ok, I see what you mean
17:39dbaschsee ToxicFrog’s paste earlier
17:40Frozenlockvisof: the file is not found... Does it exist?
17:41visofFrozenlock: i create native/.gitignore; when run lein run; i got native disappeared
17:43dbaschvisof: what does your program do?
17:46visofdbasch: http://sprunge.us/jCia
17:47cYmen_What is the relation between the app-state in the atom and the state that is passed to render-state when using om?
17:48cYmen_Consider this https://github.com/swannodette/om/wiki/Basic-Tutorial#dealing-with-text-input-fields
17:48cYmen_It seems the list of contacts is in: (def app-state
17:48cYmen_ (atom
17:48cYmen_ {:contacts
17:48cYmen_but the contents of an input field are in (def app-state
17:48cYmen_ (atom
17:48cYmen_oh ffs
17:49cYmen_sorry about the paste mess
17:49visof_dbasch: http://sprunge.us/jCia
17:49visof_dbasch: still there?
17:49dbaschvisof_: yes, I don’t understand how that even compiles
17:50visof_dbasch: why?
17:50visof_" is deleted in html
17:50dbaschfor one, you have strings without quotes
17:50visof_yeah
17:50visof_that's because the browser but i have them in my file
17:51dbaschwhy don’t you paste it to refheap?
17:51visof_dbasch: http://pastie.org/9137563
17:53dbaschvisof_: and your project.clj?
17:54visof_dbasch: http://pastie.org/9137567
17:54cYmen_Is refheap private now?
17:55amalloyhaha has Raynes still not fixed the paste button?
17:55visof_dbasch: http://pastie.org/9137574 error
17:55visof_dbasch: what do you think how can i fix this error?
17:55cYmen_amalloy: I guess not
17:56RaynesNo, since nobody bothered telling me about it.
17:56visof_Raynes: i'm bothered
17:56RaynesYou're all terrible people.
17:58cYmen_What, I just noticed it an brought it to your attention!
17:59visof_dbasch: still here?
18:00dbaschvisof_: yes, your code can’t possibly work as is
18:00dbaschfor one, your clojure dependency is wrong
18:00dbaschand also your requires are incompatible with your code
18:00visof_dbasch: so what do you suggest to fix it?
18:00RaynesI'll have this fixed in two shakes of a how the hell did this happen.
18:01dbaschvisof_: where is jiraph.masai-layer?
18:03visof_dbasch: you mean at project.clj?
18:03Rayneswhoa
18:03RaynesSomeone is using Jiraph?
18:03RaynesWild.
18:03dbaschvisof_: no, in your requires
18:04RaynesDeja vu.
18:04BronsaRaynes: how long have you been waiting to make that joke?
18:04RaynesBronsa: Which?
18:05BronsaRaynes: "wild", of someone using "jiraph"
18:05visof_dbasch: [flatland.jiraph.layer.masai]
18:07whodidthisthis is going to take a while
18:08dbaschvisof_: your project file and your source just don’t make any sense
18:11visofdbasch: sorry i got DC
18:11visofdbasch: still around?
18:12dbaschvisof: your source code and project file just don’t make sense
18:12visofdbasch: so what do you think to fix it?
18:13dbaschvisof: it looks like you’re trying to follow a tutorial, but you probably should step back and explain what you’re trying to do
18:13visofdbasch: i just want to start to use jiraph
18:14visofcreate a graph then add some nodes to it
18:14visofas in tutorial
18:17RaynesHaha, I know how I broke refheap.
18:18amalloyyou removed the submit button, bro
18:18RaynesI was editing the templates and realized I was in the wrong file, so I deleted a line I thought I had accidentally just typed.
18:18amalloywe all know
18:18RaynesThat line was the submit button.
18:18amalloyRaynes: fwiw, that's a great advertisement for using `git add -p` to review changes before committing them
18:18RaynesOr magit.
18:19amalloypresumably that would work too. except you use magit and made this mistake
18:20Raynesamalloy: Um
18:20Raynesamalloy: You have to choose to use that feature.
18:20RaynesI did not.
18:20RaynesIt's no different from having to choose to use `git add -p`
18:21amalloywhatever. i'm not saying magit is bad, i'm saying review features are good and you should use them
18:21amalloysince you brought up magit, i thought you were suggesting you had already used such a feature
18:22RaynesI do use that feature.
18:22RaynesJust not this one particular time.
18:27Raynesamalloy: magit master race
18:44Raynesrefheap is fixed
18:45AWizzArdWebsockets? What lib to use?
18:56the-kennyhttp-kit?
19:01AWizzArdthe-kenny: yes, I ran into that. But then… the github repo was updated the last time 2 months ago.
19:02AWizzArdAnd has 38 open issues.
19:05the-kennyHm, I'm not aware of any "newer" library. No recent updates might be a sign of mature software. Some of the issues are websocket-related though
19:10AWizzArdthe-kenny: nginx is many more years in development but had recent commits, although it should be extremly mature by now.
19:11CaffeineWhat would be a fast, scalable database for storing Clojure structures (maps, vecs, etc.)?
19:12AeroNotixCaffeine: depends on your query requirements and needed consistency guarantees
19:13AeroNotixCaffeine: do you have anything more specific to go on?
19:13CaffeineAeroNotix: I'll put more constraints in the application.. less in the DB... it's really more for storage than anything else... Property pattern oriented data... maps extending other maps, mainly.
19:14AeroNotixCaffeine: you're not understanding me
19:14AeroNotixDifferent databases have different guarantees about what they can do in a CAP theory sense.
19:14cmarquesHello, how can I reload new routes when using Ring + Compojure without having to restart the server? Thanks!
19:14AeroNotixCaffeine: and they also provide different ways of storing and retrieving data
19:15visofhow can i run https://github.com/ninjudd/jiraph basic example?
19:15DomKMIs it possible to lazily serialize and deserialize lazy seqs using nippy/freeze-to-out! and nippy/thaw-from-in!
19:15visofi didn't get done with errors
19:15AeroNotixcmarques: :ring {:auto-reload true} in your project.clj
19:15CaffeineAeroNotix: I was considering SQL for a long time, but I need something closer to clojure/lisp... more dynamic
19:15AeroNotixCaffeine: It just sounds like you have no clue what you need.
19:16AeroNotixCaffeine: *WHY* do you need a more dynamic database?
19:16visofwhat i did http://pastie.org/9137563
19:16AeroNotixCaffeine: what particular aspect of your application demands a "dynamic" database, whatever that means.
19:16visofhttp://pastie.org/9137574
19:16visofhttp://pastie.org/9137567
19:16CaffeineAeroNotix: Because the columns and tables have to be modified by the end users... that's what I mean
19:17visofplease anybody help?
19:17AeroNotixCaffeine: but even a regular SQL table you could do that with
19:18CaffeineAeroNotix: Anyway, I thought there was something more clojurish... if there's nothing, I'll just pick one which has a decent clojure wrapper I guess
19:18AeroNotixCaffeine: There's nothing for the zero specifications you have given, no.
19:18AeroNotix"More Clojurish" means... nothing?
19:19AeroNotixWhat does that even mean
19:19CaffeineAeroNotix: Hhaha ok ok thanks
19:19AeroNotixCaffeine: is your application a toy?
19:19AeroNotixIf so; just use anything
19:20AeroNotixbut if you are making something you hope to sell, or are desining a system for your job. It would behove you to put more thought into this.
19:22AWizzArdI have to agree with AeroNotix here.
19:23cmarquesAeroNotix: thanks, will try
19:23AeroNotixThere's tonnes of little details with databases. Data model, consistency guarantees, availability guarantees, replication, query models.
19:24AeroNotixetc etc
19:24CaffeineAeroNotix: Yeah, I'll do that... It's just crazy the number of databases there are around... I've already (last year) spend a week or so looking into the most popular various SQL and NoSQL databases.. you really have to know everything up front to be able to make a clear choice.
19:24AeroNotixCaffeine: exactly.
19:24AeroNotixCaffeine: particularly pay attention to something called CAP theory.
19:24AeroNotixAnd base your decisions on that
19:25AeroNotixafter that it's quite simple to narrow your choices down
19:26CaffeineLooked into that in the past too.. yeah I'll write down what I know and find a way to fill the gaps to make a better decision.
19:27AeroNotixCaffeine: look up anything by kyle kingsbury
19:27AeroNotixAnd his work on Jepsen
19:28CaffeineAh okay, I'll look at that too.
19:28CaffeineThanks.. homework time it seems
19:30mackini have a performance question regarding the jetty server, say a request comes in that requires computation that takes a while. if another request comes in, does it block on the first request completing?
19:31AWizzArdDoes not block, as Jetty handles each request in a new thread.
19:31AWizzArdJetty even supports something such as continuations. That means: you can start a new thread doing the computation and move the web-thread back into the pool, so it can work off other requests.
19:32AWizzArdAnd when your computation has finished you can "wake up" that old thread again, as if it never has stopped.
19:32mackinare there a limited number of webthreads? or can you specify the number
19:32AWizzArdLimited number yes. Check docs for more specific info or try #Jetty
19:33mackinty AWizzArd
19:36ToxicFrogIs there an equivalent to (pr) that emits a string rather than writing to a stream?
19:37AWizzArdToxicFrog: perhaps try (pr-str …)
19:42ToxicFrogAWizzArd: sweet, thanks
19:50Foam-Hello everyone. :) Anyone here familiar with embedding ClojureCLR from another .net language? I am struggling with the implementation, specifically how to pass in a string, have it get evaluated, and get the return result
19:51Foam-Is there a ClojureCLR channel? Maybe this isn't the right spot
19:53bbloomFoam-: are you calling eval and getting a string back? or are you just unable to call eval at all?
19:53waynrhowdy folks
19:53waynris it possible to develop a lein plugin and use it in a local project without deploying it?
19:53AeroNotixwaynr: sure
19:53bbloomwaynr: just `lein install` it in to your local maven repo
19:54AeroNotixlein install the plugin locally in the plugin directory and then use it
19:54AeroNotixyeah^
19:54waynrwhere is my local maven repo?
19:54AeroNotixwaynr: don't think about that
19:54waynris this kind of workflow documented or described somewhere?
19:54AeroNotixlein install will do it properly
19:54AeroNotixjust use `lein install` in the plugin project root
19:55waynrand then it will be available in another project root?
19:55AeroNotixwaynr: yeah
19:55AeroNotixbut do you really need a lein plugin?
19:55AeroNotixa lot of stuff can be done with aliases
19:55waynri'm listening
19:55AeroNotixwell, no, I'm listening. What're you writing a plugin for?
19:56Foam-bbloom: I don't even know how to call eval. Well, I import clojure.lang. then call "Compiler.eval(my_string)". then I get this odd error regarding "path1"
19:56Foam-:D
19:57waynrit's difficult to describe
19:57waynrlet me try
19:57bbloomFoam-: i dunno much about clj clr, but i can tell you that eval operates on *data* not strings
19:58bbloom,(eval "(+ 5 10)")
19:58clojurebot"(+ 5 10)"
19:58bbloom,(eval (read-str "(+ 5 10)"))
19:58clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: read-str in this context, compiling:(NO_SOURCE_PATH:0:0)>
19:58bbloom,(eval (read-string "(+ 5 10)"))
19:58clojurebot15
19:59Foam-bbloom: yeah, I saw that eval is expecting an Object. do you know how I'm supposed to convert a string to an object? I've found a reference to "LispReader" but that's it so far, not really sure how to use it yet
19:59bbloomFoam-: i just showed you ^^
19:59Foam-ha
19:59waynrso there is this clojure project at work that creates staging directory to prepare for os packaging of other clojure projects and it creates that staging directory based on templates and project-specific configs. currently, the project-specific configs are stored in the "staging" project but i'd like to try turning this staging project into a lein plugin so it can be used from within the other clojure
19:59waynrprojects themselves
20:00bbloomFoam-: i highly recommend you get some familiarity with clojure itself before trying to embed it
20:00waynrthen the configs would be stored in those projects themselves rather than in the staging project
20:01Foam-bbloom: i have a lot of lisp experience. the issue is translating a string of code from a CLR to ClojureCLR. I guess LispReader is the path forward
20:01AeroNotixyeah sounds like a plugin is needed, since you need to have access to arbitrary project map
20:01AeroNotixwaynr:
20:02bbloomFoam-: if you've got anything smaller than a file, read-string is the way to go
20:02waynrAeroNotix: that's what i was thinking, but i'm still fairly new to clojure
20:02AeroNotixwaynr: nw
20:02fowlslegsbbloom: Thanks so much for your comments 4 minutes ago. That helped me figure out how to handle something.
20:02bbloomFoam-: and clojure is fairly different than both CL and Scheme, so it's worth studying it
20:02bbloomfowlslegs: huh? what did i say? :-P
20:02AeroNotixvery different from CL, dunno about scheme.
20:03waynrthanks AeroNotix!
20:03AeroNotixwaynr: nw
20:03bbloomAeroNotix: i'd argue the otherway, hence i argue it's different from both ;-)
20:03fowlslegsJust the read-string/ eval combination. It gave me a good way to get around the 32-bit limit of Integer/parseINt
20:04bbloomfowlslegs: why not Long/parseLong ?
20:05AeroNotixbbloom: Ah! Imprecise wording. I meant that *I* personally don't know Scheme enough to comment on how different it is from Clojure.
20:06bbloom,(Long/parseLong "100000000000") ; fowlslegs
20:06clojurebot100000000000
20:06Rosnecas someone who came from Common Lisp to clojure, it's pretty different
20:06AeroNotixRosnec: indeed
20:06Rosnecand Scheme and Common Lisp have a lot more in common with each other than they do with clojure
20:07Foam-bbloom: I understand :) It's really not a clojure issue, just a plumbing issue with the CLR port
20:07fowlslegsbbloom: ahh that's what dbasch must have meant yesterday.
20:07Rosnecactually, I originally started learning CL by watching online MIT lectures on Scheme
20:08Rosnecwell, that and some google searching
20:08bbloomFoam-: you want this class: https://github.com/clojure/clojure-clr/blob/master/Clojure/Clojure/api/Clojure.cs
20:08fowlslegsbbloom: I have never seen the Long/* operators before.
20:08bbloomfowlslegs: they are just static methods on java.lang.Long
20:08bbloomFoam-: the way you use clojure from c#, for instance, is you get a var by name and invoke it like a function
20:09Rosnecso could somebody point me to an explanation on why recur does not destructure its arguments?
20:09Rosnecuntil today, I would have expected this to work:
20:09bbloomRosnec: recur is not a binding form
20:09Rosnec`(defn foo [& {:keys [b] :or {b 2}}] (if (> b 5) b (recur :b (inc b))))
20:10Foam-bbloom: thanks :) the implementation is a bit different from, say, ironscheme or such. I am looking at https://github.com/clojure/clojure-clr/blob/master/Clojure/Simple.Console/SimpleConsole.cs now
20:10fowlslegsbbloom: Are you saying operator is incorrect terminology or were you just giving me additional information?
20:10bbloomfowlslegs: both
20:10bbloomRosnec: re-read http://clojure.org/special_forms#Special%20Forms--(loop%20[bindings*%20]%20exprs*)
20:12Foam-what is RT and Var? is that the clojure runtime and the scope?
20:12bbloomFoam-: RT is just a bunch of runtime functions provided by the host language..... Var is a fundamental concept in Clojure... hence why i suggest you spend some time with clojure before embedding it
20:13Rosnecit just seems odd to me that I could define a function which can be called like (f :foo 3), but a recur form within f would take the form (recur {:foo 3})
20:13bbloomRosnec: you have to do the destructuring in the loop form
20:14bbloomRosnec: loop is a binding form, recur is not
20:14Rosnecohhh
20:14Rosnecnow it's starting to click
20:14Rosnecyeah, I understand now
20:17Rosnecit still seems odd that the function takes different arguments from the outside than it does from recur
20:17RosnecI previously thought that if you define a function foo
20:18Rosnecthat calling (foo args) was no different than calling (recur args), aside from TCO
20:18Rosnecare there any other differences?
20:18amalloyRosnec: well, the "reason" for this is that (fn foo [& xs]) is really just a method that takes one argument, xs, a list. and when you recur, you have to provide the one value it expects
20:18Rosnecaside from having to restructure the arguments?
20:22fowlslegsbbloom: Is there somewhere I can find a list of these methods where I can find out what they do without investing myself in learning Java?
20:22bbloomfowlslegs: http://docs.oracle.com/javase/7/docs/api/overview-summary.html have fun
20:30visofwhat this error mean Caused by: java.lang.IllegalArgumentException: No method in multimethod 'to-source' for dispatch value: class clojure.core.match.WildcardPattern ?
20:30visofand how can i fiz this?
20:30clojurebotexcusez-moi
20:30Foam-bbloom: turns out this is a ClojureCLR setup issue. I needed to init things first via Var.pushThreadBindings.
20:30visofs/fiz/fix
20:31Foam-bbloom: so it had nothing to do with the manner in which I was evaling from C#
20:32visofplease anybody help
20:33Rosnecto-source is a multimethod, which accepts certain types of arguments
20:33Rosnecclojure.core.match.WildcardPattern is not one of them
20:33Rosnecyet you gave it one
20:33Rosnecvisof
20:34visofRosnec: http://pastie.org/9138021
20:34visofthat's the full error
20:35visofso how can i fix it?
20:36Rosnecvisof, check what it is you're giving to the to-source function
20:36Rosnecor perhaps to-source is within something else you're calling?
20:36Rosnecvisof: are you directly calling to-source? if not something you're calling is calling it
20:37visofRosnec: all i try to do is sample jiraph
20:38Rosnecvisof: what do you mean by sample? do you mean you're running some examples that come with it?
20:38RosnecI've never used jiraph before
20:41amalloyi think jiraph is using a version of core.match that doesn't support AOT, and you're trying to AOT-compile it
20:42amalloythat's what the stacktrace tells me, anyway
21:12gfredericks,((fn f [x] (->> (repeatedly rand) (take-while #(< % x)) (map f))) 0.9)
21:12clojurebot(() (() () ()))
21:33akurilinOk this is strange: I will occasionally make some changes to my ring app and it will throw an exception when I make a request to it, reporting that some of my unit tests were unable to locate a namespace (which is a dependency of the test profile)
21:33akurilinI believe by tests are loaded under the default lein profile
21:34akurilinand I think most people keep their test deps under the :dev profile
23:10ToxicFrogOh, seriously?
23:10ToxicFrogcore.async implements its own terrible per-thread exception handler :(