#clojure log - Mar 05 2012

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

0:01 tmciver: tylergillies: one thing I notice about your paste: you check for (count node) to be three which implies that once you get to the nth call, you don't need the 'not-found' part anymore. This implies that you no longer need to check for (= node false).

0:02 tylergillies: also, you can shorten it up a bit by using (nil? ...) instead of (= node nil) and (false? ...) instead of (= node false). Doesn't matter that much though.

0:06 m0smith: It looks like it is checking for a binary tree with each node being nil or a pair [a b], correct?

0:07 tmciver: each node is a nil or a triple (value, left-child, right-child)

0:07 http://www.4clojure.com/problem/95

0:09 tylergillies: tmciver: thanks for the input! :)

0:10 amalloy: in fairness, argument orders for clojure are very logical and orderly. except nth, which is horrible

0:12 tmciver: amalloy: nth's args are inline with get, is it not?

0:13 amalloy: yes. but nth is a sequence operator, and get is a collection operator

0:13 all the other sequence operators (drop, map, filter) take the sequence last

0:14 ideally_world: what's the best way to get doc to work via clojure-jack-in?

0:14 I thought I could just use clojure.repl/doc, but that's not doing it for me :(

0:14 tmciver: ideally_world: (use 'clojure.repl)

0:14 amalloy: the parallel with get hadn't occurred to me, though. neat

0:14 technomancy: ideally_world: doc is lame compared to C-c C-d d

0:14 * tmciver likes doc :/

0:15 amalloy: i dunno. i usually prefer doc

0:15 ideally_world: ah, yeah, thanks

0:15 tmciver: technomancy: we all think you should (use 'clojure.repl) in clojure-jack-in. :)

0:15 ideally_world: technomancy, nice! :)

0:15 and thanks

0:16 technomancy: tmciver: there's no way to make it work well

0:16 you can refer it into the user namespace, but that's 90%-useless

0:16 tmciver: Yeah, I remember you told me that before. I don't know the technical reasons so I take your word for it.

0:17 amalloy: technomancy: what about injecting it into clojure.core?

0:17 technomancy: ~guards

0:17 clojurebot: SEIZE HIM!

0:17 amalloy: yeah yeah

0:17 ideally_world: can C-c C-d d be used in a .clj buffer?

0:17 technomancy: amalloy: srsly though, use clj-nstools for that

0:18 tmciver: technomancy: why is it 90% useless? It always WORKSFORME.

0:18 technomancy: tmciver: maybe you spend more than 10% of your time in the user namespace?

0:19 tmciver: there's no way to bring it into all namespaces like it used to be

0:19 without amalloy's evil suggestion (or using clj-nstools)

0:19 so bringing it into the user namespace would just trick people into thinking it works like it did before; the confusion would merely be delayed

0:20 tmciver: Yeah, I do spend most of my time in user. But couldn't you just 'use' it in whatever ns you were in?

0:21 Does the trouble come for people who switch namespaces a lot?

0:21 technomancy: tmciver: I guess it could be done as a hook on C-c M-p, but then it wouldn't work when using in-ns, etc

0:21 I'd rather have it predictably not work than work intermittently

0:21 xeqi: tylergillies: https://refheap.com/paste/929 - how I would refactor it

0:22 technomancy: tmciver: yeah I don't think keeping the repl in the user namespace is very common

0:24 tmciver: technomancy: Hmm, I should change my ways. I typically 'use my code from user. I should probably be taking more advantage of slime.

0:25 technomancy: I'm a fan of C-c M-p

0:26 tmciver: technomancy: Ah, another slime command I must learn.

0:26 technomancy: Are you in the Boston area this week? There's a Clojure meetup.

0:27 tylergillies: xeqi: i don't understand the 'step' stuff

0:27 ooooh

0:27 you're showing me step by step how you got to yours

0:27 thanks

0:27 xeqi: yeah

0:28 technomancy: tmciver: no, I won't be in town

0:28 ideally_world: What's the best way to explore Java API's from Clojure? I'm looking at an interface, and I'd much rather do it all from the REPL? :(

0:28 tylergillies: bookmarking that

0:28 some good things to be mindful of

0:28 technomancy: ideally_world: C-c S-i to explore an interface

0:28 or class or wahtever

0:29 ideally_world: S?

0:29 shfit? :)

0:30 * technomancy nods

0:30 ideally_world: nice

0:30 I should start writing these down

0:31 technomancy: there's also the swank-clojure readme; it covers most of them

0:31 ideally_world: or bertter yet, where's the cheat sheet with these gems?

0:31 thanks

0:33 oh, will definitely be usting C-c M-p a bit :)

0:34 I really need that tatooed on my inner eyelids

0:35 m0smith: xeqi: my solution is at https://gist.github.com/1976882

0:37 xeqi: pretty close to yours but with destructuring and simplified the conditions

0:42 ideally_world: Oh, I've been looking for C-M-x!

0:43 Thanks technomancy, you've made my development that much simpler

0:47 choffstein: Hey all. Anyone have any idea why I might just be getting an "; Evaluation aborted." when running a command via swank in emacs? It's never happened to me before, and it seems to be coming from someone else's library, and without an exception or a stack-trace, I don't really know how to get to the bottom of it...

0:58 ideally_world: not sure how many times EXIT_ON_CLOSE has bitten me :/

3:12 antares_: if I have a lazy seq, what's the most idiomatic way to take next value from it (like Java's Iterator#next)?

3:16 raek: antares_: Iterator#next actually does two things: first, it fetches a value, second, it advances its state through mutation

3:16 antares_: raek: right, this is what I want in my case

3:16 raek: the fetch value part corresponds to 'first'

3:16 antares_: raek: I cannot use take or take-while and similar things because I don't know how many I need upfront

3:16 raek: the advance part corresonds to 'rest'

3:17 antares_: raek: yes but first does not advance

3:17 raek: yes, lazy-seqs are immutable

3:17 antares_: raek: rest produces an infinite sequence

3:17 ibdknox: so take the first of it

3:17 antares_: I basically need take 1 that advanced the "pointer"

3:18 raek: antares_: the pointer you need to advance is the local variable you hold the seq in

3:18 antares_: hm, yeah, immutability is a good point

3:19 raek: (loop [coll ...] (if (some-predicate? (first coll)) (recur (rest coll)) ...))

3:19 ibdknox: what're you trying to do?

3:19 antares_: raek: that's exactly what I cannot do

3:19 raek: in soviet russia, data structures mutate YOU

3:19 antares_: ibdknox: imagine I have an infinite sequence of dates

3:20 ibdknox: and every once in a while (for example, during fixture data generation) I need to take "next value" from it and advance it

3:20 ibdknox: every once in a while?

3:21 antares_: ibdknox: it does not happen N at a time and does not stop after specific condition

3:21 raek: antares_: on way could be to explicitly pass the sequence of "free dates" do whatever funtion that needs them (and let them return a sequence of the dates they didn't use)

3:21 or you could simply use stateful constructs, such as atoms

3:21 ibdknox: from different threads?

3:21 it sounds like you just want an atom

3:22 with a little getter function that does what you describe

3:22 calls first and swaps it with the rest of itself

3:22 antares_: ibdknox: yes, I was thinking that maybe atom is closer than lazy seq to what I need. Thanks.

3:22 raek: in Haskell I guess you would use the state monad to pass the seq "behind the scene"

3:22 * antares_ nods

3:22 ibdknox: you want both actually

3:23 raek: antares_: the lazy-seq will determine the logical succession of values and the atom will be responsible for holding the state

3:26 antares_: raek: yeah, ibdknox just suggested something like that. Thanks for the suggestion, I will try this now!

4:13 harblcat: hi all. I'm wondering how to do something, and a quick perusal of the clojure docs isn't directing me anywhere...

4:14 I've got something like the following: (def foo (ref {:a 100 :b []})) and am wondering how I would add items to the vector underneath b?

4:15 lucian: harblcat: could use something like http://clojure.github.com/clojure/clojure.core-api.html#clojure.core/alter

4:17 harblcat: I already understand how to alter the value under a: (alter _ conj {:a (inc (:a _))}) where _ is the ref...

4:18 lucian: then pass in a different function, that does assoc on :a

4:18 i think you could even just pass assoc

4:18 harblcat: I'll have to look into that, thanks :)

4:21 looks like update-in is the thing I need: (update-in @_ [:b] conj 'foo)

4:26 amalloy: (alter the-atom update-in [:b] conj 4), though i guess i'm too late

9:40 tutysara: I am trying to setup emacs + slime on a windows machine. I had installed lein+swank, I could do lein swank from cygwin and connect from emcas24 started from cygwin using M-x slime-connect, but clojure-jack-in is not woking

9:41 start-process-shell-command: Spawning child process: invalid argument is the error message

9:42 technomancy: choffstein: usually that means there was a problem showing the stack trace

9:43 choffstein: technomancy: Wow, talk about a delayed answer :) Thanks! I ended up figuring it out. Late night programming lead to a "defn" instead of a "def". I just thought it was odd that the stack-trace didn't show up.

9:45 RickInGA: tutysara did you install clojure mode?

9:50 gf3: jonasen: are you the kibit Jonas?

9:50 jonasen: gf3: yes

9:51 gf3: jonasen: just wanted to say: awesome project

9:51 jonasen: gf3: Thanks!

10:16 stuartsierra: ~archive

10:16 clojurebot: Pardon?

10:16 stuartsierra: ~logs

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

10:19 gtuckerkellogg: what the hell am i doing wrong in updating lein to 2.0

10:19 i run lein self-install, and it seems to be fine

10:19 then i run lein version, and I get "Exception in thread "main" java.io.FileNotFoundException: Could not locate leiningen/core/main__init.class or leiningen/core/main.clj on classpath:

10:19 dakrone: lein 2.0 is not released yet

10:21 gtuckerkellogg: d'oh!

10:21 really? I keep noticing packages that are already expecting it, and have a "if you are still using < 2.0 then do this"

10:23 babilen: gtuckerkellogg: http://groups.google.com/group/leiningen/browse_thread/thread/4c7157ea4d7f14f0 (On which OS did you install leiningen and how did you install it? - Please paste relevant commands+output)

10:24 gtuckerkellogg: this is macosx 2.7, tried with lein self-install; lein version

10:24 Downloading Leiningen now...

10:24 % Total % Received % Xferd Average Speed Time Time Time Current

10:24 Dload Upload Total Spent Left Speed

10:24 100 9837k 100 9837k 0 0 358k 0 0:00:27 0:00:27 --:--:-- 345k

10:24 Exception in thread "main" java.io.FileNotFoundException: Could not locate leiningen/core/main__init.class or leiningen/core/main.clj on classpath:

10:24 should have put that in pastebin, sorry 'bout that

10:27 RickInGA: tutysra: you still having issues with getting set up on windows?

10:28 tutysra: RickInGA : Unfortunately yes, I got slime-connect + lein swank working

10:28 RickInGA: see if this post helps, http://onbeyondlambda.blogspot.com/2012/01/setting-up-clojure-emacs-on-windows.html

10:28 tutysra: RickInGA : having issues with clojure-jack-in

10:33 RickInGA : thx Rick for putting that up, it is pretty much detailed and covers almost everything. I have a slightly different setup, I use cygwin and have installed lein inside cygwin. I have the normal windows emacs but start it from inside cygwin (also have .emacs.d inside cygwin)

10:34 RickInGA: have you installed the clojure-mode in your .emacs.d?

10:35 tutysra: yup, installed clojure-mode and it syntax highlights clj files, I also get auto-completion when I type clojure-jack-in

10:35 RickInGA: well, you have gone beyond anything I can help with, sorry

10:36 I just don't know how cygwin changes things

10:38 tutysra: I could do slime-connect to connect to swank, only clojure-jack-in says failed to create sub-process, I guess it has to be something with cygwin's path

10:46 dgrnbrg: If I have a clojure application that needs to scan directories and store a persistent DB of the info it gleaned about the files, what's the easiest backing store to use? I am thinking sqlite or redis, but I don't know if there's another better option. I also need a python program to either read from the DB or send its queries to the clojure program to get data from the db

10:47 TimMc: dgrnbrg: SQLite is dead easy.

10:47 raek: sqlite is quite easy to use with clojure.java.jdbc (but I haven't used redis myself)

10:47 dgrnbrg: and it has to run on NFS...

10:48 I forgot about that quirk...

10:48 raek: sqlite just uses a file

10:48 dgrnbrg: Is there an standardized chat format between python and clj?

10:49 TimMc: JSON is fine, I'm sure.

10:49 dgrnbrg: I suppose I could just send clj code as text from python to the clj indexing service

10:50 (i'm working on an improvement to vimclojure/nailgun's completion/discovery tools)

10:54 stuartsierra: somebody wrote a Clojure Reader in Python

11:02 dan_b: " Jark is a tool to run clojure code on the JVM, interactively and remotely. It has 2 components – a client written in OCaml and a server written in Clojure/Java. The client is compiled to native code and is extremely tiny (~300KB)

11:02 when did 300k become "tiny"?

11:03 wilkes: 2003

11:04 lucian: i'd say it's of reasonable size for what it does

11:05 now replace it with ClojureScript + node ! :)

11:05 dan_b: hah

11:05 lucian: i'd really like another backend for clojure

11:05 either python or C-ish

11:06 dan_b: llvm or something?

11:06 lucian: i guess that might work

11:06 dan_b: or do you actually want idiomatic C output?

11:06 TimMc: lucian: DId you see the Python impl?

11:06 lucian: not really

11:06 TimMc: it's an interpreter, and very primitive

11:06 TimMc: but I have considered contributing to the PyPy one

11:07 in fact, if there was a way to call python code from it, it'd be the perfect solutioj

11:07 also, clojure on android still sucks

11:07 dan_b: my sense of aesthetics rebels against the jvm as a backend, but half of everything I've written in my ~ 2 days of clojure so far has turned out to be bindings for java libs. so perhaps I should get over myself ;-)

11:07 jkdufair: tutysra, i submitted a patch for this prob

11:08 latest version of swank-clojure should have this fix

11:08 pipeline: dan_b: go replicate that work with CMUCL and FFI, see if you can work it out in two days ;)

