#clojure log - Feb 16 2013

The Joy of Clojure
Main Clojure site
Google Group
List of all logged dates

0:18 lynaghk`: dnolen: ping

0:20 dnolen: prep is broken on master; (prep '[?x ?x ?x]) only turns the first symbol into an lvar

0:25 dnolen: 0fa6dd3 is the guilty commit; why the switch?

5:41 modulus: Do I need to have JDK to use clojure, or just JRE?

5:42 I'm getting an error running the seasaw repl tutorial which is why I'm saking. (display (text "This is a text field.")) says it can't resolve display symbol, no source.

5:47 abp: modulus: You mean this one? https://gist.github.com/daveray/1441520

5:48 Have you defined the function display? It's defined in the tutorial.

5:48 modulus: hmm sec, i may have missed that out

5:51 ok, i was dumb, i had missed that part

5:51 many thx

5:58 abp: Wow my ideas around graph based web-apps are finally resolving and Prismatics graph is out there. My weekend is over.

6:41 maio: any midje/clojure expert around? :) is there some way to state some fact inside threading macro? http://pastebin.com/gKwhBEuP

6:43 AtKaaZ: ,(('f 'f))

6:43 clojurebot: #<NullPointerException java.lang.NullPointerException>

6:44 AtKaaZ: ,(= nil ('f 'f))

6:44 clojurebot: true

6:45 AtKaaZ: is there another way I can return the symbol nil? other than ('f 'f)

6:46 ,(symbol 'nil)

6:46 clojurebot: #<NullPointerException java.lang.NullPointerException>

6:46 AtKaaZ: ,'nil

6:46 clojurebot: nil

6:46 AtKaaZ: ,(= 'nil ('f 'f))

6:46 clojurebot: true

6:47 AtKaaZ: ,((quote s) 1)

6:47 clojurebot: nil

6:49 AtKaaZ: ,((quote true) 1)

6:49 clojurebot: #<ClassCastException java.lang.ClassCastException: java.lang.Boolean cannot be cast to clojure.lang.IFn>

6:51 AtKaaZ: ,(= (symbol 'java.lang.RuntimeException) (quote java.lang.RuntimeException))

6:51 clojurebot: true

6:51 AtKaaZ: ,(= java.lang.RuntimeException (quote java.lang.RuntimeException))

6:51 clojurebot: false

6:51 AtKaaZ: ,(= java.lang.RuntimeException (eval (quote java.lang.RuntimeException)))

6:51 clojurebot: #<Exception java.lang.Exception: SANBOX DENIED>

6:53 abp: (GET "/search" _ :search) - invokes graph to compute :search - params/query -> db/search -> view/search-results -> :search

6:53 I think that's pretty sound. :)

7:24 pepijndevos: what happened to crane?

7:26 maybe i'm looking for pallet, or jclouds? confused.

9:32 devlol: Hi, I just wrote a small lib on top of compojure/clout which allow you to specify custom wrappers for specific endpoints, group of endpoints and generate iodocs documentation. What do you guys think of this approach ? https://gist.github.com/obohrer/c7011444273c36235558

11:32 pgmcgee: is there a way to write an data structure to a file and then read it back later?

11:36 tgoossens: you could just write it as a string

11:36 i guess

11:37 and then slurp it back in again

11:37 and convert it to a data structure again

11:37 tmciver: pgmcgee: check this out too: http://clojuredocs.org/clojure_core/1.2.0/clojure.core/*print-dup*

11:37 pgmcgee: thanks!

11:48 tgoossens: pgmcgee: you're welcome

12:31 palango: where has the positions function from clojure.contrib.seq-utils gone to? It's not in core and I couldn't find any info on where the namespace moved.

12:44 callenbot: how are people still using things from contrib?

12:45 alex_baranosky: database URL support - yes?

12:46 alex_baranosky: yes?

12:46 clojurebot: yes isn't is

13:22 Frozenlock: Is there a way to 'print' something that will only appear in the repl at the next evaluation?

13:22 hyPiRion: "that will only appeat in the repl at the next evaluation"? Are you talking about time travel here?

13:24 seangrove: Frozenlock: I'm curious what you mean as well

13:25 Frozenlock: something like (future-print "hey!"). Then (+ 1 2) ---> Hey\n 3

13:28 bbloom: Frozenlock: let's back up a step. Why do you want that?

13:29 Frozenlock: I have a sandboxed repl à la tryclj.com. The namespace will expire after a given time. I just want to send a msg to the user letting him know he is now in a new namespace.

13:31 bbloom: Frozenlock: odd... well if you're hooked into the REP-loop you can do whatever you want

13:33 hyPiRion: Frozenlock: do a check before evaluating data, and print if the repl has changed?

13:36 Frozenlock: Well I was hoping to just use the all-in-a-pretty-box clojail solution without fiddling too much around it :/

13:36 Might be what I'll have to do however...

13:50 yedi: hows #clojure doing this fine afternoon

13:51 Frozenlock: Pretty well indeed! How about you?

14:05 Is it possible to use noir-session related functions in a future call?

14:10 dcjackson: Is anyone other than me having trouble pulling down jars from central right now?

14:13 dbushenko: which is the best lib for pattern matching?

14:14 bbloom: dbushenko: there is core.match, but you probably don't need pattern matching. if you're coming from a language that does have pattern matching built it & you're used to it, you might want to try living without it for a little while

14:15 dbushenko: bbloom, no way, I need it.

14:15 core.match doesn't suit me since it can't match lists

14:15 sad...

14:15 cemerick: dbushenko: sure it can

14:16 dbushenko: cemerick, but how? The list syntax () is reserved for special uses. It does not match a literal list.

14:16 thats from its official doc

14:17 bbloom: dbushenko: https://github.com/clojure/core.match/wiki/Overview search "Seq matching"

14:17 ~list?

14:17 clojurebot: list* doesn't actually make a `list?`

14:17 bbloom: ~seqs

14:17 clojurebot: seqs and colls is http://www.brainonfire.net/files/seqs-and-colls/main.html

14:17 cemerick: dbushenko: what bbloom said, and if you absolutely must fix on the concrete list type, add a :guard list?

14:18 dbushenko: thanks!

14:18 bbloom: but `list? is 99% of the time NOT what you want

14:18 seqs != lists

14:18 dbushenko: bbloom? why not? I need exactly lists

14:18 bbloom: dbushenko: do you need stack push and pop semantics?

14:19 dbushenko: bbloom, looks like your are Obi Wan :-)

14:19 bbloom, these are not those lists you are looking for

14:19 ;-)

14:19 cemerick: 99.95%, even ;-P

14:19 bbloom: cemerick: unless you know what you're doing and are writing a macro :-P

14:19 even then, seq? is probably better heh

14:20 cemerick: bbloom: exactly

