#clojure log - Oct 27 2011

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

0:00 sdeobald: duck1123: Awesome. Thanks.

0:02 mrh0057: cemerick: I really don't like the closure set of libraries but I bet closure api is probably not going to change munch with google heavy investment in GWT and Dart.

0:16 mdh: any reason why clojurescript wouldn't compile this: (defn f [x] (case x true (recur false) false nil))

0:18 michaelr525: ,(defn f [x] (case x true (recur false) false nil))

0:18 clojurebot: #<Exception java.lang.Exception: SANBOX DENIED>

0:19 mdh: denied!

0:19 michaelr525: err

0:19 does clojure compile this?

0:19 mdh: nicely

0:20 michaelr525: what

0:20 's

0:20 the syntax

0:20 for the other bot?

0:20 &(defn f [x] (case x true (recur false) false nil))

0:20 lazybot: java.lang.SecurityException: You tripped the alarm! def is bad!

0:21 Raynes: Neither one of them are stupid enough to allow that, unfortunately.

0:21 michaelr525: you mean smart enough to be stupid enough?

0:25 there has to be M-x clojure command that just starts a repl

0:28 duck1123: michaelr525: this is what I use https://gist.github.com/1318774

0:28 I by no means claim the binding is good

0:32 amalloy: duck1123: C-c <single letter> is reserved for your personal use

0:32 i use C-c s for slime-connect

0:33 michaelr525: you can easily test this by not using defn

0:33 &((fn f [x] (case x true (recur false) false nil)) true)

0:33 lazybot: ⇒ nil

0:33 duck1123: I know, the <f9> is a historical thing. I've tried binding it to other letters, but I'm used to it now

0:34 I have C-c s bound to slime selector. C-c s r ir my repl

0:35 michaelr525: for this to work there has to be a swank instance running, no?

0:35 amalloy: michaelr525: yes, which is what M-x clojure-jack-in is for

0:36 duck1123: yes, if you want it to start swank for you, that's what clojure-jack-in is for. I always have a screen session bound to F12

0:36 amalloy: duck1123: a screen session of what?

0:37 duck1123: I have GNU screen running in a terminal in Guake. (hides shows on F12)

0:37 amalloy: i was getting more at: what does this have to do with slime/swank

0:38 duck1123: My point was more that I almost always have a running swank session in the terminal

0:38 I guess it really all depends on what type of apps you're writing

0:42 michaelr525: amalloy: but to run clojure-jack-in you have to be in a project

0:43 and i just want to start a repl - see what i mean?

0:43 amalloy: meh

0:43 michaelr525: probably not so hard to implement

0:43 duck1123: but it's one of those things that really shouldn't be encouraged

0:44 michaelr525: why?

0:44 clojurebot: http://clojure.org/rationale

0:44 duck1123: it causes people too many problems that they wouldn't have if they just created a project

0:46 michaelr525: i guess you are right but this is an implementation detail :)

0:46 duck1123: "just create a repl" raises the question of which version? Any contrib libraries, any other libraries. lein new does 90% of it anyway

0:46 michaelr525: and i just want to start a repl

0:46 duck1123: classpaths are hard. let's go shopping

0:47 amalloy: clojurebot: The classpath is hard. Let's go shopping!

0:47 clojurebot: Ik begrijp

0:49 technomancy: michaelr525: if you don't want any deps you can do ~/.lein/bin/swank-clojure followed by M-x slime-connect

0:50 as soon as you want to add deps you should start a project though

0:50 michaelr525: cool

0:51 how do i bind it to F12 in emacs?

0:51 duck1123: (global-set-key (kbd "<f12>") 'slime-connect)

0:51 Iceland_jack: michaelr525: (global-set-key (.. damn

0:51 duck1123: fair warning, F12 don't go through ssh

0:52 err.. fkeys

1:49 lancepantz: is anyone aware of any comet / long polling implementations in clojure?

1:52 michaelr525: lancepantz: maybe websockets with aleph

1:53 lancepantz: i actually already have a websocket implementation

1:53 * lancepantz glares at heroku

1:53 lancepantz: they don't support websockets

1:53 fair enough though, those details are just getting ironed out

2:47 Knekkebjoern: I have a list (a b c) . Is there a simple way to stringify it into "(a b c)" ?

2:47 alternatively, how can I serialize and deserialize code/data easily?

2:48 raek: Knekkebjoern: use pr-str and read-string

2:48 Knekkebjoern: raek: thanks!

2:48 raek: ,(pr-str (range 5))

2:48 clojurebot: "(0 1 2 3 4)"

2:48 raek: ,(read-string "(0 1 2 3 4)")

2:48 clojurebot: (0 1 2 3 4)

2:49 raek: (as you might have discovered, 'str' does not do the right thing if you want to serialize data)

2:52 Knekkebjoern: it does not

3:02 sploop: before I implement a redundant fn, I wanted to check with you guys to see if there is a library fn for extracting values from a nested map, where the keys form a path. Anyone know if that exists?

3:03 something like (get-path {:people {:name "bill"}} [:people :name])) -> "bill"

3:05 ejackson: sploop: try (-> mymap :k1 :k2 :k3)

3:05 sploop: thrush it through

3:06 ejackson: yup

3:06 terom: ,(get-in {:people {:name "bill"}} [:people :name])

3:06 sploop: hadn't thought of that, nice.

3:06 clojurebot: "bill"

3:06 sploop: awesome, thanks. I knew there had to be something in core already...

3:23 amalloy: sploop: there's not much redundant to implement, though. get-in is just (reduce get m ks)

3:30 Blkt: good morning everyone

3:31 sploop: amalloy: yeah, that's basically what I did on the first cut, but I'm real sticky about trying to use what appears to be idiomatic. If the concept of tracing a path through a nested associative data structure is agreed tobe (get-in), then I'll defer

3:32 Blkt: good morning

3:49 mindbender1: please what problem does parallel programming and concurrency solve?

3:50 Chousuke: mindbender1: the problem of being able to utilise multiple separate processing units.

3:50 Fossi: mindbender1: was that a rethorical question?

3:50 Chousuke: mindbender1: and/or being able to perform tasks simultaneously without interrupting either one.

3:51 mindbender1: I've read stuart's book, chouser's book , etc I can't just get my head around it

3:51 Chousuke: that's in a multi processor enviroment

3:51 ?

3:52 Chousuke: mindbender1: it can be, but it's not limited to just that.

3:52 mindbender1: So do I have to worry about not implementing it in my codes?

3:53 Chousuke: depends on the problem you're solving. Though in general it's good to at least consider concurrency issues when you code

3:53 mindbender1: Where can I get good materials on dead brain examples of concurrency application?

3:53 Chousuke: and since individual processors are unlikely to get significantly faster, not writing parallel code is ignoring a source of performance

3:54 mindbender1: ok

3:54 Chousuke: concurrency and parallelism are not easy, but Clojure provides you with good tools... At least better than most languages :P

3:55 mindbender1: Chousuke: I'll be glad to experience those first hand

3:55 Chousuke: I think nowadays the most common example of concurrency is in UI code though

3:55 raek: mindbender1: clojure was designed to make the step from non-concurrent to concurrent simple. basically, the style you are forced to write code in in clojure makes it fairly simple to make that step

3:55 mindbender1: Chousuke due to multiple events?

3:56 raek: ok

3:56 Chousuke: you want to be able to update the UI and react to input while doing processing on some data without interrupting the data processing

3:56 so you need concurrency

3:56 if you have a single thread then your UI simply will not work while any processing is going on

3:56 and your users will complain

3:57 mindbender1: But I rarely see that happening with most UIs I've experienced

3:57 raek: in "traditional" programming languages, programs do not "just work" after adding more threads the way they can in Clojure

3:57 Chousuke: that's because most UI toolkits nowadays force you to do UI operations on a separate thread

3:58 mindbender1: raek: So Clojure makes multi-threading easy with concurrency tools?

3:58 Chousuke: there's concurrency going on though the inattentive programmer might not notice (and consequently is likely to write broken code due to false assumptions.)

3:59 pyr: hi

3:59 Chousuke: mindbender1: multi-threading is never easy, but Clojure's tools are powerful

3:59 pyr: are there release notes for sub libraries

3:59 i wonder what's changed in tools.logging 0.2.3

3:59 mindbender1: Chousuke: so that means clojure makes it easy?

3:59 Chousuke: mindbender1: and immutable data structures remove the main worry in writing concurrent code, which is accidental modification of global state

4:00 mindbender1: I'm wary of the word "easy"

4:00 mindbender1: I don't think it can ever be easy no matter how good your tools are

4:00 mindbender1: Chousuke: not as in not thinking

4:01 raek: mindbender1: Clojure makes the concurrency bit (multiple "actors" that need to modify common resources) simpler by eleminating unrestricted mutation

4:01 mindbender1: Chousuke: what are the kind of things you worry about when doing concurrency?

4:02 Chousuke: mindbender1: two concurrent threads accessing the same (mutable) data without synchronisation mainly

4:02 mindbender1: raek: please just a real life example will do

4:02 raek: mindbender1: traditionally: locking. Clojure as another approach than locking

4:03 mindbender1: say you want to modify multiple collections in a complex manner atomically

4:03 this is hard to get right with locks

4:03 mindbender1: raek: ok

4:03 Chousuke: mindbender1: Clojure has several datatypes called references that are mutable containers for immutable data.

4:04 mindbender1: Chousuke: yes I'm following

4:04 Chousuke: the difference between references and plain mutable data is that references have strictly defined APIs/behaviour for concurrent access

4:05 raek: the most basic example would be to have two accounts and an operation that moves money from one to the other. when you observe the account you want the amount of the transfered money to either be in account A or B, but never in both or none

4:05 Chousuke: different references have different semantics (for different usecases)

4:06 mindbender1: Chousuke: understood

4:07 Chousuke: mindbender1: in most languages, all you have is a single kind of "reference" (direct access to the object) which is unmanaged and can be mutated at any time

4:07 raek: in traditional programming languages you have to remember to lock the accounts. if you forget it your program just behaves strangely *sometimes*.

4:07 mindbender1: raek: ok

4:08 raek: in clojure, it's as simple as (def a1 (ref 100)) (def a2 (ref 200)) (defn transfer [src dest amount] (dosync (alter src - amount) (alter dest + amount)))

4:09 every access (read or write) to a ref in a transaction will happen atomically

4:09 sploop: not unlike a database

4:09 Chousuke: I prefer not putting dosyncs inside functions

4:09 keeps them explicit at the top level

4:10 mindbender1: raek: (dosync) takes care of that right?

4:10 raek: mindbender1: yes

4:11 mindbender1: raek: so what are the selling point for refs

4:12 Chousuke: mindbender1: it establishes a transaction that lasts until its scope ends. if you do (dosync (transfer foo bar 50) (transfer bar zonk 50)) then both of the transfers must succeed or neither does

4:12 mindbender1: Chousuke: where would you rather have (dosync)?

4:12 Chousuke: mindbender: outside the transfer function

4:12 raek: mindbender1: Rich Hickey (the creator of Clojure) gave a presentation on why these things matter and what problem Clojure solves: http://blip.tv/clojure/clojure-concurrency-819147

4:13 Chousuke: mindbender1: it's dynamic so having a dosync inside transfer won't affect my example, but if you forget the dosync and it's not in transfer, you get an error

4:13 raek: (I agree with Chousuke about the dosync placement)

4:14 Chousuke: mindbender1: if you know anything about sql, refs give you similar transactions except for data in memory.

4:14 mindbender1: Chousuke: exactly what I was thinking

4:15 more like constraints

4:15 Chousuke: mindbender1: in addition to refs there's another reference type called atom that just gives you an atomic read operation and atomic update. no synchronisation

4:16 it's good for eg. incrementing counters without worry about race conditions

4:16 mindbender1: Chousuke: please code sample

4:16 for atom

4:17 Chousuke: (def a (atom 0)) then do from as many threads as you want: (swap! a inc) ; a's value will stay correct even if two threads do the inc operation exactly at the same time

4:18 which is not true for uncontrolled mutation :)

4:18 Fossi: i guess it's harder to understand these solutions if you don't understand the problems

4:18 Chousuke: maybe

4:18 I don't really know a good tutorial to issues with concurrency :/

4:19 mindbender1: Chousuke: that's why I had to ask here

4:19 Chousuke: At one point I envisioned starting a blog or something where I write short essays/tutorials about various problems and how Clojure helps solve them

4:19 but I never got around to it :P

4:19 mindbender1: I want to see the problem and I want to see the solution according to Fossi

4:20 Fossi: basically if you don't have locks and such thread A reads for example 0

4:20 mindbender1: Chousuke: I'll be glad about that

4:20 Fossi: thin the threads get swapped and thread B is on

4:20 it reads 0, increases, so the counter is 1

4:21 then the other thread will write 1 as well

4:21 Chousuke: since it has already read "0"

4:21 Fossi: there's gotta be some graphs about this on the intertubez, but i also lacked the mojo to find them :>

4:21 Chousuke: and in the end you end up with the value 1 in the counter instead of the correct 2

4:23 mindbender1: Chousuke: did such problems burn you at any point in time?

4:24 Chousuke: not yet, fortunately. I haven't written very complicated multithreaded code.

4:26 but if I ever have the need to, I hope I'll be able to use Clojure :P

4:27 mindbender1: What language do you use mostly?

4:28 raek: mindbender1: you might want to browse around for explanations of race condition bugs. this class of bugs is especially nasty... :-)

