#clojure log - Nov 07 2012

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

0:00 technomancy: samrat: I have a branch for that but I don't think it got merged

0:00 implementation is pretty crappy since there's no :reload that works with load-file

0:01 for :reload-all anyway

0:01 samrat: technomancy: I'll check it out

0:02 that was possible in slime right? I think I saw that in one of the Full Disclojure videos

0:02 technomancy: yeah, slime has the same crappy workaround as my nrepl.el branch

0:02 clojure doesn't expose a way to do it properly

0:05 ForSpareParts: afaict ritz only exists for emacs integration

0:06 ForSpareParts: technomancy, What do you mean? It looks like it contains some sort of debugger implementation...?

0:07 technomancy: ForSpareParts: yeah, it's a slime backend

0:08 ForSpareParts: technomancy, Ah. Yeah. The newer versions support nREPL, though there's not a lot of documentation yet.

0:08 I've figured out how to get ritz into my project (I think) and I've installed its .el, but I don't know how to set a breakpoint.

0:34 hugod, If you're around -- are ritz breakpoints not implemented for nrepl yet? Or am I missing something?

0:50 wingy: http://www.chris-granger.com/2012/11/05/meet-the-new-light-table/

0:51 amazing shit

1:11 tomoj: just before I would have sent a datomic group post about resolving tempids with with, I tried something in the repl with the latest version, and discovered that I had missed the feature I needed in the changlelog :)

1:34 ForSpareParts: wingy, I've been reading about that thing for ages. Seems like it's about time I actually try it out...

1:39 brainproxy: lighttable seems cool, but at this point I'm not sure how I would w/o Emacs keybindings

1:39 did I miss something, and lighttable supports those, or can support those?

1:39 would *work

1:40 ForSpareParts: brainproxy, I've thought the same thing, but I mean, basically every editor lets you rebind stuff, right?

1:40 If they don't support it yet, it probably will soon.

1:40 *they

1:40 brainproxy: ForSpareParts: good point

1:41 if so, I'll probably give it a more serious test drive

1:41 until then, Emacs 24 is the bomb :)

1:41 ForSpareParts: And in any case, I'm always willing to try a new workflow (even new bindings) -- they might turn out to be better/more efficient. If I didn't have that attitude, I would never have gotten into Emacs in the first place : D

1:42 brainproxy: ForSpareParts: heh, another good point :D

1:42 I switched from MacVim about 1.5 years ago

1:42 ForSpareParts: Are there any known bugs that would cause Clojure to not recognize a call to a no-argument java method? I've got what's supposed to be a method call throwing a 'no field' exception.

1:43 brainproxy: anybody spent any time with Frege? https://github.com/Frege/frege

1:43 seems like a cool idea

1:43 ForSpareParts: brainproxy, I haven't been able to really get into vim. Its commands and the mode-based editing thing don't seem to hook into my brain as well as emacs.

1:43 I think the key chords build good muscle memory, or something.

1:43 brainproxy: basically a Haskell work-alike (in terms of syntax and concepts) that's hosted on the JVM

1:44 ForSpareParts: I used vim for many years, since way back

1:45 but I made the switch not too long before diving headlong into clojure

1:45 and I vastly prefer Emacs now

1:47 Sgeo: you should hack up some super-nifty bridge layer thing to allow easy interop between clojure dev and frege dev

1:47 you know, just because you're into the Haskell stuff ;)

1:48 Sgeo: Not sure why I would use Frege instead of Haskell, though

1:48 brainproxy: hmm, maybe you're right, though I was thinking it would be cool to have them living side-by-side in the jvm

1:49 Sgeo: Hmm, possibly

1:49 brainproxy: anyway, now I know what I want to start messing with in my spare time (not that I really have any atm :/)

1:50 ForSpareParts: brainproxy, It frustrates me that our best editing tools have no UX polish. As much as I love Emacs, the era of its original design shows through. Hence my interest in lighttable -- I'd love something that was efficient and powerful (like Emacs) but felt more 21st-century.

1:51 brainproxy: ForSpareParts: I can agree with that for the most part; it will be interesting to see where LT goes

1:51 and what innovation it may prompt

1:51 ForSpareParts: yeah

1:52 brainproxy: i.e. on the part of developers who take some of the idea and incorp. in legacy editors

2:02 tomoj: is this silly? https://www.refheap.com/paste/6461

2:12 daniel___: http://stackoverflow.com/questions/13260494/clojure-zeromq

2:17 wingy: ForSpareParts: it looks mature enough to use it for my project

3:45 brainproxy: continuation monad makes my brain hurt

3:46 Sgeo: Might be better to try to understand continuations outside of the context of monads

3:46 Maybe

3:46 brainproxy: I've convinced myself I understand the first and second monad laws for it, and the left-hand side of the third law

3:47 working through the right-hand side of 3rd law now...

3:55 actually, the right-hand side wasn't as brain bending as the left

3:55 :)

4:06 WokenFury: anyone know why a Thread/sleep would be pegging cpu at 100%? I've tried the leap second fix I found online, no luck. and I'm using the Oracle jdk

4:06 only does it in repl. lein run is fine

4:18 dspp: http://stackoverflow.com/questions/13260494/clojure-zeromq

4:26 WokenFury: dsantiago: https://clojars.org/org.zeromq/zmq ?

4:26 dspp even :|

4:37 Apage43: storm depends on zeromq and seems to have just uploaded a jar to clojars in the backtype/ group

4:46 nicl: Hey all, trying to figure out the #() form of: ((fn [x y] [x y]) \a \b)

4:46 (Just out of interest)

4:47 But can't seem to make it work

4:47 My initial guess is (#([%1 %2]) 1 2) but I get a WrongNumberOfArgs exception

4:47 or rather an ArityException

4:48 Apage43: ,(#(vector %1 %2) \a \b)

4:48 clojurebot: [\a \b]

4:48 Apage43: #([%1 %2]) => (fn [arg1 arg2] ([arg1 arg2]))

4:49 nicl: Apage43: ah thanks

4:49 Apage43: that is, what you did was calling the vector [arg1 arg2] as a function, with no arguments

4:49 vectors can be functions, but they take args

4:49 ([\a \b] 0)

4:49 ,([\a \b] 0)

4:49 clojurebot: \a

4:49 nicl: Apage43: I guess I need to check up the macro

4:50 Apage43: just need to remember that #(…) is not (fn [args] …), but actually, (fn [args] (…))

4:50 nicl: Apage43: yeah, thanks. Much clearer

4:50 :)

5:02 by the way, does anyone actually use #() or is it generally discouraged ?

5:03 Iceland_jack: nicl: I use it when you don't use the argument

5:04 _ulises: nicl: if you end up with a #() that's too long and convoluted I prefer to have a separate fn declared for readability

5:05 nicl: thanks for the feedback/thoughts

5:06 _ulises: just like with python, I try to favour readability of the code

5:06 nicl: _ulises: yeah, I guess if it starts looking confusing I'll use fn for now

5:07 _ulises: nicl: or even declare the fn elsewhere and use it in your code

5:07 nicl: _ulises: yeah

5:07 * _ulises can't read code along the lines of (map #(some (obscure construction) reduce (apply (to-the-result of some args))) a collection)

5:08 nicl: On a side note, do you know how/where to look up #() in some docs?

5:09 Perhaps am being stupid but I can't find it anywhere

5:09 clgv: nicl: http://clojure.org/reader but very brief ;)

5:09 _ulises: look up the definition of #()?

5:10 nicl: _ulises: yeah, the macro for example

5:10 _ulises: see what clgv said

5:10 hello clgv!

5:11 nicl: clgv: ok thanks, yeah. I guess if I want more info I should look up the source

5:13 clgv: nicl: dont do that. since it's implemented in the reader and that one is no clojure source ;)

5:14 nicl: clgv: ah

5:15 clgv: nicl: and there is not much more to it than what is written on that page

5:15 nicl: clgv: yeah, I'll take the written advice: This is not a replacement for fn - idiomatic used would be for very short one-off mapping/filter fns and the like.

5:16 clgv: nicl: yeah. also very handy for code golfing on 4clojure.com ;)

5:16 nicl: clgv: thanks for the pointer. Am fairly confident I would not have found the explanation otherwise

5:16 clgv: nicl: ah there are several good books that would have explained it to you ;)

5:16 nicl: clgv: yeah, am going to try 4clojure (am just starting to try clojure now really)

5:17 clgv: I have the Joy of Clojure, but thinking about buying a more general language intro too

5:17 clgv: nicl: I would advise buying a starter book, if you have no lisp experience ^^

5:18 nicl: clgv: can you tell?! ;)

5:18 clgv: but yeah, the Joy of Clojure is great reading, but I probably need some more practical examples and gentle build up at first

5:19 clgv: I liked "Programming Clojure" - I read it in its first edition 3days fulltime and got started pretty quickly

5:21 nicl: clgv: yeah, just noticed there seem to be 2 choices: 'Clojure Programming' (o'reilly) or 'Programming Clojure', which you mentioned

5:21 Raynes: I recommend Clojure Programming.

5:21 nicl: almost designed to be confusing - two almost identical titles, and released 2 days apart!

5:22 clgv: nicl: didnt read "Clojure Programming" but heard good things about it - I heard our group bought the book. gotta browse through it some time...;)

5:22 nicl: well, the first edition of "Programming CLojure" is much older ;)

5:24 ticking: http://stackoverflow.com/questions/2578837/comparing-clojure-books

5:24 nicl, it's a bit older but maybee it helps

5:29 nicl: ticking: yeah really useful thanks

5:29 ticking: np^^

5:29 deg: Does Clojure have a way to specify required keyword arguments? To be exact, I want to write a function that accepts any number of arbitrary keyword/value pairs, but certain keywords must be supplied. So far, the cleanest way I've found to say this is with a precondition. Can I do better?

