#clojure logs

2015-07-25

00:00TEttingerI can kinda tell what's going on
00:00TEttinger,(let [o *] (Math/floor (o (o (o 1/2)))))
00:00clojurebot0.0
00:00TEttinger,(let [o /] (Math/floor (o (o (o 1/2)))))
00:00clojurebot2.0
00:02TEttingerso it either repeats 0 times for *
00:02TEttingererr
00:02TEttingerrepeats n times for *
00:02TEttingeror n + 2 times for /
00:03justin_smithyup
00:03justin_smiththat's so we get the right answer no matter which one gets picked
00:04TEttinger,(/ (/ 3))
00:04clojurebot3N
00:04TEttinger,(* (* 3))
00:04clojurebot3
00:05kavkazHow do I calculate the sqare root of a number in Clojure?
00:05justin_smith,(Math/sqrt 2)
00:05clojurebot1.4142135623730951
00:05TEttingerkavkaz: typically you use the built in stuff in Java's Math class
00:05TEttingerlike justin_smith demonstrated
00:05justin_smithTEttinger: remember reduce supplies two args - that's the last bit to solving the whole thing
00:05TEttingerMath does not have a cube root, but it does have pow
00:06kavkazOh I see, thanks justin_smith, TEttinger
00:06kavkazI thought I tried the same thing before, but trying it again in the REPL showed me i had a typo
00:06TEttinger,(reduce * [2 2])
00:06clojurebot4
00:07TEttinger,(reduce / [2 2 2 2])
00:07clojurebot1/4
00:07TEttingerah
00:07justin_smithand there you have it
00:07TEttinger,(/ (reduce / [2 2 2 2]))
00:07clojurebot4N
00:07TEttinger,(* (reduce * [2 2]))
00:07clojurebot4
00:07TEttingerneat
02:44TEttingerjustin_smith: re: core.matrix I think it's a great idea but I don't know how it interops with existing java code that produces 2d primitive arrays?
02:45justin_smithTEttinger: it's a protocol, at least one of the backing implementations uses jblas
02:48crocketIs clojurescript ok for making command line apps?
02:51TEttingerhm. vectorz has an impl for double arrays (1D I think) being "vectorizable"
03:19crocketDoes clojurescript run on node.js without much hassle?
03:36crocketCan reader monad be an idiomatic construct in clojure?
03:38crocketReader monad can pass log config data down to the function at the bottom of a call stack without adding the log config to every function in the middle.
03:39crocketReader monad obviates global log config var.
03:47xtrntrhi, i tried this example on rosetta code
03:47xtrntrit doesn't work
03:47xtrntrhttp://rosettacode.org/wiki/Draw_a_sphere#Clojure
03:47xtrntr"could not locate quil/core_init.class or quil/core.clj on classpath" it says
03:50xtrntri followed the instructions on the quil homepage too, met with the same problem
04:00oddcullyxtrntr: have you started with the lein template as described here: https://github.com/quil/quil/wiki/Installing ?
04:43xtrntroddcully: sorry for the late reply
04:43xtrntri saw that page and yea it works for me now :)
04:49xtrntrthe example on the page works, not the rosetta code snippet
04:49xtrntrwill -try- at it
05:21kwladykai stack during write algorithm, i recursive problems :P Do you know good pattern or best practice to write complex algorithms? I don't know, like draw this on paper or something. I am looking new creative things which will help me solve it.
05:52crocketHow do I pass log config to every log function concisely?
05:53crocketlog/info(log-config "ok, log this")?
05:53crocketThis is not working well.
05:53crocketYou're going to use a global object, or pass log-config everywhere.
05:53crocketWhat else do we have in clojure?
05:55TEttingeryou may be able to set a log-config as a default? what logger are you using?
06:06crocketTEttinger2, I currently use tools.loggin and unilog.
06:06crocketI even contribute to unilog.
06:06crocketIt uses logback.
06:06crocketIt's not going to work on clojurescript.
06:28kwladykait is maybe stupid question, but i am totally confuse now... When use for and when use loop with recur? i have some situations where i am not sure which one should i use in algorithm.
06:29kwladykai need to build tree of solutions, like backtracking
06:30kwladykaand some of branch will fail so shouldn't be show as result
06:30kwladykabut some will pass
06:31kwladykaoh... it is just complex :)
06:31kwladykamaybe i will find something in the Internet
06:45crocketReader monad for the win
06:49wasamasacrocket: stuart sierra's component library gives you dependency injection to solve that problem
06:55xtrntri get this error when following the clojurescript tutorial
06:55xtrntrError: Could not find or load main class clojure.main
06:55xtrntrwhen i try to run java -cp cljs.jar:src clojure.main build.clj in termianl
06:56xtrntrusing os X
06:56xtrntranyone knows why?
07:34jaarodhi.. if you are typed clojure user, are you using it everywhere in your new code?
07:35xtrntroh :(
07:39crocketIs component sort of reader monad?
07:49crocketIf a library uses clojure 1.6 and another uses 1.7, will there be a problem?
08:23stiancrocket: clojure rarely breaks backward compatibility, 99% of the time stuff just works after an upgrade without any changes.
08:25crocketIf A requires clojure 1.6 and B requires 1.7 and C requires A and B, C will end up requiring 1.6 and 1.7.
08:26crocketJVM wasn't known to handle multiple versions of the same dependency well.
08:27crocketstian, ^^
08:28justin_smith"If A requires clojure 1.6 and B requires 1.7 and C requires A and B, C will end up requiring 1.6 and 1.7." - no, this is 100% wrong
08:28crocketThen, what
08:28justin_smithone of the versions is picked, the logic for picking one is up to the tool (likely lein in your case)
08:29justin_smiththe primary job of lein is to take your project.clj and build a classpath. Only one of those deps will end up in the classpath it generates.
08:29crocketIf 1.6 and 1.7 are incompatible, what happens?
08:29justin_smithcrocket: then you are fucked. But they are compatible, so you are fine.
08:29stiancrocket: afaik, it will use the clojure version defined in your project, not the one defined in the library.
08:30justin_smithstian: yes, if you explicitly have a top level dep, it will override transitive deps (with some caveats)
08:30crocketI don't like this.
08:31justin_smithcrocket: feel free to find a language ecosystem where libs don't have versions.
08:31crocketjustin_smith, I think it makes sense to be able to load two versions of the same dep.
08:31crocketnpm does that.
08:31justin_smithand it sucks
08:32justin_smithcrocket: note that with clojure on node, you can't have two versions of the same namespace
08:32crocketIs it ok to use OSGi to load multiple versions of the same dep?
08:32crocketAh, right
08:32justin_smithcrocket: it's possible, and it sucks.
08:33crocketnamespace doesn't support versions.
08:33justin_smithright
08:33crocketThis is very common.
08:33crocketA depends on logback 0.9, and B depends on logback 1.3.3.
08:34crocketlogback 0.9 is incompatible with 1.3.3
08:34crocketThen, I can't depend on both A and B.
08:34justin_smiththere's an experimental version of clojure from rritoch that supports multiple versions of a namespace via osgi, but I don't really think the result is worth the complexity
08:35crocketI wish Rich Hickey solved that problem up front.
08:35justin_smithhe did, the solution is not to support multiple versions of one namespace
08:36crocketThat's not a solution
08:37crocketIt amounts to declaring that it's a non-problem.
08:37crocketno problem, no solution.
08:37justin_smiththere's no way of allowing multiple versions of a namespace in one process that is better than not having the feature
08:46crocketI don't think Rich Hickey would accept OSGi...
08:46crocketHe tries to be conservative.
08:46crocketbruncol, You just sent me a spam message.
08:47crocketAre you on windows?
08:53crocketjustin_smith, Do you know reader monad, typeclass, and dependency injection?
09:09justin_smithI'm familiar with these concepts to various degrees...
09:10justin_smithin clojure we use protocols and multimethods instead of typeclasses
09:12justin_smithcrocket: typically when I think I need a monad what I end up with is an extra parameters or bindings map that each "monadic" function takes and passes to other functions
09:15crocketPassing log-config to every function that doesn't need to log is not right.
09:15crocketI'm not sure how reader monad is different from dependency injection like component.
09:15crocketI'll have to learn.
09:16justin_smithit is a form of dependency injection, but used in a different way of course
09:17justin_smithcrocket: so the alternative to passing the logging config to every function is to use a monad which lifts every function into a thing that holds the logging config?
09:18crocketcould be
09:18crocketMy guess
09:18crocketI'll soon start learning those tools
09:19crocketjustin_smith, What do you think is the best way to handle log config without introducing impurity?
09:19crocketA global var doesn't sound right
09:19justin_smithcrocket: one problem with monads in clojure is that unlike haskell, clojure is a very naive compiler, so monads are inevitably slow because they replace the call stack with a less efficient abstraction
09:19justin_smithcrocket: does the log config change during one runtime?
09:19crocketyes
09:19crocketjustin_smith, Refer to timbre
09:19justin_smiththen it's impure
09:19crockettimbre has a mutable var.
09:19crockettimbre has a mutable *log-config*
09:20justin_smithright, yes it does
09:20crocketIt is even dynamic.
09:20crocketI currently use unilog.
09:20crocketlogback has a similar approach.
09:20crocketIt is worse.
09:21crocketPlus, monad seems to intertwine every function it touches.
09:21crocketLike, a phase transition.
09:21crocketJust like any dependency injection framework.
09:21justin_smithyes, once you use a monad everything using that feature has to be lifted into monad-world
09:22crocketjustin_smith, What is your suggestion?
09:22crocketIt is hard to avoid a global state and a global function signature change at the same time.
09:23justin_smithcrocket: if you want something to change, and thus alter how everything works, that is a global state, no matter what fancy technique you wrap on top of it
09:24justin_smithso why not accept that it's global state and manage global state in a reasonable way.
09:24justin_smithcrocket: I use timbre with the per-namespace configs
09:26crocketjustin_smith, Just do keep in mind that the current timbre maintainer is a tyrant.
09:26crocketHe blocks people who want changes.
09:27crocketHow do you apply per-namespace config?
09:27crocketBy the way, unilog maintainer is open to changes....
09:27justin_smithcrocket: it's a documented feature of the config
09:41cmarquesI am trying to run tests from my editor, which is connected to a repl. My tests depend on things defined in the :test environment, however the repl is running with :dev profile. Is there any way to change the current profile when I execute the tests in a test namespace? Thanks!
09:43justin_smithcmarques: perhaps you could create a repl using the :test profile
09:44justin_smithcmarques: you can't change profiles at runtime, the profile isn't a thing that exists by the time your code is loaded - it's used to create the classpath / prep tasks / etc. that are used to launch your code
09:44justin_smithperhaps what you want is a runtime mechanism that changes some of the things your profile is controlling?
09:44cmarquesjustin_smith yeah, I thought about it, but then I'll need two instances of my editor running, one for each profile. It would be nice if there was a way to force the profile to be :test when I load a test file, like (load-profile :test) or something
09:45justin_smithcmarques: what editor? emacs at least can be connected to multiple repls
09:45justin_smithcmarques: like I said, the profile ceases to exist by the time your code is loaded
09:45cmarquesjustin_smith I guess that's the problem, I am using Vim with vim-fireplace
09:45justin_smithcmarques: what about the profile is different in your repl with :test ?
09:46cmarquesjustin_smith database connection urls
09:46cmarquesfor example
09:46justin_smithcmarques: I'd use a mechanism that allows runtime update - look into env for example
09:46cmarquesjustin_smith cool, I'll have a look. Thanks!
09:47justin_smithcmarques: my typical approach is to have separate edn files for each config, and some code that loads one of the configs when bootstrapping the code
09:47justin_smithcmarques: then, I can still load another config at runtime, regardless of my initial config
09:48justin_smiththis mixes well with stuartsierra/component
09:48cmarquesjustin_smith Hum... I am trying to use environ, which seems to be doing to much magic
09:48cmarquesjustin_smith looks like your approach offers more control
09:49justin_smithcmarques: environ is miniscule (check out the source, there's hardly anything there) - I use environ to guide loading my defaults, but have a function that can still be used at runtime
09:49flor-bcnsorry, got disconnected. Asking the same question again, so I have two vectors of equal size, representing questions and answers. How do I merge the two vectors into a vector of hasmaps, something like [{:question "from v1" :answer "from v2"}] ?
09:51justin_smith,(map merge [{:question "from v1"}] [{:answer "from v2"}])
09:51clojurebot({:question "from v1", :answer "from v2"})
09:52justin_smithor ##(map (fn [q a] {:question q :answer a}) ["from v1"] ["from v2"])
09:52lazybot⇒ ({:question "from v1", :answer "from v2"})
09:53flor-bcnjustin_smith: I need each :question and :answer to come from a respective item in the vector. So first item in both vector produces {:question "my question" :answer "first answer"}, second item in both vector produces {:question "second question" :answer "second answer"}, etc
09:53justin_smithdepending on what your input looks like
09:53justin_smithflor-bcn: that's what both those examples do
09:53cmarquesjustin_smith thanks for your help, I'll have a look at environ's source and see if I can come up with a way of redefining some of the values at runtime
09:53justin_smith,(map (fn [q a] {:question q :answer a}) ["from v1" "also from v1"] ["from v2" "also from v2"])
09:53clojurebot({:question "from v1", :answer "from v2"} {:question "also from v1", :answer "also from v2"})
09:54justin_smithcmarques: like I said it's pretty bare bones, I just use it to generate the default initial argument eg. :staging or :dev, that drives the real config
09:55flor-bcnv1 = ["q1" "q2" "q3"] , v2 = ["a1" "a2" "a3"] . Required result: [{:question "q1" :answer "a1} {:question "q2" :answer "a2"}....]
09:55justin_smithflor-bcn: that is what that code does!
09:55justin_smith,(map (fn [q a] {:question q :answer a}) ["q1" "q2" "q3"] ["a1" "a2" "a3"])
09:55clojurebot({:question "q1", :answer "a1"} {:question "q2", :answer "a2"} {:question "q3", :answer "a3"})
09:56jaarodhi.. if you are typed clojure user, are you using it everywhere in your new code?
09:56snowellWrap it in (vec) or (into []) if you really need a vector
09:56flor-bcnjustin_smit: you're right, thank you so much !
09:56jaarodor just in certain parts of your code (which?)
09:57justin_smithsnowell: s/map/mapv for that, of course
09:57snowellHeh, I always forget that exists
10:10jaarod,(map inc "hi123")
10:10clojurebot#<ClassCastException java.lang.ClassCastException: java.lang.Character cannot be cast to java.lang.Number>
10:10jaarod,(inc '1')
10:10clojurebot#<RuntimeException java.lang.RuntimeException: Unmatched delimiter: )>
10:10justin_smith,(apply str (map (comp char inc int) "hi123")
10:10clojurebot#<RuntimeException java.lang.RuntimeException: EOF while reading>
10:10justin_smith,(apply str (map (comp char inc int) "hi123"))
10:10clojurebot"ij234"
10:11jaarodcomp char inc int?
10:11justin_smithcharacters are not numbers, but "int" will return a number when given a character
10:11jaarod,(map (comp char inc int) "hi123")
10:11clojurebot(\i \j \2 \3 \4)
10:11jaarodI see
10:11justin_smith(comp char inc int) returns a function that applies int, then applies inc to the result, then finally applies char
10:12jaarod,(str (map (comp char inc int) "hi123"))
10:12clojurebot"clojure.lang.LazySeq@7ad6df1"
10:12justin_smithit's equivalent to (fn [c] (char (inc (int c))))
10:12jaarodah
10:12justin_smithjaarod: apply str uses each element of the coll as an argument
10:13justin_smithas opposed to str which simply looks at the coll itself. Because lazy-seqs are potentially unlimited, str does not look at their contents
10:13justin_smithbut apply gets around that
10:14Bronsajustin_smith: it actually realized the collection anyway :/
10:14Bronsa,(str (range))
10:14clojurebot"(0 1 2 3 4 ...)"
10:14Bronsadamned clojurebot
10:14justin_smith,(str (map pr (range)))
10:14Bronsa,(def a (str range))
10:14clojurebot#'sandbox/a
10:14Bronsawat
10:14clojureboteval service is offline
10:14Bronsa,(def a (str (range)))
10:14clojurebot#'sandbox/a
10:14Bronsa:|
10:14Bronsa,*clojure-version*
10:14clojurebot{:major 1, :minor 7, :incremental 0, :qualifier "master", :interim true}
10:15justin_smithBronsa: the eval service offline was in response to me
10:15justin_smithoh, you mean the def a returning immediately?
10:15Bronsayeah
10:16justin_smith,(def b (map identity (str (range))))
10:16clojurebot#'sandbox/b
10:16justin_smith,(def b (str (map identity (range)))
10:16clojurebot#<RuntimeException java.lang.RuntimeException: EOF while reading>
10:16Bronsa,(def a (str (iterate inc 0)))
10:16clojurebot#'sandbox/a
10:16Bronsawtf
10:16Bronsajustin_smith: well try that in your repl
10:17Bronsano idea how clojurebot works
10:18jaarodI like comp, first time I see it
10:18jaarodis it a function or a macro?
10:18Bronsaa function
10:18justin_smitha function, a very nice one
10:19justin_smithjaarod: see also, juxt - if you like comp you'll likely like juxt too
10:19justin_smith,(map (juxt dec identity inc) (range))
10:19clojurebot([-1 0 1] [0 1 2] [1 2 3] [2 3 4] [3 4 5] ...)
10:21Bronsahttps://groups.google.com/forum/?fromgroups=#!topic/clojure-dev/F68GRPrbfWo
10:21crocketjustin_smith, Is it with_config that you use in timbre?
10:23justin_smithcrocket: I misremembered, I was actually just using the :ns-blacklist feature to turn off logging in some overly chatty namespaces at runtime
10:23justin_smiths/runtime/dev time
10:24justin_smithBronsa: yeah, clearly I thought clojure was being smarter than it actually was
10:25justin_smithBronsa: I mean the intuitive thing is that if a lazy-seq is not printed readably, that's to avoid realizing it...
10:25Bronsajustin_smith: there's no good reason for the toString of lazyseqs to be the way it currently is :/
10:25justin_smith(inc Bronsa)
10:25lazybot⇒ 116
10:25justin_smithalways with the facts!
10:33crocketI'm back.
13:06smandyhi I've got a java8 class that takes a lambda - can I call it from clojure? i.e is there some sugar in clojure to let me create the expected SAM implementation?
13:16smandyfoos
14:40arkhsmandy: i think you would do this through normal clojure<->java interop
14:49arkhsmandy: nevermind - I just looked into it and wonder the same thing now
14:50amalloyyou can just reify an interface
15:30iamjarvoif one wanted to run this snippet of code how would one go about it? http://pastie.org/private/bsmntfmjesikndoruxdksa my thought process now is i can use lein exec and execute the script or create a lein project. any thing simpler?
15:34justin_smithiamjarvo: java -cp <class path goes here> clojure.main -e '(load-file "path/to/that/file.clj")'
15:34justin_smithclass path would hold any jars needed
15:34justin_smithif generating a classpath is complicated, then use a proper lein project and lein will do it for you
15:37iamjarvojustin_smith thanks
15:45justin_smithalso, for a script, you can potentially create a project, use `lein cp` to output a classpath, and just run java directly when invoking the script
15:45justin_smiththough uberjar might make more sense
15:51FareI'm trying to reexport a var from one ns into another. That used to work, but I recently updated to 1.7.0 and it doesn't seem to work anymore
15:54FareI get this error: java.lang.IllegalStateException: apropos already refers to: #'pyjure.debug/apropos in namespace: pyjure.core
16:01justin_smithsounds like you re-exported it already?
16:07Farejustin_smith, but no, I only re-exported it once
16:07Fareif I remove that re-export, the code loads, but the function is not exported.
16:14xeqiFare: are you requiring pyjure.debug with a :refer?
16:14wasamasapyjure??
16:14lazybotwasamasa: What are you, crazy? Of course not!
16:26Farexeqi: as a :use
16:31bchamI'm using the monger client at http://clojuremongodb.info/ and if I don't have an instance running on my local machine, I can't uberjar my app.
16:32bchamFor some reason the connection is being called but I don't have it in a def or anything
16:32justin_smithbcham: move your db connection into a function called in -main instead of doing it at the top level
16:32justin_smithbcham: clearly something is trying to connect while you are building, right? that means it's happening in a top level call somewhere.
16:33bchamjustin_smith: that's what I figured it was and that's what I had done, I thought but I guess I'll double check. Just wanted to make sure there wasn't something else I wasn't thinking about.
16:33bchamYeah I'm with you thank you.
16:37bchamYup got it, there was just one little thing that I hadn't looked at. Thanks justin_smith.
16:37bchamFWIW I'd really like to thank this IRC channel, always super helpful and nice.
16:38justin_smiththanks, it's great to hear that
17:59ed-gWhat do people use for web-application user login?
18:03justin_smithed-g stored bcrypt hash, and a signed token that the client provides with each request (so that one of the load-balanced servers can verify not only the token, but also the contents)
18:09ed-gjustin_smith, that sounds good. did you follow a tutorial or docs to set it up, or just dive in and experiment with libraries such as Friend. I'd like to use them but I haven't found examples of working applications, it isn't clear to me which parts of the authentication I am supposed to write versus what the libraries provide.
18:10justin_smithed-g: by the time I figured out enough so friend would make sense I already had my own solution
18:12ed-gyeah it's weird to me that no examples ever actually show a login page, or a complete web application. glad it's not just me.
18:14ed-gis the login portion of your application open-source, would you mind if I used it as an example?
18:16justin_smithnot the one I'm describing, no
19:27peatHello everyone. Clojure noob here. I have a pretty common pattern, but I'm not finding a clean way to address it -- most likely because I don't know what the name is. I created a gist to try and explain what I'm after. Thanks for your advice! https://gist.github.com/peat/982ad29845bfb003845b
19:32scriptorpeat: that's an essential idea behind monads, actually
19:33scriptorI'm not sure what the idiomatic way to to it in clojure is
19:33peatscriptor: Right. :) I'm wary of using the word "monad" because strictly speaking it's not, and people get a little bent out of shape about such things. ;)
19:34peatscriptor: I'm tempted to spend the evening hacking on the thread-first macro to get out a proof of concept, but ... I didn't want to re-invent the wheel if it's already been done.
19:34peat... granted, I might do it anyway just to learn me a Clojure the hard way.
19:35scriptorpeat: yeah, I purposely avoided saying that's what a monad was, just that it's an important idea
19:35crazydiamondHi. Are there any tools for Clojure, that take e.g. two pure functions, and extract common piece of code? Or refactor it to provide maximum entropy/minimum entropy/maximum of nested levels etc, whatever applicable?
19:36peatscriptor: :)
19:36scriptorpeat: https://clojuredocs.org/clojure.core/some-%3E
19:37peatYes!
19:37peatscriptor: Thank you! I can run with that.
19:37scriptorpeat: no prob! For future reference I just looked at the related functions of --> on clojuredocs
19:38peat... and it looks like there is a cond-> ... literally re-inventing the wheel over here. Haha.
19:38amalloycond-> is a pretty different thing from what you asked for
19:38peat... although it's conditional at each step
19:38peatamalloy: Yup, it allows for a custom test at each form, which is pretty nifty. :)
19:39peatAlright, I'm a happy camper. Thanks scriptor.
21:03arrdemSilly question that shows how long it's been since I've touched Java... what's a good example of a class with a public static mutable field?
21:04justin_smith /win 8
21:06arrdemlols
21:10amalloyarrdem: System.out?
21:11amalloy$javadoc java.lang.System setOut
21:11lazybothttp://docs.oracle.com/javase/6/docs/api/java/lang/System.html#setOut(java.io.PrintStream)
21:11justin_smithoh yeah, and the properties list exposed by System/getProperty
21:12amalloyi think that's not mutable without reflection cheats?
21:12amalloyoh, no
21:12amalloysetProperties indeed
21:12justin_smithright
21:14arrdemhum looks like System/out is not directly assignable
21:15arrdemI should probably just add a test class.
21:17justin_smithand System/getProperty System/getProperty is still a getter / setter pair not an exposed mutable field...
21:17arrdemright.
21:17arrdemI'm trying to test TEMJVM's mutable field setter
21:17arrdemtest coverage was pretty bad, I've dragged it up to about 79%, trying to get it to 90.
21:34SeyleriusThere any easy way to turn 5.597661 days into a clj-time interval?
21:35arrdemSeylerius: do you have that number as days or are you sourcing it as milli/microsecond
21:35arrdem*ds
21:36Seyleriusarrdem: I have a function that takes that number in days.
21:36SeyleriusA math formula, rather.
21:38SeyleriusActually, thought of a way around it.
21:39arrdemThat's probably for the best... I didn't want to reccomend anything with a loss of precision.
21:52SeyleriusOkay, what's the clojurish way to take the first entry of an infinite, lazy seq that satisfies a function?
21:52justin_smith(comp first (partial filter pred))
21:53justin_smith,((comp first (partial filter even?)) [1 3 5 8 7 12 3])
21:53clojurebot8
21:53Seyleriusjustin_smith: That returns a transducer that eats colls?
21:53justin_smithit returns a function
21:53SeyleriusWait, yeah.
21:54SeyleriusAnd that whole process is lazy?
21:54justin_smithnot quite - when called it will evaluate items in the input until one of the items is returned by filter
21:55justin_smithbut yeah, it is lazy enough not to consume a huge indefinite sequence
21:55SeyleriusLazy enough.
21:57arrdemYou could make it lazier with memoize...