#clojure log - Dec 12 2012

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

0:04 ambrosebs: Curious, does anyone use https://github.com/frenchy64/analyze in their projects?

0:07 Sgeo|web: I tried naively hooking it into clojail but that didn't work. Now trying mexpand-all although that's imperfect too :/

0:07 Fewer errors though

0:07 using analyze seems to sometimes turn + into .. some Java interop call. Wonder if that sort of thing is part of it

0:07 I didn't look that closely

0:07 ambrosebs: I didn't seriously think people would use it.

0:08 It's just a little hack on top of the analyser

0:08 Sgeo|web: I'm not really much of a person who should be looked at as an example of someone with typical usage patterns

0:08 ambrosebs: Sgeo|web: + inlines

0:08 Sgeo|web: I wonder if analyze can be used to make delimc actually work properly

0:09 ambrosebs: Sgeo|web: What's wrong with it?

0:09 dr1: I'm running a repl and popping up a GUI by running (project.core/-main)… which works great. However, when I modify any code and reload the project with (use 'project.core :reload-all) and show the GUI again, it keeps the original state. Is there a way to reset it or do I pretty much need to close the repl?

0:10 Sgeo|web: Well, partly that it looks for raw symbols, so if you just require it, instead of using all symbols, and proceed to, for example, use shift as though it's part of a namespace rather than a magic symbol, it breaks

0:10 But I suspect there may be other issues too

0:11 Being able to easily distinguish between special forms and function calls, and not have to worry about macroexpansion... oh, hmm.

0:11 Not sure how that would actually work then.... oh, just look for the function call to shift, I guess

0:11 ambrosebs: Sgeo|web: analyze cannot be customised.

0:12 Sgeo|web: Well, shift is a macro, but easy to imagine it as a function that takes a lambda, I think

0:12 devn: ambrosebs: ive been looking at analyze, but im not sure if it can help me. i haven't spent enough time to figure it out.

0:12 Sgeo|web: ...takes a lambda. I'm tired. *takes a function

0:12 devn: ambrosebs: id like some of the functionality of analyze to extend codeq's schema

0:12 Sgeo|web: ambrosebs: I don't think I need it to be customized

0:12 devn: so you could query for sub-expressions, or find codeqs which include a call to clojure.core/map

0:12 Sgeo|web: For this potential usage

0:13 devn: and possibly extract that inner expression

0:13 ambrosebs: devn: and you always want fully mexpanded forms?

0:14 Sgeo|web: ambrosebs: I think a useful addition might be a thing to search for every function call, or perhaps a way to see and modify every function call, leaving the structure intact

0:14 devn: ambrosebs: heh, again, not real sure. analyze seems to provide a lot more granularity for things i could query about codeqs, but maybe i have that wrong?

0:14 Sgeo|web: Although that doesn't seem general enough, something ... more general than what I asked for

0:14 Because I can imagine that as a use case

0:14 but seems like it might be difficult to write by hand currently

0:15 devn: ambrosebs: some things seem like they just wouldn't be open to analysis, since it needs to basically just operate on text. I suppose you could read-string and then use analyze on that? again, im not real sure.

0:16 arohner: in lein2, how do you disable AOT?

0:16 ambrosebs: `analyze` just throws a form at the CLJ analyser and then works on the output. You're stuck with all the inlining & other optimisations.

0:17 Sgeo|web: I wonder if a macroexpander that's based on studying what forms each special form passes to the analyzer and macroexpanding that might be useful?

0:18 Rather than using the analyzer directly, more like a port of some parts of it?

0:19 ambrosebs: Of course this exactly the question `analyze` is supposed to evoke. The answer is usually CinC.

0:20 bbloom: ambrosebs: i want to make the analyzer more useful

0:20 the cljs one that is

0:20 i'm working on some improvements, but i'm not sure how to get them pushed through other than to pester dnolen

0:20 ambrosebs: bbloom: Cool, what are you working on?

0:21 bbloom: i was working on the CPS transform

0:21 but i've been pounding my head on the wall repeatedly on the same few issues

0:21 ambrosebs: some notes here http://dev.clojure.org/display/design/Formalize+AST

0:22 a few things missing from there too

0:22 ambrosebs: Awesome!!

0:22 Very exciting.

0:22 bbloom: your feedback would be appreciated

0:23 ambrosebs: When we say "formalising AST", are we thinking about Clojure JVM also?

0:23 as in, potential issues/conflicts?

0:23 bbloom: ambrosebs: maybe?

0:24 we need a spec or something for the AST

0:24 ambrosebs: One problem I usually think about: having "implementation-only" AST nodes, like `instanceof`

0:24 bbloom: even better if it's a schema that is an executable validator

0:25 ambrosebs: cljs already has js* which is an implementation detail

0:25 what else do you think about those types of nodes?

0:27 ambrosebs: How do we handle them in such a schema..?

0:28 :)

0:28 bbloom: heh.

0:28 i want to break the analyzer up into passes

0:29 so you could have a different schema for a particular backend

0:32 ambrosebs: do you mean, one pass for standard Clojure nodes, then another for others?

0:32 bbloom: yes, but also lots more simpler passes

0:33 right now there is analyze and emit

0:33 i'd like to break analyze up quite a bit

0:33 it already does a lot of things: parse, built up an environment, infer type tags, etc

0:33 ambrosebs: ah got it.

0:33 bbloom: macro expansion

0:33 etc

0:34 it's getting harder and harder to maintain

0:34 and it's preventing us from adding new and more sophisticated optimizations

0:34 ambrosebs: so I'd be easier to reuse parts for different impls?

0:35 bbloom: yes

0:35 and so we can ultimately get self hosting

0:40 ambrosebs: bbloom: how much work do you expect that to be?

0:40 sorry, I meant cutting up the analyser

0:40 Is it mainly design effort?

0:40 bbloom: i think it's relatively straightforward

0:40 i've already done a lot of these changes before in bits and pieces

0:40 but yeah, design buyoff is necessary

0:41 also, the more we focus on this, the easier it gets :-P

0:42 ambrosebs: what kind of feedback do you want on this design page? It needs the usual Problem statement/tradeoffs/solution.

0:42 We need to dress it up so people can't ignore it.

0:43 bbloom: ambrosebs: i'm bad at that :-P you wanna take a crack at making it a bit prettier?

0:43 ambrosebs: ambrosebs: I'll try...

0:44 :)

0:44 devn: ambrosebs: do you think there would be any use in extending codeq's schema to include some of the information analyze brings to the table?

0:45 ambrosebs: devn: are inlining & other optimisations too much information?

0:45 devn: yeah, i think they might be?

0:45 ambrosebs: then no.

0:45 devn: btw ambrosebs -- i keep referring to you as ambrose bierce in conversation

0:46 ambrosebs: well, i guess i take that back. i mean, there doesn't seem to be any harm in capturing that information...

0:47 ambrosebs: could you clarify what you mean by "other optimizations" -- does analyze show you optimizations that are happening under the clojure hood?

0:49 ambrosebs: devn: lol sounds better than BS

0:49 I am full of it apparently.

0:49 devn: ha!

0:50 ambrosebs: devn: analyze shows every little detail. eg. calls to instance? are converted to a special instanceof AST node.

0:50 devn: ambrosebs: idk man -- im just thinking out loud here. i think it would be cool, in addition to querying for the history of "clojure.core/map"

0:51 if you could query for all of the fns in 100 clojure repos, which contain :method-name "add", for instance

0:51 ambrosebs: sure, that sounds useful at some level.

0:51 devn: ambrosebs: id like to build a Hoogle for clojure

0:52 ive been playing with this idea since like 2008

0:52 ambrosebs: devn: please please please do

0:52 devn: ambrosebs: i think the stars are just starting to align

0:52 with your work, codeq, datomic

0:53 bbloom: devn: hoogle is super cool

0:53 ambrosebs: I am prepared to do whatever you need to help you to this end.

0:53 :)

0:53 devn: ambrosebs: how would that work? you don't eval forms in analyze, right? could analyze operate on "(defn foo [x] (+ 1 x))"?

0:53 or would I need to read-string all over the place?

0:54 * Sgeo just realized how much Factor reminds him of -> and visa versa

0:54 Sgeo: Wondering if I could make a little factor-like DSL for Clojure

0:54 bbloom: Sgeo: you can :-) i have one

0:54 Sgeo: bbloom: awesome

0:54 bbloom: didn't publish it yet

0:54 but actually, it's not really a DSL

0:55 well, i dunno what to call it

