#clojure log - Feb 10 2012

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

0:31 clj_newb: I create an JList. I select an element. The selected element now has white fg + blue bg. The JList loses focus. Now, the selected element has black fg + white fg + a blue border. How can I change it so that when the JList loses focus, it's still white fg + blue bg?

0:55 sgarrett: Hello all. I was wondering if someone could explain how to make my function immutable and still get the same result.

0:56 I'm a noob just learning clojure...

0:58 Any takers?

0:59 The function is quite short. Basically I'm taking a vector of numbers and I'm wanting to multiply each number by the previous product so [1 2 3 4 5] would return 120.

0:59 rads: has anyone tried out waltz (https://github.com/ibdknox/waltz)? I don't understand what how the set and unset functions work. ibdknox?

1:00 sgarrett: The problem that I'm running into is I keep thinking of the previous product as a mutable state and I'm not sure how to "store" the previous product without using a (def) declaration.

1:00 ibdknox: rads: hm? they set or unset a state within the statemachine

1:01 which forces in or out for that state to be called

1:02 sgarrett: look up (reduce)

1:02 rads: so if you try to unset a state you're not in, it simply does nothing?

1:02 ibdknox: yep

1:03 sgarrett: idbknos: Perfect! Thank you.

1:03 ibdknox: that allows you to specify groups of states that might be mutually exclusive

1:03 rads: ibdknox: can you explain that a little more?

1:04 ibdknox: let's say I have an item that can be in good, neutral, or bad

1:05 it can be in any one of those, but not two. So to ensure that I might do something like this

1:05 rads: wait, so each state machine can have multiple states at the same time?

1:06 I thought state machines only had one state at a time

1:06 ibdknox: https://refheap.com/paste/692

1:06 rads: these are non-deterministic finite state machines

1:06 which is important

1:07 since it would require immense boilerplate to declare all possible combinations of states that exist in UIs

1:08 muhoo: ,(doc deftrans)

1:08 rads: ok

1:08 ibdknox: adding that modifier to the readme

1:08 clojurebot: Cool story bro.

1:08 muhoo: &(doc deftrans)

1:08 lazybot: java.lang.RuntimeException: Unable to resolve var: deftrans in this context

1:08 * muhoo shrugs

1:08 rads: ibdknox: so in reality you only use unset and set once per transition?

1:09 ibdknox: rads: depends on the transition, it's not uncommon for a single transition to put you into two states

1:09 rads: let me get the more complicated version of that metric thing to show you

1:10 hiredman: really you need an expert system with rules specify actions for states and events

1:10 ibdknox: rads: https://refheap.com/paste/693

1:11 rads: so how come there is an imperative api (set, unset) vs a declarative one. for example something like (trans me old-state new-state) instead

1:11 hiredman: conditions

1:11 ibdknox: rads: because a single transition can cause any number of state changes

1:12 that may or may not actually be related to eachother

1:13 hiredman: I think that's basically what you end up creating with this

1:13 rads: I see. I don't completely understand it yet. the idea of using state machines to model an application is new to me

1:14 ibdknox: rads: to be honest, I think it's one of those things you have to work through before you really end up understanding how it works

1:14 it was that way for me and I wrote the darn thing :)

1:15 but it was based on lots of work I had done previously

1:15 hiredman: ibdknox: well then I approve

1:15 rads: that's part of why I enjoy clojure/clojurescript. I've already learned a lot from just experimenting with people's libraries

1:16 ibdknox: rads: yep :)

1:16 rads: people in this community are always trying new things

1:16 whereas it seems like you see a new JS MVC framework every week

1:16 all with very similar underlying concepts

1:16 ibdknox: this was my reaction to those failing miserably

1:18 rads: I'm working on a clojurescript app right now, and it's kinda scary how many of your libraries I use :) I hope to give back and make them better as I get more experience with clojurescript

1:19 ibdknox: rads: haha well let me know how it goes. These are still pretty early

1:21 rads: I use them more as a guideline, which is why I was reading through the waltz source. the new ones are small right now, something I would have written myself, but I figure it would be more useful to work and improve your efforts rather than start my own

1:22 with rails you don't need to know what a FSM to build an app, but cljs is so young and new that I want to learn these things and make them more accessible to less experienced programmers

1:22 what a FSM is*

1:24 it's been what, six months? I'm looking forward to the next few years of clojurescript

1:25 ibdknox: my question is, how did you come up with the idea to use FSMs? you say you've used them in previous projects?

1:27 ibdknox: rads: my friend and I built a really insane website for a client about 5 years ago. At the time people weren't really building large JS apps, but we decided to try anyways and built JSSM (the javascript statemachine)

1:27 we used it to help us manage the ridiculous amount of transitions the site had

1:27 we never used it again for some reason

1:27 flashforward 5 years.. and I'm building large JS apps again :)

1:28 Tried backbone, sproutcore, etc

1:28 they all turned into a mess after a while, because what I truly need is very explicitly defined states that have in's and out's and well understood transitions

1:29 and that basically describes a non-deterministic FSM :)

1:30 rads: I see

1:30 ibdknox: we'd been kicking it around at the office for a bit

1:30 rads: so do you actually go and draw a state diagram when you build an app?

1:30 ibdknox: no

1:30 I'm far too lazy for that ;)

1:31 though I suspect it would actually be quite helpful at times

1:32 rads: I've messed with the clojurescript one event handling with react-to, but it felt like it was an overwhelming amount of freedom and lack of structure

1:33 ibdknox: rads: it's not really much different than how you build JS apps now

1:33 rads: perhaps thinking of the problem as a well studied topic like an FSM will make things clearer when I'm designing my app

1:33 ibdknox: and that will invariably breakdown once you have more than a few things going on

1:33 it definitely did for me, but it's hard to extrapolate that to others... I'm weird :)

1:34 rads: it's beautiful to be able to link back every day problems to the theory

1:36 too often I've felt like I base my design decisions on someone else's framework, which is what everyone does with backbone etc... with this approach I feel like I understand why I'm structuring my code in a certain way

1:40 ibdknox: rads: that's a good sign

1:42 rads: "clojure changes the way you think" rings true for me more and more every day

1:44 clj_newb: supose I do (proxy [JavaInterface] ... ); then, later on, is there a way to (in Clojure) test if a given object is a JavaInterface or a clojure proxy?

1:45 hmm; can I attach meta data to these objects? that would do it

3:17 JulioBarros: I'm having a problem integrating with a java library. I try to create a class and get Exception in thread "main" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException, compiling:(core.clj:20) and then many lines later Caused by: opennlp.tools.util.InvalidFormatException: Missing the manifest.properties!

4:09 ejackson: morning folks

4:09 clgv: morning

4:47 thheller: so whats the most popular way to deploy compojure apps to the web? .war via tomcat & co or standalone with jetty?

4:48 fliebel: cemerick: ping

4:49 cemerick: hi :-)

4:49 fliebel: hi

4:50 I don;t understnd your tweet. ClojureScript One also has ClojureScript as a git dep, right? So how is it unrelated? I mean, sure it's not a couchapp, but it solved the dependency thing.

4:51 After I understand it correclty, I might find some time to try that tomorrow.

4:52 cemerick: fliebel: oh, you're thinking of using clojurescript dependencies in couchdb views?

4:56 fliebel: cemerick: no, really the only thing I referenced clojurescript one for is the 'lein bootstrap' part, to get rid of the cljs jar htat you currenlty use.

4:56 cemerick: well, cljs itself is now available as a regular maven/lein dependency, so that'll go away

4:57 so clutch-clojurescript can use cljs without bundling its own build w/o a problem

4:57 clojurescript one is really unrelated

4:58 fliebel: ok, now I get it, the couchdb side at least. I'm not sure why One would not use just the lein dep.

4:58 cemerick: fliebel: ^

4:58 fliebel: they want to use git for dependency resolution across the board instead of maven artifacts, etc

4:58 fliebel: I thought that One was supposed to be a reference for how to do things in ClojureScript.

4:59 cemerick: well, it's one way, anyway ;-)

4:59 fliebel: :)

4:59 cemerick: ClojureScript One is really only relevant for webapps anyway.

4:59 e.g. there's no possibility of a browser-connected REPL for a couchdb view, etc.

5:00 fliebel: cemerick: true

5:00 cemerick: I suppose it might eventually be desirable to use cljs dependencies in couch views…

5:00 but, one thing at a time

5:01 and, I really doubt that I'll be promulgating the use of git for dep resolution ;-)

5:03 fliebel: anyway, if you want to send me a patch req with all the custom cljs bundling junk ripped out, replaced by the latest cljs dep per usual, that'd be ok :-)

5:03 fliebel: i'll see

5:04 it'll prob be this week or never.

5:19 * ejackson tattoes on his hand that empty and empty? are NOT the same....

5:23 * clgv didn't now 'empty

5:23 clgv: *know

5:23 ejackson: that took longer that it should have in order to find

5:53 dEPyWork: ,(= (seq "aba") (reverse (seq "aba")))

5:53 clojurebot: true

6:08 clj_newb: of all langautes taht have nice C/Objective-C FFi (i.e. not running on JVM); what has the closest to clojure semantics? (things like agents, stm, immutability)

6:10 cemerick: clj_newb: does the JVM not have nice FFI? (i.e. via JNA?)

6:10 clj_newb: of all languaes that I can write ipad apps with, what has the closest to clojure semantics? :-)

6:10 my bad for asking confusing question

6:11 cemerick: ah-ha

6:11 you could probably write an ipad app using a good scheme

6:11 chicken or gambit

6:11 clj_newb: enh

6:12 I was really hoping for sometign like (:require clojureX.ipad); (clojureX.ipad/compile ...)

6:12 i've played with both chicken and gambit in the past; didn't like either of the

6:12 m

6:12 cemerick: then maybe ocaml?

6:13 clj_newb: ah; ocaml

6:13 why did I not think of ocaml

6:13 actually; ocaml even has types

6:13 why am I using clojure at all; now I wonder

6:13 cemerick: hah

6:13 J has types too

6:14 actually, I'll bet factor could pull off an ipad app

6:14 clj_newb: building a DSL for crancking out iphone games on top of J = infinite money

6:14 cemerick: that'd be nifty

6:14 clj_newb: I dunno; doesn' factor use it's own compiler/assembler

6:19 cemerick: I thought it had a C target?

6:20 clj_newb: iirc, no

6:20 i never understood; what about clojure requires the dynamicness of the jvm?

6:20 it feels like everything I do can be statially comipled to efficient C

6:22 damn it; does app store reject java apps?

6:22 (this is osx app store, not ipad app store)

6:22 cemerick: yeah, no Java on any apple store

6:23 clj_newb: on iphone/ipad, it's a matter of effieciency ; on mac book pros / imacs / mac pros ... what is the reasoning?

