#clojure log - Nov 06 2012

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

0:00 amalloy: Sgeo: a change to use mexpand-all in clojail should be pretty simple. why don't you send a pull request?

0:00 Sgeo: Because I haven't looked at the Clojail source at all

0:08 holo: hi

0:11 i have a defmulti. its defmethods make a completely different task from each other. i notice only the defmulti supports docstring, even though its name can be self describing, but defmethods don't support it, and the name of the defmethods are all the same, so why the docstring isn't available to describe each one?

0:12 technomancy: holo: defmulti creates a var; defmethod does not

0:12 holo: maybe i have a code smell, and the reason doing too different tasks

0:13 technomancy: where would the defmethod docstring live?

0:13 holo: technomancy, i see

0:14 thanks

0:15 technomancy: np

0:20 amalloy: interestingly, Sgeo, (mexpand '(.foo bar)) => (.foo bar), whereas (macroexpand '(.foo bar)) => (. bar foo)

0:21 meaning it's not as easy as just using mexpand

0:57 technomancy: (ns ns.excluder (:refer-clojure :exclude [ns])) (resolve 'ns) ; -> #'clojure.core/ns

0:58 what are you doing here, ns. no one invited you to this party.

0:58 ajmccluskey: I'm very new to Clojure and am looking at introducing some basic logging to my app. Does everyone just use clojure.tools.logging?

0:59 amalloy: technomancy: i noticed today that load-file is a compiler special

0:59 technomancy: ajmccluskey: no, tools.logging inherits a lot of unnecessary JVM craziness

0:59 * technomancy just uses println but would probably benefit from looking into timbre

0:59 ajmccluskey: mmm, it was confusing the heck out of me

1:00 unlink: ajmccluskey: it depends what you want. if you want to control your logging the same you you control, e.g., tomcat's logging, then yes.

1:01 ajmccluskey: but if you want to use it I hope the idea of a logging facade doesn't scare you

1:02 ajmccluskey: To give some more context I'm writing a web app using Noir. I guess I'm used to log4j. I like having a config file and different log levels.

1:02 unlink: ajmccluskey: I personally just use tools.logging with logback-classic.

1:03 ajmccluskey: technomancy: I'm checking out Timbre now

1:03 unlink: the thing that confuses me most about tools.logging is that you don't choose your implementation, yet can make use of the implementation - e.g. log4j configs

1:04 unlink: unless I'm missing something, which is entirely likely

1:04 unlink: timbre looks decent if you want something that is essentially JVM-agnostic

1:04 ajmccluskey: yes, it transparently chooses an implementation based on its own heuristics and what is available.

1:04 ajmccluskey: unlink: by "make use of the implementation" I mean implementation specifics

1:05 unlink: I guess I disagree with that approach without some sort of common interface to things like config files

1:06 WokenFury: we used timbre for a while but started running in to a lot of limitations, especially when using 3rd party java libs

1:06 logback is pretty easy to integrate: https://github.com/vaughnd/clojure-example-logback-integration

1:07 I'd suggest sending your logging calls through macros in your project ns so you can switch easily: https://github.com/vaughnd/clojure-example-logback-integration/blob/master/src/clojure_example_logback_integration/log.clj

1:07 unlink: ajmccluskey: if you know the heuristics, namely, slf4j > commons-logging > log4j > j.u.logging, IIRC, then it's just like using a facade.

1:08 technomancy: WokenFury: what kind of problems?

1:09 ajmccluskey: WokenFury: I think macros is a good idea given how new all of this is to me. Will have to finish reading "Programming Clojure" so I understand the ins and outs of macros :p

1:10 unlink: ajmccluskey: my rule of thumb about macros is that you should use them if you want to extend the language, and never else.

1:10 ajmccluskey: unlink: maybe my problem is that I don't understand the heuristics enough to control which implementation I get. Maybe I should work on that, but I guess from a philosophical point of view I don't think I agree.

1:10 WokenFury: technomancy: not problems, limitations. we're using Datomic so we need to control its logging. and I like using Pallet to slot in different confs depending on environment

1:10 unlink: ajmccluskey: I don't agree either. But it works well enough, it doesn't change often, it's simple and open source, and it's well enough supported, so I use it.

1:11 technomancy: ajmccluskey: if you need to control the logging behaviour of 3rd-party libs that use tools.logging, there's no avoiding it. but if it's just your own code I recommend you stick with something simpler.

1:11 ajmccluskey: unlink: fair play. I may well go down that path too

1:11 technomancy: ajmccluskey: with leiningen we get by with just (defn info [...]) and (defn debug [...]) that check dynamic binding before calling println

1:12 unlink: ajmccluskey: the reason for that rule of thumb is that by writing macros, you write code that is called by the compiler, not called by normal code. consequently macros are not first class.

1:12 technomancy: even doing simple things like changing the log level at runtime is a world of pain with tools.logging

1:13 ajmccluskey: technomancy: I'm new to this whole ecosystem and still getting my feet wet, so not sure if I'll end up having to control 3rd party logging.

1:13 WokenFury: technomancy: agreed. you have to dig deep into the Java code for that. I must add that to my example

1:14 technomancy: WokenFury: IIRC it's not possible to do consistently across backends

1:14 unlink: perhaps my imagination is limited, but that sounds like a very strange requirement.

1:14 amalloy: indeed it's not

1:14 ajmccluskey: unlink: I have heard that a lot of newcomers to Lisp get excited and overuse macros, and I'm probably a likely candidate. I should try to exercise restraint.

1:14 WokenFury: technomancy: yeah, you'd need to implement for each backend. but I just stick to logback and simplify my life

1:15 technomancy: unlink: not at all; you could have a live cluster and you want to debug it but you can't afford to redeploy.

1:15 unlink: ajmccluskey: no you should definitely write many macros. they are very fun to write. just make sure you that you do it at times that it's appropriate to be changing the programming language :-)

1:15 technomancy: WokenFury: no, I mean certain backends simply don't support it

1:15 WokenFury: ajmccluskey: don't think you need macros here. just a wrapper so you don't have to refactor your entire code base when changing logging implementations

1:16 technomancy: what madness is this? pretty sure log4j, logback, and sfl4jwhatsit support it?

1:16 unlink: technomancy: I guess my logging disipline is so ingrained with that architectural limitation that I've never wanted to do that.

1:16 technomancy: WokenFury: someone told me it was impossible with slf4j

1:16 I've never seen any code that uses logback

1:17 WokenFury: technomancy: gross. think I'll avoid slf4j then

1:17 unlink: WokenFury: slf4j is a facade

1:18 technomancy: so... https://github.com/Seajure/metaverse

1:18 WokenFury: https://github.com/vaughnd/clojure-example-logback-integration/blob/master/src/clojure_example_logback_integration/log.clj#L4

1:19 unlink: WokenFury: you don't just use slf4j, you use slf4j and some concrete implementation as well, logback and log4j being popular choices.

1:19 WokenFury: that's how I change log levels in logback.

1:20 unlink: I can see how it starts getting overly complicated

1:20 technomancy: only on the JVM do you have more adapter/facade libraries than actual implementations...

1:20 also: the s in slf4j stands for "simple"

1:20 WokenFury: lol. too true

1:20 technomancy: which is always a disturbing sign

1:21 WokenFury: I've been pretty happy with logback after far too much log4j pain over the years

1:21 unlink: technomancy: from what I hear, .NET has a proliferation of them as well.

1:21 WokenFury: and I need the syslog appender

1:22 unlink: when I discovered it, logback was like an answer to my prayers

1:25 technomancy: so with metaverse you can load multiple versions of a clojure library into the same JVM

1:25 Sgeo: technomancy, ooh what? Sounds cool

1:27 amalloy: usually the next step after loading multiple versions is sadness, one way or another

1:28 technomancy: well, I only have it working on namespaces

1:28 so classes are a lot more complicated

1:30 but there's no reason why you couldn't load every version of (say) hiccup into a single process

1:30 amalloy: of course. it's all possible, but in practice making it work is really hard. you might as well just use osgi, who've been working on the same problem for a lot longer than metaverse has

1:31 technomancy: osgi is completely baffling

1:31 I can't even begin to understand what it's for

1:32 anyway, clojure namespaces are first-class, so they're way easier to work with

1:36 it is kind of interesting to note that there are only 3 libs in the top 20 that don't have java dependencies

1:36 and one of them is swank =(

1:40 http://wondermark.com/184/

1:43 xeqi: technomancy: is metaverse a start on checksumed namespaces?

3:54 ajmccluskey: unlink and WokenFury: thanks for the discussion on logging. I've got logback working through tools.logging now. Despite the philosophical grievance it seems to fit pretty easily with my previous logging experience.

3:55 technomancy: you too. Thanks.

3:55 WokenFury: ajmccluskey: great! yeah, coming from the java world I like leveraging existing java libs because I know they're battle-tested

3:58 ajmccluskey: Agree. It's a big competitive advantage for Clojure that it works so easily with decades worth of Java resources.

3:58 I feel like I've gotten somewhere, so off to have a scotch :p. Thanks again. Bye all!

4:00 WokenFury: enjoy!

4:03 anyone using Pallet? struggling like mad to run 'lift' against specific nodes

4:14 clgv: Did Clojure 1.3 disable metadata on function-instances? I have a macro which puts metadata on the var and on the `fn` object. but the fn object doesnt seem to keep that meta in 1.3

4:16 Raynes: 1.3 pretty much broke and killed everything. I say we forget it ever happened and pretend they jumped from 1.2 to 1.4.

4:17 clgv: Raynes: lol right. but that breaks it as well, doesnt it

4:17 I see no note in the changelog on reversing that behavior...

4:19 Raynes: &(meta (with-meta (fn []) {:foo true}))

4:19 lazybot: ⇒ {:foo true}

4:19 Raynes: &(clojure-version)

4:19 lazybot: ⇒ "1.4.0"

4:20 clgv: Raynes: ah ok, thats what the changelog means with "explicitly supplied". so adding it to the fn form is considered implicit, I guess

4:26 &(meta (fn {:foo true} []))

4:26 lazybot: java.lang.UnsupportedOperationException: nth not supported on this type: PersistentArrayMap

4:26 clgv: &(meta (fn ^{:foo true} []))

4:26 lazybot: ⇒ nil

4:40 clgv: Raynes: I think I found a portable way since I was tearing apart the defn macro anyway ;)

4:55 amalloy: clgv: (meta (fn ^{:foo true} [])) should return nil in any version of clojure ever, right?

5:00 clgv: amalloy: yes. that was a weird idea since there is no symbol that might be passed to a def ;)

