#clojure log - Sep 13 2012

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

0:07 gtuckerkellogg: technomancy: thanks. For some reasons nrepl-jack-in starts an nrepl server, but doesn't connect my clojure buffer to it

0:07 * gtuckerkellogg is surely doing something wrong

1:08 MZAWeb: Hi. I need to convert #{{2 2} {3 1} {1 4}} to #{2 2, 3 1, 1 4}

1:09 Raynes: That isn't a map.

1:09 That is a set.

1:09 You can't have duplicate elements in a set.

1:10 MZAWeb: actually I need key value

1:11 Raynes: If you want to convert that set to a map, ##(into {} #{{2 2} {3 1} {1 4}})

1:11 lazybot: ⇒ {2 2, 3 1, 1 4}

1:11 MZAWeb: oh, cool, I think that's it

1:12 Indeed.

1:12 Thanks a lot

1:17 l1x: hey guys, how could i write a function which takes all numbers except 0 and 1?

1:18 is there an idiom for this?

1:20 i was thinking (when-not ((= n 0) or (= n 1)) ...)

1:23 amalloy: (complement #{0 1})

1:26 l1x: ,(and true false)

1:26 clojurebot: false

1:27 l1x: ,(let [n 1] (and true (= n 1))

1:27 clojurebot: #<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: EOF while reading>

1:27 l1x: ,(let [n 1] (and true (= n 1)))

1:27 clojurebot: true

1:27 l1x: good

1:28 amalloy: what result were you worried you might get?

1:29 l1x: i want to exclude some numbers from some functions

1:41 amalloy: https://github.com/l1x/euler/commit/8ff8a72b129baed081f62fef41e0d2656b2175c3#L0R184

1:41 let me know if there is a better way of doing that

1:42 amalloy: (or (or x y) z) is just (or x y z)

1:42 (if x false true) is (not x)

1:45 l1x: interesting, i tried and x y z and it was not working

1:45 let me try with or

1:46 amalloy: the same equivalence applies to and

1:49 l1x: (if (and (not (= n 1)) (not (= n 2)) (= (sum-of-factorials n) n)) true false))

1:50 yeah it works with and

2:05 cark: would it be possible to have lein 1 and lein 2 coexist ?

2:05 i mean on a single home rather than on a single project

2:22 amalloy: cark: easy. just name the executables (symlinks, whatever) lein1 and lein2

2:25 (or, indeed, anything you want. my point is, just install them both; they don't conflict in any way)

2:26 cark: cool thanks ... i have some old projects that i still need to maintain, but don't want to upgrade

2:40 tomoj: huh, the clojure JIRA flowchart clearly shows patch submission coming _after_ the issue is verified by a clojure/core member and vetted by a clojure committer

2:54 no7hing: i'm trying to destructure a map to some keys in a macro, but all the symbols/keys are nil

2:54 the map itself is there allright

2:59 cark: do you have a short gist showing your problem ?

3:00 clgv: no7hing: please make a gist where you show how your macro call should look like and what the expansion should be.

3:01 and your current implementation of course

3:01 no7hing: writing it

3:16 the gist https://gist.github.com/3712523

3:17 i *could* just do (:body body#) later on, but i might need the other keys too - and actually am curious what i'am doing wrong ;)

3:17 cark: action# is not action

3:18 hiredman: ,`action#

3:18 clojurebot: action__27__auto__

3:18 no7hing: when i just use action the macro uses namespace/action

3:18 cark: you should pass the full map as a parameter then destructure yourself

3:19 clgv: no7hing: so action/action# is the problem?

3:19 no7hing: yes

3:19 it's nil later on

3:19 clgv: ah right

3:19 cark: or destructure like this :

3:19 clgv: no7hing: well, do you really want to inject those names implicitely? in general that is discouraged

3:20 cark: (fn [{action# :action}]

3:20 no7hing: haven't thought of that

3:20 clgv: cark: that wont work either since he cannot use it in the body

3:21 cark: oh indeed, didn't read the rest of it !

3:22 no7hing: btw the choice of body as a key in the map and for the passed in function body is poor

3:22 don't let that distract you

3:23 clgv: no7hing: if I were you, I would pass the whole map and let the user destructure it

3:23 no7hing: otherwise it's likely that you curse yourself soon because you need an additional attribute from the map which you did not destructure

3:26 cark: how about (fn [{:keys [~'action]}]) then goal is to capture the action "variable" right ?

3:26 no7hing: famous last words: the three keys will never change; apart from that i'am trying to keep the passed in function as small as possible

3:26 yes

3:27 cark: well then there you go i think

3:27 Guest94126: cark: thats the implicit name capturing I meant before. (I forgot what the officil term was).

3:28 no7hing: it

3:28 's not working anyway :D

3:30 cark: working for me !

3:30 no7hing: umm

3:31 cark: https://gist.github.com/3712581

3:36 no7hing: thanks for helping guys

3:53 sunkencityryleh: what is the current best way of communicating with a repl from vim?

3:54 I'd like to launch swank or whatever with lein and then send stuff to eval from a region

4:11 Guest94126: sunkencityryleh: do you use vim-clojure?

4:12 sunkencityryleh: Guest94126: I just downloaded slimv for vim

4:13 Got it sort of running, but not quite, it doesn't seem to load much of clojure

4:13 Guest94126: sunkencityryleh: I heard that vim-clojure is actively developped

4:17 kral: namaste

4:17 sunkencityryleh: OK, I'll look into vim-clojure

4:32 lpetit: Bonjour tout le monde !

4:32 Raynes: Whatever you said right back at ya!

4:33 lpetit: ;) I said "Hello everybody"

4:34 cark: oh you're french

4:34 should've been oblivious with your name !

4:35 lpetit: cark: so because I speak french, I'm French ? :)

4:36 cark: nope, i'm from belgium and speak franch

4:36 french

4:36 so you're not ?

4:37 lpetit: In Counterclockwise editor tabs (revealing the name of the edited file), how about displaying the namespace in reverse order ? e.g. for namespace "somebody.someproject.core" it displays "core.someproject.somebody" ? So that when there are a lot of tabs open, what disappears first is the end of the displayed string (which contains less context that the start) ?

4:37 cark: no, I am. I was just kidding

4:38 cark: lpetit: only a french person talks english with such an accent =)

4:39 lpetit: cark: (blush) (and blame my parents ;) )

4:39 so true, btw

4:39 cark: haha

4:40 anyways just kidding, as long as people understand... who cares

4:41 ro_st: if we were all exactly the same, what point would there be to more than one of us :-)

4:41 lpetit: I wish I had a good english accent.

4:42 antares_: lpetit: a more common approach is to abbreviate initial ns parts, e.g. s.s.core

4:42 I believe Eclipse itself can do that, IDEA can, too

4:43 lpetit: antares_: already does the abbreviation, but sometimes it's still too long. So right now I'm adding an option for people to switch back to old behavior (which is just displaying the file name). But while doing it, the above mentioned idea occurred to me

4:45 antares_: lpetit: sounds like if you are completely out of space, only displaying the rightmost part is the best idea

4:45 reversing is likely to be even more confusing

4:45 lpetit: antares_: probably, yes

4:46 ro_st: can you not hover a tab to see the full path or ns?

4:46 (not a ccw user, just curious)

4:48 lpetit: ro_st: you can, indeed, but some people have lots of open editors and don't want to move their mouse over each tab, wait for the slight delay before the popup shows up, etc.

4:48 ro_st: yeah

4:53 cark: in emacs, i have it so that it will only show what's different so if i have cark.data.lenses and cark.example.lenses it will show lenses<data> for the former and lenses<example> dor the later

4:53 clojurebot: have you heard about the bird? is<reply>The bird, bird, bird, the bird is the word.

4:53 cark: dor/for

4:55 borkdude: what can I tell people about the usage of clojure, any numbers?

4:59 lpetit: cark: sounds great

4:59 cark: i wonder how you could find such numbers

5:04 ro_st: the google group has 5k+ members

5:04 KIMAvcrp: hi

5:05 antares_: ro_st: I think it has closer to 7K

5:05 ro_st: oh right :-)

5:05 KIMAvcrp: I found something strange using enfocus and a browser connected repl

5:06 if I user set-attr to set the value of a field the browser does not update the change

5:06 manual changing with (.-value (dom/getElement ...) "text") does work

5:06 any idea ?

5:07 ro_st: does the code work when you run it in a compiled cljs context?

5:07 paste the code on refheap as well, please

5:10 KIMAvcrp: it doesnt work in the compiled context

5:10 heres the code

5:12 https://www.refheap.com/paste/0b3021f60da47e24a572de369

5:12 ro_st: "press" is telling enfocus to look for a tag named press

5:12 ie, <press />

5:12 do you not perhaps want .press or #press instead?

5:13 KIMAvcrp: saw it just the instance

5:13 ro_st: you can also use :keywords instead of "strings" now

5:13 KIMAvcrp: strangely dom/getElement works with "press"

5:13 ro_st: what do you have in html? class="press" or id="press" ?

5:13 getElement will find id="press"

5:14 # is a css selector thing, the js vm knows nothing about it

5:14 be nice once the js vm does have getElementsByCSSSelector :-)

5:15 KIMAvcrp: https://github.com/robert-stuttaford/demo-enfocus-pubsub-remote/

5:18 borkdude: is this table correct, did I forget anything important? https://www.dropbox.com/s/9w16xwjd4x88u46/comparison.png

5:18 it's in dutch but I think you can figure out what the words mean

5:18 it's not so much about language features that are theoretically possible, but about the learning experience

5:18 so what concepts will you meet, when working in a language

5:18 ro_st: homoiconicity

5:22 KIMAvcrp: in the html <input type="text" name="press" id="press" value="1" size="1"/>

5:22 but if i use "#press" or :#press as selectors again the browser window doesn't change

5:23 is (em/set-attr :value "5") right ?

5:24 ro_st: set-prop

5:24 for :value

5:24 that one caught me as well

5:24 using attr you'll see the html source view in chrome updates, but the actual rendered view doesn't

5:25 this is because set-attr affects the dom but doesn't trigger the form side of things. set-prop does

5:26 borkdude: gtg

5:30 cark: how would i go about creating a set, where identity is on a function of the set item rather than the set item itself ?

5:31 KIMAvcrp: thank you @<ro_st>

5:31 it works

5:31 btw: is there a better way to require libraries in the live-repl as via the ns macro ?

5:32 cark: something like (set-by :id [{:id 1 :name "paul"} {:id 2 :name "john"}])

5:32 ro_st: so you want a set of the ids, here?

5:32 (set (map :id items))

5:33 cark: nope i want a set where adding {:id :name "cark"} would "overwrite" {:id 1 :name "paul"}

5:33 nope i want a set where adding {:id 1 :name "cark"} would "overwrite" {:id 1 :name "paul"}

5:33 ro_st: ah, that you'd have to implement yourself

5:34 cark: =(

5:34 ro_st: a gatekeeper fn that checks and replaces

5:34 KIMAvcrp: why don't you use a map from :id to :name instead of a set

5:35 ro_st: yeah

5:35 map keys have to be unique

5:35 (assoc m (:id item) item) would replace

5:35 cark: that's only an example, i'm storing an "object" that can only be queried for id via a function

5:36 and i want to have set capabilities

5:36 but that's no big deal, i can work around it

5:36 ro_st: yeah

6:07 Guest94126: lpetit: hello overthere

6:08 lpetit: Guest94126: Hello stranger

6:11 Guest94126: stranger? damn. have to relogin then ^^

6:12 clgv: lpetit: better now.

6:13 lpetit: it's a pity I cant use CCW 0.10.0 at work, yet. this "build all" error makes it unusable in that project... :(

6:14 lpetit: clgv: remember me the issue number please

6:14 clgv: lpetit: 425

6:14 the new one ;)

6:15 lpetit: clgv: It's on my todo list for today.

6:15 ro_st: *helps lpetit with his english* "remind me"

6:15 clgv: lpetit: hooray! :D

6:15 lpetit: ro_st: that's what happens when I type too fast

6:16 I meant when I type too quick :-P

6:16 clgv: but first I'm currently working on correct support for tagged literals

6:20 * clgv hopes for a soon 0.10.1 ;)

6:30 lpetit: clgv: that's the focus of the day

6:52 KIMAvcrp: hi

7:02 clgv: lpetit: can you answer me a question about the nrepl setup of CCW?

7:02 lpetit: clgv: sure

7:02 and also cemerick could be of some help

7:03 clgv: lpetit: do I have access to the nrepl namespaces from the CCW repl?

7:03 cemerick: clgv: yes

7:03 The server-side of it, anyway.

7:04 clgv: lpetit: so it is on the classpath and I might get problems if I want to use a different nrepl version in my project?

7:04 lpetit: clgv: no, it is only added to the class path if it is not found in your project's java build path

7:05 clgv: lpetit: interesting. thx.

7:05 lpetit: clgv: anyway, this will probably evolve in the (near) future, when CCW will use a (yet to be implemented) Leiningen Eclipse Launcher

7:06 xeqi: does ccw implement the "describe" and "file-load" ops?

7:06 cemerick: It uses them when available, yes.

7:06 lpetit: cemerick: time to enlighten me

7:06 (I only have a vague idea of what's happening under the hoods)

7:07 cemerick: lpetit: See REPLView.getAvailableOperations, and usages of it.

7:07 clgv: lpetit: I want to migrate that debug-repl macro (or "break it's called in slime) to use nrepl. so that I can connect with a CCW replview

7:08 xeqi: what's "describe"?

7:08 lpetit: cemerick: i will

7:08 * cemerick documentation foibles are on deck to be mocked :-P

7:10 xeqi: cemerick: thanks, I was hoping to use ccw as a refrence point when looking at the nrepl.el impl

7:10 clgv: an op code used under the hood by nrepl to determine what other op codes the server accepts

7:11 cemerick: xeqi: FWIW. REPLView and its helpers are in dire need of a refactoring. Typical Java pig-pile in there.

7:12 clgv: cemerick: can I initialize an nrepl server similar to clojure.main/repl via :init?

7:13 cemerick: clgv: no; nrepl is a network service, not an in-process thing bound to *in*, *out*, etc. See clojure.tools.nrepl.server.

7:14 clgv: cemerick: yeah. knew that. but I thought, maybe the is some way to do an initialization of threadlocal storage for its execution thread

7:15 cemerick: clgv: Sorry, what are you trying to do?

7:15 clgv: cemerick: you know `debug-repl` or `break` ?

7:15 cemerick: Sure, the SLIME stuff.

7:17 clgv: both start a clojure.main/repl or similar. I would like to replace that with the nrepl server. one nrepl-server per `debug-repl` statement. I would suspend the executing thread until a (resume) is evaluated

7:17 lpetit: cemerick: sure thing, REPLView could be refactored. But now may not be the time. I think the right time will prompt when it's too difficult to work with the current codebase anymore

7:17 cemerick: lpetit: Yeah, not in any hurry to actually do it. :-)

7:18 clgv: Sure, definitely doable.

7:18 You shouldn't need to start another server, though.

7:18 Another connection, yes.

7:19 clgv: cemerick: how would you mange different contexts in a multithreaded application then?

7:19 just one server and one connection while representing context as data in a given variable?

7:20 cemerick: No, one server, many connections.

7:21 clgv: may use case looks like the following: debug-nrepl starts a server if there is none, stores the context info and prints connection info to the repl. I connect via CCW's repl view to the nrepl and can start to investigate.

7:22 cemerick: Each break would need to prep a queue, and hijack the newly-connected client's "eval" messages into that queue to be evaluated in the break context.

7:25 clgv: cemerick: what's the reason not to start multiple servers on different ports do that each active break has a random port that is printed to stdout for the user to connect to?

7:27 cemerick: Why bother with another server?

7:28 You still need the same sort of coordination between the paused execution context and the new incoming client messages.

7:29 ejackson: how do I disconnect from an nrepl attached via nrepl-jack-in in emacs ? Preferrably killing the server so I cant start another ?

7:29 xeqi: ejackson: kill the *nrepl-server* buffer

7:30 ejackson: xeqi: thanks

7:32 cemerick: xeqi: Nice post re: pedantic. :-D

7:33 clgv: cemerick: where would I start to implement this? a custom handler for nrepl?

7:33 xeqi: cemerick: heh, I was wondering if I was just rewriting the readme at one point

7:34 cemerick: xeqi: to some extent you were, but that's fine; no one reads READMEs.

7:37 clgv: Aside from the suspension functionality of (break), you're probably looking at some middleware to intercept "eval" messages from a client that connects and joins that "debug context".

7:38 That said, I do always hope that someone (else ;-) will get around to implementing debug-repl in conjunction with proper JVM breakpoints, rather than the (break) approach that SLIME used.

7:41 clgv: humm still not sure if nrepl's session could be used for storing the context

7:42 cemerick: clgv: You can store anything in the session you want — it's just an atom.

7:42 clgv: the descriptors give a nice usage summary though ^^

7:43 cemerick: Yeah, once I flesh them out more, a script will be used to dump a listing of the ops supported by the available middlewares.

7:44 clgv: humm you get the initial session by connection and after that you clone it to get more?

7:45 but overall it seems more complicated than I thought. got to postpone the idea

7:56 mccraig: ibdknox: i made a (tiny) patch for korma, which doesn't affect current behaviour, but allows it to use connections opened elsewhere https://github.com/korma/Korma/pull/88 . does that seem reasonable ?

7:59 cark: I just pushed a first public version of the little lenses library i was working on. Lenses are also known as functional references. there is a little tutorial included as well, i'd love to see îf some people would use these. it's at https://github.com/cark/data.lenses

8:01 clgv: cark: your readme is contradicting. it says no clojars upload but provides an entry for a project.clj ;)

8:01 cark: you need to install in the local repository

8:01 clgv: ah ok

8:02 cark: i *think* lein install is all that's required to do that

8:02 maybe a lein deps first

8:19 ordnungswidrig: hi all, I'm looking for an simple web application idea which i can use for a liberator tutorial. I'm bored by all that todo-list-tutorials.

8:21 cark: a super-hero powers database

8:22 everybody loves suyper-heroes

8:23 ordnungswidrig: cark: nice idea

8:24 cark: you get 2 sets, 2 entity types, and relation between them, good for demonstrating your rest api

8:25 ordnungswidrig: cark: you mean heroes and super powers?

8:25 cark: yes

8:25 ordnungswidrig: i think that can work out

8:26 cark: it's actually many to many, so i guess 3 entity types

8:26 anyways

8:26 ordnungswidrig: cark: depends on your model. it would be two http resource collections.

8:27 cark: for many-to-many you may require a hero-power collection too

8:28 but it's just a tutorial, you could make it so that flying power for superman is different than flying power of err ... metalman

8:28 what's his name =/

8:29 clgv: ironman? ;)

8:29 cark: indeed =)

8:29 i suck at super-heroes =)

8:29 clgv: it is different: one is natural the other technical ;)

8:29 cark: if you ask me, neither is !

8:30 ordnungswidrig: cark: is there a encyclopedia of superhero?

8:30 cark: ordnungswidrig: i suck at super-heroes ! i wouldn't know that !

8:33 you only need a couple heroes and powers for a tutorial, you can even make them up

8:33 http://www.superherodb.com/characters/

8:34 where you learn that superman has super smell ...

9:11 naeg: why does (bit-shift-right 30 8) => 0 but (bit-shift-right 0011110 8) => 18 ?

9:13 jsabeaudry: naeg, because 30 != 4680

9:14 naeg: jsabeaudry: ,(Integer/parseInt "0011110" 2)

9:14 chouser: ,(format "%o" 0011110)

9:14 clojurebot: "11110"

9:14 chouser: octal

9:15 naeg: oh, i thought that was binary

9:15 chouser: 2r0011110

9:17 jsabeaudry: chouser, oh nice I wasn't aware of binary litterals in clojure thanks!

9:17 chouser: arbitrary radix literals up to, I think, 36

9:18 jsabeaudry: but that means you haven't read the book. tsk tsk.

9:19 jsabeaudry: elementary my dear chouser ;)

9:45 naeg: blog post about checking for a winner in connect four in clojure: http://programmablelife.blogspot.co.at/2012/09/clojure-connect-four-1-checking-winner.html

9:45 would be great if someone could give me some feedback before i put it on HN, etc.

9:50 casion: naeg: reading

9:51 naeg: casion: i'm just adding two code line explanations to the bitboard algo...

9:52 casion: I'm confused by your bitboard

9:52 naeg: casion: the picture?

9:53 casion: sec, app broke

9:53 clgv: naeg: doall + map for printing is not ideal ^^

9:53 naeg: clgv: I guess I should use doseq?

9:53 clgv: naeg: if you print the array brackets anyway, you could just use pprint ^^

9:54 naeg: yeah, doseq

9:54 naeg: I now remember why I did it: just as a quick hack because map didn't really execute the printlns

9:54 clgv: ,(pprint (repeatedly 5 (range 10)))

9:54 clojurebot: #<CompilerException java.lang.RuntimeException: Unable to resolve symbol: pprint in this context, compiling:(NO_SOURCE_PATH:0)>

9:54 clgv: ,(use 'clojure.pprint)

9:54 clojurebot: nil

9:55 clgv: ,(pprint (repeatedly 5 (range 10)))

9:55 clojurebot: #<ClassCastException java.lang.ClassCastException: clojure.lang.LazySeq cannot be cast to clojure.lang.IFn>

9:55 clgv: ,(pprint (repeat 5 (range 10)))

9:55 clojurebot: ((0 1 2 3 4 ...)

9:55 #<SecurityException java.lang.SecurityException: denied>

9:55 clgv: damn...

9:55 naeg: clgv: I don't have pprint available

9:56 clgv: it's in clojure.pprint and usually available in a repl

9:57 casion: naeg: why is there a a vector board and bitboard in the same vector?

9:58 naeg: casion: because of insert and the game loop (which I didn't show here)

9:59 casion: naeg: ok, that was confusing me quite a bit

9:59 clgv: naeg: how did you benchmark?

9:59 naeg: casion: really? why would it mather?

9:59 matter*

9:59 clgv: there's a paragraph about performance, but not really benchmarking

9:59 casion: naeg: because I read code top to bottom?

9:59 in the bitboard example if I seen a 2d board rep, I'm sitting here wondering why it's there and if/why it's used

9:59 clojurebot: It's greek to me.

10:00 clgv: naeg: you should at least wrap the code in dotimes and measure the time of the repeated executions ^^

10:00 naeg: casion: that's just for us humans to better understand it. in the code it's just passing around longs

10:01 clgv: i did that and put the average time into the article

10:01 casion: naeg: not when the person reading it has spent dozens of hours using bitboards ;)

10:02 naeg: casion: then that algorithm shouldn't be too hard to grasp ;) but I'm confused by his explanation (which differs from mine: http://stackoverflow.com/questions/7044670/how-to-determine-game-end-in-tic-tac-toe/7046415#7046415)

10:02 casion: naeg: I was having trouble following you epdating 2 board representations

10:02 updating*

10:03 my mistake I think, I took the header for that section too strictly

10:04 naeg: casion: I can't follow you? I need two boards, because each player has his own pieces

10:05 casion: naeg: I was getting tripped by the vector board being in that example, that's all

10:05 quite simple and silly :)

10:06 naeg: ok. I just want to be sure it's understandable, you see ;) but I think I mentioned that I use 3 boards

10:07 casion: you do, as I said it's my deficiency

10:09 naeg: when you explain the board checking in bitboards, it maybe helpful to label the rows when explaining the steps

10:09 '0110100 & 0011010 = 0010000' row 2, '0111100 & 0011110 = 0011100' row 1, etc..

10:10 naeg: casion: label what exactly with what?

10:10 casion: I gave an example, ctrl-f the stuff in quotes

10:12 the logic section is nead

10:12 neat*

10:12 naeg: casion: label like that?

10:12 casion: yeah

10:12 that's more clear I think

10:12 naeg: casion: indeed, thanks. I like the logic solution the most actually

10:12 it's also the one I put the most thinking in myself

10:17 clgv: removed all the doall's, thanks :)

10:19 * naeg shower, brb

10:29 naeg: casion: would you say you understood everything I tried to explain?

10:32 aib: How would I go about using this library in "lein repl"? https://github.com/clojure/algo.monads

10:33 casion: I don't totally understand the code in the logic example yet

10:34 I get how it's doing the search, but how the code is achieving is has me constantly referring to core.logic docs

10:35 I've never used core.logic (or any logic programming) so, I'm not sure if I'm the target audience for that or not

10:36 clgv: aib: you got a project setup?

10:36 aib: clgv: nope, just want to play around in the REPL

10:37 clgv: aib: leiningen 2?

10:37 jweiss: is there a simple way to use defrecord, but have it error out if you try to access a field that wasn't part of the original definition? the normal behavior is to return nil. for instance if i fat-finger :foo as :floo in (myrec :floo) - i want an exception instead of nil.

10:37 naeg: casion: I don't even know how exactly core.logic works internally, if that is what you mean. But I'm able to work with it (since I know how Prolog works internally)

10:37 aib: Leiningen 1.7.1 on Java 1.7.0_07 Java HotSpot(TM) Client VM. I need an update?

10:38 clgv: aib: I do not know if you can specify dependencies in a file under ~/.lein/

10:38 naeg: casion: but you understood it from a "user" perspective, so core.logic is like a black box with which he could work

10:38 clgv: aib: with lein2 you can define profiles in ~/.lein/profiles.clj

10:39 aib: clgv: I can't just type (use 'clojure.algo.monad) as my first REPL command or something?

10:39 clgv: aib: there you could add the desired libs as :dependency in the :user profile

10:39 aib: hmm

10:39 clgv: aib: you can - but it wont find anything ;)

10:39 aib: ahh

10:39 the-kenny: If I do a subvec on a large vector, will it stop the large vector from being gc'd when I don't reference it anymore?

10:41 aib: well, let me play around a bit with lein2 first. thanks :)

10:41 clgv: the-kenny: yeah. it holds onto it. otherwise it would be O(n) instead of O(1)

10:41 the-kenny: clgv: Okay, thanks

10:44 casion: naeg: I don't know logic programming _at all_, and it seems that it's a pre-requisite to understand algo-3's implementation. If that was your intent then I can't comment… but if you intended on explaining to someone with no logic programming experience, then it's not working for me

10:45 aib: erm, https://cloud.github.com/downloads/technomancy/leiningen/leiningen-2.0.0-SNAPSHOT-standalone.jar returns Access Denied :/

10:45 ah, leiningen-2.0.0-preview10

10:45 xeqi: aib: you need to use `lein new` and make a project, add [org.clojure/algo.monads "0.1.0"] to the :dependencies, and `lein repl` in the project will let you use it

10:46 aib: xeqi: okies, thanks :)

10:47 clgv: xeqi: do you really need to? I think you should be able to add it as dependency to the :user profile

10:47 the same you do with :plugins you always need on that machine

10:47 xeqi: clgv: perhaps, though do you really want algo.monads accessible everywhere?

10:48 clgv: xeqi: well he can define a different profile then :user e.g. :monads and use "lein2 with-profiles :monads repl"

10:49 without the ":" I think ^^

10:50 xeqi: heh, thats not really any simpler

10:51 clgv: but if he doesnt want a project it's the only way

10:51 naeg: casion: I actually wanted people with no experience in LP to understand it

10:51 will have to re-work that paragraph then

10:53 clgv: is clojure.core/require threadsafe?

10:54 naeg: casion: I just read through it again, and I don't know what I could add beside explaining +fd

10:54 xeqi: sure, but if a project isn't desired, no reason to use a build tool designed for projects

10:54 casion: naeg: that's exactly the part that I'm struggling with, lines 17-18

10:55 and 7

10:55 clgv: xeqi: well lein doesnt necessarily need a project to start a repl. a better solution would be to add pomegranate and use it to get the deps to play with

10:55 casion: infd and +fd, and I'm having trouble even finding docs for it

10:55 naeg: casion: for all those lines I just wrote what the line as a whole does, not what each function does. could that be the source of your confusion?

10:56 casion: those functions are alpha

10:56 xeqi: eh, pomegranate doesn't do any dependency tracking of whats already on the classpath; it might work, or it might pull in a completely different version of clojure

10:56 naeg: only documentation is the source code and examples you find in the web

10:56 clgv: xeqi: no I mean he could get the monads lib via pomegranate ^^

10:56 xeqi: it'll pull in all transative dependencies

10:57 and some of the org.clojure stuff uses 1.3.0-alpha versions

10:57 casion: naeg: yeah, lines 17 and 18 have different descriptions for the same function (17 declaring, 18 'making sure') so I'm trying to find out what infd does

10:57 clgv: I dont think it is that buggy. leiningen uses it and it's advertised especially for that purpose

10:57 naeg: casion: well, declaring and making sure is the same. those are just rules

10:58 clgv: though I haven't used it much, yet

10:58 xeqi: clgv: given a full dependency list it will work out what transative deps to use

10:58 which is how lein does it

10:58 casion: naeg: well, I don't work with logic, so when I see 'declare' I think some sort of constant, and 'making sure' I think of a conditional

10:58 naeg: casion: I'm reverting it to a draft again, so make sure either to not reload the tab or copy the content somewhere. I'm leaving now, add a few more explanations later that evening and then publish it. do you think it's suitable for planet clojure?

10:58 xeqi: but if you're adding to the classpath, and just give it one dep, it might pull in a different transative version of a dependency already on the classpath

10:59 casion: maybe in this domain it's semantically the same, but I wouldn't know that :(

10:59 clgv: xeqi: so it's not safely usable for this: https://github.com/cemerick/pomegranate#add-classpath-usage

10:59 naeg: casion: it's the same. I wrote a note about your confusion, you're probably not the only one

10:59 clgv: ?

10:59 casion: naeg: sure, it seems overall good to me :)

10:59 I learned some things from it for sure

11:00 naeg: casion: it's not meant for "clojure experts", that's why I wasn't sure

11:00 but as you said, I think even clojure experts might learn one or two things from it

11:01 (especially if they haven't done anything with core.logic yet)

11:01 casion: naeg: I'm not a clojure expert, and I learned from it… even the logic part (though I'm still not 100% clear on it)

11:01 naeg: casion: thanks for all your input and bye all

11:01 xeqi: always safely, no, but it should work most of the time

11:01 or work well enough

11:01 casion: thanks to you too :)

11:03 clgv: xeqi: do you know whether clojure.core/require is threadsafe? I have to use it from different threads since I must resolve functions from symbols

11:05 xeqi: no idea, haven't done any work on clojure internals

11:07 clgv: ok. I try to find out ^^

11:07 uvtc: What's a good way to provide a user-editable config file for your Clojure project?

11:08 A resources/config.properties file?

11:09 nDuff: uvtc: Depends. If you're trying to interoperate with the Java world, a properties file makes sense. If you don't care about that, using the Clojure reader can certainly be handy.

11:10 uvtc: Hm. Just have your users edit a config.clj file.

11:10 nDuff: Thanks.

13:22 cemerick: dnolen: thanks for the quick patch turnaround. Greatly appreciated. :-)

13:23 dnolen: cemerick: np

13:35 thorbjornDX: hash-map from two seqs: (hash-map (interleave seq1 seq2)) ? Or is there a better way.

13:36 dnolen: thorbjornDX: zipmap

13:36 thorbjornDX: dnolen: thanks :)

13:38 dnolen: from the source, it looks like this will go until one of the seqs gives nil, is that correct?

13:39 borkdude: ,(zipmap [nil 1 2 3] [1 2 3 4])

13:40 clojurebot: {3 4, 2 3, 1 2, nil 1}

13:40 thorbjornDX: borkdude: oh, hm. What does the '(if (and ks vs)' in the function definition do then?

13:41 dnolen: ,(zipmap [:foo :bar :baz] (range))

13:41 clojurebot: {:baz 2, :bar 1, :foo 0}

13:41 thorbjornDX: ,(seq nil)

13:41 clojurebot: nil

13:41 borkdude: thorbjornDX dnolen why use English if we can speak clojure

13:42 thorbjornDX: borkdude: english can be a bit verbose, especially for abstract cs

13:42 dnolen: thorbjornDX: yes the shortest sequence limits the size of the map.

13:43 thorbjornDX: dnolen: that's what I expected, thanks ;)

13:43 ,(next '())

13:43 clojurebot: nil

13:43 thorbjornDX: ,(rest '())

13:43 clojurebot: ()

13:44 thorbjornDX: ok, things are getting more clear now

13:44 borkdude: gtg, bye

13:44 abalone: in cljs and clj, .replace affects all occurrences. in the generated js, it affects only the first. where should i report this?

13:45 dnolen: abalone: it's an interop call, there's no promise about that stuff.

13:46 abalone: oj

13:46 oh

13:46 thanks

13:51 TimMc: Hey, anyone ever seen a metadata destructuring proposal?

13:52 I don't feel a need for it, but I'm curious if anyone else has.

13:53 cemerick: Very occasionally, but the extra line of code hasn't bothered me enough to suggest adding the necessary complexity to the language.

14:07 Licenser: Out of curiosity what book should I give a clojure beginner? (no programming experience)

14:08 ystael: cemerick: I am trying to add an nrepl server endpoint to an existing Java server application. Is the advice you gave in February in https://groups.google.com/d/msg/clojure/6jEdlYSX_zg/Q33_egSaxxEJ still current?

14:09 ivan: Licenser: I'm not sure Clojure is a good idea for someone with no programming experience until Light Table is productive

14:09 cemerick: ystael: should be, yup

14:10 Licenser: ivan well it's just baby steps for now so the current LT's live repo is enough for a few month I guess :)

14:10 ystael: cemerick: cool, thanks

14:10 scriptor: Licenser: I think I saw one online thing that used clojure but aimed at complete beginners

14:10 can't remember the name though

14:11 ivan: Land of Lisp?

14:11 Licenser: scriptor yea the one with the robot right?

14:11 scriptor: Licenser: yep

14:11 casion: a lot of colleges start with scheme as a first language (mit does still I think?)

14:11 scriptor: I think

14:11 casion: many start with java...

14:11 Licenser: scriptor we're past that one :)

14:11 casion: why not start with clojure? :)

14:11 cvkem_: Hi, I recently noticed that dynamic generated code via (eval (read-string ...))

14:11 Licenser: casion my point exactly!

14:11 technomancy: I'm not sure starting programming with a book that is spread across 3 or 4 different languages is such a good idea =\

14:12 casion: technomancy: 3-4 languages?

14:12 technomancy: casion: Land of Lisp focuses on CL with some chapters for Scheme and Clojure IIRC

14:13 scriptor: I get the impression that most clojure books assume about the same level of programming experience

14:13 adu: which languages?

14:13 casion: did someone mention land of lisp?

14:13 I'm a bit lost

14:13 oh, someone did

14:13 adu: ivan

14:14 curiousgeroge: Hi, I am interested in Clojure. Have done some work in haskell years ago. On what type of projects is a FP languages such as clojure a good fit?

14:14 adu: casion: I think scheme makes a great first language, the function names are long, verbose, and unambiguous

14:14 casion: Land of Lisp is the sole reason why I tried clojure instead of CL or scheme

14:14 technomancy: curiousgeroge: anything where you can use the JVM, so as long as you don't need a low memory ceiling, fast startup time, realtime, or zippy numerics.

14:14 Hodapp: I'd love to get through SICP sometime.

14:14 but... bleah, busy

14:14 casion: it scared me away from cl pretty fast :|

14:15 technomancy: casion: interesting. I only read the sample so I thought it was biased in favour of CL.

14:15 the Clojure port of Casting SPELs by the same author was a bit half-baked

14:15 wastrel: what's Land of Lisp ?

14:15 curiousgeroge: technomancy: hm okey cool

14:15 casion: technomancy: it is, heavily

14:15 adu: CL has obscure, 3LA, and archaic names mixed in with long-verbose-names, and clojure somehow has short, clear, names, I don't know how

14:15 casion: and it made (makes?) CL look terrible IMO

14:15 technomancy: casion: oh, but it didn't have the intended effect then? interesting =)

14:15 ChongLi: curiousgeroge: it's also worth learning clojure for a different perspective

14:15 technomancy: heh

14:15 casion: at least to a C programmer

14:15 wastrel: oic land of lisp is a cl book

14:16 curiousgeroge: i do ruby and javascript daily

14:16 ChongLi: curiousgeroge: have you ever done a lisp before though?

14:16 technomancy: curiousgeroge: the only thing Clojure can't do that Ruby can is proper unixy glue stuff.

14:16 curiousgeroge: ChongLi: no, i am also interested in lisp. was going to buy then I decided to go with vim instead of emacs so I never picked up lisp

14:16 Licenser: I kind of get the feeling that most clojure books aim at seasoned programmers :(

14:17 adu: also, I think I might use Clojure as the basis for an algorithm database, because of it's beautiful metadata notation

14:17 ChongLi: it really broadens your mind to learn a lisp like clojure and all that entails

14:17 homoiconicity, macros etc.

14:17 curiousgeroge: is it less code with clojure? than for eg ruby?

14:17 scriptor: curiousgeroge: that's a tricky thing to measure

14:17 curiousgeroge: of course it depends

14:17 technomancy: curiousgeroge: usually less, but the important thing is that it's clearer.

14:17 curiousgeroge: but you always get a feeling

14:17 technomancy: ah cool

14:18 ystael: Licenser: part of the problem is that the "out-of-the-box" experience of clojure is difficult for many people ... i would not want to explain to a non-programmer how to get started writing clojure programs

14:18 nDuff: clearer certainly in the sense that there's less spooky action at a distance -- something Ruby is rife with

14:18 Licenser: ystael for the moment I'm pretty happy with just writing a few simple functions

14:18 ChongLi: clojure includes a ton of cool macros and really great ideas

14:18 like making abstractions the default rather than concrete data structures

14:19 and making keywords functions that look themselves up in a map

14:20 ystael: curiousgeroge: many things you do with object-model metaprogramming in ruby are instead done with syntactic metaprogramming (macros) in clojure

14:20 ChongLi: curiousgeroge: have you watched any of rich hickey's talks?

14:20 ystael: the end result in expressive power is comparable but the way you get there feels different, and in some ways macros are a lot easier to understand

14:21 curiousgeroge: ChongLi: nope none

14:21 ChongLi: curiousgeroge: ah, you should

14:21 curiousgeroge: ChongLi: will definetelly do that

14:22 casion: ystael: I've had the opposite experience

14:22 I've never tried a language that was as easy to get going with as clojure, but maybe that's because I'm using os x

14:22 ChongLi: he does a very good job of conveying his ideas on values and pure functions

14:23 technomancy: casion: wow, really?

14:23 compared to which others?

14:24 ChongLi: curiousgeroge: http://www.infoq.com/presentations/Value-Values

14:24 one of his more recent ones

14:25 casion: technomancy: compared to java, python, c, c++, lua, objc

14:25 curiousgeroge: ChongLi: thanks!

14:25 ChongLi: curiousgeroge: it's a very interesting way of categorizing languages

14:25 casion: obviously you can get hello world working in osx pretty damn fast with c/objc… but getting a sane environment is stupid.

14:25 ChongLi: instead of looking so much at syntax, rich looks at semantics

14:25 technomancy: casion: interesting. I don't know the others, but I've always found Python to be very accessible and much better-documented than Clojure

14:25 casion: and dealing with python 3 on os x is a huge pain

14:26 technomancy: oh sure, the 2-vs-3 split would probably kill you there

14:26 I was only thinking of 2

14:26 ChongLi: this tends to lump all of the imperative languages together in a more obvious way

14:26 casion: technomancy: most material I've seen these days is on 3

14:26 technomancy: kind of surprised you had a harder time with lua too though

14:27 casion: lua is easy to get going to learn I guess

14:28 technomancy: I guess if you're embedding it in a larger system it could be hard

14:28 casion: but having a sensible environment to learn in, not so much

14:28 and installing clojure-mode or CC is dead simple comparatively

14:28 (for an environment)

14:28 technomancy: yeah I guess you have a leg up on Clojure if you already use emacs

14:29 ChongLi: UnsatisfiedLinkError ~/test2/target/native/linux/x86_64/liblwjgl.so: ~/test2/target/native/linux/x86_64/liblwjgl.so\

14:29 : wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch) java.lang.ClassLoader$NativeLibra\

14:29 ry.load (ClassLoader.java:-2)

14:29 what am I doing wrong here?

14:29 hehe

14:29 I'm trying to (import org.lwjgl.opengl.Display)

14:30 casion: ChongLi: you're on a 64-bit system aren't you?

14:30 ChongLi: yeah

14:30 I figured the libraries in the x86_64 directory would be 64-bit binaries

14:30 ystael: technomancy: What is the morally correct way to specify repositories/mirrors build-system-wide as opposed to in a single project.clj? Are these settings still ignored from profiles.clj?

14:31 ChongLi: everything in target/native was put there by lein

14:31 lein deps

14:31 :dependencies [[org.clojure/clojure "1.4.0"]

14:31 [org.lwjgl/lwjgl "2.7.1"]

14:31 casion: ChongLi: you're getting the wrong lwjgl version it seems

14:31 ChongLi: [org.lwjgl/lwjgl-util "2.7.1"]

14:31 [org.lwjgl/lwjgl-native-platform "2.7.1"]]

14:31 TimMc: ChongLi: Please use a pstebin (such as refheap.com)

14:31 *pastebin

14:31 ChongLi: sorry

14:31 technomancy: ystael: you can put :mirrors in ~/.lein/profiles.clj now

14:32 ystael: technomancy: awesome! time to update the build agents

14:32 ChongLi: there's a lot of different versions of lwjgl on clojars and maven

14:32 I don't know which one works

14:32 technomancy: ystael: pretty sure that's working anyway, best to double-check

14:32 casion: ChongLi: afaik, you have to make sure you're using the x86_64 version, which is fairly new

14:33 ChongLi: I don't know which one is officialy

14:33 all these on clojars seem to be uploaded by whoever

14:36 casion: ChongLi: I have no idea how to help you beyond that. you would probably get a better answer in #jme or #java

14:37 ChongLi: oh I think I solved it

14:37 just used 2.8.4

14:40 so yeah I just needed to use the latest version

14:40 thanks :)

14:51 cvkem_: Dynamic generated code based on (eval (read-str s)) is inefficient. Does anyone know whether (load-string s) return code that performs better?

14:52 technomancy: cvkem_: why do you say it's inefficient?

14:52 cvkem_: By inefficient I mean that the code needs a print-dup method to get its data (if it is something like a java.sql.date

14:54 technomancy, Furthermore the dataset is translated to a text-file. In my use-case this textfile is too large to fit in a single class-file which causes trouble.

14:55 I was wondering whether load-string produces different code.

14:55 technomancy: I don't know what you're talking about, but Clojure only has a single compiler.

14:57 cvkem_: I thought so too. But for some reason the code works fine and with large data if I compile it, while the code produce by eval requires me to make an implementation of print-dup before it accepts java.sql.date as data.

14:57 Did not think of the solution myself, but saw a post by Stuart Sierra that exactly described the errors I got.

14:58 amalloy: `(str (java.util.Date.)) will compile fine: it's a list containing: the symbol str, and a list containing the symbol java.util.Date. -- compare to `(str ~(java.util.Date.)), which won't compile well at all: it's a list containing: the symbol str, and a Date object

14:59 usually the right solution is to generate actual code instead of objects embedded in lists, not to invent ways to print/read the objects you accidentally embedded in your code

15:01 cvkem_: amalloy, I'm trying use dynamic generated clojure code to let me play in an interactive way with my database. I started using eval, but it crashes if the data passed in exceeds a 65k boundary.

15:02 ... and 64k is reached easily when you expand everything via a print-dup I guess.

15:09 Clojure: Does anyone know if Datomic supports authentication between services running on different nodes?

15:10 lpetit: Clojure: you should really choose another nickname than Clojure, IMHO

15:10 Clojure: Thought i did, having issues with Colloquy this morning...

15:10 cgag: i like it

15:11 ohpauleez: basically, what he says goes

15:11 cgag: very authoritative

15:11 Clojure: :)

15:11 ohpauleez: It's Clojure's word vs yours

15:11 casion: he'll be very popular, eveyone comes in here to talk about him

15:11 ohpauleez: we'll see who wins

15:11 gfredericks: quick quick assemble your questions

15:11 firesofmay: Hi, running lein command I am getting java error out of no where. -> http://pastebin.com/vNnQLStN

15:11 gfredericks: Clojure: why can't we have a clojure.core/update?

15:11 ohpauleez: Clojure is now a self-writing-macro AI

15:11 firesofmay: any ideas what could be wrong?

15:11 hiredman: ~clojure

15:11 clojurebot: clojure is the best way to learn java

15:11 hiredman: ~clojure

15:11 clojurebot: clojure is a very attractive hammer with a nice heft to it

15:12 casion: best part is I can tab complete Clojure now

15:12 technomancy: firesofmay: maybe using gcj by accident or something?

15:12 Clojure: I guess I should be offering answers instead of asking questions

15:12 firesofmay: technomancy, gcj? I was running it fine. And suddenly this happened.

15:12 technomancy: Clojure: why hasn't the patch to speed up multimethods been applied I mean come ooooooon

15:13 firesofmay: what does `java -version` say?

15:13 also, `lein version` if you can

15:13 Clojure: technomancy: works on my machine

15:13 firesofmay: technomancy, java version "1.7.0_03"

15:13 OpenJDK Runtime Environment (IcedTea7 2.1.1pre) (7~u3-2.1.1~pre1-1ubuntu3)

15:13 OpenJDK 64-Bit Server VM (build 22.0-b10, mixed mode)

15:13 technomancy: hm; it's not that then

15:13 could be a misbehaving plugin

15:14 firesofmay: technomancy, lein is 2.x i am not sure which exact version.

15:14 technomancy, I recently ran an update on unbuntu btw.

15:15 ubuntu*

15:16 technomancy, any ideas what I should do?

15:18 technomancy: firesofmay: it looks like a problem with your JDK. maybe try falling back to java 6 to see if that helps?

15:18 firesofmay: technomancy, I have this in my profiles.clj btw :

15:18 mankaj@mankaj:~/src/ios-moby-testing$ cat ~/.lein/profiles.clj

15:18 {:user {:plugins [[lein-difftest "1.3.8"]

15:18 [lein-marginalia "0.7.1"]

15:18 [lein-pprint "1.1.1"]

15:18 [lein-swank "1.4.4"] ]}}

15:18 technomancy, oh okay.

15:21 xeqi: firesofmay: theres a similiar bug I found on google for another project https://bugs.eclipse.org/bugs/show_bug.cgi?id=389533 ; last comment mentions updating to a different version

15:22 firesofmay: xeqi, sounds like it's the same problem. will try this and let you know if works.

15:28 xeqi, thanks a lot that worked :)

15:28 technomancy, its a bug with java update. had to remove and re-install java as pointed out by xeqi in above link. :)