6:23 cemerick: Clojure is by definition JVM-hosted. ClojureCLR and ClojureScript also have their respective hosts.

6:23 Though, you could *probably* retarget ClojureScript to emit C or scheme or…

6:27 clj_newb: well, except it's *not* a matter of efficiency, as android has proven

6:27 They want what they want in their market. *shrug*

6:28 ivan`: you can sort of write iOS apps in JS using Titanium or Trigger

6:28 I hear Titanium has a lot of bugs

7:05 _phil: i wonder if it would be possible to package up a clojurescript generated js file together with rhino and some native bindings in a binary

7:06 and voila, jvm-less native clojure

7:06 clojurebot: Pardon?

7:06 _phil: clojurebot: botsnack

7:06 clojurebot: Thanks! Can I have chocolate next time

7:53 TimMc: _phil: Isn't Rhino a Java program? >_>

7:54 clgv: clojurebot: chocolate

7:54 clojurebot: excusez-moi

8:02 ljos: hi - I am trying to set up a little REST api for a small project I am doing, but I keep getting a problem. I am using compojure, clojure.java.jdbc clj-json and ring. I run it with lein and when I start the server everything works fine and dandy. What happens is after a few requests sent to the server I get: <h1>404 Not Found</h1>No context found for requestpc ; with debug or anything on the server side. I run everything as localhost.

8:03 The pc thing at the end of the response is just bad copying. It is the start of my computers name.

8:03 Does anyone know what ould be wrong?

8:05 Oh. I'm using curl to connect to it. It seems curl can't connect anymore.

8:19 kensho: Hi. I have emacs configured with clojure-mode (installed through package.el from marmalade) and I use lein with clojure-jack-in. Now I'd like to also work with common lisp code (clozure). What is the best approach to achieve this? Sorry if this is a dumb question, I'm a complete emacs and lisp noob (but I'm familiar with java and clojure).

8:20 tdrgabi: kensho: good question. I have the same problem. Clojure & Common Lisp slime don't mix in my emacs. it would be nice to find a way

8:21 mrBliss: kensho: https://github.com/mrBliss/swank-clojure it's a bit outdated and doesn't work with clojure-jack-in, but gives you CL compatibility.

8:21 I'm working on an update that also fixes macroexpansion and CDT integration

8:22 scottj: mrBliss: why do you need to use an old swank-clojure for cl support, does latest swank-clojure not work with the old recommended version of slime?

8:23 kensho: mrBliss: thanks I'll have a look

8:24 mrBliss: scottj: the old recommended version of slime doesn't work with CL. It also lacks a couple of features (presentations to name one).

8:25 scottj: I have modified swank-clojure-1.4.0 to support the newer version of Slime, but haven't it uploaded yet. I find it hard to keep a fork of a git repo up to date, certainly when it includes multiple branches ;-)

8:27 scottj: mrBliss: newer or latest?

8:29 mrBliss: scottj: I have only tested it with Slime @ 2010-11-13,

8:29 scottj: mrBliss: btw, I've been using the old recommended version (minus two days) with CL for years.

8:30 mrBliss: does that happen to be the same version ritz is using?

8:30 mrBliss: scottj: yes

8:30 scottj: did they introduce a breaking change in those two days?

8:32 scottj: mrBliss: not sure, it's basically github.com/technomancy/slime minus technomancy's commits

8:32 mrBliss: scottj: I assume you got it working with StumpWM too?

8:32 scottj: mrBliss: yep

8:33 that's actually the only CL thing I connect to

8:34 mrBliss: keep making those videos :-)

8:34 scottj: mrBliss: thanks for watching :)

8:34 mrBliss: could you also publish your .stumpwmrc?

8:42 scottj: mrBliss: https://github.com/scottjad/dotfiles/commit/4601dccb3f3de93d0a09a4843dfe0bbc8438630c

8:44 mrBliss: scottj: thanks, I'm gonna read them all today!

9:59 pjstadig: what's up my Clojure/core

10:00 i have a suggestion for open source friday

10:00 CLJ-855

10:05 not that i want to make things more confusing, but I recommend reverting the change

10:05 http://dev.clojure.org/jira/browse/CLJ-855?focusedCommentId=27705&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-27705

10:20 pandeiro: anyone know how i can consume POST data from aleph?

10:31 * TimMc votes for accepting uncontroversial, comprehensive patches already

10:33 * stuartsierra votes for more hours in the day

10:35 TimMc: Seconded.

10:36 How many committers are there?

10:37 stuartsierra: 3

10:38 For Clojure the Language that is. Lots more for contrib.

10:42 TimMc: Ouch, sounds like quite the bottleneck.

10:42 stuartsierra: Technically, Rich is supposed to approve every language patch, so it's more like one.

10:42 TimMc: unless you have some sort of tiered committer setup like the linux kernel has?

10:42 OK.

10:43 stuartsierra: I only wish we were as organized as the Linux kernel, or had as many people working on it.

10:43 cmajor7: are there any Clojure conferences on east cost this year? I see ClojureWest: http://clojurewest.org/ but it is a bit too far..

10:43 stuartsierra: Clojure/conj 2012 will almost certainly be on the East Coast. In the Fall.

10:44 `fogus: cmajor: There will be another installment of the Conj later this year

10:44 or what stuart said

10:44 cmajor7: stuartsierra, `fogus: that's great! thank you!

10:45 jcrossley3: `fogus: nevermind packaging those core.cache tests. i've come to the conclusion that they're not appropriate for distributed caches.

10:46 `fogus: k

10:48 jcrossley3: `fogus: i'm still using defcache, which is very handy, just not the tests

10:49 stuartsierra: later dudes

11:04 devn: later bro

11:34 geoffeg_c: is there a good brogramming community for clojure? :)

11:35 TimMc: "brogramming"... o.O

11:36 Scriptor: like, pair programming?

11:37 TimMc: If this has anything to do with cheap beer and backwards baseball caps, then... I hope not.

11:39 Scriptor: from googling it it sounds like a satirical thing

11:43 geoffeg_c: it is, year

11:43 s/year/yea/

12:10 mrevil: i know this exists but I can't find it: given a series of sequences [1 2 3] [:a :b :c] return [1 :a] [2 :b] [3 :c]

12:11 TimMc: mrevil: map vector

12:11 mrevil: oh, ty

12:12 TimMc: (def transpose (partial map vector))

12:12 Fossi: midje question: i need to check for ({:value foo}{:value bar}), bit i don't know the sort order in the list

12:12 any way i can get contains? to do that for me or any other clever ideas?

12:13 TimMc: contains? only operates on keys

12:13 Fossi: Sort the input and output before comparing?

12:13 clgv: Fossi: (contains {:value foo}{:value bar} :in-any-order)

12:13 Fossi: i meant midje/contains, not clojure/contains?

12:13 TimMc: Oh, nice.

12:13 Fossi: sorry about not being clear :)

12:14 clgv: excellent :)

12:14 clgv: Fossi: https://github.com/marick/Midje/wiki/Checkers-for-collections-and-strings

12:14 there is a lot of useful checkers there

12:33 yazirian: How would you write a function that takes a seq, and returns a function which, each time it is called, returns the next element of the given seq? Is there already something standard that does that?

12:34 lpetit: yazirian: certainly not something standard, because it's a side effecting function you're describing. What problem are you trying to solve ?

12:35 yazirian: i need a callback that round-robins over a cycle of open connections, basically

12:35 lpetit: yazirian: and how does it need to work from a thread safety perspective?

12:36 llasram: yazirian: ? &(take 5 (repeat [:conn1 :conn2 :conn3]))

12:36 &(take 5 (repeat [:conn1 :conn2 :conn3]))

12:36 lazybot: ⇒ ([:conn1 :conn2 :conn3] [:conn1 :conn2 :conn3] [:conn1 :conn2 :conn3] [:conn1 :conn2 :conn3] [:conn1 :conn2 :conn3])

12:36 llasram: Oh, should test first

12:36 yazirian: lpetit: thread safety is necessary, its executing inside an aleph handler

12:37 llasram: &(take 5 (apply concat (repeat [:conn1 :conn2 :conn3])))

12:37 lazybot: ⇒ (:conn1 :conn2 :conn3 :conn1 :conn2)

12:39 yazirian: that's not really the pattern it'll be called in though; more like first, first, first, over and over again -- but each call to first should return the next element instead of always returning :conn1

12:39 (next-conn) -> :conn1

12:39 (next-conn) -> :conn2

12:39 etc etc

12:41 llasram: &(let [conns (atom (apply concat [nil] (repeat [:conn1 :conn2 :conn3]))), next-conn (fn [] (first (swap! conns next)))] [(next-conn) (next-conn) (next-conn)])

12:41 lazybot: ⇒ [:conn1 :conn2 :conn3]

12:43 jkkramer: ,(take 5 (cycle [:conn1 :conn2 :conn3]))

12:43 clojurebot: (:conn1 :conn2 :conn3 :conn1 :conn2)

12:43 llasram: cycle!

12:43 Ugh, I couldn't remember it

12:43 Thanks, jkkramer :-)

12:43 yazirian: the issue is maintaining the state of the cycle

12:43 i've been fiddling with it for a while now but the trick is not getting :conn1 every time

12:43 llasram: yazirian: Storing the state in an atom solves that

12:45 Easier to read: https://refheap.com/paste/694

12:45 lpetit: , (let [yield (fn [seq] (let [a (atom (cons nil seq))] (fn [] (first (swap! a next))))), test (yield [1 2 3 4])] [(test) (test) (test) (test)])

12:45 clojurebot: [1 2 3 4]

12:46 lpetit: yazirian: ^^^

12:47 not sure yield is a good name

12:48 yazirian: i kinda like it, its what python uses for generators :)

12:48 lpetit: , (let [yield (fn [seq] (let [a (atom (cons nil seq))] (fn [] (first (swap! a next))))), test (yield (cycle [:conn1 :conn2 :conn3 :conn4]))] (dotimes [_ 10] (test)))

12:48 clojurebot: nil

12:49 lpetit: , (let [yield (fn [seq] (let [a (atom (cons nil seq))] (fn [] (first (swap! a next))))), test (yield (cycle [:conn1 :conn2 :conn3 :conn4]))] (for [_ (range 10)] (test)))

12:49 clojurebot: (:conn1 :conn2 :conn3 :conn4 :conn1 ...)

12:49 lpetit: yazirian: not sure if it's the right way to do that in the context of your problem, but it works

12:50 yazirian: if you don't mind starting with :conn2 instead of :conn1, then you can drop the (cons nil seq) and simplify it even further:

12:51 yazirian: it doesn't actually matter, no

12:51 lpetit: (defn yielder [s] (let [a (atom s)] (fn [] (first (swap! a next)))))