5:00 amalloy: really, just use with-meta

5:01 clgv: amalloy: my macro now finally expands to (list 'def (with-meta func-symb meta-map) `(with-meta (fn ~@func-body-list) ~meta-map)) similar to what defn does in the end

5:01 amalloy: hurrah!

5:02 clgv: I only use it for functions that are given in a configuration to at least check for arity.

5:03 it provides an adjust partial function as well...

5:03 *adjusted

5:10 balint: hey, I'm looking for an idiom for a common use case

5:10 I want to find an element in a sequence for which a given predicate (that returns true of false) holds true

5:11 clgv: balint: only one or all?

5:11 balint: I do something like this: (some #(and (pred %) %) sequence)

5:11 but it feels awkward

5:11 clgv: only the first one

5:11 nicl: Hey all, wondering what the recommended setup is for Emacs? I have clojure mode installed, but what is the best repl solution? I had a look here http://dev.clojure.org/display/doc/Getting+Started+with+Emacs and it seems like I probably want inferior lisp mode. But I don't know how to set this up using Clojure. Any tips?

5:12 clgv: balint: if you do it like that better use #when (pred %) %)

5:12 amalloy: clgv: no difference at all

5:12 clgv: balint: otherwise you could not return an element that is false or nil

5:12 amalloy: oh, i see. sorry

5:13 ejackson: nicl: check out https://github.com/overtone/emacs-live

5:13 clgv: balint: if lazy behavior is no problem first+filter is an idiomatic choice

5:13 amalloy: wait it's kinda late at night. they're both the same, right?

5:13 Raynes: balint: (first (filter pred sequence))

5:13 nicl: ejackson: will have a look

5:14 amalloy: balint: you could also start with (defn check [pred] (fn [x] (when (pred x) x))) (some (check pred) coll)

5:14 balint: clgv: oh, I see, for a false or nil element, the predicate might return true but the some will still filter it out

5:14 so I think it makes no difference

5:14 clgv: oh right ^^

5:14 Raynes: amalloy: Am I missing something? Isn't this just (first (filter ..))?

5:15 clgv: I only considered that treacherous `and` ;)

5:15 amalloy: Raynes: sure, it is

5:15 balint: I like the (first filter …) approach

5:15 amalloy: first/filter is probably best. but HOFs get me excited

5:16 nicl: ejackson: ok, looks like nrepl is used for REPL stuff.

5:16 clgv: but soem has the charm not to do anything lazy - which is useful in some situations^^

5:16 nicl: ejackson: will check it out. Thanks

5:16 balint: amalloy: HOFs?

5:16 Raynes: balint: Higher order functions.

5:16 clgv: *some

5:16 Raynes: Functions that take other functions as arguments.

5:16 clgv: .. or return functions

5:19 amalloy: clgv: huh? some is exactly as lazy as first/filter

5:20 clgv: amalloy: no. it is a plain recursive function without any lazy stuff

5:21 amalloy: so? it eagerly evaluates enough of the input sequence to return you a single item, exactly as first+filter would

5:21 clgv: amalloy: but filter adds additional lazy overhead, right?

5:21 amalloy: *shrug* it adds some allocations, yes, so it's less efficient. but that's not the bottleneck, and i wouldn't describe that as "not doing anything lazy"

5:22 clgv: amalloy: if you have a bottleneck with that code it's nice to know what makes the difference, no?

5:23 Raynes: You both hate being wrong, don't you?

5:23 clgv: well, I had to explain what I meant, since I was not that specific on the first comment ;)

5:25 balint: thank you, guys, btw :)

5:25 Raynes: s/explain what I meant/make sure I could not be perceived as incorrect/

5:25 ;po

5:25 amalloy: clgv: what makes the difference will never be the overhead of creating a single cons cell

5:25 clgv: Raynes: was it incorrect?

5:25 amalloy: which is all that first/filter will create

5:25 maybe two, i guess. but not n

5:25 Raynes: I guess not, semantically.

5:30 clgv: amalloy: well if the predicate matches on the n-th element for n=1000000 it is a facto 2 difference

5:32 amalloy: i think you're right with the current implementation of filter, since apparently it makes a new lazy-seq even if there's no element to return

5:32 it doesn't have to be so careless, though, as far as i can tell. it could just tail-recur

8:49 Chiron: Hi, i added this to project.clj :plugins [[lein-scalac "0.1.0"]]

8:49 but it is not getting fetched

8:49 my lein 1.7.x

8:50 clgv: Chiron: well you use lein2 syntax

8:50 Chiron: what lein1's?

8:50 clgv: Chiron: in lein 1.7.x you need to install plugins. see its readme

8:50 Chiron: I think it was something like "lein plugin install ..."

8:51 Chiron: actually it says "Add [lein-scalac "0.1.0"] to :plugins project.clj. (Or :dev-dependencies on Leiningen versions earlier than 1.7.0)"

8:53 clgv: Chiron: hmm :dev-dependencies could works also...

8:54 Chiron: I'd read the README on that ;)

8:55 Chiron: ,:true

8:55 clojurebot: :true

8:56 Chiron: clojurebot: if you make yourself more than just, if you devote yourself to an ideal. then you will become something else entirely

8:56 clojurebot: Something weird that I noticed: & (use '[clojure.contrib.json :as json]) & &| (json/pprint-json nil) |&

8:56 lazybot: java.lang.RuntimeException: No such namespace: json

9:00 clgv: uhhh bad chain ;)

9:28 deg: How can I, idiomatically and concisely, print a list with dashes between the elements, but not after the last element? That is, like (doseq [x [1 2 3]] (printf "%s-" x)), but with no trailing dash.

9:30 ohpauleez: deg: You can use clojure.string/join and then print

9:30 deg: Thanks. join is exactly what I need.

9:31 ohpauleez: No problem, happy to help!

9:35 clgv: does type hinting work at all when I use a function first-class and pass it to another function?

9:35 ejackson: ohpauleez: I always forget join, and and up using interpose :)

9:36 ohpauleez: clgv: Type hinting only works on Java interop, otherwise it's ignored. If you pass a type-hinted function around, it should type hint when applied (ala HOF)

9:37 ejackson: There's a kibit rule for that :)

9:37 clgv: ok I was not specific enough: I meant primitive type hinting

9:37 ejackson: there should be kibit for any code written by me !

9:37 ohpauleez: haha

9:39 ejackson: clgv: i dunno, be interested when you find the answer though :)

9:43 ohpauleez: clgv: You mean to unbox something so it's only a primitive?

9:44 clgv: no. primitive type hints for functions that have been introduced with 1.3

9:45 ohpauleez: right with the numerics stuff

9:45 clgv: I wonder if I have (defn ^double f [^double a, ^double b] (+ a b)) and do something like (let [g f] (g 1.0 2.0)) whether that works right without boxing

9:45 but I do not know how to check

9:46 ohpauleez: boxing occurs

9:47 ejackson: with timing ?

9:47 clgv: ejackson: you mean the same setup with and without typehints? hmm that could work

9:47 ohpauleez: how do you know?

9:48 ejackson: clgv: yeha

9:48 ohpauleez: clgv: By default, even if you type hint primitives, Clojure passes objects to a function

9:49 and unless you package up the data in the let block, your floating points will be objects

9:49 so the hints are ignored

9:49 clgv: ohpauleez: oh thats not true. with type hinting from 1.3 on it wont box if I call f directly

9:50 ohpauleez: clgv: How did you confirm that?

9:51 clgv: ohpauleez: thats the feature of the new numerics since 1.3 - it's in the description and you can confirm via reflection for (defn f ^double [^double a, ^double b] (+ a b)) there is the method: invokePrim : double (double,double)

9:52 ohpauleez: hmm, well in that case I'm willing to wager there is no boxing in the let block you presented