0:55 ambrosebs: devn: You can just feed it through `analyze-form.

0:55 bbloom: it's an interpreter

0:55 not like some fancy macro for normal clojure functions

0:55 ambrosebs: I'm not 100% about the side effects of doing that.

0:55 I think the var will be declared.

0:55 Sgeo: I'd say something like Factor showing how everything could live in a ->, but syntax words sort of break that

0:56 devn: ambrosebs: bbloom: I'm going to hold you to your statements. We have all of this code out there in gists, pastebins, and in repos. Imagine if there was a service where you could search hoogle-style, or an "idiom finder", where based on analyzing 100+ clojure repos and gists, you could say: "show me the most common use of letfn"

0:56 bbloom: Sgeo: yeah, the interesting bit is that side effects read left to right

0:56 Sgeo: I .. think I kind of prefer Clojure macros over Factor syntax words, but not sure

0:56 Raynes: Factor is nice.

0:56 But the community basically does everything in its power to keep people from using it.

0:56 devn: ambrosebs: can we have a hoogle without static types everywhere?

0:56 Sgeo: The thing that annoys me about reading Factor code though is if.

0:57 Raynes: They never release anything, no beginner documentation.

0:57 devn: Raynes: kind of like Io. Io was so cool, but they don't even have releases.

0:57 bbloom: Raynes: agreed. #concatenative is moderated :-/

0:57 wanted to ask a simple question

0:57 Sgeo: And basically anything with quotations. Need to remember to keep reading to find out what, exactly, happens to the piece of code I just read

0:57 Raynes: devn: Yeah, Io is a good example of how to ruin a perfectly good language.

0:57 devn: ambrosebs: what would hoogle without static types look like? Could analyze get us 80% there?

0:57 bbloom: Raynes: i found that the main guy's researchy paper thing is actually a great tutorial

0:58 Raynes: Sgeo: I like fries.

0:58 devn: researchy papers!

0:58 Sgeo: Is the convenient call/cc convenient to implement in Factor because of its concatenativeness?

0:58 Or is it not actually that convenient, and there's VM support or something?

0:59 devn: ambrosebs: one thing that seems like it would be wrong is using (ast) within the codeq namespace when importing a git repo

0:59 you'd get :ns {:name codeq.core} or something instead of the ns it actually resides in

1:00 but i suppose there may be a clever way to make that work

1:00 the codeq schema scares me

1:01 ambrosebs: devn: `ast` is slightly dumb, but easy to use.

1:01 All the building blocks should be exposed.

1:02 devn: hoogle - static types = I don't know, but curious :P

1:02 perhaps we don't want hoogle at all?

1:02 devn: yeah it seems to expose everything. it's more like the paradox of choice form my current point of view

1:02 ambrosebs: yeah, i dont think we do, but I think we could get close-ish

1:03 i want to go to a website and say: "show me function bodies where the input is a string, and it returns a sequence of characters" or something like that...maybe

1:03 ambrosebs: devn: maybe look at `analyze-form-in-ns`

1:03 devn: ambrosebs: mm! thank you.

1:04 ambrosebs: devn: But I'm not sure if it actually works!

1:04 devn: ambrosebs: btw, you probably don't hear this enough. your work is really great and inspiring.

1:04 thanks for all the work you do

1:04 same to you bbloom

1:04 Sgeo: ...I feel like such a hypocrite

1:04 devn: and Raynes

1:04 hugs all around.

1:04 ambrosebs: devn: thanks!

1:05 hugs!

1:05 bbloom: now if only i can find somebody to pay me to do this all the time :-P

1:05 devn: Sgeo: why's that?

1:05 Raynes: Naw, man. All ambrosebs does is shit rainbows.

1:05 devn: bbloom: all in good time, my friend.

1:05 Sgeo: Totally reject all Schemes because the Scheme community is so fragmented that there's not much of a community around any of them -- start being interested in a language with even less of a community

1:05 Raynes: Ain't that right, ambrosebs?

1:06 devn: bbloom: i advocated for clojure where i work for a couple of years, and now i have way too much clojure work.

1:06 be careful what you wish for :)

1:06 ambrosebs: ambrose: BS rainbows

1:06 lol, talking to myself

1:06 Raynes, rather ^

1:06 devn: rambose

1:06 like Rambo

1:07 ambrosebs: haha

1:07 devn: since you're an aussie: http://scm-l3.technorati.com/10/04/30/12345/rambo.jpg

1:07 just in case you aren't familiar

1:07 framboise when you're in france

1:09 ambrosebs: I like Ambroise

1:09 my french relatives call me that, "ambruzz"

1:10 devn: damnbros

1:10 when you're in New Jersey

1:17 ambrosebs: if there was someone interested in a screencast of me diagnosing and stamping out a bug in Typed Clojure related to inference of monadic code (higher-kinded), I suspect they're in this room.

1:17 I might just do that today.

1:19 devn: please do!

1:21 ambrosebs: I'm also taking requests. If unsure, "more" is sufficient.

1:30 brainproxy: attempting to define/describe web forms in a datomic schema, idea being to centralize all the various info that drives how forms are rendered and processed

1:30 anyone worked on something similar?

1:46 bbloom: dammit javascript, your semantics suck.

2:00 devn: brainproxy: i doubt it

2:02 ambrosebs: devn: I think Clojure Contributors thinks ur usename is `defn`.

2:11 Apage43: command line arg parsing, anything recently maintained?

2:20 bbloom: ambrosebs: i posted to clojure-dev regarding my first two proposed breaking changes to the cljs AST. you're feedback is wanted on that thread :-)

2:22 ambrosebs: bbloom: Reading. I may not get around to changing the dev page today.

2:22 bbloom: ambrosebs: no rush/obligation

2:23 dnolen is just a busy guy and no one else with commit bit seems to really care...

2:24 ambrosebs: :loop seems like a good idea.

2:25 I'm always giving :is-loop (well, the equivalent to my Clojure library) a special case.

2:25 bbloom: ambrosebs: what's your github?

2:26 ambrosebs: frenchy64

2:26 * bbloom follows

2:26 ambrosebs: my analyze library is a great way to get an idea of how Clojure's analyser works

2:27 Well, what it returns.

2:27 bbloom: ambrosebs: yup

2:27 i've seen it before, but hadn't looked at it recently

2:27 looking now

2:27 ambrosebs: :is-loop seems to be an artefact from Clojure?

2:27 bbloom: ambrosebs: yeah, as best i can tell it's an implementation detail leaking

2:29 ambrosebs: Clojure also has a bunch of interop nodes. CLJS just has js*?

2:30 bbloom: ambrosebs: for the mostpart

2:30 symbols can also have the js/ namespace

2:31 other differences: catch vs catch*

2:31 or rather try vs try*

2:31 b/c (catch e …) vs (catch Exception e ...)

2:33 ambrosebs: catch syntax is different in CLJS?

2:35 bbloom: ambrosebs: no, it's the same, but javascript doesn't provide catching by type, so it's simulated

2:35 (try (catch Exception e …)) is expanded to (try* (catch e (cond …)))

2:35 here's the full list of nodes: :no-op :var :meta :map :vector :set :constant :if :throw :def :fn :do :try* :let :loop :recur :letfn :invoke :new :set! :ns :deftype* :defrecord* :dot :js

2:36 assuming my :loop

2:37 ambrosebs: Ah, and there's no :defrecord* in CLJ.

2:38 and CLJ has :the-var

2:39 bbloom: the defrecord is because it's annoying to emit a bunch of javascript comments to document the record fields to make gclosure output fast constructors/types

2:39 ambrosebs: cljs doesn't have :the-var because there are no reified vars

2:39 ambrosebs: ok

2:39 bbloom: something else i want :-P

2:40 ambrosebs: oh, is that possibly on the cards?

2:40 bbloom: who knows

2:40 i've been pushing for that one since i started playing with cljs

2:41 anyway, your feedback is welcome on the mailing list so that maybe these changes can actually get made if somebody who cares sees :-P

2:42 im gonna run for now, take care

2:43 ambrosebs: bbloom: see you

5:14 tgoossens: damnit :p I proposed - in my working group at univ. - that instead of java i'll write my parts of the software in clojure, it compiles to java so they can use it

5:14 They refused (obviously :p)

5:14 rasputnik: tgoossens: you are making your professor feel inadequate

5:15 tgoossens: rasputnik: haha, no only my classmates, the professor doesn't botter about the code

5:15 our project just needs to work

5:15 *bother

5:16 devn: tgoossens: just do it anyway

5:16 rasputnik: easier to ask forgiveness than get permission

5:16 tgoossens: devn: they will pick on me for doing that

5:16 lol

5:16 devn: there is a lifetime of other people cramming their garbage programming language choices down your throat

5:17 there's no better time to say no than right now

5:17 tgoossens: because then they cannot read my code anymore

5:17 (or so they think)

5:17 devn: help them

5:17 tgoossens: devn: if they are not open-minded for such things, then the only thing they will do is

5:17 be mad at me

5:18 devn: tgoossens: do both maybe

5:18 show them how much nicer it is

5:18 tgoossens: devn: hmm interesting

5:18 devn: show them "before" and "after"

5:18 tgoossens: mmyes

5:18 ivaraasen: kill bad code before bad code kills you

5:18 devn: they may still not agree to use it

5:19 but you may get them on your side if you show them it is easier to read and manage

5:19 tgoossens: but in order for my code to interopt with theirs, they need "classes"

5:20 no experience with that. Can't i just use protocols?

5:20 i believe they compiled to actual classes

5:21 fredyr: interface even

5:21 tgoossens: even better

5:21 so this means

5:22 i can actually write my code entirely in clojure. And in principle (if they wouldn't ask for the source code) they would not know it was written in clojure?

5:22 fredyr: yes

5:22 tgoossens: that sir

5:22 it frickin' genius

5:22 fredyr: that's pretty much how the java api for datomic works

5:23 vijaykiran: tgoossens: you might be interested in http://skillsmatter.com/podcast/scala/impromptu-rich-hickey-lightning-talk

5:23 borkdude: tgoossens sometimes it's better to ask for forgiveness than permission in clojure/java world ;)

5:23 ivan: they might notice the clojure.lang.RT

5:23 tgoossens: ivan: yeah. But thats just "a library" then he

5:23 borkdude: vijaykiran anything interesting tonight at amsclj that you know of?

5:23 vijaykiran: borkdude: Free conj T-shirts!!!!!! :)

5:24 borkdude: vijaykiran how many… will there be a fight over the 3 t-shirts? ;)

5:24 tgoossens: borkdude: perhaps. yes

5:24 vijaykiran: borkdude: pretty much - the number isn't revealed in the thingie btw. So there will be blood.

5:25 borkdude: tgoossens or just write it in both languages, as an exercise and you accidentally swap in clojure instead of java, while having it stand by to correct quickly if needed ;)

5:25 tgoossens: yeah

5:25 the project takes a lot of time and in the mean time i want to practice clojure

5:25 could be nice combination

5:26 borkdude: tgoossens "look, I reduced that Java code to a single line of clojure: …..))))})}))}])

5:27 tgoossens: lol

5:27 for the record

5:27 vijaykiran: borkdude: btw, are you the same guy who sent the clojure project for students thingie ?

5:27 borkdude: vijaykiran yes, that's me

5:27 tgoossens: its a project with the java leJos library for lego nxt

5:27 borktude: please help me to have a project on clojure at my univ then! :p

5:27 borkdude: tgoossens ah cool, we're also using that in our education (I have no experience with it, but saw that a clojure version of it exists?)

5:28 vijaykiran: borkdude: did you find anything ?

5:28 tgoossens: EVERYTHING here is in java

5:28 really everything

5:28 i'm sick o fit

5:28 borkdude: vijaykiran yes, already three companies are willing to co-operate

5:29 vijaykiran: borkdude: awesome, I'll watch your blog then :)

5:29 borkdude: vijaykiran we need only one though, unless we make some kind of tool that is more generally applicable

5:30 tgoossens: its really hell here

5:30 vijaykiran: tgoossens: c'mon java isn't that bad :)

5:30 tgoossens: no java is not that bad

5:30 but the point is

5:31 everything here

5:31 is based on java

5:31 courses, projects

5:31 borkdude: tgoossens it's the same here, that's the reason I started using clojure, so I can still relate to the Java-world

5:32 tgoossens I bet your lecturers wouldn't mind making assignments in an extra language, just for fun and profit

5:32 tgoossens: mmm

5:33 thats exactly what i'm doing

5:33 for a course OOP we had to create a fairly complex piece of software

5:33 i'm now rethinking it in clojure and next semester i'm going to try to get an opinion of the prof.

5:33 rasputnik: tgoossens: if i were you, I'd focus on the JVM as much as you can rather than the Java language. that's not going anywhere. and if you want to be a good java dev, just grab the clojure source from github and walk through it sometime

5:35 tgoossens: rasputnik: i'll keep that in mind. What do you mean with "on the jvm"

5:35 do you mean jvm languages?

5:36 rasputnik: tgoossens: no, the mechanics of things like Hotspot, JMX, the generational GC bits - the platform for all JVM languages. rather than doing extra credits on language features like generics or suchlike

5:40 fredyr: i agree, this is good advice

5:40 esp reading the clojure source imo

5:40 tgoossens: thanks

5:40 ivaraasen: the Clojure source is great

5:40 I believe there's a PDF explaining most of it

5:41 vijaykiran: http://daly.axiom-developer.org/clojure.pdf

5:41 warning looong PDF ^^

5:41 ivaraasen: vijaykiran: that's the one. really cool stuff

5:45 muhoo: omg, i'm using lein-pedantic, and it's giving me a huge list of conflicts, telling me to put the :exclusions in my project.clj, but i already have those exclusions in there!

5:46 everything it's telling me to do, i've already done. is there some weird local state it's saving?

5:47 borkdude: rasputnik what book do you recommend on the jvm internal things

5:49 ambrosebs: how can I pprint while preserving defrecord tags

5:53 rasputnik: borkdude: there really aren't very many, annoyingly. i've got the "Java Performance" one from sun/oracle press, it's ok.

5:53 tbh i'm a systems engineer, not a developer. 99% of all java books are no use to me, but a good tuning guide is worth it's weight in gold

5:53 * Sgeo vaguely wonders what something like core.logic would look like on Factor

5:53 rasputnik: vijaykiran: nice looking pdf, thanks.

5:53 vijaykiran: borkdude: "Programming for the Java Virtual Machine" is dated, but interesting.

5:53 and there's always spec :)

5:54 muhoo: oh, nm, i see, it keeps adding more items to the vector of exclusions

5:54 it's not throwing the same error over and over, it's throwing a more complex version of the same error each time :-). think i got it

5:55 any clojure app that uses anything that uses httpclient is in deep, deep dependency hell

5:57 vijaykiran: rasputnik: yw!

6:01 deg: Does Clojure have a built-in function to find positions of a vector in another vector? E.g, (f [:a :b :c :d :e :b :c :d] [:b :c]) => (1 5)?

6:02 If not, how inefficient would it be to position of partition of the vector?

6:02 fredyr: i've been looking at core.logic lately, but i feel like i'm not having a good sense of what restrictions there are to mixing in ordinary clojure constructs inside

6:03 any pointers on that

6:04 ambrosebs: fredyr: see `project`

6:04 Once you start using non-relational goals like project, you lose the ability to run backwards.

6:05 fredyr: ah, i have read something about that briefly

6:05 i'll take a closer look, thanks

6:05 ambrosebs: np

6:05 Raynes: cemerick: Yikes. I just came about an inch from buying your book when I realized that Julie gave me a copy when it was finished that I have in an email attachment somewhere.

6:06 I almost gave you money, man. Close call.

6:06 cemerick: Raynes: 'lo, and here I was so close to avoiding debtor's prison. Glad you could save the $20, though.

6:06 :-P

6:10 Raynes: Do you actually have the final PDF, or the final "prepress" PDF? (The latter doesn't have the bird on page 1, and no index, for all the good it'll do you.)

6:10 Raynes: cemerick: Good question. I'll look up the email.

6:15 muhoo: Raynes: wow, isn't it like 6am where you are?

6:15 Raynes: muhoo: It is 5AM.

6:15 And no, I haven't slept.

6:15 muhoo: still hard core

6:16 well i made it through dependency hell. app i wrote in april, under continuous use, has not bitrotted since then. yay clojure.

6:17 plus i was able to look at it after not looking at it for almost 6 months, and quickly figured out how the hell it works. again, yay clojure.

6:18 Raynes: cemerick: I can't actually find the email now. :\

6:19 muhoo: though, i sure should refactor it https://www.refheap.com/paste/7529 :-/

6:20 borkdude: so what will be the clojure book of 2013?

6:20 Raynes: borkdude: Whatever that ClojureScript book is, probably.

6:20 cemerick: Raynes: http://images2.wikia.nocookie.net/__cb20100702150415/simpsons/images/6/6a/Mr_Burns_evil.gif

6:20 Raynes: Everyone is cookoo for cocopuffs.

6:20 cemerick: :p

6:21 clgv: borkdude: suggestion "Clojure 1.5 in a nutshell" ;)

6:21 cemerick: borkdude: people keep asking about when a second edition is going to happen. I actually don't think there's enough new stuff to warrant one.

6:21 JoC 2nd ed will be a very big deal

6:21 borkdude: cemerick The Joy is being revised on clojure 1.5

6:22 cemerick: Right; but, 1st ed there was based on 1.2 (with 1.1 notes, IIRC?)

6:22 Raynes: cemerick: If you ever need help with a second edition, let me know and I'll ignore you.

6:22 I mean, help you.

6:22 I'll totally help you.

6:22 cemerick: Dude, that PDF is sooo going to get lost in the mail.

6:23 borkdude: The Rich Hickey diaries: how many hammocks does it take to create a following

6:24 cemerick: Reducers and tagged literals are the biggest changes that aren't covered in @ClojureBook. (Any others of import?)

6:24 That's not much to prompt a 2nd ed.

6:24 borkdude: cemerick maybe a batteries included book on clojure web dev: compojure, authentication, clojurescript, nice full examples, pitfalls, etc?

6:25 cemerick: maybe

6:25 Raynes: I'm not sure how I feel about books like that.

6:25 Things change so fast.

6:25 cemerick: I won't be writing it though :-P

6:25 Raynes: Like, I did that talk at the conj and then basically rewrote Clojail.

6:26 borkdude: Raynes yes.. maybe in a few years, Enterprise Clojure web dev ;)

6:26 cemerick: I have an idea for another Clojure book, but am in no hurry about it.

6:26 clgv: Raynes: you just wanted to create material for the next talk *jokingly* ;)

6:26 Raynes: clgv: Hah. It probably would be worth another talk now. It has some cool serializable function stuff in it now.

6:27 ivaraasen: deg: would something like this be of use? https://www.refheap.com/paste/76fa8ae0b4e3666d2ed019af9

6:27 clgv: Raynes: are the 4clojure performance issues history yet?

6:27 Raynes: clgv: That's what the serializable functions were for. It's much faster now.

6:27 clgv: Raynes: and already in use on 4clojure?

6:28 Raynes: Well, it has been that way for several months.

6:28 So yes.

6:28 clgv: great. need to resubmit my solutions that had strange timeout behavior :D

6:29 Raynes: Yeah, they will probably work now.

6:52 clgv: Can I add criterium as dependency in ~/.lein/profiles by adding it as dependency to the :user profile? I tried but it does not get download on lein repl

6:52 penthief: What is the meaning of the convention for suffixing variable names with an asterisk? map* ch* run*.....

6:54 Raynes: penthief: Usually means "This does something similar but somewhat different than the thing without the asterisk". Some people also use it to mean "This is an internal function used by the function without the asterisk."

6:54 I just avoid ever using it at all.

6:54 penthief: thanks

6:55 Raynes: penthief: One example in Clojure itself that uses the former interpretation is list vs list*

6:55 &(list 1 2 3 4)

6:55 lazybot: ⇒ (1 2 3 4)

6:55 Raynes: &(list* 1 2 '(3 4))

6:55 lazybot: ⇒ (1 2 3 4)

6:57 Sgeo: Is it normal to find Factor insanely difficult to read?

6:57 It's not J, but it's still a bit annoying

6:58 Raynes: Sgeo: Yes.

6:58 It takes a long time for it to make sense.

6:58 Sgeo: Is the project still active?

6:58 Will there ever be distribution of libraries outside the project itself?

6:59 Raynes: Sgeo: It isn't that active, and Slava doesn't work on it anymore.

6:59 Sgeo: :/

7:02 o.O at the claims about Lisp http://www.reddit.com/r/programming/comments/9pudj/a_survey_of_domainspecific_languages_in_factor/

7:03 Raynes: Sgeo: http://rosettacode.org/wiki/Bulls_and_cows#Factor This is the most code I've written in factor.

7:03 Sgeo: More than I've written

7:04 Raynes: Sgeo: I'm looking at it right now, nearly 3 years later, and I couldn't tell you what this did if there were instructions with it.

7:04 borkdude: ,(doc list*)

7:04 clojurebot: "([args] [a args] [a b args] [a b c args] [a b c d & ...]); Creates a new list containing the items prepended to the rest, the last of which will be treated as a sequence."

7:04 Sgeo: inc-bulls and inc-cows should use change-bulls and change-cows

7:04 I think

7:05 deg: ivaraasen: tjx

7:05 whoops, thx

7:06 Raynes: Sgeo: I don't think that existed when I wrote this.

7:07 Sgeo: : inc-bulls ( score -- score ) [ 1 + ] change-bulls

7:07 Raynes: ah

7:07 oh, forgot ;

7:12 I wonder how one could go about sandboxing Factor

7:13 Threads are co-operative. Maybe allow the user only a dictionary with words prepared such that yield will be forced

7:15 cemerick: Raynes: factor isn't active any more?

7:15 p_l: Sgeo: or do an in-process version of how Android sandboxing works

7:16 Sgeo: p_l: I have no idea how Android sandboxing works

7:16 p_l: Sgeo: it load stuff into common "Zygote" process and then fork()s into processes running with different permissions

7:17 a bit work and you can mmap() common data

7:17 cemerick: Last dev drop was yesterday, and the git repo is hopping.

7:18 alfborge: Is clojars.org down?

7:21 Raynes: cemerick: It isn't entirely non-active, but it isn't nearly as active as it was when Slava was around. But releases have always been a problem.

7:22 cemerick: What is he doing, if not Factor?

7:22 Raynes: Active or not, if they're not going to do releases and beginner documentation...

7:22 Sgeo: There was one release after Slava left, I think

7:22 cemerick: I missed the "Slava quits Factor" announcement, whenever that happened

7:25 Sgeo: There's an xkcd vocabulary included with Factor

7:25 I just want to know why there's an XKCD: parsing word

7:26 alfborge: Nope, seems clojars.org is up but that I can't reach it :(

7:26 Raynes: cemerick: Last Slava commit was a year ago.

7:27 Sgeo: : still-parsing? ( lexer -- ? ) [ line>> ] [ text>> length ] bi <= ;

7:27 I actually understand that!

7:27 It looks simple now

7:27 Raynes: It's a squiggly thingy, obviously.

7:28 Sgeo: (I mean, I would have understood it before, but it seems more intuitive now

7:28 How often are the spread and apply conbinators used?

7:28 alfborge: Are there any clojars mirrors?

7:28 Sgeo: I'd imagine those are less intuitive than cleave

7:29 Raynes: Sgeo: I know nothing about Factor, just fyi. I've forgotten everything.

7:29 Sgeo: Oh

7:29 Raynes: alfborge: No. If it's down, you're free to panic.

7:29 Sgeo: I was obsessed with it some years ago

7:30 Raynes: Oh, you said it was up.

7:30 But yeah, no mirrors.

7:35 alfborge: Raynes: I can't access it, but it seems to be a routing issue.

7:36 Raynes: a traceroute from my computer stops at router1-atl.linode.com.

7:39 Seems to be a fucked up routing table from my ISP. :/

7:40 Raynes: alfborge: Do you have a VPS or a server somewhere?

7:40 ssh -D 4000 you@yourserver.com gets you a SOCKS that you can set your network to use. I do that all the time because the mac app store doesn't like my Sprint connection.

7:41 Or my sprint connection doesn't like the mac app store. Don't know which.

7:41 Either way, SOCKS fixes it.

7:43 alfborge: Raynes: Yeah, I've already done that :)

7:44 Just need to get lein to use my proxy :)

7:44 Raynes: alfborge: What OS?

7:45 On OS X, you can set your whole computer to use the proxy via advanced network settings.

7:45 I would expect you to be able to do the same on other operating systems, but I don't know

7:45 alfborge: Raynes: Unfortunately it's windows 8

7:45 Raynes: Get out of my internets.

7:46 alfborge: And I have no idea how to run this thing :/

7:46 Raynes: Hehe

7:48 cemerick: alfborge: you should be able to set the http_proxy env var; lein should pick that up

7:48 Raynes: cemerick: On Windows?

7:49 cemerick: anywhere

7:49 Raynes: Okay.

7:49 I believe you.

7:49 But your memory wanes in your old age.

7:49 cemerick: https://github.com/technomancy/leiningen/blob/master/leiningen-core/src/leiningen/core/classpath.clj#L87

7:49 gtfo

7:49 Raynes: but, of course, you're right

7:55 alfborge: thanks

8:48 acron^: is there an inverse to select-keys ?

8:49 fredyr: http://blog.jayfields.com/2011/01/clojure-select-keys-select-values-and.html

8:49 this maybe?

8:51 acron^: mmmm not quite

8:51 i mean i want something to exclude a key

8:51 (exclude-key {:a 1 :b 2} [:a]) => {:b 2}

8:53 fredyr: i'll probably do an into {} filter

8:54 acron^: could you show me? i'm kinda new to clojure/

8:54 ambrosebs: ,(disj {:a 1 :b 2} :a)

8:54 clojurebot: #<ClassCastException java.lang.ClassCastException: clojure.lang.PersistentArrayMap cannot be cast to clojure.lang.IPersistentSet>

8:54 ambrosebs: I forgot the name?

8:54 dissoc

8:54 acron^: dissoc ?

8:55 ambrosebs: Isn't that what you want?

8:55 acron^: .(dissoc {:a 1 :b 2} :a)

8:55 ambrosebs: use a comma

8:55 acron^: ,(dissoc {:a 1 :b 2} :a)

8:55 clojurebot: {:b 2}

8:55 acron^: perfect

8:55 thank you!

8:55 ambrosebs: :)

8:56 acron^: and if you have a sequence of keys to remove, use apply.

8:56 fredyr: ah even better

8:56 acron^: ,(apply {:a 1 :b 2 :c 3} [:a :c])

8:56 clojurebot: 1

8:56 acron^: ?

8:57 ambrosebs: apply dissoc

8:57 acron^: ,(apply {:a 1 :b 2 :c 3} (dissoc [:a :c]))

8:57 ,(apply {:a 1 :b 2 :c 3} (dissoc [:a :c]))

8:57 clojurebot: 1

8:57 1

8:57 ambrosebs: ,(apply dissoc {:a 1 :b 2 :c 3} [:a :c])

8:57 clojurebot: {:b 2}

8:57 acron^: cheers :<

8:58 I'll get used to this ;)

9:09 hyPiRion: Apply takes a function, but a map can be treates as a function (lookup)

9:09 s/treates/treated

9:11 acron^: it's interesting

9:11 ,(apply dissoc {:a 1 :b 2 :c 3} [:a])

9:11 clojurebot: {:c 3, :b 2}

9:12 acron^: why is the map now unordered?

9:12 I maps don't have 'ordering' as such

9:13 hyPiRion: Maps do not have ordering, no.

9:13 You could do sorted-map

9:13 acron^: Just seems odd :p

9:13 hyPiRion: ,(sorted-map :a 1 :b 2)

9:13 clojurebot: {:a 1, :b 2}

9:14 acron^: the ordering isn't important to me

9:14 hyPiRion: Ah.

9:16 ToxicFrog: acron^: it's not "now unordered", it was never ordered in the first place.

9:17 acron^: You know what I mean though

9:17 ToxicFrog: ,{:a 1 :b 2 :c 3}

9:17 clojurebot: {:a 1, :c 3, :b 2}

9:17 acron^: ordered in the typographical sense

9:17 ^ that's all I'm curious about

9:17 Why it gets re-arranged

9:17 It's not a problem for me

9:17 ToxicFrog: Because when printing a map, it prints the keys in the order it walks them rather than collecting all of the keys, then sorting them lexicographically, and then constructing the output.

9:18 acron^: So why does it walk 0,2,1 ?

9:18 ToxicFrog: They print "out of order" because that is the most convenient order in which to traverse the contents of the map.

9:18 For a more detailed answer one of us will have to look at the map implementation.

9:18 hyPiRion: And here it is: http://blog.higher-order.net/2009/09/08/understanding-clojures-persistenthashmap-deftwice/

9:19 In case you're curious

9:19 ToxicFrog: It doesn't walk "0,2,1". That implies ordering, and there isn't any. The "order" in which stuff is stored in the map has no relation to the order in which it's (assoc)'d or listed in the original {...}

9:20 hyPiRion: ToxicFrog: It does walk a tree though.

9:20 acron^: ToxicFrog: Surely at the lowest level there is something indexable

9:21 ToxicFrog: acron^: that doesn't mean that the "index order" bears any relationship to what "looks" like the order when you write the map declaration, though

9:21 acron^: ToxicFrog: of course, you're right

9:22 ToxicFrog: it's just quirky to me that it would not translate directly

9:22 ToxicFrog: I'm sure there is a good reason

9:23 ToxicFrog: In this case it looks like it's based on hash code (and I have no idea how the mapping from :symbols to hash codes works), with additional funtimes that mean internal map order neq hash code order.

9:28 acron^: Ok, back to noob mode

9:28 i defn'd the apply dissoc into an 'exclude-keys' function

9:29 e.g. (exclude-keys {:a 1 :b 2 :c 3} [:a])

9:29 how can i apply that fn to all maps in a list

9:30 hyPiRion: (map #(exclude-keys % [:a]) list-of-maps)

9:30 Before you ask:

9:30 #(exclude-keys % [:a]) is the same as (fn [%] (exclude-keys % [:a]))

9:31 acron^: perfect again

9:39 this is so awesome

9:39 i love clojure

9:39 * hcumberdale 2

9:39 acron^: i could write my web app on a postcard it's that tiny

9:40 fredyr: :)

9:50 deg: Does clojure have a built-in function to collect the reduction steps (for lack of a better name) of a sequence. I.e, I'd use it to collect the first differences of a sequence of numbers: (f [1 2 3 5 6 7]) => [1 1 2 1 1]

9:52 (typo'd "[" for "(" there, oops)

9:54 hyPiRion: deg: reductions?

9:54 ,(reductions + [1 2 3 4 5])

9:54 clojurebot: (1 3 6 10 15)

9:54 mdeboard: huh.

9:54 hyPiRion: Or wait, I read that wrong.

9:54 mdeboard: neat.

9:55 hyPiRion: deg: I usually do ##(map (fn [[a b]] (- b a)) (partition 2 1 [1 2 3 5 6 7]))

9:55 lazybot: ⇒ (1 1 2 1 1)

9:56 deg: hyPiRion: Not quite... In your example, result should be (1 1 1 1)

9:56 oops, answered to your first one. one sec.

9:56 hyPiRion: ,(partition 2 1 [1 2 3 5 6 7]) ; split

9:56 clojurebot: ((1 2) (2 3) (3 5) (5 6) (6 7))

9:56 deg: Yup, that would do it. Does the partition add much inefficiency?

9:57 hyPiRion: I think it's lazy

9:57 ,(take 5 (partition 2 1 (range)))

9:57 clojurebot: ((0 1) (1 2) (2 3) (3 4) (4 5))

9:57 hyPiRion: Yeah, it's lazy, but it's possibly a bit slow. Though I wouldn't be too concerned unless that

9:57 is an issue of yours.

9:58 deg: I usually need all the results, so laziness doesn't buy me much. I'm more concerned about the cons'ing of the temp structure. Is that significant, or does Clojure optimize much of it away?

9:59 squidz: for anybody who thinks 'The Joy of Clojure' gets difficult to understand at some point, what point would that be?

10:00 deg: squidz: I read it before writing a line of Clojure (but with significant long-ago lisp experience). I did fine on most of the bug, but got lost on some of the interop stuff and on zippers. (and maybe a few other parts near the end; it's been a few weeks so not sure)

10:00 s/bug/book/

10:00 hyPiRion: deg: Well, do you work on a sequence?

10:01 squidz: deg: thanks, I just wanted to know where I should take it particularly slow

10:01 hyPiRion: ,(let [coll [1 2 3 5 6 7]] (mapv - (rest coll) coll))

10:01 clojurebot: [1 1 2 1 1]

10:02 deg: hyPiRion: Yes, doing this on a sequence.

10:02 Nice... never saw mapv before.

10:02 hyPiRion: Then the above wouldn't generate temporary elements. mapv is eager, map is lazy.

10:03 (and creates a vector vs a lazy seq)

10:03 deg: Thanks, that looks perfect for me.

10:03 hyPiRion: anytime

10:04 :)

10:04 deg: (I'm writing a tiny game, mostly to teach myself seesaw, to duplicate a hack that I wrote years ago, and just mentioned to my kids ... who of course now want to see it)

10:05 Basically, the player has to pick numbers and the computer tries to predict what the next number will be... it is incredibly hard for people to come up with numbers that are random enough that a simple program can't much better than blind chance.

10:06 So, of course, my 12 year old thinks she can do so, and I'm trying to prove her wrong and learn some new APIs along the way.

10:06 hyPiRion: Oh, cool.

10:10 acron^: hyPiRion: what's considered "lazy" in this context?

10:12 ucb: deg: sounds cool, I'd like to learn a bit more about the prediction algorithm

10:15 deg: ucb: Well, I last wrote this about 1984, and no longer have the source code, so I'm recreating it now. But, I do recall that it was amazingly trivial and yet the only way I could beat it was by putting in "non-random random numbers" like lists of phone numbers. Any attempt to even randomly slap the keyboard would give patterns that the program could pick up.

10:15 So far, I've just looked for the longest earlier subsequence that exactly matches the last numbers typed.

10:15 That is if the user had typed [0 1 2 0 1], I would guess 2

10:16 Even this does well enough that it took my daughter a few minutes and a hint before she figured out how to beat it.

10:17 Next, I'm looking a first differences repeating, so if I see [0 2 4 6] I can guess that 8 is next.

10:17 Then, I'll look at interleaved subsequences so from [0 9 4 9 2 9 6 9 4 9 8 9 3], I'd predict 9

10:18 ucb: yeah, makes sense

10:18 deg: And, finally, if the program finds no matches, it just guess randomly. Since it only has to beat random (that is, get it right more than 10% of the time on decimal integers), this let's it at least not lose ground when it sees no pattern.

10:18 ucb: surely there's a way to automate that pattern-finding

10:19 deg: My guess is that this is all I'll need to have the computer win nearly always.

10:19 ucb: possibly :)

10:20 deg: ucb: Not sure what you mean? meta-rules to capture each of those cases?

10:20 ucb: deg: well, a way of discovering those meta-rules

10:20 deg: if the computer played many people, perhaps those could be discovered automatically

10:20 deg: Probably so, but meta-rules are really not much more than common subroutines, since the total "AI" code here is a few dozen lines, tops.

10:21 ucb: sure

10:21 deg: Most of my time is going to figuring out seesaw and the underlying java graphics, to display this all nicely.

10:21 I need that for my real work, so it justifies this time playing.

10:21 hyPiRion: acron^: lazy means that the values aren't generated before they're used

10:21 ucb: I heard that seesaw will hide all the swing nasties from you, so it should be good :)

10:22 deg: I was about to ask why not have a web interface which should be easier/quicker to implement

10:22 deg: Speaking of which, is anyone online here now who knows seesaw? I have some questions about it.

10:22 hyPiRion: acron^: That's a very short way of saying it.

10:22 acron^: hyPiRion: so if that values are definitely going to be used (I'm returning the maps as json), it's quicker to use mapv ?

10:23 deg: ucb: I've not yet looked at web interfaces from clojure. What are the best-practice libraries to use?

10:23 hyPiRion: acron^: I've not seen the implementation of mapv, but theoretically, yes.

10:23 It doesn't have the laziness overhead at least.

10:23 TimMc: Use map unless there's a need to do otherwise.

10:23 acron^: TimMc: trying to understand if this is a need to

10:24 deg; I'm using Noir and it's pretty good

10:24 ucb: deg: not sure about best practises, but ring+compojure seems popular, then you have noir which is also popular

10:24 deg: there aren't afaik, django/rails -like frameworks for clojure

10:24 deg: Seesaw looks excellent, but under-documented. (Or maybe just assumes more jswing knowledge than my zero)

10:25 hyPiRion: ucb: ring+compojure is more Clojure-idiomatic (close to no mutability) whereas noir has a lot of mutability

10:25 ucb: hyPiRion: ah, good point

10:26 acron^: moustache as well, but not updated in a while

10:26 hyPiRion: I'd say Noir is good to get working with Clojure for people new to it

10:27 People tend to go compojure after some time with Clojure though, at least that's the trend I've seen.

10:27 deg: k, I'll look at Noir. Any others?

10:28 ucb: deg: noir is mostly for routing, page serving, auth and stuff, you'll need a way of rendering webpages. Noir has hiccup but I know there are other templating systems out there

10:28 hyPiRion: Hiccup is probably the most used for templating.

10:30 Both compojure and noir users use it

10:30 deg: I'd probably be looking more client-side web programming. I'd guess that the best starting path is clojurescript, but I've not had a chance to look at it at all.

10:31 borkdude: What is the expected behavior when I press "run" on a CCW project in Eclipse?

10:32 deg: Are the web-based tools sufficiently "ready for prime time" that I should ignore seesaw? For my purposes, I don't care if I'm browser-hosted or desktop-hosted, so if I shouldn't be wrestling java graphics, maybe I should move on.

10:33 hyPiRion: deg: I don't know client-side, but the server-side stuff is pretty robust

10:33 ucb: +1

10:33 deg: Wow, either I'm reading very carelessly or my IRC client is doing weird stuff. Looking up, I see lines that I could swear were not there when I was typing earlier replies.

10:34 nDuff: deg: The clojure/west slides talk about that (re: Seesaw usability for folks who don't know Swing already)

10:34 deg: Totally missed the compojure lines above. Sorry if I gave some out-of-place replies.

10:34 nDuff: deg: ...the doc strings _are_ pretty darned extensive.

10:35 ...but that said -- it's something that happened _because_ of the thou-shalt-know-Swing expectation that was there previously.

10:35 deg: NDuff: I looked at that talk. It's excellent, but didn't take me far enough. For example, I can't figure out how to change the color of a text box after it has been already displayed.

10:35 clgv: deg: do you know about seesaw.dev/show-options and show-events?

10:36 deg: nDuff: I'm absolutely not criticizing the quality of the seesaw docs. They are amazingly good. Just, not enough examples once you get past the areas they've discussed.

10:36 nDuff: *nod*.

10:36 deg: clgv: yes.

10:37 clgv: deg: well, at some point you gotta read something about swing widgets. would be the same in any other GUI lib/framework ;)

10:37 deg: I think the biggest piece I'm missing is the redisplay and dispatch models, that are presumably implicit to JSwing. Without that understanding, the rest of the pieces don't hang together well enough yet.

10:39 clgv: Yes, agreed. But, per above, maybe my tme is better spent learning the javascript/clojurescript world, rather than learning decade-old JSwing.

10:40 clgv: deg: well swing is production approved and has this nice clojure wrapper. clojure script is still alpha though a lot of projects start to use it.

10:40 deg: (last decade+ my windowing background is Android and J2ME. Before that, Microsoft MFC, and before that many years of Symbolics. I've managed to bypass most of the J2SE/J2EE java worlds)

10:40 Sounds like I need to play with both and learn all the toolsets.

10:41 Sigh, life was so much easier when we just had to bang rocks together and hunt the occasional bison.

10:46 TimMc: You don't find it easier now that all rocks conform to ISO 23089902?

10:50 borkdude: is there a separate channel for ccw users?

10:51 clgv: borkdude: sometimes when lpetit and cemerick are around. but nothing permanent. but there is a ML

10:54 borkdude: what is your question?

10:55 borkdude: what should happen when I press run on a ccw project? should all clj files be loaded or not? (a blank repl starts) -- this is not really an issue for me, but a colleague is trying out clojure and he didn't expect this

10:55 and maybe one extra feature: if it's a ccw/leiningen project, should it obey the :main namespace(function) line?

10:59 clgv: borkdude: ah ok, that sound more like "bug report" or "feature request". you should make an "issue" on CCWs googlecode page.

11:02 matthavener: lol TimMc

11:02 ravster: hello everyone

11:03 clgv: borkdude: I usually start the repl by CTRL+S in the namespace I want to run it at first

11:03 borkdude: and eclipse's run should definitely use :main in a leiningen project

11:04 borkdude: clgv ctrl+s just saves right?

11:05 clgv: borkdude: right. CTRL+ALT+S

11:05 "send to repl"

11:07 borkdude: clgv another bug: when I create a new namespace and send it to repl:

11:07 clgv send a defn to repl that is: #<Namespace foo2>

11:07 CompilerException java.lang.RuntimeException: Unable to resolve symbol: defn in this context, compiling:(NO_SOURCE_PATH:2)

11:08 clgv I mean, when I just create a new namespace, but only send a fragment from that new namespace to the repl

11:08 acron^: is there any way to get Jetty to print the GET when running Noir with "lein run"? Literally banging my head against a wall

11:09 clgv: borkdude: oh never tried that. if you can reproduce it please create a detailed "issue"

11:09 borkdude: for convenience http://code.google.com/p/counterclockwise/issues/list ;)

11:14 borkdude: clgv http://code.google.com/p/counterclockwise/issues/detail?id=484

11:15 clgv: :)

11:17 borkdude: clgv http://code.google.com/p/counterclockwise/issues/detail?id=485

11:18 clgv: borkdude: ah you were the one giving a course using clojure ;)

11:18 borkdude: clgv yeah, I'm preparing a bit for when it's running again… so Eclipse time ;)

11:19 acron^: http://pastebin.com/J1een60E

11:19 Can anyone see what's wrong? :/

11:19 It's just 404-ing

11:19 mdeboard: Yes, you're using pastebin

11:19 you're also missing a paren

11:20 line 3

11:20 borkdude: acron^ how are you running the noir website?

11:20 mdeboard: need another paren

11:20 acron^: borkdude: lein run

11:20 borkdude: acron^ what mdeboard says

11:20 nDuff: mdeboard: You're willing to use the advertising-ridden POS that is pastebin.com for random strangers? I admire your altruism.

11:20 acron^: it didnt even error...

11:21 borkdude: acron^ I advise you to explicitly require all your views in server.clj

11:21 acron^ this takes away much pain

11:21 acron^: how do you mean?

11:22 borkdude: acron^ like this https://www.refheap.com/paste/7532

11:25 acron^: borkdude: is that in place of server/load-views-ns ?

11:25 borkdude: acron^ yes

11:25 acron^: this will catch syntax errors?

11:25 borkdude: acron^ probably you will see an error then

11:25 acron^ also load-views doesn't work properly within an uberjar (been bitten by that several times)

11:26 acron^ noir is being too clever sometimes

11:26 acron^: Ok, I'm giving this a go

11:26 I need to use an IDE or something really

11:26 I don't have any vim styles set up

11:27 borkdude: I'm going now.. to a #clojure meeting !

11:27 acron^: Cool, have fun

11:27 borkdude: tnx

11:37 mdeboard: nDuff: What can I say

11:52 bordatoue: is there any way to import a buch of .jar files specified in the resource-path folder rather than explicitly specifying each one of them

11:54 currently in my project.clj i have to specify each jar separately (for eg. :resource-paths ["etc/file1.jar" ... ... ]

11:55 joegallo: just for clarification, why can't you make them a normal dependency?

11:56 bordatoue: joegallo: i don't want them to be installed as a local repo

11:56 dnolen`: lynaghk: ping