4:28 Chousuke: Lately I haven't written much code at all. :/ need to get back into programming

4:28 as well as finish my studies :P

4:29 mindbender1: raek: ok

4:29 Chousuke: ok

4:30 raek: I remember looking up something on race conditions but couldn't get the hang of it..

4:30 Fossi: mindbender1: even though most problems here at my work are inherently easy to paralellize (webpage requests) you sometimes need to deal with such problems

4:30 and *yes* they are a big pain in the ass

4:30 mindbender1: I'll try again... I need to be sure I leave no stones unturned

4:31 Fossi: because they alse happen "randomly"

4:31 and are veary hard to find

4:31 mindbender1: Fossi: what kind of issue does it result in.. downtime?

4:31 Fossi: all kinds of things, sometimes downtimes

4:32 if the state of your application gets thrown into a state you didn't expect, that could happen

4:32 raek: mindbender1: race conditions often result in incorrect behaviour of the code and are especially hard to reproduce in tests

4:33 Fossi: mostly it's things like wrong orders, screwed up data in the database, all kinds of things really

4:33 raek: since they depend on timing

4:33 mindbender1: raek: please more example situation

4:33 Fossi: it can happen that a process begins to run wild of not programmed defensively enough and fill up the harddrive or such

4:33 mindbender1: Fossi: ok

4:33 Fossi: then you can be in trouble as well

4:34 take a logging system for exampre

4:34 if you have 2 shop instances and write values into them that you wannt to aggregate

4:34 if you do that in a bad way and screw up a downtime could occur

4:35 or at least you could loose all your data

4:35 raek: mindbender1: here is an article about race conditions from a security perspective: http://www.ibm.com/developerworks/linux/library/l-sprace/index.html

4:35 clgv: I have a collection of items that I parsed from a file that represents a table with 4 columns. it's a really ugly copy so I used string/split with \n\t and space. if all columns would be filled I could use (partition 4 %) to get the table. but some rows have only the first column filled. what is the easiest way to do that with standard clojure operations? is there one? otherwise I have to fall back to loop-recur...

4:36 Chousuke: mindbender1: traditional bugs are "easy" because they're just some part of the program not doing what it's supposed to do. race conditions are nasty because all parts of the program might be completely correct by themselves, but because of concurrency they might end up doing their thing on some bit of data *at the same time*, and you end up with the wrong result.

4:37 mindbender1: Fossi: do you think clojure helps avoid these problems completely or to some degree?

4:37 Fossi: the biggest problem arising from such bugs is most of the time imho not the direct result, but also the aftermath it causes

4:38 because if such a bug leaves your application in a state you didn't expect to ever occur lots of other things go to hell

4:38 especially with mostly mutable languages like java

4:38 mindbender1: Fossi: that sounds scary

4:38 Fossi: and it's very hald to find out what caused the problem in the first place

4:38 since it's most likely not reproducible

4:39 Chousuke: mindbender1: immutable data does away with most of those problems. if you work with immutable data there is no way you will ever modify it concurrently and thus you can run as much concurrent code as you want :P

4:39 raek: Fossi: functional programming with immutable data is always threadsafe

4:39 Fossi: it is. there is lots of safeguarding you have to do to avoid that in a classical business java app

4:39 mindbender1: Fossi: because such things may be triggered by complex events which may not be repeatable?

4:40 Fossi: yes, and not all the time. take for example the counter problem above

4:40 Chousuke: mindbender1: immutable data also removes worry from single-threaded programming too

4:40 Fossi: it might be the counter for your database connection

4:40 raek: mindbender1: yes, they are triggered by certain complex interleavings of events

4:40 Chousuke: mindbender1: you will never have to worry about what a function does to your data :)

4:40 Fossi: so if you only have 5 connections to the db at any time, you loose connections one by one

4:40 so what happens next, is that the webservers have more traffic

4:40 mindbender1: Chousuke: that sounds interesting

4:41 Fossi: because they have to wait longer for the database

4:41 mindbender1: I'm such a believer in modular programming

4:41 Fossi: then the loadbalancer fails or something and your site is down

4:41 Chousuke: mindbender1: a pure function is the ultimate in modular programming

4:41 Fossi: now try to find that error that caused the problem in the first place

4:41 Chousuke: mindbender1: it depends only on its arguments and nothing else.

4:41 mindbender1: Fossi: I'm following

4:41 Fossi: you wan't be looking in your db code

4:41 *won't

4:42 mindbender1: Chousuke: exactly.. that how functions should behave.. like slaves

4:42 Fossi: then even if you somehow find out that that must have been the problem, you don't know why it happened

4:42 because most of the time everything is fine

4:43 it only happens if two webserver try to make/release a new connection to your database

4:43 which will of course be mostly during deployments

4:43 mindbender1: Chousuke: but it seems not everyone share such views

4:43 Fossi: then you start questioning your new features nistead etc pp

4:43 so it can take days to find such a problem

4:44 mindbender1: Fossi: that leads to been inefficient with time

4:44 which I hate

4:45 Fossi: and downtime might be worse

4:45 :)

4:45 mindbender1: hmmm

4:46 Fossi: clojure makes it easier to get things like this right in the first place

4:47 and having mostly immutable objects helps much as well

4:47 because errors/bad state don't spread so wide

4:47 mindbender1: Fossi: I see the point

4:47 Fossi: then, i haven't coded nearly as big systems with clojure as i have with java

4:47 but it feels much better

4:48 mindbender1: raek: any link to where I could download that hickey's presentation?

4:55 raek: mindbender1: I don't know if blip.tv have download links...

4:56 I'm not aware of any other locations for that video

4:56 mindbender1: raek: they don't

4:56 I need to get this video on my hard disk

4:59 AWizzArd|work: Anyone here who works with Artifactory + Leiningen?

5:04 ibdknox_: ~anyone

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

5:07 thorwil: i recently switched to ubuntu 11-10. trying to run my appengine-magic project, i get http 500, "Directory does not exist: /media/sda4/app_engine/tlog-clj-gae/file:/usr/lib/jvm/java-6-openjdk/jre/lib/ext/pulse-java.jar!/../war"

5:08 a search so far suggests that pulse-java.jar has to do with pulseaudio

5:11 i have no need for pusleaudio support. any ideas how i either get that missing jar / get it to be found if present, or make it work without?

5:11 AWizzArd|work: ibdknox_: this "anyone" does not apply in this case. What the bot replied is just personal experience of some people, not a law of nature.

5:11 ibdknox_: AWizzArd|work: huh?

5:12 thorwil: laws of nature are just personal experiences of a whole lot of people

5:13 ibdknox_: Seems to apply... you didn't ask a question that has any useful answer

5:13 the best you'd get is "yes"

5:14 Fossi: maybe that's what he wanted to know :>

5:15 ibdknox_: perhaps :)

5:18 thorwil: /usr/lib/jvm/java-6-openjdk/jre/lib/ext/pulse-java.jar does exist

5:19 i have not the slightest clue how that monstrosity of a path "/media/sda4/app_engine/tlog-clj-gae/file:/usr/lib/jvm/java-6-openjdk/jre/lib/ext/pulse-java.jar!/../war" comes into being

5:44 so on starting the server, the following hierarchy is created in my project dir, if not already present: http://paste.pocoo.org/raw/498911/

6:39 fliebel: To those of you writing books in LaTeX: is that MacTeX really the way to go? It looks old and big.

6:41 ejackson: fliebel: i just emacs it

6:41 C-c C-c compiles w/ pdflatex, open that in Preview and it keeps up to date with the pdf. Happy Days.

6:42 fliebel: ejackson: emacs? it really is an complete os

6:42 so you do need to install pdflatex.

6:42 ejackson: i do, but you can get away without, the C-c C-c will turn it into a dvi

6:43 emacs can view that inline, but ultimately you want a pdf anyway so I don't muck about