9:53 clgv: depends on how the decision is made on call site. if it depends on the variable there might be.

9:56 ohpauleez: clgv: Thanks for reminding me about the primitive type hints

9:57 (I just reread the docs on the wiki)

9:57 clgv: ohpauleez: np ;)

10:03 oh grepcode.com loads forever on clojure.lang.Compiler.java

10:04 _francis: I'm googling around for how I would go about setting up an SFTP server with clojure and not finding much - could someone point me in the right direction?

10:04 clgv: _francis: you want to implement an SFTP server with clojure?

10:05 _francis: clgv: I would like to be able to boot and then destroy an SFTP server at will from clojure

10:06 clgv: _francis: well clojure.java.shell should be able to help you with that

10:07 _francis: clgv: thanks

10:07 ohpauleez: Or you can use interop and launch a java-based SFTP

10:39 clgv: ohpauleez: ejackson: ok it seems to work.

10:39 ohpauleez: clgv: Ahh cool, good to know

10:42 clgv: my test case is the following: https://www.refheap.com/paste/6448

10:44 konr_trab: It seems that I cannot comment the string "\." with #_; just wondering if this is a bug worth reporting

10:44 clgv: konr_trab: you mean like #_"\." ?

10:47 jkkramer: konr_trab: "\." is not a valid string

10:48 #_ can only comment readable forms

10:48 clgv: ,#_"\\."

10:48 clojurebot: #<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: EOF while reading>

10:48 clgv: &#_"\\."

10:48 lazybot: java.lang.RuntimeException: EOF while reading

10:48 clgv: hehe

10:51 antoineB: ,(comment (+ 1 1))

10:51 clojurebot: nil

10:51 antoineB: ,(comment "\.")

10:51 clojurebot: #<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: Unsupported escape character: \.>

10:52 antoineB: ,(comment "\\.")

10:52 clojurebot: nil

10:56 clgv: ,;"\."

10:56 clojurebot: #<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: EOF while reading>

10:58 antoineB: ,(+ 1 1) ;"\."

10:58 clojurebot: 2

10:59 antoineB: #_"\\." (+ 1 1)

10:59 ,#_"\\." (+ 1 1)

10:59 clojurebot: 2

11:06 konr_trab: Strange... so #"\." is a valid regexp and "\." isn't a valid string

11:08 lucian: makes sense. it's the same in languages with raw strings (like python)

11:10 antoineB: in string "." is a dot, but in regex it is every_char_expected_newline

11:17 deg: Can I put a docstring in a defmethod?

11:19 jweiss: anyone ( Raynes amalloy_ ) know how to get lazybot to understand that it's been disconnected and reconnect automatically? on our internal irc server he never reconnects on his own

11:25 jkkramer: deg: nope, only on defmulti

11:35 ibdknox: New Light Table: http://www.chris-granger.com/2012/11/05/meet-the-new-light-table/ :)

11:36 llasram: ibdknox: Just saw! Video looks great. What would be the best way to request a 64-bit Linux build? -- github issue?

11:37 ibdknox: llasram: it's coming, but an issue seems appropriate

11:37 llasram: ibdknox: cool beans

11:37 ibdknox: llasram: does Linux not let you run 32 bit apps on 64 bit?

11:38 llasram: ibdknox: You can, but you need 32-bit versions of all the libraries a given applications links to

11:38 ibdknox: ah

11:38 was unaware

11:38 I will try to expedite that process

11:39 llasram: Awesome

11:41 ejackson: ibdknox: playing with it now - sweet

11:45 clgv: ibdknox: lighttables with binaries know - what language do you use now for development?

11:46 ibdknox: clgv: all CLJS :)

11:46 it's running on top of a really neat project called node-webkit which is the node runtime embedded in chromium

11:47 clgv: and that one induces the 32bit/64bit above?

11:48 Chiron: Hi, any idea why lein isn't able to get [clj-http "0.5.6"] ?

11:49 ibdknox: clgv: yeah

11:49 chromium

11:49 clgv: kk

11:49 Chiron: cheshire:cheshire:jar:2.0.2 dependency is preventing clj-http from completion

11:49 scottj: ibdknox: have you built anything reusable for making cljs node-webkit apps?

11:52 ejackson: ibdknox: large vectors seem to upset it. (time (reduce + v)) where v is length 1e7 reports execution of 1 few ms, but takes some seconds.

11:52 and lost of CPU :)

11:53 ibdknox: ejackson: I wonder if you hit a bug in the cljs reader/javascript

11:53 it's probably trying to parse a number that it can't

11:53 ejackson: maybe: does it throw exceptions somewhere I can look ?

11:53 ibdknox: if that were the case, (pr-str ) might fix it?

11:53 matt444: I have a file that is not being compiled... I've tried rm -r target/*; lein clean; lein deps; lein compile

11:54 ejackson: it comes up with answers that look correct, but takes absurd time

11:54 anyway, that's it from me corner case.

11:55 ibdknox: llasram: http://temp2.kodowa.com.s3.amazonaws.com/playground/bins/LightTableLinux64.tar.gz

11:55 64 bit linux

11:55 llasram: Wow, that was fast :-)

11:57 DaReaper5: I am having an issue using leiningen to compile java files. Is this the proper IRC to ask about this?

11:58 S11001001: DaReaper5: sure

11:58 ~ask

11:58 clojurebot: Titim gan éirí ort.

11:58 DaReaper5: When I use lein compile or lein javac to compile a java file it gives me an error:

11:59 public class HelloTest (pointing at "c" in "class")

11:59 this seems very odd to me

11:59 S11001001: DaReaper5: https://www.refheap.com/paste

12:00 DaReaper5: true

12:00 one second

12:00 llasram: ibdknox: I hate to contribute to the impression that Linux is a difficult platform to support, but that build of LightTable requires libc6 2.14, whereas even Debian wheezy (testing) has only 2.13

12:01 ibdknox: llasram: haha it used to be windows that was going to be the death of me

12:01 DaReaper5: https://www.refheap.com/paste/6450

12:01 antoineB: just use a vm :/

12:02 * DaReaper5 eye twitches

12:02 DaReaper5: been working at this for a while

12:03 S11001001: DaReaper5: ls -alR target

12:03 DaReaper5: it's just pointing there because it didn't decide to open a file for writing until it got there. Each java source produces class files according to class declarations, not mere presence of a file (an empty java source produces no files)

12:04 llasram: ibdknox: Welcome to -- the future! Looks like the Ubuntu LTS release from April has a sufficiently-recent libc, but that was the first. Not sure which distros you have intent to support

12:04 scottj: debian stable!

12:05 ibdknox: llasram: I'm not a linux guy, do you know of any resources that might talk about the way for me to get this working on most distros?

12:06 or is that a pipe dream?

12:06 without going one by one

12:09 DaReaper5: S111001001 ls -alR target shows all the class files from the dependencies indicated in project.clj. Also, from your next message are you trying to say that it is point there just cause and it did not actually open the file? "Didnt decide to open afile for writing until it got there" is confusing me a bit. And yes I understand how classes are produced in java, just usually i dont have headaches with compilation/compilers.

12:09 llasram: ibdknox: I'm afraid I don't. In general, in general I think that'd be fairly pipe-dreamy, but for something as incredibly stand-alone as LightBox, it should mostly be a case of not linking to any libraries newer than your supported platforms provide.

12:10 S11001001: S11001001: the error "happened" there because it had no reason to try opening a file until it got there

12:10 dammit what

12:10 DaReaper5: ^^^

12:10 DaReaper5: if your irc client is sane it has tab complete :)

12:11 llasram: ibdknox: My off-the-cuff proposal would be to run on the oldest Ubuntu LTS version still receiving desktop support. That's older than both the current Debian stable and oldest still-supported Fedora release.

12:11 S11001001: DaReaper5: and you should check the permissions of those files, and, uh, why are you extracting the dependencies?

12:11 DaReaper5: unfortunatly i am using irc2go which does not have tab complete. I do not think i can access this irc through mibbit (my main client)

12:11 scottj: ibdknox: debian stable uses libc6 2.11 fwiw

12:11 ibdknox: llasram: yeah, sounds like the right way to go

12:12 scottj: righto. I will make sure it gets back at least that far :)

12:12 llasram: scottj: And so does Ubuntu Lucid, which is the aforementioned oldest still-supported LTS release

12:12 anyway, lunch EST. Thanks for humoring Linux, ibdknox :-)

12:13 DaReaper5: S11001001 i have a feeling that it may be permissions so i have my backend guy trying to get java file compilation working (but i am impatient). Also, I have dependencies taht are being extracted because I am trying to add a feature to an existing clojrue web server.

12:14 S11001001: DaReaper5: dependencies get mixed fine with uberwar; no need to explode the jars into the compilation target directory

12:15 DaReaper5: I will inquire to my backend guy about this.

12:16 However, all I want to do is have a core.clj file use my java file :). I think the best way of going about this is through lein compile.

12:16 I cannot find a good tutorial online for this

12:17 Am I right in my presumtions that all i have to do is specify the java directory and then compile

12:17 S11001001: DaReaper5: you explode the jars and the jar explosion process creates the dirs with the wrong permissions oh and by the way the existing classfiles and those written by javac/clojurec can arbitrarily collide

