#clojure logs

2010-12-30

00:15Gigarobyguys someone knows a good jetty hosting (possibly free )
00:31AWizzArdBing / Google brought nothing up?
00:33Gigarobyno nothing on google that's why I asked
00:34technomancycheap shared hosts don't usually support Java
00:34technomancytoo much memory
00:38Deranderprgmr.com has a fairly cheap ($20/mth) 1gb vps
00:38Deranderand several cheaper & smaller plans
01:02joshua__I have a question about cond.
01:03joshua__How do I make it look less ugly? Every time I use it I'm horrified by the way the code looks. I know that is sort of off. It like.. smells bad or something.
01:03joshua__example: http://pastebin.com/GZGZAfp8
01:05technomancymeh; I'm not too fond of cond either
01:06technomancywhat you probably want is more than one function
01:07amalloyjoshua__: i agree that the formatting for cond doesn't feel right; i wonder if emacs behaves that way because the CL cond looks like (cond ((< a 1) (inc a)) ((something?) (something)))
01:09joshua__In that case.. How hard would it be to change the indent to give an indent after cond conditionals?
01:10amalloyjoshua__: i tried to change indentation once and i went blind for a month
01:11amalloyseriously though, i didn't try for more than an hour or so. if you figure it out, i've got another change i'd like you to make
01:11joshua__I might look into it haha.
01:12joshua__Seriously it would be a really nice to have an indent for cond conditionals. Or to phrase that another way.. I just edited my code to put in that indent and it doesn't look as ugly or smell as funny.
01:13joshua__What change would you want amalloy?
01:13joshua__Not saying I'm going to try this but I am curious.
01:14amalloyjoshua__: try ((comp - +) a<NEWLINE>b)
01:14amalloyb should line up with a, but it lines up with (comp
01:14joshua__that is ugly...
01:15joshua__I can look into if I decide to risk my eyes.
01:15joshua__If I do it won't be tonight.
01:15amalloysure, no hurry
01:16joshua__I'm going to try and finish up a script to write bot plugins tonight for that C++ bot I made. Planning on trying to sell them ;)
01:18joshua__Ooo.. and so that I don't forget to mention. I bought Paradigms of AI Programming by Peter Norvig with some Christmas Barnes N Noble giftcards today =)
02:18seancorfield_technomancy: AWizzArd: Derander: on the subject of cheap hosting... you could point folks at stax.net / cloudbees... pretty sure their web templates include a jetty option
02:18seancorfield_(sorry i'm two hours late on that - wasn't paying attention earlier)
02:19DeranderI forgive you
02:19seancorfield_lol
02:22hoeckq
02:30BerengalWhat are agents best for?
02:32amalloyBerengal: not many things
02:33LauJensenBerengal: logging
02:33BerengalHow about single-threaded use of a single shared resource?
02:33amalloyBerengal: no
02:34LauJensenBerengal: Not many concurrency challenges in single-threaded mode
02:34amalloyi mean, the right answer is tautological: agents are best for managing an identity that changes values over time, and which you want to manipulate asynchronously from multiple threads
02:34BerengalI meant a resource that can only be used by one thread at a time
02:35LauJensenhehe, ok. It depends on whether you want in sync or async, atoms/agents
02:35Berengalamalloy: That answer doesn't have any information in it though. Those who know will understand it, but those who don't won't understand any better after hearing it ;)
02:35amalloyBerengal: like i said, tautological. agents are best for what agents are best for
02:35LauJensenBerengal: Ive been telling him that for months, but he refuses to read my blog :)
02:36amalloyi've never found a good use for agents personally
02:36amalloyJoC shows a good use of them for, as LauJensen says, logging
02:37BerengalLogging is a bit too simplistic. I refuse to believe that's all they're good for ;)
02:37LauJensenBerengal: They are also the preferred method when you need a side-effect inside of a transaction, but now we're fishing :)
02:37amalloyBerengal: what kind of "shared resource" did you have in mind?
02:39BerengalOkay, here's a scenario I'm thinking about where I thought maybe agents would be useful: There's a program managing workflows. These workflows have many tasks, both concurrent and sequential, essentially forming a graph. The task-performing is done out-of-process...
02:39BerengalBasically, the program receives a workflow, sends out tasks to be performed async, then stores the state
02:40BerengalAt any point any of the tasks sent could be returned. Handling these return messages (updating state, sending out new tasks) needs to be done single-threaded per workflow
02:41BerengalThe problem with the system we have now is that it's both dog-slow and uses locks all over the place
02:41Berengaldog-slow because it has to hit the database on each message, and some workflows have lots of small messages that return "instantly"
02:43amalloyBerengal: so you imagine the agent being, say...a map of (pending-task => status) pairs, or something?
02:45Berengalamalloy: No, I imagine the agent containing the workflow, so on each message you send it off to the agent containing that workflow. Every message would be processed sequentially, but you'd get away from the locking while fetching the workflow
02:45BerengalBasically the receiver thread would just dispatch the handling to the agents
02:46Berengal(The entire core system runs in several processes so I can't use clojure agents directly, but I'm trying to model/prototype a new version, and agents are easy to lift to the process level)
02:47seancorfield_i just went and read the agents page on clojure.org and the example makes no sense to me :(
02:47amalloyBerengal: what data would each agent contain? would it change over time?
02:47Berengalamalloy: yes. workflow-state -> new-workflow-state
02:48seancorfield_so i'm fascinated by this discussion because i don't understand what agents are good for :)
02:48amalloyseancorfield_: neither do we!
02:49BerengalEh, crap, I need to leave for work. I should join the mailinglist or something...
02:49amalloyBerengal: hm. well, sounds good so far, but i'm not exactly an agent expert
02:49amalloyi think it needs fleshing out but doesn't sound crazy
02:50BerengalMaybe plain message passing instead of clojure-agents are a better way of modeling the concurrency...
04:22ejacksonMorn'n
05:04ordnungswidrighi all
05:24auserhola ordnungswidrig
05:37ordnungswidriganybody using hiccup? I'm annoyed by the vector+keyword syntax. Any reason why hiccup does not use s-expressions?
05:41auseris there a way to get a handle on the function that is currently running in? For instance... (fn [] (println (str "Running in the function handle: " (this-func))))
05:43raekauser: you can get a reference to the function object: (fn f [] (println (str "Running in the function handle: " f)))
05:44auseryep! Just found that in the clojure docs. Thanks for the heads up raek :)
05:44raek,((fn f [] (str f)))
05:44auser:)
05:44clojurebot"sandbox$eval1061$f__1062@4f1ada"
05:45raeknp
07:30midswhy is the #' reader macro used for (run-jetty #'adder.core/app ...) and (def app (-> #'handler ...)) in http://mmcgrana.github.com/2010/07/develop-deploy-clojure-web-applications.html ?
07:32nickikbecause you want tu pass the var itself
07:33nickikand not the thing that is in the var
07:33nickikwhy they programm it that way i dont know
07:35midsnickik: it also works when I just use the symbol. which is also what mark uses in some of his other ring documentation
07:35nickikmids: then i cant help you sry.
07:35midsTIMTOWTDI? :)
07:37fbru02hey guys, i was looking at this http://clojuredocs.org/clojure_core/clojure.core/take-while , in the example , i don't get the cond (partial > 1000) why '>' ?
07:37fbru02shouldn't it be lesser?
07:39mids,((partial > 1000) 999)
07:39clojurebottrue
07:39arbschtfbru02: x<1000 is equivalent to 1000>x
07:40fbru02arbscht: mids : thanks (stupid me ! ) :)
08:37sexpbotThanks to the excellent and hard work of amalloy, the weird "clojail.core/tester is unbound" bug with lazy sequences has been fixed. This has been a public service announcement by your friendly neighborhood IRC bot.
08:41pazuhey guys, what would you recommend for someone who's been trying to learn clojure for a couple of weeks?
08:42pazutoy projects, exercises... I'm really liking clojure, but I can't find a way to use it on my day job, making it harder to progress.
08:44midspazu: I enjoyed doing http://codingkata.org/
08:44pazuhm, I like the title.
08:44ejacksonpazu: Project Euler helped me along
08:47midspazu: also given your extensive java experience you could create a clojure wrapper for your favorite java library
08:48midsthat might also be a good way to start sneaking some clojure into your day job
08:48pazuhm, that might work
08:49midsmake it opensource, document your effort in your blog and you might even get some valuable feedback
08:49ejacksonmids: nice idea
08:50pazua Spring MVC bridge to clojure or something like that
08:50pazucertainly a lot of work, but that might be exactly what I need.
08:51cemerickpazu: I've been toying with doing the same for spring-security
08:52cemerickLots of goodness in there, but its usage of XML as the (essentially) exclusive path to configuration is infuriating.
08:55pazugod, yes
08:55pazuI hope one day people will understand that XML is not a programming language.
08:58cemerickI have no problem with the XML app context route in general. I just want to be able to throw together a security context programmatically without having to read spring sources to figure out the correspondence between the reference material (which uses XML exclusively) and the actual components.
10:10ejacksonis this really what it should look like ?
10:10ejackson(-> @requests keys ((partial apply min)) inc)
10:10ejacksonI keep falling over the pattern for partialing on apply
10:11ejackson((...)) seems like a disturbance in the force
10:11ejackson(and looks like a tie fighter, which is never good)
10:12tonylI don't know what you are trying to do, but shouldn't it just be (partial apply min)
10:12ejacksontony... no that won't actually execute...
10:13ejackson,(-> [1 20 12 -2] (partial apply max) inc)
10:13clojurebotjava.lang.ClassCastException: clojure.core$partial$fn__3680 cannot be cast to java.lang.Number
10:13ejackson,(-> [1 20 12 -2] ((partial apply max)) inc)
10:13clojurebot21
10:13tonylyeah i see the error now
10:14ejacksonall I want is a function that looks like (partial apply max)
10:15cemerick,(-> (range 10) (apply max) inc)
10:15clojurebotjava.lang.ClassCastException: clojure.lang.LazySeq cannot be cast to clojure.lang.IFn
10:16cemerick,(->> (range 10) (apply max) inc)
10:16clojurebot10
10:16tonylso @request returns a vector or a map
10:16cemerickejackson: is that what you want? ^^
10:16ejacksontonyl: yup
10:16ejacksoncemerick: I believe so :)
10:16tonylcemerick is right
10:16ejacksoncemerick: i get it, thanks :)
10:17btw0what is "#^" as seen in ,(if-let [#^String type (:content-type req)] ...) ?
10:17ejacksoncemerick: i knew it looked sideways
10:17cemerickejackson: if you want the TIE-fighter...
10:17cemerick,(->> (range 10) ((apply partial max)) inc)
10:17clojurebotjava.lang.IllegalArgumentException: Don't know how to create ISeq from: clojure.core$max
10:17cemerickhrm
10:18tonylbtw0, that is how you assign a meta tag info before 1.2 version
10:18btw0tonyl: ah i see, in 1.2 it's just "^String", right?
11:32jkn2can someone show the the syntax for destructuring a vector in a function parameter? seems like all the examples i find are maps and i can't get it right
11:33@rhickey,((fn [[a b]] [b a]) [1 2])
11:33clojurebot[2 1]
11:33jkn2rhickey: from the man himself :) thanks!
12:22ejacksonwow - extending objects to protocols even works :) Just extended DateTime to WriteJSON. Beautiful :)
12:25kaiserhi, guys
12:25Guest33465i'm trying to replace an element in a vector like that
12:25Guest33465(replace [:a 2] [:a 2 3 4])
12:26Guest33465but it seems not working with keywords
12:26Guest33465sorry
12:26Guest33465i found my mistake
12:26Guest33465i have to pass a map
12:26Guest33465as first argument to replace
12:29dnolenejackson: even better it's not monkey-patching. your extensions are local.
12:29ejacksonI'm smiling :)
12:31cemerickdnolen: we'll have to return to the question of a preference mechanism soon. :-)
12:31cemerickif the class ejackson was looking to extend WriteJSON to implemented j.u.Collection, he'd be far less happy.
12:32ejacksoncemerick: how would that have poked me in the eye ?
12:33cemerickejackson: WriteJSON is extended by default to j.u.Collection to emit a JSON array containing the JSON serializations of the collection's elements. Your local extension wouldn't be picked up.
12:34ejacksongotcha - in both senses.
12:34cemerickOr, actually, since the iteration order is undefined, your local extension would be picked up *sometimes*.
12:35cemerickejackson: there's a lively thread on this topic here: http://groups.google.com/group/clojure-dev/browse_frm/thread/fb3a0b03bf3ef8ca
12:35ejacksonthanks, I'll give it a read.
12:36cemerickI've been thinking about it and working around the problem in various unpleasant ways in the meantime. I've been secretly hoping rhickey would jump in in the interim, before I open my mouth again anyway. :-)
12:36dnolencemerick: yeah, I may change my position on that :) but my concern still stands, it's slippery slope allowing people to build crazy hierarchies.
12:38cemerickdnolen: Yeah, I see your point, which is why I went quiet for a while. In the end though, I want that rope! ;-)
12:40cemerickI remember Rich saying something about the potential for default protocol implementations (part of his answer to "mixins" (variously defined)) that might include some answer to the desire for a preference mechanism.
13:10BerengalHow's clojure's interop with Java EE containers?
13:39cemerickBerengal: what sort of interop are you looking for?
13:40Berengalcemerick: Mainly running ejbs in containers
13:40cemerickThere are definitely people doing EJB dev using clojure.
13:41BerengalDo you know how that's working out?
13:41cemerickBerengal: Seems pretty straightforward: http://www.deepbluelambda.org/programming/clojure/building-ejbs-with-clojure
13:41BerengalThanks :)
14:07leafw_hi all
14:08leafw_are there any guidelines for the proper way to type-hint methods in a reify or defrecord, or any documentation on type hints at all?
14:12cemerickleafw_: http://clojure.org/java_interop#Java%20Interop-Type%20Hints
14:13leafw_cemerick: yes, that's the official one, and very brief. It does not cover deftype, defrecord, reify
14:13cemerickleafw_: what's your question, specifically?
14:13leafw_for example: does one add type hints to the actual method implementation, or to the protocol, or to the interface defintion, or where.
14:14pdki dunno if there's anything in the online docs
14:14cemerickhints are no-ops on protocols at the moment
14:14pdkthough i've read practical clojure which does talk about type hints on their own and within protocols
14:14pdkor records whichever
14:15leafw_in 1.3, hints are no-ops on protocols?
14:17leafw_if so, good to know. Thanks.
14:18cemerickleafw_: yes
14:18cemerickleafw: if you absolutely need a typed interface, there's definterface, which can be hinted as you like.
14:21leafwcemerick: ok, and then if an interface is typed, do I need to type the record methods that implements the interface?
14:22leafwand is the interface then type-agnostic if not typed?
14:26amalloyleafw: without typehints, the interface methods will be Foo.bar(Object, Object), Foo.baz(Object), ...
14:27cemerickleafw: if the interface being implemented is typed, then types, records, and reified instances will have their implementing methods typed as well.
14:27leafwamalloy: thanks.
14:28leafwcemerick: ok, so typing needs to be done only once then.
14:28cemerickRight.
14:28cemerickleafw: this is for interop purposes, I presume?
14:28leafwcemerick: yes
14:29cemerickJust making sure ;-)
14:29leafwcemerick: I assume that for protocols, types are passed along on their own
14:29cemerick"passed along"?
14:29leafwhum
14:29leafwtoo much assuming
14:29leafwcan a protocol be typed?
14:29leafwyou said it's a no-op
14:30cemerickright, that means the corresponding generated interface is untyped (Objects all around)
14:30leafwI hope someday they will be typed
14:30cemerickProtocol implementations do get their first arg hinted automatically, FWIW.
14:30leafwotherwise one must write plenty of (let ..) to add type hints
14:31leafwtheir first arg being the "this" or "self".
14:31leafwwell at leas tthat.
14:31cemerickI'm guessing they will be typed eventually (outside of the first arg)
14:31cemerickleafw: just add type hints in the argument vector. No need for a separate let form.
14:31leafw1.3 is still alpha4, perhaps for 1.3 beta.
14:32leafwin the argument vector of the implementing method. Will then the interface match?
14:32cemerickNo -- why would a type hint in an implementing method change a previously-generated interface?
14:33amalloycemerick: i think leafw means, won't type-hinting the implementing method cause a mismatch with the un-hinted interface
14:33amalloyanswer: no, it won't
14:33cemerickah!
14:33cemerickleafw: what amalloy said ^^ :-)
14:34cemericksorry, I had a brutal conversation earlier today that now has me thinking that no one knows what they're talking about :-(
14:34amalloycemerick: a fair assumption most of the time, anyway
14:34leafwo problem :)
14:35leafwamalloy: thanks, so no mismatch.
14:35cemerickamalloy: I try mightily to not be so cynical.
14:35amalloycemerick: a sisyphian task sometimes, but worth the effort :)
14:36cemerickEspecially in this job! ;-)
14:36cemericksisyphusian, more like :-)
14:37amalloycemerick: http://mw2.m-w.com/dictionary/sisyphian
14:37leafwalso .. definterface typing requires fully qualified class names. It tries to do "java.lang.Collection", for example, when given "^Collection". Looks like an error.
14:38amalloyleafw: even if you import java.util.Collection first?
14:38leafwyes
14:39cemerickamalloy: wow -- I never knew his name lost a phoneme in that form
14:41leafwhttp://clojure.pastebin.com/CXU466B8
14:41leafwthat is surprising
14:41leafwoops
14:41leafwwait, I saw *my* error
14:43leafwok great, it does find the improper object passed.
14:44kumarshantanuhi all
14:44kumarshantanuwhen in a macro how do you pass fn body to another macro?
14:47amalloykumarshantanu: that's a vague question. could you maybe make a gist/pastie of what you wish would work?
14:51kumarshantanuamalloy: here -- http://pastebin.com/wMGGD7Zy
15:01cemerickkumarshantanu: splice in bar, too, since you're gathering body as a rest arg
15:03kumarshantanucemerick: splicing inside bar works...i am trying to do this inside a bigger macro where it's gining me -- java.lang.IllegalStateException: Var clojure.core/unquote is unbound.
15:03kumarshantanus/gining/giving/
15:03sexpbot<kumarshantanu> cemerick: splicing inside bar works...i am trying to do this inside a bigger macro where it's giving me -- java.lang.IllegalStateException: Var clojure.core/unquote is unbound.
15:04kumarshantanuI will try and post another example
15:04cemerickkumarshantanu: then the splice isn't in a quasiquoted form
15:05kumarshantanucemerick: I don't understand that, can you give an example?
15:06cemerick&(let [a 5] [~a])
15:06sexpbotjava.lang.IllegalStateException: Var clojure.core/unquote is unbound.
15:06cemerickvs…
15:06cemerick&(let [a 5] `[~a])
15:06sexpbot⟹ [5]
15:09kumarshantanucemerick: I see...will fiddle a bit more -- let me post the entire code
15:11kumarshantanucemerick: it's here http://pastebin.com/scrHkADr
15:11cemerickkumarshantanu: there's no quasiquote in with-connection
15:13kumarshantanucemerick: oops...sorry, not sure how I overlooked that!
15:13cemerick:-)
15:25cemerickamalloy: funny, that's usually my job ;-)
15:26amalloycemerick: btw, quasiquote? i thought we called it syntax-quote
15:27cemerickamalloy: old habits die hard, I guess
15:30cemerickamalloy: I wonder where the syntax-quote term came from, actually. I only see it mentioned in conjunction with clojure in a cursory googling.
15:32amalloycemerick: i don't know about where it came from, and i wasn't familiar with quasiquote before, but it made sense to me because it namespace-qualifies things
15:33amalloyie, it's not just a quote, it's a quote that tidies up your syntax somehow
15:36cemerickamalloy: "quasiquote" is a scheme-ism AFAIK; "backquote" is the CL term
15:36amalloyyeah, backquote is what i'd heard of
15:37cemerick"syntax-quote" is perhaps more sensible to those not familiar with the concept at all…?
15:37cemericki.e. at least tenuously indicates the semantics
15:37amalloy*shrug*
15:40@rhickeyyes, I thought syntax-quote was more descriptive, and needed to be different from backquote since it behaves differently
15:40cemerickrhickey: thanks :-)
15:43cemerickrhickey: it must be a little surreal (/thrilling/annoying) to have hordes of people pouring over one's work so thoroughly and constantly
15:43@rhickeycemerick: yes
15:44amalloycemerick: augh, if you like words, plz poring, not pouring
15:44cemerickheh
15:44cemerickamalloy: noted, thank you :-)
15:50mduerksen_since i see all the overminds gathered here :) , i'd like to ask a question which is keeping me thinking for a while: what tool should i use to build abstractions: macros or protocols?
15:51cemerickmduerksen_: those are entirely orthogonal tools
15:51cemerickIn general, avoid macros.
15:51cemerickOr, if you can do something with functions, there's no need to touch macros.
15:53LauJensenmduerksen_: Again, I refer you to Christophes slides from the Conj Conf
15:53mduerksen_to explain: i'm new to lisp, and while i do have made some macros and love them, i'm not sure how to use them appropiately when it comes to abstractions. are the meant to be used for that? pgraham and other lisp advocates seem to have used them, but seeing the slides of "macros not= dsl" made me think
15:54ordnungswidrigmduerksen_: i see macros as a whay to abstract control flow. if-then-else or try-finally can be abstracted away by macros.
15:54ordnungswidrigs/whay/way/
15:54sexpbot<ordnungswidrig> mduerksen_: i see macros as a way to abstract control flow. if-then-else or try-finally can be abstracted away by macros.
15:55qbgmacros = syntax sugar
15:56cemerickmduerksen_: macros are roughly useful when you want to (a) control execution (b) front-load computation to compile-time, and (c) define syntax.
15:56cemericks/and/or
15:56sexpbot<cemerick> mduerksen_: macros are roughly useful when you want to (a) control execution (b) front-load computation to compile-time, or (c) define syntax.
15:58mduerksensorry, my connection broke :( did anyone respond to my question?
15:59cemerickheh
15:59cemerickmduerksen: http://clojure-log.n01se.net/#15:50
16:00amalloymduerksen: http://www.raynes.me/logs/irc.freenode.net/clojure/today.txt
16:00amalloyis updated in real-time; n01se lags behind a little bit
16:01cemerickamalloy: that *might* be called efficient write-behind ;-)
16:02cemerickRaynes: your logger doesn't like UTF...
16:02amalloycemerick: i didn't say there isn't a good reason for it; but when i opened your link it was missing at least one of the answers to his question. it's not so hot for up-to-the-second logs
16:02cemerickamalloy: I know, I was just being cheeky ;-)
16:02amalloycemerick: wow, you're right about utf
16:03cemerickI should say, non-ASCII
16:04cemericktesting: é 旗 فص
16:04cemerickhrm, even the low ISO-level stuff
16:05mduerksenthanks everyone :) my connection tends to break exactly when i depend on it...
16:05amalloycemerick: i suspect the issue is that it just doesn't put the UTF marker at the beginning of the file
16:05cemerickamalloy: the page is being served up with ISO-8859 of all things
16:05cemerickright
16:05cemerickwell, it's actually straight text, not HTML
16:06amalloysure
16:19LauJensenGuys, over the past couple of days Ive written some code which has become a surprisingly awesome CMS system. I plan to release a pre-beta soon - Any ideas for a name?
16:20ossarehLauJensen: "precious" >
16:20ossareh?
16:20LauJensenNot manly enough :)
16:20ossarehCMS's are male? huh...
16:20cemerickmanly? o_O
16:21amalloyLauJensen: gollum? he keeps preciouses
16:21ossarehGenghis
16:23mduerksenLauJensen: what's it's main focus? storage or collaboration?
16:24ossarehlol.. the internet has everything: http://www.cracked.com/article_14982_the-9-manliest-names-in-world.html - "Dick Pound" is the manliest real name on the list.
16:24LauJensenmduerksen: You supply design templates, which contain a "<div id="content"/>" and then you get a markdown editor which generates live previews. Once you're happy hit "generate site" and it spits out a static site generated from your markdown and your templates. I hope to launch clojureql.org soon using this tool
16:24LauJensen(for which purpose I wrote it)
16:25LauJensenossareh: I quite like "Staff Sgt. Max Fightmaster" :)
16:26lancepantz*cough* notice who's name is on that list *cough* *cough*
16:27lancepantz"It's impossible to hear this name without picturing many men getting impaled on a battlefield"
16:27LauJensenlancepantz: But we knew you were a real mans man, even before the list though :)
16:27lancepantz:P
16:28technomancyvlad the impaler.
16:28Raynescemerick, amalloy: I'm aware. I don't particularly care. People whine about sexpbot's arrow like it's my fault that they use bad fonts all the time.
16:28lancepantzheh, best name for a deployment tool ever
16:28amalloyRaynes: no, that's not the issue
16:29amalloyraynes.me is serving the UTF-8 file with the wrong text-encoding
16:29lancepantzLauJensen: you should call it 'duke' that's a manly name
16:29LauJensenlancepantz: true, its hard to beat duke.. How about 'Serious CMS' ? :)
16:29lancepantzi like that too
16:30Raynesamalloy: Once again, I'm aware.
16:30ossareh'Serious CMS' is a bit too ... serious ?
16:30Raynesamalloy: I was just pointing out that people don't like my pretty arrow anyway.
16:30LauJensenossareh: But you know what they say 'Double your gun, double your fun'. That would be the slogan
16:30ossarehLauJensen: *chuckle*
16:30mduerksenLauJensen: brew-it-yourself, cooke, tausendsassa (german for allrounder, one can do everything)
16:30RaynesI thought it was handsome.
16:31ossarehunfortunately it seems technomancy has the monopoly on cool names for things - I can't get over "radagast" - awesome.
16:31lancepantzheh, you should replace the arrow with ⟹ in the channel as well
16:31lancepantzjust really grind on people
16:32LauJensenossareh: Well, Phil is plagarizing anything he finds in litterature :)
16:32ossarehI think I'm going to call my next set of projects prime numbers.
16:32ossareh"seventy three", etc.
16:32ossarehLauJensen: which is fair game, as long as you're not reading "Barbie: the life story" and naming your software "Ken" :)
16:33LauJensenhehe, true
16:33lancepantzossareh: think that's how microsoft product managers name their phones?
16:34technomancyoh, I have a free name that I almost used a while back that's up for grabs
16:34technomancyLupus Yonderboy
16:34technomancyfrom Neuromancer
16:34technomancyhead of the Panther Moderns
16:34cemerickRaynes: What does the arrow have to do with the encoding sent for the log file?
16:34technomancydunno if it's good for a CMS, but there it is
16:34Raynescemerick: Zoom. That's the sound of everything I've said going over your head. ;)
16:34ossarehso many good names in those gibson novels
16:35lancepantzi like 'Panther Moderns' better
16:35technomancylancepantz: yeah, that's pretty good
16:35LauJensenI shall call it simply 'Glen Beck'
16:35technomancythey are a quasi-terrorist organization though, so you may not want those associations
16:35ossareh"Etiquette" is a cool name.
16:35LauJensentechnomancy: Well, I dont live in the US so I guess I shouldnt be afraid of being incarserated in definitely without trial
16:35cemerickRaynes: this was a bikeshedding issue?
16:35lancepantzhehe, clj-panther-moderns, coming soon
16:36technomancyLauJensen: heh, lucky you =)
16:36LauJensenYea we have a few desirable things in Europe after all, you know like civil liberties and stuff :)
16:37mduerksenLauJensen: eckstein (german for cornerstone), boxit, you-name-it, sushi, yello, sandwish, imp...
16:37ossarehmduerksen: I definitely liked "tausendsassa"
16:38mduerksenossareh: thank you, i hoped one would hit ;)
16:39ossarehLauJensen: how about a recursive acronym? or is that too late 90's ?
16:39LauJensenossareh: Naah that never gets old :)
16:43ossarehwow... those are hard to think up though huh... best I've done: FMS - FMS Markup Scripter
16:43qbgApply the Y combinator to a recursive acronym
16:47mduerksenLauJensen: Gepetto (pinocchio's woodcarver)
16:48mduerksenwait, he's written Geppetto
16:49LauJensenOk, considering :)
16:51ossareh"primordial soup"
16:52ossarehwhence content originates
16:57mduerksenLauJensen, cemerick: sorry i still can't let go of the macro topic :) if i understand it correctly, the reason why macros should be used with care is roughly this: once they are written, they're not flexible to change, and don't work together nicely with other language features (since it's an own mini-language)
16:58mduerksendo i have the right picture?
16:59lancepantzmduerksen: as i understand it, the downside to macros is that they are not composable
16:59cemerickmduerksen: roughly, yes. The inflexible point is a little murky in your telling, but it's definitely true that depending upon macros means you can't use them like you use functions.
16:59LauJensenRight. Macros are solely for when you MUST control evaluation of items in the argumentlist. It should be a rare requirement
17:01cemerickcemerick: from an author's perspective, they're almost always *way* more rope than you need at any time.
17:01LauJensenwow, cemerick talking to himself in public... unexpected
17:01cemerickhrm, so I am
17:02cemerickthe psychiatric disorders have made their appearance! :-P
17:03LauJensenThe XML was the first symptom!
17:04lancepantzlol
17:04lancepantzwe knew something was wrong when he wouldn't shut up about maven
17:04mduerksencemerick: with unflexible i mean: clojure is well designed, and unless you design your mini-language just as well, you will run into problems when using it outside it's own definition. and even if you would try to do so (i.e. design the mini-language well), the entire purpose of a mini-language is to be limited to a small subset of problems, so it will never be so flexible as clojure itself
17:05cemerickfunny, I thought I'd shut up about maven months ago…
17:05lancepantz:P
17:05mduerkseni hope that wasn't to philosophical, it's a new topic to me, so it indeed is a little blurry :)
17:07LauJensenI have to duck out, thanks everybody for giving me some name inspiration, I appreciated all the manly suggestions :)
17:07midsLeatherCMS
17:07lancepantzhahah
17:08dnolenmduerksen: macros don't just support mini-languages. Racket has many fairly fleshed out variants (typed, lazy, Prolog) built entirely upon macros.
17:10cemerickmduerksen: what dnolen said.
17:10cemerickYou can do amazing things with macros, as long as you have really thought through your usage.
17:11cemerickPart of that is making sure that macros are getting you enough bang for your buck to make it worth losing functional composition, etc.
17:13mduerksencemerick: yes, and that is hard to find out if you start from scratch. dnolen: i haven't heard of racket yet, is there some code if can dive into?
17:13qbghttp://racket-lang.org/
17:14qbgIt was PLT-Scheme
17:14qbgIt has a lot of amazing stuff in it.
17:16mduerksenqbg, cemerick, dnolen: thanks. seeing some code which has maxed out the possibilities of macros will be very helpful to grasp the scope of that topic. i don't wan't to miss out something ;)
17:17qbgIf you want to be scared, take a look at the source of for in Clojure
17:17cemerickmduerksen: I think someone was working on a reimplementation of CL's LOOP in Clojure. That's sure to be pretty epic.
17:18qbgITERATE would be nicer
17:18dnolenmduerksen: Clojure itself is the result of many macros.
17:20KirinDavecemerick: If you've got clojure-type aware combinator parsers, it's not so hard.
17:20KirinDavecemerick: Unlike most ad-hoc macros which break horribly, Loop actually has error semantics.
17:20KirinDavecemerick: So some sort of more-formal-than-most parsing is mandated.
17:20mduerksendnolen: yes, i've already seen some of them, but they don't seem to be a prototype for abstraction rather than flow-control (the preferred usage of macros which i get know)
17:21qbgThe syntax-parse stuff in my syntax-rules implementation should make parsing loop easy also
17:21cemerickKirinDave: yeah, there's various parsec impls floating around
17:21KirinDaveI wish everyone would do it that way, tbh
17:22KirinDaveThe way that clojure makes macro errors somewhat opaque means that some formalism wouldn't hurt there.
17:23dnolenmduerksen: ? macros are a form of abstraction.
17:23KirinDaveLike, I remember working with Enlive and not lein wasn't including the resource dir as a valid source to the jvm.
17:23amalloy,(binding [doc dec] #'doc)
17:23clojurebot#'clojure.core/doc
17:23KirinDaveSo it wasn't finding the template file
17:23amalloywhy doesn't that print dec?
17:23KirinDaveAnd how clojure reported this was by just barfing and not passing up the file-not-found exception. :(
17:24amalloy,(binding [doc dec] (#'doc 1)) ; but this prints 0?
17:24clojurebot0
17:24qbgMy almost complete defn implementation gives better error messages that Clojure's does in some cases: https://gist.github.com/757885
17:28mduerksendnolen: ok the word abstraction is too unspecific, i meant it more in the sense of data and capability characteristics (or something like that)
17:32midswhy is the #' reader macro used for (run-jetty #'adder.core/app ...) and (def app (-> #'handler ...)) in http://mmcgrana.github.com/2010/07/develop-deploy-clojure-web-applications.html ?
17:32midsit also works when I just use the symbol, this is also what mark uses in some of his other ring documentation. can you explain me the difference?
17:33amalloymids: if someone rebinds app later, #'app will pick up the new meaning, while app will still refer to the old value
17:34midsso #' is typically used during development?
17:34mids(in this context)
17:35qbg,(binding [doc dec] (println #'doc (= @#'doc dec)))
17:35clojurebot#'clojure.core/doc true
17:36amalloyqbg: ah, i think i see
17:36qbgbinding changes the value, not the name!
17:36amalloy,(binding [doc dec] (println @#'doc doc))
17:36clojurebotjava.lang.Exception: Can't take value of a macro: #'clojure.core/doc
17:37amalloy,(binding [doc dec] (println @#'doc))
17:37clojurebot#<core$dec clojure.core$dec@1962534>
17:41midsI dont quite understand the clojurebot samples in relation to this
17:42Raynesmids: His testing is entirely unrelated to your questions.
17:42RaynesI think it was just bad timing.
17:42midsah :)
18:07qbgHopefully just one remaining issue to solve with my syntax-rules library
18:07qbgThe extra features generate *so* many edge cases
18:08qbgBut they are so useful
18:09qbgI also need to HDD a better templating system some day, but not for the first release
18:15qbgI wonder if the Racket people are working on something like that...
18:15lancepantzis there a way to break out of an infinite loop in a slime repl without killing swank-clojure?
18:15qbg(or already have something)
18:15qbgC-c C-c
18:16qbgShould also be in the menu
18:17lancepantzthanks qbg
19:08ossarehqbg: what is your syntax rules lib?
19:20amalloyossareh: he's implementing scheme's syntax-rules macro system in clojure. i don't know a lot about scheme, but i gather the idea is to make the simple "template with some blanks to fill in" macro case easier/clearer
19:52cemerickLauJensen: That's a very unfortunate blog post of yours. :-(
20:05qbgossareh: It makes tearing apart expressions with complex grammars easy and allows you to fill in templates
20:05qbgUseful for many macros that are just a layer of sugar above functions
20:06qbgand more complicated things
20:43scottjdnolen: what's the "design for async code" project you mentioned on HN?
20:44dnolenscottj: http://dev.clojure.org/display/design/Channels, and stuartsierra's work on cljque
20:44clojurebot#<RuntimeException java.lang.RuntimeException: java.lang.Exception: 503>
21:58amalloyclojurebot: did hiredman break you, or are you just enjoying exceptions?
21:58clojurebothttp://paste.lisp.org/display/74305
21:59amalloythanks. that's really helpful