#clojure logs

2012-10-16

00:17amalloydoomlord_: i'm inclined to say, if you want erlang-style actors, use erlang
00:18doomlord_i'll take it that means clojures' concurrency is optimized for a different granularity
00:21amalloyuhhh, i guess that's true, although i'm not sure you can derive it from my statement
00:22doomlord_if clojures concurrency was optimized for a granularity suitable for implementing fine grain actors, you'd have replied "yes there's an actor library for clojure", or "in theory you can implement actors like this.."
00:22_tcagranularity is not the only issue
00:23amalloyit's more about the style of programming. actors don't lend themselves to immutability as i understand them, but i'm not an expert in that
00:23doomlord_i understood actors communicated with messages : thats immutable data being passed between processes
00:25_tcaif you want actors you can do actors several ways fine in clojure
00:25doomlord_well if it can handle a concurrent process per core i guess you could do the sorts of things you'd do with actors another way
00:25_tcaerlang style implies low level implementation details which you cannot replicate
00:26Sgeohttp://clojuredocs.org/clojure_core/clojure.core/into
00:26SgeoDoes test-key-inclusion-cols break on nils in column 2?
00:33brainproxydnolen: thanks for your on the datomic/core.logic integration; was just lookint at your example, and was wondering where `q2` comes into play?
00:33brainproxyyour *work
00:34doomlord_is there something like 'get-in' to return multiple elements from an object e.g. (?? pos [:x :z]) == [ (pos :x)(pos :z)]
00:35doomlord_shame it doesn't appear to make object-element access n-ary by default : ) would be nice if (obj :x :z) did either that or 'get-in'
00:35doomlord_still can't have everything i guess
00:35_tcamap...
00:37dnolen,((juxt :x :y) {:x 0 :y 1 :z 2})
00:37clojurebot[0 1]
00:37doomlord_ah... didn't realize you can do element access with prefix aswell
00:37doomlord_,(map {:x 1 :y 2 :z 3} [:x :z])
00:38clojurebot(1 3)
00:38doomlord_,(:x { :x 1 :y 2 :z 3})
00:38clojurebot1
00:38dnolendoomlord_: you could make you own types that implement IFn that act like that, but I think most people would find that behavior suprising.
00:38doomlord_,([:x :z] { :x 1 :y 2 :z 3})
00:38clojurebot#<IllegalArgumentException java.lang.IllegalArgumentException: Key must be integer>
00:39doomlord_IMO it would be leveraging the n-ary nature of s-expression syntax; making a virtue of it
00:42dnolenbrainproxy: q2 doesn't come into play, thanks for pointing that out, removed.
00:42dnolenbrainproxy: I'm not sure exactly what a core.logic interface to datomic should look like, hopefully rhickey will chime in w/ more comments.
00:43dnolenbrainproxy: that said, Datomic does provide a pretty slick API if you want to build an alternate query syntax to datomic.
00:52brainproxydnolen: I'll be playing with it in the next day or so... my team's app is dealing with two quite distinct datasources
00:52brainproxyone we're creating/managing ourselves w/ datomic
00:52brainproxythe other is a mess of stuff
00:52brainproxyand our idea is to try and wrangle the latter with core.logic
00:53brainproxyin order to drive unifification with respect to data we're getting from datomic
00:53dnolenbrainproxy: very cool! :) let me know how that goes
00:53brainproxywe'll see, I may misunderstand what core.logic can do for us, but I'm still noodling it all
00:53brainproxyand we'll at least be making an attempt to leverage core.logic, but in the end may have to use other techniques
00:55dnolenbrainproxy: it's a fun tool - always good to hear stories about what did or didn't work for you.
00:56brainproxyif it works out, I'll try to gist up something that looks similar to the problems we're working on
00:56brainproxyI can't point you to a repo in this case, as this project isn't open source
00:56dnolenbrainproxy: haha, I'm used to hearing that of course :)
00:57brainproxyhehe, well I'd like to carve pieces out of it and make them open source, but we're not in a position to do that quite yet
02:31doomlord_is there an existing macro (??? a b c d e) => ((((a)b)c)d)e)
02:36tomojdoomlord_: I don't think so, that seems pretty strange
02:37tomojdo you have a real use case?
02:37doomlord_sucessive element access including mixture of maps and vectors
02:37doomlord_((((mesh) :vertex) index) component)
02:37doomlord_(??? mesh :vertex index component)
02:38doomlord_(-> ...) doesn't seem to work because whilst you *can* call (:elem obj) , you *can't* call (index array)
02:39tomojright, unless it's a keyword or symbol
02:40tomojmaybe (-> (mesh) (get :vertex) (get index) (get component)) ? :(
02:40tomojoh
02:40doomlord_aref or something like that is it
02:40tomoj(get-in (mesh) [:vertex index component]) ?
02:41doomlord_oh of course get-in does it; would be nice to eliminate the extra bracket depth, although i'm sure people would argue that makes it more readable by seperating path & origin
02:42tomojit also separates the not-found arg
02:42doomlord_i suppose i can wrap get-in in another macro ..
02:43amalloythere's no reason to get macros involved
02:43amalloy(defn my-crazy-nonbracketed-get-in [coll & path] (get-in coll path))
02:44doomlord_more faith that it will inline if its a macro :)
02:44amalloyit's way too early to worry about inlining
02:45amalloyand if not-inlining here is your bottleneck, your app is fast enough, eh?
02:45doomlord_its a syntactic helper really; one defaults to macros for that
02:46doomlord_i mean its a habit that if something is merely a syntactic helper, its a macro; and one needs a reason to do otherwise. macros are the great appeal of a lisp for me
03:29kralnamaste
03:38josteinknot only can you do destructuring in a function parameter list
03:38josteinkthe default clojure parameter-list IS a desctructuring
03:38josteinkomg
03:39josteinkrt
03:39josteinkwith clojure it IS turtles all the way down :)
03:50wergjosteink: what does this mean, so would it be possible to implement functions that directly destructure to maps instead?
03:52callenis anyone here interested in programming languages? I was looking for some feedback on a post and I thought this might be a good place to check.
03:53lpvbwell, this is a programming channel
03:53josteinkwerg: I mean say the function
03:53josteink(defn doer [f & args]
03:53wergah ok
03:53josteinkthat -is- destructuring a list into parts
03:54wergyupp
03:54callenlpvb: I realize it may seem obvious to you, but some people are really here just to make things in the specific language
03:54josteinkIm not surprised, but still a little bit disappointed I cant send function-variables across the line ;)
03:54callennot because they care about programming languages in general or the advancement thereof.
03:55josteinkcallen: Im not a regular or a op or anything in here, but your question smells of meta-question
03:56josteinkanything in specific you're wondering about?
03:56josteink;)
03:56lpvbbut wouldn't they just do that in Java then?
03:56lpvbcallen: but I'd like to see the post
04:09callenjosteink: suit yourself: http://news.ycombinator.com/item?id=4657713
04:10josteinklong post, even by HN standards :)
04:11josteinkI got time. I can take a look
04:11clojurebotexecution timeout is 10 seconds
04:12josteinkanyone here have any "deep" insight into how "fetch" works?
04:12josteinkspecifically with regard to symbols
04:13josteinkis there any way to do a (fm/remote (someOp + mydata) [result] (js/alert result)
04:13josteinkwhere the + is the clojure symbol plus
04:13josteinkor any other symbol for that matter
04:13josteinkIve tried quoting, unquoting etc
04:21callenjosteink: sorry for the length :(
04:22josteinkcallen: no worries. your loss though. most people gets scared by walls of text ;)
04:23callenjosteink: considering it a highly effective filtering mechanism.
04:45alex_baranoskyI thought I recall mention of supporting JodaTime with the 1.4 instant literals, but I guess that didn't find its way into Clojure?
04:47alex_baranoskyis it possible to implement my own JodaTime instant reader?
04:48mindbender1alex_baranosky: I guess that should be possible
04:49mindbender1though I have not investigated that but from what I read the inst literal should allow you to say time in the way you like
04:49clgvalex_baranosky: I think there is clj-time that use JodaTime so you have to search for instant literals over there.
04:51alex_baranoskyclgv: that's a library though… does it also provide a instant reader to use?
04:52clgvalex_baranosky: ah right there is #inst but that one is tied to java.util.Date by default
04:53alex_baranoskyclgv: yeah, see: https://github.com/clojure/clojure/blob/master/src/clj/clojure/instant.clj#L271
04:53clgvalex_baranosky: https://github.com/clojure/clojure/blob/master/changes.md#211-instant-literals
04:55alex_baranoskylooks like I should be able to implement something like what is done in clojure.instant for joda's DateTime -- I feel like someone else must have done that already
04:55clgvalex_baranosky: do you use pure JodaTime? otherwise adding a function/macro to clj-time for parsing instants as JodaTime would be a good idea
04:56alex_baranoskyI don't mind using the JodaTIme library directly… however if I write a instant reader for it I'll submit a pull request to clj-time regardless
05:20Lzskisso/
06:11Kototamahi, is there a macro in ClojureScript to chain property accesses (.-) ?
06:18alex_baranoskyKototama: I know little about CLJS, but… can you just use the -> macro like you could in JVM Clojure?
06:20alex_baranoskytacky proof-of-concept Jodatime instant reader: https://gist.github.com/3898489
06:20alex_baranoskyhacky* :D
06:22Lzskissanybody using here vimclojure on linux?
06:23clgvKototama: in clojure there is (.. )
07:02N8Dawghi all
07:03N8Dawgi'm a little stuck, i've tried googling around but not found the answer. I'm using lein2 and nrepl-jack-in, question is how do I shutdown the repl? I've added a dependency in project.clj and need to update
07:07antares_N8Dawg: M-x nrepl-quit or M-x nrepl-restart
07:12N8Dawgis there a way to reload dependencies in project.clj without a restart, or pull in a new library without a repl restart?
07:14N8Dawghmmm I don't have nrepl-quit or nrepl-restart as defined functions
07:15N8Dawgi have the nrepl package via marmalade
08:42`foguslynaghk: How can I exclude an entire namespace with cljx?
08:57cemerick`fogus: can't, AFAIK; its rules apply only to the decorated forms. Sounds like you just want separate clj and cljs files for the same namespace?
08:58`foguscemerick: I guess so yes
09:01`foguscemerick: Any pointers on the nicest example of a shared CLJS/CLJ codebase?
09:02`fogusI really really really want to use the existing tools, but they get me to a 90% solution
09:03cemerickI can't say I've done much browsing of different mixed-source codebases. There's lynaghk's c2, there's the fork I did of valip.
09:04`fogusOh, I've not looked at the valip source yet!
09:04cemerickI've found cljsbuild + piggieback + cljx + an nREPL middleware for cljx to apply its rules to files loaded through the REPL to be a suitable toolchain
09:04cemerick`fogus: what do you feel is missing from your current env?
09:04`fogusoh my
09:05cemerickheh, yeah, cljs dev is not for the faint of heart at the moment :-)
09:05`fogusunderstood. Once I finally got comfortable with the CLJS-only path I started to stray into the mixed path. bugbears!!!!!
09:07cemerickit's actually less complicated than it sounds. cljsbuild's only job for me right now is mv-ing foo.clj to foo.cljs; piggieback is 100% copy/paste into project.clj and then you can forget about it.
09:08cemerickcljx and its REPL middleware is more of a wildcard, insofar as writing/debugging rules for it/kibit is…interesting at times :-)
09:10`fogusI'll try to piece this together. Thanks for the pointers
09:11`fogusI have an added complication of needing to tap into the CLJS compilation pipeline. :-(
09:12cemerick`fogus: This might be nonsensical to you, but here's my default lein repl invocation at the moment: https://gist.github.com/3839780
09:12cemerickThat doesn't include the cljx middleware (which I haven't released yet), but sets the stage.
09:12cemerick`fogus: definitely sounds like a personal problem ;-)
09:13`fogusstory of my life
09:13cemerickas my father likes to say, "c'est la f'n vie"
09:14danlarkinor was it "c'est la fn vie"
09:14danlarkinbecause... get it?
09:14danlarkinugh
09:15danlarkinI take it all back
09:15cemerickGONG
09:15cemerick:-P
09:18cemerickThat mustache looks itchy.
09:19danlarkinI mustache you a question...
09:39cemerickhum, I thought readable deftype printing went in ~1.3…
09:41cemerickah, right, nm
09:42clgvcemerick: there seems not to be such a behavior in 1.4 neither
09:42cemerickclgv: it was in, then was taken out before 1.3.0 went final (http://dev.clojure.org/jira/browse/CLJ-812).
09:43clgvdefrecord has readable printing though
09:43cemericksure
10:08pyrhhohi. I'm having a bit of an issue with 'lein trampoline run' sometimes failing to start my app. it says: Caused by: java.lang.ClassNotFoundException: clojure.tools.logging.impl.LoggerFactory
10:09pyrhhoI'm using the clojure logging library (https://github.com/clojure/tools.logging)
10:09pyrhhobut I'm just not sure why it would only fail sometimes
10:09pyrhhoand haven't been able to figure out the cause
10:10pyrhho'lein run' does the same thing
10:10pyrhhohave done 'lein clean', and removed ~/.m2 and ~/.lein
10:11clgvpyrhho: tools.logging works like a charm here
10:11pyrhhoclgv: it normally works great, just sometimes my app can't start
10:12pyrhhothen did 'lein deps' and 'lein run'. and got the error.
10:16pyrhhoclgv: what version of clojure and logging are you using?
10:16clgvpyrhho: clojure 1.4 and tools.logging 0.2.4
10:17pyrhhook. I was using 0.2.3 of logging so I'll try 0.2.4
10:18pyrhhodarn.
10:18pyrhhosame thing
10:18clgvand I mentioned [org.slf4j/slf4j-api "1.6.1"] [org.slf4j/slf4j-log4j12 "1.6.1"] in my project.clj
10:21pyrhhono change.. though it installed those first
10:22clgvhmm the class that is not found is a defprotocol
10:23pyrhhoyeah, which is why I don't understand why it's not found...
10:23clgvpyrhho: do you :use tools.logging properly?
10:24pyrhhoI'm assuming
10:24pyrhhoI do (:require [clojure.tools.logging :as log]) in my namespace declaration
10:24clgvlooks fine
10:24pyrhhothen (log/info "foo")
10:25pyrhhoi have a src/log4j.xml file specifying some appenders
10:26pyrhhothough I don't explicitly require log4j in my project.clj. maybe I should add that
10:27pyrhhoadded [log4j "1.2.16"] to my project.clj but no change...
10:32pyrhhook so here's something weird when I run 'lein repl' as it is starting it complains about LoggerFactory not being found, but if I type 'clojure.tools.logging.impl.LoggerFactory at the prompt it finds it fine
10:32bhenry1if you use an atom in a noir request, is it going to be specific to that request or will another request change the same atom?
10:35clgvpyrhho: sounds like there is something weird. is there anything unusal/special in your project setup?
10:35pyrhhonot that I know of… standard ring app. It has some java source to be compiled with it...
10:39clgvpyrhho: if you have no other idea, setup a vanilla project and add the dependencies and test. when that works build it up incrementally to your current project to see where it stops working
10:39clgvpyrhho: if you have older working versions in a git repo you can use "git bisect"
10:40pyrhhoclgv: true will try bisecting
10:45pyrhhoclgv: hmmm. I checked out an old revision, did 'lein run' that started fine. went back to my head, and now I can't get that to fail either.
10:47pyrhhoclgv: I feel like it is maven (or lein) hiding something from me…
10:48pyrhhoclgv: I've removed ~/.m2 and ~/.lein and those didn't seem to make a difference.
10:48clgvpyrhho: did you check the project-clj for differences?
10:50pyrhhoclgv: true. there are a few new deps so I will try adding those in until it fails
10:54clgvpyrhho: to detect dependency problems you could quick check both revisions with "lein deps :tree" to see what changed there
10:57pyrhhoclgv: I had added some dependencies to my project.clj
11:01pyrhhoclgv: there are a few differences in the dep :tree, but nothing to do with logging...
11:02pyrhhoclgv: I had to resolve a conflicting transitive dependency issue a few commits ago, which is the differences
11:46bhenry1if you use an atom in a noir request, is it going to be specific to that request or will another request change the same atom?
11:47ghadishaybanbhenry1: it will be specific to that request
11:47bhenry1ghadishayban: thanks
11:49mpenetamalloy_: Would ordered work on CLJS?
11:49pyrhhoclgv: still around?
11:50clgvpyrhho: yes
11:50`fogusDecided to clean up the Minderbinder library that I covered in my Macronomicon talk for general use. Contributions welcomed. http://blog.fogus.me/2012/10/16/announcing-minderbinder-v0-2-0/
11:50pyrhhoclgv: I an reproduce it reliably now.
11:50pyrhhoit is if I try to start the app a second time (i.e. if everything is compiled)
11:50pyrhhoclgv: if it is already compiled, the app fails with the error. but if I do a lein clean I can start it once more
11:51clgvbut especially then it should be able find the interface to that protocol
11:51pyrhhoclgv: yeah, right?
11:52clgvpyrhho: I dont know if that might be a symptom for using (require ..) instead of (:require ..) in an ns-form
11:52pyrhhoclgv: what is the difference, anyway?
11:53clgvyou have to use (:require ..) in an ns-statement
11:54pyrhhoclgv: I've only used (:require ..) in the entire project
11:54clgvkk
11:54pyrhhodid a quick grep for "(require"
11:55clgvpretty weird
11:55pyrhhoyeah
11:55pyrhhoI can fix it for now by just doing 'lein clean' every time before starting the app
11:56pyrhhothat just feels really… dirty
11:56clgvyour project is not opensource, is it?
11:56pyrhhono, unfortunately
11:57clgvok. then you need to find a coworker to have a look at your project
11:57pyrhhoalright. thanks for all your help
12:04ghadishaybanI'm really late to the party, as the new macros just went in…were the drawbacks to let-> discussed?
12:05mpenetWhat is more appropriate for data_readers.clj location, src or resources ?
12:06ghadishaybani'm digging through clojure-log and didn't see anything recent…but this from two years ago: https://groups.google.com/d/msg/clojure/6Cb8MD5EC3w/SYAko4_PtR4J
12:11ghadishaybani'll chew on it for lunch… maybe it's just the example usage in the gist that looks off, a little imperative
12:11ghadishaybanhttps://gist.github.com/3885504
12:12ghadishaybanwill be useful while birthing a transient
12:12TimMcghadishayban: Haha, nice find!
12:15ebaxtCan somebody explain the difference between file-response and resource-response in ring? https://github.com/mmcgrana/ring/wiki/Creating-response When should file be used instead of resource?
12:15gtrakghadishayban: different from swiss-arrows?
12:17nz-ebaxt: file-response reads from the disk, resource-response via classpath?
12:18nz-http://mmcgrana.github.com/ring/ring.util.response.html
12:18ebaxtAh, that makes sense :) Thx
12:19bhenry1ibdknox: are there plans to support TOP in korma? is there already a way to do this i missed?
12:44djanatyn:)
12:44djanatynI got to use clojure to do something my teacher couldn't do in java
12:45djanatynwe're using some weird Turtle-like drawing library, and I tried using it in clojure, which went great
12:45djanatyninstead of having to compile and run each time, I could move the DrawingTool around on the canvas through my REPL
12:45djanatynit's crazy how java applications suddenly become interactive with clojure :)
12:45djanatyns/applications/libraries
12:45SegFaultAX|workdjanatyn: Hopefully you didn't get marked down for not doing the assignment as the professor instructed. ;)
12:46technomancynoninteractive development is the worst thing you could wish on someone
12:46djanatynwell, I did the assignment in java first
12:46djanatynI didn't really think to try it out in clojure
12:53thmzltis there a way to go into the REPL and look at its current state (e.g. defined vars, etc.)?
12:53technomancythmzlt: sure; all-ns and ns-map
12:57thmzltcool, I really appreaciate working in the repl, but it feels like a one-way road. it would be nice to be able to fetch code defined in the repl back to text files
12:58frawrHello
12:58frawrI'm having some trouble with apply in clojurescript.
12:58technomancythmzlt: unfortunately that's still a bit of a hack. you can get file/line metadata from vars, but you have to use https://github.com/technomancy/serializable-fn for it to really work across the board
12:58SegFaultAX|workthmzlt: Go the other way around. Use an editor that has REPL integration so you can write your code in the editor, then send it to and interact with it in an embedded REPL.
12:58thorbjornDXthmzlt: I compromise and write stuff in vim that I send to a repl with vimclojure
12:59thmzltinteresting, thanks everyone for the feedback
12:59thmzltI actually use emacs/nrepl
12:59SegFaultAX|workthmzlt: vim+vimclojure is a great option, as is emacs+nrepl.
12:59SegFaultAX|workthmzlt: Then what's the problem? :D
13:00thmzltbut I still want to see what is going on inside the repl some times
13:00N8Dawgthmzlt: how do you get the repo to exit/restart?
13:00dnolenfrawr: what's your problem
13:00SegFaultAX|workN8Dawg: Huh?
13:00frawrI want to execute a callback with a parameter, I try using apply for this.
13:00thmzltit occurs when a test passes in the repl but doesn't when I run "lein test"
13:00thmzltN8Dawg: I'm afraid I didn't understand your question
13:01N8DawgIn emacs I start the nrepl
13:01frawr#(apply callback (list param))
13:01thmzlttechnomancy: nice hack (serializable-fn), will look into that later
13:01dnolenfrawr: what's the error that your getting? Can you put your actual source in a gist?
13:01N8Dawgusing nrepl-jack-in, and it starts/connects fine, but lets say I update project.clj and want to run lein reps and restart the repl
13:02thmzltN8Dawg: I see, I just quit/start a new repl and reconnect to it (might not be the best way)
13:02frawr1 sec. I'll do that
13:03technomancyN8Dawg: you should never have to run lein deps
13:03N8Dawgbut how do you quit? restart the computer?
13:03technomancyrestarting the repl is enough
13:03technomancythmzlt: I've been told it mostly works =)
13:04N8Dawgtechnomancy: just the person I wanted to talk to :) I'm having fun with leiningen 2 and proxies
13:04thmzltN8Dawg: you might want to start a repl in a terminal and connect to it using "nrepl" instead of "nrepl-jack-in"
13:04thmzltor you can just C-x C-b and kill the nrepl process
13:05N8Dawgthmzlt: Ah thanks!
13:05technomancyuh oh
13:05SegFaultAX|workN8Dawg: Restarting the computer is never the answer [to editor problems].
13:06frawrhttps://gist.github.com/3900572
13:06frawrThere you go, the source + error
13:06N8DawgSegFaultAX|work: I know, but I'm sure theres a better way of killing the repo than killing the java process from Process monitor
13:06frawrcallback is js/alert in this case
13:07technomancyN8Dawg: just kill the nrepl-server buffer
13:07N8Dawgtechnomancy: I have a local mirror and a proxy
13:07dnolenfrawr: yeah in order to provide a uniform calling convention we assume that the object implements call, not all native JS methods do.
13:08N8Dawgtechnomancy: some artefacts come from the local mirror, others from say clojars through the proxy
13:08N8Dawgtechnomancy: I have set up the mirror section in project.clj and thats working fine, how should I set up the proxy and the non-proxy hosts?
13:09frawrdnolen: So i could wrap js/alert in a cljs function to circumvent ths problem?
13:10technomancyN8Dawg: sorry, I have no idea. we just hand off those settings to the underlying libraries
13:11dnolenfrawr: yes that's one way. it's annoying but I think this may be because alert is a method of window. real JS fns don't have this problem.
13:12frawrdnolen: thank you, I'll let the calling fn wrap the callback.
13:12SegFaultAX|workdnolen: It's probably just generally useful to wrap those functions in cljs anyway.
13:13N8Dawgtechnomancy: whats the underlying libraries now? it must have changed since leiningen v1 and v2, leiningen 1x was correctly picking pun the settings from settings.xml
13:13dnolenSegFaultAX|work: well in this case we can't really, there are no globals like there are in JS in Clojure.
13:14technomancyN8Dawg: lein 1.x accidentally picked up the settings.xml stuff because it used maven. lein 2.x uses aether.
13:14SegFaultAX|workdnolen: Sure, but couldn't we have a module that wraps all of the window methods? Anywhere you need them you can just include them in your namespace.
13:20frawrdnolen: Seems to work now. Now need to put it through some real test. Thank you!
13:22dnolenSegFaultAX|work: hmm maybe ...
13:22dnolenfrawr: np
13:23SegFaultAX|workdnolen: Is that something you think could be generally useful? There are only a dozen or so methods commonly supported across all browsers.
13:24tvachonhey folks, I've noticed using symbols rather than keywords for, eg, require in the ns statement works fine: (ns foo.bar (require [ham.socks :as socks] [bacon.tomato :refer [fish]]))
13:24tvachonis there a reason not to do that? I'm kind of into the lack of colon
13:25technomancyit looks like a function call that way
13:25technomancyseems misleading
13:26emezesketvachon: I think the best reason not to do it is that it's totally undocumented, and thus could change in any Clojure release thereby breaking your code.
13:27emezesketvachon: I'm guessing that works on accident because ##(= (name :walrus) (name 'walrus))
13:27lazybot⇒ true
13:27tvachonyea, both good points. the fact that it's in the ns statement, which already feels like a special place in a clojure file, seems like it makes up for it looking like a function call, but the lack of documentation's definitely not great
13:27tvachonanyway, mostly curious
13:27tvachonwasn't sure if it was an intentional evolution of that statement or just accidental, and sounds accidental :]
13:28technomancyyou'd also get into scenarios where the codebase would be inconsistent if you have more than one developer hacking on it
13:29tvachonoh yea, I was mainly trying to decide whether I should refactor all the ns statements in an internal project
13:29technomancythen you get into style guide issues
13:29tvachonI think I will not
13:29technomancywe've mercifully been able to avoid C-land indentation style wars; seems like that would be opening up that door
13:32djanatynemacs/nrepl users - how do you quickly throw up a new REPL to test things out?
13:32djanatyna lot of times I'll have emacs open but no nrepl buffer and I want to test something out
13:33ChongLiM-x nrepl-jack-in
13:33technomancydjanatyn: M-x nrepl-jack-in when run outside a project will give you a repl that runs in the context of leiningen itself
13:33technomancyso you get no deps other than what lein needs, but it boots a bit more quickly
13:33frawrdnolen: it works, thank you ever so much and have a good day.
13:44SegFaultAX|workdnolen: Sorry, lost internet. I didn't see your response (if you responded) to my question about wrapping all the window functions for cljs.
13:47dnolenSegFaultAX|work: it's worth thinking about tho annoying that's it not covered by goog Closure.
13:49callenwhat do clojurescript users do for DOM interaction?
13:49callenDoes one just use jQuery or is there some other idiom or standard?
13:51lispnikcallen: i've been using goog.dom
13:52lispnikcallen: there's jayq - haven't tried it though
13:53callenit's going to be a really hard sell to get my frontend guy to give up jQuery.
13:53cemerickcallen: jayq works fine
13:53lispnikjayq is a clojurescript wrapper for jquery
13:53cemerickBeing tied to jquery is…unfortunate, of course.
13:54callenarbitrarily complex CSS selectors and .on({}) go a long way.
13:54dnolencallen: also domina if you want a good selector lib.
13:55dnolencallen: domina can be optimized, jayq can't - if that's important
13:56cemerickIf someone's happy with CSS selectors, then xpath isn't ever gonna cut it. :-)
13:56dnolencemerick: domina isn't xpath
13:57cemerickdnolen: wha, since when?
13:57callenyeah uh...domina isn't going to work.
13:57callenxpath'ish selectors would make him (and I) go berserk.
13:57dnolencemerick: a long time as far as I know
13:58dnolencallen: cemerick: css selectors are fully supported
13:58dnolenlook at the repo
13:58dnolenthat functionality is months old as far as I know
13:58callenI will, but I was slapped in the face with predominantly XPath in the readme. Just because a library is capable of something doesn't mean it's well supported.
13:58cemerickhuh, so it is
13:58callendnolen: hello from HN btw!
13:59cemerickthe xpath examples should be buried in the README in that case
13:59callenI agree with cemerick.
13:59callenburied somewhere like, in the ocean, off a seaside cliff, about a mile down...
13:59dnolencallen: CSS query comes directly from Google Closure, so I expect it's pretty good.
13:59clojurebotGabh mo leithscéal?
14:00dnolencallen: hullo :)
14:00callendnolen: Hi! I'm codewright.
14:00dnolencallen: cool! nice rant ;)
14:01callendnolen: it was meant to be a lot of things to many people. Like C++. So it goes.
14:01cemerickI've been doing all my dom manipulations via goog.dom with a super-thin wrapper. It's mostly sane.
14:01SegFaultAX|workMostly.
14:02callendnolen: fwiw, I've been "sold" on clojure just by dint of the community for awhile. I'm just trying to come up with ways to find more refugees.
14:02ChongLicallen: haha, I read your rant as well
14:03SegFaultAX|workcallen: Can I get a link to your rant?
14:03ChongLihttp://news.ycombinator.com/item?id=4657713
14:03callenChongLi: beat me to the punch.
14:03SegFaultAX|workCool, thanks.
14:03`foguscallen: It was unclear if you liked Clojure or not. :-o
14:04callen`fogus: it doesn't matter if I like it or not. I want to steal the collective brainpower of the CL community and its presently hard for me to convince the crazy people to give up their toys.
14:04`foguscallen: why should you convince them of anything?
14:04technomancyjust send them the egal paper
14:05callen`fogus: "I want to steal the collective brainpower of the CL community"
14:05`foguscallen: I don't understand what that means.
14:05ChongLiI don't see the clojure community as lacking in brainpower
14:05callenit's not, but let me try to explain.
14:05ChongLiseems like some pretty awesome stuff done by just a few people!
14:06callenI'm not an excellent programmer. I'm an okay programmer. My productivity has as much to do with the library ecosystem as it does the language semantics.
14:06callenAs a result, I used Python for several years after having grown up with CL.
14:06ChongLiwell I think clojure is pretty amazing in that regard
14:06callenfor someone like `fogus, that's irrelevant. He can make anything he wants.
14:06callenI cannot.
14:06ChongLithanks to the huge array of java libraries
14:06SegFaultAX|workcallen: Haskell hasn't really brought anything new to type systems (other than perhaps typeclasses which are pretty awesome) that wasn't already well explored by ML.
14:07callenChongLi: I don't want Java libraries, I want Clojure libraries.
14:07callenSegFaultAX|work: it's more about integration and power than new-ness.
14:07SegFaultAX|workcallen: Are you saying that ML type system is not well integrated?
14:07callenSegFaultAX|work: Haskell has expanded the idioms of expression for the community further than had previously been addressed outside of white papers.
14:08callenI'm not trying to address ML at all.
14:08`foguscallen: I must say that I'm more confused than ever.
14:08ChongLiwhat specifically are you missing from clojure's set of libraries for which a java alternative is unsuitable?
14:08SegFaultAX|workChongLi:
14:09callenChongLi: it's not one simple thing. There's a general unease I haven't really gotten into. One is separation of concerns.
14:09callenChongLi: it's hard for me to advocate or push for the usage of Clojure at my workplaces or on my side projects if the frontend people don't know Clojure or how templates baked into defpartials work.
14:10callenThe reason this happened was because separate concerns (backend, frontend) were munged into one thing.
14:10callenFor better or worse, this seems to be how a lot of people do web apps on Clojure, and I can't follow those idioms.
14:10callenso I'm on my own.
14:10ChongLioh, ok
14:10callenChongLi: try not to take the specific example too far, there are a lot of things like this that concern me.
14:11emezeskecallen: BTW, good library support is not "irrelevant" for excellent programmers. If anything, one would think that an excellent programmer would care _more_ about having good libraries at their disposal.
14:11callenemezeske: maybe, but excellent programmers are better positioned to solve their own complaints.
14:11`foguscallen: I think I follow this line of thinking, but it's unclear how Common Lisp devs factor in
14:11callenemezeske: I'm talking about the scope of what's reasonable possible, not engineering standards.
14:12ChongLi`fogus: he wants those CL devs to come over and write all his clojure libs for him
14:12SegFaultAX|workcallen: It's almost like you're saying "Clojure is less awesome than Common Lisp because it isn't Common Lisp"
14:12ChongLi:)
14:12callen`fogus: we've departed from that boat. We're on to other more pragmatic concerns.
14:12callenSegFaultAX|work: superset/subset of capabilities.
14:13`fogusalright, I'll be quiet now
14:13callenSegFaultAX|work: I told you, *I'm* sold, stop pretending the CL thing is about me. It's not. I said that in the rant too.
14:13callen`fogus: I didn't mean to be dismissive if you took it that way. It's just that the CL thing is a community scope issue, we moved on to my own concerns which have more to do with getting other people to work on projects with me.
14:13SegFaultAX|workcallen: So you're making an argument from the perspective of an unsubstantiated group of people?
14:13technomancyCL people often think ecosystem doesn't matter because a single motivated dev can hack together whatever they need using the Power of Macros
14:14callenSegFaultAX|work: ^^ what technomancy said is apt.
14:14`foguscallen: I didn't take it that way. I'm just being patient and trying to understand
14:14technomancywhich kind of sort of works on a small scale but leads to a group of insulated solo antisocial hackers
14:14ChongLiit's the ol' bi-polar hermit thing again
14:15callen`fogus: the CL issue is that their common-case is the cowboy coder. Individual productivity, limitless freedom. The superset/subset problem means it's hard to convince them to give up their toys. It's like trying to convince a C++ person to leave C++. Why would that? They'd just be giving up "features" and knowledge that were hard-won.
14:15callenChongLi: right, like I said in the rant.
14:15callentechnomancy seems to understand where I was coming from perfectly.
14:15emezeskecallen: Uhh, C++ is easy to leave. Been there, done that.
14:15ChongLithe community (and specifically all the talks I watched) are what drew me to clojure
14:15technomancywith clojure you can't pretend you're not standing on the shoulders of giants because it's clear a big part of what makes it awesome is the hotspot's GC, JIt, etc.
14:16callenemezeske: you know that's not what this conversation is about, come on :)
14:16SegFaultAX|worktechnomancy: And that will somehow force people to be less hermit-y about their lisp?
14:16dnolencallen: I still don't follow your line of thinking ...
14:16emezeskecallen: You're right, just say whatever you want, regardless of whether it's generally true
14:16callenSegFaultAX|work: nope, they resent it. That's why they hate Clojure.
14:17emezeskecallen: I will refrain from pointing out errors in your reasoning.
14:17technomancySegFaultAX|work: no, I have no idea how to address the CL crowd
14:17SegFaultAX|workcallen: You're making some pretty broad generalizations about a rather large number of people.
14:17callendnolen: I'm dabbing paint at a canvas. Not thrusting towards something in particular. If you want me to address something specific, ask me something specific and I'll try to articulate.
14:17technomancyother than the egal paper, which is a long, detailed "I really want to love CL, but I can't because it fails at equality in ways that can't be addressed by glomming more stuff on"
14:17ChongLiI see no reason to try to shove something down people's throats; I'm happy with anybody using whatever language they like
14:18ChongLias long as they share some of their ideas
14:18hiredmantechnomancy: look, equality is complicated
14:18technomancypart of the CL mindset is that there's no problem that can't be addressed by glomming more things on
14:19callentechnomancy: you talking about the Baker paper?
14:19callenhiredman: are you making a joke?
14:19technomancywhich is silly since lisp pioneered GC, which is something you can't get without giving up malloc/free
14:19technomancycallen: yeah
14:19callentechnomancy: yeah, haha. That one. Whew.
14:20technomancycallen: it's brutal
14:20`fogustechnomancy: I would be interested to see if the Egal paper could convince a single CL programmer to leave CL
14:20SegFaultAX|worktechnomancy: Link?
14:20callenI don't think they care about soundness.
14:21callenif I had to guess.
14:21callenif the tower is about to topple, build a bigger more advanced tower.
14:21technomancy`fogus: depends on how refined their putting-fingers-in-ears skills are?
14:22grettkecallen: Where is this rant posted?
14:22`fogustechnomancy: Not specific to CL devs mind you, but people in general are highly skilled at that
14:22SegFaultAX|workgrettke: http://news.ycombinator.com/item?id=4657713
14:22technomancySegFaultAX|work: http://home.pipeline.com/~hbaker1/ObjectIdentity.html
14:22SegFaultAX|worktechnomancy: Thanks, found it :)
14:22calleneverybody but me is linking my own rant, haha.
14:22technomancy`fogus: it's an important life skill
14:23`foguscallen: People love rants!
14:23`fogusalmost as must as lists of stuff
14:23callen`fogus: :(
14:23technomancycallen: also: dammit you made me break my month-long "not logging into HN" streak
14:23technomancyI was on a roll there
14:23callenI'm not the HN version of Gawkermedia.
14:24callentechnomancy: I am sincerely sorry. I myself just returned to HN from a sabbatical of not-logging-in.
14:24callenhence the fresh account.
14:24technomancyheh
14:25ChongLiwhy has HN still not fixed the Unknown or expired link nonsense btw?
14:25aaelonyanyone willing to save costs & share a room at the conj? the group rate no longer applies
14:25aaelonyping me offline irc
14:25technomancyChongLi: because the creators of arc think that continuations are actually a reasonable way to build web apps
14:26ChongLipretty silly
14:26callenpretty hilarious.
14:26callenChongLi: what as unknown/expired?
14:26ChongLiit's amazing what people put up with
14:26ChongLi?
14:26`fogustechnomancy: What causes that? The continuation gc'd?
14:27callenPretty sure he has an explicit expiration/cache-refill mechanism.
14:27dnolencallen: I was just trying to understand what the rant was actually about. I was only able to answer specific points not the overall message which wasn't clear to me.
14:27ChongLithe "More" link at the bottom of the page expires constantly
14:27callenSuch that whenever the rankings/pages are refreshed, the old links go dead.
14:27callendnolen: the message was that we hadn't conquered new ground. We built a nicer place on what we had.
14:28SegFaultAX|workcallen: I didn't get that at all.
14:28grettkecallen: Nice post. Did you come to a conclusion on the questions you posed?
14:28`foguscallen: I didn't get that message, but thank you for saying it outright
14:28dnolencallen: yes I'm not sure what you mean by "new" ground or what that might consist of.
14:28callen`fogus: it's a component of the overall "sidegrade" commentary.
14:28`fogusIt's hard to break new ground
14:28callenDon't gotta tell me. I'm the mediocre programmer, not you. Remember?
14:29`fogusI think a project like Datomic is pretty ground-breaky
14:29callen`fogus: sure, but it didn't *need* Clojure to exist.
14:29callen`fogus: it's just built on the same concepts, priorities, culture, and idioms.
14:30ChongLiI'd like to know what kind of magical language could be dramatically more expressive than what we have right now
14:30grettkefogus: don't see many people taking research ideas "to the masses", Hickey seems to have done it and continues to do it
14:30callen`fogus: that's the problem with communicating with a CL'er. They don't care about culture or idioms.
14:30ChongLiand what that would even look like
14:30callen`fogus: they care about what's possible or reasonably expressible.
14:30SegFaultAX|workChongLi: That's a pretty subjective question I think.
14:30ChongLiit seems kind of silly
14:31grettkecallen: I have heard idomatic more in the last month looking at Clojure than ever before. I have never learned a language where the focus on idomatic usage is so huge. In IRC, books, blog posts.
14:31callenChongLi: you're getting closer to the root question, the more interesting question.
14:31callenChongLi: what are the limits of expression? What is the most expressive means we have available to us? Is it mathematics?
14:31callengrettke: which is good, and important. To me. To you. Not to Common Lispers.
14:32technomancyChongLi: coming at it from the angle of correctness rather than expressiveness, it probably involves type inference
14:32`foguscallen: To my mind it seems that you're right, Datomic could have been created without Clojure, but I'm of the opinion that the right notation helps a TON in expressing ideas that are very difficult to say in the common parlance (if not impossible)
14:32ChongLicallen: didn't we already go down the road with fortress?
14:32technomancy`fogus: also you can't have a startup based around a language that encourages hermitism.
14:32`foguscallen: There are Common Lispers who have come to Clojure and are quite happy
14:33technomancy`fogus: I think that means they're not archetypal CLers
14:33SegFaultAX|worktechnomancy: Paul Graham might have something to say about that. :)
14:33proofit404hi everybody, can anyone give me few suggestions about Hot Code Swap with Clojure?
14:33callen`fogus: No doubt. I'm an ex-CLer and I enjoy Clojure for tinkering quite a bit. They're also not likely archetypal CLers and I'm not either.
14:33`fogustechnomancy: Yeep!
14:33technomancy`fogus: no true scotsman; I know =)
14:34`foguscallen: What you call archetypal is more like a stereotype IMO
14:34grettkecallen: the lispers and schemers who like clojure are probably not very vocal, the folks who dislike are probably very vocal!
14:34ChongLitechnomancy: the correctness angle is an interesting one, I just don't know where we'd really want to end up with that
14:34SegFaultAX|workWhat exactly is an "ex-CLer"? Does not using a language as your go-to make you an "ex" of that language? Or have you actually divorced yourself entirely of the language?
14:35technomancySegFaultAX|work: if you use slime from marmalade vs CVS =)
14:36`fogusJust my two cents: Trying to win over people who are perfectly happy with their tool(s) of choice is a fools errand
14:36ChongLihow much better than something like haskell could we really get (re: type inference)?
14:36callen`fogus: *shrugs* if you want to believe that, you can. It'd probably be better to understand why some people have such very different priorities and how you can incorporate those different perspectives.
14:36ChongLithat is, without putting too much cognitive load on the programmer
14:37`foguscallen: You can incorporate those perspectives fine without dragging the people along with them
14:37callen`fogus: whether those people are a stereotype or archetypal is besides the point. clearly the notion of what CLers are like is borne from some measure of collective anecdote.
14:37callenfor my part, what you call a stereotype has been virtually ever CL'er I've known, even the more practical ones that went on to found a successful startup.
14:38callenI know one in particular that built his own web server, framework, and stack from the ground up. That wasn't atypical at all.
14:38SegFaultAX|workcallen: Your argument there doesn't hold any water.
14:38callenSegFaultAX|work: I'll let the collander know.
14:38nDuffgrettke: the Python community also cares a great deal about instilling idiomatic usage.
14:38callenthat much is true, although it's more of a debate there.
14:38ChongLiidiomatic dogma
14:38nDuffgrettke: ...explicitly rejecting the Perl idea of TIMTOWTDI is very much a thing.
14:38callenSome hate lambda, map, filter, reduce. Some love their itertools.
14:39callenSome hate async reactors and prefer green threads, some are fine with Twisted.
14:39ChongLiseems weird to me that someone could hate a function
14:39callenPython definitely cares about idioms, but they only agree on the more trivial parts.
14:39ChongLiit's just a tool
14:39grettkenDuff: Agreed, Clojure is the 2nd most idiomatic bunch I've seen :P
14:39callenChongLi: it's not the function, it's the pattern.
14:40ChongLiI think the point still stands
14:40grettkeChongLi: they hate the 'sin' function
14:40`foguscallen: I've also worked with my share of CL programmers and I've yet to meet one who fit the Tarver model. This is anecdotal, so take it at face value (hint: near zero value)
14:40grettkefogus: what is the tarver model?
14:41`fogusgrettke: In this conversation it's the "archetypal CLer"
14:41technomancythere are a few archetypal CLers hanging out in #emacs
14:41technomancyI have a couple of them on /ignore
14:42callen`fogus: I don't really mind speaking from anecdote. None of us have any right to pretension to scientific rigor, and if we used such a standard to circumscribe what could be discussed, we would discuss nothing.
14:42callenAs long as we're aware of the shaky ground, I don't see it as a big deal.
14:42grettkefogus: Mark Tarver, Qi creator, is the archetypical CL developer?!
14:42technomancyone of them reacted to the egal paper by "well you can always audit every single library you use to make sure they aren't mutating strings" with an apparently straight face.
14:42`fogusgrettke: http://www.lambdassociates.org/blog/bipolar.htm
14:42callentechnomancy: *snorts* that sounds about right.
14:43`foguscallen: agreed
14:43ChongLiohhh, turing complete types
14:43ChongLithrow that type checker into an infinite loop!
14:43callenChongLi: you mean C++ templates?
14:43dnolencallen: there I disagree - earlier point about Datomic, I don't think it would have existed w/o Clojure.
14:43ChongLiQi's type system
14:43grettkefogus: oh yea i forgot about that, lol
14:43dnolencallen: believing so doesn't do service to the nature of ideas IMO
14:44callendnolen: hard to say. you might be right. It's impossible for me to benefit from Datomic anyway.
14:44callendnolen: I don't use databases that other people control. I like the concept though.
14:44callenQuite a lot, actually.
14:46dnolencallen: also people underestimate how influential Clojure & Scala have been to adoption of Phil's data structures.
14:47dnolencallen: FP languages honestly some mostly for theorem provers w/o them
14:47dnolenseem
14:47callendnolen: er. bagwell?
14:47dnolencallen: yes
14:48callenweird. I'd always heard more emphasis on Okasaki's work. I'm not familiar with Bagwell's work.
14:48clojurebothttp://haacked.com/images/haacked_com/WindowsLiveWriter/IConfigMapPathIsInaccessibleDueToItsProt_1446B/works-on-my-machine-starburst.png
14:49callenclojurebot really weirds me out sometimes.
14:49TimMcclojurebot: work
14:49clojurebothttp://haacked.com/images/haacked_com/WindowsLiveWriter/IConfigMapPathIsInaccessibleDueToItsProt_1446B/works-on-my-machine-starburst.png
14:50callentechnomancy: troll thread of the century.
14:50`fogusThe spread of HAMTs in FP langs is a credit to Rich proving them out
14:50callenTimMc: nice repro.
14:50technomancycallen: a classic
14:50dnolencallen: Okasaki's works is very good and definitely showed how much more there was to do, but doesn't deliver on the promise the way Phil's work did.
14:50HodappHAMT? Phil?
14:50callendnolen: one of the more interesting thoughts on data structures I've gleaned from Clojure comes from one of Rich Hickey's talks about using a tree vs. a hash table for representing hash-maps.
14:51callendnolen: am I take it that that bit of inspiration comes by way of Bagwell?
14:51dnolencallen: yes
14:51dnolencallen: but this is also why reducers work so well
14:52callenVery cool. That was one of the most fun bits of knowledge I got from Hickey's talks.
14:52scriptorI thought Phil's data structures were usually mutable?
14:52callenscriptor: I don't know about his oeurve, but HAMTs are persistent.
14:53callenscriptor: the lock-free one is mutable AFAIK
14:53scriptorah, nice
14:53zerokarmaleftphil's talk was one of the best at conj '11 :(
14:53callenzerokarmaleft: we've lost of a lot of good people lately. Uriel is gone too.
14:54shaungilchrist:(
14:55TimMcIt's easier to see the greats disappear than to see them appear.
14:55TimMcOne process is fast, the other slow.
14:55callenthat explains why nobody notices when I successfully build things, only when they break.
14:55TimMcHeh.
14:55AdmiralBumbleBeealso that it's easier to see someone had a point when they're not here to argue with anymore
14:55callenPeople don't like being robbed of something they thought they could take for granted
14:58callenanyway, I'm glad some of what i said in that rant seemed to get across.
14:58gtraksad news, I had no idea
14:58gtrakre: Bagwell
14:59callengtrak: uriel died too. :(
14:59callenuriel was only 30 years old.
15:00TimMc"[Universe] Bug report: Phil Bagwell has died. Resolution: WONTFIX" :-(
15:00TimMcThis place has terrible maintainers.
15:01TimMcSo VLists... are those used in Clojure?
15:02callenTimMc: they're the foundation for the arrays and hash-maps in Clojure.
15:02aperiodicaren't vectors basically those?
15:02callenTimMc: and as the tower goes up, STM too.
15:02callenarrays, vectors. Same difference. ;)
15:03rlbI tried to set up the simple incanter hello-world, but the (view ...) just produces a blank window over ssh -X ...; is that to be expected?
15:03TimMcWell, I've looked at that blog post everyone else has looked at of how vectors work in Clojure, and it didn't look like the VList diagram I saw.
15:04TimMcrlb: I've run Clojure/Swing apps over ssh -X before, and it worked.
15:04gtrakcallen: who's Uriel?
15:04rlbTimMc: ok, thanks -- it's not working here, so I suppose I'll need to investigate.
15:05pjstadigi don't think clojure's vectors are an implementation of VLists
15:05TimMcrlb: If screen is involved, it might be trying to render to the old X port/socket/whatever-the-hell-it-uses.
15:05pjstadigi always thought they were a riff on HAMTs
15:05pjstadigbut Rich's own doing
15:06TimMc$def HAMT
15:06gtrakcallen: I think I found him, nm
15:06TimMcHorsemen's Association of Millstone Township
15:06TimMchttps://en.wikipedia.org/wiki/Hash_array_mapped_trie
15:06pjstadigTimMc: correct
15:06rlbTimMc: nope -- this test was just via "ssh -X foo@localhost" -- though I think my -X is *really* -X, i.e. not -Y. But I think I tried -Y too.
15:06rlbHowever, I'll try -Y again...
15:16dnolentimsgardner: hullo!
15:27jonasenI created a few example queries for codeq if someone's interested: https://github.com/jonase/codeq/blob/queries/src/datomic/codeq/examples.clj
15:28callenso lets say I wanted to write a web app in Clojure, but I want my templates to be plain HTML, and my JS to be plain JS because my frontend person doesn't know Clojure or ClojureScript. What would be the proper way to go about that?
15:28callenNoir seems to assume you'll use their templating system.
15:28callenclostache/mustache exists, but fully logic-less templates are a little extreme.
15:30zerokarmaleftseems that's a constraint given by insulating your frontend guy from learning anything new
15:30raekcallen: Enlive could be an option
15:30callenzerokarmaleft: giving up jQuery and standard JS is absurd. Not going to happen.
15:30callenzerokarmaleft: he doesn't want to learn Clojure. He doesn't mind what I use on the backend, but he's not going to give up his productivity for the sake of my curiosity.
15:30zerokarmaleftcallen: i'm not contending you do that
15:30raekwith Enlive you usually read the html, transforms the element tree, and write new html
15:30callenraek: eeeeeeek.
15:31zerokarmaleftjust that if you can't compromise based on his skillset, then you
15:31dnolencallen: people were doing things that way for a long time
15:31zerokarmalefthave to make compromises elsewhere
15:31callendnolen: which what way?
15:31dnolencallen: I mean Clojure web apps w/ just HTML/CSS/JS on the front end
15:31callendnolen: so should I just use vanilla ring and mustache?
15:32callenI was hoping not to give up the faculty of something as nice as Jinja.
15:32gtrakcallen: you can hook up whatever you like, I've done stringtemplate once (and regretted it)
15:33callendnolen: Amusingly, your enlive tutorial contrasts itself at the beginning with PHP, and then Jinja/Django style templates.
15:33callengtrak: what'd you shift to?
15:33gtrakI was just messing around, since I'm mostly backend, I use hiccup myself, which you've ruled out
15:33dnolencallen: haha yes, it's quite old and I don't really maintain that anymore.
15:34Lone_Wanderer_Is a SLIME-style REPL in Eclipse for Clojure too much to hope for? >.> (I just barely installed Clojure for the first time.)
15:34callenI really don't like having templates baked into the code. I prefer to inject data into the templates.
15:34callenTo be perfectly frank, I don't see having templates baked into the code as being any less...questionable than having code baked into the templates.
15:34gtrakcallen: here was the stringtemplate embedding I wrote: https://github.com/gtrak/garytrakhman.com/blob/91813c7d0b6206e2821aadbf2b47c18135d5a6e1/src/garytrakhman/stview.clj
15:35callenI rather like keeping my food on my plate in their separate corners.
15:35hiredmanLone_Wanderer_: have you looked at and rejected counterclockwise?
15:35gtrakcallen: and rendering with moustache: https://github.com/gtrak/garytrakhman.com/blob/91813c7d0b6206e2821aadbf2b47c18135d5a6e1/src/garytrakhman/core.clj
15:36callengtrak: interesting.
15:36callenDidn't plan on using stringtemplate. Definitely not going there now.
15:37gtrakyea, it's shitty
15:37gtrakbut the idea of embedding a lib and using it shouldn't be surprising
15:38callenI just really don't care for whole-template-transformation and processing.
15:38callenI prefer to inject, iterate, and project in a separate universe.
15:38gtraklike composable snippets?
15:38Lone_Wanderer_hiredman: No, I googled "clojure slime" and looked around a bit but thought I'd ask here in case I'm heading the wrong direction.
15:39gtrakI've used django's templates, do you mean like that?
15:39callengtrak: like Jinja. http://jinja.pocoo.org/docs/
15:39callengtrak: Jinja is somewhat more powerful than Django's templates, but same idea.
15:39gtrakhow about closure templates?
15:39hiredmancounterclockwise is the clojure plugin for eclipse
15:39rikerbenew car arrived today:D
15:39hiredmannow, I never used it
15:40callengtrak: I hadn't tried closure templates. I only use google closure for compilation, I avoid the rest of their ecosystem.
15:40hiredmanbut I know it exists in a vague sort of way
15:40Lone_Wanderer_ok, thanks
15:40callenrikerbe: congrats!
15:40rikerbeThanks
15:40gtrakcallen: if I recall, it fits the bill, but I looked at it a while back
15:40callenrikerbe: A new car is always really exciting. For me, its motorcycles. I know the feeling :)
15:41callengtrak: oh you mean using them from the java side.
15:41gtrakcallen: "In contrast to traditional templating systems, in which you must create one monolithic template per page, you can think of Closure Templates as small components that you compose to form your user interface."
15:41gtrakyea
15:41rikerbecallen, I can relate to that - i love bikes. I'm a big time vehicles collector - more than 100 cars and over 80 bikes.
15:41callenjesus fucking christ
15:41callenrikerbe: I own one motorcycle.
15:41callenit's my 5th.
15:42rikerbeits a lot of vehicles, but I only have one wife, so it evens things out.
15:42gtrakrikerbe: and you got them all by writing clojure? :-)
15:42callengtrak: I really don't like the idea of bringing even *more* java into my life, but I'll take a look.
15:42callen"The house that Clojure built"
15:43rikerbegtrak sorry to disappoint you but its got nothing to do with clojure
15:45rikerbehttp://postimage.org/gallery/chhce5w8/
15:45rikerbethere she is.
15:46gtraksweet sweetness
15:47grettkerikerbe: you are a programmer?!
15:47callenrikerbe: what brought you to this IRC channel?
15:47grettkecallen: pics of your bike?
15:47rikerbeThats a Hennessey Venom GT - its a twin turbocharged based on a highly modified Lotus Exige chassis (which is basically the coupe Lotus Elise). All carbon fiber. brembo brakes, 1200 hp, 2700 pounds.
15:47rikerbegrettke yep.
15:47callenrikerbe: did you win the IPO lottery?
15:47grettkerikerbe: lol what kind of programmer?
15:47callengrettke: founder, probably.
15:48gtrakhe must have used dependency injection instead of singletons
15:48rikerbeI've started lots of startup companies over the years, lots of projects - some very successful.
15:48grettkeI just read a blog post today about aftermarketers tweaking stuff out like taking a Ferrari Enzo and tweaking the heck out of it
15:49grettkerikerbe: any motorcycle pics?
15:49rikerbeAftermarket stuff is really huge and certain cars have cult followers with huge aftermarket stuff.
15:49grettkerikerbe: caterham super 7?
15:50rikerbeI dont have one of those.
15:50uvtcThat baby's probably got a interleave cycle, 12:1 partial comp ratio. Custom doseq transmission. Interpose chassis. The works.
15:50mindbender1technomancy: is there a way to know the name of a project that a repl started in?
15:51oskarth`I have (foo-wrapper-macro bar-fn baz-fn), where bar-fn evaluates into a map. foo-wrapper-macro takes a map and a function, and turns it into another fn. This works when I supply the wrapper-macro with a map and my baz-fn, but not otherwise. How do I re-write this so the evaluation happens in the right order?
15:51rikerbeIts a drivers cars - theres no crash control, no abs - this is a drivers car. it requires you to drive it.
15:52uvtcClojure may not be appropriate for drivers. Perhaps C?
15:52rikerbeits got proper gearbox - which is just so rare these days with supercars.
15:52gtrakabstraction doesn't lend itself well to driving..
15:53rikerbeuvtc, http://www.venomgt.com/the-venom-gt/specifications/
15:53Hodappgtrak: Gas pedal, brake, and steering wheel are fairly common abstractions though.
15:53gtraksure... :-)
15:53uvtcImagine flyin' down the highway, then *bam*, you throw an exception.
15:54Hodapppsh.
15:54gtrakI threw a guy an exception the other rday
15:54uvtcgtrak: did he catch it?
15:54gtrakhe told me to goto somewhere
15:55mindbender1technomancy: that's from within the repl. I find that attimes I just can't remember which project a repl in emacs was started in
15:55gtrakI told him gotos were considered harmful... haha bad joke
15:56`foguslistening to Hawkwind makes want to adventure!
15:59gtrakis jay leno a clojure developer? http://www.jaylenosgarage.com/collections/hennessey/2012-hennessey-venom-gt/#item=215886
16:02cgagi have a vector and i want to pull out a few values into a new vector, say the first third and fourth, is there a better way to do it than (mapv myvec [0 2 3])?
16:04cemerickcgag: vectors can be associatively destructured, too
16:04cemerickoh, sorry, didn't read the Q fully :-|
16:05hyPiRioncgag: That looks rather succinct. Are the values you want changing, or are they constant?
16:07cgagYeah it doesn't feel bad, i just had a nagging feeling there was something in the standard lib i was missing. They change, but is there something you'd do differently if they were constant?
16:09technomancymindbender1: the current directory of the repl buffer should be in the project I believe
16:09technomancycallen: I agree that there's definitely room for something like enlive, but comprehensible
16:10mindbender1technomancy: yeah you're right totally escaped me. thanks
16:10technomancypersonally I <3 hiccup, but it's obviously not a good choice for all team mixes
16:10hyPiRioncgag: Well, if they were constant and differed only by one, you could've used subvec
16:11uvtcI was probably a little rude to rikerbe up there. Sorry about that, rikerbe.
16:12hyPiRionThat's about it, I guess.
16:13TimMcWhat in god's name broken piece of shit UI is the Datomic blog using?
16:13pjstadigblogger
16:14TimMcOh. Carry on then.
16:15hyPiRionTimMc: I went to check and found out that the datomic logos aren't lining up properly to the blog content
16:16hyPiRionNow I'm going to look at those logos everytime I go there, sigh =/
16:17TimMcBlogger has *always* had a shit interface. Now it's just a Web 2.0 kind of shit.
16:28edwUsing client/post in clj-http 0.5.6 I'm getting a "java.lang.NoSuchFieldError: DEF_CONTENT_CHARSET". Anyone have a clue?
16:31hyPiRionI'm guessing you need to specify the charset the content uses. What kind of content type have you set it to?
16:33callentechnomancy: oh, you find enlive a bit baffling too?
16:33ystaelUnder what circumstances will an AOT-compiled class be loaded into a clojure.lang.DynamicClassLoader rather than the base AppClassLoader ?
16:33callentechnomancy: that's actually encouraging. I was worried I was surrounded by people who were fine with it and I was the only one generally unable to get traction with it.
16:34technomancycallen: yeah I like it in theory, but I generally find myself stumped
16:34technomancyfixing things by just "maybe if I move this around it'll work" cargo-culting stuff
16:34danlarkinclearly everyone should just be using clabango
16:34callenyeah, exactly!
16:34callenI hate that.
16:34technomancyI love how it's declarative, and once it's written it's very readable.
16:35callentechnomancy: hiccup seems understandable to me but my coworker, for better or worse, needs to be able to edit the templates sadly.
16:35technomancybut whatever abstractions it uses inside are simply not clearly defined
16:35dakroneedw: can you post your code somewhere?
16:35amalloyoskarth`: the question isn't very clear, but it sounds like the answer is to use a function, not a macro
16:35technomancycallen: the theory is that the designer shouldn't need to edit the markup if it is well-structured to begin with
16:36technomancyI don't have experience either way, but my gut suggests the theory is BS
16:36callentechnomancy: that's not really the case, he does HTML, CSS, and JS. He builds on the template bases and builds up the markup as he goes.
16:36edwhyPiRion: that's what I thought, but I'm having some trouble figuring out the correct type to use for those values. Let me go read some source. (It'd be hard to disentangle the source for a gist/paste.)
16:36technomancyyeah, I don't do much web work myself
16:36thmzlttechnomancy: you are so lucky
16:36devinuscallen: it's a fallacy that developers should be in charge of markup
16:37callentechnomancy: I'm sorry to hear that given that you and I seem to be of like mind. but I'm left needing to figure out how to handle templates that both I and the frontend guy work on.
16:37callenI don't really care what religious precepts you hold to. My guy does the HTML, CSS, and JS and calls my backend APIs.
16:37thmzltdevinus: amen
16:37callenAll I want to know is how to make it work with a Clojure stack.
16:37technomancycallen: think of the bright side: plenty of low-hanging fruit and opportunities for an ambitious hacker to make his mark
16:38callentechnomancy: I don't think I'm intelligent enough to do it right, but I may resort to that if I have to.
16:38danlarkinclabango!
16:38uroborus_labsNewb Question: When in the repl, what is the best way to load a library from the project? For example monger for mongodb
16:38callendanlarkin: the readme didn't show me anything. show me sumtin :(
16:39callendanlarkin: well from looking at tests/, I like it, but how complete is it?
16:39uroborus_labsFor example, attempting "(use [monger.collection :only [insert]])" results in an error
16:39scriptorI like the idea of templates as just clojure data, but honestly I'm not sure how practical that actually is
16:39danlarkincallen: complete enough that I've used it for 3 (small) projects
16:39callenscriptor: for me, not in the slightest, sadly.
16:39pjstadig~suddenly
16:39clojurebotCLABANGO!
16:40callendanlarkin: your profile pic on github is sucking my soul through a straw.
16:40danlarkincallen: here are some samples https://github.com/danlarkin/clojars/tree/master/src/clojars/templates
16:40hyPiRionuroborus_labs: First of all, you need to quote the vector, like so: (use '[libname :only [foo]])
16:40Kowboyanyone here very familiar with datomic?
16:40uroborus_labshyPiRion: Ahh
16:40scriptorright, the theory should be that the markup is so well structured that the *back-end developer* doesn't have to worry about it
16:40callendanlarkin: does it have for loops?
16:40danlarkincallen: yep
16:40uroborus_labshyPiRion: That solved my problem :)
16:40hyPiRionThat should be it, really. Just ensure you're using lein repl and that you've added the library as a dependency.
16:40hyPiRionuroborus_labs: good!
16:40callenscriptor: sorta. There are occasionally cases where I have to pierce the veil.
16:40uroborus_labshyPiRion: Thanks, still new here :)
16:40Kowboyis this some sort of reader macro? -> #db/id[:db.part/db]
16:41callendanlarkin: intriguing.
16:41callendanlarkin: thank you.
16:41scriptorcallen: right, but general practice should at least lean towards that side
16:41hyPiRionuroborus_labs: There's space for everyone here :)
16:41danlarkincallen: I have a few more things I've added but haven't pushed yet because I haven't written tests for them yet
16:41callenscriptor: I'm not really in a prescriptive mood when it comes to telling other people how to do their job.
16:41danlarkincallen: but other than those I've used it successfully as-is
16:42callenscriptor: all I know is that I generally expose an HTTP REST + JSON API, and I occaisionally chuck data into a server-side template, but the frontend guy works otherwise independently.
16:42callendanlarkin: more disciplined than I am.
16:42callendanlarkin: what are they?
16:43danlarkincallen: count and pluralize filters and I added forloop.last to the context when you're in a for loop
16:43callendanlarkin: ...did you write your own web framework on laeggen?
16:43danlarkinI wouldn't call it a framework
16:43danlarkinbecause that term annoys me
16:43callenlets not get hung up on nomenclature
16:44callenyou've established your own idioms for writing an async HTTP web server.
16:44callendanlarkin: right?
16:44callenalso, I didn't know aleph was still being maintained.
16:44danlarkinI guess
16:44danlarkinit is
16:44danlarkin(aleph)
16:45callenyeah, it seemed like it'd been abandoned for awhile. odd.
16:45callenthat was awhile ago.
16:45callendanlarkin: just curious, why aleph instead of ring/jetty?
16:45danlarkinI have some unpushed work on laeggen too
16:46callenI'm trying to learn where your code comes from so I understand.
16:46danlarkincallen: it's an experiment
16:46technomancycallen: danlarkin looooooves his labyrinths =)
16:46technomancyhttp://oglaf.com/labyrinth/
16:47SegFaultAX|worktechnomancy: Oh that last frame... his eyes.
16:47technomancySegFaultAX|work: we've all been there =)
16:48danlarkincallen: I don't really like how compojure works and I wanted to write a web thing for clojure so I came up with my own that works how I want it to
16:48SegFaultAX|worktechnomancy: I cracked up. :)
16:48callentechnomancy: hahahahaha
16:49callendanlarkin: that's fine, I'm not criticizing, I'm legitimately trying to grok your work.
16:49callendanlarkin: what were you trying to glean from the experiment?
16:49thmzltdanlarkin: what did you do instead of compojure?
16:50danlarkinthmzlt: laeggen
16:50danlarkincallen: I guess partly "what does web dev in clojure look like without ring"
16:51callendanlarkin: well, I really like the way the clojars app works.
16:51callenit all makes sense to me.
16:51danlarkinI'm pleased you think so
16:51thmzltdanlarkin: cool, will take a look
16:51aperiodicdanlarkin: what did you find dissatisfying about compojure?
16:51weavejesterdanlarkin: Did you discover anything aside from async that could be done better with a different approach?
16:51callenI'm curious about that too.
16:52callendanlarkin: you've done it now, you're the pied piper of clojure programmers.
16:52callendanlarkin: lead the rats to their cheeeese!
16:53danlarkinweavejester: I just prefer a simpler layer of dispatch separated from the view functions (or whatever you want to call them)
16:54weavejesterdanlarkin: Oh, I was more thinking of Ring rather than Compojure.
16:54callenweavejester: Pardon the incredibly trivial summary: danlarkin's approach is more "django", yours is more "sinatra"
16:54danlarkinoh, I see
16:54callendjango has an independent dispatch layer that is separate from the views themselves. Sinatra generally has them closer together although there's a continuum.
16:54danlarkinwell ring has this whole middleware model which I don't have in laeggen
16:55danlarkinthough I might be sticking my head in the sand on that, I haven't decided yet
16:55weavejesterAh, do you have anything instead of it?
16:55danlarkinwell sorta, for auth, for example, I wrap the normal view functions
16:56danlarkinsee line 14 in https://github.com/danlarkin/clojars/blob/master/src/clojars/main.clj
16:56callenreminds me a great deal of the way I used decorators in Python (auth/authorization_required)
16:57weavejesterdanlarkin: So it's more a static (and more predictable) routing table?
16:58weavejesterdanlarkin: The views in clojars.pages look a lot like handlers
16:58danlarkinyup
16:59weavejesterStatic routing tables have the distinct advantage of being reversible, something that Compojure's design doesn't always allow.
17:00danlarkinyes, I haven't explored that yet, but something like a get-url-for function would aid DRY
17:01danlarkinwe should have a BoF next month
17:01weavejesterBoF?
17:02danlarkinhttp://en.wikipedia.org/wiki/Birds_of_a_feather_(computing)
17:02weavejesterAhh...
17:03xeqiI would be interested in listening to that
17:03weavejesterMy thoughts are currently leaning toward a practice of not changing URLs
17:04callenweavejester: cool URLs don't change :)
17:04jcromartielolwut "Can't define method not in interfaces"?
17:04callendanlarkin: BoF via internets?
17:04weavejestercallen: Exactly ;)
17:04jcromartieI'm trying to deftype a key/mouse listener
17:04danlarkincallen: I mean at the conj
17:04cemerick~cool uris
17:04clojurebotCool URIs don't change: http://www.w3.org/Provider/Style/URI
17:04callendanlarkin: sad. :(
17:04callenI won't be there.
17:05weavejesterI'll be at the conj
17:05weavejesterI may take notes
17:05danlarkincool URIs go to the conj...
17:05weavejesterAnd put them online
17:05callenweavejester: t'would be appreciated. Since you have a lot of experience on web apps, maybe you could help me.
17:05jcromartiewhat's wrong with this picture
17:05jcromartiehttps://gist.github.com/8c91a431b7bc4b14775a
17:06callenweavejester: I need my frontend guy to be able to work on the HTML, CSS, and JS independently of my backend work in Clojure. Only solutions I've seen so far have been danlarkin's clabango or moustache. Thoughts?
17:06jcromartie(yes KeyListener is imported)
17:06callenweavejester: I'm looking to decouple the HTML (templates), CSS, and JS from the Clojure.
17:06jcromartiecallen: Enlive might work too
17:06weavejesterjcromartie: The first argument of a type is the instance itself.
17:06callenjcromartie: noooooope.
17:06jcromartieah ha
17:06weavejesterjcromartie: So (keyPressed [_ e] …)
17:07callenjcromartie: Enlive just leads me to the same result as techno. Cargo-cult fwacking code around until it works.
17:07jcromartiethanks weavejester
17:07cemerickcallen: very surprised you've not picked up enlive
17:07callen I can understand hiccup, but it's still clojure code.
17:07callencemerick: I haven't been able to understand it in a reasonable amount of time. I'm not sure that's crazy.
17:07callenseemingly, I'm not the only one with this problem.
17:08jcromartieEnlive is kind of a mind bender
17:08callencemerick: I'll give it another try if you really think that's the way to go, but I don't like cargo-culting my way about.
17:08weavejestercallen: Unfortunately, I haven't looked into this problem much. All the work I've done has had the Clojure developer write the HTML as well.
17:08callen :(
17:08callenweavejester: thanks anyway!
17:09weavejestercallen: Sorry I couldn't help more
17:09weavejesterNow… Back to Dishonored :)
17:09technomancymoustache seems to have the advantage of being somewhat standardized
17:09callenweavejester: s'not like you owe me anything. Have fun. I enjoyed Dishonored a lot.
17:09cemerickcallen: To each their own. One of Enlive's motivators is the kind of separation you're looking for. Not sure where cargo-culting comes in.
17:09callencemerick: it's hard to understand.
17:09callentechnomancy: tell 'em. enlive leads to misunderstood cargo-culting and whacking code around at random until it works.
17:10technomancythat has been my experience
17:10callenmine as well, which is my point.
17:10danlarkinI can only speak for myself but I completely failed at understanding enlive
17:10danlarkinand that's why I wrote clabango in the first place
17:10callencemerick: so that makes three. Do you use enlive?
17:11kmicucemerick's point: +1
17:11technomancyI can read enlive code and it looks beautiful, but when it comes to trying to figure out where clone-for goes and what do-> means, it devolves into flailing
17:11cemerickcallen: Yes, extensively.
17:11cemerickUse whatever you like. Still puzzled by the "cargo-culting" mentions.
17:12danlarkincemerick is a better man than us :p
17:12callencemerick: I think technomancy's descriptions suffice. Maybe danlarkin has the right idea, haha.
17:12callenI mean, I get this experience all the time. Like the first year I spent with Haskell, or my first time with parser combinators.
17:12technomancycemerick: it means not understanding what's really going on, looking at other code that you know works, and trying to ape it in your own code without knowing why
17:13callenNever did figure out parser combinators. Did learn how to use XML.Light in Haskell though.
17:13cemericktechnomancy: Yeah, I know what it means. :-) Just unclear as to how it got into the conversation.
17:13cemerickInsofar as enlive is just sugar for zippers, it seems pretty straightforward.
17:13callencemerick: it's a way of describing what was objectionable about Enlive.
17:13callenwhat about the experience of using it that made it unsuitable/unpleasant.
17:13callenfor us mere mortals.
17:14danlarkinhey watch who you're calling mortal
17:14callenwell pardon me Highlander.
17:14cemerickcallen: I think danlarkin was trolling me, don't worry about it :-P
17:15danlarkinpsh no way I was completely serious, I feel The Quickening
17:16callenI could try powering through another enlive tutorial.
17:16cemerickcallen: have you grokked zippers?
17:16callenI feel kinda blub-y for really just wanting a jinja2 equivalent in Clojure, but here we are.
17:16callencemerick: last time I encountered them was xml-zip and it turned into a horror. OTOH, I have no issue with "zippers" in Python.
17:16callencemerick: lets conservatively say, "no" with the understanding that I'm not a total rube.
17:17cemerickYeah, if you're not comfortable with zippers, then enlive will feel magical.
17:17technomancycemerick: why doesn't the enlive readme mention zippers anywhere?
17:17callenthe concept of returning tree transformations isn't utterly alien if the experience of using xml-zip was.
17:18callenemphasizing the foundational material needed to grok enlive in the readme would be wise. If you don't want to write libraries that rush to the bottom and require some kind of background, stating the prerequisites would help people like me a lot.
17:18TimMcI had a similar experience with Enlive, by the way.
17:19cemericktechnomancy: Because it's aiming to provide an abstraction above them? Maybe cgrand would like a new section connecting the dots.
17:19callenI don't know if I should be feel encouraged or discouraged that people with more experience and knowledge of Clojure had trouble too.
17:19AdmiralBumbleBeeI feel like I'm the only person who thought enlive was amazing and very easy to use
17:19TimMcI really, really want to use tree transforms on HTML to inject data.
17:19technomancyTimMc: sameo
17:19technomancysame
17:19TimMctechnomancy: Too much core.logic?
17:19TimMcAdmiralBumbleBee: Will you write my code for me? :-/
17:19technomancyTimMc: no idea
17:19callenAdmiralBumbleBee: ever written a parser composed of parser combinators before?
17:20AdmiralBumbleBeeTimMc: maybe I can help?
17:20akhudekI'm really shocked people have so much trouble with enlive.
17:20akhudekHow is it any harder than jquery?
17:20technomancyprobably part of it is because it's functional; jquery is bash-in-place
17:21callenCall me crazy, but I'm going to plant the flag in the ground here and now. Enlive will become Clojure's proverbial monad tutorial.
17:21AdmiralBumbleBeecallen: I don't even know what combinators are
17:21callenAdmiralBumbleBee: that makes me feel worse.
17:21AdmiralBumbleBeewhy?
17:21clojurebotwhy is the ram gone is <reply>I blame UTF-16. http://www.tumblr.com/tagged/but-why-is-the-ram-gone
17:21hiredmanakhudek: the model is very different from most (all?) other template libraries
17:21callenAdmiralBumbleBee: I have no idea how you came to understand it so intuitively.
17:21callenhiredman: no need to hedge. All.
17:22callenwait let me double-check something real quick
17:22AdmiralBumbleBeecallen: It's strange, because I feel the same of the folks saying they have trouble with it
17:22AdmiralBumbleBeeenlive seems remarkably straightforward to me
17:23callenHrm. Yes. I just double-checked cabal.
17:23TimMcAdmiralBumbleBee: This was a while ago, but it was basically that I had no idea which API elements returned fns vs html specs, took one vs many elements, etc.
17:23callenNobody in Haskell is crazy enough to do HTML templating like Enlive
17:23akhudekhiredman: jquery works somewhat similarly on the dom, use xml selectors to perform transformations
17:23callenand they use zippers all over the place.
17:23cemerickMaybe if we all declare our eternal disdain for enlive, callen will be happy?
17:23akhudekthey are not exactly the same of course, but I figured the similarities would be enough for people to feel somewhat comfortable
17:23callenthey just generally mark where data should be injected and leave it at that.
17:23hiredmanI like enlive
17:23callencemerick: I'm trying to figure out what I need to understand to utilize it!
17:23callencemerick: that's why I said the note about zippers should be in the readme.
17:24TimMccemerick: Disdain? No. Confusion.
17:24hiredmanbut it isn't something you just slip in to using, there is a learning curve
17:24danlarkincemerick: we can't stop now, the 5 minutes hate isn't finished
17:25cemerickTimMc: As you like. :-)
17:25callenyou're making me feel like a demagogue now, I'm legitimately trying to understand what background is required because if it supports the separation of concerns I want then i'm fine with it.
17:25TimMcAdmiralBumbleBee: Do you have any Enlive-using code in a public place? I feel like some examples might help.
17:26technomancyseems like everybody confused by enlive is bummed out because we like the way it reads
17:26callenTimMc: well there is this: https://github.com/marick/enlive-tutorial
17:26oskarthcallen: did https://github.com/swannodette/enlive-tutorial/ help?
17:26AdmiralBumbleBeeTimMc: I do not, the project I'm using it in is not open source.
17:26oskarthoh
17:26callenoskarth: that's old, marick's is more up to date.
17:26technomancyalso, nobody really cares about scraping
17:26callenwhat technomancy said goes for me too. I like the way it looks.
17:26AdmiralBumbleBeeTimMc: however if you came up with some sort of example, contrived or otherwise, I'm fairly confident I could give a solution and explain it
17:27callenyeah I don't care about the scraping either.
17:27technomancyTimMc: for me at least more examples won't help. I can read the code just fine; it's just not clear which functions to reach for in which cases.
17:27cemerickcallen: It sounds like you have all the primary enlive resources in-hand. The only thing I could suggest is our treatment of it in http://clojurebook.com, but that's hardly impartial advice.
17:28callencemerick: I already own your book, I just haven't read it yet.
17:28callenI need to figure out a way to extract a PDF from the kindle app though.
17:28callentheir app is annoying sometimes.
17:28cemerickWell, thanks for that. :-)
17:28callenyeah, Emerick, Carper, and Grand.
17:28callencemerick: for sure! I'm always happy to support my fellow programmers. I just really don't like the kindle cloud-reader thingie.
17:29cemerick$STANDARD_KINDLE_FORMAT_DISCLAIMER
17:29edwdakrone: ping.
17:29dakroneedw: pong
17:29callencemerick: well, if you address enlive in the book then I'll definitely work through it and see what I learn. thanks for writing the book!
17:30thmzltI haven't tried clojure for web stuff yet, but would you use enlive for the same thing you use hiccup?
17:30pooya72"member:callen: Nobody in Haskell is crazy enough to do HTML templating like Enlive" Is Heist pretty similar? http://snapframework.com/docs/tutorials/heist
17:31pooya72sorry, * isn't*
17:31callenpooya72: I don't believe so, but I could be wrong.
17:31technomancythmzlt: yeah, they cover the same space
17:31edwdarkone: Hi. Using the 0.5.6 of clj-http, the sample client/post in the README throws an exception, a no such field error for DEF_CONTENT_CHARSET. You familiar with that?
17:31pooya72callen: seemed similar.
17:31cemerickcallen: Yup, a full 10 pages or so.
17:31dakroneedw: let me give it a try
17:31edwUsing Clojure 1.4.0.
17:31edwThanks.
17:31pooya72callen: that was much harder then enlive ;) with slices and stuff.
17:32callenpooya72: Heist seemed to be to be more type-aware binding/injection with partial template combination.
17:32callenpooya72: and less "zip all the things!"
17:32callenI mean, I'm sure people do plenty of partial application in enlive, but you get my meaning.
17:32pooya72callen: yeah that's true
17:33dakroneedw: seems to work fine: http://p.draines.com/1350422865069ee982aeb.txt are you talking about a different example?
17:33callenHeist doesn't really attempt to do comprehensive whole-tree treatments of the templates as transformations, and insofar as I can tell, that's generally discouraged in Haskell for web dev.
17:34callenIt's more bottom-up/mixin, like Jinja.
17:34pooya72callen: ok. I haven't used jinja
17:35edwdakrone: That's very odd. Yes, same example.
17:35dakroneedw: are you on a very old JDK? is something else bringing in a different apache client?
17:35edwRing maybe?
17:35dakroneedw: what version of apache http client is your `lein deps :tree` showing? (assuming lein2)
17:36xeqiinsert plug for lein-pedantic here
17:37callenxeqi: trying to reimplement cabal for Clojure? If so, I suggest you add some random breakage to make the experience more realistic.
17:37dakronexeqi: but lein-pedantic is sooooo annoying if you can't change the project.clj you're working with ;)
17:37pooya72callen: maybe you should write a template engine like Heist :)
17:37callenxeqi: also, unnecessarily ceiling'd library versions.
17:37callenpooya72: gods no. I'd just use danlarkin's clabango if I can't eventually figure out enlive.
17:38akhudekpersonally, I really like enlive and find that it mirrors the typical client side dom manipulations quite well (e.g. enfocus)
17:38edwIt may be pomegranate. 4.2.1.
17:38xeqicallen: heh, figuring out how to use aether's dependency resolution, and what it would do, was fun enough
17:38edwActually, 4.1.2 from pomegranate, 4.2.1 for clj-http.
17:39dakroneedw: do you have a full stacktrace?
17:39callenxeqi: I actually just got done dealing with some cabal breakage. It was so infuriating I uninstalled Haskell.
17:39pooya72callen: may I ask what part of enlive are you finding difficult?
17:39callenpooya72: please tell me you have scrollback. I don't really want to subject the channel to another review of enlive.
17:40xeqi~logs
17:40clojurebotlogs is http://clojure-log.n01se.net/
17:40pooya72callen: yeah I scrolled back and read your comments but still wasn't clear for me. It's ok don't worry about it, just curious.
17:40edwI did, but then I blew away my nrepl in Emacs. Let's hope the error didn't go away. ;)
17:40callenpooya72: it just leads to random clobbering of code due to cargo-cult and misunderstanding how it works at a fundamental level.
17:40callenThe plumbing is mysterious and arcane.
17:41AdmiralBumbleBeemysterious and arcane!?
17:41xeqisounds like magic
17:41AdmiralBumbleBeeit's very simple how it works, and the codebase is tiny :|
17:41AdmiralBumbleBeeI feel like you're using some sort of weird forked version of enlive or something
17:42pooya72callen: ok, but what are you trying to do that you find difficult? maybe I just don't do advanced stuff with it.
17:42dnolenso anybody tried the core.logic 0.8.0 beta1 stuff? anyone? :)
17:43edwThat solved it. Pomegranate depends on an old apache commons http.
17:44edwThanks!
17:45akhudekdnolen: no, but I did look at the source and feel you could teach me a thing or two about writing performant clojure.
17:45kmicudnolen: I wanted to do this but core.logic 0.8.0 beta1 is some kind of cargo-cult in comparison to the previous version ;p
17:46dakroneedw: cool, glad to hear it isn't a bug
17:48kmicuand I like enlive more for templating then core.logic ;]
17:48clojurebotunderscores in namespaces is a bad idea
17:48dnolenakhudek: ha, it's actually a little bit slower than the previous alpha on some of the constraint problems - but anything involving interval arithmetic got a lot faster.
17:48kmicuthan*]
17:48dnolenkmicu: heh, what do you mean?
17:49callencore.logic registers for me mentally as, "thar be dragons!" and a wizard's grimoire with fire gouting out of it.
17:49edwdakrone: Always happy to report user error!
17:49dakroneedw: :)
17:49dnolencallen: :)
17:49callendnolen: take that as a compliment. Also, what was the story with predicate dispatch? You mentioned that it had stalled or something but it was unclear to me why.
17:50dnolencallen: it just takes a lot of time to do that kind of work - and your enthusiasm level has to be up.
17:50dnolencallen: plus I think for some of the things I'd like to do be able to reason sensible over integers might be useful - thus the cKanren work.
17:50dnolensensibly
17:51akhudekdnolen: we're still wrestling with the performance of our theorem prover, though the our main problem is probably still down to rule choices and some combinatorical issues in how we explore the proof space
17:51callendnolen: aha! A use for my proposed theft of the minds of the Common Lisp community. They've got boundless enthusiasm for unusual things.
17:51akhudekdnolen: if you're going to the conj, I'll be happy to explain details to you there
17:51callentbatchelli: which cafe are you working at?
17:51xeqiakhudek: is this a thorem prover in clojure?
17:52akhudekxeqi: yes, but designed for doing query compilation, so fairly special purpose
17:52dnolenakhudek: definitely. I did run into some nasty perf problems heading towards beta1 from the alphas actually - things that used to take 1000ms were taking 18000ms
17:52dnolenakhudek: a lot of these things turned out to be silly errors - missing Object equals definitions, not failing fast enough in some cases.
17:53xeqiakhudek: ah, still nice to hear about people caring enough to use some formal methods
17:54callenoh this is actually relevant to my interests. I recently wrote a query compiler in Python. It's been painful.
17:54dnolenakhudek: there's actually a pretty interesting CL project that I found inspiring for my desire to work on core.logic - http://www.cl-user.net/asp/libs/screamer
17:54callenlots of difficult to overcome statefulness.
17:54dnolenoops that was for callen
17:54callendnolen: thank you, taking a look, although it's not loading.
17:55dnolencallen: https://github.com/nikodemus/screamer
17:55callendnolen: oh yeah, that sounds about right.
17:56akhudekdnolen: our performance issues are often of the form "can this problem even solve" or "can we reduce the time from 20 minutes to 1 minute"
17:56akhudekhow you explore the proof space can make massive differences in time
17:57akhudekthe end goal here is to be used as a compiler to produce fast code, so it's ok if it takes a while, but not if it takes days or forever
17:57dnolenakhudek: ah so that's internal? certainly users of core.logic encounter that issue :)
17:57callendnolen: I like the end of the screamer.lisp, "Tam V'Nishlam Shevah L'El Borei Olam". Says a lot about what it was probably like to make that.
17:58akhudekdnolen: I guess I'm not surprised by that, theorem proving is hard :)
17:58kmicudnolen: I refer to the cargo-cult templating discussion here during last hours ;] and seriously thank you for your great&hard work, as always, unfortunately I did not find applications for core.logic yet :(
17:58callenkmicu: don't distract him with our five minutes of hate.
17:58callenkmicu: I got to kvetch with the best of them. t'was great. also I was reminded to read a book I'd already purchased.
17:59kmicu5 min :)
17:59callenyeah yeah. be coy. fiiiine.
18:01callenoh, look, an envoy from the land of lisp visited me on hacker news. http://news.ycombinator.com/item?id=4659597
18:01callentechnomancy: ^^ we were both right :P
18:02callenhe recounted exactly the same reasons I said CL users would.
18:03technomancyyeah, pretty hand-wavy
18:04callentechnomancy: same old "Clojure is not Lisp and is thus defeat!" mantra
18:04technomancyno true scotsman
18:04callenthe comment about direct access to the hardware wasn't unexpected either. They deeply resent that.
18:04technomancyyeah to be fair the JVM deeply sucks at unix
18:05TimMcAdmiralBumbleBee: At some point (I swear I will, eventually!) I'll read through Enlive's source, understand all of it, and write my own README or tutorial.
18:05edwClojure is the Django of lisps for me: "For perfectionists with deadlines."
18:05callenI should write the "Confused Drunk's guide to Enlive"
18:05callenedw: an excellent way of putting it. :)
18:06jrajavThe JVM is fine on Unix if you're doing nothing but running the JVM
18:06hyPiRionedw: Huh, that may explain stuff.
18:06brehautTimMc: hmm. some parts of enlives source provide enlightement, others only confound
18:06emezeskejrajav: That means that UNIX is good at the JVM, but doesn't say anything about whether the JVM is good at UNIX :P
18:06nDuff (yes, they have a nice tagline)
18:06brehautnDuff: wat‽
18:06jrajavGood point :P
18:06AdmiralBumbleBeeTimMc: I don't know if you saw the diagrams I'm doing for the CDS core_overview, but once I finish that I'm planning on giving the same treatment to XML processing and then enlive
18:07tbatchellicallen, right now? I am sight glass
18:07TimMcAdmiralBumbleBee: Hmm, that would be cool!
18:07nDuffbrehaut: ...I wouldn't say "worst. ORM. ever", but that's just because there are so many bad ones.
18:07brehautnDuff: i fight it every day.
18:07shaungilchristso I am working on something where I need "first class" symbols in js for edn interop - I was getting away w/ cheating and checking for strings starting with ":" to be treated as a keyword but thats obviously a hack at best.
18:08TimMcshaungilchrist: keyword? doesn't do it?
18:08callentbatchelli: you're a predictable man :)
18:08TimMcOh, misread.
18:08technomancymmmm sightglass
18:08shaungilchristI forgot to say - this is removed from clojurescript - stand alone node lib
18:08tbatchellicallen: not my usual hang out, but was meeting some guys here
18:08callentbatchelli: I just remembered you spending a lot of time working from coffeeshops is all.
18:09tbatchellitechnomancy: great coffee. I broke my 6mo run of coffee abstinence
18:09shaungilchristone solution I can think of is a function tagged with the representation and a toString method so it can still be treated as a key etc. in objs
18:09callenwow.
18:09tbatchellicallen: yeah. My hangout is Bean There, in the Lower Haight
18:09shaungilchristanyway sorry just had to type out loud but I think I am going to move forward
18:09callentbatchelli: I remembered Haight, but not Bean There.
18:10tbatchellicallen: great tea selection :)
18:10callenI'll have to remember that. I love tea. Coffee too, but I love tea as well.
18:11oichCan you tell me how :exposes works in the gen-class macro (to expose a protected field in the super-class)? My attempts to use it have failed (no such field). Are protected-field-name and name, symbols in the syntax diagram: :exposes {protected-field-name {:get name :set name}, ...}
18:13tbatchellicallen: maybe we should get tea some day then!
18:13callentbatchelli: maybe so! I'm in mountain view.
18:14tbatchellioh, sunny MV
18:14callenthere are a few downtown tea places that aren't bad here.
18:14aperiodicoich: yeah, they should be symbols
18:14tbatchellicallen: I'll ping you when I am around then
18:15hiredmanoich: how in the world did you come up with that syntax?
18:16hiredmanoich: it looks like that generates gettter/setter methods
18:17oich(doc gen-class))
18:17clojurebot"([& options]); When compiling, generates compiled bytecode for a class with the given package-qualified :name (which, as all names in these parameters, can be a string or symbol), and writes the .class file to the *compile-path* directory. When not compiling, does nothing. The gen-class construct contains no implementation, as the implementation will be dynamically sought by the generated class in functions in an implementi
18:17hiredmandoesn't give you direct access to the field
18:23oichhiredman: I figured it's making getters/setters like it says. I made a paste thingy: http://pastebin.com/sAuDsCW3 if you or someone cares to look.
18:24oichThe ressult is it says there is no such field PROTECTED_FIELD in com.example.Example
18:24aperiodicuh, how would that even work? you're trying to make two different methods with the same name...
18:25aperiodic:exposes {secret {:get getSecret, :set setSecret}}; then (.getSecret this)
18:26oicharity is different. but I'll try changing that
18:26aperiodicoh, good point
18:29oichooh. it says no such field getProtectedField now. So, I guess name is supposed to be the field name? But then, I would think that what I tried would work.
18:31aperiodichmm, that seems odd. normally (.method obj) should end up calling a zero-arg method of obj, if one exists, but otherwise ends up as a field access
18:33aperiodicdoes setting it work?
18:39oicherr. weird. it either set it (after changing it from final) or at least completed without error.
18:39callenoh wow, I didn't know nutter chilled in here.
18:39callenis he a Clojure user?
18:39augustlI really enjoy his posts about nitty gritty details in the JVM
18:39technomancyno, he's here for cross-pollination of ideas
18:40callenaugustl: you saw that HN post too?
18:40callenaugustl: his posts are great.
18:41aperiodicoich: hmm, that suggests to me that for some reason the getter method isn't being seen when (.getSecret this) is compiled, so it's ending up as a field access
18:43dnolenimproved to core.logic Datomic support based on rhickey's feedback - http://gist.github.com/3902508, kinda neat!
18:43dnolenimprovements
18:44callenforgive me and I hate to ask this, but is Datomic ever going to be a fully community-run project or will it remain a commercial endeavour?
18:44aperiodicoich: which would suggest a bug in either gen class or the dot special form, which triggers the part of my brain that yells at me that whatever's going on is probably my fault
18:44callenif you don't know what I mean, contrast with Postgres, Cassandra, etc.
18:45aperiodicoich: in the meantime, though, you can probably get around this will clj-wallhack: https://github.com/arohner/clj-wallhack
18:46callenaperiodic: I like the name a lot. Reminds me of playing quake.
18:46technomancycallen: is there anything about clojure's general history of community engagement that would lead you to believe that's remotely likely?
18:47hyPiRionHappy fifth birthday, Clojure :)
18:47callentechnomancy: I feel like I'm being set up for a trap. I realize Hickey's generally had a "Moses coming down from the mountain" style, but I don't know what you mean to tell me.
18:47technomancycallen: nah that's basically it
18:47callentechnomancy: I'm trying to determine if datomic is something I can use, or if I will always be on the hook to a commercial entity.
18:47scottjcallen: I believe the hope of the authors is that it will be a commercial success and if that can happen while remaining closed source it looks like that will happen. if it is unsuccessful commercially then it may become open source/community/abandonware..
18:48callento be fair, Cassandra started life as abandonware and has become increasingly vibrant.
18:48oichaperiod that looks interesting. But, I'm ultimately trying to generate a class. gen-class docs say that the methods are wrapped in clojure functions, so there is no access to the fields. Maybe this isn't pointing to the class. But, I'll try it. thaniks.
18:49callentechnomancy: yeah...that's what I figured. I guess that's where I'm at too.
18:49callenI really like the ideas, but I absolutely cannot hand over control my persistence layer like that.
18:49callentechnomancy: thanks for clarifying.
18:50dnolencallen: given the fact that mainstream languages / tools seem pretty dead set on destructive updates - I wouldn't hold your breath.
18:51callendnolen: I'd rather use bit-basher persistence layers than give up control over my stack, sorry to say.
18:51dnolencallen: sure, I just meant it's unlikely that a similar product will appear anytime soon.
18:51scottjeven if you can't use datomic for your companies main database, it seems you might be able to use the free version for small tools a la codeq
18:51dnolenopen source replacement I mean.
18:51aperiodicoich: but `this` *is* an instance of the gen-classed class, otherwise the dot special form wouldn't work at all. like i said, i'm not sure exactly what's going on. you can always put the setter/getter methods in your :methods vector, and use clj-wallhack in their implementing fns (gross as that may be)
18:52callenscottj: a good idea and I might do something like that for experimentation's sake, but those aren't the kind of things I build.
18:53technomancyI know the bigcouch people paying close attention
18:53callentechnomancy: you work at Heroku, right?
18:53technomancyyeah
18:53callentechnomancy: You mentioned you don't work on web apps. Do you work on their stack, their middleware, their postgres backend or what?
18:53technomancycurrently working on the build pipeline
18:54callentechnomancy: very cool. Re: BigCouch. I had a super-bad-bad experience with CouchDB vanilla, should I give them the benefit of the doubt?
18:55dnolenhey it's Clojure's BDay
18:55brehautdnolen: 5 years old?
18:55brehaut(publiclly)
18:56callenI think I discovered clojure 3 or 4 years ago. I don't remember exactly when. Are there logs for #clojure going that far back?
18:56dnolencallen: yes
18:56brehauthttp://clojure-log.n01se.net/date/2008-02-01.html
18:57callenat the very least, at the time I discovered it, rhickey was still sitting in this channel and helped me with my classpath issues :)
18:57callenvery gracious of him.
18:57callenI don't really know when he stopped having the time to do that.
18:57brehautmid to late 2010
18:58scottjsounds like when datomic started
18:58brehautalso clojurescript
18:59technomancycallen: can't say I have much nontrivial experience with couch myself but I like its accessibility
18:59callentechnomancy: I used to work on one of the larger couch clusters that existed at the time. It was an analytics stack.
19:00callentechnomancy: I have organs missing from that time period in my life.
19:00callenThe company that owned the setup has since been acquired for $XXXm. I should've taken that job offer. Sigh.
19:00SomelauwDoes emacs have any feature useful for editing clojure that vim doens't have.
19:01callenSomelauw: being good at text editing. Having a real repl.
19:01brehautvim has both those things
19:01thmzltand here we start...
19:01callenbrehaut: I know but I answered a farcical question with a farcical answer.
19:01callenSomelauw: use whatcha like :)
19:02thmzltI use vim for languages with syntax (non s-exp), emacs for clojure
19:02Somelauwcallen: tmux + tslime is a repl good enough for me
19:02devinuswhat about notepad.exe?
19:02callenSomelauw: then keep using it!
19:02devinusthmzlt: me too, basically anything with s-exps i use emacs
19:02aperiodicSomelauw: their paredit probably doesn't have the weird quirks that paredit.vim does. i think that's pretty much it, though (full disclojure: vim user)
19:02brehautdevinus: 16 or 32bit notepad?
19:02callenSomelauw: I come from Python and CL. I have a pretty specific background that lends a lot of reasons to why I use Emacs.
19:03callenRope is one reason I use Emacs with Python. Slime is why I learned Emacs at the same time as Common Lisp...ages ago...
19:04aperiodicSomelauw: also, ew, tslime?? check out slimv or lein-tarsier + vimclojure. those give you actual editor-repl integration
19:05Somelauwaperiodic: It is easy to setup and it works.
19:06aperiodicSomelauw: fn arities in the bottom line while you type, leader-S to look up documentation, leader-M to print a nice representation of the current form after macroexpansion (invaluable when you're writing one)
19:06aperiodici could not live without these things
19:07Somelauwaperiodic: what's wrong with tslime?
19:07Somelauwaperiodic: Yes, some code inspection would be nice.
19:08aperiodicSomelauw: maybe i'm confusing it with something else, but isn't that just the thing that blits text around using tmux's facilities for copy/pasting between panes?
19:08aperiodicSomelauw: from what i've heard lein-tarsier is very easy to set up (i use slimv personally, tho)
19:10Somelauwaperiodic: In one window I run vim, other window I run dmux+clojure repl. Then with vim plugin I send code to clojure repl in tmux. I will try lein-tarsier, but don't see much benefit in it.
19:12aperiodicthe doc lookup for the current symbol alone saves me tons of time
19:12aperiodici used to have your setup, and was happy with it; now, i would never go back. i'd highly recommend giving it a shot
19:14emezeskeSomelauw: My favorite use of tmux: use the command ",et" to send the top-level form occupied by the cursor to the REPL, or ",ef" to reload the whole file
19:15emezeskeSomelauw: err, typo s/tmux/lein-tarsier
19:16aperiodicoh yeah, you even have to enter visual mode and do a% or smth to select what you want to send to the repl with tslime, right?
19:18Somelauwaperiodic: no, ctrl-c, ctrl-c, sends current paragraph to tmux
19:19SomelauwUnless something is selected in which case it sends the selected stuff.
19:22oichaperiodic: about my gen-class fiddling, It shows the expected class and superclass name, but if I use Class.getDeclaredFields(), the field isn't there. There's a field called fieldInfo__var, which is the declared method name followed by "__var". If I try to access it java complains that I can't access a private static final field....
19:23oichthe declared field is protected
19:24aperiodicoich: does the getter method show up in the declared methods?
19:25muhoothe one annoying thing about both vim and emacs, is continually ending up with stray characters in files. in emacs, i continually end up with stray x, g, etc in there. with vim i end up with :wq, l 1, G, etc in there.
19:25aperiodicoich: you'd expect the field you're trying to access not to show up in the declared fields, though, since it's a superclass field
19:27technomancymuhoo: need foot pedals =)
19:27brehautits both amazing and frightening
19:28AdmiralBumbleBeebrehaut: you should see my desk :)
19:28muhoothat's so rock and roll.
19:28muhooit'd be easy actually, get a midi footpedal
19:28technomancyI would have foot pedals if I didn't have a standing desk
19:28technomancyhttp://www.kinesis-ergo.com/fs-savant-elite.htm
19:29muhooand a midi interface to your computer, write some easy code to decode the midi events
19:29aperiodicdoes anyone sell bluetooth foot pedals?
19:29muhoohttp://www.behringer.com/EN/Products/FCB1010.aspx
19:30emezesketechnomancy: Just get a DDR mat!
19:30brehautmuhoo: i have very bad memories of a very old version of that particular product
19:30muhoobrehaut: heh, the user interface is pretty miserable. but it does work.
19:31muhoothere are custom firmwares for it too
19:31brehautmuhoo: i was thinking of the low quality ADC in the expression pedals that made the wah and volume functions have audible steps
19:31AdmiralBumbleBeemaking your own footpedals is very easy
19:31AdmiralBumbleBeebluetooth or wired
19:31muhooan arduino
19:32AdmiralBumbleBeearduino leonardo + any switch you want
19:32muhooactually, you could dismember a usb keyboard, and just run the wires for the keys out to foot switches or whatever
19:32AdmiralBumbleBeeold sewing machine pedals can be had for $1, guitar pedals, power tool pedals etc..
19:32AdmiralBumbleBeetakes maybe 20 minutes per pedal even if you're relatively clueless
19:33muhooi want pictures of technomancy's new setup with keyboard pants and ddr mat.
19:35brehauthaha
19:45oichaperiodic: about gen-class, thanks if I look at the superclass it shows the field from java. Also, calling getProtectedField from java get's the field value. But, (.getProtectedField this) in clojure says "no such field getProtectedField", as does (.PROTECTED_FIELD this)...
19:46tomoj'(binding [] foo) is semantically equivalent to 'foo, yes?
19:46aperiodicoich: yeah, sounds like a bug in clojure somewhere. it appears that the (.getProtectedField this) is always ending up a field access, when it should be calling the method.
19:47oichI will make a wrapper class to expose the fields I guess.
19:51aperiodicoich: you should open up a JIRA issue about this: http://dev.clojure.org/jira/browse/CLJ
19:51amalloyas far as i know, tomoj
19:53tomojoh, cljs 6da149d8 already fixed that
19:58callenhas anyone here ever talked to a production engineer or persistence-side person from Facebook? If so, can someone explain to me why those people act like they work at the NSA?
20:00FrozenlockWould someone explain to me why facebook is popular?
20:00Frozenlockwhile we are on the subject :P
20:02muhoocallen: facebook had funding from, IIRC, the NSA
20:02pandeirokeep = filter + map?
20:02danlarkinI think the answer is a lot more mundane than that... they just deal with a lot of personal info
20:02callenin my case, I'm talking about their general reticence with respect to discussing anything of substance about their backend.
20:02callendanlarkin: no no, not that, I mean about their stack.
20:03callendanlarkin: you can almost never get them to do anything other than namedrop and even then they creep about.
20:03callenit's really strange.
20:03danlarkinperhaps they just consider it to be a competitive advantage
20:03callenBarely, they use the same hacked up Hadoop sub-clustering bullshit as everybody else. The only people with an "advantage" and something to keep secret are Google with megastore/spanner/colossus.
20:04danlarkinthat's your opinion, not a fact
20:04callenthe last secret they had was Cassandra and they futzed that one up badly. Took the community + DataStax to make that one awesome.
20:05callendanlarkin: well, I'd like to be proven wrong, but none of them will. frickin. talk about it.
20:05muhooQ: Why does KFC keep their recipe a secret/
20:05muhooA: They're embarassed of it.
20:05muhoocallen: apply above to fb
20:05pandeiromuhoo: why does coca cola keep their recipe a secret?
20:05callenmuhoo: I snorted loudly, thank you.
20:05callenpandeiro: it's not a secret.
20:05callenpandeiro: they just don't want to confirm present suspicions.
20:06pandeiroso why does pepsi still suck?
20:07callenpandeiro: pepsi's recipe aims for different properties.
20:07callenpandeiro: pepsi's recipe is more orange and sweetness based. Coca-Cola's is crisper/tangier.
20:07muhoojust to clear the air and not spread rumours, i looked up the fb-nsa connection, and it's pretty thin: one of their early funders was ex ceo of in-q-tel, the cia's venture arm
20:07technomancywho cares; they both use corn syrup. ick.
20:07hiredmanb
20:08callenmuhoo: I didn't take it seriously / care
20:08callengood to know though.
20:08pandeirocallen: coca cola still imports raw material from bolivia i believe
20:09callenbut seriously, why would backend engineers be so reticent?
20:09callendid somebody get in trouble in the past for saying something about their stack?
20:09calleni"m starting to think I should just ask Quora.
20:09muhoocallen: apply for a job there. you can ask questions in the interview
20:10hiredmantechnomancy: speaking of corn syrup, what was that orange/lime drink from the seajure bbq?
20:10hiredmanit was nice
20:10technomancyhiredman: probably hansens?
20:10technomancyhiredman: it's probably the easiest sugar-based drink to get around here
20:10thorbjornDXbest soda: blue sky cherry vanilla cream
20:10pandeirodo you guys have schwepps citrus in the states?
20:11callenmuhoo: actually, I tried that.
20:11hiredmantechnomancy: noted
20:11technomancyit used to be easier to get Jones'; I don't know if they've come across hard times with their distribution or what
20:11callenmuhoo: motherlovers still didn't answer any questions so I dropped out of the process.
20:11muhoonext clojure survey: favorite caffeine/sugar infusion vector
20:11callenmuhoo: I even got an on-campus lunch with a couple of their hadoop people, no dice.
20:11callenthere's some seriously suspicious stuff afoot there.
20:11technomancyI like how Henry Weinhard's claims to still be using "the original recipe from the '20s" yet it uses con syrup.
20:11muhoocallen: may i ask why you're concerned with what they're using as a back end?
20:11callentechnomancy: maybe they invented corn syrup.
20:12danlarkincallen: why are you being so weird about this
20:12danlarkinwho cares what they're using
20:12callenmuhoo: it's my bag, so I want to learn from them.
20:12danlarkinand how could you possibly call it "suspicious"
20:12danlarkinin what sense could software be suspicious
20:12callendanlarkin: well, I care. I can't convince anybody to let me buy 1 billion users to hammer something to pieces.
20:12callenit's not the software that's suspicious
20:13muhooi suspect whatever they are using is a total POS. they're embarassed of it. it is held together with scotch tape and chewing gum. zuck himself hacked it together.
20:13callenit's their reticence about things like hadoop, their front-line caching/roll-ups in memcached and their memcached replacement that they won't speak the name of, etc.
20:13hiredmantechnomancy: huh, amazon will ship me a 24 pack
20:13technomancymuhoo: they use PHP fer crying out loud
20:13muhootechnomancy: exactly, my point :-)
20:14pandeiroso does google?
20:14callenpandeiro: nope.
20:14callennice try, but no cigar.
20:16pandeirocallen: no, i was browsing some API (thought it was drive but no) and got directed to a user.php
20:16pandeirosure i am not wrong about that
20:16pandeiroi looked and was like wtf
20:16technomancythey probably use some off-the-shelf stuff for documentation/support or something
20:18callengenerally they stick to C++, Java, and Python. With their acquisition of ITA they've chosen to go with the flow and allow Common Lisp where it was already established.
20:18callenexceptions to that rule are generally front-end specific.
20:18pandeirocallen: go
20:18muhootheir google apps seems very python-heavy. everything else i've seen from them seems java-heavy.
20:19muhoos/apps/appengine/
20:19muhooobv question: are they using clojure at all anywhere?
20:19callenpandeiro: you know, you'd think? I'm not aware of much usage outside Chubby though.
20:20callenpandeiro: I mean it's an accepted language, but I don't think it's used much more than Common Lisp.
20:20callenmaybe a google employee knows better.
20:20muhooemezeske: ^^ ?
20:20pandeirogolang site mentions some stuff i think
20:20pandeiroi really wish my chromium history were plaintext
20:21technomancymuhoo: they were using it for their internal code indexing tool; not sure if that's still happening
20:21callenso...Chubby and code indexing is what we have so far. I'm trying to find any other publicly announced Google things made in Go.
20:21technomancycallen: oh the code indexing was clojure
20:22technomancyand apparently steve yegge only got away with it because he has a famous blog?
20:22callenoh, haha. Okay, still just Chubby for team Go at Google though.
20:22emezeskemuhoo: Unfortunately, I'm going to err on the side of caution and say very little. :P
20:22callentechnomancy: he's kinda noisy. and by kinda, I mean extremely.
20:22technomancycallen: apparently it's paid off for him
20:22callentechnomancy: honestly it seems other companies, such as Heroku, use Go more than Google does.
20:23technomancywe're probably just more open about it
20:23callenI think JGC / that CDN he works for use it a fair bit too.
20:23callentechnomancy: maybe, but it's not really a vote of confidence that they don't talk about it.
20:23callentechnomancy: they were pretty open and inclusive about their Java stuff.
20:25technomancywe make more noise about it because we want to emphasize the self-hosting aspect of our platform I guess
20:26technomancygoogle is still figuring out how to be a platform
20:26callentechnomancy: I guess, but I generally am a lot more apt to trust Heroku because of how open they are in comparison to otehrs.
20:26callenin particular, I find the situation with golang a bit hypocritical. They want us to "take their word for it" on using the language yet they've been silent on it.
20:27technomancynot interested in languages that pretend interactivity doesn't matter
20:27technomancyit's just not worth it
20:27callentechnomancy: oh man, you know I've had the entire #go-nuts channel tell me that?
20:27callentechnomancy: unbelievable.
20:27callenthey tried to tell me I didn't need a debugger for practical or pedagogical reasons.
20:27callenand that all I needed was printf.
20:28callensorry, fmt.Printf
20:28aperiodiccallen: http://www.cloudera.com/resource/hadoop-world-2011-presentation-video-building-realtime-big-data-services-at-facebook-with-hadoop-and-hbase/
20:28technomancycallen: not worth it
20:28callentechnomancy: blubbiest thing I'd ever heard from a programmer.
20:28calleneven Java developers recognize the utility of debugging, repls, generally.
20:28technomancyif people want to go back to punch cards that's their own business
20:29callenaperiodic: this is relevant to my interests. +1
20:29callen,inc aperiodic
20:29clojurebot#<core$inc clojure.core$inc@495929e7>
20:29callenhrm.
20:29aperiodicit's (inc foo)
20:29callen,(inc :aperiodic)
20:29clojurebot#<ClassCastException java.lang.ClassCastException: clojure.lang.Keyword cannot be cast to java.lang.Number>
20:29callen,(inc aperiodic)
20:29clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: aperiodic in this context, compiling:(NO_SOURCE_PATH:0)>
20:30aperiodicjust the bare form
20:30aperiodicno evaluation actually happens
20:30aperiodicwell, you know what i mean
20:30callenI've seen people +1 each other before.
20:30aperiodic(inc nick)
20:30lazybot⇒ 1
20:30callen(inc aperiodic)
20:30lazybot⇒ 4
20:30callenbwaha!
20:30callenaperiodic: thank you.
20:30aperiodicyou're welcome
20:31aperiodicwe're still gonna be lining up for dinner at the conj by lazybot karma, right?
20:31callenaperiodic: anyway, that said, I'm actually familiar with the Messenger story for Facebook with Hbase.
20:32callenaperiodic: it's a by-product of the fact that most of the engineers working on it were stolen from Yahoo and other hadoop shops. Hadoop is simply what they knew.
20:32callenthis should be a good talk.
20:35pandeirotechnomancy: you browser with w3m in emacs mostly?
20:37technomancypandeiro: no, I use conkeror
20:38pandeirotechnomancy: is w3 bad?
20:38technomancyyeah
20:38technomancyw3m is fine
20:38technomancybut w3 is ancient and unmaintained
20:39pandeiroah ok
21:20thmzltI'm going to start hacking on web thing here with compojure, what should I use to start the server inside nrepl? ring-serve?
21:21augustlhmm, getting a lot of "java.lang.OutOfMemoryError: PermGen space" when loading 6 or so clojure apps into the same JVM via jetty. My current permgen space is 64 megs, should I increase it? And is this a common clojure specific problem? I'm using openjdk 1.6
21:21augustlthmzlt: I use lein-ring, works great for me
21:21augustlerr never mind, missed the repl part ;) Never done that
21:23hiredmanaugustl: the permgen space is where the jvm keeps class data
21:24hiredmanaugustl: if you are generating new class data a lot, or have lots of classes to start with, then you should have a larger permgen
21:24augustlI'm not generating classes run-time at lesat
21:24hiredmanloading clojure code, unless it is aot compiled generates classes
21:25augustlso I suppose increasing it is the right thing to do (it probably won't just hit the roof after another couple of hours of leaking)
21:25augustlhiredman: but hopefully only one class is generated per file?
21:25hiredmansome servlet containers have issues with leaking classes if you redeploy wars, but that has to do with a particular life cycle
21:25hiredmanaugustl: no
21:25xeqithmzlt: I use https://www.refheap.com/paste/5915; which came from the heroku template
21:25hiredmanit is at least one per fn
21:26xeqiwell, slightly modified from there
21:26augustlhiredman: I think my actual question is, does the number increase infinitely, or is clojure smart and generates the required classes once?
21:27hiredmanaugustl: I think you may have misunderstood
21:27hiredmanaugustl: loading clojure code causes it to be compiled to jvm bytecode i.e. some number of classes
21:27augustlso far so good :)
21:28hiredman"generates the required classes once?" just doesn't make sense
21:28augustlis clojure code only loaded once per jvm?
21:29hiredmanit is loaded and compiled whenever you load/reload it
21:30augustlI see
21:31SgeoQuick question
21:32Sgeo,(for [i [1 2 3] j [4 5 6]] [i j])
21:32clojurebot([1 4] [1 5] [1 6] [2 4] [2 5] ...)
21:32SgeoSuppose I want something like for that works differently, such that if the sequences were infinite, any given combination would be reached in finite time?
21:32Sgeo,(repeat 1)
21:32clojurebot(1 1 1 1 1 ...)
21:33Sgeo(for [i (repeat 1) j (repeat 2)] [i j])
21:33Sgeo,(for [i (repeat 1) j (repeat 2)] [i j])
21:33clojurebot([1 2] [1 2] [1 2] [1 2] [1 2] ...)
21:33SgeoHmm.
21:33amalloySgeo: not possible without consuming infinite memory
21:33hiredmangenerally in something steady state like a server you want a constant permgen size (e.g. it should not be growing) but large enough to hold everything
21:34Sgeoamalloy, hmm?
21:34SgeoI'm pretty sure there's an algorithm that would do it
21:34hiredmanat work we set it to 256m, I forget if that is out of necessity, or just a nice high number
21:34amalloySgeo: not without holding onto the head of at least one infinite sequence
21:34augustlhiredman: I see now why containers and their classloaders might be a problem..
21:35augustlsince they might not purge permgen stuff from old wars
21:35SgeoWhat does Haskell's Control.Monad.Omega do?
21:36amalloySgeo: you can see ninjudd's effort on this topic at https://github.com/flatland/useful/blob/develop/src/useful/seq.clj#L73, but it really doesn't work for actual infinite seqs
21:36hiredmanaugustl: purge the permgen!?!? gc'ing the permgen is actually a relatively recent feature in the jvm world (maybe java 6?)
21:37hiredmanand java 8 is supposed to get rid of the permgen entirely
21:37amalloyhiredman: sounds about right to me, though i think different jvm vendors added it at different times
21:41augustlhiredman: oh, nice
21:41augustldoubled permgen space from 64 to 128, let's see how that works out
21:48jcromartiecan someone explain resource loading to me
21:49augustljcromartie: resources from the classpath, you mean?
21:49jcromartieyeah
21:49jcromartielike, where do I put them in my Clojure (Lein) project
21:49jcromartieand then how do I reference them
21:49augustljcromartie: that depends (tm)
21:49jcromartie:) fun
21:49augustljcromartie: the classpath is a run-time thing, so the source can be anything. You typically embed stuff in your .jar or .war by putting it in resources/ (default, can add other folders)
21:50augustljcromartie: to get a URL to something on the classpath, use (clojure.java.io/resource path-thingie)
21:51jcromartieso if I have a lein project, with a src/my/ns/resources/foo.txt
21:51augustlthe folder leiningen by default adds to the classpath is the top-level resources/ folder
21:51augustlso not in src/whatever
21:51jcromartieah, not src
21:51jcromartieok
21:51jcromartieI thought leiningen added src/
21:52jcromartieI suppose I could inspect the classpath
21:54jcromartie,(get (System/getProperties) "java.class.path")
21:54clojurebot#<SecurityException java.lang.SecurityException: denied>
21:54jcromartieright?
21:54clojurebotEqual Rights for Functional Objects is Baker's paper on equality and why it's impossible to define sensible equality in the presence of mutable data structures: http://www.pipeline.com/~hbaker1/ObjectIdentity.html
21:54jcromartieoh yeah
21:54augustljcromartie: hmm, not sure if "src" is actually on the classpath
21:54jcromartieah well this is instructive
21:54augustlI don't think it is, but I don't know what I'm talking about
21:54jcromartieyeah, in my project here...
21:55aperiodicthere's no need for it to be, since there are no classes in there
21:55jcromartietest, src, dev-resources, resources, target/classes, then a bunch of .m2
21:55jcromartiethe need is for Clojure source loading
21:55jcromartieClojure looks for namespaces as .clj files on the classpath
21:55aperiodicoh, i suppose you're right
21:56jcromartiesometimes I know something :)
21:56hiredmanclojure's runtime loads classes and clojure files both via classloaders
21:57augustlout of curiousity, why is clojure typically shipping .clj files instead of .class files?
21:57xeqijcromartie, aperiodic: leiningen does add src/ to the classpath, and the jvm will look there for resources; for that example (io/resource "my/ns/resources/foo.txt") should work
21:57xeqiwhich is nice for some things, like enlive templates
21:57augustldoes clojure keep extra stuff in memory after compilation that doesn't fit in class files, since clojure is more dynamic than what the JVM classfiles support? </wildtheory>
21:58jcromartieI think the gap in my understanding is how resource paths work
21:58xeqithough the resources/ directory is usually used for thing not directly related to a src file (css, js, etc)
21:58hiredmanaugustl: clojure's abi is not fixed
21:58jcromartieaugustl: absolutely, since loading a class results in runtime results… i.e. (def x ...)
21:58hiredmanso .clj files tend to be more portable across versions of clojure
21:59hiredmanaugustl: no
22:00augustlhiredman: ah, I see
22:00hiredmaninternel methods in the clojure runtime that the compiler generates calls to might change names
22:21Apage43aw nuts
22:21Apage43finally ran into being unable to use clojure.walk on records
22:52thmzltxeqi: thanks for that refheap, I got it work, but I had to use the :join? false so jetty wouldn't block my repl
23:01amalloyaugustl: fwiw i wouldn't be astonished if six copies of the clojure runtime need more than 64M of permgen - it's not a tiny library
23:02amalloybut aside from the usual problems with containers (eg tomcat, jetty) hanging onto the permgen of undeployed applications, clojure doesn't generate any additional classes once it's done loading .clj files
23:04thmzltxeqi: oh, didn't see you had that too, my bad
23:17augustlamalloy: makes sense, 64m isn't a lot
23:17augustland it's a bunch of uberwars too, so there are quite a few megs of duplicate dependencies to be loaded
23:18amalloyyeah, that makes sense
23:19amalloy64m is actually a lot for like...your application heap, even though it doesn't sound like much. eg, lazybot and 4clojure both run with 40m or so of heap
23:19amalloyobviously if you're doing data-driven stuff you will need a much larger heap, but for basic webserver stuff you need like nothing
23:22amalloy(i suspect lazybot and 4clojure would be perfectly happy with half as much, but it hasn't been urgent to try)
23:22augustlwhich container are you using btw?
23:22amalloyfor those? none
23:22augustlah
23:22arrdemamalloy: is that licence for me to taunt the bots and drive up memory usage?
23:22amalloyjust nginx in front of embedded jetty
23:22amalloysure thing, bro. they're pretty stable actually
23:23amalloyaugustl: at work, a jetty container with a small number of apps running in it. usually just one, i think, but maybe it's two
23:28Raynesamalloy: At least two now, cuz my project.
23:29RaynesWhich means one that is actually used. ;)
23:34mindbender1I have observed that when people name their functions to be like nouns it's most certainly a precursor to wrong reasoning about the problem domain
23:39amalloysounds like tosh to me, but of course you're welcome to name all your functions verbs
23:40amalloyor adjectives? i bet functions named like adverbs probably are precursors to being too dang clever
23:43mindbender1it also predetermines what you may or may not take as argument further complecting the clarity of the function in question