12:51 yazirian: so that's fine :)

12:52 outstanding! that's perfect!

12:52 thanks :)

12:52 lpetit: ,(letfn [yielder ([s] (let [a (atom s)] (fn [] (first (swap! a next))))),

12:52 clojurebot: #<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: EOF while reading>

12:52 lpetit: test (yielder (cycle [:conn1, :conn2, :conn3, :conn4]))]

12:52 (for [ _ (range 10) ] (test)))

12:52

12:52 oups

12:54 ,(let [yielder (fn [s] (let [a (atom s)] (fn [] (first (swap! a next))))), test (yielder (cycle [:conn1, :conn2, :conn3, :conn4]))] (for [ _ (range 10) ] (test)))

12:54 clojurebot: (:conn2 :conn3 :conn4 :conn1 :conn2 ...)

12:55 ibdknox: good morning folks :)

12:55 lpetit: ,(let [yielder (fn [s] (let [a (atom s)] (fn [] (first (swap! a next))))), test (yielder [:conn1, :conn2, :conn3, :conn4])] (for [ _ (range 10) ] (test)))

12:55 clojurebot: (:conn2 :conn3 :conn4 nil nil ...)

12:58 yazirian: i hadn't even considered an atom, i was messing around with recursion

12:58 rads: what's the most idiomatic way to add something to a sorted set and immediately get its position in the set?

12:58 technomancy: ibdknox: any further progress on that CPU-eating lein bug?

13:00 TimMc: technomancy: Did you see that I fixed lein-otf by adding :aot [lein-otf.loader]? I still don't understand why that wasn't implied by :main lein-otf-loader...

13:00 technomancy: oh, very strange

13:00 TimMc: and why it stopped working, too!

13:01 (although that was probably just a screwup on my part somehow)

13:07 ibdknox: technomancy, haven't looked it into it much. Anecdotally it seems to happen when checking for *new* deps and the length of time is related to how many new deps there are.

13:08 technomancy, I'm also not entirely sure moving .lein actually fixed it or if it was just because the deps were fetched by then :/ I'll fiddle with it this weekend and let you know what I find out

13:10 technomancy: thanks. I haven't heard from anyone else, but that could just be because I haven't announced 1.7 yet

13:15 hagna_: so suppose I want to add interactivity to my program so I can modify it while it runs do I do that with a repl?

13:22 technomancy: hagna_: look into nrepl

13:27 hagna_: technomancy: so would you agree a repl is the best way to go about interacting with running clojure?

13:28 technomancy: absolutely

13:28 programs that don't expose a repl are rubbish

13:29 jkdufair: #purdue-itap

13:30 muhoo: i remember someone here was running clojure on an arm

13:30 jkdufair: oops sorry

13:30 muhoo: i just got a beagleboard, for other things, but i think i'll try running clj on it

13:30 hagna_: technomancy: hehe thanks

13:30 muhoo: s/got/ordered/

13:37 levi: Mmm, beagleboards.

13:38 I think I fried mine. :(

13:38 cwardell: I have a newbie question. I created my project "lein new testProject". I would like to add the dependency for org.clojure/str-utils2 however I don't know the version # i should be appending to it in the project.clj file. How would I find this out? I get errors when trying to do a "lein deps". Sorry if this has been asked before, but I couldn't really find a straight answer on the web. Thanks..

13:39 technomancy: cwardell: try clojure.string instead; str-utils2 is deprecated

13:39 (:require [clojure.string :as string]) in your ns clause

13:40 cwardell: like this in the project file? :dependencies [[org.clojure/clojure "1.3.0"]

13:40 [org.clojure/str-string "1.3.0"]])

13:40 technomancy: no, it's built-in to clojure now

13:40 cwardell: ok.

13:40 seanm_: cwardell: if it's core clojure, you won't need to add it to your project file

13:41 cwardell: And if it's not core clojure, how would I dissever that version #. Is that something that shows up on git?

13:41 technomancy: cwardell: "lein search" should get you what you need

13:41 once it finishes downloading the indices, which is very slow

13:41 seanm_: alternatively you can just browse clojars.org

13:42 technomancy: or search.maven.org

13:42 cwardell: perfect. Thank you. Much appreciated.

13:42 technomancy: cwardell: you'll want to read through "lein help tutorial" at some point

13:42 cwardell: ok, will do. Thanks again.

13:57 djh_: Has anyone got any decent Clojurescript tutorials? What I mean by this is a "getting started" kinda thing, like, is there a leiningen plugin out there similar to Noir where you can just run "lein [x] new" to get a skeleton going?

13:57 I've seen Clojurescript One, which is nice, but ideally I want to start setting up my own project with Clojurescript/Clojure elements

13:57 technomancy: from what I gather lein-cljsbuild is the closest we have to that

13:58 I haven't tried it myself yet, but emezeske is fairly active in here

13:58 djh_: technomancy: thanks man, I'll check that out!

13:59 emezeske: djh_: sean corfield wrote up a little "getting started" article that you might find helpful: http://corfield.org/blog/post.cfm/getting-started-with-clojurescript-and-fw-1

14:00 djh_: emezeske: excellent thanks, I'll give that a read. Just been having a quick skim through the README for lein-cljsbuild - I'm liking the amount of detail on there

14:01 emezeske: djh_: great!

14:02 pandeiro: djh_: clojurescript one on github gives you a nice skeleton and a lot of the machinery already hooked up; but it's not a blank slate... however you can make a branch in the repo that removes all the app-specific code and then clone from that

14:06 djh_: pandeiro: yeah I was thinking of doing that but I kinda what to build from the ground up rather than knocking everything down first

14:06 pandeiro: if you catch my drift

14:06 pandeiro: djh_: for sure

14:20 ohpauleez: djh_: https://groups.google.com/forum/#!topic/clj-noir/wsCVajG0-YE/discussion and the projects here: https://github.com/ibdknox

14:20 jayq, waltz, fetch, crate, monet should give you a lot of the building blocks you're looking for

14:28 seancorfield: i have another "getting started" blog post in the works that covers using jayq to get jquery up and running with FW/1 (but will apply to any web app)

14:28 i should get that tested and finished this weekend

14:29 ibdknox: I want to figure out why the resources thing still doesn't work with cljsbuild

14:29 seancorfield, have you tried 0.0.12?

14:30 in theory you shouldn't need to take the extern out of the jar now

14:33 the response on the CinC work that guy is doing makes me a little sad :(

14:35 arohner: ibdknox: yeah. that's a real wet blanket.

14:36 seancorfield: ibdknox: i'm on 0.0.11 right now

14:36 i'll try 0.0.12 this weekend

14:36 ibdknox: seancorfield, okidoke, let me know how it goes

14:37 TimMc: ibdknox: Mailing list stuff?

14:37 ibdknox: TimMc, yeah. Maybe it was just the way I read it, but it struck me as a "go ahead, but there's no way it's coming back in"

14:38 pretty discouraging for an effort that would be well appreciated otherwise

14:38 * TimMc looks

14:39 arohner: ibdknox: that's how I read it too

14:39 hiredman: actually we were just mocking ss's response in a work chat

14:39 TimMc: Ugh, yeah. THey need to get a new lawyer. :-P

14:39 arohner: and a new workflow

14:40 TimMc: that would be the goal

14:40 hiredman: this guy will actually be at least the second guy to write a clojure compiler in clojure

14:40 TimMc: "Merely having signed the Clojure CA is not enough." WTF!

14:41 If he's the only committer and he forked the original repo, the SHA sums + CA should be sufficient.

14:41 hiredman: rich didn't like the first guys because it was a port of the java compiler, and included it's own bytecode generating lib instead of asm

14:41 TimMc: I don't see any particular problems with this: https://bitbucket.org/remleduff/cinc/changesets

14:41 * hiredman has six false starts on a clojure compiler in clojure

14:42 ibdknox: it'd be awesome if it came about :)

14:42 hiredman: and a clojure reader in clojure that landed with a dud on the mailing list

14:42 TimMc: Man, why didn't rhickey just write the compiler in Clojure in the first place? Would've saved us all this trouble. ;-)

14:42 ibdknox: haha

14:43 srsly.

14:43 hiredman: and I had hacked the ant build to compile the java bits of clojure, compiler my reader with the java reader, then blow it all away and recompile everything with the compiled version of my reader

14:44 ibdknox: hiredman, what happened to it?

14:44 hiredman: nothing

14:44 it's sitting on github

14:45 ambrose has had some interest recently

14:45 ibdknox: hiredman, readerIII?

14:45 hiredman: II maybe

14:46 Raynes: ibdknox: Yeah, his response would probably be enough to make me go away and never come back.

14:47 ibdknox: Raynes, yeah, it's tremendously ungrateful

14:47 Raynes: His response re: the CA and accounting for code can easily be read as "Hey, just make sure we can account for every author. We'll need to talk to them all.". It's the second part that bug me. "And by all means, have fun, but you're probably not good enough for us."

14:47 ibdknox: hiredman, that's officially the longest single Clojure function I've seen :)

14:47 romain_p_: Hi everyone, how do I describe a has-many relationship in korma ? (a user has-many tips, a tip belongs-to a user)? I run into a circular dependency problem in the defentity declarations

14:47 hiredman: the style is odd because deftype didn't exist so I didn't have a way to generate a stable class name

14:47 ibdknox: romain_p_, just declare the var before the first one

14:47 hiredman: and due to the bootstrapping nature there were some tricky bits with dependencies on the runtime

14:48 romain_p_: ibdknox: thanks

14:49 hiredman: I imagine these days I would pull the bits out into to definlines

14:50 dsantiago: Is there any detailed explanation of what exactly inlines are in Clojure?

14:51 hiredman: dsantiago: a macro expansion

14:51 with some mechanism to make it into a function you can use as a value

14:52 dnolen: dsantiago: expressions that will be inlined instead of actually emitting a function call. Mostly useful for fast numerics

14:53 dsantiago: Hm, OK.

14:53 hiredman: https://github.com/hiredman/clojure/commit/5f34cb4acbea7bfe976acb57936860a09452c076 jop was pretty cool

14:54 you could ^{:primitive true} (+ (int 1) (int 2)) and it would just emit an iadd instruction

14:55 dsantiago: I've been running into holes in Clojure's numeric stuff lately, thought it might help, but it's looking like it wouldn't.

14:55 TimMc: dnolen: Work proceeds apace on an import-static that produces inlineable functions, by the way.

14:56 I'm pretty excited.

14:56 dnolen: dsantiago: what problems specifically?

14:56 TimMc: neat

14:57 dsantiago: dnolen: I want to unchecked-divide-int a value in a long that is larger than an int, so this throws an exception because the value is out of range for an int. And there does not seem to be an equivalent function for longs.