5:29 This is what I have now: (defn make-rule [& {:as attrs}] {:pre [(:rule-id attrs) (:lhs attrs) (:rhs attrs) (:raw-lhs attrs) (:raw-rhs attrs)]} ...

5:30 _ulises: deg: you can use destructuring straight into the definition of your parameters

5:30 deg: not entirely sure if then clojure will complain if you don't pass that keyword

5:32 deg: I don't think it will complain about missing keywords. checking now.

5:32 ticking: deg, it will turn then into nil

5:32 _ulises: I don't either, but at least you can provide default values for them

5:33 ticking: ,(do (defn foo [&{:keys [a b] :as args}] (println a b args))

5:33 (foo :a 1))

5:33 clojurebot: #<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: EOF while reading>

5:33 deg: Nope, it defaults to nil. And, I can't provide default values in my case; it is an error if they are not supplied.

5:33 ticking: ,(do (defn foo [&{:keys [a b] :as args}] (println a b args))

5:33 11:31

5:33 clojurebot: #<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: EOF while reading>

5:33 ticking: (foo :a 1)))

5:33 wtf

5:34 deg: #ticking I believe that will allow a and b to not be supplied.

5:34 ticking: yeah

5:34 it will return 1 nil {:a 1}

5:34 deg: The precondition does do what I want, but just feels a little bit ugly.

5:35 But, sounds like I can't do any better?

5:35 ticking: if you find a way tell us ^^

5:36 deg: Oh, does Clojure have any distribution mode where preconditions are "optimized" out of the code (like assert in C++)? Or, can I rely on them always being in my code?

5:43 _ulises: deg: if you use destructuring then your pre-conditions can simply be the params themselves

5:44 deg: e.g. (defn f [& {:keys [a] :as args}] {:pre [a]} ...)

5:44 deg: Good point. Yes, that will certainly make my code cleaner. thx.

5:44 _ulises: it should make it at least a bit more readable

5:44 and it might even serve as documentation

5:44 "oh, this can't be nil. ok then!"

5:44 deg: yup

5:45 (I should have seen that.... I was bothered by the smell of repeating "attrs" over and over in the precondition, but I didn't see answer; now obvious in hindsight)

5:47 _ulises: :)

6:16 clgv: deg: maybe clojure.options with default params and transitive option doc suits you (https://github.com/guv/clojure.options)

6:19 deg: there is a contract programming lib called "trammel"

7:27 tonix81: ciao

7:28 !list

7:51 Chiron: hi, what it is called the resulting function of partial ?

7:52 any convention?

7:52 shachaf: A function?

7:52 Chiron: yes, it is a function . but any used convention? such as partialed ?

7:52 or something

7:54 shachaf: I don't see why. It's just a function.

7:54 That may be my Haskell mindset speaking.

7:55 Iceland_jack: Many functions have special names

7:55 it's a legitmate question

7:56 shachaf: If you give it a name it has a name. :-)

7:58 Iceland_jack: A Partialtite

7:58 clgv: Chiron: well your function has a name due to its semantics. probably the partial function has asemantic as well?

7:59 Chiron: just naming every function resulting from a partial the same doesnt provide much info ;)

8:01 Chiron: for something like (convert [dir1 dir2 file]) i want to fix the first two args

8:01 (partial convert dir1 dir2)

8:02 clgv: convert-file?

8:05 Chiron: classy and sassy

8:19 why (concat [1 2] [3 4]) returns (1 2 3 4) . isn't that is what flatten should do? why not ((1 2) (3 4)) ?

8:19 ,(concat [1 2] [3 4])

8:19 clojurebot: (1 2 3 4)

8:20 Chiron: clojurebot: do you know what it feels like to know that the lock on the door is changed?

8:20 clojurebot: Counterclockwise aka ccw at http://code.google.com/p/counterclockwise/

8:21 Chiron: ,(flatten [1 2] [3 4])

8:21 clojurebot: #<ArityException clojure.lang.ArityException: Wrong number of args (2) passed to: core$flatten>

8:21 Chiron: oops

8:22 clgv: Chiron: concat stands for concatenation, i.e. put two or more sequable things together

8:22 Chiron: yes, why its result is not ((1 2) (3 4)) ?

8:23 clgv: Chiron:because thats no concatenation

8:23 Chiron: i'm putting two sequable things together

8:23 clgv: that is list construction. use ##(list [1 2] [3 4])

8:23 lazybot: ⇒ ([1 2] [3 4])

8:23 Chiron: eye c

9:00 jcromartie: is the guy who wrote Ironclad: Steam Legions ever on here?

9:00 "mikera"

9:07 ~seen mikera

9:07 clojurebot: Gabh mo leithscéal?

9:07 jcromartie: bleh

9:10 clgv: $seen mikera

9:10 lazybot: mikera was last seen joining on clojure 13 weeks and 1 day ago.

9:11 deg: What is the best way to profile Clojure code?

9:12 TimMc: deg: VisualVM is a general JVM profiler.

9:12 criterium is a good Clojure benchmarker.

9:14 jcromartie: thanks clgv/lazybot :)

9:14 ticking: deg, what do you want to do? find bottlenecks or compare two implementations of the same functionality?

9:14 deg: Find bottlenecks.

9:14 ticking: deg, then VisualVM it is ^^

9:14 clgv: deg: there is also yourkit java profiler but that one will cost you after the trial period

9:15 deg: Is integration of VisualVM trivial?

9:15 ticking: deg yes

9:15 you start your process

9:15 deg: I'm looking for something lightweight in startup/learning time.

9:16 ticking: fire up visualvm, and hook into the process (it will find it automatically sinc its a java one)

9:16 deg: (I don't have much code yet, and could almost certainly solve my immediate needs in 1-2 hours even without a profiler.)

9:16 That sounds good. I'm looking at the visualvm docs now, thanks.

9:16 ticking: deg: I found visualvm to be pretty easy to use

9:17 deg: I highy recomend downloading and throwing yourself into it, it's really not hard to use and easy to go exporatory

9:17 deg: Does clojure.contrib.profile still exist? It's doc makes it sound like VERY lightweight integration and probably good enough.

9:18 ticking: deg, contrib is dead, maybee it got portet to a new namespace

9:18 TimMc: ~contrib

9:18 clojurebot: Monolithic clojure.contrib has been split up in favor of smaller, actually-maintained libs. Transition notes here: http://dev.clojure.org/display/design/Where+Did+Clojure.Contrib+Go

9:19 deg: I've looked there; it seems to say that .profile has been abandoned, if I'm reading it right.

9:21 clgv: ticking: downloading visualvm? that one is usually installed with your jdk

9:21 ticking: clgv, not on a mac for example

9:21 clgv: ah ok. well than download it ;)

9:21 deg: I'm on Windows, using Eclipse. (no snide remarks please)

9:22 * ticking does a snide remark about windows and eclipse

9:22 supertramp: poor boy

9:22 deg: c'mon, if you're gonna be snide, at least be really funny too. :-)

9:25 disappearing for a bit ... not only am I in Windows and Eclipse, I also have to "soccer-dad" my kids for the next little while. But, looks like I'm good ... VisualVM started, and sees the clojure jvm. Now I just have to RTFM and I should be good. Thanks all.

9:29 ticking: np^^

9:37 alexnixon: so I just set up an instance of lazybot on my companies internal IRC server, and the first thing that peeps tried was to break the sandboxing. Is it expected that you can cause lazybot (built on clojail) to output a list of files on the system?

9:42 clgv: alexnixon: guess not. but you can try here.