11:08 lucian: dan_b: of course you should :)

11:09 clojure being on the jvm is very useful, but being *primarily* on the jvm, not so much

11:09 i'd love to see CinC further along, and several backends with similar maturity. perhaps it's a dream

11:09 TimMc: What's the CLR project up to these days?

11:27 Iceland_jack: Hey #clojure, quick question

11:27 The function http://clojuredocs.org/clojure_contrib/clojure.contrib.seq/separate is basically implemented as:

11:27 > [(filter f s) (filter (complement f) s)]

11:28 TimMc: (def separate (juxt filter remove))

11:28 Iceland_jack: I'm an old Common Lisper and a relatively new Clojurer-er... but isn't that pretty wasteful?

11:29 lucian: a little, maybe

11:29 dgrnbrg: Has anyone got lein to work through a https proxy? It seems to ignore my http_proxy environment vars, and it isn't working well w/ .m2/settings.xml's proxy setitng

11:29 Iceland_jack: Maybe there is a reason for this, legibility perhaps

11:29 dgrnbrg: Iceland_jack: why would it be wasteful? filter is lazy, so it's just making a 2 element vector

11:29 TimMc: Iceland_jack: I'm wondering if it allows for more laziness. Haven't convinced myself either way.

11:30 Iceland_jack: dgrnbrg: for a resource-intensive `f' it would do double the amount of work

11:30 dgrnbrg: I see what you mean

11:30 TimMc: Presumably a user of separate is going to consume some amount of both seqs.

11:30 lucian: TimMc: it'd have to be much longer to be as lazy, i guess

11:30 Iceland_jack: Instead of running `f' once and consing it to an appropriate list

11:31 lucian: Iceland_jack: feel free to write your own with :)

11:32 TimMc: I'm having some trouble figuring out how I would write my own that only calls f once per element...

11:32 lucian: uh, with an explicit iteration

11:32 dgrnbrg: You could use an atom to store the "other side" results

11:32 or 2 atoms, and then check the atom before consuming from the next seq

11:32 TimMc: (map (juxt f identity) s) and then return lazy views on filter and remove of that

11:32 Iceland_jack: lucian: I might :) but I know that Python has at times taken a stance on maintaining their code base, often disregarding speed

11:33 lucian: Iceland_jack: it's a logical choice

11:33 Iceland_jack: so I thought it might be something similar

11:33 not that the alternative would be that more complicated

11:34 lucian: Iceland_jack: would the alternatives have the same laziness and concurrency properties?

11:34 Iceland_jack: I see no reason why not

11:35 calebphillips: It could be implemented in one pass, with reduce, right?

11:35 Iceland_jack: calebphillips: hey now, this isn't Haskell ;)

11:36 lucian: TimMc suggested the solution

11:39 Iceland_jack: Haskell's `partition' is defined similarily I see

11:40 but Haskell's compiler is free to optimize that

11:43 TimMc: calebphillips: I'm not sure it could.

11:44 The result needs to be a vector (well, coll) of lazy seqs, and reduce would keep producing a new vector on each iteration.

11:44 sdeobald_: Is anyone else getting "Duplicate key: clojars" when attempting plugin installs on brand new lein installs lately?

11:45 neotyk: datomic anyone?

11:45 calebphillips: TimMc: I looked back at your solution after I said that, and I imagine it would still be better even if the reduce was possible.

11:46 TimMc: neotyk: Any new info on what it is supposed to be?

11:46 jkkramer: http://datomic.com/

11:46 TimMc: oh hey

11:46 neotyk: TimMc: just checking it out

11:46 scriptor: I hate to say this, but there is a lot of marketing talk on their website

11:46 neotyk: sorta db

11:47 queries look like datalog :)

11:48 scriptor: so I guess by "moves ... into applications" they mean it's embeddable?

11:48 neotyk: oh wait it is datalog ...

11:48 Iceland_jack: I was wrong: Haskell's version actually maintains two lists and conses the value to the appropriate one

11:49 TimMc: Iceland_jack: Is there a clojure equivalent to how it maintains "state", or does it use some built-in for multiple-list generation?

11:50 Iceland_jack: It reduces a seperate function over the list

11:51 that function takes a predicate, a value to be tested and a tuple of two lists

11:52 TimMc: "Datomic is made available free of charge for applications that are open source."

11:52 Iceland_jack: In pseudocode: if (p x) then (x : true, false), else (true, x : false)

11:52 gf3: hey guys

11:52 TimMc: Iceland_jack: I'll have to think on that.

11:52 gf3: how do I truncate a sequence and still preserve the sequence type?

11:53 tmciver: This hype about this Datomic thing is the result of a mysterious tweet by Rich Hickey, yes?

11:53 gf3: do I have to (into) it back into the original type?

11:53 TimMc: tmciver: yeo

11:53 *yep

11:53 Iceland_jack: It's a fairly common idiom in Scheme/CL where you maintain an ‘aggregate’ function within the lexical scope of the main function

11:54 The auxilliary function in Haskell:

11:54 > select even 4 ([2], [1,3])

11:54 ([4,2],[1,3])