6:44 fliebel: the thing is, pfdlatex is part of that 1gb mactext thing.

6:45 ejackson: hmm, I'm sure there are other ways to get it, can't recall offhand though

6:45 pdflatex way precedes mactex

6:49 fliebel: everything seems to point back to mactext or tex live

6:52 ejackson: ugh... just install the hairball to get Mac working binaries, but work in emacs. Whats a gig between friends ?

6:52 or at least, that's what my lazy self would do

6:57 fliebel: ejackson: Yea, I'm downloading the gb now. I wish I had fiber internet.

6:58 ejackson: Hah. raw nerve with me right now, been unable to convince my ISP to lay it down my driveway. Its on the road, but I'm too far from that road...

6:59 right now enjoying fabulous 1Mbps intertweets.

7:01 fliebel: whatcha writing ?

7:02 fliebel: ejackson: I have a friend who worked for my ISP. He said that if I;d dig a hole from Deventer to Loenen, he'd but a cable in it. :(

7:03 ejackson: I'm trying to compile thinking forth for kindle.

7:03 ejackson: nice one.

7:03 you been reading Fogus' blogs then :P

7:03 fliebel: ejackson: Yes, but I learned about Forth pre-perlis

7:04 The trouble is that I emailed the maintainer, and he was like "yea, lets make a kindle version", but then he did it with very small print.

7:05 ejackson: I guess doesn't compile to .mobi ?

7:05 fliebel: Either I don;t understand LaTeX or we don;t understand each other.

7:05 no, PDF

7:05 ejackson: crapola

7:05 fliebel: so i said I read about latex2html, bt he said it wasn;t possible.

7:05 ejackson: oh no, you don't want to do that, ugliness results

7:06 fliebel: And in his signature, it says "If you want it done right, you have to do it yourself"

7:06 ejackson: lol

7:06 once you have TeX setup it'll be trivial to increase the font size for the pdf

7:06 fliebel: oh, so what do you suggest? Just make the PDF work?

7:07 he muttered something about the text size being connected to some other things that'd break, but I'll see

7:08 ejackson: sounds like you're on the right track. Get Latex, alter the font size tag, and see what happens :)

7:08 LaTeX is one of my favourite things, its fabulous.

7:09 fliebel: I probably don't do it justice by looking at it as verbose markdown.

7:10 ejackson: true statement.

7:48 andrewclegg: is there a clojure equivalent of python's defaultdict?

7:48 i.e. a map that will instantiate a key with a default value on first read on an unknown key?

7:49 I guess that's hard to reconcile with immutable structures

7:50 ejackson: andrewclegg: only in the special case of nil :P

7:57 licenser: hmm anyone familiar with clojureQL here?

7:59 ejackson: licenser: somewhat

7:59 licenser: :) I noticed that I start running into huge problems as soon as I get past a very simple query and I wonder if it is me doing something wrong or clojureql just not being that mature yet?

8:00 ejackson: there are some niggles, but I have got some pretty huge queries working.

8:02 licenser: my main problem is 'in' and functions in general it makes a huge mess I needed to write half my query with hand which kind of takes the fun out of clojureql :(

8:03 https://gist.github.com/f8a9496b3173dffc62c2 <- that is what I run into

8:05 ejackson: hmm, I construct those as where ... or ... or ... or....

8:05 not the nicest

8:07 a la https://gist.github.com/1319377

8:08 licenser: but that isn't really nice :P

8:08 ejackson: i know

8:09 licenser: I think I stick with my in

8:10 ejackson: not really nice either :p

8:11 clgv: is there no (in ... [min max])?

8:11 licenser: no not in the clojure way but the SQL that comes out is likely a good bit more performant

8:11 clgv: in does not work with functions

8:11 clgv: I meant, that you dont have to enumerate every value but specify only the min and max value

8:12 licenser: between I think

8:12 at least in SQL not sure if there is in sql

8:12 clgv: oh you skip the 17 in your example ;) didnt see that before^^

8:13 licenser: :)

8:13 okay I feel silly (disj {:a 1} :a) does not work

8:14 dissoc ah dissoc

8:16 clgv: ;)

8:41 licenser: is there something like a seq product function? as in (* [1 2] [:a :b]) == [[1 :a] [1 :b] [2 :a] [2 :b]]?

8:42 clgv: licenser: yeah that looks like a cartesian product

8:43 ejackson: just for I guess

8:43 licenser: yap but I don't find that, there is supposed to be in contrib combinatorics but I don't find that sadly

8:43 clgv: licenser: there is an implementation of that in contrib

8:43 ejackson: ,(for [a [1 2] b [3 4]] [a b])

8:43 clojurebot: ([1 3] [1 4] [2 3] [2 4])

8:43 licenser: ejackson: nice!

8:44 clgv: licenser: there as well http://clojure.github.com/clojure-contrib/combinatorics-api.html#clojure.contrib.combinatorics/cartesian-product

8:44 btw: is there any comprehensive survey page for "the new contrib"?

8:44 licenser: clgv: so I did not manage to call that

8:49 duck1123: clojure.algo.combinatorics

8:50 s/algo/math/

8:50 clgv: duck1123: yeah thats the new standalone project of the previously mentioned^^

8:51 duck1123: clgv: right, I was just mentioning that there was a new version

8:51 clgv: good :)

9:21 snurmine: should i use javacc for parsing "sql"-queries or is there some more preferable way to do it in Clojure?

9:25 AWizzArd|work: snurmine: you could have a look at fn-parse.

9:36 babilen: Hi all ... I find myself to be using something like "(filter (comp not nil?) xs)" once in a while. It doesn't feel completely right. Are there better ways to deal with nil in sequences? is this idiomatic?

9:43 duck1123: babilen: identity should be better for you

9:43 but you want false to pass, don't you

9:44 hugod: ,(doc keep)

9:44 clojurebot: "([f coll]); Returns a lazy sequence of the non-nil results of (f item). Note, this means false return values will be included. f must be free of side-effects."

9:47 babilen: hugod: yay! That looks good

9:48 ejackson: hugod: nice one !

9:49 joegallo: does anybody here have the @ClojurePgh twitter handle?

9:49 If so, the pittsburgh clojure users group would like to get in touch with you.

9:50 dpritchett: technomancy: installing emacs24 from github solved my packaging issues unsurprisingly. thanks for the help yesterday

9:51 babilen: duck1123: Thanks for the identity trick, I'll use that. (I don't have another predicate I want to filter by)

9:52 duck1123: for being somewhat useless on it's own, identity is great as a predicate

9:54 snurmine: AWizzArd|work: thank you

9:55 hugod: snurmine: also https://github.com/cgrand/parsley

9:56 fdaoud: ,(keep identity [1 false 2 nil 42])

9:56 clojurebot: (1 false 2 42)

9:58 snurmine: hugod: thank you

10:01 dpritchett: anyone in here happily using a vim mode for emacs?

10:01 the last time i tried e.g. viper it was too slow to bother with

10:02 that might be my fault of course

10:03 AWizzArd|work: Yes, parsley is also very nice I must say, and currently maintained.

10:04 babilen: dpritchett: evil is quite OK

10:04 AWizzArd|work: The thing is that fnparse can work on arbitrarily token sequences, while parsley can work only on Strings.

10:05 dpritchett: thanks babilen

10:07 babilen: dpritchett: http://gitorious.org/evil/pages/Home (The query "evil vim emacs" is certainly not optimal)

10:21 ejackson: fliebel: :)

10:24 fliebel: ejackson: TeX worked, btw. But the guy was right, some smamples fall of the page if you make the text bigger of the page smaller.

10:24 ejackson: rats.

10:24 TeX is very arsy about where it puts figures, you really cannot tell it "put it here dammit"

10:25 usually they don't vanish though...

10:25 just get moved to where TeX things they should go

10:25 fliebel: nu, just overflow of the page

10:26 But he said he would decouple the scale of the figures and the text, and hten it'd work

10:26 But now I can at least start reading.

10:27 &(javax.quantum.Universe.)

10:27 lazybot: java.lang.ClassNotFoundException: javax.quantum.Universe

10:27 fliebel: I bet it's singelton.

10:28 ejackson: :D

10:58 bhenry: best SMTP library… go!

11:02 andrewclegg: bhenry: guess that wasn't the torrent of responses you were hoping for

11:02 bhenry: andrewclegg: haha

11:02 TimMc: I am fairly sure I saw someone using something clled "smteepee" in here yesterday. It has a funny name...

11:02 bhenry: sfteepee

11:02 but if there is an equivalent of that i'm all for it, because sfteepee is great

11:03 TimMc: aww doesn't look like it

