#clojure log - May 16 2012

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

0:01 brehaut: from looking at enlives source it does appear that theres a bucket load of configuration available on tagsoup, but none of it appears to be exposed to the enlive consumer

0:01 which really limits its utility as a scraper

0:01 chouser: data.zip isn't very good at changing stuff -- it's mostly for scraping. But maybe in this limited circumstance I could use it to change what I need

0:03 brehaut: this calls for update-in abuse

0:05 * muhoo mutters "stencil" and coughs

0:07 chouser: stencil uses non-html patterns to insert strings?

0:07 dsantiago: chouser: Stencil is an implementation of mustache: mustache.github.com

0:07 It lets you make tags that signify insertion points in arbitrary text, HTML included.

0:08 chouser: ok. tinsel looks more interesting.

0:08 brehaut: dsantiago: does tinsel allow you to load an plain html template and then insert text containing markup ?

0:08 dsantiago: brehaut: What do you mean by plain HTML? With no mustache tags? Then no, it needs mustache tags to do anything interesting.

0:09 Oh wait, tinsel.

0:09 brehaut: Then the answer for tinsel is yes.

0:09 But, it is optimized for read-the-template-once, write-it-billions-of-times.

0:10 If you need to process a new template each time, it will probably be slow for that.

0:10 brehaut: so it doesnt parse any markup in the substitation?

0:10 dsantiago: Not sure I undertand.

0:11 brehaut: so on my site i have bunch of html blobs in my DB, and i stuff them into my templates with enlive.

0:11 to do that, enlive has to parse the blobs into clojure data before stitching them into the template

0:11 (which is slow as hell)

0:12 dsantiago: Yeah.

0:12 brehaut: if i switched to tinsel would i need to worry about that?

0:12 dsantiago: So, I've used tinsel exactly the way you are. It does not parse what you insert.

0:12 brehaut: fantastic

0:12 dsantiago: You could manually create a new template with the result and reparse that, if that's what you want. But it's optimized to be fast.

0:13 brehaut: dsantiago: thanks

0:13 dsantiago: brehaut: No problem.

0:17 chouser: dsantiago: would it be foolish to try to use tinsel to extract data from xml?

0:17 dsantiago: chouser: Yes. tinsel is entirely built around your template being parsed, and then processed and compiled into a very fast to render function that takes your data and produces the result.

0:19 chouser: what about parsing the template from .html instead of using hiccup?

0:19 dsantiago: What about it? It can do that.

0:19 chouser: ok, just hadn't found that in the docs yet.

0:20 note I'm not complaining about docs -- I'm in no position to.

0:21 dsantiago: Where would you like the docs to have more detail?

0:21 All the functions are in Readme.

0:21 devn: dsantiago: functions != general use

0:22 dsantiago: There's two worked examples.

0:22 devn: ive seen libs where all functions are documented beautifully, but their composition is neglected indefinitely

0:22 dsantiago: im speaking from ignorance, just saying...

0:23 dsantiago: Ah, OK. I'm happy to expand on things that aren't adequate.

0:23 devn: dsantiago: it's a weird position to be in. the hardest part is foreseeing how other people use your software

0:23 but as soon as they do there are all of these blind spots no one could have foreseen

0:24 dsantiago: Yeah. I guess I'm pretty lucky in that I think absolutely no one but me uses tinsel.

0:24 devn: haha dsantiago i wrote a garbage lib: https://github.com/devn/yokogiri

0:24 behold the power! ;)

0:25 ive tried to reuse it and ive already discovered several cases I didn't consider

0:27 dsantiago: devn: Is this an XSLT lib?

0:27 devn: no, just HTML

0:27 and outdated at that

0:27 dsantiago: Er, I meant XPath.

0:27 I think.

0:27 chouser: dsantiago: bam. and like that my use of tinsel has caught up and passed enlive. Thanks.

0:27 dsantiago: chouser: Awesome!

0:27 devn: dsantiago: ive worked a bit on kyleburton's clj-xpath

0:27 im not sure it'd be useful to you but

0:28 https://github.com/kyleburton/clj-xpath

0:28 it introduced to me to anaphoric macros, so that's something ;)

0:28 dsantiago: Interesting.

0:28 devn: i just picked up Let over Lambda today. enjoying the U-Language thoroughly

0:29 chouser: oh, but the doctype is gone and some whitespace has been stripped.

0:29 dsantiago: anything I can do to get those back?

0:30 dsantiago: OK, I'm not aware of why the doctype would drop, so let me look at that. But it does not attempt to keep whitespace pretty.

0:30 Do you have an example case on the doctype?

0:31 chouser: well, I had <a href="foo">foo</a> <a href="bar">bar</a>, and the space between those words was stripped, so now it renders as foobar

0:32 the doctype was just <!DOCTYPE html> and I used html-file to parse it

0:33 dsantiago: Looking…

0:36 chouser: it's crazy how much xslt calls to me for projects like this

0:36 even though I know it will betray me in the end

0:36 dsantiago: chouser: Looks like the problem in both cases is in tagsoup.

0:37 Or rather, clj-tagsoup.

0:37 amalloy: i remember when i was young and in love with xslt

0:37 dsantiago: It drops the doctype before I get it, and it drops that whitespace in its output.

0:38 So, it looks like Daniel Janus has released a new version of clj-tagsoup, let me see if updating helps with these.

0:38 devn: 04:35 < amalloy> i remember when i was young and in love with xslt

0:38 classic.

0:39 dsantiago: chouser: No dice. I'm sorry about this, my own usage has always been with the hiccup syntax (aside from basic tests).

0:40 Let me see if I can take a look at clj-tagsoup and see if there's a way to fix this up easily.

0:41 chouser: dsantiago: wow, thanks.

0:46 _KY_: How to enumerate all distinct pairs in a list, for example [1 2 3 4...]?

0:47 Would be [1 2] [1 3] [1 4] ... [2 3] [2 4]...

0:49 tmciver: _KY_: probably something from clojure.math.combinatorics perhaps.

0:50 _KY_: Yeah I guess... thought there might be a short answer...

0:52 terom: &(let [l [1 2 3 4]] (for [i l j l] [i j]))

0:52 lazybot: ⇒ ([1 1] [1 2] [1 3] [1 4] [2 1] [2 2] [2 3] [2 4] [3 1] [3 2] [3 3] [3 4] [4 1] [4 2] [4 3] [4 4])

0:53 tmciver: terom: nice

0:54 chouser: &(mapcat #(map vector (repeat %) %2) [1 2 3 4] (iterate next [1 2 3 4]))

0:54 lazybot: ⇒ ([1 1] [1 2] [1 3] [1 4] [2 2] [2 3] [2 4] [3 3] [3 4] [4 4])

0:54 chouser: oops

0:55 &(mapcat #(map vector (repeat %) (next %2)) [1 2 3 4] (iterate next [1 2 3 4]))

0:55 lazybot: ⇒ ([1 2] [1 3] [1 4] [2 3] [2 4] [3 4])

0:58 terom: Ah, missed the word "distinct"...

0:58 &(let [l [1 2 3 4]] (for [i l j l :while (not= i j)] [j i]))

0:58 lazybot: ⇒ ([1 2] [1 3] [2 3] [1 4] [2 4] [3 4])

0:58 _KY_: Right... the last one is neat=)

0:59 amalloy: it's probably not what you want, though. what if the input list is [1 2 2 3] - you never get the [2 2] pair

0:59 dsantiago: chouser: I'm really sorry. I'm embarrassed, but I am amazed that clj-tagsoup works at all.

0:59 Let me poke around and see if I can find a way to replace that.

1:01 _KY_: It works for me because the original list is supposed to have distinct elements

1:05 chouser: dsantiago: don't worry about it. The template is under my control, so I can fiddle with it as needed.

1:06 dsantiago: chouser: I'm glad to hear that, but I still have to fix this.

1:06 I use this thing myself.

1:06 chouser: I'm manually reiserting the doctype for now

1:06 dsantiago: The nasty goes all the way down to Tagsoup itself.

1:06 I'm looking at maybe NekoHTML.

1:14 _KY_: How can I "use" or "require" a jar library in REPL?

1:19 Chousuke: _KY_: you can use the ns form as usual, or use require directly. The jar needs to be in classpath though.

1:20 _KY_: And I can't set classpath in REPL?

1:29 So I set the classpath outside REPL... but it doesn't seem to locate the reference

1:35 devn: dsantiago: nekohtml is a good way to go

1:36 dsantiago: CyberNeko HTML parser, CyberNeko DTD Converter

1:38 _KY_: "FileNotFoundException Could not locate clojure/math/combinatorics__init.class"

1:38 My classpath is set to the directory containing the jar

1:38 ivan: it should be the jar itself

1:40 also, lein will handle all this for you

1:40 _KY_: Yeah but I want to try it with REPL

1:41 ivan: lein repl

1:41 amalloy: _KY_: with lein available on the scene, trying to manage the classpath on your own is really only valuable from an archaeological perspective:"look at all the unpleasant work our ancestors had to do"

1:43 _KY_: Yeah but I want to learn the basics also

1:43 =)

1:44 Doing jar that [jar file] doesn't list the contents of that jar...I wonder why?

1:44 Doing jar t [jar file] doesn't list the contents of that jar...I wonder why?

1:44 Ok.. it's jar tf

1:45 amalloy: jar (as a descendant of tar) takes its input from stdin; the f flag tells it to use a filename as input instead

1:45 so you could instead: $ jar t < myjar.jar

1:46 michaelr`: hello

1:46 _KY_: So I can see the .clj file in the jar...

1:46 But "require" doesn't locate it

1:46 arohner: _KY_: the jar needs to be on the classpath explicitly, it's not enough to put the jar's dir on the classpath

1:47 _KY_: Yeah I did that now

1:49 muhoo: should i be proud of this, or embarassed by it? https://www.refheap.com/paste/2746

1:49 amalloy: if you want help with these low-level sorts of issues it will probably help you to gist a transcript of what you're actually typing (including an ls or two to show file locations)

1:49 muhoo: whenever i ask that i'm proud but should be embarrassed

1:50 #((juxt :name :_id) %) => (juxt :name :_id)?

1:50 muhoo: yeah, it's like, if you have to ask how much it costs, you can't afford it.

1:51 amalloy: also your assoc/get looks like an update-in

1:51 muhoo: i'm proud that i got it to work, and how easy it was. i'm embarassed that it's an unreadable mess.

1:51 ah, good catch, thanks

1:52 amalloy: and are you using (or interested in using) useful? there are a few functions that would really reduce boilerplate

1:52 eg: (to-fix z/branch? f) => (fn [thing] (if (z/branch? thing) (f thing) thing))

1:52 muhoo: i have it cloned somewhere. which functions do you mean?

1:53 _KY_: I just set my classpath to the combinatorics.jar (absolute path), and in REPL I said (require 'clojure.math.combinatorics)

1:54 In the jar file there is clojure/math/combinatorics.clj

1:55 amalloy: muhoo: (join "" xs) => (join xs)

1:55 muhoo: hmm, to-fix is cool.

1:57 dsantiago: devn: How does it ocmpare to htmlcleaner? That seems to be the newest kid on the block.

2:08 xumingmingv: if I declare a class(through gen-class) named com.test.ClassA in namespace: com.test.nsb

2:08 then i want to use this class in another clj file

2:09 i should :import com.test.ClassA, or :use com.test.nsb?

2:12 aperiodic: in a clojure context, why not just use it?

2:13 that's what i usually do, but i only gen-class for java interop

2:14 xumingmingv: yeah, for java interop

2:14 but clojure code also need to use it

2:15 aperiodic: i think you can do either, but i don't know why you'd want to do the former

2:15 i'd say just use it

2:16 if you imported it, you'd have to use interop syntax with it

2:16 yuck

2:19 xumingmingv: aperiodic, oh, thanks

2:20 aperiodic: no problem

3:27 echo-area: How do people leave memo to another with lazybot?

3:28 rfgpfeiffer: has anyone here used webgl with clojurescript?

3:29 muhoo: echo-area: $mail?

3:29 $mail echo-area like this?

3:29 lazybot: Message saved.

3:30 echo-area: Oh, that's it. Thank you, muhoo

3:33 kral: morning (here)

3:35 clgv: morning (GMT+-3) ;)

3:35 brehaut: ~ugt

3:35 clojurebot: ugt is Universal Greeting Time: http://www.total-knowledge.com/~ilya/mips/ugt.html

3:39 clgv: no. I only wanted to greet the specified time zones :P

3:46 mduerksen: those who are awake salute you :)

3:47 * brehaut is GMT +13

3:48 brehaut: i just assume everyone else is living in the past. its usually true

3:52 fliebel: Are there any cool lisp-y apps fro iOS that I should know of?

3:54 michaelr`: anyone here runs a clojure app on tomcat?

