#clojure log - Dec 05 2012

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

0:02 TheBusby: ^^^ would make a great T-shirt

0:18 tomoj: Knor: may his merciful shadow fall upon you

0:24 Raynes: Don't encourage him.

0:38 nightfly_: Is Knor/Lajjla a bot?

0:39 muhoo: oh gawd no, not lexx

0:44 Knor: tomoj, indeed, I worship His Shadow.

0:45 muhoo: nightfly_: no, he's a spaceship made out of insects and human organ tissue. :-/

0:45 Knor: As you command, muhoo.

0:45 Quite the phallic spaceship, I might add

2:06 nsun: I'm looking for an html template engine. Do you guys has any suggestions ?

2:19 alex_baranosky: is it normal for a tag completion table to take 30+ minutes (and counting) in Emacs if indexing your entire ~/.m2 folder? I'm trying to get seamless meta-.ing in Clojure as well as JAva. Any suggestions?

2:22 amalloy: i've never succeeded using M-. without a running slime session

2:22 but i haven't tried terribly hard

2:23 alex_baranosky: I miss being able to click-through into Java

2:23 it was one of the few good things about Intellij with Clojure, hehe

2:36 ambrosebs: How can I turn [1 2 nil] into "1 2 nil". I want to splice a vector into a string while still preserving nil.

2:36 ,(apply str [1 2 nil])

2:37 clojurebot: "12"

2:37 pepijndevos: &(apply str (map pr [1 2 nil]))

2:37 lazybot: ⇒ 12nil""

2:38 pepijndevos: hm

2:38 what happened to the quotes htere...

2:39 ambrosebs: ,(apply str (interpose " " (map pr-str [1 2 nil])))

2:39 clojurebot: "1 2 nil"

2:39 amalloy: &(apply pr-str [1 2 nil])

2:39 lazybot: ⇒ "1 2 nil"

2:39 ambrosebs: :)

2:39 cheers.

2:39 pepijndevos: hah

2:50 ambrosebs: How about turning [[1 2 nil] [3 4 nil]] into "1 2 nil\n3 4 nil". Flattening each vector and putting a newline between each one.

2:51 amalloy: (join "\n" (map (partial apply pr-str) vecs))?

2:52 ambrosebs: what is join?

2:52 Raynes: ...

2:52 amalloy: &(clojure.string/join ", " [1 2 3])

2:52 lazybot: ⇒ "1, 2, 3"

2:52 Raynes: And you call yourself a Clojure programmer, ambrosebs.

2:53 amalloy: well, it's hardly a clojure invention

2:53 Raynes: Don't think I implied that

2:53 ambrosebs: Raynes: I will sacrifice my integrity for better Typed Clojure error msgs.

2:55 Raynes: Sounds good

2:59 * josteink is looking for beta-testers :)

2:59 josteink: https://github.com/josteink/lein-drip

3:00 Raynes: I'm not sure what this is for.

3:01 josteink: its just supposed to be a very simple way to install drip and set it up for use with leiningen

3:01 https://github.com/flatland/drip

3:01 "Fast JVM launching without the hassle of persistent JVMs."

3:01 Raynes: I know, I'm a flatlander. ;)

3:02 I'm just curious what was difficult with the original installation.

3:03 josteink: oh nothing

3:03 just that adding one plugin to leiningen is simpler than doing things manually

3:03 handy when constantly setting up new environments ;)

3:03 Raynes: josteink: So the main thing this does is set LEIN_JAVA_CMD for you?

3:04 josteink: Raynes: it auto-dls drips, self-bootstraps drip, and registers it. yes

3:04 Raynes: That's the only second step besides wget <insert-drip-link-here>

3:04 josteink: yup

3:04 Raynes: I'm just wondering how much work you save by time you've edited profiles.clj to add the plugin

3:04 josteink: it was a means as much as anything else

3:05 it involves quite a bit of different subsystems (disk io, shell, network)

3:05 so I was forced to learn :)

3:06 Raynes: Well, if you found it useful it probably is.

3:06 josteink: me? I probably lost immense amounts of time :)

3:06 just that Ive found (for noobs in particular) that being told "just add this plugin to leiningen" lowers the barriers to entry significantly

3:07 so I considered it might make a good public service as well

3:07 Raynes: If you learned things, it's totally worth it.

3:07 josteink: doing this also involved, git, github, gpg and deploying to clojars

3:07 Raynes: josteink: https://github.com/josteink/lein-drip/blob/master/src/leiningen/drip.clj#L22 You don't need the 'do' around these single 'else' println calls. only if there are multiple ones.

3:07 josteink: all things Im certain will be useful :)

3:08 tomoj: I tried to install drip the other day and hadn't noticed that I apparently failed

3:08 josteink: Raynes: I know. I just did it for structural and visual consitenct

3:08 consistency

3:09 Raynes: Gotcha

3:10 josteink: tomoj: heh

3:10 tomoj: LEIN_JAVA_CMD=drip lein help

3:10 josteink: :)

3:10 tomoj: after that, shouldn't I see a standby jvm hanging around?

3:10 oh

3:11 "Drip doesn't work with Leiningen-2.0.0-preview10"

3:11 ok

3:11 * josteink checks his version

3:12 ambrosebs: amalloy, Raynes: functional application errors now have line number, macroexpanded "original" form, expected domain and actual domain. thanks :) (see end) https://gist.github.com/4213669

3:13 Raynes: You should use refheap.

3:13 josteink: tomoj: works fine here.

3:13 tomoj: but I use my superb plugin :P

3:13 Raynes: ambrosebs: Check this out. I rewrote my old ruby refh command-line refheap client in Haskell: https://github.com/Raynes/refh

3:13 josteink: but I only have "LEIN_JAVA_CMD=drip"

3:13 Raynes: If using Haskell to paste Clojure to a pastebin written in Clojure doesn't get you going, nothing ever will.

3:16 josteink: Raynes: replace "pastebin written in clojure" with "pastebin written in PHP" and it's a pretty hilarious joke ;)

3:16 or it least sounds like it

3:32 Raynes: ambrosebs: So how do you type heterogenous maps? I think you explained this in your talk, but I missed it while I wasn't paying attention. :P

3:38 ambrosebs: Raynes: Hmaps only support keyword keys. {:a 1} is of type '{:a Number}. They record the presence of keys, but not their absence.

3:38 `get` and `assoc` both work well with this type of hmap.

3:39 I've got some ideas of how to support things like `merge`.

3:40 Raynes: ambrosebs: Okay, so on to the more important issue. What manner of payment must I provide in order to make you use refheap for pasting awesome things like the above.

3:41 ambrosebs: Raynes: I shall give it a shot :)

3:42 xificurC: hello, could someone explain why (read-string "012") returns 10?

3:43 Iceland_jack: xificurC: because it reads is as being octal?

3:43 xificurC: :(

3:44 Iceland_jack: *reads it

3:44 xificurC: Iceland_jack: is there a way to force decimal read?

3:44 Iceland_jack: I'm not very familiar with Clojure but I'd imagine that's not possible using read-string

3:45 since that's used for parsing general forms

3:45 Raynes: Iceland_jack: ##(Long. "012")

3:45 lazybot: ⇒ 12

3:45 Iceland_jack: I didn't ask the question

3:45 Raynes: Ugh

3:45 Other person

3:46 xificurC: ^

3:46 Iceland_jack: Well, now you know too damn it.

3:46 Iceland_jack: And I feel all the better because of it

3:46 xificurC: Raynes: thanks

3:46 is that a Java call?

3:46 Raynes: Yes.

3:46 If you actually want decimal, you can do that too.

3:46 er, double

3:47 &(Double. "012")

3:47 lazybot: ⇒ 12.0

3:47 xificurC: thanks Raynes

3:50 wingy: how do i apply a middleware for just a specific route in my compojure/ring server?

3:51 eg. i have some routes I wanna password protect and need to check the basic auth header. if they are valid i respond with the secured page, if not i respond with invalid password

3:51 Knor: Raynes, what is your opinion of that "0" is falsy in php.

3:51 As in the string containing the one character '0'

3:51 Raynes: That it is evil and Satanic, I think.

3:57 thorwil: wingy: wrap the route handler

3:58 wingy: thorwil: i found this http://vedang.me/techlog/2012/02/23/composability-and-compojure/

5:51 borkdude: any favorites on linux server distro? I hear good things about arch - good choice?

5:53 nightfly_: I wouldn't recommend Arch for a server unless you're very brave

5:53 ucb: +1

5:53 it really depends on how many headaches you want

5:54 and whether you want to spend time compiling the internet

5:54 noidi: arch is a hobby, not a product :)

5:54 borkdude: nightfly_ what would you recommend

5:54 pyr: yes, avoid arch in production

5:55 daimrod: borkdude: debian?

5:55 pyr: borkdude: i tend to stick to distributions that are very well supported by CMFs for production machines

5:55 in the linux world that's centos and ubuntu. i choose ubuntu

5:56 squidz: debian for server arch for personal pc

5:56 how would I combine these functions (+ 1) (* -1) then apply them to 5?

5:57 pyr: ,((comp (partial + 1) (partial * 1)) 5)

5:57 clojurebot: 6

5:58 squidz: thanks

5:58 pyr: squidz: i switch 1 and -1 but you get the picture

5:58 ucb: pyr: (+ 1) is inc

5:58 and (* 1) is just * I think

5:58 ,(* 5)

5:58 clojurebot: 5

5:59 squidz: ucb: yes I just wanted a simple example

5:59 ucb: oh, -1, didn't see that

5:59 squidz: so what's the real code you want to compose?

5:59 gah

5:59 squidz: I actually have something like (n-row -1 table) and (n-col -1 table)

5:59 ucb: nickname confusion, apologies

6:00 squidz: https://www.refheap.com/paste/7309 line 6

6:01 ucb: squidz: that looks ok to me

6:01 borkdude: does find-fn still work in here?

6:03 Knor: Raynes, so, would you be against the idea that say in Clojure empty data collections are falsy?

6:03 But surely not 0 or "0" naturally.

6:03 Raynes: Knor: I'd be against empty data structures being falsey.

6:04 Knor: Raynes, motivate

6:04 Raynes: Because it's insane?

6:04 It doesn't make sense for an empty data structure to be a false value. It is a thing.

6:04 ro_st: Raynes: when will noir 1.3.0 go final?

6:04 Raynes: ro_st: This coming weekend.

6:04 Knor: Raynes, I find (if (empty x) ...) to be a very common idiom in recursion,.

6:05 ro_st: oh, nice!

6:05 Knor: Raynes, well, so is False and Nil

6:05 they are things as well.

6:05 ro_st: Knor: yes, false things.

6:05 empty things are empty, not false

6:05 * lucian shudders at the though that in Dart, everything but false is truthy

6:05 Knor: That argument is more circular than an American living near McDonalds.

6:05 borkdude: (if (next x) …) is the recommended idiom right?

6:06 lucian: s/everything but false is truthy/everything but true is falsy/

6:06 got that wrong

6:06 Raynes: Sure, let's make every recursive base-case value be falsey. We can eliminate like 3 characters of code that way!

6:06 ro_st: Knor: look at equality in javascript. it's lots of fun. they decided to make things other than null and false falsey

6:06 borkdude: Raynes what's the syntax for find-fn in here again?

6:06 lucian: ro_st: that's not even the problem with js

6:06 Raynes: $findfn 2 1 1

6:06 ro_st: oh, agreed. but it's one of the bigger ones

6:06 Knor: ro_st, indeed, and the only place I find myself having problems with it is 0 and 0.0

6:06 lucian: python considers [] and 0 to be falsy, and it's only midly annoying. js commits bigger sins