11:04 fliebel: ejackson: I see what you mean. TeX moved all figures to the end of the chapter :(

11:04 TimMc: sfteepee, right

11:04 never mind

11:05 javax.mail.smtp.oh.god.shoot.me.now

11:05 ejackson: fliebel: yup, you can put in modifiers, like [htb], around the figures, but TeX scorns them :(

11:06 fliebel: TimMc: What are you doing with javax.mail?

11:06 ejackson: Oh, interesting...

11:07 TimMc: fliebel: Nothing! I was just suggesting that there is probably a standard (and terrible to work with) Java lib for SMTP.

11:08 fliebel: TimMc: https://github.com/manutter51/nonomail/

11:37 PPaul: can i use js libraries with clojurescript?

11:38 lucian: PPaul: yes

11:47 zackmaril: How does one force a LazySeq to eval?

11:47 mefesto: zackmaril: doall or dorun

11:48 zackmaril: doall when you want all the results, dorun for forcing side-effects but no need for results

11:48 Raynes: Or avoid getting a lazyseq in the first place, if possible.

11:49 For example, use ##(doseq [x [1 2 3]] (println x)) rather than ##(map println [1 2 3]).

11:49 lazybot: (doseq [x [1 2 3]] (println x)) ⇒ 1 2 3 nil

11:49 zackmaril: Not entirely sure where the lazyseq is getting induced actually.

11:49 lazybot: (map println [1 2 3]) ⇒ (123nil nil nil)

11:50 dnolen: zackmaril: most of the sequence fns produce lazy sequences (map, filter, interleave, concat etc.)

11:50 zackmaril: Then I am working mostly with lazy sequences then.

11:51 Can you have nested lazy sequences?

11:52 I am running doall on a variable and the result is of type LazySeq

11:55 Solved. I had some weird nesting of maps going that resulted in strangeness

12:05 andrewclegg: I'm using (:name (meta func)) to get the name of a function

12:06 but this returns null for multimethods

12:06 anyone know the right way?

12:07 Raynes: andrewclegg: You can look up the metadata on the var.

12:08 &(meta #'print-method)

12:08 lazybot: ⇒ {:ns #<Namespace clojure.core>, :name print-method, :line 3253, :file "clojure/core.clj"}

12:08 Raynes: ^ print-method is a multimethod.

12:09 andrewclegg: hmm, maybe it's the particular one I've got that's the problem

12:09 expt in clojure.contrib.math

12:09 (meta expt) returns nil

12:38 jcrossley3: is there a recommended clojure test mocking lib?

12:39 technomancy: jcrossley3: binding is popular =)

12:39 danlarkin: clojure.core/binding

12:39 technomancy: danlarkin: oooooh

12:39 o/

12:39 danlarkin: gah you beat me by a second

12:40 jcrossley3: technomancy: danlarkin: thanks. like this? http://blog.n01se.net/?p=134

12:41 technomancy: jcrossley3: that blog post references working around a feature of Clojure that has thankfully been removed.

12:41 hiredman: not true, :static still exists

12:42 technomancy: is it the same thing?

12:43 hiredman: yes

12:43 it's use is just frowned on(a lot)

12:43 technomancy: and it's not automatically applied to a bunch of useful functions

12:44 hiredman: it is, actually, a lot of core is :static

12:45 technomancy: huh; I guess it's been a while since I did any core reading

12:45 hiredman: my bad, it does look like it is commented out in the compiler

12:46 dnolen: hiredman: yeah :static doesn't do anything anymore.

12:46 hiredman: (thank god)

12:53 jcrossley3: technomancy: binding works much better than i thought mocking would. :)

12:54 hiredman: well, binding only sort of works in 1.2 and will fail in 1.3+

12:54 you want with-redefs

12:57 jcrossley3: hiredman: regardless, i like having a "built in" solution

12:59 hiredman: with-redefs in 1.3 came about as a response to someone asking rhickey about mocking now that vars aren't dynamic by default, "he said what do you mean?" they said "well we can't use binding to mock anymore" he said "are you crazy? you shouldn't be using binding for that" (all paraphrased of course)

13:02 gtrak: ha, hiredman do you have a reference for that? I always enjoy those kinds of responses from him

13:04 hiredman: it was at the conj

13:29 mefesto: in noir, what benefit does defpartial have over just a normal function that returns elements for hiccup to process?

13:30 i see that the macro wraps the body in `(html ~@body) ... just wondering if this is better?

13:35 well not "if it's better" but more the why of it

13:45 bhenry: is there a class that will catch any errors? i could use a finally, but want to capture the class of the exception in E so i can use it in the expr*

13:46 no matter what the exception is

13:47 fliebel: bhenry: reflection?

13:47 raek: bhenry: Throwable

13:47 it is the superclass of Exception and Error

13:48 bhenry: coool.

13:49 so if i replace Exception here https://gist.github.com/98aaad781edaee81ab81 with java.lang.Throwable it will catch everything?

13:49 raek: ^^

13:49 raek: bhenry: yes

13:49 bhenry: raek very nice. thank you

13:50 raek: you don't need the java.lang. prefix

13:51 bhenry: hmm. it's not emailing and it's not doing what it's supposed to. i think it's missing that catch, but i don't know why

14:28 jodaro: off topic and thoroughly entertaining: http://gizmodo.com/5853729/

14:29 fdaoud: following Rich's "Simple made Easy" talk, I'm trying to tease apart this ball of mud into nice straight unbraided strings, but I don't know where to start

14:29 https://gist.github.com/1320378

14:29 there has to be a nice way to isolate the conditions from the function calls, and chain everything together in a nice way

14:29 amalloy: fdaoud: i don't think mud is composed of strings :P

14:30 jodaro: well unless you are talking quantum physics

14:30 fdaoud: amalloy: sorry, got my analogies mixed up ;)

14:30 jodaro: but as nice as clojure is, i don't think it has quite reached that point

14:31 Squee-D: excuse my very sensational newbiness, but when i do ([1 2 3] 2) i get the last entry in the collection, because as i understand it, this particular list type also acts as a function

14:31 but (`(1 2 3) 2) is a cast error because PersistantList doesn't behave as a function

14:32 fdaoud: Squee-D: [] is a vector

14:33 Squee-D: fair enough, makes sense mathematically too. but why is a PersistantList not functionally similar?

14:34 amalloy: because lists don't have fast random access

14:34 Squee-D: that makes sense

14:35 but they are sequences right?

14:35 that is i can use the sequence functions on them

14:35 amalloy: yes

14:35 Squee-D: ta

14:35 amalloy: such as nth, if you don't mind slow random access

14:35 Squee-D: sorry, really am very new to this...

14:35 I'll worry about speed later, I'm just trying to come to terms with the syntax first.

14:36 but its useful information, thankyou :D

14:37 http://www.4clojure.com/problem/19 I was doing this practice question

14:39 and the golf thing i think makes it rather poor, it needs scoring for things like optimisation i think.

14:39 i look at other solutions and of course i see how to use the least chars, not how a veteran may approach the problem.

14:40 TimMc: amalloy: Could you set it up to say "Golf League" next to usernames when showing solutions?

14:40 amalloy: TimMc: what do you mean?

14:41 Squee-D: to identify people who are solving for 'in least char count'

14:41 TimMc: exactly

14:41 Squee-D: Still, I think a discuss page or a 'the experts say' might be helpful to newbs, especially for those 'easy' questions

14:42 amalloy: there's not really a way to identify that? for the non-trivial problems i usually don't maximize for brevity, but for the trivial ones i do. what would you put next to my name, TimMc?

14:42 Squee-D: nonetheless, it's great to have problems to solve, makes me research

14:43 TimMc: amalloy: I think it might still help.

14:43 amalloy: Squee-D: fwiw i just changed my solution to #19 to how i would write it if the last function didn't exist

14:43 TimMc: amalloy: How many of the (say) Top 50 users are not in the Golf League?

14:43 amalloy: TimMc: no idea

14:43 drewr: is clojure.contrib.duck-streams/slurp* somewhere in 1.3 contrib world yet? I'm failing at finding it

14:43 amalloy: not that easy to find out, either

14:44 TimMc: drewr: clojure.java.io I think...

14:44 technomancy: drewr: clojure.core/slurp does what slurp* used to do

14:44 hiredman: drewr: I believe slurp can do most of what slurp* could do now

14:44 amalloy: slurp is in core. what does slurp* do?

14:44 technomancy: I think they forgot to document that though

14:44 TimMc: drewr: duck-streams didn't make the transition to 1.3, so it is a bit scattered.

14:45 Squee-D: amalloy that's quite a function :D

14:45 drewr: technomancy, hiredman: ah yes, I knew I was missing something obvious

14:45 amalloy: Squee-D: eh?

14:46 Squee-D: amalloy for an easy question, it introduces heaps of new ideas to me. especially if-let.

14:46 Not complaining, just proves my point i think. the solutions page can be a bit of mix bag of good and bad.

14:47 fdaoud: perhaps my question was too vague

14:47 hiredman: Squee-D: mixed bag by what criteria?

14:47 TimMc: Squee-D: Also note that amalloy has shadowed rest with a local. Potential pitfall.

14:47 hiredman: I dunno that I would ever use code I found on 4clojure for anything in practice

14:48 amalloy: TimMc: i introduce pitfalls on purpose so that i have practice leaping over them (only half-joking here)

14:48 hiredman: so it that sense it is all bad

14:48 Raynes: amalloy: Guess everybody is at his mercy.

14:48 hiredman: (no mix)

14:48 Squee-D: hiredman yeah and it's a great learning tool if i remember to not consider the solutions as 'common' or 'good' practice

14:49 hiredman: *shrug* it's a great learning tool up to a point, beyond which you are better of writing real code that solves a real problem

14:49 off

14:49 TimMc: Squee-D: It's a good way to find out about core functions.

14:49 Squee-D: TimMc if it's not too annyoing. 1. what's shadowing and 2. whats the pitfall?

14:49 TimMc yeah

14:50 Raynes: &(let [rest identity] (rest [1 2 3]))

14:50 lazybot: ⇒ [1 2 3]

14:50 Raynes: ^ That is shadowing.

14:50 TimMc: Squee-D: "rest" is a function in clojure.core. By creating a local binding called "rest", you are making it impossible (well difficult) to use the clojure.core version in the enclosed code.

14:51 Squee-D:You are also setting up a situation where you might accidentally call the local where you intended the clojure.core version.

14:51 fdaoud: Maybe this could be a starting point. How would you chain together several function calls such that the result is the first function that returns a non-nil result?

14:51 TimMc: fdaoud: some

14:51 Squee-D: hiredman yep well my first real code project is to replace a reactive system written with ruby eventMachine, pub/subbing with amqp, storing in redis/memcache or similar, and ocassionally talking to psql... I'm still quite a ways from using that as a practical project.

14:51 Raynes: But if you know you aren't going to do that, then I wouldn't worry about it. Just keep it in mind if you ever have a chance of calling it. If I didn't shadow in my code, I'd kill myself trying to name locals.

14:52 Squee-D: Only been at clojure for one day :D

14:52 amalloy: fdaoud: chain them? that implies passing the result of one to the next, but if they're returning nil there's nothing to chain

14:52 TimMc: fdaoud: Oh wait, you want the function...

14:52 Squee-D: Timc now i get shadowing. thanks.

14:53 TimMc: Squee-D: Like Raynes said, it's fine to do, just be mindful.

14:53 hiredman: Squee-D: and you think rewriting functions in clojure core in the least amount of characters is going to get your to that place?

14:53 Squee-D: hiredman no. that was actually my point.

14:53 hiredman: (seems unlikely)

14:53 fdaoud: TimMc: I think you're right. something like (some identity [(f1 x) (f2 y) ...])

14:54 amalloy: fdaoud: no, then you're calling them all regardless, which it sounds like you don't want to

14:54 hiredman: so what is the problem with the ruby evenmachine version that you are going to solve with clojure?

14:54 fdaoud: amalloy: perhaps chain isn't the correct term. each function is independent, but in a certain order and when one returns nil, go on to the next

14:54 Squee-D: I was saying the golf league attitude causes a lot of those solutions to be terse to the exclusion of good practice. but i think we've covered the topic now :D

14:54 amalloy: (some #(%) [#(f1 x) #(f2 y) ...])

14:54 Squee-D: i agree, and i wish it weren't that way. but characters are easy to measure, so we measure them :P

14:55 fdaoud: amalloy: that will make it lazy?

14:55 TimMc: fdaoud: But you want f2, not the result of (f2 y)...

14:55 fdaoud: TimMc: actually I do want (f2 y)

14:55 antares_: Squee-D: just curious, are you replacing an amqp/Ruby system with amqp/Clojure? I maintain AMQP clients for both :)

14:55 TimMc: Oh! OK.

14:55 amalloy: fdaoud: you'll probably be happier if you read the code and understand it rather than having me answer whether it's lazy

14:56 Squee-D: hiredman I am taking clojure into consideration for 2 reasons. 1. i can live debug. 2. Our current code is cumbersome and innellegant. it needs a heavy refactor (the previous team did not have the same standards around elegance that this team does)

14:56 fdaoud: amalloy: you are absolutely right

14:56 Squee-D: antares_ considering it.

14:56 fdaoud: amalloy, TimMc, thanks

14:56 hiredman: amalloy: maybe some kind of distance from a the clojure.core implementation, or some kind of mean

14:57 antares_: Squee-D: ok. Then maybe take a look at https://github.com/michaelklishin/langohr if you decide to go with Clojure.

14:57 fdaoud: amalloy: so really you are telling _me_ not to be so lazy. :D

14:57 amalloy: hah. indeed

14:58 Squee-D: antares_ a previous dev wrote https://github.com/visfleet/pipeline_toolkit which seemed nice on paper, at the time. but it's a nightmare to orchestrate

14:58 fdaoud: I definitely need to sit down and figure this stuff out. I think I got overwhelmed from listening to both Rich's and Jim's talks back-to-back.

14:58 Squee-D: antares_ rather than patch it up with dsl's for orchestration, i figure at the very least we should just have full ruby process per 'pipeline' rather than this chaing of piped processes

14:59 fdaoud that's pretty much the command pattern in fp?

14:59 antares_: Squee-D: with Clojure the chaining part will be significantly easier. I kind of do chaining with just functions and threads, much more manageable than processes.

15:00 Squee-D: antares_ i also expect a boon from being able to attach the repl to the process.

15:00 because debugging evented code in ruby is pretty difficult.

15:01 I prefer not to have to debug, but the system has a lot of open ends that could be abused, and are routinely abused.

15:01 antares_: Squee-D: absolutely, that was another change I personally am very happy about. And tools like VisualVM will help, too.

15:01 amalloy: haha sounds kinda like 4clojure, Squee-D

15:02 Squee-D: it's quite strange to be able to talk like a modern architect at one level with you fellows, and like a complete gumby when it comes to anything clojure related.

15:03 I love the days you feel both reasonably intelligent and drooling-special-needs in the same breath.

15:03 I dont get enough of them

15:03 mdeboard: Trade bodies with me, that's my every day

15:04 Squee-D: I spend considerably more time mentoring than being mentored. It's not a good balance.

15:05 antares_ so whats the several layers of DSLs that langhor is avoiding?

15:05 fdaoud: Squee-D: to me the command pattern in fp is just a function

15:06 timvisher: could anyone tell me how to add a file to the classpath in leiningen?

15:06 amalloy: timvisher: usually the answer is "don't do that"

15:06 timvisher: i'm trying to add log4j.properties

15:06 antares_: Squee-D: it is just a small layer of Clojure on top of the Java client. I am also incorporating good things from amqp gem into it over time. The goal is to make error handling & recovery great (Java client does not really offer much by default, like many other clients) and provide ways to implement common patterns by *just* function composition.

15:06 timvisher: i like asking these sorts of questions lately, it would seem. :)

