#clojure log - May 14 2011

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

3:06 grantm: when i try to use case, the REPL tells me that case doesn't exist. which is weird. i'm pretty sure case exists... right? why can't the repl (or clojure for that matter) find it?

3:08 stirfoo: sometimes I'll fat-finger a namespace and I can't acces core functions, but I have no idea exactly what I did wrong.

3:08 but clojure.core/case would work

3:09 <shrug>

3:09 grantm: oh wait, im using clojure 1.1 and it needs 1.2

3:09 simple :)

3:09 stirfoo: no case in 1.1?

3:09 grantm: nope

3:10 stirfoo: ah, I think I jumped into Clojure after 1.2 was released

3:11 grantm: me too :)

3:11 not sure how i have 1.1

3:12 stirfoo: I find it weird that (in-ns 'frumbajimbleooza) does not fail if that namespace does not exist. I think that's how I lose core functions sometimes.

3:15 amalloy: stirfoo: that's the way namespaces are (usually) created

3:16 ,(macroexpand '(ns tmp))

3:16 clojurebot: (do (clojure.core/in-ns (quote tmp)) (clojure.core/with-loading-context (clojure.core/refer (quote clojure.core))))

3:16 stirfoo: oh, that's interesting

3:17 amalloy: you can explicitly create them with ##(create-ns)

3:17 sexpbot: java.lang.IllegalArgumentException: Wrong number of args (0) passed to: core$create-ns

3:19 amalloy: i'm not sure if there exists a way to enter a namespace that doesn't implicitly create it. it's hard to imagine it seeing much use, though, since (ns whatever) is supposed to be macro sugar over in-ns/use/require, and if it actually did more than just package them up nicely i think that would cause more confusion

3:19 ~source in-ns

3:19 $source in-ns

3:19 sexpbot: Source not found.

3:19 amalloy: really?

3:19 &(doc in-ns)

3:19 sexpbot: ⟹ "([name]); Sets *ns* to the namespace named by the symbol, creating it if needed."

3:20 stirfoo: well there it is, 'creating it' if needed

3:22 I got my copy of Joy of Clojure but I want to get a proper Clojure environment in place before I dig in. I've been using my own scripts handling CLASSPATH, but now I'm trying to get lein working.

3:23 amalloy: stirfoo: http://stackoverflow.com/questions/5983427/how-to-install-clojure-on-ubuntu-10-04-from-github-repo-with-no-clojure-jar/5984183#5984183 is a super-easy way to get lein running

3:23 Vinzent: in enlive, is it possible to alter inner tag of the tag which I've selected?

3:24 like, <div><a ...>, I have to clone-for div and change href attr of a

3:27 thorwil: Vinzent: if you clone-for :div, you can then just follow on with selecting :a

3:27 [:a] (en/set-attr :href string)

3:28 aside of that, transformations can be nested, so you can always sub-select

3:29 Vinzent: thorwil, but then all links will have the same href, right? The idea is to build list of links

3:30 thorwil: Vinzent: that's what the let part of clone-for is

3:30 good for

3:31 (en/clone-for [i (:items arg-from-defsnippet)], then extract the needed data from i

3:32 stirfoo: thanks amalloy. I had actually gotten that far but if I add [org.clojure/clojure-contrib "1.1.0"] to my project :dependencies, run lein deps, run lein repl, then (require '[clojure.contrib.str-utils2 :as sutils]) I get: java.lang.NoSuchMethodError: clojure.lang.RestFn.<init>(I)V (NO_SOURCE_FILE:0)

3:34 thorwil: Vinzent: see for example http://paste.pocoo.org/show/388503/

3:34 amalloy: (a) 1.1 is way old, as is str-utils2. (b) that's the error message you get for mismatched compiled binaries

3:34 did you build something yourself?

3:35 stirfoo: amalloy: ah, no I just installed the lein script, created a project, added the contrib dependency. So maybe I should use a different version in the :dependencies vector?

3:36 amalloy: stirfoo: depend on clojure 1.2.1, and contrib 1.2.0

3:38 stirfoo: amalloy: what replaces str-utils2? or have most of those functions been folded into core?

3:38 amalloy: stirfoo: most of them have been folded into clojure.string

3:38 stirfoo: amalloy: that worked, thanks!

3:38 amalloy: ah

3:38 amalloy: the rest mostly live in clojure.contrib.string, i think

3:42 Vinzent: thorwil, that's it, thank you very much for the paste!

3:42 thorwil: np

3:51 stirfoo: Well all right. Full macro expansion works in swank now, sans namespaces and pretty printed.

3:52 amalloy: sans namespaces?

3:52 stirfoo: amalloy: namespaces were included in macro expansions before. I had something wrong, but it's all working now.

3:53 amalloy: stirfoo: not entirely sure i know what you mean. macroexpansions should have namespaces in them, like ##`x

3:53 sexpbot: ⟹ clojure.core/x

3:54 amalloy: anyway glad it's working for you

3:54 stirfoo: sexpbot: no! I don't want that, it just muddles the output, imo

3:55 amalloy: stirfoo: too bad, mate. it's there for a reason, to prevent accidental symbol capture, which is heinously difficult to debug

3:57 stirfoo: If I'm writing a macro and want to see what it expands to, the namespaces just make it harder to read, again, imo.

3:57 Vinzent: stirfoo, there is clojure-debug that makes macroexpansions pretty

3:58 amalloy: Vinzent: linkkkkk plz

4:00 stirfoo: sometimes I like a *fully* recursive expansion as well C-c M-m (slime-macroexpand-all) which seems to work well with lein swank now. Nice an pretty printed with no namespaces.

4:00 amalloy: stirfoo: you're right in most cases. i wouldn't complain if clojure.core/inc printed as inc when macroexpanding

4:01 but if you have a symbol you accidentally namespace-qualify and didn't intend to, it seems like you're asking for pain if you cause the macroexpansion-printer to hide the ns

4:01 stirfoo: No, I agree. I depends on the complexity of the macro I suppose.

4:02 amalloy: stirfoo: the usual mistake is qualified let-bindings: ##`(let [x 1] (inc x))

4:02 sexpbot: ⟹ (clojure.core/let [clojure.core/x 1] (clojure.core/inc clojure.core/x))

4:02 amalloy: when what is really *meant* is ##`(let [x# 1] (inc x))

4:02 sexpbot: ⟹ (clojure.core/let [x__10202__auto__ 1] (clojure.core/inc clojure.core/x))

4:02 amalloy: haha, except with the # in both places :P

4:02 stirfoo: amalloy: I've gotten used to `(let [x# 1] ...), which is really cool ;)

4:03 amalloy: yeah

4:03 stirfoo: I don't think I've used (gensym) yet

4:03 I don't think I'*had* to use (gensym)

4:03 amalloy: but especially devious is ##`(do `(let [x# 1] x#))

4:03 sexpbot: ⟹ (do (clojure.core/seq (clojure.core/concat (clojure.core/list (quote clojure.core/let)) (clojure.core/list (clojure.core/apply clojure.core/vector (clojure.core/seq (clojure.core/concat (clojure.core/list (quote clojure.core/x__10210__auto__)) (clojure.core/list 1)))... http://gist.github.com/972036

4:04 amalloy: where the outermost ` form qualifies the gensym produced by the inner one

4:04 stirfoo: i've found a couple reasons to use gensym, but not many

4:19 Vinzent: amalloy, well, actually I don't know what exactly does that :) I can paste my (messy) emacs config if you want

4:20 amalloy: Vinzent: eh. i don't really use C-C C-m that often; i just call macroexpand from the repl

4:23 Vinzent: amalloy, why? imo hit C-c RET on the form is much more convenient

4:23 stirfoo: that's what I always use, and the extra C-c M-m sometimes

4:24 Vinzent: http://imgpaste.com/i/cgdlr.png

4:24 amalloy: yeah, it is, i'm sure. i just never really got into the habit, and i most often test macroexpansions while i'm developing something in the repl anyway

4:24 stirfoo: and you can C-c RET in that buffer to do surgical strikes

4:27 amalloy: $mail dnolen https://github.com/technomancy/clojure-mode/pull/17

4:27 sexpbot: Message saved.

4:33 Vinzent: btw, I haven't solved my yesterday's problem: when doing java -cp ./lib;my.jar my.ns i've got Failed to load Main-Class manifest attribute from... Indeed, there is no such atribute in lein-created jars, but then how should i run it correctly?

4:40 amalloy: Vinzent: set the :main attribute in project.clj to my.ns

4:44 Vinzent: amalloy, Could not find the main class...

5:24 terom: &(doc find-ns)

5:24 sexpbot: ⟹ "([sym]); Returns the namespace named by the symbol or nil if it doesn't exist."

5:26 yayitswei: is there an easy way to stop a hung process without killing the REPL? I'm using clojure.contrib.shell-out and am trying to debug a process that keeps freezing

9:21 technomancy: amalloy_: nice; thanks for the fix

12:15 TimMc: yayitswei is gone, but... my suggestion would have been Ctrl-Z, then ps -e --forest | grep rlwrap -A 5

12:15 Anybody have a better approach?

12:43 robonobo: Is there a function that gives back every pair of two given colls? so (f (range 3) (range 3)) -> ([0 0] [0 1] [0 2] [1 0] [1 1] ...)

12:44 Vinzent: for?

12:44 clojurebot: for is not used often enough.

12:45 robonobo: ,(for [i (range 3)] (map #(vector % 4) (range 3)))

12:45 clojurebot: (([0 4] [1 4] [2 4]) ([0 4] [1 4] [2 4]) ([0 4] [1 4] [2 4]))

12:45 robonobo: but

12:45 ,(flatten (for [i (range 3)] (map #(vector % 4) (range 3))))

12:45 clojurebot: (0 4 1 4 2 4 0 4 1 4 ...)

12:46 ampleyfly: $help findfn

12:46 sexpbot: ampleyfly: Finds the clojure fns which, given your input, produce your output.

12:46 ampleyfly: hmm

12:46 Vinzent: ,(for [i (range 3) j (range 3)] [i j])

12:46 clojurebot: ([0 0] [0 1] [0 2] [1 0] [1 1] [1 2] [2 0] [2 1] [2 2])

12:46 robonobo: ofcourse

12:46 Vinzent: thanks

12:46 Vinzent: robonobo, np

14:19 stirfoo: if I wanted to set (javadoc foo) to look for a local copy of the docs, I could put it in ~/.lein/init.clj?

14:19 something like: (dosync

14:19 (ref-set clojure.java.javadoc/*local-javadocs* '("/usr/share/doc/openjdk\

14:20 -6-jdk/api/")))

14:20 sorry for the multiline crap-ola

14:20 would that just go at the top level of init.clj?

14:25 tomoj: wonder why that's a ref

14:27 stirfoo: I don't know, I've only used atoms and dynamic vars, not refs

14:27 I had to look up how to set it ;)

14:28 tomoj: looks like there is an add-local-javadoc there for you too

14:34 stirfoo: tomoj: do you know how to add that to ~/.lein/init.clj? I tried to require clojure.java.javadoc, then use add-local-javadoc, but lein swank fails to start

14:37 tomoj: not sure why it would fail, but I don't think it will help anyway

14:37 init.clj runs in leiningen's jvm

14:38 stirfoo: so how would I append to *local-javadocs* globally (for lein repl or lein swank)

14:38 tomoj: :repl-init seems like it would work

14:38 but then you need the code in a namespace that you either add to every project or depend on for every project

14:39 stirfoo: that doesn't sound fun

14:59 thorwil: i'm trying to get rid of some repetition, but this doesn't seem exactly elegant: http://paste.pocoo.org/show/388899/ any ideas how to express that conciser?

15:02 arohner: thorwil: one possibility is to make title a keyword argument. then use a let block to say [title (or title (:title content#))]

15:03 nm, I'm not sure which part you don't like

15:04 thorwil: arohner: the repetition of the "name title transformation" sequence

15:05 arohner: thorwil: in the reworked defview?

15:05 thorwil: yes

15:06 in the other case, it's the almost exact same body. no big issue, but there maybe something to learn here

15:09 arohner: http://paste.pocoo.org/show/388908/

15:09 that changes the calling function a little, I don't know if you care about that

15:10 (defview name transformation :title :foo)

15:11 thorwil: arohner: i actually had to look up how keyword args are supposed to work and that looks like what i just started to imagine. thanks!

15:12 arohner: np

15:12 steven: do any of you use TextMate for clojure?

15:12 thorwil: hmm, i guess i can get rid of the let with an :or in the signature

15:14 arohner: thorwil: maybe. I wasn't sure what the defn was called with.

15:15 do you have access to (:title content) when the macro is run?

15:16 stirfoo: does anyone have a sample ~/.lein/init.clj I could take a peek at?

15:18 tomoj: still trying to add the local javadoc?

15:20 thorwil: arohner: no, would have to work put into the macro as string. experimenting

15:23 stirfoo: tomoj: yes

15:23 arohner: man, zip-filter.xml is great until it doesn't work

15:23 stirfoo: if I try use or require in init.clj lein repl fails

15:25 tomoj: stirfoo: good luck, just worried what you will find if you get it to work :)

15:25 arohner: stirfoo: what are you trying to use/require? something in lein's classpath, or something in your project?

15:25 tomoj: if you get it to work I suspect that it will only be changed in lein's jvm, which won't help at all in your jvm

15:26 stirfoo: arohner: I'm tryin to point javadoc to a local directory, but I want to to be globally set

15:26 arohner: stirfoo: yes, but what are you trying to require?

15:26 stirfoo: (use '[clojure.java.javadoc :only (add-local-javadoc)])

15:26 or require

15:27 arohner: what's the exception?

15:27 stirfoo: Exception in thread "main" java.lang.ExceptionInInitializerError (init.clj:1)

15:28 arohner: can you paste all of it? on gist or pastie or something?

15:28 stirfoo: which pastebin?

15:28 arohner: stirfoo: any of them. https://gist.github.com/

15:28 stirfoo: ok, give me a sec...

15:32 https://gist.github.com/972546

15:35 is that require syntax correct?

15:36 arohner: stirfoo: yeah. Looks like lein has a problem loading clojure.java.javadoc. the line (:use [clojure.java.browse :only (browse-url)])

15:36 not sure why

15:37 stirfoo: I think learning how to read tracebacks is going to take a while ;)

15:52 arohner: stirfoo: add a (require 'clojure.java.shell) and (require 'clojure.java.browse) before requiring clojure.java.javadoc

15:52 I really don't understand why that works, but it does

16:02 stirfoo: arohner: well that kept the repl from crashing, but it's not setting *local-javadocs*. It's still an empty list which may be what tomoj was alluding to.

16:02 arohner: stirfoo: leiningen always starts in it's own JVM. when it starts the repl, it spawns a second JVM that contains all your project code

16:02 stirfoo: lein's resetting it afterwords

16:03 arohner: how do you know?

16:03 stirfoo: user=> clojure.java.javadoc/*local-javadocs*

16:03 #<Ref@7a4fe91e: ()>

16:05 arohner: that shows local-javadocs is empty, in your repl JVM. it doesn't prove lein reset it.

16:05 as I said, you have two JVMs. the one lein is running in, and the one your project is running in

16:06 lein init modifies lein's JVM

16:06 stirfoo: arohner: true

16:06 arohner: "The ~/.lein/init.clj file will be loaded every time Leiningen launches; any arbitrary code may go there. This code is executed inside Leiningen itself, not in your project. Set the :repl-init key in project.clj to point to a namespace if you want code executed inside your project."

16:06 stirfoo: I tried that as well, but I'm quite sure I didn't know what I was doing ;)

16:07 arohner: do you have a project yet? i.e. a directory with a project.clj in it?

16:07 stirfoo: yes setler/, I'm running lein from within that dir

16:08 arohner: so in that project.clj, add ':repl-init setler.init'

16:08 then make a setler.init namespace

16:08 then stick your add-local-javadoc stuff there

16:09 stirfoo: arohner: so I'd need to create setler/init.clj with: (ns setler.init (require ...)) (add-local-javadoc "...")

16:10 arohner: right

16:10 stirfoo: ok, let me try that

16:10 arohner: you know clojure files need to be in src/, right?

16:10 stirfoo: no

16:10 arohner: if you have setler/project.clj

16:10 stirfoo: yes

16:10 arohner: then all clojure source needs to be in setler/src/setler/init

16:11 because setler/src is the root of the classpath, and then namespaces need to have directories that match the parse of the ns name

16:14 stirfoo: well all right. thanks arohner (and tomoj)

16:15 I only had to require clojure.java.javadoc as well, not the others (shell, browser)

16:15 boilerplate code sux

16:15 arohner: stirfoo: yeah, needing the others was some kind of weirdness w/ how ~/.lein/init loads. Not sure why

16:16 stirfoo: what would be the point of ~/.lein/init.clj? If I wanted to modify the behavior of lein itself?

16:16 arohner: stirfoo: yeah

16:17 chouser: when using zf-xml, I always seem to need to use zf/descendants to get anything to work. The examples in zf-xml work on atom1, but they don't work on my own XML and I don't understand why.

16:20 robonobo: so I have this function that generates a random nr between an upper and a lower limit (defn r [low upp] (+ low (* (- upp low) (Math/random))))), that seems to always return a rounded number when it's defined in a file, but not when it's defined in the REPL. Is there anyway I'm not hallucinating?

16:20 arohner: robonobo: I'd make sure you're calling what you think you're calling. There's no way file vs. repl would cause that

16:21 robonobo: maybe you're calling an old version or one defined somewhere else?

16:21 robonobo: arohner: i've restarted swank a couple of times.

16:21 or would that not help?

16:21 the function used to contain a Math/ceil call, so it's probably because of that

16:22 arohner: robonobo: swank lives in emacs, and talks to the clojure JVM over a socket. are you restarting emacs or the JVM?

16:22 restarting swank won't affect the JVM

16:22 robonobo: the jvm

16:23 arohner: add a println in the function. like (println "I'm calling it!").

16:24 yeah, floor & ceil would fix it. random returns a double. double * int is a double. double + int is a double. so what you have pasted should always return a double

16:26 robonobo: ugh. I swear i've restarted swank a couple of times, but now, trying it after i've asked #clojure, it magically works. damn computers.

16:29 stirfoo: ,sayoonara should kill the server as well, yes?

16:29 clojurebot: java.lang.Exception: Unable to resolve symbol: sayoonara in this context

16:29 stirfoo: hehe, down boy!

16:32 well, :repl-init only works for the REPL, not swank, so now (javadoc ...) uses the URL, not the local doc

16:33 that's why I need to set it globally... somehow. that and I really don't want to have to add the boilerplate to every project. lein repl doesn't require a project too.

16:40 looks like alexott merged a patch to address that problem 6 months ago

16:44 have to use the deprecated :repl-init-script for it to work with swank

18:07 fmw: bit of a weird channel for this question, but here we go: anyone found a good alternative to the Aloha rich text editor (I'm working in an Apache licensed CMS in Clojure and don't want to force the AGPL on people)?

18:08 I've been trying a few, but have been rather underwhelmed

18:09 of course, I rather use markdown/rst for markup, but will need something WYSIWYG for typical users

18:29 lucian: fmw: ckeditor? tinymce?

18:31 fmw: lucian: thanks for the suggestions. those seem a bit bloated to me, but I might try them anyway. right new I'm testing the YUI editor, which seems to be quite decent

18:31 lucian: i've never seen a good wysiwyg editor in a browser

18:31 or anywhere else, for that matter

18:31 fmw: lucian: me neither

18:32 lucian: I would personally never use one either, but for non-technical users its quite nice.

18:32 lucian: i'm not convinced of that

18:32 but yeah, people expect one

18:33 fmw: indeed, I'd like to try and convince them something like markdown is easy to learn, but there is a whole group of people that says "WHAT!? it doesn't look like Microsoft Word so how am I going to make sense of this?"

18:34 no point arguing with that

18:37 technomancy: stirfoo: there's a bug in Clojure where classes in jars on the bootclasspath can't transitively require

18:43 that's why you have to require shell/browser before javadoc works.

18:43 stirfoo: technomancy: ok. how would I go about modifying what `lein new' writes? Is there some template mechanism?

18:43 technomancy: but the bootclasspath shaves like half a second off boot time, so it's worth putting up with its annoyances

18:44 stirfoo: there's a plugin called "spawn" that does that

18:44 something like that may be added to leiningen itself in a future version

18:44 stirfoo: ah, ok I'll check that out.

18:44 technomancy: swank is working great so far, thanks for the effort

18:45 technomancy: cool

18:45 crap... I thought I had added :repl-init support to swank in 1.3; I guess I missed it =\

18:46 stirfoo: technomancy: yes, I had to use the deprecated keyword, but it does work

19:21 amalloy: technomancy: i think my patch breaks some things

19:22 steven: do any of you use TextMate for writing clojure code? if so, which plugin do you use?

19:22 amalloy: in particular [[]|] - a backspace there deleted the innermost ]

19:23 and i assume that's because C-M-b there skips to before the first [

19:29 but i can't figure out why. ideas?

19:31 tomoj: 3fba516 is good?

19:32 stirfoo: [[]|] C-M-b [|[]] on my setup, no paredit, just basic emacs with clojure-mode

19:32 amalloy: tomoj: afaik

19:33 stirfoo: with or without the commit i made last night to clojure mode? https://github.com/technomancy/clojure-mode/commit/4495e3

19:34 stirfoo: amalloy: probably before that, I've had clojure-mode installed for a couple weeks

19:35 amalloy: yes, my local version does not have that 'forward-sexp-function line

19:37 does | have any special meaning in Clojure? I wonder if slime-repl is still parsing that char as common lisp. It messes with the repl.

19:37 I think it's for escaping symbols in cl

19:37 amalloy: right, and not meaningful in clojure

19:38 stirfoo: so, slime-repl would need to be hacked, or slime proper maybe?

19:38 amalloy: i'd argue you need to stop using |. i don't know if it's a valid symbol character anyway

19:40 tomoj: I think that signifies point?

19:40 stirfoo: I have a macro named op|, which means 'alternate' (x | y | z) (op| x y z). I think I did look and couldn't determine if it was legal syntax or not

19:41 amalloy: $google clojure symbol reader

19:41 sexpbot: First out of 1540 results is: Clojure - reader

19:41 http://clojure.org/reader

19:41 tomoj: oh

19:41 amalloy: Symbols begin with a non-numeric character and can contain alphanumeric characters and *, +, !, -, _, and ? (other characters will be allowed eventually, but not all macro characters have been determined)

19:41 dnolen: | is definitely a valid symbol character in Clojure.

19:41 stirfoo: $ is another I use that isn't listed

19:42 amalloy: there are a lot of valid ones it doesn't mention

19:42 so it's not a very helpful reference

19:42 dnolen: evidence?

19:42 dnolen: ,(first '(|a|))

19:42 clojurebot: |a|

19:43 dnolen: amalloy: rhickey even talked about supporting it more explicitly.

19:43 amalloy: that's evidence that it works now

19:43 stirfoo: yes, it works nicely, just not with the slime repl

19:43 amalloy: stirfoo: that's weird

19:43 stirfoo: unless you C-u RET

19:45 well, since I have a good installation now (not my bubble-gum version) maybe it works.

19:46 user> (op| \x \y \z) RET => mini-buffer message [input not complete]

19:47 amalloy: i see. yeah, probably slime-repl then

19:47 stirfoo: just need to rip out the code that is intercepting the |

19:59 dnolen: steven: I maintain it very sporadically, https://github.com/swannodette/textmate-clojure

20:00 steven: it's quite easy to hack on, yet few people send in patches.

20:04 steven: cool thanks

20:18 aav: does anyone know if there any changes with exception handling in 1.3? it seems that try/catch does not work for me, as it did in 1.2

20:25 alandipert: aav: what have you noticed?

20:26 aav: alandipert: it seems that ClassNotFoundException get's wrapped into RuntimeException without any notice

20:27 (try

20:27 (.loadClass *bundle* cname)

20:27 (catch Exception e

20:27 (when osgi-debug

20:27 (println "class not found: " cname))))

20:27 that's what i have

20:27 and this code works now

20:28 but before (under 1.2) i had it working with (catch ClassNotFountException e

20:29 alandipert: yes, there have been changes that explain that

20:30 aav: alandipert: any hint where to read?

20:30 alandipert: https://github.com/clojure/clojure/commit/8fda34e4c77cac079b711da59d5fe49b74605553

20:32 aav: alandipert: i see. thank you!

20:33 alandipert: no problem

20:35 symbole: How does one create a variable, local to a prarticular namespace?

20:35 dnolen: symbole: w/ def

20:36 symbole: dnolen: It would still be refrencable from another namespace though.

20:37 dnolen: symbole: you can use metadata to make it private to the namespace if you like.

20:37 amalloy: but someone can still use it if they feel like ignoring the private meta

20:37 just fyi

20:40 dnolen: nary inline in alpha7 is sick.

20:40 finally (+ 1 2 3 4 5) is not dog slow.

20:42 1.3.0 is going to be a tasty release.

20:44 TheMoonMaster: When will 1.3 be out?

20:44 dnolen: TheMoonMaster: unknown, but I'm sensing we're nearing beta.

20:45 TheMoonMaster: dnolen: Awesome, wish there was some sort of release schedule

20:50 symbole: From what I can see, while there is defn- which would prevent "use" from exporting the symbol, there's no equivalent macro for vars. Why is that?

20:51 scottj: symbole: there's a really long thread in the mailing lists's history about this

20:51 symbole: basically there's ^:private and some ppl don't want private to be encouraged too much

20:53 symbole: scottj: I'm intersted in reading it. I imagine it could be very useful to have this local data, and prevent pollution if someone just did (use 'foo).

20:54 scottj: symbole: then (def ^:private foo ..)

20:55 dnolen: clojurebot: use

20:55 clojurebot: chouser: I really did wonder why you had all those photobombers on slide 2.... audio is so useful :)

20:55 dnolen: heh

20:56 scottj: symbole: that is for 1.3, older versions require (def ^{:private true} foo...)

20:57 symbole: scottj: Maybe what I am trying to do is just misguided? Do most people simply rely on users to use :only?

20:57 dnolen: symbole: exactly.

21:01 scottj: dnolen: in your recent recorded talk you mentioned type systems, maybe https://bitbucket.org/tarballs_are_good/lisp-random/src/b03568c1f295/HindleyMilner/tests.lisp would interest you

21:02 symbole: Seems to be more of an idiomatic approach to establishing an interface compared to what Common Lisp has. I'll roll with it. :-)

21:02 alandipert: dnolen's nyc lisp talk was recorded?

21:03 scottj: alandipert: yeah

21:03 alandipert: oh awesome

21:03 dnolen: alandipert: not the logic one no, a short talk about Scheme vs. Clojure

21:03 scottj: oh no wait maybe it was a scheme talk

21:03 dnolen: scottj: that is interesting though I'm more interested in post-HM type inference.

21:06 alandipert: dnolen: really enjoyed logic-tutorial btw, core.logic is a super cool library

21:07 dnolen: alandipert: thank you! still need to sit down and really flesh out the logic-tutorial.

21:11 scottj: it's funny I'm interested in the type system stuff, but I can't even begin to understand how a type checker might be written for the predicate dispatch stuff I'm interested in.

21:35 aav: is there a way to control which classloader is used by (import ... ?

21:37 it seems, that Compiler.ImportExpr generates code, that uses some default classloader

22:33 yayitswei: TimMC: thanks for your suggestion on using Ctrl-Z to pause a hung REPL. could you elaborate? ps -e --forest on my mac yields "illegal option -- -"

22:35 TimMc: yayitswei: Well, you may have a different ps binary. CHeck the man page for available options. Anyway, just find the process ID of the spwaned process and kill it.

22:36 yayitswei: TimMc: and how do you resume the thread that you paused?

22:37 TimMc: Oh, that depends on your shell, I guess. Let me see...

22:37 fg should work

22:38 You may have to check the job control features of your shell.

22:41 yayitswei: echo $SHELL # What shell are you using?

22:42 yayitswei: bash

22:44 TimMc: OK, cool. You can find out more about job control in bash's documentation. You won't need most of it -- ^Z, %, fg, bg, and jobs are the main things to know.

22:46 yayitswei: cool, thanks!!

22:49 wastrel: pstree maybe

22:49 i dunno if they have that for mac

23:27 yayitswei: thanks guys, the suspend-and-resume technique is working perfectly. any suggestions on how to view stdout while the command is running? currently if the process hangs in the REPL i have no additional information on why it's hanging

Logging service provided by n01se.net