3:54 i want to setup something like this and wonder whether there is a fast start tutorial

3:56 clgv: michaelr`: you can use noir for a website which will use jetty by default but you can build a tomcat archive vie lein-ring if I remember correctly

4:01 michaelr`: clgv: yup, i have a noir app which i developed using the builtin jetty, now i want to move to production so I gather the obvious choice in the java world is tomcat. so what I need to know now is how to setup tomcat

4:02 will probably just read at their website but i wonder whether someone has already done it and wrote a fast start tutorial :)

4:03 clgv: michaelr`: install tomcat and rop your war-archive in its webapps folder ^^

4:03 s/rop/drop/

4:05 michaelr`: clgv: yeah, thanks ::)

4:15 scottj: fliebel: there's a scheme (maybe even clojure) ide for ipad I think

4:16 maybe more of a fancy editor than an ide

4:46 robertstuttaford: i have emacs24 + emacs starter kit. i change my font and save my options using the newbie menu bar method but when i restart emacs, it's back to the old font. where in blazes do i fix this?

4:47 it's also hiding the menu-bar. i put (menu-bar-mode) into both .emacs and .emacs.d/init.el (all permutations: one, then the other, then both) with no effect on startup

4:50 if anyone has emacs set up on osx and is willing to hold a newbs hand for a little bit, i'd be most greatful. i just want to get the basics: font, color scheme (solarized) and then how to start my ring server and get swank's code navigation stuff working. swank/slime is working (i get a repl) but go-to-definition isn't working

4:51 i'd be most grateful, too :p

4:51 scottj: robertstuttaford: by go-to-definition do you mean M-.?

4:51 robertstuttaford: yes

4:51 i get stacktrace can't-find errors

4:52 i don't know how to feed swank/slime my source code for indexing, if that's what it needs

4:52 scottj: did you already C-c C-k the file?

4:53 btw you could try (menu-bar-mode 1) since (menu-bar-mode) will toggle it I think

4:53 vijaykiran: robertstuttaford: M-x menu-bar-mode

4:53 also, which word are you 'go-to-definition'ing ?

4:53 scottj: maybe (set-default-font "DejaVu Sans-12")

4:54 robertstuttaford: vijaykiran: i know how to get the menu up once emacs is started, i don't know how to force it to start up that way

4:55 vijaykiran: robertstuttaford: I guess with startupkit, you need to put your customizations in your $USERNAME.el file

4:55 robertstuttaford: should those go in .emacs or in .emacs.d/init.el?

4:56 ah

4:56 michaelr`: is there a default key binding for move-to-end-of-the-previous-word?

4:56 like M-b but to the end instead of to the start

4:56 instead of M-b M-f

4:56 scottj: michaelr`: vim user? :)

4:57 michaelr`: yes :)

4:57 scottj: there's something, searchign through my .emacs

4:57 michaelr`: it's a simple thing but it drives me crazy, really

4:57 scottj: michaelr`: (global-set-key (kbd "M-F") 'forward-to-word) (global-set-key (kbd "M-B") 'backward-to-word)

4:58 (require 'misc) maybe

4:58 michaelr`: hmm

4:59 so nothing by default? i actually need this for bash/psql/repl and everything else which has emacs key bindings

4:59 scottj: nothing by default

4:59 michaelr`: very strange imho

4:59 scottj: run everything inside emacs is your only option

5:00 michaelr`: right now i gave up on emacs, i just don't have enough nerves for things like that..

5:01 everything simple/basic feature i'm used to from other "sane" environments in emacs i have to customise it

5:01 problem is after trying to use emacs for a while i'm actually using it's key binding in the shells all the time :)

5:02 bindings

5:02 scottj: well, to be fair, is there an non-vim-keybinding environment that has that feature?

5:02 bobry: If I have a function '(defn f [& {:keys [foo]}] fo)', how can I apply it to a map?

5:02 (apply f opt) doesn't work :/

5:02 michaelr`: scottj: ctrl-left, ctrl-right does that in every other editor

5:03 scottj: michaelr`: maybe I'm not understanding you, in gedit c-left appears to do what M-b does, not what my M-B does

5:04 michaelr`: bobry: i think the & should come before fo

5:05 scottj: well, i mainly work in microsoft environments and when in linux i don't use gedit

5:05 just ssh to a remote shell

5:07 abc efg

5:07 scottj: michaelr`: fair enough, I don't remember windows behavior, but in chrome on linux "foo |bar" C-left takes you to "|foo bar" not "foo| bar" like I thought you wanted

5:07 michaelr`: for example if I'm at 'g' and i press ctrl-left i get to e, another ctrl-left i get to 'c' and etc

5:08 scottj: yeah that's not like linux text fields

5:10 michaelr`: err, just checked and it seems that everything works like you described in chrome :)

5:11 scottj: maybe you can add keybindings to readline or rlwrap. you could probably add it to bash

5:11 bobry: okay, one more question -- is there a builtin function for converting a map into a list of bindings; ex: '{:foo 1}' ==> '(:foo 1)'

5:11 i came up with (interleave (keys ...) (vals ...) but that's kindof ugly

5:12 robertstuttaford: installing a color theme shouldn't be this damn hard!

5:12 michaelr`: &(into '() {:a 1 :b 2})

5:12 lazybot: ⇒ ([:b 2] [:a 1])

5:12 michaelr`: worked!

5:12 scottj: robertstuttaford: get used to it :)

5:12 michaelr`: bobry: ^^^

5:12 robertstuttaford: -sigh-

5:12 vijaykiran: robertstuttaford: it is a onetime thing anyway :)

5:13 bobry: michaelr`: not exactly, I need a flat list (:b 2 :a 1)

5:13 michaelr`: ooh

5:13 scottj: &((comp flatten seq) {:b 2 :a 1})

5:14 lazybot: ⇒ (:a 1 :b 2)

5:14 michaelr`: cool

5:14 :)

5:14 vijaykiran: robertstuttaford: are you using Emacs.app or emacs in the terminal ?

5:14 robertstuttaford: emacs.app 24

5:14 bobry: hm, i wonder why flatten isn't documented in clojure docs

5:14 anyway, thanks scottj :)

5:14 robertstuttaford: vijaykiran: may i pm?

5:14 amalloy: ~flatten

5:14 clojurebot: flatten is rarely the right answer. Suppose you need to use a list as your "base type", for example. Usually you only want to flatten a single level, and in that case you're better off with concat. Or, better still, use mapcat to produce a sequence that's shaped right to begin with.

5:15 vijaykiran: robertstuttaford: sure

5:15 robertstuttaford: don't want to turn this into #fucking-emacs-dammit

5:15 vijaykiran: there's #emacs though :)

5:15 robertstuttaford: they scare me :-(

5:48 michaelr`: wtf, lein ring uberwar is creating THE uberwar 900mb and growing

5:48 something went wrong

5:53 halp

5:54 ssedano: maybe is the rigth size for it

5:54 according to your project description

5:54 configuration I mean

5:56 michaelr`: only if i included that swap partition by mistake :)

5:57 ssedano: I don't know your configuration, neither what is lein packaging

6:01 michaelr`: ssedano: a noir website..

6:01 which configuration?

6:07 here is my project.clj https://www.refheap.com/paste/2747

6:10 dbushenko: what is paz-support?

6:10 michaelr`: oh shit

6:11 i have symlinks to the images directory which is huge :)

6:11 dbushenko: a small library of stuff i collected for this project

6:14 dbushenko: utility functions for environment/filesystem/xml/net/db

7:00 bobry: why doesn't clojurescript compiler generate 'deps.js', which seems to be required by google closure library?

7:25 michaelr`: problem deploying to tomcat, can anyone please look at this https://www.refheap.com/paste/2750

7:34 Borkdude: er, anyone has tips for moving partitions on OSX to free up space for an other partition… for free on OSX?

7:43 gtrak: Borkdude: try http://gparted.sourceforge.net/

7:44 michaelr`: err

7:45 Borkdude: gtrak: ah yes..

8:01 I just copied the data from the next partition, deleted it, resized the prev. partition and made a new next partition..

8:11 adeelkh: is there a good way to do [[[0 1] 2] [3 4] [5 6]] -> [[0 1] 2 3 4 5 6]? I know about flatten, but I need to do only one "layer" of flattening.

8:12 babilen: adeelkh: $(apply concat [[[0 1] 2] [3 4] [5 6]])

8:13 clgv: &(apply concat [[[0 1] 2] [3 4] [5 6]])

8:13 adeelkh: babilen: oh, duh. thanks!

8:13 lazybot: ⇒ ([0 1] 2 3 4 5 6)

8:13 augustl: I have strings of HTML, and want to find all <code> tags and HTML escape its contents. Suggestions? :)

8:13 clgv: alias flatten-1 ;)

8:14 babilen: clgv: Oh, never seen flatten-1 in core.

8:14 adeelkh: augustl: you can probably use Enlive

8:14 clgv: babilen: no, I meant apply+concat is flatten-1 ;)

8:15 babilen: Ah, right. Yes :)

8:15 augustl: adeelkh: looking it up, thanks

8:16 adeelkh: augustl: this SO answer is kind of relevant http://stackoverflow.com/questions/2695701/how-to-select-nth-element-of-particular-type-in-enlive

8:16 augustl: adeelkh: thanks again :)

8:19 hmm, can't seem to find an example of replacing. The SO post just queries.

8:19 foxdonut: augustl: on the client you could try $("code").each(function() { $(this).text($(this).html()); });

8:19 augustl: I'd rather do it on the server :)

8:20 foxdonut: sure, I understand

8:27 adeelkh: augustl: it looks like this should work http://stackoverflow.com/a/2903592/113397

8:28 rhickey: poll: readable non-print-dup printing of java.util Collections? i.e. j.u.List,j.u.RandomAccess,j.u.Set,j.u.Map print like (),[],#{},{}

8:29 instead of current #<>

8:31 augustl: adeelkh: thanks again

8:31 foxdonut: rhickey: +1

8:33 rhickey: too early for a poll I guess

8:34 clgv: rhickey: +1

8:34 kaoD: rhickey: yes please, I find it quite annoying

8:35 clgv: rhickey: an information on the type should be printed as well to avoid confusion

8:35 kaoD: but also some hinting of the underlying type

8:35 clgv: ditto

8:37 devn: good morning

8:37 kaoD: morning devn

8:37 rhickey: showing the type is the argument against printing uniformly - you have *print-dup*

8:39 augustl: adeelkh: you happen to know if there is API docs for enlive? All I can find are complex tutorials

8:39 with references from "Part 1: Intro" in "Part 2983: Actually getting stuff done"

8:40 clgv: rhickey: ok, when not printing the type, one could make clear that these are no clojure datastructures

8:40 devn: augustl: maybe this is helpful if you haven't seen it already? http://enlive.cgrand.net/syntax.html

8:40 augustl: devn: hadn't seen that one, thanks

8:40 hmm, that page doesn't document the transformations

8:40 adeelkh: augustl: haha yeah. i actually never used enlive myself before which is what I'm not being more helpful

8:41 augustl: I see

8:41 kaoD: rhickey: I didn't mean printing the type, just some kind of hinting

8:41 rhickey: could bifurcate on *print-readably*, but a pain, and repl prints readably

8:42 foxdonut: rhickey: because of you there is a breath of fresh air in my lifelong passion for software development. thank you so much.

8:42 augustl: adeelkh: think I'll use https://github.com/nathell/clj-tagsoup and work with the vector

8:42 devn: rhickey: ill +1 your readable printing of j.u colls

8:42 kaoD: I'm just annoyed by the unreadable output

8:43 rhickey: printing is not even mostly about programmers, it's about programs, and when not print-duping the program doesn't care because it is going to read a Clojure data structure back, not an e.g. ArrayList

8:44 foxdonut: you're welcome

8:44 robertstuttaford: eeee the emacs it burns

8:45 devn: rhickey: does this also mean readable printing of clojure.lang.PersistentQueue?

8:45 rhickey: #this-wasn't-originally-aclojure-vector [1 2 3] doesn't help programs at all, and not user much either.

8:46 clgv: right^^

8:46 rhickey: devn: coming separately in a #queue reader extension

8:46 devn: (defmethod print-method clojure.lang.PersistentQueue [q,w] (print-method '<- w) (print-method (seq q) w) (print-method '-< w)) is fine and all, but... whoops

8:46 rhickey: cool

8:46 kaoD: rhickey: good point