11:55 Then they reduce `select' partially applied to the predicate over a tuple with two empty lists ([], []) and the list

11:57 I didn't mean any offence, I was just curious; [(filter f s), (filter (complement f) s)] is perfectly readable

11:57 TimMc: Iceland_jack: other than the fact that fitler complement is remove. :-P

11:57 so that's a bit silly

11:57 Iceland_jack: I know, I suppose the author has their reasons

11:58 ‘silly’ is probably an overstatement

11:59 gf3: I'm sure this is common, non?

11:59 TimMc: gf3: empty

12:00 gf3: Although you probably mean "collection", not "sequence".

12:01 gf3: right

12:01 TimMc: &(empty [1 2 3])

12:01 lazybot: ⇒ []

12:01 gf3: TimMc: so something like (into (empty x) (take n x))

12:02 TimMc: Oh, you want to just get a portion of the original, I see. Not "truncate" in the SQL sense.

12:02 scriptor: ,(empty (cycle [1 2]))

12:02 clojurebot: ()

12:03 gf3: TimMc: right, would that be idiomatic?

12:04 &(let [x [1 2 3 4 5]] (into (empty x) (take 3 x))))

12:04 lazybot: ⇒ [1 2 3]

12:04 TimMc: If you don't know anything about the type, I guess that has to do.

12:04 gf3: TimMc: sadly, I do not, I am accepting user input

12:05 TimMc: Hmm, looks like I was partially right about datomic -- a DB system that uses persistent data structures.

12:06 gf3: TimMc: that sounds cool

12:06 TimMc: but it looks like the main point is actually the movement of querying from the server into the client

12:07 scriptor: so the data is combined with the client so that the client can query itself?

12:07 TimMc: I haven't finished skimming the whitepaper.

12:08 The most important question I have so far is: How does one pronounce "datom"?

12:08 "Datomic calls such atomic facts 'datoms'.

12:09 "

12:10 Fossi: like atom, just with a d in front?

12:10 ah, might be dee-atomic

12:10 scriptor: yea, same with atomic

12:11 redinger: long a

12:11 TimMc: day-tahm-ick

12:11 day'-tum?

12:11 redinger: TimMc: Yes :)

12:11 tmciver: day-TimMc

12:12 TimMc: "My name is Rich Hickey, and I pronounce Datomic as 'Datomic'."

12:12 tmciver: I like it.

12:12 scriptor: pfft, I'm going to stick with dah-tom

12:13 RickInGA: did some news come out about datomic? does anyone have a link?

12:13 TimMc: "In today's installment of Pronouncing Clever Tech Names 102, we'll cover Datomic, Linux, and PostgresQL."

12:13 scriptor: RickInGA: http://datomic.com/product/overview

12:13 RickInGA: thanks

12:14 scriptor: don't forget erlang and scala

12:14 I still hold that erlang should be pronounced erlung

12:14 sounds more elegant

12:16 TimMc: ibdknox: I find myself a little troubled by the binary search example in the Inventing on Principle talk. It's programming-by-experimentation, which entirely leaves out loop invariants and preconditions and suchlike. Made me twitchy.

12:18 dnolen: Hmm I wonder if there's any connection between Joseph M. Hellerstein's work and the ideas behind Datomic

12:19 TimMc: ibdknox: I still love the overall point of his talk, as well as his specific crusade, but I think "playing computer" will always be an important skill in programming, no matter what fantastic tools we have.

12:20 Iceland_jack: TimMc: sorry, what talk?

12:21 TimMc: Iceland_jack: http://vimeo.com/36579366 -- ibdknox implemented the live-edit side-scroller in CLJS

12:22 (at least the important bits)

12:22 Iceland_jack: I had actually seen this one :) cheers, great work

12:27 the-kenny: What should I specify for "Project (Website)" in the Contributor Agreement? Github?

12:29 redinger: the-kenny: If you don't already have a project, just leave it blank

12:30 the-kenny: redinger: The "Contributing to Clojure" page says I should specify my Github username. Where?

12:33 TimMc: the-kenny: On mine I just wrote "Github: timmc" in one of the blanks

12:33 redinger: the-kenny: Yeah, just specify it in the username box

12:34 the-kenny: Ok, thanks :)

12:38 Iceland_jack: Another quick question, why do operations on strings in Clojure return lists?

12:38 ,(remove (partial = \a) "banana")

12:38 clojurebot: (\b \n \n)

12:38 Iceland_jack: while

12:38 > (remove #\a "banana")

12:38 "bnn"

12:38 in Common Lisp

12:44 dan_b: according to the cheat sheet, remove operates on a seq (i.e. lazy) and returns a seq

12:44 I guess that "seq of string" is not a clojure concept: a seq is just a seq

12:45 Iceland_jack: (excuse lack of Clojure knowledge) :)

12:45 TimMc: Iceland_jack: 'remove calls 'seq on its argument, then does stuff with it

12:45 dnolen: Iceland_jack: because those are sequence operations, the string gets converted into a sequence first. if you want to work with strings directly (and more efficiently) look at clojure.string

12:46 Iceland_jack: I'm not worrying about efficiency :) Haskell also manages to operate on lists (strings are lists in Haskell) but to return lists of the same type back

12:46 So I'm just wondering why remove couldn't detect that it's argument was a string or something similar

12:47 TimMc: It could, but then it wouldn't be a simple seq-filtering fn.

12:47 Iceland_jack: hm I suppose

12:47 not that I mind (apply str …)

12:47 technomancy: haskell controls the string type

12:47 TimMc: there's that

12:47 technomancy: and Clojure strings are Java strings because otherwise interop would be hell

12:49 Iceland_jack: hm of course there's the interop, I suppose I'm just thinking out loud

12:50 dan_b: does clojure have builtin support for optional args, or is the (fn [& [arg]] ...) destructure-the-rest-arg idiomatic?

12:50 or option (c) something else entirely

12:50 technomancy: dan_b: if you need arity checking you can use multiple arglists

12:50 pfedorow: hi guys, how do i add a new line in the repl with paredit mode on?

12:50 Iceland_jack: take 4 "banana" ⇒ "bana" is just a bit more intuitive than (apply str (take 4 "banana"))

12:50 thanks for the answers though :)

12:51 dan_b: technomancy: er, duh, yes. why didn;t I think of that? thanks

12:52 nizze: Hello!

12:52 technomancy: Iceland_jack: in general consistency is valued over intuitiveness in Clojure

12:52 because consistency is absolute and intuitiveness is relative

12:53 TimMc: hrm

12:53 Iceland_jack: I suppose, but I don't view the two as mutually exclusive in this case

12:53 TimMc: slightly dubious

12:53 nizze: I'm studying Clojure and I find loop/recur somehow ugly. It seems like it's a hack on top of the whole thing, it seems that is does not belong there. Have I misunderstood something?

12:53 dnolen: Iceland_jack: no question. But Haskell has it's own strings.

12:54 technomancy: nizze: if you find yourself actually using loop/recur it's usually a sign that you're missing a built-in function that would do a better job

12:55 nizze: technomancy: that's what I've been guessing. So it's not usual in real world clojure code?

12:55 technomancy: nizze: it's basically only used for I/O

12:55 ibdknox: TimMc, I agree to some extent

12:55 The example he gives is pretty contrived

12:55 nizze: technomancy: Okay.

12:55 ibdknox: TimMc, the hard part of programming in most fields isn't algorithmic

12:56 TimMc: There's that too. :-)

12:56 ibdknox: one of the best parts of my time at MSFT was the end to end user study I did of VS

12:56 I spent hundreds of hours behind a one way mirror watching people solve problems

12:57 know what the greatest indicator of programming ability was?

12:57 TimMc: beards

12:57 technomancy: dvorak

12:57 ibdknox: haha if only ;)

12:57 nizze: TimMc: lol!

12:57 ibdknox: how accurate of a mental model they could hold in their head

12:57 duck1123: Beards are usually a pretty good indicator

12:57 ibdknox: nothing else seemed to really matter

12:58 RickInGA: i have heard that code indentation correlates with fewer bugs.

12:58 Iceland_jack: ibdknox: How to you compare accuracy of mental models? :)

12:58 ibdknox: Iceland_jack, ask them questions

12:58 RickInGA: that people who take the time to make the code look presentable also take the time to make it work right

12:58 ibdknox: it's also pretty obvious once you watch them try to use the knowledge to solve programming issues

12:59 Iceland_jack: Not that I'm surprised by that result mind you

12:59 RickInGA: I read a couple of weeks ago of a study where people could predict accurately how people would do in computer science programs by the answers they gave them on a 5 question test.

12:59 ibdknox: yeah, the notion of assignment

12:59 raek: ibdknox: that's very interesting...

12:59 Iceland_jack: the term was just a bit vague, have you got an example of some of the questions?

13:00 RickInGA: ibdknox yeah, even if their answers were wrong, the people who answered consistantly did better than the people who were inconsistant

13:01 ibdknox: they were specific to the tasks they were given. They largely had to do with where bugs might be or how you'd change something

13:01 to prove a point I put one of our best devs in the room to do the same set of things

13:02 he's probably one of the better developers in the world :) It was fun to watch him

13:02 Iceland_jack: Can you say what the test was for ibdknox? Also how the results could be applied to teaching CS (or in general)

13:03 ibdknox: It was a thing developed in combination with CMU designed to assess programming aptitude, don't remember what it's called though. It might've been internal only

13:03 TimMc: ibdknox: I'd love to be around when we figure out the neurobiology of high-level thought, such as holding and manipulating a mental model of some algorithm. This is not stuff we really evolved for...

13:03 dan_b: so *that*'s why 'unless' was being indented weirdly

13:03 ibdknox: you weren't supposed to be able to finish it. Matt (our dev) finished it with 30 minutes left.

13:03 Iceland_jack: Go Matt!

13:04 ibdknox: to put that into perspective, of the hundreds of people who have taken it, he's the only one to have finished

13:04 and he actually did more than was asked haha

13:04 TimMc, I agree, I've always been fascinated by psychology

13:05 Iceland_jack: Any idea how that could be applied to teaching?

13:05 ibdknox: I have some ideas that I'd like to put into practice at some point

13:05 Iceland_jack: Asking students to describe the problem set/space of a task?

13:06 TimMc: My guess is that the skill is based on holding complex *social* models in our heads.

13:06 ibdknox: I think the primary one is that in order to teach people you have to steep them in things they don't understand and get them to learn how to intuit

13:06 Iceland_jack: > […] get them to learn how to intuit

13:06 nizze: What is filter's counter operation, like reject

13:06 Iceland_jack: that's very tricky

13:06 nizze: remove

13:06 ibdknox: yes it is

13:06 nizze: Thanks.

13:06 ibdknox: the first step is tinkering

13:06 that's how you build models

13:07 eventually you can do the tinkering in your head

13:07 TimMc: I think a certain amount of that approach depends on personality (?) types.

13:07 ibdknox: TimMc, it does

13:07 Iceland_jack: Getting people to tinker/experiment by ‘instruction’ is close to impossible in my experience

13:07 ibdknox: I've had moderate success

13:07 Iceland_jack: A bit like telling your kid “here, learn how to program; get interested!”

13:08 ibdknox: haha, well of course you have to want to learn

13:08 that is definitely true

13:08 TimMc: For example, when I was in elementary school, I would read Science News magazine. I didn't understand most of it, but eventually I would read enough to load a fairly accurate model of a topic into my head, and things would start clicking into place.

13:08 RickInGA: did you guys see the piece over the weekend, "How not to each programming"? it was on hn

13:08 nizze: Is it "normal" to find this hard to read: http://pastie.org/3527637

13:08 ?

13:08 Iceland_jack: you can also be interested in something but still have no interest in learning about it from an external influence

13:09 ibdknox: TimMc, every "smart" person I've ever met did the same thing

13:09 xeqi: Iceland_jack: I remember seeing some papers on this, search for "Dehnadi mental model" and a few will come up

13:09 TimMc: ibdknox: But that's just one kind of "smart".

13:09 Iceland_jack: nizze: try mentally replacing “apply +” with “sum”

13:09 xeqi: (thanks I'll check it out)

13:10 nizze: Should the function be nullary or is that a mistake?

13:10 TimMc: nizze: I would put a line break before (count users)

13:10 nizze: Iceland_jack: The apply + is nice trick :) It's like folder + list in haskell

13:10 Okay, I get confused by such a deep nesting level. Is this something that I get used to over the time?

13:10 Iceland_jack: folding is very neat

13:10 dan_b: I would describe it as hard to read in the same way as a mathematical formula is hard to read

13:10 Iceland_jack: but you've got to watch out for the edge cases :)

13:11 dan_b: it's more information-dense and you can't just scan it like a para of text, but with that density comes precision

13:11 raek: nizze: putting the (count users) part on its own line would make it easier to parse (for a human), IMHO

13:11 TimMc: ibdknox: A really, really important skill is model abstraction -- being able to lock off parts as bloack boxes with invariants/constracts.

13:11 Iceland_jack: Generally not a problem in Lisps but with Haskell…:

13:11 > foldl1 (+) []

13:11 dan_b: raek: good point

13:11 Iceland_jack: *** Exception: Prelude.foldl1: empty list

13:11 TimMc: and knowing when to open them again!

13:12 nizze: Hmm, so would it be okay to use let to alias things?

13:12 TimMc: sure

13:12 raek: (a (b (c (d (e f))))) is okay to scan, but (a (b (c (d (e f))) x)) is much harder

13:12 (a (b (c (d (e f)))

13:13 x))

13:13 Iceland_jack: I almost added the parentheses from reflex 8)

13:13 raek: alignment often helps to reveal the structure

13:13 nizze: Is "->" (threading?) a bad practice / non-idiomatic clojure?

13:13 lucian: nizze: not at all

13:13 technomancy: threading is wunderbar

13:13 dan_b: I hope it's idiomatic cos I've never seen it anywhere else

13:13 lucian: nizze: although in some cases it makes code worse, not better

13:14 Iceland_jack: nizze: a good practice but depends on the problem (like everything)

13:14 lucian: dan_b: CL and scheme have similar macros

13:14 nizze: Okay :)

13:14 lucian: and haskell achieves similar results with point-free style

13:14 TimMc: threading *can* make it easy to lose track of exactly what data is being threaded through at various points.

13:14 nizze: As I'm starting to code clojure do I have to pay any attention to laziness?

13:14 dan_b: lucian: what's it called in CL?

13:14 lucian: dan_b: dunno, i just remember reading it has it

13:15 dan_b: * (-> #'oddp (lambda (x) (* 3 x)) 4)

13:15 debugger invoked on a UNDEFINED-FUNCTION in thread #<THREAD "initial thread" RUNNING {100270E011}>:

13:15 raek: nizze: for purely function code, you don't have to care about it very much. it's when you get to code with side-effects it gets surprising

13:15 technomancy: gotta love all the yelling CL does

13:15 nizze: Okay. Is laziness built into language or is it a macro/library feature?

13:16 lucian: dan_b: i has some composition macros that achieve the same result, i think

13:16 dan_b: WHAT'S WRONG WITH UPPERCASE HUH?

13:16 lucian: nizze: it can be both

13:16 Iceland_jack: nizze: check out (source lazy-seq)

13:16 nizze: lucian: okay, so part there, part here :)

13:16 lucian: nizze: it generally is a language feature, or at least starts there

13:16 dan_b: lucian: I only ask because I've spent many years doing CL and I'm surprised not to have seen it there

13:17 lucian: dan_b: ah. i don't know much about cl, but i do remember seeing people preferring to mutate something several times instead

13:17 raek: nizze: some of the laziness stuff happens to be implemented in java with some macro sugar, but I don't see any theoretical reason it could't be implemented in clojure

13:17 nizze: dan_b: How do you think Clojure compares to CL (without the Java interop and the library goodness)?

13:18 Iceland_jack: raek: It can be implemented in Common Lisp :)

13:18 lucian: nizze: you're asking that in a biased channel :)

13:18 dan_b: nizze: I've only been doing clojure for about a week, it's probably still too soon to say

13:18 Iceland_jack: there is a library that provides laziness called CLAZY (there's that yelling again) :]

13:18 nizze: I know, I'll subtract some bias points :D

13:18 technomancy: CL doesn't have as much emphasis on consistency of argument order; I imagine that makes -> and ->> less useful

13:19 Iceland_jack: nizze: (if we know you're antibiased we'll have to get even more biased!)

13:19 dan_b: case-sensitivity is good, square brackets are ugly, uniform seqs rather nice, and I'm not missing pathnames

13:19 nizze: Iceland_jack: :D

13:19 lucian: dan_b: i love the literals

13:19 Iceland_jack: But I'm a big fan of Common Lisp, relatively new to Clojure

13:19 dan_b: but we really are talking about first impressions so far. when I get something big enough thath I'd use CLOS in CL I'll have a better idea

13:19 lucian: dan_b: especially [ ] used in syntax for things that aren't calls

13:20 Iceland_jack: And Common Lisp is starting to show its age

13:20 lucian: what i hate most about CL is Lisp-2, and i hate that a lot

13:20 nizze: dan_b: I find your opinion regarding [] odd. Rich said in some presentation that the problem with Scheme / CL is that () are overloaded.

13:20 dan_b: Don't you feel that way?

13:20 dan_b: the biggest problem with CL imo is that it is a platform not a language

13:20 lucian: nizze: people who have seen ( ) for a long time are likely to disagree

13:21 nizze: lucian: Okay :)

13:21 * technomancy loves being able to see an open paren and know it's a call

13:21 * lucian too

13:21 dan_b: interop with the host platform (see e.g. pathnames, gui, sockets) never really its strong point

13:21 lucian: there's something to be said for a little more syntax

13:21 AimHere: Is there any real problem with [] or {} - it's just syntactic sugar for (vector ...) or whatever anyways

13:21 dan_b: and I say that as the original author of trivial-sockets, bordeaux-threads and the cliki

13:21 AimHere: Just go back to () style if it upsets you

13:21 Iceland_jack: Persistent data structures are a great feature, Common Lisp is rather lacking RE: functional programming

13:21 technomancy: AimHere: it's just not what people are used to. same "problem" java fans have coming to any lisp.

13:22 lucian: technomancy: there are java fans?

13:22 Iceland_jack: lucian: :þ

13:22 * technomancy advises lucian to read up on stockholm syndrome

13:23 lucian: technomancy: you're probably right, there is such a thing as C++ fans, or so i've heard

13:23 nizze: Okay, I understood that part of Lisp's power comes from ability to access read table. Why isn't clojure providing access to it?

13:23 technomancy: lucian: there was a guy who said he liked make on the leiningen user survey; nothing can shock me now.

13:23 Iceland_jack: nizze: I believe Rich didn't want people to create their custom syntax

13:23 I personally love the Common Lisp reader

13:24 dan_b: I would like the cl reader more if you could easily customize it *per-package*

13:24 Iceland_jack: that would prove a bit tricky though

13:25 dan_b: otherwise you pull in three other people's packages into your project and find you have two conflicting #u macros

13:25 nizze: Whoa! I must say that level of sophistication on this (and Haskell) channel is astounding. I've rarely had as good conversations about these kind of things.

13:25 dan_b: maybe per-source-file or something then. scoped in some way at least

13:25 lucian: dan_b: really? i thought those were namespaced

13:25 jsabeaudry: Somehow it would seem the :hooks [leiningen.cljsbuild] seems to cause problem.

13:26 dan_b: in retrospect, maybe I could have added that to asdf

13:26 Iceland_jack: dan_b: I suppose you /could/ have conditioned imports of reader syntax... not sure how that would work in practice

13:26 nizze: (thanks)

13:26 lucian: #haskell scares me a little

13:27 * lucian still has only read a chapter of lyah

13:27 lucian: i mostly agree with not having reader macros, now

13:30 Iceland_jack: I love Lisp and Haskell is my mistress if anything, but I'm repeatedly surprised at Haskellers wondering “why Haskell isn't mainstream!” while it feels like they're working against it at times...

13:32 TimMc: technomancy: Make is the PHP of build tools.

13:32 Dead easy to get started, gets tricky once you get a lot of it in a pile.

13:32 Iceland_jack: TimMc!!

13:33 TimMc: ...and damn useful for one-offs.

13:33 dan_b: the irony there is that make is a declarative system that probably replaced a lot of even gnarlier imperative shell scripts

13:33 ibdknox: TimMc, yeah, abstraction or more generally knowing what to focus on is arguably one of the most important meta-skills

13:33 TimMc: ibdknox: And you have thoughts on how to teach those? :-)

13:34 ibdknox: I spent most of my younger years learning how to learn them :)

13:34 it's how I got through college without reading a single thing :D

13:34 with 3 jobs lol

13:35 Iceland_jack: ibdknox: 3 jobs? Props

13:35 ibdknox: paid for all of it myself :)

13:36 TimMc, there's a decent book on some of it. Refactoring your wetware

13:36 TimMc, http://pragprog.com/book/ahptl/pragmatic-thinking-and-learning

13:36 it takes more of a software spin on it

13:36 but the ideas are universally applicable

13:38 I've always been of the opinion that meta-skills are the key to basically everything

13:39 dan_b: there is no problemin comiter science that can't be solved by another layer of meta

13:39 er, pardon lousy typing

13:39 Iceland_jack: And no problem that can't be solved by removing one :)

13:42 TimMc: dan_b: I would say s/meta/indirection/

13:43 ibdknox: yeah, those two aren't the same thing

13:43 dan_b: i think the original quote was "Indirection", yes

13:43 Iceland_jack: dan_b: (meta is an indirection on indirection)

13:43 ibdknox: lol

13:44 Iceland_jack: Two years ago I had accepted that Lisp had had it's moment though

13:44 *its

13:45 dan_b: Iceland_jack: that's not far off my own timescale. two years ago I decided I needed to stay employable and learned Ruby

13:45 Iceland_jack: and I thought of FORTH or APL...

13:45 Yeah

13:46 But now Clojure is doing surprisingly well

13:46 ibdknox: The way I see it, there's money in efficiency

13:46 and Clojure is amazingly efficient

13:47 TimMc: ibdknox: You're speaking of both programmer and program efficiency, yes?

13:47 Or perhaps more of the former?

13:47 ibdknox: More the former

13:47 TimMc: You project manager, you!

13:47 ibdknox: ;)

13:47 dan_b: I still have a hard time conceiving of anything that runs on the jvm as machine-efficient, but my experience of java 1.0 and 1.1 may mave prejudiced me

13:48 ibdknox: the JVM is very efficient actually

13:48 jodaro: it has come a long way, baby

13:48 Iceland_jack: Trying to determine ‘why’ a programming language did well is a difficult (downright impossible?) task

13:49 SirDinosaur: anyone else disappointed that datomic isn't open source?

13:49 ibdknox: too many factors, too many of which are cultural

13:49 mtm: yes, very

13:49 dan_b: what chance it'll be open sourced later when the early adopters have given iut a good pummeling?

13:49 TimMc: SirDinosaur: Not me. It's surely spinning off open-source stuff as we speak.

13:50 ibdknox: they need to work on their marketing a bit

13:50 technomancy: SirDinosaur: more just annoyed at how much attention it's getting than anything else

13:50 TimMc: ibdknox: Such as actually maybe explaining what it is on the front page?

13:50 ibdknox: reading their site I don't understand what it is

13:50 TimMc, yes

13:50 TimMc: Had to poke around. The whitepaper helped...

13:51 ibdknox: you have about 2-3 sentences on average

13:51 they lost most people with their current copy

13:51 even ones who are interested :)

13:51 TimMc: "Datomic moves powerful data manipulation capabilities, and the data itself, into applications, coupling them with a sound and flexible data model. OH LOOK A SQUIRREL!"

13:51 ibdknox: haha the video is 20 minutes long

13:52 jodaro: watching now

13:52 ibdknox: it's sad, because I'm sure there's *really* cool stuff happening here

13:52 SirDinosaur: technomancy: everything rich hickey does now gets a lot of attention

13:53 dan_b: what's the current state of machine transcription, and how long before I can use it to avoid sitting through other peoples videos?

13:53 ibdknox: dan_b, you're not ken wesson are you? ;)

13:53 dan_b: heh. no

13:53 TimMc: redinger: "A cloud-scaled DB system that moves query capability directly into the client"

13:53 dan_b: that was the first thread I saw on the clojure lst, though

13:53 ibdknox: TimMc, that still doesn't make sense

13:53 lol

13:54 TimMc: ibdknox: It's probably not correct, either.

13:54 dan_b: "My real name is Stuart Halloway, and I have the ability to remove people from this mailing list"

13:54 Licenser: what is the current best way when you want to compile clojurescript for node.js / pure web applications

13:54 ibdknox: dan_b, haha welcome to the party ;)

13:54 TimMc: Oh, and "cloud-scaled" is BS that I just made up with my marketing markov model.

13:54 ibdknox: lol

13:55 dan_b: 'No match for "CLOUDSCALED.COM" ': quick, register the domain name

13:55 ibdknox: Actually this is a great example of where meta-skills would've helped

13:55 ivan: dan_b: I use VLC to watch Hickey at 1.3x-1.4x and some other people at 1.7x

13:55 ibdknox: smart people, especially engineers, have a hard time explaining what they make lol

13:55 TimMc: QFT

13:56 ibdknox: Quantum Field Theory?

13:56 TimMc: Either "Quoted For Truth" (in bulletin boards) or "Quite Fucking True".

13:57 General indicator of complete agreement.

13:57 ibdknox: ah, no physics then

13:57 :)

13:57 Iceland_jack: ibdknox: “Quantum Field Theory” sounds like the next thing for Haskell, once Category Theory and System F become too mainstream ;)

13:57 TimMc: Sorry, no. I still need to learn tensor algebra.

13:58 ibdknox: dev appliance is a terrible name

13:58 it makes me think of a toaster

13:59 jodaro: and you hate toast?

13:59 ibdknox: I love toast

13:59 but toasting my data sounds bad

13:59 jodaro: you love toast, but you hate bread

14:00 Iceland_jack: lol, Data Toasting

14:00 jodaro: and

14:00 its only a 447MB download

14:00 Iceland_jack: sounds like there should be a Wikipedia Entry on that

14:00 jodaro: wait

14:00 ibdknox: I wonder if the noir wikipedia entry is still there

14:00 jodaro: no github repo to clone?

14:00 * ibdknox goes to look

14:00 Iceland_jack: ibdknox: it is

14:01 ibdknox: no point in filling it out though

14:01 twhume: A stylistic/philosophical question for you: I'm writing my first proper Clojure app. I've done a fair bit of non-functional programming before. It looks to me like my app will be composed of a huge number of well-specified and clear functions - many more than I would've naturally written in, say, Java. Is that the way of things with Clojure? Or is it just the way I'm doing it, do you think?

14:01 jsabeaudry: Does clojure mode reload the file automatically when saving now?

14:01 Iceland_jack: twhume: tricky question imo

14:01 ibdknox: jodaro, not open source

14:02 jodaro: i know, i was being a dick about it

14:02 Iceland_jack: some things you'd use looping statements for in Java you'd use (higher-order) functions in Clojure/CL

14:03 dgrnbrg: ibdknox: I am trying to get your lein-nailgun plugin, and I have it as a dev dependency on version 1.1.1 w/ the path as org.clojars.ibdknox/lein-nailgun, but it fails w/ an artifactsnotfound exception

14:03 ibdknox: I should've started my product consultancy, that would've been fun probably

14:03 twhume: iceland_jack: thanks. I'm quite early into learning it, but keen to get into good habits now. I'm finding I write lots of very small functions, unit test them, and then chain them together. My general feeling is that the individual bits are thus well-testing, but I'll need to get better at looking across large chains of function calls to get an overview of what my code's doing. Does that make sense to you?

14:03 ibdknox: dgrnbrg, gist of the project.clj?

14:04 Iceland_jack: twhume: First of all, a lot of the functions you might write could be anonymous functions or accomplished via predefined operators

14:04 dgrnbrg: no can do…but the dev-dependency is [org.clojars.ibdknox/lein-nailgun "1.1.1"]

14:04 it's just from lein new

14:04 ibdknox: wierd

14:04 weird*

14:05 that should work

14:05 twhume: iceland_jack: so would what I'm doing be considered poor, stylistically? Or forgivable for a beginner?

14:05 Iceland_jack: I can't tell! I'd have to see some code

14:05 dgrnbrg: ibdknox: do you have other versions on clojars I could try to grab?

14:05 SirDinosaur: twhume: it should be clear what your program does by looking at the "top-most" function. functions should be used as abstractions

14:05 Vinzent: twhume, yeah, I think clojure forces you to writing much more little functions than in java, and it's a good thing

14:06 Iceland_jack: Speaking of code, every time you use a Clojure function wonder how it's implemented and check (source <fn>) to see whether your intuition was right

14:06 cacodaemon: ibdknox, why example code on start page of sqlkorma.com uses :username option and not :user ?

14:06 Iceland_jack: Also read, read, read source code

14:06 ibdknox: dgrnbrg, http://clojars.org/repo/org/clojars/ibdknox/lein-nailgun/1.1.1/

14:06 dgrnbrg, it's there

14:06 dgrnbrg: I'm trying to get it from behind a proxy

14:07 is there a way to prime my .m2/repositories with a raw maven command, and then re-try lein deps?

14:07 TimMc: twhume, Iceland_jack: Don't put too much stock in the implementation details of clojure.core functions -- there's some nasty bootstrapping code in there, although mostly near the top.

14:07 ibdknox: cacodaemon, ah just a typo in the example

14:07 Iceland_jack: twhume: sure :) but it's still a good way to learn

14:07 oops, TimMc

14:07 twhume: TimMc: so what's a good reference? Def. a good idea, I should do more of that.

14:07 TimMc: I'm not sure, actually.

14:08 ibdknox: dgrnbrg, not if you just put it in the right folder structure it'll work

14:08 dgrnbrg, -not

14:08 dgrnbrg: ibdknox: I think I'm going to have lots of proxy issues

14:09 I have my http_proxy set up, and mvn can get its packages too, but lein seems to be struggling w/ the packages now

14:10 technomancy: dgrnbrg: lein pom && mvn dependency:tree ought to do it

14:11 dgrnbrg: :) :) :)

14:11 that worked

14:11 why doesn't lein work?

14:11 twhume: Thanks all :)

14:11 dgrnbrg: technomancy: I don't mean that to be accusatory--lein is the best build system I've ever used

14:11 so I'm trying to get it into my proxy-restricted environment

14:11 technomancy: dgrnbrg: basically because nobody who uses proxies has submitted any patches

14:12 dgrnbrg: technomancy: does lein respect .m2/settings.xml?

14:13 technomancy: dgrnbrg: some of the settings are picked up, but only by accident

14:13 dgrnbrg: I think that if the security/proxy settings got picked up, that'd solve my problem. Do you think that's any easy thing to do, or particularly hard?

14:14 technomancy: I don't know, but fixing it for 1.x will not fix it for 2.x

14:14 since the underlying library changed

14:14 dgrnbrg: i see

14:14 i'll wait for it to stabilize

14:15 in the meantime, i finally have a workaround

14:15 thank you!

14:15 technomancy: sure

14:15 FWIW lein2 is pretty much already stabilized

14:17 tylergillies: is it gonna be called lein2 or is that just the version number?

14:17 technomancy: you can save the script as anything you like =)

14:17 tylergillies: i also like the colour green

14:17 TimMc: you can call it anything but late-for-dinner.sh

14:18 technomancy: I've been symlinking it as lein2 for now because I'm keeping 1.x around, but I'll probably swap it up

14:26 y3di: ibdknox: do you know if datomic.com is built in clojure(noir)

14:26 ibdknox: almost guaranteedly not noir

14:27 y3di: whyd you assume that?

14:27 technomancy: he hasn't been getting pings from his secret backdoor phone-home routines

14:27 ibdknox: they don't tend to take dependencies on other people's things. They wouldn't even use lein for a long time

14:28 plus I don't think they like me very much :)

14:28 jweiss_: any slime/emacs users ever get ";; Evaluation aborted." at the repl, but no sldb stacktrace frame? if I run (/1 0) i get one, but the code i'm trying to test just aborts with no info

14:28 dgrnbrg: is "they" reliance?

14:28 ibdknox: though as technomancy points out, my red phone hasn't been beeping

14:28 actually.. I did just get a really weird email though lol

14:28 that warrants red phone beeping

14:28 technomancy: jweiss_: usually a problem with the stacktrace rendering

14:29 ibdknox: y3di: it's most likely ClojureScript One

14:30 dgrnbrg: ibdknox: is "they" who don't like you "reliance"?

14:30 hhutch: ibdknox: i have to say, i discovered the fetch + lein-cljsbuild combo last week, and I am blown away...

14:30 jodaro: so has anyone set it up yet?

14:30 datomic i mean

14:30 jweiss_: technomancy: in the slime-events buffer, i see (:debug-return 2 1 nil) (:return (:abort)

14:31 27)

14:31 hhutch: I can't really figure out the flow of cljs-one, but lein-cljsbuild + fetch + jayq is really great

14:31 jweiss_: looks like the exception doesn't even come back from swank

14:32 `fogus: ibdnox: Not true. Like everyone, they are amazed by you.

