#clojure logs

2013-01-25

00:01tomoj&(#'+ 1 2)
00:01lazybot⇒ 3
00:02rationalrevoltDoing (+ 1 2) or (#'+ 1 2) gives the same result - but, i'm not seeing whats different
00:03rationalrevolt(+ 1 2) would look up the symbol to obtain the var and then invoke it with the arguments
00:04tomojyes, 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
00:04tomojif you redef #'handler later, run-jetty will still have the old fn
00:04rationalrevolt(#'+ 1 2) expands to ((var +) 1 2) and (var +) is doing a lookup of + each time (#'+ 1 2) is eval'd - is this correct?
00:06tomojwhen 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
00:08rationalrevoltalright
00:10rationalrevoltbut, 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?
00:12amalloyno, it's the same var with a new value
00:13rationalrevoltalright
00:13rationalrevoltbut, this would only work int the same thread where run-jetty was executed in, correct? i.e. the repl thread
00:14rationalrevoltif 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?
00:16rationalrevoltor i may be wrong, since def's update the root binding?
00:18amalloyyes, you are wrong
00:23rlman, just started in clojure the other day and i'm loving it =)
00:27brainproxytomoj: a workaround seems to be set the "Expires" header to "0" using a piece of middleware
00:27brainproxyI tried just about everything else w/ no joy :p
00:28brainproxybut I consider it better than sticking a nonce in the client-side logic
02:48alexbaranoskyhello fellow nerds
02:49ejacksongood morning, sir.
03:08AtKaaZhey guys, how do you write this in clojure? getStackTraceDepth = Throwable.class.getDeclaredMethod("getStackTraceDepth");
03:12broquaint(let [getStackTraceDepth (.getDeclaredMethod (.class Throwable) "getStackTraceDepth")] ...)
03:12broquaintI guess.
03:12broquaintWhen in doubt, use the docs - http://clojure.org/java_interop
03:12AtKaaZthing is, I'm getting this: IllegalArgumentException No matching field found: class
03:13AtKaaZdo I need an import or something?
03:13broquaintWhat does the your code look like?
03:13AtKaaZ,(.class Throwable)
03:13AtKaaZ&(.class Throwable)
03:13lazybotjava.lang.IllegalArgumentException: No matching field found: class for class java.lang.Class
03:16broquaintDo you mean getClass? http://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html
03:16ChongLi,(class Throwable)
03:17ChongLi&(class Throwable)
03:17lazybot⇒ java.lang.Class
03:17AtKaaZthat makes sense ChongLi
03:19AtKaaZ&(.getDeclaredMethod (class Throwable) "getStackTraceDepth" nil)
03:19lazybotjava.lang.NoSuchMethodException: java.lang.Class.getStackTraceDepth()
03:19AtKaaZthat's what I want, but meh it should work, even if it's package protected method right?
03:20AtKaaZoh wait
03:20AtKaaZ&(.getDeclaredMethod Throwable "getStackTraceDepth" nil)
03:20lazybot⇒ #<Method private native int java.lang.Throwable.getStackTraceDepth()>
03:20ChongLiyeah
03:21AtKaaZlol I failed so badly, thanks guys
03:21broquaintnp :)
03:21ChongLia class of a class is just a superclass I guess
03:22AtKaaZyeah I guess in java Throwable.class is used to refer to Throwable class :D
03:28AtKaaZwhat am I missing here: https://gist.github.com/4632766
03:36juxovecwould you recommend using Clj for ordinary (mostly CRUD) MySQL-driven websites? those websites which are writen in PHP most of the time
03:41p_ljuxovec: depends what you are really doing
03:41p_lIf you want to use AJAX-driven tabled display etc., sure
03:41p_lexcept that's for *client*
03:41seancorfieldjuxovec: I would certainly prefer to use Clojure for such things, compared to PHP, but that's a personal choice
03:41p_lnow you'll need something on the backend
03:41p_l(also, drop MySQL)
03:42seancorfieldI do a lot of CRUD work with Clojure - with MySQL and with MongoDB
03:44seancorfieldDoes that answer your question juxovec ?
03:45juxovecI think it does
03:45juxovecthere 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
03:45seancorfieldI'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) :)
03:47seancorfieldI 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 :)
03:47seancorfieldIf I just wanted a CMS, that's a different question of course (although, again, I probably would not choose PHP).
03:48p_ljuxovec: those commands aren't that great, especially once you start digging things up
03:49p_lfor single-command stuff, I'd rather go with Rails, but you need some knowledge outside of DHH's drivel to make best of it
03:49juxovecit is still the same question, just s/PHP/Ruby/ or /Python/
03:49seancorfieldAt 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
03:50seancorfieldBut we may well build new web apps entirely in Clojure with FW/1...
03:50seancorfieldfor the sort of app we build, CRUD is only a small part of the whole
03:55juxovecI 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
03:57muhoojuxovec: you coud always hybrid it
03:57ucbI was about to suggest ^^^^
04:01juxovecyou mean some REST/SOAP bridge to connect them?
04:02ucbjuxovec: 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
04:02ucbjuxovec: e.g. use rails/django for crud; use clojure for RO stuff in your other more difficult bits of the website
04:07juxovecI understand. I think it can work. thx
04:10AtKaaZwhat is the method for returning first match from a seq?
04:11clgvAtKaaZ: you can use some
04:12clgv&(some odd? (range 5))
04:12lazybot⇒ true
04:12clgvah lol right you hav to write it differently
04:12clgv&(some #(when (odd? %) %) (range 5))
04:12lazybot⇒ 1
04:12clgvotherwise first+filter
04:13clgv&(first (filter odd? (range 5)))
04:13lazybot⇒ 1
04:13AtKaaZbut wasn't there a method already for this?
04:14AtKaaZoh 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
04:20ucb,(findfn [1 2 3 4 5] 2)
04:20ucbbleh
04:20AtKaaZthanks broquaint
04:21broquaintnp :)
04:24clgv$findfn odd? (range 5) 1
04:24lazybot[]
04:24clgvlazybot finds nothing^^
04:25AtKaaZ$findfn (range 5) 1
04:25lazybot[]
04:26AtKaaZ&(first (range 5))
04:26lazybot⇒ 0
04:26AtKaaZmakes sense then
04:26AtKaaZ$findfn (range 5) 0
04:26lazybot[]
04:27AtKaaZ$findfn '(0 1 2) 0
04:27lazybot[]
04:30clgvoh that should work
04:30clgv$findfn [0 1 2] 0
04:30lazybot[clojure.core/first]
04:30clgv$findfn odd? [0 2 4 1 3 5]
04:30clgv$findfn odd? [0 2 4 1 3 5] 1
04:31lazybot[]
04:31lazybot[]
04:35hyPiRion,(some odd? [0 2 4 1 3 5])
04:37hyPiRionOh well, clojurebot is somehow dead.
04:40zbywhen I run 'lein ring server' I don't get any log output
04:40zbylike the requests being served
04:40zbyand the times when it reloads because of a code change
04:40zbycan I have that?
04:44clgvhyPiRion: that returns true only and not the element ;)
05:13the-kennycljs.core.pr_str("äöü")
05:13the-kenny""\xE4\xF6\xFC""
05:13the-kennyis this by-design (latest clojurescript release)
05:13the-kenny?
05:25hyPiRionclgv: Yeah, I realized.
05:26hyPiRion&(pr-str "äöü")
05:26lazybot⇒ "\"äöü\""
05:26hyPiRionthe-kenny: sounds like a bug-ish
05:26hyPiRionunless, well, the webpage doesn't support äöü as characters
05:28the-kennyhyPiRion: 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
05:29the-kennyprint-str still prints unicode characters
05:45hyPiRionthe-kenny: sounds somehow like some bug with munging
05:45hyPiRion...ish
05:45hyPiRion,(munge "äöü!")
05:46hyPiRion&(munge "äöü!")
05:46lazybot⇒ "äöü_BANG_"
05:59zbycemerick - thanks a lot
05:59zbyunfortunately I am still lost: https://gist.github.com/4633508
06:07alexnixonin 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.
06:08alexnixonHowever, 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
06:10the-kennyalexnixon: Does the data arrive in sequence? Maybe your first promise isn't the first to get delivered
06:10alexnixonthe-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
06:11alexnixonthe-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
06:13Chousukealexnixon: so what's actually happening instead? it just randomly stops consuming from the sequence?
06:13Chousukeare you sure you're delivering all the promises?
06:14alexnixonChousuke: 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
06:15alexnixonChousuke: 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
06:16Chousukewell, it's hard to tell what's going wrong without seeing the actual code :/
06:18alexnixonyeah 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)
06:19alexnixonjust wondering if there are any laziness "gotchas" that I might be running in to
06:22alexnixonit seems to be quite a subtle area, and not-at-all easy to debug when things go wrong
06:25hyPiRionalexnixon: Usually I tend to read data into values asap, as closing connections bites you hard when doing laziness
06:26alexnixonhyPiRion: 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
06:27alexnixonhyPiRion: 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
06:29hyPiRionalexnixon: Do you have to do it with promises?
06:30hyPiRionPut in an agent and an atom or so instead.
06:31alexnixonhyPiRion: no, it's just a very clean abstraction which magically handles serialising incoming data (which may arrive out-of-order)
06:31hyPiRionokay.
06:32alexnixonthe downside is that laziness is a subtle beast :-(
06:32hyPiRionMaybe Lamina could be a nice replacement?
06:33hyPiRionor, humm, that's not entirely correct either.
06:33alexnixonI've only heard of it in passing - I'll take a look
06:33hyPiRion(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)
06:34no7hingafaik lamina only guarantees order if events already arrive ordered - but don't nail me on that
06:35hyPiRionno7hing: Yeah, that's what I was afraid of, but I suddenly remembered a talk from the author where he solved that issue I think.
06:35no7hingdo you have a link on that one?
06:36hyPiRionI'll try to find it, programming in C++ isn't that funny anymore.
06:36no7hingeither way, a post in the google group should give you clarity: https://groups.google.com/forum/#!forum/aleph-lib
06:36no7hing(the aleph group is also for lamina)
06:39no7hinghmm, actually pipelines could help here, as they only advance to the next step when the current one has been realized
06:39no7hinglamina pipelines that is
06:39hyPiRionhttp://www.infoq.com/presentations/Event-Driven-Programming-in-Clojure
06:40no7hinghyperion: thanks
06:40hyPiRionAnything to keep me away from C++ programming :)
06:40no7hings/hyperion/hypirion/g
06:40no7hingbaha
06:44no7hingi'am wondering which talk i was watching while zach was presenting lamina
07:21equalsdannyhi guys. does anybody know of Swing wrappers for Clojure?
07:21progoequalsdanny: seesaw must be the best
08:56equalsdannyprogo: 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.
09:01hyPiRionequalsdanny: you dynamic stack size?
09:01hyPiRion/s/you//
09:01hyPiRionYou can specify the size of the JVM stack, though I think that's the only thing you can do
09:02hyPiRionotherwise you'd have to make a stack and use it in a for loop yourself, since the JVM cannot really optimize it that much
09:04dnolendoes nrepl.el macroexpand actually work?
09:04TimMchyPiRion: I'm thinking of doing that with my tree-walker.
09:06zbyhow can I know if lein reloaded the ring application after a code change?
09:06zbyI run 'lein ring server' - but it does not output any info about the code reload
09:14cvkemHi, 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?
09:17equalsdannycvkem: What framework are you using for wepapp?
09:19cvkemHi 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)
09:53TimMchyPiRion: Perhaps one could write a defn-deep that inserts a loop and rewrites all explicit recursive calls as recur.
09:58TimMcRandom 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:01nDuffTimMc: Depends on the revenue model. If you charge linear with space consumed, for instance...
10:02TimMcheh
10:02nDuff...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:02TimMcI was thinking more about just the strain on databases.
10:03nDuff*shrug*. In the case where I've been there, our datastores were shardable.
10:03nDuff...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:04nDuff...but more customers than you can deal with is not a bad problem to have unless you designed yourself into a serious corner.
10:04TimMcDesigning yourself into a serious corner is pretty common. :-/
10:06TimMcSo 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:23nDuffTimMc: 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:23nDuffs/resulting in/settled by/
10:29augustlnDuff: haha, nice outcome of the lawsuit
10:30augustlnDuff: what was the case for unshardable SaaS? I don't think I've seen any SaaS that isn't customer/user scoped
10:31nDuffaugustl: ...customer-scoped, but they were a huge customer.
10:32augustlnDuff: ah
10:32augustlthey had a "MAXIMUM" plan with unlimited everything? :)
10:33TimMcI confess I still don't know what quity is.
10:33TimMc*equity
10:33nDuffTimMc: Ownership
10:33llasramIsn't that when you're prone to leave online venues? e-quit-y
10:34augustlequity = owning stock, that's about it, right?
10:34nDuffaugustl: *nod*.
10:34TimMcGot it, imaginary numbers.
10:35augustlwell, that depends on whose stock :)
10:39tomoj&((fnil identity 42) nil)
10:39lazybot⇒ 42
10:39tomojoh
10:40tomojfighting with core for names always screws me up, takes me forever to realize e.g. #'identity is not #'c.c/identity..
10:43llasramtomoj: You have a var in your ns named `identity`?
10:43tomojyeah
10:44tomojand comp, get, assoc, peek, conj, map, mapv...
10:44llasram? what are you doing?
10:46llasramnDuff: a hand-off queue, maybe?
10:49TimMcnDuff: WRiting to the lazy seq, or handing stuff off to the side?
10:51nDuffthe buffered writer is being bound to *out* inside a worker thread, the lazy seq is being used as a return value is compojure
10:52FrozenlockMay I inquire on the state of clj-cljs code sharing?
10:55TimMcnDuff: It is a lazy seq of characters?
10:56gfredericksFrozenlock: I haven't heard anything beyond the age-old lein-cljsbuild crossovers approach
10:58nDuffTimMc: ...of strings is my understanding, but let me check the compojure docs.
10:58Frozenlockgfredericks: Thanks
11:04hyPiRionhey, C++ question totally unrelated to Clojure: If I have "uint32_t a = 0; a--;", is the result undefined, or will the thing crash??
11:04lazybothyPiRion: Definitely not.
11:04hyPiRion/s/??/?/
11:05nDuffhyPiRion: That should wrap around, if memory serves.
11:08ChongLihyPiRion: I just tried it
11:09ChongLiit returned 4294967295
11:10hyPiRionYeah, 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:11nDuffI'm quite sure it won't throw an error.
11:11AnderkentAFAIK it's basically a = (uint32_t) (a - 1) => (uint32_t) -1
11:11nDuffC doesn't specify checked math.
11:11Anderkentwhich by spec is UINT_MAX
11:11alexnixonhyPiRion: IIRC unsigned integers must wrap (according to the spec), whereas overflow for signed integers is undefined
11:11nDuff...not for integers, anyhow.
11:11Anderkentalexnixon: we're talking about underflow though
11:12dnolenjonasen: ping
11:12ChongLihttp://c0x.coding-guidelines.com/6.3.1.3.html
11:13hyPiRionChongLi: Thanks
11:13hyPiRion(inc alexnixon)
11:13lazybot⇒ 1
11:13AnderkentChongLi: yup, assuming type of (a - 1) is signed int
11:14hyPiRion(inc ChongLi)
11:14lazybot⇒ 1
11:14AnderkentActually I think the relevant bit is 6.2.5
11:14ChongLithis stuff can be so tricky to deal with
11:15ChongLiOtherwise, 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:15Anderkent"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:15Anderkentand that is for negative overflow too
11:15Anderkent6.3.1.3 discusses convertion from signed int to unsigned int
11:16Anderkentnot operations on unsigned ints
11:16hyPiRionIt's iffy when you're working against Intel compilers. You never know what they do.
11:17ChongLihttps://www.refheap.com/paste/8956
11:17ChongLiI tried this with g++
11:17ChongLiand it underflowed
11:17hyPiRionThe only thing which is relevant for me is if it crashes or not
11:18ChongLibut it's ok to get an incorrect result? :)
11:18ChongLihaha
11:18hyPiRionBut you guys have confirmed my thoughts. So thank you again :)
11:18hyPiRionChongLi: I abuse stuff: `while (c --> 0) ...`
11:20tomojllasram: lenses - (= 4 (l/assoc 3 l/identity 4))
11:21devnmarmalade is down :(
11:22ChongLidevn: I complained about that yesterday
11:22ChongLitechnomancy informed me that it was node.js's fault!
11:22hyPiRionIt's always node.js' fault.
11:22llasramtomoj: Iiiinteresting
11:24hyPiRionOh nice, https://github.com/clojure/clojure/commit/3e89a16b973914a057a33417ccb621a099283ccd
11:24tomojthen (= (l/assoc-in nil [:foo :bar] 4) (l/assoc nil (l/comp :foo :bar) 4))
11:24hyPiRionreduce-kv now supports nil
11:24hyPiRionand the reducers library also does.
11:26ChongLioh man
11:26ChongLipeople were storing keys and passwords in public repos on github
11:26ChongLiso they had to kill search to protect them?
11:26ChongLifaith in humanity lost :(
11:27hyPiRionChongLi: they killed the search feature because of that?
11:27ChongLiwell, I'm sure they didn't destroy the code
11:27ChongLithey'll probably turn it back on once everything settles down
11:27stain_silly people!
11:28stain_how would you do that? git init directly in the home directory?
11:28stain_here's 25 GB straight to Github!
11:28stain_it's all.. "opensource" yeah
11:28eggheadlol
11:28llasramChongLi: citation?
11:28ChongLithinking about this makes me realize how dangerous Datomic really is
11:29ChongLihttp://it.slashdot.org/story/13/01/25/132203/github-kills-search-after-hundreds-of-private-keys-exposed
11:29ChongLiare they still working on allowing you to destroy data in Datomic?
11:29hyPiRionChongLi: "With great power comes great responsibility" - Rich Hickey
11:30TimMcChongLi: 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:30TimMcI was tempted to "fix" the repo.
11:31ChongLiwow
11:31ChongLigithub should just put a filter on .ssh
11:31ChongLiforce you to explicitly turn it off before you can push
11:32hyPiRionChongLi: At least ask if you intend to do so.
11:32AnderkentChongLi: except one could just commit their encrypted file, and .ssh/ that just symlinks to .private/.ssh
11:33AnderkentI don't think github should care about what i push to it at all
11:33ChongLiwell they care enough to turn off search
11:33Anderkentyes, and I think that's wrong
11:34Frozenlock"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:34TimMcI think disabling search is an OK temporary patch, as long as it only lasts for maybe half a day.
11:35Anderkentdisabling the search doesnt help at all
11:35TimMcIt doesn't? Google doesn't index Github very effectively, last I saw.
11:35babilenhyPiRion: 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:35edlothiolthey didn't disable search, it just went down ( https://status.github.com/messages )
11:35Anderkentwell I get 10 sites of results for 'site:github.com ".ssh/id_rsa"' right now
11:36TimMcI guess GOogle improved their indexing, then. :-)
11:36Anderkentedlothiol: good to know
11:36TimMcedlothiol: Ha!
11:36dnolenibdknox: nice post
11:36edlothiolthough "we are keeping it offline while we perform some additional maintenance" could of course be related to this
11:37babilenA 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:38ibdknoxdnolen: thanks :)
11:40hyPiRionbabilen: yeah, it makes stuff usable.
11:42babilenHope I can merge that branch soon
11:46devnhm, 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:46devnit treats them like they're nested
11:47devntechnomancy: any ideas?
11:47babilendevn: I assume that you are referring to the behaviour in Emacs. Is that correct?
11:47devnyes
11:49devnTAB is bound to (indent-for-tab-command ...)
11:53metellusdevn: 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:57quuxmanhas anybody here used overtone?
12:02dysocoHello, anyone knows where can I get ClojureBox for Windows? The website seems to be down: http://clojure.bighugh.com/
12:02gfredericksdoes leiningen support adding maven repos from arbitrary directories? (e.g., a /lib in my project)
12:10technomancygfredericks: there is such a thing as file:// repos, but you didn't hear that from me
12:10technomancydevn: I have no idea what the logic behind clojure-mode indentation is, but metellus is probably correct
12:13seangrovequuxman: Yeah, of course, why?
12:13quuxmanI'm trying to set it up
12:13seangrovewei_ has more experience with overtone than I do though
12:15quuxmanseangrove: 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:16seangroveOh, hadn't seen iclojure before
12:16seangroveiclojure?
12:16seangrovebah, no entry :P
12:16seangroveany?
12:16seangrovelazybot clojurebot: whatsamattawitchyou
12:17seangrovequuxman: Are you using emacs/vim/ccw?
12:18quuxmanin 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:19quuxmanseangrove: ok wow, if you use the internal SC server, it's incredibly easy: (use 'overtone.live)
12:20seangrovequuxman: Yeah, I don't remember any problems getting it setup - it installed a bunch of stuff, but it worked super smoothly
12:25quuxmanseangrove: how do I get definst into my namespace?
12:27seangrovejust: (:use [overtone.live])
12:27seangroveAnd then you should have access to it
12:28seangrovehttps://github.com/overtone/overtone/blob/master/src/overtone/examples/getting_started/intro.clj
12:28seangroveBest way to get started :)
12:37quuxmanseangrove: that use statement gives me a CompilerException
12:37quuxmanCompilerException: java.lang.ClassNotFoundException: overtone.live, compiling:(NO_SOURCE_PATH:1)
12:37seangroveTry opening that example file and running nrepl
12:37seangroveThen you can just do C-x C-e and eval each form
12:38quuxmanwhat's the difference between "(use ..." and "(:use ..."?
12:38nDuffquuxman: the latter is inside (ns)
12:38nDuffquuxman: the former is for use on its own.
12:39quuxmannDuff: I don't know how to use nrepl
12:40quuxmanI can run "lein repl" which starts it, but then I don't even have tab-completion
12:40quuxmanthat's why I installed iclojure
12:40clgvquuxman: install leiningen 2 and you will have tab completion in "lein repl"
12:40quuxmanI have leningen 2
12:41equalsdannyi dont like the default repl either
12:41equalsdannysomeone should definitely rework it
12:41quuxmanI'm spoiled by ipython perhaps
12:42equalsdannythe basic clojure repl is like 10 lines long. is it that hard to write 300+ but make it freaking useful??
12:42lazybotequalsdanny: Uh, no. Why would you even ask?
12:42technomancyif you don't have tab completion then your repl is broken; can you report it as a bug?
12:42clgvquuxman: well then there is something wron with your lein setup. lein completion works here
12:44nDuffquuxman: If you want a REPL environment built for extreme usability, most folks end up with emacs' nrepl.el
12:45nDuffquuxman: ...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:46quuxmannDuff: yeah, I couldn't figure out how to install that
12:46nDuffquuxman: If you have Emacs 24, the "Emacs Live" package from the overtone folks is easy to install.
12:46quuxmannDuff: 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:46nDuff...basically just a big git checkout of the whole thing into your ~/.emacs.d, and that bundles clojure-mode and everything else.
12:47quuxmanoh awesome
12:47technomancyunfortunately the default package repository only accepts packages with FSF copyright assignment, so it's basically useless
12:47nDuffSee https://github.com/overtone/emacs-live -- they've got videos and whatnot introducing it, too.
12:48technomancybut 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:49ChongLitechnomancy: manual installations are a non-starter for me
12:49quuxmanyeah, I was reading about marmalade here: https://github.com/technomancy/clojure-mode
12:49ChongLiI've got my init.el in a git repo and setup to auto-install packages from a list
12:49ChongLiI can blow away everything else in .emacs.d with git clean -dxf
12:50quuxmanbut those instructions didn't work for me.
12:50ChongLiand next time I start emacs it puts everything back
12:50ChongLirepeatability is an amazing goal to have
12:50technomancyquuxman: how so?
12:51quuxmanI put the marmalade repository command in my init.el, evalutaed it, then ran package-refresh-contents, but clojure-mode was still not found
12:52quuxmanhttp://marmalade-repo.org/packages/ shows an http gateway error
12:53XPheriorquuxman: I've been getting that for months. Every time I try it.
12:53XPheriorSo I never ended up using it the easy way. :)
12:53quuxmanwhat's the hard way?
12:53ChongLiwhat we need is a mirror
12:53XPheriorCopy the .el files from Github into .emacs.d
12:53XPheriorNot hard, just lame I guess.
12:53technomancyoh, maybe it was down because node.js crashed again =(
12:54ChongLitechnomancy: yeah I mentioned that earlier
12:54ChongLihaha
12:54technomancyChongLi: we wouldn't need a mirror if the damn thing used static files on disk like every other package archive in the world =\
12:54XPheriorHeh
12:55ChongLithe IDE as a value
12:55ChongLinow let me wrap my head around that one
12:55quuxmanSymbol's function definition is void: package-installed-p
12:56ChongLipackage-installed-p is a compiled Lisp function in `package.el'.
12:56quuxmanit's not part of emacs 24 package-* stuff?
12:56ChongLiit should be
12:57quuxmanyeah, this clojure-mode is totally baffling me
12:57ChongLipackage.el is included with emacs 24
12:57quuxmanI've got 24.1.1
12:58technomancyif you can't call that function it means that package.el hasn't been loaded yet
12:58technomancy(require 'package)
12:59quuxmansorry I'm just not famaliar with emacs, emacs lisp, or clojure. Taking me a while to figure out packages and paths
12:59ChongLiI love these blog posts; ibdknox sure knows how to write some nice stuff
13:00quuxmanis it possible to run all this stuff on android?
13:00ChongLiwhat stuff?
13:01quuxman(that's not a very serious question, btw)
13:01technomancyquuxman: once marmalade has been added and loaded, a simple M-x package-install clojure-mode will do it
13:01quuxmanscsynth + overtone
13:01nDuffquuxman: ...particularly as a newbie to emacs, I do recommend ignoring anything the clojure-mode docs say, marmalade, etc. and just using emacs-live
13:01technomancybut if you like vim, you should use vim
13:01quuxmannDuff: yeah, that's what I'm thinking
13:01ChongLiswitching from vim to emacs (or vice versa) is a pretty big commitment
13:02quuxmanI just wanted nifty clojure code navigation
13:02nDuffChongLi: Who said anyone has to "switch"? I use both.
13:02ChongLidon't attempt it while also trying to learn a new language and stuff
13:02nDuffChongLi: ...they're good for different niches.
13:02ChongLinDuff: you're pretty amazing
13:02quuxmanI've used clojure and emacs years ago, just forgot most things
13:02ChongLiI switched and now I can't figure Vim out
13:02ChongLiI keep hitting emacs keybindings in it
13:02quuxmanChongLi: yeah, that's what I would probably do :-)
13:03quuxmanI code largely by muscle memory
13:03ChongLiyeah I've got paredit in muscle memory
13:03quuxmanI learned dvorak about a decade ago. I can't code without it
13:03ChongLiparedit is just fantastic
13:04ChongLihow do you use vim with dvorak? that's just crazy
13:04quuxmanor really do anything without it. I can't use qwerty
13:04technomancydvorak is the main reason I didn't learn vim in school
13:04quuxmanChongLi: hjkl are the only bindings that are really qwerty optimized, and they work fine in dvorak too
13:04nDuffChongLi: I never got in the habit of the old vi movement keys
13:04nDuffChongLi: ...and the rest of vim seems perfectly fine in dvorak to me.
13:04ChongLinDuff: you use the arrow keys?
13:05nDuffwhen I need to navigate one-char-at-a-time, which is rarely.
13:05quuxmanChongLi: I just use hjkl.
13:05ChongLiquuxman: pretty bizarre
13:05quuxmanChongLi: but usually I use w, %, #, *, etc for navigation
13:05ChongLiI take it neither of you are FPS players?
13:06quuxmannot really
13:06nDuffChongLi: Back when I played twitch games, I remapped their keybindings to be dvorak-friendly.
13:07ChongLiby the way, easymotion is amazing
13:07quuxmanwhat's easymotion?
13:08quuxmanbtw, ultimately what I'm trying to do here is make virtual instruments that use multitouch UIs
13:08ChongLihttp://www.youtube.com/watch?v=Dmv6-dguS3g#t=1m40s
13:09quuxmanChongLi: does it have language plugins?
13:09ChongLiit's language-agnostic afaik
13:11quuxmanthat's more the vim spirit
13:11ChongLiyeah it is
13:11ChongLiwatching this little vid gave me nostalgia
13:13bprif you lien uberjar with checkout dependencies, does it package up the code from the checkouts or their jars in your ~/.m2/repository ?
13:14technomancybpr: no, part of the point of checkouts is that they only affect development
13:15bprtechnomancy: yeah, i figured as much. it kinda goes against the goal of reproduceable builds
13:15bprbut i wanted to be sure, b/c man it would be convenient right now :-p
13:16ChongLiit's pretty crazy how I see people saying leiningen is one of the reasons to learn clojure
13:16ChongLihow'd you get the idea for its design?
13:17technomancybpr: 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:17quuxmanso it looks like https://github.com/overtone/emacs-live is meant to be a ~/.emacs.d directory?
13:17technomancyChongLi: I think it flows pretty naturally out of the Clojure philosophy of representing everything as a simple map and using functions for everything.
13:18ChongLitechnomancy: yeah I was just thinking about that a bit
13:18technomancyChongLi: for instance, I didn't design it with higher-order tasks in mind, but that came for free by building on defn
13:19technomancyit'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:20ChongLiyeah
13:20ChongLiI really love the philosophy of keeping everything as just plain data
13:20ChongLiand using pure functions on it
13:21bprthat philosophy, imo, is one of the biggest contributions clojure brings to the table
13:22ChongLiI 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:22ChongLiI think Rich mentioned this in one of his talks
13:23ChongLiit's one of those "obvious" ideas that people just don't seem to be aware of
13:23technomancypeople like feeling clever
13:23ChongLiyeah that's a tempting feeling
13:23quuxmanChongLi: why is that weird? It's very natural for any kind of UI to do something like that
13:24ChongLiquuxman: sure, but it's not natural to represent data that way
13:24quuxmanChongLi: 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:24quuxmanChongLi: it is if you're writing JavaScript. I've written JavaScript apps that do exactly that, and it feels very natural and convenient
13:25ChongLiin javascript you don't really have a choice; everything is an object
13:25quuxmanChongLi: in my case the simple serialized json is stored in MongoDB, where properties or properties of subdocs can be conveniently indexed
13:26ChongLisure, that's basically the same as clojure style
13:26ChongLiit's a convention though
13:26quuxmanwhat's the story with the fancing looking terminal in these screenshots? https://github.com/overtone/emacs-live
13:27seangrovequuxman: post-processing on the video
13:27technomancysome of that seems to be designed for live-coding in front of an audience, not everyday use
13:27ChongLiit looks like they wanted to simulate taking photos of an old CRT
13:28Wild_Catnah, sadly it's just post-processing, can't be done in realtime :(
13:29seangroveWell, I don't know about "can't be done", but it's certainly not in this case :)
13:30progoI wonder if making up own HTML tags to provide template substitutions in enlive is a good idea :o
13:35Phonatacidyo : 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:37technomancydon't subclass agent
13:38technomancygen-class should only be used for java interop reasons
13:38jsabeaudryIs 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:39quuxmanwhat's the keybinding for evaluating a form using the overtone emacs-live config?
13:39jsabeaudryI just cant spell outdated can I
13:40Phonatacid@technomancy: ok thanks for the input, and thanks for leiningen :D.
13:40technomancynp
13:40tanzoniteblackquuxman: C-x C-e
13:41jsabeaudryOh wow, it finally completed
13:42quuxmantanzoniteblack: how about the whole file?
13:43tanzoniteblackquuxman: 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:44tanzoniteblackquuxman: 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:45technomancyquuxman: C-c C-k is what you want
13:45technomancythe nrepl.el readme has more details
13:55clgvjsabeaudry: 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:01jsabeaudryclgv, Ok thanks, somehow if I execute it now it's almost instantaneous
14:03clgvjsabeaudry: oh right it download the maven index on first call
14:07quuxmanare there any GUI tools that construct SC UGen graphs?
14:08quuxmanif not, a generic graph UI library would be very useful
14:09Bronsa19
14:09quuxmanespecially if it supported numeric constants
14:10Bronsaops.
14:10jsabeaudryclgv, makes sense!
14:21seangroveibdknox: Very disappointed that you fabricated all of the games that used CES-like systems
14:21seangroveAlso, please up your game for creating professional-grade games at 48-hour hackathons
14:22ibdknoxseangrove: I'm going to take some classes at digipen to prepare for next time :p
14:22seangroveWell, apparently everything you do directly reflects on the potential and ability of LT
14:39gfrederickswhy shouldn't I write a testing library for creating "spies" (like jasmine); does midge already have this?
14:41TimMcseangrove: ?
14:42seangrove?
14:42TimMcI seem to have missed this piece of snark.
14:42seangrovehttp://news.ycombinator.com/item?id=5116615
14:42jonasenis there an irc channel for aleph/lamina?
14:45technomancygfredericks: you mean something to make a function log all its invocations?
14:45TimMcseangrove: Nice.
14:45technomancyyou should look at tools.trace
14:46tomojhmm, is the claim about a seq of 100 elems true?
14:48tomojoh, I see your reply
14:59michaelr525hello
15:04tomojI'm doing that now too
15:04tomojexcept just long-polling
15:04tomojnDuff: did you see https://github.com/ztellman/aleph/wiki/HTTP ?
15:05nDufftomoj: Just found it. Think it answers the questions I had from the high-level overview.
15:06tomojI don't see the ws support
15:07tomojoh, :websocket true
15:07tomojweird...
15:10jmckitrickI'm having an issue getting a jdbc WHERE IN clause to work...
15:10jmckitrickhttp://paste.lisp.org/+2W34
15:11jmckitrickWould someone tell me why I'm getting no results back, when those ids are in the table?
15:17cgagI 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:18technomancycgag: (doto 'my.namespace require in-ns)
15:19ChongLihmm
15:19ChongLiibdknox likes putting close parens on their own line
15:20cgagthanks technomancy
15:20ibdknoxChongLi: no
15:20ibdknoxI hate that shit
15:20ibdknoxbuuuut
15:20ChongLiibdknox: I see a bunch of it in chromashift code
15:21ibdknoxLT didn't have auto-closing then
15:21ChongLiahh
15:21ibdknoxwith paredit that would go away
15:21ChongLiparedit is the best thing ever
15:22michaelr525ibdknox: oh, and chromashift is really slow because of all that CES shit ;)
15:23ibdknoxmichaelr525: I'm fairly certain it's the worst idea ever.
15:23ibdknoxAlso I'm fairly certain he never ran the game :p
15:24ChongLiwhat's weird is there already exists a game called chromashift
15:24ibdknoxoh really?
15:24ChongLisome weird super puzzle fighter type thing
15:24michaelr525ibdknox: do you plan on opensourcing some of your LT code?
15:24ibdknoxmichaelr525: all of it
15:24ChongLihttp://www.msfhigh.com/chromashift/game.html
15:24ChongLiibdknox: that's fantastic
15:25ibdknoxno use in having a closed source dev environment these days
15:25ChongLiI think the best way to build any editor is to start with an environment first
15:25ChongLia la emacs
15:25michaelr525ibdknox: every time you make a blog post i'm dying of curiosity to poke at the source..
15:25ibdknoxnot that you'll need to modify the core directly very much
15:26ChongLiwe'll be writing our own functions in CLJS and tagging them, won't we?
15:26ibdknoxmichaelr525: 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:26ibdknoxChongLi: or anything that compiles to JS
15:27ChongLiibdknox: yeah, so that sort of system really breaks down if the editor is closed source
15:27ibdknoxyep
15:27ChongLisince there'd always be this wall between user-defined stuff and built-ins
15:27ibdknoxit wouldn't make sense anyways
15:27ibdknoxyou could always just remove the behaviors/objects and replace them
15:27ibdknoxthere's literally nothing I can do that you wouldn't be able to in the system
15:28ChongLiyeah, plus that bit you mentioned where a dev might remove everything and ship his own app built inside that environment
15:28oriigis it a good practice if your function returns say a list in one case and false in another case?
15:29ChongLiwe don't want another system like flash
15:29ibdknoxChongLi: yeah
15:29ibdknoxnope nope, OSS is both the right thing to do and actually a competitive advantage
15:29ChongLilock-in just seems like a coward's way of doing business
15:29jeremyheileroriig, might be better to return nil
15:30p_lChongLi: it's called "capitalism"
15:30ChongLip_l: it's not essential to capitalism
15:30jeremyheiler... instead of false, that is.
15:30ChongLithere's an older idea called "brand loyalty" that works pretty well too
15:30p_lChongLi: 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:31ChongLiif 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:31oriigjeremyheiler thanks
15:31p_lChongLi: that requires a long-term strategy, which stock markets don't like
15:31ChongLip_l: most of what we have to deal with today (giant corporations) is very far from the core of capitalism
15:32p_lChongLi: 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:32ChongLihaha
15:32cgagtechnomancy (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:33ibdknoxcgag: :as friend needs to be in the vector
15:33jeremyheileroriig: one example of this is seq. (seq ()) => nil
15:33ChongLithat's the one thing I think consistently trips people up
15:34cgagthat was just a typo, sorry, it is
15:35ChongLiit is a pretty weird syntax
15:35cgagi 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:36cgagi'm trying to use kibit and it skips any file i use that type of keyword in due to that invalid token exception
15:36ohpauleezcgag: Yeah, kibit can't parse over ::keywords
15:37ohpauleezauto-expanded namespaced keywords
15:37ohpauleezbecause kibit only reads, it doesn't parse or compile
15:37ohpauleezit doesn't compile**
15:37ohpauleezcgag: A fix is, comment that line out or remove the second colon, run kibit, and add it back in
15:38ohpauleezor write a patch for kibit to automatically do that if it detects it :)
15:39equalsdannyChongLi: you can get vendor lockin with OSS as well when moving from one platform to another does not pass cost-benefit analysis
15:39equalsdannyin terms of complexity and efforts required
15:40ChongLiequalsdanny: you're correct there
15:40ChongLithere's also a lot to be said for your data and the portability (or lack thereof) of whatever format it's in
15:41TimMc&(:require '[clojure.string :as str])
15:41lazybot⇒ nil
15:41TimMc&(read-string "::str/foo")
15:41lazybotjava.lang.RuntimeException: Invalid token: ::str/foo
15:41ChongLithere's nothing worse than having your stuff locked up in some strange proprietary binary format
15:42TimMc&::str/foo
15:42lazybotjava.lang.RuntimeException: Invalid token: ::str/foo
15:42cgagohpauleez, that makes sense, still not sure sure why it doesn't work at the repl though
15:42TimMcHmm, how does that work again? I could swear it was possible...
15:42S11001001TimMc: the ns will be str
15:42S11001001&:str/foo
15:42lazybot⇒ :str/foo
15:42ohpauleez&::foo
15:42lazybot⇒ :clojure.core/foo
15:43ohpauleezbut not if you're just reading it
15:43ibdknoxI don't think you can auto-expand by an alias
15:43TimMcS11001001: 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:43TimMcibdknox: A damn shame.
15:43ibdknoxI agree
15:43ibdknoxI use namespaced keywords a *lot*
15:43ibdknoxlol
15:44S11001001bind the keywords in same module, refer to symbols
15:44S11001001then you also get spell-checking
15:48amalloyno, TimMc is right re ::str/foo
15:48amalloyit would work in a real repl, but lazybot reads your forms outside the namespace they're evaluated in
15:48ibdknoxhm
15:49ibdknoxmust be broken in cljs then
15:49S11001001amalloy: hm.
15:49amalloyibdknox: i wouldn't be surprised. ::str/foo refers to the clojure namespace in which compilation is happening
15:50amalloy,*ns*
15:50amalloy~ping
15:51TimMc&(do (:require '[clojure.string :as str]) ::str/foo)
15:51lazybotjava.lang.RuntimeException: Invalid token: ::str/foo
15:52TimMcBah, that's :require!
15:52amalloyheh. broken in so many creative ways, TimMc. i don't think you'll ever get it to work in lazybot
15:52TimMc&(do (require '[clojure.string :as str]) ::str/foo) ;; gotta try anyhow
15:52lazybotjava.lang.RuntimeException: Invalid token: ::str/foo
15:52TimMcSo yeah, works in my REPL. *phew*
15:52S11001001TimMc: I imagine it can't splice eval into read, just expand
15:53TimMcRight, I suppose it would have to be separate forms.
15:53TimMchmm
16:00quuxmanthe 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:00ChongLiquuxman: that's paredit at work
16:00ChongLihttp://emacswiki.org/emacs/PareditCheatsheet
16:01ChongLilearn this
16:01ChongLiyou will love it once you do
16:01quuxmanman, how can that be strongly recommended?
16:01quuxman:-P
16:01cgagi love paredit 99% of the time, but I love being able to toggle it off quickly as well
16:01ChongLideleting parens is bad
16:01ChongLiit can be toggled with M-x paredit-mode
16:02ChongLiwhich can be bound to a hotkey if you like
16:02gfrederickstechnomancy: yes (re: spies); so you could apply it to a var, or create one standalone to test with callbacks
16:03dnolenparedit - you can always insert arbitrary characters w/ C-q KEY, and delete a paren by marking a region over it.
16:04Raynesquuxman: It's strongly recommended because almost everyone uses it and enjoys it. It just takes time to get used to.
16:04ChongLiquuxman: once you get stuff like paredit-open-round and barfage and slurpage in muscle memory you'll really get into a groove
16:05quuxmanHow do I fix "exception in GraphDef_Recv: exceeded number of interconnect buffers."? In sclang I would simply set Server.options.numWireBufs ...
16:06Raynesdnolen: You can delete parens by doing C-u backspace
16:06RaynesNo need to do a region.
16:06ChongLiunbalancing parens makes paredit unhappy, however
16:07quuxmanso operations that keep them balanced are better when it's on
16:07RaynesYeah, but if paredit is unhappy already because if an accidental key sequence then you'll need to have a way to delete them.
16:07ChongLiyeah
16:07ChongLior just mash undo until they're rebalanced!
16:08ibdknoxpasting is a common culprit
16:08RaynesDoesn't always work out.
16:08quuxmanany supercollider people still around?
16:08ChongLiemacs style undo is fantastic
16:08ChongLihow does all that stuff work in light table? (I've never tried it)
16:08RaynesI never could get Emacs undo to work properly. I just use undo-tree.
16:09ChongLiit's really easy
16:09ChongLiundo a bunch
16:09ChongLiif you go too far
16:09ibdknoxChongLi: there's no paredit stuff in there right now
16:09ChongLiC-f
16:09ChongLinow you're redoing
16:09ibdknoxI added auto completing pairs a couple days ago
16:09ibdknoxin the next version
16:09ibdknoxthat is
16:09ChongLiwhat about mark/kill ring etc?
16:09RaynesKeep in mind that lt isn't Emacs.
16:09ChongLior do you just use standard cut/paste
16:10ibdknoxstandard cut and paste, though the vim bindings implement marks and registers
16:10tomojI 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:10ChongLiI am aware of that, that's why I'm asking :)
16:10ibdknoxtomoj: it's been done
16:10ibdknoxit's just *really* slow
16:10tomojoh, subpar, I see
16:10ibdknoxtomoj: https://github.com/achengs/subpar
16:10RaynesBut the name is appropriate.
16:11ibdknoxaww
16:11ibdknoxlol
16:11Raynes:p
16:11RaynesI imagine it's just hard.
16:11ChongLiRaynes: as I was saying earlier
16:11bbloomibdknox: 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:11ibdknoxit acutally seems really well written, it just probably takes the wrong approach
16:11ChongLithe key thing to keep in mind about emacs undo is that you never lose anything
16:12ChongLiundos and redos just keep getting consed onto this big list
16:12tomojlooks like codemirror infected subpar to me
16:12ibdknoxbbloom: 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:12Raynesundo-tree is helpful in visualizing that tree.
16:12ChongLiit's not really a tree with regular emacs undo
16:12ibdknoxbbloom: the whole tirade was so far afield
16:13ibdknoxlol
16:13ChongLiit's just an endless stream that folds back on itself
16:13Raynesbbloom: What commnet?
16:13Raynescomment*
16:13bbloomi'm snprbob86 on there btw, i kinda wish i could kill that alias, but HN doesn't allow renames
16:13ibdknoxRaynes: http://news.ycombinator.com/item?id=5116615
16:13ibdknoxbbloom: I saw that and found it odd :p
16:13RaynesUgh, just the opening line.
16:13RaynesHN is such a shit hole.
16:14RaynesPlease, just let me make things and leave me alone.
16:14bbloomRaynes: but HN is sorta ibdknox's target demographic, heh
16:15ChongLiisn't there a rule somewhere
16:15ibdknoxI'm finding that to be somewhat unfortunate
16:15ibdknoxlol
16:15ChongLiwhere if people have to start off with a disclaimer
16:15ChongLithey then go ahead and do the opposite in the rest of the post?
16:15cgagis that guy really complaining about the game being ugly
16:15ibdknoxChongLi: yeah, can't remember the name of it
16:16ChongLiit's akin to betteridge's law of headlines or something
16:16ibdknoxcgag: a game built without a trained artist in 48 hours, yeah. It's pretty ridiculous :)
16:16Raynesibdknox: This whole comment is him just dogging your cake.
16:16Raynesgame*
16:16RaynesWow, where did I get cake from game?
16:16RaynesGuess I really like cak.e
16:16ibdknoxRaynes: the keys are all like right next to eachother ;)
16:17bbloomibdknox: i tried to sign up with bbloom, but i get this fun error: "Too many new accounts."
16:17ibdknoxlol
16:17bbloomibdknox: pg: user experience mastermind.
16:17bbloom:-)
16:18ibdknoxhis treatment of HN really is funny to me
16:18Raynes" 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:18dnolenclassic HN
16:18Raynesibdknox: ^ "I want to keep completing missing the point. Don't try to educate me. I'd prefer to stay remain ignorant."
16:19eggheadcould you make light table more like _insert editor here_ ?
16:19TimMc"This sandwich isn't enough like a soda."
16:19bbloomibdknox: somebody needs to do to discussion forums like stack overflow did: just systematically design a gamified system for filtering out good stuff
16:19eggheadI'm not sure I can use it until you do
16:19ibdknoxlol
16:19TimMcbbloom: Filtering out? RReddit and HN already do that.
16:19TimMcOh, you mean *keeping* the good stuff. nvm
16:19ibdknoxlol
16:19bbloomibdknox: 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:19ibdknoxReddit usually hates me
16:20bbloomibdknox: of course, not enough cats.
16:20ibdknoxbbloom: I feel like PG's general response to most things about HN can be summed up as "Ain't nothin' to a boss"
16:20bbloomibdknox: huh?
16:20egghead'we already have a macro that takes care of that'
16:21ibdknoxbbloom: when people bring up issues with HN/community he usually disregards them :)
16:22bbloomibdknox: the solutions are just too expensive for his side project
16:22ibdknoxyeah
16:22craigbrohehe
16:41quuxmanwhat does this mean? ƒ(+ (rand 0.004) 0.003))
16:42ohpauleezIs 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:43ohpauleezAhhhh it's inserted into the macro, nvm
16:43ohpauleezthanks Joy of Clojure
16:46callenbbloom: filtering out good stuff?
16:46callenbbloom: you mean filtering *for*?
16:47callenI'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:47chronnoquuxman: you have an anonymous function that takes a random number between 0 and 0.004 and adds 0.003 to it
16:47chronnoquuxman: and one extra paren ;-)
16:48quuxmanhow do you write that without unicode?
16:49chronnoquuxman: #(+ (rand 0.004) 0.003)
16:50technomancyquuxman: that's emacs-live being clever. you have to watch out when copying over large portions of code you don't understand.
16:50technomancyit's a render-time hack; the files on disk are regular ascii.
16:51frozenlockI'm tempted to use bindings with default instead of arguments for a function. Is this considered bad in clojude?
16:52technomancyfrozenlock: you should avoid it if you can... it depends on how complicated the arglists currently are and how common overriding it would be.
16:52quuxmanI find it wourd that #(...) is shorthand for (fn [] ...)
16:52quuxman*weird
16:52frozenlockOk, I'll try to do it another way then, thanks!
16:53tanzoniteblackquuxman: emacs-live will also auto-render #{} as #{} and (fn []) as (fn [])
16:53tanzoniteblackquuxman: hm...in my window those had the appropriate set and lambda characters
16:53technomancytanzoniteblack: all I see is hunter2
16:53frozenlocktanzoniteblack: We don't see what you se... :P
16:53tanzoniteblack∈ set, λ lambda
16:54tanzoniteblackemacs-live has out clevered me when I attempted to out clever it...
16:54chronno lol
16:55frozenlocktanzoniteblack: won't be long before emacs becomes sentient.
16:57frozenlockWith a little chance it will learn to warn me before pasting in IRC when I think I'm in my REPL buffer
16:58tomojquuxman: #(...) means (fn [] (...))
16:58warzhmm. 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:03ChongLiand #(+ %1 %2 %3) means (fn [x y z] (+ x y z))
17:04ChongLiwhich is just fantastic for some things but can definitely be abused
17:04bbloomtomoj: what are you using dispatch-map for? how's it working out?
17:04technomancy#() doesn't nest, so it's best to keep it to the shortest of function
17:04technomancys
17:05ChongLiI like using it for wrapping an interop method invocation
17:05ChongLiquick and dirty
17:05tomojbbloom: https://www.refheap.com/paste/9700a53f00cf1470d7c795285
17:05S11001001sabotage clojure dev by introducing insane language changes
17:05S11001001#()-nesting based on #-count
17:05XPheriorI've been using the partial form for anon functions more often. It's really readable.
17:06bbloomtomoj: hmmm... interesting... context?
17:06ChongLiit reminds me of the informal rules around regexes
17:06bbloomtomoj: I'm fixing up issue #1 now too and i'll cut a release
17:06tomojexperimenting with lenses
17:06ChongLiregexes are great when they're less than an inch or two
17:06tomojnot going so well
17:07bbloomtomoj: heh, yeah, i've given up on lenses in the absence of a full algebra system :-)
17:07devnI 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:07tomojalgebra?
17:07ibdknoxlenses?
17:07frozenlockpokemon?
17:07bbloomibdknox: function/inverse pairs
17:07devnbah, nevermind, think i got it
17:07ChongLiMail::RFC822::Address on the other hand... wow
17:07ChongLihow does anyone maintain this?
17:07ChongLihttp://www.ex-parrot.com/pdw/Mail-RFC822-Address.html
17:07S11001001(map #(filter ##(->> %% (map ###(f %%% 42)) (into {}) (###(%%% %)))) %) [[[...]]])
17:07lazybot⇒ #<sandbox8276$eval77097$fn__77098 sandbox8276$eval77097$fn__77098@c9abb9>
17:08frozenlockS11001001: I would hate you for that
17:08bbloomthe 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:08XPheriorDo 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:08tomoja function/inverse pair is an isomorphism, not all lenses are isomorphisms
17:09ChongLiXPherior: don't worry about "hitting the database"
17:09S11001001notice how it's entirely lexically unambiguous, frozenlock, unlike certain constructs already part of clojure :]
17:09tomojmost of the interetsing ones aren't in fact
17:09XPherior... Derp, ChongLi. Completely forgot about that. :)
17:09tomojlike you say, most functions aren't bijective :)
17:09XPheriorHeh, as soon as you said that, I remembered what exactly Datomic does.
17:10XPheriorActually, 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:10S11001001ChongLi: "I did not write this regular expression by hand."
17:11ChongLiS11001001: ah, I totally missed that
17:11ChongLiI just read that part "I do not maintain the regular expression below"
17:11ChongLiassuming it was somebody else
17:11S11001001I think I generated a regex once
17:12S11001001forget what for
17:12S11001001nothing like that
17:12ChongLiwhy not use a parser combinator library?
17:12ChongLiseems like it'd be a lot more testable
17:12S11001001I think it was |-elimination
17:13tomojbbloom: what's the arity problem? the difficulty of lensing into nth arg(s) of a function?
17:14bbloomwhat's the lens for the plus operator?
17:14bbloomtomoj: (+ 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:15bbloomlike i said, without a full symbolic algebra system, inverses are scary :-)
17:15tomojI'm not sure what a lens for even binary + would look like even
17:15bbloomexactly
17:15bbloomsuch a simple case & it doesn't work out, heh
17:15tomojI mean, I don't even know what you want
17:15tomoj"lens for the plus operator" doesn't make sense to me
17:15Raynesdrewr: 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:16bbloomtomoj: what are you planning to use lenses for?
17:16Raynesdrewr: 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:16bbloomsee also "Why Computer Algebra Systems Can't Solve Simple Equations" www.cs.berkeley.edu/~fateman/papers/y%3Dz2w.pdf
17:16drewrRaynes: forgive me for not having an img ref sanity checker :-)
17:16tomojI just want extensible get-in/assoc-in/update-in/etc
17:17bbloomtomoj: like setf ?
17:17bbloomin common lisp?
17:18tomojdunno
17:19tomojmain targets I'm thinking of are functions, collections, and maybe zippers
17:20seangroveIs there no merge-in?
17:21seangroveI wanted to use it earlier today, went about it differently though. Thought it was a curious omission.
17:21Raynesdrewr: Nice, that means I can blame it on you!
17:21tomoj(fn [x & args] (apply update-in x merge args)) ?
17:21tomojer, left bits out
17:22drewrRaynes: :-)
17:22Raynesdrewr: 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:22drewrRaynes: ahhhh that makes sense
17:23drewrtomoj: as a *-in addict, I fully support
17:23seangrovetomoj: sure, just thought it'd be a natural fit with the rest
17:24tomojwas just verifying I knew what you meant
17:24technomancyyeah, but next the merge-with fans are going to complain; where do you draw the line?
17:27seangroveRight about there technomancy
17:28technomancy(merge-with (apply partial (repeat merge-with)) m1 m2)
17:30tomojsome various examples https://www.refheap.com/paste/108cc5c419f3d6dcea93573ec
17:30ChongLihmm docopt is really cool
17:31ChongLibeen playing around with it in bash
17:31quuxmanare there any clojure bindins for libraries that handle multitouch input in linux?
17:31quuxmanbasically what I'm looking for is a kivy equivalent
17:36bbloomtomoj: released a new 0.2.0-SNAPSHOT and fixed https://github.com/brandonbloom/dispatch-map/issues/3
17:37quuxmanexcept I don't care about android support
17:38technomancyquuxman: I kind of doubt it; the JVM is typically pretty crap for systems-level stuff
17:40Raynestechnomancy: I once wrote an operating system in Clojure.
17:40Raynestechnomancy: Or maybe it was Clojure in an operating system. Who knows?
17:40technomancyI operated on a system while a Clojure program was running; does that count?
17:41RaynesYes.
17:41XPheriorIn the 7 years since I've been introduced to conditional probability, I've never actually understood it.
17:41XPheriorEvery 2-3 years it comes back and bites me.
17:42technomancyhttp://gofy.cat-v.org/
17:43XPheriorWhat's the Go community like anyway?
17:43bbloomtechnomancy: lol awesome
18:07seangrove$seen aphyr
18:07lazybotaphyr was last seen talking on #clojure 21 hours and 50 minutes ago.
18:07craigbrowooot
18:07craigbrothink I got a little patch...
18:15frozenlockHmm... 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:16technomancyfrozenlock: jars you've already downloaded are cached in your local ~/.m2 repository
18:17technomancybut yeah, we should get clojars to stop allowing that; it's dumb
18:17frozenlocktechnomancy: 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:17cbp`is it possible to put datomic in front of an oracle database
18:17cbp`and use it to keep track of changes
18:18aphyrWhat's the best way to get information out of swap!--other than the new state?
18:18cbp`instead of paying a small fortune for software that parses transaction logs
18:18aphyrDelivering a promise won't work, because you can only deliver once, right?
18:20muhoohmm, this looks fishy https://www.refheap.com/paste/8974 is there a more efficient way to thread this kind of thing?
18:22muhooor cleaner, really. i'm sure efficiency has nothing to do with it.
18:22frozenlockmuhoo: what are you trying to do? get block-count if block-hash is absent?
18:23muhoono, get block-hash for the result of getting the block count
18:23muhoo(f arg1 (f arg2))
18:23muhooi will bet amalloy has already created somethign to do that, and it's in useful.
18:24Raynesamalloy is not omnipresent.
18:24RaynesI know this for a fact.
18:24muhooyes, i guess he has to sleep at some point.
18:24frozenlockor does he?
18:24frozenlocktan tan taaaaaan
18:25muhooRaynes: or did you mean omniscient?
18:25muhooamalloy rules and knows all!!
18:25RaynesI really meant both.
18:25RaynesBut 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:26RaynesHe enjoys watching us struggle.
18:26muhoohe does tend to do that though.
18:26RaynesIt's only to get your hopes up.
18:27seangroveaphyr: What do you think about using riemann for client-side monitoring?
18:27seangroveI'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:28seangroveBit convoluted, but we can start measuring all sort of things client-side things in real time
18:28beamsoi'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:29beamsoat the moment the call after deleting records throws an error about there being no current database connection
18:39aphyrseangrove: I'd just have your rails process submit directly to riemann
18:40aphyrUnless you need durability for events through riemann restarts, in which case sure, go for a queue
18:40aphyrJust so long as you understand exactly what the queue bounds are :)
18:42seangroveaphyr: Yeah, I suppose sending udp shouldn't be a problem
18:42aphyrOr tcp
18:42aphyrwe have this great technology for io
18:42aphyrcalled "threads"
18:42seangroveIn the middle of a request? Inrails?
18:42seangroveMeh
18:42seangroveFair enough, I'll give that a try then
18:43seangroveThat'll keep some pressure off of redis I suppose
18:43aphyrWell, I can guarantee you it'll be a TCP connection if you talk to REDIS
18:43aphyrDepends on what kind of guarantees you want around drops
18:43seangroveAnyway, that sound like a reasonable use of riemann?
18:43aphyrYeah, totally
18:43seangroveGood stuff, will let you know how it goes
18:43aphyrIf 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:49aphyrHuh, (last) on a vector is o(n)
18:50bbloomaphyr: use peek
18:50bbloom(doc peek)
18:51bbloom,(doc peek)
18:51bbloom&(doc peek)
18:51lazybot⇒ "([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:51bbloomdammit bots
18:53yediibdknox: you posted it! sick
18:55ChongLiyedi: he posted what?
18:55yedihis follow up post to the CES one
18:56yedii've been looking around for examples of cljs apps to see some common strategies for structuring/organizing cljs code
19:12namespaceIs there an official clojure on android project?
19:15aroemers /quit
19:15aroemersOops..
19:19maeis there a way I can add class annotations with gen-class in clojure?
19:24jeremyheilermae: http://stackoverflow.com/questions/10049060/clojure-attaching-annotations-to-aot-compiled-methods
19:28ChongLiwhat's the purple thing in the upper-right corner of lighttable?
19:29ibdknoxChongLi: fullscreen
19:30ChongLiah
19:30ChongLino wonder it doesn't do anything haha
19:30ChongLiI'm running it in its own workspace (xmonad)
19:30ibdknoxlol
19:30gfredericksxmonad is always thwarting my full-screening
19:31ChongLiyou gotta write a big manageHook
19:32ChongLilighttable seems to have a different key repeat rate than what I have everywhere else
19:32ChongLiis that a chromium thing?
19:32ibdknoxyeah, I don't set it
19:32ibdknoxI wonder if I can..
19:32ChongLialso, I had to symlink libudev
19:32ibdknoxyeah
19:33ChongLithat's a chromium dep?
19:33ibdknoxthat's also an artifact of chromium
19:33maejeremyheiler: lol i need actual class-level annotations, not method ; (
19:33ibdknoxyep
19:33maei 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:33ChongLiI guess it's an older chromium
19:33ibdknoxIt's head
19:33ChongLioh, weird
19:33mae@jeremyheiler : see above
19:34jeremyheilermae: oops, sorry :-/
19:34ChongLiI run chromium normally and it's linked against libudev.so.1
19:35ChongLi(which is the new one
19:35ChongLi)
19:36beamsohmmm. latest light table download is 0.2.5, but it updates to 0.2.7 upon first execution.
19:36ibdknoxyes
19:37ChongLiyeah I don't know why it'd be linked against libudev.so.0
19:37ibdknoxI think it's a compat thing
19:38ibdknoxI (for my sanity) don't fiddle with that stuff and just rely on node-webkit to do the right thing
19:38ChongLiyeah that makes sense
19:38ibdknoxat some point I probably need to look more into it
19:38ChongLiyeah hopefully
19:38ChongLiregular users might not be able to figure that out :)
19:39ibdknoxwhat are regular linux users? ;)
19:39ibdknoxthey're probably using debian
19:39ibdknoxwhich is fine
19:39ChongLior ubuntu
19:39majykibdknox, 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:39ibdknoxI thought ubuntu was a debian
19:39ibdknoxhaha
19:40ChongLiyeah, but it's gussied up so people can secretly install it on their grandma's computer
19:40beamsoubuntu is debian testing with some extras
19:40ibdknoxmajyk: good timing. I released one today: http://www.chris-granger.com/2013/01/24/the-ide-as-data/
19:40majykawesome, I'll read it now. Thank you.
19:40ChongLiso we gotta make sure grandma can use her light table without getting library not found errors!
19:41ibdknoxit's fine on the oldest supported ubuntu (I test on that one) :)
19:41ChongLihow else can she look at all her slides from WW2?
19:41ibdknoxhaha
19:41ChongLiso how'd you come up with the idea to write your own editor/IDE?
19:42ChongLiit 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:42ibdknoxChongLi: I was one of the main interaction designers for Visual Studio for awhile :)
19:43ChongLiibdknox: that's pretty cool
19:43ChongLiI've never used visual studio
19:43ibdknoxapparently they're actually working on some of the things I designed now :p
19:43ChongLiyeah it's always satisfying to have people maintain your old code for you
19:44bbloomibdknox: to be released in VS2018, i can only assume
19:44ibdknoxhaha
19:44ChongLi"you guys have fun with that, I'm off to do some cool new stuff!"
19:44ibdknoxbbloom: apparently the UX team got ahold of it... I'm worried.
19:44ChongLinot that visual studio isn't cool, I wouldn't know!
19:44bbloomibdknox: nothing good can come from that
19:44ibdknoxbbloom: only terrible, terrible things
19:45ibdknoxthe guy who headed up UX while I was there was unbelievably bad at his job
19:45ChongLiI can see now how imported it'd be to have a cljs compiler be self-hosted
19:45ChongLiso you can package it right in light table
19:45ibdknoxyessir
19:45ibdknoxwhich would be wonderful
19:45bbloomibdknox: probably not a good idea to single out an individual publicly :-P
19:45ibdknoxkanaka is well on his way
19:46SegFaultAXMan, that conj2012 talk on functional composition was amazing.
19:46ibdknoxbbloom: I didn't say any names! And the hierarchy is so deep you could never know ;)
19:46bbloomSegFaultAX: is there a list of talk videos somewhere yet?
19:46ChongLiSegFaultAX: the one on the goldberg variation?
19:46SegFaultAXbbloom: Other than the playlist, I'm not sure.
19:46ChongLihttp://www.youtube.com/user/ClojureTV/videos?flow=grid&amp;view=0
19:47ChongLiton of videos in there now
19:47SegFaultAXBut if you haven't seen it: http://www.youtube.com/watch?v=Mfsnlbd-4xQ&amp;list=PLZdCLR02grLoyWsKpovatiBYJyf-RKx0c
19:47SegFaultAXAmazing.
19:47ChongLiCanone Alla Quarta
19:47bbloomSegFaultAX: thx
19:47ibdknoxbbloom: per your HN comment, I just watched that Stu Halloway talk
19:48bbloomibdknox: it was good
19:48SegFaultAXibdknox: I'm looking forward to watching your talk on Light Table. :)
19:48SegFaultAXbbloom: Link?
19:48ChongLiyeah, right after watching that I went and listened to the Goldberg Variations
19:48bbloomSegFaultAX: http://www.infoq.com/presentations/Impedance-Mismatch
19:48ChongLithey're incredibly beautiful
19:48SegFaultAXbbloom: Thank you!
19:48bbloomibdknox: i really enjoyed watching his internal struggle between confidence and humility, heh
19:49ibdknoxhaha
19:49ibdknoxbbloom: yeah, it's an interesting line
19:49ibdknoxgfredericks: my joke in the talk was dark chair ;)
19:50bbloomibdknox: 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:50ChongLiibdknox: so will I be able to do things like swap out the tab completion function?
19:50ChongLiis that just a behavior?
19:50jeremyheilermae: it looks like you might be able todo it by providing meta data to the class name.
19:50ibdknoxbbloom: haha yeah, anytime you purport to have solved an overarching problem, you're going to wrestle with it
19:51ibdknoxChongLi: yep
19:51ChongLiibdknox: and if I swap it out in a specific tag
19:51ChongLianything that is tagged with that will get the new behavior?
19:51ibdknoxyep :)
19:51ChongLiyeah that's brilliant
19:51ChongLiso simple and elegant
19:52bbloomibdknox: i'm curious to see how your tags stuff works out in practice. aspect-oriented anything always requires serious discipline
19:52bbloomi guess it works with CSS
19:52bbloombut BARELY
19:52bbloom:-P
19:52ibdknoxbbloom: I think that's because in most cases it's hidden
19:52maejeremyheiler: good to know it seems there isnt much on the google about this but i am reading source code at this point lol ; )
19:52ibdknoxwhat does an aspect mean?
19:53yediibdknox: 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:53maejeremyheiler: did you find an example of adding metadata to a classname
19:53jeremyheilermae, same here lol. lines 4036 and 7388 in Compiler.java
19:53ibdknoxyedi: I only push a new binary if I need to
19:53maekk
19:54maeis this 1.4 or master?
19:54technomancygfredericks: http://www.darktable.org/
19:54jeremyheilermaster
19:54jeremyheilerhttps://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Compiler.java#L4036
19:55jeremyheilerI assume something liek this: (gen-class :name ^{javax.persistence.Entity {}} model.Foo)
19:55ibdknoxbbloom: but yeah, I'm not sure either :) I guess we'll see hehe
19:55jeremyheilermae, i gotta run for a few minutes, let me know what you find, im curious.
19:56bbloomibdknox: i decided to punt on aspects for now. WPF gets away w/o them (besides data templates having type-dispatch)
19:56bbloombut it's something i'd like to revisit, especially for fipp
19:56yediibdknox: any plans to open source the BOT engine separately?
19:57maejeremyheiler: will do
19:58ibdknoxyedi: at some point I would like to :)
20:00ibdknoxbbloom: 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:01bbloomibdknox: 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:01bbloomalthough styles are somewhat aspect-like, i think that templates and prototypical inherence (what WPF calls styles: ie setters) cover the bases more cleanly
20:03ibdknoxbbloom: yeah, styles are an interesting thing to think about
20:03bbloomibdknox: in most *APPLICATIONS* ie not *DOCUMENTS*, you really don't want aspect-oriented style
20:04bbloomhence that (extremely poorly named) OOCSS movement
20:04ibdknoxlol
20:04ibdknoxyeah
20:04bbloombut sometimes there are real aspects
20:04bbloomthey are usually things like "base font size"
20:04bbloomheh
20:04bbloom"help, i'm old and need a bigger font" is a very legitimate use case
20:05ibdknoxtrust me. I know.
20:05ibdknox:p
20:05bbloomi had an evil tester who would just turn on and off random accessibility features
20:05bbloomi'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:06bbloomreally dude?. wtf?
20:06ibdknoxsomething I never really considered until I did LT: variations in monitor quality
20:06bbloomyeah, you're color pallet was pretty flat
20:06bbloomlow contrast
20:06bbloompalett? i suck at spelling
20:07ibdknoxdon't ask me, German immersion destroyed any hope I have for spelling things correctly :)
20:10seangrovebbloom: broke out laughing at that bug report
20:11ibdknoxseangrove: working at MSFT you see some crazy bugs
20:12bbloomdo not get me started on turkish. as a programmer: fuck that language
20:13seangroveibdknox: I fear I may never have the pleasure of knowing that first-hand
20:13seangrovebbloom: Oh? I have several friends harassing me to go out to Istanbul, and I figure I should pick up some Turkish before-hand
20:13bbloomseangrove: http://haacked.com/archive/2012/07/05/turkish-i-problem-and-why-you-should-care.aspx
20:13ibdknoxone 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:21seangrovebbloom: Ah, I see
20:22seangroveYes, I've had some similar problems with Russian, etc.
20:22seangroveBug 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:19gfredericksis 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:19gfredericksI feel like I keep running into this
21:21gfredericks(e.g., ISeq and Seqable)
21:22gfredericksI 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:22seangroveaphyr: Is there a way from ruby to bulk-submit events?
21:22seangrovee.g. client << [{}, {}, ...]
21:32jeremyheilermae: (gen-class :name ^{org.junit.Ignore {}} Foo) definitely works.
21:45warzhm, im still trying to figure out how to add the equivalent of a java function annotation in my clojure code
21:47warzcan 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:50ChongLiI don't know about annotations
21:50ChongLibut you can add docstrings
21:54ChongLior any metadata you want, for that matter
22:04warzive 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:05warzso i'm tempted to buy the book, even though i already bought 2 other clojure books this week. haha.
22:05ChongLihttps://groups.google.com/forum/?fromgroups=#!topic/clojure/0hKOFQXAwRc
22:06ChongLithis is from almost 3 years ago
22:08jeremyheilerwarz, are you trying to add java annotations to generated class files?
22:37warzjeremyheiler, 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:37warzin this case, it's a game server, and im writing plugins for it
22:37warzin clojure im extending a java class, using gen-class
22:38warzand in java, one of the functions i want to overwrite would required an annotation, like @Handler
22:38warzand im just trying to do that in my clojure code, somehow
22:41jeremyheilerCheck this out: http://stackoverflow.com/questions/10049060/clojure-attaching-annotations-to-aot-compiled-methods
22:42jeremyheileryou do something like (gen-class :methods [^{Deprecated {}} method-name String])
22:43jeremyheiler"Deprecated" being java.lang.Deprecated, an annotation.
22:44warzhmm, ok i will try that.
23:42seangroveDoes cljs have a way to provide data for the clojure compiler about param typing?