14:57 Another one is I want to do an unsigned bit shift right, which Clojure doesn't have a function for, as far as I can tell.

14:58 hiredman: there is a patch in jira for unsigned bit shift right I think

14:58 dsantiago: Yeah. Hopefully that goes into 1.5 so I can use it.

14:58 Right now I'm just calling into some Java functions I wrote.

14:58 hiredman: http://dev.clojure.org/jira/browse/CLJ-827

14:59 :/

14:59 TimMc: Oh, that's mine!

14:59 Well, I'm not the reporter, but I did submit a pretty thorough patch.

14:59 dsantiago: Your patch is awesome. I want it.

15:00 hiredman: it's not mine

15:00 joegallo's

15:01 TimMc: I'd be happy with either patch, I think.

15:05 dsantiago: Sure.

15:07 Raynes: ibdknox, TimMc: I figure the only work flow that would be truly as secure as they want it to be would be the one where everybody sends patches through postal mail with a picture of the author holding up a newspaper with the date of the authoring of the patch on it and the code in the other hand.

15:07 ~rimshot

15:07 clojurebot: Badum, *tish*

15:07 ibdknox: lol

15:08 better solution: all patches must be noterized

15:09 the-kenny-w: All patches should be validated via `M-x checkdoc' prior submission :)

15:10 Raynes: ibdknox: The lawyer must watch the production of the patch. If a character of code typed is not accounted for by the lawer, the author must start over with a new solution to the problem.

15:11 TimMc: With true clean-room coding, the programmer is first given a medium-term amnesia drug.

15:12 Well, I've responded, asking for clarification -- we'll see if I get any.

15:12 pandeiro: it sounds like you guys are describing some bizarre hostage crisis

15:12 TimMc: sort of.

15:12 ibdknox: haha

15:13 TimMc: Clojure/core is holding the codebase hostage (using the gun of legitimacy.)

15:13 ibdknox: hold on too tightly and things slip away...

15:14 it'd make me sad if something like this ended up being the fracturing point. heh

15:15 hiredman: well, as we discovered yesterday most people have been running forks of 1.2

15:15 pandeiro: is there a link i can read about the "something like this"? it's the CinC thing?

15:15 hiredman: (most people with clojure code in production)

15:15 TimMc: pandeiro: https://groups.google.com/group/clojure-dev/browse_thread/thread/a6e2753c1104b28c

15:16 ibdknox: hiredman, wait, what? I missed this

15:16 hiredman: ~logs

15:16 clojurebot: logs is http://clojure-log.n01se.net/

15:17 stuartsierra: You just need to be able to find everybody who committed.

15:18 hiredman: http://clojure-log.n01se.net/date/2012-02-09.html#15:32e

15:18 ibdknox: -^

15:18 dsantiago: This guy looks like he's started from scratch.

15:19 ibdknox: hiredman, yeah just found it

15:20 hiredman: nathanmarz: so are you guys using a fork of clojure too?

15:20 ibdknox: we're still on 1.2.1

15:20 stuartsierra: Rich makes the rules, I just try to follow them.

15:20 TimMc: Yeah, I know.

15:21 But it's a little hard to figure out what the rules are sometimes.

15:21 stuartsierra: Tell me about it.

15:21 ibdknox: heh

15:21 TimMc: It comes down to what the lawyer says, right?

15:23 Ah, saw your response. OK.

15:46 Raynes: ibdknox: You should be getting the first chapter in your inbox for review soon.

15:46 :D

15:46 If it isn't already there.

16:02 seancorfield: just catching up on the fork convo... World Singles isn't on a fork, never has been... we went from 1.2 to 1.3 early on in dev and went to production on alpha 7 (I think, maybe alpha 8)... but it's a lot easier if you never had a bunch of legacy code on 1.2 :)

16:02 and we're using lein-multi to test everything on 1.4.0 as it evolves

16:03 what's folks biggest obstacle to moving from 1.2 to 1.3 or 1.4? the contrib breakup? or language issues?

16:03 cemerick: stuartsierra: there was a fork conversation?

16:03 stuartsierra: sorry

16:03 ordnungswidrig: mine was contrib and dynamic vars.

16:03 cemerick: seancorfield: ?

16:03 seancorfield: i see hiredman mentioned CLJ-855 (exceptions) as a blocker

16:03 stuartsierra: cemerick: ?

16:03 seancorfield: http://clojure-log.n01se.net/date/2012-02-09.html#15:32e

16:03 cemerick: stuartsierra: nm, autocomplete fail

16:03 oh, yesterday

16:03 seancorfield: folks running on forks of 1.2 rather than official builds

16:04 stuartsierra: why?

16:04 clojurebot: #<ClassCastException java.lang.ClassCastException: clojure.lang.Cons cannot be cast to clojure.lang.IPersistentStack>

16:04 Raynes: seancorfield: Since technomancy_ isn't here to brag: "You won't need multi in lein 2, because of profiles. :D"

16:05 hiredman: stuartsierra: because of issues with 1.3 (hashing, equality, and clj-855) and 1.4 (clj-855)

16:05 stuartsierra: hm

16:05 maravillas: Raynes: you mean lein-multi, right?

16:06 seancorfield: yeah, i know Raynes and i'm looking forward to migrating World Singles to lein 2 "soon" (but right now we're focused on a deadline for specific platform features and data migration so it won't happen before then)

16:06 ned: does clojure have something similar to CLOS

16:06 Raynes: maravillas: Yessir.

16:06 ned: CLOS with persistence

16:06 maravillas: good to know, I won't mess with testing it against 2 then :)

16:06 ned: basically i want a EAV or prototypical object system (i.e., where i can add fields at a whim) that persists to a DB

16:06 Raynes: seancorfield: Really? That's awesome. When you do, be sure to help us with documenting migrating and stuff.

16:06 seancorfield: i love lein-multi btw and i've been adding it to various clj projects i maintain as i work on them...

16:07 Raynes: huh?

16:07 ned: so if i have something like "person" and a year down the line i want to add a field like "twitter account" (asssuming the object was defined before twitter was popular) i could add that field

16:07 hiredman: ned: sounds like you want a map

16:07 seancorfield: Raynes: oh, i get it... when i migrate to lein 2... sorry, not enough coffee yet :)

16:07 Raynes: :p

16:07 ned: hiredman: mmm...

16:07 a map in clojure is just a hashmap/dict k,v store right?

16:08 TimMc: Yep.

16:08 ned: how does the structure of the objects work out

16:08 seancorfield: ned: sure sounds like a map to me... which is easy to save to mongodb...

16:08 why do you want an "object" ned?

16:08 hiredman: ned: why do you want objects, and what are objects?

16:08 ned: seancorfield: thats the paradigm in which i think :P

16:08 TimMc: ned: Specifically, it is a persistant data structure -- low cost to "modify", and it's immutable.

16:08 ned: by all means, change my outlook :v

16:08 * TimMc gets a rock :-P

16:09 seancorfield: ned: yeah, for OO folks coming to FP, shaking off ObjectThink is the first / biggest hurdle :)

16:09 ned: i mean.. ok so a new person comes in.. how do i get prompted for all those fields

16:09 if i want to instantiate "bob" from SLIME (where bob is a new employee)

16:09 how do i know which fields exist

16:09 seancorfield: you mean "how do i drive my form generation?"

16:09 TimMc: ned: I think the big question here is how do you manage your backing store.

16:09 ibdknox: Raynes, sweet :D

16:09 TimMc: and migrations

16:10 ned: TimMc: well, with EAV (aka openschema) you don't need to

16:10 migrate at all?

16:10 (sorry for the linebreak) didnt mean to hit enter

16:10 seancorfield: sounds like you need metadata to describe 'person'... perhaps a vector of field names (or something richer, depending on what metadata you need)

16:10 ned: seancorfield: ahhhhh

16:10 ok now im getting pointed in a right direction it would seem.

16:10 TimMc: (not to be confused with clojure's IMeta metadata)

16:10 seancorfield: an object itself doesn't buy you that - unless you have the metadata in the first place

16:10 (right TimMc yeah)

16:11 ned: whats the difference between IMeta metadata and 'metadata'

16:11 ones an interface you implement?

16:11 seancorfield: IMeta is a language feature, you want something persistent in a DB to describe 'person'

16:11 TimMc: The latter is the general programming concept.

16:11 ned: seancorfield: ahh correct.

16:12 seancorfield: i'm off to lunch but happy to chat more about metadata-driven stuff later since that's actually how we do most stuff at world singles

16:12 hiredman: you just need a list of fields you want values for

16:12 TimMc: Classes that implement clojure.lang.IMeta get to have equality-exempt maps of data attached to them.

16:12 ned: seancorfield: excellent. when do you think you'll be back?

16:12 hiredman: (def fields #{:foo :bar :baz})

16:13 ned: how do you correlate that (def fields #{:address :date-of-birth :employee-level}) with an 'object'

16:13 (excuse my stupid OO terminology)

16:13 its just a mental roadblock im trying to overcome.

16:13 bear with me pleases :P

16:13 seancorfield: ned: hour or so... feel free to email me to discuss (obvious: first name at company name dot com)

16:13 hiredman: correlate for what purpose?

16:13 ned: seancorfield: excellent. i'll be around to hit you up and extract knowledge from your mind :P thanks!

16:14 hiredman: well, lets say i want to create a new employee. how do i 'inherit' those fields?

16:14 TimMc: ned: In OO-land, "object" specifically means a value with a type and a limited set of functions that are attached to it. In FP, the attachment is only in your mind. :-)

16:14 ned: i understand that with CLOS and clojure, methods are entirely different from "classes" (sorry to use the lisp terminology)

16:14 yes i got that.

16:15 im just trying to figure out how the relationship between the defmethod and the defclass exist

16:15 (again, sorry i might be conflating CL with clojure)

16:15 hiredman: (defn fill-in-form [fields] (loop [[f & fs] fields m {}] (if f (recur fs (assoc m f (read))) m)))

16:15 there is none

16:15 ned: give me a second to digest that. that's a mouthful.

16:15 TimMc: ned: You just populate a new map with stuff. ##(assoc {:id 45} :name "Bob")

16:15 lazybot: ⇒ {:name "Bob", :id 45}

16:16 hiredman: it takes a list of fields and for each field reads in a value producing a map of fields to values

16:16 ned: TimMc: so theres no way to 'inherit' the fields that existed with the symbol (? not sure if "fields" is a symbol in this example) re (def fields #{:foo :bar :baz})

16:17 basically from slime i want to be able to say something like "new object" and then be prompted for fields to fill.

16:17 where object = an Employee or whatever

16:17 hiredman: ned: write a create-employee function that does that

16:18 ned: ahhha.

16:18 TimMc: ned: Well, you can loop over that set (which is what the #'fields var contains) and ask for the value of each in turn.

16:18 and as you get them, 'assoc the values onto a map with the keys from 'fields.

16:18 ned: both are interesting solutions.

16:18 nathanmarz: hiredman: we're not using a fork of clojure

16:19 hiredman: what gave you that idea?

16:19 hiredman: nathanmarz: informal survey

16:19 ned: hiredman: where does defrecord come into play (if at all)

16:19 hiredman: nathanmarz: other people apparently have been

16:19 ned: don't worry about it

16:19 ned: (and if it does, can you arbitrarily add fields?)

16:19 hiredman: hmm

16:20 hiredman: "but..." "don't worry about it" "I thought..." "don't worry about it" etc etc etc

16:20 ned: hiredman: i get you.

16:20 TimMc: ned: defrecord makes (classes for) associative data structures. They're mostly useful for interop with Java, and add some pain for Clojure users.

16:21 JohnnyL: why is Clojure so slow?

16:21 ned: and def-protocol?

16:21 Raynes: Hahahahatroll.

16:21 ned: err, extend-protocl

16:21 TimMc: Raynes?

16:21 clojurebot: if it's not one thing it's another

16:22 TimMc: That was unexpected.

16:22 Raynes: TimMc: JohnnyL

16:22 Read a few lines above mine.

16:22 TimMc: Oh, I have him ignored.

16:22 * emezeske looks up how to ignore people in irssi.

16:22 TimMc: /ignore JohnnyL <- emezeske

16:23 emezeske: TimMc: Thanks!

16:23 TimMc: There's also a useful -replies option.

16:23 Raynes: I don't generally ignore people. IIRC hiredman has had me ignored for like 2 years now and has never told me why (and I can't really ask him, since he has me ignored), which kind of turned me off of ignoring people unless they're actually spamming or something.

16:23 ned: so, is there a way to auto-persist any changes made to a entity to mongodb via hooks?

16:23 TimMc: ned: Protocols are a fast-dispatch mechanism that is externsible to new types retroactively. It's basically the cat's pajamas.

16:24 ibdknox: Raynes, I have myself ignored. ;)

16:24 emezeske: Raynes: That's reasonable. In this case, I think the perpetrator knows why people are ignoring him, though :P

16:24 Raynes: Indeed.

16:24 TimMc: Raynes: hiredman is an outlier, he has like half the channel ignored.

16:24 It's kind of funny when he responds to questions that have already been answered.

16:24 Raynes: Everybody is wrong.

16:25 hiredman: ned: you are entities are immutable data, how are you going to change them?

16:25 your

16:25 wow

16:25 ibdknox: haha

16:25 ordnungswidrig: *g*

16:25 ibdknox: hiredman, you've been taking typing lessons from me :p

16:25 hiredman: first time that's ever gone that way for me

16:26 Raynes: I'm sure I did something to earn it though. I was 15 two years ago, so I wouldn't be surprised if I said something pretty stupid.

16:26 Er, 16?

16:26 Something like that.

16:27 TimMc: ned: You can use refs (or atoms or agents or even vars) to handle mutable state, and add watchers on them to propagate changes.

16:30 ned: hiredman: so what's the right way of mutating the data?

16:30 to put this in perspective, this is a little customer-relation manager where salesforce is overkill for our software shop, but excel and emails have long since been under-kill since we've got such a large influx of clients

16:31 hiredman: ned: http://www.infoq.com/presentations/Are-We-There-Yet-Rich-Hickey

16:31 ned: so we basically have a lot of customers, a few programmers, a PM, a set of projects, and we're constantly keeping track of email/contacts/last contact/ and internal notes

16:31 hiredman: ah, a hickey talk. excellent.

16:31 he's a damn good engaging speaker :)

16:31 oh my, an hour ten minutes :v that'll be on my queue for later tonight i suppose.

16:32 Raynes: Rich Hickey told me I was a good speaker. Made a man that day. :>

16:33 I've been trying to get my ego under control ever since.

16:33 jodaro`: hows that working out for you?