9:43 &(use 'clojure.java.io)

9:43 lazybot: ⇒ nil

9:43 alexnixon: ,(take 2 (tree-seq (memfn isDirectory) (memfn listFiles) (java.io.File. "..")))

9:43 clojurebot: #<ExecutionException java.util.concurrent.ExecutionException: java.lang.SecurityException: denied>

9:44 alexnixon: &(take 2 (tree-seq (memfn isDirectory) (memfn listFiles) (java.io.File. "..")))

9:44 lazybot: ⇒ (#<File ..> #<File ../.cache>)

9:44 clgv: alexnixon: most likely you have forgotten to or improperly added the permissions file for the java sandbox

9:45 &(take (map str (tree-seq (memfn isDirectory) (memfn listFiles) (java.io.File. ".."))))

9:45 lazybot: clojure.lang.ArityException: Wrong number of args (1) passed to: core$take

9:45 clgv: &(map str (tree-seq (memfn isDirectory) (memfn listFiles) (java.io.File. "..")))

9:45 lazybot: Execution Timed Out!

9:45 clgv: &(take 5 (map str (tree-seq (memfn isDirectory) (memfn listFiles) (java.io.File. ".."))))

9:45 lazybot: ⇒ (".." "../.cache" "../.cache/ctrlp" "../.cache/ctrlp/mru" "../.cache/ctrlp/mru/cache.txt")

9:46 alexnixon: you can see the same behaviour on tryclj.com too

9:46 clgv: alexnion: I had a look at clojail a while ago. if the java sandbox permissions support it you can forbid it

9:47 wingy: how can i check all variables in a namespace?

9:53 jcromartie: wingy: check?

9:53 wingy: jcromartie: listing all variables in a namespace

9:53 clojurebot: underscores in namespaces is a bad idea

9:54 jcromartie: ,(ns-publics 'clojure.core)

9:54 clojurebot: {sorted-map #'clojure.core/sorted-map, read-line #'clojure.core/read-line, re-pattern #'clojure.core/re-pattern, keyword? #'clojure.core/keyword?, unchecked-inc-int #'clojure.core/unchecked-inc-int, ...}

9:57 wingy: jcromartie: thx

9:58 is there a way to avoid escaping the " in a json string https://www.refheap.com/paste/6468

9:59 jcromartie: wingy: you don't have to quote most keys in a JSON object literal

9:59 although it's "more correct" it's not required as long as the keys are not JavaScript keywords

9:59 so when you're writing JSON by hand, you can skip the quotes, but if you're generating JSON please do automatically quote keys

9:59 or if the keys are invalid JavaScript identifiers

10:00 wingy: hm

10:00 ill test

10:00 clgv: wingy: ##(do (use 'clojure.set) (keys (ns-publics 'clojure.set)))

10:00 lazybot: java.lang.SecurityException: You tripped the alarm! ns-publics is bad!

10:00 clgv: oh well...

10:00 TimMc: jcromartie: The JSON spec requires quotes; with JSON literals in JS you're correct.

10:01 wingy: jcromartie: i get error if i remove the " around the keys

10:01 since the string is json it requires " around keys

10:01 and string values

10:01 i just wonder if there is a way to not having to escape those in clj

10:01 jcromartie: hmm, yeah I guess that's correct

10:02 wingy: so i can just copy paste but make it a valid json string in clj

10:02 jcromartie: wingy: no, because the only string literals in Clojure are double-quoted

10:02 wingy: perhaps if i create the string manually?

10:02 jcromartie: wingy: you can keep your JSON data in a .json file and load it

10:02 then you don't have to worry about the Clojure string literal

10:04 wingy: yeah but unfortunately i am having these in tests

10:04 better to have them in same place

10:04 i'll just escape :)

10:05 jcromartie: wingy: you can store resource files alongside your tests

10:05 it's not hard, really

10:05 wingy: yeah

10:05 but readability is worse

10:05 jcromartie: or just use Clojure maps/vector literals

10:05 wingy: since you then need to open mutiple files

10:05 jcromartie: and convert them to JSON

10:05 wingy: yepp

10:05 jcromartie: I'm assuming you need to send a JSON string to something

10:05 wingy: btw .. check out the new light table .. this version is frecking hot

10:05 jcromartie: yes it's nice

10:06 wingy: like 1000 times better than the previous one .. getting more mature and vim like

10:06 jcromartie: but getting close enough to Emacs to make me wonder why I should use LightTable instaed :)

10:06 with a minibuffer and all

10:06 wingy: its on clj!

10:06 for clj

10:06 clgv: cljs ;)

10:06 wingy: and clj?

10:06 clgv: not anymore it seems

10:06 jcromartie: I like it

10:07 clgv: cljs only running on chromium, chris granger said yesterday

10:07 wingy: ok

10:07 cool that he is using cljs

10:07 a good killer app

10:07 jcromartie: I can't wait until it's open sourced

10:07 clgv: I wonder whether cljs development benefits from that ;)

10:08 jcromartie: so it's webkit huh?

10:08 clgv: yeah

10:08 jcromartie: OK that's awesome

10:08 exactly the kind of thing I hoped WebKit would power one day :)

10:08 I also want to see a WebKit terminal emulator

10:09 wingy: seems that web techs are still the best to make cross platfor

10:09 m

10:09 jcromartie: oh https://github.com/unconed/TermKit

10:10 fckw: Hi there.

10:11 I am currently playing around with a data structure that could be called "hanging tree".

10:11 Every node (except leaves) is guaranteed to have exactly 2 children.

10:12 AND: However, unlike in common binary trees more than one parent can point to a child.

10:13 What I am looking for is finding a list of all common ancestors of leave nodes.

10:13 TimMc: So... it's a binary DAG.

10:13 fckw: Ah, did not know that's how it's called.

10:14 TimMc: Well, "binary DAG" may not be an existing term, but you're describing a type of DAG.

10:14 fckw: Do you know of any algorithms for finding a list of LACs?

10:14 It certainly is, yes.

10:15 Of course I can reuse existing algorithms for finding LACs in DAGs.

10:15 But I thought, maybe there's something more efficient, because I have a more restrictive graph, knowing that it's binary.

10:15 wingy: jcromartie: you are right .. better to have them in a json file

10:15 makes the test cleaner

10:15 jcromartie: :P

10:16 wingy: and no need to backslash

10:16 im not a shit worker!

10:16 jcromartie: wingy: are you familiar with resource loading?

10:16 clgv: wingy: well webkit with native deps that need to be linked seems to cause some issues when they are linked dynamically

10:16 jcromartie: wingy: yes, save yourself some work :)

10:16 wingy: jcromartie: how do i read the json string from file into memory

10:16 slurp?

10:16 clojurebot: slurp is worse

10:16 jcromartie: wingy: so you put your .json files on the classpath, and get the path with clojure.java.io/resource

10:17 TimMc: clojurebot: The hell are you on about?

10:17 clojurebot: I don't know anything about cshell.

10:17 jcromartie: slurp is not wrong here

10:17 wingy: then i just use slurp

10:17 TimMc: fckw: Does the DAG always have a unique root?

10:18 And are you trying to find the closest common ancestor for a given pair of leaves?

10:18 jcromartie: wingy: yeah, so for instance, make a directory like test/resources/test_data.json

10:18 then (slurp (clojure.java.io/resource "resources/test_data.json"))

10:19 and you're good

10:19 fckw: @TimMc: Yes - but there might be multiple ones, if I'm not mistaken.

10:19 jcromartie: and of course a convenience function like (defn load-json [name] (slurp (clojure.java.io/resource (str "resources/" name ".json"))))

10:19 could be handy :)

10:20 wingy: and off you go :) have fun

10:20 wingy: why do i need the (clojure.java.io)

10:21 seem that you can specify the path directly http://clojuredocs.org/clojure_core/clojure.core/slurp

10:22 jcromartie: wingy: because you want to resolve the path no matter where you run your program from

10:22 wingy: clojure.java.io/resource locates it as a resource on the classpath

10:23 wingy: it relieves you from making sure you're in the right working directory before running your program

10:23 wingy: and you can bundle resources in a .jar and load them this same way, so they don't necessarily have to be in the filesystem

10:25 TimMc: Man, the Light Table site looks like utter ass on my computer: http://i.imgur.com/05AFQ.jpg

10:25 _ulises: that does indeed look like arse

10:26 TimMc: Firefox 9, Linux Mint *probably* has something to do with it. :-P

10:26 fckw: @TimMc: I am currently checking, whether this is basically the same as a Binary Decision Diagram.

10:30 Yes, it actually seems that what I'm looking for is an algorithm for finding all lowest common ancestors (LACs) in a binary decision diagram (BDD).

10:30 Wikipedia on BDDs: http://en.wikipedia.org/wiki/Binary_decision_diagram

10:32 wingy: jcromartie: i must put it in resources?

10:32 what if i wanna put it in the same folder as the test file

10:33 jcromartie: wingy: it's just a convention

10:34 TimMc: "LAC", not "LCA"?

10:35 fckw: "Lowest Common Ancestor".

10:35 bordatoue: hello, is it possible to get integer overflow error in clojure when it does automatic promotion

10:35 TimMc: Hmm, doesn't the DAG need to be rooted?

10:35 wingy: jcromartie: where should the resources folder be? in the project root or test/

10:35 fckw: (Yes, LCA.) Is it not rooted?

10:35 TimMc: bordatoue: Automatic promotion only happens with +', not +.

10:36 wingy: btw .. i put the json file in the same folder as the test file

10:36 fckw: It's really the same data structure as used in a BDD, as I found out already. But unlike BDDs I am really not interested in using them for decision making, but for storing data.

10:36 wingy: but when doing (slurp "file.json") it cannot get it

10:36 TimMc: That was a breaking change from 1.2 to 1.3 -- + was renamed to +', and non-promoting + introduced.

10:36 bordatoue: TimMc: what is +'

10:36 wingy: how should i load it properly

10:36 TimMc: bordatoue: Auto-promoting +

10:37 fckw: And BDDs only have 2 leaves.

10:37 bordatoue: TimMc: thanks

10:37 TimMc: so if i type (apply +' (range 100000000000000000)) should give me a result

10:38 TimMc: Eventually.

10:38 ivan: http://vimeo.com/euroclojure/videos completely missed these

10:38 TimMc: bordatoue: err... except range might break

10:39 fckw: @TimMc: Yes, here's an important difference between BDDs and the data structure I mean. So it's really rather a "binary DAG", as you call it.

10:39 jcromartie: wingy: I told you how to load it :)

10:39 bordatoue: TimMc: thanks very much,

10:39 jcromartie: wingy: use clojure.java.io/resource

10:39 TimMc: ,(take 5 (range Long/MAX_VALUE Double/POSITIVE_INFINITY))

10:39 clojurebot: #<ExecutionException java.util.concurrent.ExecutionException: java.lang.ArithmeticException: integer overflow>

10:39 TimMc: ,(take 5 (range (bigint Long/MAX_VALUE) Double/POSITIVE_INFINITY))

10:39 clojurebot: (9223372036854775807N 9223372036854775808N 9223372036854775809N 9223372036854775810N 9223372036854775811N)

10:42 clgv: is it right that primitive functions (functions with primitive type hints since 1.3) are not called via their ".invokePrim" when I pass them around as first class functions and call them where needed?

10:42 wingy: jcromartie: it says java.lang.IllegalArgumentException: No implementation of method: :make-reader of protocol: #'clojure.java.io/IOFactory found for class: nil

10:42 when running (slurp (clojure.java.io/resource "get_user_info.json"))

10:42 deg: ticking: So, I'm playing with VisualVM, but don't yet see how to find the results I want. I figured out that I need to look at a snapshot to see a tree view, but it only shows me clojure runtime methods, petering out with "self time" under clojure.core$pop.invoke. And, I found Tools|Options|Profiler CPU|Do not profile classes, but it doesn't seem to filter the output.