15:29 technomancy: ouch, that sucks

15:29 just an Ubuntu fubar?

15:31 firesofmay: technomancy, its working. I guess the ubuntu update didn't get the latest package and that had some bug. removing and installing again did it (weird!)

15:34 technomancy: =\

15:34 zmaril: Let's say I want to hack on two clojure projects at once and I want to connect them via leiningen

15:34 xeqi: checkouts

15:35 zmaril: Ah! Yes! That was the word. I've done this before, but I forgot what it was called.

15:35 Thank you!

15:47 firesofmay: how would you convert a string to a vector with , seperated values like ex : "wool,word,work" to ["wool", "word", "word"] ?

15:47 scriptor: firesofmay: http://clojuredocs.org/clojure_core/clojure.string/split

15:47 firesofmay: scriptor, thanks.

15:48 Sweden_jack: ["wool" "word" "work"] right?

15:48 hfaafb: commas are allowed

15:49 Sweden_jack: no I mean "work"

15:49 scriptor: I think he means the word/work

15:49 hfaafb: WOOPS

15:49 firesofmay: Sweden_jack, scriptor, its what I wanted. :)

15:49 abalone: when would you use clojure.string vs .split ?

15:50 scriptor: .split doesn't return a seq, right?

15:50 well, neither does string.split I guess