6:07 lazybot: [clojure.core/max-key clojure.core/cond clojure.core/dosync clojure.core/sync clojure.core/char-escape-string clojure.core/-' clojure.core/*data-readers* clojure.core/- clojure.core/default-data-readers clojure.core/unchecked-subtract clojure.core/*clojure-versi... https://www.refheap.com/paste/7310

6:07 borkdude: $findfn 1 -1

6:07 lazybot: [clojure.core/-' clojure.core/unchecked-negate clojure.core/- clojure.core/unchecked-negate-int]

6:07 Raynes: borkdude: findfn [out] [& in args]

6:07 Knor: I never find that "" or empty arrays or empty lists being falsy to be a problem leading to bugs, that 0 is falsy however does lead to _a lot_ of bugs and hassle.

6:07 Or "0" (that's madness)

6:09 borkdude: Raynes tnx

6:09 Raynes: &(next [])

6:09 lazybot: ⇒ nil

6:10 Knor: However, I'm still waiting for a use case where it shows that "" being falsy is a bad idea that can lead to bugs or coding hassle.

6:10 borkdude: $findfn [] false

6:10 $findfn [] nil

6:10 lazybot: [clojure.core/keyword? clojure.core/chunked-seq? clojure.core/fn? clojure.core/not= clojure.core/nil? clojure.core/string? clojure.core/sorted? clojure.core/false? clojure.core/true? clojure.core/symbol? clojure.core/number? clojure.core/integer? clojure.core/se... https://www.refheap.com/paste/7311

6:11 [clojure.core/list* clojure.core/dorun clojure.core/doseq clojure.core/second clojure.core/letfn clojure.core/keys clojure.core/with-open clojure.core/sync clojure.core/char-escape-string clojure.core/let clojure.core/extend clojure.core/-reset-methods clojure.c... https://www.refheap.com/paste/7312

6:11 Raynes: I'm waiting for a use case where it'd be useful.

6:12 Knor: you've already gotten one, you just said that sparing a couple of characters wasn't useful.

6:13 Raynes: What was that?

6:13 foodoo: borkdude: (if (empty? x) …) seems like a better approach. You clearly state your intentions with (empty?)

6:13 Knor: If you don't find that useful _enough_ then that's your own opinion, however that it has some use is a fact.

6:13 Raynes, like I said (if (next x) or (empty x) is extremely common in recursion

6:13 Raynes: Just use 'next' instead of 'rest' in your recursion.

6:13 borkdude: (empty x) returns an empty collection of the same type of x

6:13 Knor: In CL code it is considered idiomatic to just use (if list ...) where it is understood that the else arm is used on an empty list.

6:14 Ehh, empty?

6:14 You get what I mean.

6:14 Raynes: (if foo-list (recur (next foo-list)))

6:14 Also, I'm pretty sure that your 'fact' is also an opinion.

6:15 Knor: No, that it has some use is an objective fact, if you consider it useful enough to warrant whatever downsides it has is an opinion.

6:15 Raynes: That is simply wrong.

6:16 Knor: so you would deny that having to type less is a use/

6:16 Raynes: Yes, because in pretty much every case you don't save anything.

6:16 But by all means, post your proposal on the mailing list.

6:16 Knor: You save typing in every one of such cases.

6:16 Raynes: Whatever.

6:17 Knor: I have no proposal.

6:17 Raynes: If I stop talking to doorknobs I also save characters.

6:17 Knor: Besides, that's not something you can change this far in.

6:17 clgv: Is there a tutorial on how to use repl-y in your own application?

6:17 Knor: Raynes, you don't have to be so angry you know pumpkin.

6:17 We're all friends.

6:17 Besides, His Divine Shadow doesn't like it.

6:17 foodoo: Regarding empty lists and falsehood: You should also keep in mind, that destructuring is very helpful here:

6:18 ,(loop [[fst & rst] [1 2 3]] (if rst (recur rst) fst))

6:18 clojurebot: 3

6:18 foodoo: as an example on how to implement (last)

6:19 Knor: Well, in that case you would just use (if (empty? rst) and stuff.

6:20 foodoo: Knor: No. In the example above rst is either a list or nil

6:20 and therefore you don't need empty?

6:20 Knor: But I stand by that what is 'idiomatic' and what isn't largely depends on the culture of the language, using the empty list as false is considered very common and idiomatic in clojure. Short circuit evaluation is very idiomatic in Ruby.

6:20 Well, if you give it [1]

6:20 rest gets to hold [] right?

6:20 Or nil/

6:20 borkdude: ,(let [[a & b] [1]] a b)

6:20 clojurebot: nil

6:20 Knor: Oh

6:21 borkdude: ,(let [[a & b] [1]] [a b])

6:21 clojurebot: [1 nil]

6:21 Knor: Well, that's pretty silly then honestly.

6:21 ,(let [[x & xs] '(1)] xs)

6:21 clojurebot: nil

6:22 Knor: I do believe that the rest of a singleton list is generally considered to be the empty list.

6:22 noidi: Knor, empty lists are not falsy in clojure

6:22 Knor: Yeah, I know.

6:22 foodoo: There is (rest) and there is (next). The first produces empty lists and the second nil

6:22 Knor: I'm just saying that to say the rest of a singleton list being nil and not () is unusual amongst programming langauges.

6:23 Ah, okay, that makes sense then.

6:23 So destructuring uses next?

6:23 borkdude: I think nth even

6:23 foodoo: I don't know

6:23 Knor: So (next singleton-sequence) ===> falsy value?

6:23 noidi: Knor, yeah, next returns a seq (truthy) or nil (falsy)

6:24 foodoo: ,(doc next)

6:24 clojurebot: "([coll]); Returns a seq of the items after the first. Calls seq on its argument. If there are no more items, returns nil."

6:24 noidi: so next is slightly lazier than rest

6:24 Knor: Yeah, well, like I said, I've never encountered a case where empty collections as falsy leads to bugs or complicated behaviour unlike making 0 falsy which very often leads to bugs.

6:24 noidi: http://stackoverflow.com/questions/4288476/clojure-rest-vs-next

6:24 borkdude: http://clojure.org/special_forms#Special%20Forms--Binding%20Forms%20(Destructuring) <- nth

6:24 Knor: If you know a case where it does, feel free to share.

6:24 noidi: oops, I rest is lazier than next, that is

6:25 -I

6:25 Knor: CL does not even differentiate between false and empty list and it works fine there to not be able to do that, though I do feel a difference should be there.

6:25 borkdude: nth and nthnext

6:31 clgv: Knor: well you have the empty check with "seq" pretty easily and explicit

6:31 Knor: I fou write your loop initialization with `seq` and use `next` in the recur you can use (if mylist ...)

6:32 s/I fou/If you/

6:32 Knor: True, but it does basically 'use an extra function to get behaviour which you could normally have', the ubiquitousness of it shows that it's behaviour people want, I don't see a particular case where saying that empty collections are falsy on their own would lead to bugs unlike with 0 where it often leads to bugs.

6:32 NaN should be falsy though.

6:32 the 'empty number' isn't 0, it's NaN.

6:34 clgv: I like it that en empty colelction is not falsy - helps a lot when filtering

6:34 Knor: clgv, can you give an example/

6:37 clgv: Knor: well, I know I have encountered some in my projects - searching through these would violate my time constraints right now ;)

6:37 Knor: =(

6:37 Well, the reason I'm asking this is because I'm implementing a pet lisp and this is one of the issues that has plagued me since forever which of both paths I should take.

6:38 clgv: but on a semantic level it's a difference if you have nothing or something empty. this will always matter when you have to interpret some input

6:38 foodoo: I guess Rich choose only nil and false to be false values for simplicity. If you don't have to keep many potential false values in your head, it makes understanding code much easier

6:39 especially in a dynamically typed language

6:39 clgv: foodoo: I think there was some explanation either in a talk of him or in one of the books I read

6:39 Knor: clgv, well, nil is generally consideered the empty tuple though.

6:40 foodoo: Knor: not in Lua

6:40 Knor: I don't see Lua's type system being based on years and years of theoretical research.

6:43 thorwil: Knor: this might be of interest to you: https://groups.google.com/forum/?fromgroups=#!msg/clojure/JfZvqvLZjB0/C6rSn-Zg1s4J

6:44 particularly from "Clojure may be like Scheme" on

6:48 Knor: thorwil, I honestly agree with him there on if you want to basically have 'everything' be true but one value. But Clojure has true and false and CL has T

6:48 Though T supposedly is 'everything'

6:49 foodoo: Java has null and false. This may also have played a role

6:50 Knor: Yap, but predicates in clojure tend to return true or false.

6:51 I also disagree that nil is more nothing than "", "" is a string? that is nothing, nil is a null? that is nothing, it just happens to be by nature the only null? that exists.

6:51 It's basically a type of collection which by its very nature is always empty.

6:52 Which is why nil is considered the bottom type in CL. It's a collection containing types which is empty.

6:52 Whereas T is a collection containing values which is full of it basically.

6:53 foodoo: (first T) would return what?

6:53 Knor: types aren't ordered.

6:53 ambrosebs: Raynes: I like it https://www.refheap.com/paste/7313

6:53 Knor: Not every collection needs to be ordered of course.

6:55 thorwil: Knor: of course do predicates return true or false, as they are for formulating questions that can be answered with yes or no. whereas nil stands in for saying nothing

6:56 clgv: ambrosebs: inline type declaraions for typed clojure?

6:59 ambrosebs: clgv: (+ "string" 1) gets inlined by the time Typed Clojure gets to it unfortunately

7:00 clgv: is that what you meant?

7:00 clgv: ambrosebs: no I tried to interprete the surrounding forms ;)

7:01 ambrosebs: Oh right, `cf` just kicks of static type checking for a form.

7:01 Knor: thorwil, indeed, but that's not the story he told on that google group

7:01 Where he basically didn't want T vs F, he wanted nil vs everything.

7:01 As in CL style.

7:17 Raynes: ambrosebs: Awesome! If you use it and find yourself wanting any features, let me know and/or open issues on Github. Trying to make it the best.

7:19 ambrosebs: Raynes: noted

7:19 Raynes: syntax highlighting seems really nice.

7:22 clocKwize: Hi

7:56 Sgeo|web: ,((fn [s] (list s (list (quote quote) s))) (quote (fn [s] (list s (list (quote quote) s)))))

7:56 clojurebot: ((fn [s] (list s (list (quote quote) s))) (quote (fn [s] (list s (list (quote quote) s)))))

7:56 Sgeo|web: Yay

7:56 ro_st: quine?

7:57 Sgeo|web: Yeah. Although I'm sure I've seen a Clojure quine before, I was able to work this one out :D

7:57 ro_st: (defn foo [] (source foo))

7:57 ;-)

7:59 josteink: Sgeo|web: whee

8:30 clgv: `proxy` can override a protected emthod and expose it as public, right?

8:33 cshell: clgv: I'm not sure, but I saw this post

8:33 http://bit.ly/11TmbYy

8:33 Sgeo|web: http://ideone.com/nVs6D4

8:33 (off-topic)

8:33 clgv: cshell: as far as I tried it works. but I am not sure

8:39 Sgeo|web: it's even more interesting if you capture the value in that context as well ;)

8:40 Sgeo|web: clgv: ok

8:40 I just wish there was a nice way to map a function onto values of keys

8:40 Or.. hm

8:41 foodoo: Sgeo|web: Can you use metadata for your functions?

8:43 Sgeo|web: foodoo, hmm, not sure what that's relevant to?

8:45 clgv: am I allowed to use prior code that I've written?

8:45 clgv: Sgeo|web: erm what?

8:47 josteink: going back to languages without destructuring (like javascript) hurts

8:47 things just feel needlessly verbose

8:48 ro_st: so, it's easy to do scoped 'global' state with Ring, as you can use binding to bind atoms to declared vars in the context of a request

8:48 how can one do the same thing for long running processes, such as worker processes?

8:49 https://github.com/noir-clojure/noir/blob/master/src/noir/request.clj

8:49 cshell: ro_st: Can you use the binding form?

8:49 weavejester: ro_st: It depends where your worker processes are...

8:49 Sgeo|web: clgv, I've written the "capture the value in that context as well" part before

8:49 cshell: ro_st: and bind when the thread starts?

8:49 Sgeo|web: clgv: Sum total of everything: http://ideone.com/o7gVx6

8:49 ro_st: this sort of thing. i guess i can wrap the worker itself with a binding

8:49 Sgeo|web: Although the result it gives is really ugly :(

8:49 ro_st: we're using quartzite to schedule workers

8:50 clgv: Sgeo|web: oh I see ;)

8:50 ro_st: http://clojurequartz.info/

8:50 hmm. needs more hammock.

8:51 Sgeo|web: Although actually, this data structure as is is more useful if you're writing an env-aware macroexpand-1 function

8:51 ro_st: workers are generally system-wide where as requests are implicitly user-wide

8:53 Sgeo|web: Is there such a thing as a truly anonymous macro?

8:53 clgv: how do you call a parameter that represents a number until some event happens briefly?

8:53 Sgeo|web: I know clojure.tools.macro has a macrolet, but does that just make a gensym in the namespace, or how does that work?

8:53 clgv: Sgeo|web: yeah, there was contrib lib that offered that

8:53 thats the one I think^^

8:54 ro_st: i'm doing readme driven development : https://github.com/Cognician/fusebox/blob/master/README.md

8:54 Sgeo|web: I'm just trying to think, to see how I'd write a macroexpand-1 that takes an evn

8:54 env

8:54 ro_st: no actual code or jars yet

8:55 clgv: Sgeo|web: you want that bindings in the env are inserted into the form?

9:02 Sgeo|web: clgv: I'm thinking that for a macroexpand-with-env, I could just call the underlying function for the form, but I need to know whether it's been shadowed by something, and in order to do that, I need to see all bindings (can do), and know whether or not it's a macro

9:03 clgv: Sgeo|web: macros usually have metadata {:macro true}

9:04 Sgeo|web: I'm skimming over clojure.tools.macro

9:04 It looks broken, although I'm not certain.

9:04 I have a feeling it will break if you use macros that rely on &env

9:05 Problem with macroexpanders: Expanding a macro can cause side-effects

9:06 I was scared of the possibility of running a macro several times, but considering that fundamental issue, maybe I shouldn't be

9:06 ucb: is it me or is ritz sloooooow?

9:06 Sgeo|web: Hmm, my idea doesn't work anyway though

9:21 gfredericks: are side-effecting macros avoidable?

9:22 TimMc: I don't even know of any examples...

9:22 Wait, perhaps defonce?

9:23 nope, no side-effects from expansion

9:23 gfredericks: ,(macroexpand '(defonce TimMc 42))

9:23 clojurebot: #<Exception java.lang.Exception: SANBOX DENIED>

9:24 gfredericks: ha I've never seen def in a let like that before :)

9:24 TimMc: I have. amalloy_ is fond of letted defs.

9:24 gfredericks: no I mean (let [v (def ...)] ...)

9:25 if amalloy_ is fond of those then I'm never talking to him again.

9:25 * gfredericks starts a rap band called letted defs

9:25 TimMc: Oh! That's... weird.

9:26 gfredericks: I guess more to the point is I've never seen the return value of def used

9:29 TimMc: So... (def foo) ensures that #'foo exists, but doesn't change the root value.

9:30 gfredericks: that does look to be the case

9:36 squidz: using lazy-cat prevents further 'normal' use of collections because it's no longer pure right?

9:42 ro_st: is it possible to put a docstring on a keyword?

9:42 Sgeo|web: Well, the get-env macro I wrote is side-effecting. Not really a compelling case for the widespread existence of side-effecting macros though

9:42 What about Noir?

9:42 Do Noir macros do side-effects, or just the code they expand into?

9:44 TimMc: &(instance? clojure.lang.IMeta :foo) ;; ro_st

9:44 lazybot: ⇒ false

9:44 Chousuke: ro_st: I don't think you can attach metadata on keywords, since keywords are singletons.

9:46 ro_st: cool, tx

10:04 djanatyn: hmm

10:04 I'm using a java library, and I need to call an update method periodically to show the results on the screen

10:04 mdeboard: &(instance? clojure.lang.IObj :foo)

10:04 lazybot: ⇒ false

10:04 djanatyn: I'd like to create a new thread that continues to do this automatically. right now I'm doing it like this:

10:05 (defn update [world] (.. world show) (send *agent* update))

10:05 (send (agent (ActorWorld.)) update)

10:05 I should probably add a (Thread/sleep) in that update method. is there a cleaner way to do this?

10:16 * ohpauleez is walking the dog real quick

10:16 ohpauleez: whooops

10:16 wrong channel

10:32 googya1: you can not do this (conj (1 2 3 ) 5), but in function, you can do so (fn foo [x] (when (> x 0) (conj (foo (dec x)) x))) . why?

10:32 mdeboard: &(conj '(1 2 3) 5)

10:32 lazybot: ⇒ (5 1 2 3)

10:32 mdeboard: ?

10:34 @ googya1

10:35 devn: gfredericks: 'defs letted' is my nerdy def leppard cover band.

10:35 googya1: there is magic in function?

10:38 matthavener: googya1: when you do (1 2 3) clojure thinks '1' is a function

10:39 googya1: so you have to do (conj '(1 2 3) 5) to avoid the evaluation of (1 2 3) as a function

10:39 googya1: thats what mdeboard was showing you with &(conj '(1 2 3) 5)

10:39 googya1: why is correct in function definition?

10:39 mdeboard: googya1: because `foo' is a function

10:39 matthavener: googya1: in your function, foo is returning a list

10:40 googya1: oh yes i see, thank you @matthavener

10:40 matthavener: googya1: alternatively (iirc), you can do (list 1 2 3) instead of '(1 2 3)

10:41 mdeboard: in '(1 2 3), the apostrophe is escaping the `()' literal

10:41 or something

10:41 quoting, not escaping

10:41 matthavener: it prevents evaluation

10:41 another gotcha (that has gotten me), is that '(1 2 (function 3)) will not evaluate (function 3)

10:41 mdeboard: quoting

10:41 matthavener: but (list 1 2 (function 3)) *will*

10:41 mdeboard: '(1 2 ~(function 3)) :)

10:42 maybe

10:42 matthavener: mdeboard: ah, today i learned something new :)

10:42 mdeboard: unquote splicing iirc

10:43 matthavener: doesn't look like it

10:43 &(let [f (fn [] 3)] '(1 2 ~(f)))

10:43 lazybot: ⇒ (1 2 (clojure.core/unquote (f)))

10:43 matthavener: &(let [f (fn [] 3)] (list 1 2 (f)))

10:43 lazybot: ⇒ (1 2 3)

10:44 mdeboard: &(let [f (fn [] 3)] `(1 2 ~(f)))

10:44 lazybot: ⇒ (1 2 3)

10:44 mdeboard: There we go

10:44 only with the backtick, sorry

10:44 ,`(1 2)

10:44 clojurebot: (1 2)

10:46 matthavener: interesting

10:51 hcumberd`: Hi ;)

10:55 mdeboard: ,(let [x 15] `x)

10:55 clojurebot: sandbox/x

10:58 mdeboard: matthavener: iirc ` returns the fully namespace-qualified symbol, while ' is the unqualified symbol

10:58 I didn't bring my book to work today

10:58 and good luck googling `

10:58 (let [x 15] (quote x))

10:58 ,(let [x 15] (quote x))

10:58 clojurebot: x

10:59 vijaykiran: mdeboard: you can always use symbolhound.com

10:59 hcumberd`: ,google hans wurst

10:59 clojurebot: #<CompilerException java.lang.RuntimeException: Unable to resolve symbol: google in this context, compiling:(NO_SOURCE_PATH:0)>

11:00 vijaykiran: for ` = http://stackoverflow.com/questions/4571042/can-someone-explain-clojures-unquote-splice-in-simple-terms

11:06 mdeboard: vijaykiran: cool, thanks

11:11 oh good I'm glad I was in multiple channels so they could see my quit message.

11:11 :( Sorry, it was a poor joke from another channel.

11:26 squidz: if I have arrays in a list how can i put them into another array instead?

11:28 nvm I just use (into [] ...

11:28 Kowboy: that would be a vector

11:28 is that what you want?

11:29 or do you want a native Java array?

11:29 squidz: yes

11:29 i meant vector sorry sometimes I mix them up

11:29 Kowboy: that's ok

11:30 squidz: but im still a little confused by my code. At one point my function returns a vector, then at another point it returns an array

11:30 Kowboy: no need to apologize, we are happy you are learning clojure

11:31 well they can both be treated generically as sequences, it's just that vectors are "safer", while arrays may be faster depending on your use case

11:33 how long have you been using clojure?

11:33 squidz: https://www.refheap.com/paste/7314 here, (n-col) returns an array, but when ran inside line 20 its returning aa list

11:33 ive been coding now for 2/3 days

11:34 Kowboy: map always returns a sequence

11:34 which looks just like a list when printed out

11:34 same thing with reduce

11:34 llasram: squidz: The vocab you want is 'vector' vs. 'seq'. In your `if`, when the expression is true, the `reduce` yields a vector. Whe false, as Kowboy is saying, the `map` yields a `seq`

11:35 Kowboy: sorry, what am I saying

11:35 reduce can return anything

11:35 squidz: ah right, its switching according to the if, thank you

11:36 Kowboy: if you want the same thing, you can wrap it with (seq your-vector-here)

11:36 squidz: so map always returns a seq

11:36 i actually want it as a vector

11:36 Kowboy: prefer seqs over specific implementations whenever possible

11:36 squidz: if i'm running these functions a lot, would vectors perform better than sequences?

11:36 Kowboy: do you need random access?

11:37 squidz: yes

11:37 Kowboy: it's the same concept as programming to interfaces in Java

11:37 should you pass around a List or ArrayList?

11:37 ok, if you need random access, that's a different story

11:37 squidz: so using a seq, clojure can handle all structures implementing seq

11:37 Kowboy: right

11:38 and most sequence methods will return a seq anyway

11:38 squidz: well in line 11 and line 5 of my paste i use nth

11:38 Kowboy: plus, with seqs, you often get laziness for free

11:38 llasram: If you really need random access, you can use the Clojure 1.4 `mapv` to perform a map which directly and efficiently yields a vector

11:38 Kowboy: you can still use nth with a sew

11:38 *seq

11:38 it's just an O(n) operation

11:38 squidz: okay so that is not random access?

11:39 Kowboy: I think so, someone correct me if I am wrong

11:39 squidz: okay

11:39 Kowboy: yeah, the map will create a lazy-seq

11:39 llasram: Yeah -- nth is O(n) for seqs, O(1) for vectors

11:39 squidz: so I will refactor my code to use sequences instead of vectors

11:39 Kowboy: even if the seq is backed by a vector?

11:39 squidz: okay so just a little slower

11:40 but it shouldnt be a big problem

11:40 it is just to transform some data of mine

11:40 so it's a one time thing

11:40 Kowboy: oh wait, it is not backed by a vector here, nm

11:40 yeah, prefer seqs until you have a performance problem

11:40 squidz: what do you mean not backed by a vector?

11:40 Kowboy: in most cases seqs will outperform anyway because of laziness

11:41 I saw the conj in your map function

11:41 conj tries to preserve the underlying type

11:41 so it returns a vector in this case

11:42 but that is for an *item* in the seq that map is returning

11:42 clojurebot: You don't have to tell me twice.

11:42 squidz: okay, i think i've been aproaching it the wrong way. I was always trying to use vectors, then having problems between mismatching vectors and sequences. When actually I can keep it simple and more general using sequences

11:42 Kowboy: exactly

11:42 llasram: Kowboy: Interesting question (seq backed by vector). It seems not -- `seq` on a vector returns an vector-specific seq implementation, but that implementation does not also implement Indexed, so `nth` does the O(n) operation

11:42 Man, it is bugging me that someone on this channel is using the name "so"

11:43 Kowboy: if and when you need to speed up random access (like if you are doing nth a bunch of times), then convert the seq to a vector

11:44 squidz: Kowboy: thanks for the help. You've helped me get a step farther with clojure

11:47 Kowboy: pass on what you have learned ;-)

11:54 squidz: but there is no sequence alternative for (subvec .. ?

11:56 scriptor: that sounds about right

11:56 er, nvm

12:00 gfredericks: is there any standardized method for app configuration yet?

12:03 llasram: gfredericks: Does any language have such? :-)

12:10 zodiak: gfredericks, urm.. jst use clojure for it :)

12:10 homoiconicity ftw

12:11 gfredericks, (def conf (with-open [rdr (io/reader "props.clj")] (read (java.io.PushbackReader. rdr))))

12:11 technomancy: inc

12:12 gfredericks: though for fancy merging logic and defaults https://github.com/sonian/carica does a nice job

12:14 joegallo: I've used that library a few times, it's nice.

12:14 technomancy: disclaimer: I guess I wrote the first revision of that; not sure if any of my code still survived =D

12:23 tmarble: technomancy: I'm using lein2 for a search of clj-webdriver (w/ clojars-classic in project.clj) but I don't see 0.6.0-beta2 in the results?

12:25 borkdude: I have a question, probably related to noir. this website renders as html in my browser: http://michielborkent.nl:8080/

12:25 mpenet: gfredericks: or for the lazy typist: (comp slurp read-string)

12:25 err

12:25 borkdude: but when I make a virtual host (using Apache) http://twitter.michielborkent.nl/ - the site gets served as txt

12:25 mpenet: gfredericks: (comp read-string slurp)

12:26 borkdude: so, I assume noir doesn't add the content type correctly?

12:26 technomancy: tmarble: it's there, but it's on page 3

12:26 * tmarble arg.. indeed showing page 1/5

12:26 technomancy: tmarble: oh, depending on your page size

12:27 should probably boost the default given how long it takes to start lein to hit the next page

12:27 borkdude: this is noir 1.2.0 btw

12:27 technomancy: tmarble: definitely have some issues around sorting unfortunately

12:27 tmarble: technomancy: i'm in *shell* -- can I just not do pagination?

12:27 technomancy: tmarble: yeah, hang on

12:27 :search-page-size 100000000 in the user profile

12:32 tmarble: technomancy: awesome sauce!

12:37 technomancy: 50 is probably a better defoult

12:37 default

12:47 ucb: again, does anybody feel/have a setup where ritz-nrepl is slooooow? i.e. it takes about 20min to jack in?

12:50 joegallo: technomancy: i'm having a problem with lein2 search https://gist.github.com/499c4156050de2148ab6

12:51 technomancy: joegallo: geez

12:51 can you clear out ~/.lein/indices?

12:51 joegallo: i tried to rm -rf .lein/indices, but the problem remains

12:51 beat ya!

12:51 technomancy: wat

12:51 hcumberd`: eeeek

12:51 technomancy: joegallo: we don't even control that part of the search implementation, we just call out to the nexus indexer =(

12:59 hugod: ucb: if you're reading the log - 20min is not normal for jack in

13:06 oskarth: lynaghk: hey, using reflex - is there anyway to have a CO depend on two or more other (derefed) COs?

13:08 borkdude: wtf … http://stackoverflow.com/questions/2428563/how-can-i-prevent-apache2-from-setting-the-content-type-header

13:12 lynaghk: oskarth: yeah, a watcher will be added to anything deref'd in the body of the computed-observable macro

13:19 borkdude: the page http://www.webnoir.org/ doesn't have a content type either

13:20 but of course I don't know if it was build with noir… ;0

13:22 ucb: hugod: hiya, I am reading now, I've tried ritz twice already and both times it's been very very slow. Is there a way I can trace what's it up to? Last time it was stuck caching JVM classes for ~15min

13:22 I actually had to kill emacs

13:22 mind you, perhaps it's nothing to do with ritz, but plain nrepl works a charm

13:23 hugod: ucb: does lein ritz-nrepl from a shell, and M-x nrepl to connect it, work any better?

13:24 you can add --log-level trace to get very verbose output

13:24 ucb: let me try that

13:25 just kicked off lein ritz-nrepl

13:25 for the record, I'm not running on an XT PC or anything :)

13:25 ooh

13:26 hugod: first thing that happened on M-x nrepl: https://friendpaste.com/2KfwQCQ8kFhqY3ni1hzasf

13:26 hugod: trampoline with LEIN_FAST_TRAMPOLINE=1 should help lein ritz-nrepl startup time

13:26 ucb: it was fast enough with lein ritz-nrepl

13:27 hugod: looks like you don't have nrepl-ritz.el loaded

13:27 ucb: strange

13:27 I installed it from marmalade/elpa

13:27 thought that'd take care of things?

13:28 hugod: or you could add the clojure-complete dependency to your dev :dependencies

13:28 maybe it's not requiring it automatically

13:28 try M-: (require 'nrepl-ritz)

13:28 ucb: hum, I don't have clojure-complete listed in my lein profile

13:29 the require worked just fine

13:29 right, now I do have ritz-* available

13:30 hugod: if you reconnect, you shouldn't see an error now

13:31 ucb: same deal with locating complete/* :/

13:32 yup, now typing stuff in the repl complains about clojure-complete, but at least the repl is up in under 1min :)

13:33 hugod: nrepl-ritz should be overriding nrepl.el's use of clojure-complete. You can always add clojure-complete to your dev dependencies as a workaround.

13:33 ucb: you mean M-x nrepl-ritz?

13:33 borkdude: adding the content type with the content-type functon worked, http://twitter.michielborkent.nl/ - woohoo, but do I really have to do this for every defpage?

13:34 technomancy: borkdude: you could do it with middleware in compojure

13:34 maybe there's a way to hack that into noir somehow

13:34 borkdude: technomancy yes, but not everything served might be an html file right?

13:34 technomancy: borkdude: right, but your routes are composable; you can add middleware to a subset of them really easily

13:35 hugod: ucb: no, just require'ing nrepl-ritz should have forced it to use nrepl middleware for completion

13:35 technomancy: borkdude: in compojure anyway

13:35 ucb: hugod: oh, I see

13:35 technomancy: but this is basically a textbook example of what's wrong with the way noir does things

13:36 borkdude: technomancy maybe I'll write my own defpage function (def-html5-page) which wraps defpage?

13:36 ucb: I just restarted my emacs just in case, same thing

13:36 hugod: this is my lein profiles: https://friendpaste.com/2KfwQCQ8kFhqY3ni1hi0cl (copied from the github for ritz-nrepl)

13:52 Norgelys: holis

13:52 hola no hay nadien

13:56 holaaaaaaaaaaaaaa

13:59 holaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

13:59 mattmoss: &(repeat 12 \a)

13:59 lazybot: ⇒ (\a \a \a \a \a \a \a \a \a \a \a \a)

14:00 mdeboard: &(apply str (repeat 12 \a))

14:00 lazybot: ⇒ "aaaaaaaaaaaa"

14:00 Norgelys: holaaaaaaaaaaaaa

14:00 mattmoss: &(apply str (reverse "loh") (repeat 12 \a))

14:00 lazybot: ⇒ "holaaaaaaaaaaaa"

14:05 al80: can you explain why this line print only "a" and "c"? (do(println "a") (map print [1 2 3]) (println "c"))

14:05 nDuff: al80: map is lazy

14:05 Norgelys: 10:03:05) al80: can you explain why this line print only "a" and "c"? (do(println "a") (map print [1 2 3]) (println "c"))

14:06 nDuff: al80: consider wrapping that in doall

14:06 al80: ok, if it is at the end of the do form, it is expanded. Why?

14:06 scriptor: what do you mean expanded?

14:07 hcumberd`: It's hard to understand expansion

14:07 AimHere: It'll be expanded because the repl wants to return the value of the last thing in the do form

14:07 nDuff: al80: the thing at the end of the do is returned

14:07 borkdude: hmm, I think I did smth wrong myself

14:07 AimHere: Insofar as 'expanded' just means evaluated

14:07 nDuff: al80: ...and the repl prints the returned values

14:07 al80: ...and, it the process of trying to print them, it evaluates them.

14:07 al80: ok thank you

14:08 borkdude: https://www.refheap.com/paste/7319 <- when I leave out the (html …) wrapped around (welcome-page) I get content type text/plain

14:08 AimHere: Well it's trying to evaluate them; printing them is the side effect

14:08 borkdude: but the page already has a doctype and everything so why would I use the html functino?

14:08 nDuff: AimHere: ...well, the point of evaluating is to get to the printing

14:08 hcumberd`: borkdude: headers!

14:08 nDuff: AimHere: if it weren't doing any printing, lazy things wouldn't be evaluated.

14:09 AimHere: nDuff, wrong way round; the problem here is that the function isn't being printed because it's not being evaluated

14:09 s/printing/being printed/

14:10 nDuff: AimHere: That's true, of course, but if something were trying to print it, it'd be getting evaluated in the process. :)

14:10 AimHere: ...if something were trying to print the result of the map, that is.

14:10 borkdude: hcumberd` the html function only renders a string?

14:11 nDuff: AimHere: The reason the map isn't getting to evaluating (print) is that it isn't being evaluated, yes, but the reason it's only evaluated when it's in the last position is that only the thing that's returned gets printed. :)

14:11 hcumberd`: borkdude: hiccup/html or ring/html?

14:12 AimHere: Yeah, but what you're talking about 'printing' there is just the 'nil' that's the eval result

14:12 borkdude: hcumberd` I think it is hiccup's html here

14:12 nDuff: AimHere: Just so!

14:12 AimHere: Not the contents of the print statement

14:12 nDuff: AimHere: Yes, you're right -- that *is* what I'm talking about printing.

14:13 hcumberd`: borkdude: tried it at the repl?

14:13 what kind of html is returned?

14:14 borkdude: hcumberd` going to do it now… I'll paste the static html for you

14:14 hcumberd` https://www.refheap.com/paste/7322

14:17 hcumberd` hmm, (welcome-page) returns a list of two strings, one with the doctype and the other with the rest of the page

14:18 hcumberd`: borkdude: a list?

14:18 not a map?

14:18 borkdude: hcumberd` a lazyseq

14:20 hcumberd`: borkdude: you are using noir?

14:20 borkdude: hcumberd`

14:20 hcumberd` yes

14:20 hcumberd`: ahhh maybe your enclosing html elements are missing and defpage is sensitive to that

14:21 I do not use noir,...

14:21 sshack: Anyone here do sqlkorma? I'm trying to see if it can access table/column annotations (comments in postgres).

14:24 hcumberd`: borkdude: what are you writing in noir?

14:25 borkdude: ah, found something.. (defpage "/" [] (list "foo" "bar")) results in page with "foobar" as content and no content-type, where-as (defpage "/" [] "foobar") results in the same page WITH content-type text/html

14:25 hcumberd`: borkdude: really in a list?

14:25 borkdude: hcumberd` just some toy, nothing special

14:25 hcumberd` yes

14:26 hcumberd`: It should be more kind of a map, ring uses maps ...

14:26 I thought noir->compojure->ring routes whould be the result

14:27 borkdude: hcumberd` defpage just expects a string, but I have no idea what it's behavior is when fed a seq, which I was doing

14:27 its

14:27 technomancy: ring accepts seqs of strings simply so that they can be lazy; they should be treated the same way as strings

14:27 weavejester: Compojure assumes text/html for string types if no other content type is specified.

14:28 It seemed a sensible default at the time

14:28 borkdude: weavejester it calls str on the thing and adds no content-type, something like that?

14:28 hcumberd`: technomancy: then the behaviour seems like a bug?

14:28 technomancy: hcumberd`: the fact that the same behaviour doesn't apply to seqs you mean?

14:28 it does feel like an oversight

14:28 weavejester: Compojure has a protocol for rendering different types

14:28 https://github.com/weavejester/compojure/blob/master/src/compojure/response.clj

14:28 Oh, actually...

14:29 Huh, Compojure does treat ISeqs of strings the same way

14:29 Guess it's not my fault after all :)

14:29 hcumberd`: technomancy: that the content type is missed out if you are providing a seq

14:29 technomancy: heh; nice =)

14:29 hcumberd`: yeah, according to that link it's not compojure's fault

14:30 hcumberd`: a problem of defpage ?

14:30 technomancy: weavejester: why is content-type a function vs just using assoc directly?

14:30 weavejester: Unless an older version of Compojure is being used.

14:30 technomancy: weavejester: oh, probably because of case insensitivity?

14:30 borkdude: weavejester in what version of compojure was this added?

14:30 technomancy: that's a really annoying quirk of http

14:30 borkdude: weavejester I'm probably using too old stuff then (noir 1.2.0...)

14:31 weavejester: technomancy: Well, it's more that it's just a common thing to want to do

14:31 technomancy: And (content-type "text/plain") is slightly more readable than (assoc-in [:headers "Content-Type"] "text/plain")

14:32 technomancy: oh right; I was thinking it would be a plain assoc for some reason

14:32 clojure-newb: yo guys, I found (reduce #(update-in %1 [{:employer (:employer %2)}] conj %2) {} [jay mike john]) indexing a collection for me nicely (from a blog post), I'd like to modify it to count the items against each index instead of listing them… any ideas ?

14:32 technomancy: weavejester: does compojure handle headers case-insensitively?

14:32 weavejester: technomancy: Request headers are lower-cased by Ring in order to provide consistent keys

14:33 technomancy: Response headers are sent as-is, but HTTP header names are case insensitive

14:33 technomancy: gotcha. best to have that handled at the lowest level possible I guess.

14:33 weavejester: technomancy: So it doesn't matter if you output "content-type: text/plain" or "Content-Type: text/plain"

14:34 borkdude: noir 1.2.0 depends on compojure 0.6.5

14:34 weavejester: The only problem is middleware that updates headers set by the handler or other middleware

14:34 technomancy: weavejester: will that interfere with the auto-text/htmlizing if the case mismatches?

14:34 weavejester: borkdude: Oh, that's old.

14:35 borkdude: hmm, 1.2.1 does too

14:35 weavejester: technomancy: I see your point… hm… actually, I told a lie. If a string is returned, the content type is set to text/html regardless.

14:36 technomancy: However, if you return a map, then it passes straight through

14:36 borkdude: but anyway, problem solved - I should have noted that an enlive deftemplate returns a lazyseq of strings

14:37 weavejester: So (GET "/" [] "Hello") will have a content type of "text/html"

14:37 technomancy: oh of course; if you care about your content type you won't hit that path anyway

14:37 hcumberd`: weavejester: I think header case sensibility for headers leads to different behaviour in some browsers

14:37 weavejester: But (GET "/" [] (-> (response "Hello") (content-type "text/plain")))

14:38 hcumberd`: I'd be interested in knowing which browsers have that bug. If you recall a link, let me know.

14:38 borkdude: probably I shouldn't have used enlive to serve a complete static html file in the first place, but consistency with the other pages made me do it

14:39 holo: is the use of clojure.lang.MapEntry. to create MapEntry still unadvised?

14:40 technomancy: holo: almost certainly

14:40 just use a vector

14:40 holo: thanks

14:41 Norgelys: holoa

14:44 hcumberd`: weavejester: okay! RFC2616 says header field names are case-insensitive

14:45 seangrove: Is there a way to comp dotforms?

14:49 cemerick: seangrove: you mean .foo?

14:49 seangrove: Yeah

14:49 (comp .foo .bar)

14:50 cemerick: well, those are sugar for the . special form. comp only works with functions. So, (comp #(.foo %) #(.bar %))

14:50 seangrove: As a shorthand version of (comp (fn [x] (.foo x)) (fn [x] (.bar x)))

14:50 yeah

14:50 Just wondering

14:50 cemerick: yeah, that's the shortest option

14:51 a macro could do it more concisely, but would be your own little thing, and have various limitations

14:51 seangrove: Heh, was just curious, it's not such a big deal

14:52 cemerick: :-)

14:52 Generally, the answer to "Is there a way to bar foo?" is 'yes'.

14:52 Just a matter of whether you care enough or not.

14:52 seangrove: Ah, should have qualified, "Is there a built-in, standard way to bar foo?"

14:52 technomancy: there is memfn

14:54 cemerick: heh, haven't used memfn in…

14:54 well, ever, probably

14:54 mdeboard: huh.

14:54 memfn

14:55 llasram: Isn't it deprecated?

14:55 cemerick: No

14:55 technomancy: llasram: I think rich hates it but hasn't deprecated it?

14:55 not sure

14:55 llasram: Ok

14:55 cemerick: Certainly fell out of use once the #() literal came around

14:56 hcumberd`: cemerick: how can memfn and #() can be compared I'm a bit confused

14:56 technomancy: I'd personally take one alpha token over two punctuation tokens usually

14:57 Chousuke: technomancy: do you ever program in haskell? :P

14:57 cemerick: hcumberd`: both can produce a function that invokes a Java method

14:57 mdeboard: `#(into #{} '(x ~(+ 2 1)))

14:57 cemerick: 'course, that's the only thing memfn can do, and not particularly well

14:57 technomancy: ,(macroexpand-1 '(memfn hello))

14:57 clojurebot: (clojure.core/fn [target__2740__auto__] (. target__2740__auto__ (hello)))

14:58 technomancy: Chousuke: just a touch of ocaml

14:58 hcumberd`: ^

14:58 Chousuke: Heh. I don't know about ocaml but haskell people seem to love defining new operators.

14:59 usually with punctuation

14:59 nDuff: Heh.

14:59 Kowboy: ugggg, Java is so cumbersome to work with

14:59 Chousuke: then again, some of them are pretty neat.

14:59 nDuff: Recently had someone coming from Haskell over in #python complaining about not being able to do that

14:59 * Kowboy groans loudly

14:59 technomancy: Chousuke: can't be worse than scala: http://www.flotsam.nl/dispatch-periodic-table.html

14:59 nDuff: (creating new operators)

15:00 Chousuke: technomancy: I think the most popular lens library defines half a dozen or so operators

15:00 or a couple dozen. I haven't counted

15:00 hcumberd`: Scala is a mutant language for mutants

15:00 cemerick: technomancy, Chousuke: of course: http://glyphic.s3.amazonaws.com/ozone/mark/periodic/Periodic%20Table%20of%20the%20Operators%20A4%20300dpi.jpg

15:01 technomancy: cemerick: oh dear

15:01 oskarth: lynaghk: hmm, doesn't seem to work for me: https://gist.github.com/4218942

15:01 technomancy: cemerick: still, an entire book on an HTTP client?

15:01 cemerick: I give perl a pass though, because any community that can produce a gorgeous "Periodic Table of Operators" like that is just doing just fine IMO.

15:02 technomancy: book?

15:02 lynaghk: oskarth: what's the bit that isn't working?

15:02 technomancy: cemerick: the link at the bottom of the dispatch operator table

15:02 Chousuke: technomancy: check out eg. this page http://hackage.haskell.org/packages/archive/data-lens/2.10.2/doc/html/Data-Lens-Common.html :P

15:02 oskarth: lynaghk: the d CO that's depending on the two COs b and c

15:03 am I calling it wrong somehow?

15:03 lynaghk: oskarth: so not working meaning that if you change b or c the value of d is not updated when you later deref it?

15:03 Chousuke: when your operator is "^!+=" you're taking it too far

15:03 clojure-newb: if I have an indexed map how do I process it to keep the key of each item, and get the count of the value of each item (which is a collection) ?

15:03 technomancy: Chousuke: ouch

15:03 hcumberd`: technomancy: which OS do you use?

15:03 technomancy: hcumberd`: debian

15:03 Chousuke: then again, none of those are strictly speaking necessary so I suppose it's fine

15:03 cemerick: technomancy: well, it's only $3 and 23 pages. I'll bet lein's doc could easily fill that space, even if it weren't prettied up for publication. ;-)

15:03 lynaghk: oskarth: also note that there is a bug in the ClojureScript compiler that breaks reflex somehow; it's fixed in master, but broken after whatever version lein cljsbuild 0.2.7 references

15:03 Chousuke: lenses themselves are pretty awesome

15:03 oskarth: lynaghk: it's compiling but breaks in the browser

15:04 lynaghk: oskarth: so see if you still have the problem when compiling with lein cljsbuild 0.2.7.

15:04 Chousuke: they remind me of common lisp generalized references but are even more general, purely functional, and all around pretty neat :P

15:04 oskarth: lynaghk: oh I see, could that be it? will try that, thanks

15:04 lynaghk: oskarth: yeah. give that a shot. If it's still broken, please put the stacktrace or unexpeceted results on the gist.

15:04 `fogus: Any language that allows me to embed a BASIC DSL right in the middle is fine by me: https://github.com/fogus/baysick and http://hackage.haskell.org/packages/archive/BASIC/0.1.5.0/doc/html/Language-BASIC.html

15:05 technomancy: cemerick: oh ok; not so bad then

15:07 AimHere: Does that mean BASIC is okay by you?

15:07 cemerick: BASIC is definitionally okay

15:09 `fogus: BASIC is BACK!

15:09 BASIC is BAD (in the good way)

15:09 cemerick: I want line numbers in Clojure.

15:09 I'll settle for form numbers.

15:09 unic0rn: O.O

15:09 llasram: cemerick: (recur-to 12) ?

15:10 `fogus: I think chouser was playing with something like that at one point

15:10 cemerick: absolutely

15:10 hcumberd`: chat party at tv primetime ;)

15:10 cemerick: `fogus: of course he was :-P

15:12 unic0rn: i guess line numbers were useful when 8bit machines had line editors, so you couldn't really edit the line without its number

15:12 clojure with line numbers...

15:12 abomination

15:12 cemerick: abomination?!

15:12 * unic0rn hides

15:12 unic0rn: yes! :P

15:13 * cemerick puts (def gosub apply) in all of his projects immediately

15:13 unic0rn: rotflmaoshtccomnaiweda

15:13 mdeboard: what

15:13 unic0rn: google

15:13 cemerick: goodness

15:13 mdeboard: ,(google)

15:13 clojurebot: #<CompilerException java.lang.RuntimeException: Unable to resolve symbol: google in this context, compiling:(NO_SOURCE_PATH:0)>

15:15 amalloy: cemerick: surely #(apply % %&) is a better gosub?

15:16 holo: a too-much-time-at-hands-question: which one is more idiomatic? (#' namespace/var) or (#'namespace/var) ?

15:16 cemerick: amalloy: waitaminute, I don't need a straight-man

15:17 hcumberd`: ,(google "bot supports google)

15:17 clojurebot: #<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: EOF while reading string>

15:17 hcumberd`: ,(google "google")

15:17 clojurebot: #<CompilerException java.lang.RuntimeException: Unable to resolve symbol: google in this context, compiling:(NO_SOURCE_PATH:0)>

15:17 hcumberd`: ;(

15:17 cemerick: holo: the last one in here that put spaces after quotes is still on the island to which he was banished

15:18 $google rotflmaoshtccomnaiweda

15:18 lazybot: [Grand Lake Links ACRONYMs] http://www.grandlakelinks.com/AlphabetSoup.shtml

15:18 hcumberd`: ahh thx cemerick

15:18 oskarth: lynaghk: cljsbuild 0.2.7 didnt help, stacktrace here: https://gist.github.com/4218942 [using clojurescript 0.0-1450]

15:18 cemerick: Bizarre, that's not the first result

15:18 hcumberd`: What is %& ?

15:18 Is there a reference to the crazy clojure operators such as %2 ,...

15:19 lynaghk: oskarth: ah, I see what's going on

15:20 oskarth: the library is totally naive, and you have a diamond in the dependency graph.

15:20 d depends on c and b, and both c and b depend on a.

15:20 holo: cemerick, do you mean i'm just lucky i also didn't get banished to an island?

15:20 cemerick: holo: Nah, I'm just trying to fulfill a dare to be as unfunny as possible in channel.

15:21 oskarth: lynaghk: what's wrong with that?

15:21 if a is changed somewhere I would expect b,c to be +1,-1 and d to be [a+1, a-1]

15:21 lynaghk: oskarth: some craziness is going on where the system is getting into a loop

15:21 oskarth: ah

15:21 lynaghk: oskarth: semantically, nothing is wrong with what you're trying to do. The problem is with my implementation (which was, and always will be, a total hack)

15:22 holo: cemerick, thanks for the info (i mean about the spaces)

15:22 oskarth: lynaghk: do you have any ideas for how to solve this type of problem? we could take a crack at a patch

15:23 lynaghk: oskarth: well, actually, it's not clear what is going wrong here because no values are actually getting updated.

15:23 `fogus: I'm disappointed at the poor showing for the word "hammock" --> http://plwords.herokuapp.com/languages/clojure

15:23 lynaghk: let me take a quick look

15:26 holo: `fogus, i notice some apps hosted on heroku (probably clojure apps) use that menu bar on the top. is it popular? is it a template with a name for which i can download?

15:28 llasram: holo: I assume the ubiquitous http://twitter.github.com/bootstrap/

15:28 lynaghk: oskarth: okay, I fooled myself. The problem is not with both COs depending on the same atom, it's with dereferencing two COs within another CO, which is apparently something we've never run into before

15:29 `fogus: holo: Looks like a Github pages template to me.

15:29 lynaghk: oskarth: I don't have time to look into this today, but if you want to open up an issue on reflex I'll take a stab. Or, if you're feeling lucky you can dive into the implementation yourself---it's not terribly complex.

15:29 oskarth: lynaghk: yeah I see, do you have any ideas why is a problem? we took a short dive into the source code but couldn't find any immediate reasons to why it wouldn't work

15:30 will take a stab at it regardless, but any pointers you might have would be great :) we are me and cpetzold btw

15:30 holo: `fogus, this is cool. thanks

15:30 lynaghk: oskarth: unfortunately, no. that's why this library (and callbacks in general) are terrible---they work until they don't and then it's a nightmare to debug.

15:40 hcumberd`: why is the clojure community growing so fast?

15:43 Raynes: hcumberd`: Steroids.

15:43 nDuff: hcumberd`: ...compared to what? But to throw in my own $.02 -- there are a lot of people who like LISPs for their aesthetics and flexibility, but Clojure is the most practical one for getting useful things done in the real world to have come along for a while.

15:43 Raynes: I like my non-buzzwordy answer better.

15:44 ivan: based on current trends, all of freenode will be in #clojure in a month

15:45 Raynes: Even the 1000 people in #haskell !?!?!

15:47 holo: the clojure community is the most friendly

15:47 hcumberd`: #C++ was so full it wasn't possible to join for a few days

15:48 nDuff: compared to for example groovy, grails, vertx, jruby and all the other JVM languages. It is even more in focus than Google Go

15:54 oskarth: lynaghk: cloning reflex and running the tests I get 'error: no protocol method ISeqable.-seq defined for type number: 1' - is there something else I need to do to get the tests to run?

15:56 holo: google go supports plan 9 ^^"

15:56 hcumberd`: what is plan 9?

15:57 scriptor: hcumberd`: http://en.wikipedia.org/wiki/Plan_9_from_Bell_Labs

15:58 holo: i just read it on wikipedia. plan 9 is the next unix, or something. everything is files concept, distributed, name inspired from some bad rated movie

16:00 i think nowadays, if someone invents a language, the first thing i want to read is

16:00 answer to "why????"

16:03 hcumberd`: Does Plan9 have impact?

16:03 I never heard of it before

16:03 Wikipedia does not clearify all aspects

16:03 microkernel?

16:03 What's about google go?

16:04 scriptor: plan 9 never was used much outside of research

16:05 holo: hcumberd`, if you are interested in distributed operating systems and unix, you will definitely like the ideas behind plan9

16:06 hcumberd`: holo: srsly plans to support FAT, work to extend plan9 with a google go compiler, last release 2002

16:06 "Last stable release 10 years ago"

16:07 mthvedt: a new meaning to the words stable release

16:08 holo: hcumberd`, if you want to use a sort of plan9 in your browser, you can use inferno. i don't know the developments since many years ago

16:08 nDuff: hcumberd`: Plan 9 has plenty of historical impact, yes -- if nothing else as a well-attended proof-of-concept re: modularity.

16:08 hcumberd`: In a perfect world GNU hurd has been released two days ago. Minix supports all file systems and is as usable as linux.

16:08 + Clojure will not depend on the JVM anymore

16:09 holo: minix is as usable as linux? who said it?

16:09 scriptor: "in a perfect world"

16:09 hcumberd`: 'In a perfect world', sure we are not there yet

16:09 cemerick: Hardly anyone would use Clojure if it weren't a hosted language

16:10 hcumberd`: Do you know what GNU means?

16:10 Gnu is Not Usable,... I think

16:10 * nDuff decides that the signal/noise ratio is being seriously degraded

16:10 nDuff: *plonk*

16:10 hcumberd`: cemerick: what is your definition of a 'hosted language' ?

16:11 holo: ">.> is this becoming philosophical?

16:11 cemerick: perhaps

16:12 hcumberd`: One that targets an existing, mature runtime

16:13 Raynes: cemerick: I just realized that when I move to LA we'll be a country apart from one another. I'm not sure I can live with the distance.

16:13 cemerick: Raynes: I wonder if that means our schedules will make more or less sense to each other?

16:13 hcumberd`: Raynes & cemerick working for the same company?

16:14 Raynes: No.

16:14 cemerick: Clojure, Inc. :-P

16:14 hcumberd`: ;)

16:14 amalloy: i think it means Raynes will be going to bed when cemerick gets up

16:14 cemerick: That happens already

16:14 Raynes: cemerick: About the same, I think. I currently go to bed at 6AM. In LA, I'll go to bed at like 1-2AM.

16:14 It comes out to about the same.

16:14 amalloy: I already do, pal.

16:15 cemerick: ah, so you're staying constant w.r.t. the east coast

16:15 amalloy: yeah but it'll just be coincidence, not based on peeking in his window

16:15 hcumberd`: cemerick: you do not expect linux/bsd/... to be mature, existing runtimes?

16:15 Raynes: cemerick: I *think* it'll just work out that way. Not really doing it on purpose, it'll likely just be the natural rhythm I will fall into given the time I have to get into work and stuff.

16:15 cemerick: hcumberd`: Intel microcode is a runtime, too? #silly

16:16 Raynes: When I was in LA for that week working at the office I went to bed between 1-3AM and it all worked out fine.

16:16 cemerick: Has LA gotten better since 1996? That was my last (poor, unfortunately) impression of it.

16:17 Raynes: I think it depends on where you're looking.

16:17 I was looking at the ocean, the history, and the hills.

16:17 holo: by the way, i released a fork of korma fixing an ssl lack of support for postgres. this affected heroku users (like me) https://github.com/ccfontes/korma . i posted an answer on stackoverflow, but no one gave me attention :(

16:17 cemerick: Oh, actually, 2001.

16:17 Perhaps I've never seen the nicer parts of LA.

16:18 Raynes: lancepantz worked really hard to make me excited and happy about the move and he succeeded.

16:18 cemerick: My experience of CA has largely been defined by Santa Barbara, which, in general, doesn't have any bad parts.

16:18 holo: anyway, if someone needs it urgently, it's available on clojars

16:18 cemerick: Raynes: Yeah, don't let me blunt that. Having locals point you in the right direction is a huge deal.

16:18 Raynes: He showed me thinks I had quite literally never seen before, such as an Ocean, or a lighted cityscape at dusk.

16:18 things*

16:18 It was all pretty amazing to me.

16:18 amalloy: hah. isla vista is a pretty amazing bad part, cemerick, at least on friday nights

16:20 Raynes: I tried to get amalloy to let me room with him but he wasn't have none of it. He is afraid my sexy will tempt him to make bad decisions.

16:20 having*

16:20 I suck today.

16:21 hcumberd`: Is the JVM really a better platform than the OS?

16:21 cemerick: amalloy: maybe I missed it. What's so hot around UCSB?

16:21 hcumberd`: Years ago it was really hard to find somebody hosting a jvm for you.

16:22 The most people sticked to php and mysql because it was available everywhere

16:23 holo: hcumberd`, i heard that making stable, reliable, mature, efficient compilers takes alot of effort and time, so nowadays, some designers host their languages in some existing runtime for practical reasons

16:23 amalloy: i'm not sure i understood the question. just that a college town for a famously party-heavy school is a disaster unless you are such a student. i was exaggerating, i suppose, based on being annoyed by them when i was a quiet sort living on campus

16:23 cemerick: ah-ha

16:25 hcumberd`: holo: clojure->jvm bytecode !! You have to write a compiler, regardless of the underlying parts

16:25 cemerick: I never spent much time up there. My uncle had a place in Goleta for years, which was very nice, and my grandparents used to live on State St. ~3 miles north of downtown.

16:25 Fun times.

16:25 gfredericks: technomancy: regarding my config question from hours ago, thanks :)

16:26 I know folk around here tend toward the "slurp a config file!" route, but that still seems like a lot of boilerplate every time I do it

16:26 Raynes: amalloy: You're so quiet. ,3

16:26 <3

16:26 cemerick: hcumberd`: re: holo's comment, you can include things like JIT, GC, library ecosystems, etc.

16:26 amalloy: cemerick: santa monica reminds me a lot of santa barbara. so at the very least there are good parts of LA

16:27 nDuff: amalloy: pardon? I was a non-partier at a non-party school, and didn't find such to be troublesome... but then, I'm not sure what the context of that question was. (Perhaps it was a response to something said by someone I have on /ignore?)

16:27 technomancy: amalloy: as the t-shirt says, there is no life east of PCH

16:27 there's a narrow strip of habitable territory

16:27 nDuff: err, at a party school

16:27 * nDuff went to CSU Chico

16:28 cemerick: amalloy: oh, I'm sure. I've just never had the pleasure. :-)

16:28 holo: hcumberd`: yes, "library ecosystems": so why your question: Is the JVM really a better platform than the OS? i think you know the answer before you make the question

16:28 hcumberd`: JIT, GC,... are also existing and are reusable if you work with C

16:28 technomancy: C calling conventions are not suitable for a language with GC

16:29 any time you cross the boundary between a managed (pleasant to code in) runtime and C, it's a nightmare

16:29 hcumberd`: holo: not to use existing libraries seems to be a bad idea so the JVM has impact

16:29 cemerick: hcumberd`: I think you just went off the reservation :-)

16:29 hcumberd`: But when you have a look at the average java lib quality you might think about it

16:30 Is LISP an alternative to Clojure+JVM?

16:30 The library ecosystem seems to be death

16:33 gfredericks: my ERC freenode buffer has a bunch of messages from -yuros- from earlier today claiming that everything I said was bullshit?

16:34 * gfredericks finds that a little bit weird

16:34 amalloy: gfredericks: maybe that's bullshit too

16:34 gfredericks: I can't handle that much meta

16:34 hiredman: it is irc

16:35 gfredericks: hiredman: I'm not familiar with what it takes to make something appear in the freenode buffer

16:35 unless you were just joking that everything in irc is always bullshit

16:35 hiredman: ^-

16:36 cemerick: A good null hypothesis.

16:40 aphyr: cemerick: Is there an easy way to change the default namespace of nrepl.server/start-server?

16:40 cemerick: aphyr: default namespace?

16:40 solussd: b

16:40 aphyr: I'm embedding an nrepl server in an application and would like to give users immediate access to some utility fns

16:41 Be cool if I could drop them in a special namespace instead of 'user

16:41 Digging through the code, haven't really figured out how that works yet.

16:41 amalloy: pretty sure if you want to give *users* immediate access to functions when in a repl, that's what the user ns is for

16:42 cemerick: What amalloy said. Refer whatever you want into 'user, and you're done.

16:42 aphyr: Righto.

16:42 Wow, lesson learned: do *not* type (ns) at a repl client, haha

16:43 * amalloy immediately tries this

16:43 cemerick: aphyr: FWIW, the 'user default is established for sessions here: https://github.com/clojure/tools.nrepl/blob/master/src/main/clojure/clojure/tools/nrepl/middleware/session.clj#L96

16:44 aphyr: amalloy: managed to hard-lock the whole client, had to background and kill it

16:44 cemerick: aphyr: (ns) just tosses an exception

16:44 amalloy: wat

16:44 cemerick: really

16:44 what client?

16:44 aphyr: lein repl :connect localhost:1234

16:44 cemerick: wahoo

16:44 aphyr: Is there a better way? I've also got reply sitting around but it took some classpath munging to start

16:47 cemerick: aphyr: I can't reproduce. (ns) always "works", even when I connect to an existing endpoint with lein repl :connect

16:48 aphyr: user=> (ns)

16:48 ^CException in thread "SIGINT handler" java.net.SocketException: Broken pipe

16:48 ... and now I can't reproduce. Yay state!

16:48 cemerick: SIGINT?

16:48 Sounds like maybe a bit of reply wackiness

16:48 aphyr: Yeah, from my attempt to ctrl-c after it hung

16:48 cemerick: oh

16:49 aphyr: Immediately prior, I hit a CancellationException when it tried to print a cancelled future

16:49 Wonder if that had to do with it...

16:49 pyr: fun fact, a (defprotocol) member with the docstring in the wrong place will silently be discarded from the compiled class

16:50 (defprotocol Foo (some-fn "i shouldn't be here" [this]))

16:50 aphyr: pyr: Have you discovered fun with multiple-arities yet?

16:51 pyr: aphyr: i.e ?

16:52 aphyr: That defprotocol, defn, and defrecord have different ways of defining multiple-arity functions, and the docstrings go in different orders

16:52 pyr: yup

16:52 i always mix where the docstrings go, which is how i discovered the silent discarding

16:56 llasram: aphyr: The different multi-arity methods kind of make sense when you think about which ones are defining Java methods (thus different arity == different method) vs storing a single multi-arity fn

16:56 aphyr: I'm not saying its good, but at least you can puzzle it out

16:59 technomancy: huh: https://mobile.twitter.com/missingfaktor/status/276423303923654656?p=v scala's .net variant is no longer officially maintained

16:59 hcumberd`: wow

16:59 cemerick: The ML thread is amusing.

16:59 I hadn't really started to think of .NET as "legacy" yet.

17:00 technomancy: I actually couldn't get to the thread

17:00 yay google groups

17:00 brehaut: wait, MS have given up on .net?

17:00 bbloom: evn Microsoft is starting to think of .NET is legacy….

17:00 even*

17:00 it's not going anywhere anytime soon, but C++ and JavaScript seem to be the preferred platforms for win8

17:01 hcumberd`: C++ is nice ;)

17:01 brehaut: that has got to be almost hte stupidest choice ever

17:01 hcumberd`: JavaScript too

17:01 bbloom: it's a shame really

17:01 cemerick: I haven't read anything about it, but it seems absolutely unthinkable on the face.

17:01 brehaut: bbloom: im surprised im saying this, but hurrah mono i guess

17:01 bbloom: back in the disasterous pre-vista days when longhorn was the codename, devdiv warned windows "don't use .net, it's not ready yet"

17:01 but they built a whole OS on .net before it was ready. it was slow and crappy and didn't work at all, burned windows something fierce

17:02 technomancy: haha: "Can I do the actual excision. Pleeeeeeeeeeease."

17:02 bbloom: bigger issue was the hilarious overengineering occuring there

17:02 but windows decided to ban .net as a matter of political spite

17:02 so when javascript started becoming such a big thing, win8 decided to pick up javascript as sort of the window org's managed language

17:02 hcumberd`: bbloom: .net banned from windows?

17:02 bbloom: not really banned

17:03 hcumberd`: damn bad news for all c# people

17:03 bbloom: this is a hilarious oversimplification

17:03 this was YEARS ago

17:03 technomancy: on the bright side google groups seems to have fixed the "you followed a link to a page using the new UI; that must mean you want your default changed" bug

17:03 cemerick: right, typescript.

17:03 bbloom: yeah, so typescript is dev div & microsoft research's play to be able to offer the same c# level of IDE integration/features to javascript

17:03 brehaut: typescript is actually pretty interesting i think

17:03 cemerick: gah

17:03 bbloom: brehaut: yeah, it's actually quite interesting

17:04 hcumberd`: is typescript the new c# ? ;)

17:04 typescript ~ javascript ?

17:04 bbloom: hcumberd`: not really. javascript is window's c# :-P

17:04 brehaut: typescript is a superset of javascript but with structural static typing

17:04 cemerick: hcumberd`: coffeescript + engineering?

17:04 bbloom: c# (and vb.net) are still great for business apps

17:04 c# is a fantastic language, especially compared to java

17:05 anyway, typescript is definitely interesting

17:05 aphyr: cemerick: you know what ClassCastException clojure.lang.Symbol cannot be cast to clojure.lang.Namespace indicates, in tab-completion at the repl?

17:05 * brehaut keeps his coffeescript opinions to himself

17:05 hcumberd`: .net is wired ... all the different languanges there VB.net C#.net

17:05 cemerick: except they never got the CLR optimized the way the JVM has been

17:05 bbloom: the google closure compiler, which clojurescript targets, has a type system that is embedded in /** comments */

17:05 cemerick: true

17:05 cemerick: aphyr: sounds like an issue with reply and/or clojure-complete

17:05 hcumberd`: But all c# programmers can move over to java

17:06 the difference is only a little

17:06 and W8 should support a JVM

17:06 bbloom: hcumberd`: not really, the difference is huge when you consider lambdas, expression trees, linq, etc

17:06 hiredman: hcumberd`: in the surface syntax

17:06 aphyr: Also seeing NoClassDefFoundError Could not initialize class riemann.bin, when trying to tabcomplete (riemann.bin/

17:06 hiredman: but libraries are different, build systems are different, tooling is different

17:06 brehaut: hcumberd`: C# and Java are staggeringly different

17:06 bbloom: anyway, typescript's compiler is pretty young. it only really provides the type checking. google closure compiler is much richer as a compiler, with dead code removal, inlining, constant folding, closure lifting, etc

17:07 hiredman: the clr and the jvm are very different

17:07 hcumberd`: I remembered the C# / .net hype,... gah

17:07 cemerick: bbloom: just a matter of time. I'd welcome some JS optimizing compiler competition, really.

17:07 bbloom: anyone compiling to javascript should study both GClosure and TypeScript

17:07 cemerick: agreed

17:08 I've been thinking about this a bit because we want to eventaully make CLJS self hosting

17:08 technomancy: the great thing about JS-to-JS compilers is that you don't have to pick just one =D

17:08 bbloom: and if that means no JVM, it means no GClosure

17:08 so it would be nice to see alternative type systems for JS

17:08 cemerick: technomancy: if you ping-pong 'em, all apps eventually compress to 3kb of high-value unicode

17:08 technomancy: I wonder how many JS compilers you could chain together before you went insane...

17:08 bbloom: and compare and contrast them

17:09 technomancy: the answer is pretty much ONE, unfortunately…. CLJS->JS is sane and debuggable. JS->Advanced Optimized JS is a nightmare to debug

17:09 hcumberd`: Now sharepoint is everywhere,... C# is not used to build modules for it, it's javascript right?

17:09 bbloom: leads to some awkward repl sessions, let me tell you

17:09 hcumberd`: C# isn't going away anytime soon

17:10 hcumberd`: it still has a huge user base for web services and desktop apps in businesses. C# moves copies of Visual Studio

17:10 technomancy: cemerick: once you hit emojis as identifiers you know it's time to take a break

17:10 brehaut: cemerick: thats fine if you dont want to run on node.js which apparently uses UCS2

17:10 cemerick: brehaut: heh, yeah, saw that one go by :-)

17:11 brehaut: i guess that wont matter for clojurescript

17:11 technomancy: it's really a shame how many of the non-tolkien fictional languages are just for unimaginative transliterations: http://www.omniglot.com/writing/fictional.php

17:11 exactly 26 letters, etc

17:12 AimHere: Klingon is pretty decent in that respect

17:12 Base 10 numbers though, but I suppose Klingons have an unimaginative 10 digits

17:14 bbloom: from the TypeScript site: "Read the specification in doc or pdf"

17:14 entertains me that they even bother with the doc

17:14 heh

17:14 brehaut: bbloom: at my last .net job, i wrote tests for 6 months. in doc

17:15 devinus: AimHere: is there a better base than 10 for the universe?

17:15 bbloom: brehaut: like unit tests? or like use case tests?

17:15 brehaut: bbloom: all the tests

17:15 technomancy: AimHere: yeah, it looks like they did their homework on that one

17:15 nobody comes close to Tolkien though

17:15 brehaut: going all alan turing and running them on a farm of humans

17:15 amalloy: 10 is the only reasonable base

17:16 bbloom: devinus: I think we should invent 6 more digit characters and transition everybody over to hex… but i'll settle for america adopting the kilometer

17:16 brehaut: technomancy: being an actual linguist pays of ehh

17:16 technomancy: brehaut: a linguist with lots of free time =)

17:16 cemerick: brehaut: that's pretty awesome

17:16 brehaut: technomancy: ah, a professor of linguistics

17:16 llasram: technomancy: Being a linguist (well, I think still philologist, but anyway) definitely appears to increase the quality of the constructed languages you invent

17:17 bbloom: brehaut: *cringe*

17:17 brehaut: cemerick: it would have been more awesome if the farm of humans was not just me

17:17 cemerick: The last job I had had a QA person that ran through two binders of printed tests before each release.

17:17 hcumberd`: if you create interfaces (html/css/js) how do you do the layout?

17:18 brehaut: hcumberd`: in a pool of tears

17:18 hcumberd`: What components do you use in general? I've seen the JQuery UI things

17:18 brehaut: ;)

17:18 AimHere: llasram > How do you explain Perl then?

17:19 hcumberd`: brehaut: table layout + I <3 java.util.Calendar

17:19 brehaut: cemerick: i think i know what the stockholm syndrome feels like

17:19 technomancy: this one looks legit too: http://www.omniglot.com/writing/dni.htm

17:19 hcumberd`: Remembering tshirts ;)

17:19 cemerick: brehaut: it's particularly pernicious when you're getting paid by 'em

17:19 llasram: AimHere: Huh. I did not know that. Well. That explains... something?

17:20 bbloom: one other interesting bit about TypeScript: It exposes "services" for IDEs. C#, VB, and F# are getting comparable services too. these are like clojurescript's analyzer in that you can use them as libraries to understand and manipulate source code. interestingly, however, these are "live" services in that they do stuff like incremental compilation and error recovery so they can provide IDE features while you're working like red squiggly underlines. the

17:20 architecture is probably worth studying

17:20 * technomancy has fond memories of decoding the D'ni base-25 numerals

17:21 bbloom: and, gloriously, the project uses git: https://git01.codeplex.com/typescript

17:22 brehaut: hcumberd`: table layouts are also known as "Im too lazy to actually learn how this technology works, so im going to hack it and then 6 months later when i have an unmamagable pile of excrement, i'm going to go onto twitter and bitch about how bad CSS is"

17:23 hcumberd`: brehaut: you made my day

17:24 bbloom: brehaut: CSS is bad… at application layout use cases

17:24 hence the various proposals to fix that

17:24 brehaut: bbloom: oh yeah, dont get me wrong. CSS can be an utter nightmare, but i do get sick of people who never bothered to learn it bitching about it

17:24 hcumberd`: bbloom: render .png images with the whole page

17:24 fixes all layout errors

17:24 looks the same in all browsers

17:25 bbloom: hcumberd`: and it's a perfectly reasonable strategy for a very large number of use cases!

17:25 hcumberd`: that's the future, I'm sure. Just like windows 2000

17:25 cemerick: s/png/svg

17:25 fixed that for you

17:25 bbloom: as long as you have copy pastable text over it :-P

17:25 Kowboy: my WYSYWIG editor is Photoshop

17:25 brehaut: my wysiwyg editor is nano; i serve all my pages as text

17:26 hcumberd`: I'll just write XML directly to the browser 4 better user experience

17:26 my wysiwyg editor is emacs

17:27 brehaut: hcumberd`: the long version re:layout is that theres no one solution anyone can recommend because it depends hugely on the application. its a case of whackamoling the suck of JS libs to find one that suits

17:27 hcumberd`: I'm happy with emacs as operating system

17:28 holo: how can i highlight the exceptions thrown from forms implemented inside the project root?

17:28 i mean highlight with a color e.g.

17:30 nDuff: Anyone know offhand if squarepeg supports left recursion?

17:38 mthvedt: nduff: skimming the source, doesn't look like it

17:38 nDuff: Hrm.

17:38 * nDuff has a grammar written against Python's Parsley library (an OMeta-based PEG generator) he's looking to port.

17:39 bbloom: nDuff: I looked around for a OMeta-inspired parser for clojure and wasn't too happy with what i found

17:39 mthvedt: i don't trust this library… the author thinks pegs are a superset of CFGs

17:39 bbloom: lots of decidedly un-clojury libraries

17:40 mthvedt: i'm working on what i hope is a clojurey CFG library

17:40 jballanc: someone should just port Ian Piumarta's peg/leg to clojure

17:40 mthvedt: i wouldn't recommend it for anything important in its current state however

17:41 bbloom: mthvedt: publish a gist or refheap or something and maybe some folks will give you some feedback on the API

17:41 i was looking for something where the grammar is *just data* maybe with a nice macro on top for the common use cases, but everything seemed extremely applicative style

17:42 mthvedt: bbloom: https://github.com/mthvedt/clearley#example

17:42 bbloom: mthvedt: looks interesting

17:43 why does each line of the rule have an extra set of () ?

17:43 hcumberd`: How to render nice charts in clojure? Or better in Javascript?

17:43 bbloom: hcumberd`: lynaghk is working on some stuff

17:44 hcumberd`: he's the clj visualization pro. try his http://keminglabs.com/c2/ project or talk to him about c2po

17:44 hcumberd`: already available on github?

17:45 wow, that's nice

17:45 Does clojurescript work well with JQuery/JQueryUI/JQueryMobile ?

17:45 mthvedt: bbloom: those are parse action bodies

17:45 oh

17:45 i see what you mean

17:45 AimHere: For javascript, there's d3.js, which I think lynaghk originally tried to clojurify

17:45 bbloom: mthvedt: yea, but they seem to always be pairs

17:46 mthvedt: bbloom: i think i wanted something similar to clojure defn for multiple arities

17:47 bbloom: '{sum [[sum \+ term] (+ sum term), [sum \- term] (- sum term), [term] term]}

17:47 where the commas are new lines

17:47 similar to let bindings

17:47 and defrule could just be syntactical sugar

17:48 technomancy: huh; I didn't realize the Elm guy works at google

17:48 mthvedt: that's more or less what the grammar data structure looks like under the hood

17:48 bbloom: mthvedt: expose the data structure :-)

17:49 mthvedt: pegs enable composable grammars!

17:49 mthvedt: hope to do that when i'm done :P

17:49 bbloom: i want to be able to (apply merge grammars)

17:49 :-)

17:49 mthvedt: bbloom: pegs are not composable in the sense that if you have grammar g1 describing language l1, and g2 describing l2

17:50 that g1 * g2 describes l1 * l2

17:50 bbloom: mthvedt: i know, i was (sorta) kidding

17:50 but if the production names are symbols with namespaces, then you COULD merge them

17:50 but you still need to insert rules to allow embedding the grammars

17:51 brehaut: pltgames.com looks like it could be fun over the holiday period

17:51 bbloom: so after (apply merge grammars) you could (insert-rule grammar 'lang-a/foo … 'lang-b/bar …)

17:52 mthvedt: that's a good idea

17:52 bbloom: i wasn't at the conj, but somebody told me that the rally cry was "DATA ALL THE THINGS"

17:52 * bbloom agrees

17:53 technomancy: bbloom: that wasn't just this conj =)

17:53 cemerick: I think there were at least four slides with that exact meme on them

17:53 clojurebot: qcon slides is http://qconlondon.com/london-2009/file?path=/qcon-london-2009/slides/RichHickey_PersistentDataStructuresAndManagedReferences.pdf

17:54 cemerick: A couple with that odd stick figure with a match as well

17:54 bbloom: clojurebot: that is a completely unrelated, but entirely useful link

17:54 clojurebot: Alles klar

17:54 bbloom: clojurebot: i have no idea what that means.

17:54 clojurebot: your idea of vars, symbols, and scoping is wackadoodle

17:54 bbloom: lol

17:54 ~botsnack

17:54 technomancy: cemerick: the author of that comic goes to the coffee shop I usually work from

17:54 clojurebot: thanks; that was delicious. (nom nom nom)

17:55 brehaut: haha i fear that one might have been my fault somehow

17:55 cemerick: technomancy: oh? I figured it was a 4chan thing

17:56 brehaut: cemerick: is that necessarily mutually exclusive?

17:56 technomancy: cemerick: http://hyperboleandahalf.blogspot.com/ <- grep for coffee

17:56 cemerick: I am forever hopelessly behind on internet memes and slang.

17:56 brehaut: thats why we have technomancy

17:56 bbloom: cemerick: http://knowyourmeme.com/memes/x-all-the-y

17:56 technomancy: brehaut: not memes, just comics

17:57 anyway this place has an espresso blend named after her

17:57 brehaut: technomancy: oh. i had just assumed funny pictures in general

17:57 amalloy: technomancy: oh, you run into allie at the coffee shop? so she hasn't like, crawled into a hole to die?

17:59 technomancy: amalloy: I haven't met her yet, I just keep noticing "Allie's Extreme Laser Blend" and the owner mentioned her once

17:59 I did meet the Oatmeal at my other favourite coffee shop,

17:59 (which is almost the same thing)

18:00 brehaut: I have not been to a coffeeshop with multiple blends in a long time

18:00 bbloom: well if she lives in seattle, maybe it explains why her blog talks about her being depressed for no reason

18:00 i'm moving out of this city because i just can't take the gray winters any more....

18:01 technomancy: dunno, I got depressed living in LA because it never rained or had clouds.

18:01 bbloom: heh. are you from seattle?

18:01 i know you live here now

18:01 technomancy: I grew up in the tropics

18:01 brehaut: solution: all clojurists should move to new zealand and we can have conj '13 here

18:02 technomancy: I still really miss warm rain

18:02 dsantiago: technomancy: Where in the tropics?

18:03 technomancy: dsantiago: Indonesia

18:03 cemerick: technomancy: surprised you didn't end up in Boston, where every single kind of possible weather can be experienced. :-P

18:03 dsantiago: Ah. Interesting that Seattle suits you better than LA.

18:04 technomancy: couple years in LA and I discovered "The Golden State" is a euphemism for "it's mostly brown"

18:04 cemerick: but I'm a wimp when it comes to the cold

18:04 Raynes: technomancy: You're killing my moving-to-LA buzz.

18:04 technomancy: 3-4 snowy days a year is just perfect for me

18:05 Raynes: it's not so bad if you don't stray more than a few hundred meters from the water =)

18:05 can't afford to do that with a family though

18:05 dsantiago: Raynes: As I always say, LA sucks, don't move here.

18:05 cemerick: technomancy: Heh, Bostonites are a bit wimpy. Head two hours west or north, then you'll start seeing real winter.

18:05 Raynes: technomancy: I plan to live in a Submarine.

18:05 dsantiago: Shush.

18:06 technomancy: dsantiago: it was worse when I was there since the only tech jobs were in entertainment or defense

18:06 Raynes: dsantiago: You know you want me there. Life is meaningless without me.

18:06 brehaut: seriously guys: new zealand

18:06 cemerick: If you aren't accumulating icicles in your eyebrows, you're doing it wrong.

18:06 brehaut: you can live by the beach for cheap

18:06 technomancy: I drove across town for a Ruby meetup with a friend and when we arrived there was one other guy

18:06 brehaut: and still be relatively close to snow

18:06 dsantiago: Raynes: My point is, the biggest problems in LA are there are too many people here.

18:06 Raynes: Can't we kick a few out when I get there to make room?

18:07 cemerick: brehaut: Sounds nice, but aren't the clamps required to keep from falling off the bottom of the world a drag?

18:07 technomancy: dsantiago: I thought the root problem was the idea that building a city in the middle of the desert could even work?

18:07 dsantiago: That's what you didn't like about LA?

18:07 hiredman: cemerick: and the expense for helmets to avoid dropbear concussions? forget about it

18:07 Raynes: Las Vegas works.

18:07 brehaut: cemerick: nah, most of us who were born here develop really strong toes

18:07 technomancy: dsantiago: I was further inland

18:08 brehaut: hiredman: theres a ditch between us and the drop bears; its roughly as wide as cali is long.

18:08 cemerick: dsantiago: LA has nothing on NYC re: population; whatever problems there are, it can't be that

18:08 dsantiago: cemerick: Yeah, but Nyc copes with it better with public transport and dense urbanness. LA is a sprawling suburban city of just as many people and the main transport is cars.

18:09 hiredman: brehaut: I choose to believe that the wild wallabies released in to the wild in new zealand have become drop bears through covergent evolution

18:09 dsantiago: I mean, NYC has its own problems as well of course. Obviously I prefer LA overall.

18:09 brehaut: hiredman: thats a terrifying thought

18:10 nDuff: ...prefer... LA?!

18:10 cemerick: hiredman: when I emerge from the wikipedia tour that this dropbear lookup will surely provoke, I shall curse you.

18:10 * nDuff finds that a hard thing to grok

18:10 zodiak: hey! LA is an awesome city

18:10 dsantiago: nDuff: Good! Don't move here!

18:10 zodiak: at least in LA, if people don't like you, you know it. Unlike SF

18:10 Raynes: zodiak: That's what I'm talking about!

18:10 hiredman: "Drop bears are commonly said to be unusually large, vicious, carnivorous koalas"

18:10 nDuff: zodiak: that's true. Can't say I'm a fan of SF either.

18:11 zodiak: LA is honest, brutally so, jst don't drive and stick near either Venice/Culver City/Santa Monica or out near the foothills (Arcadia etc)

18:11 nDuff: ...last time I hired someone from LA, he took a long vacation after his best friend was killed in a drive-by.

18:11 zodiak: ouch!

18:11 * nDuff also is a fairly committed cycle commuter, so the sprawl thing doesn't work.

18:11 cemerick: SF appears to be a large dumpster out of which people have built a city.

18:11 zodiak: yeah.. you don't want to try to drive across town for a job in LA. that's a fair point.

18:12 technomancy: I have some friends still there who do that, and it's kind of sad

18:13 zodiak: ouch, yeah, I tried to commute between Arcadia and Santa Monica a while back. 2 hours one way (worst case).

18:13 not good.

18:13 dsantiago: Yikes.

18:14 brehaut: ◎_◎

18:14 my longest commute has been 40 minutes on foot

18:14 i cannot fathom driving for 2 hours a day

18:14 * nDuff is considering Chicago with its mass transit being a major draw.

18:15 muhoo: cemerick: wow, really?

18:15 zodiak: brehaut, well, sometimes it was 4 hours :(

18:15 brehaut: zodiak: i literally cannot fathom that

18:15 nDuff: (also, flatness, population density, aggressive bike/ped plans...)

18:15 dsantiago: nDuff: Just moved to LA from Chicago earlier this year.

18:15 zodiak: nDuff, chicago is not bad, but yeah, you want to live near the workplace. move if you have to ;)

18:16 brehaut: admittedly the entire population of new zealand is smaller many american cities

18:16 technomancy: I was on the train an hour each way for a couple years in high school and swore never again.

18:16 zodiak: brehaut, it was.. brutal. I won't lie.

18:16 technomancy: even then, the train is way better than driving

18:16 * nDuff has ~30 min of train in Austin, with a spot of cycling on either end

18:17 nDuff: ...but another 30min would be fine. I mean, some time with reading material / personal electronics is pleasant or productive, depending on what one's doing.

18:18 technomancy: I could do 30 min if it's a straight shot

18:19 transfers wreck any chance at concentration though

18:19 nDuff: *nod*.

18:19 A few of the potential post-move job leads I have in mind are telecommute, which would make the commute only to the most conveniently-located coworking space.

18:19 * nDuff used to be able to work well in isolation, but hasn't done that well in years.

18:26 technomancy: nDuff: that's what IRC is for =)

18:26 Bergle_1: ooh a lighttable update.

18:28 ivaraasen: technomancy: an hour each way must have been really painful

18:29 technomancy: ivaraasen: I'm sure lots of people even in here go further

18:32 ivaraasen: technomancy: a friend of mine used to commute 1100 kilometers, although not daily

18:32 technomancy: well when I was in Singapore I literally commuted from one end of the country to the other

18:33 ivaraasen: intense

18:36 I will probably be living 1.5k kilometers from where I'm going to work myself. luckily it's a two-four system, so you get four weeks off after working two weeks

18:38 * nDuff grumbles about nrepl.el injecting a whole bunch of empty lines into his interactive REPL buffers and their history.

18:39 ivaraasen: nDuff: due to hitting enter and having open parentheses?

18:40 nDuff: I haven't noticed myself making that mistake.

18:40 ...it happens when executing complete, functional lines -- they eval, but print a bunch of whitespace after them.

18:40 ...sometimes.

18:40 * nDuff suspects that they're injected after other code, involved in autocomplete or such, is run.

18:40 * hcumberd` is going to bed now

18:44 [1]abp: Can I somehow find all the ubound symbols in a given body of code with a macro? i.e. (some-macro (let [a 1] (+ a x)) finds x to be not bound in that context.

19:00 cemerick: muhoo: really, what?

19:10 seangrove: What's the best way to get a remote repl in cljs?

19:11 hiredman: https://github.com/hiredman/nrepl-cljs-middleware https://github.com/hiredman/drawbridge-cljs

19:11 depends what you mean by remote repl

19:13 seangrove: hiredman: Yes, on reflection, I just meant 'repl' :)

19:13 Checking out drawbridge

19:14 brehaut: afternoon talios

19:14 talios: 'lo

19:16 brehaut - hows the weather your end of the world?

19:16 brehaut: talios: dark and thunderous

19:17 bucketing down? better in orcland?

19:17 talios: I have fog and torrents of rain, but no thunder/lightening yet

19:17 tornado out henderson just ripped up damage

19:17 brehaut: hurrah summer!

19:17 far out, again?

19:18 talios: brehaut - http://www.nzherald.co.nz/nz/news/article.cfm?c_id=1&objectid=10852307

19:18 brehaut: climate change is a bitch

19:19 * talios just found out how old the coffee-girl is over the road, now I feel creepy ;[

19:19 brehaut: ha

19:19 Norgelys: hola

19:20 talios: hail!

19:21 brehaut: here that americans? you could be missing out on weather like this if you're country had summer now too

19:22 holo: brehaut, that sound like chinglish

19:22 brehaut: english is my first language

19:22 im just really bad at it

19:23 holo: oh.. sorry. i thought you were quoting some funny sentence

19:23 brehaut: nope, that was all my failure

19:23 as soon as i pressed enter i realised i had written a disaster

19:23 holo: >.>

19:24 seangrove: "I had written a disaster"

19:24 Very nice :)

19:25 talios: brehaut - damn, just heard from a co-worker there was a fatality from the tornado

19:25 holo: brehaut, so that's why the preference for low syntax languages :)

19:25 seangrove: Hrm, I'm in a rhino-cljs repl using nrepl.el - how do I get out of the cljs repl and back to clj?

19:25 brehaut: talios: shit :(

19:25 talios: brehaut - not public knowledge but was on the fire-radio ( he's a volunteer firedude/marshall whatever)

19:26 brehaut: talios: well, its on the internet now

19:26 talios: DELETE^H^H^H^H^H^H^H^H^Hshit

19:27 seangrove: cljs.user> :cljs/quit => :cljs/quit

19:27 Type `:cljs/quit` to stop the ClojureScript REPL

19:27 Not quite, I think...

19:27 brehaut: talios: stuff is reporting 2 dead

19:27 Norgelys: hello

19:29 talios: brehaut - i thought clojure was your first language

19:29 brehaut: lol

19:30 cemerick: brehaut: didn't you hear? We get shit like that, then a blizzard the next weekend.

19:30 talios: cemerick - then move to NZ with us - NO BLIZZARDS!

19:30 bliss

19:30 * cemerick <3's snow

19:31 brehaut: we have snow too

19:31 just not where talios is

19:31 talios: damnit WE HAD SNOW LAST YEAR

19:31 brehaut: what, really‽

19:31 in auckland?

19:31 cemerick: You can't be a flinty New Englander without being thinking that snowshoeing in 0ºF is a good time.

19:31 talios: technically it wasn't snow ( http://www.nzherald.co.nz/nz/news/article.cfm?c_id=1&objectid=10745187 )

19:32 cemerick: talios: how are things your way?

19:32 brehaut: cemerick: from the part of New Zealand im from we have snow but not snowshoes. its more a case of falling on your arse a lot

19:33 cemerick: oh, we have that too :-D

19:33 Norgelys: por q ablan ingles

19:34 cemerick: The first morning after I bought the titanium macbook pro (~2002, I think?), I slipped on my way out to the car and landed on the damn thing. Torqued the case but good.

19:35 lynaghk: brehaut: are you still based in New Zealand? I'll be there for all of January and wouldn't mind meeting up with some Clojure folks.

19:35 talios: cemerick - things are good, just wet :)

19:35 brehaut: lynaghk: talios and I both are

19:36 talios: lynaghk - awesome - Auckland here - you can join us for a podcast :)

19:36 of course - I'll have to kidnap and coerce brehaut into joining as well

19:36 brehaut: haha

19:36 lynaghk: brehaut, talios: I would love to do that! I'll be there (in Auckland) towards the end of December. talios, mind if I email you?

19:37 talios: lynaghk - sure - mark @ talios.com

19:37 brehaut: lynaghk: end of dec/jan is a pretty busy but id be open to doing something

19:38 lynaghk: cool! I'll ping you both. Nothing like esoteric programming languages to make new friends around the world =)

19:38 talios: I'm heading to Napier end of december and first week of Jan ( back on the 4th )

19:38 and back eve

19:38 even

19:38 brehaut: talios: if we could organise something in the CBD its much easier for me to make it as i can just grab a bus both ways

19:38 seangrove: Getting an error trying to use cemerick's piggieback cljs-repl: https://www.refheap.com/paste/7331

19:39 cemerick: seangrove: I think that's an old ClojureScript bug. What rev are you using?

19:39 talios: any one know if La Clojure has been updated for IntelliJ IDEA 12 at all?

19:39 cemerick: La Clojure is deadpooled as far as anyone can tell.

19:40 oh, lookit that, it's on github now

19:41 seangrove: Let me check... using cljsbuild 0.2.9 which I believe is tied to a specific version of cljs

19:41 cemerick: talios: Looks like 12 compat is on master: https://github.com/JetBrains/la-clojure/commits/master?page=2

19:41 talios: cemerick - yeh - coworker just mentioned that, it gets compat updates but no real improvement/features

19:41 cemerick: ah

19:42 well, perhaps that's where the abandonware impression I've heard about from various people (incl. you now) comes from

19:42 brehaut: talios: ram is cheap, just run ccw/eclipse as well :P

19:43 talios: mmmm, can I run a headless eclipse/ccw via Idea

19:43 cemerick: buh?

19:43 sounds like eclim

19:43 (which doesn't work on OS X :-(

19:44 talios: eclim yeh :) I'm sure we could write a IDEA wrapper

19:44 oh really? poo

19:44 seangrove: Is cljsbuild 0.2.9 pretty far behind Clojurescript at this point?

19:45 cemerick: seangrove: no, but it's not tied to anything

19:45 it uses whatever is set in :dependencies

19:45 I have no idea what its default is though

19:45 seangrove: Ah, so there's a way to easily get cljsbuild to use a different version of cljs?

19:46 brehaut: im not sure i understand what a headless eclipse would be?

19:46 cemerick: just as a dependency, as with any other clojure lib

19:46 brehaut: eclipse that you interop with to drive another environment (e.g. gvim)

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

19:46 lazybot: java.lang.RuntimeException: No such namespace: json

19:47 aamar: Is clojuredocs still being maintained?

19:51 technomancy: aamar: there is work underway on a replacement

19:51 or next-gen version I guess

19:52 the backend is all there but they need someone to do the web UI

19:52 muhoo: cemerick: hatin' on SF?

19:52 aamar: technomancy: cool, good to hear. Are they looking for help?

19:52 technomancy: aamar: I believe so

19:53 * technomancy points aamar in the general direction of dakrone

19:53 cemerick: muhoo: SF is okay; just not particularly clean when I was there

19:53 technomancy: aamar: actually just join #clojure-doc

19:54 aamar: technomancy: cool, thanks as always!

19:54 technomancy: sure thing. it would be great to get some movement on that front.

19:54 and to get off rails =\

19:55 muhoo: cemerick: the wind blows litter around, true. but for dirty, i grew up around NYC, and nowhere in california is as dirty as i remember manhattan or da bronx being.

19:55 technomancy: a number of the sidewalks there smell like poo

19:55 cemerick: where, there?

19:55 qubit[01]: whats SF ?

19:55 technomancy: in SF that is

19:55 muhoo: dog piss, actually. the last months of summer before the rains start.

19:55 cemerick: yeah, that was my impression

19:56 qubit[01]: theres a good joke in here

19:56 technomancy: muhoo: pretty sure some of it is human =(

19:56 muhoo: oh, heroku office is in SOMA ? :-)

19:56 yeah, that'd be human.

19:56 cemerick: SF reminds me of NYC when we visited there ~1985/86

19:57 muhoo: it doesn't rain all summer. by october, it can get bestial. rains come and clean everything up.

19:57 qubit[01]: , (define bestial)

19:57 clojurebot: #<CompilerException java.lang.RuntimeException: Unable to resolve symbol: define in this context, compiling:(NO_SOURCE_PATH:0)>

19:57 cemerick: Manhattan is really wonderful. Never had the pleasure of the bronx, tho.

19:57 muhoo: i see what's going on. tech guys, visiting moscone, SOMA, market st, mission, TL, that's the grimer areas

19:58 technomancy: muhoo: yeah I don't understand the mindset that makes those go hand-in-hand

19:58 muhoo: cheap rent, i'd suppose.

19:59 s/cheap/not-quite-so-outrageous/

19:59 technomancy: maybe for the really early-stage startups

19:59 which I guess set the trends for the more established ones =)

19:59 muhoo: exactly. it acquires a hipster patina. if you want the good people, you got to roll with that.

20:00 technomancy: someone told me it's the same reason low-slung pants became hip

20:00 because when you get out of prison they don't give you your belt back

20:00 brehaut: lol

20:00 technomancy: and everyone wants to emulate the gangsters

20:00 qubit[01]: bestial, patina - I want to learn from you

20:00 muhoo: qubit[01]: i have nothing on technomancy in terms of erudition

20:01 technomancy: except in SF it's quaffing ramen instead

20:01 qubit[01]: good lord

20:01 technomancy: heh

20:01 brehaut: 'ramen' is american for instant noodles right?

20:02 technomancy: japanese, actually

20:02 muhoo: brehaut: http://en.wikipedia.org/wiki/Ramen

20:02 brehaut: technomancy: that makes more sense

20:02 muhoo: shit, now i'm hungry

20:03 brehaut: muhoo: the pictures in that article look like real food. is that what people mean when they talk about eating ramen at startups, or do they just mean noodles and broth?

20:04 muhoo: probably mean packaged instant version, yes. very, very cheap.

20:04 college food

20:04 sorry, uni :-)

20:04 qubit[01]: noodles and broth, many a college nights

20:04 brehaut: muhoo: haha thanks :)

20:05 berdario: Hello, I'm trying to understand what's the best way to debug code under clojure

20:05 something along the lines of python's pdb

20:05 brehaut: muhoo: my first year of uni was largely instant noodle and crap coffee fuelled

20:05 berdario: I'm looking at cdt, but it doesn't have any installation instructions

20:05 seangrove: Is there a way to get this to work? https://www.refheap.com/paste/7335

20:06 (< min value max), given that min or max could be nil

20:06 technomancy: berdario: if you can work mostly in terms of referentially-transparent functions you don't need a debugger

20:06 amalloy: brehaut: ramen in america usually means instant ramen, but there are actual reputable ramen restaurants as well

20:06 seangrove: I could put the three in a list, filter for nil, and then pass it to <, I suppose

20:06 technomancy: that said, there are definitely times that's not feasible.

20:06 berdario: I guess I could try to add it to a project.clj, but this code doesn't have one

20:07 technomancy: berdario: it seems like ritz is the most polished option for debugging

20:07 brehaut: seangrove: you could apply defaults for :min and :max in your desctructuring

20:07 berdario: technomancy: I need to traverse the stack

20:07 seangrove: brehaut: Ah, yes, that's much better, thank you

20:07 berdario: technomancy: thanks, I'll look into that

20:07 technomancy: berdario: you mean examining locals all the way up? pretty sure ritz does that.

20:07 berdario: technomancy: btw... maybe you can also suggest me a better approach this time

20:07 technomancy: swank-clojure has it too

20:08 berdario: I'm looking at the clojurescript sources

20:08 brehaut: seangrove: also, :keys [min max]

20:08 berdario: and I cannot find where closure/-compile is defined

20:08 technomancy: berdario: sorry; never used clojurescript

20:08 berdario: (I tried a grep over the whole sources)

20:08 brehaut: {:keys [min max] :or {min 0 :max 10}} for instance

20:08 seangrove: ^

20:09 seangrove: brehaut: Ah, perfect, I was just googling for the syntax

20:09 I can never remember the syntax for default arguments

20:09 brehaut: http://clojure.org/special_forms#binding-forms ;; seangrove

20:09 berdario: technomancy: ok, but it's still clojure code... do you have any idea of why the declaration might not pop up anywhere?

20:09 technomancy: it's really not

20:09 berdario: technomancy: clojurescript it's implemented in clojure

20:10 seangrove: brehaut: Thanks

20:10 berdario: technomancy: I'm not interested in clojurescript code: I'm interested in the clojure code that compiles the clojurescript code

20:10 technomancy: yeah, but closure is a javascript compiler

20:10 berdario: technomancy: I know, but there's a closure.clj file... and I can't find a -compile inside of it

20:13 arohner: technomancy: when do you expect the next lein2 release?

20:13 technomancy: arohner: depends on how long it takes the new clojars releases to get reasonably populated

20:13 I haven't looked at the numbers since the conj

20:14 brehaut: technomancy: new clojars is available somewhere?

20:14 technomancy: brehaut: yeah, no real docs though =\

20:14 arohner: technomancy: oh? the next lein will break people downloading from old clojars?

20:14 technomancy: http://releases.clojars.org/

20:14 berdario: ugh, ritz doesn't have any documentation :/

20:15 maybe ritz-nrepl is what I'm looking for?

20:15 technomancy: arohner: it will change the default, yeah. using the old repo will require explicitly declaring it

20:15 brehaut: technomancy: do library developers need to do anything specific to publish to it?

20:15 technomancy: brehaut: due to some horrible concurrency bugs surrounding sqlite the process is currently manual =(

20:16 brehaut: technomancy: its almost like you said SQLite there but i must have misheard

20:16 technomancy: wasn't my idea =(

20:16 brehaut: if you log in and view a jar you own you can either click "promote" or it will show a list of reasons it's not qualified for promotion

20:17 brehaut: technomancy: is hall do that then

20:17 oh boy. lots of badness

20:17 technomancy: that'd be tops

20:18 brehaut: im a little surprised that its not pulling me up for having a project with an implicit group id

20:18 technomancy: that's standard issue for clojars

20:19 it should probably yell at you if you try to promote an org.clojars.* group-id though

20:19 brehaut: technomancy: real question is, should i be fixing that

20:19 technomancy: not unless it's a name that's likely to conflict

20:20 please don't do this: https://github.com/amitrathore/conjure

20:20 brehaut: technomancy: mind if PM you?

20:20 technomancy: sure

20:21 muhoo: you're running sqlite multi-threaded? :-O

20:22 technomancy: muhoo: apparently it's not a problem inherent in sqlite, just in the jdbc adapter

20:22 you can have concurrent access as long as it's from a single process

20:23 basicsensei: what am I missing when I use :aot [memorystone.s] in project.clj and lein jar includes everything as .class including all project dependencies and every project namespace

20:23 (with some lein2 from master)

20:23 (in other words it's like :aot :all)

20:24 hiredman: :aot is transitive

20:24 technomancy: basicsensei: the clojure compiler doesn't support AOTing a namespace without AOTing what it requires

20:24 hiredman: so anythign you require, or cause to be loaded in some other way (including code from other libraries) will be be emitted as class files to disk

20:25 technomancy: basicsensei: leiningen includes some mechanism for deleting those after compilation (see `lein help sample`) but there is no way to avoid compiling them

20:26 basicsensei: alright, so even if I'm not explicitly using the project dependencies in any way in that namespace (in :aot) ie. if I just have (ns memorystone.s) then some prn it will still want to include those dependencies

20:26 ok I'll take a look at that thanks

20:27 talios: really should add support for automatically cleaning them up to the maven plugin - been meaning to do that for ages

20:27 technomancy: talios: it breaks pretty wretchedly with protocols and records

20:27 hiredman: basicsensei: no, that should not be the case

20:27 technomancy: talios: clojure can't fall back to the JITted version of protocols like it can for regular defns

20:27 talios: technomancy - ug *yay*

20:28 basicsensei: lein help sample shows this line "../../../sample.project.clj"

20:28 technomancy: I had it on by default for one release and didn't notice it because I don't use protocols; that didn't last long

20:28 basicsensei: uh oh. are you running a release or from source?

20:28 talios: you don't use protocols? interesting

20:28 hiredman: basicsensei: if all you have in the file is (ns memorystone.s (:gen-class)) (def -main [& _] (println "hello world")) it should not generate class files for anything else

20:28 talios: just not of use in what your using, or some other reason?

20:28 basicsensei: technomancy: it's a compiled as .jar master (not latest though)

20:29 hiredman: I'll (re)check that

20:29 technomancy: basicsensei: on Windows?

20:30 basicsensei: technomancy: yes

20:30 technomancy: talios: well I don't have any need for writing polymorphic functions

20:31 basicsensei: hiredman: I have the feeling that I'm missing a prior lein clean?

20:31 technomancy: basicsensei: ok, in that case it's a known bug

20:31 shouldn't be an issue on a stable release

20:31 basicsensei: oh

20:32 technomancy: or at least, when I do need polymorphism it's not dispatched on the class of the first argument.

20:32 basicsensei: hiredman: you were right it works as you said, I just had to lein clean

20:35 excellent that's what I was really missing in my first question: lein do clean, jar

20:35 what I had was leftovers from :aot :all

20:39 berdario: I still haven't a debugger

20:39 but I realized just now that I could've done (source closure/-compile)

20:40 basicsensei: can aot a gen-class implementing a class which has since been recompiled? getting IncompatibleClassChangeError

20:41 seangrove: hm, how can I have js->clj make keywords from the strings?

20:41 basicsensei: ie. I have this :implements [org.bukkit.plugin.java.JavaPlugin] but JavaPlugin appears to be newer when my code gets executed, ie. maybe it's not the same one that I had in project dependencies

20:43 berdario: nrepl-ritz is calling the wrong shell -_-

20:46 holo: random remark: it seems a defmulti- there is not :(

20:48 brainproxy: holo: you can still mark it private, just a sec, finding the syntax

20:49 holo: hi brainproxy! thank you again

20:49 brainproxy: holo: (defmulti ^:private ...)

20:49 holo: oh, that's cool

20:50 basicsensei: awesome

20:50 brainproxy: same thing can be done with plain def, since there's no def-

20:50 holo: greatness

21:07 basicsensei: are we expected to use clojure classloader to load a gen-class that implemented a java class? I wonder if that's why it fails with IncompatibleClassChangeError or is something else I'm missing

21:20 aphyr: What's the best way to extract a line number from a LispReader$ReaderException?

21:21 Am I really supposed to use reflection hacks?

21:29 technomancy: aphyr: I think in 1.5 it uses ex-info but no idea before that

22:16 gfredericks: is 4clojure open-source?

22:17 bbloom: gfredericks: read the home page

22:17 gfredericks: that has got to be my most blatantly unresearched question ever.

22:17 brehaut: https://github.com/4clojure/4clojure

22:17 bbloom: hence the blatant RTFM equivalent response

22:18 gfredericks: totally appropriate

22:18 jyu: hello

22:18 gfredericks: brehaut should be ashamed of himself for not being more dismissive

22:18 brehaut: gfredericks: i cant answer the hard questions, so i take what i can get

22:18 jyu: is it possible to figure out the code coverage along with midje

22:21 gfredericks: dangit now I need to learn about mongo.

22:22 brehaut: gfredericks: i have a video about that somewhere

22:23 muhoo: hahahaha

22:23 something about it being web scale?

22:23 brehaut: that'd be it

22:23 two bears having an informative discussion

22:23 gfredericks: those bears have an awful lot of informative discussions

22:23 muhoo: i weep for the damage that has been done to the reputation of that product by that hilarious video.

22:23 brehaut: haha

22:24 muhoo: it's probably a really good product. but so hard to take seriously now without willfully putting that video out of my mind.

Logging service provided by n01se.net