10:45 jcromartie: wingy: the argument to clojure.java.io/resource should be relative to the classpath… so since your "test" directory is on the classpath, it will search there, so use the path relative to test

10:45 so if you did it like I said and put it in your_project/test/resources/get_user_info.json then you'd load it with (resource "resources/get_user_info.json")

10:45 deg: ticking: Hmm, tried again. This time, I do finally see one of my functions. But I need to click/dive down about 20 levels, and I don't see my other functions that call that function.

10:46 jcromartie: wingy: Java resource loading is handy to understand, but it takes a while to "click"

10:46 wingy: once you get it, it will makes sense, though

10:46 wingy: jcromartie: worked

10:46 jcromartie: i need to read about it

10:46 hate when you dont get a thing

10:47 if you guys have good tutorials for class path/resource loading please share

10:48 fckw: Ok, according to some uni script I found online, BDDs are allowed to have nodes with > 1 input edge. Then my data structure is really a BDD in this sense.

10:50 wingy: jcromartie: thx for the help btw

10:50 bordatoue: is there any function in clojure that would display all the symbols in a namespace

10:50 jcromartie: wingy: any time

10:50 bordatoue: we already did this today :)

10:50 ,(ns-publics 'clojure.core)

10:50 clojurebot: {sorted-map #'clojure.core/sorted-map, read-line #'clojure.core/read-line, re-pattern #'clojure.core/re-pattern, keyword? #'clojure.core/keyword?, unchecked-inc-int #'clojure.core/unchecked-inc-int, ...}

10:51 bordatoue: jcromartie: thanks

10:55 fckw: Ok, got it now: There is a distinction between BDTs (binary decision trees) and BDDs (binary decision diagrams). BDDs allow a node to have > 1 ancestors, whereas in BDTs there must be exactly 1 ancestor. What I have in mind is a binary decision diagram.

10:55 BDD.

11:01 ticking: deg, how about the hotspots tab?

11:12 TimMc: clgv: I think invokePrim only gets used when you call a prim fn by var name.

11:12 clgv: TimMc: I come to think the same. Is there no way to hint that a function passed to another function is primitive?

11:12 TimMc: Given (defn some-prim ...), (some-prim 1 2 3) vs. (let [other-name some-prim] (other-name 1 2 3))

11:12 ...since I think it uses the :arglists on the var.

11:13 It's very hacky and terrible as of 1.3.

11:13 clgv: it does according to Compiler.java

11:13 is it better in 1.4?

11:14 TimMc: clgv: Here's what I wrote last time I actually read Compiler.java stuff: http://www.brainonfire.net/blog/hof-vs-prim-invoke-clojure/

11:14 I don't know what happens in 1.4.

11:15 clgv: well I think metadata on the callsite could enable primitive HOFs

11:15 but it seems not that this is implemented :(

11:16 that means I cant use primitive functions in my algorithm framework... ;(

11:18 I could create a callsite macro though

11:25 sh10151: anyone a slime/emacs user? the colors in sldb tracebacks are too pale and I can't figure out how to change them

11:25 customize-face doesn't bring up a named face

11:26 konr_trab: is there already a "map-vals" function that gets applied to the values of a map? For example, (map-vals inc {:foo 1 :bar 2}) -> {:foo 2 :bar 3}

11:29 chronno: sh10151: I use the function at https://www.refheap.com/paste/6470 to find the name of the face the cursor is over

11:30 TimMc: konr_trab: Nothing in the core lib. zipmap may be useful, and (into {} (for [[k v] map] [k (f v)])) would certainly do the trick.

11:33 alexnixon: konr_trab: https://github.com/flatland/useful/blob/develop/src/useful/map.clj#L47

11:34 konr_trab: alexnixon: haha, with the same name :)

11:38 jweiss: if i want to replace fns like clojure.core/= clojure.core/some etc with traced versions (that print out input/output), just in the current thread, what's the best way? i could use a macro to replace all calls to those fns to re-point to my own with a different symbol, or i could use with-redefs to first make them dynamic, and then use a binding form as usual to enable tracing for the local thread. both seem a bit ugly.

11:38 clgv: why does this fail ##(Class/forName "clojure.lang.IFn$LLL") ??

11:38 lazybot: clgv: Uh, no. Why would you even ask?

11:38 ⇒ clojure.lang.IFn$LLL

11:39 clgv: humm here it does not ...

11:39 TimMc: Are you in 1.2?

11:41 bordatoue: how to represent char '' in clojure

11:41 TimMc: Which char?

11:41 clgv: 1.3

11:41 bordatoue: TimMc: '' empty char

11:42 TimMc: ...is that a thing?

11:42 bordatoue: /u0000

11:42 TimMc: ,(char 0)

11:42 clojurebot: \

11:42 TimMc: NUL, not empty.

11:42 bordatoue: TimMc: what is \u0000

11:43 TimMc: It is the Unicode code point for the NUL character.

11:43 S11001001: bordatoue: there is no such thing as an empty char, no more than there is an empty number

11:43 ivan: ,\u0000

11:43 clojurebot: \

11:43 ivan: ,(type \u0000)

11:43 clojurebot: java.lang.Character

11:43 TimMc: &(= (char 0) \u0000)

11:43 lazybot: ⇒ true

11:43 TimMc: &(= (char 65) \A)

11:43 lazybot: ⇒ true

11:43 bordatoue: TimMc: thanks , is '' also represented as null

11:44 TimMc: bordatoue: '' does not exist.

11:44 bordatoue: TimMc: in java i can do something like tthis char c=''

11:44 TimMc: Check if it is equal to '\u0000'.

11:45 bordatoue: TimMc: yes it is equal

11:45 TimMc: It must be shorthand.

11:45 bordatoue: TimMc: thanks very much

11:47 S11001001: am glad java has a convenient way to specify the 0 character, I need to do it pretty often

11:47 switching to java now

11:47 clgv: &(Class/forName "clojure.lang.IFn$LLL")

11:47 lazybot: ⇒ clojure.lang.IFn$LLL

11:47 S11001001: will also enjoy writing numbers like 1_048_576

11:48 clgv: humm that one fails on 1.4 here as well...

11:48 bordatoue: TimMc: if i create char-array in clojure will it be initialled with char 0

11:48 jweiss: how do i get around clojure.core vars not being dynamic. i want to rebind them.

11:48 bordatoue: ,(seq (char-array 10))

11:48 clojurebot: (\

11:49 clgv: damn typo that I did not copy...

11:49 bordatoue: when i did (seq (char-array 10)) in the repl i got ( \@, \@ ....)

11:51 cmn: that's just your shell/terminal's way of showing it

11:52 bordatoue: cmn, thanks

11:53 TimMc: clgv: I wonder if it needs importing...

11:53 clgv: Try clojure.lang.IFn$LLL in your REPL, by the way.

11:54 clgv: TimMc: no. I was obviously too tired to spot the typoe clojure.lang.IFN$LLL

11:55 TimMc: oh, ha

12:09 seancorfield: ibdknox: did an update to LightTable for Windows get posted fixing the pathing issue?

12:39 ipostelnik: in lein is it possible to only enable AOT compilation for uberjar, but leave it off when building a regular jar?

12:41 mudge: I'm defining a class using gen-class. Inside my class I have a -main function where I instantiate my class --- how ever this does not compile. The compiler says that it cannot resolve the class name, any suggestions?

13:08 qubit[01]: is there anything like pop-nth ? That will remove the nth item from a sequence and return it ?

13:09 ivan: seqs are immutable

13:09 oh, I see what you mean

13:09 qubit[01]: well actually, I need it to be mutable, so that wont work

13:10 I'm trying to learn clojure by doing problems, and this one is shuffling a deck

13:10 I feel like Im makint it harder than it needs to be

13:11 ivan: I know of a library with the proper shuffling algo in pure Clojure

13:11 uvtc: ,(shuffle [1 2 3 4])

13:11 clojurebot: [3 4 2 1]

13:11 mudge: I'm defining a class using gen-class. Inside my class I have a -main function where I instantiate my class --- how ever this does not compile. The compiler says that it cannot resolve the class name, any suggestions?

13:11 qubit[01]: well shiz

13:13 uvtc: qubit[01]: :)

13:14 scriptor: qubit[01]: why does it have to be mutable?

13:14 qubit[01]: scriptor, just the implementation I was going with, have to rethink it

13:14 but (shuffle) makes it ridicoulously easy

13:15 scriptor: as far as mutability goes, best to only use it in clojure when you really need it

13:15 uvtc: qubit[01]: the cheatsheet helps me out a lot.

13:16 ipostelnik: well, clojure.core/shuffle converts a collection to an ArrayList, passes it to Collections#shuffle, and returns a new seq on top of the created list

13:19 qubit[01]: This is what I have for shuffling a deck, any suggestions https://www.refheap.com/paste/6472 ?

13:20 also, how would I implement my own method of (shuffle) , I guess I'll try to do that

13:21 scriptor: you could create a vector of new indexes

13:22 where the indexes in the vector are the old card positions, and the values are the new ones

13:22 ivan: qubit[01]: https://github.com/clojure/test.generative/blob/master/src/main/clojure/clojure/test/generative/generators.clj#L277

13:22 dnolen: ohpauleez: hey have you had a chance to checkout CLJS w/ the latest GClosure, might be worth chiming in on that thread to confirm Stuart can do a release.

13:23 ohpauleez: dnolen: Will do, it's been on my list

13:24 qubit[01]: ivan, ahh thanks

13:25 dnolen: ohpauleez: excellent, thx

13:25 qubit[01]: scriptor, ok Ill try that

13:25 ohpauleez: dnolen: no problem, I'm definitely happy to have all the changes and the latest GClosure deployed :)

13:25 dnolen: ohpauleez: I'm trying it out myself now

13:26 alexnixon: qubit[01]: there's a cute shuffle implementation here https://github.com/flatland/useful/blob/develop/src/useful/seq.clj#L149

13:30 qubit[01]: hmm how can I tell the repl not to display something

13:30 let me google it first

13:32 mudge: leiningen should find any class in src or target directories, right?

13:36 ToBeReplaced: why do people wrap their middleware around the main ring handler instead of the smaller subhandlers that require them?

13:38 it seems like that obfuscates requirements and complicates testing... but maybe there's a performance reason? i'm not really buying the convenience argument

13:51 ticking: any idea how to call a function every full hour?

13:53 augustl: ticking: I would find a java library

13:54 ticking: augustl, sounds like a plan but only shifts the problem to a less familiar domain :D

13:55 crossblaim: hi

13:57 TimMc: ticking: http://docs.oracle.com/javase/6/docs/api/java/util/Timer.html ?

13:58 ticking: TimMc, sounds like a plan thanks, I refined my googling to sheduling and that did the trick ^^

13:59 overtone at-at and quarzite seem to be idiomatic sheduler libs :D

13:59 TimMc: Too bad it doesn't take a Runnable and make a TimerTask out of it.

14:00 ticking: TimMc which one?

14:03 quarzite seems to be a full fetched sheduling lib for calendears and persistent storage awesome, but a little bit over the top for a clock app :D, so at-at it is ^^

14:05 raek: ticking: cron4j has a simple syntax and accepts Runnables: https://gist.github.com/1496650

14:05 ticking: raek, awesome thanks :D

14:08 raek: (the string for __:00 every day would be "0 * * * *")

14:13 mudge: How do I call inherited methods in the init constructor?

14:31 ohpauleez: dnolen: I gave it a go across half my CLJS projects (one of which uses the third party stuff) and everything looked good to me

14:39 dnolen: ohpauleez: sweet

14:39 ohpauleez: thx

14:39 ohpauleez: np, definitely amped to see the release cut

14:41 mudge: is it true that hyphens are illegal in clojure package paths?

14:43 ohpauleez: mudge: No, you can use dashes in the namespaces, but the directories will need to use underscores

14:44 (this is necessary for java interop)

14:45 mudge: ohpauleez: I understand that you can use a namespace like this: com.domain.my-program

14:45 but can you use a namespace like this: com.domain.trouble-here.myprogram

14:45 ohpauleez: yes

14:46 but the directory for trouble-here will be trouble_here

14:46 mudge: ohpauleez, really? It doesn't work for me. When I do it, it can't find the class

14:46 I understand

14:46 ohpauleez: do you know of an example where this is being done?

14:47 ohpauleez: mudge: https://github.com/dakrone/clj-http/blob/master/src/clj_http/client.clj

14:47 mudge: ohpauleez: when I do it, it will compile, but at runtime it can't find the class

14:47 ohpauleez: yes I see. You are right.

14:49 ohpauleez: does it still work when using :gen-class to generate the class? Because in Java hyphens are illegal in the package names, so I'm wondering if it won't work when using :gen-class because gen-class is supposed to generate a Java class

14:49 ohpauleez: mudge: That's why the directories have to have underscores actually, because internally the compiler will convert them to underscores (to preserve interop)

14:50 usually, I avoid hyphen names if I'm doing AOT compiling

14:50 but the general rule of thumb is don't do AOT compiling unless you really really have to

14:51 mudge: ohpauleez: yes makes sense. However if another Java class wants to use my class I generated in clojure, how would that java class be able to reference my clojure class when the clojure class has a hypen in its package path? because hyphens are illegal for java in package paths

14:51 ohpauleez: mudge: You use underscores from Java

14:52 S11001001: mudge: it won't have a hyphen, because of what ohpauleez said

14:52 mudge: Okay, thanks guys

14:52 ohpauleez: mudge: NP, happy to help

14:54 mudge: when I try it I get a ClassNotFoundException

14:54 This is the namespace I use: java.lang.ClassNotFoundException: com.perfectabstractions.im-client.components.ImComponent

14:54 And I changed the im-client directory to im_client

14:55 I use lein run to execute the program

14:56 ohpauleez: mudge: Is the code available on github somewhere?

14:58 mudge: ohpauleez: you know what, I solved it. In my ImComponent class I create an instance of itself, but when i use ImComponent within ImComponent I need to use the underscore version of the namespace not the hyphen version

14:59 ohpauleez: so it appears that at runtime you have to use the underscore version of your namespace that you declared with a hyphen at compile time

15:00 ohpauleez: mudge: That's correct, because at runtime the compiler already converted all hyphens to underscores

15:00 mudge: ohpauleez: yes!!! here's a gist of the working code now: https://gist.github.com/4033999

15:01 ohpauleez: mudge: Correct, you totally get it!

15:01 mudge: ohpualeez: I guess the whole hpyen thing is kind of a hack to get around Java's limitation

15:01 ohpauleez: thanks for your help

15:02 ohpauleez: mudge: Most certainly, it's only there to preserve interop

15:02 you're totally welcome

15:13 ibdknox: seancorfield: what was the exact error you were getting for windows?

15:21 goracio: ibdknox: hi there is a problem with LT ubuntu 12.10 - opent instarepl and other commands not working

15:22 ibdknox: goracio: what do they do?

15:23 goracio: ibdknox: nothing happens alt+ctrl+k or alt+ctrl+o nothing happens

15:23 ibdknox: goracio: don't press alt

15:25 goracio: ibdknox: oh yes just ctrl+key is ok

15:26 ibdknox: also if i use small menu at the command line choose command and enter nothing happens

15:26 ibdknox: goracio: press tab, then enter

15:26 goracio: there's a bug for that one

15:28 goracio: ibdknox: ok just tab is ok

15:29 ibdknox: seems to me it's just vim in cljs do you plan to make features that you talked about at the beginning ?

15:29 ibdknox: yes

15:35 goracio: ibdknox: www.codebubbles.org i found that ideas pretty useful, would be nice if some of that ideas will be in LT

15:36 ibdknox: the notions behind some of it will be

15:36 their implementation ended up requiring a lot of time managing the bubbles

15:38 goracio: ibdknox: microsoft used that ideas in debugger canvas

15:38 ibdknox: I know, I built it for them

15:38 :)

15:39 goracio: ibdknox: ok ) anyway i hope that something will be in LT soon

15:39 ibdknox: something of it

15:40 TimMc: ibdknox: FYI, lighttable.com on Firefox 9: http://i.imgur.com/05AFQ.jpg

15:41 ivan: what thing ships with FF9?

15:41 TimMc: Nothing anymore, probably?

15:41 FF10+ crashes my computer.

15:42 This isn't a major usability bug or anything, but I thought he should know.

15:42 ibdknox: not sure which part you're showing me

15:45 TimMc: Funky text, blurry background.

15:45 ibdknox: yeah it's weird that the images are getting messed up

15:48 TimMc: On a more serious note: "`GLIBC_2.14' not found"

15:55 ticking: clojure + ethernet enabled power block = awesomeness

15:56 ibdknox: TimMc: fixed later today I believe

15:56 ticking: ibdknox, btw is the spinny thing at the welcome page supposed to spin^^?

15:56 ibdknox: ticking: what spinny thing on the welcome page?

15:57 ticking: I stared 10 minutes at it after updating, and then wen't meh, and used LT ^^

15:57 wait a sec

15:57 http://cl.ly/image/2m370y1F1N2P

15:57 ibdknox: hm

15:58 what platform are you on?

15:58 that is an old version of LT

15:58 ticking: mac lion latest

15:58 ibdknox: rm your ~/.lighttable

15:58 I have no idea how you got that

15:58 TimMc: ibdknox: Nonsense, that screen says "latest version". :-P

15:58 ibdknox: I didn't release that publicly

15:58 ticking: lol

15:58 TimMc: haha

15:59 ticking: so I'll do a mv and then a rm ;P

15:59 and in 50 years I'm going to sell it on ebay, "Light Table collectors edition,prototype never officialiy released. This is how it all started! Grab your piece of history now!"

15:59 ibdknox: lol

16:02 ticking: ibdknox, well at least that explains why the "latest version" increased the crashes ^^

16:03 zilti: I'm trying to do something like (-> arg list-of-functions) which obviously doesn't work, but I don't know how to work around this...

16:03 Wild_Cat: ibdknox: in LT, how do you dismiss the red error dialogs?

16:03 goracio: ibdknox: btw new version updates itself ?

16:03 TimMc: ibdknox: No, that GLIBC thing still happens with latest 64 off the website.

16:04 ibdknox: TimMc: I said later today :p

16:04 Wild_Cat: (also, I'll try the Windows version tonight -- on OSX it looks smooooooooth)

16:04 TimMc: Oh! Misread.

16:04 * TimMc joins #lighttable

16:31 ohpauleez: nDuff: It's very unfortunate

16:32 bbloom: ohpauleez: i use the shit out of rebase locally. i never use on other people's stuff

16:32 nDuff: *nod*.

16:33 zilti: ##((first '(#(+ % 5) #(%))) 2)

16:33 lazybot: java.lang.ClassCastException: clojure.lang.PersistentList cannot be cast to clojure.lang.IFn

16:33 bbloom: i use it to bubble sort small changes up to the top

16:33 hiredman: http://openjdk.java.net/jeps/169 <-- has a nod to rich

16:33 bbloom: :-)

16:33 nDuff: If I merge something, I want to have a record of both when and why that merge happened.

16:33 (and to know, unambiguously, that the changesets that came in did so via that merge).

16:34 ohpauleez: bbloom: Are you making it to the Conj?

16:34 bbloom: ohpauleez: unfortunately not

16:34 ohpauleez: total bummer

16:34 I was definitely looking forward to catching up

16:37 bbloom: ohpauleez: i'm not a big conference guy

16:37 zilti: Why isn't (function argument) == ((first function-list) argument)??

16:37 lazybot: zilti: What are you, crazy? Of course not!

16:37 zilti: lol

16:38 bbloom: zilti: um, it is.... are you sure function-list is what you think it is?

16:38 ohpauleez: bbloom: Nor am I, but the Conj is: 1.) Extremely fun 2.) has the most interesting conversations over beer 3.) Engaging and enlightening 4.) And full of people I totally admire and respect