14:32 SirDinosaur: asked if there were any plans to open source datomic in #datomic:

14:32 11:18 < rhickey> SirDinosaur: There are no plans to open source Datomic at this time

14:33 just wanted to make sure.. but :(

14:34 ibdknox: hhutch: I'm glad :) My hope was that it would be easily digestable

14:35 gf3: so, I guess my clojure pastebin is live, guys

14:35 http://cljbin.com/

14:35 http://news.ycombinator.com/item?id=3667954

14:36 ibdknox: it's very pretty :)

14:36 SirDinosaur: ibdknox: i agree with hhutch, thanks

14:36 `fogus: What is this "fetch thing"?

14:36 pipeline: it's both faster and handsomer than ideone.com

14:36 gf3: ibdknox: thank you

14:37 ibdknox: `fogus: a very simple library to do rpc/xhr between noir and cljs

14:37 gf3: `fogus: ohai!

14:37 ibdknox: `fogus: part of my yet unnamed cljs suite of things: http://www.chris-granger.com/projects/cljs/

14:37 `fogus: Sorry, I meant "fetch + lein-cljsbuild combo"

14:37 ?

14:37 I already knew about fetch

14:37 ibdknox: oh, that I'm not sure about

14:38 hhutch: `fogus: https://github.com/hhutch/hutch-web

14:38 ibdknox: `fogus: did you see noir-cljs came back? You can now do my game demo from emacs/vim :)

14:38 `fogus: YAY! Marg made the cut! :-)

