#clojure log - Jan 25 2013

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

0:01 tomoj: &(#'+ 1 2)

0:01 lazybot: ⇒ 3

0:02 rationalrevolt: Doing (+ 1 2) or (#'+ 1 2) gives the same result - but, i'm not seeing whats different

0:03 (+ 1 2) would look up the symbol to obtain the var and then invoke it with the arguments

0:04 tomoj: yes, but if you do e.g. (run-jetty handler ...), handler is resolved to #'handler, but the var's value, your handler fn, is passed to run-jetty

0:04 if you redef #'handler later, run-jetty will still have the old fn

0:04 rationalrevolt: (#'+ 1 2) expands to ((var +) 1 2) and (var +) is doing a lookup of + each time (#'+ 1 2) is eval'd - is this correct?

0:06 tomoj: when you (run-jetty #'handler ...), the thing passed to run-jetty is the var, not the fn it points to. when the var is invoked as a function it just invokes whichever fn the var currently points to

0:08 rationalrevolt: alright

0:10 but, what is it thats happening when i reload the namespace - doesnt my handler get associated to a new var and not the var that was passed to run-jetty earlier?

0:12 amalloy: no, it's the same var with a new value

0:13 rationalrevolt: alright

0:13 but, this would only work int the same thread where run-jetty was executed in, correct? i.e. the repl thread

0:14 if some other thread was passed the same var, that var wouldn't get refreshed when i reload the namespace on the repl - since its thread-local?

0:16 or i may be wrong, since def's update the root binding?

0:18 amalloy: yes, you are wrong

0:23 rl: man, just started in clojure the other day and i'm loving it =)

0:27 brainproxy: tomoj: a workaround seems to be set the "Expires" header to "0" using a piece of middleware

0:27 I tried just about everything else w/ no joy :p

0:28 but I consider it better than sticking a nonce in the client-side logic

2:48 alexbaranosky: hello fellow nerds

2:49 ejackson: good morning, sir.

3:08 AtKaaZ: hey guys, how do you write this in clojure? getStackTraceDepth = Throwable.class.getDeclaredMethod("getStackTraceDepth");

3:12 broquaint: (let [getStackTraceDepth (.getDeclaredMethod (.class Throwable) "getStackTraceDepth")] ...)

3:12 I guess.

3:12 When in doubt, use the docs - http://clojure.org/java_interop

3:12 AtKaaZ: thing is, I'm getting this: IllegalArgumentException No matching field found: class

3:13 do I need an import or something?

3:13 broquaint: What does the your code look like?

3:13 AtKaaZ: ,(.class Throwable)

3:13 &(.class Throwable)

3:13 lazybot: java.lang.IllegalArgumentException: No matching field found: class for class java.lang.Class

3:16 broquaint: Do you mean getClass? http://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html

3:16 ChongLi: ,(class Throwable)

3:17 &(class Throwable)

3:17 lazybot: ⇒ java.lang.Class

3:17 AtKaaZ: that makes sense ChongLi

3:19 &(.getDeclaredMethod (class Throwable) "getStackTraceDepth" nil)

3:19 lazybot: java.lang.NoSuchMethodException: java.lang.Class.getStackTraceDepth()

3:19 AtKaaZ: that's what I want, but meh it should work, even if it's package protected method right?

3:20 oh wait

3:20 &(.getDeclaredMethod Throwable "getStackTraceDepth" nil)

3:20 lazybot: ⇒ #<Method private native int java.lang.Throwable.getStackTraceDepth()>

3:20 ChongLi: yeah

3:21 AtKaaZ: lol I failed so badly, thanks guys

3:21 broquaint: np :)

3:21 ChongLi: a class of a class is just a superclass I guess

3:22 AtKaaZ: yeah I guess in java Throwable.class is used to refer to Throwable class :D

3:28 what am I missing here: https://gist.github.com/4632766

3:36 juxovec: would you recommend using Clj for ordinary (mostly CRUD) MySQL-driven websites? those websites which are writen in PHP most of the time

3:41 p_l: juxovec: depends what you are really doing

3:41 If you want to use AJAX-driven tabled display etc., sure

3:41 except that's for *client*

3:41 seancorfield: juxovec: I would certainly prefer to use Clojure for such things, compared to PHP, but that's a personal choice

3:41 p_l: now you'll need something on the backend

3:41 (also, drop MySQL)

3:42 seancorfield: I do a lot of CRUD work with Clojure - with MySQL and with MongoDB

3:44 Does that answer your question juxovec ?

3:45 juxovec: I think it does

3:45 there are lots of already done frameworks for PHP which let you get CRUD in maybe 3-4 commands from shell. I am still not sure if there's anything like this for Clj

3:45 seancorfield: I'm slightly biased by virtue of maintaining clojure.java.jdbc, being an active committer on congomongo and having written a convention-based MVC framework for Clojure called FW/1 (Framework One) :)

3:47 I don't like PHP so I wouldn't use it. I'd be more likely to use Groovy/Grails or CFML. Or I'd learn Ruby on Rails. Or just do it in Clojure :)

3:47 If I just wanted a CMS, that's a different question of course (although, again, I probably would not choose PHP).

3:48 p_l: juxovec: those commands aren't that great, especially once you start digging things up

3:49 for single-command stuff, I'd rather go with Rails, but you need some knowledge outside of DHH's drivel to make best of it

3:49 juxovec: it is still the same question, just s/PHP/Ruby/ or /Python/

3:49 seancorfield: At work we have a mix of CFML for View-Controller and Clojure for Model - we use the JBoss community project Railo for the CFML part

3:50 But we may well build new web apps entirely in Clojure with FW/1...

3:50 for the sort of app we build, CRUD is only a small part of the whole

3:55 juxovec: I got a lead who wants auction server + supply/demand pairing website. significant part of such application is CRUD + users, user management. All those things are already in most MVC frameworks. I really believe Clj can help me in more difficult parts of website but don't know if I'd not lost a lot of the time re-developing things which are already in most of frameworks

3:57 muhoo: juxovec: you coud always hybrid it

3:57 ucb: I was about to suggest ^^^^

4:01 juxovec: you mean some REST/SOAP bridge to connect them?

4:02 ucb: juxovec: not even that; as long as your lang-X MVC framework plays nicely (through the DB say) with the rest of the code you should be fine

4:02 juxovec: e.g. use rails/django for crud; use clojure for RO stuff in your other more difficult bits of the website

4:07 juxovec: I understand. I think it can work. thx

4:10 AtKaaZ: what is the method for returning first match from a seq?

4:11 clgv: AtKaaZ: you can use some

4:12 &(some odd? (range 5))

4:12 lazybot: ⇒ true

4:12 clgv: ah lol right you hav to write it differently

4:12 &(some #(when (odd? %) %) (range 5))

4:12 lazybot: ⇒ 1

4:12 clgv: otherwise first+filter

4:13 &(first (filter odd? (range 5)))

4:13 lazybot: ⇒ 1

4:13 AtKaaZ: but wasn't there a method already for this?

4:14 oh i think it was some, "Returns the first logical true value of (pred x) for any x in coll," since this is the text that I remember (or similar to this) thanks clgv

4:20 ucb: ,(findfn [1 2 3 4 5] 2)

4:20 bleh

4:20 AtKaaZ: thanks broquaint

4:21 broquaint: np :)

4:24 clgv: $findfn odd? (range 5) 1

4:24 lazybot: []

4:24 clgv: lazybot finds nothing^^

4:25 AtKaaZ: $findfn (range 5) 1

4:25 lazybot: []

4:26 AtKaaZ: &(first (range 5))

4:26 lazybot: ⇒ 0

4:26 AtKaaZ: makes sense then

4:26 $findfn (range 5) 0

4:26 lazybot: []

4:27 AtKaaZ: $findfn '(0 1 2) 0

4:27 lazybot: []

4:30 clgv: oh that should work

4:30 $findfn [0 1 2] 0

4:30 lazybot: [clojure.core/first]

4:30 clgv: $findfn odd? [0 2 4 1 3 5]

4:30 $findfn odd? [0 2 4 1 3 5] 1

4:31 lazybot: []

4:31 []

4:35 hyPiRion: ,(some odd? [0 2 4 1 3 5])

4:37 Oh well, clojurebot is somehow dead.

4:40 zby: when I run 'lein ring server' I don't get any log output

4:40 like the requests being served

4:40 and the times when it reloads because of a code change

4:40 can I have that?

4:44 clgv: hyPiRion: that returns true only and not the element ;)

5:13 the-kenny: cljs.core.pr_str("äöü")

5:13 ""\xE4\xF6\xFC""

5:13 is this by-design (latest clojurescript release)

5:13 ?

5:25 hyPiRion: clgv: Yeah, I realized.

5:26 &(pr-str "äöü")

5:26 lazybot: ⇒ "\"äöü\""

5:26 hyPiRion: the-kenny: sounds like a bug-ish

5:26 unless, well, the webpage doesn't support äöü as characters

5:28 the-kenny: hyPiRion: It must be a regression. we recently updated to lein-cljsbuild 0.3.0 which uses the Clojurescript 1552. Before that, pr-str printed normal unicode characters

5:29 print-str still prints unicode characters

5:45 hyPiRion: the-kenny: sounds somehow like some bug with munging

5:45 ...ish

5:45 ,(munge "äöü!")

5:46 &(munge "äöü!")

5:46 lazybot: ⇒ "äöü_BANG_"

5:59 zby: cemerick - thanks a lot

5:59 unfortunately I am still lost: https://gist.github.com/4633508

6:07 alexnixon: in my application I have an infinite sequence of promises, representing data being delivered to my application asynchronously. The promises are run through a "mapcat" function to produce some output results, which is then run through "doseq" in order to act on the output and force evaluation of the lazy sequences.

6:08 However, I'm finding that it sometimes takes a few minutes before the code attempts to deref a promise which has been delivered (so it seems the doseq isn't forcing evaluation as eagerly as I'd like). Anyone have ideas? Example code here: https://www.refheap.com/paste/8951

6:10 the-kenny: alexnixon: Does the data arrive in sequence? Maybe your first promise isn't the first to get delivered

6:10 alexnixon: the-kenny: no it doesn't - and by design this should cope with it. If a later promise is delivered, the "consuming" code should be still attempting to deref the first one

6:11 the-kenny: and it will block until the first one arrives, at which point it should continue dereffing to consume all delivered data, up until an undelivered promise at which point it blocks

6:13 Chousuke: alexnixon: so what's actually happening instead? it just randomly stops consuming from the sequence?

6:13 are you sure you're delivering all the promises?

6:14 alexnixon: Chousuke: I've littered it with logging statements, and I'm finding the code not entering the "step" function when it should be doing, which (I believe) would by symptomatic of the doseq not forcing the lazy-seq to be realised

6:15 Chousuke: I find that (e.g.) promise 2 gets delivered 2, however only in 1 minute's time (after promises 3,4,5,...., 200 have been delivered), will the code attempt to deref #2

6:16 Chousuke: well, it's hard to tell what's going wrong without seeing the actual code :/

6:18 alexnixon: yeah I can appreciate that, unfortunately the actual code is both confidential and large (there are several of these processing steps built on-top of one another, plus a load of compojure junk to expose this through a REST interface)

6:19 just wondering if there are any laziness "gotchas" that I might be running in to

6:22 it seems to be quite a subtle area, and not-at-all easy to debug when things go wrong

6:25 hyPiRion: alexnixon: Usually I tend to read data into values asap, as closing connections bites you hard when doing laziness

6:26 alexnixon: hyPiRion: yeah I've found that, but in this case the data is being delivered asynchronously over a REST api, so I don't have that problem

6:27 hyPiRion: I suspect my problem is stemming from some subtle aspect of clojure's lazy-evaluation semantics, but I'm at a loss as to where

6:29 hyPiRion: alexnixon: Do you have to do it with promises?

6:30 Put in an agent and an atom or so instead.

6:31 alexnixon: hyPiRion: no, it's just a very clean abstraction which magically handles serialising incoming data (which may arrive out-of-order)

6:31 hyPiRion: okay.

6:32 alexnixon: the downside is that laziness is a subtle beast :-(

6:32 hyPiRion: Maybe Lamina could be a nice replacement?

6:33 or, humm, that's not entirely correct either.

6:33 alexnixon: I've only heard of it in passing - I'll take a look

6:33 hyPiRion: (or maybe it is? I've not really looked that much at Lamina, but I remember some talk I watched by the author which stated that it somehow solved out-of-order passing somehow)

6:34 no7hing: afaik lamina only guarantees order if events already arrive ordered - but don't nail me on that

6:35 hyPiRion: no7hing: Yeah, that's what I was afraid of, but I suddenly remembered a talk from the author where he solved that issue I think.

6:35 no7hing: do you have a link on that one?

6:36 hyPiRion: I'll try to find it, programming in C++ isn't that funny anymore.

6:36 no7hing: either way, a post in the google group should give you clarity: https://groups.google.com/forum/#!forum/aleph-lib

6:36 (the aleph group is also for lamina)

6:39 hmm, actually pipelines could help here, as they only advance to the next step when the current one has been realized

6:39 lamina pipelines that is

6:39 hyPiRion: http://www.infoq.com/presentations/Event-Driven-Programming-in-Clojure

6:40 no7hing: hyperion: thanks

6:40 hyPiRion: Anything to keep me away from C++ programming :)

6:40 no7hing: s/hyperion/hypirion/g

6:40 baha

6:44 i'am wondering which talk i was watching while zach was presenting lamina

7:21 equalsdanny: hi guys. does anybody know of Swing wrappers for Clojure?

7:21 progo: equalsdanny: seesaw must be the best

8:56 equalsdanny: progo: Thanks for the help! I've got one more question although it rather JVM-related. Is there anyway to get call stack dynamic? I need that for my recursion algorithms. I am aware of tail recursion however it limits the expressiveness of the code by far.

9:01 hyPiRion: equalsdanny: you dynamic stack size?

9:01 /s/you//

9:01 You can specify the size of the JVM stack, though I think that's the only thing you can do

9:02 otherwise you'd have to make a stack and use it in a for loop yourself, since the JVM cannot really optimize it that much

9:04 dnolen: does nrepl.el macroexpand actually work?

9:04 TimMc: hyPiRion: I'm thinking of doing that with my tree-walker.

9:06 zby: how can I know if lein reloaded the ring application after a code change?

9:06 I run 'lein ring server' - but it does not output any info about the code reload

9:14 cvkem: Hi, I've got a clojure plugin for a web-applications that works fine under clojure 1.3 and sometimes fails under Clojure 1.4 as clojure.RT is not found. Did something change in the class-loading mechanism between 1.3 and 1.4?

9:17 equalsdanny: cvkem: What framework are you using for wepapp?

9:19 cvkem: Hi equalsdanny: It is a plugin for the pentaho BI-server. I think it is a framework they build themselves. I'm setting the context-classloader myself (and restore it after leaving the plugin)

9:53 TimMc: hyPiRion: Perhaps one could write a defn-deep that inserts a loop and rewrites all explicit recursive calls as recur.

9:58 Random thought: If a SaaS company expects to have exponential growth, does that mean that all their public-facing algorithms have to have logarithmic (or better) time and space complexity?

10:01 nDuff: TimMc: Depends on the revenue model. If you charge linear with space consumed, for instance...

10:02 TimMc: heh

10:02 nDuff: ...if your revenue model doesn't scale with your costs, though, it's a problem. Also, ops can get expensive if you didn't build that organization / processes to scale.

10:02 TimMc: I was thinking more about just the strain on databases.

10:02 * nDuff has been there (on the team intended to salvage a SAAS ops organization that couldn't scale).

10:03 nDuff: *shrug*. In the case where I've been there, our datastores were shardable.

10:03 ...mind you, we hit limits on the underlying software, and were the literal biggest customer for several of our providers (and thus did a _lot_ of "debugging in production" for folks whose QA organizations couldn't simulate our traffic levels)...

10:04 ...but more customers than you can deal with is not a bad problem to have unless you designed yourself into a serious corner.

10:04 TimMc: Designing yourself into a serious corner is pretty common. :-/

10:06 So yeah, if sharding is an option, I suppose your algorithms don't have to scale quite as well. I was thinking of the cases where the algorithm's "n" is actually the "n" of the business size, but now that I think about it, maybe that doesn't happen very often.

10:23 nDuff: TimMc: I've never seen a SaaS business be successful enough to have "too many customers" problems if they couldn't shard. I _have_ seen one that tried to go SaaS without being able to shard, and the first really big customer choked them (followed by a lawsuit resulting in that customer getting a lot of equity and a board seat).

10:23 s/resulting in/settled by/

10:29 augustl: nDuff: haha, nice outcome of the lawsuit

10:30 nDuff: what was the case for unshardable SaaS? I don't think I've seen any SaaS that isn't customer/user scoped

10:31 nDuff: augustl: ...customer-scoped, but they were a huge customer.

10:32 augustl: nDuff: ah

10:32 they had a "MAXIMUM" plan with unlimited everything? :)

10:33 TimMc: I confess I still don't know what quity is.

10:33 *equity

10:33 nDuff: TimMc: Ownership

10:33 llasram: Isn't that when you're prone to leave online venues? e-quit-y

10:34 augustl: equity = owning stock, that's about it, right?

10:34 nDuff: augustl: *nod*.

10:34 TimMc: Got it, imaginary numbers.

10:35 augustl: well, that depends on whose stock :)

10:39 tomoj: &((fnil identity 42) nil)

10:39 lazybot: ⇒ 42

10:39 tomoj: oh

10:40 fighting with core for names always screws me up, takes me forever to realize e.g. #'identity is not #'c.c/identity..

10:43 llasram: tomoj: You have a var in your ns named `identity`?

10:43 tomoj: yeah

10:44 and comp, get, assoc, peek, conj, map, mapv...

10:44 llasram: ? what are you doing?

10:44 * nDuff tries to figure out the best way to generate a BufferedWriter that adds content to a lazy seq

10:46 llasram: nDuff: a hand-off queue, maybe?

10:49 TimMc: nDuff: WRiting to the lazy seq, or handing stuff off to the side?

10:51 nDuff: the buffered writer is being bound to *out* inside a worker thread, the lazy seq is being used as a return value is compojure

10:52 Frozenlock: May I inquire on the state of clj-cljs code sharing?

10:55 TimMc: nDuff: It is a lazy seq of characters?

10:56 gfredericks: Frozenlock: I haven't heard anything beyond the age-old lein-cljsbuild crossovers approach

10:58 nDuff: TimMc: ...of strings is my understanding, but let me check the compojure docs.

10:58 Frozenlock: gfredericks: Thanks

11:04 hyPiRion: hey, C++ question totally unrelated to Clojure: If I have "uint32_t a = 0; a--;", is the result undefined, or will the thing crash??

11:04 lazybot: hyPiRion: Definitely not.

11:04 hyPiRion: /s/??/?/

11:05 nDuff: hyPiRion: That should wrap around, if memory serves.

11:08 ChongLi: hyPiRion: I just tried it

11:09 it returned 4294967295

11:10 hyPiRion: Yeah, it returns that here as well. Just not sure if it's specified within the C specification or not. I don't really care what the value is, as long as it's not throwing some error.

11:11 nDuff: I'm quite sure it won't throw an error.

11:11 Anderkent: AFAIK it's basically a = (uint32_t) (a - 1) => (uint32_t) -1

11:11 nDuff: C doesn't specify checked math.

11:11 Anderkent: which by spec is UINT_MAX

11:11 alexnixon: hyPiRion: IIRC unsigned integers must wrap (according to the spec), whereas overflow for signed integers is undefined

11:11 nDuff: ...not for integers, anyhow.

11:11 Anderkent: alexnixon: we're talking about underflow though

11:12 dnolen: jonasen: ping

11:12 ChongLi: http://c0x.coding-guidelines.com/

11:13 hyPiRion: ChongLi: Thanks

11:13 (inc alexnixon)

11:13 lazybot: ⇒ 1

11:13 Anderkent: ChongLi: yup, assuming type of (a - 1) is signed int

11:14 hyPiRion: (inc ChongLi)

11:14 lazybot: ⇒ 1

11:14 Anderkent: Actually I think the relevant bit is 6.2.5

11:14 ChongLi: this stuff can be so tricky to deal with

11:15 Otherwise, if the new type is unsigned, the value is converted by repeatedly adding or subtracting one more than the maximum value that can be represented in the new type until the value is in the range of the new type.

11:15 Anderkent: "A computation involving unsigned operands can never overflow, because a result that cannot be represented by the resulting unsigned integer type is reduced modulo the number that is one greater than the largest value that can be represented by the resulting type."

11:15 and that is for negative overflow too

11:15 discusses convertion from signed int to unsigned int

11:16 not operations on unsigned ints

11:16 hyPiRion: It's iffy when you're working against Intel compilers. You never know what they do.

11:17 ChongLi: https://www.refheap.com/paste/8956

11:17 I tried this with g++

11:17 and it underflowed

11:17 hyPiRion: The only thing which is relevant for me is if it crashes or not

11:18 ChongLi: but it's ok to get an incorrect result? :)

11:18 haha

11:18 hyPiRion: But you guys have confirmed my thoughts. So thank you again :)

11:18 ChongLi: I abuse stuff: `while (c --> 0) ...`

11:20 tomoj: llasram: lenses - (= 4 (l/assoc 3 l/identity 4))

11:21 devn: marmalade is down :(

11:22 ChongLi: devn: I complained about that yesterday

11:22 technomancy informed me that it was node.js's fault!

11:22 hyPiRion: It's always node.js' fault.

11:22 llasram: tomoj: Iiiinteresting

11:24 hyPiRion: Oh nice, https://github.com/clojure/clojure/commit/3e89a16b973914a057a33417ccb621a099283ccd

11:24 tomoj: then (= (l/assoc-in nil [:foo :bar] 4) (l/assoc nil (l/comp :foo :bar) 4))

11:24 hyPiRion: reduce-kv now supports nil

11:24 and the reducers library also does.

11:26 ChongLi: oh man

11:26 people were storing keys and passwords in public repos on github

11:26 so they had to kill search to protect them?

11:26 faith in humanity lost :(

11:27 hyPiRion: ChongLi: they killed the search feature because of that?

11:27 ChongLi: well, I'm sure they didn't destroy the code

11:27 they'll probably turn it back on once everything settles down

11:27 stain_: silly people!

11:28 how would you do that? git init directly in the home directory?

11:28 here's 25 GB straight to Github!

11:28 it's all.. "opensource" yeah

11:28 egghead: lol

11:28 llasram: ChongLi: citation?

11:28 ChongLi: thinking about this makes me realize how dangerous Datomic really is

11:29 http://it.slashdot.org/story/13/01/25/132203/github-kills-search-after-hundreds-of-private-keys-exposed

11:29 are they still working on allowing you to destroy data in Datomic?

11:29 hyPiRion: ChongLi: "With great power comes great responsibility" - Rich Hickey

11:30 TimMc: ChongLi: My spot-check turned up a .ssh witha known_hosts file that didn't encrypt the hostnames. One of the hostnames was github.com...

11:30 I was tempted to "fix" the repo.

11:31 ChongLi: wow

11:31 github should just put a filter on .ssh

11:31 force you to explicitly turn it off before you can push

11:32 hyPiRion: ChongLi: At least ask if you intend to do so.

11:32 Anderkent: ChongLi: except one could just commit their encrypted file, and .ssh/ that just symlinks to .private/.ssh

11:33 I don't think github should care about what i push to it at all

11:33 ChongLi: well they care enough to turn off search

11:33 Anderkent: yes, and I think that's wrong

11:34 Frozenlock: "There is also no mechanisms to prevent users from uploading keys, a point which some security boffins say GitHub should implement." No it should not.

11:34 TimMc: I think disabling search is an OK temporary patch, as long as it only lasts for maybe half a day.

11:35 Anderkent: disabling the search doesnt help at all

11:35 TimMc: It doesn't? Google doesn't index Github very effectively, last I saw.

11:35 babilen: hyPiRion: Yeah, I've received the mail about CLJ-1098 this morning and it made for a nice start into the day. That was one of my pet peeves and it has finally been solved (in the sanest way possible)

11:35 edlothiol: they didn't disable search, it just went down ( https://status.github.com/messages )

11:35 Anderkent: well I get 10 sites of results for 'site:github.com ".ssh/id_rsa"' right now

11:36 TimMc: I guess GOogle improved their indexing, then. :-)

11:36 Anderkent: edlothiol: good to know

11:36 TimMc: edlothiol: Ha!

11:36 dnolen: ibdknox: nice post

11:36 edlothiol: though "we are keeping it offline while we perform some additional maintenance" could of course be related to this

11:37 babilen: A lot of people also uploaded their secure gpg keyrings and there are valid reasons for private keys in software (cf. http://codesearch.debian.net/search?q=BEGIN+RSA+PRIVATE+KEY)

11:38 ibdknox: dnolen: thanks :)

11:40 hyPiRion: babilen: yeah, it makes stuff usable.

11:41 * babilen already removed a couple of (nil? ...)s :)

11:42 babilen: Hope I can merge that branch soon

11:46 devn: hm, anyone know why indentation with vectors doesn't work the way one would expect? if i have ([:foo :bar]\n|[:bar :baz]) and I hit TAB, I get an additional two space indent.

11:46 it treats them like they're nested

11:47 technomancy: any ideas?

11:47 babilen: devn: I assume that you are referring to the behaviour in Emacs. Is that correct?

11:47 devn: yes

11:49 TAB is bound to (indent-for-tab-command ...)

11:53 metellus: devn: maybe because it expects the first thing in a list to be a function, so it's indenting [:bar :baz] as if it was an argument to that function

11:57 quuxman: has anybody here used overtone?

12:02 dysoco: Hello, anyone knows where can I get ClojureBox for Windows? The website seems to be down: http://clojure.bighugh.com/

12:02 gfredericks: does leiningen support adding maven repos from arbitrary directories? (e.g., a /lib in my project)

12:10 technomancy: gfredericks: there is such a thing as file:// repos, but you didn't hear that from me

12:10 devn: I have no idea what the logic behind clojure-mode indentation is, but metellus is probably correct

12:13 seangrove: quuxman: Yeah, of course, why?

12:13 quuxman: I'm trying to set it up

12:13 seangrove: wei_ has more experience with overtone than I do though

12:15 quuxman: seangrove: I've used the Haskell super collider API a few years ago and had a lot of fun with it. I'm trying to figure out the clojure toolchain now... so far I've managed to get overtone installed with lein and iclojure, but haven't gotten scsynth connected

12:16 seangrove: Oh, hadn't seen iclojure before

12:16 iclojure?

12:16 bah, no entry :P

12:16 any?

12:16 lazybot clojurebot: whatsamattawitchyou

12:17 quuxman: Are you using emacs/vim/ccw?

12:18 quuxman: in my everday job I use ipython + vim, but I decided to go with emacs for clojure, so that's slowing me down some :-P

12:19 seangrove: ok wow, if you use the internal SC server, it's incredibly easy: (use 'overtone.live)