16:33 Raynes: jodaro`: I had to go up to my room and shave immediately after.

16:34 jodaro`: your face or your legs?

16:34 ibdknox: ~rimshot

16:34 clojurebot: Badum, *tish*

16:34 Raynes: $guards

16:34 lazybot: SEIZE HIM!

16:34 ibdknox: lol

16:34 jodaro`: i guess i could have gone way more crasser with that one

16:34 but like

16:35 Raynes: jodaro`: It's a family channel.

16:36 ;)

16:36 jodaro`: right

16:37 hagna_: so I'm watching clojure for java programmers and he's talking about interacting with a running process. How is that typically done?

16:38 hiredman: hagna_: a repl

16:39 TimMc: hagna_: The easiest way is to launch the app *from* the REPL.

16:39 hagna_: TimMc: ahh from the repl I see

16:39 TimMc: and then you get to redefine stuff and poke around.

16:39 It's great to be able to modify a GUI app on the fly. :-)

16:40 I suppose your app could also expose a REPL on some port -- I don't *know* what the "nrepl" project is, but that's my best guess.

16:40 ibdknox: is nrepl probably the easiest solution for doing that after the fact?

16:40 lol

16:41 TimMc: ibdknox: What does it do?

16:41 Raynes: ibdknox: Yes.

16:41 ibdknox: TimMc, provides a server and a client for a repl

16:41 TimMc: My Google button is broken, you see.

16:41 hiredman: swank-clojure is fairly easy to embed

16:41 Raynes: ibdknox: nrepl is God.

16:41 If you embed swank-clojure, you are not my friend.

16:41 ibdknox: Raynes, I've been thinking of wrapping it into everything I build

16:41 hiredman: or just a socket repl

16:41 ibdknox: just for kicks and giggles

16:41 hiredman: there used to be one in contrib

16:42 a socket repl is what we have at work

16:43 cemerick: hiredman: you mean something you can telnet into?

16:43 ibdknox: I'm excited for when vimclojure gets converted over to nrepl, as that will make connecting it to things easier

16:43 hiredman: cemerick: netcat actually

16:44 TimMc: yay nc

16:44 cemerick: nrepl provides a telnet-happy transport (which I called tty, but whatever)

16:44 it's not the default, but it's there

16:44 I'm keeping the HTTP one off to the side.

16:44 hiredman: we have a little shell script that controls a long running java process, one of the options is to connect to the repl

16:45 hagna_: anyone know how nrepl works? I sure don't

16:45 hiredman: *cough*

16:45 hagna_: but launching from a repl sounds just great

16:45 ibdknox: haha

16:45 hagna_, cemerick wrote it

16:45 hagna_: oh err uh

16:45 ibdknox: so I'm fairly certain he knows :)

16:45 hagna_: yeah didn'

16:46 t notice that

16:46 technomancy_: seancorfield: do you still have a mixed scala/clojure codebase?

16:46 cemerick: hagna_: the README on master hasn't been updated yet to reflect the recent redesign

16:46 but the API docs and test suite are mostly complete and accurate

16:46 TimMc: cemerick: Can nrepl "hack into" a running JVM?

16:47 hagna_: TimMc: of course

16:47 technomancy_: only if you've got the skills

16:47 TimMc: (shouldv'e just said "attach to"...)

16:47 cemerick: TimMc: you mean opening a repl to a process that isn't explicitly running a repl server?

16:47 hagna_: cemerick: you ought to do your development on master like leiningen

16:48 cemerick: hagna_: development *is* on master, I just haven't rewritten README yet

16:48 hiredman: https://github.com/wirde/swank-inject

16:48 TimMc: cemerick: Right. Let's say I've launched an uberjar from the command line. Can I attach?

16:49 cemerick: TimMc: No, but it's possible.

16:49 There's already a project that allows for that, but I'm away from my browser at the moment.

16:49 ibdknox: cemerick, where are the API docs? On the wiki?

16:49 TimMc: $ nrepl hindsight -p 23695 :-P

16:50 hagna_: cemerick: can I attach to a jvm on TinMC's machine from my own?

16:50 cemerick: ibdknox: in the source :-P

16:50 ibdknox: haha

16:50 cemerick: hagna_: if he's running a repl server, yeah

16:50 * ibdknox goes to run codox over it :D

16:50 cemerick: ibdknox: hrm, theoretically there's automatic autodoc?

16:51 heh, *very* old autodoc

16:52 stuartsierra: how/when does the autodoc for contrib projects get generated/updated?

16:58 stuartsierra: it doesn't

16:58 cemerick: well, there's autodoc for tools.nrepl, and I didn't put there…

16:58 stuartsierra: neither did I

16:58 cemerick: huh

16:58 ninja job by replaca_? ;-)

16:58 stuartsierra: Tom F.?

16:58 TimMc: Ooh, historical question: I see git tags in clojure.contrib up to 1.3.0-alpha4 -- did it *almost* get released?

16:58 ibdknox: github is making me sad lately

16:58 they seem to be having issues a lot

16:58 technomancy_: ibdknox: huge ddos, apparently

16:58 stuartsierra: TimMc: I made those for a while. It was painful3.

16:58 ibdknox: technomancy_, really?

16:58 technomancy_: so they say

16:58 cemerick: ibdknox: been hedging my bets by looking at bitbucket

16:58 which, on a whole, isn't so bad

16:58 hardly as good, but a far cry from the shite it used to be.

16:58 trptcolin: i'd post a link to the blog post about the ddos, but, well... site's down.

16:58 hiredman: cemerick: if you end up with a browser repl widjet in js that talks to nrepl then I will be interested

16:58 technomancy_: I mirrored clojure on gitorious back in the svn+kevinoneill days

16:58 TimMc: I have one private repo on bitbucket, but it's just wedding-planning stuff.

16:58 cemerick: hiredman: well, I'm not going to build the front-end, but a decent ring handler is done.

16:58 TimMc: stuartsierra: So, was there almost a release, then? Like, was most of contrib actually made compatible with 1.3?

16:58 cemerick: hah @ gitorious

16:58 stuartsierra: TimMc: yes, but that was before most of the breaking changes

16:58 hiredman: cemerick: the front-end is the only thing I am interested in, I have plenty of repl backends

16:58 TimMc: stuartsierra: Ah, I see.

16:58 cemerick: hiredman: not my bag; ibdknox might oblige eventually

16:58 technomancy_: wow, that would have averted so much confusion

16:58 stuartsierra: somewhere on GitHub somebody made a clojure-contrib repo that continues to work on 1.3

16:59 cemerick: hiredman: there's also https://github.com/djpowell/liverepl, which doesn't require starting the process in debug

16:59 aperiodi1: trptcolin: the blog post is still up for me: https://github.com/blog/1036-about-this-week-s-availability

17:03 ibdknox: aperiodic, that's because github just came back :)

17:04 hagna_: so I just launched this irc bot from a repl with (-main nil) and suprinsingly it didn't block like I thought it would. Why is that?

17:06 MenTaLguY: maybe the main function effectively just spawns some (non-daemon) threads and returns

17:06 TimMc: technomancy_: What would have?

17:06 technomancy_: TimMc: 1.3-compatible contrib

17:07 TimMc: Eh, it was probably for the best.

17:07 technomancy_: would have sped up adoption of 1.3 hugely and given us more time to spread the "get off contrib while you can" message

17:07 TimMc: hmm

17:07 There would just have been more trouble later. People use what is convenient.

17:07 technomancy_: TimMc: depends on whether your goal is to get people to stop using contrib or lower overall frustration

17:08 TimMc: They don't read docs, they copy code.

17:08 ("copy code" = learn by example)

17:08 technomancy_: it's courteous to at least provide a single release between deprecation and removal

17:08 stuartsierra: The biggest motivation was time.

17:08 Too much time was being sucked up trying to maintain monolithic contrib.

17:09 Most of the code had long been abandoned by its original authors.

17:09 TimMc: technomancy_: 1.2.2 changelog: "contrib is deprecated" :-P

17:09 technomancy_: all it would have taken is a recompile using the 1.3 compiler

17:09 hiredman: looks like java.jmx is getting abandoned :/

17:09 technomancy_: don't actually have to fix any bugs

17:10 stuartsierra: technomancy_: It doesn't compile under 1.3

17:10 hiredman: so, aren't you a contrib committer?

17:11 hiredman: stuartsierra: if I am it's the first I've heard of it

17:11 stuartsierra: ok, well, you could be

17:11 technomancy_: in case you don't have enough jira in your life

17:11 hiredman: :)

17:12 hugod: https://github.com/arohner/clojure-contrib/tree/1.3-compat if anyone still needs it

17:12 hiredman: stuartsierra: so make it so

17:13 stuartsierra: hiredman: I can't. But someone on clojure-dev can.

17:17 arohner: stuartsierra: the code may have been abandoned by the *authors*, but not by the *community*. There are still tons of actively-used projects that still depend on contrib

17:18 stuartsierra: Then the community can continue to maintain it, or fix those projects.

17:19 arohner: stuartsierra: yes. and it's a pain in the ass, and has delayed 1.3 adoption significantly. https://github.com/arohner/prxml

17:20 stuartsierra: I don't know what to tell you. I don't have time to maintain it.

17:21 technomancy_: neither did Mark McGrangahan, yet somehow clj-http is still maintained

17:21 quite actively

17:21 TimMc: by dakrone et al, right?

17:21 dakrone: aye

17:22 stuartsierra: If you want/need something, don't rely on someone else to do it for you.

17:22 hiredman: dakrone: so I've been thinking it might be a good idea to rename the namespaces in clj-http-lite

17:22 TimMc: I think it is reasonable to expect community maintenance.

17:22 hiredman: I was thinking clj-http.lite.* no longer a drop in replacement but no collisions

17:23 dakrone: hiredman: I'd be down for that

17:23 so they could be used side-by-side

17:23 stuartsierra: TimMc: Who is this community? YOU are the community.

17:23 dakrone: would be easier to test if/when they converge/diverge

17:23 stuartsierra: No one here is obligated to do anything.

17:23 hiredman: dakrone: I dunno about side by side, just in case something transitively pulls something else in

17:23 TimMc: stuartsierra: I think you misunderstood me -- I agree with you.

17:23 stuartsierra: oh good :)

17:24 dakrone: hiredman: yea, the only person who would use them side-by-side probably would be me, and that would be to make sure they lined up

17:24 TimMc: I wanted clojure.contrib.import-static, so I started hacking on it.

17:24 stuartsierra: Now that was just a bad idea of mine.

17:24 TimMc: stuartsierra: How so?

17:25 stuartsierra: copies.

17:25 TimMc: Expand?

17:25 stuartsierra: It creates new Vars, copying the values from static constants.

17:25 The new Vars are not constants, so the JVM can't inline them.

17:26 TimMc: Ah, I see.

17:26 For me, the important part is the static methods.

17:26 stuartsierra: less of a problem, but still adds unnecessary Fn wrapping.

17:26 TimMc: tmciver and I are majorly overhauling it -- it won't produce macros, but instead (where possible) inlineable functions.

17:27 proxying AFn

17:27 stuartsierra: cool

17:27 TimMc: I don't know enough about inlining yet to be *sure* this works, but it seems legit.

17:28 Should work with both 1.2 and 1.3's invokePrim stuff.

17:29 stuartsierra: g'night folks

17:29 TimMc: see ya

17:29 Also planned are renaming imports, so Math/PI could become M/PI

17:46 pjstadig: wait... i thought one of the whole points of contrib was that Clojure/core pledges to maintain it

17:50 seancorfield: technomancy: no, we retired all our scala code - replaced by clojure

17:51 technomancy: oh, ok.

17:51 but who will use my new lein-scalac plugin then? =)

17:53 seancorfield: i quite enjoyed deleting that scala code :)

17:53 and removing all the scala-related stuff from our build.xml file

17:55 pjstadig: no, clojure/core doesn't maintain contrib - clojure/dev folks maintain contrib

17:56 who is maintaining clj-http officially these days?

17:57 TimMc: seancorfield: dakrone

17:57 dakrone: seancorfield: I do

17:57 seancorfield: ah yes... thank you dakrone ! i use that heavily at world singles - very nice!

17:57 dakrone: glad to hear it! :)

17:58 seancorfield: i ended up with mark's clj-time (because i needed it to run on 1.3)

17:58 dakrone: heh

17:58 seancorfield: but i'll be honest - i use date-clj more because it works with jdbc

17:59 i'm trying to switching our code base over (since clj-time can convert to/from regular dates and it's so much nicer for date arithmetic etc)

17:59 over to clj-time from date-clj i should say

18:01 TimMc: What is World Singles?

18:02 seancorfield: Internet dating

18:02 we have 50+ niche sites, mostly ethnic verticals

18:02 ten are on our new platform that uses clojure, the rest should be migrated within a few months

18:03 TimMc: Nice.

18:03 Met my fiancée on OKCupid

18:03 seancorfield: are you going to Clojure/West? i'm talking about World Singles there

18:04 TimMc: Nah, I'm in Boston.

18:04 seancorfield: i met my wife on usenet :)

18:04 TimMc: sweet

18:04 seancorfield: i was living in england back then, she was in california... i moved...

18:05 TimMc: (Note: I no longer recommend OKCupid -- they've really changed from 5 years ago.)

18:05 seancorfield: i highly recommend the world singles sites :) (of course)

18:06 several of our customer service reps are former customers (they liked the brand so much they joined the company :)

18:06 Scriptor: heh, clojure/west falls on st patrick's day

18:06 seancorfield: and our head of HR met our CEO on one of our sites (before she joined the company)

18:07 TimMc: Scriptor: Oh man, I have to be in Boston for St. Patrick's Day ^W^W^WEvacuation Day!

18:07 Definitely can't make it.

18:08 Scriptor: hah, even better!

18:08 seancorfield: i couldn't believe my eyes the first time i experienced St Paddy's Day over here... insane!

18:08 TimMc: It's pretty weird, yeah.

18:08 seancorfield: i was born and raised in N. Ireland and it's nowhere as big a deal over there

18:09 Scriptor: well, it's the same deal with cinco de mayo

18:09 TimMc: From my perspective, a bunch of people wear green and puke green, and then things go back to normal.

18:09 seancorfield: lol

18:09 TimMc: (all the green beer, you see)

18:10 seancorfield: ned: btw, i'm back (he announces, redundantly) if you want to chat about metadata :)

18:10 TimMc: Yet another night the roads aren't safe. -.-

18:10 seancorfield: are the roads ever safe in america??

18:10 lazybot: seancorfield: What are you, crazy? Of course not!

18:10 TimMc: haha

18:11 seancorfield: In BOston, there's a huge Irish immigrant population -- I think nostalgia contributes to the holiday's popularity.

18:11 technomancy: heh; my parents refused to teach me to drive when I was growing up; they said I had to be back in the states before I could learn

18:11 seancorfield: technomancy: where were you?

18:11 technomancy: Indonesia

18:12 TimMc: Too dangerous or not dangerous enough?

18:12 technomancy: terrifying

18:12 TimMc: You shoulda learned there.

18:12 Then you could hit Miami with *confidence*.

18:12 technomancy: assuming I survived

18:13 TimMc: I learned in a 1985 Volvo station wagon. Friggin' *tank*.

18:13 technomancy: seattle is crazy though; people don't bother speeding

18:13 it's the weirdest thing coming from California

18:14 seancorfield: i find driving over here so "zen"... big wide roads, slow speeds (even in california, to be honest), everyone stays in lane

18:15 we're considering driving to florida in a couple of weeks (cat show) because flying with cats is such a pain

18:15 Null-A: I just switched from emacs to aquatics on osx. And when I C-x C-e, it's using the current namespace in the repl to eval the last sexp. Whereas on emacs it would use the namespace declared at the top of the file where C-x C-e was used.

18:15 How do I get the latter behavior in aquatics?

18:15 aquamacs*

18:15 technomancy: aquamacs isn't very well supported; I recommend switching back

18:16 Null-A: *nods* i'm prepared to do that

18:16 TimMc: Why did you switch in the first place?

18:16 technomancy: they ship their own copy of slime iirc

18:16 seancorfield: i tried aquamacs and very quickly gave up and went with emacs

18:16 Null-A: aquatics has some slightly useful patches

18:16 i'll switch back

18:17 seancorfield: emacs 24 + marmalade repo + swank-clojure (and either starter kit or clojure mode depending on who you listen to)

18:17 technomancy: either?

18:18 seancorfield: see what i mean?

18:18 everyone has a different opinion :)

18:18 Null-A: 24 works well?

18:18 time to upgrade

18:18 technomancy: 24 is great

18:18 seancorfield: that's why it's so hard to get up and running with emacs - there's as many different instructions as there are emacs users :(

18:18 ned: seancorfield: could you pastebin some demo code (a few tens of lines) to lead me in the right direction (if you remember my project reqs)

18:18 seancorfield: 24 has package management built in

18:19 ned: seancorfield: that might be asking too much, if you could point me in the right directoin that'd be good too

18:19 basically i want dynamic ability to add fields to each "customer" or whatever, and have persistence to mongodb.

18:19 seancorfield: ned: well, we have some fixed-schema database tables that describe the fields each "object" has - enough data for display and validation

18:20 ned: ehh the problem is its more of a dynamic schema, we dont know when fields are going to be added, and we dont want to deal with migrations (if we can avoid it)

18:20 seancorfield: then we put those fields / values in a map and save it in mongodb

18:20 ned: hm

18:20 seancorfield: the metadata has a fixed schema

18:20 the "objects" don't

18:20 ned: oh? you cant dynamically add fields to the metadata?

18:21 seancorfield: adding a new field to the "objects" is just a matter of inserting a new row of metadata

18:21 we almost never need to change the schema of the metadata

18:21 patchwork: Hey all, getting a weird error with lein:

18:21 Exception in thread "main" java.lang.NoSuchMethodError: clojure.lang.RT.keyword(Ljava/lang/String;Ljava/lang/String;)Lclojure/lang/Keyword;

18:21 It can't find keyword?

18:22 there are some other entries online about it, and I have tried all of their workarounds, but none of them fixed the problem

18:22 seancorfield: ned: does that make sense?

18:22 technomancy: patchwork: probably have code compiled with two different version of clojure in your deps

18:22 clojurebot: java.lang.NoSuchMethodError?

18:22 clojurebot: Gabh mo leithscéal?

18:22 patchwork: technomancy: How would I detect this?

18:22 or work around it?

18:22 seancorfield: patchwork: yeah, what technomancy said... i ran into that with a lein plugin that had some AOT code in it

18:22 ned: seancorfield: trying to process that. give me a few seconds.

18:22 technomancy: patchwork: maybe lein pom && mvn dependency:tree

18:24 patchwork: Hmm… that did say there is a problem

18:24 ned: seancorfield: ok so how would you add a new "row" of metadata

18:24 patchwork: 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: antler:caribou:jar -> duplicate declaration of version 0.3.0-SNAPSHOT

18:24 duplicate declaration of a snapshot version?

18:24 how does that happen?

18:24 seancorfield: ned: insert into metadata ( ... ) values ( ... ) - we keep metadata in mysql right now :)

18:25 patchwork: So how do I remove the duplicate?

18:25 odd

18:26 seancorfield: each row of metadata specifies a field (on an "object") and either describes its type / length / etc or names a function for custom validation and so on

18:27 patchwork: ???

18:27 lazybot: patchwork: Oh, absolutely.

18:29 seancorfield: patchwork: do you have any global lein plugins?

18:29 that's what bit me

18:31 technomancy: 1.7 fixes that

18:32 patchwork: Is 1.7 out?

18:33 technomancy: "soft launch"

18:33 ned: seancorfield: ok im going to process all of this.

18:33 thanks for giving me a lot to digest. im going to read docs, and ruminate.

18:34 likely going to return with a lot of questions :P

18:35 patchwork: I just upgraded to 1.7 and have the same problem

18:35 seancorfield: ned: feel free to email me directly

18:36 my email address is on the Where Did Clojure Contrib Go page if you can't guess it or find it elsewhere :)

18:36 technomancy: oh, sorry; it fixes that problem at plugin install time

18:36 so any newly-installed plugins won't cause it

18:37 patchwork: So, how do I see what plugins are installed?

18:37 lein plugin just lets me install and uninstall

18:37 seancorfield: ls ~/.lein/plugins

18:37 patchwork: Aha! So I just remove it then?

18:38 technomancy: sure

18:38 re-install the ones you actually use

18:38 patchwork: Alright, removed the one plugin in there, same problem

18:38 I didn't use it

18:38 technomancy: is it lein-marginalia?

18:38 patchwork: No it was lein-noir-1.2.1

18:38 but it is gone now

18:39 ned: seancorfield: totally appreciate it :)

18:40 technomancy: just get rid of them all and re-install the ones you use

18:40 seancorfield: patchwork: then do lein clean, deps

18:41 patchwork: I got rid of all of them

18:41 seancorfield: see what state you end up in after that

18:41 then it'll be a case of picking thru what's in your lib and lib/dev folder i suspect, looking for the culprit

18:41 patchwork: Same problem

18:42 : (

18:42 technomancy: clojurebot: lein debug is <reply>Paste the contents of project.clj and ~/.lein/init.clj along with the output of ls ~/.lein/plugins and lein version.

18:42 clojurebot: Ack. Ack.

18:42 patchwork: What would cause this result of > mvn dependency:tree ?

18:42 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: antler:caribou:jar -> duplicate declaration of version 0.3.1-SNAPSHOT @ line 58, column 17

18:43 duplicate declaration?

18:43 technomancy: hard to say without seeing project.clj

18:44 patchwork: (defproject nikebetterworld "1.0.0-SNAPSHOT"

18:44 :description "FIXME: write description"

18:44 :dependencies [[org.clojure/clojure "1.3.0"]

18:44 [antler/caribou "0.3.1-SNAPSHOT"]

18:44 [antler/sandbar "0.4.0-SNAPSHOT"]]

18:44 :dev-dependencies [[lein-ring "0.4.5"]])

18:44 technomancy: clojurebot: paste?

18:44 clojurebot: paste is gist

18:45 patchwork: Sorry, don't know the conventions around here

18:45 so you are saying use gist?

18:45 ibdknox: yeah :)

18:45 or refheap!

18:45 technomancy: yeah, best not to flood the channel

18:45 patchwork: Alright

18:45 ibdknox: http://refheap.com

18:45 technomancy: lemme see if I can repro

18:46 the-kenny-w: patchwork: The convention everywhere in irc is: Use a pastebin.

18:46 patchwork: Got it

18:47 So this only happens when I try to run a custom lein task, now that I look at it

18:47 have custom lein tasks changed somehow?

18:47 I have one called bootstrap

18:47 ibdknox: huh, never heard of caribou

18:47 patchwork: That is the project I am working on

18:48 we are building sites with it

18:48 ibdknox: it looks like scaffolding on crack?

18:48 patchwork: Yeah it is a basis for building websites

18:48 gathering all of the solutions in one place so we only have to solve them once!

18:49 ibdknox: hm

18:49 patchwork: it is a rewrite of a project that has grown long in the tooth

18:49 but at one point had about 50 sites in production

18:49 I convinced the boss to go with clojure : )

18:49 it has been great so far

18:49 except for issues like this

18:50 Yeah I have been teaching a bunch of the devs here clojure

18:50 spreading the clojure gospel, as it were

18:51 the boss likes it because it is fast!

18:51 technomancy: man, apparently I've forgotten what it's like to use maven

18:51 still downloading...

18:51 patchwork: and because we can just pass our big clients a war file and be done with it

18:51 technomancy: hm; that was anticlimactic

18:51 works fine here

18:52 patchwork: Yeah, I was saying up there, I realized it only happens with my custom lein tasks

18:52 SirDinosaur: question: how can i specify an online jar (hosted on google code) dependency in my project.clj for lein?

18:52 technomancy: SirDinosaur: get it into a maven repository

18:52 clojurebot: repeatability?

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

18:52 SirDinosaur: technomancy: is there no other way?

18:53 technomancy: there's no other good way

18:53 patchwork: technomancy: https://refheap.com/paste/696

18:53 that is my custom task in src/leiningen/bootstrap.clj

18:53 you call it like > lein bootstrap projectname

18:54 that is when it fails

18:54 technomancy: apparently you forgot to add jdbc to project.clj?

18:55 patchwork: It is a dependency of caribou

18:55 you mean in dev-dependencies?

18:55 technomancy: yeah, leiningen doesn't have access to it, so you can't use it from a task

18:57 hagna_: so say I rebind (def *bot* (pircbot)) of an already connected bot. Is there any way to get back to the original one?

18:57 patchwork: Alright here is my new project.clj with caribou in dev-dependencies: https://refheap.com/paste/697

18:57 same issue

18:59 technomancy: patchwork: oh, ok. you can't run any clojure 1.3 code in leiningen

18:59 caribou is compiled using 1.3 apparently

18:59 you can run it in your project using eval-in-project

18:59 jodaro`: drinking time!