11:57 joegallo: you could concatenate them all into a single jar

11:57 you could write a leiningen hook that will do what you want

11:57 bordatoue: joegallo: this is one of major problem i am facing with lein

11:57 callahad: Hey Raynes & nDuff -- I'm from the Persona team at Mozilla. bmaddy mentioned that you guys were having some issues?

11:58 bordatoue: joegallo: why can't it just work as lein v1

11:58 clojurebot: lein2 is Leiningen 2

11:58 joegallo: i don't know, i'm just some guy

11:59 lynaghk: dnolen`: pong

11:59 bordatoue: joegallo: apart from concatenating all into one jar , do you know about any other slolution to this

11:59 dnolen`: lynaghk: sorry for the delay I finally added the first cut of :when support to core.logic

12:00 lynaghk: http://gist.github.com/4269466

12:00 lynaghk: dnolen`: no prob---does that also include the constraint map stuff?

12:00 dnolen`: lynaghk: that's what I meant - the constraint map stuff.

12:00 lynaghk: ah, yeah. awesome

12:01 dnolen`: mind if I pm you?

12:01 dnolen`: lynaghk: sure

12:02 clgv: I want to select the exception info object that has a certain JSchException as cause with Slingshot - how do I do that?

12:02 I tried several approaches but failed

12:05 ravster: how do I use ring to print out the body and headers of a request?