14:20 dbushenko: well, I've got such data structures (((1 [+ 2]) (((+ [2]) (2 [])) [])) [])

14:20 I need to fetc the data inside

14:20 I have those lists inside

14:20 bbloom: anyway, dbushenko, unless you need IPersistentStack, you want seqs and you don't care if they are lists

14:20 dbushenko: how I cant match them?

14:20 cemerick: dbushenko: that's fine, but guard on seq?, not list?

14:20 bbloom: ~seqs

14:20 clojurebot: seqs and colls is http://www.brainonfire.net/files/seqs-and-colls/main.html

14:20 bbloom: read that^

14:20 heh

14:21 dbushenko: I see what you mean. I need to have a look. thanks.

14:21 cemerick: e.g. ##(type (remove odd? (list 1 2 3 4)))

14:21 lazybot: ⇒ clojure.lang.LazySeq

14:21 cemerick: ^^ not a list

14:21 bbloom: and after you understand what i'm saying about seqs and lists, come back and i'll make you understand what i'm saying about pattern matching :-)

14:22 dbushenko: seems like you are inviting me to a cave where you'll give me the lightsaber of my father :-)

14:26 musicalchair: so I don't want to use list? because pretty much everything returns a seq and whereever I'm concerned about having a list I mostly might as well be concerned about have a seq instead?

14:27 bbloom: musicalchair: that's the short version, yes

14:29 musicalchair: bbloom: and you mentioned some nuance when writing macros?

14:30 dbushenko: bbloom, ok, now I have: (match ['(1 [+ 2])] [([a [b c]] :seq)] (list a)) It works the same as (match ['(1 [+ 2])] [((a [b c]) :seq)] (list a)) (see the parens inside the pattern)

14:30 bbloom: musicalchair: it's just that list? works as you expect in macros, but really that's not a guarentee, from what i can tell

14:30 cemerick: seqs are an abstraction, of which lists are a particular implementation. Fixing on lists is equivalent to fixing on array-maps to the exclusion of hash-maps.

14:30 dbushenko: but that is not what I want. I need to match only list, not a vector

14:30 is it possible?

14:31 bbloom: dbushenko: use a guard with the seq? predicate

14:31 dbushenko: thanks

14:31 bbloom: dbushenko: or better yet, use cond

14:31 dbushenko: bbloom, can you give me an example?

14:31 btw, I think not seq? but list?

14:31 bbloom: dbushenko: that page i linked you too discusses guards

14:31 musicalchair: cemerick: makes sense

14:32 bbloom: dbushenko: and you're clearly not listening with respect to seq? vs list?

14:32 musicalchair: list forms from the reader are always lists, so hence list? works in macros when parsing forms... but i don't know if that's enforced

14:32 the main thing about the List data structure as compared to the Seq abstraction is that lists are counted and implement IPersistentStack

14:33 dbushenko: looks like the solution with guards will be overcomplicated....

14:33 musicalchair: bbloom: ah, gotcha.

14:33 bbloom: so as cemerick says, 99.5% of the time, you should use seq? not list?

14:33 so much so that a lot of folks think that list? should be removed from core :-P

14:34 dbushenko: bbloom, btw, that's really confusing since list is usually a chain of cons-cells...

14:35 bbloom: dbushenko: it's only confusing b/c older lisps got this wrong for so many years....

14:35 dbushenko: :-D

14:35 bbloom: cons cells are a data structure, not an abstraction

14:35 clojure works with abstractions

14:35 cemerick: dbushenko: Clojure lists are *not* chains of conses

14:36 dbushenko: cemerick, yea, I already saw the explanation a few minutes ago

14:36 bbloom, in Haskell list is also a chain of cons-cells

14:36 bbloom: cons cells are not counted and do not provide stack semantics

14:37 dbushenko: eh, not really. haskell does so many funky thinks in the compiler that you can't really trust that to be true, heh

14:37 dbushenko: :-)

14:38 bbloom: dbushenko: haskell can leverage it's type system to accomplish deforestation, clojure can not

14:38 http://www.haskell.org/ghc/docs/7.0.3/html/users_guide/rewrite-rules.html#id644345

14:39 clojure, instead, utilizes chunked seqs to accomplish a similar optimization

14:39 which, again, are not cons cells

14:39 dbushenko: shit! thats great!

14:39 I definitely have to learn haskell deeper!

14:39 bbloom, can I ask you something? how old are you?

14:40 bbloom: 26

14:40 dbushenko: shame on me that I still don't know haskell...

14:40 bbloom: gotta start somewhere

14:40 dbushenko: :-)

14:41 abp: He folks, Prismatics Graph is awesome to write web apps.

14:49 dgrnbrg: Is there a version of autotest that works with lein2?

14:49 I want something that will rerun my tests every time I modify a file

14:50 using clojure.test

14:50 babilen: dgrnbrg: The newest midje version comes with autotest

14:50 (and can run clojure.test tests too)

14:50 dgrnbrg: can I use that without changing the ns declarations?

14:51 babilen: dgrnbrg: Sure, just run it: https://github.com/marick/Midje/wiki/Alternate-home-page + https://github.com/marick/Midje/wiki

14:51 abp: Have a look at that pretty app structure: https://gist.github.com/abp/4966883

14:52 babilen: dgrnbrg: You want lein-midje and midje beta1 at least

14:52 dbushenko: dam it... core.match is buggy!

14:52 dgrnbrg: babilen: very cool! I've used midje in other projects, but this project I started back before I moved through the testing frameworks, so it's still using clojure.test :/

14:53 I've become partial to expectations now, although I did have a fling with midje

15:00 babilen: dbushenko: yeah, it really is a shame that core.match does not receive more love

15:02 cemerick: dbushenko, babilen: what are the faults you've seen?

15:03 dbushenko: looks like it doesn't like nested lists

15:03 try this

15:03 (match '(1 (2 (3))) ([a [b [c]]] :seq) (list a b c))

15:03 it always return nil

15:04 babilen: cemerick: I haven't seen any faults. but development certainly slowed and people seem to have lost interest in taking it further. I remember dnolen say something along the lines of: I have more interest in other things, but feel free to take over.

15:04 dbushenko: And I can't even compile (match '(1 (2 (3))) ((a (b (c))) :seq) (list a b c))

15:08 bbloom: dbushenko: i'm almost certain your syntax is wrong there

15:08 dbushenko: but i don't use core.match, so i don't know

15:08 the reason core.match doesn't get more love is b/c 9 times out of 10, destructuring gets the job done and is deeply simpler

15:08 babilen: cemerick: There are also some issues that haven't seen much activity. I am not blaming anyone, but I simply sense a shift in interest. I thought that clojure.match would inspire lots of people and form the basis of things like cond-> (and much much more)