14:39 hhutch: `fogus: i just have 'lein cljsbuild auto' running while I work in emacs+clojure-jack-in ... so any CLJS code writes get auto compiled

14:39 it's not browser-repl like clojurescript one

14:39 ibdknox: hhutch: CLJS one will do that too :)

14:39 hhutch: but this workflow makes a little more sense to me

14:40 dnolen: gf3: wow NICE

14:40 gf3: dnolen: thank you!

14:40 hhutch: ibdknox: yeah, i know, it's just I haven't quite understood how one goes about building a production app in cljsone

14:41 i have to spend more time in it

14:41 ibdknox: yeah

14:41 Vinzent: gf3, looks very cool!

14:42 ibdknox: unfortunately it got voting ringed I think

14:42 none of us can vote on stuff anymore

14:42 I asked around

14:42 apparently the smallest valid voting ring is only 4 people :(

14:42 dgrnbrg: technomancy: is there a way that I can tell a lein project which jvm to use?

14:42 technomancy: `fogus: is there anything specific blocking a lein-marg 0.7.0 release?

14:42 dgrnbrg: you can set the JAVA_CMD environment variable

14:43 dgrnbrg: there's an open ticket to allow that to be set in project.clj; if you want a leiningen sticker you should submit a patch before someone else snatches it up!

14:43 gf3: Vinzent: thanks!

14:43 dgrnbrg: technomancy: does lein's build functionality use the programmatic compiler APIs, so that setting the java_cmd is sufficient to make my whole project use a different version?

14:44 technomancy: dgrnbrg: it has to launch a subprocess, but it will honor JAVA_CMD for the subprocesses

14:44 dgrnbrg: cool, thanks!

14:44 dnolen: ibdknox: sux

14:44 ibdknox: it's a bit ridiculous

14:44 dgrnbrg: technomancy: I'd love to contribute to lein, but my job makes it hard :(

14:44 ibdknox: 4 people?

14:44 the probability that that happens is very high

14:45 technomancy: dgrnbrg: even for four lines?

14:45 dgrnbrg: technomancy: only if I want to spend 1-2hrs in meetings discussing whether it's an IP leak

14:45 technomancy: gross

14:46 `fogus: technomancy: I think just one keyword bug. I'll 2x check

14:46 dgrnbrg: technomancy: do you require clojure contributor agreement, or can I just git pull request?

14:46 technomancy: `fogus: would be nice to have a lein2-compatible version once the leiningen preview comes out in a few days

14:46 dgrnbrg: heh; please use a pull request

14:46 `fogus: technomancy: When would you like it?

14:46 technomancy: I will never require paperwork for people who want to help me out.

14:47 dgrnbrg: technomancy: that makes it easier, then :)

14:47 technomancy: dgrnbrg: this change is so small that it's probably not even subject to copyright in the US

14:47 ibdknox: technomancy: are you sure? Paperwork could be fun. "In order to submit a pull request, please do this crossword puzzle"

14:47 technomancy: `fogus: any time this week would be super

14:47 `fogus: technomancy: It shall be

14:48 technomancy: `fogus: thanks

14:48 ibdknox: you do have to run some obfuscated code to get a sticker

14:48 dgrnbrg: technomancy: is java_cmd used by other java applications, or is that just for lein?

14:48 technomancy: ibdknox: but that's only because I don't want my home address floating around the interwebs

14:48 ibdknox: haha

14:48 technomancy: dgrnbrg: I've seen it used a few other places

15:20 Luke: I'm getting this with incanter "1: [CAUSE1] Invoke debugger on cause java.lang.String cannot be cast to java.lang.Number [Thrown class java.lang.ClassCastException]" when trying to do a simple double/string scatter plot

15:21 TimMc: "A cannot be cast to B" means "I expected a B but you gve me an A

15:21 "

15:22 Luke: right but in Incanter, I'm not talking about datatypes and I'm only sending it doubles in the dataset

15:23 oh never mind, the doubles are being quoted in the CSV file

15:24 is there a way to tell incanter to parse a string as a double?

15:34 Raynes: gf3: ping

15:37 dgrnbrg: What's the easiest way to get a class that has a single method "public static boolean start(MyObj o)" that is defined in closure?

15:37 I want to write a doclet in clojure, and the doclet api looks for this static method instead of being sane and using an interface

15:37 can I accomplish that with reify?

15:38 TimMc: dgrnbrg: I think you'll need genclass.

15:38 I don't think even proxy can do statics.

15:38 dgrnbrg: can genclass be used at runtime?

15:38 or will I have to AOT my code?

15:45 TimMc: Good question! It at *least* depends on how your code will be called.

15:46 Raynes: gf3: I think you and I have similar interests. :)

15:49 dgrnbrg: How can I get tools.jar onto the class path of lein?

15:49 TimMc: I'll have to figure that part out later :)

15:51 technomancy: how do I get the jdk tools.jar onto the class path?

15:53 amalloy: i don't think it depends on how your code will be called. gen-class is a no-op except when AOTing

15:53 TimMc: dgrnbrg: Oh man, I had to do this in Maven recently, it was annoying.

15:53 dgrnbrg: hmm, i see

15:53 i found this article:

15:53 http://maven.apache.org/general.html#tools-jar-dependency

15:53 hopefully that does it

15:54 wait, that doesn't explain how to set the resolve path

15:55 Is there a way to get lein to use a system path for an artifact?

15:57 I just copied it to lib--is that going to work in the long term?

15:57 TimMc: nope

15:58 lib gets cleared

16:00 pyninja: is there a separate channel for clojurescript?

16:01 Raynes: Nope.

16:03 tmciver: dgrnbrg: I just created a symlink to the system tools.jar in ~/.lein/plugins; I did that to get rid of the warning.

16:03 pyninja: okay, does anyone know how to use a javascript library (e.g. moment.js) in a clojurescript project? i'm playing around with clojurescript one

16:03 dgrnbrg: tmciver: will that get picked up by uberjar?

16:04 tmciver: dgrnbrg: No idea. I didn't know what problem you were trying to solve; I just know that a lot of people (including myself) get warnings about tools.jar without the symlink.

16:05 dgrnbrg: I am writing a tool like vimclojure for Java development

16:05 and I need to call javadoc programmatically :(

16:06 tmciver: dgrnbrg: If the symlink doesn't work you might try copying tools.jar to the plugins directory directly (seems like a hack though).

16:12 jsabeaudry: Is it legal to have a /src/foo.clj and a /src/foo/bar.clj in the same project? lein run works fine but lein compile gives me a NPE on the ns clause of foo

16:13 RickInGA: what are the namespaces defined in the files?

16:14 I would think that they would need to be (ns project.foo) and (ns project.foo.bar)

16:14 brehaut_: RickInGA: im pretty sure it is valid

16:14 jsabeaudry: RickInGA, That is what they are

16:14 errkle: wherefrom in GA?

16:14 brehaut_: err, sorry, jsabeaudry

16:15 RickInGA: Flowery Branch (about 30 miles north of Atlanta)

16:15 errkle: sounds delightful

16:15 i'm in ATL

16:15 TimMc: RickInGA: Peach flowers? I bet it's a peach tree.

16:16 errkle: preach tree

16:16 pipeline: RickInGA: I have actually been there

16:16 TimMc: everything is named after peaches in GA

16:16 pipeline: flowery branch is named after wishful thinking ;)

16:17 RickInGA: errkle are there other Clojer-ers in Atlanta that you know of?

16:17 jsabeaudry: brehaut_, RickInGA: If I remove the (:use [project.foo.bar]) from my (ns project.foo ...) the NPE disappears

16:18 TimMc: jsabeaudry: That's a standard layout, sure.

16:18 jsabeaudry: Just makes sure it's not actually a single-segment namespace -- (ns foo) is a problem, (ns foo.core) is not.

16:19 (don't ask me why, I've just been told that)

16:19 jsabeaudry: TimMc, Yes, it is x.y.foo.bar and x.y.foo

16:20 If I add a :only clause it becomes an ExceptionInInitializerError

16:20 TimMc: Must be something else, I use that in projects sometimes.

16:20 RickInGA: do you have other files in your project that can see each other? is this the only problem you are having?

16:20 TimMc: Try just use'ing the second ns from the REPL.

16:22 jsabeaudry: TimMc, use from the repl works fine

16:22 TimMc, lein run also works

16:23 RickInGA: I don't know a lot about lein but my projects all have a structure like <proj name> / src / <proj name> / foo.clj

16:23 I think it is the sub directories of src that resolve to the namespace name

16:23 jsabeaudry: I'll try setting up a micro project

16:23 weavejester: TimMc: It's because a single-segment namespace is an unpackaged Java class

16:24 TimMc: Which I believe can cause problems… somehow :)

16:24 TimMc: weavejester: Ah, so no package. Got it.

16:24 I'm willing to believe that, I just don't have specifics.

16:25 weavejester: Has anyone looked into datatomic in detail yet?

16:26 jodaro: i'm still downloading it

16:26 Raynes: weavejester: datomic. Get it right, dude.

16:27 weavejester: Raynes: Oh yep, my mind somehow thinks "datatomic" instead of "datomic"

16:27 Raynes: I feel your pain.

16:28 zakwilson: I'm really curious as to why half the information about it is in a PDF instead of a normal web page.

16:28 weavejester: zakwilson: A PDF?

16:28 zakwilson: weavejester: http://datomic.com/docs/datomic-whitepaper.pdf

16:29 weavejester: Ah

16:29 Is there any way to destroy information in datatomic?

16:29 * Raynes chuckles

16:30 weavejester: I'm serious :)

16:30 Raynes: I know, but you said 'datatomic' again.

16:30 weavejester: Oh!

16:30 Gah!

16:30 zakwilson: I suspect some non-technical reason that has something to do with how things are sold to big companies. I honestly do want to understand this sort of thing.

16:30 Raynes: It's adorable.

16:30 weavejester: At some point my brain will get the right association.

16:31 Raynes: It reminds me of how young children sometimes have trouble pronouncing certain names and thus come up with slightly different easier to pronounce ones.

16:31 weavejester: I guess it's because datomic is clearly a play on data and atomic

16:31 I just need to remember dat-omic

16:31 Or d-atomic

16:33 Anyway… it looks like although you can retract facts, they persist in the database.

16:33 Which is really nice from a technical point of view.

16:33 But maybe less nice if privacy laws tell you to wipe a person's data.

16:33 jsabeaudry: Ah by lein compile project.foo.bar I learn that the problem is there, at least the NPE is triggered

16:34 TimMc: weavejester: Well, I'm sure you can define custom GC.

16:37 technomancy: https://mobile.twitter.com/coda/status/176763984257630208

16:38 weavejester: TimMc: I dunno, the current API is quite minimal and I don't see any custom GC options

16:38 Raynes: technomancy: Bahaha

16:39 jsabeaudry: It seems that this creates a NPE when compiling (defn- byte [n] (clojure.core/byte (.byteValue n)))

16:39 weavejester: technomancy: I don't think that's completely fair… :)

16:39 hagna: would you use dotimes to append to a string or loop/recur?

16:40 technomancy: weavejester: it just reminds me of this awesome quip: https://mobile.twitter.com/coda/status/170689994904698880

16:41 amalloy: why would you use either, hagna? (apply str (for ...))

16:41 hagna: amalloy: ok that's similar to what I was thinking you'd do for dotimes

16:41 technomancy: dotimes is very wrong

16:42 gf3: Raynes: ohai!

16:42 technomancy: it's about side-effects only

16:42 gf3: Raynes: so it would seem

16:42 Raynes: gf3: HAI THAR

16:42 gf3: Raynes: thanks for the comment on HN

16:42 TimMc: jsabeaudry: Interesting.

16:42 amalloy: technomancy: well, that's a bit strong. dotimes makes me hella sad, but that's how StringBuilder works

16:43 Raynes: Yeah, mentioning RefHeap seems kinda self-promoting in hindsight -- sorry if it came off that way.

16:43 Not sure if you already knew about RefHeap or not.

16:43 gf3: Raynes: I did, actually, Refheap is awesome

16:43 Raynes: I love the BrowserID integration

16:43 Raynes: <3