12:05 weavejester: ravster: In Ring a request is a map

12:05 The body is on the :body key

12:05 The headers are on the :headers key

12:06 lynaghk: dnolen`: we just shipped a consumer-facing ClojureScript-based iOS app to testers

12:06 ravster: weavejester: ohokay. So I'll just pprint it.

12:06 callahad: technomancy: I saw in the logs that you mentioned Conkeror wasn't working with Persona. I'd really appreciate it if you could add more detail here: https://github.com/mozilla/browserid/issues/2858

12:07 weavejester: ravster: Yeah, though the :body is an inputstream, so you'll need to slurp it

12:07 lynaghk: dnolen`: have you heard of anyone else working in that space?

12:07 ravster: sweet, thanks.

12:09 nDuff: callahad: heh, howdy. I was just complaining about the lack of interop with OpenID -- if I already have an OpenID identity with dual-factor auth &c., if I'm going to have a Persona identity as well, I want to be able to link the latter to the former.

12:09 dnolen`: lynaghk: SWEET

12:10 lynaghk: just embedded WebKit or are you going semi-native via JavaScriptCore?

12:10 bordatoue: is there any other alternative to lein when working with clojure

12:10 lynaghk: dnolen`: yes and no---it started as a really nice Cljs+C2 app, but then I had to rip out all of C2's DOM-walking stuff in favor of innerHTML-replacement string templating and start using JSON instead of CLJ for data interchange because the cljs reader is too damn slow =(