15:09 cemerick: dbushenko: (match '(1 (2 (3))) ([a ([b ([c] :seq)] :seq)] :seq) (list a b c))

15:09 dbushenko: cemerick, thank!

15:15 babilen: dgrnbrg: Not sure if you've figured that out already, but you can run the autotest functionality with "lein midje :autotest" (or by calling (autotest) in the REPL, see https://github.com/marick/Midje/wiki/Repl-tools)

15:15 dgrnbrg: babilen: yep, i got that working--good stuff :)

15:17 babilen: dgrnbrg: wonderful, enjoy!

15:17 clojurebot: No entiendo

15:23 warz: is there a way to install a clojure lib im writing in my local m2 directory? its not on clojars or anything, it's just on my local machine

15:23 but id like to require it from a different project as if it it were

15:24 i could just copy it out to the m2 directory but that seems like a bad idea

15:26 TimMc: ~repeatability

15:26 clojurebot: repeatability is crucial for builds, see https://github.com/technomancy/leiningen/wiki/Repeatability

15:26 TimMc: ^ some options there

15:27 You can always do lein install in the dependency's directory, but remember to actually push out a release before you release the dependant project.

15:28 cemerick: babilen: "slow development" isn't necessarily a bad thing, if what's there works. :-) The rest of it e.g. people's personal level of interest, etc is bound to wax and wane.

15:32 warz: TimMc, cool. lein install is exactly what i was hoping for. didnt know it could do it for local projects like that.

15:33 greywolve: hey guys, i'm trying to setup a project specific task in leiningen, but i keep getting a "this is not a task" error

15:33 are there any new tricks for this using leiningen 2?

15:34 seangrove: Alright, time to see if I can get testing going in cljs now

15:34 I was completely defeated by it a month and a half ago, going to conquer it now

15:34 Frozenlock: Take cover!

15:34 borkdude: I'm using java 1.6 - is it possible to add the jsr166y.ForkJoinPool as a dep via leiningen

15:40 augustl: any suggestions for how to "flatten" this nested structure the way I want? Really not sure how to go on about this so any suggestion is welcome :) https://www.refheap.com/paste/11346

15:41 Frozenlock: technomancy: why doesn't this throw an exception? &env and &form don't seem to be defined anywhere in your code. https://github.com/technomancy/serializable-fn/blob/master/src/serializable/fn.clj#L23

15:41 augustl: flattening nested structures sounds like a good fit for recursion, but I've never done something like it so not sure what to do..

15:42 cemerick: Frozenlock: those symbols are implicit arguments to all macros, that are not documented anywhere AFAIK

15:43 We talk about them in the book, if you happen to have it.

15:43 Frozenlock: cemerick: Oh! Yet more undocumented stuff!

15:43 cemerick: the oreilly one?

15:43 cemerick: yeah

15:43 http://clojurebook.com

15:43 Frozenlock: hprm... not yet, on my todo list :/

15:44 Or rather on my buy-when-epub-isnt-2x-kindle-price list. :)

15:45 cemerick: Frozenlock: they're mentioned in some wiki pages on dev.clojure.org

15:46 Frozenlock: ,(doc defmacro)

15:46 clojurebot: "([name doc-string? attr-map? [params*] body] [name doc-string? attr-map? ([params*] body) + ...]); Like defn, but the resulting function name is declared as a macro and will be used as a macro by the compiler when it is called."

15:46 tomoj: I don't think I ever noticed ##(let [x 3] (if-let [x nil] x x))

15:46 lazybot: ⇒ 3

15:47 seangrove: tomoj: Interesting, when the if-let fails, it clears its local definition of x?

15:48 cemerick: no new local is established if the value being bound in the if-let isn't truthy

15:48 TimMc: seangrove: No, it's just that the binding doesn't cover the alternative clause.

15:48 greywolve: anyone know how to add a project specific task in leiningen 2 ?

15:48 tomoj: ,(macroexpand '(if-let [x nil] y z))

15:48 clojurebot: (let* [temp__2390__auto__ nil] (if temp__2390__auto__ (clojure.core/let [x temp__2390__auto__] y) z))

15:49 TimMc: The alternative clause *is* covered by a gensym binding, though...

15:50 babilen: cemerick: I completely agree - It's just that I expected more active development when I heard about it first. I like slow development (if bugs get fixed), but I simply had the impression that dnolen lost interest a little and moved on to new lands (logic, cljs, ...) - But everybody has to decide what to spend time one :)

15:53 * Frozenlock just realized why (defmacro test [] [&env &form]) threw a stackoverflow error

15:56 borkdude: hmm, it would be nice if there would be also as-?> in 1.5

15:57 tomoj: some-as-> ?

15:58 borkdude: tomoj ah, -?> became some->?

15:58 technomancy: babilen: he said he would like to pick it up and fix the seq/vector disparity, but it's just not a priority right now

15:59 tomoj: borkdude: yes

15:59 borkdude: tomoj then yes

15:59 technomancy: greywolve: echo tasks > .lein-classpath; mkdir -p tasks/leiningen; touch tasks/leiningen/mytask.clj

16:05 greywolve: technomancy: thanks! i added .lein-classpath to my tasks/leiningen instead ;p

16:05 got confused ;p

16:06 technomancy: is there a difference between eval-in-leiningen and eval-in :leiningen ?

16:06 well eval-in-leiningen true

16:13 technomancy: greywolve: the latter is the lein1 way to specify it, but it's still supported for backwards-compatibility

16:14 greywolve: technomancy: thank you ;)

16:14 technomancy: that's not what you want if you just want to store a task in your project though

16:16 seangrove: So, trying to follow the advanced lein-cljsbuild example project, I can't get tests to run properly

16:18 Trying to run `lein trampoline with-profile test cljsbuild test` tries to compile the test-source file ('./test-src/zenbox/core/test/main.cljs'), but that's trying to :use functions provided by my clojurescript source

16:18 Let me type this out more coherently...

16:34 xeqi: cemerick: is there a way to alter an identity in friend, such as when a user changes their username?

16:34 seangrove: Ok, so here's the rub: https://www.refheap.com/paste/11352

16:36 In my test code, it's trying to :require a ns from my main cljs source code, but that code isn't in the classpath for the test profile

16:36 That's not a problem for the advanced example project for some reason though: https://github.com/emezeske/lein-cljsbuild/blob/master/example-projects/advanced/project.clj#L70

16:37 Raynes: Any thoughts on having multi-section pastes? I'd like to separate individual files and the console output

16:38 I don't think I want the main source-code in the source-path though, because then it'll be (presumably) compiled into my source code

16:38 Err, testing code

16:38 The testing code should be loaded *alongside* the to-be-tested source code, and interact with it externally

16:39 Or maybe not, I have no idea

16:40 cemerick: xeqi: sure, just put an atom in e.g. :roles (or whereever else you want to be able to mutate the identity)

16:40 I need to generalize the authz stuff to make it easy to account for such things

16:41 maybe implicitly deref'ing....? :-/