18:59 technomancy: patchwork: or just make it a regular namespace and use lein run -m myproject.bootstrap

19:00 I recommend the lein run approach

19:02 patchwork: technomancy: So can I pass arguments in from the command line then?

19:03 technomancy: sure

19:03 patchwork: lein run -m myproject.bootstrap projectname ?

19:03 technomancy: exactly

19:03 the only downside is you don't have access to the project map

19:03 but really there's no reason db initialization needs to live outside the project

19:03 patchwork: Well, I have a whole slew of commands that people can run on the command line

19:04 I was using lein tasks for these

19:04 It is nicer to type > lein bootstrap rather than lein run -m ….

19:04 but I guess I can make my own script for this

19:04 technomancy: in lein2 you can create aliases to partially-applied tasks

19:04 patchwork: Okay, thanks for your help

19:05 is lein2 in production?

19:05 technomancy: very close to having a preview release

19:05 partial application of aliases makes me unreasonably happy

19:06 I hadn't thought of how it could be useful for lein run though; that's sweet

19:06 I'd be happy to help out with any snags if you do end up trying it

19:09 TimMc: &(println "lein-jit") ; sorry, just testing a hilight :-/

19:09 lazybot: ⇒ lein-jit nil

19:09 TimMc: I give up.

19:12 emezeske: TimMc: I had to fliddle a bunch with irssi hilights to get them how I wanted