16:38 zilti: ##(#(+ % 5) 2)

16:38 lazybot: ⇒ 7

16:39 zilti: ##((first '(#(+ % 5) #(%))) 2)

16:39 lazybot: java.lang.ClassCastException: clojure.lang.PersistentList cannot be cast to clojure.lang.IFn

16:39 bbloom: ohpauleez: heh, 3 remaining late registration tickets

16:39 zilti: ##(first '(#(+ % 5) #(%)))

16:39 lazybot: ⇒ (fn* [p1__476557#] (+ p1__476557# 5))

16:39 zilti: ##((fn* [p1__1169#] (+ p1__1169# 5)) 2)

16:39 lazybot: ⇒ 7

16:39 bbloom: ohpauleez: david cohen wants me to go to the techstars founder con in boston the few days before too

16:40 ohpauleez: and my mother wants me to come home for thanksgiving

16:40 maybe i could do a east coast tour, heh

16:40 ohpauleez: bbloom: David cohen has also only given me bad advice

16:40 haha

16:40 bbloom: ohpauleez: i'll refrain from public comment :-P

16:40 ohpauleez: bbloom: haha Give it some serious consideration. East coast whirlwind tours are always a blast (for me)

16:40 zilti: bbloom: So, yes, I'm sure a function list is what it is ;)

16:41 bbloom: zilti: no, i mean are you sure THAT one is what you think it is. (prn (class (first function-list))

16:41 TimMc: zilti: You're quoting your fns.

16:42 bbloom: TimMc: I was trying to help him learn to debug it :-)

16:42 zilti: Now that's a weird behaviour of lists

16:44 So "first" with a list gives me clojure.lang.PersistentList, "first" with a vector gives me the first item? Logic?

16:45 bbloom: zilti: you have a list of lists?

16:45 ,(first '(1 2 3))

16:45 clojurebot: 1

16:45 bbloom: ,(first '('(1) 2 3))

16:45 clojurebot: (quote (1))

16:45 bbloom: ,(class (first '('(1) 2 3)))

16:45 clojurebot: clojure.lang.PersistentList

16:45 bbloom: ,(class (first '(1 2 3)))

16:45 clojurebot: java.lang.Long

16:46 zilti: No, I have:

16:46 TimMc: bbloom: Oops!

16:46 bbloom: zilti: when in doubt, print it out :-)

16:46 zilti: (prn (class (first '(#(+ % 5) #(%)))))

16:46 ##(prn (class (first '(#(+ % 5) #(%)))))

16:46 lazybot: ⇒ clojure.lang.PersistentList nil

16:47 zilti: ##(prn (class (first '[#(+ % 5) #(%)])))

16:47 lazybot: ⇒ clojure.lang.PersistentList nil

16:47 zilti: damn

16:47 TimMc: Can I jsut cut to the chase?

16:47 bbloom: TimMc: heh, go for it :-)

16:47 zilti: (prn (class (first [#(+ % 5) #(%)])))

16:47 ##(prn (class (first [#(+ % 5) #(%)])))

16:47 lazybot: ⇒ sandbox7657$eval476645$fn__476646 nil

16:47 TimMc: zilti: Why does '(foo) not give a "foo not found" error?

16:47 zilti: TimMc: Because a quoted list is seen as data, not as code

16:48 But vectors are always seen as data so there's no need to quote

16:48 TimMc: Nope.

16:48 &[foo]

16:48 lazybot: java.lang.RuntimeException: Unable to resolve symbol: foo in this context

16:48 TimMc: &'[foo]

16:48 lazybot: ⇒ [foo]

16:48 TimMc: &'(foo)

16:48 lazybot: ⇒ (foo)

16:49 zilti: &(first '[foo])

16:49 lazybot: ⇒ foo

16:49 zilti: &(first '(foo))

16:49 lazybot: ⇒ foo

16:50 TimMc: zilti: And what is an inline function "as data", if not a list?

16:50 zilti: &(first (foo))

16:50 lazybot: java.lang.RuntimeException: Unable to resolve symbol: foo in this context

16:50 zilti: I have to buy a rubber duck

16:51 TimMc: zilti: ' quotes the entire form and everything inside it. '() is the only way to write a list literal. If you want an inline list of non-quoted things, use (list ...).

16:52 zilti: TimMc: Oh. I thought '() is short for (quote) and the same as (list), that's what was wrong

16:53 AimHere: No, that's just a side-effect of the repl confusing you, because you have to quote in order to use lists there

16:54 TimMc: ,''(foo bar)

16:54 clojurebot: (quote (foo bar))

16:55 TimMc: ^ that's what '(foo bar) is read as

16:55 Oh, here we go: ##(read-string "'(foo bar)")

16:55 lazybot: ⇒ (quote (foo bar))

17:08 astoddard: ,(when-let [{:keys [b]} m] (println "Found " b))

17:10 ,(when-let [{:keys [b]} {:a 1}] (nil? b))

17:14 Would someone please clue me in on evaling some code with lazybot here?

17:14 sritchie: $(* 1 1)

17:14 maybe?

17:14 guess not

17:14 bbloom: &1

17:14 lazybot: ⇒ 1

17:14 TimMc: astoddard: & is lazybot's eval prefix, , is clojurebot's

17:15 ## for inline eval with lazybot, although it accepts fewer forms.

17:15 Raynes: Anything with parentheses.

17:15 TimMc: ,"You there?"

17:15 clojurebot: "You there?"

17:16 TimMc: Looks like it was down.

17:17 bbloom: ooooh inline eval? you mean like ##(identity "this?")

17:17 lazybot: ⇒ "this?"

17:17 bbloom: neat.

17:22 astoddard: I've tried to be too clever with when-let ##(when-let [{:keys [b]} {}] (nil? b))

17:22 lazybot: ⇒ true

17:22 TimMc: astoddard: Yep.

17:23 The test is done on the result of the RHS, and then that result has destructuring applied.

17:24 Maybe a multi-clause when-let or if-let would be appropriate.

17:24 or you could use -?> cleverly somehow?

17:25 ,(let [{:keys [b]} {}] (when b (nil? b)))

17:25 clojurebot: nil

17:28 alex_baranosky: hey guys I've got a question. I'm using cheshire.custom, and want to serialize sets differently than the way they do by default. I tried to extend the JSONable protocol to clojure.lang.IPersistentSet… but it is already extended to that interface in the internals of cheshire

17:29 dnolen: extensiblity of core.logic is starting to pay off: http://gist.github.com/4034937

17:30 bbloom: dnolen: what is actually going on there?

17:30 seancorf`: ibdknox: I get CreateProcessW: The system cannot find the file

17:30 specified

17:30 unlink: I'm using the cookie store with ring.middleware.session/wrap-session. Why is it that when I restart my server process, then, that the existing sessions become invalid?

17:31 seancorf`: sorry for delayed response, was away at lunch

17:31 unlink: Oh, I am also supplying a secret key to the cookie store when I initialize it.

17:32 dnolen: bbloom: unification is entirely based on actual values, this shows that you can provide constraints on w*what kinds* of values should succeed.

17:32 zackzackzack: Any ideas about how to turn off DEBUG mode in noir?

17:32 TimMc: zackzackzack: Start it in :prod mode.

17:32 instead of :dev

17:32 zackzackzack: Ahh! Just saw that in the server file

17:32 Thanks

17:33 bbloom: dnolen: nice

17:33 unlink: Never mind, I had the name of the option for the secret key wrong.

17:33 (And it was silently ignoring my option.)

17:33 alex_baranosky: can I override a protocol that is already extended to a particular interface, with an alternate protocol method?

17:33 dnolen: bbloom: yes first cut, needs more work - but lynaghk has some cool use cases - I'm happy that even this early iteration was so easy to implement.

17:34 alex_baranosky: what I mean, is, if a protocol is already extended to IPersistentSet, can I extend it again in my own ns to get altered behavior? (specifically I want to alter the way cheshire.custom serializes set)

17:35 dnolen: bbloom: for some context, what lynaghk is trying to do http://gist.github.com/4004143

17:36 bbloom: dnolen: yup saw that

17:38 TimMc: alex_baranosky: Out of curiosity, what happens when you try it?

17:39 alex_baranosky: TimMc: it seems to be not running the code we're attempting to overload with

17:40 TimMc: alex_baranosky: As a hacky fix, you might create a box class that you can stick sets into for an alternate serialization method.

17:40 What are the two ways to serialize sets?

17:46 alex_baranosky: TimMc: the reasons we're doing it are intricate, but we're serializing sets as maps like: "{\"a\": true, \"b\": true}"

17:46 TimMc: I see.

17:46 alex_baranosky: cheshire defaults to storing sets as arrays

17:50 TimMc: alex_baranosky: And you don't have much control over the data that's going into Cheshire?

17:54 alex_baranosky: TimMc: we could do the wrap-a-set approach

17:55 ibdknox: seancorfield: just to confirm, you definitely have java installed on that one?

17:56 seancorfield: I think there might be something more than paths going on for you

18:00 seancorfield: lein works fine from the command line on that win8 setup

18:00 emacs / nrepl-jack-in also works fine

18:00 ibdknox: seancorfield: k, that's what I needed to hear

18:00 I fixed all the pathing stuff, but that error text implies something else going on

18:01 seancorfield: i'm firing it up so i can run any tests you need me to, in order to debug stuff

18:01 ibdknox: I think it might be a 64vs32 bit thing :(

18:01 stupid node

18:01 lol

18:01 seancorfield: oh? it's 64-bit windows

18:02 ibdknox: yeah and my VM is 32

18:02 seancorfield: ah, ok

18:03 Raynes: ibdknox: Didn't you say you were going to release with more themes today?

18:03 ibdknox: yeah

18:03 Raynes: I don't see an update mechanism. Is that gone?

18:04 ibdknox: it auto-updates

18:04 with the exception of the shell

18:04 Raynes: IT'S SENTIENT?

18:04 seancorfield: confirmed lighttable.exe is 32 bit

18:04 ibdknox: seancorfield: yeah, which should be fine

18:04 seancorfield: it uses nodejs to shell out to cmd.exe

18:04 seancorfield: my suspicion is it's looking in the wrong place for it

18:05 Raynes: ibdknox: So, it should be updating then?

18:05 ibdknox: Raynes: when I push the update

18:05 Raynes: Oh, I assumed you had already.

18:05 ibdknox: no sir

18:05 trying to clean up a bunch of things

18:05 Raynes: s/clean up/break/

18:05 ibdknox: lol :p

18:05 TimMc: alex_baranosky: If you have access to the sets to wrap them, why not just convert them into things that Cheshire will handle the way you want it to?

18:06 seancorfield: ibdknox: is there a log file / debug mode i can enable to help figure it out?

18:06 TimMc: (into {} (for [el my-set] [el true]))

18:06 ibdknox: seancorfield: looking into what the best thing to do here is. Will let you know. :)

18:07 Raynes: Explode into unicorn dust.

18:18 alex_baranosky: is there a way to remove a protocol implementation?

18:18 (in clojure 1.2)

18:20 amalloy: no

18:24 Raynes: alex_baranosky:

18:24 http://www.youtube.com/watch?v=FshkO8HqQ10

18:34 alex_baranosky: Raynes: https://github.com/dakrone/cheshire/blob/master/src/cheshire/custom.clj#L294 :)

18:34 Raynes: alex_baranosky: I didn't even look at your question, just piggiebacked on amalloy's no.

18:35 amalloy: alex_baranosky: doesn't actually work in all cases though

18:35 alex_baranosky: Raynes: nice one :D

18:35 doh

18:35 amalloy: it'll remove implementations added via extend[-type/protocol], but not those implemented inline in deftype/defrecord

18:36 alex_baranosky: amalloy: good to know. Thanks.

18:39 _francis: I've got two sets of Joda DateTime objects, the strings (after I order them) are the same - however a test for equality fails. Thoughts anyone?

18:39 hiredman: _francis: what equality?

18:39 _francis: (= set0 set1)

18:39 alex_baranosky: sounds like somehow the toStrings for them are the same but .equals shows them to be not equal

18:40 hiredman: _francis: so for the individual datetime objects, find the ones that are not equal, and find out what is different

18:41 toString is not an equality check

18:56 _francis: hiredman: thanks

19:01 hiredman: http://dev.clojure.org/jira/browse/CLJ-1104 that is not a good time

19:01 bjorkintosh: apt-get install clojure, installs 1.1. is there a better way to get the latest?

19:01 git perhaps?

19:02 hiredman: bjorkintosh: clojure is a little different from most other languages

19:02 TimMc: bjorkintosh: Clojure is really a library, so you don't install it.

19:02 hiredman: you don't install it

19:02 bjorkintosh: ah.

19:02 xeqi: I recommend leiningen.org

19:02 TEttinger: yep

19:02 bjorkintosh: thanks. leningen. that's what i was wondering about.

19:02 hiredman: the library dependency stuff in something like lein will make sure you have the version you want for a particular project

19:03 TEttinger: you only need the leiningen executable, then run `lein self-install`

19:03 and it downloads clojure and deps

19:03 lein is pretty fantastic

19:05 mdaines: Any recommendations on a lein tutorial? I use the basics, but know I'm missing a lot.

19:05 On that note, any vim & clojure recommendations?

19:05 TimMc: clojurebot: install is <reply>You don't want to install Clojure, per se -- the Leiningen build tool will manage it as a dependency for you. This also allows projects to use different versions of Clojure.

19:05 clojurebot: 'Sea, mhuise.

19:05 tos9: mdaines: VimClojure?

19:06 xeqi: mdaines: theres https://github.com/technomancy/leiningen/tree/master/doc

19:06 mdaines: tos9 I have to revisit it. I had trouble with it a while back and then didn't get around to resolving it.

19:06 xeqi: mdaines: lein-tarsier for vim and clojure

19:07 tos9: mdaines: Only thing I had trouble with is nailgun, but that's my own laziness.

19:07 * bbloom wonders why clojure.org isn't updated to recommend lein ...

19:07 bbloom: oh, nevermind

19:08 it is

19:08 mdaines: Yeah, nailgun was my problem.

19:08 bbloom: http://clojure.org/downloads should move lein to the top of the list and recommend it more explicitly :-)

19:08 tos9: Yeah. So, I did too, but I don't actually want it that much (I use vimux anyhow, and don't usually want an interpreter open as well) but nailgun should work if I spent some time figuring out how to

19:09 mdaines: my problem was not wanting to spend so much time setting up my env. I think I'm at the point now where I'm willing to invest more time.

19:11 Or rather, see the value.

19:58 TimMc: mdaines: There's not much to know for basic development. If you run into issues, you can always ask for help here or in #leiningen.

20:08 rbxbx: mdaines were you looking into setting up vimclojure...? /me only saw the bit about nailgun

20:13 mdaines: rbxbx: I had tried to use it a while back and never got it set up right.

20:14 rbxbx: mdaines take a look at http://regretful.ly/clojure/2012/10/28/up-and-running-with-vimclojure/ and https://github.com/sattvik/lein-tarsier

20:14 both aim to make the process easier

20:14 without forcing you to clobber your local vim config like vimclojure-easy

20:14 bbloom: dnolen: thing i wish i could do with cljs and core logic: specify optimizations along the lines of "if you see a case macro where all of the arguments are statically known to be a contiguous sequence of integers, emit a sane simple javascript switch block"

20:14 mdaines: cool, thanks. That'll be my next project.

20:27 ttimvisher: is it possible to get slime to eval something in the frame when stopped by swank.core/break?

20:29 rbxbx: technomancy: any way to make lein run not require a project.clj be specified as with lein repl? I'm guessing throwing a step like this (https://github.com/technomancy/leiningen/blob/master/src/leiningen/repl.clj#L66) into lein run would be necessary. Is this something you'd like/approve of as a feature?

20:49 TimMc: rbxbx: Check out lein-oneoff

20:50 rbxbx: TimMc that would work but this is for end user tooling and it'd be nice to not require them install an additional plugin

20:57 ttimvisher: is there a union that takes an equality predicate?

20:57 twobitsprite: is it just that I'm running in a VM, or is lein really slow?

20:58 ttimvisher: twobitsprite: depends on your definition of slow :)

20:58 twobitsprite: like, vt100 slow :P

20:58 ttimvisher: then it's probably that you're running on a vm, unless you don't really remember how slow vt100s were

20:59 ;)

20:59 twobitsprite: I don't know, 9.6 seconds to print the 33 lines of text output from "lein help"...

21:00 Sgeo_: I don't know why, but if I lein repl, and leave that running for a while, text entry slows to a crawl

21:00 I'm on Windows 7

21:00 ttimvisher: actually thaht's about what it took for me

21:00 macbook pro running lein from inside emacs

21:00 but i'm a java dev.

21:00 twobitsprite: ttimvisher: wow...

21:00 ttimvisher: i have a different understanding of time

21:01 twobitsprite: is that just the java startup cost?

21:01 ttimvisher: i seem to remember there being something in the faq about a series of questions regarding speed

21:01 twobitsprite: plus the lack of hotspot optimization

21:01 but basically yes

21:01 twobitsprite: ok... so, I should expect a longer-running java/clojure app to be much quicker?

21:02 ttimvisher: twobitsprite: oh yeah. once these things are jitted they fly

21:02 hence the clojure community's answer to scripting being clojurescript

21:02 because js startup time r4wks!

21:02 twobitsprite: right on

21:03 thanks for clearing that up, I was starting to get worried

21:03 ttimvisher: lol

21:03 my boss (an old ruby hat) complains almost every day about how much jvm startup time sucks. and our main dev language is clojure!

21:04 Urthwhyte: clearly not a rails dev then!

21:04 twobitsprite: I'm actually overcoming a lot of personal biases by even considering clojure, so I'm a bit jumpy at times :P

21:05 ttimvisher: twobitsprite: hah. sounds like there's a story in there. :)

21:05 AdmiralBumbleBee: bias?

21:05 Urthwhyte: half the dev time is spent loading the damn framework with Ruby, especially after 1.9.x changes

21:05 ttimvisher: Urthwhyte: yeah. don't think he's much of a fan of the 1.9 stuff

21:05 but almost all of our dev box tooling is written in ruby

21:05 twobitsprite: (as a sysadmin, it's a common experience for me to get a complaint that some server is running slow, only to find java as the top cpu and memory user on the system... in fact, I get surprised when it's not :P)

21:05 ttimvisher: and i must say it does scream compared to a jvm shell tool

21:05 twobitsprite: ((but that could very well be the crappy code the devs where I work write)

21:05 )

21:06 ttimvisher: twobitsprite: you're already picking up the parens!

21:06 just wait till you see paredit! :)

21:06 twobitsprite: I'm no stranger to lisp :)

21:06 Urthwhyte: pssh, paredit

21:06 vim is fine!

21:06 ttimvisher: long live vim!

21:06 twobitsprite: Urthwhyte: hear, hear! :)

21:07 bbloom: is there a function which is basically (nth n (iterate f x)) ?

21:07 Urthwhyte: I do wish I could get silmv working properly, vimclojure is kinda buggy

21:07 twobitsprite: Urthwhyte: I'm just getting started with it, trying to get the nrepl stuff working

21:07 tpope: I'm trying to solve the vimclojure problem once and for all

21:07 bbloom: i was hoping for (iterate n f x) overload

21:07 Urthwhyte: tpope: replacing ng?

21:08 tpope: yes

21:08 bbloom: tpope: i use a metricshitton of your plugins. thank you. if you do a clojure plugin i'd be extremely excited :-)

21:08 Urthwhyte: ++bbloom

21:08 tpope: I've got things talking to nrepl

21:08 twobitsprite: heh... in fact, nailgun is the problem I'm having... trying to get it to install, but lein just exits with "Wrong number of arguments to install task. Expected ()"

21:09 Urthwhyte: have you tried lein-tarsier?

21:09 ttimvisher: dynamic programming ftw!

21:09 tpope: give me 48 hours and I should have something out there

21:09 twobitsprite: Urthwhyte: no...?

21:09 tpope: a replacement for ng?

21:09 tpope: something far more specific to vim

21:10 twobitsprite: nice

21:10 Urthwhyte: twobitsprite: IIRC, all I had to was add {:user {:plugins [[lein-tarsier "0.9.3"]]}} to my lein profile and then build ng-client and move it into my path

21:10 tpope: I've settled for shelling out to ruby, since the jvm startup time is so slow :)

21:10 twobitsprite: I have no experience with ng other than that I can't get it to install, but it sounds as if it needs replacing. In that case, carry on, good sir! :)

21:11 tpope: limiting me to one server at a time is a pretty big dealbreaker

21:11 twobitsprite: Urthwhyte: forgive me, but how do I add that to my "lein profile"? I don't see anything in ~/.lein which appears to be a profile or configuration

21:12 tpope: twobitsprite: add verbatim to ~/.lein/profiles.clj

21:12 ttimvisher: twobitsprite: touch ~/.lein/profiles.clj

21:12 Urthwhyte: twobitsprite: just do an echo "#{thing}">> ~/.lein/profile.clj

21:12 ttimvisher: lol

21:12 twobitsprite: ahh, nice

21:12 ttimvisher: is it plural though, fyi

21:12 it is*

21:12 Urthwhyte: woops, my mistake

21:13 the two top things I hate about how ng currently works is: unable to start up a vim session anywhere and open a repl and b) only one server at a time

21:14 tpope: yep those were my biggest problems

21:14 connecting to lein repl solves problem b

21:14 * ttimvisher *cough* slime *cough*

21:15 * brehaut *cough* nrepl *cough*

21:15 Urthwhyte: I couldn't find an easy solution to a outside of creating a scratchpad project somewhere and creating a vim-clj alias

21:16 tpope: okay well spitball with me for a bit

21:16 how can I start a repl from inside Vim, get back whatever port it's bound to, and fork it into the background?

21:17 Urthwhyte: couldn't you wrap it in a script whose return value is the port?

21:17 tpope: what kind of script?

21:17 twobitsprite: or write to a file... not unlike writing out a .pid file for processes

21:17 Urthwhyte: I'm the guy who just found out about :%w ! let's you pipe stuff last week

21:17 bbloom: why return the port, rather than pass the port in as an argument?

21:17 Urthwhyte: my vimscript knowledge is 0

21:18 tpope: bbloom: just so I can get an available one automatically

21:18 twobitsprite: my vimscript is a bit rusty

21:18 Urthwhyte: bbloom: Because you can have multiple ports open

21:18 really you could do port pooling, couldn't you?

21:18 tpope: the problem is that java can't fork, no?

21:18 Urthwhyte: and just have an allocator daemon that keeps track

21:18 that might be simpler

21:19 twobitsprite: I don't know, but I do know scripts can fork

21:19 tpope: yeah but then if the java part picks the port, the script doesn't know it

21:19 Urthwhyte: Have the java part touch a .pid then?

21:20 bbloom: is this any-old repl, or is this a lein repl?

21:20 seems like you could ask lein what it's config is

21:20 tpope: I was starting with lein repl

21:20 lein picks a port dynamically, by default

21:20 bbloom: heh, odd

21:21 i've been using tmux pastebuffer for my eval needs in vim

21:21 tpope: which is beautiful, except for the whole finding out what it is when it's in the background part

21:21 bbloom: it's hacky as hell, but it works :-P

21:21 Urthwhyte: that sounds worse than my python setup haha

21:22 bbloom: tpope: you can force lein to use a port with LEIN_REPL_PORT

21:22 ttimvisher: can nrepl provide me with a repl at a breakpoint? i.e. make swank.core/break actually work?

21:22 bbloom: sucks that you'd have to replicate the detection, but might unblock your other work on this

21:23 TimMc: Is there a unixy utility to reserve a port?

21:23 tpope: bbloom: that may be useful, actually

21:23 bbloom: https://github.com/technomancy/leiningen/blob/master/src/leiningen/repl.clj

21:23 tpope: one other thing to consider: multiple repls per vim session

21:24 i very frequently have a clojure AND clojurescript repl open at once

21:24 tpope: TimMc: I don't know of a utility for it. what I've done before is opened and immediately closed a dynamic port in ruby. the os will mark it reserved for a while

21:24 bbloom: at as nrepl evolves, i expect to have one clojurescript repl per browser :-P

21:24 tpope: bbloom: yeah I definitely intend on that

21:24 bbloom: my hero.

21:24 tpope: I have it picking up target/repl-port automatically if it's running

21:26 I don't know the first thing about clojurescript

21:26 same basic story? can I spin up nrepl?

21:27 bbloom: currently, clojurescript's repl is just a function inside a clojure repl

21:27 tpope: that sounds ... convenient

21:27 bbloom: lein lets you specify code to evaluate on repl startup

21:28 you just initialize and run the cljs repl from there

21:28 there are also several backing repl implementations

21:28 one for browsers, one for rhino (ie on the jvm)

21:28 and i believe a few folks have various hacked up node.js ones too

21:28 but those probably have a different bootstrapping process

21:28 tpope: well I will revisit this after I have the basics working

21:29 bbloom: yeah, unfortunately, i think it would require an nrepl plugin

21:29 my hacked up solution works b/c it's just pasting text into a terminal

21:29 i slap on a rlwrap and everything seems to work

21:31 when you want to revisit it, i'd be happy to help make any changes to clojurescript to get it all working :-)

21:34 tpope: bbloom: sweet

22:07 twobitsprite: man, getting this nailgun server running is trickuy

22:07 s/uy/y

22:07 then again, I never really understood java's classpath magic...

22:17 muhoo: no magic, it's just paths, with zipfiled masquerading as paths inside

22:21 Urthwhyte: Can anyone suggest a good blogpost on the zipper data structure written from a lisp-y perspective?

22:22 bbloom: Urthwhyte: the zipper source is pretty small and approachable. why don't you try reading through it?

22:22 trptcolin: http://www.exampler.com/blog/2010/09/01/editing-trees-in-clojure-with-clojurezip/ and http://tech.puredanger.com/2010/10/22/zippers-with-records-in-clojure/

22:22 bbloom: https://github.com/clojure/clojure/blob/master/src/clj/clojure/zip.clj

22:23 Urthwhyte: I uh

22:23 was planning on reimplementing it myself

22:23 so was trying to avoid that

22:23 bbloom: ah, heh, fair enough

22:23 Urthwhyte: I read Huet's original paper but was a little confused

22:24 bbloom: well at the bottom of the source is a big (comment ...) block

22:24 maybe load up the zippers code and then play around with some of those expressions

22:24 to get a feel for how it works

22:29 Urthwhyte: Will do, thanks :)

22:40 twobitsprite: ok, I got a nailgun server running... but for some reason the <Leader>sr command isn't working...

22:40 the bundle/vimclojure-2.3.6 is in my loadpath

22:42 Urthwhyte: what does :nomap reveal?

22:42 nmap*

22:43 twobitsprite: they're all <Plug> instead of <LocalLeader>... maybe I'm reading an old howto?

22:44 Urthwhyte: do you have LocalLeader mapped in your vimrc?

22:47 twobitsprite: ohh, I see why I'm confused... the tutorial I'm reading has <Leader> mappings, but vimclojuser users <LocalLeader>.... I was confused because the mappings I set from the tutorial are working but not the vimclojure mappings :P

22:48 Urthwhyte: hmm

22:48 I use a different key than localleader for plugins

22:48 I have , set for my own bindings, and \ for plugins

22:48 http://dl.dropbox.com/u/9061771/Screenshots/8vwg.png

22:48 argh

22:49 https://gist.github.com/92b859b7bdcef85777a9

22:53 twobitsprite: if I don't have either set in my vimrc, the <Leader> mappings work, but the <LocalLeader> stuff speficiet in vimclojure don't

22:54 if I set mapleader, it still doesn't work, just changes the <Leader> stuff the tutorial has me set

22:54 if I set maplocalleader, still nothing

22:54 Urthwhyte: hmm

22:54 very curious - I would try over in #vim

22:55 twobitsprite: https://gist.github.com/4036676

22:56 yeah, I'll ask them

23:05 so, it looks like vimclojure isn't setting it's mappings... do I have to manually set up mapping for all those <Plug>etc commands, or is it supposed to set up mappings?

23:14 doh... it helps if the ftplugin is loaded by actually opening a file of the right type :P

23:29 Urthwhyte: ahhh

23:29 haha

23:30 Yea you have to set either filetype= or open a clj(js)? file

23:54 twobitsprite: woot... I have a functioning clojure dev environment :) Now to put it to good use :)

23:58 Urthwhyte: \o/

Logging service provided by n01se.net