15:06 raek: timvisher: put it in resources/

15:06 amalloy: i keep my .properties files in ./resources

15:07 Squee-D: fdaoud wait isn't anything not a type 'just a function' :P

15:07 antares_: Squee-D: so my code that uses Langohr pretty much has no macros or DSLs in them. But heavily uses clojure.core/comp and a couple of other small libraries of mine that compose functions.

15:07 Squee-D: antares_ when did you first start with fp?

15:08 antares_: Squee-D: 1.5-2 years ago, with Scala. I have been using functional-ish idioms in Ruby and Java since 2006 or so.

15:08 raek: timvisher: that directory is not created by default, but leiningen will include it if it exists (you may need to restart the process after creating the dir, though)

15:08 antares_: Squee-D: it is much easier to pick up than you think. Much easier than get really good at DSLs, for example.

15:08 timvisher: raek, amalloy: working on that. :)

15:09 Squee-D: antares_ im pretty tight with ruby meta

15:09 antares_: Squee-D: and certainly the cost of experimenting is lower compared to DSLs

15:09 Squee-D: antares_ i'm sure i'll change my tune, but i guess what scares me is i feel like im reaching the top of my imperitive game

15:10 timvisher: hmm, I'm just seemingly incapable of setting up tools.logging...

15:10 Squee-D: antares_ so fp feels like a very steep climb at the moment

15:11 So is there such a thing as 'Clean Code' for functional programmers?

15:11 antares_: Squee-D: I know what you mean. I also know a few people who kind of grew out of Ruby/DSLs and found Clojure very worth using because they have a ton of additional options to choose from (in addition to DSLs) without going through all the Scala/ML type system jazz even when it does not help much.

15:11 Squee-D: Scala,i think, has an even worse leaning curve, its TIMTOWTDI on steroids whenever i look at it.

15:12 antares_: Squee-D: I think learning about Haskell is the best way to absorb FP ideas. And I have no plans to use Haskell at work, just learning many things from it. Apparently it influenced Clojure more than people think.

15:12 Squee-D: I did start with haskell, but ditched it for Clojure as soon as i saw the jvm .

15:13 amalloy: is there something wrong with there being more than one way to do it? clojure heavily encourages functional programming and sequences, but often there are a number of ways to express the same idea

15:13 antares_: Squee-D: haskell has many ideas about function composition that you can use from Clojure. But in haskell they are very much at the core so you absolutely cannot not notice them.

15:13 Squee-D: amalloy it can get burdensome. conventions, obvious patterns and recognizable patterns assist the programmer

15:14 dnolen: antares_: Squee-D: I think Standard ML is a better place to start IMO. In Haskell you have to deal w/ ubiquitous laziness and monads.

15:14 Squee-D: dsl's are nice in that it's code for programmers. if you approach DSL writing with a strong ethos of high-usability, you can make daily tasks much less arduous

15:14 antares_: amalloy: I think Scala has a bit of a bad reputation in this regard, often undeserved.

15:14 dnolen: agreed. OCaml or F# are "smaller" yet many ideas are basically the same.

15:15 amalloy: eg, a little toy in that neighborhood: you can write (foo (bar (baz sam))), (-> sam baz bar foo), or even something like (foo (-> (baz sam) bar)) depending on what you want to emphasize - they're semantically identical

15:16 Squee-D: the same is true of a lot of languages. like python. But the 80/20 rule is to find a readily readable pattern for a desired outcome. composing functions and dsls are both means to that end.

15:16 the example you give i can read fairly easily, as a novice.

15:17 and omg in ruby you can do things in a lot of different ways. What I found with Scala tho, is a lot of projects that were not showing any care for the next guy to read the code.

15:18 antares_ and i could be giving Scala undeserving flack here.

15:18 it just felt that way whenever i tried to accomplish something.

15:18 antares_: Squee-D: to get a feeling of how function composition can make your code drastically simpler and shorter, take a look at https://github.com/michaelklishin/validateur. It is by no means finished but it is like 6-7 times shorter than the original Ruby version. And Ruby is considered a concise language.

15:19 Squee-D: and also you can add any kind of validator you want, each validator is just a function. So they are trivial to test, compose and reuse.

15:19 fdaoud: antares_: what's with the French in naming Clojure projects? (not that there's anything wrong with that)

15:19 Validateur, Noir, Moustache, et quoi encore?

15:20 antares_: fdaoud: I am out English names for just about anything. Langohr is German and I have a bunch of libraries named after Italian drinks (like Limoncello) ;)

15:20 bhenry: moustache was written by a french guy right?

15:20 chouser: I think cgrande is German

15:20 Squee-D: oh i cant wait for chinnoto

15:20 fdaoud: I'd guess Christophe Grand is Fernch

15:20 *French

15:21 J'en suis presque certain.

15:21 redinger: Yeah, I thought he was French, too

15:21 bhenry: cgrand.net is in french

15:21 Squee-D: antares_ yeah so im still so un-lispy that i'd rather read ActiveRecord::Validations right now :D

15:23 fdaoud: he's not impressed with GWT; "the Maven presentation was well done despite the PC spontaneously rebooting" hehe

15:23 jcromartie, the man

15:23 jcromartie: hey

15:24 you flatter

15:24 chouser: I don't think cgrande.net has anything to do with our cgrande

15:24 bhenry: our cgrande got cgrand.net

15:24 chouser: our cgrande is actually cgrand :-)

15:24 bhenry: haha

15:25 chouser: oh, I see. cgrand.net is also french. Hm.

15:25 redinger: He's definitely flying to the Conj from France. :)

15:26 chouser: See, I originally assumed he was Franch, but thought I was disabused of that notion at the previous Conj. Hm.

15:26 fdaoud: yeah it's Grand not Grande

15:26 Raynes: chouser: Isn't cgrande.net spanish?

15:26 fdaoud: Grand means Tall

15:26 Raynes: I'm not much for languages.

15:26 Spoken languages, anyway.

15:26 fdaoud: Grande means Tall woman

15:26 TimMc: antares_: I'm going to start naming things after the scientific names of plants and animals

15:26 redinger: Raynes: Now that's funny

15:26 antares_: Raynes: looks like Catalan to me

15:26 bhenry: cgrande.net is catalan according to google

15:27 TimMc: Why not cgrande.cat, then? :-)

15:27 Squee-D: Reading validateurs code, I find myself looking for classifications and local state for anchor points. It feels like snow crash.

15:28 raek: I find it amusing that the two of the most famous french clojurians are called "Grand" and "Petit"

15:28 Squee-D: Anyone remember having a "a-ha i'm no longer decoding the code, i'm reading it" moment? I want that

15:28 antares_: raek: hahaha

15:29 Squee-D: you will be there in a couple of weeks. Clojure Programming from O'Reilly is the best place to start, I think. The Joy of Clojure is your ultimate destination ;)

15:29 Squee-D: okeedokes

15:30 thanks for your time guys

15:31 I go do some 9-5 stuff now :D

15:31 Raynes: redinger: I'm all about funny. I plan to tape a whoopie cushion to my back so that I can even be funny when I faint before giving my talk at the conj.

15:32 fdaoud: antares_: I don't do rough cuts so impatiently waiting for its release, still a month or two to go..

15:32 redinger: Raynes: Sounds like a riot. Hopefully the other Geni guys are brining smelling salts

15:32 Raynes: Hopefully.

15:32 I'll just call amalloy up to hold my hand if I get scared. <3

15:33 redinger: he should prepare some kind of magic show act to entertain the crowd

15:35 amalloy: i'll reimplement some of the clojure.core functions in as few characters as possible