8:47 robertstuttaford: how do i set up M-x clojure-jack-in as a key binding? or is that a Bad Idea™ ?

8:47 kaoD: robertstuttaford: do you really jack in that many times?

8:47 devn: robertstuttaford: i dont see why you couldn't do it

8:48 robertstuttaford: kaoD: actually, i'm trying to set it up so that i start emacs, and it: has my project.clj and app.clj buffered, a running swank and app.clj compiled and ready to rock

8:49 devn: robertstuttaford: (global-set-key (kbd "C-x M-c") 'clojure-jack-in)

8:49 vijaykiran: robertstuttaford: add a hook to clojure-mode and add global-set-key

8:49 what devn ^^

8:50 kaoD: robertstuttaford: then you don't need a keybinding but just an init script, right?

8:50 devn: what kaoD ^^ ;)

8:50 robertstuttaford: awesome devn thanks. kaod: that too :)

8:51 devn: robertstuttaford: (eval-after-load "clojure-mode" '(progn (add-hook 'clojure-mode-hook ...)))

8:51 robertstuttaford: thanks devn, i'll give it a go

8:51 kaoD: in fact I would cook my own command

8:51 devn: godspeed

8:51 kaoD: clojure-project which prompts for a path and then starts it all

8:52 robertstuttaford: that sounds ideal

8:52 devn: ooo the efficiency! think of all the time you'll save! ;)

8:52 kaoD: because, well, forcing clojure-mode to do things automatically might get between you and productivity

8:52 Vinzent: Could someone please explain me why there is `mapv` and `filterv`? Is it impossible to make standart map, filter and others return a collection of the same type rather than a seq?

8:53 clgv: Vinzent: yes, because map, filter ... are intended to be lazy, hence they return a lazyseq

8:53 kaoD: you can enforce types anyways

8:54 &(vec (map (partial +2) [1 2 3 4]))

8:54 lazybot: clojure.lang.ArityException: Wrong number of args (1) passed to: core$partial

8:54 kaoD: &(vec (map (partial + 2) [1 2 3 4]))

8:54 lazybot: ⇒ [3 4 5 6]

8:54 kaoD: never used mapv/filterv, so not sure if just a shorthand or more efficent

8:55 devn: more efficient

8:55 see http://dev.clojure.org/jira/browse/CLJ-847

8:55 kaoD: devn: that's what I suspected

8:55 Vinzent: clgv, yeah, I understand that, but 1) I thought this new reducers thing can become default in the future 2) you could still force lazyness by turning your vector (or whatever you have) into seq before passing it to map\filter\etc

8:56 kaoD: not sure if I understand #2

8:56 clgv: Vinzent: afair both ideas shall be kept: laziness and possible parallelism via reducers

8:56 Vinzent: kaoD, (->> [1 2 3] seq (map ...)) when you need lazyness instead of (->> [1 2 3] (map ...) (into [])) all the time

8:57 kaoD: map is lazy by default, isn't it?

8:57 you don't need seq

8:58 robertstuttaford: holy crap this is awesome

8:58 devn: :)

8:58 robertstuttaford: that xkcd comic about lisp underpinning the universe comes to mind

8:58 kaoD: &(take 10 (map (partial + 2) (range)))

8:58 lazybot: ⇒ (2 3 4 5 6 7 8 9 10 11)

8:59 kaoD: Vinzent: that's lazy

8:59 oh

8:59 I just got what you meant

8:59 rhickey: ok, I made it so j.u collections print like their Clojure variants only when *print-readably* is true, so you can still see the old print rep (with type) when using print* and readable when pr*

8:59 magnars: Question: How would you change specific nodes in a tree of vectors without resorting to recursion?

9:00 devn: magnars: zippers

9:00 magnars: devn: thanks for the tip, will look into that!

9:01 kaoD: magnars: update-in?

9:01 Vinzent: clgv, yes, but laziness will be the default one, right? Also, theoretically there should be mapm (for maps), maps (for sets), etc (there probably won't exist, because they're not faster).

9:01 devn: magnars: to save you a google trip: clojure.zip

9:01 Vinzent: kaoD, yep :)

9:01 devn: rhickey: cool. looking forward to it

9:01 kaoD: or assoc-in

9:02 clgv: Vinzent: a map returng a set or hashmap doenst make much sense. in that case you probably mean a reduce.

9:02 Vinzent: map: Seq -> Seq

9:03 devn: kaoD: he said nested vectors not maps

9:03 mikem: hi, i have a fresh lein project which required clojure 1.3.0 and in which i already ran `lein deps`. I've since changed project.clj to require clojure 1.4.0, ran `lein clean` and `lein deps`, but `lein repl` still launches with clojure 1.3.0. what am I missing?

9:03 I'm using lein 2

9:03 Licenser: clgv there is a god reason for a map returning a hashmap - if you want to apply a funciton to all values for example

9:03 devn: a good reason, too! ;)

9:04 but yes, there is also a god reason.

9:04 clgv: Licenser: that's a different function except you want an all-in-one function ^^

9:04 Licenser: clgv talking bout map as a idea not a function

9:04 the idea map can be applied to many things

9:04 rhickey: https://github.com/clojure/clojure/commit/92b4fc76e59e68d3bdae4ebd5b8deec915cb7ab5

9:05 clgv: Licenser: there was an implementation for mapping of an hashmap, I saw lately.

9:05 Licenser: you could even do it laziely

9:06 as long as you only map values, won't work for mapping keys

9:08 Vinzent: clgv, why not? I wrote code like this: (->> a-map (map ...) (into {})) thousand times! I understand that map always returns a seq; I'm just interested why this path was chosen (given that it introduces perfomance overhead, problems with dynamic binding and forces programmer to write all those (into {})) and does including mapv, filterv and reducers library in core means that this decision might be reconsidered

9:09 clgv: Vinzent: you could use reduce as well^^

9:09 Licenser: Vinzent then you're doing it wrong

9:09 you should have started refacturing and reusing it after the 10th time you write it at max!

9:10 clgv: Licenser: 3rd time ;)

9:11 Vinzent: Licenser, well it's quite silly to write 3 version of every seq function :)

9:13 Licenser: clgv I was generouse :)

9:13 well you could try to make it one function that works for all!

9:15 devn: Vinzent: im not sure there are performance implications given transients are used and hashmaps are IEditableCollections

9:15 * robertstuttaford prints paredit cheatsheet and sticks to desk

9:16 devn: robertstuttaford: I only use about 6 of the things on that giant sheet, fwiw

9:16 robertstuttaford: is there a fuzzy-open-file for emacs? like PeepOpen or sublime-text-2 does it

9:16 Vinzent: devn, well, mapv is faster than map according to http://dev.clojure.org/jira/browse/CLJ-847

9:16 devn: M-s, M-(, C-), M-S

9:17 robertstuttaford: ido is nice but it requires that i get the directory right before the file

9:17 devn: robertstuttaford: peepopen if available if you're into that kind of thing

9:17 Licenser: devn also (,),[,],{,} ;)

9:17 and M-left, M-right

9:17 Vinzent: robertstuttaford, take a look at find-file-in-project

9:18 devn: robertstuttaford: have you tried emacs-live?

9:18 robertstuttaford: thanks Vinzent. devn, no, i'll look at that too

9:19 devn: robertstuttaford: sam aaron posted this to the overtone list the other day. i switched to it and i like it quite a bit, perhaps it has a better default ido-find-file setup than you currently have: https://github.com/samaaron/emacs-live

9:19 "It Just Works" (as long as you're on Emacs 24.1 or so)

9:20 it might save you some time wrangling your config

9:20 robertstuttaford: awesome, thanks

9:21 devn: rustlin' 'n wranglin' that golsh darn emacs config

9:21 robertstuttaford: find-file-in-project seems to do what i want, thanks!

9:21 looks like i've got all the config right, now. colors, font, maximised window, swank works. now the fun part: internalising the keyboard stuf

9:22 i've got all the windows text editing hardcoded into my fingers, so this should be .. fun

9:22 foxdonut: (GET "/user/{id}" [id] ...) vs @RequestMapping(value="/user/{id}", method=RequestMethod.GET) public ModelAndView methodName(@PathVariable Integer id) { ... }

9:23 devn: robertstuttaford: are you sure? If I just enter a few characters, if it can't find a match it will look outside of my current dir

9:23 whoops, my buffer was out of sync, nevermind

9:24 foxdonut: not sure how to respond to that... :)

9:25 pandeiro: would a web service incrementing/decrementing a simple counter be a use case for a ref or atom? i thought atom since inc/dec addition is associative

9:26 foxdonut: devn: my bad, wrong channel... was contrasting compojure vs spring mvc ;)

9:27 devn: pandeiro: sounds like an atom to me

9:27 pandeiro: devn: thanks

9:28 augustl: for (defn foo [str & {:keys [a b c]}]), how do I invoke it so that a is set?

9:29 trying to set the "xml" option for https://github.com/nathell/clj-tagsoup/blob/master/src/pl/danieljanus/tagsoup.clj#L108

9:30 tmciver: augustl: the second arg to foo should be a map with key :a whose value is a set.

9:30 devn: tmciver: im not sure that works

9:30 augustl: tmciver: ah, thanks

9:30 tmciver: devn: no?

9:31 devn: tmciver: maybe im just being daft but it didnt work for me

9:31 tmciver: I didn't try :/

9:31 augustl: odd, "java.lang.IllegalArgumentException: No value supplied for key: :xml"

9:31 devn: (foo "hello" {:a #{1 2 3} :b 1 :c 2}) => No value supplied for key: {:a #{1 2 3}, :c 2, :b 1}

9:33 augustl: so how is it done? :)

9:33 tmciver: devn: hmm, you're right but I don' know why . . .

9:33 devn: me either :)

9:34 augustl: no tests or docs for that lib so I can't copy paste, boo

