#clojure logs

2012-12-13

00:09TimMcJIRAfied: http://dev.clojure.org/jira/browse/CLASSPATH-4
00:10sshackThere aren't any tips for speeding up leon startup time, are there?
00:10sshackI guess I'm really asking is, shortcuts for jvm startup
00:12ghengis_sshack: if you're feeling adventurous you can try this http://eigenhombre.com/Clojure/2012/11/16/lightning-fast-startup-times-for-clojure-programs/
00:13ghengis_but it looks more complicated than a jvm option
00:13sshackI'm guessing it's a hot standby jvm?
00:13ghengis_same idea, but not hot
00:14ambrosebsbbloom: so what should be tackled next for the analyser after these two patches?
00:14ghengis_i think it saves all the bootup processing for the next run after you exit
00:21technomancyTimMc: `lein help` will list all known tasks
00:21technomancydifferent from all plugins but usually more relevant
00:21technomancyTimMc: you can use `lein pprint :plugins` if you install the pprint plugin (whoa, meta)
00:21sshackOkay, why is my code giving me invalid probabilities when I use a Bernoulli distribution?
00:23bbloomambrosebs: not quite sure yet
00:23bbloomambrosebs: i think we need a top-level :script or :file or :fragment or :code or whatever it is
00:25ambrosebsbbloom: mmm. I seem to remember Rich being opposed to that idea, at least at the code level. Not sure about AST level though.
00:25bbloomambrosebs: link?
00:25bbloomi haven't thought about the top level enough yet, it's a tough area
00:26bbloombut i think the most important thing is to separate parse from analyze
00:26bbloomie pre and post macro expansion
00:26ambrosebsbbloom: right, that sounds important.
00:26bbloomb/c codeq needs pre-macro-expansion
00:27ambrosebsbbloom: I don't have a link, but the idea was he wanted compilation to be more stream-like, not have a fundamental unit of a file or namespace.
00:27ambrosebsI may be wrong, I only vaguely remember.
00:27ambrosebsBut it's something to consider.
00:27bbloomyeah, i've thought about that
00:27bbloomi agree to some extent
00:28bbloombut there really is some level of descrete top level things
00:28bbloomi'd rather have a stream of those top level things
00:28bbloomie a stream of files, or a stream of eval forms
00:28ambrosebsDon't we already have a sort of stream of forms?
00:28bbloomstream of forms evaluated by a repl, i mean
00:29bbloomthe issue is that htere really is some kind of delimiter by file
00:29bbloomb/c consider (ns foo) (a) (b) (ns bar)
00:29bbloom(c)
00:29bbloomreally, that's fine
00:29FrozenlockWhenever I want to use clojurescript to act on something present on a single page, I find myself using a 'unique' ID and applying it (to this ID) on every page. Is there a more elegant way?
00:29bbloombut if you have a file that omits the ns form, what do you do?
00:29bbloomcljs can't handle that now
00:29bbloomshould it be 'user ?
00:29bbloomshould it be an error?
00:30ambrosebsbbloom: hmm. so we'd need two concepts: for files and for REPL interaction.
00:30bbloomambrosebs: i think so...
00:31bbloomi'm thinking you'd have :eval and :file
00:31bbloomor :load-file or something
00:31bbloomor it might be the same thing, but with or without a :file "a/b/c" key
00:31bbloombut i think separating parse&analyze from expand&analyze is more pressing
00:32bbloomi only mention the top level form b/c i want to minimize AST changes later down the road
00:33ambrosebsYes. Although CLJS is young enough not to worry about that too much.
00:33ambrosebs(breaking changes)
00:33bbloomi'm also thinking about (do 1 2 3) vs (do* 1 (do* 2 3) and (let [x 1 y 2] z) vs (let* [x 1] (let* [y 2] z))
00:33ambrosebsright?
00:33clojurebotto be fair I dunno that I've ever had code out right rejected, it just sits in jira or assembla or where ever, or if I ask if there is any interest (before writing any code) I get told to go write alioth benchmarks
00:34bbloomambrosebs: i agree that breaking changes aren't a big deal, but dnolen has mentioned concern about it a few times, so i'd front load that stuff
00:34tpopewhy does every irc bot ever have robo-tourettes :/
00:35bbloomtpope: clojurebot seems to hate question marks. you know what i mean??
00:35lazybotbbloom: Definitely not.
00:35bbloom(that worked perfectly according to plan)
00:36tpope"I'm writing an irc bot. The first thing I need is a ridiculously broad regex to respond to"
00:36ambrosebsbbloom: what do you mean, flattening them?
00:38bbloomambrosebs: much in the same way that implicit blocks were annoying to deal with, any sort of N > 2 sequencing has been annoying to deal with
00:38bbloomstill requires more thought before i submit patches
00:38bbloomand will surely be more controversial
00:38ambrosebsin CPS?
00:39bbloomyeah, so any time you have a list, you need to worry about split with and all that jazz
00:40ambrosebsI don't follow.
00:40bbloomclojure makes working with lists/vectors very nice, but its sort of the reducers thing
00:40bbloomi want to specify transforms in terms of an assocative binary operator
00:40bbloom(reduce + 0 coll)
00:41bbloomif i want a transform of coll, i want to declare 0 and define +
00:41bbloomwhen doing an AST transform, i want to just define +, not (+ x y & more)
00:42bbloomambrosebs: look at https://github.com/brandonbloom/cljs-cps/blob/master/src/cps.clj#L263-l307
00:42ambrosebsI don't think I know enough about AST transforms to really understand the problems.
00:43bbloomthere are three ;; comments
00:43bbloomlook at those
00:43bbloombasically, i need to isolate interesting let bindings
00:43bbloomit's that isolate step that feels just like analyze-block
00:43bbloomrepeating myself for no damn good reason
00:48ambrosebsbbloom: looks pretty badass :)
00:49tomojsorry, why do you need to isolate?
00:51bbloomtomoj: so let's say you have (let [x 1 y (call-cc f) z 2] (+ x y z))
00:51bbloomtomoj: i want to isolate the binding for y
00:51ambrosebsso whats a "serious" and "trivial" form?
00:52bbloomambrosebs: search for "defn trivial?" or "defn serious?"
00:52bbloomin short, this is a "selective" transform
00:53bbloomit tries to avoid transforming expressions which are obviously "trivial" ie definitely don't call-cc or anything like that
00:53tomojok, what's wrong with the analysis output? looking at it, but.. hard to navigate
00:53bbloomtomoj: nothing is "wrong" with it
00:53bbloom(any more, i fixed the real bugs :-P)
00:53ambrosebsbbloom: got it
00:54tomojI mean what about it makes (made?) isolating y difficult?
00:54bbloomlook at how small/clean all the other functions are in that file :-)
00:54bbloomminus try/catch/finally GRR
00:54bbloomheh
00:55tomojI mean specifically, the :bindings in the analysis output are difficult to work with? or..?
00:55bbloomtomoj: yeah, basically: you have a vector of N forms when in reality you care about pairs of forms
00:56bbloomyou care about binding 0 vs binding 1
00:56bbloomnot binding 0 .. N
00:56bbloomand then further complexity if you're looking at binding N vs the expression
00:56bbloomthere are three things: name, initialization expression, and then a body expression
00:56bbloombut the AST presents them as a vector of name/init pairs and then a vector of body expressions
00:57bbloomi submitted a patch to make the body a single thing (ie an implicit do)
00:57bbloombut i'm thinking about how to further simplify
00:57bbloomi think a form (let1 name init expr) makes sense
00:57tomojwith only one binding
00:57bbloomyeah
00:57tomojoh, obviously
00:57bbloomsome kind of (do2 statement expr) is a little less clear, since how do you expand (do a b c)
00:57tomojlet1 sounds familiar
00:58bbloomis that (do2 a (do 2 b c)) or is it (do2 (do 2 a b) c))
00:58bbloomcould go either way, and you could reasonably make the case for both or neither
00:58bbloomi'm only saying all this since ambrosebs asked. still needs more thinking
00:59tomojnope, no let1 in core.clj, I was thinking of reduce1
00:59bbloomdamn auto correct: "do 2" should be "do2"
00:59ambrosebsbbloom: so a special form/AST node :let1?
00:59TEttingeranyone using congomongo? I am trying to implement a possibly ill-advised lazybot plugin that needs to store a seq as part of an... entry, i guess, in the db, and be able to find that entry again by any element of the seq
01:00bbloomambrosebs: i think so
01:00TEttingerlike :where :part-of-the-seq
01:00TEttingerin a (fetch)
01:00ambrosebsbbloom: would that change macroexpansion?
01:01ambrosebsSeems like a rather drastic change.
01:01tomojhmm
01:01bbloomambrosebs: no, there is already a let* special form b/c let provides destructuring and expands to let*. pre-expansion would be interested in let, not let*
01:01bbloomambrosebs: yeah, it's a drastic change
01:01bbloomambrosebs: hence i haven't proposed it without more deep thought
01:02ambrosebsbbloom: sure
01:02bbloomambrosebs: also need to consider other bindings cases, like letfn
01:03bbloomletfn establishes parallel bindings, not sequential ones
01:03ambrosebsbbloom: but just from a practical debugging standpoint, wouldn't it change the output of macroexpand?
01:03bbloomambrosebs: ah, yes good question
01:04tomojah, I begin to understand cps :let
01:04bbloomtomoj: cps :let is still a bit broken, i'm working on it
01:04tomojdid you consider clojure.walk?
01:04bbloomambrosebs: so do more people do macroexpand-all now? i always do macroexpand-1
01:04bbloomor N
01:05bbloomambrosebs: it would suck if a change like atomic individual binding lets would ruin macro expands
01:05bbloomi wonder if it would make sense to provide conditional macro expansion
01:05bbloomusually i dont want to expand core macros when i'm debugging my macros
01:06bbloomambrosebs: Dr Racket has something like that: http://docs.racket-lang.org/macro-debugger/index.html
01:06bbloomsee expand-only
01:06tomojI suspect expansion passing style would help, but I don't really understand it yet
01:06clojurebotMan, the living creature, the creating individual, is always more important than any established style or system. -- Bruce Lee
01:06ambrosebsbbloom: Oh man, I'd love one of those.
01:07TEttingerso if anyone says style it quotes Bruce Lee?
01:07bbloomambrosebs: yeah, so if we can better separate parse from expand, then we could probably also do conditional expand
01:07bbloomwhich would make it moot if let expands to let* or let1 or whatever
01:07tpopebbloom: https://github.com/guns/vim-clojure-static
01:07tpopethis guns guy beat me to it
01:08bbloomtpope: i was about to ask who guns was
01:08bbloommy irc client seems to be highlighting his name :-) maybe if we say guns 1 more time, he'll show up
01:08gunsboo
01:08bbloom"Meikel Brandmeyer's excellent Clojure runtime files, extracted and decomplected for static editing and for use with alternate Clojure development plugins."
01:08bbloomheh, *decomplected*
01:08bbloom:-)
01:09bbloomhi guns, meet tpope :-)
01:09ambrosebsguns: that is awesome, well done.
01:09tpopewe've been chatting in #vim for hours
01:09bbloomhaha ok
01:10gunsambrosebs: tpope's entry into Clojure land inspired me
01:10tpopeaw
01:10ambrosebsguns, tpope: and an epic entry by both of you. Thanks.
01:10bbloomguns, you can join the list of vim-ers who i owe a beer :-)
01:11gunsNo, no, no. Meikel deserves all the praise. thank me when I write a new paredit
01:11bbloomFine: Meikel get's TWO beers
01:11bbloom:-)
01:11bbloomanyway, i'll bbl
01:12bbloomwait, i'm back…. i just need to say:
01:12bblooms/get's/gets/
01:12bbloomwhew, ok better
01:12bbloomi'm gone.
01:14ambrosebstpope: can foreplay access e* and other REPL state yet? I found it unusable without that.
01:14tpopeambrosebs: it can with the very latest nrepl
01:15tpopenot sure if rc2 has dropped yet
01:15ambrosebstpope: sweet
01:22muhooi vageuly remember there being a way to access lein profile maps from inside a project, but can't seem to find docs on that
01:48ibdknoxis there a way to get an unrealized copy of a lazy seq?
01:48nightfly_Why do you need a copy of it?
01:49ibdknoxI need to capture the value of a lazy-seq at a point in time without realizing the original
01:53nightfly_Is this sequence generated by some external data source or something?
01:54ibdknoxI'm capturing intermediate values of execution for Light Table :)
02:16yedihi, so clojure has this thing, where when a data structure is transformed to create a new structure, the implementation in memory is optimized
02:16ibdknoxstructural sharing
02:16yediso that the new data struct basically points to the old one, and adds the new transformed infomation right?
02:16yedior something like that
02:16yedihow does this work with maps
02:17yediif you had functions that added a key-value pair one at a time
02:17yediat called that multiple times
02:17yediso that each new map, would point to the previous map and so on
02:17yediwouldn't that no longer be a hashtabll (map)
02:17yedibut a linked list of key-value pairs
02:17yedior am i misunderstanding how this works
02:20ibdknoxyedi: you can see how it's implemented here: https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/PersistentHashMap.java#L135
02:22Raynesibdknox: YOUR LIGHT TABLE SUCKS
02:23ibdknoxoh no's
02:23Raynesibdknox: I can't get tomorrow-night to work. :(
02:23ibdknox?
02:23ibdknoxwhat does it do?
02:23RaynesNothing.
02:23RaynesI get a white on black theme.
02:23RaynesAs in no theme.
02:23ibdknoxwhat version?
02:23Raynes0.2.1
02:24RaynesDid you test it when you added it?
02:24RaynesBecause I wouldn't put it past me to break it outside of refheap somehow.
02:24Raynes:P
02:24ibdknoxmany times :) But it was added in 0.2.4
02:24RaynesIn that case, my problem is that light table isn't updating.
02:24Raynes:p
02:24ibdknoxyes
02:24ro_stibdknox: props :-)
02:25ibdknoxthere was a brokenness in pre 0.2.2 with the update mechanism
02:25ibdknoxall should be fixed with that now
02:25RaynesSo I should redownload?
02:25ibdknoxyessir
02:25RaynesOkay,
02:25RaynesWhile you're here...
02:25ibdknoxro_st: thanks :)
02:25ro_stibdknox: what's the official word on Paredit support for LT?
02:25Raynesibdknox: Looks like Konrad wants to take over noir-cljs too. Can we get it moved to noir-clojure so I can give him access.
02:26Raynesro_st: There is that subpar thing. ibdknox tried it, but it's slow as snail on valium.
02:26ro_stah, is emacs' paredit written in super C?
02:26ibdknoxro_st: I would love it, or at least having autocompleting of closing brackets
02:26Raynesro_st: No, just subpar is written in a slow way.
02:26ibdknoxyeah
02:27RaynesYou can't read the whole file every time something is added to it.
02:27ibdknoxit probably could be faster, I think it's re-parsing the whole file
02:27ibdknoxRaynes: I will do that now, one sec
02:27Raynesro_st: If someone writes a good paredit for codemirror, ibdknox will likely use it.
02:27ro_stso some level of support is on the roadmap
02:28RaynesI imagine it's far down the roadmap unless someone else does it.
02:28ro_sti simply can't live with out my paredit. i cry and rage and vent and fume when i have to use a mudblood text editor
02:28ibdknoxyeah, unless I just get pissed off at some point
02:28RaynesI wish somebody would get pissed.
02:28ibdknoxI may implement auto-closing braces if I get a free moment
02:28ibdknoxthat would be useful in a very general sense
02:29RaynesYou have to pay for your moments!?!?!
02:29ro_stabsolutely
02:29ibdknoxRaynes: I know, it's ridiculous
02:29Raynesibdknox: Have you upgraded to codemirror 3.0 yet?
02:29ibdknoxRaynes: moved noir-cljs btw
02:29ibdknoxyessir
02:29RaynesI need to upgrade on refheap.
02:29ibdknoxI did some cool prototype-y things with it
02:29Raynesibdknox: Oh cool, lt just randomly updated for me!
02:29ibdknoxLIKE MAGIC
02:30ibdknoxok seriously, there has to be a way to make an exact copy of a seq
02:30RaynesBut it still doesn't work.
02:30RaynesYeah, it only claimed it updated.
02:30Rayneslol
02:30RaynesMean text editor.
02:31ibdknoxIt's there to make you feel good about life.
02:31ibdknoxthis is with the newly downloaded one?
02:31RaynesNo.
02:31ibdknoxah, yeah, the old one would deploy and then chose not to use it
02:31ibdknoxlike a boss.
02:32clgvgood morning, you guys pulled an all-nighter? ;)
02:33ibdknoxit's a mere 11:26pm here
02:33Raynesibdknox: I'm writing this new enlive-like thingy to hopefully replace Enlive for most people, LT will make it much easier to test things. It's perfect for this sort of thing.
02:33RaynesIt's only 1:26AM here.
02:33ibdknoxRaynes: oooo, we talked about something like that before
02:33clgvah damn. I'll always mix up those time offsets^^
02:34Raynesibdknox: Should we give Konrad access to the groups on clojars or do you want to keep handling releases for them?
02:34ibdknoxok, it looks like I could do this in an incredibly hacky way if I can access a private member on a class
02:34ibdknoxI don't mind giving him access
02:34Raynesibdknox: We talked about what? ;o
02:34ibdknoxwhat's his clojars name?
02:34Raynesibdknox: https://clojars.org/users/konrad-garus
02:34ibdknoxRaynes: writing a better UI layer
02:34ibdknoxfor teh webs
02:35RaynesOh.
02:35ibdknoxeons ago
02:35ibdknoxRaynes: added him to both
02:36RaynesGreat. I'll get him going with the stuff and he can have at it.
02:36RaynesAin't it nice to have less stuff to maintain?
02:36RaynesAlso, need to make a note to actually announced that noir release.
02:36ro_stah is 1.3 final?
02:36ibdknoxyeah
02:37clgvchangelog? ;)
02:37ibdknoxthough I'm with Raynes at this point, I would push new people more generally toward lib-noir + compojure
02:37Raynesclgv: Nothing different from the beta releases.
02:37ro_stbtw, suggestion: bind *request* at the beginning of the middleware stack as well as at the end so that fns called by middle-middleware can use noir.request/ring-request
02:37clgvah kk. so changes for 1.3.0-beta1 apply
02:38ro_sti had to glom code into a middleware so that it could read req directly because of the lack
02:38Raynesibdknox: Yeah, I've been encouraging people in that direction. Not because of anything wrong with noir, but just because I don't want people to get angry at us when we don't do much maintaining. :p
02:38ibdknoxyep
02:38ibdknoxsame thought
02:38RaynesAnd lib-noir + Compojure get you most of what you get with Noir. The defpage abstraction isn't there, but it really isn't that much different.
02:38ibdknoxI also have come to the conclusion that there's a better way to write websites
02:39RaynesNot writing them at all works for me.
02:39RaynesBut what's your way?
02:39Raynes:p
02:39clgvhaha
02:39ibdknoxseriously
02:39ibdknoxI'm a big fan of static stuff these days
02:40RaynesJekyllz
02:40RaynesI was a bit curious as to why you were all like "I CAN MAKE WEBNOIR BE STATIC IN LIKE 3 SECONDS FLAT BLINDFOLDED."
02:40ibdknoxhaha
02:41ibdknoxthat took a bit longer because jekyll doesn't have GFM by default
02:41ibdknoxso I did some weird reworking
02:41ibdknoxthen I found a plugin
02:41ibdknoxafter the fact
02:41Raynesibdknox: If you honestly agree, I might write a blog post encouraging people to focus on lib-noir and Compojure. I just want to make sure you're totally serious before I do.
02:41RaynesTurns out people listen to me sometimes. It's cool.
02:41ibdknoxI am totally serious
02:42ro_stwhat's in not lib-noir, then?
02:42ibdknoxThere's nothing wrong with noir proper
02:42ibdknoxand still stands as a good starting point for people coming from other places
02:42Raynesro_st: It's a bunch of libraries that used to be in noir that we moved out into a separate lib for Compojure use. I use it in all my websites.
02:42ro_stright
02:42ibdknoxbut a lot of the problems I was originally solving have gone away in the past year and a half
02:42Raynesro_st: It's stateful sessions, flashes, cookies, a tiny validation thingy, hashing stuff, etc.
02:42ro_stwhat's left?
02:42ro_stie, what's NOT in lib-noir?
02:43ibdknoxdefpage, defpartial
02:43ibdknoxall the routing stuff
02:43ro_stok we don't use partial. we do use defpage. the middleware stuff?
02:43Raynesro_st: In Noir itself, it's mostly just the defpage stuff. A lot of more experienced Clojurians don't really like it though, because of the stateful nature of it. It also makes complicated middleware scenarios hard to not entirely possible.
02:44ibdknoxyeah, complicated middleware stuff just belongs on compojure
02:44Raynesadd-middleware was my single most painful experience with Noir, and the main reason I started leaning towards compojure.
02:44ro_stinteresting. i'll read through what's left and see if we can do with out. i'm all for simplicity
02:44Raynesdefpartial could be moved to lib-noir if people actually use it. I don't think I ever did.
02:45Raynesibdknox: Light table 0.2.3 wont use the 0.2.4 update it just downloaded. :(
02:45ibdknoxdefhtml is in hiccup now
02:45RaynesOh, really?
02:45RaynesNice.
02:46ro_stwe started and quickly removed it because we realised that defn does the same thing :-)
02:46RaynesFWIW, no hurry for moving your stuff to Compojure if noir works for you. I'll still merge pull requests and make releases as necessary. I just can't promise speedy service or that I'll do any work on it myself at all ever.
02:47RaynesBut definitely going to start trying to get the message out there that people should focus on Compojure and lib-noir.
02:47Raynesibdknox: Want me to open an issue or something? Or, maybe I should clean .lighttable and try?
02:47ibdknoxRaynes: nuke your .lighttable
02:47Raynesk
02:48ro_stgotcha.
02:48Raynesibdknox: No luck.
02:48ibdknoxso where are you looking for the version number?
02:49RaynesAbout
02:49sgeoIs sql-korma still considered a good thing?
02:49Raynespenumbra:~ raynes$ cat .lighttable/version.json
02:49Raynes{"version": "0.2.4"}
02:49ibdknoxuse the version command
02:49ibdknoxthat's the only valid source
02:49ro_stsgeo: if you're writing sql, i think it is
02:49RaynesI don't think ibdknox is deprecating all his projects. :p
02:49ibdknoxI need to remove that stupid about page
02:49Raynesibdknox: Says 0.2.4!
02:49ibdknoxRaynes: try tomorrow night :)
02:49sgeoro_st, suppose I just care about data storage, not using SQL stuff specifically
02:49clgvibdknox: or implement the about page with the version function ;)
02:50ibdknoxclgv: they exist in different realms of space time lol
02:50Raynesibdknox: It works! Isn't it purdy? <3
02:50clgvoh thats einsteinian then? :P
02:51ro_stsgeo: (inc datomic)
02:51ibdknoxsgeo: korma's fine for SQL
02:51sgeoro_st, don't want to use non-opensource stuff
02:52ibdknoxmongo works nicely with clojrue
02:52sgeoEspecially if it needs to be paid for for some uses
02:52ro_stfair enough
02:52ro_stmongo is great, too - clojurewerkz' monger is fantastic
02:53RaynesI use monger in refheap.
02:53RaynesMichael Klishin actually added it and keeps it updated.
02:53ibdknoxand I think they took their query syntax from korma :)
02:53ibdknoxif I remember right
02:54Raynesibdknox: So what are you guys working on in LT right now?
02:54RaynesAnything not top-secret, of course.
02:54ibdknoxit's all top secret!
02:54ibdknoxfixing a few bugs
02:54RaynesGet out of my internets.
02:55ibdknoxthanks to bronsa I no longer need a special version of clojure!
02:55ibdknoxI'm releasing that update tomorrow
02:55ro_stibdknox: he matched the actual mongo driver as closely as possible, so i don't htink so
02:55clgvwhat did you need a special version of clojure for?
02:55ibdknoxlots of instarepl improvements
02:55ibdknoxclgv: position info in the reader
02:55Raynesibdknox: I think I just found a bug.
02:55ibdknoxthere are no bugs.
02:55clgvah, the column information in 1.5?
02:56ibdknoxclgv: more than that actually
02:56Raynesibdknox: Okay, it isn't really a bug, but...
02:56ibdknoxclgv: needed end line and end column too
02:56ibdknoxclgv: on symbols, lists, vectors, maps, and macro expansions for wrapped reader macros
02:56ibdknoxe.g. @something
02:56Raynesibdknox: I tried to execute my file and it told me I needed to connect and populated the command bar with the connect command, but the path was to the directory holding the file I had tried to execute instead of down the file system a bit where the project.clj is.
02:57clgvah interesting
02:57Raynesibdknox: Shouldn't it back down the path until it finds a project.clj or something?
02:57ibdknoxRaynes: intentional, as of tomorrow though you can just submit that and it will do the right thing :)
02:57RaynesExcellent.
02:57ibdknoxyeah there are a few nice little improvements coming tomorrow
02:57ibdknoxauto-finding project.clj is one
02:58Raynesibdknox: When will I be able to add a refheap plugin?
02:58Raynes:D
02:58RaynesMonths? Years?
02:58RaynesDECADES!?!?!
02:58clgvnever? ;)
02:58mthvedtcenturies
02:59ibdknoxmillennia
03:00mthvedtaleph null
03:00clgvyou cant say "centuries" after "never" - you have to continue with ordinal numbers ^^
03:00ibdknoxa plugin system is one of my next big TODOs
03:00Raynesibdknox: What should I do in anticipation? Like, I guess I'd need to write a refheap API lib in JS? Node?
03:01RaynesI'm not sure how to write a regular javascript library. Node on the other hand is easy.
03:01ibdknoxnode would work
03:01RaynesSo I can use node libraries? From npm?
03:01RaynesIf I need them.
03:01ibdknoxyessir
03:01RaynesProbably wont.
03:01RaynesAwesome.
03:02RaynesI'm sick of cljs though, so can I write it in actual javascript?
03:02ibdknoxsure
03:02RaynesGreat.
03:02sgeoI'm wondering if I should start learning Node
03:02sgeoIs Javascript a fun language?
03:02ibdknoxno
03:02RaynesNo.
03:02ibdknoxlol
03:02sgeoAlthough recently learned that using objects as hashes suck...
03:03RaynesMost people find cljs fun, and I will to if it ever works for me.
03:03sgeohttp://www.devthought.com/2012/01/18/an-object-is-not-a-hash/
03:03RaynesBut I'm really at a point where I'm like "screw it, I'll just write it in js :'("
03:03ro_stsgeo: no. noooo.
03:03Raynesibdknox: My problem with cljs and node is that I don't see how you can even distribute a nodejs library written in cljs
03:03ibdknoxI haven't gotten that far with it yet
03:03RaynesBecause of all the other stuff that comes with it.
03:04ibdknoxyeah
03:04ro_stthat's because cljs isn't bootstrapped
03:04ibdknoxI know I have some scary work ahead of me with the plugin system
03:04RaynesYou sure do.
03:04sgeoro_st, how are you supposed to do hashes in Javascript?
03:04RaynesGood luck, partner.
03:04ibdknoxI'm hoping I hire someone before then :p
03:04clgvimho javascript is an excellent example for a "grown project" :P
03:05ro_stsgeo: i won't pretend to have a good answer for you, sorry
03:05ibdknoxanyone know how to get the value of clojure.reflect.Field?
03:05ro_stbecause i don't. my solution is, use cljs
03:06RaynesI think a refheap lib is simple enough that I wont mind writing js for it.
03:06RaynesAnyways, I'm off.
03:06Raynesibdknox: Thanks for visiting us mere mortals and excellent discussion.
03:07ro_stsleep well mr grimes
03:07RaynesOh I'm not going to sleep.
03:07RaynesI'm going to play BATMAN!
03:07ibdknoxRaynes: later dude :)
03:07RaynesSleep is for non-teenagers.
03:07ro_sttoo right :-(
03:07RaynesI'm going to be working a full time job in LA in less than 2 months. I'm milking every last second out of my childhood.
03:07RaynesLaters.
03:09ro_stgood plan
03:20ro_stanyone here started a clojure user group? any tips for a first timer? i'm starting one in Cape Town
04:51danielszmulewiczWhile deploying a webbit-based app on dot cloud, I get this: can not create URI from localhost hostname. Anyone seen this before?
05:17Raynescemerick: Really? always 2 spaces?
05:17RaynesYou really believe that?
05:18RaynesI think I'd *rather* deal with complex editor plugins than have always-2-spaces.
05:18cemerickRaynes: I've never seen any environment that can do anything else automatically and reliably.
05:18RaynesEmacs and Vim do it just fine.
05:18cemerickno, they don't
05:18cemerickdid you read the post? :-P
05:18RaynesYeah, they pretty much do bro.
05:19RaynesI seen pretty much no situations where the naming conventions don't work out.
05:19cemerick(defn with-something-that-shouldn't-be-indented-like-with-open [] ...)
05:19cemerickThere. :-P
05:20RaynesIt seems to be 'working' perfectly well for most people. This sort of thing is just going to start a nice big group of people indenting their code terribly/in such a way that my editor tries to fix it.
05:21cemerickwell, not everyone uses emacs, so that's already going to happen
05:21RaynesSo I don't think I'm going to get on board with this one, and don't be angry if I call you stupid in an attempt to fix your terrible wrongdoings along the way.
05:21RaynesUgh, Emacs isn't the only editor that works this way.
05:22cemerickPerhaps not
05:22cemerickIn any case, I welcome counterpoints to the ones I made in the post :-)
05:22cemerickJust saying "it mostly works for everyone that uses it so gtfo" isn't super-compelling ;-)
05:23RaynesWhat am I supposed to counter? I disagree with you that there is a problem at all.
05:24RaynesI am curious about one thing
05:26RaynesAre you willing to alienate the majority of Clojurians who use editors that do this terrible thing? Because if you write code in that way, it becomes extremely difficult to work with that code in Emacs because Emacs will persistently try to fix the code. The person working on it will almost certainly do one of 1) End up accidentally not manually indenting to match your code's style somewhere 2) get annoyed and give up 3) hate you 4) all of
05:26Raynes the above
05:27RaynesIf not, then you'd probably want to issue a pull request to clojure-mode, but it wont get accepted because I doubt anyone in particular is going to like the idea of always indenting 2 spaces.
05:27cemerickWhoa, who's trying to alienate anyone?
05:28RaynesRegardless of merits, I think "It works perfectly well for everyone" is a perfectly good counterpoint.
05:28tomojRaynes: ever called a function 'default-something' ?
05:28RaynesDon't think I have, no.
05:28cemerick...or want `foo` in project A indented differently than `foo` in project B.
05:29tomojanyway, I have a huge nasty list of special cases
05:29tomojand regularly don't want whatever clojure-mode decides
05:29tomojeven assoc..
05:29cemericktomoj: Right, which is the point I'm making. Pick a number of spaces, use it everywhere.
05:29tomojbut... the gospel... http://mumble.net/~campbell/scheme/style.txt
05:30RaynesYeah, I just disagree.
05:30Raynes*shrug*
05:30cemericktomoj: indeed
05:30cemerickI certainly *wish* that that could be followed, but it can't be applied automatically and reliably.
05:31tomojput it in the metadata? :)
05:31cemerickhah
05:31cemerickyeah, that's doable, but people would hate that more than any other option, I'll bet
05:32cemerickAlso, you'd need a runtime to get the metadata
05:32Raynescemerick: The Haskell emacs mode handles ambiguous indentation cases by having multiple possible indentations that are cycled through multiple presses of tab.
05:32RaynesSame thing could likely be applied here, but probably not in less intelligent editors.
05:32cemerickRaynes: oh, sure, that's how ccw used to work, too
05:33tomojI'd have to see what "always 2 spaces" looks like
05:33RaynesAnd that was taken out because...
05:33RaynesLike crap.
05:33RaynesI can help you with that.
05:33noidiCCW always indents relative to the previous line, so as long as you fix up your special case manually, the rest will work automatically
05:33RaynesIf you always newline before your first argument it looks fine.
05:33cemerickRaynes: it's not automatic
05:34RaynesAt least, it looks fine until you have 400 extra lines just because Chas wanted 2 space indents everywhere.
05:34tomojextra lines?
05:34n_bJust to save me grepping logs, can someone link me to the post that started the debate?
05:35cemerickn_b: http://groups.google.com/group/clojuredev-users/msg/4b72a59bbc8d19de?hl=en
05:35n_bty cemerick
05:35Raynescemerick: I read every word. What do you think I didn't read?
05:35tomojI feel pretty OK with needing a runtime
05:36RaynesIf I'm missing something, by all means point me to the enlightenment.
05:36pyrcemerick: your (defn with-something-that-shouldn't-be-indented-like-with-open [] ...) argument is flawed
05:36pyr(defn with-something-that-shouldn't-be-indented-like-with-open
05:37pyr "this does foo"
05:37pyr [])
05:37pyrwell, i botched aligning but you get the idea
05:37RaynesI don't think I do, no.
05:37RaynesWhat are you saying is flawed?
05:38cemerickRaynes: I was talking about what will always work, and you seem to be saying that something that doesn't always work…always works.
05:38Raynescemerick: I'm saying that it doesn't matter that it doesn't always work.
05:39cemerickThat's fair.
05:39pyrbut it's a discussion that leads to nowhere i guess
05:39RaynesDon't agree with me, you cretin.
05:39pyreveryone's gonna be in favor of whatever happens in their favorite editor :)
05:40n_bI'd fall on the side of 'always 2 spaces' if only because it would so simplify grokking indentation rules
05:40cemerickIn the end, I'd prefer a completely regular, always-obvious ruleset/behaviour.
05:40cemerickRaynes: <3
05:41RaynesWell, as long as you leave my code the way I've indented it, I'll be happy.
05:41cemerickpyr: I don't think any editor does what I want at the moment, though I'm lobbying ;-)
05:41tomojdo you think prior-arg-alignment doesn't help that much for readability?
05:41Raynesejackson: U SO INNOVATIVE
05:41tomojreadability is more important to me than the tiny bit of time I spend writing indentation
05:41ejacksonlet the editor show it to me in a sensible format, and to Raynes in Klingon !
05:41cemerickRaynes: well, anyone submitting pull requests or whatever that significantly changes indentation is a tool, in any case.
05:42pyrejackson: it would make reading code on GH a bit harder though
05:42cemerickejackson: Indeed, text editing is caveman-style.
05:42cemerickAnd, yet.
05:42ejacksonthat should be in Rich Hickey Canonical format that we all learn :)
05:42Raynescemerick: I'd be inclined to not do anything with code with those sorts of indentation rules because of the reasons I outlined above, which would make me sad.
05:43tomojwhat, if it doesn't match clojure-mode, you won't touch it?
05:43n_bejackson: I'm very uncomfortable with anything that changes how the code is viewed depending on editor
05:43n_bbeyond colouring and size. Just seems rife for problems down the line
05:43ejacksonn_b: you shouldn't be, its just data.
05:43ejacksonand the editor is a pretty printer.
05:43RaynesAlso, damn it cemerick. You had to start a flamewar at 4AM and now I've wasted 30 minutes not writing laser.
05:43cemerickRaynes: LOL. Dude, I tagged it as such. *and* you replied in ~30 seconds!
05:44ejacksonthat damn cemerick ! Its ripe for Meme'ification.
05:44Raynestomoj: No, if it is wildly different from clojure-mode (as this is) and I need to work with a large portion of it.
05:44n_bTime to update clojurebot to support MemeTeX
05:44Raynestomoj: Emacs will constantly change the indentation. I'd probably have to switch to text-mode just to stay sane.
05:45tomojmust be some switch that says "don't do indentation"
05:45tomojbut yeah
05:45RaynesThe last thing I want is for ccw to do one thing and emacs to do another.
05:45cemerickRaynes: it already happens, and has for years
05:45rbarraudReification at the least. A cemerickation as a UDT.
05:45pyryup, get the vim part to behave the same and then you're mostly set
05:45RaynesThat makes it okay.
05:45Raynes!
05:46cemerickclojure-mode has always had the most intricate ruleset w.r.t. indentation
05:46tomojthat seems like a polite word
05:46cemerickRaynes: Yes, trivial differences in code styles is okay.
05:46rbarraudPp. : intricated...
05:46RaynesI used Vim for quite a bit of Clojure code authoring. Turned on fuzzy indentation and outputted pretty much exactly the same thing as Emacs with the small difference of one space in cond calls.
05:47tomojcan we let editors munge the indentation and then just patch it up semi-automatically before comitting?
05:47RaynesSublime Text 2 works fine with that new plugin thing to work around how much it sucks.
05:47RaynesI haven't had this "has for years" stuff happen to me in Clojure editors yet.
05:47Raynescemerick: Also, that is true. It's only because I hate you so much.
05:48Raynes<3
05:48RaynesYou tag #flamewar, you better expect one.
05:48cemerickRaynes: Insofar as you've ever touched code I wrote, it's happened to you; and, you likely didn't even notice.
05:48RaynesI'm pretty sure I've never touched code you've written, actually.
05:48cemerickRaynes: Mostly, I was trying to wheedle down your productivity.
05:48RaynesAnd I'm pretty sure I'd have noticed.
05:49cemerickRaynes: I'm submitting a PR on bultitude, and there's gonna be 2 spaces missing. Watch out!
05:49RaynesThat's it. I'm just using Haskell from now on.
05:49RaynesTake your indentation and shove it.
05:49cemerickScore!
05:50ejackson:)
05:51RaynesFor all watching, cemerick and I are actually long time friends. We go way back to before I was a fetus. None of the angry comments exchanged are actually serious at all, and this whole event was orchestrated entirely for your entertainment. We'll be doing this show for the remainder of this week and the first half of the next. You can buy tickets at eventbrite.
05:52cemerickRaynes: turn on the page now. Daddy needs a new pair of shoes.
05:56rbarraudWhy u no instantiate a shovination?.
05:56rbarraud,
05:56clojurebot#<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: EOF while reading>
05:56rbarraud.!!?
05:56rbarraudLolz.... Y
05:57borkdude,
05:57clojurebot#<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: EOF while reading>
05:57rbarraudYegge rant q.v. :-)
06:00tomoj:( when I get an error now, it prints the stacktrace over and over many times until I hit ctrl-c
06:16Raynestomoj: It's making sure you see the error. The important part is the indentation.
06:17tomojoh, it's because one.test retries every 10ms
06:17tomojby default, for 60s..
07:11tgoossensborkdude: about "asking for forgiveness is easier than asking for permission"
07:11tgoossensthey got quite mad at me :p
07:11borkdudelol
07:11tgoossenstheir argument: because then my teammates cannot read and use and change to code any more
07:12borkdudegood argument
07:12tgoossenscorreect
07:13borkdudetgoossens what about my suggestion of buidling the same thing in both languages, just for demo purposes
07:13tgoossensi've been considering that yes
07:13tgoossensthe thing is
07:13tgoossensas far as i know there is no NXT library in clojure (not just a wrapper around lejos)
07:13tgoossensso maybe i just found myself a project for next semester
07:14borkdudetgoossens I think I saw smth about this, but never looked into it http://link.springer.com/content/pdf/10.1007%2F978-3-642-13541-5_6
07:15tgoossensi think it is still based on lejos
07:15tgoossensbut maybe it works its way around the flaws of it
07:15tgoossens(and lejos has some serious flaws)
07:17tgoossensso i'm considering about writing nxt lib from scratch but maybe that's a bit overrated
07:19borkdudegood luck :)
07:23thomas`join #go-nuts
07:30tgoossensborkdude: also. Knowing my teammates. I'm pretty sure they are not interested in my alternative approach
07:31borkdudetgoossens probably they will only start to use it, when they clearly see the benefit of it
07:32tgoossensi mean. they are not intested in taking the time to let me demo it.
07:32borkdudetgoossens for some things like GUIs or heavy Java interop maybe just Java the best fit
07:32tgoossensat least not all of them
07:33borkdudetgoossens don't worry about it too much, it's standard practice also at my work
07:34tgoossensI'll just try to find some projects for myself during the year
07:34tgoossensthat's always a hard part of it. finding an interesting project :p
07:35borkdudeI gtg
08:13narmihi
08:13narmiapart from being run on jvm, what are the differences between clojure and cl
08:13narmilike what types of things is one language better suited for than the other?
08:26nonrecursivenarmi: what's motivating your question? are you new to clojure / cl and trying to figure out what to learn first?
08:26nonrecursivenarmi: what's motivating your question? are you new to clojure / cl and trying to figure out what to learn first?
08:27narmiyes
08:27narmiactually i am trying figure out whether i should learn one, the other or both
08:29daimrodnarhttp://hyperpolyglot.org/lisp
08:29nonrecursivein that case I would suggest learning clojure first. i learned CL first, and while it was fun, clojure has been much more enjoyable for two reasons: 1) the ecosystem is much better, especially when it comes to using external libraries. with CL, finding and using someone else's code is a big pain. in clojure it's pretty easy 2) clojure is much "smoother" than common lisp, if that makes sense. the language is just a bit nicer to work with
08:29daimrodnonrecursive: did you use CL with Quicklisp?
08:30nonrecursivedaimrod: yep I did and it was still painful. for example, it would pull in versions of libraries that were a few years old
08:31daimrodthat's weird, because Zach compiles the latest release.
08:31ro_stnonrecursive: Clojure for sure. the whole lot has been built for developer ease from the ground up. one of RHickey's stated design goals is to be a modern general purpose programming language.
08:31nonrecursivedaimrod: this was awhile ago now but i remember also having to learn about asdf in order to use quick lisp… just had to know too much
08:31nonrecursivedaimrod: yeah not trying to disparage his work, it's definitely the best thing for CL. i just think the project.clj file is way nicer
08:32fredyrenough CL to read On Lisp, enough Scheme to work through SICP and Clojure for the rest of it?
08:32fredyr:)
08:33daimrodnarmi: try to both, for CL there is PCL, for Clojure I think that Intro to Clojure is the best.
08:33nonrecursivefredyr: haha yeah pretty much
08:33ro_sthaha that was meant for narmi.
08:33ro_stthat'll teach me to irc within minutes of waking up
08:34nonrecursivenarmi: i learned CL through Land of Lisp - it was super fun
08:36daimrodfredyr: imo PAIP is much better than On Lisp.
08:36narmiwhat is paip
08:37nonrecursiveparadigms of artificial intelligence programming i think
08:37fredyrya
08:37narmiokay
08:37narmiso what is clojure good for then?
08:37fredyri haven't read it, but now i need to order it straight away i think
08:37fredyr:D
08:37nonrecursive:)
08:38ro_stnarmi: web startup here. we use it for our entire stack. server, client, database, devops, campfire bot
08:39narmiokay thank you
08:40fredyris it your first functional language you're going to learn?
08:40narmiyep
08:40ro_stdatabase is datomic. devops with palletops.com. client with clojurescript.
08:40nonrecursivero_st: what's your web site?
08:41ro_stour entire codebase across all of that including tests is under 20k loc. previous v1 client codebase, in flex/air, alone was 25k
08:42ro_stnonrecursive: the v2 stack isn't live yet. 14 jan -fingers crossed- v1 stack still available at www.cognician.com
08:42fredyrnarmi: clojure is strong on the functional side, with immutability and such, so it's a good place to start
08:42nonrecursivero_st: cool :) good w/ your release
08:43ro_stthank you
08:43narmiokay
08:43ro_stlooking forward to killing php
08:43nonrecursive:D
08:43fredyrcool with an all clojure shop
08:44ro_stclj is the most fun i've had programmin' in 15 years :-)
08:44fredyr:)
08:44ro_stand i'm off. ciao!
08:45fredyrlater
09:30@rhickeyPlease retweet, contact blip etc: https://twitter.com/richhickey/status/279210140425674754
09:32@rhickeythey just nuked my account without warning
09:32ejacksoncheeky bastards !
09:36jimdueyDid they give any reason?
09:42Foxboronjimduey, i got a feeling "without warning" implies no reason.
09:44ambrosebsI'm assuming Rich will be taking his business elsewhere?
09:45@rhickeyviolation of terms of service, no enumeration thereof, and not warning, after the fact
09:45Iceland_jackWas there any recent activity that might have triggered it?
09:45@rhickeynot on my part, other than paying
09:49ohpauleezjimduey: ambrosebs: is that in regards to blip?
09:50ambrosebsya
09:50ohpauleezgah, terrible news. Pretty ridiculous. Sorry Rich et el who have to deal with that
09:51alexnixonwhen creating a closure e.g. (let [x (make-huge-thing)] (fn [] 42)) does the closure capture a reference to enclosed variables which aren't used? (e.g. x in that example)
09:51ambrosebssuch a waste of time
09:53nDuffIs the original content still archived somewhere?
10:12TimMcalexnixon: I would think not -- locals clearing should take care of them.
10:17alexnixonTimMc: cool thanks. I read (https://groups.google.com/forum/#!msg/clojure/Xmu3pUMgiJk/Lx1Sq462h4wJ) that locals clearing code is emitted on the last *use* of a variable (here there isn't one). Does that mean that in this contrived example I'd end up keeping a reference to x?
10:18bordatouehello, I come across an issue with ,(import ) from the repl, I had a set of .jar files, one of them is a deprecated API (.jar) , I could successfully import all the .class files from all the .jar files apart from the deprecated API. It appears that (import 'some.deprecated.api.Class) is not working. Is there any way to use a deprecated API with clojure, I can see no such restrictions in java. When compiling the .java file that uses the
10:18bordatouedeprecated API only a warning is generated.
10:18alexnixonTimMc: I guess it's the difference between "x is captured, but it's OK due to locals clearing" vs. "x is not captured at all"
10:19oliyhhi, i am trying to extend PersistentList using proxy but the constructor of the java class doesn't give me any scope to do this. essentially what i want to do is create a normal list and just override the count function to return a value i have at construction time
10:20TimMcalexnixon: https://www.refheap.com/paste/7549 Maybe not quite what you were asking.
10:20oliyhif PersistentList had a public constructor accepting another list i could do it, the fact it doesn't makes me suspect i am on the wrong road
10:22alexnixonTimMc: I think it doesn't *quite* answer my question though as you've used 'huge' when creating the weak reference, so clearing code will be emitted
10:23alexnixonTimMc: asking for gc is a good way to test this though - I'll poke around and see if I can answer it myself
10:25joegallooliyh: perhaps you could just proxy clojure.lang.Counted and use the provided list in a closure?
10:26oliyhjoegallo: how would i specify the behaviour of all the other PersistentList methods i wanted to retain?
10:27TimMc&((apply comp (take 20 (cycle [keyword str]))) :colons)
10:27lazybot⇒ :::::::::::colons
10:28joegallo(proxy [PersistentList Counted] ...) and then you only fill in an implementation for count. I THINK.
10:30oliyhthat's what i have so far joegallo but the problem i then run into is that to construct a PersistentList the only public constructor is public PersistentList(Object first)
10:31joegalloahhh now i get it. my bad.
10:32bordatouehas anyone tried importing a deprecated class in clojure
10:32oliyhwhat i want is (defn truncated-coll [size coll] (proxy [clojure.lang.PersistentList] [coll] (count [] size)))
10:32oliyhbut then i have a list of lists... so is there a better way to achieve what i want to do?
10:33joegallobordatoue: there's nothing magic about deprecated classes as far as i know. it sounds like it's just a part of the package name, and nothing special. i think you're probably just making some simple error. perhaps you should gist some real code instead of just saying some.deprecated.api.Class.
10:33nDuff...part of the name, or an annotation?
10:33nDuffStill, shouldn't matter.
10:34joegallooliyh: why can't you just call (take coll size)?
10:34danlarkin(doc take)
10:34clojurebot"([n coll]); Returns a lazy sequence of the first n items in coll, or all items if there are fewer than n."
10:35bordatouejoegallo: i have got a .jar file from a client that has some deprecated decorators all over the place, i strongly suspect import is preventing deprecated classes from being imported . Are you telling me import will work fine with deprecated classes
10:35TimMcjoegallo: That still doesn't make it a counted? instance.
10:36TimMcoliyh: You want count to return in constant time, yeah?
10:36bordatouejoegallo: I will try it with just a single class
10:36joegalloTimMc: I didn't an explanation of why he needed it to be a counted...
10:36TimMcIt's just my intuition, I don't know either.
10:38oliyhjoegallo: i'm building a web page where i want to provide a collection of objects to be displayed, where this collection is of a conveniently displayable size (e.g. 10) but that many more exist in the database (hundreds) which will be collected via ajax or something
10:39oliyhi want to also display a total count to the user, hence count should display the size in the db but when i iterate over my collection i only want the first ten
10:39oliyhas far as i know, i can't count a lazy seq without realising it all in memory
10:39joegallobordatoue: (import 'java.io.LineNumberInputStream) works just fine here, and that's an @Deprecated class.
10:40joegalloare you perchange trying to (import 'some.deprecated.stuff.*), because that won't work, btw.
10:40oliyhso what i am essentially trying to do here is create a lazy seq that can be counted but not realised, where my count return value is computer cheaply via a count in my data source
10:40danlarkinoliyh: why are you making your life so complicated. Query the database for both the count() and the first/last/whatever 10 items
10:41danlarkinand be done with it
10:41alexnixonTimMc: https://www.refheap.com/paste/7550 everything looks ok despite the fact that x is never used, so presumably isn't cleared. I guess the compiler has some logic to capture only the subset of the environment that the closure uses
10:41joegallooliyh: my $.02, danlarkin is right, return a tuple of [(.someCheapCountIGotMagically db-stuff) (take 10 the-lazy-seq-or-whatever)]
10:41danlarkinno, no (take 10)
10:42danlarkinjust have the DB return only 10 items
10:42joegalloah, logical
10:42joegallothat's even better.
10:42oliyhdanlarkin: yes, there are practical solutions like yours. it's turned into more of a thought exercise though and i'd hoped it could be solved with extend or protocol or similar
10:42oliyhin java the solution is obvious, and clojure >> java no?
10:44danlarkinobvious troll is obvious
10:44oliyhi'm really not, if that's directed at me - i'm trying to learn
10:45nDuffoliyh: ...so implement Counted
10:47nDuffoliyh: ...by the way, are you Oliver Yu, formerly of M1?
10:47danlarkinfollowing rat holes by doing things "the java way" in clojure is not a "thought experiment", it's a waste of time and won't teach you anything about how to get the most out of clojure
10:48oliyhnDuff: no, i'm not
10:48alexnixondanlarkin: his question is "how do I implement a constant time count method for a lazy sequence?". That's a great question.
10:49oliyhdanlarkin: i'm trying to implement the clojure way, not the java way - as i explained to joegallo, i am very close with my code above, just thwarted by the java constructor of PersistentList
10:50oliyhalexnixon: a very concise summary, thanks
10:50bordatouejoegallo: thanks very much
10:50danlarkinvec
10:50danlarkinthat's how you do it
10:51joegallobordatoue: you're welcome. this all gets a lot easier, but for a while the learning curve is steep.
10:51bordatouein emacs if i kill the repl and type clojure-jack-in will it reload the classes
10:52trptcolinumm, good luck w/ constant-time count on lazy seqs
10:52ohpauleeztrptcolin: exactly
10:53bordatouejoegallo: there was something wrong , i don't know if it is something do with emacs , I checked the classpath using ps and found it had the .jar files in the classpath . On restarting emacs and trying to import the same class seems to have solved the issue.
10:53ohpauleezIt's mostly an oxymoron "constaint-time count on lazy seqs" - in order to count, something needs to be realized. danlarkin already said the easiest (and shortest) realization- vec
10:54ohpauleezand there's no telling if you lazy seq is actually a generator-like thing producing a lazy-seq
10:54ohpauleezor just a lazy-seq of a finite number of elements
10:54joegallobordatoue: k, sounds like maybe those jars ended up in your classpath after you started your repl, which is usually problematic.
10:54trptcolineither way, it's at best linear-time, unless you have a way to get ahold of whatever's behind the lazy seq
10:54bordatouejoegallo: so is there any way to see the classpath within the repl
10:55ohpauleezexactly
10:55bordatouejoegallo: you might be right, classes could have entered the classpath after i had started the repl
10:55alexnixonohpauleez: he's not after a general solution so that point's moot
10:56joegallobordatoue: nothing new in that department since yesterday. you can still (System/getProperty "java.class.path") and it'll still be inaccurate if something has been doing clever things with classloaders.
10:56oliyhif it's really not possible i can accept that, but i was reading stuart sierra's paper on the expression problem which led me to believe it would be possible
10:56danlarkinoliyh: it's not just that it isn't possible, it's that it doesn't even make sense
10:57TimMcdanlarkin: Sure it makes sense.
10:57TimMcIf I know my generator, I may know the total length.
10:57TimMcFor instance, (range 10) is lazy, but I know the count ahead of time.
10:58danlarkinblurf
10:58joegallo(vec (range 10 ...)) like magic
10:58joegallo:)
10:58bordatouejoegallo: when you say clever things, is it possible to remove a certain classes from the classpath
10:58TimMcoliyh: Why do you need it to be lazy?
10:59TimMcAlso, laziness may be a problem if you're working with database connections.
10:59joegallobordatoue: a lot of things are present in the bowels of the java classpath. i would imagine it would be possible for you to add and remove classes dynamically, but you'll probably release the balrog.
10:59oliyhthere are hundreds or thousands of elements in my use case, holding them in memory server side or trying to display them all on page load client side is expensive
10:59joegallothat would probably be out of the ordinary for you to do, and i suggest you consider that way shut.
11:00danlarkinoliyh: this is a stupid discussion. query the DB for the total count and the first/last/whatever 10 elements and be done with it
11:00danlarkinthere is no other sensible way to do it
11:00bordatouejoegallo: okay, thanks
11:01TimMcoliyh: In the general case, I'm sure you can make a lazy seq that implements Counted. In the specific, practical case, danlarkin is right.
11:02TimMc(and by "general case", I don't mean *all* lazy seqs, just a specific subset)
11:02oliyhfair enough, thanks for the debate everyone
11:03alexnixonTimMc: given clojure.lang.LazySeq is final and implements count, how so?
11:03trptcolinimplement ISeq & Counted
11:06alexnixontrptcolin: an option, but it feels a bit clunky given you're writing LazySeq from scratch
11:06TimMcPassthroughs, mostly.
11:06TimMcNo, it would just be backed by a LazySeq.
11:07trptcolinof course. you want not-clunky, you do what danlarkin says ;)
11:07alexnixonTimMc: sure - and the other interfaces that LazySeq implements?
11:07TimMcWhat about them?
11:08TimMcI suppose IPending is interesting.
11:08alexnixonTimMc: you're not going to have (e.g.) a realized? function unless you implement that yourself
11:08TimMcalexnixon: They'd all be chained to the underlying LazySeq.
11:10TimMcnext/rest would give you a new CountedLazySeq with a dec'd size.
11:10alexnixonyeah I understand that, it just doesn't feel particularly nice (admittedly doing this at all is stretching the boundaries of sanity)
11:11TimMcWho said anything about nice?
11:11ohpauleezClojure is a great language because if something seems hard, you're most likely doing it wrong
11:12alexnixonwell as oliyh said, you'd hope to be able to add new functionality (O(1) count) to an existing type (LazySeq). I guess the counter-argument here is that you own neither, and so are probably doing something you shouldn't.
11:13TimMcRight, so mimicing/wrapping is the "best" solution.
11:13alexnixonsure
11:14alexnixonjust trying to understand why, and I think I'm coming to the conclusion that "you own neither LazySeq nor count" is the reason.
11:14ohpauleezno the argument here is counting a lazy-seq is O(n) at best, unless you fake it, in which case you're better off just def'ing the value to something (an atom if you want to continually adjust it)
11:14ohpauleezmonkey-patching ala protocols is completely sane - I do it from time to time
11:14TimMcohpauleez: Ignore the semantics of counting seqs for a minute -- shouldn't it be easy to create something that adds an interface?
11:15ohpauleezTimMc: yes
11:15TimMcI guess what we're talking about here is concrete inheritance.
11:19TimMcProtocols wouldn't make sense here, since we're really talking about creating a new class, distinct from LazySeq.
11:30noidiis there a better way to concatenate a bunch of vectors together than (reduce into my-vecs) ?
11:32dpickcemerick: got a sec for a friend question? I'm trying to log a user in when they regsiter but I can't get the auth info into the session
11:32ohpauleeznoidi: you could do something like: (into [] (concat [1 2 3 4 5][1 2 3 4 5]))
11:33llasramnoidi: Depends on context. If you don't need the result to be a vector, just (apply concat my-vecs) will return a lazy sequence of the vector contents
11:33ohpauleezthat's better
11:33ohpauleezif you don't need a vector coming out
11:34noidiyeah, that's what I thought
11:34ohpauleez(into (first my-vecs) (apply concat (rest my-vecs))) is also an option
11:34berdarioHello, when I first looked at clojure, I thought that it had TCO... when I got to know about the lack of TCO, I assumed that all processing on lists too big to recurse through the stack was done with map and reduces... but now I realized that what people actually use is (recur)
11:35noidiI was actually just asked this question, and wondered if my answer was correct :) ("use concat if you don't need a vec result, otherwise use reduce into")
11:35berdarioMy doubt is: I'm seeing recur used also for looping over a list of files in directories... is this normal and idiomatic clojure code?
11:35noidiberdario, probably not
11:35n_bI'm currently in the process of wrapping Twilio's Java API library as a first 'Ship something in Cloure' project and having some trouble determining the best way of doing it idiomatically; could someone point me in the direction of another Clojure wrapper around a REST API?
11:35n_bOr do you think I might be better off just building it up from scratch?
11:36noidiberdario, http://blog.fogus.me/2011/03/09/recursion-is-a-low-level-operation/
11:36ohpauleezberdario: Sometimes you use explicit recur for performance (in certain applications)
11:36ohpauleezbut usually its avoided
11:36berdarioI mean: most directories have a small fan out... and without (recur) I should be able to handle easily more than a thousand
11:36berdariooh, thanks
11:37noidiif you just want to iterate over a list of files/directories/whatever, use map, for, or doseq
11:37ohpauleezn_b: Look at the github wrapper
11:37ohpauleezI think the project is called clj-github
11:38n_bohpauleez: Will do, cheers :) (and that is the name)
11:38ohpauleezn_b: you might also find some more examples at: https://github.com/dakrone/clj-http
11:40seangroveHrm, noir has stopped serving static files altogether
11:40seangroveThis is what I get for restarting my computer...
11:41n_bah, the joy of debugging "W[ed]fm"
11:43berdarionoidi: for the sake of completeness... I want to split an existing function that uses recur (not written by me) in two, and I was wondering if it was a bad idea to rewrite it without recur (it probably is: since I guess that the original author did it that way for performance reasons... even if it seems strange to me)
11:44seangroveIf I have a file `resources/public/js/lib/md5.js` in the root of my project, then `lein run` should serve it up at http://localhost:8080/js/lib/md5.js, right?
11:44seangroveAssuming lein run kicks off noir on port 8080
11:45noidiberdario, if he did it for performance reasons, he should've documented the fact :)
11:46TimMcI'd like to write a small email autoresponder -- can anyone point me to some valuable Clojure libraries for that task?
11:47TimMcThat is, what libraries would I be really sad about discovering *after* the fact?
11:47clgvberdario: he must likely did it to avoid stack consumption
11:49berdarioclgv: assuming that performance doesn't matter in this case, and that the input size is too small to cause a StackOverflowError... what's the reason for avoiding stack consumption?
11:49clgvberdario: the StackOverflow is ;)
11:49clgvwanted to write "most" instead of "must"
11:52noididoseq doesn't consume stack either
11:52llasramberdario: Can you show the original function under discussion?
11:52noidinor will map or for
11:52clgvnoidi: how do you want to implement a recursive function via doseq?
11:53noidiclgv, it's already tail recursive, so one of clojure's iteration operations might be a better fit
11:54noidi[18:28] < berdario> My doubt is: I'm seeing recur used also for looping over a list of files in directories... is this normal and idiomatic clojure code?
11:54noidithat's why I mentioned doseq/map/for
11:54clgvdoseq would only work if he doesnt accumulate something
11:54TimMcIf there are multiple state bindings, recur also avoids some allocation.
11:54noidiclgv, then there's reduce :)
11:55TimMcwhereas iterate would incur destructuring costs
11:55llasramSince berdario did mention it being used for files & directories, explicit recursion might be being used to implement breadth-first traversal
11:55TimMc(and allocation costs, of course)
11:55clgvnoidi: but not doseq (that was all I said above) ;)
11:55noidithis whole discussion is kind of pointless without seeing the function in question :)
11:56noidibut plain recur is very often too low-level a tool, and used only because the author wasn't familiar with the higher-level operations that clojure provides
11:59alexnixonTimMc: I've used com.draines/postal for sending emails, though AFAIK it doesn't support receiving them
12:02stoneghow can I launch clojure.main -r in a specific namespace?
12:03seangroveI'm baffled - why would noir say 404 for all static assets?
12:04n_bohpauleez: This is exactly the sort of thing I was looking for, thank you :)
12:05ohpauleezn_b: totally welcome!
12:06stoneglike this, launch clojure repl using `java -Xmx1G -cp $CLASSPATH clojure.main -i src/my_repl/repl.clj -r` http://pastie.org/5521120, so I after launching clojure repl , it's already swithced to my-repl.repl, and the var defined is already available
12:07dudleyfWhat happened to clojure.blip.tv?
12:07seangrovedudleyf: Not sure, but there was mention of it on the ml
12:07hiredmanhttps://twitter.com/richhickey/status/279265816153833473
12:07seangroveThe videos are available in the iTunes podcast apparently
12:09stonegany suggestions about switching namespace in the repl pragmatically ?
12:24ohpauleezdakrone: wrt lein-bikeshed : would you be open to a patch to allow no more than one blank line at the end of a file
12:24bordatoueplease can anyone provide hint on how to iterate through an map as in Hashmap with delay (lazy)
12:25trptcolinohpauleez: i disagree. multiple blank lines at the end are an important expression of my individuality
12:25ohpauleezaccording to Unix Programming standards (which I still tend to follow) all files are supposed to have one blank line at the tail of the file
12:25trptcolinbikeshed, bikeshed, bikeshed
12:25trptcolin;)
12:25ohpauleez:)
12:25technomancyyeah actually cron files will exhibit horribly broken behaviour if you omit the trailing newline
12:26trptcolin!
12:26technomancycrontabs I mean
12:26technomancytrptcolin: the last line will be silently ignored
12:26ohpauleezright
12:26trptcolinthat is insane
12:26nDuff...you don't need a blank line
12:26nDuffyou _do_ need a \n character on the last line
12:26technomancytrptcolin: it really is
12:27nDuffbash "while read" loops won't work if your last line isn't terminated by a \n either, as read returns nonzero in that case.
12:27joegallodakrone: do not accept multiple blanks lines at the end of a file. one and only one is the magic.
12:30jmlDoes anyone know if rhickey's talk "Language of the System" that he gave at Techmesh last Tuesday is available online?
12:31jmlI've found the ClojureX version, but I suspect that the techmesh one will be more informative for my non-Clojurian colleagues.
12:31seangrovejml: I believe the one from skillsmatter is online at least
12:32jmlseangrove: yeah, have got that one, thanks. (also, was at the event, which was a lot of fun)
12:33stoneghow to launch clojure repl using `java -Xmx1G -cp $CLASSPATH clojure.main -i src/my_repl/repl.clj -r` http://pastie.org/5521120, so I after launching clojure repl , it's already swithced to my-repl.repl, and the var defined is already available ?
12:35seangrovestoneg: Not sure, wei_ in here has his projects setup like this though
12:51ppppaulhey guys. i'm new to datomic. is there an easy way for me to connect to the dataomic repl from emacs swank?
12:51ppppaulor, is the datomic reply just the clojure repl with nothing added?
12:51ppppaulreply->repl
12:52hiredmanppppaul: you can look at the shell script
12:52hiredmanI am pretty sure it is just the clojure repl with the datomic client on the classpath
12:53ppppaulthe shell script is quite minimal
12:54ppppaulif i put the free transactor pom and datomic pom in my deps should i need any other setup to run the sample scripts?
13:01technomancyI guess probably not on freenode, given the topic
13:01trptcolinzing!
13:02ppppaulanyone using lein-datomic?
13:02ppppaulthe github page says that i need to edit my ~/.lein/profile file, but there isn't really anything in my .lein folder cept a jar
13:03ohpauleezppppaul: You write your own profile file
13:03ohpauleezit's like your own global lein conf
13:05ppppauloh
13:05ppppaulsomehow doing that didn't cross my mind
13:05ppppauli thought that i may be looking in the wrong folder
13:07scottjppppaul: there is #datomic btw, though last I checked it was pretty quiet
13:11ppppaulok
13:12devnlein-datomic is nice
13:13devni wish they'd figure out a better packaging situation for datomic
13:14devni tried to write a homebrew formula for it and bin/ is a PITA -- lots of paths need to be rewritten for it to be installed in /usr/local/bin/{binaries} and know where its deps are
13:16technomancyhomebrew takes recipes for proprietary programs?
13:17epitrontechnomancy: witch's brew
13:18ppppaulthere is brew for neo4j
13:18ppppaulit's not OSS
13:20trptcolin? https://github.com/neo4j/neo4j
13:20epitron"Our community edition (in the community/ directory) is GPL. Our advanced and enterprise editions (advanced/ and enterprise/, you get the drill) are Affero GPL and so have different licensing implications."
13:21epitroni guess technomancy is all about the enterprise
13:22epitronactually, there's nothing proprietary about any of this :)
13:22epitronwhat're you talking about ppppaul
13:42ppppauli'm talking out of my ass
13:42ppppaulneo4j has some weird licence
13:43technomancydual-licensing isn't that uncommon
13:49ppppaulhow do i re initialize the clojure.core namespace?
13:52ppppaulit seems like i overwrote the filter function
13:53ppppaulwhen i try (ns 'clojure.core) i get a warning and it doesn't overwrite it again
13:53rbxbx(require 'clojure.core) ?
13:54ppppaulrequire doesn't overwrite my filter, but it didn't throw an error either
13:54ppppaul(use) is throwing an error
13:54llasramppppaul: You overwrote clojure.core/filter itself, or the reference to clojure.core/filter in your namespace?
13:55ppppauli overwrote it in my namespace
13:55ppppaulerr, the ref changed in my namespace
13:55ppppauli want to change it back to the core filter
13:55ppppaulWARNING: filter already refers to: #'clojure.core/filter in namespace: user, being replaced by: #'datomic.api/filter
13:55llasramppppaul: (do (ns-unmap *ns* 'filter) (require '[clojure.core :refer [filter]]))
13:56ppppauloh wow, that's a bit of work
13:56ppppaulthanks
13:57ppppaulit works!
14:06n_bI need to store some authentication credentials that might be changed during runtime - should I be using an atom or use a def and mark it as dynamic then use a macro with a binding?
14:07nDuffn_b: Could they be set differently between threads?
14:07nDuffn_b: ...or will it always be global?
14:07n_bI can conceivably see it being different between threads
14:07nDuffThen you want a dynamic var.
14:08n_band then use binding?
14:18rbxbxRaynes: are there any reading materials around lib-noir? I'm guessing the noir docs themselves are it?
14:18rbxbx... and the source code, of course ;)
14:30germanguyhello can somebody help me
14:30germanguylein uberjar gives the following error: lein-javac: system java compiler not found; a JDK (vs. JRE) install is required.
14:30germanguyI am using windows7 and in path i have my JDK7
14:37n_bis lein using the proper path settings?
14:46sshackOkay, are there any clojure web frameworks that aren't "Here's some wood and a saw. Hope you like your bookshelf"?
14:46sshackI'd like to focus on my app, not the infrastructure.
14:47ibdknoxCan anyone think of a way to make an unrealized copy of a LazySeq?
14:47brehautsshack: go use rails or django and make your app a service that the webapp talks to
14:48ibdknoxI tried to do this via reflection pulling the .fn field out and creating a new LazySeq with it, but locals clearing screws me over :(
14:48sshackbrehaut: It's slightly tempting. But I'd rather not touch rails with a 10 foot pole. I just don't like having to do things like user authentication for myself.
14:49ohpauleezibdknox: can you short-circuit that in a closure?
14:49amalloyibdknox: an unrealized copy of a lazy seq? what does that mean?
14:49brehautsshack: i think you are in a cake and eat it situation
14:49ohpauleezI assume you have some sort of generator, that will realize data via computation (a function) and you want to copy that, but I'm not sure why
14:49ibdknoxamalloy: I want to capture the values of a lazyseq without realizing the original - I'm trying to store intermediate states of execution
14:50ibdknoxI don't want to realize the original so I can be intelligent about whether or not to show the whole thing (because it was actually realized by the user's code)
14:51ibdknoxohpauleez: I don't think I can do the closure thing because the problem is that the function is marked with ^:once
14:51ibdknoxby the lazy-seq macro
14:51ohpauleezibdknox: why not just realize a limit of what you're willing to show
14:52ohpauleezit's just going to cache anyway
14:52amalloyibdknox: you can probably make a copy of the function (not just the pointer to it)
14:52ibdknoxamalloy: oh? How would I do that?
14:52amalloywell, i was thinking (with-meta f {}). but i guess these days that doesn't make another function
14:53brehautsshack: there is https://github.com/macourtney/Conjure but i think you'll find its rails all over again "Conjure is a Rails like framework for the Clojure programming language". If sandbar, friend and libnoir doesnt add what you need, i think you are out of luck
14:53ibdknoxamalloy: yeah no luck, I tried that one
14:54technomancysshack: finding just the right abstraction for user management is really hard. there have been attempts that do things for you but are not the right abstraction, but we're still waiting for the Right Thing
14:54ibdknoxohpauleez: I could, but the user experience is kind of crappy there. For example, in an unrealized seq I only really want to show a couple values and that it continues on for some unknown number. If I changed that to "I'll let you do 250" now the code will be unreadable because these huge pr-str'd seqs are everywhere
14:55brehautsshack: i'd also be worth noting that conjure builds on clj-record and even the author of that doesnt like it http://elhumidor.blogspot.co.nz/2012/11/why-not-to-use-my-library-clj-record.html
14:55technomancyamalloy: it creates another function, surely? just one that delegates to the original?
14:55ohpauleezibdknox: ahh
14:57technomancypart of what makes clojure unique is that people (in general) are willing to wait for the right abstraction rather than jumping on board with the wrong abstraction that happens to make life easier in the short term
14:59nDuffn_b: binding if you want to set the value only for the local thread and agents/&c. started from it, change-root-binding (or whatever exactly it is) if you want to set a new default that isn't thread-local.
15:01x89I bet some of you guys also know erlang, so: is there something like ->> in erlang?
15:02devinuscan anybody give me a list of the most useful/coolest lein plugins?
15:02devinusx89: tell me what ->> does in clojure and i'll tell you if it exists in erlan
15:02devinuserlang
15:03technomancydevinus: there's a listing of plugins on the wiki, though not sorted by coolnes
15:03devinustechnomancy: i know, that's what i'm looking for tho :P
15:03devinussorted by hawtness
15:04sshackbrehaut: I shall look at conjure. I'm fine with working with different libraries. But when very basic bits are missing, it's a turnoff.
15:04devinuslein-ring for example is super useful, but lein-marginalia is cool
15:04brehautsshack: my preference (and i think its not uncommon here) is that missing is better than broken
15:04sshackand yes I realize there's no "right thing yet. It's acceptable to say "This is designed for one purpose only". After all we have flatbed trucks and convertibles.
15:04technomancydevinus: my list: lein-pprint, lein-difftest, lein-guzheng
15:05brehautsshack: but its your own neck
15:05sshackBroken and specific to a particular problem/domain are different.
15:05x89devinus: (reduce + (filter #(rem % 3) (range 10))) -> (->> (range 10) (filter #(rem % 3)) (reduce +))
15:06devinusx89: i'm on page like 150 of Joy of Clojure, so i'm unsure what -> does either
15:06x89devinus: I meant -> as a "meta" characther
15:07x89I'l try again
15:07x89devinus: (reduce + (filter irc://chat.freenode.org:6667/#(rem % 3) (range 10)))
15:07x89is the same as
15:07devinusoh i see
15:07x89(->> (range 10) (filter irc://chat.freenode.org:6667/#(rem % 3)) (reduce +))
15:07devinusso
15:07x89whoops
15:07x89how did that get there
15:07devinusso basically it lets you compose in reverse?
15:08x89something like that
15:08x89it is a macro, so maybe erlang does not have something like that at all
15:08devinusnothing like that in erlang i'm afriad
15:08devinushowever
15:08devinusin Elixir there is (an OTP language)
15:08devinusfoo /> bar /> baz #=> baz(bar(foo()))
15:09x89So I guess I'll have to define functions instead
15:11solussdI'm sure this comes up now and again… I'd like to enforce type on record fields. With a function I'd use :pre conditions, but I cannot add those to the default constructor (->RecordType). I could use robert hooke, but then I have to write a functions with (almost) identical :pre conditions for the positional constructor and the create factory, which takes a map. Thoughts?
15:21sshackbrehaut: You're right about conjure.
15:22amalloysolussd: as you can imagine, the clojurey solution is to not enforce type :P
15:28TimMcmeh
15:30solussdamalloy: yeah, but I'm trying to save myself explicit type checks before I cram stuff into my (mongo) db
15:40vsynci enjoy clojure a lot but i do have to say i prefer CL's type system and generic functions
15:41vsyncthough the broken-out dispatch-fn is cool
15:42vsyncbut proper named types through and through would be helpful sometimes
15:43vsyncparticularly in clojurescript so i could get a more useful error than "no method for function <30 lines of useless javascript> defined on <30 more lines of useless javascript>"
15:45vsyncsolussd: neat
15:45vsyncthough it seems a bit imperative
15:47vsynci feel the cleaner thing to do is avoid explicit use of the underlying records sprinkled everywhere
15:47Netfeedhow can i create a macro that creates a function with named arguments? it throws exception if i dont use gensym, but the named arguments doesn't have the correct names with gensym
15:48vsynce.g., make your own constructor that does what you need, only export that and not the generated record constructor symbols
15:48brehautvsync: thats generally considered to be best practise i think
15:49vsynci have a bunch of make-this and make-that in my code, seems to reduce duplicated code and let me do types and preprocessing in a defined way
15:49vsyncbrehaut: yay :)
15:50brehautvsync: although the ->recordname constructor is also fine if you dont need any special behaviour
15:50sshackcemerick's friend seems exactly what I want.
15:51sshackSo the real missing key is a decent central place where all this stuff is well explained. But awesome.
15:52brehautsshack: for better and worse the clojure community isnt into centralised
15:53sshackbrehaut: At least a good how to type page on which bits exist and how they fit together would be useful.
15:53sshack(or, how they don't in some cases)
15:53brehautsshack: one of the clojure docs sites is intending to cover that
15:54sshackFantastic.
15:54sshackI didn't touch it.
15:54brehautsshack: unfortunately its extremely skeletal ATM http://clojure-doc.org/articles/ecosystem/web_development.html
15:55vsyncbrehaut: yeah to me the default constructors and keyword accessors are just handy shortcuts, speeds the start process or if it really is just a boring simple data structure you're passing around
15:56vsynclets ya focus work on the parts that need work, after all given enough time it'd be easy to write everything all perfectly, but there's never enough :P
15:56edward_123Hi does anyone know how the relative directory work for clojure with lein2?
15:57sshackbrehaut: Oh boy is that bare.
15:57Netfeedsolved it with {:keys [] :as hsh}
15:58brehautsshack: with Ring, the github docs / wiki is pretty decent
15:58Netfeedhsh#
15:58sshackI am looking.
15:58brehautsshack: the danger with 'how-to's is that they get out of date really quick
15:58sshackcomposure sits on top of ring, no?
15:58brehautsshack: correct
15:58sshackbrehaut: Well, a how to is a product, just like code.
15:59brehautsshack: http://brehaut.net/blog/2011/ring_introduction if you havent seen it
16:00solussddoes disabling assertions "turn off" pre and post conditions?
16:00TimMcOnly at compile time, I think.
16:00sshackThat wasn't naivety some of the documentation I've read is inconsistent on that.
16:01solussdthanks
16:01brehautsshack: compojure < 0.4 was written prior to the existence of ring
16:02sshackYeah. I remember looking at it back then. Wasn't doing web stuff at the time.
16:02solussdcan assertions be disabled with leiningen?
16:15muhooi vaguely remember there being a way to obtain lein profile information from inside the project, but i don't remember how, and not sure if it'd work with trampoline anyway.
16:19muhooor did i misunderstand that?
16:19solussdinteresting, fn can take pre/post conditions, but the documentation fails to mention it
16:23ChongLiahhh, why would blip.tv do that?
16:24brehautbecause they are bananas
16:24ChongLianyway we could transfer the videos to youtube?
16:24ChongLithere ought to be an official clojure channel on youtube
16:26seangroveYeah, Youtube is a nicer experience anyway, strangely enough
16:26ChongLihah
16:26muhooi like that i can download youtube videos. infoq, not so much.
16:27muhooblip required some packet-sniffing hacking, IIRC, but i got it to work.
16:51sshackmuhoo: That frustrates me so much about info. Their video player is very annoying. and has a teeny weenie ui.
16:53ifesdjeenhi guys,
16:53ifesdjeencan anyone give a hint on how to use defn within a macro?..
16:53ifesdjeene.q. without getting "First argument should be a symbol" error
16:53ifesdjeenas far as i understand, i should use eval?..
17:01gfredericksyou're writing a macro that expands to a defn?
17:01gfrederickse.g., (defmacro defn-let [name args lettings & body] `(defn ~name ~args (let ~lettings ~@body)))
17:01gfredericks^ a macro that expands to a defn
17:07technomancymuhoo: you need a plugin like configleaf for that
17:08ifesdjeengfredericks: yup, I understand that
17:08ifesdjeenproblem that if I have let binding, and named argument, that approach won't work
17:09gfredericksyou have a symbol at runtime instead of compile time?
17:09ifesdjeene.q. (defmacro defn-let [& body] `(let [coll# ~@body] (doseq (defn ....
17:09ifesdjeenexactly
17:09gfredericksah yeah if you want to do the defn at runtime you'll need eval
17:09amalloy(doseq [...] (defn ...)) will never do what you want
17:09ifesdjeenso far I've managed to do it via (intern *ns*), which worked
17:11ifesdjeenamalloy: actually it did. not exactly that way, but it did.
17:11ifesdjeengfredericks: thanks!
17:29muhootechnomancy: thanks
17:37bbloomtpope: nice, good to see the collaboration on the static files
17:41zackzackzackI'm considering how to efficiently manipulate time series data with finger trees. I think I know what to do but I'm not really sure as finger trees are a fairly new topic to me. I'd like to bounce my idea off of somebody who knows what they are doing and see if it makes sense.
17:52squidzwhat's the best way to call git from clojure when it is only for simple tasks on a linux env?
17:52brehautconch?
17:54squidzbrehaut: thanks, ive never used it, but it seems to be what i need. It isn't overkill if all i want to do is git push/pull/merge
17:54brehauti dunno. ive never used it. ask Raynes
17:55brehautits certainly less overkill than a java git (egit?) imp
17:55squidzill give it try, thanks
17:55Raynesbrehaut: Why would he ask me?
17:55RaynesOh.
17:56RaynesCause conch?
17:56brehautRaynes: cause you know about conch
17:56brehauti hope
17:56RaynesI was on LSD when I wrote that.
17:56RaynesCan't remember anything.
17:56RaynesYeah, conch should be good for calling git.
17:56Raynesclojure.java.sh would probably be fine as well, depending on what you want to do with the output.
17:57squidzyeah it just looked over the github page, it looks to be perfect
17:57squidznice work Raynes
17:58squidzi think a simple with-programs git should do the trick
18:00sshackOkay, question for the clojure world. What's the general opinion of app servers in clojureland (in particular jboss)?
18:01Raynes$google immutant
18:01lazybot[Immutant | Home] http://immutant.org/
18:01sshackor are there very clojurish ways to manage/apps.
18:01sshackRaynes: I actually installed immutant just recently.
18:01RaynesI do not know anything about it except that it exists and is active.
18:01sshackI was asking opinions on it. Are they so incompatible with the clojure approach that it'll give me trouble?
18:01RaynesI don't understand application servers.
18:01brehautsshack: IMO use whatever you are comfortable setting up, and what your existing ecosystem is based around
18:02sshackRaynes: 5 second tutorial: They provide things that modern operating systems should have.
18:02brehautsshack: the ring adapters (servlet adapter in particular) make it completely fine as far as i understand
18:02sshackbrehaut: I have no existing ecosystem for this. It's entirely greenfield here.
18:02RaynesImmutant looked interesting during the talk about it at the conj.
18:02RaynesIf you dig immutant, shouldn't be anything wrong with using it.
18:02brehautsshack: do you have experience with container based deployment?
18:02sshackWhich is why I ask, there's often hidden land mines you don't discover until a little ways in.
18:02RaynesI wont hurt you or anything.
18:03RaynesMuch.
18:03Raynes>:)
18:03sshackbrehaut: No. I've never done web development before. Previously I was doing high speed finance, realtime stuff and embedded work.
18:04brehautsshack: then pick whatever makes the most sense to you :)
18:04brehautsshack: ring is server / container agnostic
18:04sshackCool.
18:05sshackI asia lot of questions just to gain an understanding of the space.
18:05llasramAs long as europen to the answers
18:06brehautsshack: spend some time learning about ring then. its worth your time
18:06sshackbrehaut: I'm getting that sense.
18:06sshackfriend seems to take care of my authentication/user management problems btw.
18:07brehauti thought it probably would
18:09jcrossley3sshack: if you're just starting with web dev, and you only have one app, and you don't need anything other than web, e.g. messaging, then immutant is overkill. in other words, if you're not sure you need it, you probably don't. :)
18:10sshackjcrossley3: I'm trying to discover why I need/don't need things.
18:10sshackI've built large apps before. Just never touched web.
18:12brehautsshack: 'webapp' is really just 'app' that happens to have a server and talks http. you can serve http from just about anything
18:12brehautso that just leaves 'app'
18:13sshackbrehaut: Well, it's a bit different than that. The focus can be very different in some spaces.
18:14brehautsshack: so just consider the requirements of your app aside from worrying about 'web'
18:14creaseHey folks, anyone know of existing clojure libraries for static analysis, such as might be used to assemble a call hierarchy ala Eclipse?
18:14sshackWhich is why I was asking about application servers. In an ideal world they handle logging, messaging, management for me.
18:15brehautsshack: serving the web stuff is orthoganl to the rest of your app though.
18:16weavejesterA lot of Clojure libraries tend to be small and focus on solving a single problem, though there are some exceptions
18:17brehautweavejester: the never ending stream of new clojurists 'solving' the lack of rails 'problem' for instance :(
18:17jcrossley3sshack: that's all true, but you probably don't *need* any of that stuff yet. i would focus on building a useful clojure app. just use jetty at first. keep using it until it starts to hurt (usually due to deployment of it and other apps it depends on). and it may never hurt.
18:17sshackbrehaut: Correct. But you're pushing a view that everything is interchangeable bits. That's only true at the high level.EG: When I shipped code for the marines, we spent about 90% of our time it would work out in the desert where it would cost lives for any maintenance.
18:18weavejesterWell, there are some things in Rails that are nice...
18:18sshackperformance wasn't an issue, maintenance was. Move to finance, performance matters, but you can do regular maintenance/bugfixes. The whole environment changes.
18:18brehautsshack: yes. the web part of your application probably should be interchangable. anything else would be like welding tires on to the chassy of a car
18:19sshackAnyways, I presume people with some experience shipping web stuff might have some insight. Thats all.
18:19weavejesterSome sort of scaffold generator might be nice for getting people going, for instance.
18:20brehautsshack: most people use the tools they are familiar with. its about as simple as that.
18:20technomancyjcrossley3: always refreshing to see project maintainers being honest about when not to use their project; nice =)
18:20brehauttechnomancy: when should i not use lein ;)
18:20jcrossley3technomancy: :)
18:20technomancybrehaut: you probably shouldn't use https://github.com/technomancy/lein-scalac
18:21sshackbrehaut: Absolutely. Which is why I'm here. I've reached the limits of what Application/systems programming you can do in mathematica.
18:21brehauttechnomancy: lol :)
18:21brehauttechnomancy: may i suggest never using necessary-evil?
18:21technomancybrehaut: ask me about my emacs libs and I'll have a lot more I can say that of =)
18:21jamiiI can't figure out why calling seq on this https://gist.github.com/4281009 causes AbstractMethodError
18:21brehautsshack: my opinion then is start as simple as possible. just use jetty. either as a container or self hosted
18:22brehautsshack: you'll know when you need to reconsider it
18:22jamiiA parallel core.logic goes to anyone who can fix it :D
18:22sshackbrehaut: I follow you. and I intend to.
18:23squidzbrehaut: I also thought about having a rails-like scaffolding generator
18:24technomancy`lein new` can emit skeleton files
18:24squidzmaybe having a simple generator
18:24sshacksquidz: Ugh. That's a horrible idea. The key point of rails was a well documented path of least resistance for the most common cases.
18:24squidzthat can plugin to lein as well
18:24muhoois there some way to stick a conditional inside a doto?
18:24jamiidnolen: bump ^^^
18:24squidzsshack: dont't get my wrong, I hate rails to be hones, It's just that it as an option would attract possible users that like that kin dof thing
18:25muhoolike (doto (Whatevs.) (.stuffToDo arg) (when (some-test) (.thisThing "foo")) ?
18:26squidzsshack: if it could be designed in a way to be completely orthoganal to the current web frameworks
18:27technomancymuhoo: I don't think so
18:27squidzsshack: it would make me happy to steal some rails guys
18:27RaynesDear everyone: http://blog.raynes.me/blog/2012/12/13/moving-away-from-noir/
18:28muhooRaynes: thank you for writing this.
18:28RaynesYou're welcome, sir.
18:29squidzRaynes: thanks, do you mind if i post to reddit?
18:29Raynessquidz: Have at it
18:30amalloyRaynes: your blog post about lisp has unbalanced parens, mate
18:30Raynesamalloy: Whar?
18:30amalloy(in the section about Friend, to be specific
18:30RaynesFixing.
18:30technomancyRaynes: I wonder if it'd be instructive to link to the refheap diff for moving to compojure?
18:30sshacksquidz: I think I understand what you mean. Steal the intent of rails, rather than the form.
18:31Raynestechnomancy: Potentally. I'll hunt down the diff and link to it.
18:33brehautRaynes: now for the biggest job: updating webnoir.org
18:33RaynesAnd the Noir README.
18:34amalloyjust replace webnoir.org with http://www.textfiles.com/underconstruction/
18:34brehautlol
18:35ibdknoxamalloy: lol that's amazing.
18:35sshackRaynes: Well that makes things simpler for me.
18:35RaynesHaha
18:35RaynesIndeed it does.
18:35amalloyibdknox: iirc it's every geocities gif that had "construct" in the url or alt-text
18:35ibdknoxhaha
18:35technomancyRaynes: are you writing blog posts with paredit turned off again?
18:36brehauttextfiles is truely amazing
18:36Raynesibdknox: It kind of just occurred to me that I should have probably let you read my blog post before publishing it. Is it okay?
18:36RaynesI think I noted that some of what I said was my own opinion, but I may have not been clear enough about that.
18:37ivanhah @ that link to http://www.textfiles.com/underconstruction/mail/
18:38ibdknoxRaynes: looks good to me
18:38RaynesExcellent.
18:38mthvedtivan: you broke my firefox!
18:38RaynesWorks in Chrome.
18:38RaynesUse good browsers, dude.
18:38ivanyeah, I thought about adding a warning but then remembered Chrome
18:39amalloyivan: i bet Raynes will spend days downloading that page
18:39ivanmy Firefox is still alive, downloading images
18:39RaynesI gave up about half way through after 30 seconds, amalloy.
18:39sshackRaynes: It doesn't show up in safari if you follow the link you posted. Went and navigated in from the front page and it was fine.
18:39Raynessquidz: Where did you put it on the reddits?
18:40amalloymy chrome appears to have given up part-way through, unless half of those gifs are broken
18:40mthvedtraynes: firefox is a great browser, it was protecting me from having to view that page
18:40Raynessshack: http://blog.raynes.me/blog/2012/12/13/moving-away-from-noir/ <-- this one? works in safari for me
18:40squidzRaynes: r/Clojure
18:41sshackRaynes: Works now, didn't show up the first time I clicked
18:42amalloysshack: sounds like your irc client does a bad job of parsing links
18:43sshackamalloy: Nope. Just clicked that link again and it works. It had an empty blog post the first time I clicked.
18:44amalloyah. you might have caught Raynes in the middle of an update or something
18:44RaynesYeah, I updated it like 20 times.
18:44RaynesI do that a lot because it isn't until I actually post blogs that people actually notice my typos.
18:45sshackDamn mutable data structures!
18:46RaynesHaha, precisely.
18:49mindbender1how can I write #{"foo" "baz"} to a file
18:49Rayneshttp://news.ycombinator.com/item?id=4918720
18:50amalloymindbender1: pr-str+spit
18:50Raynesmindbender1: (spit "file" (pr-str #{"foo" "baz"}))
18:50Raynesamalloy: I win.
18:50amalloyRaynes: http://lazybot.org/logs/#clojure/2012-12-13 says i won by two seconds, mate. your details are your undoing
18:50mindbender1wow thanks
18:51Raynesamalloy: Yeah, but I won with actual code.
18:51RaynesIT'S QUALITY, NOT SPEED.
18:51amalloypr-str+spit is valid code: ##(let [pr-str+spit 1] pr-str+spit)
18:51lazybot⇒ 1
18:52RaynesYou've won this one, nemesis.
18:52amalloy*chuckle*
18:52callenRaynes: has template inheritance and composition gotten any nicer with stencil?
18:52Raynesdsantiago: ^
18:52RaynesOh, wait.
18:52RaynesI think you're asking that because of the way I use it in refheap.
18:53callenyep.
18:53Raynesdsantiago: YOUR ASSISTANCE IS NOT NEEDED HERE.
18:53dsantiagok
18:53Raynesstencil has a perfect implementation of template inheritance.
18:53callendsantiago: I'd like to hear feedback if it's there. I know you made a proposal to the mustache people.
18:53callenRaynes: is there an example in refheap or the stencil github repo? I tooled around and couldn't find anything just yet.
18:53Raynescallen: I think the way I did things in refheap is just for composibility in my code.
18:54dsantiagocallen: Yeah, I basically consider mustache "finished" as a spec. Every few months some thread will start in the issues proposing some new feature, there'll be much discussion, and nothing will happen.
18:54Raynescomposability*
18:54RaynesWhatever.
18:54dsantiagoAnd since I consider mustache not really complete, I'm looking to other solutions.
18:54callenRaynes: I'm accustomed to Django/Jinja templates, the inheritance/blocks system is VERY simple and "scalable" with respect to complexity there.
18:54callendsantiago: I have many ideas and a lot of experience with small and large projects wrt templating, if that helps at all.
18:54jamiidnolen: on four cores, core.logic is 20% slower. needs some more work :-|
18:54Raynescallen: Oh, wait, you aren't talking about partials, are you?
18:55RaynesI think I got confused.
18:55dsantiagoWhat issues are you interested in, callen?
18:55callenprimarily, my main issue is that using partials to do what I did with {% block blah %}{% endblock blah %} in Jinja is painful and the frontend people I work with can't really understand it or how it works.
18:56callenwhereas the Jinja way is something they can do themselves without any help or explanation from me.
18:56dsantiagoWhat does that Jinja do?
18:56callendsantiago: I'm not trying to assign you homework, but you briefly take a look here: http://wsgiarea.pocoo.org/jinja/docs/inheritance.html
18:56callenI think you'll see what I mean
18:56RaynesI'm actually writing a templating lib, so I might move away from mustache in the future. Gotta eat my own dog food and what not.
18:56callenit lets you set place-holders in parent documents that children can fill in, or otherwise leave to the default.
18:57callenmustache does *not* handle this well at all, from what I know of it so far.
18:57RaynesI don't know though. I haven't had much success with enlive-like systems for general templating before.
18:57callenthe problem is that I would *like* to use Stencil because how efficient and well-built it is, but mustache is painful for me and my frontend people.
18:57callenWe can't really use enlive either.
18:57callentoo intrusive.
18:58dsantiagoYeah, I agree with both there callen.
18:58dsantiagoI actually wrote stencil not for use in a web context, but for pallet.
18:58callenI'm open to suggestions, but this the best candidate so far: https://github.com/sjl/dram
18:58callenit needs to be brought up to production grade like stencil though.
18:58callenhis Readme.md summarizes my situation to a T
18:59Raynessjl: Hear that? Your code isn't production grade. You ought to be ashamed of yourself.
18:59dsantiagoYeah, I agree with what he says there.
18:59callen:(
18:59callenRaynes: he says himself it's not ready :(
18:59callenRaynes: I love the library :(
19:00mindbender1I meant to say how can I write the "contents" of #{"foo" "baz"} to file
19:00Rayneslol
19:00callendsantiago: from that link I provided, do you see the appeal of the Jinja/Django way?
19:00callendsantiago: very little logic, but just enough to be useful. Easy to work with, scales up to more complicated elaborations where you want to reuse template components, etc.
19:02dsantiagoYeah, I mean, I've never been on board with mustache's "no logic" stuff. It's the most logic-filled logic-free language I've ever seen.
19:02callendsantiago: I see logic-less templates as being like abstinence programs. You just end up working around it in horrible ways anyway.
19:03dsantiagoIt depends on what the logic is.
19:03callenhave some self-control and structure, but asceticism helps nobody.
19:03callendsantiago: the two extremes to my mind are _.template and mustache.
19:03callenmaybe Erb is up there with _.template, I don't know.
19:03callenin-between, to my mind, is Django/Jinja
19:03ibdknoxMore on Noir: https://groups.google.com/forum/#!msg/clj-noir/AbAvQuikjGk/x8lKLKoomM0J
19:04callenI realize it may alarm some people, but I think componentizing Noir's functionality into lib-noir makes sense to me.
19:05ibdknoxthat's why we did it :)
19:05ibdknoxit's been that way for a while now
19:05Raynesibdknox: I'm going to quote that in my blog post.
19:08mindbender1seems there's not an easy way
19:09technomancyRaynes: have you thought of going further and splitting out the session related stuff, the validation-related stuff, etc?
19:09Raynestechnomancy: That kills the point of lib-noir.
19:09RaynesI could split it into multiple libraries and have lib-noir tie them together, but despite the objections of some members of the community, the point is batteries included.
19:10RaynesTo a limit.
19:10amalloymindbender1: it's exactly what Raynes said
19:10RaynesThese are things most every body uses in a web app.
19:10RaynesIt isn't ever going to just be a huge collage of crap.
19:11technomancylooking through it, I can see maybe half the namespaces I'd actually use, but not all in the same project
19:11callenbrehaut: except for the ORM, I liked Django. What we're really doing here is moving closer to something like Flask where it's still nicely integrated but you have the choice of overriding and replacing at will.
19:11callenmodularity isn't the only priority people have, unless they're J2EE engineers.
19:12technomancycallen: where's "here"?
19:12callentechnomancy: Noir -> lib-noir
19:12technomancyoh
19:12mindbender1amalloy: #{"foo" "baz"} gets printed rather than "foo" "baz"
19:12brehauti like django except for the ORM, forms, url routing, middleware, user system and templates
19:13amalloywell yes, it's not re-readable otherwise
19:13brehautsouth is nice though
19:13Raynesibdknox: Added your quote to the post.
19:13callenbrehaut: the user system is a component of the ORM. I don't like the forms either, Wtforms which I use with Flask is better. The middleware is better than everything else in the Python ecosystem Flask included. URL routing I could see, I'm not sure what your complaint is re: templates.
19:14callenSouth isn't Django.
19:14brehauti know south isnt django. that was a joke
19:14Raynesibdknox: It's nice to have validation in there from Noir's original author.
19:14callenbrehaut: what don't you like about the templates?
19:14amalloyif you want to print a collection's items separately and not-rereadably you can just (apply pr-str ...)
19:14ibdknoxRaynes: :)
19:15brehautcallen: they always devolve into repetition, boilerplate python, and accidental complexity. jinja helps but its not a panacea. its macros and consistent syntax are big wins over django templates but the underlying model is still lets make PHP a little less shit
19:16callenbrehaut: what would you prefer? I'm a big fan of Jinja.
19:16brehautand even if you varnish PHP is still just shiny shit
19:17callenbrehaut: I'd say Jinja is a pretty huge improvement over PHP.
19:17brehauti would prefer something like enlive (though with clearer documentation)
19:17callenbrehaut: do you work with frontend people?
19:17brehautyes
19:17callenbrehaut: having something that intrusive isn't an issue?
19:17Raynesbrehaut: Well, you know I'm doing that. Also, tinsel.
19:18callenbrehaut: I'd rather just kick the frontend guy a map/dictionary.
19:18brehautRaynes: indeed. i am hopeful. also cgrand has been making some noises about a new version of enlive, so maybe that will improve things too
19:18mindbender1,(reduce str (interpose "\n" #{"foo" "baz"}))
19:18clojurebot"foo\nbaz"
19:18Raynesbrehaut: He has?
19:18technomancyRaynes: the github link on your blog is broke
19:18seangrove,(clojure.string/join (interpose "\n" #{"foo" "baz"}))
19:18clojurebot"foo\nbaz"
19:19Raynestechnomancy: How so?
19:19RaynesOh, it didn't hyperlink.
19:19technomancyaye
19:19brehautRaynes: i fail at twitter spelunking
19:20callenI just don't see enlive working, putting its complexity aside, just because of how intrusive defining CSS selectors against the templates is. It's too complected.
19:20callenI have a hard time believing that could work when the frontend/backend linkages are really being tested, like during a time of serious refactoring.
19:20RaynesMy selectors are functions. So are tinsel's.
19:20brehautRaynes: https://github.com/cgrand/enlive/wiki/Enlive-N%28ext%29
19:25nsxtcallen: Out of curiosity, what's your take on libraries like jQuery? You're doing more or less the same thing when you're binding DOMElements to events.
19:26callennsxt: that's frontend. The standard for "complection" is higher when you cross a barrier like frontend/backend.
19:26muhoohow would i escape a & in a string in nrepl/nrepl.el? \& doesn't seem to work
19:28muhoo,(let [foo "foo & bar"] (str foo " isn't even a problem here, but nrepl.el pukes on it"))
19:28clojurebot"foo & bar isn't even a problem here, but nrepl.el pukes on it"
19:29nsxtcallen: Understood. Couldn't you make the same argument about 'name' attributes on inputs though?
19:29nsxtHTML inputs as a gateway to server params
19:29TimMccallen: You'd like ur/web.
19:32callennsxt: that's less problematic than prolifically intruding into frontend document structure
19:34seangroveIs there a stand-alone nrepl js snippet I can copy/paste into a page to get nrepl going, or would it need closure and everything that implies?
19:35seangroveI suppose I answered my own question there. Damn.
19:35bbloomseangrove: you want a CLJS or a CLJ repl?
19:35seangroveA cljs repl
19:35seangroveI'm trying to get a cljs repl in a content-script
19:35hiredmana clj repl written in cljs?
19:36bbloomhiredman: just sending expressions to the server to evaluate, a la http://tryclj.com/
19:36seangroveHeh, no, just a way for me to connect nrepl.el to a content-script that doesn't have closure or any cljs code in it
19:36hiredmanhttps://github.com/hiredman/nrepl-cljs-middleware https://github.com/hiredman/drawbridge-cljs
19:37hiredmandawbridge-cljs is a cljs drawbridge client, drawbridge being the nrepl http transport
19:37hiredmanseangrove: oh
19:37hiredmanseangrove: then ignore me
19:37hiredmansome day someone is going to want a clojure repl in a webpage, and then I will be ready
19:37seangroveNo problem, appreciate the intent
19:37seangrovehahaha
19:38seangroveUntil that day...
19:38hiredmanuntil then everytime someone says "I wanta cljs repl" I will leap to my feat, then sit down slowly
19:38hiredmanfeet
19:39hiredmanit is neat, I have a webpage somewhere with a little popup with codemirror that can send cljs to the server to generate javascript, then send it back to be evaled
19:41seangrovehiredman: Suppose it would be cool to have right in the webkit console
19:41sshackRaynes: So if Chris is focusing on light table and noir is being sunset, what is happening to sql norma? Is that safe to use?
19:42Bronsakorma*
19:42seangroveType cljs -> sent round trip for translation to js -> js comes back, is evaled, output to the console
19:42Raynessshack: ibdknox indicated that korma is fine last night.
19:42sshackBronsa: Uh yeah Korma.
19:42sshackRaynes: Alright, cool
19:42RaynesThere is probably still motivation for maintaining it. It's just that there wasn't any motivation to maintain Noir. We have equal and better solutions to that particular problem now.
19:42sshackI may think about sending in a patch for cursors then when I come to it.
19:43seangroveIs compojure the new new then?
19:43seangroveI always thought Compojure was a bigger library than noir, suppose that's not an appropriate assesment
19:43sshackI thought composure was the old new.
19:44sshackIt is the granddaddy of them, iirc.
19:45ibdknoxBronsa: in Clojure 1.5.0 column metadata has to be an integer as well :/
19:45ibdknoxlol
19:45Bronsadang
19:46akhudekI
19:46ibdknoxBronsa: btw, you are currently my hero
19:46akhudekI'd love to see more movement on the Korma filed issues.
19:46bbloomibdknox: what would it be if not an integer?
19:47ibdknoxbbloom: a long?
19:47ibdknoxbbloom: since that's the default number type these dyas
19:47ibdknoxakhudek: 3-4 people have said they'd step up and help, none of them have had the time it seems
19:47bbloomibdknox: oh, ah, yeah, dur. integer == long in my mind :-P i was thinking you wanted a fraction in there for some ungodly reason
19:48ibdknoxbbloom: lol at line 1/3 there's a terrible bug...
19:48bbloomibdknox: i did the column metadata patch, it was pretty easy
19:48bbloomshouldn't be hard to switch to a long
19:48bbloomjust getting the patch into the release is the tough part
19:49bbloombut line & column metadata is inadequate in the current reader all around (which i'm sure you know)
19:49ibdknoxyeah, that's why Bronsa is my hero: I stopped using the Clojure reader :)
19:49bbloomah, yes, Bronsa++
19:49ibdknoxI added all sorts of position info into blind
19:49bbloom(inc Bronsa)
19:49lazybot⇒ 1
19:49ibdknoxnamely on symbols
19:49akhudekibdknox: that's too bad, but I understand, I don't have the time myself these days. I haven't even cleared my todos on two other small libraries.
19:49ibdknoxwhich is something I really needed
19:49bbloomibdknox: yup, dnolen needs it too for cljs source maps
19:49ibdknoxand what kept me on my own forked crazy version of clojure
19:50ibdknoxso glad to be rid of that
19:50ibdknoxdnolen: I have a fork of blind that has position info on most everything
19:50ibdknoxdnolen: maps, vectors, lists, symbols, wrapped reader things (like @blah)
19:51bbloomibdknox: glorious. please contribute that back
19:51ibdknoxI wasn't sure if others would want that, I imagine it's marginally slower
19:51ibdknoxcouple of extra if checks
19:52squidzibdknox: in your korma library, does defentity automatically create the table? if not, is there an easy way to do that with korma besides executing raw sql?
19:52bbloomibdknox: is LightTable making any use of the CLJS analyzer?
19:53akhudeksquidz: it does not, but I think there are table manipulation functions in clojure.java.jdbc
19:53akhudeksquidz: http://clojure.github.com/java.jdbc/doc/clojure/java/jdbc/UsingDDL.html
19:54squidzakhudek: thanks
19:54ibdknoxbbloom: yes, your changes won't affect me
19:54ibdknoxbbloom: it's fairly simplistic right now, though I want that to change - once we agree on a format that will work for both clj/cljs
19:54bbloomibdknox: ok cool. i'm just curious what you're using it for and if you have any needs/improvements/whatever. i want to start pushing a bit harder on it
19:55ibdknoxbbloom: not blowing up when looking at CLJ ns forms would be nice :) import statements kill it
19:55ibdknoxI bet that one's a really simple fix
19:55ibdknoxjust didn't look into it
19:55ibdknoxalso feature expressions were a blocker here I thought
19:55bbloomibdknox: if you file a ticket, somebody will :-)
19:56bbloomi don't know what the situation is with feature exprs
19:57ibdknoxbbloom: yeah I suck at that, will try to be better
19:57bbloomibdknox: eh, jira is a nightmare
19:57bbloomibdknox: once you figure out which buttons to press (and avoid all other buttons) it's not too painful to throw some crap in there
19:57ibdknoxfor whatever reason there's a huge leap for me doing that vs filing an issue on gh
19:58bbloomi agree entirely
19:58bbloomit's actually a big problem, imo
19:58bbloomand not accepting pull requests is a bitch too....
19:58ibdknoxI wonder if we could allow filing and have a synchronization thing that just dumps them into jira...
19:59bbloom*sigh* jira plugin or API? :-/ not interested....
19:59ibdknoxhaha
19:59ibdknoxme. neither.
19:59clojurebotPardon?
19:59ibdknoxclojurebot: shutup
19:59clojurebotIt's greek to me.
19:59bbloomi don't know the details of how clj wound up in the situation it's in, but i think that we're far from the only two who find jira to be a blocker to contributing
19:59Bronsaibdknox: i pushed a fix that doesn't require calling int everytime
20:00bbloomgithub really needs contributor agreement tracking as a feature
20:00seangroveYeah, I always find it less painful to muddle along somewhere local with a fix than to open a jira issue
20:00seangrovebbloom: Could be easy to add as a commit service
20:00ibdknoxBronsa: would it potentially be better to just store them as ints?
20:01callenibdknox: clojurebot is sassy today.
20:01seangroveThe build status for a commit could be set to fail if not done by someone who's signed the CA
20:01bbloomok well anybody willing to start the "boo jira" thread on the dev mailing list, feel free… i'll chime in, but i'm going to avoid stirring the pot :-P
20:01Bronsa,(class (inc (int 1)))
20:01clojurebotjava.lang.Long
20:01ibdknoxfail
20:01seangroveI'd be happy to write the service next weekend if that'd help :)
20:01bbloomheh.
20:02bbloomseangrove: how would it work / what would it do ?
20:02seangroveBut I doubt anyone in the current flow feels much pain, it's a nice insulator
20:02technomancyI'll happily join a jira lynch mob
20:02ibdknoxseangrove: I imagine the problem isn't limited from a technical stand point. This is largely a process issue
20:02ibdknoxooo
20:02ibdknoxwith technomancy support, we're bound to win. He's tall.
20:02bbloomibdknox: i just met technomancy in person the other day. tall is an understatement
20:02seangrovebbloom: Whenever someone submits a pull request, you can use the GitHub hooks to fire off a service that checks the commit for authors, and it's allowed to set the "status" of the commit to pass/fail
20:02technomancy"evil twin" goatee helps
20:03bbloomseangrove: hm, i'd be interested to see how that works out
20:03bbloomi know github has some new integration thinggies w/ the CI servers and what not
20:03seangroveSo one of the services you'd have would just check to see if the commit author has signed the CA
20:03bbloomdunno much about that integration
20:03seangroveYeah, basically pretend to be a CI server
20:03ibdknoxseangrove: oh that's cool
20:03bbloomseangrove: even if the clj folks don't want that, SOMEBODY would
20:04seangroveClojure's really the only use case I know for it though, hah
20:04hiredmanthe ca agreement isn't the blocker on prs
20:04holoibdknox, hi! in korma: will the ssl issue for heroku db be solved someday?
20:04hiredmanprs are, rich likes patches
20:04bbloomyou can just add .patch to the end of the PR and you get a patch...
20:04hiredmanI mean "righ likes the workflow around patches"
20:05hiredmanrich
20:05technomancybbloom: but you can't shepherd it through a confusing flow chart diagram that will intimidate all but the most determined of contributors
20:05hiredmanpatches me an immutable artifact or something, I dunno
20:05seangroveNope, don't think there's much I cared for about it :P
20:05technomancyit's intended to separate the sheep from the goats
20:05seangrovehaha
20:05seangroveI think that's probably somewhat right
20:05bbloomtechnomancy: it took me quite a while to find my way around and i felt really lost
20:05brehautim having a massive mindblank on 'prs'; all that comes to mind is shiny guitars
20:05bbloomtechnomancy: i almost didn't become a contributor
20:05hiredmanpull requests
20:05seangroveAnd that's probably fine... a bit of a bummer, but understandable
20:06tpopeyeah github prs let way too many sheep in
20:06tpopeor goats
20:06ibdknoxfwiw, it prevent people like me from wanting to do it
20:06tpopeI'm not sure what the sheep and goats are about
20:06ibdknoxprevents*
20:06technomancyibdknox: same
20:07seangroveWell, sounds like all of us that don't really matter are on the same side then :)
20:07seangroveNow all we have to do is convince the old guard
20:07ibdknoxtechnomancy is arguably part of the "old guard" lol
20:07ibdknoxtechnomancy: how long have you used clojure?
20:07bbloomi dunno, seems a little unfair to say that the guy working on the facy IDE generating a lot of buzz and the dude who makes the defacto standard clojure distribution and build tool don't matter
20:07technomancyibdknox: not as long as hiredman and cemerick
20:07brehauttechnomancy: at least 4.5 years though right?
20:08technomancybrehaut: just 4
20:08hiredmanyes, but I have no high profile projects
20:08brehautout of 5.25 of its public life
20:08S11001001technomancy: "just"
20:08ibdknoxlol
20:08TimMctechnomancy: The latter is giving a presentation right now; your message popped up on his screen. :-P
20:08ibdknoxI'm a young'n only about 2 years for me
20:08ibdknoxcemerick: OMG PRESENTATIONS
20:08technomancyTimMc: haha, where
20:08technomancy?
20:08hiredmancemerick: !!!!!!!
20:09hiredmanthe boston clojure meetup
20:09ibdknoxhe now hates us.
20:09RaynesI've been around longer than technomancy, I think.
20:09ibdknoxRaynes: really? I didn't know that
20:09RaynesI was pretty stupid at the time though, so it's likely nobody remembers me.
20:09technomancyRaynes: I think you might have been a bit more shy on IRC in the early months?
20:09bbloomok well i think this is a political battle, and i suck at politics
20:09brehauti spelunked my mail inbox. the earliest email in have about clojure was september 2008. im slightly amazed that its been that long
20:09hiredmanis it really politicial?
20:09bbloombut if anyone doesn't suck at politics and want's to storm the jira beach head. i will follow you into battle
20:10ibdknoxI will also follow
20:10technomancyI've been around roughly as long as atoms; I think the week I joined I saw that announcement.
20:10hiredmanit is rich's project, rich prefers patches, no one has provided a technical argument that has convinced him to use pull requests
20:10bbloomhiredman: that's why it's political, it's not a technical argument
20:11hiredmanbbloom: how so?
20:11bbloommore likely to get bug reports and patches from less casual folks
20:11hiredmanoh
20:11bbloomhiredman: ibdknox is a HUGE consumer of clj and cljs and surely finds *lots of issues* but won't open tickets b/c jira is annoying
20:11hiredmanwell I think that is actually more likely to make rich run away from prs
20:11hiredmanfewer drive by issues
20:12hiredman*shrug*
20:12holoibdknox, i forked korma and supported ssl with pg heroku db and it's working in my project. i would hope your experienced eyes could take a look at it when you have time. i will soon make an issue report, and my resolution
20:12technomancywow, there were ~900 members on the clojure mailing list when I started; now it's ~7000
20:12brainproxy:)
20:12technomancydiscussion level is a bit lower than it was though
20:13brehauttechnomancy: i used to follow irc from work via the n01se logs. the week i got a new job and could IRC was the week after rich stopped being a regular participant
20:13brainproxythis is a pretty good sized irc channel too
20:13hiredmanbbloom: releasing libraries and maintaining them is a great way to contribute :)
20:13technomancybrehaut: hah; ouch
20:13bbloomhiredman: my experience with "big" ticketing systems like Jira, or bugzilla or team foundation shit at msft or whatever is that they force you to think about a ton of stuff that doesn't matter
20:13technomancyhiredman: inc
20:13callentechnomancy: I guess if it changed that means the mailing list is stateful. That should be fixed so it can be immutable.
20:13bbloomhiredman: "is this a 'Defect' or an 'Enahancement'?"
20:14bbloom"is this low, medium-low, medium, medium-high, or high priority?"
20:14bbloomall that nonsense that gets filed into fields
20:14ibdknoxtechnomancy: hiredman: I agree, but the issues thing would still be useful
20:14bbloomit doesn't matter
20:14hiredmanbbloom: I have never thought about any of that when I open a clojure ticket
20:14technomancycallen: (swap! mailing-list into (get-noobs))
20:14hiredmanbbloom: I make all my tickets high priority
20:14bbloomlol
20:14muhooany thoughts on trying to get nrepl.el to accept & in a string without puking?
20:14bbloomhiredman: well that shit adds up. i'm speaking more generally now. ask ibdknox to tell you some visual studio team triage war stories sometime
20:15bbloomi'm sure they are hilariously
20:15hiredmanbbloom: why? just ignore the parts of jira you don't like
20:16bbloomhiredman: it's still cognitive load
20:16technomancymuhoo: never heard of that; probably raise it on the nrepl.el mailing list or issue tracker
20:16hiredmanbbloom: then you aren't ignoring it
20:16hiredman"don't know, don't care"
20:16bbloomhiredman: it's not just the random fields
20:16technomancy"Not my circus; not my monkey" as they say in Polish
20:16ibdknoxbbloom: you have no idea
20:16TimMchaha
20:16hiredmantechnomancy: indeed
20:16seangrovetechnomancy: Do they say that?
20:17technomancyseangrove: I heard it on the tweetersphere
20:17bbloomibdknox: i do have an idea, i worked on VS integration for XNA and i'm good friends with Alex Turner :-)
20:17muhoois the problem jira itself, or just the top-down model of the project?
20:17ibdknoxhaha well there you go then
20:18bbloomand know kav latiolais and scott nonnenberg a bit too, i think you worked them right?
20:18ibdknoxKav and I shared an office for about a year
20:18ibdknoxI saw them a couple months ago when they were down here in SF
20:18squidzman it seems like developing in clojure happens faster than when I do something in Java, even though I just started clojure. I can't wait until I start getting very familiar with the language. Very exciting :D
20:18muhoobecause, it's easy to focus on the technology, when the issue is more a personality preference. rich doesn't seem like an open-source guy, he was "a happy LispWorks customer" by his own admission, i'd guess that if he wrote clojure 15 years ago it would never have been opensourced
20:19bbloomright. so then you could tell hiredman all about how the terrible jira-ish UI of TFS makes triage meetings suck :-P
20:19technomancytoo bad antares isn't around for the 5 minutes of jira hate
20:19brehautlol
20:19hiredmanbbloom: are you operating under the assumption that I don't use jira?
20:19technomancymuhoo: I suspect that's a big part of it despite Stuart repeatedly insisting otherwise.
20:20bbloomhiredman: no, i'm operating under the assumption that you, like a large number of people, are numb to the affects of bad UX in a way that a non-trivial number of oddballs like myself are not
20:20hiredmanI think we've been through 3-4 or four ticketing systems in the 2 (alsmost 3?) years I've been working at sonian
20:20hiredmanwith jira being the most recent
20:20technomancymy previous two jobs both adopted Jira about a month before I left
20:20hiredmanthey all suck
20:21ibdknoxI never understood that
20:21ibdknoxwhy do they suck?
20:21callentechnomancy: so goes ticketing, so goes the company.
20:21ibdknoxIt's a relatively straightforward problem to solve
20:21hiredmanI think we were on agilezen before jira?
20:21bbloomibdknox: the same reason a lot of stuff all sucks: products created for the buyers not for the users
20:21muhootechnomancy: you probably run the most active clojure project in terms of sheer number of open-source contributions, so you're aware of how much work it is to manage.
20:21callenibdknox: ticketing involves humans. it's a human problem.
20:21callenibdknox: you can't make ticketing good without having good humans.
20:21bbloomcallen: yeah that too
20:21brehautibdknox: really? its all about taxonomy and workflow. humans suck at those two things
20:22technomancyibdknox: selling ticketing software means being all things to all people
20:22hiredmanagilezen had all kinds of stability issues, and in generally felt like using someone's hobby project
20:22bbloomwhich is why i advocate fewer features and more humans :-P
20:22callenJIRA is an attempt by management to strait-jacket humans into not being silly humans by subjecting them to something unpleasant.
20:22callen </MichaelOChurch Propaganda>
20:22hiredmanthe best issue tracker is git
20:22technomancymuhoo: it's less work when you trust contributors to be responsible adults =D
20:22bbloomibdknox: you've seen the absurd customizability of product studio and tfs… it's yet-another-slightly-tuned database table as an app
20:22bbloomthere's this category of categories of apps i like to call "filemaker for X"
20:22muhootechnomancy: well said.
20:22ibdknoxbbloom: we estimated the amount of time we lost as a result of TFS during dev 10
20:22hiredmanwell, really the best issue tracker is an immutable database
20:22bbloommost ticketing systems are "filemaker for geeks"
20:23ibdknoxbbloom: it was a staggering number
20:23technomancymuhoo: the only time I've had to straight out revert a contributor's merge was when they didn't realize amalloy's pull request was meant as a joke
20:23hiredmanbut when you say things like that people thing you are trying to sell datomic
20:23frozenlockNoir's dead! Noooooo
20:23bbloomibdknox: oh, i know. but i'm sure it wasn't as bad as exchange dog fooding for xbox org
20:23bbloomlol
20:23bbloomthree or four occurrences of 2-week-long email deliverability nightmares
20:23hiredmanjira has JQL, why not just give me a real database?
20:23ibdknoxhah
20:24sshackbrehaut: Linking to this _> http://brehaut.net/blog/2011/ring_introduction is an excellent start.
20:24technomancyfrozenlock: it's just shed its corporeal form and evolved into an energy-based being or something
20:24bbloombut yeah, there's a ton of these "filemaker for X" businesses and they all suck at UX
20:24muhootechnomancy: maybe we should put rich and RMS together in a room sometime and see what happens.
20:24brehautsshack: thanks, though im not sure what the context is atm
20:24bbloomticketing systems, CRM systems, social media monitoring, customer support, order tracking, etc
20:24frozenlocktechnomancy: But then it will come back and help us build a weapon to destroy the energy beings from the other galaxy, right?
20:24bbloomthey are all rows and columns and suck
20:24technomancyfrozenlock: time will tell
20:24sshackbrehaut: The context of getting one unto speed on web dev in clojure.
20:24ibdknoxsome day I'll fix it
20:25bbloomheh good luck with that
20:25brehautsshack: ah. well that a win then :)
20:25sshackbrehaut: I have a pretty good idea of the landscape up until the point where i'd want to go clustering/app severing and such.
20:25technomancyI wish I had a good excuse to finish die-roboter
20:25sshackbrehaut: You can always use more polish of course. but it's a great start.
20:26sshackThe links at the end are also useful.
20:26brehaut(and 2 years out of date. yay blog posts :/ )
20:26sshackbbloom: accounts receivable apps.
20:26seangroveHrm, what's the equivalent of `if ("undefined" == typeof CustomEvent)` ?
20:26seangroveIn cljs
20:27technomancybrehaut: were you going to submit a version of that to clojure-doc.org or something?
20:27sshackbbloom: The secret is finding a market that will pay obscene amounts of money, for a simple interface to a database table.
20:27brehauttechnomancy: i offered it to them. i havent had a chance to do any updates myself. but it looks like they didnt want to use it
20:28cemericktechnomancy, hiredman, ibdknox: wat wat wat
20:28cemerick:-P
20:28technomancymuhoo: oddly enough contributing to Emacs is weirdly similar to Clojure; you have to mail in paperwork and use bzr
20:28brehauttechnomancy: i want to try to update it over the summer (re:winter) break, to at least use 1.0 versions of libs and recent clojure
20:28ibdknoxcemerick: oh nothing, carry on!
20:28ibdknoxcemerick: ;)
20:29brehauttechnomancy: which is slower? paperwork or bzr?
20:29technomancymuhoo: but you can tell rms values contributions from other hackers above all else; he's just really paranoid about legal threats
20:29cemerickI didn't read the log; did someone ask something, or am I being trolled? :-P
20:29technomancybrehaut: heh
20:29ibdknoxcemerick: mega-trolled.
20:29cemerickcool
20:29brehauti say that because i am sad. bzr had a nice interface even if it was the perfect fit for a turtle icon
20:29technomancymuhoo: you could make the argument that GNU projects are high-profile targets or something; can kind of see that, but it still means I don't try to contribute.
20:29cemerickmeta-trolled is what I did to Raynes earlier :-D
20:30Raynescemerick: ?
20:30S11001001brehaut: take it back, bzr is awesome
20:30muhootechnomancy: well the whole GNU project was started as a reaction/defense against legal land-grabs, so not surprising he's so paranoid.
20:30holois there any way for the buildpack in heroku to not try to build my scripts which are in src? I think they take up some useful space in the slug
20:30cemerickRaynes: just for you, buddy http://groups.google.com/group/clojuredev-users/msg/69de82d45e321e13
20:31S11001001brehaut: oh I can read
20:31technomancyholo: you mean AOT compilation?
20:31seangroveHah
20:31seangrove"+1 for -> indenting as a regular function and adding a vote to ignore everything Chas just said."
20:31muhootechnomancy: in the case of rich, i think he'd rather be in a hammock thinking up amazing stuff and solving hard problems than managing a cacophony of proto-anarchist contributors :-)
20:31S11001001brehaut: I thought tla had perfectly acceptable speed, so bzr practically breaks the sound barrier.
20:31holotechnomancy, thanks. no, i just use the scripts locally, so i don't really need them there
20:31RaynesI'm going to beat you to death, cemerick.
20:31technomancymuhoo: yeah, but every Walt Disney needs a Roy Disney to handle practical stuff
20:31RaynesSleep with one eye open.
20:32ohpauleeztechnomancy: That is both hilarious and profound
20:32brehautS11001001: lol :) i only stopped using it because the whole world uses git, and a DVCS that nobody else uses is a sad situation
20:32ohpauleezgood ol' Roy
20:32cemerickRaynes: I sleep with katanas, boy
20:32technomancyholo: oh, gotcha. you can override the compilation behaviour by creating an executable `bin/build` script that does `lein compile myapp.main` or something
20:33muhootechnomancy: actually, didn't clojure start in some ways as a reaction against complexity and cruft, the kind that open source projects tend to accumulate a lot of?
20:33technomancyholo: but typically .class files are not very big; if your slug size is too large it's unlikely that's the first thing to check
20:33S11001001brehaut: I kept using tla until 2008, ubuntu's enough for me, and git's semantics are that bad
20:34technomancymuhoo: that might be a bit of a stretch
20:34sshackmuhoo: You're walking through a minefield there.
20:34holotechnomancy, but maybe some dependencies (specified in project.clj) are only used in the script, and that would make it reasonably bigger right? or all the dependencies are loaded in the slug, regardless of being used or not?
20:35muhoosshack: yes, i'm aware of the dangers, but i figured i'd at least stick a tiptoe in there.
20:35muhoosshack: but i'll stop now while i still have legs :-)
20:35brehautS11001001: i use git either a) via magit, b) consulting the docs extensively. i just cant seem learn that stuff
20:35technomancyholo: yeah, dependencies can certainly bloat up the slug size. you can store them under the :dev profile for things you don't use in production.
20:36holotechnomancy, insightful.
20:38callentechnomancy: http://en.wikipedia.org/wiki/Slug_(mass) ?
20:40callentechnomancy: when you say slug, do you mean the final uberjar?
20:40holoi always thought of slug related to a disgusting slow animal, living in the dark undergrounds
20:40technomancycallen: it's the unit of deployment with heroku
20:40technomancybasically a tarball that includes config and process manifest stuff
20:40S11001001brehaut: I know it pretty well, and I've used it for work for the past 3 years. So when I do a personal project, I prefer to enjoy using my VCS :)
20:41brehautS11001001: im just not much of a tool using ape i guess
20:41callentechnomancy: why is lein-heroku still experimental, just wondering?
20:42technomancycallen: it's just a lot of work to duplicate everything in the toolbelt on the JVM
20:42holocallen, it's a very cool concept. the slug stores the application files ready for being launched everytime a process for the application is started
20:42technomancyplus startup time makes it annoying to deal with
20:42callentechnomancy: is the objective to reduce the need to gem install stuff?
20:42technomancycallen: yeah, but we have native installers for the top 3 platforms now
20:42callentechnomancy: do you use drip re: startup time?
20:42technomancyso it's not as important
20:43S11001001Back in my day, we had to walk uphill both ways and email patches to contribute to emacs :)
20:43technomancycallen: no, I just don't start lein very often
20:43callentechnomancy: sacrilege! :P
20:43technomancyit's true; just leave it open
20:43TimMccemerick: Sorry, it's all my fault.
20:44cemerickTimMc: what is?
20:44callentechnomancy: oh I see what you mean, you live in the command environment in provides.
20:44callenit*
20:44TimMccemerick: I noted that IRC hilites were showing up on your screen.
20:44technomancywell, in nrepl basically
20:45squidzis anybody familiar with haskells Snap framework? it is supposed to be very modular, which is what I guess compojure + ring are going for.
20:45cemerickTimMc: heh, no worries
20:45squidzhttp://snapframework.com/
20:46callensquidz: you probably don't want to walk into that, so tread carefully if you ask in #haskell.
20:46S11001001like half the people chatting now are all in the same room
20:47callensquidz: it'd be comparable to making a joke in a webcomic about how silly frequentists are, and how bayesians *really* know what's up.
20:47squidzcallen: ask what in #haskell?
20:47TimMc&(.-length "foo")
20:47lazybot⇒ 3
20:47callenanything involving the yesod/happstack/snap holy war.
20:48squidzoh no, I am only speaking from my own experience. I'm not going to ask #haskell. Just wanted to know if we are striving towards something similar
20:48callensquidz: I don't know how similar it is. People actually reuse and recombine the components in the Clojure community because Ring is the agreed upon base.
20:48callensquidz: Haskell doesn't have something comparable, so Snap is only modular to the extent that you can pick-and-choose within the Snap framework.
20:49brehautwhile many new clojurists might think 'hmm. clojure needs rails' at least none of them have thought 'hmm. what clojure really needs is a jenga tower of monadic code just to do a hello world web app'
20:49callenthere's technically an analogue to ring/wsgi/rack in Haskell, but not everybody uses it.
20:49cemerickbrehaut: oh god rails
20:49calleninc brehaut even though I still like Django templates.
20:50callenbrehaut: be careful, an ex-haskeller might see algo.monad and get some funny ideas
20:50S11001001brehaut: I'm thinking it right now
20:50S11001001brehaut: so thanks
20:50brehautcallen: i do get funny ideas with algo.monads
20:50callenwhips*
20:51callenTimMc: I saw what you said about UrWeb. Not funny :(
20:53TimMccallen: As in, you wish it were usable?
20:54TimMcor that it's completely unlike what you want?
20:54callenTimMc: unlike what I want. I'm not a "TYPE ALL THE THINGS" fascist.
20:54callenTimMc: if I was, I'd be in #agda, not #clojure
20:54Raynescallen, squidz: I once started a yesod website. And then I actually looked at it and ran screaming.
20:55callenRaynes: I tried to like Haskell. Scotty came close. It was just too much to do the simplest things though.
20:55jaimefare there any non-jvm implementations that are complete? clr?
20:55RaynesI like Haskell.
20:55RaynesI don't like yesod.
20:55callenjaimef: complete? no. Close? ClojureScript.
20:55callenRaynes: I like learning things from Haskell without actually using it in production.
20:55callenjaimef: it's becoming hipster-cool to write node.js apps in clojurescript.
20:55RaynesIt is?
20:56brehautwait, that work now?
20:56RaynesI guess since it isn't completely broken now.
20:56Raynesbrehaut: Last I checked they at least got more than one file compiling at a time. ;)
20:56callenbrehaut: define "works"
20:56RaynesBut AFAIK you can't really write node libraries with it.
20:56brainproxythat's how I got my start in clojure ... trying to make cljs and node play nicely, so I could benefit from immutability
20:56callennope, lol.
20:56RaynesBecause of all the Clojure that gets stuffed in with it.
20:56brehautRaynes: that sounds like a feature, not a bug
20:56tomoj`you can still write node libraries
20:56tomoj`no one probably cares if there's 30kb or whatever extra in your package
20:56Raynestomoj`: Then someone needs to document it, cause I don't get it.
20:57brainproxybut then I read a clojure book and decided to just go whole hog w/ clojure and jvm :D
20:57callentomoj`: if they cared about well-made software and libraries, that wouldn't be using Node.js
20:57tomoj`problem is, you can't make multiple node libraries which interoperate nicely
20:57RaynesYeah, that's "you can't write node libraries"
20:57Raynes:p
20:58tomoj`I think if you don't use advanced compilation it might work?
20:58callentomoj`: essentially.
20:58tomoj`well, I'm thinking of protocols
20:58callenis everyone hell-bent on advanced in the cljs community because it shakes off the parts of Clojure you're not using?
20:59wingyhow do i add keys/values in a vector to a map?
20:59tomoj`and all your own code
20:59callenI would hope that wouldn't be *that* prolific a problem.
20:59tomojI guess protocols need to work even for node.js users
20:59tomojI just stopped caring about supporting node users :/
21:00tomojswannodette/mori is an example of a node library in cljs
21:00tomojbut it's a bit out of date :(
21:00brainproxywingy: conj?
21:00tomojI could blog about it but I don't have a blog
21:00wingybrainproxy: yeah
21:01tomojthere doesn't seem to be a way to run an npm hook after all packages are installed
21:02tomojotherwise you could have something that looked at all the installed packages and ran cljsc
21:02brainproxytomoj: postinstall?
21:02tomojI think that's per package?
21:02jaimefclojurescript has to be better than dart :P
21:02tomojI guess every cljs package can put in a postinstall
21:02tomoj..but then how do you avoid running cljsc too many times
21:03brainproxyi see what you're saying
21:03brainproxyactually, the best thing would be to compile prior to publishing to npm registry
21:03tomojbut that won't work
21:03tomojwell, maybe in simple or whitespace
21:03tomojbut not advanced certainly
21:04brainproxyhmm
21:04tomojyou have to compile with all the cljs packages you're going to use
21:04brainproxyman, it's been forever since I messed w/ my node-clojurescript lib
21:04brainproxytrying to remember how I was dealing with that
21:05tomojmaybe we can get incremental builds out of the cljs analyzer/compiler?
21:06brainproxyi had figured out at one point how to get both npm style requires and cljs namespace require/use working in the same projects
21:06tomojdefine a cljs require extension which sends over the file to be analyzed and gets output just for that file, but consistent with all the other output so far?
21:07tomojand require a jvm as part of build
21:07tomojer, if it's a require extension you'd need it during runtime, huh
21:07brainproxyi think my plan was to augment package.json in such a way so that you could transparently keep both pre-compiled and compiled code in the same project
21:07pppauli see a ring async repo, what would be some use-cases for it where it would greatly benefit performance?
21:08ToxicFrogOh hey. IDEA 12 came out and I didn't notice.
21:08brainproxythen that way, if you had a bunch of cljs projects depending on each other, you could do an advanced compilation and everything would just work
21:08tomojoh, right
21:09tomojkeep around pre-compiled, then just call closure in post-build?
21:09tomoj..or runtime?
21:09brainproxydang, don't remember, and i eventually gave up on it
21:10akhudekI must be doing something wrong. Lein checkouts are not working for me, it's always using the version in my local maven repo instead of the src version. The correct src directory even comes first in the classpath. :-(
21:11tomojhmm, you're supposed to have the checked out project installed (`lein install` inside that project) and to depend on the checked out version, I believe. doing that?
21:12akhudekyep, set the version of the checkout to 1.0.0-SNAPSHOT
21:13tomojoh, I thought the classpath was bad
21:13tomojso.. is the checkout a symlink? and if so it's not broken?
21:13tomojthat's the only problem I ever have :(
21:14akhudekyup, and lein classpath even looks right
21:14akhudekvery confusing
21:24seangroveI can't seem to get cljs to spit out ("if (typeof X == 'undefined') {}")
21:24seangroveShould I be using js/*?
21:25tomoj(undefined? X) doesn't work?
21:26seangrove"Error evaluating:" (undefined? js/CustomEvents) :as "(void 0 === CustomEvents);\n"#<ReferenceError: CustomEvents is not defined>
21:26tomojlol
21:26tomojwell, it's in strict mode, right?
21:27tomojguess that's not why
21:27seangroveYeah, I think only typeof will prevent an error when throwing an undefined variable at it
21:27tomojbut.. (undefined? js/window.CustomEvents) maybe?
21:27seangroveAh, no, that works
21:29seangroveVery cool, thanks!
21:29tomojcourse that will break if window isn't there..
21:33seangroveFor the extension I'm writing, it should always be there
21:33seangroveWondering what I woudl do if it weren't there, but not going to worry much about it right now
21:36tomojmaybe goog.global
21:36tomojunsure
21:37seangroveok, and this feels super basic, but I can't find it by googling - how can I check if a variable is a function without resorting to (= variable (type #()))
21:39akhudekseangrove: http://clojuredocs.org/clojure_core/clojure.core/fn_q
21:40seangroveakhudek: Thank you
21:59amalloydon't forget ifn?
22:15wingya keyword like: :802.11b is not idiomatic since the dot . is a namespace separator right?
22:41amalloywingy: looks fine to me
22:42wingyamalloy: but isn't the dot . a ns separator? eg. foo.bar/baz
22:42amalloyso?
22:42amalloy/ is the namespace separator, marking everything on the left as a namespace, and stuff on the right as a name
22:42wingyso . is a namespace divider?
22:43amalloy. is a period. just like anything else, what it means depends on context
22:44amalloyin a keyword that means X, the . means whatever makes sense in the context of an X
22:46wingyfrom where did i get that . is a namespace divider
22:46wingyhm
22:46bbloomwingy: java.
22:46wingyand datomic i think
22:48bbloomwingy: https://github.com/edn-format/edn#keywords <- says what's legal
22:48bbloomthe definition refers back to the symbols section, one paragraph up
22:48ivancool, . is allowed now
22:50wingybbloom: cool
22:50wingyso . is just like any char
22:50amalloyivan: now?
22:50ivanit was not allowed according to clojure.org reader docs, when I checked a few months ago
22:50amalloywingy: well, it can't go at the start or end of symbols
22:50bbloomamalloy: well, it can: "If -, + or . are the first character, the second character must be non-numeric."
22:51amalloyivan: rubbish. nobody updates those docs ever; if it's legal now i doubt it was ever different
22:51ivanwell, I'm sure it always worked, just not officially
22:54wingycan someone create an OS with clojure
22:55arrdemno.
22:55arrdemyou would need a microkernel of some kind implementing the Java runtime
22:56arrdemthat you could build a clojure environment on top of... but without a Clojure to ASM compiler clojure all the way down is not possible.
23:11mthvedtmicrosoft built an experimental .net os
23:13sshackwingy: They already have. They're called app servers.
23:14sshackerm. Read that as an os for clojure.
23:14sshackarrdem: You could run on one of those old java chips.
23:15sshackor an arm chip with gazelle
23:16sshackJazelle even.
23:16dabdI have 1million x 2 array of int dumped in binary format from a C program. Is there anyway I can slurp it efficiently to a clojure array?
23:17arrdemsshack: true and if I recall there is some IBM metal as well that provides a hardware JVM.
23:17lucianit'd be easier to retarget clojurescript to some form of asm
23:17sshackwingy: So, yes, you could in theory write an OS in/with clojure. But it would be a monumental amount of work.
23:17lucianor use the scheme->c one
23:18sshackYou've still got to build a useful user land.
23:18sshackReinvent emacs, vim and such.
23:19arrdemyeah and that's the real issue with all DIY OSs... Even Plan 9 for all its awesomeness doesn't feature what we would consider a "useful userland" anymore.
23:19arrdemno modern web browser or JS support at all... VIM equivalent and X equivalent, but entirely seperate environment.
23:20bbloommthvedt: i assume you're referring to singularity. to call that "with .net" would be a stretch....
23:20sshackThat Beos reimplementation seems the closest to useful (besides linux), and even that is a stretch. it's a vicious circle.
23:21bbloomthey had their own runtime and c# compiler… may have been a fork, but it was heavily modified
23:23luciani think it's become too professional an endeavour to make an os
23:23mthvedtbbloom: i thought it was an ok stretch in response to the question
23:24lucianother than for academic purposes, there's little point in doing it
23:24mthvedtobviously if you make a 'clojure os' it won't be on the java executable
23:24arrdemlucian: I mean... for my OS class I kicked out about 50% of a working OS with a round robin scheduler and some other such serious failings, but it ran.
23:25arrdemthe issue is that it's entirely useless to me.
23:25bbloomarrdem: did you learn something from it?
23:25arrdembbloom: ooooh yeah
23:25lucianarrdem: sure, it's great for learning. but unlikely to be useful to anyone
23:25bbloomarrdem: then it wasn't entirely useless ;-)
23:25arrdemand I can drink black coffee now T_T
23:26arrdembbloom: I meant useless with respect to me using it to be productive in any way.
23:27sshackIt is fun though.
23:27bbloomarrdem: i was being facetious. i just think more people aught to try to write an OS, if just for fun
23:27arrdemI mean even MINIX. Sure I can grab Vim and Zsh and an X implementation, but why bother?
23:27ToxicFrog90% - at least - of the stuff I write is useless. Who cares? It's fun.
23:27arrdembbloom: hehe yeah it was a lot of fun and I'll probaby do another one at some point just because
23:28bbloomthe parallels between an OS and a distributed system are stunningly deep
23:28bbloomall the time i see people trying to build this big complex systems with databases and queues and messaging and retries and time outs and all this jazz
23:28bbloomand they have no fucking clue how their process scheduler works
23:28bbloomit's amazing :-)
23:29arrdembbloom: haha my OS prof is from IBM research and took the opportunity to pound scheduling and transactions into us
23:30luciantransactions are awesome
23:30lucianit's so sad many new systems suck so much
23:30rbxbxbbloom any texts you'd recommend to rectify said issue?
23:30lucianlike mongodb, for example
23:30bbloomrbxbx: http://plan9.bell-labs.com/sources/plan9/sys/src/
23:30arrdemah mongodb... I mean I still use it... but yeah it throws transactions out the window.
23:31bbloomrbxbx: my attention span isn't long enough for books (usually) so i stick to short articles and then go RTF source
23:31lucianarrdem: and for no good reason, it sucks at being distributed too
23:31arrdembbloom: gah plan 9... Y U NO BOOT IN VBOX
23:32sshackluvian: I wish you could up vote on irc right now.
23:32arrdemlucian: I just use it because I like not having a set schema and it was easy to set up
23:32arrdemsshack: use (inc)
23:32rbxbxbbloom fine and good, but.... it's unlikely that i'll undertake this. Bait me. Get me interested. Excited. Involved.
23:32arrdem(inc lucian)
23:32lazybot⇒ 1
23:32sshack(inc lucian)
23:32lazybot⇒ 2
23:32sshackAny chance your prof talked about as/400?
23:33arrdemsshack: no never heard of it.
23:33bbloomrbxbx: i've heard good things about http://www.amazon.com/dp/0136006639/?tag=stackoverfl08-20
23:33bblooma quick googling suggests Modern Operating Systems : Dragon Book :: OSes : Compilers
23:33bbloomdragon book: http://www.amazon.com/dp/0321486811/?tag=stackoverfl08-20
23:33sshackarrdem: Had GC, a database, proper security and single level addressing (no memory/disk split) back in the 80's.
23:34arrdemah the green dragon book....
23:34arrdemsshack: yeah he mentioned that in passing, but not by name
23:35sshackExcept for the fact that it's horribly archaic, and proprietary, in most respects it's still bleeding edge.
23:35sshackoh, and that most programs for it were written in cobol or rig
23:35rbxbxahhh. bbloom this is a recommended text in (our?) corriculum.
23:35sshacks/rig/rpg/
23:35bbloom*shrug* give it a try :-)
23:36sshackOh the tanenbaum book!
23:36sshackand the dragon book. brings back memories.
23:36rbxbxbbloom it may (mayhap!) some day happne.
23:36rbxbxhappen, also ;)
23:37rbxbxcurriculum* gosh. Spelling is kindasortavaguely the most difficult.
23:38arrdemsshack: (with-devils-advocate the Knight machine had GC loooong before that)
23:38sshackarrdem: Lots of machines did. I was just pointing it out as an example.
23:39sshackIt was also unusual for including so many advanced features. (in 1980 the OS took like 70meg. Which was a lot)
23:40RaynesIs codox 0.6.3 working for anyone?
23:41RaynesI'm getting Caused by: java.lang.AssertionError: Assert failed: (vector? (:dependencies project [])) for no apparent reason.
23:51dabdhow do you turn this into a functional idiom (defn foo ... (if c (compute-some-value) (do (some-side-effect) (compute-some value))?
23:51muhoois there anything that will template like stencil, but without HTML entity escaping?
23:52TimMcmuhoo: An odd request.
23:52RaynesDamn it, codox.
23:52Raynesy u no generate my docs
23:52dabdi think i need to read up on monads
23:53muhooTimMc: indeed. i'm an odd guy.
23:53muhoobut i need to generate emails. from a template. NOT html emails, regular, normal emails.
23:53luciandabd: while they may be useful, they aren't really necessary. in clojure you can just name it foo! and make sure you're not doing it in a transaction
23:54muhoostencil would be perfect, except for a call to html-escape buried deep, deep in the protocol implementation
23:54arrdemlucian: why keep -!s out of transactions?
23:54arrdemI would think you side effect IN transactions
23:54TimMcmuhoo: Oh, right. Yeah, some templating libs allow you to specify your own escaping fns, which in this case would be identity.
23:55TimMcmuhoo: clostache, perhaps?
23:55muhoohttps://github.com/davidsantiago/stencil/blob/master/src/stencil/core.clj#L57
23:55lucianarrdem: if by side-effect you mean mutation, then have a look at clojure's reference types. side-effect generally means things like io
23:56dabdclojure.algo.monads has nice tutorials
23:57arrdemlucian: so Atoms etc?
23:57lucianarrdem: yes. they are quite useful for keeping track of state safely
23:57lucian(in a concurrent program)
23:57muhooTimMc: THANKS! {{&do-not-escape-me}}... buried in clostache docs
23:58muhoostencil supports it, but clostache docs are much better, they both seem to support the same features tho