12:17 recipes for disaster

12:18 dnolen: ibdknox: congrats! can't way to get a free second to play w/ the new LT

12:18 ibdknox: dnolen: thanks!

12:18 DaReaper5: but wouldn't they collide if they have the same name?

12:18 ibdknox: I will likely soon pass out :)

12:19 S11001001: DaReaper5: yeah. But with uberjar they don't arbitrarily collide, they collide in a specific way

12:20 DaReaper5: sorry what is uberjar?

12:20 i thought that was the jar that was created from everything

12:20 including what lein compiles

12:21 emezeske: ibdknox: You could always statically link if compatibility is your concern

12:21 ibdknox: Although that will bump the file size

12:21 ibdknox: emezeske: yeah I dunno how big a statically linked chromium would be

12:22 S11001001: DaReaper5: yes

12:23 emezeske: ibdknox: Oh, chromium? Probably big :)

12:24 DaReaper5: wouldn't I want to use uberjar when I want to create a jar for everything. How would uberjar help me with dependency jars and avoiding exploding them into target/classes for use?

12:24 S11001001: lein can find the classes in your deps just fine *without* exploding the jars that contain them, that includes javac *and* clojure compilation

12:25 DaReaper5: Ok so we are doing an unessary expoding of them

12:25 Also, just to confirm. Are you saying that I am having an issue compiling my java file because of the classes in target/classes?

12:25 clgv: primitive type hinted functions cannot have metadata on the fn instance since with-meta wraps the function in as RestFn and thus makes it non-primitive :(

12:25 emezeske: ibdknox: Distributing binaries across multiple distros is nigh-on-impossible

12:26 ibdknox: emezeske: :(

12:26 emezeske: ibdknox: Especially something with that many shared object dependencies

12:26 ibdknox: Distributing dynamic binaries*

12:26 S11001001: DaReaper5: Sort of. The gist is that if you stop exploding them and start with a fresh tree, the problem you saw will go away.

12:26 emezeske: ibdknox: You can get away with static

12:28 DaReaper5: Ok, S11001001. I have sent a message to my backend guy to fix it :/ Thanks for your help.

12:31 S11001001 could you point me to a tutorial or resource where you learned this?

12:35 S11001001: DaReaper5: if you've got a grasp on unix perms and the leiningen documentation, the rest is just experience; with more experimentation and playing with leiningen and deployment, you'll pick it up.

12:36 algernon: fwiw, I managed to get lighttable work on debian wheezy (the 32bit version, using multiarch)

12:38 dakrone: ibdknox: OSX 10.7+‽ ಠ_ಠ

12:38 DaReaper5: S11001001, ok I was just wonding if you had a resource because me and my backend guy are trying to figure out how to prevent this.

12:38 ibdknox: dakrone: need to get ahold of a 10.6 machine to compile it

12:38 dakrone: ibdknox: will you be at the conj? I'll meet you there, you can compile it on my machine

12:38 ibdknox: it *is* two major versions old now though :p

12:38 and yes

12:38 S11001001: DaReaper5: do you have a test deployment environment?

12:39 ibdknox: the new ones suck

12:39 lol

12:39 DaReaper5: s11001001 yes

12:39 S11001001: DaReaper5: that's it; there are a million things that can go wrong, the only total solution is to test a deployment, look for problems, and deal with them as they come up

12:40 brainproxy: talk to me about "class identity" and reify

12:41 DaReaper5: S11001001 so we should just test around and try different things to avoid jars from exploding into target/classes? (Pritty much just figure out on our own what is causing the explosion)

12:41 S11001001: The strangest deployment problem I ever encountered was due to two HTTP servers having different interpretations of what headers are legal to return with an HTTP 304 Not Modified response. How do you plan for that?

12:41 DaReaper5: True, but I was just assuming that our problem was not rare

12:41 :P

12:41 brainproxy: it seems that if I have a fn (defn myfn (reify ...)) then I can expect (= (class (myfn ...) (class (myfn ...) ...)

12:42 S11001001: DaReaper5: it's rare because by default, lein itself won't explode your dependencies, and only uses the compilation space as a place to write things it compiles

12:42 DaReaper5: ok thanks again

12:42 S11001001: np

12:43 DaReaper5: I will tell him to try a fresh install/enviroment

12:43 algernon: ibdknox: by the way, if you're interested, I can probably provide debian/ubuntu chroots for building lighttable (or a short howto on how to set those up quickly :)

12:44 Chousuke: isn't there a tool for creating those? I mean, in addition to just debootstrap

12:44 algernon: there is

12:45 but building things sensibly is a little bit harder (like 1.5 min harder)

12:45 Chousuke: pbuilder seems to be the name of the tool

12:45 algernon: yup. or sbuild. but you need a debianised source for both. (and pretty much that's the 1.5min work :P)

12:47 Chousuke: yeah, creating a debian package isn't too difficult.

12:48 though it depends on what you're packaging. some weeks ago I packaged a newer version of systemd for myself; since systemd and udev have been merged, this required extracting udev and libudev from the result as well...

12:49 in the end I got the system booting with the result, but I doubt the package would pass debian QA

12:50 goracio: hi suppose we inserted some html via ajax on the page and then need to reload scripts how to do that ? any thoughts ?

12:56 emezeske: goracio: When you say "reload scripts", are we talking about ClojureScript?

12:57 goracio: You could always do an XHR and eval some JavaScript in the response. ClojureScript's REPL support makes it pretty easy to do that.

12:59 hiredman: https://github.com/hiredman/nrepl-cljs-middleware

12:59 https://github.com/hiredman/drawbridge-cljs

12:59 emezeske: goracio: what he said ^^

13:07 goracio: emezeske: i use fetch about scripts like main.js jquery.js and so on

13:08 ttimvisher: do i have to explicitly declare a dependency in project.clj to use it from my source code when it's a transient dependency (i.e. it shows up in `lein deps :tree`)?

13:09 specifically, i'm trying to get the ring.middleware.stacktrace ns to wrap my handler in but it doesn't show up as a possible middleware.

13:09 goracio: emezeske: so after ajax call i get html string and insert it in the document but js code in that html is not working because helper scripts didn't loaded

13:12 emezeske: goracio: That sounds like maybe a question for #js. I'm not an expert, but I know there are several approaches for ensuring the JS you need is loaded.

13:12 goracio: (e.g. Google closure apps use goog.require(), although that won't help you)

13:15 frenchyp: goracio: loading js code in an ajax response is generally a bad idea

13:15 ideally the response contains only data, not logic

13:15 solussd: does clojurescript not support multiple arity functions? e.g. (defn blah ([arg] (println arg)) ([] (blah "default")))

13:15 dnolen: solussd: it does

13:16 goracio: frenchyp: well it contains handler for js lib in the script - that's more correct

13:16 solussd: k… must be choking on me passing nil using the fetch library "remotes"

13:16 goracio: frenchyp: so i just need to reload scripts some way i guess

13:18 frenchyp: you are going to have to eval the script: http://stackoverflow.com/a/511273/127810

13:18 is the js in the response dynamically generated?

13:20 goracio: frenchyp: well html contains input element with type="filesomething" then at the end of file i load script that uses that type something like jquery selector by id

13:22 frenchyp: so when i load this input via ajax call there is no any scripts parsed because i load only chunk of html not the whole page

13:23 ttimvisher: what am i not groking about transitive dependencies. am i really not able to use included libraries because i don't explicitly declare a depency on them?

13:23 emezeske: ttimvisher: I don't know the answer to your original question (whether that should work or not)

13:23 ttimvisher: However, you should depend on any libraries you use

13:24 timvisher: That's just a good practice -- using transitively included libraries means your app will break of the library you do depend on changes its implementation to e.g. use a different library under the hood

13:25 Err, I responded to timvisher and ttimvisher there... I guess you are the same person? :)

13:25 ttimvisher: emezeske: 2 different boxes :)

13:25 makes sense

13:26 frenchyp: goracio: I would have all the js in the original page. I would make an ajax query that returns json data like {'markup': "...<input type='filesomething'>....", type:"filesomething"}. In the callback of the ajax request I would add response.markup to my dom like you are prob doing, and I would call runJqueryTypeSelector(resp.type) to do whatever you are trying to do.

13:26 ttimvisher: what's strange is that when i explicitly declare a dependency on ring/ring-devel, i then can't load my file because it complains about hiccup not being there

13:26 which is a dependency of ring/ring-devel, but i thought it would be taken care of by the transitive dependency management.

13:26 otherwise what's the point of transitive dependencies?

13:27 emezeske: ttimvisher: I think maybe you have run into a problem with two of your libraries requiring different versions of hiccup maybe

13:27 frenchyp: goracio: one step further would be to return just data from ajax request, and use something like mustache to define and populate your html template in the original page/dom and build it with JS, which is what you would want to do for a single page application

13:28 emezeske: ttimvisher: Only one version can actually be used, obviously, so the library that depends on e.g. an older version is breaking

13:28 ttimvisher: That is total speculation though

13:29 goracio: frenchyp: i use fetch library which is nice but need to solve this problem some how )

13:31 ohpauleez: ibdknox: ping

13:31 frenchyp: goracio: what's fetch?

13:32 ohpauleez: frenchyp: fetch is an RPC from CLJS<->CLJ that uses EDN/Clojure as the exchange format

13:32 ibdknox: ohpauleez: hey

13:32 goracio: frenchyp: https://github.com/ibdknox/fetch

13:33 ttimvisher: emezeske: thanks. i'll look into that

13:33 ohpauleez: frenchyp: Also look at Shoreleave's remotes, which are based on fetch but give you security guarantees

13:34 xeqi: ttimvisher: I put together https://github.com/xeqi/lein-pedantic to help with those cases

13:34 *debug

13:34 goracio: ohpauleez: i have a question about fetch can i pm :)?

13:34 ohpauleez: goracio: Go for it

13:40 frenchyp: goracio ohpauleez : I see. I still think that the markup and data can be returned separatly in a hashmap for example so that JS code doesn't have to be eval'd from the response markup

13:41 ohpauleez: frenchyp: Agreed I return them separately in my apps

13:41 markup comes from a CDN (in the form of partial pieces of HTML), EDN comes from my server, enfocus mashes everything together

13:42 TimMc: EDN, that's that Clojure subset?

13:43 ohpauleez: yes

13:43 really… it's just Clojure

13:43 haha

13:44 TimMc: When I saw that it had keywords, symbols, *and* strings, I knew they weren't really aiming for crosslang stuff.

14:00 Urthwhyte: EDN seemed oddly positioned to me as well

14:01 ToBeReplaced: does anyone have an example end-to-end of using cemerick.friend.openid? i'm in need of a little hand-holding

14:01 S11001001: well, crosslisp

14:02 many schemes have keywords as an extension and keywords are a special subset of symbols in cl

14:04 amalloy: aw TimMc, like three times in a row i read your statement as "were really aiming for crosslang stuff". the sarcasm was so biting, and now i'm sad to see you were just making an honest assessment

14:07 ohpauleez: EDN has been pretty usable in Python - that said I don't use it as extensively as I do in Clojure* environments

14:07 (reader literals)

14:21 frozenlock: Is the body of a test supposed to be evaluated in order? I think I have a test evaluating upsite down... (deftest (stuff1) (is ...) (stuff2) (is...)), where stuff2 seems to be evaluated before stuff1.

14:21 jweiss: anyone got a hint how to run light table 0.2 on linux? the download at lighttable.com appears to be 32 bit

14:22 is anyone who's going to try light table actually running a 32 bit os anymore :)

14:22 ibdknox: jweiss: http://temp2.kodowa.com.s3.amazonaws.com/playground/bins/LightTableLinux64.tar.gz

14:22 amalloy: jweiss: didn't he tweet that earlier today?

14:22 jweiss: suhweet

14:22 callen: Korma...what's the story with that and Postgres arrays?

14:22 jweiss: i haven't checked twitter in a few hours, sorry :)

14:22 amalloy: frozenlock: you're wrong then. they're in order

14:23 callen: ibdknox: picking through the .app let me know about the awesome node-webkit project. Great stuff :)

14:23 jweiss: ibdknox: thanks!

14:29 ibdknox: I also just changed the link to point to the 64bit one

14:32 TimMc: s/n't// :-{

14:33 (I typoed that emoticon but it looks better that way)

14:33 seancorfield: ibdknox: while you're here... i tried it on win8 and it can't connect to any projects - what process / command is it looking for?

14:33 devn: anyone have a suggestion for scheme or lisp for scripting purposes? I know I could use Clojure, but I'd like something with faster startup time. Is guile worth looking at?

14:33 ibdknox: seancorfield: I think it's a pathing thing

14:33 stupid / vs \

14:34 seancorfield: ibdknox: so it doesn't work on windows?

14:34 ibdknox: it runs java with a jar in HOME/.lighttable/clients/

14:34 rplevy: devn: guile scheme is used is some GNU applications

14:34 ibdknox: it sort of does. Best to wait until I push an update again later today

14:34 rplevy: oh I only read the first half

14:35 you actually mentioned guile

14:35 haha

14:35 seancorfield: ibdknox: I get CreateProcessW: The system cannot find the file specified

14:35 emezeske: devn: Possibly clojurescript on node.js. I haven't done it but in principle it should work just fine.

14:35 seancorfield: let me know if i can help debug it ibdknox

14:35 rplevy: devn: emacs lisp can be run with shebang

14:35 it's way faster to start than jvm

14:36 I personally don't even notice the startup time, I have written command-line scripts in emacs lisp before that I use sometimes

14:37 ohpauleez: devn: FWIW, I've been actively working on CLJS+Node

14:37 with much success

14:37 seancorfield: ibdknox: it would be real nice if pressing return when a choice is selected in the file navigator actually selected that choice - instead of requiring TAB first (where do i file bugs?)

14:38 ohpauleez: devn: You can see an app in action here: http://www.pauldee.org/TTT-Intro.mov

14:38 ibdknox: seancorfield: https://github.com/Kodowa/Light-Table-Playground/issues

14:38 ohpauleez: very fast and uses shebang - #!/usr/bin/env node

14:38 rplevy: it looked like there were one or two talks at Clojure Conj next week pertinent to cljs + V8

14:39 ohpauleez: rplevy: We're few in numbers but we're making headway :)