19:13 TimMc: I was trying to do a regexp. Complete failure.

19:13 emezeske: Heh

19:13 It took me forever to keep it from hilighting the word "relevant" (it contains my first name, evan)

19:13 That word comes up a lot in programming channels, and this one in particular

19:14 TimMc: haha

19:15 Someone on another channel was having a hard time with cat -- just needed \bcat\b, but until she figured that out, she was getting all these random beeps and couldn't see why. :-D

19:17 emezeske: ^_^

19:32 originalserver: I selling dedicated servers in different countries, only windows xp, 2003,2008, seven! write who need them.

19:35 TimMc: haha

19:44 muhoo: meow

19:51 seancorfield: do we have an op around to kick/ban the spammer?

19:54 Null-A: seancorfield: When you C-xC-e does it eval the sexp in user?

19:54 after setting up emacs 24 and packages, i'm having the same problem as I did with aquamacs

19:57 seancorfield: C-x C-e seems to evaluate in the file's ns for me, not the repl's ns

19:57 how did you start the repl?

19:58 Null-A: seancorfield: slime-connect

19:58 seancorfield: maybe that's the difference

19:58 Null-A: why what did you do?

19:58 seancorfield: i use clojure-jack-in and have swank-clojure 1.4.0 in the dev-dependencies

19:58 patchwork: Also, what is up with the occasional "unable to start embedder" error with lein?

19:58 seancorfield: never seen that patchwork

20:00 patchwork: https://refheap.com/paste/698

20:00 something with a bad zip file maybe?

20:04 duck1123: did something change recently in ring that it no longer turns params into a keyword if they contain a dot with wrap-keyword-params?

20:09 Null-A: seancorfield: hm, still no luck, with clojure-jack-in