16:45 abp: (mapcat calculate-deps (graph/->graph graph))

16:45 nope, not the repl. :D

16:56 seangrove: If I constantly get "java.lang.RuntimeException: java.lang.OutOfMemoryError: Java heap space" when compiling, what's that usually a sign of?

16:57 abp: seangrove: Not enough memory?

16:59 seangrove: When compiling clojurescript on a 8gb machine?

16:59 Much more likely I'm doing something stupid

16:59 I see yoklov had the same problem here, but no solution http://clojure-log.n01se.net/date/2012-04-15.html

17:05 bbloom: seangrove: can you compile subsets of your codebase & monitor memory usage? you may be able to binary search to figure out which namespace is causing memory to balloon

17:05 erdos: hi

17:09 * gfredericks is reminded of http://xkcd.com/599/

17:09 Morgawr: I have a stupid question.. pardon me for this but... I am in a lein repl and I have loaded some file using (require 'myfile), now if I modify that file and re-launch the require command in the REPL the newly added stuff (a bunch of def) aren't recognized

17:10 I need to close and re-open the repl

17:10 is there a way to force the refresh?

17:10 bbloom: (require 'myfile :reload)

17:10 Morgawr: oh.. derp, thanks!

17:11 erdos: thanks

17:11 bbloom: when it doubt, ##(doc require) !!

17:11 lazybot: ⇒ ------------------------- clojure.core/require ([& args]) Loads libs, skipping any that are already loaded. Each argument is either a libspec that identifies a lib, a prefix list that identifies multiple libs whose names share a common prefix, or a flag t... https://www.refheap.com/paste/11355

17:11 hyPiRion: or :reload-all

17:14 xeqi: cemerick: hmmm, that might work for roles. I was more thinking about the username, but I'll have to go back and comb throught to understand the name -> map (which includes the name) interaction

17:15 tmciver: gfredericks: cute. Do you know your Erdős number?

17:19 gfredericks: tmciver: nope :/ I expect it's finite though.

17:21 tmciver: gfredericks: You a mathematician? I've perused your blog until my head began to hurt. :) I figure you're a mathematician or you *really* like math.

17:21 gfredericks: tmciver: the latter; just an amateur

17:21 I have a CS publication though

17:21 thus the finiteness

17:22 tmciver: Ah, cool.

17:22 gfredericks: writing my advisor right now to see if he knows his number :D

17:22 hyPiRion: oh, interesting

17:23 TimMc: gfredericks: I have "My Brain Is Open" in front of me right now. Fun book.

17:24 gfredericks: TimMc: I've never heard of it

17:24 TimMc: A book on Erdős.

17:25 gfredericks: more Erdös or more math?

17:26 Erdös number is officially unknown. :(

17:26 there's an author search that google leads to, but it's locked

17:29 brainproxy: need a way to allow website user to effectively create rich text email bodies which will be stored and mailed periodically (e.g. after a successful transaction) from the Clojure-based web server

17:30 was thinking I could embed CKEditor in a web page, convert HTML -> RTF using Apache FOP, then an email library to fire off the message

17:30 i mean the basic ideas all seem clearcut, but I was wondering if someone here has done such a thing, knows of an example I could study, etc.

17:34 akhudek: brainproxy: why convert to rtf?

17:34 rich email is html

17:34 brainproxy: akhudek: good point, maybe I could just send out html emails

17:35 oh, okay, shows what I know :p

17:35 akhudek: see postal

17:35 and think a bit about xss

17:35 brainproxy: of course

17:35 well luckily, only the site admin would use it, and i would double-check the POSTS and strip out any script tags

17:35 if there were any

17:36 akhudek: https://www.owasp.org/index.php/OWASP_Java_HTML_Sanitizer_Project

17:36 brainproxy: this is for a donations site, and the admin-user wants a way to periodically update the automated "thank you" emails

17:36 akhudek: believe it was born from one of the google security guys

17:37 brainproxy: nice, thanks so much!

17:40 akhudek: https://github.com/drewr/postal

17:41 brainproxy: yep, just checking that out

17:41 looks awesome

17:41 exactly what I need

17:41 akhudek: if you want to do embedded images, it's a bit tricker

17:41 but still doable

17:42 brainproxy: nah, I think she can live with basic rich formatting

17:42 akhudek: should be pretty easy then :-)

18:04 seangrove: Jesus christ, got automated testing in clojurescript + phantomjs working, though it's a bit kludge right now. Anyone have their clojurescript tied into a CI server?

18:07 erdos: hi! i am working on my very first clj project with incanter. too bad "lein run -m" gives me: "Exception in thread "main" java.lang.ClassNotFoundException: clojure.set, compiling:(incanter/core.clj:2018)"

18:07 could you please explain me what does it mean?

18:19 gfredericks: erdos: that's a pretty weird one; my foggiest guess is it might be an odd effect of something wrong in your own (ns) declaration

18:20 erdos: gfredericks: thanks

18:21 gfredericks: erdos: if your code is pretty minimal you could share it in a gist

18:25 erdos: gfredericks: here you are with the source (20 lines): https://gist.github.com/anonymous/4969185 thanks in advance

18:29 technomancy: erdos: probably the version of incanter assumes clojure 1.2

18:29 in 1.2 clojure.set was loaded automatically

18:31 gfredericks: ah; so try to require clojure.set first

18:32 technomancy: or get a newer incanter slash report an incanter bug report

18:36 erdos: technomancy: THANK YOU! it works for me with clj 1.3.0 and inc 1.3.0

18:51 augustl: hmm, I have a list of functions that I want to call threading macro style. Can I use the threading macro for this? Or do I need to write my own threading macro impersonator?

18:51 gfredericks: augustl: would apply comp work?

18:51 with or without reverse

18:52 augustl: gfredericks: looking up comp

18:52 gfredericks: ,((apply comp [inc inc #{/ 2)]) 7)

18:52 clojurebot: #<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: Unmatched delimiter: )>

18:52 gfredericks: ,((apply comp [inc inc #{/ % 2)]) 7)

18:52 clojurebot: #<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: Unmatched delimiter: )>

18:52 gfredericks: ,((apply comp [inc inc #(/ % 2)]) 7)

18:52 clojurebot: 11/2

18:52 gfredericks: sorry I'm not very good at clojure

18:52 augustl: hmm, I just realized I don't want threading macro style. I want the return value of calling the first function with the next, but stop as soon as a function returns nil

18:53 gfredericks: not too hard to do with reduce

18:53 I'm assuming you have this list at runtime; else you can just use some-> I would think

18:54 (reduce (fn [x f] (if (nil? x) (reduced x) (f x))) init-val funcs)

18:54 augustl: the list is actually compile time so I could macro it up

18:55 gfredericks: up to you

19:11 lynaghk: Does anyone have a suggestion for a clean way to use core.memoize's TTL cache ONLY for certain return values.

19:11 I.e., I'm putting it in front of another service and I don't want it to cache upstream 500 errors and such

19:12 gfredericks: I'd be surprised if you didn't end up having to do a custom caching policy

19:12 but I'm not familiar with the two libs in detail

19:17 tomoj: looks like you have to define a new TTLCache :(

19:21 Raynes: seangrove: Multipastes is a planned feature. I'm not adding features or fixing bugs at the moment until I finish moving to laser (which won't take very long if I can motivate myself to do it).

19:21 seangrove: The idea is that pastes would be linked so that each paste would be standalone, but would also appear alongside the paste it is linked to.

19:21 Because I'm purposely avoiding the 'file' connotation that Github uses.

19:22 A paste should be a unit, not a big collage of units OR a unit.

19:22 They aren't mutually exclusive.

19:22 I'm so damn innovative and thoughtful.

19:22 gfredericks: a paste should be a whole damn git repo

19:23 lynaghk: gfredericks, tomoj: alas.

19:23 gfredericks: with a wiki

19:23 tomoj: it's strange core.memoize redefines core.cache's through

19:23 and gets rid of the wrap-fn

19:23 really, hard codes it

19:24 but that wouldn't have helped anyway

19:24 abp: Raynes: Move to graphs :P

19:24 gfredericks: lynaghk: or if you want the bestest of codes, wrap your inner function in a function that throws exceptions on the values you don't want cached, then wrap the memoized function with code to catch and unwrap the exceptions. it's perfect!

19:25 Raynes: abp: That's funny because it *is* a graph, and where I work we have our own graph database (Jiraph).

19:25 abp: Yet I use mongodb. ;)

19:25 abp: Raynes: https://www.refheap.com/paste/11358

19:27 Raynes: yeah, pastes have no genealogy :P

19:29 gfredericks: I wonder how idiomatic putting :type metadata on the ex-info map would be

19:29 Raynes: abp: Your father's paste.

19:29 !

19:31 abp: Raynes: Drop all work, I need that feature now! I want to inherit some good pastes!

19:43 AtKaaZ: is there an idiomatic/easy way of returning (+ a 4) or 4 if a is nil ?

19:43 gfredericks: ,((fnil + 0) nil 4)

19:43 clojurebot: 4

19:44 gfredericks: ,((fnil + 0) 15 4)

19:44 clojurebot: 19

19:44 Raynes: I think you guys are pretty fine peoples.

19:44 AtKaaZ: that's pretty epic, thanks gfredericks

19:45 gfredericks: AtKaaZ: that's maybe the first time in my life I've thought of fnil.

19:45 AtKaaZ: :D

19:45 Raynes: amalloy speaks in fnils.

19:45 gfredericks: if it can't be expressed by combining fnil with juxt then you have no business doing it in the first place.

19:46 AtKaaZ: gfredericks: can you show an example of that?

19:46 gfredericks: no

19:46 AtKaaZ: ok:))

19:48 gfredericks: (let [append-to-self (comp (partial apply conj) (juxt (fnil identity []) identity))] (map append-to-self [[] [1] [2 3] nil]))

19:48 ,(let [append-to-self (comp (partial apply conj) (juxt (fnil identity []) identity))] (map append-to-self [[] [1] [2 3] nil]))

19:48 clojurebot: ([[]] [1 [1]] [2 3 [2 3]] [nil])

19:48 seangrove: What would be the difference between: `lein trampoline test` and `lein test`

19:48 gfredericks: there look what you made me do

19:48 seangrove: One runs the tests, the other appears to but doesn't output anything

19:49 callenbot: gfredericks: you really like being Quickdraw McGraw at these snippets.

19:49 gfredericks: callenbot: it's the only thing that keeps me from contemplating my own mortality

19:50 Also I'm practicing to someday answer a job posting that asks for somebody to implement a moderately complex algorithm in the next five minutes

19:51 AtKaaZ: ,(apply (fnil + 0) 1 '(nil))

19:51 clojurebot: #<NullPointerException java.lang.NullPointerException>

19:52 AtKaaZ: ah I got: NullPointerException [trace missing]

19:52 gfredericks: don't apply it, just call it

19:52 AtKaaZ: but I kinda wanna put it in a function

19:52 gfredericks: oh I see that ought to have worked

19:53 your args are reversed what I expected

19:53 AtKaaZ: ,(apply + 1 '(nil))

19:53 clojurebot: #<NullPointerException java.lang.NullPointerException>

19:53 gfredericks: ,(apply (fnil + 0 0) 1 '(nil))

19:53 clojurebot: 1

19:53 gfredericks: ^ that might do what you want

19:53 AtKaaZ: oh right, + does that, i forget

19:53 gfredericks: ,((apply fnil + (repeat 0)) [2 7 nil 8 nil nil 2])

19:54 AtKaaZ: ,(apply (fnil + 0) 1 2 nil)

19:54 gfredericks: &(apply (apply fnil + (repeat 0)) [2 7 nil 8 nil nil 2])

19:54 lazybot: java.lang.OutOfMemoryError: Java heap space

19:54 AtKaaZ: lol?

19:54 &(apply println 1 2 '(nil))

19:54 lazybot: ⇒ 1 2 nil nil

19:55 gfredericks: oh weird

19:55 fnil only has three arities

19:55 clojurebot: Execution Timed Out

19:55 3

19:56 hyPiRion: I like how clojurebot times out, whereas lazybot ends out of memory.

19:56 gfredericks: &(apply assoc-in (repeat :foo))

19:56 lazybot: java.lang.OutOfMemoryError: Java heap space

19:56 gfredericks: it's really weird that it can't throw an arity exception there

19:57 especially given that finite arities are limited to 20 or so aren't they?

19:57 AtKaaZ: does it try to realize the infinite lazyseq first?

19:57 gfredericks: presumably

19:57 AtKaaZ: or something like count on it?

19:57 tomoj: &(apply + (repeat 40 1))

19:57 lazybot: ⇒ 40

19:58 tomoj: how could it throw an arity exception?

19:58 count the args, compare to some arbitrarily chosen number?

19:58 gfredericks: tomoj: how does it throw an arity exception on ##(apply assoc-in (repeat 40 1))

19:58 lazybot: clojure.lang.ArityException: Wrong number of args (21) passed to: core$assoc-in

19:58 AtKaaZ: apply is special i think

19:58 ##*clojure-version*

19:59 ##(println *clojure-version*)

19:59 lazybot: ⇒ {:major 1, :minor 4, :incremental 0, :qualifier nil} nil

19:59 tomoj: oh, I see what you mean

19:59 AtKaaZ: ,*clojure-version*

19:59 clojurebot: {:interim true, :major 1, :minor 4, :incremental 0, :qualifier "master"}

19:59 tomoj: I forgot assoc-in is not variadic

19:59 (grr)

19:59 gfredericks: yeah that's why I picked it

20:00 hard to think of a fixed-arity function off the top of your head :)

20:01 tomoj: looks like args past 20 are turned into an array

20:01 gfredericks: surely not all the time

20:01 AtKaaZ: ,(apply (fnil + 0 0) 1 2 '(nil))

20:01 clojurebot: #<NullPointerException java.lang.NullPointerException>

20:01 gfredericks: ,(apply (fn [& args] (apply + (take 50 args))) (range))

20:02 clojurebot: 1225

20:02 gfredericks: tomoj: ^ it clearly didn't in that case

20:03 AtKaaZ: ,(apply (fnil + 0 0 0) 1 '(nil 1 nil))

20:03 clojurebot: #<NullPointerException java.lang.NullPointerException>

20:04 gfredericks: AtKaaZ: so you want to allow nils anywhere?

20:04 tomoj: hmm

20:04 AtKaaZ: it was fine before, but since I wanna generalize it

20:04 gfredericks: ,(->> [nil 1 nil] (filter identity) (apply + 1))

20:04 clojurebot: 2

20:05 tomoj: oh, RestFn handles that?

20:05 gfredericks: I have no idea :/

20:05 tomoj: &(class (fn [& args]))

20:05 lazybot: ⇒ sandbox22420$eval25950$fn__25951

20:05 tomoj: &(supers (class (fn [& args])))

20:05 lazybot: ⇒ #{clojure.lang.IObj java.io.Serializable java.util.concurrent.Callable java.lang.Object clojure.lang.AFunction java.lang.Runnable clojure.lang.IFn java.util.Comparator clojure.lang.IMeta clojure.lang.RestFn clojure.lang.AFn clojure.lang.Fn}

20:06 gfredericks: &(supers (class (fn [a])))

20:06 lazybot: ⇒ #{clojure.lang.IObj java.io.Serializable java.util.concurrent.Callable java.lang.Object clojure.lang.AFunction java.lang.Runnable clojure.lang.IFn java.util.Comparator clojure.lang.IMeta clojure.lang.AFn clojure.lang.Fn}

20:06 gfredericks: that's an interesting thing to note

20:06 tomoj: so assoc-in isn't RestFn

20:06 so it tries to put the remaining args into an array

20:07 gfredericks: I wonder if there are real edge-cases to worry about with more than 20 args but not RestFn

20:07 AtKaaZ: nice, thanks gf3

20:07 gfredericks xD

20:07 gfredericks: (inc gf3)

20:07 lazybot: ⇒ 1

20:08 AtKaaZ: lol

20:10 callenbot: gfredericks: don't think too hard.

20:11 tomoj: even 20 args.. jesus

20:11 autogenerated code?

20:11 I dunno

20:24 AtKaaZ: was there a lib that would expect passing maps as function params instead of clojure params something like {:param1 value1 :param2 value2}

20:24 seangrove: arohner: OOM killer :P

20:26 AtKaaZ: cause I'm stuck with the order of params and I want to skip specifying some params when doing the call without assigning nil to them

20:26 something like: (defn x [ & {:a :b}] ... )

20:27 gfredericks: tomoj: clojure won't compile function forms with more than 20 args, even if you emit it from a macro

20:29 Raynes: lazybot grew a new feature, if anyone cares.

20:29 $metacritic movie Being John Malkovich

20:29 lazybot: Critics: 90; User: 8.3 - http://www.metacritic.com/movie/being-john-malkovich

20:29 Raynes: Also works for 'xbox', 'ps3' and 'pc' (for the various game platforms).

20:29 AtKaaZ: $metacritic movie the man from earth

20:30 lazybot: I'm a little drunk. Can't find my keys.

20:30 Raynes: Should also work for albums but doesn't yet.

20:30 That does not appear to be on metacritic.

20:30 caleb_smith: $metacritic movie Pirates of Silicon Valley

20:30 lazybot: I'm a little drunk. Can't find my keys.

20:30 AtKaaZ: $imdb the man from earth

20:30 =)

20:30 Raynes: :p

20:31 caleb_smith: That one isn't there either. :o

20:31 caleb_smith: Even Bill Gates likes that one

20:31 tmciver: $metacritic xbox call of duty

20:31 lazybot: Critics: ; User: - http://www.metacritic.com/game/xbox-360/call-of-duty

20:32 caleb_smith: $metacritic xbox portal 2

20:32 lazybot: Critics: 95; User: 8.3 - http://www.metacritic.com/game/xbox-360/portal-2

20:32 Raynes: Hrm. They return different things for games that aren't found than they do for movies it appears.

20:32 $metacritic movie some random movie that doesn't exist

20:32 lazybot: I'm a little drunk. Can't find my keys.

20:33 Raynes: They do throw a 500 for them IIRC.

20:33 seangrove: $metacritic Supreme Commander 2

20:33 lazybot: I'm a little drunk. Can't find my keys.

20:33 seangrove: Bah :P

20:33 tmciver: $metacritic xbox when the hell is portal 3 coming out?

20:33 lazybot: Critics: ; User: - http://www.metacritic.com/game/xbox-360/when-the-hell-is-portal-3-coming-out?

20:33 Raynes: lol

20:33 seangrove: $metacritic pc Supreme Commander 2

20:33 lazybot: Critics: 77; User: 6.2 - http://www.metacritic.com/game/pc/supreme-commander-2

20:33 seangrove: Nice!

20:34 Raynes: Funfact: their 404 is a 200.

20:34 -.-

20:34 Should say 404 - Lies

20:34 seangrove: hah

20:35 ChongLi: how about ISPs whose DNS answers NOERROR when it should be NXDOMAIN

20:39 Raynes: $shell git pull

20:39 lazybot: Updating c7d4aa4..5798e5b Fast-forward src/lazybot/plugins/metacritic.clj | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)

20:39 Raynes: $reload

20:39 lazybot: Reloaded successfully.

20:39 Raynes: $metacritic xbox call of duty

20:39 lazybot: I'm a little drunk. Can't find my keys.

20:39 Raynes: That's better.

20:39 AtKaaZ: haha that's pretty epic

20:40 musicalchair: no tests? =P

20:40 Raynes: Haha, tests.

20:40 Adeon: $metacritic pc clojure

20:40 lazybot: I'm a little drunk. Can't find my keys.

20:40 musicalchair: ;O

20:40 callenbot: I need to make a shim for integrating casperjs into Clojure apps.

20:42 what's the name of that thing like bikeshed that makes code suggestions?

20:43 kibit, n/m

21:00 seangrove: callenbot: What do you use casperjs for?

21:02 callenbot: seangrove: functional testing.

21:02 I didn't know there were any other uses for it.

21:02 seangrove: Just saw it while finally getting phantomjs to work with my cljs codebase, wasn't sure about its use-case

21:03 akhudek: callenbot: do you use selenium?

21:03 callenbot: akhudek: as little as possible.

21:03 akhudek: casperjs is 10,000% nicer.

21:03 seangrove: Just about to ask that, going to hook up Webdriver/Selenium2 later tonight

21:03 How so?

21:04 callenbot: seangrove: try casper, then use selenium.

21:04 seangrove: going back to selenium after having used casper was like pissing blood.

21:04 seangrove: Just looking through the documentation now, it looks nice, but the approach seems limited

21:04 callenbot: "limited". I'd love to hear what's missing.

21:04 akhudek: it seems casper only does webkit, right?

21:04 seangrove: callenbot: Heh, I worked at Sauce Labs for a few years, definitely familiar with Selenium and all its horrid shortcomings

21:05 Yeah, that's the first thought, it'll be limited to phantom to begin with

21:05 But if it ties into the webdriver protocol, it could drive the other browsers directly... but then it'd be Selenium2

21:05 akhudek: testing web apps is a major pain

21:06 callenbot: it can be.

21:12 AtKaaZ: how can I (apply macrohere (rest params)) when I cannot modify the macro ie. it's a lib

21:12 gfredericks: AtKaaZ: that's a major reason why macros are awkward :)

21:13 bbloom: AtKaaZ: the only way really is eval, which is probably a terrible plan. much better to ensure there is a -fn variant of the macro, and even then it's probably not really great

21:13 seangrove: Could you (defn wrapped-macro [args] ...) (apply wrapped-macro) ?

21:13 gfredericks: usually you end up making your own macro, but that can't work if the length of params is determined at runtime

21:13 AtKaaZ: I see that if the lib would somehow decide in the future to change between macro and fn (or fn to macro) my code doing `apply` (or not doing it) would fail

21:14 seangrove: i think, can't take value of macro

21:14 or I don't understand what you meant xD

21:15 seangrove: AtKaaZ: Yes, please ignore it, I realized it wouldn't work

21:15 ChongLi: AtKaaZ: macros don't have a value and don't operate on values

21:15 Raynes: weavejester: What are the rules that make lein-ring reload my source files? It doesn't seem to do it even if lein_no_dev isn't set.

21:16 ChongLi: they merely operate on forms

21:16 AtKaaZ: they be ghosts:) &(declare ghost)

21:17 weavejester: Raynes: It reloads any file changed in the src directory.

21:17 AtKaaZ: ,(declare ghost)

21:17 clojurebot: #<Exception java.lang.Exception: SANBOX DENIED>

21:17 Raynes: weavejester: This does not appear to be the case for me.

21:17 weavejester: Raynes: Is it inconsistent, or consistently not reloading? Do you expect it to reload instantly, or when the next request hits?

21:18 Raynes: It had never reloaded ever under any circumstances since I started using it several versions ago.

21:18 I just thought I had a setting wrong, but all it appears to want is for LEIN_NO_DEV to not be set and I'm not setting. I guess maybe something else is.

21:18 I dunno what that'd be though.

21:18 I'll print the environment in my app and make sure.

21:19 weavejester: Raynes: You're using lein ring server, right?

21:19 Raynes: Yup

21:19 weavejester: Raynes: You can also add :auto-reload? true

21:19 AtKaaZ: bbloom: i'm trying to find a way with eval, not seeing it yet...

21:19 Raynes: Cool. I'll try that too.

21:19 weavejester: Raynes: Which forces auto reloading

21:20 bbloom: (eval (list* `the-macro args))

21:20 weavejester: Raynes: Is your src directory in "src"?

21:20 Raynes: Yeah.

21:20 weavejester: Confirmed LEIN_NO_DEV is unset. I'll try to do the auto-reload thing.

21:20 bbloom: AtKaaZ: eval & list* is basically macro apply :-P

21:21 AtKaaZ: bbloom: oh that's nice, I gotta try it

21:21 marcelluselgato: Raynes: this probably isn't helpful, but I fixed that same problem yesterday by upgrading to lein-ring 0.8.2 from 0.8.0

21:21 weavejester: Raynes: Well, the default for auto-reloading is true if LEIN_NO_DEV is not set.

21:21 Yeah, make sure you have the latest version

21:21 marcelluselgato: never figured out what was causing it

21:22 Raynes: I had 0.7.1.

21:22 Will try upgrading.

21:23 No dice.

21:23 weavejester: Raynes: You're on 0.8.2?

21:23 Raynes: Yeah.

21:23 * Raynes tries one more thing.

21:24 weavejester: It should reload when you send a request.

21:25 Raynes: Yep, won't work. :\

21:25 Oh.

21:26 weavejester: https://github.com/Raynes/refheap/blob/develop/project.clj#L19

21:26 If I had money, I'd pay you for dealing with my idiocy for 10 minutes.

21:27 Well, I have money, but I don't want to pay you for 10 minutes of idiocy.

21:27 :p

21:28 Yeah, the problem was between the keyboard and my chair.

21:28 Sorry.

21:29 weavejester: Raynes: You had :auto-reload? set to false? That would do it :)

21:29 Raynes: Yup.

21:29 marcelluselgato: hah

21:29 weavejester: It's nice to know that it's not a problem with the reload stuff. There's still a few issues with it.

21:30 abp: Yeah, when I get a stacktrace and hit reload I get the site, functioning in the pre-exception state..

21:32 callenbot: does anybody know of anything like ipdb or pdb for Clojure? Ritz doesn't seem to fit the bill afaict.

21:40 seangrove: So noir is dead, and compojure is the recommended migration path, right?

21:40 Raynes: Yes.

21:40 And lib-noir, especially if you used noir before.

21:41 AtKaaZ: thanks bbloom, i'm on my way to using that eval+list* after I'm done failing to make a macro which would handle both cases depending on what was passed fn or macro

21:42 bbloom: AtKaaZ: *sigh* don't take me for that. go patch the up stream library to expose that functionality as a fn instead of a macro

21:42 :-P

21:43 AtKaaZ: bbloom: it's timbre/log, is a macro :) but I wanna use that eval+list* so for that i thnak

21:43 bbloom: surely there is no reason timbre can't expose a function version of it's log function?

21:44 AtKaaZ: I could wrap the macro into a function in my lib, if that makes any sense

21:45 oh wait, that's what I was trying to do in the first place=)

21:47 bbloom: i'm looking at timbre now and i'm confused why i'd want all my log expressions to be macros.. that seems like a bad idea to me....

21:47 but i don't like conditionally removing logging at compile time from C programmers either

21:48 i think log levels should be a runtime config.... but that might just be me...

21:48 *shrug*

21:48 AtKaaZ: yeah that sounds good to me, to can do that at runtime

21:50 well actually, I might not need to use timbre for logging, since I'm half way using my own function to return the call position of itself where the call is made, i only need the date and loglevels hmm

21:50 but I still need an epply macro which does apply for fn and eval+list* for macros

21:54 amalloy: bbloom: even if log levels are purely runtime, you want log to be a macro

21:55 so that (log (some expensive calculation)) can check the log level before doing it

21:56 AtKaaZ: is there a cross between macros and functions that would do that?

21:56 like a hybrid

21:56 so you don't get the can't take value of a macro

21:56 but the params aren't evaluated before getting in

21:57 bbloom: amalloy: eh, i don't think i've ever encountered an expensive log statement

21:57 AtKaaZ: i guess you could always just put them in a list and pass the list

21:58 amalloy: AtKaaZ: whatever problem you are hoping to solve by using eval to call a macro at runtime, there is a solution that is better

22:00 AtKaaZ: amalloy: i'm trying to call timbre/log with a list of params which I get from a function fn [ & params] but I need to pass them as if via apply

22:01 and i needed that to be a function because I pass it to some other function which uses it as a print function

22:01 but i guess I could just macro that function which expects a function, i can't think

22:02 I just don't want too many macros if they can be functions

22:04 gfredericks: macros beget more more more macros

22:05 AtKaaZ: i need a macro that can take anything and return what it is ie. :macro :fn , is there such thing already?

22:06 amalloy: having never heard of timbre before, and now glancing over its source, i would not recommend using it. it doesn't look well thought out

22:06 AtKaaZ: and locals evalled :)

22:06 i have something already but it doesn't eval locals, so i can't pass it locals or function params

22:07 like: (#(macro? %) defn)

22:07 gfredericks: well it definitely wouldn't work as a function like that

22:07 that's a "can't take value of macro" error no matter what that function does

22:07 AtKaaZ: yeah you're right

22:08 gfredericks: there are other things I could say but it seems more likely this is a "why on earth do you want to do that in the first place" situation

22:08 AtKaaZ: =))

22:09 experimenting i guess, but I could use it in this case with epply, need to check if whatever i'm passed is a macro or not(ie.function)

22:10 gfredericks: epply is your macro version of apply?

22:10 AtKaaZ: yes, but should handle both cases

22:10 gfredericks: a) I don't think you'd have to distinguish, b) I can't see why epply would be useful

22:10 AtKaaZ: but don't give me the code if you already have it lol i kinda wanna do it myself xD

22:10 gfredericks: (epply defn [a b c]) == (defn a b c)

22:11 AtKaaZ: yea

22:11 amalloy: gfredericks: epply could be like bright colors in nature: stay away, i'm dangerous!

22:11 gfredericks: so may as well write the second one

22:12 AtKaaZ: but I'm in a fn [& [level :as params]] (epply timbre/log level (rest params))

22:12 gfredericks: AtKaaZ: and that will never work

22:12 AtKaaZ: that (rest params) is killing me

22:12 why not

22:12 gfredericks: because macros (like epply) run at compile-time and deal with code, not the value

22:12 so (rest params) is a list of two symbols

22:12 not the params to your function

22:13 AtKaaZ: oh i see

22:13 eval then?

22:13 gfredericks: if you must

22:13 AtKaaZ: but I wanted to generalize it

22:13 can't I eval those in the macro? and still work

22:13 gfredericks: what do these params do?

22:13 AtKaaZ: even though they are locals?

22:13 gfredericks: no

22:14 it's still compile time; the values don't exist yet

22:14 AtKaaZ: they are like the text message "a" "B" "msg"

22:14 but I'm returning it quoted

22:14 gfredericks: what do they mean to timbre?

22:14 AtKaaZ: timbre/log :info "showthismsg"

22:14 gfredericks: will it just join them together with str?

22:14 AtKaaZ: timbre/log :info "showthismsg" "concatenate" "more"

22:14 oh yeah that

22:15 gfredericks: so why don't you just do that and then pass the single string to timbre?

22:15 AtKaaZ: oh i see what you mean xD

22:15 gfredericks: most decent macros don't force you to use eval in order to make use of them

22:15 AtKaaZ: but what if I want epply in the future for a different macro

22:15 gfredericks: then don't use that macro it's a terrible macro

22:15 amalloy: AtKaaZ: then in the future you'll be just as wrong as you are now :P

22:16 AtKaaZ: :)

22:16 amalloy: "wrong" doesn't tell mee anything

22:17 gfredericks: macros aren't meant to be applied

22:17 the only way to do it is with eval; which is "wrong" in some senses

22:17 AtKaaZ: is it because it compiles at runtime?

22:20 ok i'm definitely going with join, thanks gfredericks

22:20 gfredericks: that's one reason, yeah

22:20 AtKaaZ: np; good luck

22:22 AtKaaZ: i don't know why I tend to want to abstractize even the things which I'm likely to use only once; but i kinda like it, though maybe not the process of doing it since it keeps branching and i forget from where i started, which reminds me, need an ide to can do trees like this

22:22 like Tree Style Tab addon for firefox instead of firefox normal tabs

22:26 is there some way to keep bookmarks maybe? in emacs

22:26 gfredericks: what would that mean? positions in files?

22:27 AtKaaZ: like save session as it is, while it follows that I try to implement some requirement and then get back to what the session was

22:27 not just position in current file

22:27 gfredericks: you would probably want that to integrate with git? it's already way complicated

22:31 caleb_smith: yeah, and if git seems to go beyond what you need (just something fast, not worth a branch), you could always try out 'git stash' or using gists

22:36 AtKaaZ: i usually find myself wanting a tree-like history while initially starting from root, like to do X i need Y and Z then i go into Y then i need G then i go into G and need K and L and I do those 2 get back to G out of it and i see for Y I need some more so sibbling of G(which is now completed) I need H and so on, eventually i get back to X; but I may not wanna commit each of these steps, likely

22:36 X is a commit when done

22:37 done=completed

22:37 clifton: is there a difference between (defn- ...) and (defn ^:private ...)? I was reading some patches on Clojure's JIRA and I saw the latter used a few times

22:38 Raynes: No. I prefer the latter because it's more consistent with the rest of Clojure.

22:39 They won't be adding new '-' private variants of new defing macros, so you end up doing ^:private with some things and defn- with defn and it's weird.

22:39 clifton: k, i see the former more often when im browsing others' libraries on github and the latter when looking at clojure source

22:39 ah, that's a good explanation

22:39 makes perfect sense

22:39 Raynes: You can certainly use defn- if you prefer, of course. I just prefer the other version.

22:42 amalloy: ^:private is also a lot "louder". it's very clear that the function you're looking at is private

22:42 defn- can easily get lost while you're scanning

22:42 Raynes: This is true.

22:42 clifton: yeah, it is more clear

23:22 a little off topic, but is there anything analogous to CtrlP for emacs fuzzy find-in-project?

23:26 AtKaaZ: /quit "wrong" is my middle name

Logging service provided by n01se.net