14:39 rplevy: :)

14:40 ohpauleez: devn: A full blog post here: http://www.pauldee.org/blog/2012/clojurescript-and-node-js-an-experience-report/

14:41 TimMc: devn: I would guess Racket might be useful.

14:42 rplevy: heck you can shebang sbcl or clisp too

14:42 ohpauleez: I was just thinking that

14:42 rplevy: clisp was less of a headache last time I wanted to do that

14:42 ohpauleez: I've definitely used clisp and sbcl with shebang

14:42 I also recall that too - clisp was better

14:43 devn: ohpauleez: TimMc emezeske rplevy -- thanks, will take another look at cljs + node. the last time I looked was when cljs was alpha

14:44 ohpauleez: are you querying codeq from git ttt?

14:44 ohpauleez: devn: Nope, ttt is just straight CLJS code. It just has it's own datalog-like query thing

14:44 Written as both a for-loop and using core.logic

14:44 for-comprehension**

14:45 devn: gotcha

14:45 that's cool

14:45 ohpauleez: devn: I've been patching CLJS to work better for Node.js. I think the latest release has everything you'll need. If you hit a Node issue, ping me and I can fix it right away

14:48 devn: ohpauleez: will do, thanks

14:49 ohpauleez: np

14:55 mjg: what is the library which tracks dependencies between namespaces for safe(r) reloading at runtime?

14:57 Zabolekar: bonjour. i have some difficulties with using ~ correctly. let us, for example, consider #(apply - `(~(f %))) where f is defined somewhere outside. i have no idea why ~(f %) works and (~f ~%) doesn't

14:57 Chousuke: hm

14:58 Zabolekar: where can i read about it? the examples i found are rather too simple

14:58 Chousuke: ,'#(apply `((f %)))

14:58 emezeske: Zabolekar: ~(f %) actually *calls* f at compile time, whereas (~f ~%) inserts f and % at compile time, but does not call f until runtime

14:58 clojurebot: (fn* [p1__27#] (apply (clojure.core/seq (clojure.core/concat (clojure.core/list (clojure.core/seq (clojure.core/concat (clojure.core/list (quote sandbox/f)) (clojure.core/list (quote p1__27__28__auto__)))))))))

14:58 mjg: OK clojure.tools.namespace :)

14:59 amalloy: emezeske: well, not at compile time. this doesn't look like a macroexpansion; it's at whatever time he's building the list

14:59 Zabolekar: ah, ok

14:59 emezeske: amalloy: Oh, I just saw the last part and ignored the first part

14:59 Zabolekar: makes sense

14:59 emezeske: Zabolekar: see amalloy's response to me above

15:00 Zabolekar: thx

15:00 amalloy: &(let [f inc, x 1] `((~f ~x)))

15:00 lazybot: ⇒ ((#<core$inc clojure.core$inc@fc074d> 1))

15:00 amalloy: &(let [f inc, x 1] `(~(f x)))

15:00 lazybot: ⇒ (2)

15:01 Zabolekar: nice example

15:05 seancorfield: thanx ibdknox https://github.com/Kodowa/Light-Table-Playground/issues/169

15:13 kbo: Using clojure 1.4, autodoc 0.9.0, lein 2.0, I get Exception in thread "main" java.lang.IllegalAccessError: sh does not exist - ideas?

15:15 rplevy: kbo: maybe clojure.java.shell requires that you have sh installed

15:16 kbo: Silly me, I thought "sh" meant, well, /bin/sh or the like :-)

15:16 So I need to add another project dependency?

15:16 rplevy: that's what I thought too

15:16 hmmm

15:18 kbo: My sh is in /usr/bin/sh and not in /bin/sh as one would expect

15:18 Could that be the problem?

15:18 No, I have /bin/sh as well, of course.

15:19 rplevy: I was just looking at the project and I think the git-tools.clj could probably benefit from using clj-jgit

15:21 qubit[01]: totally off topic, but Ive found fish to be an amazing shell, much better than bash for daily stuff

15:22 rplevy: well there's a var in git-tools called sh