12:20 seangrove: quuxman: Yeah, I don't remember any problems getting it setup - it installed a bunch of stuff, but it worked super smoothly

12:25 quuxman: seangrove: how do I get definst into my namespace?

12:27 seangrove: just: (:use [overtone.live])

12:27 And then you should have access to it

12:28 https://github.com/overtone/overtone/blob/master/src/overtone/examples/getting_started/intro.clj

12:28 Best way to get started :)

12:37 quuxman: seangrove: that use statement gives me a CompilerException

12:37 CompilerException: java.lang.ClassNotFoundException: overtone.live, compiling:(NO_SOURCE_PATH:1)

12:37 seangrove: Try opening that example file and running nrepl

12:37 Then you can just do C-x C-e and eval each form

12:38 quuxman: what's the difference between "(use ..." and "(:use ..."?

12:38 nDuff: quuxman: the latter is inside (ns)

12:38 quuxman: the former is for use on its own.

12:39 quuxman: nDuff: I don't know how to use nrepl

12:40 I can run "lein repl" which starts it, but then I don't even have tab-completion

12:40 that's why I installed iclojure

12:40 clgv: quuxman: install leiningen 2 and you will have tab completion in "lein repl"

12:40 quuxman: I have leningen 2

12:41 equalsdanny: i dont like the default repl either