12:11 dnolen`: just embedded WebKit via Cordova (formerly PhoneGap)

12:11 dnolen`: lynaghk: yeah ... more stuff to work on!

12:11 lynaghk: still that's great would love to see a blog post on that

12:12 clgv: no slingshot users around? :(

12:12 callahad: nDuff: np, mind if we hop over to private messages to avoid spamming #clojure? :)

12:12 nDuff: Sure.

12:13 lynaghk: dnolen`: yeah, it was definitely a "if I had a blog, this would be a good thing to write up" =)

12:13 dnolen`: I'm going to New Zealand for the next two months, so I might find a week in a cabin to sit down and put together a big comparison of different ways to mix cljs and js and perf numbers for iOS.

12:14 dnolen`: even if we end up using JavaScript data structures in the future, ClojureScript as CoffeeScript+ is still pretty rad.

12:15 dakrone: clgv: what was the slingshot question?

12:16 clgv: dakrone: how do catch the exceptioninfo that has a certain exception type as cause?

12:17 solussd: does anybody know if Monger (the clojure MongoDB library) supports DBRefs? Also, does anyone have any strong feelings about DBRefs?

12:17 NonInc: Good evening! This noon I was watching part of the "Clojure for Java Programmers" screencast at blip.tv linked to at clojure.org . Now all the clojure related videos seem to be gone. Any hope of a mirror of some sort?

12:17 dakrone: clgv: I believe you can still use (catch MyExceptionType e ...) /cc scgilardi-

12:18 dnolen`: lynaghk: that would be awesome. Yeah I definitely there are many kinds of applications where dropping to JS data structures for perf reasons is necessary. especially on mobile hardware.

12:19 scgilardi-: dakrone: right, any valid catch cause for try is a valid catch clause for try+

12:20 clgv: no, the scenario is that I have root exception nested into some layers that were thrown with throw+ but the outermost wrapper is a normal exception

12:20 and I want the first exception info the one that has MyExceptionType as :cause

12:22 dakrone: I'm not sure about that, you may have to catch more than you're looking for and manually unwrap/rethrow

12:22 clgv: I thought slingshot does that for me?

12:22 or can slingshot only do that if everything is an ExceptionInfo?

12:22 bordatoue: can someone please provide suggestion on adding mulitple jar files using freaking lein2

12:23 dakrone: bordatoue: you may have more luck getting a response in #leiningen

12:23 clgv: it might do that for you, I'm not sure; I'd ask scgilardi-

12:23 technomancy: bordatoue: you can put them in a remote repository or install them locally with lein-localrepo

12:23 bordatoue: dakrone: thanks, just one question , is there any alternative to lein

12:23 clgv: scgilardi-: I also know the ":type" in the map of the first throw+

12:24 dakrone: bordatoue: maven? O_o

12:24 bordatoue: technomancy: i don't want to install them locally

12:24 clgv: scgilardi-: but that does not seem to work when the outermost wrapper is a normal exception

12:24 technomancy: bordatoue: that's just how it works

12:24 bordatoue: technomancy: i wanted to have them working as it did in lein v1

12:24 technomancy: lein1 was silly

12:25 bordatoue: technomancy: if use add-classpath in from repl can i add the jar files dynamically

12:25 technomancy: it only supported that because the tooling at the time (emacs, etc) sucked

12:25 bordatoue: dakrone: i stay away from Maven

12:26 dakrone: bordatoue: a wise decision

12:27 scgilardi-: clgv: for compatibility with try, slingshot doesn't do any special processing (e.g., unwrapping cause chains) of normal exceptions. in this case you'll have to do it yourself.

12:30 ppppaul: hey guys

12:30 mpan: hi

12:31 ppppaul: i'm running a hello world ring server and i want to print the request to my console.... running via 'lein ring server'

12:31 S11001001: bordatoue: not really; it'll work in some contexts, not in others, because add-classpath only works sometimes

12:31 ppppaul: i'm using (pprint request) as a middleware

12:31 nothing is being output to my console (not running in repl)

12:31 S11001001: bordatoue: but if you're just fetching resources, reading jars isn't hard

12:31 bordatoue: S11001001: is there any way to check the current classpath from the repl

12:32 S11001001: bordatoue: not really. You can get the java.class.path system property, but that's only an approximation

12:33 the ClassLoader interface allows you to do more than fetch from particular filesystem and URL locations, so "the current classpath" isn't really meaningful

12:36 bordatoue: S11001001: i tried using add-classpath from repl, it say classloader is not dynamic

12:37 S11001001: bordatoue: yeah, that's what I said

12:43 NonInc: Does anyone know what happend to the screencast link? It 404s sadly.

12:45 ivan: NonInc: which screencast

12:46 NonInc: that one linked from clojure.org. actually it links to clojure.blip.tv which 404s for all clojure related videos

12:46 technomancy: blip.tv is annoying

12:47 they stopped providing downloads to anyone not logged in via facebook a while ago

12:47 S11001001: technomancy: http://polsy.org.uk/play/blip/

12:47 ivan: well, I have all the videos that were on blip, now you just have to get permission for me to copyright-violate

12:47 technomancy: S11001001: nice; thanks

12:47 NonInc: personally i did not know about it till today. i was just watching a tutorial about clojure there and now i cannot finish it wich i am kinda sad about because i liked hickes talk.

12:48 S11001001: technomancy: may have to set referer on download to http://blip.tv/

12:48 they keep messing with it

12:49 ivan: NonInc: hasn't been brought up on the list yet

12:49 NonInc: http://blip.tv/clojure/clojure-for-java-programmers-1-of-2-989128 on S11001001 s site does not work anymore either

12:50 you do not eventually have a download of that videos or a mirror? eg i found a mirror of the sequence related screencast on the list

13:04 dnolen`: not sure how many people have written core.logic code that tests output involving fresh vars

13:04 but I'm changing _.0 -> _0, since the former is not a valid symbol for actual Clojure source.

13:05 scottj: NonInc: I'm not logged into blip, but it looks like all the clojure videos have been removed. perhaps they're moving them to another service in preparation for uploading the conj videos.

13:05 NonInc: i hope so thanks for the info

13:05 pyrtsa: +1 for _0 etc.

13:19 dnolen`: core.logic 0.8.0-beta3 going out

13:20 ivaraasen: dnolen`: sweet. I'm using core.logic it to aid my uni studies

13:21 dnolen`: ivaraasen: very cool! how are you using it?

13:22 ivaraasen: dnolen`: basically to learn more about declarative programming. I'm having a course next year teaching programming paradigms using Oz/Mozart

13:23 dnolen`: ivaraasen: ah, that's great :)

13:28 gtrak: how do I copy arglist metadata from another function into my new function?

13:32 ivaraasen: dnolen`: also, I believe some of my professors use Prolog for simulations (to do domain decomposition/grid partitioning). will definitely be exploring this option with core.logic

13:36 gtrak: nm, I got it, (defn new-fn {:arglists (-> #'old-fn meta arglists)}...

13:36 (defn new-fn {:arglists (-> #'old-fn meta :arglists)}... rather

13:37 cemerick: Raynes: bultitude should str-ify prefixes so you can provide symbols

13:38 ohpauleez: cemerick: When you have some downtime, I want to pick your brain on Clojure Web stuff - totally not urgent

13:39 amalloy: ppppaul: *out* doesn't demultiplex from N threads to one stdout. messages sent from non-repl threads vanish into the void unless you change their *out*

13:39 cemerick: ohpauleez: Sure :-) Catch me Friday; mostly heads-down today and tomorrow

13:40 ohpauleez: cemerick: will do! Thanks

13:40 lynaghk: cemerick, ohpauleez: when are we going to podcast?

13:40 Hacker real world?

13:40 cemerick: lynaghk: so many opportunities past!

13:40 ohpauleez: lynaghk: cemerick: Not a bad idea - it'd be cool to do it in person

13:40 cemerick: Works for me, but that's a while from now

13:41 I was planning on hitting the west coast in January, but it might be Amsterdam instead

13:41 lynaghk: cemerick: come out to New Zealand or Japan and we can party over there

13:41 cemerick: lynaghk, ohpauleez: Skype friday?

13:42 ohpauleez: cemerick: lynaghk: depending on the time, that would work for me

13:42 lynaghk: cemerick, ohpauleez: yeah, I could do that; my schedule is flexible

13:42 cemerick: lynaghk: dunno if I could keep up with your worldwide rave

13:42 ohpauleez: ample time for the community to hound us with questions

13:42 :)

13:43 lynaghk: ohpauleez, cemerick: shoot me an email with a good time for both of you---I really am free all Friday (at the moment).

13:44 ohpauleez: dnolen: quick question - do you think the constraint stuff is mostly locked in? I want to use it to solve the Coin Change Kata (as an example)

13:44 cemerick_away: lynaghk: let's say 1pm EST, and ohpauleez can complain if necessary ;-)

13:44 * cemerick_away takes off

13:44 ohpauleez: works for me 1-2ish

13:45 dnolen: http://github.com/namin/TAPL-in-miniKanren-cKanren-core.logic/pull/1

13:45 Dan & Will's quine generator now really works in Clojure.

13:45 lynaghk: ohpauleez: you should gist that. aperiodic and I tried to solve it a bar using core.logic and we ran into some snags

13:46 ohpauleez: dnolen: sick!

13:46 lynaghk: Dec 20th (sadly you're gone), Clojerks swarm coding on the Coin Kata

13:46 aperiodic: ^^

13:46 if you can make it

13:47 lynaghk: so all code will be gist'd and/or in a repo somewhere

13:47 lynaghk: ohpauleez: maybe I can dial in from the south pacific.

13:47 ohpauleez: lynaghk: That would be sick - the remote session will be on one of my servers (west coast data center)

13:47 technomancy: we've thought about doing all-virtual swarming

13:48 I think it's a cool idea, but I think mixing it with an in-person one would be awful unless you had a serious pro-level AV guy

13:48 lynaghk: technomancy, ohpauleez: isn't there a Y-combinator startup that puts ipads on segways or something? Remote telepresence.

13:49 ohpauleez: hahahaha

13:49 that joke never gets old

13:49 technomancy: heh

13:49 video is easy; audio is insanely difficult

13:49 he said as a remote worker for a company that is mostly based out of an office

13:50 ravster: how do I send a break signal from emacs into nrepl? I've got a function that starts a server, but then it doesn't give me my prompt back.

13:51 jasonbray: C-c C-b

13:51 ravster: that did it, thank you jasonbray

13:54 weavejester: dakrone: clj-http redirect bug fix sent your way :)

13:55 dakrone: weavejester: awesome, thanks

13:59 TimMc: TAPL in miniKanren and core.logic? This is relevant to my interests.

14:50 ravster: anyone with ring.middleware.basic-auth experience here? We're having issues with using its 'wrap-basic-auth' function. Keeps giving errors of the 'wrong number of arguments' type

14:50 gfredericks: ,in-ns

14:50 weavejester: How many arguments are you giving it? :)

14:50 clojurebot: #< clojure.lang.RT$1@1cdce97>

14:52 ravster: 2 , one handler and one 'authenticate' function that we made.

14:52 weavejester: which basic auth system do you use?

14:52 weavejester: ravster: Where is the library repo? I've tried the ring.middleware.basic-authentication, but not basic-auth

14:53 Though in the end I just wrote my own because I wanted something slightly different

14:53 ravster: https://github.com/remvee/ring-basic-authentication, weavejester

14:54 weavejester: ravster: That's the one I used for a bit

14:54 ravster: oh

14:54 weavejester: ravster: It seemed to work for me

14:54 ravster: What does your code look like?

14:55 ravster: (wrap-basic-auth (POST ....stuff ....) authenticate )

14:56 weavejester: ravster: wrap-basic-auth or wrap-basic-authentication ?

14:57 ravster: wrap-basic-auth

14:57 weavejester: I thought you said you were using: https://github.com/remvee/ring-basic-authentication

15:00 ravster: oh yikes, I think I'm using weird code.

15:12 aaelony: I have a silly question.. How do I determine the correct namespace to use or require for user-agent-utils (https://clojars.org/user-agent-utils) ?

15:13 noidi: aaelony, for Java libraries, you have to use import

15:14 aaelony: noidi: thank-you

15:14 noidi: (ns aaelony.project.core (:import nl.bitwalker.useragentutils.Application))

15:15 aaelony: perfect, thanks.

15:15 noidi: if you have to import multiple classes, you can use a list as a parameter to import:

15:15 (ns aaelony.project.core (:import (nl.bitwalker.useragentutils Application Browser)))

15:15 aaelony: yeah, I'll be using :import

15:15 noidi: that way you don't have to repeat the package name for each class/interface

15:16 aaelony: althougth I tend to use (:import [ … ] )

15:16 with square brackets

15:18 noidi: yeah, vectors work too, but the reason I prefer lists is that they signify that the first item is special and different from the rest

15:18 if you drop Browser onto the next line, the text editor will indent it under Application

15:19 but if you use a vector, it will get indented under the package name

15:19 aaelony: for some silly reason, i like the vector version

15:19 e.g. (:import [nl.bitwalker.useragentutils Application Browser BrowserType DeviceType Manufacturer OperatingSystem RenderingEngine UserAgent Version])

15:20 noidi: yeah, I used to prefer vectors too, until I heard this rationale from someone (I think technomancy) and then I switched :)

15:20 aaelony: I'm open minded :)

15:20 tomoj: if you could have nested prefix lists it would seem to matter more

15:21 aaelony: suppose I have log line with escaped strings embedded, is there an elegant way to unescape?

15:22 noidi: what do you mean by escaped strings?

15:23 i.e. is this a text editor question or a clojure question? :)

15:23 aaelony: stuff like "\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_5_8) AppleWebKit/534.50.2 (KHTML, like Gecko) Version/5.0.6 Safari/533.22.3\" \"-\""

15:23 perhaps ring.util.codec/url-decode will help me...

15:24 or something similar

15:25 tomoj: what prints it?

15:25 aaelony: tomoj: I'm a downstream consumer, that's how it appears for me

15:26 I'm currently doing .replaceAll style cleanings, but I'm sure there are better ways

15:26 tomoj: but you don't know what prints it? how can you expect to unescape it correctly?

15:26 noidi: so the input string is (in Clojure literal notation) "\\\"Mozilla ...\\\"" and you want to turn it into "\"Mozilla\"" ?

15:27 aaelony: I know what prints it, however I must accept and process it the way it appears.

15:27 yes

15:27 hcumberd`: Hi ;)