16:44 jsabeaudry: TimMc, simply (defn map []) will also do the trick, is it illegal to shadow clojure.core ?

16:44 Raynes: So, what motivated you to write cljbin?

16:44 jsabeaudry: the trick being triggering a NPE

16:44 Raynes: I figured it was the eval, but that seemed to be added after the fact.

16:44 gf3: Raynes: I wanted the eval

16:44 Raynes: Not sure if it was an initial design goal.

16:44 TimMc: jsabeaudry: Have you used :refer-clojure?

16:44 gf3: Raynes: I didn't know you guys were adding it to Refheap

16:44 Raynes: Yeah, I'm excited about eval in RefHeap.

16:44 I've been keeping it quiet until I saw how it turned out.

16:44 jsabeaudry: TimMc, no

16:45 hagna: amalloy: yes ok for thank you I had it mixed up

16:45 Raynes: Still a bit off. It'll be built around an entirely different service, which is why I can't just implement it right off the bat.

16:45 TimMc: jsabeaudry: Ah, you'll want a (:refer-clojure :exclude (byte)) in your ns.

16:45 or something like that

16:45 pyninja: does clojurescript have a function that converts objects into JSON?

16:45 gf3: Raynes: sounded pretty sweet from your comment earlier

16:45 Raynes: But it'll support eval for most of the popular languages refheap supports.

16:45 TimMc: pyninja: Grab the cheshire lib

16:45 pyninja: TimMc: thanks

16:46 Raynes: gf3: Your textarea is sexy.

16:46 TimMc: Raynes: I bet you say that to all the gf3s.

16:46 Raynes: It's nice how you've integrated buttons and information all into the same place.

16:46 gf3: Raynes: haha thanks

16:46 TimMc: /me blushes

16:46 pyninja: TimMc: wait but this is a clojure library, not clojurescript right?

16:46 * mdeboard checks on availability of okclojure.com

16:46 TimMc: pyninja: Ack, sorry.

16:47 Raynes: gf3: Seriously, if you ever have some time, I'd love to see what you could do with the RefHeap text area and stuff.

16:47 I'm not much of a design guy.

16:47 gf3: Raynes: cool, I'd love to help out!

16:47 pyninja: really i just need to serialize and unserialize some data in clojurescript, JSON seems most natural as long as clojurescript supports that

16:48 TimMc: pyninja: And you're not talking to a Clojure server?

16:48 gf3: Raynes: I'll toss you my email just in case you want to throw some ideas back and forth

16:48 Raynes: gianni@runlevel6.org

16:48 Raynes: gf3: We have a #refheap IRC channel and there are a gazillion issues on the issue tracker.

16:48 If you ever want to drop in.

16:48 jsabeaudry: TimMc, Oh wow, the refer-clojure works, thank you very much.

16:48 pyninja: TimMc: well I could send the data to the server for serialization, I guess, but it seems like overkill. shouldn't cljs support that natively?

16:48 tylergillies: in 'lein repl' is there a way to kill the last command without killing JVM? like (iterate inc 0) puts me in an infinite loop

16:48 hyperboreean: guys, what's the easiest way to run unit tests from within emacs after I ran clojure-jack-in ?

16:48 TimMc: pyninja: I mean, is the serialized data consumed by the server?

16:48 technomancy: tylergillies: only in lein2

16:49 hyperboreean: clojure-test-mode

16:49 pyninja: TimMc: no

16:49 amalloy: wat. if you're just serializing and unserializing, use the clojure reader and printer

16:49 Licenser: My clojurescript refuses to use prn-str for some reason :( I always get: "return server.routes.dispatch.call(null, server.core.prn_str.call(null, b)" and prn_str seems to be undefined

16:49 tylergillies: technomancy: ok, thnx

16:49 pyninja: amalloy: what's that

16:49 weavejester: hyperboreean: C-c , will run tests when in a Clojure test file.

16:49 stuartsierra: Licenser: try pr-str

16:49 weavejester: hyperboreean: C-c t will take you from a source file to a test file.

16:50 TimMc: pyninja: If you just need to roundtrip the data through a cookie or whatever, pr-str and read-string.

16:50 amalloy: ,(let [m {:a 1 :b 2}] (= m (read-string (pr-str m))))

16:50 TimMc: JSON is only needed for talking to JS services.

16:50 clojurebot: true

16:50 pyninja: TimMc: oh, i didn't know read-string and pr-str were inverses. that's good

16:50 Licenser: sneaky thank you stuartsierra :) was it always pr-str and I'm making prn-str up?

16:51 stuartsierra: Licenser: yes

16:51 weavejester: datomic doesn't support removing data yet, so it looks like we need to be very careful not to store personal data in it in the EU!

16:51 tylergillies: prn-str makes me think of porn star

16:51 Licenser: odd clojuredocs says there is a prn-str

16:51 TimMc: &(prn-str 5)

16:51 lazybot: ⇒ "5\n"

16:51 hyperboreean: weavejester: ok, thanks for the tips. I think I'll need to install first clojure-test-mode as suggested by technomancy (thanks, btw)

16:51 stuartsierra: Licenser: maybe there is, in Clojure/JVM

16:52 Licenser: oh sneaky

16:52 weavejester: hyperboreean: Do you have marmalade in your package sources?

16:52 Licenser: &(pn-str 5)

16:52 lazybot: java.lang.RuntimeException: Unable to resolve symbol: pn-str in this context

16:52 stuartsierra: Licenser: you could file a ClojureScript ticket with a patch, easy enough to fix

16:52 Licenser: &(pr-str 5)

16:52 lazybot: ⇒ "5"

16:52 hyperboreean: weavejester: no, not really

16:52 Licenser: hmm

16:52 TimMc: tylergillies: That's how I pronounce it sometimes.

16:53 stuartsierra: But you can't actually print anything in ClojureScript, so prn / println don't make much sense.

16:53 TimMc: stuartsierra: pr-str and prn-str do!

16:53 Licenser: at least it is confusing that they are missing and TimMc is kind of right prn-str kind of makes sense

16:54 stuartsierra: TimMc: prn-str is pretty pointless if you're serializing for a server, but it wouldn't hurt to have it for consistency

16:54 * Licenser will sleep over that

16:54 TimMc: stuartsierra: Makes sense if you're serializing for a debugging pane.

16:55 weavejester: hyperboreean: If you have http://marmalade-repo.org/ getting an up-to-date clojure-test-mode (along with other packages) is a lot easier

16:55 TimMc: stuartsierra: Or a REPL...

16:55 stuartsierra: TimMc: I suppose. I used the JS Console for that right now.

16:57 alexyk: nathanmarz: awesome talk at strata

17:03 cran1988: does clojure has a team for testing clojure applications every week ?

17:04 weavejester: cran1988: Which applications in particular?

17:04 sorenmacbeth: what's the current state of the world re extending parameterized type calles via (gen-class) ?

17:04 cran1988: any application , i would like to take part in such a team

17:04 sorenmacbeth: s/calles/classes/

17:05 technomancy: sorenmacbeth: you mean generics?

17:05 sorenmacbeth: technomancy: yes

17:05 technomancy: sorenmacbeth: generics are a fiction of javac

17:05 weavejester: cran1988: So a team that chooses a random application or library each week and tests it?

17:05 technomancy: there are no generics beyond java's original compile-time

17:05 TimMc: technomancy: Sort of?

17:05 weavejester: cran1988: To ensure correctness or for fun?

17:06 sorenmacbeth: technomancy: so instead of extending AbstractWhatever<SomeClass>, I can just extend AbstractWhatever?

17:06 cran1988: weavejester: fun and for correctness

17:06 technomancy: sorenmacbeth: I guess? I don't actually know Java.

17:06 weavejester: cran1988: Ah, then unfortunately I don't know of any group that does that in Clojure.

17:06 sorenmacbeth: technomancy: me neither ;-p

17:07 technomancy: you should be fine

17:07 hyperboreean: weavejester: got it working (and marmalde did help); thanks!

17:07 weavejester: hyperboreean: awesome :)

17:12 tylergillies: whats the difference between 'mod' and 'rem'?

17:13 RickInGA: tylergillies try it with a negative number and see

17:13 tylergillies: RickInGA: ah, thnx

17:14 nathanmarz: alexyk: thanks

17:14 TimMc: ,(-> (filter #(= "get" (.getName %)) (.getMethods java.util.HashMap)) first .getGenericReturnType) ;; technomancy

17:14 clojurebot: #<TypeVariableImpl V>

17:14 TimMc: As in "V get(Object key)"

17:14 technomancy: TimMc: o_O

17:15 alexyk: nathanmarz: will your 3/29 talk at Data Mining meetup follow the same general outline? And, Clojure/West's? :) Or will you be more open about Clojure at the latter? :)

17:15 just trying to prioritize my crazily shrinking time...

17:15 nathanmarz: alexyk: my talk at data mining meetup will be the same

17:15 alexyk: my talk at clojure/west will use clojure for all the examples

17:16 alexyk: nathanmarz: awesome for the latter! :)

17:21 tylergillies: woah this is weird when i '(for [x (range 40)

17:21 :when (= 1 (rem x 4))]

17:21 doh

17:21 wrong buffer sorry

17:22 when i '(iterate #(* 0.5 %) 100)' the repl output goes down to zero and then repeat the cycle from 100

17:22 over and over

17:23 http://cl.ly/1u1a0Z1L2W023Q0c3f2w

17:23 RickInGA: iterate is infinite lazy sequence, need to do take or take while if you only want some

17:24 tylergillies: i understand that, i was just watching the 'infinite' output for fun and notice that

17:24 noticed*