15:35 the crowd goes wild

15:54 gtrak: is it possible to steal the counter-clockwise repl and use it as a external tool on normal java projects, with auto-complete and such?

15:55 I managed to do it manually with just the clojure jar, but the repl is very lacking

15:58 amalloy: gtrak: cake repl has autocomplete

15:58 otherwise, rlwrap probably does most of what you need

15:59 gtrak: yea, i'm working in eclipse, it's console is full of suck

15:59 i'll check out rlwrap

16:00 it sucks working in java-land

16:16 Squee-D: antares_ you sure you meant the oreilly book? Its yet to be published. There's a prag bookshelf one

16:18 fdaoud: Squee-D maybe he got the rough cut

16:18 the prag one has a second edition coming up btw

16:18 Squee-D: perhaps. just wanted to be certain of what he was recommending

16:18 fdaoud: also clojure in action is coming out in about a month

16:19 Squee-D: yeah i might just dive in with the other manning one

16:19 Joy

16:19 fdaoud: I'm about halfway through Joy, it's excellent

16:25 moomin: Hi, I'm hoping someone can help me with another variable resolution problem.

16:25 This may be seriously leiningen specific.

16:25 chouser: I personally recommend Joy. You can probably guess why. ;-)

16:25 moomin: I've got a variable called handel.config/port-override

16:26 I've got a hook that attaches to ring

16:26 (a prepend)

16:26 This then changes the value of the variable.

16:27 If I check the value within the hooks file, it's changed.

16:27 But when it actually runs, it's unchanged.

16:29 Could anyone explain to me what I'm doing wrong here?

16:31 bloop: This is probably the most common question here, so I'll ask carefully: What's the best link on list vs vector? :)

16:33 moomin: Don't know of one, I'm afraid. Biggest observations are that vectors have fast nth access and conj puts values at the end.

16:33 Squee-D: chouser: i hope you got at least 50cents from my purchase

16:34 Publishers are notoriously cheap

16:34 fdaoud: chouser: you and fogus did a fantastic job

16:35 (cue chouser to say "it was all me, fogus just piggybacked") ;)

16:35 Squee-D: actually it's 25cents because he has to split it with Fogus

16:36 Squee-D: nah i hear fogus get's $1.10

16:36 but dont tell chouser

16:38 moomin: More generally, is there a way to detect whether or not your code is running within leiningen?

16:41 antares_: Squee-D: I sure meant the O'Reilly book. The pragprog one is outdated and has low signal/noise ration in my opinion. It was the 1st book on Clojure so it caters to absolute noobs heavily.

16:41 *ratio

16:42 Squee-D: The O'Reilly one is due in december

16:43 redinger: antares_: The prag one has a rewritten second version in beta right now

16:43 mefesto: moomin: this may not be the best way but when run in leiningen the env var LEIN_VERSION is set

16:44 fdaoud: there's one more book in the works I believe

16:45 antares_: redinger: I know. I feel that it won't change its target audience, though. I may buy it either way :)

16:45 fdaoud: no starch press?

16:45 antares_: Squee-D: I have O'Reilly Safari subscription so I read the rough cut version :)

16:45 amalloy: fdaoud: Raynes's book?

16:45 redinger: fdaoud: There's Raynes book and Amit's book

16:45 Squee-D: Oh i havent had a safari sub in a long while, it was a money sync, i kept ordering books and not having time to read them

16:45 fdaoud: Amit's is Manning's Clojure in Action, so yeah amalloy I think you're right. That one is meant for beginners, yes?

16:46 Squee-D: sink*

16:46 dpritchett: Do I need to do anything to emacs24 to get really detailed colors with clojure-mode?

16:46 antares_: Squee-D: there is also Practical Clojure from apress that I like. Clojure in Action, I did not finish reading.

16:46 dpritchett: i seem to remember there being more variety the last time i used this

16:46 Squee-D: going to see how i get along with Joy, although it's aimed hi

16:46 fdaoud: http://meetclj.raynes.me/

16:46 Raynes: I really need to rewrite that text.

16:47 Just a big ol' block of long-windedness.

16:47 dpritchett: mine looksl ike this http://i.imgur.com/63jzy.png and its not too exciting

16:47 fdaoud: Raynes! How's your book coming along?

16:47 Raynes: Smoothly.

16:47 Still far, far from being done.

16:47 Squee-D: oh i want.

16:50 Learn you haskell made me feel ok to feel dumb

16:51 amalloy: dpritchett: you want to customize your faces

16:51 bhenry: dpritchett: http://i.imgur.com/7W7MF.png

16:51 dpritchett: yeah bhenry that's more like what i had in mind

16:51 * dpritchett googles emacs faces

16:51 amalloy: though i don't care for rainbow parens, personally

16:52 dpritchett: i don't really need rainbows either, but the string literal is the same color as defn and all the other stuff

16:52 bhenry: amalloy: they don't matter if you have paren-highlighting on, but i imagine you want at least one of those things.

16:52 dpritchett: i have paredit on too fwiw

16:52 amalloy: bhenry: nope, no thanks

16:53 having it highlight the matching paren when i close one is enough for me

16:53 with paredit, at least

16:53 bhenry: amalloy: what are you a robot?

16:53 amalloy: bhenry: http://i.imgur.com/d63Op.png is mine, but perhaps a bit too high-contrast for some

16:53 dpritchett: in other news, newlines are for sissies

16:53 Squee-D: That i can read

16:54 dpritchett: that looks nice amalloy!

16:54 brehaut: amalloy: your terminal is a window into 1992!

16:54 Squee-D: i code for sissies, like me

16:54 amalloy: dpritchett: i started with color-theme and installed tty-dark, then customized the colors for several of the faces

16:55 Squee-D: whats the font, looks like anonymous

16:55 dpritchett: i'll need to mess with the faces i guess, amalloy

16:55 amalloy: it's uh, whatever is default on linux

16:55 dpritchett: i just typed in your abort-transaction function

16:55 and my exception didn't get a special color like yours does

16:55 amalloy: DejaVu Sans Mono apparently?

16:55 hiredman: Mensch!!!

16:55 Squee-D: yeah that sounds like a default

16:56 hiredman: (we are talking about fonts right?)

16:56 brehaut: incidentally, the ubuntu mono is quite nice. maybe not quite as good as inconsolata, but it has bold and oblique faces

16:56 Squee-D: hiredman oooh not bad

16:57 amalloy: dpritchett: clojure-mode sets faces for a bunch of different semantic things (eg, classes), but the default colors for many of those are the same

16:57 Raynes: I <3 DejaVu

16:57 dpritchett: where would i go to recolor the faces?

16:57 amalloy: dpritchett: M-x customize-face

16:57 hiredman: http://robey.lag.net/2010/06/21/mensch-font.html <-- look at those huge angle brackets

16:58 dpritchett: thats cool hiredman

16:58 fdaoud: Raynes: don't change your book cover :)

16:58 amalloy: dpritchett: if point is on a form, customize-face defaults to customizing whatever is in control of that form

16:58 dpritchett: sweet, you read my mind

16:58 amalloy: for java interop, it's apparently font-lock-preprocessor-face

16:58 fdaoud: I'd love to write a book focused on clojure web development

16:59 Raynes: My book will have a chapter on web development with noir.

16:59 brehaut: hiredman: mensch is good. thanks for the pointer

16:59 fdaoud: great to hear Raynes

17:00 I'm hoping there's some good web stuff in cemerick's book too

17:01 brehaut: fdaoud: i understand that there might be some good SQL stuff from brian carper, which is tangentially web stuff

17:02 fdaoud: brehaut: that might be interesting

17:02 brehaut: fdaoud: otherwise, what sort of web stuff do you want? theres a wide range of good material available for free

17:04 aperiodic: taking the discussion back 8 minutes, I have never wanted for another monospace font since discovering inconsolitas

17:05 fdaoud: brehaut: what do you use for serious clojure web development?

17:06 brehaut: fdaoud: i use the ring ecosystem. particularly moustache and enlive (although there are times when i think hiccup might be more appropriate)

17:06 fdaoud: i pick and choose other libs as needed

17:08 fdaoud: brehaut: cool. so typically it's ring, then either compojure or moustache, and finally enlive or hiccup, yes?

17:08 brehaut: fdaoud: yes. if you want some more handholding, webnoir collects things together and is a little more prescriptive, but its just a layer on top

17:10 fdaoud: webnoir also has a strong set of docs and tutorials on its project's website

17:10 fdaoud: brehaut: thanks.. the tools have evolved since I last wrote a webapp with clojure, back then it was pretty much just ring and compojure, and I used Velocity for templating

17:10 TimMc: aperiodic: Inconsolata

17:11 (to be precise)

17:11 dpritchett: i just use consolas

17:11 TimMc: dpritchett: THat's the MS one, right?

17:11 dpritchett: it's not *perfect* but it's good enough to not bother looking further afield

17:11 i think so TimMc

17:11 i guess i'm using a different one at home on my mac

17:11 brehaut: dpritchett: does consolas have true bold and oblique faces?

17:12 dpritchett: i am not enough of a typesetter to be able to answer that brehaut

17:12 maybe i use menlo on my mac, not sure. it's running snow leopard and i poked around til i found one

17:12 maybe inconsolatas

17:12 fdaoud: brehaut: on linux anyway, the answer is yes

17:12 dpritchett: inconsolata i mean

17:15 aperiodic: TimMc: ah, thanks. I've never heard it out loud so it's hard to remember how it's pronounced, thus spelled.

17:15 TimMc: It's pretty nice.

17:16 aperiodic: I really like it

17:17 I am using the variant with straight quotes and apostrophes, though

17:17 fdaoud: I keep going back and forth between consolas and monaco

17:18 sometimes droid sans mono

17:21 technomancy: no terminus fans?

17:22 fdaoud: used to be, but it doesn't work well on large monitors

17:23 technomancy: large monitors or high DPI?

17:23 fdaoud: both I guess

17:23 2x27" 1980x1080

17:24 hiredman: hah!

17:25 2560x1440 is nicer, I mean

17:25 fdaoud: my favorite in the terminus days was vt100

17:25 technomancy: I don't think it has much to do with the display size, just the density.

17:26 fdaoud: I'm sure you're right

17:27 hiredman: how much do those go for?

17:28 hiredman: it was $800 or $900

17:28 fdaoud: ok.. over my budget, I paid $500 for the pair!

17:29 dual monitors are a must

17:34 * hiredman has 3 extra monitors plugged into his laptop

17:36 fdaoud: $2500 on monitors?

17:36 what exactly are you hired for? ;)

17:37 srid: idiomatic way to call a function N times and accumulate the results in a collection?

