#clojure logs

2012-01-03

00:37amalloyalexbaranosky: it should be possible if you have interfaces to mock out, but if you have to mock any concrete classes i think it's just not technically possible on the jvm
00:38alexbaranoskyamalloy, I may have misunderstood, but all the Java mocking libraries mock classes
00:38graphbumhas anyone grabbed the entire clojure.contrib/complete 1.3 via leiningen successfully?
00:39alexbaranoskyamalloy, that's not much of a consolation thought, because I'm sill having a hard time figuring out how to mesh it into Midje's architecture nicely etc etc
00:40amalloyalexbaranosky: well, i don't know a lot about how the java mocking libs work
00:41alexbaranoskyamalloy, one option is to try to use a mock library under the hood, instead of implementing it myself... but that has its own issues
00:42alexbaranoskybecause ideally it'd be nice to build off of the already-existing Metaconstant
00:42alexbaranoskyoh, perhaps if I made the particular Metaconstant be a `spy` then it owuld still have all the features of a meta constant, but also get mocking
00:43alexbaranoskyI'm going to have to explore that direction
00:46graphbum(:dependencies [org.clojure.contrib/standalone "1.3.0-SNAPSHOT"]) worked
01:06replacatechnomancy: are you there?
01:09technomancyreplaca: briefly
01:11replacatechnomancy: what's the issuse with slamhound & pprint?
01:11replaca*issue
01:18replacatechnomancy: still here?
01:19amalloyreplaca: i think the issue is nothing to do with pprint specifically, but pretty-printing generally. producing good-looking ns-forms is what he claims to have trouble doing
01:19replacayeah, but I what to know what it makes vs. what he's after
01:19replacapprint is pretty tweakable and I bet I can get it right for him
01:22replacathat should have been "what I want" - it's been a long weekend
01:59graphbumis there a way to set up project templates for leiningen? say I want to change the default template set by "lein new", to include some dependencies by default, is there a way to do that?
02:12replacagraphbum: I happen to have the leiningen source open at the moment and I see that you can do it, but I don't understand to much about it. Look at https://github.com/technomancy/leiningen/blob/master/src/leiningen/new.clj and the new/ directory
02:12replacaI don't know if there's doc somewhere about it
02:19graphbumreplaca: ah, cool. looks like it's just a function call.....so I can probably rip off the existing default template, see how that's invoked, and pipe in a modified version
02:23graphbumreplaca: leiningen.new.templates/renderer looks promising
02:24graphbumreplaca: in new/templates.clj
02:25replacagraphbum: great, glad that help.
02:26replacaoff to bed now! almost to a new autodoc release, finally (by torturing leiningen)
02:30graphbumreplaca: rock on. thanks for the pointer.
03:22gunsIs it possible to wrap a namespace (p) with your own (q), so that loading q will provide functions from both p and q?
03:23gunsSimply requiring p in q doesn't seem to work.
04:16noidiguns, maybe this could work? http://clojuredocs.org/clojure_core/clojure.core/load
04:16gunsnoidi: thanks, will check it out
04:17gunsnoidi: That's kind of a nuclear option isn't it?
04:19noidiyeah, it's quite low-level. I have no idea if its use is frowned upon, never had the need for it myself
04:21gunsThere must be a Clojure-esque way of wrapping a namespace. Or perhaps this is the pain point people seem to whine about wrt namespaces
04:21noidithe biggest pain point seems to be the syntax of the ns from
04:21Fossipeople whine about that?
04:21gunshmm. I like it
04:21Fossiweird
04:22Fossiwell, haters gonna hate
04:22noidiI've been using clojure for 3 years and I still have to occasionally copy and paste those parts to get them right :)
04:22noidiI always forget which parts should be wrapped in vectors and whatnot
04:24noidiguns, is this the same scenario that you're dealing with? https://groups.google.com/group/clojure/browse_thread/thread/c5d711a75e940c3b/a4fc53176cd68990
04:25gunsnoidi: Yes it is. So the solution is to jam everything in one ns to avoid the problem altogether?
04:27Fossimeh
04:27Fossii can understand the intention
04:28Fossibut i'm not sure it feels 'right'
04:28gunsRedeclaring requires for every file doesn't really bother me (that's good C practice for instance).
04:28gunsBut if q provides the some of the same functions as p, you have to import [p :exclude [foo bar]]
04:29gunsso you'd have to know the conflicts between p and q before bringing them into the same ns
04:29gunsIf q could wrap and provide p, then that would be nice
04:30gunsAnd in C, you always put guard clauses around the sensitive #defines
04:31Fossiwell, that's inherent to the lookup
04:32Fossii'd rather say it's bad to just :use everything
04:32gunswell, that's a solution
04:32noidiI agree
04:32Fossiin the same way that import java.semothing.* is bad
04:33Fossiwe always :require [foo :as foo]
04:33Fossiand call foo/someith
04:33gunsI see. Wean myself off the sugar then
04:33Fossiuse is only for essentials imho
04:33Fossifor exampre in a test, we use the ns under test
04:34noidibut if for some reason you find it inconvenient to use :require or :use with specific symbols, there's https://code.google.com/p/clj-nstools/
04:34Fossiso you don't have to write it *all* the time
04:34noidi(disclaimer: I've never used it)
04:34gunsWell, what Fossi says is reasonable. Clarity wins over magic. I'm just coming over from Ruby-land
04:35noidiFossi, that's my only use case for indiscriminating use, too
04:35Fossiwell, we have some where we :use :only
04:35Fossilike (:use
04:35Fossi [clojure.contrib.def :only [defvar-]]
04:35Fossi [clojure.contrib.string :only [as-str]])
04:36noidisure
04:36Fossibecause those happen to be used often and some are even in core now
04:36Fossiso we don't have to rewrite so much when we upgrade
04:36noidibut I only :use without :only when I'm pulling the ns under test into the test ns
04:37noidieverywhere else I :use :only or :require
04:38Fossiyeah
04:39Fossithe ml post talks about a slightly different case though
04:39Fossiif you write a library, it might make sense to "reexport" other stuff
04:40Fossithen, i never found any lib weird to use because of this
04:41Fossimost good libs are either abstracting away lower methods, so i only have to require those when i do something bare-bones
04:41Fossior the case discussed sounds more like a 'util' lib that's additional to set and whatnot
04:42Fossiin both cases i like the explicit require
05:15ghengishi
08:52TimMcFossi: Haters gonna make some good points.
08:53FossiTimMc: since i haven't seen any discussion, i can't say :)
08:54Fossiwhat's bad about it?
08:56TimMcFossi: Honestly? The documentation is the worst part.
08:56TimMcIt's not so bad once you know how to use it.
08:56TimMcBeyond that, require vs. :require.
08:58FossiTimMc: yeah, i can recall that
08:58Fossiit's pretty cryptic
08:58Fossican't be so hard to rewrite that though, if that's really the main point
09:04TimMcRewrite the docs? File a ticket and pray.
09:17FossiTimMc: this is getting too meta on me ;)
10:04TimMcFossi: Oh, just snarking about the development process of Clojure.
10:05Fossii figured ;)
10:06Fossiand i guess since i've signed the agreement, but it's still in my drawer, because i can't be bothered with snail mail, i can relate. even if that's a different point ;)
10:32bweaverHow do `send` and `future` interact with the dynamic environment? Are the values of dynamic bindings introduced by `binding` guaranteed to remain the same?
10:34bweavere.g. in `(do (def ^:dynamic foo 0) (binding [foo 1] (future (println foo))))`, is the value of `foo` in the future's body guaranteed to be 1?
10:34TimMcbweaver: New thread, different dynamic scope entirely.
10:35TimMcSame problem with lazy seqs.
10:35bweaverTimMc: That's what I was afraid of. I just wonder because it seems to retain the value when testing in the REPL, but threads are tricky :(
10:35bweaverSo I won't rely on that behavior then.
10:35bweaverThanks!
10:35cemerickbweaver: That's not true in clojure 1.3.
10:35cemerickTimMc: ^^
10:35TimMcbweaver: Drop a let in around that future and you should be good.
10:36TimMccemerick: Oh?
10:36bweaverOK, I'm using 1.3
10:36bweaverSo dynamic bindings are retained during the execution of a future or a send?
10:36cemerickVar bindings are transferred when using send, send-off, future, pmap, etc.
10:36bweaverExcellent!
10:37TimMcHow does *that* work?
10:37cemerickThe only way to avoid carrying along dynamic scope is if you start a new thread on your own.
10:37TimMcWhat about lazy seqs?
10:38gkowhat's the idiom to convert a list of integers (<= 255) into a Java array of bytes? (byte-array (map int-to-byte seq)) where int-to-byte[i] is (byte (if (> i 127) (- i 256) i))) ?
10:39cemerickTimMc: realization of values in lazy seqs continue to occur outside of any "original" dynamic scope.
10:41TimMccemerick: Is that an intended difference? Or is there a technical roadblock to consistent behavior?
10:45TimMcSo... the lazy seq is realized on another user thread, but futures and sends are computed on a Clojure "system" thread.
10:45gtrak``TimMc: futures and sends are on an unbounded thread pool
10:46gtrak``rather, futures use the unbounded one, sends use the bounded one, send-offs use the unbounded one, consider https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Agent.java
10:47cemerickTimMc: values in a lazy seq are realized on whatever thread forces their evaluation.
10:47bweaverTimMc: I'm new to Clojure, so I don't understand your question about lazy sequences? Would you mind pasting a simple example?
10:48gtrak``in core.clj:future-call "(.submit clojure.lang.Agent/soloExecutor ^Callable f)"
10:49TimMccemerick: I guess that lazy seqs *shouldn't* carry the original dynamic scope with them, because that could be a memory leak.
10:50cemerickRight.
10:50TimMcwhereas future and agent code has a relatively short lifetime.
10:50TimMc...is this documented anywhere? :-/
10:51gtrak``TimMc: also make sure to not wrap your future in a dynamic scope, since dynamic scopes are thread-local
10:52mcrittendennot strictly a clojure question, but how can I set up "lein run" as a cron job so that it restarts whenever it's not running? problems: 1) lein run expects to be run from the correct directory, and 2) how can I tell if it's already running? bash script that greps ps?
10:52cemerickTimMc: not that I'm aware of; there are wiki pages discussing the changes, though I can't seem to find them at the moment.
10:53cemerickTimMc: The current state of affairs is well covered in our book, FWIW. </shilling>
10:53mcrittenden(also just realized there's a #leiningen room so I posted that there as well)
10:53gtrak``mcrittenden: why not use an uberjar instead?
10:53bweavercemerick: Which book?
10:53mcrittendengtrak``: I'm not familiar with uberjar?
10:54gtrak``err, well technically you shouldn't be using lein for serving up a production site, i think that's what you're trying to do?
10:55cemerickbweaver: http://www.clojurebook.com
10:55mcrittendengtrak``: yeah, I'm playing with noir and it comes bundled with jetty, and lein run just basically starts jetty on the specified port
10:55mcrittendenmaybe that's not the correct way to put a noir site on prod, but I've had a lot of trouble finding best practices
10:55gtrak``mcrittenden: here I've got an upstart script for ubuntu running my uberjar, which you can create with lein uberjar
10:55gtrak``https://github.com/gtrak/garytrakhman.com/blob/master/scripts/upstart
10:59TimMcgtrak``, cemerick: You seem to disagree on whether futures can be wrapped in a binding.
10:59gtrak``I'm probably wrong :-)
11:02cemerickTimMc, gtrak``: https://gist.github.com/ac8ef5515291e77a7a34
11:03gtrak``cemerick: hmm, why would that work?
11:04raekfutures inheriting bindings is new in 1.3, right?
11:04cemerickgtrak``: Because the dynamic scope where `future` is evaluated is carried along to the evaluation of the future's body.
11:04cemerickraek: yeah
11:04gtrak``ah, fishsticks
11:05raekthis is how you would do it without that new feature: (future-call (bound-fn [] a))
11:05raekbound-fn is like fn, but it remembers the bindings that were in place when the fn expression was evaled
11:06gtrak``that's really interesting, I don't remember reading about bound-fn
11:07TimMcSo if I really thought it was a good idea to make a lazy seq that remembered *all* the bindings...
11:09raekmaybe something like this: (def foo-seq (bound-fn f [x] (lazy-seq (when ... (cons ... (f ...))))))
11:10raeksorry, that doesn't work.
11:11raek(defn foo-seq [x] (let [f (bound-fn f [x] (lazy-seq (when ... (cons ... (f ...)))))] (f x))
11:11raekmaybe this
11:12raek...or you can simply let the current value of the dynamic var and close over that
11:12TimMcAnd that doesn't leak *arbitrary* bindings.
11:12raek(defn foo-seq [x] (let [y *y*, f (fn f [x] (lazy-seq (when ... (cons ... (f ...)))))] (f x))
11:22erewhon&
11:22lazybotjava.lang.RuntimeException: EOF while reading
11:39notsonerdysunnyThe combination of slime and swank-clojure gives you complete access to the call-graph at an interactive level.. However, I was wondering if I can export the call-graph to an external file?
11:40notsonerdysunnyis there some command/plugin which can do this...
11:40notsonerdysunny?
11:46jsnikerisHi all. Is there a good way to inspect java objects from the REPL? I'd like to see the current values of all fields regardless of access modifiers
11:57holohi
12:01holo(loop [i 0] (when (< i 5) (println "i:" i) (recur (inc i))))
12:02holo"Evaluates the exprs in order, then, in parallel, rebinds..." where does recur evaluate in order? in front or behind? it looks confusing
12:04cgrayI think the thing you are quoting refers to loop. It evaluates the expressions between the square brackets in order.
12:05holocgray, how can inc i be executed, if it recurs before it?
12:06TimMcholo: (recur (inc i)) -> (recur (inc 3)) -> (recur 4)
12:06ipostelnikholo, if you had (loop [i 0 j 0] ... (recur (inc i) (inc j)) then (inc i) is executed before (inc j)
12:06cgrayrecur acts just like a recursive function call
12:12holook, my question is why not ( (inc i) recur )
12:14ipostelnikholo, (inc i) doesn't change value of i
12:14ipostelnikit returns the value of i+1
12:15TimMc&(let [a 4, b (inc i)] [a b])
12:15lazybotjava.lang.RuntimeException: Unable to resolve symbol: i in this context
12:15ipostelnikholo, recur "magically" jumps to (loop) and rebinds i
12:15TimMc&(let [a 4, b (inc a)] [a b]) ; holo
12:15lazybot⇒ [4 5]
12:17TimMcholo: Do you understand this? (fn [i] (when (< i 5) (println "i:" i) (f (inc i))))
12:17TimMcoops
12:17TimMc(fn f [i] (when (< i 5) (println "i:" i) (f (inc i))))
12:17TimMc(Forgot to name the function.)
12:23holoTimMc, I understand
12:25TimMcholo: In that normal recursion example, you are *effectively* rebinding i and starting over.
12:26TimMcholo: because the return value of (f i) is the return value of (f (inc i)).
12:26TimMcloop/recur gives you the same computational power, as long as the recursive call is in the tail position.
12:31holoTimMc, i+1 rebinds with what in loop [i 0] ? OK I will imagine loop is a function, and what is inside [] are its input parameters. will it bind with first symbol it finds?
12:34cgrayholo: it's almost right to imagine that what's inside [] are input parameters -- they're really input parameters and initial values... so [i 0], means an input parameter i with an initial value of 0
12:38holocgray, OK, I see now
12:38holothanks TimMc, cgray
12:52TimMcjsnikeris: It's technically feasible, but I don't know offhand. You might find a Java lib that knows how to inspect private fields, then wrap that in a Clojure API.
13:02RaynesTimMc: http://clojuredocs.org/clojure_contrib/1.2.0/clojure.contrib.java-utils/wall-hack-field
13:03RaynesNot in a new-contrib library as far as I know, but small enough to snatch.
13:07cemerickTimMc, jsnikeris: Java already gives you all you need in the reflection API. :-) What Raynes said, too.
13:08TimMcIs there any danger in leaving fields and methods accessible?
13:09TimMcNot from a security standpoint.
13:09cemerickLike what?
13:10TimMcI guess it only matters for libs that use reflection, like TUnit.
13:10cemerickEven if you closed the door behind you, the reflection API ensures that it's never locked.
13:10TimMc*Junit
13:10cemerickah
13:10cemerickEvil things. :-)
13:11cemerickThe odds of an issue are probably very low.
13:11cemerickThe private field/method would have to match whatever nutty criteria such libraries are looking for.
13:14cemerick"Nullary methods with a name starting with 'test' within classes with names starting with 'IT'"
13:14cemerick(That gem courtesy of Maven's failsafe plugin. :-P)
13:15rallie`(str '3a) gives me a NumberFormatException. How would I convert a symbol that begins with a number to a string?
13:15hiredmanrallie`: thats not a legal symbol
13:18rallie`hiredman: ok, I see, it has to be a valid symbol
13:18hiredmanwell, for the reader to read it
13:18hiredmanthe mailing list is so bad
13:19pandeirocemerick: do you have any opinion on using Clutch vs. an ORM tool (ie clj-record) + RDBMS? Ie which use cases benefit from the former or latter?
13:19cemerickhiredman: not getting the sort of applicants you were hoping for? ;-)
13:20hiredmanthe clojure mailing list is the only programming langauge list I am on, are the rest of them so full of stupid ideas?
13:21hiredmanlike this thread about extending namespaces to allow for multiple return values? what the hell
13:21pandeiro(i realize my question isn't exactly clojure-related, and apologize... i am at a little bit of a crossroads designing an app i want to implement)
13:21devinusanybody testing clojure with http://code.google.com/p/openjdk-osx-build/wiki/OpenJDK8MLVM ?
13:23cemerickpandeiro: It seems to me that RDMBS' big wins are (a) typed data and (b) ability to perform absurd ad-hoc queries.
13:23cemerick'course, RDBMS' data model are generally pretty weak
13:23ibdknoxpandeiro: I missed the question
13:23hiredmanthey are only absurd until you need them
13:24cemerickhiredman: indeed
13:24pandeiroibdknox: i am designing an app and at a bit of a crossroads choosing the persistance layer
13:24cemerickpandeiro: IMO, the ideal combination would be something like couch, with data replicated to an RDBMS for reporting purposes.
13:24ibdknoxpandeiro: it depends on the app :)
13:24pandeiroi am self-taught and learned CouchDB first and feel comfortable, but the more i model the data, the more relational it seems to get
13:25cemerickI've personally found Cloudant's _search view to be flexible enough to cover all my query needs for now, actually.
13:25pandeirocemerick: that's an addon they've implemented, yeah?
13:26cemerickpandeiro: it's part of bigcouch, which is couchdb hoisted on top of a dynamo ring
13:26ibdknoxpandeiro: honestly, do what you're comfortable with and grow out of it as you go if it doesn't suit your needs in the long run
13:26ibdknoxwhat you start with now, will likely not be what you end with for any non-trivial app :)
13:27pandeiroibdknox: hmmm, i guess i have to accept that in order to get started
13:27cemerickibdknox: this means I'm doomed to scale up to PHP and mysql? ;-D
13:27ibdknoxpandeiro: yeah, better to just run with it
13:27ibdknoxcemerick: totally :D
13:28pandeirocemerick: that is interesting re: big couch, i didn't realize it had additional features aside from the sharding support
13:28hiredmanhttps://github.com/hiredman/php.lisp/blob/master/lisp.php for all your php needs
13:29ibdknox(inc hiredman)
13:29lazybot⇒ 9
13:29cemerickpandeiro: yup
13:29hiredmanthere is an unfinished compiler too
13:29cemerickI think cloudant + their _search view + clojurescript views will end up suiting me nicely for a long while.
13:30cemerickhiredman: you need another hobby ;-)
13:30hiredmanI need to get serious about my baking
13:30pandeirocemerick: you don't see the overhead of the closure stuff in cljs views being an issue?
13:30cemerickmore importantly, Why? Please tell me you're actually using it!
13:30cemerickpandeiro: overhead?
13:30pandeiro(goog closure stuff i mean)
13:31pandeirothe cljs views need a bunch of google stuff to compile, right?
13:31hiredmanI used it for a little web scraper I wrote for a friend
13:31cemerickpandeiro: the gclosure stuff isn't included in the compiled cljs output
13:32cemerickThe resulting views *are* large (~30k min), but that shouldn't impact anything notably.
13:32pandeirowhy are they large, namespacing and stuff?
13:33cemerickThe clojurescript core lib comes along for the ride.
13:33pandeiroah i see
13:34pandeiroand you think spidermonkey can chew through that 30k every time a view is updated w/out issue?
13:35cemerickI pounded away at it pretty good, without any detectable issue.
13:35pandeirodoesn't couch need to execute the view's JS every time a doc is created?
13:36cemerickit executes the view's js every time a view is accessed, and modifications have been made since the last access.
13:37pandeiroi see... sorry to have taken this way off topic, appreciate the input
13:37cemerickSo if you touch a view, and 1000 documents are added/changed/deleted, then the view js will be loaded once to process those 1000 changes the next time you touch the view.
13:38cemerickCompared the amount of json being pushed around, 30k of js is negligible.
13:38pandeiroyeah i had forgotten that it isn't on write, it's on read
13:39cemerickThat's not *entirely* true in bigcouch/cloudant, but at that scale, you shouldn't worry about 30k anyway.
13:39pandeirois the latency of a roundtrip to their servers from wherever your app is an issue at all?
13:40pandeiroor is that just the price you pay for any PaaS ?
13:40cemerickThey have clusters in AWS, rackspace, and softlayer IIRC.
13:40cemerickSo you can have your data put whereever is good for you.
13:41cemerickAt some scale, they'll manage a dedicated cluster.
13:50cemerickhiredman: f(x) notation! :-D
13:51hiredman:/
13:52thickey1is there a way to run tests against multiple JDK versions with clojure-maven-plugin?
13:56wingiehow do i search for a keyword in the documentation from the REPL?
13:57ibdknox,(doc find-doc)
13:57devinusif you accidentally completely pollute your swank repl with a use, how would you back that up?
13:57clojurebot"([re-string-or-pattern]); Prints documentation for any var whose documentation or name contains a match for re-string-or-pattern"
13:57ibdknoxwingie: ^
13:57wingieibdknox: thnkas!
13:57raekdevinus: remove-ns is one way
13:58devinusraek: (remote-ns 'ns) would undo all of them?
13:58wingiemore langs should have a REPL like clojure's
13:58ibdknoxwingie: what do you need other languages for? ;)
13:58raekdevinus: it removes that namespace completely
13:59TimMc&(doc remove-ns)
13:59lazybot⇒ "([sym]); Removes the namespace named by the symbol. Use with caution. Cannot be used to remove the clojure namespace."
13:59devinushrm… that might not be what i need
13:59raeklets say you accidentally used a namespace bar in namespace foo
13:59devinuswhat my problem is
13:59devinusi accidentally, say (use 'clojure.contrib.string)
13:59raek(in-ns 'user) (remove-ns 'foo) (require 'foo) (in-ns 'foo)
13:59devinusand now suddently, take and several other core fns are shadowed
14:00raekdevinus: in which namespace did you do this? a namespace "connected" to a file or "user"?
14:00devinusraek: user
14:00wingieibdknox: js for browser:)
14:00ibdknoxwingie: ClojureScript! :D
14:01wingieibdknox: have to use ExtJS :)
14:01devinusi tried to do (use 'clojure.core) but then it complains that the fns are being shadowed
14:01wingieand Sproutcore
14:01devinuswhen it didnt the other way around
14:01raekdevinus: you could do something like this: (ns 'temp) (remove-ns 'user) (ns 'user) (use 'clojure.repl) (remove-ns 'temp)
14:01wingiebut i hope clojurescript will be gaining momentum so we have alternatives
14:02raekdevinus: you can also use ns-unalias on each symbol that was affected
14:02raekand then refer-clojure
14:03devinushrm
14:03devinus(ns 'temp) gives me "clojure.lang.PersistentList cannot be cast to clojure.lang.Symbol"
14:03devinusis it seeing 'temp as a PersistentList?
14:03raeksorry
14:03TimMcdevinus: (quote temp)
14:03raekdevinus: (ns temp)
14:03devinusah
14:04raekwas mixing the syntax with in-ns...
14:05devinusi wonder why (ns) doesnt use a symbol...
14:05hiredmanwhy do you think it doesn't?
14:06raekdevinus: ns is a macro, unlinke the other ones which are functions
14:06hiredmandevinus: if temp is not a symbol, what is it?
14:06devinushiredman: i figured ns was a macro like raek said
14:07hiredman"i wonder why (ns) doesnt use a symbol"
14:07devinushiredman: i needed my suspicion confirmed before i looked like an idiot
14:08devinusguess i did it anyway though
14:08TimMc:-P
14:08raekwell "temp is a symbol" and "'temp is a symbol" can both be true, but on different levels
14:08hiredman'temp is a quoted symbol
14:09TimMc'temp evaluates to a symbol, temp reads as a symbol
14:10raekbut it evaluates to that symbol, so 'temp "is" the symbol temp in the same sense as x "is" 3 in (let [x 3] ___)
14:13hiredman,(let [temp 'temp] temp)
14:13clojurebottemp
14:13raekdevinus: this is another way to undo the use: (dorun (map #(ns-unmap *ns* %) (keys (ns-publics 'clojure.string)))) (refer-clojure)
14:14TimMc&(let [let 'let] let)
14:14lazybot⇒ let
14:14devinusraek the temp ns solution seems...cleaner
14:15amalloyTimMc: have you read let over lambda? he has a lovely common-lisp quine using only 'let
14:15devinushiredman: that makes sense. lispy ways of binding to variables confuses me still sometimes
14:16amalloyit doesn't translate to clojure because our backtick form is dramatically different
14:18TimMcamalloy: You pasted that in #4clojure at one point.
14:18TimMcIt was pretty neat.
14:18TimMcI have LoL open in a browser tab, but I don't know when I'll really get around to it.
14:22amalloyTimMc: the online-free version is only the first couple chapters
14:23cemerickamalloy: our backtick has a certain on-stage flair?
14:24cemericksorry, had to do it. :-P
14:24amalloyit has a tendency to soliloquize
14:24cemerickI would have pegged it as having a spot-on MPD.
14:25cemerickDefinitely a character actor.
14:25amalloyuhoh, MPD is not an acronym i can find anywhere
14:26cemerickmultiple personality disorder
14:27Raynescemerick: Those intros and outros on Chris' interview is fantastic.
14:27Rayness/is/are/
14:27cemerickRaynes: Yeah, I like 'em a lot too.
14:27ibdknoxthe part where Chris is talking is total crap though, I'd skip it.
14:28cemerickApparently he worked for Micro$oft. feh.
14:28ibdknoxmust be evil.
14:28RaynesHe wasn't much fun to talk to at the conj.
14:28RaynesThat's why I only spent until like 1AM with him.
14:29rienRaynes: did you see my message?
14:30Raynesrien: I don't think so.
14:30rienRaynes: I was just saying that nixeagle never replied :/
14:30Raynesrien: Oh. I've talked with him recently. He is working on it. There are a couple of bugs he is cleaning up.
14:31rienbeautiful then. did he say he'd put it on his github acct once he was done?
14:31Raynesrien: Yeah.
14:31rienall I needed to know. I'll be checking his github every once in a while then. thanks, man.
14:34clj_newbI need to read/write sexps to file. What functions shoudl I run doc on ?
14:35clj_newbalright, let's try something else. Clojure sucks. It doesn't even provide basic IO for sexps.
14:36clj_newbalright, let's try something else. Clojure sucks. It doesn't even provide basic IO for sexps. Prove me wrong. :-)
14:36gtrak```,kick clj_newb
14:36clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: kick in this context, compiling:(NO_SOURCE_PATH:0)>
14:36technomancy~io
14:36clojurebotPardon?
14:37technomancy~io is generally done with clojure.java.io, which is explained at http://copperthoughts.com/p/clojure-io-p1/
14:37clojurebotOk.
14:37clj_newbgtrak```: shouldn't that be ,(kick 'clj_newb) ?
14:38cemerickclj_newb: read-string/pr-str, and read/pr/reader/writer when you are working with large files.
14:38cemerickAnd, trolling sucks.
14:38Raynes<amalloy> he's just choosing to phrase "guys how do i do io" in a more fun way
14:38mcrittendenhttp://bash.org/?152037
14:39amalloysweet, Raynes, thanks for the implicit permission to paste anything you say into #clojure
14:39Raynesamalloy: You're welcome, bro.
14:39TimMcclj_newb: lrn2patience
14:40cemerickmcrittenden: Ah, crap. :-D
14:40clj_newbTimMc: What about the three virtues of a programmer? :-)
14:41cemerickI thought the more problematic thing was for people to paste things said in #clojure elsewhere?
14:41cemerickWhat's said in #clojure, stays in #clojure.
14:41TimMccemerick: The public logs already do that.
14:41amalloyexcept in the 3+ public logs
14:41brett_htechnomancy: do you know clojure-jack-in would raise this error given the path is set and the binary is found? http://pastebin.com/7dfxyTAR
14:42cemerick**this channel is logged?!?!111!!**
14:42jodarotime to stop drinking
14:42TimMc$google "this channel is logged?!"
14:42jodaroor
14:42lazybot[Channels | ZFTalk] http://zftalk.com/channel/
14:42jodarostart
14:42seancorfieldprivacy is an illusion :)
14:42clj_newbnice; there's a slurp function that goes file->string? very nice
14:42technomancybrett_h: whoa; that's a weird one
14:42technomancyI thought you could always trust exec-path
14:42amcnamaraclj_newb: there's also a spit function to do the opposite
14:42gtrakbrett_h: you could always do lein swank in a shell and then M-x slime-connect
14:43brett_hgtrak: sure, I was hoping to get this working though
14:43cemerickseancorfield: Hey Sean, how goes it? :-)
14:43brett_htechnomancy: yeah, fwiw same conf worked on Ubuntu 11.10 + emacs-snapshot yesterday ... I just switched to Arch with emacs-bzr ... no idea what else is different
14:43brett_htechnomancy: could be different*
14:43amalloyslurp actually is more general: inputty-thing->string
14:43Rayneshttp://www.raynes.me/logs/irc.freenode.net/clojure/today.txt
14:44clj_newb~io
14:44clojurebotio is generally done with clojure.java.io, which is explained at http://copperthoughts.com/p/clojure-io-p1/
14:44clj_newbnice :-)
14:44clj_newbI like this blog post.
14:44technomancybrett_h: start-process explicitly states that it honors exec-path in its docstring, so unless you've changed clojure-swank-command it's gotta be an emacs bug?
14:44clj_newbalright, spit/slurp gives me file <-> string. How do I go sexp <-> string?
14:45seancorfield,(doc pr-str)
14:45clojurebot"([& xs]); pr to a string, returning it"
14:45clj_newbpr-str : sexp -> string
14:45clj_newbhow about string -> sexp ?
14:45seancorfield,(doc read-string)
14:45clojurebot"([s]); Reads one object from the string s"
14:46langmartinclj_newb: the laziness that's the traditional virtue of a programmer has to do with respecting your own time enough to not do boring things; not disrespecting other people's time
14:46clj_newbdumb question: is there a way the names are pr-str/read-string, i.e. the str/string inconsistency?
14:47clj_newblangmartin: I was mocking my own impatience @ pasting the same question 3 times within 1 minutes; not on laziness/hubris :-)
14:48seancorfield,(apropos "read")
14:48clojurebot(read-line pop-thread-bindings thread-bound? read *read-eval* ...)
14:48seancorfield&(apropos "read")
14:48lazybotjava.lang.RuntimeException: Unable to resolve symbol: apropos in this context
14:48langmartinok, but now there's a link called getting started on the clojure homepage, immediately followed by "reader" which covers all this
14:48seancorfieldbah
14:49TimMc,(require 'clojure.repl)
14:49clojurebotnil
14:49TimMc,(apropos "read")
14:49clojurebot(read-line pop-thread-bindings thread-bound? read *read-eval* ...)
14:49TimMc\o/
14:51seancorfieldTimMc: that's what i already did
14:51seancorfieldit was &(apropos "read") that failed :)
14:52seancorfield&(require 'clojure.repl)
14:52lazybot⇒ nil
14:52seancorfield&(apropos "read")
14:52lazybotjava.lang.RuntimeException: Unable to resolve symbol: apropos in this context
14:52seancorfield&(clojure-version)
14:52lazybot⇒ "1.3.0"
14:52TimMcOh, I see -- it was the lazybot command that failed.
14:52seancorfieldyeah
14:52seancorfield&(do (use 'clojure.repl) (apropos "read"))
14:52lazybot⇒ (repl-read read-line pop-thread-bindings thread-bound? read *read-eval* read-string get-thread-bindings load-reader push-thread-bindings *print-readably* read-findfn-args thread-stopper thread-local* useful.utils.proxy$java.lang.ThreadLocal$0 thread-local if-exists... https://gist.github.com/1556599
14:53Raynesamalloy: Still don't want to blacklist use?
14:53seancorfieldso, in answer to clj_newb's Q: why is it read-string but pr-str (not pr-string)?
14:54brett_htechnomancy: it works if I use emacs -nw or spawn the emacs GUI from a shell. interesting, going to check out start-process's C
14:54amalloyno, why would i? it's a little tasteless to do a bare-use like that, but it let people do what they wanted to do with the bot and caused no harm
14:54TimMcHysterical raisins.
14:54seancorfield&(clojure.repl/apropos "read")
14:54lazybot⇒ (repl-read read-line pop-thread-bindings thread-bound? read *read-eval* read-string get-thread-bindings load-reader push-thread-bindings *print-readably* read-findfn-args thread-stopper thread-local* useful.utils.proxy$java.lang.ThreadLocal$0 thread-local if-exists... https://gist.github.com/1556607
14:55Raynesamalloy: Which they could have done with require.
14:55RaynesOr apparently without require.
14:55seancorfieldah, so it's required, just not refered
14:55amalloyseancorfield: well it wasn't required until you did it
14:55Raynesamalloy: I just restarted the bot.
14:55amalloyRaynes: he could have done it just with the lambda calculus by rewriting apropos himself, but it's more convenient this way
15:05Raynes4Clojure just hit one hundred thousand solutions.
15:05ibdknoxCongrats!
15:05RaynesDance party.
15:05amalloy*obligatory embarrassing dance-failure*
15:05koeieninteresting website. i'll try it.
15:06wingieclojure is the new black
15:19brett_htechnomancy: got it, the problem wasn't exec-path, it's the fact that it pipes to another shell
15:20brett_htechnomancy: that shell didn't have the PATH to find lein
15:31wingiecould clojure be used to create a web server like in node.js?
15:31ivanyep
15:31wingieif so is there a web framework making it easy?
15:32ibdknoxwingie: Noir - http://www.webnoir.org
15:32wingielike express for node.js
15:32wingiethat one is the defacto?
15:32hiredmanweb frameworks usually aren't used to "create a web server"
15:33wingiehiredman: what do you mean?
15:33wingiei mean web server frameworks like express for node.js
15:33mcrittendenwingie: I was in your position a week ago and decided to go with noir. it seems to have the most momentum, has pretty decent docs and is full featured (sessions, cookies, form validation, etc.). but the server itself is jetty, which just comes bundled with it, so you're not "creating a web server" by using it
15:34koeienam i correct in assuming the following: if i write (let [f (expr)] ...), i cannot use f in expr ?
15:34hiredmancorrect
15:34ibdknoxmcrittenden: you can use netty or tomcat or GAE or... whatever too :)
15:34koeienso i would have to use a y-combinator or something, to do this.
15:35ibdknox,(doc letfn)
15:35wingiemcrittenden: i see .. kinda like php using apache
15:35mcrittendenibdknox: oh for sure, I just meant that in node.js you actually create the server using native node.js code, whereas here you just use a 3rd party server
15:35clojurebot"([fnspecs & body]); fnspec ==> (fname [params*] exprs) or (fname ([params*] exprs)+) Takes a vector of function specs and a body, and generates a set of bindings of functions to their names. All of the names are available in all of the definitions of the functions, as well as the body."
15:35raekkoeien: you can give an anonymous function a name it can use in itself: (fn f [...] ...)
15:35wingieim too used to how node.js do things =)
15:35koeienthank you.
15:36wingiebut how does jetty handle concurrency?
15:36raekalso, (letfn [(f [...] ...)] ...) is nearly the same thing as (let [f (fn f [...] ...)] ...)
15:36ibdknoxwingie: you can use it on netty, which is non-blocking IO
15:36ibdknoxjust like node
15:36wingiei see
15:37wingieso it's better than jetty since it's not using threads?
15:37ibdknoxno
15:37ibdknoxnot at all
15:37raek...but it also allows all function letted functions to refer to each other
15:37koeienraek, ibdknox: thank you for the pointers. i was a bit confused at the error message, this clears it up and provides the solution.
15:37ibdknoxa threaded server is significantly faster for fire and forget
15:37ibdknoxfor long running connections NIO is better
15:37gtrakwingie: processes are not *better* than threads
15:38ibdknoxbasically are you doing long polling or websockets? If so use Netty
15:38ibdknoxotherwise something like Jetty will do you well
15:38wingieibdknox: yeah i have to have multiple users connected
15:38ibdknoxwingie: what do you mean by connected?
15:39wingieusing web sockets
15:39ibdknoxah
15:39wingieor whatever underlying protocol
15:39ibdknoxaleph + Noir should do it for you then
15:39ibdknoxwingie: https://gist.github.com/1257857
15:41wingieibdknox: looks cool thanks
15:42ibdknoxwingie: fwiw, I got significantly better performance on the JVM than node
15:42ibdknoxworking with websockets
15:42ibdknoxscaling to 100k+ on a single box
15:43wingiecool
15:43wingiei have to make some performance tests
15:45lucianibdknox: what are you using on node and jvm?
15:46ibdknoxlucian: I used socket.io on node and a netty version of socket.io that I wrote
15:46lucianibdknox: right, so not entirely comparable
15:46lucianof course, if it's faster it's a good idea to just use it
15:47lucianbut that high up the stack, the performance issues could be anywhere
15:47ibdknoxit's entirely comparable
15:47ibdknoxwebsockets on node vs websockets on netty
15:48lucianthat means some websockets library on node vs some other websockets library on the jvm
15:48TimMcWell, it's the whole stack that matters.
15:48wingieis aleph similar to socket.io?
15:48ibdknoxit's pointless to say "node is fast" but actually using it is slow because the defacto standard lib sucks
15:49ibdknoxthat's not a valuable thing to say
15:49ivanibdknox: is that 100K threads, or are there some event loops?
15:49ibdknoxivan: netty and node are both non-blocking
15:49ibdknoxso event loops :)
15:51amalloyibdknox: you can implement a fast fibonacci server in node. QED
15:51ibdknoxamalloy: haha
15:51lucianTimMc: yeah, that's what i meant
15:52lucianibdknox: v8 isn't that fast really, hotspot beats it almost always
15:52TimMcv8 is fast compared to other JS VMs.
15:52ibdknoxlucian: If you mean what TimMc meant, then we don't disagree? :)
15:52lucianbut network programs are almost always io bound, and in such cases the libraries underneath matter a lot more
15:53lucianTimMc: sure
15:54lucianit's really really fast or a JS vm indeed
15:54lucianabout as fast as, say, PyPy
16:02wingieim exploring the use cases for clojure for me .. it seems doing pretty well as a web backend
16:02ibdknoxwingie: best I've ever used and I've used most of them :)
16:02wingiewill I be able to build Android apps with Clojure?
16:02gtrakit's a general purpose programming language
16:03wingieor use the Java frameworks like Sencha's GWT with it?
16:03OlegYchi had pretty bad experience with extgwt
16:04OlegYchyou must feel lucky you can't use it with language other than java
16:05wingieokay im using their Ext
16:05wingiethat one is really awesome
16:05gtrakcan't write frontend GWT code, since GWT goes straight from java source to js. Clojure goes straight from clojure source to bytecode.
16:05wingiehave someone here used Google's GWT? (or what its called)
16:05mcrittendenwingie supposedly you can use clojure for android apps. there are a couple guides out there like this one (http://riddell.us/ClojureAndAndroidWithEmacsOnUbuntu.html)
16:05lazybotThe riddell.us tutorials are much more highly-ranked on Google than they deserve to be. They're old and way too complicated. If you're trying to install Clojure...don't! Instead, install Leiningen (https://github.com/technomancy/leiningen/tree/stable) and let it manage Clojure for you.
16:06mcrittendenbut I've never tried it so ymmv
16:06wingieis lazybot a bot?
16:06mcrittendenyes
16:06gtrakfor android, you might have better luck with clojurescript and phonegap
16:07wingiewho commanded it to print out the "use leiningen" tip?
16:07wingiecant see the command
16:07hiredmanI would not recommend using clojure for android apps
16:07hiredmanthe runtime footprint is just too large currently
16:08mcrittendenwingie it is programmed to say that whenever someone posts a riddell.us link apparently.
16:08lazybotThe riddell.us tutorials are much more highly-ranked on Google than they deserve to be. They're old and way too complicated. If you're trying to install Clojure...don't! Instead, install Leiningen (https://github.com/technomancy/leiningen/tree/stable) and let it manage Clojure for you.
16:08mcrittendenhehe oops
16:08wingieriddell.us
16:08lazybotThe riddell.us tutorials are much more highly-ranked on Google than they deserve to be. They're old and way too complicated. If you're trying to install Clojure...don't! Instead, install Leiningen (https://github.com/technomancy/leiningen/tree/stable) and let it manage Clojure for you.
16:08wingie:)
16:08wingieyeah leiningen kicks ass
16:08wingiei am using it's repl wrapper
16:09TimMcwingie: I've used GWT. It's kind of terrible.
16:10wingieTimMc: google's one?
16:10wingieor Sencha's
16:11TimMcI wasn't aware there were multiple. Google's.
16:12TimMcIt might be tolerable once Java has lambdas.
16:12TimMcproper ones
16:12wingiehttp://www.sencha.com/gxtdocs/
16:12ziltiTimMc: Will that ever happen?
16:12TimMcDon't ask me.
16:12TimMcI thought we were getting them in JDK 7.
16:13amalloyallegedly that might have been the case for a while
16:13ziltiIf that are "real" lambdas
16:13amalloynow, allegedly, it might be the case that we're getting syntax sugar for lambdas in JDK 8
16:14ziltiI'm using the "or" function of sqlkorma. I have a function which takes a list as input. Now I need to turn a list like ("first" "second" "third") into (or {:field "first"} {:field "second"} {:field "third"}) but how?
16:23TimMcIf `or` is a function, you can (apply or ...).
16:24TimMcThat ... can be the result of a map or for expression over the list
16:25amalloyi imagine korma has an "in" or something like it
16:25ziltiOh wait, "or" isn't a function :(
16:25ziltiyes, there's an "in"
16:53MenTaLguYhm
16:53MenTaLguYso what does this error mean?
16:53MenTaLguYException in thread "main" java.lang.IllegalArgumentException: No single method: accepting_state_QMARK_ of interface: hx.fsm.AbstractState found for function: accepting-state? of protocol: AbstractState (fsm.clj:31)
16:54gtraksounds like something's not compiled correctly?
16:55amalloyno, sounds like you're calling a protocol function with incorrect args
16:55hroarkeMenTalguY: I've gotten somthing similar to that if I reload a namespace that defines a protocol, but then try to use it's functions on an object I created before reloading.
16:56amalloyah, that's another strong possibility
16:56MenTaLguYhmm
16:57MenTaLguYI think it's incorrect args in this case
16:57MenTaLguYclojure error message aren't that helpful, especially as they give you unqualified filenames
16:57MenTaLguYI'll have to figure out where it's happening
16:57amalloyare you trying to write a protocol with &args?
16:59MenTaLguYnope
16:59MenTaLguYdoes that work?
16:59MenTaLguY(I wouldn't have expected it to...)
17:00MenTaLguYI found it, it's incorrect args
17:00MenTaLguYthanks
17:06AWizzArdCan a Leiningen plugin overwrite the version number of a project?
17:07technomancyAWizzArd: it's just an assoc away =)
17:07AWizzArdFor example, that hypothetical plugin could read the version number from the most current tag in my Mercurial repo.
17:08technomancyoh, you'd have to add a hook to read-project to make it take effect in other tasks
17:08technomancybut it's possible
17:08_ViWhat is the main difference between clojure 1.3.0-alpha4 and 1.3.0? On alhpa4 my program works, on release it fails <RuntimeException java.lang.RuntimeException: 4: Failure>
17:09AWizzArdtechnomancy: Currently my procudure is this. I do Semantic Versioning. So when I am ready, I update the version number in my project.clj and possibly in a readme, and then I commit this with a commit message in the format: "Release x.y.z".
17:10AWizzArdThen I tag this revision, also with x.y.z, which causes another commit on top of what I currently have.
17:10TimMc_Vi: The most important difference is that 1.3.0 is what you should be using. :-P That's pretty weird, though.
17:10AWizzArdBut the Mercurial build script itself for example reads its version number from the latest tag.
17:11amalloyAWizzArd: eh? tags create a commit?
17:11amalloythey don't in git, but i guess i don't know about hg
17:11AWizzArdamalloy: in HG they do. Tagging something is part of the project history.
17:19AWizzArdamalloy: the Mercurial philosophy is to remember who set a tag at what time, and make this just one more commit.
17:22technomancyAWizzArd: there's been talk of supporting programmatically-modifiable project.clj files in lein 2
17:23technomancyan optional alternative to defproject would just be (def project {:name myproject :version "1.0.0-SNAPSHOT" [...]})
17:23technomancywhich would be a lot easier to parse and munge from plugins
17:23technomancyaaaaaactually that might even unintentionally work in lein 1
17:23AWizzArdYes, that could be interesting. I remember, a long time ago, when the discussion started about changing the build system from Ant to Maven, there was a lot of talk about hashes, reading data from the git repo, etc.
17:24TimMchow low can you go
17:24cemerickAWizzArd: that's high on my todo list BTW (i.e. a "release" plugin for lein)
17:24technomancyit would be higher on my list if I were more careful about tagging and made releases more often. =)
17:24AWizzArd(:
17:25cemerickReleasing from a working copy scares me too much to not prioritize it. :-)
17:25technomancycemerick: for whatever stupid reason I called version 1.0.0 of the tar plugin "lein-release"
17:25technomancybut it's been deprecated since like the week after it was released, so it's probably safe to take it over
17:25cemerickEasy fix. No one produces tar files anymore.
17:25technomancyhah
17:26technomancywell I moved it to lein-tar, which still exists and has users.
17:26cemerickI only see them when downloading various dubious OS X 'wares. FancyMacApp.tgz
17:27technomancycemerick: how would you deploy a non-webapp that needs scripts and can't be just an uberjar?
17:27technomancywait, I'm being trolled.
17:27technomancymacs have their own crazy installer thingies
17:28amalloytechnomancy: i'm finding it really hard to resist rising to cemerick's bait also
17:28solussdcan I force clojure.xml/emit to use double quotes around attribute values? it currently uses single quotes and creates malformed xml if the string contains a single quote
17:29amalloychouser: btw, how do you feel about removing (at least temporarily) the whitespace test for data.xml so that we can put out a release that people can actually use?
17:30cemericktechnomancy: those apps are usually of the the drag-to-/Applications variety
17:30cemericktechnomancy: and: scripts? huh, what scripts?
17:30cemerickoh, non-webapp
17:30cemerickOS X .app, or NSIS installer for windows.
17:31technomancycemerick: I mean server-side
17:31TimMcsolussd: Wait, it doesn't escape quotes? wtf
17:31solussdTimMc: I was surprised too
17:31amalloyTimMc: clojure.xml is badly broken in a lot of ways; it's a halfway solution
17:32AWizzArdcemerick: that plugin would be very nice, especially since one can not forget anymore to update the version file. But the question stays: what about other mentions of the version number, for example in a readme file, or in accompanying html docs?
17:32amalloydata.xml does a pretty good job but is lacking (a) some feature you might want, and (b) an officially-blessed release
17:32cemericktechnomancy: what scripts are we talking about again? :-P
17:32TimMcHow can it *not* do that? That's like the first thing I would write a test for.
17:33solussd,(-> {:tag :Blah :attrs {:a "it's broken"}} clojure.xml/emit with-out-str)
17:33clojurebot#<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.lang.ClassNotFoundException: clojure.xml>
17:33cemerickYou should know me well enough by now that I find was around writing scripts. :-)
17:33technomancycemerick: daemonization stuff, setting -Xmx, stuff like that
17:34amalloy,(require 'clojure.xml)
17:34clojurebotnil
17:34technomancyI would like to do deploys like that using .debs, but the fact that you can't have multiple versions installed at once basically makes that useless
17:34amalloy,(-> {:tag :Blah :attrs {:a "it's broken"}} clojure.xml/emit with-out-str)
17:34clojurebot"<?xml version='1.0' encoding='UTF-8'?>\n<Blah a='it's broken'/>\n"
17:34solussd,(-> {:tag :Blah :attrs {:a "it's broken"}} clojure.xml/emit with-out-str)
17:34clojurebot"<?xml version='1.0' encoding='UTF-8'?>\n<Blah a='it's broken'/>\n"
17:34solussdgrr
17:34solussdi guess I can escape it myself. :/
17:34amalloysolussd: are you married to clojure.xml? there are several better solutions
17:35solussdam alloy, not in the slightest- I'd prefer to be able to feed it the same :tag :attrs :content map though
17:35solussd*amalloy ^ (damn you autocorrect)
17:35cemerickamalloy: a set of tickets to fix hardcore bugs like that seem called for
17:36amalloywell, that's the format data.xml uses (though it also accepts hiccup/prxml-style [:tag {:attrname attrval} content content content])
17:37hiredmanclojurebot: xml solution is <reply> the best solution is not to use xml at all
17:37clojurebotOk.
17:37hiredmanclojurebot: do you know of an xml solution?
17:37clojurebotCool story bro.
17:37hiredmanclojurebot: jerk
17:37clojurebotCool story bro.
17:37amalloysadly until an official release comes out (which will heopfully be soon), i have to recommend you to an unofficial fork like http://clojars.org/org.clojars.ninjudd/data.xml
17:37technomancyclojurebot: jerk is <reply>you cut me deep, man.
17:37clojurebotOk.
17:38amalloytechnomancy: you're ruining his desire to reply with actual capitalization
17:38amalloyclojurebot regards irc as a high-formality medium, with caps and punctuation
17:38TimMc"Sincerely, clojurebot"
17:38technomancyclojurebot: it's hard to stay in character.
17:38clojurebotIt's greek to me.
17:39cemericktechnomancy: jsvc has always served me well for stuff like that. *shrug*
17:40cemerickIs that considered ghetto these days?
17:40cemerickOr, not ghetto enough? ;-)
17:40AWizzArdtechnomancy: could this get-the-version-externally-hook be made in such a way that it will run very early, before any other task has the chance to see the version number? So that Marginalia for example would also see the updated thing?
17:40cemerickAWizzArd: you mean you're looking to update version numbers in-place as well? Yeah, that'll be supported as well.
17:41technomancycemerick: doesn't seem to solve the -Xmx problem
17:41cemericktechnomancy: how so?
17:41technomancyAWizzArd: sure, as long as you hook read-project
17:41cemerickAWizzArd: I get a headache every time I need to tweak project.clj **and** README.asciidoc. :-)
17:42technomancycemerick: if you just distribute an uberjar for it to run, you still need a mechanism for getting other config values deployed
17:42AWizzArdcemerick: so that plugin or hook or optional behaviour of Leiningen 2 could *maybe* also update some files.
17:43cemerickAWizzArd: absolutely.
17:43hiredmantechnomancy: well, that depends, like for us everything else is mostly done by chef
17:43hiredmanwith default configs in the jar
17:43cemericktechnomancy: That's what pallet is for.
17:43cemerickRight, or chef, etc.
17:44cemerickThough really, I've been deploying everything as webapps lately, even if they could be "headless". Ends up being easier all around.
17:45technomancyyeah, I guess you wouldn't really need a tarball for that
17:45cemericki.e. do you *really* need all that extra config goop? Often, not really — just get good defaults in there, and homogenize the hosts underneath.
17:46hiredmanwell, it's kind of a tension between static configs written by whatever, and dynamic discovery
17:46cemericklike, if you had a good deployment platform that could set up services for you and stuff… ;-)
17:46hiredmanI prefer the later, but we do more of the former
17:46bweaverWhat's the preferred way to indicate success or failure to the called of a `send`?
17:47bweaverSorry s/called/caller/
17:49bweaverLike if I had an agent with a map in it and I did something like `(send the-agent replace key val)` where `put` is supposed to fail if `key` doesn't already exist in the map.
17:49bweaverAnd the caller of the `send` is interested in knowing if a failure occured or not.
17:50bweaverErg s/`put`/`replace`/
17:50technomancybweaver: if the caller needs to know about failures, perhaps an asynchronous mechanism isn't suited?
17:51cemerickbweaver: What technomancy said; beyond that, you can use agent-error to get the error caught by a failed agent. Also, see the docs for `agent` for the various error-handling options that exist.
17:53_ViIn Clojure 1.3.0-alhpa4 I get "SftpException 4: Failure" in (catch ...). In Clojure 1.3.0 I get RuntimeException with SftpException inside...
17:54bweavercemerick: Thanks, :error-handler might do the trick.
17:54technomancy_Vi: I got bit by that very issue yesterday. annoying.
17:54technomancyI believe the justification is something like mumble mumble checked exceptions?
17:54_Vitechnomancy, Who is wrapping this in RuntimeException? Clojue or Jsch?
17:55technomancyclojure is
17:55_ViHow to catch specific exceptions then?
17:55hiredmanit's a bug in clojure in 1.3 and 1.4-SNAPSHOT
17:55hiredmanthe reflector boxes exceptions
17:56AWizzArdBtw, what are the main goals for Clojure 1.4?
17:56_Vihiredman, So, stick with alhpa4 or workaround in the code (how?)?
17:57_ViOr catching specific exceptions Considered Bad in Clojure?
17:57cemerickAWizzArd: Possible directions: http://dev.clojure.org/display/design/Release.Next+Planning
17:57AWizzArdthx
17:57technomancy_Vi: no, it's just creating new exception classes that's discouraged
17:57hiredmanhttp://dev.clojure.org/jira/browse/CLJ-855
17:58hiredman_Vi: there is no work around
17:58_Vihiredman, So should I stick with 1.3.0-alhpa4 until this is fixed?
17:58hiredmanI dunno
17:59hiredmanI have been fiddling with my own patch for this too
18:08solussdamalloy: is data.xml usable? Says it isn't 'released' yet. ;)
18:08amalloysolussd: <amalloy> data.xml does a pretty good job but is lacking (a) some feature you might want, and (b) an officially-blessed release
18:10solussdthanks
18:10technomancyis there a built-in function to do this? (when-let [matches (re-find re s)] (matches n))
18:12amalloytechnomancy: you're just...looking for the Nth matching group?
18:13technomancyyeah
18:13amalloy&(get (re-find #"(foo)bar" "zfoobarbaz") 1)
18:13lazybot⇒ "foo"
18:13amalloy&(get (re-find #"(foo)bar" "zfrbaz") 1)
18:13lazybot⇒ nil
18:14technomancyoh, of course. I always forget get.
18:14technomancythanks
18:15amalloyyou're quite welcome
18:19AWizzArdOT but interesting: http://www.nlp-class.org/
18:23wingieanyone here is using clojurescript?
18:23wingiefor frontend apps?
18:23wingiewanna know it's maturity
18:24technomancyits maturity is ... low
18:30jordandanfordI'm trying to learn Clojure by rewriting a simple Python project, but I'm having some trouble – any help?
18:30jordandanfordhttp://stackoverflow.com/questions/8720073/idiomatic-clojure-equivalent-of-this-python-code
18:32alexbaranoskyjordandanford, sure
18:35NarviusHello.
18:36NarviusI have a question; I have a map containing a map, among others, and I want to (assoc) something in the in the inner map.
18:36technomancy,(doc assoc-in)
18:36clojurebot"([m [k & ks] v]); Associates a value in a nested associative structure, where ks is a sequence of keys and v is the new value and returns a new nested structure. If any levels do not exist, hash-maps will be created."
18:36NarviusNow, (assoc) of course returns a new map instead of modifying the old one. So, is there a non-mess...
18:36NarviusOh. Thanks.
18:36technomancyheh; np =)
18:36Narvius:D
18:37technomancyclojure: it's thought of everything!
18:37technomancyexcept... well, let's not get into that right now
18:37NarviusxD
18:37NarviusI'd be interested to hear that, though.
18:38jordandanfordalexbaranosky: Thoughts?
18:39alexbaranoskyjordandanford, sorry, I got distracted, let me look
18:39technomancyNarvius: non-transitive AOT compilation, a command-line interface, flexible thread pools, and increased debuggability, for starters.
18:43technomancyso... I'm making a change to a library. I want a tool that will use clojuresphere's data and allow me to run all the tests of the dependent libraries against my changes.
18:43technomancyyes?
18:43clojurebotyes is is_rhickey_is_a_minor_god?
18:43wingieim reading programming clojure it says there is a function called "show" but it cannot find it
18:43wingieto show memebers of objects
18:43technomancywingie: (use 'clojure.repl) I think
18:44wingiejava.lang.Exception: Unable to resolve var: show in this context (NO_SOURCE_FILE:17)
18:45alexbaranoskyjordandanford, what question do you have about the code?
18:45technomancywingie: are you using slime?
18:45jordandanfordalexbaranosky: I'm asking how to idiomatically translate it into Clojure
18:45technomancybugger; clojuresphere doesn't seem to have an API
18:45wingietechnomancy: no .. im using lein
18:46technomancyhm; someone who doesn't use slime would know what happened to show
18:46wingietechnomancy: what is slime?
18:46technomancyit's this crazy emacs thing
18:47technomancyhttp://www.x-entertainment.com/articles/0946/ani1.gif
18:47technomancyor rather, https://github.com/technomancy/swank-clojure
18:48wingie:)
18:54wingiewho is rich hickey in here?
18:54mrb_bkwho _isn't_ ?
18:55wingiewhat do you mean by that
18:55amalloyrhickey doesn't come in here often
18:57amalloyjordandanford: you might find https://github.com/amalloy/clusp interesting, wherein i implement a vm for an intentionally-obtuse language, snusp
18:58jordandanfordamalloy: Thanks, I'll check it out
19:01amalloywingie: which version of clojure? show only exists in clojure.contrib.repl-utils, which is not 1.3-compatible
19:01amalloyclojurebot: show is <reply>Show only exists in clojure.contrib.repl-utils, which is not 1.3-compatible. For a 1.3 replacement, consider clojure.reflect/reflect.
19:01clojurebotIn Ordnung
19:03wingieamalloy: im using "lein repl", how do i check which clojure version it uses?
19:03amalloy,*clojure-version*
19:03clojurebot{:major 1, :minor 3, :incremental 0, :qualifier nil}
19:04wingie1.2.1
19:05wingiehmm, anyone knows how i can use 1.3.0 in lein repl?
19:06wingiesince "clj" is using 1.3.0.. but "lein repl" is using 1.2.1
19:06technomancyclojurebot: clj?
19:06clojurebotPardon?
19:06technomancyamalloy: you want to take this one?
19:07amalloyhaha clojurebot already have enough of my vitriol. you can tell him why clj is evil
19:08technomancyoh, I thought you already had a factoid in there
19:09technomancywingie: clj is just some script whipped up by whoever happened to package clojure for your package manager; there's no official supported shell script for clojure
19:09adiabaticIf I can do (first (sorted-set 1 2 3)) and (rest (sorted-set 1 2 3)), why can't I use destructuring assignment to break a sorted-set into a head and the rest of it?
19:10technomancywingie: if you create a new project and set the clojure version to 1.3.0 inside project.clj, you can get lein repl to use that version of clojure
19:13cgrayadiabatic: I guess the short answer is that sorted-set doesn't support nth
19:13adiabaticcgray: yeah, that's the UnsupportedOperationException that's been flying in my face
19:14adiabatics/flying in/hugging/
19:15amalloytechnomancy: last time i looked at clj it wasn't actually even something from a package manager. it's actually this thing you have to go to a ton of work to get going
19:15amalloyand what you get out is way less useful than just "download lein and hit Go"
19:16cgrayadiabatic: :) destructuring uses nth behind the scenes (because if you did (let [[first second third] (sorted-set 1 2 3)]) it'd want to get the first, second, and third quickly)
19:16cgrays/quickly/somehow/
19:16adiabaticamalloy: wasn't that bad, here. wget to ~/bin, chmod u+x, download clojure-foo-bar-baz.jar to ~/Library/Classpath (a new directory), and edit .bashrc to also have `export CLOJURE_EXT="$HOME/Library/Classpath"`
19:17amalloyadiabatic: compare to lein: "wget to ~/bin"
19:17amalloyand iirc clj also recommended setting up clojure-contrib, which was a bad idea then and a dreadful mistake now
19:18wingietechnomancy: it worked .. thanks
19:19adiabaticSure, but then you have to learn how lein works. "run `clj foo.clj` repeatedly" is a newbie workflow that's fairly popular for lots of other languages, compiled, interpreted, interpiled, and otherwise
19:20adiabaticAt some level of complexity lein will be the least silly option, but I don't think I'm there yet.
19:20adiabaticprogram complexity*
19:20technomancywingie: you can also do "lein plugin install lein-repl13 1.0.0; lein repl13"
19:21technomancyas of about thirty seconds ago
19:21amalloypft
19:22amalloytechnomancy: i need lein-repl13-with-data.xml-and-incanter plz
19:23technomancyamalloy: pull requests welcome
19:23technomancyI don't even know if I should push this to github, it's just so silly
19:24technomancyit's ten lines, it's on clojars; problem solved.
19:35wingieis this a feature good to have: (third "hello world")
19:35wingiesince after third we have fourth, fifth, sixth and all others with "nth"
19:36wingiebut third is spelled with rd .. doesn't seem to be that nice using (nth "hello world", 3)
19:36wingieyou are following me?
19:39jodarohttps://gist.github.com/8c3da82eb9183baae5b1
19:39jodarohaving some trouble with gloss
19:39jodaroif those that know it can take a look
19:42adiabaticwingie: eh, not really
19:43wingiehaha ok
19:44adiabatic"second" seems OK because it's like peeking one past the first
19:44adiabaticbut third seems like overkill
19:44wingieit fits better with the english
19:45wingie=)
19:45wingieis there a second last?
19:46wingieif no, then second seems not that good to me
19:46cgray,(doc butlast)
19:46clojurebot"([coll]); Return a seq of all but the last item in coll, in linear time"
19:47wingieno i mean the second last item
19:47adiabaticevidently there's no "penultimate"
19:47wingie(1 2 3 4) .. the value 3 in this case
19:48technomancy,((comp last butlast) [1 2 3 4])
19:48clojurebot3
19:51wingiethat was cool one
19:52amalloynot very efficient at all, though. if you really want to do that, you should make the thing a vector first
19:52amalloy(or, ideally, it would already be a vector)
19:52amalloy&((comp peek pop) [1 2 3 4])
19:52lazybot⇒ 3
19:54technomancywell hello mister fancy pants.
19:54technomancyhttp://www.youtube.com/watch?v=bj563ViG7Qg
19:54technomancy(youtube needs a way to link to just a certain slice of a video)
19:55wingiethat would be a cool feature
19:55amalloytechnomancy: you can link to an offset
19:55adiabaticthey have a way to do that with …yeah
19:55technomancyoh?
19:55technomancyI thought that died with google video
19:56technomancywouldn't work here because I want to specify the end range, but whatever
19:56amalloyright
19:56technomancyshould have just used this one instead http://www.youtube.com/watch?v=FPxY8lpYAUM
19:56technomancysince it's 100% relevant!
19:57amalloytechnomancy: add a fragment identifier: youtube/whatever?foo=bar#0m20s
19:57technomancycool beans
19:57amalloyhaha i didn't know there was a zelda cartoon
19:59technomancyit's pretty great!
19:59technomancywell, that particular catchphrase is
20:00technomancythe cartoon as a whole is probably awful
20:00technomancyalso relevant: http://qwantz.livejournal.com/112122.html
20:11wingieshould i use java 6 or 7 for clojure?
20:15technomancywingie: shouldn't make a difference
20:16hiredmanthat is not true
20:16hiredmanthe main revolutionary change people have been harming on in java 7 (invokedynamic) is not used by clojure
20:16hiredmanbut there are other changes as well
20:17amalloyright, like java7 adds a bunch of filesystem stuff that's supposed to be cool but in practice people seem to have trouble using
20:18wingieshould i be concerned about jdk or just jvm when using clojure?
20:18hiredmanhttp://docs.oracle.com/javase/7/docs/technotes/guides/vm/performance-enhancements-7.html
20:18wingieim new to java world
20:18AWizzArdAlso Java 7 Update 2 ships (under Windows) with JavaFX.
20:18technomancyoh that's right; you can chmod and stuff now
20:19technomancywingie: debuggers need a jdk; depends on if you care about that
20:30wingiedoes java 7 refer to jvm 7 or javase 7?
20:31hiredmanthe jvm comes either has part of the java runtime environment (jre) or java developement kit (jdk)
20:32hiredmanjava 7 is the brand name for the 1.7 version of the jre or the jdk
20:33adiabaticMildly offtopic: I'm using Aquamacs (emacs 24) and when I M-x eval-buffer my init.el, I get "Symbol's value as variable is void: package-archives". Should I not bother to add Marmalade plumbing to my init.el?
20:34hiredmanuse a real emacs
20:34hiredmanas #emacs will tell you, aquamacs doesn't count
20:35adiabaticemacs 22 real enough, or just real old?
20:35hiredmantoo old
20:35hiredmanhttp://emacsformacosx.com/
20:35hiredmanyou can get the nightlies of 24 from there too
20:36adiabaticShould I get a nighly of 24? I know C-x C-s and C-x C-c, and that's about it.
20:36technomancyaquamacs is not very well-supported
20:36technomancythe 24 nightlies are rock-solid in my experience
20:37hiredmanyeah, they work fine
20:37jodaroemacs for mac os x at that link works great
20:37jodaroi'm using it as we type
20:38adiabaticcute, the whole front page is an SVG element pretty much
20:43technomancywhat would a good default be for a regex to omit from stack trace printing?
20:44amalloy^$
20:44adiabatic"Symbol's value as variable is void: package-archives"
20:44technomancyamalloy: from swank, so it's at least #"swank"
20:45amalloyyeah, that's fair. i'm sure there's a ton of stuff in stacktraces that really just makes them hard to use, but ik'm a grumpy old man
20:45technomancythe question is whether clojure.lang.Compiler and clojure.lang.Var are likely to ever be useful to anyone not savvy enough to switch off :to-omit
20:46hiredman:/
20:46hiredmanI just hate to optimize for the case of people who don't know what they are doing anyway
20:46hiredmanwhy can't we optimize for experts?
20:46technomancybecause experts know how to read documentation and turn off :to-omit
20:47amalloytechnomancy: anyone who's not in this room right now won't know to look for such an option
20:47amalloyis my objection
20:47hiredmantechnomancy: but why should I have to do that vs. making non-experts read the docs and turn it off?
20:48hiredmanlike, I've invested more time and energy into reading stack traces that non-experts, so why not make my life easier than theirs?
20:48adiabaticNonexperts are likely to be overwhelmed anyway.
20:48technomancyhiredman: you can fit a trimmed trace into a quarter of your screen.
20:48hiredmanthey can go cry to mommy
20:48hiredmantechnomancy: so? if the information I want is trimmed out what good is that?
20:48technomancyit's not
20:49hiredmanhow is a regex supposed to know?
20:50technomancyif you can come up with a scenario where the fact that clojure.lang.Compiler.eval was invoked is helpful to someone who isn't writing their own compiler, maybe there'd be a case
20:51technomancyI am unable to come up with one
20:51technomancyand I value my screen space
20:56wingieis there some commercial support behind clojure?
20:56wingieor is it by contributors only?
20:59technomancythere's http://clojure.com
21:02technomancyhttp://www.blindfiveyearold.com/wp-content/uploads/2011/08/kirk-and-spock-needs-quote.png
21:02lazybotjava.lang.RuntimeException: EOF while reading
21:07TimMctechnomancy: Maybe it could look for ~/.im-a-clojure-badass and not ilter the stacktraces if the file is present.
21:16amalloy~/.lein/stop-babying-me-dammit
21:16clojurebotNo entiendo
21:16jodarobleh gloss
21:16jodaroy u no have sufficient bytes to decode frame
21:20TimMcjodaro: The previous gist is still relevant?
21:20jodarolooking
21:20jodarohttps://gist.github.com/8c3da82eb9183baae5b1
21:20jodaroyeah
21:21TimMcjodaro: What should I put in my project.clj to get the gloss you have?
21:21jodaroi'm actually pullingin aleph
21:21jodarolet me look
21:22jodaroi think 0.2.0 is the version
21:22jodaro [gloss "0.2.0"]
21:22TimMcaleph 0.2.0?
21:22jodaroor yeah
21:22jodaroi have aleph in there
21:24jodarothe fact that something i pulled from the wiki not working makes me think i've done something horribly wrong somewhere
21:24TimMcjodaro: So, :d in that first example is "a string of length >= 0"
21:25jodaroyeah
21:25jodarobasically, the protocol i'm trying to model looks like
21:25TimMcHow do I get a quick hex dump of that bytebuffer?
21:26jodaroyeah, i'm still trying to figure that out as well
21:26jodaroits a java.nio.HeapByteBuffer
21:26TimMcI'll take a look.
21:26jodarowhich apparently lets you call .asCharBuffer
21:26jodarobut then i just get chinese in the repl
21:26TimMchaha
21:27jodaro(and i don't know chinese, nor do i expect it)
21:29jodarooh, right, i was describing the protocol
21:29jodaroits like "\0FOO int32 int32 string"
21:29jodarowhere string might be empty
21:29jodaroor it might be one or more strings delimited by \0
21:29TimMcIs gloss 1.3-compatible?
21:30tmciveryou could use hexdump to view the data on the repl ... if only it accepted HeapByteBuffer
21:30jodarobut i haven't even gotten to handling that last part
21:30jodaroTimMc: there is a clj-1.3 branch
21:30tmciverbut you could just pass in a seq of the byte array returned byt the array() method.
21:33TimMc(mapcat #(.array %) g) => (98 97 114 102 102 111 111 100 0 0 0 4 0 0 0 2)
21:34TimMcgood enough
21:34jodaroahh
21:34TimMcg is a seq of byte buffers
21:35TimMcOh, and gloss' decode is definitely not 1.3 compatible.
21:35TimMcsome var not marked dynamic
21:35jodaroi think 0.2.1-SNAPSHOT is the latest on clojars
21:36TimMcjodaro: It's out of order! You're using a map.
21:36jodarooh hmmm
21:36jodaroyeah that won't work
21:36jodaroi guess if its a sequence it will stay in order
21:36TimMcIt's in :d :m :s :t order
21:39jodarothats a bummber
21:39jodaro-b
21:40jodaroswitched my implementation to use a vector and i think it works
21:40jodarobut
21:40jodarothat still doesn't explain the animal decode one
21:40jodarounless the map isn't always in the same order or something
21:40clj_newbin a zipper, are nodes allowed to have variadic # of children; or are all nodes required to have a constant # of children?
21:45jodaroTimMc: thanks for pointing that out
21:49TimMcjodaro: Yeah, I don't get it either.
21:50TimMcUnless the {} form is supposed to be like a struct... which it isn't.
21:50jodaroyeah [] is working as expected
21:50jodarothough i'm still not sure about something, but it should be clear in a sec when i shove some packets at the server
21:53tmciverjodaro: how about gloss.core/ordered-map?
21:54jodarolooking
21:54tmciverjodaro: this is a shameless plug but you might want to try out my hexdump util on clojars. You could be the first one to try it out! :)
21:55TimMcYeah, stick that in dev-dependencies.
21:55TimMctmciver: You have pushed a release to clojars, right? Right?
21:55tmciverbut you have to create a seq of the HeapByteBuffer a la TimMc's example.
21:55tmciveryup
21:56TimMcexcellent
21:56tmciverI used it on jodaro's gist and it showed that "barf" was the only data in the buffer.
21:57TimMctmciver: ^ about 40 lines back -- all the data was there
21:57tmciver:o
21:58amalloyaugh *seriously*, java doesn't have a builtin for comparing arrays to each other except for equality?
21:58TimMcamalloy: What, like substring and common prefix?
21:58tmciverTimMc: Ahh, g is a collection of HeapByteBuffers.
21:59TimMctmciver: hence the mapcat
21:59amalloyTimMc: at the moment i want strcmp, but on a byte[]
21:59tmciverTimMc: got it.
21:59tmciverTimMc: nice use of mapcat, forgot about it.
21:59amalloyi can call seq on them and sort the Comparable seqs that come out but that's so wasteful
22:01semperostrying to try out clj-stacktrace, followed instructions on README
22:01semperosif I use the code for ~/.lein/init.clj provided, I get a "Var user/settings is unbound" error
22:02semperosif I edit that snippet and run everything outside the (try) form, then I get: java.io.FileNotFoundException: Could not locate leiningen/hooks/clj_stacktrace_test__init.class
22:02semperosanyone have any pointers?
22:02TimMc0xDEADBEEF
22:02semperos:)
22:04clj_newbI've recently written my own macro (def-typed-record [& args]) so that it's used like (def-typed-record [ a? a, b? b, c? c, d? d, e? e]) which does an (assert (and (a? a) (b? b) (c? c) (d? d) (e? e))) followed by a regular defrecord. Is there an idiomatic/existing way to do this in clojure? [or my hand rolled solution the best I can use]
22:05clj_newbthe idea is that constructors run a predicate on their arguments (or assert), so that type errors are caught earlier
22:05TimMcsemperos: You've done the install, yeah? So it should be there...
22:05semperosyep, it's there in ~/.lein/plugins
22:38TimMctechnomancy: I think the uberjit thing actually needs to be a hook, not a plugin.
22:39TimMctechnomancy: nvm, I see that a plugin may *contain* hooks.
23:44clj_newbamalloy: congrats on the 100K solved problems at 4clojure.com! (saw it on front page of news.yc)
23:45amalloythanks! traffic for today is through the roof (comparatively, anyway) as a result of the two mentions on news.yc
23:46clj_newbamalloy: btw where do you currently work / set of skills? it seems like "I built 4clojure.com" is worth more than most 2-3 page resumees; seems like you could trivially get into google / yc
23:47amalloywell, that would be an embellishment. i didn't start the project, and i'm not the only one working on it now
23:47amalloybut i'm working at geni.com with the folks in http://github.com/flatland
23:48clj_newbwith that level of honesty; you're clearly not going to start the next facebook
23:49amalloyi promise to keep your personal details safe (for certain definitions of "promise", "personal", and "safe")
23:49clj_newbhmm; kind of cool how geni also solves the fake profile / dientity problem
23:49clj_newbmuch harder to fake an entire geneology tree
23:52clj_newbif this doesn't violate your NDA -- whdy do you guys use postgresql? do you actually need transactions for anthing?
23:53amalloyprobably, but i dunno. not my problem
23:54clj_newbher'es a crazy idea
23:54clj_newbis ther ea db binding in clojure
23:54clj_newbwhere clojure transactions (via STM) are mapped onto db transactions?