17:25 TimMc: &(take 20 (drop 4000 (iterate #(* 0.5 %) 100)))

17:25 lazybot: ⇒ (0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0)

17:25 TimMc: tylergillies: Where did you see repeats?

17:26 You must have typed something more than that.

17:26 tylergillies: TimMc: in that screenshot i posted, where the 0 ends and it output 100

17:26 amalloy: technomancy: tylergillies's issue sounds a lot like the one i was having with lein repl on long outputs, but i can't find that issue in lein

17:26 tylergillies: TimMc: i swear i didn't. that was from a fresh repl

17:26 TimMc: tylergillies: I see "(100" after the zeroes, some other seq is starting.

17:26 tylergillies: TimMc: i know. thats why i thought it was odd

17:26 amalloy: TimMc: no, i've seen this before

17:27 TimMc: y'all are going to make me wedge my computer for no reason, but here goes...

17:27 amalloy: where if i print a really large sequence in lein repl (finite in my case) it gets partway through printing, hiccups, and starts over

17:27 TimMc: nah, just print a large one

17:27 for me (repeat 1000 'a) is sufficient

17:28 TimMc: lolwut

17:28 tylergillies: i told you

17:28 TimMc: (take 1e4 (iterate #(* 0.5 %) 100)) did it

17:29 amalloy: so glad to hear it isn't just me

17:29 technomancy: about ready to tell everyone using lein repl to jump ship onto reply

17:29 because it's so much better

17:30 tylergillies: url?

17:30 clojurebot: something

17:30 technomancy: https://github.com/trptcolin/reply

17:31 tylergillies: thnx

17:31 TimMc: Oh man, just the C-c support is enough.

17:31 jsabeaudry: How can we execute code when the program gets C-c at the console?

17:32 The problem is that now that I have agents the jvm wont stop appropriately i need to shutdown agents

17:33 TimMc: technomancy: Is there a lein-reply plugin yet?

17:34 technomancy: TimMc: I think so?

17:34 wait, don't you use swank?

17:35 don't make me call the ~guards

17:36 TimMc: eep

17:38 tylergillies: ~bards

17:38 clojurebot: Huh?

17:42 romanandreg: does clojurescript uses internally the calcdeps.py script from gclosure?

17:54 Raynes: technomancy: Dude. Not everybody uses Emacs.

17:54 And sometimes having a non-Emacs repl is useful.

17:54 Even if you do use Emacs.

17:55 pipeline: there are non-emacs users?

17:55 Iceland_jack: huh?

17:55 Null-A: not likely…

17:59 TimMc: plenty

17:59 Mostly vim, some CCW (Eclipse)

17:59 Emacs is of course the majority.

18:01 * ibdknox is a vim user

18:01 technoma`: I'm just surprised that reply would appeal to a swank user

18:01 * Raynes is a recently converted vim user

18:03 brehaut_: technoma`: i use reply and swank

18:04 errkle: rick i know no other clorians

18:04 clojurians in ga*

18:08 TimMc: midiclojurians

18:09 * slyrus still waits patiently for a single JVM running both ABCL and clojure, each with their own SLIME REPL...

18:09 Raynes: Yeah, and I'm waiting for the moon to turn into a chocolate cupcake.

18:10 TimMc: Raynes: What good would that do you, without a rocket or a really long spoon?

18:10 jodaro: you can't turn cheese into a chocolate cupcake

18:10 technoma`: two slime repls in a single emacs instance gets ugly

18:11 TimMc: technoma`: Nice haircut.

18:12 technoma`: thanks!

18:15 jcrossley3: errkle: RickInGA: i'm in roswell

18:16 slyrus: technoma`: I use multiple slime repls fairly regulary

18:17 technoma`: slyrus: don't you have to switch between them manually?

18:21 slyrus: I'm not sure exactly what you mean by manually, but M-x slime-cycle-connnections works for me

18:22 technoma`: right; it can't figure out for you which buffers belong to which slime connection

18:23 TimMc: I tend to have 1 Emacs open on each workspace, so I would just have a separate slime for each.

18:23 slyrus: technoma`: true

18:25 chris-m-r: i'm getting an error '; evaluation-aborted' in a slime-repl, (emacs / slime-connect) and it provides no stack-trace, is there a reason for this? and is there a way to get the stack trace?

18:26 (calling a multimethod)

18:31 TimMc: chris-m-r: What does (pst) do?

18:32 chris-m-r: TimMc: umm, like this? (pst) Unable to resolve symbol: pst in this context [Thrown class java.lang.RuntimeException]

18:33 I found the error, a function taking the wrong number of arguments - however I don't understand why I didn't get a stack trace

18:34 TimMc: I don't use slime... but it is it possible you didn't escape back out to the top level before running pst?

18:35 (If it's anything like this one REPL I used...)

18:36 chris-m-r: (pst)

18:38 pst usually works fine, however after that error it wasn't - fairly certain I was top level, I think it might be something to do with log4j

18:46 y3di: SirDinosaur: what did they say when yu asked about opensourcing datomic? i dced

18:47 RickInGA: jcrossley3: Sorry for the delayed response. Glad to hear from another person near Atlanta

18:51 jcrossley3: RickInGA: indeed. are you the rick who posted on the lisp meetup forum?

18:51 RickInGA: yeah

18:52 I need to check back and see if anyone responded. I don't know if I will get an email if they do

18:53 ah, excellent, I see your reply… how do you feel about Taco Mac?

18:55 jcrossley3: RickInGA: i don't like the one near me. :)

18:56 RickInGA: If you are in Roswell, do you like Harp Irish Pub? That would be easy for people to get to in case anyone sees it on the Lisp group

18:57 nenorbot: Hi... does anyone know what reason there could be for incanter to ignore my :title/:x-label/:y-label options I give when creating an xy-plot?

18:57 jcrossley3: RickInGA: is that the one over behind that sandwich shop? i haven't been there in a while, but yeah, it's cool.

18:58 RickInGA: i thought you meant beer in SJ, not ATL. :)

18:58 RickInGA: haha, ok can have one there too

19:00 was hoping if we posted on the user group board we might get other people to stop by too, try and get some community involvement

19:00 errkle: i like the sound of that

19:01 jcrossley3: RickInGA: sure, count me in. the worst that can happen is that you and me and errkle share a few beers. :)

19:02 errkle: overtone jam sess.

19:02 worst that can happen is we blow our ears out

19:02 RickInGA: :)

19:03 jcrossley3: errkle: when you guys want to get together? thursday night? saturday afternoon? other?

19:03 errkle: i like thurs nights / this saturday i'm w/family

19:03

19:08 jcrossley3: thurs should work for me

19:09 RickInGA: cool, what time you guys want to shoot for? 6? 7?

19:09 jcrossley3: 7's good

19:10 RickInGA: cool, I will post that on the Lisp group. errkle you know where Harp is?

19:13 errkle: http://maps.google.com/maps?saddr=&daddr=1425%2BMarket%2BBlvd%2C%2BRoswell%2C%2BGA%2B30076&hl=en

19:19 errkle: thankyou

19:26 jcrossley3: RickInGA: errkle: just found out i have a band concert to attend at 6:30 thurs, so i'll be closer to 7:30-8, sorry.

19:26 RickInGA: ok, no problem, we'll just have the first round without you

19:26 jcrossley3: :)

19:27 RickInGA: so you guys can find me, I look like my picture on twitter @rickhall2000 (and yes I really am that ugly)

19:28 jcrossley3: RickInGA: followed

19:31 burlappsack: check

19:38 errkle: 18:30 Thursday, March 8th, Roswell Ga

19:39 RickInGA: errkle: 19:00, (though I will probably be early)

19:39 I'll be the fat guy with the mac book and the guinness

19:40 * gfredericks thinks that's a rather phonetically poetic phrase

19:49 pipeline: how do i determine which clojure is launched byuclojure-jack-in ?

19:50 qbg: the one specified in project.clj

19:51 gfredericks: pipeline: I think there's a ##(clojure-version) function as well

19:51 lazybot: ⇒ "1.3.0"

19:51 pipeline: d'oh

19:51 I should have thought of project.clj

19:51 gfredericks: for when you're extra paranoid

19:51 qbg: &*clojure-version*

19:51 lazybot: ⇒ {:major 1, :minor 3, :incremental 0, :qualifier nil}

19:51 qbg: That too

19:51 gfredericks: yeah for when you're triple-extra paranoid

19:51 TimMc: RickInGA: A typo on your website made for an intriguing out-of-context snippet: "compiled verses"

19:52 qbg: (System/exit 0) for when you are really paranoid

19:52 RickInGA: oops

19:52 TimMc: RickInGA: I'm imagining writing a compiler for song lyrics.

19:52 :-)

19:52 gfredericks: TimMc: start with the parser, that should keep you occupied for a while

19:53 qbg: TimMc: Make it work with overtone

19:53 TimMc: gfredericks: seq, done

19:53 gfredericks: boooh

19:53 TimMc: The AST generator is going to be harder this way, though.

19:53 RickInGA: I wrote that post a week or so ago, but just had 'this doesn't apply to clojure' for the compilation, at the last minute today I decided to write more. Now I regret it :)

19:54 * qbg is doing massive code generation because of core.logic

19:54 RickInGA: oh, verses as in vs. is that spelled wrong?

19:54 or just a pun

19:54 TimMc: oh, it's actually "complied verses" -- double typo!

19:54 RickInGA: "versus"

19:54 qbg: Of by one error

19:54 TimMc: qbg: haha, nice

19:55 RickInGA: that's what happens when you go from a 17 inch monitor to a 13 inch!

19:55 TimMc: Not trying to pick on you, just having fun with language.

19:55 gfredericks: fanguage

19:55 RickInGA: no worries, pretty funny

19:56 I am just delighted anyone reads my stuff!

20:13 lynaghk: Is it possible for a protocol to require implementation of another protocol?

20:13 brehaut: no

20:13 i dont believe so

20:13 lynaghk: e.g., implement these functions, plus (invoke [this x])

20:14 Frozenlock: IP ---> TCP would be a good example of a protocol requiring another protocol, no?

20:14 ibdknox: lol

20:14 different kind of protocol ;)

20:14 gfredericks: shouldn't the arrow go the other way?

20:15 Frozenlock: Depends, I work from the ground up :P

20:27 * qbg wants macrolet now :(

20:28 hiredman: qbg: https://github.com/hiredman/syntax-quote/blob/master/src/syntax_quote/core.clj

20:28 amalloy: qbg: clojure.tools.macro

20:28 hiredman: sort of ish

20:29 qbg: This is for core.logic, so that limits what I can use

20:30 gfredericks: what is a symbol macro?

20:30 qbg: Instead of a call

20:30 it looks like a symbol

20:30 gfredericks: the symbol-macrolet example is really weird

20:31 qbg: So you could have foobar expand into (lots-of-crazy-stuff a b c)

20:31 RickInGA: jcrossley3: I am watching the lightning talks from clojure conj 2011, didn't know I would see you there!

20:31 qbg: I've used them in CL before to define executable pixel art

20:31 hiredman: defn:let::defmacro:symbol-macrolet

20:32 gfredericks: hiredman: very nice, thank you.

20:32 I still don't understand why (def def foo); is it because the first def is a special form which precludes the second def being symbol-macro-replaced?

20:32 hiredman: my let-smacros is strickly substitution

20:33 def only has meaning that the beginning of a list

20:33 gfredericks: hiredman: right, but in (symbol-macrolet [def foo] (def def def)), only the third def got replaced

20:34 amalloy: gfredericks: yes, that's why

20:34 only the third def is an expression. the first is a special form dictating that the second is a name

20:34 gfredericks: so does the symbol-macrolet macro know about def? or does the compiler somehow get to the inner form first?

20:35 * gfredericks must be totally misunderstanding something

20:35 amalloy: gfredericks: whose symbol-macrolet are you talking about? tools.macro?

20:35 gfredericks: yeah

20:35 I'm looking at the example in the README

20:35 I guess I could go look at the code

20:35 amalloy: tools.macro has a very complex code-walker

20:36 qbg: A reason why it should live in the compiler

20:36 amalloy: absolutely

20:36 qbg: "wait for new compiler" it says on Confluence

20:36 gfredericks: I guess that means it's the former

20:37 amalloy: (macrolet [(inc [x] `(dec ~x))] (+ (inc 1) (let [inc clojure.core/inc] (inc 1)))) - tools.macro is smart enough to only replace the first instance of inc, because the second is shadowed by a let, i believe

20:37 lynaghk: whoa, does reify not work with protocols that have multiarity functions?

20:37 amalloy: lynaghk: you're either getting the syntax wrong, or using varargs

20:38 gfredericks: amalloy: that is pretty intense. I would not want to have written the code to do that.

20:38 what if you macrolet let first?

20:38 TimMc: lynaghk: Collapse multiple arities into a single form

20:38 amalloy: dunno

20:39 lynaghk: TimMc: just tried that, no luck

20:39 TimMc: lynaghk: (foo ([] ...) ([a b c] ...))

20:39 huh

20:39 lynaghk: amalloy: https://gist.github.com/255b708b7a6e7a1647ba

20:40 amalloy: you got the protocol definition wrong

20:40 &(doc defprotocol)

20:40 lazybot: ⇒ "Macro ([name & opts+sigs]); A protocol is a named set of named methods and their signatures: (defprotocol AProtocolName ;optional doc string \"A doc string for AProtocol abstraction\" ;method signatures (bar [this a b] \"bar docs\") (baz [this a] [this a b] [this a ... https://refheap.com/paste/935

20:41 lynaghk: ah, yes I did. Thanks amalloy

20:44 gfredericks: in the future clojure will have symbol macros?

20:45 hiredman: I think so

20:46 it's in the confluence wiki as something desired whenever the compielr gets rewritten

20:46 gfredericks: I've only just heard of this rewriting -- I imagine rewritten in clojure?

20:47 hiredman: yes

20:48 http://dev.clojure.org/display/design/letmacro

20:49 gfredericks: hiredman: thanks

20:59 qbg: Oh boy, I almost want to use potemkin now...

20:59 ztellman: qbg: what pushed you over the edge?

21:00 qbg: Have you see core.logic?

21:00 Merging gensyms would be useful in more than one occasion...

21:01 PntBlnk_: Hi all. Quick question: how do I call an inherited instance method on a class? I can see the inherited methods with .getMethods, but not with clojure.reflect/reflect.

21:06 qbg: PntBlnk_: I think you want to specify the :ancestors option to reflect

21:08 jcrossley3: RickInGA: yep :)

21:09 PntBlnk_: qbg: Thanks, I'll have a go. I presume I should be looking at :import options for something similar as well?

21:10 qbg: PntBlnk_: Not sure I understand. Take a look at the doc for type-reflect

21:11 PntBlnk_: qbg: well I want to actually use the method, not just see it when I call reflect. I'm sure I can find my way with your pointers. Heading to the docs... Cheers.

21:12 qbg: PntBlnk_: You don't need to import anything to call a method

21:12 You only need to import class that you don't want to fully qualify

21:12 TimMc: &(.byteValue 5)

21:12 lazybot: ⇒ 5

21:13 TimMc: Look ma, no imports.

21:13 (On second thought, I have probably totally misunderstood your question.)

21:15 PntBlnk_: qbg: I'm not sure I understand. I've imported com.unboundid.ldap.sdk.SearchRequest, which inherits a setControls method from com.unboundid.ldap.sdk.UpdatableLDAPRequest. I get a no matching method found when I try to call it...

21:16 qbg: You're probably calling it with the wrong number (or type of) arguments

21:16 TimMc: PntBlnk_: Ah, then you probably need to do a cast, or maybe it is a varargs problem.

21:16 qbg: What does the method sig look like?

21:16 If it has varargs, you need to box those args in an array manually

21:19 PntBlnk_: qbg: public final void setControls(Control... controls)

21:19 qbg: Yeah, you'll need to box those

21:20 TimMc: PntBlnk_: Control... is Java slang for Control[]

21:20 qbg: You may find into-array useful

21:20 gfredericks: that sounds like a good macro. I bet one already exists.

21:20 making arrays always takes me several tries :/

21:20 PntBlnk_: TimMc: So I'm getting the error because I'm passing an "unboxed" control to the method?

21:21 qbg: You are passing some number of Controls instead of a Control[]

21:21 amalloy: gfredericks: what macro?

21:21 scriptor: into-array exists

21:21 PntBlnk_: qbg: Thanks! I understand now.

21:21 gfredericks: amalloy: a macro for calling vararg java functions

21:22 amalloy: it's not as easy as you think

21:22 gfredericks: amalloy: cuz of types?

21:22 amalloy: that's some of it

21:22 TimMc: gfredericks: Smarter reflection code would probably be enough.

21:22 boodle: Hi, why is this false? (contains? (range (int \A) (int \Z)) (int \A))

21:22 amalloy: the other is that you have to be very explicit about how many fixed args there are

21:22 qbg: &(doc contains?)

21:22 lazybot: ⇒ "([coll key]); Returns true if key is present in the given collection, otherwise returns false. Note that for numerically indexed collections like vectors and Java arrays, this tests if the numeric key is within the range of indexes. 'contains?' operates constant or ... https://refheap.com/paste/941

21:23 qbg: That is why

21:23 gfredericks: amalloy: yeah for that I imagined a vector literal at the end, rather than ambiguously open

21:23 PntBlnk_: qbg: (.setControls (SearchRequest. searchbase SearchScope/SUB account-filter (into-array ["*"])) (into-array [(SimplePagedResultsControl. 100 nil)])) works a treat. Thanks again. I'll add that one to my Gotcha's list...

21:23 qbg: contains? is for map like collections

21:23 gfredericks: so not too much gain, but easier in my mind than remembering how the different array functions work

21:23 TimMc: heh

21:23 amalloy: in that case, it's only difficult because of types :P

21:24 TimMc: Varargs make me in nervous in Java, actually.

21:24 I'm still not clear on where they might be ambiguous.

21:24 boodle: qbg: is there a function that is true if a sequence has a value?

21:24 qbg: &(doc some)

21:24 lazybot: ⇒ "([pred coll]); Returns the first logical true value of (pred x) for any x in coll, else nil. One common idiom is to use a set as pred, for example this will return :fred if :fred is in the sequence, otherwise nil: (some #{:fred} coll)"

21:24 boodle: k

21:24 qbg: See that idiom :)

21:25 amalloy: TimMc: you should read some blog posts about the sneaky interplay between varargs, generics, and other stuff

21:25 boodle: qbg: ty

21:25 amalloy: nightmares

21:25 TimMc: amalloy: Or maybe I shouldn't.

21:25 gfredericks: $google the sneaky interplay between varargs, generics, and other stuff

21:25 lazybot: [Wealthfront Engineering: November 2010] http://eng.wealthfront.com/2010_11_01_archive.html

21:27 gfredericks: clearly google has a long way to go

21:28 amalloy: TimMc: http://strangeloop2010.com/system/talks/presentations/000/014/450/BlochLee-JavaPuzzlers.pdf is one i remember

21:30 gfredericks: oh man

21:34 TimMc: aaagghhh Java WTF

21:36 So if you use a raw type, all the method type params are dropped?

21:36 * gfredericks doesn't even know what Collection<?> means

21:36 qbg: A collection of unknown type

21:37 gfredericks: it is different from a raw type?

21:37 qbg: Yes, but not by too much :)