12:41 someone should definitely rework it

12:41 quuxman: I'm spoiled by ipython perhaps

12:42 equalsdanny: the basic clojure repl is like 10 lines long. is it that hard to write 300+ but make it freaking useful??

12:42 lazybot: equalsdanny: Uh, no. Why would you even ask?

12:42 technomancy: if you don't have tab completion then your repl is broken; can you report it as a bug?

12:42 clgv: quuxman: well then there is something wron with your lein setup. lein completion works here

12:44 nDuff: quuxman: If you want a REPL environment built for extreme usability, most folks end up with emacs' nrepl.el

12:45 quuxman: ...that also gives you evaluation straight from your editor buffers, paredit mode (for structurally-aware editing... being able to operate on code blocks, as opposed to lines/words) and lots of other shiny goodies.

12:46 quuxman: nDuff: yeah, I couldn't figure out how to install that

12:46 nDuff: quuxman: If you have Emacs 24, the "Emacs Live" package from the overtone folks is easy to install.

12:46 quuxman: nDuff: it looks like I need clojure-mode, which relies on some non-default package repository, which I couldn't figure out how to update

12:46 nDuff: ...basically just a big git checkout of the whole thing into your ~/.emacs.d, and that bundles clojure-mode and everything else.

12:47 quuxman: oh awesome

12:47 technomancy: unfortunately the default package repository only accepts packages with FSF copyright assignment, so it's basically useless

12:47 nDuff: See https://github.com/overtone/emacs-live -- they've got videos and whatnot introducing it, too.

12:48 technomancy: but if you're going to use Emacs, you pretty much have to set up marmalade; otherwise it's a ton of extra work tracking down manual installations

12:49 ChongLi: technomancy: manual installations are a non-starter for me

12:49 quuxman: yeah, I was reading about marmalade here: https://github.com/technomancy/clojure-mode

12:49 ChongLi: I've got my init.el in a git repo and setup to auto-install packages from a list

12:49 I can blow away everything else in .emacs.d with git clean -dxf

12:50 quuxman: but those instructions didn't work for me.

12:50 ChongLi: and next time I start emacs it puts everything back

12:50 repeatability is an amazing goal to have

12:50 technomancy: quuxman: how so?

12:51 quuxman: I put the marmalade repository command in my init.el, evalutaed it, then ran package-refresh-contents, but clojure-mode was still not found

12:52 http://marmalade-repo.org/packages/ shows an http gateway error

12:53 XPherior: quuxman: I've been getting that for months. Every time I try it.

12:53 So I never ended up using it the easy way. :)

12:53 quuxman: what's the hard way?

12:53 ChongLi: what we need is a mirror

12:53 XPherior: Copy the .el files from Github into .emacs.d

12:53 Not hard, just lame I guess.