15:50 firesofmay: scriptor, it returned me a clojure.lang.PersistentVector

15:50 S11001001: ,(doc clojure.string/split)

15:50 clojurebot: "([s re] [s re limit]); Splits string on a regular expression. Optional argument limit is the maximum number of splits. Not lazy. Returns vector of the splits."

15:53 vishesh: Is there any function by which I can replace nth memeber of a collection with another?

15:54 gfredericks: vishesh: if you are using a vector you can do that with assoc

15:55 hfaafb: assoc?

15:55 clojurebot: then its perfect. but of course, there are a lot of other parts too that changes. so after I make assoc :show, is there a problem I make again (def data (assoc data :list ...)

15:55 gfredericks: ,(assoc [1 2 3 4 5] 3 :foo)

15:55 clojurebot: [1 2 3 :foo 5]

15:59 vishesh: gfredericks: Ok. For string work I can convert it to vector first and then use assoc, or is there any better way?

16:00 gfredericks: if you're doing random updates a lot and are worried about performance, then vectors are definitely the choice

16:00 strings would require full copies afaik

16:02 vishesh: Ok. I'm just learning Clojure, so no specific requirement as such right now.

16:02 So would like to know any direct method I can apply on string too, for educational purposes at least

16:05 gfredericks: certainly all java methods are at your disposal

16:06 I don't see anything in the string class for updating a particular character, and wouldn't expect once since it's ineffecient

16:06 but you can do it by hand:

16:06 ,(let [s "foo and bar"] (str (subs s 0 4) "X" (subs s 5 (count s))))

16:06 clojurebot: "foo Xnd bar"

16:09 vishesh: Ok. Thanks. I think if I really need performance benefits, I should use rather StringBuilder

16:09 gfredericks: yeah that sounds right

16:15 konr_trab: I can't "bind the qualified name e" when running (defmacro oops [code] `(try ~@code (catch Exception e "Oops"))) - isn't this valid code?

16:15 amalloy: e#

16:15 konr_trab: oh, that's it!

16:15 thanks!

16:16 amalloy: &(let [code '(blah)] `(try ~@code (catch Exception e "Oops")))

16:16 lazybot: java.lang.SecurityException: You tripped the alarm! catch is bad!

16:16 amalloy: ,(let [code '(blah)] `(try ~@code (catch Exception e "Oops")))

16:16 clojurebot: amalloy: Gabh mo leithsc?al?

16:16 amalloy: i hate you guys

16:17 hiredman: ~hate

16:17 clojurebot: Pardon?

16:19 cemerick: whew, the reader fails on tagged literals within commented regions

16:19 gfredericks: cemerick: commented with #_ ?

16:19 hiredman: commented how?

16:20 cemerick: ,*clojure-version*

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

16:20 cemerick: ,#_ #foo/bar 5

16:20 clojurebot: #<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: No reader function for tag foo/bar>

16:20 hiredman: well, yeah

16:20 xeqi: ,(comment #foo/bar)

16:20 clojurebot: #<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: Unmatched delimiter: )>

16:20 hiredman: the forms following #_ still have to be readable

16:21 gfredericks: hiredman: it could read both pieces and then not call the data-reader fn

16:21 cemerick: hrmph; it shouldn't go looking up the reader fn

16:21 gfredericks: I can't think of any downside to that

16:21 rplevy: trying to figure out if I am unnecessarily reinventing a wheel for a simple lein plugin. similar to s3-wagon, but just for simply pushing application uberjars to s3 without any need for maven. you specify bucket in project.clj, and it puts the jar in a directory like bucket/app/branch/*.jar

16:21 hiredman: *shrug*

16:21 amalloy: ,'#(f %1 #_%2) ;; another entertaining side effect of #_, if anyone hasn't seen it

16:21 clojurebot: (fn* [p1__99# p2__100#] (f p1__99#))

16:22 mindbender1: please Brenton, have a second look at CLJS1. It's simply the best!

16:23 cemerick: amalloy: that's cute

16:23 hiredman: rplevy: we have a a bin/ci that the ci server runs, that runs tests and pushes artifacts to s3 using s3cmd

16:24 rplevy: hiredman: that's a good idea

16:28 mindbender1: I wonder how people keep building things that don't take arguments

16:28 hfaafb: easy []

16:29 mindbender1: Yes, evil is easy. The hard part?

16:29 hfaafb: sleeping at night

16:29 mindbender1: boo!

16:33 technomancy: rplevy: I don't know if that's been done, but it's a good idea

16:37 rplevy: cool, I will go ahead with the idea then. Good idea to have a ci server call such lein command...

16:37 firesofmay: I am getting this error even though faker-en file is created : Exception in thread "main" java.io.FileNotFoundException: Could not locate ios_testing/faker_en__init.class or ios_testing/faker_en.clj on classpath:

16:38 technomancy: rplevy: yeah, keeping as little as possible in the jenkins config is definitely the way to go

16:38 firesofmay: Any ideas what could be wrong?

16:38 technomancy: bin/ci lets you avoid a lot of hassles keeping job config in line with various branching

16:43 thorbjornDX: is there a better-defined way of doing this?: (def updated-stuff (for [d small-seq q big-map] (assoc q :small-seq d)))

16:43 (sorry about the symbol names)

16:44 gfredericks: if big-map is a map I don't think that can possibly work

16:44 so it's not clear what you want exactly

16:45 you just want to take a map and add a key :small-seq?

16:45 you might want let instead of for

16:45 thorbjornDX: gfredericks: er, sorry. big-map should be seq-of-big-maps

16:46 gfredericks: hence the 'for'

16:46 amalloy: thorbjornDX: better-defined? seems perfectly well-defined

16:46 thorbjornDX: amalloy: okay, so if I want to do this multiple times, I should go ahead and define a macro?

16:46 gfredericks: woah man no macros

16:47 thorbjornDX: gfredericks: oh, okay :(... why not?

16:47 gfredericks: so what you have there will give you a cartesian product

16:47 is that what you want? every big map paired with every element of small-seq?

16:48 thorbjornDX: gfredericks: ah, no I don't. I'd like a 1:1 pairing

16:48 gfredericks: try (for [[d q] (map vector small-seq big-map)] (assoc ...))

16:48 amalloy: fehhhhh. (map (fn [d q] (assoc ...)) small-seq big-map-seq)

16:50 thorbjornDX: amalloy: oh, I think that makes perfect sense

16:50 gfredericks: amalloy: yays

16:50 thorbjornDX: gfredericks: thanks for the tip about the cartesian product, I think I have some broken code to fix :P

16:51 gfredericks: I hadn't realized that map can be simpler for some anon-fn cases

17:07 naeg: casion: ping

17:10 mindbender1: I can't believe some people in Clojure still recommends SICP to budding programmers

17:11 Sweden_jack: mindbender1: it depends a lot on the student

17:11 naeg: would appreciate feedback on myblog post about different checking algorithms for a connect four board: http://programmablelife.blogspot.co.at/2012/09/clojure-connect-four-1-checking-winner.html

17:12 rplevy: it's a good book / online lectures, why not?

17:12 mindbender1: Sweden_jack: No matter what.. it's evil in my opinion

17:12 emezeske: mindbender1: What do you have against SICP?

17:12 Sweden_jack: then that's a silly opinion, in my opinion

17:12 mindbender1: emezeske: Imperative

17:12 swapping

17:12 statefulness

17:12 all the goobledygook

17:13 Sweden_jack: Which would rule out 99.9% of all programming books?

17:13 rplevy: well Lisp pre-clojure is more multi-paradigm

17:13 there's a reason we use Clojure

17:13 scriptor: they can still take all the other lessons from SICP

17:13 mindbender1: which brings me to an opinion I have. Almost all books needs revisiting

17:14 including some early ones in clojure

17:14 rplevy: have you looked at "how to design programs" (I haven't)

17:14 mindbender1: I have it

17:14 same thing

17:14 rplevy: ok

17:18 dnolen: mindbender1: SICP is grand, imperative techniques won't being going out of style anytime soon - and for good reason. The problem w/ SICP w/ respect to Clojure is that ... it's about *Scheme*

17:19 well ... framed in terms of Scheme.

17:20 Sweden_jack: dnolen: didn't you hear? C is worthless as well because it's stateful and imperative

17:20 tsk

17:20 rplevy: there are plenty of cases where it makes sense to be imperative even in Clojure

17:21 mindbender1: dnolen: it probably won't even go out of style at all

17:22 dnolen: mindbender1: good call

17:22 mindbender1: there's always a camp..take a position

17:22 emezeske: mindbender1: Not all programming is functional

17:22 amalloy: "almost all books need revisiting"? come back when you're done rewriting every book, i guess

17:23 rplevy: mindbender1: what about performance optimizations for isolated parts of otherwise beautifully functional code

17:23 naeg: is there a way to submit an article to planet clojure without syndicating your whole blog?

17:24 amalloy: naeg: i don't think so, but you can probably ask alex

17:25 hfaafb: string/replace takes 2 arguments but my repl is throwing number of argument errors... am I incorrect?

17:25 naeg: amalloy: alex?

17:25 amalloy: alex ott, who runs planet clojure

17:25 xeqi: (doc clojure.string/replace)

17:25 clojurebot: "([s match replacement]); Replaces all instance of match with replacement in s. match/replacement can be: string / string char / char pattern / (string or function of match). See also replace-first."

17:26 xeqi: hfaafb: looks like 3 arguments

17:26 hfaafb: oh, wait, I want to use the core replace...

17:28 IDE bug

17:28 :>

17:37 seneth: Why can˙t you define functions like this (defn test1 [x] #(* % %))

17:38 it doesnt complain, but i cant use it like (test1 2). Returns <user$test1$fn__1449 user$test1$fn__1449@1444986>

17:38 its adress or something

17:38 gfredericks: you can define them, it's just not doing what you want

17:39 seneth: what is it actually doing?

17:39 gfredericks: you can (defn test1 [%] (* % %)) if you have some thing for percent signs

17:39 you're making a function that returns another function

17:39 you can also (def test1 #(* % %)) if you like

17:39 maybe that's the sort of thing you were hoping for

17:39 S11001001: %1 %1

17:40 amalloy: ((test1 'sdfaslkjfsadf) 4) ;; returns 16 as desired, har har

17:40 gfredericks: S11001001: eh?

17:40 S11001001: ,'#(* % %) ; gfredericks

17:40 clojurebot: (fn* [p1__27#] (* p1__27# p1__27#))

17:40 S11001001: what

17:40 amalloy: S11001001: why wouldn't that work?

17:40 S11001001: amalloy: it would

17:40 for some reason

17:41 amalloy: it's a perfectly normal thing to do

17:41 S11001001: I was under the impression that % was like <> in srfi 26

17:41 gfredericks: % ===== %1

17:41 seneth: "you can also (def test1 #(* % %)) if you like", thats what I was looking for.Thanks

17:41 S11001001: except positionable at any depth

17:41 amalloy: i don't know srfi, but i guess you mean that % % was %1 %2?

17:41 gfredericks: seneth: cool

17:41 S11001001: seneth: that has other disadvantages so maybe don't do it?

17:42 gfredericks: dammit I hate disadvantages

17:42 amalloy: gfredericks: an extra-cautious ex-programmer of js or php or something? the fourth and fifth =s just for style points?

17:43 gfredericks: amalloy: ===== is legal somewhere?

17:43 sign me up for this language

17:43 S11001001: seneth: e.g. it will lack :arglists metadata for your editor to help you with

17:44 rplevy: S11001001: or swiss-arrows Clojure lib, which was inspired by a util we wrote at Akamai, which was inspired by srfi 26

17:44 S11001001: rplevy: indeed

17:44 seneth: I wont be using that notation for defining fns.I am just exploring the language

17:48 amalloy: gfredericks: ##(let [===== =] (===== 1 1)) ;; welcome home

17:48 lazybot: ⇒ true

17:49 S11001001: I think cute from srfi26 would be handy in some situations

17:50 rplevy: cut?

17:50 clojurebot: executable jar is a sample executable jar build using ant : http://github.com/cark/clj-exe-jar/tree/master

17:50 S11001001: cute

17:51 rplevy: I see: http://srfi.schemers.org/srfi-26/cut.scm

17:52 S11001001: with recursion: (cute + (a) (* (b) % (c)) (d)) |> (let [a# (a) b# (b) c# (c) d# (d)] #(+ a# (* b# % c#) d#))

17:52 well with + and * evalled also

17:57 vishesh: quit

18:00 seneth: Why #(2) can be defined, but cannot be invoked (#(2))? Maybe because its lazily eveluated?

18:00 S11001001: ,'#(2)

18:00 clojurebot: (fn* [] (2))

18:01 S11001001: ,'#(do 2)

18:01 clojurebot: (fn* [] (do 2))

18:01 seneth: If you invoke it (#(2)) you get an error

18:01 S11001001: yeah, 2 isn't a function

18:02 seneth: But then why didnt complain when I defined it

18:02 raek: Clojure is not a statically typed language

18:02 scriptor: ,(#(2))

18:02 clojurebot: #<ClassCastException java.lang.ClassCastException: java.lang.Long cannot be cast to clojure.lang.IFn>

18:03 nDuff: seneth: ...you defined a function that tries to call 2 as a function. That's a valid thing to define, it's just not a valid thing to run. :)

18:03 Raynes: &(read-string "(fn* [] (2))")

18:03 lazybot: ⇒ (fn* [] (2))

18:03 seneth: can i redefine 2 to point to a function?

18:03 scriptor: seneth: it doesn't create an error when you define for for the same reason it wouldn't work in a lambda

18:03 ,(fn [] (2))

18:03 clojurebot: #<sandbox$eval107$fn__108 sandbox$eval107$fn__108@48661a83>

18:03 gfredericks: seneth: no

18:04 seneth: then when I defined it, it should have known since i cant redefine numbers?

18:04 gfredericks: seneth: technically the compiler could catch that, yes

18:04 seneth: ok thanks

18:04 raek: seneth: if you want a function that returns to, you could either write (fn [] 2) or (constantly 2)

18:04 scriptor: but it wouldn't be very consistent

18:04 (fn [n] (n)) is perfectly valid code

18:04 raek: *two

18:05 scriptor: but it'll break if you pass it a number, or anything else that can't be called as a function

18:05 seneth: if you need to create a function that always returns one value look up constantly

18:05 ,(doc constantly)

18:05 clojurebot: "([x]); Returns a function that takes any number of arguments and returns x."

18:16 gstamp: in marmalade nrepl-ritz seems to depend on nrepl 0.1.4 which isn't in marmalade yet. How annoying.

18:18 thorbjornDX: this is my first macro: (defmacro tack [m item] (assoc m (keyword item) item)), is it terrible?

18:19 hugod: gstamp: sorry about that - I messed up there - it does work if nrepl.el is installed from melpa

18:21 gstamp: no worries. I was hoping to avoid adding melpa. I might just install it manually.

18:21 amalloy: thorbjornDX: i have a hard time imagining a scenario in which that is not horrible, but i suppose it could happen

18:21 thorbjornDX: amalloy: haha, I need a reality check once in a while :)

18:22 Raynes: &(map println [\a \b \c])

18:22 lazybot: ⇒ (abcnil nil nil)

18:35 Mandar: hey guys

18:35 i'm trying to learn about refs

18:35 does dosync retry the transaction until it works?

18:36 metellus: yes

18:36 Mandar: thanks

18:36 so i don't have to use a timeout or anything else

18:37 it will just work

18:37 thorbjornDX: amalloy: in general, should I avoid modifying my data structures? I'm trying to change quite a few old habits.

18:39 technomancy: gstamp: M-x package-install-file makes it easy to work from git

19:00 konr_trab: Is there a way to reference any anonymous function from inside? like #(if (< % 0) (this-function (- %)) ... )

19:00 an*

19:02 recur!

19:08 Mandar: second noob question: what's the use case for atoms? i don't get where compare-and-set! could be useful in an application?

19:09 (if you have a link that explains it better than this page: http://clojure.org/atoms it's great too)

19:14 aperiodic: Mandar: whenever you want something to be able to change, but don't need to synchronize changes to that thing with changes to anything else. an example would be if you're building a todo-list application, you could keep all the current todo items in an atom that contains a set

19:15 Mandar: when the user adds a new item, you'd (swap! todo-items conj new-item), and when they remove an item, you'd (swap! todo-items disj new-item)

19:15 Tolstoy: That's how I kinda user it. Like a ConcurrentHashMap, sort of.

19:16 Mandar: this is a bit weird to me

19:16 Tolstoy: Or sometimes as a sentinal value.

19:16 aperiodic: Mandar: i've never needed to use compare-and-set!, and i don't think using it is at all common

19:16 Mandar: i get the example

19:16 ChongLi: Mandar: the beauty of it is that it's thread safe

19:16 Mandar: but in this case why couldn't we just call a function returning a function with the new value of the clojure?

19:17 oh

19:17 okay

19:17 now i get it

19:17 ChongLi: the atom is accessible and

19:17 "mutable" from any thread

19:17 in a safe way

19:17 aperiodic: Mandar: values are immutable. try constructing such a function without using an atom in that function's closure

19:18 ChongLi: since only the reference itself is changed, the value it points to is immutable

19:18 so when another thread is working with that value, it won't be harmed

19:19 Mandar: okay

19:19 Tolstoy: I'm guessing compare-and-set reduces the locking for those cases where most of the time the value doesn't really need to change?

19:19 ChongLi: and of course, once the old value is no longer needed it'll simply be garbage-collected

19:19 aperiodic: if you want to be pedantic, the value of the reference (the atom) never changes (you can use it as the value of a final field in a java class), only the value you get when you dereference the reference changes

19:20 Mandar: aperiodic, i'll try that, i come from erlang where such thing is easy because each process has its own immutable variables

19:20 ("immutable variable" is a weird combination)

19:20 ChongLi: well, mutable variable is actually the weird one

19:20 variables were immutable for centuries before programmers came along

19:22 I like rich hickey's description of "places"

19:22 a mutable "variable" being a place in memory

19:22 not a value

19:23 aperiodic: Tolstoy: you get that for free using swap!, since swap! internally does the compare-and-set!

19:24 Tolstoy: Excellent. ;)

19:27 Mandar: aperiodic, you were right, i cannot write such a function because i cannot store the closure containing my data in a place where other functions have access to it

19:28 so basically, an atom is a thread-safe shared var

19:28 right?

19:28 clojurebot: flatten |is| rarely the right answer. What if your "base type" is a list

19:29 aperiodic: Mandar: basically, yup

19:29 Mandar: thanks guys, much clearer now

19:32 madsy: What's actually happening here? A def gets evaluated at compile time? http://squirrel.pl/blog/2012/09/13/careful-with-def-in-clojure/

19:35 aperiodic: &(doc def)

19:35 lazybot: java.lang.SecurityException: You tripped the alarm! def is bad!

19:36 aperiodic: :-(

19:37 madsy: if you'll look at the docstring for def, you'll notice that if an initial value is supplied, it's evaluated, and the var is set to that value

19:38 amalloy: compiling a clojure program is just evaluating each top-level form, and saving any classes that get generated as a result

19:38 hiredman: http://clojure-log.n01se.net/date/2008-11-12.html#16:07

19:38 madsy: aperiodic: Yeah, I never bothered because I thought def was a nobrainer. Thanks.

19:38 casion: wouldn't he want something like (def my-def #(get-my-value))

19:40 madsy: casion: No need to wrap it. Just don't call it.

19:40 casion: yeah

19:48 akhudek: do people have a good go to library for parsing UserAgents in clojure?

20:18 konr_trab: 12 hours of work today :( - but it's all good because it is in - CLOJURE!

20:18 good night!

21:57 cjfrisz: Hmm...trying to use 'nil' as a function gives a NullPointerException

21:57 I guess that makes sense...not sure if it's what I was expecting

21:59 jweiss: lein run is suddenly giving me "ClassNotFoundException" on my :main namespace. tried cleaning, re-self-installing, notthing fixes it. was working earlier today.

22:02 * cjfrisz er...piece of code

22:02 * cjfrisz er...wrong IRC channel

22:02 cjfrisz: Man...just not on it right now

22:03 akhudek: jweiss: bracket type in your main class maybe?

22:04 or perhaps gen-class somehow got dropped?

22:04 type=typo

22:04 jweiss: akhudek: i never had :gen-class.

22:04 why would I need that?

22:04 i'm not compiling into an uberjar or anything

22:05 i've been using the same version of lein and everything else and it suddenly stopped working today, it's got to be something in my main namespace

22:05 but it compiles fine at the repl

22:06 xeqi: jweiss: whats the value for :main ?

22:06 jweiss: :main ^{:skip-aot true} katello.tests.suite

22:07 xeqi: do you have a -main function?

22:07 jweiss: i think i see the problem. starting a fresh repl, i have a compile error in my main namespace (really in a dep).

22:07 that's a shitty error to give. classnotfound. that is not the real error

22:11 Hodapp: http://pastebin.com/NHx5bfyZ - someone want to tell me what obvious thing I'm missing here that this should be a NullPointerException?

22:11 amalloy: too many parens

22:13 Hodapp: where?

22:13 clojurebot: where is log

22:15 xeqi: Hodapp: ((println ..) ...)

22:15 * print

22:15 Hodapp: is there some other way to express that the 'then' portion should execute multiple things?

22:15 xeqi: (doc do)

22:15 clojurebot: excusez-moi

22:15 xeqi: ,(do (print "hi") (+ 1 2))

22:15 clojurebot: hi

22:15 3

22:16 Hodapp: ugggggh

22:20 is there some way to convey, when attempting to work with lein-tarsier, that I want to work with this code without exceuting it? The REPL is not very useful when it's stuck inside of something...

22:21 part of it is probably this quil weirdness with 'defsketch' executing things

22:21 xeqi: "work with this code"?

22:21 aperiodic: Hodapp: that is exactly it. put your defsketch in your -main

22:22 xeqi: ah

22:22 Hodapp: aperiodic: if I put it in my -main, will it not execute when I run 'lein vimclojure' so I can use vim with it?

22:22 aperiodic: Hodapp: yes, because it's not top-level, so won't be evaluated when your namespace is compiled

22:23 Hodapp: now what do you even mean by -main?

22:24 nevermind, think I see

22:32 alright, now just have to figure out how to actually execute said main from witihn that nailgun session...

22:33 aperiodic: once you load the namespace, you should just be able to evaluate `(-main)`

22:54 axle_512: Hmm, I am stuck trying to implement authentication with cemerick/friend…

22:54 trying to use form based authentication.

22:54 cemerick: axle_512: what's the problem?

22:54 axle_512: cemerick: just using: (friend/authenticate {:credential-fn (partial creds/bcrypt-credential-fn users)

22:54 :workflows [(workflows/interactive-form)]})

22:55 my form is posting to action="/login" method="POST"

22:55 and the form has two text inputs, one with id="username" and one with id="password"

22:56 cemerick: axle_512: you haven't specified the form-based workflow.

22:57 axle_512: cemerick: ah, ok. I thought interactive-form was how I specify that.

22:57 cemerick: and form fields need e.g. name="username" attributes

22:58 axle_512: nm, didn't see the second line of your paste

22:58 axle_512: cemerick: ahh, name instead of id. doh!

22:58 cemerick: thanks, let me correct that.

23:17 muhoo: cemerick: have you any interest in exposing the Ax attributes portion of the openid workflow so that someone using the library can pick which attributes they want, instead of "carpet bombing"?

23:18 cemerick: muhoo: I personally don't. Patches welcome, of course. :-)

23:19 Once some oauth2 basics are in place, I'll definitely get the openid workflow out of the main project so that it can be forked separately, etc.

23:19 muhoo: if i can find a way to do it without a breaking change to the api, i'll do that

23:19 cemerick: You can go bash out the vars that contain the attr maps, assuming you don't need to customize the attrs requested per account/provider/etc

23:20 muhoo: bash out?

23:20 cemerick: alter-var-root, etc

23:20 muhoo: oh, cool.

23:20 that feels kind of icky though.

23:21 cemerick: oh, definitely a hack :-)

23:21 what do you mean by "carpet bombing", BTW?

23:22 just not being selective in the requested attrs?

23:23 muhoo: https://github.com/cemerick/friend/blob/master/src/cemerick/friend/openid.clj#L33

23:23 "might as well carpet-bomb for attributes"

23:23 cemerick: haha

23:23 I don't see any reason not to *shrug*

23:24 muhoo: IIRC, the user gets a scary screen in google asking them to approve granting access to all this information

23:24 when all i want is their email, first/last

23:24 cemerick: Of course, providers can define custom attrs, so being able to adapt to that is important for certain contexts.

23:24 oh, I see

23:24 So, sure, alter-var-root, and you'll be rid of that.

23:25 muhoo: perfect, that'll work, thanks.

23:25 axle_512: cemerick: hmm, still no luck. I confirmed I now see [:params {:password user_password, :username jane}] in the request map. But still getting a redirect with an empty username=

23:25 cemerick: FWIW, it'd be a crazy simple patch to parameterize the map of attrs requested, so feel free to give it a shot.

23:26 axle_512: can you paste your code and your html page somewhere?

23:26 axle_512: cemerick: sure, one sec

23:26 muhoo: funny, i ran into exactly this problem in may: http://nelsonmorris.net/2012/09/13/solving-version-conflicts.html

23:27 cemerick: muhoo: see his new post about lein-pedantic

23:28 xeqi: I helped solve it like 3 times in a week, and I'd been fighting with cemerick that soft version ranges were better for like a month, so I had to go write something to fix their problems

23:28 cemerick: muhoo: BTW, could you file an issue for the attrs thing?

23:28 muhoo: xeqi: hahaha

23:28 xeqi: * soft versions were better then ranges

23:28 muhoo: thanks for writing it, i'm sure i'll run into that again.

23:29 yeah, i don't think technomancy will go for ranges

23:29 cemerick: will do

23:31 cemerick: xeqi: The topic contains multitudes, but you've gained a ton of ground. ;-)

23:31 muhoo: thanks!

23:31 axle_512: cemerick: https://gist.github.com/3719615

23:31 cemerick: and my html is here: https://gist.github.com/3719619

23:33 cemerick: axle_512: handler/site needs to be applied after friend/authenticate

23:33 xeqi: (inc cemerick)

23:33 lazybot: ⇒ 10

23:34 axle_512: cemerick: thank you. sorry to bug you. I will try that.

23:34 cemerick: It's a bummer that there's no metadata on middlewares indicating dependencies like that. :-(

23:34 axle_512: no worries, ping back if problems come up again :-)

23:35 axle_512: cemerick: in my project.clj, do I specify my ring handler as app? or secured-app?

23:35 cemerick: axle_512: whichever one you want to run/test. Should probably be the secured-app.

23:36 axle_512: cemerick: ok, thank you!

23:42 cemerick: success!

23:42 cemerick: salut!

Logging service provided by n01se.net