15:28 aaelony: more precisely, I'd like to prepare it such that useragentutils can munge and parse it

15:28 tomoj: so what prints it? not a jvm?

15:28 hcumberd`: What do you think is the avg. income of a clojure specialist in the US?

15:29 arkx: hcumberd`: why do you care?

15:29 aaelony: tomoj: yeah, not the jvm. probably node.js

15:29 hcumberd`: Had a discussion with someone from a company

15:29 tomoj: so the reader won't really work

15:29 hcumberd`: About that it wouldn't be possible to get resources and so on

15:29 TimMc: hcumberd`: Hmm, check glassdoor.

15:30 tomoj: you'd have to find some unescaper specifically designed for js, no?

15:30 hcumberd`: What's glassdoor?

15:30 tomoj: or replaceAll :)

15:30 aaelony: tomoj: that's what I've found as well, but if I prep it, it might...

15:30 replaceAll works pretty well, kinda ugly though

15:31 TimMc: hcumberd`: A salary reporting website. You post your position, location, industry, and salary, and you get to see stats on other people's reports. I have an account, but I don't want to use it while I'm at work. :-P

15:31 hcumberd`: 0 salaries found for clojure

15:31 tomoj: replaceAll works for the subset of escapes you're currently interested in, presumably?

15:31 egghead: lol

15:31 quick let's all post our salaries

15:31 you first

15:31 TimMc: I can't imagine it wouldn't be much different than for other programming positions.

15:31 aaelony: tomoj: yes, but I'd prefer a more general, battle-tested solution

15:32 noidi: aaelony, clojure has one built-in, after all, it has to read all the string literals in your source code :)