9:34 devn: ,(let [{:keys [a b c]} {:a #{1 2 3} :b 2 :c 3}] [a b c])

9:34 clojurebot: [#{1 2 3} 2 3]

9:35 devn: but it doesnt work in defn

9:35 augustl: #{} is a set, right?

9:35 devn: *nod*

9:35 ,(set [1 2 3])

9:35 clojurebot: #{1 2 3}

9:36 augustl: the docs calls them a "keyword argument"

9:37 tmciver: it works if foo is defn'd w/o 'more' args.

9:37 augustl: hmm

9:37 tmciver: (defn foo [str {:keys [a b c]}] [str a b c])

9:37 augustl: I wonder why the & exists

9:37 tmciver: I guess it's because the map arg is packed into a seq

9:38 devn: why does it need to be a set?

9:38 (maybe this is obvious, but i dont see why)

9:39 augustl: perhaps it worked in an older version of clojure

9:40 so is it impossible to call it?

9:41 devn: well, let's try an older version, shall we? :)

9:41 augustl: passing in "{:xml true} {:xml true}" works

9:42 that is, it doesn't throw an exception, but it also doesn't seem to set the option

9:42 robertstuttaford: swank: does compiling (C-c C-k) also automatically reload the code in swank, such that visiting the ring server's served pages will reflect the changes?

9:44 foxdonut: ,((fn [s & {:keys [a b]}] [a b]) "duck" :a #{"quack"} :b 42)

9:44 clojurebot: [#{"quack"} 42]

9:44 augustl: hmm

9:45 devn: in 1.1.0 you couldnt destructure maps

9:45 so...on to 1.2.0 :)

9:45 (that being said, it didnt blow up, just returned [nil nil nil])

9:46 foxdonut: augustl: so I guess (parse input :xml #{your-set}) ?

9:47 augustl: hmm, why a set?

9:47 devn: it doesnt work in 1.2.0

9:47 augustl: devn: :D

9:47 devn: :)

9:47 foxdonut: I thought you said you wanted it to be a set

9:47 devn: ^- i hear the same

9:47 augustl: foxdonut: not sure what it needs to be, the docs doesn't say

9:47 foxdonut: whatever you need it to be then :)

9:47 augustl: seems I just need to set it to true

9:47 I see

9:47 devn: :) problem solved!

9:48 augustl: grr, it seems the property is only used to set the encoding

9:48 * devn beats you about the head and neck

9:48 augustl: even though the docs say it will also make it parse invalid HTML

9:48 foxdonut: augustl: yeah it looks like it's just a flag

9:48 * devn slaps you around with a large trout

9:48 devn: etc.

9:48 augustl: what's the problem you're trying to solve

9:49 aside from making this particular thing work

9:49 would something other than tagsoup suit your needs?

9:49 augustl: devn: I have a string of HTML, I want to get a new string where all script tags have their contents escaped

9:49 I write my blog posts in HTML, but I some times have html that I want escaped inside code tags

9:49 s/script tags/code tags/ btw

9:50 foxdonut: great, now my head and neck are bruised and I smell like fish.

9:51 devn: it could be worse! ;)

9:51 augustl: I totally misread the docs on the invalid HTML part btw

9:51 devn: augustl: i have to run, but sometimes a statement like the one you just made about the general problem

9:52 can yield results that aren't necessarily "use tagsoup"

9:52 augustl: hehe yeah

9:52 devn: good luck and happy clojuring

9:52 ache: foxdonut: I do not envy you the headache you will have when you awake. But for now, rest well and dream of large fish.

9:52 foxdonut: yak shaving

9:52 augustl: there's always regexps!

9:52 foxdonut: ache: :D

9:52 augustl: that's what I used before I rewrote it in clojure

9:53 \<code>(.*?)\<\/code\> dawg

9:54 foxdonut: augustl: see first answer in http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags

9:56 robertstuttaford: although i have ring-serve 0.1.2 in my project.clj, when i try to (use 'ring.util.serve) i get a classnotfound exception

9:56 augustl: foxdonut: haha yeah

9:56 robertstuttaford: lein2 deps runs without errors

9:57 pandeiro: how can i verify what version of clojure a slime repl is running?

9:57 robertstuttaford: is this the right way? i want to use clojure-jack-in, and from there start a ring server

9:58 babilen: pandeiro: *clojure-version*

9:58 robertstuttaford: so that the emacs repl is running the same code that my browser is accessing

10:01 pandeiro: babilen: awesome thanks

10:05 robertstuttaford: anyone using ring-serve successfully?

10:06 sooo close

10:09 foxdonut: robertstuttaford: do you mean lein ring server?

10:09 robertstuttaford: no, ring-serve, for starting a ring server within a running repl

10:09 foxdonut: ok

10:09 robertstuttaford: i have clojure-jack-in going. i'm trying to use this: https://github.com/weavejester/ring-serve

10:10 (use 'ring.util.serve) gives me a classnotfound exception even after adding it to project.clj and running lein2 deps

10:10 annoying

10:13 even after a day of headless-chicken muddling, i can see the value to emacs+clojure

10:13 just a bloody steep learning curve!

10:14 pandeiro: robertstuttaford: i went through this about 6-7 months ago, don't worry, it gets (a little) better

10:15 wait until you add clojurescript to the mix

10:17 is there a way to skip aot without having a :main entry in a lein project? say if i am making a lib and i don't want aot

10:18 robertstuttaford: pandeiro: i assume you're still using emacs?

10:18 pandeiro: robertstuttaford: absolutely, love it

10:23 robertstuttaford: great

10:24 i'm going to get the peepcode cast and also watch all of the disclojure series

10:24 and then force myself to use emacs to edit every bit of text that i need to

10:24 Borkdude: robertstuttaford: I used emacs before, but eclipse is a pretty good experience with the counterclockwise plugin

10:25 robertstuttaford: i was using ccw with the lein plugin but ran into showstopper issues

10:25 figured i'd take the plunge with emacs

10:25 Borkdude: robertstuttaford: like what?

10:25 robertstuttaford: worth it, in the long term

10:26 it was all working. then, i added stuff to project.clj, used lein >update deps. the lein deps item in the project dissappeared, and no matter what i did i couldn't get it back

10:26 even after destroying all eclipse metadata in workspace and project

10:26 Borkdude: robertstuttaford: did you do a lein deps from the cmd prompt?

10:27 robertstuttaford: or with the leiningen plugin

10:27 robertstuttaford: from eclipse I mean

10:27 robertstuttaford: with the plugin

10:27 augustl: hmm, shouldn't this match?

10:27 ,(re-find #"<code>((?m).*?)</code>" "<code>foo\nbar</code>")

10:27 clojurebot: nil

10:27 Borkdude: (fucking hell, I have to teach myself Struts2… it all seems so verbose)

10:27 augustl: (yes I know, I'm matching HTML with a regexp, but it's my own HTML)

10:28 (parentheses are cool apparently)

10:28 Borkdude: robertstuttaford: do you use a profiles.clj?

10:28 robertstuttaford: I mean, do you have a profiles.clj sitting in .lein?

10:29 robertstuttaford: i don't use profiles at all

10:29 only been clojuring about a week

10:29 havne't gotten to profiles yet

10:30 Borkdude: robertstuttaford: hmm, then I don't know. I had a bug with that, but furthermore it works as desired…

10:30 robertstuttaford: if you have any problems, please file them at https://groups.google.com/forum/?fromgroups#!forum/clojuredev-users

10:30 robertstuttaford: it's ok. i've just paid a day's braincells to get emacs all set up

10:31 augustl: nobody has written about multiline regexps for clojure either, nothing on google

10:32 pandeiro: anyone know about skipping aot in lein without specifying a :main ns? is it possible?

10:32 augustl: ah, needed the s flag too

10:36 gfredericks: augustl: probably it's not well documented because it's just defers to java; the clojure part is very thin

10:36 robertstuttaford: does emacs use multi-core?

10:43 timvisher: anyone care to help me understand why we tend to be so comfortable with eschewing the UAC in favor of something like hash-maps in the clojure community?

10:43 the best answer i can come up with is that you shouldn't have to change your data that often

10:43 which is pretty darn week

10:43 weak*

10:43 RickInGA: what is UAC?

10:43 timvisher: uniform access principle

10:43 https://en.wikipedia.org/wiki/Uniform_access_principle

10:44 basically says that you should not be able to tell whether a field on an object is served by storage or by computation

10:44 vijaykiran: robertstuttaford: nope, AFAIK

10:45 timvisher: basically allows you to refactor from a field to a calculation transparently to your clients because they were accessing the field anyway

10:46 gfredericks: so a standard OOP interface gives you this, right?

10:46 Borkdude: timvisher if you want smth like that, write a function get-value-x or smth?

10:46 gfredericks: Borkdude: maybe he's asking why we usually assume we don't want that?

10:46 timvisher: but if you're using a map, for instance, everyone's accessing that data via `(:key ...` construct, but if that key eventually needs to become a calculation, you've got to change all the callers

10:46 gfredericks: yes

10:47 Borkdude: obviously, but I'm asking about rationale

10:47 RickInGA: why would the key become a calculation? the value could become a calculation without breaking anything

10:47 Borkdude: timvisher: I sometimes use indirections using a function, so I could switch from one representation to another

10:47 RickInGA: the key is a function

10:47 timvisher: i'm somewhat sold but I'm trying to write up my next functional thinking article and I don't feel like I have an answer to the UAC

10:47 gfredericks: timvisher: I was working with someone new to clojure who eventually asked how she could redefine the keyword function to be a calculation; I didn't have a good answer

10:48 i.e. she wanted (:name m) to do (str (:first-name m) " " (:last-name m))

10:48 timvisher: Borkdude: of course, but that decision would have to be made up front

10:48 S11001001: so naturally you explained how to extend the lookup protocol, right? :)

10:49 timvisher: RickInGA: i'm not expressing myself well enough. The key obviously never becomes a function. But the value would have to become a calculation rather than a value

10:49 you're saying you can do that pretty easily?

10:49 i think if you had a constructor function of sorts then it wouldn't be too hard but that's also not terribly idiomatic from what i've seen

10:49 usually if you want a map you just construct a map

10:49 of course even in my own code that's not true

10:50 RickInGA: timvisher: {:sum 2} or {:sum (+ 1 1)} I don't know the difference... but I may be thinking too simplisticly

10:50 timvisher: my central data structure is a map but I have a function to create it because i do all sorts of things to the data that comes in before i spit out my fields…

10:50 S11001001: I think the idea is that your code that works with the particulars of your structure should be closely associated with the definition of that structure, anyway.

10:51 timvisher: RickInGA: there's no difference there but the problem is in the creation. if you're creating these data structures all over the place then you need a constructor function to introduce the indirection so that you can freely transform it like you just showed

10:51 antares_: Just announced Welle, a Clojure client for Riak: https://groups.google.com/forum/?fromgroups#!topic/clojure/zUFKYZlYjfw, would love some feedback on the docs

10:51 robertstuttaford: google's code editor: https://docs.google.com/macros/edit?lib=Mbw95NICHwdISJahdkaj98y7y8BqBqiEP

10:52 timvisher: S11001001: I agree. I think maybe the best way to express it is that you just have to make a design decision up front and it may be worth creating a constructor function which gives you all the benefits of the UAC while still maintaining the fact that it's just a simple map or record or whatever

11:04 gfredericks: timvisher: in contrast the benefit of UAC is not having to design up front

11:05 you just use eclipse to generate your getters and setters :)

11:21 timvisher: gredericks: and the benefit of not using the uac is that maps have all of the same access benefits without a custom api and an ide to support it. :)

11:24 S11001001: and a crapload of boilerplate

11:33 robertstuttaford: does clojurescript use google closure templates?

11:33 i know cljs one uses enlive snippets + domina

11:35 vijaykiran: templating is independent of clojurescript - so you should be able to use anything

11:36 robertstuttaford: ok. templating is a separate java compiler so i guess if cljs doesn't use it, it'll be pretty tough to integrate

11:37 is anyone using cljs to produce webapps for mobile?

11:37 i wonder about the performance characteristics on mobile

11:38 vijaykiran: depends on your design though, if you want client-side templating, then you can use anything as long as you can call the corresponding JS function from cljs

11:38 robertstuttaford: gclosure templates compile .soy files to .js, with the intent that the js files are used in the whole-source advanced mode compilation that takes place

11:39 so if they can't be compiled in then, the advantages to using them dwindle rapidly

11:39 another cljs question. can i pass clojure forms down the wire to a compiled cljs app to parse?

11:39 ie, can i use clojure as a wire format for client <> server comms?

11:39 wkmanire: Howdy folks.

11:40 vijaykiran: robertstuttaford: that's one of the ideas, yes.

11:41 gtrak: robertstuttaford: but there's no eval

11:41 robertstuttaford: so i could, for instance, serve up a graph of maps vectors and other literals and have it work with client side data manip like map reduce etc

11:42 right now i have a clojure json rest service and a traditional gclosure client consuming those. i want to convert the gclosure client to a cljs app and have them use clojure instead of json

11:44 foxdonut: robertstuttaford: yes. essentially instead of a json string you have a string representation of the clojure data structure, which you can read back into a clojure data structure on the cljs side.

11:44 robertstuttaford: our app has a media format (structured data plus html + images) and a document format (just structured data). the tentative plan is to compile the media format with cljs and have it use externs generated by the base app so that the base app and the compiled media packages can talk, and then use plain clojure for the document format

11:45 why cljs for the media format? we have a light requirement for computation in these packages

11:45 and i'd prefer to put that comp in the package instead of hardcode all the cases into the base app

11:46 i've just come out of the shower, hence the bajillion questions. does cljs support the concept of model <> view bindings?

11:47 i guess one has to set this up manually using react-to

11:49 i know cljs is still brand new so perhaps it hasn't gotten there yet :-)

11:49 it's very exciting, though

11:50 ah, found cljs-binding

11:50 gtrak: robertstuttaford: atoms give you some kind of binding event-handling

11:50 robertstuttaford: with add-watch?

11:50 i see that in cljs one

11:50 vijaykiran: clojurescript-one seems to be having some kind of binding eample right ?

11:51 gtrak: yea

11:52 robertstuttaford: it'll be interesting to see how much less code the cljs rebuild will be. right now the gclosure codebase is just shy of 10k lines

11:54 AndroUser: Hi, wondering if anyone using emacs has a simple solution to reload multiple namespaces at once - i.e. instead of visiting multiple files and pressing C-c C-k on each, how can i have one action?

11:54 robertstuttaford: AndroUser: i found that compiling my root app.clj reloads the whole app

11:54 solussd: can I use map destructuring in a protocol declaration? if so, can I use the form {:keys […] :or { … }}. When I implement it, if I leave off the :or, will I get the ones defined in the protocol declaration?

11:56 AndroUser: Thanks robert, will try

12:01 robertstuttaford: how are folks doing testing in cljs?

12:02 cljsone has great integration testing stuff, but what about model unit testing?

12:02 i've been writing jasmine bdd with coffeescript for my js unit testing

12:05 duck1123: isn't there a version of clojure.test for cljs?

12:06 robertstuttaford: looks like one uses rhino

12:07 duck1123: I wonder if it would be hard to use jasmine from clojurescript

12:08 you would probably still want to wrap it to make it more clojure-esque

12:08 robertstuttaford: jasmine would only be able to access the generated js

12:08 the jasmine test runner, i mean

12:09 duck1123: but by that point, you care less about the code, and all about the behavior, right? As long as you can still invoke functions

12:10 robertstuttaford: yeah

12:10 but by using jasmine here you'd be forced to understand your code in two forms

12:10 which, when you look at the js output by the cljs compiler, is not a happy prospect

12:12 duck1123: I haven't really used Jasmine yet, but I was thinking about giving it a try

12:12 robertstuttaford: it's really nice

12:12 bradwright: Jasmine is quite nice

12:12 (Speaking as a JS person rather than a Clojure one)

12:12 robertstuttaford: waaaay better'n the stuff google foists on you

12:14 duck1123: I'm waiting for Midje-cljs

12:15 robertstuttaford: interesting: https://github.com/fmw/vix

12:19 solussd: If i have a boolean argument to a function, should the arg name end in a question mark (e.g. my-arg?), or does ending with a question mark in a function arg signify optional?

12:19 ^a convention question

12:20 duck1123: ? is for bool in clojure

12:20 robertstuttaford: man vix is a goldmine of code

12:21 Vinzent: ? is actually for predicates (e.g. functions returning boolean values)

12:21 solussd: Vinzent: this is my understanding.. it is also being used to signify optional args in several libraries…

12:31 Vinzent: solussd, yeah, there is some confusion in naming. In arglist ? usually means "optional" (ans is used along with *). In names ? means predicate (and * on the end (like in foo*) can mean "it's like foo, but slightly different"

12:31 solussd: Vinzent: thanks

12:31 Vinzent: solussd, funny thing that foo' is used for the same purpose, and *foo* indicates dynamic var %)

12:32 solussd: i used to use foo', actually still do in letfn'd functions inside a function

12:33 *if they have the same name as the function… anyway. I think i'm being mostly consistent. :)

12:35 Vinzent: Yeah, I actually like how foo' looks - clean and nice :)

12:42 solussd: any suggestions for the best synchronization mechanism to control access to a git repository on disk? It wil be manipulated from a website, so I cannot have 2 threads checking out different branches concurrently. Simple locking, or is there a more elegant approach (need to block readers too)

12:43 S11001001: solussd: clone for every access

12:44 solussd: S11001001: I'd really like to avoid that- they're large repos. I'm just pulling stats from them and contents of select files at different revisions

12:44 S11001001: solussd: no such thing if you're on unix

12:44 solussd: as for the latter, I think git cat exists

12:44 though it's not called that

12:45 solussd: what do you mean by ' no such thing' ?

12:45 S11001001: clones hardlink repo files

12:45 solussd: S11001001: really? that's awesome.

12:46 dsantiago: chouser: Not sure if you're there, but I've written a replacement for clj-tagsoup, and am closing in on having that hooked up to tinsel today.

12:46 raek: solussd: use a bare repo and extract the tree of the chosen commit into a temporary location

12:46 S11001001: ah yes, git cat-file

12:47 have you looked over the java implementation of git repo access?

12:47 solussd: i haven't, seems incomplete

12:47 *havent much

12:48 raek: solussd: you might be interested in the source of this tool: https://github.com/EugeneKay/scripts/blob/master/bash/git-deploy-hook.sh

12:48 S11001001: so, uh, java spawning sucks enough that you might be better off adding what you need

12:48 raek: but it seems to extract a tarball, though

12:48 technomancy: S11001001: I played with jgit a bit. it's fine for read-only stuff.

12:49 solussd: only other problem I now have is the upstream repos need to be pulled locally, I still need to do that synchronously

12:50 duck1123: eclipse seems to do well enough using it

12:51 S11001001: completeness isn't necessarily a virtue

13:06 Borkdude: I have used egit a bit in eclipse, which uses jgit

13:12 hugod: hiredman: just pushed clj-ssh 0.3.3-SNAPSHOT with a clj-ssh.ssh/ssh-agent function that returns an agent that integrates with the system's ssh-agent - I remember you asking for that way back...

13:14 pandeiro: anyone know if noir's defpage destructuring form should work with {:as data} ?

13:14 seems like the only way it works is with named query parameters

13:16 hiredman: hugod: cool

13:22 Borkdude: pandeiro: it should work

13:22 (defpage foo "/" {:as data} ...)

13:23 sorry, foo should not be there

13:24 pandeiro: Borkdude: i am testing with beta 2 now, am using beta 7 in the project

13:25 (defpage [:post "/foo"] {:as data} ...) doesn't work

13:25 Borkdude: pandeiro: see the last defpage here https://github.com/Borkdude/tictactoe/blob/master/src/tictactoe/views/tictactoe.clj

13:26 hmm, it is the same

13:26 pandeiro: I only tested it with noir 1.2.0

13:27 pandeiro: maybe it's a regression

13:42 timvisher: Can anyone explain what's going on in clojure.java.shell/sh here? https://gist.github.com/2712514

13:43 it appears that there is some discrepancy as to what it and cmd believes PATH is

13:43 Borkdude: pandeiro: I'm testing now, and I get the same problem

13:46 TimMc: timvisher: Are you in Cygwin?

13:46 timvisher: nope

13:46 emacs

13:46 Borkdude: pandeiro: https://gist.github.com/2712544

13:47 pandeiro: Borkdude: a couple of things changed in defpage from 1.1.0 to 1.2.0 to 1.2.1 (which hasn't changed since)

13:47 timvisher: emacs can find convert fine, but a true cmd prompt cannot

13:47 meaning i can launch an inferior-shell process using cmdproxy and typing `convert` gets me the right convert program, as well as which reporting correctly

13:47 but sh only seems to get it right in the case of which

13:49 pandeiro: Borkdude: in your example i'm not sure there should be any value in foo, since you don't send any data with the request

13:50 Borkdude: pandeiro: D'OH… good point

13:50 pandeiro: but i am testing with POST and sending data and it doesn't get parsed unless it is in querystring format and i explicitly name it by key

13:51 i am pretty sure it's a bug but i still suck at debugging macros, and the parse-args also needs to be tested

13:57 Borkdude: pandeiro: here it works now

13:57 https://gist.github.com/2712544

13:59 pandeiro: hmm, with what version of noir?

13:59 Borkdude: clone from git

13:59 pandeiro: also added a post example now

14:00 pandeiro: can you put the full code on a gist, maybe there is smth else going on?

14:02 pandeiro: i've already worked around it in my project for now, but to test you could just do this:

14:03 (defpage [:put "/test"] {:as data} (str "hi, " data))

14:03 Borkdude: pandeiro: are you sure about put?

14:03 pandeiro: $ curl -X PUT localhost:8080/test -d 'abcdef'

14:03 tried with put and post and get

14:03 what version are you testing on?

14:04 Borkdude: works fine here

14:04 pandeiro: version?

14:05 Borkdude: pandeiro: I just did a "git clone https://github.com/ibdknox/noir.git"

14:05 pandeiro: huh, ok

14:06 something is very weird, maybe it's the terminal or emacs or something

14:08 sritchie: hey all, does anyone use the :parent key in leiningen?

14:09 ah, nm, got it

14:09 Borkdude: pandeiro: with curl -X PUT I get the right results

14:09 pandeiro: also with POST

14:12 pandeiro: Borkdude: thanks for testing it out... still not working for me, must be something stupid somewhere

14:12 OwenOu: hi guys, is there any background job implementation in clojure?

14:12 devn: what the what? http://clojars.org/search?q=datomic => 500

14:12 OwenOu: i mean library

14:12 otfrom: live pic from the London Clojurians meetup tonight http://twitpic.com/9lre9e

14:12 Borkdude: pandeiro: maybe you use data is a local in the body of the defpage… I can't think of anything without seeing the code, sorry ;)

14:13 pandeiro: Borkdude: code is literally as simple as what i posted... did you try sending data with curl that wasn't in the form of a querystring?

14:14 Borkdude: pandeiro: I used -d 'name=michiel'

14:14 pandeiro: try -d 'michiel' ?

14:14 this is what i am getting at

14:14 Borkdude: pandeiro: then the map is empty

14:14 pandeiro: yeah, so that's the question

14:15 in compojure it's possible to just send raw data without any destructuring, in noir i thought :as could handle that case, apparently only if the data is structured as query params though

14:15 makes sense i guess

14:16 Borkdude: OwenOu: http://clojuredocs.org/clojure_core/clojure.core/future ?

14:16 pandeiro: Borkdude: thank you for confirming i am not completely insane, much appreciated

14:17 Borkdude: pandeiro: np, now I learned how to test noir a bit more ;)

14:17 OwenOu: Borkdude: ok, i guess the convention in clojure is to process background job on the same process

14:18 Borkdude: OwenOu: threads are in-process

14:18 technomancy: OwenOu: if you can do it in-process it's much simpler. you can get away with that a lot more easily in Clojure than in a runtime like Ruby, but it still doesn't always work.

14:19 michaelr525: hello

14:19 OwenOu: Borkdude technomancy: yup, that's what i was planning to say, because clojure's true concurrency, it can run background processing in the same web process

14:19 a bit different from ruby/python

14:35 dnolen_: ibdknox: at the rate you're going seems like you might hit 300K :)

14:44 wkmanire: http://darevay.com/talks/clojurewest2012

14:44 This is an awesome slideshow

14:44 Really helpful.

14:44 Is there a recording of the talk that went with it?

14:45 xeqi: wkmanire: http://clojurewest.org/news/2012/5/11/clojurewest-video-schedule.html

14:47 wkmanire: xeqi: I'm not seeing videos on this site. Am I just blind?

14:47 xeqi: its the schedule

14:48 looks like the seesaw one won't come out until 7/16/2012

14:48 wkmanire: oh!

14:48 Crap

14:48 That's along wait.

14:55 ache: ibdknox: will Light Table eventually be able to support literate programming (since files are "merely a serialization") .... maybe through a plug-in ?

14:58 mduerksen: *print-dup* is nice, but i'm wondering how i should serialize a clojure datastructure that has java.util.Date in it (to be parsed again later). at least as of clj1.3, print-dup isnt directly supported. i guess i could defmethod my own which would output the read macro (#=(...)), but i would rather like to disable *read-eval*. any other suggestions?

15:00 sritchie: technomancy, when I run "lein2 push, I'm getting "Caused by: java.io.FileNotFoundException: Could not locate clojure/contrib/java_utils__init.class or clojure/contrib/java_utils.clj on classpath"

15:00 have you seen that before?

15:00 technomancy: sritchie: I'm not familiar with lein push

15:02 sritchie: ah, whoops, thought it was in there by default -- makes sense, I'll upgrade the plugin

15:02 lein-clojars

15:22 dsantiago: Hey weavejester, I notice hiccup represents doctypes as a plain string instead of an html vector. Is there a reaason for that?

15:22 weavejester: dsantiago: Doctypes aren't elements per se

15:23 dsantiago: Yeah. I just wonder if someone might want to pick them apart.

15:23 But it seems we are out of clojure data structures to represent other things with.

15:24 weavejester: dsantiago: Pretty much

15:27 michaelr525: err

15:27 trying to configure aliases for my ROOT context/app on tomcat

15:27 doesn't seem to work

15:28 anyone knows the proper way to do it?

15:28 amalloy: mduerksen: as of 1.4 dates print with a custom reader literal

15:41 mittchel: Evening:)

15:45 uvtc: Just made the upgrade from Emacs 23 and installed an Emacs 24 snapshot. Added the bit about "(require 'package)" and added marmalade in my ~/.emacs. Did `M-x package-install` <Ret> `clojure-mode` and it works (.clj files are automatically recognized). Only problem is, zenburn color theme doesn't automatically load.

15:49 mittchel: Does anyone have a good example how to parse xml into a map

15:51 devn: mittchel: slightly outdated, but this should probably do the trick: http://www.gettingclojure.com/cookbook:xml-html

15:51 michaelr525: mittchel: why would you want to do that?

15:51 mittchel: School exercise lol

15:52 Alright devn giving it a try

15:57 devn: you have a clojure school assignment?

16:03 mduerksen: amalloy: i feared you might say that ^^ oh well, ich guess i'll have to put up with some not so nice workaround until then

16:13 hmm, actually, (defmethod print-dup java.util.Date [this out] (.write out (str "#java.util.Date[" (.getTime this) "]"))) isn't all that bad

16:29 fil512: how do you do a double group-by? i want to group by one column, and then group each group by another column to end up with nested maps...

16:30 mittchel: (["Piet" "7"] ["Klaas" "10"])

16:30 is this a map?

16:30 weavejester: mittchel: No, it's a list of vectors.

16:30 technomancy: mittchel: no, but it can be poured into a map easily with the into function

16:30 fil512: or another way to ask my question is how can you transform one map into another by apoplying a function to the values...

16:31 weavejester: fil512: I guess you'd group-by, then map a group-by. Isn't there a contrib function for mapping over the values in a map?

16:31 mittchel: (into{} [(holiday-name elt) (holiday-month elt)])

16:31 I;m doing something wrong getting error haha

16:31 Character cannot be cast to java.util.Map$Entry

16:32 aperiodic: fil512: there's no builtin, but (into {} (for [[k v] map] [k (f v)])) is pretty straightforward

16:32 AimHere: You could do something like (zipmap (keys foo) (map f (vals foo)))

16:32 weavejester: clojure.algo.generic.functor has fmap

16:32 mittchel: ({"Piet" "7"} {"Klaas" "10"})

16:33 Now it's a map rigt

16:33 right*

16:33 weavejester: mittchel: It's a list of maps

16:33 S11001001: ,(map? '({"Piet" "7"} {"Klaas" "10"}))

16:33 clojurebot: false

16:33 mittchel: I'm parsing this XML and the output of tags are: :naam Piet :cijfer 7

16:34 I want both stored into a map, but its not really working for me lol

16:34 (zipmap [(holiday-name elt)] [(holiday-month elt)]))

16:34 this what I did

16:34 weavejester: fil512: I think you could do something like (->> coll (group-by :foo) (fmap (partial group-by :bar)))

16:34 fil512: fmap seems kind of vague. would I need to into{} the output of fmap?

16:35 I kind of like the zip answer--seems fairly intuitive

16:35 weavejester: ,(into {} '(["Piet" "7"] ["Klaas" "10"]))

16:35 clojurebot: {"Piet" "7", "Klaas" "10"}

16:35 mittchel: can you do into on functions too?

16:36 weavejester: fil512: If zipmap will do it, that might be the better solution.

16:36 mittchel: No, it's for pouring one data structure into another.

16:36 AimHere: ,(into #() [3 4 5])

16:36 clojurebot: #<ClassCastException java.lang.ClassCastException: sandbox$eval79$fn__80 cannot be cast to clojure.lang.IPersistentCollection>

16:36 mittchel: ,(for [elt (xml-seq xml-doc) :when (= :resultaat(:tag elt))] (into {} '(holiday-name elt) (holiday-month elt)))

16:36 clojurebot: #<CompilerException java.lang.RuntimeException: Unable to resolve symbol: holiday-month in this context, compiling:(NO_SOURCE_PATH:0)>

16:37 mittchel: hm can't show you my error

16:38 weavejester: mittchel: You probably want: (into {} [(holiday-name elt) (holiday-month elt)])

16:38 Or make holiday-name and holiday-month return maps

16:38 Then you could just merge them

16:38 mittchel: ClassCastException java.lang.Character cannot be cast to java.util.Map$Entry

16:38 lol :D

16:38 weavejester: Or just have them return the values

16:39 mittchel: hm

16:39 weavejester: So: {:name (holiday-name elt) :month (holiday-month elt)}

16:39 aperiodic: mittchel: that exception sounds like a string is being returned where a map is expected

16:39 mittchel: Well

16:39 My function is like this

16:39 (defn holiday-name [resultaat] (first (:content (first (:content resultaat)))) )

16:40 this gets the first result, but is it also possible to return the first result + its tagname?

16:40 aperiodic: mittchel: whenever a sequence function is called on a string, it turns it into a sequence of characters, which is probably where the character that can't be cast is coming from

16:40 mittchel: aperiodic: thanks.. but very new at clojure so hard to see for me.

16:41 holiday-name gets some value out of its xml tag.. but I want it to return as a map, how am I able to do that? lol :/

16:42 this is hard stuff ;d

16:43 aperiodic: mittchel: i'd hazard a guess that the value of (:content (first (:content ...))) is a string, so then the outermost first returns a single character, which into tries to cast to a map entry (since when the first arg to into is a map, it expects the rest of its args to be sequential collections of map entries)

16:45 mittchel: ahw

16:45 jamii: I'm not sure what to call this: https://gist.github.com/2713787

16:45 Some kind of syntax/type checker thing

16:46 aperiodic: mittchel: to return a map, just construct a map literal, e.ge (defn holiday [elem] {:name (holiday-name elem), :month (holiday-month elem)})

16:46 mittchel: aperiodic: where should I return the map in every holiday function? so (holiday-name) etc

16:48 aperiodic: mittchel: i would just keep the primitive-returning holiday-name and holiday-month functions, then write another one that constructs the map you want using those

16:48 mittchel: but

16:48 ahh screw it

16:48 I'm quitting

16:48 lol

16:49 aperiodic: but what?

16:49 mittchel: I understood 5% of what you said

16:50 I'm just gonna mess around

16:51 Cause I made the holiday function but it returns errors when I use it in the for loop

16:51 aperiodic: what do you get when you just call it on an element?

16:52 mittchel: http://pastebin.com/17AZXS7X

16:52 This is what I'm trying

16:52 and the for has to stay an expression, cause I need to write an expression for the assignment:P

16:54 aperiodic: everything in clojure is an expression, so that shouldn't be hard

16:55 mittchel: So

16:55 basically what I want is

16:55 Key value in a map of the results

16:55 so

16:55 Naam: Klaas

16:55 Cijfer: 10

16:55 etc.

16:56 aperiodic: so, the only thing that looks wrong to me is you're not actually calling holiday. to call a function, it has to be the first element of a list.

16:58 mittchel: hm

16:58 where should I call it?

16:58 (for [elt (xml-seq xml-doc) :when (= :resultaat(:tag elt))] holiday [elt])

16:58 actually calling it

16:59 hm

16:59 aperiodic: it's in the right place

16:59 just malformed

16:59 mittchel: well what am I doing wrong then:o

16:59 lucian: probably s/holiday [elt]/(holiday elt)/

16:59 aperiodic: aye

17:00 mittchel: hm

17:00 ahh close

17:00 ({:naam nil, :cijfer nil} {:naam nil, :cijfer nil})

17:00 nils for the win

17:00 haha

17:01 aperiodic: so, where are the nils coming from?

17:01 which functions?

17:01 mittchel: not sure

17:01 (defn resultaat-naam [resultaat] (first (:content (last (:content resultaat)))) )

17:01 guess this

17:01 and th eother 1

17:02 aperiodic: well, you have a repl, so you should be able to verify your suspicions there

17:02 lucian: ,(last [1])

17:03 clojurebot: 1

17:03 lucian: (last [])

17:03 ,(last [])

17:03 clojurebot: nil

17:03 lucian: probably from something like that

17:04 mittchel: (defn resultaat-naam [resultaat] (count (:content resultaat)) )

17:04 this returns 0

17:04 so maybe thats nil?

17:04 http://pastebin.com/LTpM2XwS

17:05 everything is nil so not only where last is called:o

17:05 aperiodic: good find! if that list empty, then the last and firsts in resultaat-naam/cijfer will return nils, which bubble up to holiday

17:06 mittchel: Yep

17:06 but not sure why its nil

17:06 haha

17:06 hyPiRion: So this is interesting: http://pastebin.com/JAX5S0FX shows an attempt where I try to make n lazy lists out of a single lazy list. The first one works fine but sets up many transactions. For my work, I'm okay with it just working in a single thread. For some strange reason, this doesn't work when I have lazy-seq in the function passed to map (NullPointerException), but when I leave it out it works just fine. Anyone have any idea of what's going on? I suspe

17:07 ... And now I see that this should've been posted to the Clojure Group instead.

17:07 aperiodic: heh, me neither. you could try not calling holiday in the body of the for, and just passing the element through, to see what the elements look like, which might reveal why calling :content on them returns an empty list

17:08 mittchel: In the body, you mean.. remove when?

17:08 aperiodic: ,(doc for)

17:08 clojurebot: "([seq-exprs body-expr]); List comprehension. Takes a vector of one or more binding-form/collection-expr pairs, each followed by zero or more modifiers, and yields a lazy sequence of evaluations of expr. Collections are iterated in a nested fashion, rightmost fastest, and nested coll-exprs can refer to bindings created in prior binding-forms. Supported modifiers are: :let [binding-form expr ...], ...

17:08 mittchel: hehe

17:09 ({:naam nil, :cijfer nil} {:naam nil, :cijfer nil}

17:09 etc..

17:09 a lot of them

17:09 aperiodic: so, there are two things you pass to for, the first is the bindings vector (seq-exprs in the docstring), and the second is the body

17:10 hiredman: hyPiRion: that code is horrible

17:10 like, just utter garbage

17:10 mittchel: I know, everything is nil

17:11 hiredman: hyPiRion: so I doubt anyone is going to bother trying to tease out exactly why it isn't doing what you want

17:11 aperiodic: mittchel: but that's *after* you call holiday, i'm asking what they look like *before* you call it

17:12 mittchel: ehh

17:12 ok

17:12 hyPiRion: hiredman: Okay, thanks. Is it ugly in terms of being long, or is also due to my horrible nestings?

17:12 hiredman: it's just bad

17:12 mittchel: ([{:tag :naam, :attrs nil, :content ["Piet"]}] [{:tag :naam, :attrs nil, :content ["Klaas"]}])

17:13 S11001001: hyPiRion: throw that away, and write a function that takes your preds and the seq, mapping each element of the seq to the index of the first passing predicate

17:13 mittchel: aperiodic: can I pm you for a sec?

17:13 hiredman: side effects in lazy seqs, transactions for little to no reason, horrible nesting, function size

17:13 etc etc

17:13 aperiodic: mittchel: sure

17:14 hyPiRion: hiredman: okay, thanks.

17:15 mittchel: aperiodic: done

17:16 hiredman: hyPiRion: (fn f [ps items] (when (and (seq ps) (seq items)) (lazy-seq (let [{a true b false} (group-by (first prs) items)] (cons a (f (rest ps) b)))) ;; or something

17:17 while not being lazy it has none of the nightmarish qualities

17:21 brehaut: hi PeregrinePDX

17:23 PeregrinePDX: Heya brehaut

17:47 notNicolas: does anybody have an explanation of the "loop" command that isn't written for world class phd computer science students?

17:47 technomancy: you probably don't want to use loop

17:47 notNicolas: I need to understand what it does to solve a problem in 4clojure

17:48 jasonjckn: notNicolas: do you understand recursion?

17:48 notNicolas: perhaps you should check out one of the great clojure books

17:48 notNicolas: jasonjckn, I think I have a decent understanding

17:48 technomancy: oh, well that's different

17:48 Borkdude: notNicolas: &&(loop [i 0] (if (< i 10) (do (println i) (recur (inc i)))))

17:48 raek: notNicolas: if loop is a label, then recur is a goto

17:48 (but with parameters)

17:49 brehaut: notNicolas: you arent you thinking of common lisps loop macro are you?

17:49 Borkdude: && doesn't work anymore?

17:49 lazybot: java.lang.RuntimeException: Unable to resolve symbol: & in this context

17:49 notNicolas: I'm thinking about this http://clojuredocs.org/clojure_core/clojure.core/loop

17:49 amalloy: you want ##

17:49 notNicolas: Borkdude, you should add an example of that simplicity on that page. As it stands, the page is completely impossible to understand for a beginner like me

17:50 Borkdude: notNicolas: ##(loop [i 0] (if (< i 10) (do (println i) (recur (inc i)))))

17:50 lazybot: ⇒ 0 1 2 3 4 5 6 7 8 9 nil

17:51 jasonjckn: those examples look like they were taken from some massive source code base

17:51 instead of written for explanation purposes

17:51 notNicolas: totally

17:51 Borkdude: notNicolas: go ahead

17:51 hiredman: notNicolas: clojuredocs.org has never struck me as very useful, consider reading the docs on clojure.org, particularly http://clojure.org/special_forms

17:52 notNicolas: hiredman, oh yeah, this is way more descriptive

17:52 jasonjckn: free stuff will only be so good hough, that's why we have great books

17:52 Borkdude: notNicolas: if you want to grasp the basics, read a book like jasonjckn says indeed

17:53 notNicolas: I don't have time to read a book. I'm just hacking my way through 4clojure when I have time to spare :p

17:53 jasonjckn: well use the clojure community's time wisely please :)

17:54 Borkdude: what happens when I have ##"multiple" expressions in my ##"sentence" ?

17:54 ,(doc loop)

17:54 clojurebot: "([bindings & body]); Evaluates the exprs in a lexical context in which the symbols in the binding-forms are bound to their respective init-exprs or parts therein. Acts as a recur target."

17:54 amalloy: he actually only responds to things that are obviously clojure expressions - ie the reader returns a sequential thing for them

17:55 but you can ask for ##(inc 1) and ##(+ 1 2) if you want

17:55 lazybot: (inc 1) ⇒ 2

17:55 (+ 1 2) ⇒ 3

17:55 clojurebot: *suffusion of yellow*

17:55 Borkdude: ,"dude"

17:55 clojurebot: "dude"

17:55 Borkdude: ##"dude"

17:56 notNicolas: jasonjckn, I remember how last year I harassed ##C++ for 8 months straight and learnt everything I know about C++ there to a point that I can teach senior programmers new things

17:56 jasonjckn: notNicolas: cool, glad you gave back

17:57 notNicolas: pft lol

17:57 well, I stay there and answer questions for other noobs now.

17:57 Borkdude: I had this thought: one category of FP-people lose attention immediately when a new prog. language has no advanced type system, another category loses interest immediately when it has no Lisp-like macro's

17:58 raek: Borkdude: for some reason lazybot requires the expression after the ## to be wrapped in parens

17:58 jasonjckn: Borkdude: is that category list exhaustive?

17:59 Borkdude: jasonjckn: not all FP-people belong to any of these categories

17:59 jasonjckn: now that you mention it, eveyr since I've learned about macros, it really colors my perception of other languages

17:59 particularly when they try to solve the problems that macro solves with 'hacks'

17:59 amalloy: raek: notNicolas just provided an example for us - we don't want him trying to eval ##C++

17:59 but he'll eval anything you want if you just put a & at the front of your message, as always

18:00 kaoD: unless you put another extra space before

18:00 hyPiRion: Borkdude: I changed from Common Lisp to Clojure only because it is more succinct.

18:00 raek: hadn't thought of that channel name convention

18:00 notNicolas: I'm glad to have been of help

18:00 hyPiRion: Hopefully other people change from one language to another when they find out that they program faster in the other language.

18:01 Borkdude: to tell you one example where I got this thought: the Dutch FP-days, organized by academia. It is Haskell only… a dynamic language like Clojure isn't taken seriously

18:01 amalloy: kaoD: "at the front", in contrast to "somewhere near the front"

18:02 kaoD: admit it, he's just mean to me

18:02 btw, just learn about ## multiple expressions

18:03 * kaoD 's mind blew up

18:03 jasonjckn: Borkdude: there's a lot of arbitrary criteria people apply to languages, sometimes language features themselves become goals, as oppose to goals for creating excellent product

18:04 hyPiRion: Borkdude: That's a bit sad. I hoped academia opened its arms for new ideas, or at least evaluated them before saying no.

18:06 Borkdude: yeah… but to be honest, Lisp macro's are really cool and powerful.. any language that doesn't have that feels kind, can it still be awesome? :P

18:06 dnolen_: Borkdude: there's plenty of interesting verification work going on outside of types.

18:06 Borkdude: it always boggles my mind how little FP *users* seem to know about Prolog and all its offshoots.

18:06 Borkdude: feel kind of … incomplete (forgot some letters, must be beer)

18:07 technomancy: Borkdude: comparing elisp to ocaml, I feel the lack of referential transparency much more strongly than the lack of macros

18:08 dnolen_: jasonjckn: so how did using core.logic for static analysis work out for you in your compiler project?

18:08 Borkdude: dnolen_: I like the approach of the reasoned schemer: logic programming is a natural extension of FP…

18:09 brehaut: sounds like someone is preaching to the converted

18:09 dnolen_: Borkdude: The Reasoned Schemer is bigger than that. Logic programming on the same terms of the language is written in.

18:10 Borkdude: technomancy: ocaml has immutability as default, or what do you mean exactly?

18:10 jasonjckn: dnolen_: Worked extremely well, particularly for checking various constraints about the type hierarchy (duplicates declarations, cycles, final classes are not extended, etc)

18:11 dnolen_: jasonjckn: very cool, will you write up anything about it?

18:12 Borkdude: dnolen_: I must admit I have only read the first couple of pages but I'm impressed already.. I also like their style of "teaching"

18:12 dnolen_: I have done some contraint logic programming in the past, but I didn't see the natural connection then

18:13 jasonjckn: dnolen_: It's a pretty niche subject to write up on type hierarchy checking, i considered doing a write up about how to write a java compiler, but now looking back on the code, it's a huge undertaking, and i think we have around 4k lines

18:13 dnolen_: Borkdude: it's a great book if sometimes oblique.

18:13 technomancy: Borkdude: more or less

18:13 jasonjckn: dnolen_: i'm not sure how many people would read a blog post on type hierarchy checking with core.logic (?) many a dozen people

18:14 technomancy: if I had to pick between macros and referential transparency, macros would lose.

18:14 dnolen_: jasonjckn: I see - even a little experience report on how you approached using core.logic from a high level.

18:14 Borkdude: technomancy: so common lisp or haskell, it would be haskell?

18:14 dnolen_: jasonjckn: probably more people than you think.

18:15 amalloy: jasonjckn: if you get dnolen_ to tweet it you'll get way above a dozen readers

18:16 Borkdude: don't mean to start language fights in here… I was just thinking about the type-obsessed and macro-obsessed

18:17 dnolen_: Borkdude: both categories of people are probably worth ignoring.

18:17 jasonjckn: dnolen_: amalloy it's definitely a good idea, i'll think about it more, i'm not sure if I want to start a blog, or just do a write up.

18:18 yoklov: haha, academia is cool until you realize that to a large extent it's a brute force approach

18:18 bderooms_: I wrote a program that parallellizes reading a huge file processes it and then writes it out. Everything works fine, but once I increase the size of the file to a certain size the program behaves weird.. In stead of crashing, it just drops the cpu usage and does nothing anymore

18:18 yoklov: research anything that seems publishable

18:18 Borkdude: This quote of @fakerichhickey is absolutely awesome though: I am not out to win over the Haskell programmers; I am after the Lisp programmers. I managed to drag a lot of them about halfway to Haskell.

18:18 yoklov: at least that was my experience outside of computer science, but I can't imagine it's significantly different in cs

18:19 bderooms_: does anyone have an idea what is happening? .. no memory to store the agents messages or something?

18:20 jasonjckn: dnolen_: amalloy it'd be interesting to a lot of people if i showed how to write type systems for DSLs with core.logic, do you know any examples of this?

18:21 dnolen_: jasonjckn: nope, do it!

18:21 * dnolen_ is heading to NYC Clojure

18:26 yoklov: Is it possible to use rlwrap or jline or anything readline-like with lein-cljsbuild

18:27 and by possible, i mean is it easy/already done

18:35 notNicolas: is clojure slow

18:35 technomancy: no

18:36 PeregrinePDX: For certain definitions of slow all programming languages are.

18:36 Borkdude: give me an example of a slow programming language

18:37 technomancy: speed isn't a property that can be applied to a programming language, it's a property of programs.

18:37 a better question would be "does this language make it easy to write code that isn't slow?"

18:38 notNicolas: is it faster or slower than clisp?

18:38 Borkdude: or maybe also "is it easy to write very slow code"

18:39 technomancy: notNicolas: again, languages don't have a speed

18:39 do you mean "is it possible to write faster programs in Clojure or clisp?" or do you mean "is it easier to write fast code in Clojure or clisp?"

18:40 totally different questions

18:40 notNicolas: There's just something about an interpreted language running on Java that sounds slow

18:40 Cr8: hell, the same clisp program is going to run differently on different implementations

18:40 Borkdude: notNicolas: common lisp is commonly compiled to native code, clojure is commonly compiled towards non-native code...

18:40 technomancy: ◔_◔

18:40 yoklov: notNicolas: clojure isn't interpreted, it's compiled

18:40 notNicolas: oh ok

18:40 Cr8: notNicolas: Clojure is as much a JVM-native language as Java is.

18:40 technomancy: Cr8: clisp is an implementation

18:40 Cr8: ah, I thought he was just shortening common lisp

18:41 bells.

18:41 technomancy: Cr8: he may be confused

18:41 notNicolas: trust me, I am very confused

18:41 * PeregrinePDX resists being a smart ass.

18:41 technomancy: Borkdude: clojure usually gets JITed into native code where appropriate

18:44 Borkdude: technomancy: ah

18:44 technomancy: it's possible to write very fast Clojure code, but sometimes it can be a lot of work: http://meshy.org/2009/12/13/widefinder-2-with-clojure.html

18:45 yoklov: notNicolas: for the most part, it's easier to write fast code in clojure than it is in common lisp, but you probably can get faster programs in common lisp (depending on the implementation)

18:45 technomancy: it's usually easy to beat out things like ruby, js, and python though. beating Java and Scala is hard but possible.

18:45 Borkdude: technomancy: btw I noticed that powershell scripts take a while to load

18:46 PeregrinePDX: notNicolas, both learning clojure style books I have both talk about clojure being compiled in the first chapter. A book might help answer some of these questions for you.

18:46 Borkdude: technomancy: in combination with the effort to keep lein startups below x seconds that may not be good

18:46 yoklov: notNicolas: if you want, compare http://shootout.alioth.debian.org/u64q/program.php?test=mandelbrot&lang=sbcl&id=1 and http://shootout.alioth.debian.org/u64q/program.php?test=mandelbrot&lang=clojure&id=6 (neither are idiomatic, but clojure's is much easier to read, albeit slower)

18:46 hiredman: or just read clojure.org

18:47 technomancy: Borkdude: hm; what kind of numbers are we talking about?

18:47 hiredman: the first paragraph of the first page of clojure.org says "Clojure is a compiled language - it compiles directly to JVM bytecode, yet remains completely dynamic."

18:47 Borkdude: technomancy: a few seconds?

18:47 technomancy: Borkdude: wow, that's terrible.

18:47 good to know though

18:48 hiredman: it also still says "every feature of Clojure is available at runtime" =\

18:48 hiredman: technomancy: which aren't?

18:48 technomancy: AOT and stuff

18:48 Borkdude: technomancy: http://stackoverflow.com/questions/4208694/how-to-speed-up-startup-of-powershell-in-the-4-0-environment

18:49 technomancy: Borkdude: useless

18:49 hiredman: technomancy: you can aot stuff at runtime

18:50 technomancy: hiredman: I guess it doesn't strictly imply the ability to repeat a given operation

18:50 Borkdude: thanks for the info though

18:50 hiredman: but why would you want to do something called "ahead of (run)time compilation" at runtime?

19:00 brainproxy: anyone having an issue w/ clojurescript r1236 (latest rel) where sometimes dependencies are out of order in the compiled js?

19:01 technomancy: I just think it's somewhat misleading

19:01 it has features that aren't intended to be used at runtime even if technically it's possible to do so.

19:06 yoklov: It's too bad that the 'every feature supported by clojure is supported at runtime' statement doesn't hold true in clojurescript

19:07 I definitely miss some of them when writing cljs code

19:10 hiredman: well, you know, when you build upon sand

19:10 yoklov: so true :(

19:11 brehaut: i like to think of javascript as very tiny pieces of broken glass: it looks like sand, but cuts you more often

19:11 bderooms_: if anyone gets why this code goes outofmemory http://pastebin.com/hJe4jpjz

19:11 Borkdude: this is why some people want (common) lisp all the way down :P

19:12 bderooms_: I thought if I don't keep the head and since line-seq is lazy it would traverse the file without exploding in memory

19:12 hiredman: (doc doall)

19:12 clojurebot: "([coll] [n coll]); When lazy sequences are produced via functions that have side effects, any effects other than those needed to produce the first element in the seq do not occur until the seq is consumed. doall can be used to force any effects. Walks through the successive nexts of the seq, retains the head and returns it, thus causing the entire seq to reside in memory at one time."

19:12 hiredman: read it carefully

19:12 bderooms_: auch..

19:13 thanks hiredman

19:13 so I need dorun

19:13 whej.. works!

19:15 hiredman: you could also play with https://gist.github.com/2714805 and the new reducers stuff

19:16 bderooms_: mmm interesting

19:16 brainproxy: is the clojuredocs site stagnant?

19:16 or just low activity w/r/t its blog component

19:17 amalloy: hiredman: that's not really a correct implementation, is it? you need to check (reduced? result) to short-circuit

19:17 hiredman: amalloy: possibly

19:21 amalloy: correctness is someone else's problem, I have the first public code using reducers for io now

19:21 amalloy: haha

19:21 midrangio: like the canononical reduce function?

19:22 or like map/reduce type reducers

19:22 hiredman: midrangio: http://clojure.com/blog/2012/05/08/reducers-a-library-and-model-for-collection-processing.html

19:23 clojurebot: reducers |are| http://clojure.com/blog/2012/05/08/reducers-a-library-and-model-for-collection-processing.html

19:23 clojurebot: Ack. Ack.

19:23 midrangio: that's amazing

19:23 i guess python has parallel map too

19:23 but i feel like this is probably safer

19:23 hyPiRion: Is there a sequential pcalls, or do I have to do something like (map #(%) list) to achieve the same result?

19:26 midrangio: hiredman: can you explain the following line: What is the generic gateway to a collection applying things to itself? In Clojure, it is (internal) reduce.

19:28 bderooms_: hiredman: could you also explain why pmap acts funny on huge files? http://pastebin.com/PmkQfFPp

19:28 well.. actually anything 'parallel' .. since I tried it also with a fixed number of actors.

19:29 basically from the moment I replace map with pmap my processors run at 90 percent each and then just 'freeze' to 1 percent usage after a few seconds

19:29 hiredman: internal reduce is a protocol that can be used to give a an implementation of reduce that is specialized to a particular object

19:29 (that can take davantage of special knowledge about that collection)

19:30 bderooms_: that code is garbage

19:30 midrangio: ahh guess i have to learn more about clojure then

19:30 hiredman: bderooms_: def (and by extension defn) creates a global var

19:30 def is not lexically scoped

19:30 wkmanire: Is type reserved?

19:30 hiredman: let is

19:31 midrangio: how should he do it then

19:31 hiredman: wkmanire: type is a function in clojure.core, but it is just a function

19:31 midrangio: use anonymous function?

19:31 wkmanire: I see.

19:31 hiredman: Thanks

19:31 hiredman: midrangio: as far as I can tell you are not calling a function at all

19:32 but it could just be cause it is hard to tell which parens line up there

19:32 (the code could just be poorly formatted)

19:32 midrangio: isn't it calling process-transaction inside

19:32 bderooms_: okay so I'll put the defn outside the main scope

19:32 but the question remains

19:32 hiredman: inside of what?

19:33 midrangio: hiredman: on line 11

19:33 i wonder why pastebin doesn't run it through an autoindenter

19:34 bderooms_: sry for the formatting.. I have been trying lots of code already this night with my eyes half closed

19:51 alex_baranosky: TimMc: hey man, it would be cool to get sorted-set into sees-ad-colls … I was showing the guys here your webpage

20:01 augustl: I want to get a new vector where the 2nd item in another vector is transformed by a function, suggestions?

20:02 the use case is [2010 5 4], a date of y m d, where the month needs to be increased by one

20:02 hiredman: (doc update-in)

20:02 clojurebot: "([m [k & ks] f & args]); 'Updates' a value in a nested associative structure, where ks is a sequence of keys and f is a function that will take the old value and any supplied args and return the new value, and returns a new nested structure. If any levels do not exist, hash-maps will be created."

20:02 augustl: hmm, it's under maps in the cheat sheet, I'll look it up

20:03 I only have one vector, not nested, just trying to avoid saying "changing" a vector since you don't really do that ;)

20:03 but yeah, it's just [2010 5 4] => [2010 6 4]

20:04 aperiodic: ,(update-in [2010 5 4] [1] inc)

20:04 clojurebot: [2010 6 4]

20:04 augustl: ah

20:05 scottj: augustl: there's no non-nested version of update-in. it's like assoc but you pass a function instead of value.

20:07 augustl: scottj: ah, I see

20:08 wkmanire: I'm jacking with tkinter in clojure-py. when I try to .config the root widget it is throwing a generic exception with no description.

20:09 Do I need to declare the root widget as dynamic?

20:09 hiredman: given the blog posts I've seen describing clojure-py I would be surprised if it worked at all

20:09 wkmanire: I'm able to set up a frame with a grid layout

20:10 I've tested text boxes and entries with success.

20:10 Adding a menu has been a no go so far.

20:10 Here's the borked code. https://www.refheap.com/paste

20:10 works on 2.7.2 if you remove line 41.

20:11 Python 2.7.2 that is.

20:12 What would be the syntax to make tk dynamic?

20:15 nDuff: In a case where I expect to have a native Java object of a specific type, I instead have an instance of $Proxy1555, such that isa? against the class it wraps (which I expect to have a handle on directly) returns false. What exactly is going on here, and -- more to the point -- should I be doing something differently to do isa? tests through this layer of wrapping?

20:16 hiredman: nDuff: read the docstring of isa? and make sure you have the arguments in the right order

20:17 nDuff: you may also want to switch to instance?

20:17 nDuff: ahh

20:17 instance? is what I needed

20:25 technomancy: isa? is the new contains?

20:30 kaoD: wat

20:30 I just discovered the true Overtone power

20:30 just awesome

20:30 brehaut: generaeting dubstep by seeding the random generator with a twitter stream?

20:31 kaoD: nope, just regular music

20:31 brehaut: probably for the best

20:31 kaoD: I'm (kind of) a musician so I am biased not to do that kind of crazy stuff

20:32 also: I'm tired of wobble basses :P

20:33 their roadmap looks awesome too, I was thinking on doing something simillar (kinda tired of "static" synths)

20:34 brehaut: im also a kind of musician, and likewise

20:36 wkmanire: brehaut: lol @ twitter comment

20:40 xeqi: ~isa?

20:40 clojurebot: Huh?

20:48 mudphone: w00t, my Clojure Bee iPhone app's latest version was just released (free copies for anyone interested) :)

20:49 aperiodic: clojure Bee?

20:49 is that like a spelling bee?

20:50 mudphone: aperiodic: yeah, but the quiz isn't done yet

20:50 i just have the api browser/surfer done

20:50 i'm building it to be a personal navigator through the api

20:51 aperiodic: did you make up the quiz questions, are they sourced from somewhere?

20:51 (real question: can i look at them?)

20:52 mudphone: i don't have any quiz questions yet

20:52 suggestions?

20:53 I was going to start simple… like multiple choice… doc string matching to symbol?

20:55 more interesting quiz questions would be more fun though… hmmm

20:59 aperiodic: questions that can be easily answered with google or the clojure cheatsheet don't sound that fun. a 4clojure client would be more interesting to me, and the crappy keyboard would encourage code golf

21:01 devn: mudphone: cool!

21:01 mudphone: ill take a copy if you're offering. :)

21:02 mudphone: you could do a series of questions like: "expand this macro"

21:02 mudphone: devn: promo code sent

21:02 devn: "what is the result of calling macroexpand-1 given the following..."

21:04 aperiodic: man, i would love macro quizzes. i've barely written any macros.

21:05 mudphone: devn: that sounds scary… hmmm… interesting ideas

21:05 devn: i just started reading let over lambda

21:05 doug hoyte friggen /loves/ macros

21:05 mudphone: how does multiple choice macro expansion sound?

21:05 also Paul Graham :)

21:06 devn: mudphone: could work... you could ask things about underlying implementation and so on

21:06 like, what is the class of []? what is the class of (iterate inc 0)? etc.

21:08 technomancy: Paul Graham's assertion that ViaWeb was 25% macros terrifies me.

21:09 that's just Not Right

21:09 mudphone: how you would calculate that percentage, terrifies me

21:09 devn: technomancy: have you read Let Over Lambda?

21:09 mudphone: devn: excellent ideas...

21:09 technomancy: devn: no, but I've heard it's more or less a CL troll

21:10 mudphone: (on the what is the…)

21:10 devn: technomancy: what does that mean?

21:10 technomancy: devn: I guess he takes every available opportunity to talk about how great lisp-2 is?

21:10 devn: like it's designed to elicit negative reactions from the CL community or?

21:11 technomancy: don't know. just started it. he's pretty passionate about his macros, though. im looking forward to reading his treatment of anaphoric macros and so on

21:11 technomancy: https://mobile.twitter.com/trptcolin/status/197859522021302272

21:13 devn: heh. im not joining a religion. i think the talk christophe gave at the first conj and fogus' talk at the last conj are probably right. but Joy of Clojure still lists Let Over Lambda as a reference. I'm interested to see what truth it holds.

21:14 amalloy: technomancy: there is some good stuff in LoL, to be sure

21:15 but there is more smugness than is really warranted

21:18 mudphone: I had bookmarked this as a good set of instructions for installing Slime: http://riddell.us/ClojureSwankLeiningenWithEmacsOnLinux.html

21:18 But, it seems to be dead now… Anyone have another good set of instructions?

21:19 amalloy: ~swank

21:19 clojurebot: swank is trust the readme and the readme only. all others will lead you astray.

21:20 technomancy: what happened to the riddell.us warning?

21:20 lazybot: The riddell.us tutorials are much more highly-ranked on Google than they deserve to be. They're old and way too complicated. If you're trying to install Clojure...don't! Instead, install Leiningen (https://github.com/technomancy/leiningen/tree/stable) and let it manage Clojure for you.warning?

21:20 technomancy: lazybot: belated botsnack

21:20 mudphone: moce

21:20 s/moce/nice/

21:21 i've been away too long :)

21:21 technomancy: oh, I guess if it's 404ing then the warning can be removed

21:21 yay

21:21 mudphone: well, the website says that it will be coming back

21:22 technomancy: hopefully that particular page doesn't

21:23 amalloy: yeah, i dunno why lazybot didn't jump on that the first time

21:24 devn: amalloy: yeah i can smell the smug in the first 20 pages. he's laying it on thick.

21:24 LoganLK: clojure + vert.x . could you smart people share some insight?

21:25 brehaut: huh. two lisp books with LoL as their abbreviation. thats a little difficult

21:25 mudphone: so, I should read the Swank readme and use Leiningen for all else?

21:25 technomancy: LoganLK: if it gets people off node, I'm for it.

21:25 devn: lol

21:26 LoganLK: is the "concurrency model" of vertx compatible with clojure's? I know very little about both :(

21:26 technomancy: LoganLK: it works fine, but I gather most people doing async work in Clojure are happy with aleph.

21:27 I don't know if Vert.x brings much that's new to the table.

21:27 LoganLK: gotcha. thanks :)

21:27 technomancy: it does seem to have better docs

21:27 amalloy: brehaut: yeah, i accidentally unleashed a long rant about land of lisp

21:29 brehaut: wait, you were talking about Land of Lisp?

21:29 * brehaut is doubly confused

21:29 amalloy: oh, not just now

21:29 brehaut: oh right

21:29 amalloy: this time my wrath was well-directed

21:30 brehaut: ha

21:34 wkmanire: I got that menu to work and have no idea why.

21:35 I hate it when I fix bugs without ever knowing what was wrong.

21:52 bhenry: ping ibdknox

22:07 amalloy: bhenry: btw, if you instead say "ibdknox: ping", lazybot will send you a PM when ibdknox is around, in case (for example) he's careless and doesn't mention you

22:08 bhenry: amalloy: interesting.

22:08 amalloy: you can even PM that to lazybot and he'll still notify you, giving you an efficient way to politely stalk someone if it's not urgent

22:09 bhenry: haha even cooler

22:10 lazybot should recognize ping commands when ping is the first word of a message

22:14 amalloy: nah

22:14 "ping me when you get back, bro" and stuff like that is too common

22:14 "ping is my favorite ICMP command"

22:15 devn: ICMP is my favorite band

22:28 aperiodic: hello from clojerks!

22:29 PeregrinePDX: I almost went to clojerks today

22:29 aperiodic: why not? it looks like a great talk

22:30 PeregrinePDX: Various things got in my way.

22:31 And I am brand new to clojure so it looked like the talk would go way over my head.

22:34 aperiodic: aw, too bad. hope to see you at the next one!

22:37 muhoo: clo...jerks?

22:38 aperiodic: muhoo: the pdx clojure group is called clojerks

23:03 muhoo: nice. tho it's hard to beat "seajure"

23:03 java... makes me want to puke blood: https://www.refheap.com/paste/2760

23:04 aperiodic: i wanted it to be called pojure (pronounced "poser")

23:07 muhoo: i knew an electronic music artist named "preshish moments". it had to be pronounced just that way too.

23:10 thank gawd for (-> ) https://www.refheap.com/paste/2761

23:15 devn: muhoo: some guys i work with recently created a tool called "bwoken"

23:17 muhoo: cute

23:19 wow, he's still touring http://preshishmoments.com/

23:25 yoklov: hm, can anybody think of a 1 character true value?

23:25 Raynes: 1

23:26 Any single digit integer.

23:26 yoklov: wow, how dumb of me. thanks

23:36 nsxt_: Raynes: thanks for refheap.vim

23:37 zcaudate: I'm using fetch's defremote.... Is there a canonical way to convert a date in clojure to a date in clojurescript?

23:38 or should i just turn it into a a long a parse it as a Date() object?

Logging service provided by n01se.net