21:37 gfredericks: awesome.

21:37 qbg: I keep running into javac bugs when I use generics

21:37 gfredericks: it must also be different from Collection<Object>?

21:37 qbg: Eclipse doesn't have those bugs...

21:37 TimMc: gfredericks: And then List (raw) becomes a better match than Collection (raw).

21:38 qbg: Yes

21:38 A Collection<Object> is a collection of objects

21:38 gfredericks: is there something you can do with a Collection<?> that you can't do with a Collection<Object> or vice versa?

21:38 qbg: Think about what it means to add an item to it

21:39 gfredericks: so in Collection<?> the runtime collection could have a more restrictive type?

21:39 qbg: Yes

21:39 gfredericks: but then I don't know that's not the case with a Collection<Object> as well...

21:39 qbg: You really can't add anything to a Collection<?>

21:40 You have to do an unchecked cast to view a more restrictive collection as Collection<Object>

21:40 gfredericks: but you can read out of a Collection<?> and assign that to an Object I imagine

21:40 qbg: You can't assign Collection<Integer> to Collection<Object>, but you can to Collection<?>

21:41 gfredericks: oh I misknew that then

21:41 qbg: Collections aren't covariant

21:41 * generics

21:42 gfredericks: not understanding that phrase makes me want to learn haskell.

21:42 TimMc: and <?> is an escape valve for that

21:42 qbg: Arrays in java are covariant though

21:42 (which is weird...)

21:42 TimMc: yep -- insta runtime bugs

21:42 qbg: And that causes issues with generic arrays

21:42 TimMc: gfredericks: I hand you an Object[], and you try to put an Integer in it -- what happens?

21:42 qbg: Because it needs to be checked at runtime

21:43 gfredericks: TimMc: it works!

21:43 TimMc: gfredericks: NOPE. It was really a String[]!

21:43 gfredericks: CRAP

21:43 TimMc: That's covariance for ya.

21:43 * TimMc leaves the cleanup to qbg

21:43 qbg: Covariance only makes sense for immutable collections

21:44 gfredericks: so likewise you could hand me a Collection<?> and I put an Integer in it and then I lose because it was really a Collection<String>

21:44 qbg: You can't put an integer in it

21:44 Because the types don't match

21:44 gfredericks: the compiler enforces read-only?

21:44 qbg: (An integer isn't an ?)

21:45 gfredericks: but an ? is an Object?

21:45 qbg: Object is a superclass of ?

21:45 amalloy: TimMc: i guess it's been a long time since i used arrays. i remember all the pitfalls about List<?> vs List<Object>, but i had forgotten that Object[] is a superclass of Integer[]

21:45 TimMc: Yeah. Sucks.

21:45 amalloy: that's messed up, man

21:45 TimMc: The whole Java type system is fucked.

21:46 qbg: We can also cover ? extends Foo and ? super Foo :)

21:46 gfredericks: java will never catch on

21:46 TimMc: I especially like the bit where "int i = j" can give you an NPE.

21:46 qbg: javac has so many generics bugs

21:46 TimMc: That'll give you a headache the first time you encounter it.

21:46 amalloy: gfredericks: the compiler sees that you have a Collection<?> and knows it can't safely put anything in there, because it might be enforcing any type

21:46 qbg: Eclipse works so much better

21:46 amalloy: but you can safely get an Object out, because everything is an Object

21:47 TimMc: or can be boxed as one

21:47 gfredericks: amalloy: it makes sense when I think about it carefully

21:47 amalloy: TimMc: any element already in the Collection must be an Object, if you prefer

21:47 TimMc: That too.

21:47 qbg: It is one, you can't have primitive generic collections

21:47 amalloy: with a Collection<Object>, the compiler knows the collection is capable of holding Objects, so you can put one in

21:48 qbg: Don't you appreciate Clojure now?

21:48 gfredericks: and haskell somehow does all this without being fucked up?

21:48 qbg: Subclassing causes all of the problems

21:48 TimMc: and mutation

21:49 amalloy: gfredericks: yeah, i think it actually does, more or less

21:49 gfredericks: this must be why people talk about it

21:49 TimMc: gfredericks: That, and the ASCII art.

21:50 qbg: OO does not play well with all of this

21:50 (Java style OO that is)

21:51 Generic methods are my favorite

21:51 Got to love that syntax

21:52 TimMc: My favorite is writing typed tuples in Java.

21:52 qbg: Sum types!

21:53 TimMc: Cons<String, Cons<Integer, Cons<Double, Nil>>> foo = ... ;

21:53 qbg: Too bad they don't work generic interfaces

21:53 TimMc: That'll really fuck with your average bean-grinder.

21:54 gfredericks: which is all you can really hope for

21:54 TimMc: It's the best possible outcome.

21:54 qbg: I just define a bunch of TupleN types

21:54 * TimMc has actually written that code

21:54 TimMc: qbg: Just like Haskell amirite

21:55 qbg: I've been basically porting some useful Clojure functions to Java at work

21:55 TimMc: Oh wait, no... I'm thinking of zip2, zip3, zip4...

21:55 qbg: But if I go all out with generics, javac dies :(

21:56 javac isn't very good at type inference

21:56 brehaut: todays understatement award goes to qbg

21:57 qbg: It wouldn't be so bad if eclipsec was broken also

21:57 But as it stands, your code compiles fine in eclipse, but the maven build dies

21:57 scriptor: what's eclipsec?

21:57 qbg: The eclipse compiler

21:57 TimMc: a typo

21:57 oh

21:58 <- bad snarker, no muffin

21:58 scriptor: wait, eclipse has its own compiler, it doesn't use the existing jdk?

21:58 this is why I don't do java

21:58 qbg: It needs it for the incremental compilation

21:58 and other good stuff

21:58 Like turning syntax errors into runtime errors

21:58 scriptor: ah

21:59 qbg: That bytecode is fun to look at

21:59 This method just throws an exception...

21:59 gfredericks: oh it compiles syntax errors into exception-throwing methods?

21:59 qbg: Yes

21:59 brehaut: thats different

22:00 qbg: By default, you can change that

22:00 gfredericks: presumably it couldn't do that for all syntax errors

22:00 qbg: Eclipse handles syntax errors really well

22:01 amalloy: eclipsec is nice, but it's a bit awful to push/commit source files that don't compile under javac

22:01 qbg: They could basically add a DWIM mode and have it be correct a majority of the time

22:01 amalloy: i usually used it to make the compiler stricter, not looser

22:01 qbg: I turn on a lot of extra warnings in Eclipse

22:02 But then I look at coworker code, and there are warnings everywhere...

22:03 amalloy: at one time i went a bit mad, turning tons of warnings into errors. "no, never let me check something for null if you already know whether it's null"

22:04 qbg: I keep the Javadoc warning off for the most part :)

22:05 amalloy: eclipse writes so much code for you. i speculate this is why java programmers don't realize they need macros

22:05 qbg: No, just ignorance

22:05 I still want macros so bad in Java

22:06 I don't want to use ASM...

22:07 pipeline: java is verbose enough that macros would end up like C preprocessor macros anyway

22:08 scriptor: I wonder if some sort of lazy evaluation would be a good start

22:08 so that the arguments aren't immediately evaluated

22:08 qbg: The impl doesn't matter as much as the resulting syntax

22:09 The most common use of macros for me would be for defining classes

22:09 amalloy: how does verbosity have anything to do with lisp vs c macros? the difference is homoiconicity

22:10 gfredericks: we could make java homoiconic by replacing all the basic data structures with ASTs

22:11 qbg: Or we could just use Clojure instead

22:11 scriptor: wouldn't have to replace them

22:11 just add the AST data structure

22:11 gfredericks: I guess so

22:11 scriptor: what's perl 6 doing?

22:11 I think it's something like that, with their macros

22:26 jcromartie: does anybody really use derby with Clojure?

22:26 the examples I'm finding are not usable

22:31 looks like H2 is the way to go

22:31 done!

22:32 RickInGA: what are derby and h2 for?

22:32 jcromartie: they are embedded pure-Java databases

22:32 Derby is an Apache project

22:32 RickInGA: ah, cool

22:32 jcromartie: H2 seems to be a bit more lively

22:33 now I know

23:00 zawzey: hmm, how do i force a lazy-eval? i tried (str "some sequence: " (doall a-lazy-seq)) but it returns "some sequence: clojure.lang.LazySeq@e93c3"

23:00 only works when i replaced doall with vec

23:01 i meant, how do i force the eval of a lazy sequence in that case, doall didn't seem to work. why?

23:03 amalloy: don't use str

23:03 pr-str

23:04 hiredman: zawzey: doall does force it, but that doesn't change the resuting of calling str on it

23:04 zawzey: @amalloy well i wasn't trying to print it.. per se, just returning some string for unit tests

23:05 TimMc: amalloy: Whoa, #5 in that slideshow (EnumMap) is just terrible. That's a straight-up Java bug, nothing to it. :-(

23:05 amalloy: TimMc: yeah, i was horrified when i discovered IdentityHashMap does that

23:06 zawzey: hiredman: so what is the proper way to do that in this case

23:06 hiredman: zawzey: what amalloy said

23:10 zawzey: thanks guys, that works, now could i ask why prn-str works?

23:12 TimMc: zawzey: pr (the underlying fn) means "print for reader"

23:13 pr-str is a variant that returns the result as a string instead of printing to stdout

23:13 prn and prn-str are further variants that tack on a newline

23:14 mk: why isn't str simply equivalent to pr-str?

23:14 TimMc: because it calls the .toString method on things

23:15 mk: what does the other do?

23:15 TimMc: str makes things responsible for printing themselves. pr does the work for them, and works against various abstractions.

23:15 * TimMc may be making shit up, but if no one contradicts him, will continue

23:16 zawzey: so str doesn't evaluate lazy sequences as a side effect?

23:17 mk: pr source: https://github.com/clojure/clojure/blob/f5f827ac9fbb87e770d25007472504403ed3d7a6/src/clj/clojure/core.clj#L3267

23:17 zawzey: but in that case, i tried to force the lazy sequence to be evaluated with doall

23:18 mk: zawzey: I'm guessing, but perhaps str calls .toString on the lazy sequence object itself, while pr does something else

23:21 zawzey: mk: well doall does call dorun which also walks through the sequence

23:21 https://github.com/clojure/clojure/blob/f5f827ac9fbb87e770d25007472504403ed3d7a6/src/clj/clojure/core.clj#L2714

23:23 mk: totally guessing now, but perhaps: yes, it walks through the sequence, but the sequence doesn't become something new, it's still a LazySequence, so when you .toString it, that's what ya' get

23:36 amalloy: correct, mk

23:38 scriptor: the 2nd and last expression in doall just returns coll

23:56 mac: SirDinosaur: what did they say when yu asked about opensourcing datomic? i dced

23:59 mk: mac: http://clojure-log.n01se.net/

Logging service provided by n01se.net