15:32 ,(let [input "foo \\\"bar\\\" baz"] (read-string (str \" input \")))

15:32 clojurebot: "foo \"bar\" baz"

15:33 aaelony: very cool. I'll try read-string

15:33 hcumberd`: TimMc: there are not so many people on the market

15:33 so prices are higher than JEE and so on

15:34 noidi: aaelony, don't be confused by the name. it's for reading any clojure data structures _from_ strings, not for reading strings!

15:34 ,(read-string "[1 2 3]")

15:34 clojurebot: [1 2 3]

15:34 TimMc: hcumberd`: It's hard to hire *any* programmers right now anyway.

15:34 aaelony: i get it

15:34 tomoj: but that's for clojure string literals, not js

15:34 hcumberd`: I know. Will be self-employed in 2013

15:34 tomoj: differences might not bite you, I don't even know what they are

15:34 brehaut: TimMc: things i'd never want to do include signing into a salary / jobs site with my social network credentials

15:34 aaelony: it may work, will test it

15:34 thanks again for the tip :)

15:35 TimMc: brehaut: I'm on there, but I don't have it connected to any SNS.

15:35 nDuff: TimMc: ...so, I'm at Indeed; looking at GlassDoor would be competitive analysis. :)

15:35 brehaut: TimMc: it wanted me to sign in using my facebook credentials

15:35 (which i dont have)

15:35 TimMc: brehaut: Huh. That's... cute.

15:36 brehaut: thats certainly one way to spell fail :)

15:36 TimMc: nDuff: Indeed does a similar thing?

15:36 hcumberd`: Haha ;)

15:37 nDuff: TimMc: I think we've rolled functionality like that at some point, though our core focus is and has always been job search.

15:38 Foxboron: I have a theory. I believe the only reason why someone want to learn CLojure is because they have secret desires after an afro and a beard.

15:38 brehaut: Foxboron: i think you are thinking of core.logic

15:38 TimMc: Foxboron: *gasp* my secret is out!

15:39 hcumberd`: mhhh beards ;)

15:40 TimMc: It's not difficult for me, though -- I inherited crazy hair via my Scottish + Jewish ancestry.

15:41 Foxboron: brehaut, core.logic contains code to let someone grow an afro and beard?

15:41 dayum

15:42 brehaut: Foxboron: http://skillsmatter.com/podcast/scala/the-refined-clojurist

15:42 tomoj: one.test/ensure-ns-loaded: "We need this because in some situations, we wind up trying to run code that depends on a namespace that isn't available yet, due to asynchrony in the browser."

15:42 what does that mean?

15:43 hcumberd`: In germany are only a few clojure people out there ;(

15:43 tomoj: situations other than putting the one compiled cljs file in the head or at the bottom of the body?

15:43 hcumberd`: Scala seems to be more popular. Maybe because it is much worse compared to java...

15:43 tomoj: <script async ...> ?

15:47 arkx: hcumberd`: I don't think Clojure (or Scala for that matter) is at the stage where you have a good supply of people who already know it available. It's a mistake to only look for "Clojure people", look for people interested in FP instead.

15:48 hugod: dnolen: great to see the core.logic release :)

16:19 Raynes: callahad: Oh hi.

16:19 hcumberd`: arkx: yes, you're right

16:19 deg: What is the best convention for indenting cond clauses in Clojure? Standard indentation seems not to work as well as in Lisp, since the predicates are not nested inside each clause.

16:20 Raynes: callahad: I can't really remember what nDuff was talking about yesterday, but I don't have any gripes myself. technomancy notes that Persona doesn't work with his web browser, Conkeror (not the KDE browser with a K).

16:20 callahad: The context is my pastebin, https://www.refheap.com

16:21 hcumberd`: what is the most awesome feature of emacs? ,)

16:21 org-mode?

16:21 hiredman: maybe ask in #emacs?

16:21 AimHere: M-x psychoanalyze-pinhead

16:21 cmiles74: easy customizability?

16:21 technomancy: hcumberd`: being written in lisp is the only feature that matters

16:22 nDuff: Raynes: ...FWIW, my principal beef was lack of delegation to OpenID -- something on the roadmap to be fixed for major providers quite soon; perhaps less so for my own personal (less usual) use case, but that's not as much of a big deal.

16:22 Raynes: nDuff: Tell callahad, not me. :p

16:22 Oh, I guess you already did then

16:22 ?

16:22 hcumberd`: technomancy: are you also programming CL?

16:22 nDuff: Raynes: Did already -- just summarized a longer conversation I had with callahad this morning for the case where you were interested.

16:23 s/already/indeed/

16:23 Raynes: Oh, great.

16:23 Yeah my backlog doesn't go back that far.

16:23 technomancy: hcumberd`: no, I gave up on CL in 06

16:23 hcumberd`: ;(

16:26 Raynes: Damn it, technomancy even talked to him about conkeror.

16:29 technomancy: I had my blog hosted on CL for like 6 months at one point

16:30 tomoj: huh, 1.21s on "SSL" for login.persona.org/include.js

16:30 TimMc: nDuff: Apparently they've fixed whatever was preventing Persona from working with Firefox's password manager, at least in source.

16:31 I may give it another go, lack of OpenID support notwithstanding.

16:31 tomoj: wonder if it would be safe to load include.js async?

16:32 rarely I have to wait 5+ seconds for persona before anything shows up on refheap

16:34 maybe that's just a conkeror problem

16:35 or my shitty connection..

17:00 hcumberd`: Does ring automatically keep track of tempfiles?

17:05 nDuff: Is there anything out-of-the-box for taking a series of lazy sorted sequences and efficiently emitting a single, sorted stream of output?

17:05 amalloy: nDuff: https://github.com/flatland/useful/blob/develop/src/flatland/useful/seq.clj#L259

17:06 nDuff: amalloy: nice; thanks!

17:14 lynaghk: I'm trying to call the -main fn of a Java program from my Clojure code. This works great, but it's filled with statics and I'd like to call it in parallel

17:14 Is there any clever way of doing this? Or do I need to maintain a queue in my Clojure program and ensure that this Java thing is being accessed in serial by my things?

17:15 callahad: TimMc: Let me know if you have any questions / run into any problems. The team hangs out in #identity on irc.mozilla.org

17:17 hiredman: lynaghk: there is no mechanism like that, but depending on what you want you might be able to just use an agent

17:17 lynaghk: hiredman: yeah, I was just looking at the docstring

17:17 callahad: Raynes: Gotcha, thanks! ^ goes for you. The Persona team would love any/all feedback you have. (And if you're ever in MN, I'm sure that I, bmaddy, and tmarble would love to see you stop by clojre.mn ;))

17:17 lynaghk: the parallelization is for downloading stuff; I think the processing is actually very fast, so I might just pmap the downloads and then run the processing.

17:17 callahad: s/clojre/clojure

17:18 Raynes: callahad: Thanks. :)

17:18 * callahad can't type today

17:18 amalloy: offer to buy him a drink. he always gets a laugh out of that

17:18 Raynes: Hah

17:18 Indeed.

17:19 brehaut: Raynes: if ever you are in NZ i'll buy you a drink

17:20 Raynes: brehaut: Eh, I can actually drink in NZ.

17:20 brehaut: yup

17:20 the jokes not so funny now eh

17:20 sorry

17:20 Raynes: It's funnier when they offer me a drink because they don't know my age.

17:21 technomancy: murica is weird like that

17:21 hcumberd`: Raynes: how old r u ?

17:21 Raynes: i r 18

17:21 hcumberd`: wow,... awesomeness

17:21 brehaut: technomancy: i think the drinking age should be put back to 21 here too

17:21 hcumberd`: me @ 18 = php

17:21 * callahad would still buy Raynes a drink. Just... furtively.

17:22 Raynes: ;)

17:22 hcumberd`: drinking age here = 16 - 18 depending on drink

17:22 technomancy: brehaut: well ideally people should just learn to act like adults sooner in life, but I know that's a lot to ask

17:22 brehaut: technomancy: yeah that would be nice wouldnt it. instead we have more drunken idiots vomiting and fighting in town.

17:24 pipeline: putting back the drinking age doesn't fix anything

17:24 you just have 21 year olds getting hammered and fighting instead of 18 year olds

17:25 brehaut: obviously

17:25 bbloom: as somebody who was given wine sometimes as a kid, but never really had any caffeine, i can say with certainty that my initial learning experience with coffee was far more disastrous than my 21st birthday

17:25 brehaut: but less idiots fighting is still an improvement

17:25 callahad: I'd like to age_driving > age_drinking

17:25 Figure that stuff out before you have access to heavy machinery

17:25 technomancy: brehaut: surely you have police? =)

17:26 pipeline: callahad: that seems impossible in america

17:26 you need a car

17:26 mthvedt: i think in general it's a poor strategy to increase responsibility by delaying it

17:26 pipeline: also drunk driving is pretty much a way of life in most of the country

17:26 brehaut: technomancy: yup. they spend all the time dealing with drunken idiots

17:26 pipeline: if america were serious about drunken driving as a problem, we would have much stricter laws

17:27 bbloom: pipeline: if america was serious about drunk driving as a problem, we would have much BETTER PUBLIC TRANSIT

17:27 :-P

17:27 * bbloom is looking forward to selling his car

17:27 * nDuff is with bbloom on this one.

17:28 pipeline: bbloom: tbf public transit doesn't work very well anywhere in the world

17:28 but that is a huge and difficult off-topic discussion ;)

17:28 technomancy: pipeline: it's amazing in Singapore

17:28 nDuff: pipeline: The Shinkansen line is bloody amazing.

17:28 technomancy: because they tax cars >100%

17:29 lynaghk: hiredman: the pmap approach works but the remote server is angry about the multiple connections; is it possible to limit the number of threads used by pmap?

17:29 pipeline: singapore and the shinkansen are both mass transit in extremely high density areas

17:29 cemerick_away: given autonomous cars, public transit is a waste

17:29 pipeline: most public transit in most countries is busses

17:29 and busses do not work well

17:29 people people overwhelmingly prefer not to ride them

17:29 technomancy: my sixth-grade brother took the train across the entire country on his own

17:29 hiredman: lynaghk: not really, pmap kind of stinks

17:29 nDuff: pipeline: ...but even short of that -- the mass transit system is part of why my fiancee wants to get back to Chicago RSN.

17:29 pipeline: bus rapid transit works very well, but it only costs slightly less than other forms of mass transit and has massively less capacity :(

17:30 nDuff: cemerick: I can't agree at all -- making cars autonomous only fixes a small part of the problem.

17:30 hiredman: lynaghk: seq chunking can interfere with pmap, so if you unchunk the seq you might get fewer threads

17:30 hcumberd`: Idiots are idiots, regardless of drinking age or whatever

17:30 cemerick: nDuff: not clear what problem we're talking about ;-)

17:30 hcumberd`: They will even vomit and fight without alcohol

17:30 lynaghk: hiredman: I'd prefer to have explicit control, I'll keep digging around

17:31 pipeline: technomancy: singapore has something even more awesome than transit: realistic road taxes and real-time congestion prices

17:31 hiredman: lynaghk: have you seen sequeue?

17:31 pipeline: technomancy: i would kill to have singapore-style congestion pricing in nyc

17:31 hiredman: seque

17:31 ,(doc seque)

17:31 clojurebot: "([s] [n-or-q s]); Creates a queued seq on another (presumably lazy) seq s. The queued seq will produce a concrete seq in the background, and can get up to n items ahead of the consumer. n-or-q can be an integer n buffer size, or an instance of java.util.concurrent BlockingQueue. Note that reading from a seque can block if the reader gets ahead of the producer."

17:31 technomancy: pipeline: it is a sight to behold

17:31 very unamerican though

17:31 pipeline: manhattan is not like anything else in america though

17:32 technomancy: I suppose not

17:32 pipeline: and already has unamerican things going for it, like no minimum parking rate for office space

17:32 nDuff: cemerick: ...the set of problems, rather -- public health, scalability (resizing roads to increase automobile throughput is extremely expensive), storage/ownership costs (the amount of prime real estate spent on parking is insane)...

17:32 hiredman: lynaghk: you can create your own seque + futures pmap kind of thing

17:32 lynaghk: hiredman: oh, that looks promising. thanks!

17:32 technomancy: pdoseq!

17:32 amalloy: hiredman: seque has some serious problems too, gorgeous an idea as it is

17:33 hiredman: amalloy: yes, but I've never used it so I can completely ignore those :)

17:33 amalloy: 1.5 includes a patch from me to fix one of the issues: it no longer leaks threads all over the place

17:33 cemerick: nDuff: once cars don't need drivers, the number of cars on the road should drop significantly

17:33 lynaghk: amalloy: it l

17:33 nDuff: cemerick: self-driving cars help some of the equal-accesss issues, have potential to reduce loss-of-life, and _can_ help with parking / ownership costs if private ownership is reduced in favor of a large-scale carshare model, so it's better than nothing, granted...

17:34 technomancy: cemerick: because the cars will find a nice country garage in which to settle down and be done with all those annoying humans for good? =)

17:34 lynaghk: amalloy: it leaks threads? my use case is just batch downloading and processing, but it's going to take a few days so if stuff is leaking that could be an issue

17:34 nDuff: cemerick: ...but a bunch of tiny ICUs is still not nearly as efficient as a train engine, and you still don't have nearly the high-density throughput (or the public health benefits) of short-distance cycling.

17:34 amalloy: lynaghk: it leaks threads depending on your performance profile. iirc if you can consume items faster than they're produced, you lose one thread per time you call seque

17:35 hcumberd`: do you like cars?

17:35 hiredman: I would do queues and executors

17:35 cemerick: technomancy: either that, or they'll all start causing head-on collisions in order to thin the herd

17:35 nDuff: ...well, you _could_ probably get good throughput if you allowed *only* self-driving cars on the roads, but that's a way off.

17:35 * hcumberd` does not like cars. So many people are willing to spend their last money for a big car. WTF

17:35 hiredman: one threadpool executor limited to the number of concurrent downloads you want, one single threaded executor doing the execution of whatever java

17:35 amalloy: another issue is that because seque uses agents under the hood, if you try to call it from within an agent action you're just deadlocked forever

17:35 TimMc: nDuff: Just don't take away my bicycle.

17:36 cemerick: nDuff: I take cars + optimism as a given. :-)

17:36 amalloy: i do have https://github.com/flatland/useful/blob/develop/src/flatland/useful/seq.clj#L286 available which uses a future instead of an agent; i've never gotten around to doing it "right" with a custom executor like hiredman suggests

17:36 hiredman: you submit all your download tasks, and as they finish they submit tasks to run the java

17:37 * cemerick withdraws from perpetuating the OT-ness

17:37 lynaghk: hiredman: yeah, that sounds good to me. I was just wondering if there were Clojure wrappers for that knid of stuff

17:37 hiredman: nope

17:37 lynaghk: hiredman: I'll give that a shot, thanks for the info

17:38 hiredman: my only complaint with executors is the lack of delegating

17:39 "give me a schedule executor that schedules tasks on this other executor"

17:48 dsop: anyway to get leinigen filespecs to work with ring war?

18:23 tomoj: hmm.. if we're validating 'if arity, shouldn't we also check whether there are too many arguments?

18:31 ravster: I have nrepl and nrepl-interaction-mode enabled in emacs. I can do the load-buffer command and that works. But when I change the definition of anything and I C-xCe it, it doesn't show up as a different value in the buffer.

18:32 how do I get this fixed so that the repl syncs up with the changes?

18:33 technomancy: ravster: I think you need to do C-c C-k first

18:33 which is really annoying IMO

18:33 dsevilla: guys, I suppose this has been asked thousand times

18:33 but I don't quite find what I need

18:33 ravster: technomancy: so I should C-cC-k everytime I make a change?

18:34 dsevilla: I would like to have a somewhat fast guide to Clojure given I know Common Lisp and Emacs Lisp

18:34 technomancy: ravster: oh, it should be just once

18:34 dsevilla: Texts I've seen are so much introductory

18:34 technomancy: maybe you're talking about a different problem

18:34 nDuff: ravster: Can you give a more explicit description of how to reproduce the behavior you're seeing?

18:34 dsevilla: and too long for one that knows some lisps

18:34 nDuff: ravster: in the general case, changes made from nREPL take immediate effect. There are exceptions, but they're... well, exceptional.

18:34 technomancy: dsevilla: the "Clojure for Lisp programmers" video formerly on blip.tv was the best for that particular audience

18:34 dsevilla: unfortunately they seem to have removed it

18:34 somebody mentioned having it saved locally though

18:35 someone in this channel

18:35 dsevilla: technomancy: mmm... I'll look for it, thanks

18:35 ravster: nDuff: done C-cC-k to get file loaded in repl. Changed something. Did a C-xC-e after that sexp, and then the change wasn't reflected in repl.

18:35 nDuff: "something" is vague. "wasn't reflected" is vague.

18:36 ravster: I had '(def foo "foo")', which I changed to (def foo "bar")

18:36 technomancy: ravster: it could be C-x C-e is using the wrong namespace

18:37 nDuff: ravster: ...okay, that's a case that _definitely_ will work, if you're set up right.

18:37 technomancy: maybe check user/foo?

18:37 nrepl.el's method of calculating what namespace the current buffer should use is broken IMO

18:37 nDuff: ravster: C-x C-e generally takes effect in the namespace declared in the buffer -- did the one in the repl match it?

18:37 ...what does your namespace declaration look like?

18:38 (could you post the full contents of the buffer you're reproducing with?)

18:38 ravster: nDuff: yup, only one file right now.

18:38 dsevilla: technomancy: seem to be slides with this same name by Hickey

18:39 ravster: nDuff: http://pastebin.com/pVMa7Nmz

18:39 technomancy: dsevilla: the main gotchas are going to be: laziness, much fewer implicit progns, and vars as storage locations instead of symbols

18:39 * nDuff scowls

18:39 technomancy: dsevilla: if you haven't read Equal Rights for Functional Objects that's a great place to start

18:39 nDuff: ravster: ...somewhere without animated ads, maybe?

18:40 ravster: sure :$ sorry

18:40 nDuff: (refheap is a favorite around here, btw)

18:41 ravster: https://www.refheap.com/paste/7540

18:42 dsevilla: technomancy: I'll take a look at it. Yes, I'm interested in laziness, and also in idiomatic data structures

18:45 ravster: weird, right? I thought it would just update things.

18:45 C-cC-k works, though

18:45 nDuff: ravster: ...so, it works fine for me.

18:45 ravster: oh, here we go.

18:45 nDuff: ravster: (took a minute to be set up to reproduce)

18:46 ravster: In the minibuffer it displays '#user/bar

18:46 but the repl is using hello-world.core namespace

18:46 nDuff: ...started nrepl, ran C-c C-k, (ns hello-world.core), foo, C-x C-e, foo

18:46 ravster: ...so, what's your workflow?

18:47 ravster: I didn't do (ns hello-world.core)

18:47 I did C-cM-o

18:47 nDuff: then your repl is still in the user ns

18:47 ravster: sorry M-n

18:47 nDuff: Not familiar with that one, and my local emacs tells me it's undefined

18:48 ravster: okay. Will try again. with (ns foo) call

18:50 amalloy: nDuff: in non-ancient versions of nrepl.el, C-c M-n sets the repl ns to the buffer ns

18:55 ravster: nop. didn't work. C-xC-e still evaluates in the user namespace

18:57 technomancy: ravster: maybe open an issue on nrepl.el

18:57 I've argued against that implementation; maybe some more supporting evidence will help make a case for doing it the "right" way =)

19:00 hiredman: clojurebot: ping

19:00 clojurebot: PONG!

19:05 Rirze: hello1

19:06 is anyone active?

19:06 gtrak: does anyone have an emacs shortcut that wraps the next 2 sexps in a def and runs it? would be useful for stepping through lets

19:07 I guess I can use a macro

19:11 Rirze: Does any have an idea on how to make a map function that goes through the entire (nested) arguments? (presume they are identical in shape)

19:12 technomancy: Rirze: you could map over a tree-seq

19:12 oh, but that won't preserve the shape

19:13 mthvedt: Rirze: perhaps some kind of recursive fn that maps itself

19:14 (fn f [arg] (if (seq arg) (map f arg) (…)))

19:14 Rirze: I got that far, and it works for a specified num of args, but I can't make it argument-number-independent. (using & rest)

19:14 mthvedt: you would have to make sure the leaves aren't seqs, or else a more complicated variation thereof

19:14 Rirze: i'm using sequential? for the if

19:14 is that equivalent?

19:15 mthvedt: believe so

19:15 actually, no

19:15 amalloy: no, cause sequential? will work and seq won't :P

19:15 Rirze: :)

19:16 so here's what I have

19:16 (defn go-through ([op & args] (if-not (sequential? (first args)) (apply op args) ...

19:17 I can't get it to recur correctly on the "else" statement.

19:17 mthvedt: i'm not sure what this is trying to do, i may have misunderstood the question

19:18 Rirze: hmmm... ok, so I'm a bit new, so fix me if I am constructing this wrong:

19:18 it takes an function and the rest of the arguments are put into args

19:19 I check if the first in args is a sequential and if it is, then I just apply the function

19:22 mthvedt: thought you were trying to map

19:24 Rirze: I am... but I want to deal with each element in a sequential individually.

19:24 mthvedt: i don't think you can do anything like that using apply...

19:24 (apply f seq) will call f once, (map f seq) will call f n times

19:25 Rirze: is there an other way?

19:25 well, actually I'm #(apply map %)

19:26 that's the part I'm trying to figure out- I didn't put that in the function definition.

19:28 cemerick: weavejester: I'm using a path like "/foo" with link-to and a with-base-url of e.g. "/bar" ... yet I'm seeing hrefs like "/bar/foo". What am I missing?

19:30 mattmoss: Zippers?

19:35 ppppaul: hey guys

19:35 i'm having trouble with ring's session wrapper

19:36 i'm not getting any session data generated and also no cookie is being applied to my responses

19:36 mthvedt: Rirze: still don't understand… if you have something like [[1 2] [3 4]] do you want to be able to map inc and get something like [[2 3] [4 5]]

19:42 ravster: should wrap-session go at the end of the handler evaluation, or at the beginning?

19:43 xeqi: jcrossley3: I'm looking forward to seeing the immutant + openshift auto scaling stuff

19:44 jcrossley3: xeqi: me, too. we're so close.

19:44 xeqi: actually, i think they have a fix. it just needs to be packaged

19:45 xeqi: yeah, he added some patches today: https://bugzilla.redhat.com/show_bug.cgi?id=883944

20:04 Rirze: mthvedt, if you're still here, what I meant was a function can handle any depth of a sequential. It should handle any nested structure.

20:21 gfredericks: I just saw dnolen's (_.0 => _0) commit to core.logic, and am curious why let has different naming rules than the reader

20:21 ,'_.0

20:21 clojurebot: _.0

20:22 gfredericks: ,(let [_.0 42] :heh)

20:22 clojurebot: #<CompilerException java.lang.ClassFormatError: Illegal field name "_.0" in class sandbox$eval53, compiling:(NO_SOURCE_PATH:0)>

20:22 gfredericks: oh it's that dot

20:23 ,(let [a.b 42] :yep)

20:23 clojurebot: #<CompilerException java.lang.ClassFormatError: Illegal field name "a.b" in class sandbox$eval79, compiling:(NO_SOURCE_PATH:0)>

21:00 Rirze: ,(prn "Why so quiet")

21:00 clojurebot: "Why so quiet"

21:09 Frozenlock: *cricket*

21:11 calstad: Did something happen to the clojure videos that were on blip.tv? Cant seem to get to any of them.

21:12 Frozenlock: "404 - That Blip has sailed.

21:12 We can't find the page you're looking for, but we did find a few new shows you'll enjoy:"

21:12 o_O

21:12 Nooooooo

21:13 gfredericks: are they clojure shows?

21:13 I haven't been keeping up with the latest clojure sitcoms

21:13 Frozenlock: Not even close

21:13 calstad: no...it was a lot of the conj talks from years past

21:13 gfredericks: "Two and a half parentheses"

21:14 calstad: heh

21:14 Frozenlock: "Game of recurs"

21:14 mthvedt: you win or you loop infinitely

21:15 gfredericks: "Fresh Conso of ..."

21:15 metellus: "how i met your filter"

21:15 Frozenlock: I'm still waiting eagerly for this years conj videos...

21:15 "Walking map"

21:16 gfredericks: "Code Improvement"

21:16 Frozenlock: Oh nice one

21:16 gfredericks: kind of generic though

21:16 "clojure.tools Time"

21:16 calstad: wow

21:17 Frozenlock: I don't get this one

21:17 gfredericks: $google tool time

21:17 lazybot: [Home Improvement (TV series) - Wikipedia, the free encyclopedia] http://en.wikipedia.org/wiki/Home_Improvement_(TV_series)

21:17 gfredericks: Binford 6100 MacroHelper

21:18 Frozenlock: "Dr.[]"

21:18 gfredericks: "big! theory" --embarrassed anonymous contributor

21:19 metellus: "map men" "seq-ing bad"

21:19 gfredericks: 24

21:19 brehaut: "Secret Agent Man"

21:19 gfredericks: (get smart)

21:21 calstad: I regret asking the question now

21:24 amalloy: (inc calstad)

21:24 lazybot: ⇒ 1

21:24 Frozenlock: (dec frozenlock)

21:24 lazybot: ⇒ 0

21:24 brehaut: ha thats been fixed

21:25 Frozenlock: brehaut: Really? Perhaps I was at 1 initially :P

21:25 brehaut: Frozenlock: no, it didnt let you dec your own karma previously

21:25 Frozenlock: (dec frozenlock)

21:25 lazybot: ⇒ -1

21:25 Frozenlock: Oh I see

21:26 brehaut: (inc Frozenlock)

21:26 lazybot: ⇒ 0

21:26 brehaut: you shouldnt be able to inc your own karma though

21:26 Frozenlock: (inc frozenlock)

21:26 lazybot: ⇒ 1

21:26 brehaut: ha

21:26 ok its just broken

21:31 Frozenlock: &(-> {:a 1} #(get % :a))

21:31 lazybot: java.lang.ClassCastException: clojure.lang.PersistentArrayMap cannot be cast to clojure.lang.ISeq

21:32 Frozenlock: &(-> {:a 1} (get :a))

21:32 lazybot: ⇒ 1

21:32 Frozenlock: o_O

21:32 gfredericks: &'(-> {:a 1} #(get % :a))

21:32 lazybot: ⇒ (-> {:a 1} (fn* [p1__11643#] (get p1__11643# :a)))

21:33 gfredericks: &(macroexpand-1 '(-> {:a 1} (fn* [p1__11643#] (get p1__11643# :a))))

21:33 lazybot: ⇒ (fn* {:a 1} [p1__11643#] (get p1__11643# :a))

21:34 * Frozenlock is searching fn* in core.clj

21:34 gfredericks: it's a special form

21:34 just like fn for these purposes

21:35 Frozenlock: Oh

21:36 gfredericks: the important thing is the behavior of -> when you give it a (fn ...) expression

21:36 sgeo: fn isn't a special form

21:36 gfredericks: which is that it has no idea that anything special is going on and just shoves it right after the fn* in the list

21:37 sgeo: I mean that fn* is like fn in this case, not that fn is a special form

21:37 sgeo: Ok

21:59 tomoj: how do you round-trip unknown tagged literals?

22:00 holo: is anyone experiencing "Heroku push rejected due to an unrecognized error." almost after starting push now?

22:00 tomoj: oh, I guess just have them eval to a defrecord which prints correctly

22:03 amalloy: brehaut: no, lazybot just noticed that Frozenlock was different from frozenlock

22:03 brehaut: amalloy: aha

22:03 gfredericks: lazybot is a wise wise man.

22:04 Frozenlock: Interesting... Nickserv isn't case sensitive but lazybot is.

22:10 Raynes: Frozenlock, amalloy: case sensitive nicks is a bug.

22:10 amalloy: lazybot is a bug, man. a glitch in the matrix

22:11 gfredericks: easiest bugfix ever

22:15 TimMc: gfredericks: No, we have to write a migration for the existing karma points!

22:16 gfredericks: $karma TimMc

22:16 lazybot: TimMc has karma 21.

22:16 gfredericks: woah

22:16 I PM lazybot "(inc TimMc)" and he says "1"

22:16 I do it again and he says "2"

22:16 is this some sort of troll-trap?

22:16 amalloy: gfredericks: karma is per-channel, and PM with you is a channel

22:17 * gfredericks runs off to give TimMc whatever karma he wants

22:18 TimMc: Karma I can't even see -- the *best* kind of karma.

22:19 (I'm kidding, of course, about preserving karma scores. All that really matters is that the recipient sees the inc, not the cumulative score.)

22:20 gfredericks: no it is about ranking people from best to worst

22:20 brehaut: TimMc: unless someone works out how to convert lazybot karma into craft beer at cons

22:20 TimMc: True.

22:21 gfredericks: (dec scala)

22:21 lazybot: ⇒ -1

22:21 brehaut: no beer for scala

22:21 TimMc: Oh hey, I thought dec wasn't working.

22:22 (dec dec)

22:22 lazybot: ⇒ 0

22:22 brehaut: i think you should only able to co-inc scala

22:59 TimMc: tmciver: crosscram-ws doesn't list any bots

23:08 sshack: Okay, lein is confusing me.

23:09 I'm following instructions to install the immutant plugin. Added a line to my profiles.clj file, then there's something missing, now leon is supposed to have an immutant task.

23:09 What's the missing thing?

23:10 tpope: sshack: you have lein 2, right?

23:10 sshack: Correct.

23:10 2.0.0-preview10

23:10 tpope: have you successfully added any other plugins before?

23:10 sshack: I've never tried.

23:10 tpope: what's your profiles.clj look like?

23:11 ohpauleez: sshack: run lein deps :tree first so it pulls the new plugin deps

23:11 lein repl should do it too

23:11 after that, it should recognize the plugin

23:12 sshack: How would I check? I haven't seen any notices about downloading jar files or whatnot

23:13 ohpauleez: sshack: Just try those two commands, at the start of them, you'll see that lein is pulling new deps (hopefully)

23:14 lein deps :tree

23:14 and lein repl

23:14 sshack: Okay, i don't think it was.

23:15 No, I don't see immutant anywhere.

23:15 Do I have to add it to a project for the plugin to install itself?

23:15 ohpauleez: no, but you can

23:15 in this case

23:16 Maybe lein cached some results

23:16 But when you type lein, you still don't see the immutant task listed?

23:16 sshack: No, I don't see immutant listed.

23:17 Where will leon download plugin jars to?

23:17 ~/,m2?

23:17 clojurebot: /Projekt/swank-clojure/ is where I keep the cloned git repo

23:17 ohpauleez: ~/.m2

23:17 yeah

23:17 clojurebot: Huh?

23:17 ohpauleez: You might also want to try a new: lein new some-project

23:17 and see if in that new project, lein picks up the plugin

23:18 I've had this happen once before, but it remedied itseld

23:18 itself

23:18 TimMc: ~leon

23:18 clojurebot: leon is a good sign it's time to turn off auto-"correct"

23:18 TimMc: :-)

23:18 sshack: That hasn't done it.

23:19 tpope: I still think it's a good idea to double check ~/.lein/profiles.clj is correct

23:20 sshack: tpope: That's a good idea. it was named plugins, not profiles.

23:23 tomoj: hmm, seems difficult to make one.test work nicely for promises

23:25 sshack: Sorry guys, I feel stupid for making that error.

23:25 tpope: happens

23:26 sshack: "Is the cable plugged in? Is it switched on?" Isn't actually a bad troubleshooting step.

23:27 tpope: well that's where I started :)

23:28 sshack: You know, toyota based an entire company on something like that.

23:28 It's called mistake-proofing in the toyota production system.

23:29 TimMc: Is there a way of asking lein what plugins it knows about?

23:40 devn: TimMc: like, locally?

23:41 in a repo? system-wide plugins? remote plugins?

23:45 TimMc: devn: Whereever it is invoked.

23:52 I think it's a bug that (clojure.java.classpath/classpath) returns a bunch of Files with %20 in their paths when run from a dir with a space in the name.

Logging service provided by n01se.net