17:37 this doesn't work - (map #(rand-nth choices) (range 100))

17:37 amalloy: repeatedly

17:38 brehaut: fdaoud: http://fishbowl.pastiche.org/archives/pictures/matrix-architect.jpg

17:38 amalloy: fdaoud: software. if you hire someone for (say) $100k a year, and can increase their productivity by 25% at a cost of $2500, that's a thousand percent return on investment

17:38 srid: ,(repeatedly 10 #(rand-int [1 2 3]))

17:38 clojurebot: #<ExecutionException java.util.concurrent.ExecutionException: java.lang.ClassCastException: clojure.lang.PersistentVector cannot be cast to java.lang.Number>

17:39 amalloy: it's silly to skimp on those things

17:39 hiredman: oh, I paid for the monitors my self, they are not matching

17:39 technomancy: I'd buy a number close to 25% for the second monitor. the third and fourth... meh.

17:39 srid: ,(take 10 (repeatedly #(rand-int [1 2 3])))

17:39 clojurebot: #<ExecutionException java.util.concurrent.ExecutionException: java.lang.ClassCastException: clojure.lang.PersistentVector cannot be cast to java.lang.Number>

17:39 fdaoud: amalloy: I'm not talking about skimping on # of monitors, but for $250/monitor is decent, no? is it necessary to get a $900 monitor?

17:39 TimMc: ,(doc rand-int)

17:39 amalloy: technomancy: fortunately i have a 900% margin for error in my calculations :P

17:39 clojurebot: "([n]); Returns a random integer between 0 (inclusive) and n (exclusive)."

17:40 hiredman: my 17" and 23" predate my current gig

17:40 technomancy: even with a second monitor it depends on what you're doing

17:40 srid: ,(repeatedly 10 #(rand-nth [1 2 3]))

17:40 TimMc: ,(take 10 (repeatedly #(rand-int 3)))

17:40 clojurebot: (2 1 2 3 3 ...)

17:40 hiredman: I work from home so it falls under home improvement

17:40 clojurebot: (2 2 2 0 2 ...)

17:40 technomancy: I don't miss external monitors nearly so much when I'm not doing web work

17:40 TimMc: clojurebot: Out Of Order!

17:40 clojurebot: Praetor: The ordering is usually such that (partial ...) is useful. :-)

17:41 amalloy: i just use one monitor because i'm not very good at utilizing the second

17:41 chewbranca: fdaoud: depends on how big of monitors you want, 30" monitors are just now getting into the $900-$1100 range

17:42 TimMc: amalloy: I have a standing workstation and a 1920x1200 monitor. Where would I *put* another one?

17:42 amalloy: TimMc: arrange them in a V shape

17:42 chewbranca: personally I can't stand even numbers of monitors, because then they aren't symmetrical, as your center of vision would be at the border where the two monitors connect

17:42 TimMc: I guess I could put them in portrait mode.

17:42 fdaoud: chewbranca: ok. I have 2 computers, one with 2x21" and one with 2x27". Personally I find the 27" too big. The 21" have the same resolution so are nicer IMO.

17:43 all were in the $250 range

17:43 chewbranca: fdaoud: ahhh nice

17:43 llasram`: chewbranca: Oh god. Thanks a lot. It's never bothered me before, but now I can't unsee it!

17:43 chewbranca: fdaoud: oh I agree, I picked up 3 24" monitors from costco (btw best place to get monitors) for $199 each

17:44 technomancy: my external monitor is too heavy to go in portrait orientation

17:44 hiredman: http://www.biscade.com/office/ (not me, I live in envy)

17:44 technomancy: oh, uh... #firstworldproblems

17:44 chewbranca: llasram`: hahaha yeah that's why odd numbers of monitors are key

17:44 jweiss: clojure.data/diff is nice, but i'd like to be able to reverse it to get the path i gave to update-in to make the change in the first place. i am sure it is possible, but having trouble figuring it out

17:44 chewbranca: only problem with multi monitors now is that they're all widescreen, so you end up with extra triple wide wide screen

17:44 dnolen: any opinions about the following for high-performance property access? http://dev.clojure.org/jira/browse/MATCH-4

17:45 fdaoud: chewbranca: you're right, I'd prefer 3 "not wide" monitors

17:45 chewbranca: I'm currently sitting on 5940x1080 res, which don't get me wrong, I love the horizontal screen space, but it lacks on vertical space for code

17:45 dnolen: for core.match

17:45 chewbranca: fdaoud: yeah tough to find these days

17:46 fdaoud: gotta go, later all

17:46 aperiodic: chewbranca: mount your monitors sideways?

17:46 chewbranca: fdaoud: I managed to find a cheap 19" dell 4:3 monitor on craigslist for my standing desk, but I think everything has gone widescreen now

17:46 fdaoud: later

17:46 fdaoud: chewbranca: yes that's the mainstream I guess

17:46 ciao

17:47 cemerick: dnolen: .-bar hurts, but this is bikeshed territory

17:47 chewbranca: aperiodic: the thought as crossed my mind, but, if you watch any movies or tv shows on your computer, then vertical monitors are rough

17:47 aperiodic: I'm trying to find a balance

17:47 technomancy: also many monitors don't have good vertical viewing angles

17:47 chewbranca: or better yet: http://www.amd.com/us/products/desktop/graphics/ati-radeon-hd-5000/hd-5870-eyefinity-6-edition/pages/overview.aspx

17:47 technomancy: so you get a slightly different color in your left eye vs your right eye, which will drive you nuts

17:48 chewbranca: :D

17:48 would be hilarious to have emacs full screen across 6 monitors

17:48 technomancy: oh interesting, I'll have to keep that in mind

17:48 moogatronic: Noob question: I have emacs 24/Swank/Slime working. Do most people remap their evaluate last expression key stroke? My pinky is already getting tired. =)

17:48 chewbranca: technomancy: is that common for vertical monitors?

17:48 technomancy: chewbranca: yeah, be sure to test it by turning your head sideways before you invest in anything =)

17:49 moogatronic: most people make caps lock their ctl

17:49 chewbranca: technomancy: will do

17:49 aperiodic: oh, good point

17:49 chewbranca: moogatronic: I have caps lock and ctrl set to 'ctrl' so I can use whichever is more comfortable

17:50 moogatronic: technomancy: I do have my keyboard mapped that way, but if I'm treating my buffer like a repl, i'm hitting that keystroke all the time. Maybe my question should be is there a repl in emacs that you can just type sexps and hit enter to have them evaluated?

17:50 technomancy: moogatronic: sure, are you currently using slime without slime-repl?

17:50 aperiodic: the only time i've used vertical monitors was with crappy dell ones, and i chalked it up to their build quality rather than orientation

17:50 amalloy: moogatronic: isn't that M-p anyway? meta isn't usually a pinky key for me

17:51 moogatronic: technomancy: That's a good question - I don't know the answer. =)

17:51 amalloy: oh, you mean C-x C-e. i see

17:51 moogatronic: amalloy: yeah

17:52 * amalloy has http://www.kinesis-ergo.com/fs-savant-elite.htm for when his pinky gets tired

17:52 moogatronic: whoa

17:52 nice.

17:52 =)

17:52 I thought about getting their completely separated keyboard

17:52 but dollars won out and I ended up with a MSFT natural 4k.

17:53 amalloy: anyway, yes, you probably want to use the slime repl

17:53 chewbranca: ahhhh yeah I can tell right nowby looking at my monitors sideways, looking at them horizontally, I have a wide angle of viewing where I can move left or right and still see it cleary, but vertically I can see a noticable difference with how centrally I need to be looking

17:53 amalloy: nice, how useful have you found that?

17:53 moogatronic: technomancy: is slime-repl something I need to install separately from slime et al ?

17:53 technomancy: moogatronic: if you are installing manually, yeah

17:54 if you use M-x clojure-jack-in you get it all for free

17:54 moogatronic: I can work the google.. now that I know what i'm looking for. =)

17:54 I like the sound of free.

17:54 technomancy: moogatronic: the swank-clojure readme should get you what you need

17:54 clojurebot: swank?

17:54 clojurebot: swank is try the readme. seriously.

17:54 amalloy: chewbranca: eh. i've had them for a month or two now. i don't think it will ever be as *fast* as using the modifier keys, but it's nice to give my fingers a break when i'm just editing or reading, rather than typing

17:54 technomancy: there ya go; clojurebot wouldn't lie to you.

17:54 chewbranca: amalloy: I've been toying around with the idea of picking up the kinesis advantage pro, I'm concerned with the keyboard being too small though as I'm pretty big, but I saw they have a 60 day return policy so I might have to check it out

17:55 amalloy: chewbranca: people who use the kinesis swear by it. personally i don't get it

17:55 chewbranca: amalloy: yeah don't always need speed

17:55 moogatronic: didn't know about the 60 day return policy. a few guys in my lab have the kenesis freestyles

17:55 chewbranca: amalloy: I've typed on it for maybe 30s, it feels potentially very comfortable

17:56 amalloy: I use an ergo keyboard and a trackball and still have issues, so looking to go more ergonomic than the microsoft natural keyboard

17:56 technomancy: chewbranca: I have the kinesis solo if you want to try it

17:56 moogatronic: I converted from the apple tiny kbd to this msft monstrosity. wrists are happy, but it takes so much space on my desk.

17:56 technomancy: you don't get the cupped shape, but you get to hold your arms straight out, which I think is of equal importance

17:56 amalloy: moogatronic: under-desk keyboard tray

17:56 chewbranca: technomancy: nice, yeah that would be cool, been struggling with the keyboard lately

17:56 technomancy: take a hacksaw to the numpad. show it who's boss

17:57 moogatronic: amalloy: I'm not allowed to attach stuff to the desk i've been assigned. lol

17:57 * hiredman uses his laptop keyboard

17:57 amalloy: i have vision problems, so i keep my keyboard entirely under the desk. means it costs me no desk space, and i can get the monitor right on the edge of the desk

17:57 moogatronic: but at home, my desk is glass… i'm pretty tall, most keyboard trays annoy me due to my knees ramming into them all the time. wrist comfort wins over appearance though.

17:57 aperiodic: i just got a Das Keyboard about a month ago, which i've been loving

17:58 moogatronic: chew: do you swap right and left hand mousing?

17:58 that helps me a bit.

17:58 mtm: maybe not ergonomic but I love the feel of the keys: http://matias.ca/tactilepro3/index.php

17:59 chewbranca: hiredman: I can use laptop keyboards for decent stretches, but I have to be more concious about sitting properly and keep my hands in correct posture

17:59 moogatronic: ahhh interesting, no I haven't tried that, good idea

17:59 moogatronic: I was drooling over this for a while: http://www.getsmartfish.com/Reflex-Keyboard-w-Anti-Fatigue-Comfort-Motion_p_8.html

17:59 chewbranca: moogatronic: I just ordered a bigger trackball mouse yesterday that is symmetric, so I'll have to give that a shot

17:59 moogatronic: it's windows only. no mac release yet.

17:59 has magic drivers or something for the key mappings, or some such nonsense.

17:59 chewbranca: mtm: I would love a tactile ergo keyboard

17:59 moogatronic: but the keyboard moves and adapts to the amount of time you've been typing.

18:00 chewbranca: moogatronic: oh crazy, wonder how noticable the movement is

18:01 moogatronic: the video was full of convincing propaganda about how it will make every aspect of your life more fulfilling, etc. =)