15:22 maybe there's a bug

15:23 what line does it happen on?

15:25 kbo: rplevy: at clojure.core$refer.doInvoke(core.clj:3778)

15:25 I am running strace to see what it is looking for, it doesn't seem to be "/bin/sh" or anything like that.

15:26 rplevy: what line in a file that is in autodoc though?

15:27 kbo: This happens when It run "lein autodoc" - autodoc itself never gets a chance to get started, if that's what you are asking.

15:28 At least it seems that way.

15:28 rplevy: no, I'm just saying there's a stack trace and at some point it is initiated from a point in the code you are running

15:29 kbo: Ah, I see. Sorry. at leiningen.autodoc$eval7$loading__4784__auto____8.invoke(autodoc.clj:1)

15:29 That's the 1st entry that mentions autodoc.

15:29 It then goes to at clojure.lang.RestFn.invoke(RestFn.java:457)

15:34 rplevy: I bet if you dig in and comment out lines involving shell calls etc you'll either find a bug or an environment setup problem

15:34 kbo: rplevy: https://gist.github.com/4027328 if that helps

15:35 rplevy: the first thing I would do personally is upgrade the project to 1.4

15:35 kbo: Oh, I'm certain it is either one of these :-) Question is what I can do about it. You mean digging in the sources of Clojure itself?

15:35 This is a brand-new empty project I'm trying to create

15:35 rplevy: no

15:36 not your project, but autodoc

15:36 jkkramer: you could also use codox to generate api docs instead

15:36 kbo: Ah - is 0.9.0 not the latest? I could easily switch. What is the right version # ?

15:36 rplevy: my assumption is autodoc is a little scruffy as it stands

15:37 kbo: jkkramer: Does lein have a plugin for codox?

15:37 jkkramer: kbo: yes. https://github.com/weavejester/codox

15:37 rplevy: no I mean it is using 1.3

15:37 the changes from 1.3->1.4 weren't that dramatic though

15:37 kbo: It only takes a small incompatibility to bring a software system down...

15:38 solussd: anyone have any suggestions for grouping POSTdata from an html form? I have a bunch of fields that are repeated n times across my form, n is arbitrary (the user can add more groups of fields). In php I can name my fields like this: "[4]fieldname" "[5]fieldname" "[4]anotherfield", etc, and get a map of maps. Is there a way to do this with compojure / noir / etc?

15:38 rplevy: chances are, the pull request to migrate this project would take less time than this conversation

15:38 kbo: jkkramer: What's the difference between codox and autodoc, from a newbie user point of view?

15:39 jkkramer: kbo: different output styling, amongst other things. codox was easier to get working IME

15:40 rplevy: it doesn't look like autodoc even has any tests

15:41 kbo: jkkramer: Right you are, it "just worked". I guess that is a big advantage :-)

15:41 * kbo will probably use codox then...

15:41 rplevy: yeah I would look into that or marginalia

15:42 jkkramer: my impression is that autodoc has been bogged down with clojure.core and contrib concerns which don't apply to most libs

15:42 rplevy: which may be between maintainers

15:43 kbo: Does codox or marginalia support markdown notation in the description strings?

15:46 jkkramer: kbo: https://github.com/hugoduncan/codox-md

15:46 rplevy: I don't know but marginalia has markdownj as dependency so probably

15:47 look at html.clj in marginalia

15:49 kbo: Well, it seems I'm on the right path now. Many thanks, guys!

15:53 jkkramer: solussd: with the appropriate middleware, ring supports "field[]" and "field[foo][bar]" conventions

15:53 solussd: jkkramer: thanks, ill investigate

15:56 babilen: Does anybody know if I can get LightTable for Linux compiled against glibc 2.13? There only seem to be a single binary on lighttable.com that seems to target Ubuntu and derivatives.

15:56 * babilen mumbles something about the horror of proprietary software

15:58 rplevy: babilen: I think that's 200 dollar donation on kickstarter

15:58 (troll)

15:58 babilen: Ah well, I am happy without LightTable anyway ...

15:59 rplevy: lighttable is awesome, I don't know if I could be happy outside of emacs though

16:00 babilen: rplevy: I have to take your word on it -- I played with earlier trial versions, but this one is just binary-hell-of-doom :)

16:00 ibdknox: rplevy: give me time ;) Rome wasn't conquered in a day

16:00 rplevy: ibdknox: babilen: :)

16:01 ibdknox: babilen: yeah, I know virtually nothing about building for linux - looks like my options are pretty clear though and it'll get fixed soon

16:03 babilen: ibdknox: Well, the problem is that you compiled against libc6 2.14 which is fine for a number of distributions, but not all. Ubuntu, for example, uses 2.15 in its stable release and I am on 2.13 -- All in all: Deployment on Linux is tough to get right like this.

16:04 I am actually not sure which mainstream distribution uses 2.14 now, so LightTable can only be used by a small minority of people.

16:05 (at least if compiled dynamically)

16:07 ibdknox: But I just wanted to ask. It doesn't sound as if that is a concern or priority of yours at all right now. You might, at least, want to consider to offer statically compiled versions though.

16:13 daniel___: Has anyone had success with clojure 1.4.0 and zeromq?

16:14 brehaut: ~anyone

16:14 clojurebot: Just a heads up, you're more likely to get some help if you ask the question you really want the answer to, instead of "does anyone ..."

16:14 Raynes: ibdknox: ping

16:15 daniel___: I want a method of getting zeromq working with clojure 1.4.0. Tried http://antoniogarrote.wordpress.com/2010/09/08/zeromq-and-clojure-a-brief-introduction/ , no success

16:16 Maybe there are more recent libraries

16:17 to be more specific on the error: UnsatisfiedLinkError no jzmq in java.library.path java.lang.ClassLoader.loadLibrary (ClassLoader.java:1860)

16:17 i added :native-path "/usr/local/lib"

16:29 jweiss: I'm trying to write a function realized-part that returns only the part of a seq that has already been calculated. i'm having some success with certain types, but i got hung up on ChunkedCons. doesn't seem as easy as Cons.

16:34 brehaut: jweiss: because it doesnt implement ipending?