20:09 weird, I wonder what changed in my configs

20:14 patchwork: Yeah I am getting this error every time now

20:14 https://refheap.com/paste/699

20:14 is this something in lein 1.7?

20:15 when I run lein jar or lein push

20:23 Okay, it was the autodoc dependency somehow

20:26 ibdknox: so are we taking best on what the ClojureWest announcement will be?

20:26 patchwork: Okay, question: how do I run a main function that is from a dependency?

20:27 I have a dependency in my project that has a main function

20:27 but running > lein run -m package.name fails

20:27 TimMc: interesting.

20:28 patchwork: https://refheap.com/paste/700

20:28 ibdknox: bets*

20:30 amalloy: ibdknox: i think we're still in some kind of complaining phase

20:30 ibdknox: amalloy: hm?

20:30 from earlier?

20:31 by the dismissal of CinC earlier, my bet would be something along those lines

20:32 amalloy: more like "what's with all the drama around every announcement, they never tell us anything and also are never interested in accepting contributions"

20:32 ibdknox: mm

20:33 I think I've started not really caring

20:33 Got too much real stuff to worry about :)

20:50 patchwork: Is there a standard way to output code to a string that can be reread and executed again?

20:50 (str code) mostly works, but it turns lists into (), which tries to evaluate them as a function

20:50 when it is reread

20:50 and evaluated

20:51 hiredman: ,()

20:51 clojurebot: ()

20:51 mdeboard: ,'()

20:51 clojurebot: ()

20:51 patchwork: Yeah

20:51 ''()

20:52 ,''()

20:52 clojurebot: (quote ())

20:52 ibdknox: ,(doc pr-str)

20:52 clojurebot: "([& xs]); pr to a string, returning it"

20:52 ibdknox: wow that's a terrible docstring

20:53 patchwork: ,(pr-str '())

20:53 clojurebot: "()"

20:56 patchwork: Basically I need a function that will convert lists into a string with quoted lists

20:56 which (str code) does not do

20:56 does this exist?

21:02 apparently not

21:02 why would the built in "str" output something that is not evaluatable?

21:02 that doesn't make sense

21:58 muhoo: is there a way to fish the numerator and denominator out of a clojure ratio type, without converting it to a string and splitting it based on the / character?

21:58 'cause i can do that, but it feels... wrong.

22:00 ahn, nevermind, i found it

22:00 yay reflect :-)

22:00 devn: hey all -- anyone know their way around enlive?

22:00 muhoo: ,(denominator 9/14)

22:00 clojurebot: 14

22:02 devn: ,(def extracted-log-line {:tag :p, :attrs nil, :content ({:tag :a, :attrs {:name "20:46"}, :content ("20:46")} " " {:tag :b, :attrs nil, :content ("Chouser: ")} "Hm. Not exactly packed in here. Anyone paying attention?\n")})

22:02 clojurebot: #<Exception java.lang.Exception: SANBOX DENIED>

22:02 muhoo: denied!

22:02 devn: :(

22:02 So, yeah, enlive

22:02 muhoo: sanbox? is that like david sanbox?

22:03 or sandisk?

22:03 :--)

22:03 devn: If I try to run (html/select *above-line* [html/text-node])

22:03 I get "\n"

22:03 I don't know how the hell that is possible.

22:03 amalloy: $findfn 9/14 9 ; muhoo - easier to discover than with reflect

22:03 lazybot: [clojure.core/numerator]

22:04 muhoo: amalloy: wow. that's just. wow.

22:04 devn: basically I want to extract "20:46", "Chouser: ", and "Hm. Not exactly packed in here. Anyone paying attention\n"

22:05 I can't seem to figure out the right selectors to achieve that goal without doing a bunch of custom (first) (last) (nth) (:foo line) etc.

22:07 muhoo: amalloy: this? https://github.com/Raynes/findfn that's insanely cool.

22:07 devn: I've had this experience with enlive before. I know dnolen and brian marick have written tutorials but I seem to wrestle with these little subtle problems every time

22:07 amalloy: yeah. i wrote a lazybot plugin and Raynes decided (correctly) it should be its own lib

22:07 devn: </whining> -- if anyone has any suggestions or ideas let me know

22:08 muhoo: devn: sorry, i'm still getting a boner over findfn

22:08 devn: muhoo: im working on something that hopefully will give you an even bigger boner

22:08 muhoo: devn: loooks like clojurescript?

22:08 devn: :\

22:08 the boner or my project?

22:08 muhoo: that snippet you posted

22:08 the one that is failing

22:09 devn: nah, it's a node I've selected from an html document with enlive

22:09 muhoo: enlive, i see. ok.

22:09 i dunno enlive, but it looks to me like it's working

22:09 you want the line above, and it's giving you the \n, which is the last line in that text

22:10 " Anyone

22:10 paying attention?\n"

22:10 devn: muhoo: findfn is totally awesome -- what im trying to do is build that + clojure cheat sheet explorer + example finder via clojuredocs, irc

22:10 muhoo: the \n is the last line, no?

22:10 devn: muhoo: yes, but i would expect it to return that entire text-node

22:10 not just the \n

22:11 muhoo: i guess it doesn't

22:11 look at the docs or source of enlive?

22:11 devn: yeah im there, cgrand is just way smarter than me

22:11 muhoo: &(source html/select)

22:11 lazybot: java.lang.RuntimeException: Unable to resolve symbol: source in this context

22:11 devn: muhoo: i have (:require [net.cgrand.enlive-html :as html])

22:12 you wont be able to do that in here

22:13 muhoo: have you tried getting ALL the lines above, not just the last one?

22:13 devn: *nod* -- i think i may have a clue -- i think i need nested []'s

22:14 "A trickier to translate CSS selector is a[href] which is [[:a (attr? :href)]]"

22:18 muhoo: wow, it's only 2 files?!

22:18 like 1000 lines, that's it? woww.

22:18 devn: muhoo: findfn?

22:19 muhoo: no enlive!

22:19 the whole thing is > 1000 loc

22:19 sorry < 1000 loc

22:19 devn: yeah cgrand is awesome. his blog about clojure was like a giant pile of "i'm never going to be good enough"

22:19 for me

22:19 muhoo: it is (< 1000 loc )

22:20 devn: i've heard the remark that 500 lines is the sweet spot for most well-written clojure libraries

22:20 it seems like that's enough to construct a full DSL for most problems you're trying to solve

22:20 muhoo: duh (> 1000 loc )... gawd i suck.

22:22 ok

22:22 it looks like html/select "Returns the seq of nodes or fragments matched by the specified selector."

22:22 so, maybe it is returning all the lines

22:23 and, your repl is only printing the last one

22:23 of the seq

22:24 devn: i dunno what a fragment is, but maybe it considers that \n to be a fragment?

22:30 devn: muhoo: i dont think that's right

22:31 muhoo: i'm consciously only selecting the first of the returned nodes from the seq of nodes i've narrowed down to

22:52 muhoo: does it pop them in reverse order?

22:53 maybe you're pulling the last one off, which is the \n, and the previous ones are the other lines of the text in reverse order?

22:53 i'm taking wild-ass guesses here; i haven't used enlive yet.

23:00 Raynes: Someone who has used hg: ping me.

23:06 Actually, never mind. Figured it out.

23:06 For the curious, hg log sucks. I was trying to figure out how to make it stop sucking.

23:06 --limit helped.

23:06 * muhoo sticks close to his git.

23:07 Raynes: So do I. Unfortunately, Pygments does not.

23:07 amalloy: seems like you meant to ask that in #hg, bro

23:07 Raynes: amalloy: l wouldn't dare. The people in #git would never forgive me.

23:07 amalloy: none of them will ever find out. there's 0% overlap in membership

23:08 muhoo: who has time to monitor irc channel membership for ideological purity?

23:08 Raynes: muhoo: I know you wander into #scala every once in a while. I've got your family.

23:09 muhoo: anyway, back kind of on topic, trying to get pomegranate to run, no love.

23:09 Raynes: muhoo: What's wrong?

23:09 muhoo: Caused by: java.lang.Exception: Couldn't connect

23:09 Raynes: Besides the fact that I just threatened the well being of those you love.

23:09 Oh, connect to the internet. ;)

23:09 What are you trying to do?

23:09 muhoo: it wants monads

23:10 no, it can connect to the interent just fine

23:10 Raynes: https://refheap.com/paste/701

23:10 wtf are monads?

23:10 Raynes: I wonder who got 700.

23:11 muhoo: it keeps kicking me in the monads

23:11 Raynes: Well, it looks like it got monads.

23:11 Is that the whole stacktrace?

23:12 muhoo: more or less, the rest is here: https://refheap.com/paste/702

23:13 Raynes: Okay, this is lein 2?

23:13 Nope.

23:13 muhoo: no this is old lein

23:13 Raynes: poll_repl_connection

23:13 Yeah, I rewrote this task in lein 2. I automatically assume any problems are a result of me breaking shit.

23:13 muhoo: heh

23:13 Raynes: Yeah, I don't know. technomancy? ^

23:14 muhoo: is it a lein problem? or pilot error?

23:14 Raynes: It looks like a lein problem.

23:14 Or at least some weirdness.

23:14 It means that the repl is trying to connect but can't connect in time.

23:14 muhoo: connect to what?

23:15 clojars?

23:15 Raynes: No, the repl.

23:15 Haha, what I said doesn't make sense.

23:15 muhoo: the repl is trying to connenct to the repl

23:15 Raynes: Leiningen starts a repl on a socket and then connects to that.

23:16 muhoo: ah, cool, thanks. i've been wondering how it does stuff.

23:16 this machine is barely able to keep up with java

23:17 so it wouldn't be surprising if, by the time the jvm starts up, everyone has already gone home and gone to sleep.

23:17 pomegranate brings in an insane amount of crap

23:17 Raynes: Yeah, but that never actually happens.

23:17 muhoo: aether, sonatype, yikes.

23:18 Raynes: is it in the shell script? maybe i could stick some sleeps in there and try to get it to be more patient.

23:19 Raynes: Nope.

23:19 muhoo: oh, LEIN_VERSION="1.6.2", FYI

23:22 hmm, it works now

23:22 third try is the charm?

23:29 now i gots this: https://refheap.com/paste/703

23:29 sorry for being such a clueless louis here.

23:32 i can find the "artifact" just fine with a browser. but pomegranate can't? http://search.maven.org/#artifactdetails%7Corg.clojure%7Cmath.numeric-tower%7C0.0.1%7Cjar

23:36 clearly, i am a moron.

23:40 ldopa: is there a replacement for to-byte-array in 1.3 (specifically, for File) ?

23:59 seancorf: ~log

23:59 clojurebot: log is forget where

23:59 seancorf: unhelpful

Logging service provided by n01se.net