18:01 chewbranca: lol

18:02 moogatronic: if I don't have M-x clojure-jack-in, that probably means something on my system is out of date I'm assuming. =)

18:03 amalloy: moogatronic: it'd mean you're using a clojure mode from like 1995

18:03 moogatronic: time travel shit! i knew my computer was special.

18:04 dpritchett: i spent half the day yesterday trying to get m-x clojure-jack-in moogatronic

18:04 i wound up nuking emacs23, building emacs24 from source, and then install clojure-mode to get it

18:04 these are only the steps that worked, i'm leaving out all the hours of aborted attempts

18:04 moogatronic: … I'm really trying to learn clojure and overtone, but i don't want to eat up half a day screwing up my configuration in the process

18:05 i suppose its what is needed.

18:05 dpritchett: i didnt have anything in my emacs configs to begin with so i aws happy to start over

18:05 are you on v24 at least?

18:05 moogatronic: god knows i've spent multiple days getting my org-mode babel R and xelatex exporting all working

18:05 yeah, i'm on 24, but i'm running an old emacs starter kit

18:05 Raynes: cp -r ~/.emacs.d ~/.emacs.d.backup

18:06 moogatronic: emacs configuration is still in the voodoo-state with respect to my conceptual model, and everything i have working now is essential to completing required work.. =)

18:06 Raynes: good call.

18:09 unrelated: anyone aware of the taxi cost for late night rides in Raleigh, NC? (due to late booking, etc, I missed all the good/deal/prices for the conj venue hotel)

18:09 also, can you safely navigate the streets of downtown after midnight on foot?

18:18 hiredman: not if there are conj goers about

18:20 Raynes: moogatronic: Well, I certainly didn't get raped last time I did that.

18:20 Though I wasn't exactly in a secluded dark alley.

18:22 moogatronic: You can usually tell by the frequency of cop cars per normal car in a neighborhood as to whether or not you should be walking on that street. =)

18:23 hiredman: my only concern is that my hotel is around 1.5 miles from the conference hotel. not a big deal, i'm a decently big guy, but avoiding the tempting of random criminals is always good.

18:23 (speaking from experience -- have been attacked on the street before)

18:23 jiu jitsu comes in handy..

18:23 hiredman: which hotel?

18:23 moogatronic: eh, I took the price line gamble, i'll look

18:24 Holiday Inn Raleigh-Brownstone Downtown

18:24 hiredman: actually if the conj is in the same hotel as last year (I think it is, not sure) the area around it is very empty/office park

18:24 iris1: Dear experts, I have run into what I assume is a minor problem, but I am having trouble figuring it out. I would like to start a SWANK server from leiningen, but when I type "lein swank", it tells me "That's not a task". In order to install SWANK, I have previously typed "lein plugin install swank-clojure 1.3.3" and "lein deps", which seemed to not fail. (Ultimately I am trying to get SLIME working in emacs but I think my problem is that

18:24 swank" does not work, rather than something on the emacs side.) Please advise. Thank you!

18:24 hiredman: I was in the area for the week following the conj too, walked around a little

18:24 moogatronic: I couldn't afford the full price and i missed the pre-reservation price, because i only found out that I could attend very recently.

18:25 hiredman: oh

18:25 no, different hotel

18:25 (last year was the hilton)

18:25 so I dunno what the area is like

18:25 moogatronic: I suppose we'll find out. =)

18:25 I centered all around atlanta last year at pycon. No muggings. =)

18:26 This fantastic vegan soul food restaurant was in a questionable neighborhood.

18:26 lots of foot-patrol police, squad cars, and shady characters dodging in and out of alleys

18:26 The food was worth it. =)

18:26 gah.. auto-spell correct fail… centered == wandered

18:28 brehaut: moogatronic: if this is mac os x lion, system preferences > lanuage & text > text > correct spelling automatically

18:29 iris1: lein swank

18:29 (ah sorry, wrong prompt...)

18:29 moogatronic: brehaut: awesome. i was just under the assumption that the latest version of this client added terrible auto-correct.

18:30 brehaut: moogatronic: what client? if its colloquay i'd love to know about a new version

18:30 moogatronic: that client, but i've not ran it for a while, so I figured maybe it auto-updated or something.

18:30 programs sometimes have a mind of their own. =)

18:31 brehaut: moogatronic: haha i wish. i dont think theres been a new release build in 2 years

18:35 moogatronic: like magic. clojure-jack-in and slime-repl.

18:35 =)

18:35 much better

18:37 Raynes: brehaut: Textual is excellent.

18:38 brehaut: Raynes: thanks

18:39 Raynes: it looks a lot more like IRC than colloquay ;)

18:39 Raynes: Yeah, I couldn't tolerate colliwhatever.

18:40 moogatronic: ohh nice

18:40 Raynes: It can't handle bouncers over multiple servers properly either.

18:40 Textual is fantastic.

18:40 Also free if you build it yourself, I think. Cheap if you don't.

18:40 brehaut: Raynes: looks that way; BSD FTW

18:41 moogatronic: that's an interesting way to release software.

18:45 amalloy: isn't that basically how (eg) red-hat works? the code is free, but for $N we'll bundle it up for you and provide some support

18:45 moogatronic: well, i got my emacs24/new clojuremode/latest starter kit working with swank and slime-repl, but now i'm not sure if my libraries are loading.

18:46 technomancy: for a while it was the only way to get gimp on macs

18:46 moogatronic: does clojure-jack-in start a server based on what's in project.clj ?

18:46 amalloy: moogatronic: yes

18:47 moogatronic: it looks like its probably working, but i'm seeing stacktraces when trying to load overtone, I guess its debug time. Was working in my old setup though.

18:47 manutter: hey, has anybody heard from the guy that does jark? His site has been down for a few days.

18:47 icylisper.in

18:51 moogatronic: thanks for the help wrt my swank/slime/repl setup! dinner time… =)

19:19 zerokarmaleft: oh snap, no rooms left at the sheraton :(

20:30 archaic: juxting zipper fns on a single node is really really nice

20:34 amalloy: ~juxt

20:37 clojurebot: you okay over there?

21:36 moogatronic: two wins today. new irc client, thanks Raynes for the tip, and my emacs setup has been updated to modern times. =)

21:38 napping: which client?

21:39 moogatronic: Textual

21:39 osx… i guess it's for sale, OR you can just compile it yourself which was easy enough.

21:39 ibdknox: looks a lot like limechat

21:39 moogatronic: i like that it's not occupying as many pixels as possible

21:40 though, I still wish you could run alternate window managers in osx, like xmonad or something.

21:40 napping: lately I've tried ERC a bit

21:40 If only for the TeX input method

21:40 moogatronic: i'm slowly coming up to speed on various emacs things.

21:41 i use emacs/org-mode/babel/r daily.

21:41 brandel: moogatronic: there are some utils that give you window snapping in os x.. not quite xmonad, but better than the defaults

21:41 moogatronic: fantastic for the tex output / literate programming

21:41 brandel: i have a divvy license, it's pretty nice

21:41 but it's not automatic.

21:42 i can quickly tile a few arrangements with some quick key tapping. =)

21:42 napping: does ERC interpret TeX from others in the chat window?

21:42 brandel: yeah I know what you mean, I do like xmonad

21:43 you could check out SizeUp - it gives you bindings for moving windows around

21:43 archaic: moogatronic: are you using clojure in babel?

21:44 moogatronic: archaic: not yet. currently all of my babel use is for course assignments.

21:44 archaic: have you?

21:45 archaic: ahh just wondering - its easy to setup in emacs 23 but 24 is real painful

21:45 i was hoping to copy your 24 config if you were :)

21:45 moogatronic: I do have one little problem with my LaTeX output… When I generate my document, it specifies the language syntax as R, capital R, but pygments expects lowercase r...

21:46 Well, my config for generating xelatexable docs from org worked in 24, but it was only running R.

21:46 just this evening tho, i refreshed my configs and upgraded to the latest emacs starter kit, clojuremode, etc..

21:46 so i have to backport all of my customizations.

21:46 using the ugly default color scheme even.. but i was too excited to get going with some Overtone hacking

21:46 (to the dismay of my wife)

21:47 archaic: i was using default color scheme fairly long time, then i found https://github.com/sellout/emacs-color-theme-solarized

21:47 brandel: wives often seem to be a in state of dismay I find.

21:48 at least mine is.

21:48 moogatronic: brandel: haha! mine gets cranky when my studio monitors are cranked and I am generating random saw waves.

21:48 brandel: but I know what you mean. =)

21:49 brandel: you should give her brief respites with sine waves

21:49 moogatronic: she's been trained a bit.. sometimes I make beats and play with samples… and sometimes the same 3 seconds for hours.

21:49 then there's the moog voyager.

21:49 =)

21:49 i've been commanded to wear headphones.

21:51 brandel: I've done some composition in logic - worth exploring Overtone? it's more geared towards generated/algorithmic music right?

21:51 moogatronic: well, that's how I am planning to use it anyway. =)

21:51 napping: moogatronic: It's just for typing in unicode

21:52 brandel: can you wire up midi triggers?

21:53 moogatronic: I wanted a really solid reason to learn clojure that I could justfiy time wise… so it's now a course project to use bioinspired computing (evolutionary and other algorithms) to build something fun.

21:53 brandel: not sure yet.

21:53 brandel: I'm a major noob on many fronts at current moment.

21:54 brandel: sounds neat. meh everyone is a noob at most things.

21:54 moogatronic: yeah, you have to be a noob at everything at some point in time. i've just been admiring clojure from afar for too long now.

21:55 i naively thought that leaving full time employment and starting a PhD would free up time for explorations like this.

21:55 LOL.. wrong.

21:55 though, as long as I work it in somehow, it is no longer "playing".. it's "working". =)

21:57 archaic: everyone loves solarized it seems. I should give it a shot. I do prefer any non-white background. and inconsolata.

23:55 hiredman: ~ping

23:55 clojurebot: PONG!

Logging service provided by n01se.net