16:36 jweiss: brehaut: yeah sort of, but neither does cons. but i can still succeed with (def x (take 10 (iterate inc 0)) (print (take 5 x) (realized-part x) -> (0 1 2 3 4)

16:37 brehaut: but is that only because that is a cons of lazy-seq's that i can check one at a time?

16:37 brehaut: im curious why you want this function btw

16:38 jweiss: brehaut: part of a tracing lib. i don't want the trace to force calculation that otherwise wouldn't have happened.

16:38 brehaut: ah smart

16:38 jweiss: currently if i trace (iterate inc 0) i get however many items that *print-length* is set to, even if i never use the value

16:40 jcromartie: coming from Ruby and Clojure projects to a Java project which has a 8-12min build time

16:40 * jcromartie wants to die now

16:40 jcromartie: Java + Flex

16:40 but "ant clean build", which is frequently necessary, takes 10m on average

16:42 brehaut: jweiss: i wonder if making your own realized protocol and implementing it for cons and chunked cons or something would be the easiest way round?

16:44 jweiss: brehaut: yeah that is what i'm trying to do, not sure how to extend the protocol to ChunkedCons.

16:44 brehaut: jweiss: because its an inner class?

16:44 jweiss: well to be honest i don't know how it works at all yet, never had the occasion to look at it until now

16:48 Raynes: ibdknox: Man, did you *have* to use this color theme? :\

16:49 ibdknox: Raynes: set theme solarizeddark

16:49 Raynes: Thank you. So much.

16:49 ibdknox: I forgot to package the other ones

16:49 it's pretty easy for you to hack it in if you want a specific one

16:49 Raynes: That doesn't seem to do anything. Do I need to reload?

16:50 ibdknox: next editor you open

16:50 Raynes: Cool

16:50 ibdknox: drop the css file in ~/.lighttable/css/whatever

16:50 and add it into order.json

16:50 Raynes: How do I close a tab?

16:50 ibdknox: then you can set theme mycooltheme

16:50 cmd-w

16:51 Raynes: Hrm

16:51 ibdknox: Is it supposed to look like this? https://www.evernote.com/shard/s84/sh/253a3e1d-cfa3-46c5-a463-498f426138d7/866820057a8b47601cebe36b74317734

16:51 ibdknox: that's what solarized dark looks like

16:52 Raynes: No it isn't. Lol. At least, that isn't what it is supposed to look like. Is this theme in codemirror proper?

16:52 ibdknox: no, it was one I found googling for solarized

16:52 Raynes: I might take a shot at doing a better one.

16:52 ibdknox: I will add the rest of them in by tomorrow

16:53 Raynes: I did the theme for refheap which is a tomorrow-night theme.

16:53 ibdknox: that file lives in ~/.lighttable/css/themes/solarized.css I think

16:53 Raynes: You can throw that in there if you like.

16:53 ibdknox: sure thing :)

16:53 Raynes: Loving the new look and stuff. :>

16:53 ibdknox: oh btw

16:53 set line-numbers true

16:53 just for you

16:53 next editor again

16:53 Raynes: Bang

16:54 :p

16:54 ibdknox: Did you see that subpar thing?

16:54 $google subpar paredit codemirror

16:54 lazybot: [achengs/subpar · GitHub] https://github.com/achengs/subpar

16:54 ibdknox: I did

16:54 I had it in there

16:54 Raynes: Looks promising.

16:54 ibdknox: it is unbearably slow :(

16:55 Raynes: I was afraid of that.

16:55 ibdknox: 150+ lines and it is unacceptable

16:55 Raynes: I wonder how it could be made to be fast...

16:55 Like Emacs!

16:55 ibdknox: I think he's parsing everything every time

16:55 I didn't look to closely

16:56 Raynes: He probably should have just ported petit's paredit.

16:56 ibdknox: I mean the quickest thing to do would be to approximate brace completion

16:56 daniel___: Anyone got zeromq working with clojure 1.4.0? Mind sharing the dependencies/project.clj?

16:56 Raynes: ibdknox: Would it be possible to do light table for Haskell?

16:56 Obviously not asking for it right now, just curious if it would be possible given the static nature of Haskell.

16:57 ibdknox: I can't think of anything about that it obviously precludes it from working

16:57 I don't know much haskell though

16:57 Raynes: One thing is that ghci doesn't just take any code and evaluate it.

16:57 ibdknox: that I discovered

16:57 Raynes: Like, to define functions in ghci you have to put them in a let.

16:58 ibdknox: is there any way to inject code into a process?

16:58 that's the main thing

16:58 if no, then you're screwed

16:58 it's not a big deal if you have to jump through hoops to do it

16:58 Raynes: ibdknox: http://hackage.haskell.org/package/plugins There are things like this.

16:58 But I really don't know enough to have anything concrete.

16:59 ibdknox: that sounds like what you'd need

16:59 something along those lines

16:59 so if people are able to do that, then yeah

16:59 Raynes: I've been getting back into Haskell lately.

16:59 <3

16:59 ibdknox: I played with it at strange loop a little

16:59 I was annoyed that I couldn't do types in the repl

16:59 or at least it wasn't obvious how to

17:03 rodnaph: ibdknox: any key bindings or modes in the lighttable settings?

17:03 ibdknox: not yet

17:04 rodnaph: love the new look, feels really solid.

17:04 ibdknox: :)

17:04 long way to go

17:04 but it's a start

17:05 rodnaph: i'm getting into emacs right now as well, so having a lot of fun just geeking out with different editors.

17:07 i take it everyone say that datomic workspace tool someone put a video out for today? that's a really nice take on an established "i'm working with a database" idea too.

17:07 *saw

17:08 ibdknox: rodnaph: link?

17:08 rodnaph: ibdknox: http://www.screenr.com/J087

17:12 ibdknox: are you interested in bug reports for lighttable at this point?

17:13 ibdknox: rodnaph: https://github.com/Kodowa/Light-Table-Playground :)

17:13 rodnaph: ok, ta

17:19 callen: anyone here ever had cause to generate a textual graph? like of a histogram?

17:19 I need to generate an ASCII graph of x,y data.

17:20 Apage43: callen: I've done that on occasion

17:20 callen: Apage43: am I hacking something up, or is there a library out there?

17:21 Apage43: I don't expect there's a library

17:21 callen: well that's not true

17:21 it's just a question of narrowing it down

17:21 Perl has it, I've found aplotter.py, and I'm looking at a few otehrs.

17:21 others*

17:21 Apage43: for ASCII graphs?

17:21 callen: Apage43: yes

17:22 daniel___: Could not find artifact org.zmq:zmq:jar :'(

17:23 Apage43: callen: if you find something, I'd like to know anyway. I've written really simple horizontal bar charts a few times

17:24 callen: Apage43: http://scitools.googlecode.com/hg-history/e7dc9172a38b8c0c7963315be46b36084d9edd87/doc/api/sphinx-html/aplotter.html

17:24 Apage43: not really precisely what I want, but getting closer.

17:24 hiredman: https://github.com/joegallo/doric has some bar chart functionality

17:24 callen: I see some histogram support.

17:30 zakwilson: ibdknox, Raynes: ghci appears to evaluate code in a do block of the IO monad. I think most code could be made to work through automated rewriting, but there might be a better way.

17:33 daniel___: http://stackoverflow.com/questions/13260494/clojure-zeromq

17:47 egghead: how can I have something loop forever without blowing the stack?

17:47 Here is what I'm trying to do (which blows the stack) https://www.refheap.com/paste/46a6c8115bdbc2232e91ae01d

17:47 nDuff: egghead: loop/recur

17:47 AdmiralBumbleBee: loop/recur

17:48 nDuff: egghead: ...now, mutual recursion is trickier.

17:48 AdmiralBumbleBee: trampoline

17:48 hiredman: ,(doc while)

17:48 clojurebot: "([test & body]); Repeatedly executes body while test expression is true. Presumes some side-effect will cause test to become false/nil. Returns nil"

17:48 AdmiralBumbleBee: with some restructuring

17:48 Apage43: daniel___: it's in the Sonatype OSS repo. Add it to your :repositories

17:48 :repositories {"sonatype-oss-public" "https://oss.sonatype.org/content/groups/public/&quot; }

17:48 egghead: trampoline is basically y-combinator style right?

17:49 hiredman: http://docs.oracle.com/javase/1.5.0/docs/api/java/util/concurrent/ScheduledThreadPoolExecutor.html

17:49 Apage43: the version that is in there is 1.1.0-SNAPSHOT: [org.zeromq/jzmq "1.1.0-SNAPSHOT"]

17:49 egghead: hiredman: if I do (while true f) and just have the sleep be part of it ?

17:51 citizenparker1: Anyone done much with parallelism in clojure (specifically pmap vs alternatives)?

17:56 rplevy: citizenparker1: pmap may serve your purposes, but the new approach is reducers using the fork/join framework

17:57 pmap is basically map but in divided up into future calls

17:58 you can just use pmap wherever you would have used map

17:58 callen: what's the advantage of reducers fork/join vs. pmap?

17:59 flexibility?

17:59 rplevy: pmap is stupid simple and unsophisticated

17:59 reducers is the new hotness

17:59 callen: I get that reducers and fold are more powerful, just wondering.

18:00 rplevy: I think the main advantage of fork join over naive parallelism is that it's better algorithm for dividing up work efficiently

18:01 Apage43: Reducers aren't til 1.5 though, right?

18:01 rplevy: there's a lib though

18:01 callen: I need to find an excuse to (ab)use these things.

18:01 Apage43: rplevy: oh?

18:02 rplevy: well I thought so anyway

18:02 it's been on my todo list to check out

18:04 I think I was mistaken

18:05 but they are working in 1.5 now so I've heard

18:05 via some blog post months and months ago

18:06 citizenparker1: Hey, sorry, AFK

18:06 Yeah, I know fork/join is the cool new thing, but I'm working on some code already built using pmap everywhere

18:07 Basically we have a seq of things, x, that we then need to put each item through a workflow where each step of the workflow is long and sleepy (io/network bound)

18:08 Right now it's essentially (->> x (pmap step1) (pmap step2) (pmap step3) … )

18:12 rplevy: I don't know I would probably do it the same way. Or create worker threads that pull items from a queue.

18:12 citizenparker1: Hey, you know what. Nevermind, I just answered my own question in trying to ask it

18:12 rplevy: futures rathere.

18:12 citizenparker1: Yeah, queue-based would probably be ideal

18:13 But I'd rather put that off until it's worth the complexity

18:13 rplevy: yeah

18:44 amalloy: pmap is pretty bad in practice. it exists more for advertising reasons: "look, you can add one character to your program and now it's running on multiple threads!"

18:44 ticking: wtf get is not defined for lazy seqs?

18:45 amalloy: &(doc get)

18:45 lazybot: ⇒ ------------------------- clojure.core/get ([map key] [map key not-found]) Returns the value mapped to key, not-found or nil if key not present. nil

18:46 amalloy: does a lazy-seq map keys to values, ticking?

18:46 ticking: amalloy, *facepalm*

18:46 yeah I whould get to bed

18:47 I just wrote "how to get the nth item then"

18:47 and imediatle bit my ass

18:47 sorry seems like the night was thougher than I though ^^

18:51 TEttinger: Any thoughts on how to improve this one-liner?

18:51 ,(clojure.string/join " " (take 8 (repeatedly #(apply str "http://i.imgur.com/&quot; (apply str (take 5 (shuffle (vec "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM1234567890")))) ".jpg "))))

18:51 clojurebot: "http://i.imgur.com/QHi6U.jpg http://i.imgur.com/teZYd.jpg http://i.imgur.com/ubVT2.jpg http://i.imgur.com/YLN4K.jpg http://i.imgur.com/Dj7Y8.jpg http://i.imgur.com/uM7Bf.jpg http://i.imgur.com/wMfzZ.jpg http://i.imgur.com/OW4Mo.jpg "

18:52 TEttinger: they are completely random, supposedly

18:52 so there might be something weird in there

18:52 but I have had issues myself with clojurebot's RNG, it appears

18:52 it just seems non-random sometimes

18:56 tomoj: should cond-> accept an extra default arg?

18:57 TEttinger: should cond-> have a symbol in there?

18:57 i have a hard time telling what most of these symbolic functions do in clojure

18:57 i guess they are macros

18:57 tomoj: symbol in where?

18:58 TEttinger: i have no idea what the deal is with the meta function for example

18:58 ->

18:58 amalloy: that's not the meta function. the meta function is named meta

18:58 TEttinger: cond-> is that the name of the function

18:58 amalloy, sorry yeah

18:58 the reader macro

18:58 for meta

18:58 i can never remember it

18:58 amalloy: ^?

18:59 TEttinger: so then what is #^

18:59 brehaut: old for meta

18:59 amalloy: equivalent but old

19:01 TEttinger: the not-actually-alphabet soup is probably my least favorite part of clojure, with the somewhat confusing what-returns-a-lazy-seq business second. but i like just about everything else, especially the non-lazy persistent collections

19:03 I personally don't mind the symbols when I code, but it makes it next to impossible to paste a sample and say "here, it is obvious what this does" if there's a ^ type hint or some other more unusual uses of the keyboard

19:03 it's hard to evangelize, is what I am saying

19:03 brehaut: different things are always hard to evangelize

19:04 but if it wasnt different, what would the value be

19:04 TEttinger: I'm running a lazybot on a different IRC server, and no one else can figure out the clojure eval

19:04 people sometimes try...

19:05 thank god it is so well-sandboxed

19:05 lazybot is a quality program

19:05 amalloy, is it yours? I can't remember. if so, kudos

19:22 AKFLOW: hey ppl

19:23 would anyone here help a clojure |\|008

19:23 xeqi: ~anyone

19:23 clojurebot: Just a heads up, you're more likely to get some help if you ask the question you really want the answer to, instead of "does anyone ..."

19:24 AKFLOW: I am just researching for a bit this clojure thing and was wondering if there's a swigg style script that can turn any .java code into a .clr

19:25 brehaut: .clj ?

19:25 AKFLOW: yes sorry..

19:25 brehaut: just use the java class

19:26 you cant sensibly machine port java code to clojure, the idioms are api are completely distinct

19:26 TimMc: &(Integer/parseInt "16" 11)

19:26 lazybot: ⇒ 17

19:26 TimMc: AKFLOW: ^ There's an example usage of a static Java method from Clojure.

19:26 AKFLOW: ok

19:29 brehaut: AKFLOW: clojure has pretty solid interop with java specifically so that you can use java code in clojure

19:29 TimMc: AKFLOW: Please don't ask for help in private messages unless you ask first.

19:30 The person you message may not be the best person to answer, so ask in the channel instead.

19:31 AKFLOW: uhhh... TimMc dont be a @========3 a link will just be fine dude ..... NP just tell me ok

19:31 TimMc: /ignore *!*@23.19.81.247 ALL

19:32 AdmiralBumbleBee: wtf

19:33 TimMc: September was a couple months ago. Figures.

19:34 AdmiralBumbleBee: perhaps they're just pushing start times forward a couple of months due to teacher shortages

19:34 AKFLOW: hey TimMc check this out this TOR 0-day for yaaaa ....

19:35 I am leaving what a waste of time CIAO ... ttys TimMc

19:36 chessguy: anybody playing with light table? i'm having trouble getting it to work out of the box

19:39 jonasac: does clojurescript allow implicit tail recursion?

19:40 brehaut: i dont know basically anything about cljs, but i think it would be unlikely

19:41 TimMc: Since Clojure doesn't, and JS VMs *likely* all don't have TCO, I'd say no.

19:41 brehaut: thats my reasoning too

19:42 AdmiralBumbleBee: does anyone know what is/was going on with that project to add tco to clojure?

19:42 mudge: i used lein-localrepo to install a java jar (which doesn't have a POM file) -- and now I'm trying to use it in my clojure file and I get this exception: java.lang.ClassNotFoundException:

19:42 how do I access classes in my clojure file that come from local repo java jars?

19:43 brehaut: mudge: are you asking how to import a java class into a clojure namespace?

19:45 mudge: brehaut: yes, but I tried it the normal way like this: within a namespace declaration: (import (com.inductiveautomation.com.vision.api.client.components.model AbstractVisionComponent)) and I am getting the class not found error

19:45 brehaut: and the jar is your local maven repo?

19:45 mudge: brehaut: that is correct

19:45 brehaut: do you have the jar in your lein dependancies?

19:46 mudge: yes

19:46 brehaut: yes

19:46 brehaut: its out of my knowledge then sorry

19:47 mudge: brehaut: maybe I am specifiying the dependacy wrong

19:47 brehaut: its worth double checking all that stuff

19:47 mudge: brehaut: i did it like this: [local.ignition-sdk/vis-client-api "7.5.3"]

19:47 does that look right?

19:48 brehaut: assuming all that stuff is correct, yes

19:48 mudge: the local repo is there: repository/local/ignition-sdk/vis-client-api

19:48 brehaut: in your ns line do you have (import …) or (:import …) ?

19:48 (note the colon)

19:48 mudge: okay, well my jar file does not have a POM file in it and when i run lein run I get warning/errors saying the pom file can't be found

19:49 brehaut: I have (:import )

19:49 brehaut: ah, well if lein is complaining aobut that, then that would be something to look at.

19:50 mudge: brehaut: my next question is, is it possible to use Jars that don't have a POM file?

19:50 brehaut: mudge: you'd need to ask someone who knows a lot more about lein / maven than i do sorry

19:50 but im guessing not

19:50 mudge: brehaut: okay, thanks

20:02 zodiak: is there a purdy changelist anywhere of what's going on in 1.5 ?

20:13 mudge: brehuat: I solved it. I had the group-id written wrong in my :import

20:13 typo

20:14 moogatronic: Question re: nrepl.el - Does/should it automatically close any existing 'jacked-in' connections when you 'jack-in' to another one? (Like when you're making dep changes in project.clj, etc)

21:18 romanandreg: quick clojurescript question: how can I call a function defined in a cljs ns within a cljs macro (in clj source code)?

21:18 it seems lein cljsbuild is not finding the cljs ns on the classpath

21:18 :-/

21:55 mudge: ajmcclusky: do you know kevin mcclusky?

22:12 ajmccluskey: mudge: nope, can't say that I do.

22:12 mudge: ajmmcluskey: okay, thanks

22:13 ajmccluskey: mudge: are they in the clojure/software world?

22:19 mudge: ajmcclusky: no, but he has the same last name: mccluskey

22:38 mattmoss: Is there a way to accomplish: (apply . obj method [args]) ?

22:39 brehaut: well, . is a special form so you cant apply it

22:39 methods arent functions either, so you cant apply them. you need to get the method in a function form

22:39 mattmoss: Hmm.

22:39 brehaut: using a #( … ) form is your best bet

22:40 however

22:40 mattmoss: I currently have four clojure fns that wrap the four .method calls, the four clojure fns variants of a multimethod.

22:41 brehaut: one java method with multiple overloads is actually multiple methods

22:41 mattmoss: Which just seemed overkill.

22:41 Didn't know if there was something like... (invoke-method obj theMethod [args]).

22:42 which would select the appropriate overload.

22:42 brehaut: that requires going via reflection

22:43 you want to avoid treating a java object as a dynamic entity

22:44 mattmoss: Hmm, yeah.

22:47 seannetbook: ibdknox: quick light table Q: how do i download the 32-bit linux version for my netbook? (this is seancorfield on a netbook)

22:48 nm, i think i guessed the URL

22:52 twobitsprite: is there a way to have nrepl load the current buffer/file in the nrepl window?

22:54 The documentation on the github page seems to only have bindings for evaluating lines and blocks and spitting the output to the status bar at the bottom...

22:54 Other than toying around, I'm not sure what point there is to having an nrepl buffer if you can't send code to it

22:55 xeqi: C-c C-k

22:56 brehaut: nrepl is just a protocol; its up to the enviroments nrepl implementation to make details like sending the current buffer to evaluate work

22:56 'just'

22:56 ForSpareParts: Is there a way to do breakpoints in nREPL?

22:56 twobitsprite: sorry, I meant the nrepl emacs mode/plugin/whatever

22:56 xeqi: that doesn't seem to do it

22:57 xeqi: it only seems to send the result to the *message* buffer

22:58 xeqi: it sends the buffer in the background, so anyting defined should be there

22:59 my normal work flow is: C-c C-k to load the buffer, C-c M-n to change namespaces, C-x o to the repl, call functions defined from file

23:00 twobitsprite: ahh, I see! :)

23:00 thanks

23:00 ahh, and of course, now I see those bindings listed in the docs... don't know how I missed them :P

23:13 ForSpareParts: Following up on my previous question: I've realized that ritz exists for this purpose, but I have absolutely no clue how to use it, and the readme doesn't say much on the subject. Could someone point me in the right direction?

23:13 Also, is there emacs integration for ritz?

23:25 xeqi: ForSpareParts: I haven't used it, but I know hugod made a nrepl-ritz.el, and I think some of that made it into nrepl.el

23:25 looking forward to his talk at the conj about ritz

23:33 ForSpareParts: xeqi, I'll look into that, then. Thanks!

23:55 samrat: in nrepl.el, how do I avoid having to do (use 'foo.core :reload) every time?

Logging service provided by n01se.net