12:53 technomancy: oh, maybe it was down because node.js crashed again =(

12:54 ChongLi: technomancy: yeah I mentioned that earlier

12:54 haha

12:54 technomancy: ChongLi: we wouldn't need a mirror if the damn thing used static files on disk like every other package archive in the world =\

12:54 XPherior: Heh

12:55 ChongLi: the IDE as a value

12:55 now let me wrap my head around that one

12:55 quuxman: Symbol's function definition is void: package-installed-p

12:56 ChongLi: package-installed-p is a compiled Lisp function in `package.el'.

12:56 quuxman: it's not part of emacs 24 package-* stuff?

12:56 ChongLi: it should be

12:57 quuxman: yeah, this clojure-mode is totally baffling me

12:57 ChongLi: package.el is included with emacs 24

12:57 quuxman: I've got 24.1.1

12:58 technomancy: if you can't call that function it means that package.el hasn't been loaded yet

12:58 (require 'package)

12:59 quuxman: sorry I'm just not famaliar with emacs, emacs lisp, or clojure. Taking me a while to figure out packages and paths

12:59 ChongLi: I love these blog posts; ibdknox sure knows how to write some nice stuff

13:00 quuxman: is it possible to run all this stuff on android?

13:00 ChongLi: what stuff?

13:01 quuxman: (that's not a very serious question, btw)

13:01 technomancy: quuxman: once marmalade has been added and loaded, a simple M-x package-install clojure-mode will do it

13:01 quuxman: scsynth + overtone

13:01 nDuff: quuxman: ...particularly as a newbie to emacs, I do recommend ignoring anything the clojure-mode docs say, marmalade, etc. and just using emacs-live

13:01 technomancy: but if you like vim, you should use vim

13:01 quuxman: nDuff: yeah, that's what I'm thinking

13:01 ChongLi: switching from vim to emacs (or vice versa) is a pretty big commitment

13:02 quuxman: I just wanted nifty clojure code navigation

13:02 nDuff: ChongLi: Who said anyone has to "switch"? I use both.

13:02 ChongLi: don't attempt it while also trying to learn a new language and stuff

13:02 nDuff: ChongLi: ...they're good for different niches.

13:02 ChongLi: nDuff: you're pretty amazing

13:02 * nDuff also uses IDEA (for Java).

13:02 quuxman: I've used clojure and emacs years ago, just forgot most things

13:02 ChongLi: I switched and now I can't figure Vim out

13:02 I keep hitting emacs keybindings in it

13:02 quuxman: ChongLi: yeah, that's what I would probably do :-)

13:03 I code largely by muscle memory

13:03 * nDuff learned dvorak almost two decades ago, so being able to switch between different sets of finger memory has been a mandatory skill for some time.

13:03 ChongLi: yeah I've got paredit in muscle memory

13:03 quuxman: I learned dvorak about a decade ago. I can't code without it

13:03 ChongLi: paredit is just fantastic

13:04 how do you use vim with dvorak? that's just crazy

13:04 quuxman: or really do anything without it. I can't use qwerty

13:04 technomancy: dvorak is the main reason I didn't learn vim in school

13:04 quuxman: ChongLi: hjkl are the only bindings that are really qwerty optimized, and they work fine in dvorak too

13:04 nDuff: ChongLi: I never got in the habit of the old vi movement keys

13:04 ChongLi: ...and the rest of vim seems perfectly fine in dvorak to me.

13:04 ChongLi: nDuff: you use the arrow keys?

13:05 nDuff: when I need to navigate one-char-at-a-time, which is rarely.

13:05 quuxman: ChongLi: I just use hjkl.

13:05 ChongLi: quuxman: pretty bizarre

13:05 quuxman: ChongLi: but usually I use w, %, #, *, etc for navigation

13:05 ChongLi: I take it neither of you are FPS players?

13:06 quuxman: not really

13:06 nDuff: ChongLi: Back when I played twitch games, I remapped their keybindings to be dvorak-friendly.

13:07 ChongLi: by the way, easymotion is amazing

13:07 quuxman: what's easymotion?

13:08 btw, ultimately what I'm trying to do here is make virtual instruments that use multitouch UIs

13:08 ChongLi: http://www.youtube.com/watch?v=Dmv6-dguS3g#t=1m40s

13:09 quuxman: ChongLi: does it have language plugins?

13:09 ChongLi: it's language-agnostic afaik

13:11 quuxman: that's more the vim spirit

13:11 ChongLi: yeah it is

13:11 watching this little vid gave me nostalgia

13:13 bpr: if you lien uberjar with checkout dependencies, does it package up the code from the checkouts or their jars in your ~/.m2/repository ?

13:14 technomancy: bpr: no, part of the point of checkouts is that they only affect development

13:15 bpr: technomancy: yeah, i figured as much. it kinda goes against the goal of reproduceable builds

13:15 but i wanted to be sure, b/c man it would be convenient right now :-p

13:16 ChongLi: it's pretty crazy how I see people saying leiningen is one of the reasons to learn clojure

13:16 how'd you get the idea for its design?

13:17 technomancy: bpr: usually you'd use checkouts to bring a library into an application, and the final build of the application would be done on a build server with no checkouts. but you're right that it can lead to trouble when using it between libraries.

13:17 quuxman: so it looks like https://github.com/overtone/emacs-live is meant to be a ~/.emacs.d directory?

13:17 technomancy: ChongLi: I think it flows pretty naturally out of the Clojure philosophy of representing everything as a simple map and using functions for everything.

13:18 ChongLi: technomancy: yeah I was just thinking about that a bit

13:18 technomancy: ChongLi: for instance, I didn't design it with higher-order tasks in mind, but that came for free by building on defn

13:19 it's amazing how far you can get with the simple principles of 0) don't get clever, and 1) don't invent any new concepts unless you absolutely have to

13:20 ChongLi: yeah

13:20 I really love the philosophy of keeping everything as just plain data

13:20 and using pure functions on it

13:21 bpr: that philosophy, imo, is one of the biggest contributions clojure brings to the table

13:22 ChongLi: I think it's really weird how people can write object-oriented programs with complex inheritance hierarchies and mutable objects and then turn around and use stuff like JSON for serialization

13:22 I think Rich mentioned this in one of his talks

13:23 it's one of those "obvious" ideas that people just don't seem to be aware of

13:23 technomancy: people like feeling clever

13:23 ChongLi: yeah that's a tempting feeling

13:23 quuxman: ChongLi: why is that weird? It's very natural for any kind of UI to do something like that

13:24 ChongLi: quuxman: sure, but it's not natural to represent data that way

13:24 quuxman: ChongLi: where what's being stored is pretty straightforward, but when creating the data structure a lot of complex interface code is required, so inheritence makes sense

13:24 ChongLi: it is if you're writing JavaScript. I've written JavaScript apps that do exactly that, and it feels very natural and convenient

13:25 ChongLi: in javascript you don't really have a choice; everything is an object

13:25 quuxman: ChongLi: in my case the simple serialized json is stored in MongoDB, where properties or properties of subdocs can be conveniently indexed

13:26 ChongLi: sure, that's basically the same as clojure style

13:26 it's a convention though

13:26 quuxman: what's the story with the fancing looking terminal in these screenshots? https://github.com/overtone/emacs-live

13:27 seangrove: quuxman: post-processing on the video

13:27 technomancy: some of that seems to be designed for live-coding in front of an audience, not everyday use

13:27 ChongLi: it looks like they wanted to simulate taking photos of an old CRT

13:28 Wild_Cat: nah, sadly it's just post-processing, can't be done in realtime :(

13:29 seangrove: Well, I don't know about "can't be done", but it's certainly not in this case :)

13:30 progo: I wonder if making up own HTML tags to provide template substitutions in enlive is a good idea :o

13:35 Phonatacid: yo : I'm currently designing/prototyping a library meant to mirror data-structures to files (dump them to a files once they're changed). And I'm in front of a dilemma. I somehow delegated in a functional style the heuristic to the agent "thing", stocking needed attributes (like the file path) into the meta map, and I'm now wondering if subclassing clojure.lang.Agent wouldn't be cleaner. What's your thought ?

13:37 technomancy: don't subclass agent

13:38 gen-class should only be used for java interop reasons

13:38 jsabeaudry: Is lein-oudated broken on lein2? (i just upgraded to 2.0.0 from 2.0.0preview10 and lein oudated is using 100% cpu for a long time, still has not finished)

13:39 quuxman: what's the keybinding for evaluating a form using the overtone emacs-live config?

13:39 jsabeaudry: I just cant spell outdated can I

13:40 Phonatacid: @technomancy: ok thanks for the input, and thanks for leiningen :D.

13:40 technomancy: np

13:40 tanzoniteblack: quuxman: C-x C-e

13:41 jsabeaudry: Oh wow, it finally completed

13:42 quuxman: tanzoniteblack: how about the whole file?

13:43 tanzoniteblack: quuxman: I believe you want to use the function nrepl-eval-load-file for that, but it's not by default assigned to a shortcut

13:44 quuxman: generally I use nrepl-eval-buffer for things like that, since I'm generally working with already loaded files, but again I don't use it often enough to have a shortcut made for it

13:45 technomancy: quuxman: C-c C-k is what you want

13:45 the nrepl.el readme has more details

13:55 clgv: jsabeaudry: lein-outdated had a problem with one of the jumps in the preview time as well - but back then it failed with an exception

14:01 jsabeaudry: clgv, Ok thanks, somehow if I execute it now it's almost instantaneous

14:03 clgv: jsabeaudry: oh right it download the maven index on first call

14:07 quuxman: are there any GUI tools that construct SC UGen graphs?

14:08 if not, a generic graph UI library would be very useful

14:09 Bronsa: 19

14:09 quuxman: especially if it supported numeric constants

14:10 Bronsa: ops.

14:10 jsabeaudry: clgv, makes sense!

14:21 seangrove: ibdknox: Very disappointed that you fabricated all of the games that used CES-like systems

14:21 Also, please up your game for creating professional-grade games at 48-hour hackathons

14:22 ibdknox: seangrove: I'm going to take some classes at digipen to prepare for next time :p

14:22 seangrove: Well, apparently everything you do directly reflects on the potential and ability of LT

14:39 gfredericks: why shouldn't I write a testing library for creating "spies" (like jasmine); does midge already have this?

14:41 TimMc: seangrove: ?

14:42 seangrove: ?

14:42 TimMc: I seem to have missed this piece of snark.

14:42 seangrove: http://news.ycombinator.com/item?id=5116615

14:42 jonasen: is there an irc channel for aleph/lamina?

14:45 technomancy: gfredericks: you mean something to make a function log all its invocations?

14:45 TimMc: seangrove: Nice.

14:45 technomancy: you should look at tools.trace

14:46 tomoj: hmm, is the claim about a seq of 100 elems true?

14:48 oh, I see your reply

14:59 michaelr525: hello

15:03 * nDuff tries to grok how Aleph and Compojure fit together (for purposes of adding websocket functionality to an existing Compojure app)

15:04 tomoj: I'm doing that now too

15:04 except just long-polling

15:04 nDuff: did you see https://github.com/ztellman/aleph/wiki/HTTP ?

15:05 nDuff: tomoj: Just found it. Think it answers the questions I had from the high-level overview.

15:06 tomoj: I don't see the ws support

15:07 oh, :websocket true

15:07 weird...

15:10 jmckitrick: I'm having an issue getting a jdbc WHERE IN clause to work...

15:10 http://paste.lisp.org/+2W34

15:11 Would someone tell me why I'm getting no results back, when those ids are in the table?

15:17 cgag: I guess I've been using vimclojure too long. If I just invoke a repl using lein repl, how do I switch to one of my namespaces and start calling functions? If I just use (ns my.namespace) to switch namespaces, I get unable to resolve symbol on any functions from that namespace.

15:18 technomancy: cgag: (doto 'my.namespace require in-ns)

15:19 ChongLi: hmm

15:19 ibdknox likes putting close parens on their own line

15:20 cgag: thanks technomancy

15:20 ibdknox: ChongLi: no

15:20 I hate that shit

15:20 buuuut

15:20 ChongLi: ibdknox: I see a bunch of it in chromashift code

15:21 ibdknox: LT didn't have auto-closing then

15:21 ChongLi: ahh

15:21 ibdknox: with paredit that would go away

15:21 ChongLi: paredit is the best thing ever

15:22 michaelr525: ibdknox: oh, and chromashift is really slow because of all that CES shit ;)

15:23 ibdknox: michaelr525: I'm fairly certain it's the worst idea ever.

15:23 Also I'm fairly certain he never ran the game :p

15:24 ChongLi: what's weird is there already exists a game called chromashift

15:24 ibdknox: oh really?

15:24 ChongLi: some weird super puzzle fighter type thing

15:24 michaelr525: ibdknox: do you plan on opensourcing some of your LT code?

15:24 ibdknox: michaelr525: all of it

15:24 ChongLi: http://www.msfhigh.com/chromashift/game.html

15:24 ibdknox: that's fantastic

15:25 ibdknox: no use in having a closed source dev environment these days

15:25 ChongLi: I think the best way to build any editor is to start with an environment first

15:25 a la emacs

15:25 michaelr525: ibdknox: every time you make a blog post i'm dying of curiosity to poke at the source..

15:25 ibdknox: not that you'll need to modify the core directly very much

15:26 ChongLi: we'll be writing our own functions in CLJS and tagging them, won't we?

15:26 ibdknox: michaelr525: haha well it's a codebased that is full of discovery so there's a decent amount of inconsistency as I've learned new things.

15:26 ChongLi: or anything that compiles to JS

15:27 ChongLi: ibdknox: yeah, so that sort of system really breaks down if the editor is closed source

15:27 ibdknox: yep

15:27 ChongLi: since there'd always be this wall between user-defined stuff and built-ins

15:27 ibdknox: it wouldn't make sense anyways

15:27 you could always just remove the behaviors/objects and replace them

15:27 there's literally nothing I can do that you wouldn't be able to in the system

15:28 ChongLi: yeah, plus that bit you mentioned where a dev might remove everything and ship his own app built inside that environment

15:28 oriig: is it a good practice if your function returns say a list in one case and false in another case?

15:29 ChongLi: we don't want another system like flash

15:29 ibdknox: ChongLi: yeah

15:29 nope nope, OSS is both the right thing to do and actually a competitive advantage

15:29 ChongLi: lock-in just seems like a coward's way of doing business

15:29 jeremyheiler: oriig, might be better to return nil

15:30 p_l: ChongLi: it's called "capitalism"

15:30 ChongLi: p_l: it's not essential to capitalism

15:30 jeremyheiler: ... instead of false, that is.

15:30 ChongLi: there's an older idea called "brand loyalty" that works pretty well too

15:30 p_l: ChongLi: it's not essential, but promoted by the core of capitalism (not some of the other things that sometimes are lumped as part of it)

15:31 ChongLi: if you act like a human being and treat your customers the way you'd want them to treat you, you can inspire some loyalty

15:31 oriig: jeremyheiler thanks

15:31 p_l: ChongLi: that requires a long-term strategy, which stock markets don't like

15:31 ChongLi: p_l: most of what we have to deal with today (giant corporations) is very far from the core of capitalism

15:32 p_l: ChongLi: more like it's what happens when we strip barriers that we didn't know existed, by technology. But it's not the place for this discussion, and I'm so sleepy I might start babbling at some point :)

15:32 ChongLi: haha

15:32 cgag: technomancy (or anyone else), any idea why the shortcut for namespaced keywords wouldn't work? I have (:require [cemerick.friend] :as friend), but if I type ::friend/redirect-on-auth? at the repl, I get an invalid token error.

15:33 ibdknox: cgag: :as friend needs to be in the vector

15:33 jeremyheiler: oriig: one example of this is seq. (seq ()) => nil

15:33 ChongLi: that's the one thing I think consistently trips people up

15:34 cgag: that was just a typo, sorry, it is

15:35 ChongLi: it is a pretty weird syntax

15:35 cgag: i use that keyword in my code and it works fine, and it expands to :cemerick.friend/redirect-on-auth? in the vimclojure repl, but not the bare lein repl

15:36 i'm trying to use kibit and it skips any file i use that type of keyword in due to that invalid token exception

15:36 ohpauleez: cgag: Yeah, kibit can't parse over ::keywords

15:37 auto-expanded namespaced keywords

15:37 because kibit only reads, it doesn't parse or compile

15:37 it doesn't compile**

15:37 cgag: A fix is, comment that line out or remove the second colon, run kibit, and add it back in

15:38 or write a patch for kibit to automatically do that if it detects it :)

15:39 equalsdanny: ChongLi: you can get vendor lockin with OSS as well when moving from one platform to another does not pass cost-benefit analysis

15:39 in terms of complexity and efforts required

15:40 ChongLi: equalsdanny: you're correct there

15:40 there's also a lot to be said for your data and the portability (or lack thereof) of whatever format it's in

15:41 TimMc: &(:require '[clojure.string :as str])

15:41 lazybot: ⇒ nil

15:41 TimMc: &(read-string "::str/foo")

15:41 lazybot: java.lang.RuntimeException: Invalid token: ::str/foo

15:41 ChongLi: there's nothing worse than having your stuff locked up in some strange proprietary binary format

15:42 TimMc: &::str/foo

15:42 lazybot: java.lang.RuntimeException: Invalid token: ::str/foo

15:42 cgag: ohpauleez, that makes sense, still not sure sure why it doesn't work at the repl though

15:42 TimMc: Hmm, how does that work again? I could swear it was possible...

15:42 S11001001: TimMc: the ns will be str

15:42 &:str/foo

15:42 lazybot: ⇒ :str/foo

15:42 ohpauleez: &::foo

15:42 lazybot: ⇒ :clojure.core/foo

15:43 ohpauleez: but not if you're just reading it

15:43 ibdknox: I don't think you can auto-expand by an alias

15:43 TimMc: S11001001: No, I thought there was a form that allowed you to use the aliases, but now I don't know how that would be implemented. :-)

15:43 ibdknox: A damn shame.

15:43 ibdknox: I agree

15:43 I use namespaced keywords a *lot*

15:43 lol

15:44 S11001001: bind the keywords in same module, refer to symbols

15:44 then you also get spell-checking

15:48 amalloy: no, TimMc is right re ::str/foo

15:48 it would work in a real repl, but lazybot reads your forms outside the namespace they're evaluated in

15:48 ibdknox: hm

15:49 must be broken in cljs then

15:49 S11001001: amalloy: hm.

15:49 amalloy: ibdknox: i wouldn't be surprised. ::str/foo refers to the clojure namespace in which compilation is happening

15:50 ,*ns*

15:50 ~ping

15:51 TimMc: &(do (:require '[clojure.string :as str]) ::str/foo)

15:51 lazybot: java.lang.RuntimeException: Invalid token: ::str/foo

15:52 TimMc: Bah, that's :require!

15:52 amalloy: heh. broken in so many creative ways, TimMc. i don't think you'll ever get it to work in lazybot

15:52 TimMc: &(do (require '[clojure.string :as str]) ::str/foo) ;; gotta try anyhow

15:52 lazybot: java.lang.RuntimeException: Invalid token: ::str/foo

15:52 TimMc: So yeah, works in my REPL. *phew*

15:52 S11001001: TimMc: I imagine it can't splice eval into read, just expand

15:53 TimMc: Right, I suppose it would have to be separate forms.

15:53 * S11001001 imagines eval, expand spliced into read for do

15:53 TimMc: hmm

16:00 quuxman: the problem with the defaults in https://github.com/overtone/emacs-live is I can't actually delete parens. It's confusing the hell out of me

16:00 ChongLi: quuxman: that's paredit at work

16:00 http://emacswiki.org/emacs/PareditCheatsheet

16:01 learn this

16:01 you will love it once you do

16:01 quuxman: man, how can that be strongly recommended?

16:01 :-P

16:01 cgag: i love paredit 99% of the time, but I love being able to toggle it off quickly as well

16:01 ChongLi: deleting parens is bad

16:01 it can be toggled with M-x paredit-mode

16:02 which can be bound to a hotkey if you like

16:02 gfredericks: technomancy: yes (re: spies); so you could apply it to a var, or create one standalone to test with callbacks

16:03 dnolen: paredit - you can always insert arbitrary characters w/ C-q KEY, and delete a paren by marking a region over it.

16:04 Raynes: quuxman: It's strongly recommended because almost everyone uses it and enjoys it. It just takes time to get used to.

16:04 ChongLi: quuxman: once you get stuff like paredit-open-round and barfage and slurpage in muscle memory you'll really get into a groove

16:05 quuxman: How do I fix "exception in GraphDef_Recv: exceeded number of interconnect buffers."? In sclang I would simply set Server.options.numWireBufs ...

16:06 Raynes: dnolen: You can delete parens by doing C-u backspace

16:06 No need to do a region.

16:06 ChongLi: unbalancing parens makes paredit unhappy, however

16:07 quuxman: so operations that keep them balanced are better when it's on

16:07 Raynes: Yeah, but if paredit is unhappy already because if an accidental key sequence then you'll need to have a way to delete them.

16:07 ChongLi: yeah

16:07 or just mash undo until they're rebalanced!

16:08 ibdknox: pasting is a common culprit

16:08 Raynes: Doesn't always work out.

16:08 quuxman: any supercollider people still around?

16:08 ChongLi: emacs style undo is fantastic

16:08 how does all that stuff work in light table? (I've never tried it)

16:08 Raynes: I never could get Emacs undo to work properly. I just use undo-tree.

16:09 ChongLi: it's really easy

16:09 undo a bunch

16:09 if you go too far

16:09 ibdknox: ChongLi: there's no paredit stuff in there right now

16:09 ChongLi: C-f

16:09 now you're redoing

16:09 ibdknox: I added auto completing pairs a couple days ago

16:09 in the next version

16:09 that is

16:09 ChongLi: what about mark/kill ring etc?

16:09 Raynes: Keep in mind that lt isn't Emacs.

16:09 ChongLi: or do you just use standard cut/paste

16:10 ibdknox: standard cut and paste, though the vim bindings implement marks and registers

16:10 tomoj: I wonder, if you want to write paredit for codemirror in cljs, does codemirror's api infect your code or can you make it nice?

16:10 ChongLi: I am aware of that, that's why I'm asking :)

16:10 ibdknox: tomoj: it's been done

16:10 it's just *really* slow

16:10 tomoj: oh, subpar, I see

16:10 ibdknox: tomoj: https://github.com/achengs/subpar

16:10 Raynes: But the name is appropriate.

16:11 ibdknox: aww

16:11 lol

16:11 Raynes: :p

16:11 I imagine it's just hard.

16:11 ChongLi: Raynes: as I was saying earlier

16:11 bbloom: ibdknox: that dude on HN was a real dick. "Not to shit all over you for no reason, but let me shit all over you for no reason. also, i have no idea what i'm talking about"

16:11 ibdknox: it acutally seems really well written, it just probably takes the wrong approach

16:11 ChongLi: the key thing to keep in mind about emacs undo is that you never lose anything

16:12 undos and redos just keep getting consed onto this big list

16:12 tomoj: looks like codemirror infected subpar to me

16:12 ibdknox: bbloom: I happened to see the comment as I was walking back from my run. I ran the rest of the way home to see what the fuck was going on.

16:12 Raynes: undo-tree is helpful in visualizing that tree.

16:12 ChongLi: it's not really a tree with regular emacs undo

16:12 ibdknox: bbloom: the whole tirade was so far afield

16:13 lol

16:13 ChongLi: it's just an endless stream that folds back on itself

16:13 Raynes: bbloom: What commnet?

16:13 comment*

16:13 bbloom: i'm snprbob86 on there btw, i kinda wish i could kill that alias, but HN doesn't allow renames

16:13 ibdknox: Raynes: http://news.ycombinator.com/item?id=5116615

16:13 bbloom: I saw that and found it odd :p

16:13 Raynes: Ugh, just the opening line.

16:13 HN is such a shit hole.

16:14 Please, just let me make things and leave me alone.

16:14 bbloom: Raynes: but HN is sorta ibdknox's target demographic, heh

16:15 ChongLi: isn't there a rule somewhere

16:15 ibdknox: I'm finding that to be somewhat unfortunate

16:15 lol

16:15 ChongLi: where if people have to start off with a disclaimer

16:15 they then go ahead and do the opposite in the rest of the post?

16:15 cgag: is that guy really complaining about the game being ugly

16:15 ibdknox: ChongLi: yeah, can't remember the name of it

16:16 ChongLi: it's akin to betteridge's law of headlines or something

16:16 ibdknox: cgag: a game built without a trained artist in 48 hours, yeah. It's pretty ridiculous :)

16:16 Raynes: ibdknox: This whole comment is him just dogging your cake.

16:16 game*

16:16 Wow, where did I get cake from game?

16:16 Guess I really like cak.e

16:16 ibdknox: Raynes: the keys are all like right next to eachother ;)

16:17 bbloom: ibdknox: i tried to sign up with bbloom, but i get this fun error: "Too many new accounts."

16:17 ibdknox: lol

16:17 bbloom: ibdknox: pg: user experience mastermind.

16:17 :-)

16:18 ibdknox: his treatment of HN really is funny to me

16:18 Raynes: " I like the concept of LT but I do wan't a client/server mode where I can plug in vim or Emacs (or Sublime Text 2 or whatever) as my text editor. Otherwise I'm never going to take LT seriously."

16:18 dnolen: classic HN

16:18 Raynes: ibdknox: ^ "I want to keep completing missing the point. Don't try to educate me. I'd prefer to stay remain ignorant."

16:19 egghead: could you make light table more like _insert editor here_ ?

16:19 TimMc: "This sandwich isn't enough like a soda."

16:19 bbloom: ibdknox: somebody needs to do to discussion forums like stack overflow did: just systematically design a gamified system for filtering out good stuff

16:19 egghead: I'm not sure I can use it until you do

16:19 ibdknox: lol

16:19 TimMc: bbloom: Filtering out? RReddit and HN already do that.

16:19 Oh, you mean *keeping* the good stuff. nvm

16:19 ibdknox: lol

16:19 bbloom: ibdknox: stack overflow was so successful b/c it launched with EVERY FEATURE all at once. v1 was designed, built, and shipped like an MMORPG beta

16:19 ibdknox: Reddit usually hates me

16:20 bbloom: ibdknox: of course, not enough cats.

16:20 ibdknox: bbloom: I feel like PG's general response to most things about HN can be summed up as "Ain't nothin' to a boss"

16:20 bbloom: ibdknox: huh?

16:20 egghead: 'we already have a macro that takes care of that'

16:21 ibdknox: bbloom: when people bring up issues with HN/community he usually disregards them :)

16:22 bbloom: ibdknox: the solutions are just too expensive for his side project

16:22 ibdknox: yeah

16:22 craigbro: hehe

16:41 quuxman: what does this mean? ƒ(+ (rand 0.004) 0.003))

16:42 ohpauleez: Is it possible to get a reference to `this` in a proxy, or do you have to proxy first and then `update-proxy` to get the `this` reference

16:43 Ahhhh it's inserted into the macro, nvm

16:43 thanks Joy of Clojure

16:46 callen: bbloom: filtering out good stuff?

16:46 bbloom: you mean filtering *for*?

16:47 I've been considering hacking on a discussion forum thingy lately. I have a bookmarking itch that I'm wondering if I can integrate into it.

16:47 chronno: quuxman: you have an anonymous function that takes a random number between 0 and 0.004 and adds 0.003 to it

16:47 quuxman: and one extra paren ;-)

16:48 quuxman: how do you write that without unicode?

16:49 chronno: quuxman: #(+ (rand 0.004) 0.003)

16:50 technomancy: quuxman: that's emacs-live being clever. you have to watch out when copying over large portions of code you don't understand.

16:50 it's a render-time hack; the files on disk are regular ascii.

16:51 frozenlock: I'm tempted to use bindings with default instead of arguments for a function. Is this considered bad in clojude?

16:52 technomancy: frozenlock: you should avoid it if you can... it depends on how complicated the arglists currently are and how common overriding it would be.

16:52 quuxman: I find it wourd that #(...) is shorthand for (fn [] ...)

16:52 *weird

16:52 frozenlock: Ok, I'll try to do it another way then, thanks!

16:53 tanzoniteblack: quuxman: emacs-live will also auto-render #{} as #{} and (fn []) as (fn [])

16:53 quuxman: hm...in my window those had the appropriate set and lambda characters

16:53 technomancy: tanzoniteblack: all I see is hunter2

16:53 frozenlock: tanzoniteblack: We don't see what you se... :P

16:53 tanzoniteblack: ∈ set, λ lambda

16:54 emacs-live has out clevered me when I attempted to out clever it...

16:54 chronno: lol

16:55 frozenlock: tanzoniteblack: won't be long before emacs becomes sentient.

16:57 With a little chance it will learn to warn me before pasting in IRC when I think I'm in my REPL buffer

16:58 tomoj: quuxman: #(...) means (fn [] (...))

16:58 warz: hmm. i see a lot of jira tickets and mailing list entries from 2010 about adding support for java annotations in conjunction with gen-class. ive only seen examples though of annotations on the class, i think. is it possible to add an annotation to a defn function?

17:03 ChongLi: and #(+ %1 %2 %3) means (fn [x y z] (+ x y z))

17:04 which is just fantastic for some things but can definitely be abused

17:04 bbloom: tomoj: what are you using dispatch-map for? how's it working out?

17:04 technomancy: #() doesn't nest, so it's best to keep it to the shortest of function

17:04 s

17:05 ChongLi: I like using it for wrapping an interop method invocation

17:05 quick and dirty

17:05 tomoj: bbloom: https://www.refheap.com/paste/9700a53f00cf1470d7c795285

17:05 S11001001: sabotage clojure dev by introducing insane language changes

17:05 #()-nesting based on #-count

17:05 XPherior: I've been using the partial form for anon functions more often. It's really readable.

17:06 bbloom: tomoj: hmmm... interesting... context?

17:06 ChongLi: it reminds me of the informal rules around regexes

17:06 bbloom: tomoj: I'm fixing up issue #1 now too and i'll cut a release

17:06 tomoj: experimenting with lenses

17:06 ChongLi: regexes are great when they're less than an inch or two

17:06 tomoj: not going so well

17:07 bbloom: tomoj: heh, yeah, i've given up on lenses in the absence of a full algebra system :-)

17:07 devn: I don't suppose anyone knows how to get Elastisch to return more than 10 results for a query? It says I have 268 results, but if I call (:hits (:hits results)) -- it limits the number of results to 10

17:07 tomoj: algebra?

17:07 ibdknox: lenses?

17:07 frozenlock: pokemon?

17:07 bbloom: ibdknox: function/inverse pairs

17:07 devn: bah, nevermind, think i got it

17:07 ChongLi: Mail::RFC822::Address on the other hand... wow

17:07 how does anyone maintain this?

17:07 http://www.ex-parrot.com/pdw/Mail-RFC822-Address.html

17:07 S11001001: (map #(filter ##(->> %% (map ###(f %%% 42)) (into {}) (###(%%% %)))) %) [[[...]]])

17:07 lazybot: ⇒ #<sandbox8276$eval77097$fn__77098 sandbox8276$eval77097$fn__77098@c9abb9>

17:08 frozenlock: S11001001: I would hate you for that

17:08 bbloom: the problem is that they just don't play nice with arity other than 1 in an applicative language, plus most functions simply aren't bijective

17:08 XPherior: Do Datalog queries for Datomic compose? Kind of like how ORM queries can be lazy, so you can compose them to only hit the database once.

17:08 tomoj: a function/inverse pair is an isomorphism, not all lenses are isomorphisms

17:09 ChongLi: XPherior: don't worry about "hitting the database"

17:09 S11001001: notice how it's entirely lexically unambiguous, frozenlock, unlike certain constructs already part of clojure :]

17:09 tomoj: most of the interetsing ones aren't in fact

17:09 XPherior: ... Derp, ChongLi. Completely forgot about that. :)

17:09 tomoj: like you say, most functions aren't bijective :)

17:09 XPherior: Heh, as soon as you said that, I remembered what exactly Datomic does.

17:10 Actually, ChongLi. There's a legitimate case to care. Eliminating duplication among queries. If you have two really similiar queries, it's helpful to describe one in terms of the other.

17:10 S11001001: ChongLi: "I did not write this regular expression by hand."

17:11 ChongLi: S11001001: ah, I totally missed that

17:11 I just read that part "I do not maintain the regular expression below"

17:11 assuming it was somebody else

17:11 S11001001: I think I generated a regex once

17:12 forget what for

17:12 nothing like that

17:12 ChongLi: why not use a parser combinator library?

17:12 seems like it'd be a lot more testable

17:12 S11001001: I think it was |-elimination

17:13 tomoj: bbloom: what's the arity problem? the difficulty of lensing into nth arg(s) of a function?

17:14 bbloom: what's the lens for the plus operator?

17:14 tomoj: (+ 5 y) you can solve for y, (+ x 10) you can solve for x, (+ x y) you need a system of equations to solve for x and y

17:15 like i said, without a full symbolic algebra system, inverses are scary :-)

17:15 tomoj: I'm not sure what a lens for even binary + would look like even

17:15 bbloom: exactly

17:15 such a simple case & it doesn't work out, heh

17:15 tomoj: I mean, I don't even know what you want

17:15 "lens for the plus operator" doesn't make sense to me

17:15 Raynes: drewr: Pretty sure I figured out the issue I was having with images in postal. Why it was ever working with apache mail eludes me. Pretty sure the issue was because the images are in a private github repo. That also explains why I had trouble reproducing it.

17:16 bbloom: tomoj: what are you planning to use lenses for?

17:16 Raynes: drewr: So take solace in the fact that your software is probably not broken while I go beat my face against a wall for taking 2 weeks to realize this.

17:16 bbloom: see also "Why Computer Algebra Systems Can't Solve Simple Equations" www.cs.berkeley.edu/~fateman/papers/y%3Dz2w.pdf

17:16 drewr: Raynes: forgive me for not having an img ref sanity checker :-)

17:16 tomoj: I just want extensible get-in/assoc-in/update-in/etc

17:17 bbloom: tomoj: like setf ?

17:17 in common lisp?

17:18 tomoj: dunno

17:19 main targets I'm thinking of are functions, collections, and maybe zippers

17:20 seangrove: Is there no merge-in?

17:21 I wanted to use it earlier today, went about it differently though. Thought it was a curious omission.

17:21 Raynes: drewr: Nice, that means I can blame it on you!

17:21 tomoj: (fn [x & args] (apply update-in x merge args)) ?

17:21 er, left bits out

17:22 drewr: Raynes: :-)

17:22 Raynes: drewr: It also explains one of the weirdest parts, which is how gmail worked when postbox and other desktop email clients didn't. gmail was rendering my emails in the browser where I had cookies that gave me access to the private repositories! This was a really elaborate problem.

17:22 drewr: Raynes: ahhhh that makes sense

17:23 tomoj: as a *-in addict, I fully support

17:23 seangrove: tomoj: sure, just thought it'd be a natural fit with the rest

17:24 tomoj: was just verifying I knew what you meant

17:24 technomancy: yeah, but next the merge-with fans are going to complain; where do you draw the line?

17:27 * seangrove points waaaaaaay over there

17:27 seangrove: Right about there technomancy

17:28 technomancy: (merge-with (apply partial (repeat merge-with)) m1 m2)

17:30 tomoj: some various examples https://www.refheap.com/paste/108cc5c419f3d6dcea93573ec

17:30 ChongLi: hmm docopt is really cool

17:31 been playing around with it in bash

17:31 quuxman: are there any clojure bindins for libraries that handle multitouch input in linux?

17:31 basically what I'm looking for is a kivy equivalent

17:36 bbloom: tomoj: released a new 0.2.0-SNAPSHOT and fixed https://github.com/brandonbloom/dispatch-map/issues/3

17:37 quuxman: except I don't care about android support

17:38 technomancy: quuxman: I kind of doubt it; the JVM is typically pretty crap for systems-level stuff

17:40 Raynes: technomancy: I once wrote an operating system in Clojure.

17:40 technomancy: Or maybe it was Clojure in an operating system. Who knows?

17:40 technomancy: I operated on a system while a Clojure program was running; does that count?

17:41 Raynes: Yes.

17:41 XPherior: In the 7 years since I've been introduced to conditional probability, I've never actually understood it.

17:41 Every 2-3 years it comes back and bites me.

17:42 technomancy: http://gofy.cat-v.org/

17:43 XPherior: What's the Go community like anyway?

17:43 bbloom: technomancy: lol awesome

18:07 seangrove: $seen aphyr

18:07 lazybot: aphyr was last seen talking on #clojure 21 hours and 50 minutes ago.

18:07 craigbro: wooot

18:07 think I got a little patch...

18:15 frozenlock: Hmm... I pushed a second jar to clojars with the same version number and it accepted it. However I think sometimes it gives me the older version...

18:16 technomancy: frozenlock: jars you've already downloaded are cached in your local ~/.m2 repository

18:17 but yeah, we should get clojars to stop allowing that; it's dumb

18:17 frozenlock: technomancy: yes, I've erased it... First time everything is fine, but second time it's as if it re-fetched the old copy. o_O

18:17 cbp`: is it possible to put datomic in front of an oracle database

18:17 and use it to keep track of changes

18:18 aphyr: What's the best way to get information out of swap!--other than the new state?

18:18 cbp`: instead of paying a small fortune for software that parses transaction logs

18:18 aphyr: Delivering a promise won't work, because you can only deliver once, right?

18:20 muhoo: hmm, this looks fishy https://www.refheap.com/paste/8974 is there a more efficient way to thread this kind of thing?

18:22 or cleaner, really. i'm sure efficiency has nothing to do with it.

18:22 frozenlock: muhoo: what are you trying to do? get block-count if block-hash is absent?

18:23 muhoo: no, get block-hash for the result of getting the block count

18:23 (f arg1 (f arg2))

18:23 i will bet amalloy has already created somethign to do that, and it's in useful.

18:23 * muhoo looks

18:24 Raynes: amalloy is not omnipresent.

18:24 I know this for a fact.

18:24 muhoo: yes, i guess he has to sleep at some point.

18:24 frozenlock: or does he?

18:24 tan tan taaaaaan

18:25 muhoo: Raynes: or did you mean omniscient?

18:25 amalloy rules and knows all!!

18:25 Raynes: I really meant both.

18:25 But the first mostly because you said his name hoping he'd hop in to the rescue and give you a function from useful to do what you want.

18:26 He enjoys watching us struggle.

18:26 muhoo: he does tend to do that though.

18:26 Raynes: It's only to get your hopes up.

18:27 seangrove: aphyr: What do you think about using riemann for client-side monitoring?

18:27 I'm thinking about adding a log-event function that submits a riemann-style event to our rails server that async puts it on a redis queue where ruby workers will submit it to a riemann server

18:28 Bit convoluted, but we can start measuring all sort of things client-side things in real time

18:28 beamso: i'm attempting to use clojure.java.jdbc to update a join table by deleting rows and then insert the correct ones in a transaction. is there a particular way that i should be doing this?

18:29 at the moment the call after deleting records throws an error about there being no current database connection

18:39 aphyr: seangrove: I'd just have your rails process submit directly to riemann

18:40 Unless you need durability for events through riemann restarts, in which case sure, go for a queue

18:40 Just so long as you understand exactly what the queue bounds are :)

18:42 seangrove: aphyr: Yeah, I suppose sending udp shouldn't be a problem

18:42 aphyr: Or tcp

18:42 we have this great technology for io

18:42 called "threads"

18:42 seangrove: In the middle of a request? Inrails?

18:42 Meh

18:42 Fair enough, I'll give that a try then

18:43 That'll keep some pressure off of redis I suppose

18:43 aphyr: Well, I can guarantee you it'll be a TCP connection if you talk to REDIS

18:43 Depends on what kind of guarantees you want around drops

18:43 seangrove: Anyway, that sound like a reasonable use of riemann?

18:43 aphyr: Yeah, totally

18:43 seangrove: Good stuff, will let you know how it goes

18:43 aphyr: If you're sampling data, no problem doing UDP end-to-end. If you need total counts, use TCP and wait for ack from the server.

18:49 Huh, (last) on a vector is o(n)

18:50 bbloom: aphyr: use peek

18:50 (doc peek)

18:51 ,(doc peek)

18:51 &(doc peek)

18:51 lazybot: ⇒ "([coll]); For a list or queue, same as first, for a vector, same as, but much more efficient than, last. If the collection is empty, returns nil."

18:51 bbloom: dammit bots

18:53 yedi: ibdknox: you posted it! sick

18:55 ChongLi: yedi: he posted what?

18:55 yedi: his follow up post to the CES one

18:56 i've been looking around for examples of cljs apps to see some common strategies for structuring/organizing cljs code

19:12 namespace: Is there an official clojure on android project?

19:15 aroemers: /quit

19:15 Oops..

19:19 mae: is there a way I can add class annotations with gen-class in clojure?

19:24 jeremyheiler: mae: http://stackoverflow.com/questions/10049060/clojure-attaching-annotations-to-aot-compiled-methods

19:28 ChongLi: what's the purple thing in the upper-right corner of lighttable?

19:29 ibdknox: ChongLi: fullscreen

19:30 ChongLi: ah

19:30 no wonder it doesn't do anything haha

19:30 I'm running it in its own workspace (xmonad)

19:30 ibdknox: lol

19:30 gfredericks: xmonad is always thwarting my full-screening

19:31 ChongLi: you gotta write a big manageHook

19:32 lighttable seems to have a different key repeat rate than what I have everywhere else

19:32 is that a chromium thing?

19:32 ibdknox: yeah, I don't set it

19:32 I wonder if I can..

19:32 ChongLi: also, I had to symlink libudev

19:32 ibdknox: yeah

19:33 ChongLi: that's a chromium dep?

19:33 ibdknox: that's also an artifact of chromium

19:33 mae: jeremyheiler: lol i need actual class-level annotations, not method ; (

19:33 ibdknox: yep

19:33 mae: i was hoping i could use 'add-annotation' core clojure method, but i need to get at the internal class object in the AOT stage

19:33 ChongLi: I guess it's an older chromium

19:33 ibdknox: It's head

19:33 ChongLi: oh, weird

19:33 mae: @jeremyheiler : see above

19:34 jeremyheiler: mae: oops, sorry :-/

19:34 ChongLi: I run chromium normally and it's linked against libudev.so.1

19:35 (which is the new one

19:35 )

19:36 beamso: hmmm. latest light table download is 0.2.5, but it updates to 0.2.7 upon first execution.

19:36 ibdknox: yes

19:37 ChongLi: yeah I don't know why it'd be linked against libudev.so.0

19:37 ibdknox: I think it's a compat thing

19:38 I (for my sanity) don't fiddle with that stuff and just rely on node-webkit to do the right thing

19:38 ChongLi: yeah that makes sense

19:38 ibdknox: at some point I probably need to look more into it

19:38 ChongLi: yeah hopefully

19:38 regular users might not be able to figure that out :)

19:39 ibdknox: what are regular linux users? ;)

19:39 they're probably using debian

19:39 which is fine

19:39 ChongLi: or ubuntu

19:39 majyk: ibdknox, I've been curious for a while about the underlying technology used in LightTable. What language is it written in? Is there a blog post somewhere that describes this?

19:39 ibdknox: I thought ubuntu was a debian

19:39 haha

19:40 ChongLi: yeah, but it's gussied up so people can secretly install it on their grandma's computer

19:40 beamso: ubuntu is debian testing with some extras

19:40 ibdknox: majyk: good timing. I released one today: http://www.chris-granger.com/2013/01/24/the-ide-as-data/

19:40 majyk: awesome, I'll read it now. Thank you.

19:40 ChongLi: so we gotta make sure grandma can use her light table without getting library not found errors!

19:41 ibdknox: it's fine on the oldest supported ubuntu (I test on that one) :)

19:41 ChongLi: how else can she look at all her slides from WW2?

19:41 ibdknox: haha

19:41 ChongLi: so how'd you come up with the idea to write your own editor/IDE?

19:42 * beamso wonders if you can buy the light table t-shirts

19:42 ChongLi: it seems like a lot of new languages have people that do an IDE project; this is the only one I've seen to attract a lot of attention from outside the community

19:42 ibdknox: ChongLi: I was one of the main interaction designers for Visual Studio for awhile :)

19:43 ChongLi: ibdknox: that's pretty cool

19:43 I've never used visual studio

19:43 ibdknox: apparently they're actually working on some of the things I designed now :p

19:43 ChongLi: yeah it's always satisfying to have people maintain your old code for you

19:44 bbloom: ibdknox: to be released in VS2018, i can only assume

19:44 ibdknox: haha

19:44 ChongLi: "you guys have fun with that, I'm off to do some cool new stuff!"

19:44 ibdknox: bbloom: apparently the UX team got ahold of it... I'm worried.

19:44 ChongLi: not that visual studio isn't cool, I wouldn't know!

19:44 bbloom: ibdknox: nothing good can come from that

19:44 ibdknox: bbloom: only terrible, terrible things

19:45 the guy who headed up UX while I was there was unbelievably bad at his job

19:45 ChongLi: I can see now how imported it'd be to have a cljs compiler be self-hosted

19:45 so you can package it right in light table

19:45 ibdknox: yessir

19:45 which would be wonderful

19:45 bbloom: ibdknox: probably not a good idea to single out an individual publicly :-P

19:45 ibdknox: kanaka is well on his way

19:46 SegFaultAX: Man, that conj2012 talk on functional composition was amazing.

19:46 ibdknox: bbloom: I didn't say any names! And the hierarchy is so deep you could never know ;)

19:46 bbloom: SegFaultAX: is there a list of talk videos somewhere yet?

19:46 ChongLi: SegFaultAX: the one on the goldberg variation?

19:46 SegFaultAX: bbloom: Other than the playlist, I'm not sure.

19:46 ChongLi: http://www.youtube.com/user/ClojureTV/videos?flow=grid&view=0

19:47 ton of videos in there now

19:47 SegFaultAX: But if you haven't seen it: http://www.youtube.com/watch?v=Mfsnlbd-4xQ&list=PLZdCLR02grLoyWsKpovatiBYJyf-RKx0c

19:47 Amazing.

19:47 ChongLi: Canone Alla Quarta

19:47 bbloom: SegFaultAX: thx

19:47 ibdknox: bbloom: per your HN comment, I just watched that Stu Halloway talk

19:48 bbloom: ibdknox: it was good

19:48 SegFaultAX: ibdknox: I'm looking forward to watching your talk on Light Table. :)

19:48 bbloom: Link?

19:48 ChongLi: yeah, right after watching that I went and listened to the Goldberg Variations

19:48 bbloom: SegFaultAX: http://www.infoq.com/presentations/Impedance-Mismatch

19:48 ChongLi: they're incredibly beautiful

19:48 * gfredericks hopes ibdknox has a plan to build something called "dark table"

19:48 SegFaultAX: bbloom: Thank you!

19:48 bbloom: ibdknox: i really enjoyed watching his internal struggle between confidence and humility, heh

19:49 ibdknox: haha

19:49 bbloom: yeah, it's an interesting line

19:49 gfredericks: my joke in the talk was dark chair ;)

19:50 bbloom: ibdknox: it takes one to know one, and as someone who suffers greatly from the same ailment, i can say you're still finding the line too, ha

19:50 ChongLi: ibdknox: so will I be able to do things like swap out the tab completion function?

19:50 is that just a behavior?

19:50 jeremyheiler: mae: it looks like you might be able todo it by providing meta data to the class name.

19:50 ibdknox: bbloom: haha yeah, anytime you purport to have solved an overarching problem, you're going to wrestle with it

19:51 ChongLi: yep

19:51 ChongLi: ibdknox: and if I swap it out in a specific tag

19:51 anything that is tagged with that will get the new behavior?

19:51 ibdknox: yep :)

19:51 ChongLi: yeah that's brilliant

19:51 so simple and elegant

19:52 bbloom: ibdknox: i'm curious to see how your tags stuff works out in practice. aspect-oriented anything always requires serious discipline

19:52 i guess it works with CSS

19:52 but BARELY

19:52 :-P

19:52 ibdknox: bbloom: I think that's because in most cases it's hidden

19:52 mae: jeremyheiler: good to know it seems there isnt much on the google about this but i am reading source code at this point lol ; )

19:52 ibdknox: what does an aspect mean?

19:53 yedi: ibdknox: do you update the lighttable download everytime you push a new minor release, or is it just when you post about a new version? (so is the version of lt on lighttable.com still the same one from November)

19:53 mae: jeremyheiler: did you find an example of adding metadata to a classname

19:53 jeremyheiler: mae, same here lol. lines 4036 and 7388 in Compiler.java

19:53 ibdknox: yedi: I only push a new binary if I need to

19:53 mae: kk

19:54 is this 1.4 or master?

19:54 technomancy: gfredericks: http://www.darktable.org/

19:54 jeremyheiler: master

19:54 https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Compiler.java#L4036

19:55 I assume something liek this: (gen-class :name ^{javax.persistence.Entity {}} model.Foo)

19:55 ibdknox: bbloom: but yeah, I'm not sure either :) I guess we'll see hehe

19:55 jeremyheiler: mae, i gotta run for a few minutes, let me know what you find, im curious.

19:56 bbloom: ibdknox: i decided to punt on aspects for now. WPF gets away w/o them (besides data templates having type-dispatch)

19:56 but it's something i'd like to revisit, especially for fipp

19:56 yedi: ibdknox: any plans to open source the BOT engine separately?

19:57 mae: jeremyheiler: will do

19:58 ibdknox: yedi: at some point I would like to :)

20:00 bbloom: FWIW this is unrelated to the declarative stuff we were talking about a bit ago. I'm not sure aspects belong there. (like you said WPF didn't need them)

20:01 bbloom: ibdknox: precisely. i think the behavior/object stuff you're building is right-on-track for the application layer. i think the aspect stuff likely goes there, rather than the gui toolkit layer

20:01 although styles are somewhat aspect-like, i think that templates and prototypical inherence (what WPF calls styles: ie setters) cover the bases more cleanly

20:03 ibdknox: bbloom: yeah, styles are an interesting thing to think about

20:03 bbloom: ibdknox: in most *APPLICATIONS* ie not *DOCUMENTS*, you really don't want aspect-oriented style

20:04 hence that (extremely poorly named) OOCSS movement

20:04 ibdknox: lol

20:04 yeah

20:04 bbloom: but sometimes there are real aspects

20:04 they are usually things like "base font size"

20:04 heh

20:04 "help, i'm old and need a bigger font" is a very legitimate use case

20:05 ibdknox: trust me. I know.

20:05 :p

20:05 bbloom: i had an evil tester who would just turn on and off random accessibility features

20:05 i'd get these insane bug reports: "in the latest japanese build on a turkish windows with high contrast mode set, this thinggy is broken"

20:06 really dude?. wtf?

20:06 ibdknox: something I never really considered until I did LT: variations in monitor quality

20:06 bbloom: yeah, you're color pallet was pretty flat

20:06 low contrast

20:06 palett? i suck at spelling

20:07 ibdknox: don't ask me, German immersion destroyed any hope I have for spelling things correctly :)

20:10 seangrove: bbloom: broke out laughing at that bug report

20:11 ibdknox: seangrove: working at MSFT you see some crazy bugs

20:12 bbloom: do not get me started on turkish. as a programmer: fuck that language

20:13 seangrove: ibdknox: I fear I may never have the pleasure of knowing that first-hand

20:13 bbloom: Oh? I have several friends harassing me to go out to Istanbul, and I figure I should pick up some Turkish before-hand

20:13 bbloom: seangrove: http://haacked.com/archive/2012/07/05/turkish-i-problem-and-why-you-should-care.aspx

20:13 ibdknox: one of my favorite actual bugs was when I worked on the editor. For a brief period of time there was a bug that caused deleting auto-inserted whitespace would actually insert 3 tab chars

20:21 seangrove: bbloom: Ah, I see

20:22 Yes, I've had some similar problems with Russian, etc.

20:22 Bug reports that we were blowing everything up because I was checking to see if the first character of a string was uppercase, or trying to make it uppercase, and that not working well for characters outside of ASCII

21:19 gfredericks: is it a common pattern to have one protocol for _being_ a Foo and another one for being able to be converted into a Foo?

21:19 I feel like I keep running into this

21:21 (e.g., ISeq and Seqable)

21:22 I ran into a similar situation when making a lib for dates; seems weird to extend vectors to the date protocol so that [2013 2 5] is a date, but reasonable to make that convertible to a date...

21:22 seangrove: aphyr: Is there a way from ruby to bulk-submit events?

21:22 e.g. client << [{}, {}, ...]

21:32 jeremyheiler: mae: (gen-class :name ^{org.junit.Ignore {}} Foo) definitely works.

21:45 warz: hm, im still trying to figure out how to add the equivalent of a java function annotation in my clojure code

21:47 can this be done in clojure? ive read mentions of it, but i must not be recognizing examples of how to do it, if i see them

21:50 ChongLi: I don't know about annotations

21:50 but you can add docstrings

21:54 or any metadata you want, for that matter

22:04 warz: ive seen a few mailing list posts where people mention that the Programming Clojure book contains examples of how to use annotations, and that it's easy one person said.

22:05 so i'm tempted to buy the book, even though i already bought 2 other clojure books this week. haha.

22:05 ChongLi: https://groups.google.com/forum/?fromgroups=#!topic/clojure/0hKOFQXAwRc

22:06 this is from almost 3 years ago

22:08 jeremyheiler: warz, are you trying to add java annotations to generated class files?

22:37 warz: jeremyheiler, i dont know how exactly to phrase what im trying to do because im not very familiar with java or clojure yet, but im writing some clojure code that i am compiling to a jar using ahead of time compiling, so that it can be called from a java application

22:37 in this case, it's a game server, and im writing plugins for it

22:37 in clojure im extending a java class, using gen-class

22:38 and in java, one of the functions i want to overwrite would required an annotation, like @Handler

22:38 and im just trying to do that in my clojure code, somehow

22:41 jeremyheiler: Check this out: http://stackoverflow.com/questions/10049060/clojure-attaching-annotations-to-aot-compiled-methods

22:42 you do something like (gen-class :methods [^{Deprecated {}} method-name String])

22:43 "Deprecated" being java.lang.Deprecated, an annotation.

22:44 warz: hmm, ok i will try that.

23:42 seangrove: Does cljs have a way to provide data for the clojure compiler about param typing?

Logging service provided by n01se.net