#clojure logs

2011-12-19

03:19wei_has anyone experienced a java.lang.OutOfMemoryError: Java heap space when trying to start a browser repl using (cljs.repl/repl (cljs.repl.browser/repl-env)) ?
03:19wei_also doing this through nailgun so I'm not sure if that's the issue
03:45accelis there a clojure library that provides a gui repl? i.e. something like "java clojure.main", but wrapped inside some gui elements
03:54accelIs there a standard clojure lirary for pattern matching (or the lisp match macro) ?
03:56pyri think you're looking for core.match
03:57accelyep just found https://github.com/clojure/core.match
03:57acceland reading its docs
03:57accelexamples are nice
04:08kralnamaste
04:22Blktgood morning everyone
04:23cmdrdatsgood morning :)
04:32Blkt:D
04:33Scriptormorning!
05:14accelis there a way in the clojure repl to get documentation. i.e. i wnt to type something like "? map" in the clojure repl; and get the function arguments + short description of how each arg is used
05:14kasper(doc map)
05:14clojurebot"([f coll] [f c1 c2] [f c1 c2 c3] [f c1 c2 c3 & ...]); Returns a lazy sequence consisting of the result of applying f to the set of first items of each coll, followed by applying f to the set of second items in each coll, until any one of the colls is exhausted. Any remaining items in other colls are ignored. Function f should accept number-of-colls arguments."
05:14accel(inc kasper)
05:15accelha! map is lazy? nice
05:15acceloh shit; i need side effects
05:15accelhow do I force lazy args ?
05:15Vinzentdorun\doall
05:15Vinzentor just use doseq
05:16accelclojure.core/dorun
05:16accel([coll] [n coll])
05:16accelwhy does this function have two args, i..e [coll] [n coll]
05:16accelrather than just [coll] ?
05:16Vinzent(doc dorun)
05:16clojurebot"([coll] [n coll]); When lazy sequences are produced via functions that have side effects, any effects other than those needed to produce the first element in the seq do not occur until the seq is consumed. dorun can be used to force any effects. Walks through the successive nexts of the seq, does not retain the head and returns nil."
05:17accelIt is not obvious to me from the documentation what the 2nd argument does.
05:17Vinzentaccel, I don't know, but probably it forces only first n elems of the coll
05:18kasper(source dorun)
05:18kasperaccel: will give you the source
05:18accelholy shit
05:18accelmind blonw
05:18accelI can't even spell correctly after taht.
05:19accelIs there a list of cool functions in the repl I should become familiar with besides load-file, doc, and source ?
05:21kasperaccel: dont know really
05:22Vinzentmaybe bean can be helpful sometimes... Also, there was very handy fn in the old contrib that prints all methods and fields of the given class
05:24accelwhat is the point of the "chunk-buffer) in (source range) ?
05:28accelis there a way in clojure.main to kill the last command, w/o killing the repl? For example, I load up clojure.main, I type in (range) -- now, I just want to kill the last command, but not the entire repl.
05:31Vinzentin emacs it's C-c C-c
05:32accelhmm; perhaps it is time I read up on vim-gorilla
05:33antares__hi. I have a problem: I am trying to implement an interface and then pass Class of resulting class around to Quartz. Both proxy and reify result in exceptions that lead me to believe that Quartz cannot instantiate my class (it uses Class#newInstance). defrecord with custom methods does work (but does not let me capture context). What I may be missing?
05:33accelIs Quartz Objective-C or java?
05:33antares__Java, the scheduler library
05:45accelIs there any relation between IPersistentList and ISeq?
05:55raekantares__: iirc, proxies have one shared class per "signature" (base class and interfaces)
05:56raekand every call to proxy returns an instance of that class
05:56antares__raek: that's fine with me, I can use (class …). What about constructor visibility?
05:57raekI think the constructor for the proxy class is something internal to the proxy feature of java
05:57raekantares__: when you need a named class you generally ned to use gen-class
05:58cemerickOr deftype or defrecord.
05:59raekantares__: if your usecase is simple enough, maybe you could use cron4j. it is very easy to use from Clojure
06:00antares__raek: well, Quartz has everything I need and I have a library that makes it easy to use from Clojure, I just cannot figure out this last step :/
06:01antares__I guess I will go with defrecord for now
06:01raekantares__: example with cron4j: https://gist.github.com/1496650
06:02antares__raek: I need "execute this until date X" kind of feature which cron4j probably does not have
06:02antares__raek: thanks for the help either way!
06:36accelalright
06:36accelI now need to thread state through a bunch of clojure functions.
06:36accelWhat is a good example of monads inclojure?
06:38Vinzentaccel, https://github.com/clojure/algo.monads
06:58AWizzArdaccel: The lib “Pallet” is now also using Monads. In the code repo you can find pratical use cases: https://github.com/pallet/pallet/blob/develop/src/pallet/monad.clj
07:07accelVinzent , AWizzArd : thanks
07:08lnostdalis "error in process filter: Wrong number of arguments: nil, 0" happening for you guys? this pops up from time to time here
07:10Vinzentyes
07:19lnostdal..the restarts needed because of it really ruins any collaboration going on with other devs.. i'm not using slime from git or anything, hmm
07:27Vinzentfor me it pops up only in a few cases, very rare
07:28VinzentI do use slime from git, so maybe you should try it too
07:30lnostdalok, it happens only in rare cases here too .. seemingly at random; or perhaps when my code generates "weird exceptions" -- kind of hard to tell
07:31Vinzentyeah, same symptoms
07:32Vinzentlooks like such exceptions' stacktrace is nil
07:32raeklnostdal: what is your slime-net-coding-system set to?
07:33raekif you don't use clojure-jack-in, you need to set it to utf-8-unix manually
07:33lnostdalit is utf-8-unix, raek
07:33raekgood.
08:30duck1123If I want to update my copy of the Closure Library for use with clojurescript, do I just need to replace ./closure/library in the clojurescript project, or are there other considerations I need to take into account?
08:32duck1123I want to make use of goog.new.Webfinger it looks like it's now part of the released library, but the goog-jar artifact and the one with clojurescript are behind
09:01lnostdal,(:%answer {:%answer 42})
09:01clojurebot#<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: Invalid token: :>
09:02lnostdal
09:02lnostdalhum, is combining : and % like that not valid?
09:02lnostdal,:%test
09:02clojurebot#<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: Invalid token: :>
09:03lnostdal,:test
09:03clojurebot:test
09:04duck1123,(keyword "%answer")
09:04clojurebot:%answer
09:04duck1123although, if you can't type it out, it's a good indication that you shouldn't be using it as a keyword
09:05lnostdali'm curious why though
09:05lnostdalit doesn't matter much of course; there are other characters i can use here
09:50cmdrdatsO.o clojurebot evaluates clojure code in the channel?
09:50cmdrdatsthat's awesome :D
09:50elderlingseconded.
09:51cmdrdatsi'm guessing there's some kind of limitations though?
09:52elderlingI think it uses clojail. Can anyone confirm?
09:55Vinzentas far as I know it's written by Raynes
09:57cmdrdatsnice - that's useful to know about :)
10:00joegalloyou're confusing clojurebot and lazybot
10:00joegalloi think
10:01elderlingAgreed.
10:01elderlingclojail is the library used by lazybot.
10:01elderlinghttps://github.com/flatland/clojail
10:03TimMclnostdal: Symbols and keywords have a restricted character set. Some characters will work that are not formally supported, but you shouldn't use them.
10:03TimMcI guess just stay away from any ASCII that isn't explicitly mentioned in http://clojure.org/reader -- I think other Unicode is fine.
10:39fdaoudwow, I didn't know there were these online "try<language>" for every language that wants respect :)
10:43choffsteinHey all. Quick question: is there a way to get leiningen to pull a dependency from a private github repo? If not, does anyone know a place that does private maven repo hosting?
10:44dmansenif you clone the repo and run lein install, it should get installed to your local maven repo (in ~/.m2
10:44dmansenand then other projects should pick it up
10:45raek_choffstein: you can push your private version of a library (assuming it's an open source lib) to clojars by changing the group name to org.clojars.<username>
10:45choffsteinraek_: Okay, thanks
10:46choffsteinWell, actually, no, that doesn't help me. It's not opensource :D
10:46raek_the version you push will be public, though
10:47choffsteinYeah. Looks like cemerick has an article about (ab)using github as a maven repo. I might try that
10:47raek_choffstein: if you need to collaborate with other, it's probably best to set up a private maven repo
10:47choffsteinraek_: No need to collab -- just need somewhere that heroku can pull the deps from
10:49raek_hrm...
10:49choffsteinYeah. I'm going to try this bastardisation of github. If that doesn't work, I'll try a more robust solution
11:33choffsteincemerick: you around?
11:55choffsteinanyone have any success using leiningen to deploy to a local maven repo?
11:56licenserchoffstein: yap
11:56licenserdid a lein install and it worked fine
11:57choffsteinlicenser: Anyway I can take a peak at the relevant config info? I'm having a devil of a time getting this to work
11:57choffsteinsorry -- should have specified -- not just a lein install. Through lein deploy to another local maven repo
11:57licenserchoffstein: you could but there is none, I just simply did lein install
11:58licenserah play
11:58licenserah okay, sorry can't help there
11:58choffsteinno worries
12:15choffsteinAnyone know how to get maven to work with absolute directories? I can only seem to get it to work with relative directories… e.g. "file:../my-repo vs "file:/Users/choffstein/dev/my-repo"
12:16hiredmanyou need more slashses at the start of file urls
12:16hiredmanhttp://en.wikipedia.org/wiki/File_URI_scheme
12:16choffsteinidiot … idiot … idiot
12:17choffsteinhmm. file:///Users/choffstein/dev/my-repo doesn't seem to work either
12:19choffsteinJust kidding. User error.
12:27kreyHey, why is clojure struct obsolete and record the way to go?
12:27kreySee Clojure Homepage @ StructMaps: Note: Most uses of StructMaps would now be better served by records.
12:29kreyTried to migrate my example application using memcached to records,... have problems with serializing/deserializing
12:29kreybinding [*print-dup* true] << works to serialize the record. But it is not evaluated if I read it back from memcached
12:35technomancychoffstein: I have a thing
12:35technomancyin which you may be interested
12:35technomancyhttps://github.com/technomancy/s3-wagon-private
12:36choffsteintechnomancy: awesome. I'll take a look. Thanks
12:36technomancylightly tested; very much interested in feedback
12:36technomancyit's based on an s3 deployer from spring, but theirs is hard-coded to be public
12:37choffsteinI'll take a gander. my biggest issue is giving heroku access to the repo. init.clj doesn't float over, unfortunately.
12:37technomancyyeah, probably want to use environment variables for that
12:39choffsteinI think so
12:40kreytechnomancy << wow, he is really there
12:41Vinzentkrey, what do you mean? (-> (Foo. 1 2 3) pr-str read-string class) returns user.Foo here
12:41technomancychoffstein: working on getting better documentation for that whole story, but making sure it's well tested is a good first step
12:42kreyI'm using spymemcached to store my k,v pairs
12:43krey(item-store (binding [*print-dup* true] (pr-str (entity))) << it looks like this
12:43kreyAfter I look to my memcached instance the value is there...
12:43kreyBut I can't read it back to a record
12:45choffsteinI hate when something seems like it works perfectly … but somehow you don't get the results you are looking for. lein deploy keeps telling me it is running successfully, but none of the files seem to be showing up where I expect them to.
12:46technomancyon s3?
12:46Vinzentkrey, is it throws exception or something? what the string looks like?
12:46kreyI can not connect to the computer where I stored the example...
12:47kreyit looks like the default definition starting with # class { param map }
12:47simardis there a function to return a sequence after skipping n elements ?
12:48kreyWhen I print it to stdout, the output is escaped, ... But when I enter it without escaping to the console it gets evaluated
12:48kreyI get it back as a string,...
12:49Vinzentsimard, ##(drop 3 (range 5))
12:49choffsteintechnomancy: nah, locally. also, I think I am just confused about how lein deps expects to find data compared to my maven repo. I deploy to a maven repo and get files like: gears-1.0.0-20111219.172346-1.pom, then lein deps says it is trying to get gears-1.0.0.pom and fails.
12:49Vinzent,(drop 3 (range 5)
12:49kreytechnomancy, what is the s3 wagon?
12:49clojurebot#<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: EOF while reading>
12:49choffsteinI can't tell if lein is just pretty-printing debug info and cutting the cruft, or if I am deploying to my maven repo wrong
12:49simardVinzent: drop, thank you
12:50kreyA place to store versions of the software in a S3 bucket?
12:50technomancychoffstein: the numbers after the 1.0.0 mean it's a snapshot version
12:50mrb_bkDesign question: If I'm working on a binary data parser, and I want to store and refer to certain pairs of byte lengths and contents by name, would records be a good fit?
12:50technomancyit means you haven't deployed 1.0.0 but 1.0.0-SNAPSHOT
12:50choffsteintechnomancy: I am trying to do a snapshot version though. My deps is 1.0.0-SNAPSHOT
12:51mrb_bki.e. I want to have a [5 :magicnumber '(0 0 0 0 1)'] data structure that i can refer to by the name :magicnumber
12:51technomancychoffstein: you said it's trying to get gears-1.0.0.pom?
12:52choffsteinthat's because I am stupid and can't type. gears-1.0.0-SNAPSHOT.pom is what I meant.
12:52choffsteinWhich should work, right?
12:53choffsteinOhhh … I bet it is failing because heroku doesn't have my ssh key. *doh*
12:54technomancychoffstein: feel free to take it to /msg if you're having trouble
12:54Vinzentkrey, well I don't know what to say without knowing exception that has been thrown
12:54choffsteinyeah, this isn't general banter. my bad. just venting. sorry
12:55technomancyheh; no worries
12:55kreyVinzent: I'll be back here when I've access to the sourcecode
12:55kreyNo exception is beeing thrown
12:56kreythe problem is, that the data comes back as string, and I can not find a way to make it behave like data
12:58Vinzentkrey, ah! use read-string, as I've showed earlier
12:59dmansensilly question, but...how is "leiningen" pronouced?
12:59kreyawhhhh,... damn haven't seen it cause I've excepted it to take a stream or something as argument
13:00technomancydmansen: 'laɪnɪŋən
13:00technomancy(LINE-ing-en)
13:00dmansenaha! thanks
13:00technomancyif you've seen the movie "The Naked Jungle", they get it wrong.
13:01technomancydmansen: would it be possible to just bind *color-support?* rather than storing it in a reference type?
13:02Vinzenthm, lein is also pronounced as LINE?
13:02technomancyor do we have threading issues?
13:02technomancyVinzent: yeah
13:02dmansentechnomancy: will the exception function always be called within the same thread?
13:02technomancydmansen: I was hoping you'd know. =)
13:03dmanseni'm a bit fuzzy on how many / what threads are in swank
13:03dmansenahaha
13:03technomancyI bet hugoduncan would know.
13:03kreyWhat do you think about defrecord2 ?
13:04technomancydmansen: I'll give it a try
13:06dmansentechnomancy: yeah, no point in using a ref if it isn't necessary
13:08technomancydmansen: yeah, looks like that happens in a different thread
13:08technomancyI'll switch to using an atom instead
13:10dmansentechnomancy: ah, makes more sense. i'm still getting a handle on when to use the different concurrency types
13:10technomancydmansen: well to be fair the swank codebase is a terrible place to learn that
13:10technomancyconsidering most of it was written before atoms had been implemented
13:10dmansenah! i see
13:11dmanseni'll refresh my memory tonight from joy of clojure
13:11technomancyalso doesn't need to be dynamic
13:17dmansentechnomancy: this is my first open source contribution ever, haha
13:17dmansenprobably should have gone with something less ridiculous..
13:17technomancynot too shabby!
13:17dmansenty!
13:17simardI have a function that builds a tree, in which there are lazy sequences. When I eval the expression in slime, there is no problem, but when I try to walk it with some function of a Protocol I defined, it says my function cannot take a lazy sequence for input. Where should I force the evaluation of the tree so that no lazy sequences remain ?
13:18hiredmantechnomancy: is there some mechanism to load lein hooks without having to put them in project.clj?
13:18simardby eval with slime, I mean slime's printer forces the evaluation.
13:18technomancyhiredman: you could load them from ~/.lein/init.clj
13:18technomancyyou could also set :hooks to :auto to have it search the classpath, but that's slow
13:19technomancysimard: (doto my-seq str) will force every level of it
13:19hiredmanso I could plugin install the hook, and then do (require 'lein.some.hook) in init.clj?
13:19technomancyhiredman: precisely
13:19technomancyhiredman: recommended if it's a convenience-type hook
13:20samaaronoh yeah clojurebot - spoil the announcement before it's made...
13:23raek_samaaron: "it says my function cannot take a lazy sequence for input" - why?
13:23raek_sorry, simard
13:25simardraek: No implementation of method: :output of protocol: #'kiwiz.core/Library-Printer found for class: clojure.lang.LazySeq
13:25simardthis shouldn't happen anyway.
13:25simardwait :)
13:26raekif you're extending you protocol to clojure data, you should have an implementation for ISeq
13:26raekISeq includes PersistentList and LazySeq
13:26simardoooh wait I found why.. no I didn't mean to do that.
13:27simardI did a (list (map ..) (map ..)) where I meant to do (concat (map ..) (map ..))
13:29raekis the "defonce-ness" of defmulti actually documented anywhere?
13:38cemerickchoffstein: hi :-)
13:38choffsteincemerick: Hello! I was reading your lovely blog post about setting maven up on github and had a few questions. I left them as comments to the post.
13:53amalloyraek: i don't think so, unless you count "you can figure it out if you happen to read the source" as documentation
13:55amalloysimard: (str some-lazy-seq) doesn't force any levels at all, right? sounds more like pr-str
13:56amalloyhm, and i meant that one to go to technomancy
13:56simardgood for me .. :)
13:56technomancyamalloy: aha, you are correct
13:57cemerickchoffstein: you trailed off without asking your first question in your comment :-)
13:57choffsteincemerick: no, that's just my writing style ;)
13:57choffsteinHold on, I'll edit
13:58technomancydmansen: I wonder if clj-stacktrace could be taught new patterns to colorize
13:58dmansentechnomancy: how do you mean? and i'm sure that's possible
13:58technomancyright now swank frames are colored the same as your own program's, which isn't too helpful
14:00dmansenclj-stacktrace.repl is explicit in the docs about how it colors things
14:00dmansenso i'm sure i could fix that
14:00technomancyjust deployed the colorization stuff to clojars
14:01raekamalloy: IIRC, (str some-lazy-seq) actually forces the outermost seq. the default implementation of .toString uses .hashCode, which forces the seq
14:01amalloyhah
14:01amalloy&(str (range))
14:02technomancydmansen: actually hang on; I have some code to allow it to pass in frames to omit that I haven't pushed yet
14:02technomancywe could base the new colorization rules on that
14:02amalloyoh, lazybot isn't here anyway. not going to learn much from him
14:02amalloy,(str (range))
14:02clojurebotExecution Timed Out
14:03dmansentechnomancy: okay. it seems super easy to add in any case
14:05raekanyone know where I read about the Jira workflow? I remember having seen a nice flow diagram.
14:05raekduh. found it under Clojure Design -> JIRA usage proposal
14:15TimMcamalloy: What did happen to lazybot?
14:15TimMc&(print "I'm back!")
14:15lazybot⇒ I'm back!nil
14:15TimMcoh good
14:16amalloyTimMc: i dunno. some sysadmin-related thing that we're no good at, usually. Raynes restarted him
14:17RaynesSometimes bad things happen to good bots.
14:17amalloyRaynes: put lazybot on heroku?
14:17RaynesNo.
14:17technomancygetting shuffled around all the time would give him motion sickness.
14:18amalloy&(shuffle (range))
14:18lazybotExecution Timed Out!
14:20TimMcIt would be cute to have a system load graph as a sparkline, like $load -> ___,-'\__
14:20technomancyTimMc: I would totally use that
14:21technomancyI've got a key bound to pop up a notification bubble with the load average numbers, but something visual would be way better
14:21TimMcI was thinking of one for the bot.
14:22TimMcFor my desktop I just have a graph in gnome-panel.
14:22technomancywhy should bots have all the fun?
14:22technomancyTimMc: yeah, but that wastes screen space when you're not interested in it
14:23technomancynicer to have it bound to a key so you just see it on demand
14:23TimMcA few years ago I actually discovered a worm had infected my laptop when I noticed the graph was wonky.
14:23technomancywould be better to have a key binding to toggle the visibility of the panel, but considering the panel is going away in gnome 3 it's not worth investing the time in implementing such a thing.
14:24TimMcUgh, GNOME 3... let us speak no more of it.
14:25jhirnI like conky for system metrics on the desktop
14:26jhirnlittle bit of LUA ftw.
14:26tscheiblTimMc: what's your problem with GNOME 3 .. respectively the GNOME Shell?
14:26TimMctscheibl: I bought a laptop, not an iPad.
14:26TimMcIt feels like I'm using a toy.
14:26tscheiblI appreciate the much cleaner UI
14:27tscheiblit took me a few hours to get used to it
14:27tscheibl.. and it definetely improved my workflow
14:27technomancyit looks nice, but they just stripped out everything I actually use in the panel
14:27jhirnyes, and the new panel is early beta at best.
14:27tscheibl..especially with a multimonitor setup
14:27technomancyit's a huge pain to get the system monitor plugged back in, you can't make it vertical, and you can't autohide it.
14:28jhirnbut conky is so much better than system monitor.
14:28technomancyjhirn: isn't conky designed to run as a desktop background?
14:29jhirnyeah. I just switch to a seperate desktop if somethign is covering it.
14:29technomancyhm. I wouldn't want something that required a context switch like that.
14:29jhirnworks for me since i don't use more than one
14:29technomancythe libnotify bubbles are perfect for that, but they're limited to text
14:29technomancywell, text plus a static icon anyway
14:29jhirnMost of the times I don't maximize my runnign apps. 1920 res
14:29jhirnso I can deal with 200px chopped off.
14:30jhirnespecially if I want to know current drain of battery in mW.
14:32tscheiblI converted to running everything maximized now... thanks to the dynamic workspaces
14:33tscheiblWindows are bad anyway
14:33jhirnEmacs is the only thing that gets full screen, but that's transparent so conky shines though =)
14:33tscheibl..at least floating and overlapping ones
14:33weavejestertechnomancy: Do you know yet how lein 2.0 is going to handle project-specific plugins?
14:33technomancytscheibl: did they ever add the ability to jump straight to workspace N, or is it still O(N) to get to a workspace?
14:34tscheiblyou can add a plugin
14:34technomancyjhirn: doesn't that wreck the readability?
14:34tscheiblthat gives you a selector in the upper panel
14:34technomancytscheibl: with the mouse? =(
14:34jhirntechnomancy: readability of emacs or what's underneath?
14:34technomancyjhirn: was thinking the former, but I guess it would mess up both.
14:34jhirnI use just a shade of transparency.
14:34tscheiblI believe there are shortcuts.. I will find out...
14:35jhirnI think I use 89/80 for active/inactive
14:37sorenmacbethtechnomancy: fyi, latest swank-clojure 1.3.4-SNAPSHOT errors out on ansi-color-apply not being defined. If I do an M-x ansi-color-for-comint-mode-on, then I get very pretty colored stacktraces
14:37technomancysorenmacbeth: ah, so something needs to be required first on the Emacs side?
14:37sorenmacbethtechnomancy: yeah
14:38technomancysorenmacbeth: hadn't occurred to me that there could be an emacs instance without ansi-color.el loaded. thanks for the heads-up.
14:38tscheibltechnomancy: you can add that keyboard shortcuts in system-settings->keyboard->shortcuts->navigation
14:39tscheiblI've put them to alt-ctrl-1 2 3 4 ...
14:39tscheiblset them
14:39technomancytscheibl: good to know. hopefully by the time gnome2 goes away entirely all these panel fixes that are currently manual will have been mainlined.
14:40sorenmacbethtechnomancy: np. I added this to my init.el for now: (add-hook 'slime-repl-mode-hook 'ansi-color-for-comint-mode-on)
14:40technomancyweavejester: we have some plans. no concrete impl yet.
14:40weavejestertechnomancy: Ah, okay :)
14:41technomancyweavejester: the idea is to fold dev-deps into just another profile that's applied by default, but that means the deps will all be commingled, so lein can't look in a specific place for plugins
14:41technomancyso plugins will have to be in a separate list in project.clj
14:41weavejestertechnomancy: I think I might suggest to Mark that they use "lein deps" rather than "lein deps :no-dev" in Heroku for the time being.
14:41tscheibltechnomancy: you can use these plugins http://intgat.tigress.co.uk/rmy/extensions/index.html to get almost the same look&feel as in gnome2
14:41technomancyweavejester: which is better anyway, since the current dev-deps complects stuff that runs in leiningen and stuff that runs in the project process.
14:41weavejestertechnomancy: I thought it might be something like that.
14:43technomancyweavejester: the majority of lein plugins are intended for development-time only; and some of them could even be considered harmful in production.
14:43weavejestertechnomancy: Hm, true...
14:43technomancyso it's unlikely to ever be the default on lein1, but it should be opt-in
14:43weavejestertechnomancy: I guess opting in on Heroku is just "heroku lein deps"
14:44weavejestertechnomancy: I guess I'll have to wait until lein 2.0 for it to be the default.
14:45technomancyyeah, this is exactly the kind of problem that comes from mixing dev-deps and plugins
14:45technomancyI'm surprised it didn't cause problems eariler
14:46weavejesterHas any work been done on a Cake-style persistent JVM for Lein?
14:47technomancybeen delegating that to jark
14:47technomancythey've started on it; I don't know if it's working yet.
14:47technomancylast I checked over the summer I couldn't get it to build.
14:47weavejesterDoes Jark support loading new deps?
14:48cemerickweavejester: new jars, yes, not deps yet
14:49weavejestercemerick: Ah, thanks
14:52sorenmacbethtechnomancy: forgot to mention I am on emacs 24, so ansi-color.el isn't loaded by default there. also using starter-kit and the eshell, bindings, and lisp packages (thanks!)
14:52technomancycool =)
14:54weavejesterTime to see if these new ATI drivers will let me run Gnome 3... or screw up my computer :)
14:59brehautweavejester: popular opinion suggests that running gnome 3 is screwing up your computer
15:00Raynesbrehaut: Popular opinion suggests that Vim is tainting your mind.
15:00franciumhttp://shootout.alioth.debian.org/u32/compare.php?lang=clojure
15:00brehautRaynes: as long as it also includes emacs in that category, its right ;)
15:00francium^seems like you write the same amount of java code as clojure code?
15:00brehautfrancium: the shootout isnt a very good measure of anything except for shootout code
15:00technomancyfrancium: alioth benchmarks are nearly worthless
15:01Raynesfrancium: I imagine that that is on purpose. To get Java-like speed you tend to want to write Java-like code.
15:01Raynestechnomancy: Do you actually use slamhound for anything?
15:02franciumwhy are the benchmarks worthless?
15:02franciumi'm just trying to get a rough idea of what would be a good lang to use for a new project
15:02brehautis that a rhetorical question?
15:02franciumno
15:03technomancyRaynes: I'm still kinda blocked on two things: pretty-printing the ns form, and supporting non-obvious :require :as alias names
15:03franciumi'm just trying to get a rough idea of code written /speed
15:03amalloyfrancium: because everyone uses the same C libs, and because who really cares about performance on benchmarks like these when you spend most of your time thinking?
15:03Somelauw,(get '(()) 0)
15:03clojurebotnil
15:03SomelauwShouldn't that be ()?
15:03amalloyno
15:03amalloylists are not random-access
15:04ibdknox(get ['()] 0)
15:04ibdknox,(get ['()] 0)
15:04clojurebot()
15:04technomancyRaynes: someone mentioned taking a shot at fixing the ns pretty-printer yesterday, but I forget their nick
15:04Raynesibdknox: YOU!
15:04SomelauwOh, get doesn't work at all on sequences.
15:05SomelauwThen why not make it throw an error or something?
15:06ibdknox,(doc get)
15:06clojurebot"([map key] [map key not-found]); Returns the value mapped to key, not-found or nil if key not present."
15:08TimMc&(indexed? (range))
15:08lazybotjava.lang.RuntimeException: Unable to resolve symbol: indexed? in this context
15:08hiredmantechnomancy: that would be neat, I've been fiddling a little bit with rewriting ns forms to conform to "sonian style" (alphabetizing, etc)
15:08TimMcHmm, what am I looking for?
15:08hiredmanand pretty printing the form is the hardest bit
15:09TimMc&(associative? (range))
15:09lazybot⇒ false
15:09hiredmansteve wants a tool to refactor :use :only to :require :as
15:09TimMcSomelauw: get only works on associative data structures. I guess it really should throw there.
15:10TimMc,(println "hiredman: Is alphabetizing imports done to make merges easier?")
15:10clojurebothiredman: Is alphabetizing imports done to make merges easier?
15:11SomelauwThanks, I get that it works on at least Map and Vector.
15:11TimMcSomelauw: You'll want nth on seqs, I think.
15:12SomelauwTimMc: Yes, that is right.
16:06weavejesterI've discovered that proprietary ATI drivers for Linux still suck.
16:08cemerickvideo cards have drivers? ;-)
16:10raekthis is a very compelling reason to get a Mac...
16:12Scriptormacs have video cards? :p
16:13RaynesNo. They ship the macs with an employee manually lighting pixels behind the screen.
16:13cemerickI dunno, there's some stuff in there that makes these glass panels light up.
16:14cemerickThere was some hair on my keyboard this morning; I'm not sure if it was from my cat, or the squirrels in the computer pumping signals out the monitor cable.
16:14Raynescemerick: I read that as "There was some noir on my keyboard this morning;"
16:15tscheibland some korma...
16:15cemerickibdknox needs to stay away from my keyboard from now on.
16:16tscheibldoes anyone have any insight on what's going on with clojureql? the clojureql.org website went down yesterday I believe
16:17cemerickhrm, that's no good.
16:17Raynesafaik, it is still being worked on.
16:17cemerickdomain expired on 12/14!
16:18ibdknoxcemerick: I was just installing some software on there ...
16:18tscheiblI'm using it quite heavily at the moment... with my own extensions which I will eventually push to a new fork...
16:18mcrittendenabsolute clojure newbie here, wondering how I can create a list from within a doseq call, so each time, a new item is added to the list. do I use (conj list-name item)?
16:19tscheiblmcrittenden: use reduce
16:19TimMcor map
16:19ibdknoxmcrittenden: or take a look at for, the result of each iteration of the list will go into a seq
16:19TimMcmcrittenden: Are you just trying to produce a new list based on some existing list?
16:19ibdknoxlol
16:19mcrittendenawesome, thanks all
16:20TimMcmcrittenden: conj returns the new collection, it doesn't alter an existing one.
16:20mcrittendenTimMc: yes, I'm creating a list of directories within a specific directory, so this is what I have so far https://gist.github.com/1498926
16:20mcrittendenah
16:20mcrittendenI'll take a look at reduce vs. map vs. for
16:21RaynesYeah, that's definitely an imperative solution you're going for there. You don't do that in Clojure.
16:21TimMcmcrittenden: You can write that with a filter and a map.
16:21mcrittendenawesome. yeah this is my first experience w/ FP, just started an hour ago :D
16:21mcrittendenthanks guys
16:21TimMc(map #(.getName %) (filter #(.isDirectory %) (.listFiles d)))
16:21Raynesmcrittenden: It's totally cool. We're here to help.
16:22TimMcmcrittenden: ^
16:22ibdknoxI'm here to complain, actually. :D
16:22raekmcrittenden: this is another solution: (for [f (.listFiles d), :when (.isDirectory f)] f)
16:22mcrittendenany info on what the # and % do there, TimMc?
16:23ibdknox(inc raek)
16:23lazybot⇒ 13
16:23mcrittendenah nice raek
16:23TimMcmcrittenden: Sure. #(...) is reader syntax for an anonymous inline function.
16:23Raynes#(foo) = (fn [] (foo)), #(foo % %2) = (fn [x y] (foo x y))
16:23TimMcraek: oooh, I like that
16:23RaynesIt's a shortcut for anonymous functions.
16:23raekmcrittenden: ah, you're the guy whose question I just answered on stackoverflow... :-)
16:23tscheiblibdknox: you killed clojureql... ;)
16:23brehaut,'#(inc %)
16:23mcrittendenyup raek, that's me :)
16:23clojurebot(fn* [p1__27#] (inc p1__27#))
16:23ibdknoxtscheibl: whoops
16:24mcrittendensmall (clojure) world I guess
16:24ibdknoxknocked it clean off the internet :p
16:24kreyHey ;) read-string worked
16:24RaynesIt tends to do that.
16:25kreyIt works now. I'm really happy with clojure
16:26raekmcrittenden: also, think of 'def' as way to define global *constants*. you should not normally alter the value of a var (what def creates) at runtime
16:26brehautkrey: do you know about *read-evai* ?
16:26kreyDoes anyone know how to get the value off clj-time (now) formatted ? It tells me that it can not be casted to a string if I try to. Maybe (now) is the wrong thing
16:26TimMc&(:a (read-string (pr-str {:a [3 4 'b]})))
16:26lazybot⇒ [3 4 b]
16:26kreyno brehaut , never heard about it
16:27brehaut(doc *read-eval*)
16:27clojurebot"; When set to logical false, the EvalReader (#=(...)) is disabled in the read/load in the thread-local binding. Example: (binding [*read-eval* false] (read-string \"#=(eval (def x 3))\")) Defaults to true"
16:27tscheiblI was about learning a new programming language each year.. last year it was scala... now it's clojure... but I don't want to move away from clojure any more...
16:27TimMc,(read-string "#=(+ 1 2)")
16:27clojurebot#<RuntimeException java.lang.RuntimeException: EvalReader not allowed when *read-eval* is false.>
16:27dmansentscheibl: i used to like scala, until i moved to clojure and noticed it has all the goodness of scala at a tiny fraction of the size...
16:27TimMctscheibl: Is the full year up?
16:27tscheibl..yep... scala was too much syntax
16:28brehautkrey: from memory you want unparse
16:28kreytoo much syntax ack
16:28dmansentscheibl: i tried many times to write scala code. but every time i just got hung up on the tooling
16:28tscheiblTimMc: yeah on 31. of Dec ;)
16:28dmanseni could never get anything done
16:28devinus_technomancy: have you had a chance to see https://github.com/technomancy/swank-clojure/issues/88 ?
16:29tscheibldmansen: I even did spring-osgi with scala on spring dm-server...
16:29dmansendamn
16:29kreyyes brehaut , is there a way to work without the binding instruction when serializing records? >> (binding [*print-dup* true] (prn-str data))
16:29tscheibl.. but got bitten by a nasty annotation bug when using enums
16:30raekmcrittenden: https://gist.github.com/1498952
16:30tscheibl.. which they still havent't fixed
16:30mcrittendenraek awesome! i was almost there
16:30brehautkrey: are you still talking about clj-time data?
16:30mcrittendenthanks a ton
16:31kreybrehaut: I want to get a timestamp of the current time to assign it in my record
16:31kreyI save the record to memcached, the field is called "created"
16:31brehautkrey: because clj-time doesnt use records. It is built on JodaTime. you want to use clj-time.format/unparse if you want it as a string
16:32brehautkrey: see also https://github.com/seancorfield/clj-time/blob/master/src/clj_time/format.clj#L143-147
16:33brehautkrey: calling clj-time.format/show-formatters in your repl will list all the available built in formats. if none match what you want, then you can define your own too
16:33kreyokay... can you suggest one?
16:33mcrittendenraek what's up with that :when? I would have never discovered that, with the colon, and can't find docs on it
16:33raekmcrittenden: another beginner advice: try to write your functions so that they only return whatever they compute and so that they don't do any side-effects (setting variables, etc)
16:33brehautkrey: no because that depends on your needs
16:33krey;)
16:34ibdknoxamalloy: jfw = juxt for the win.
16:34ibdknoxuse it wisely.
16:34amalloyibdknox: C-f juxt - no results?
16:35raekmcrittenden: 'for' is a relatively complex macro, but it allows you to write very succint code. when you are learning the language maybe it's better to stick with the underlying 'map' and 'filter' functions
16:35mcrittendenraek I know :whatever is a keyword, but I thought that was mostly for use in map keys
16:35ibdknoxamalloy: twas a side conversation, thought you might enjoy the use of this acronym
16:35mcrittendenraek ok, thanks
16:36raekmcrittenden: yes, that is the most common usage. you can also use it for keyword arguments to functions (or macros)
16:36mcrittendengotcha
16:36mcrittendeninteresting stuff
16:36kreyclojurestack.core=> clj-time.format/show-formatters #<format$show_formatters clj_time.format$show_formatters@19c7c21> mhhh
16:37tscheiblmcrittenden: I'm doing clojure for about a year now and have never needed 'for'
16:37ibdknoxtscheibl: for is fantastic
16:37dmansentscheibl: i used for the other day for a process that generated a large tree of results that needed to be collected
16:37ibdknoxin several cases for leads to much more readable code than (map ...) would
16:38dmansenotherwise, i normally would just use map / filter
16:38tscheiblthat's what I do... and a good deal of reduce
16:39kotarakibdknox: Hi. Does korma have to depend on log4j and ship with a log4j confirugation?
16:39technomancyhiredman: slamhound already does a lot of that ns stuff
16:39technomancythe hard part is figuring out where the line breaks go
16:39amalloyfor is just so much more concise for manymany kinds of sequence transformation
16:40amalloyi'm actually in the middle of my very first time using the :while clause in for. exciting times
16:40hiredmantechnomancy: right, that's where I stopped to think about it, and haven't continued
16:40dmansenfor is just the list monad, yes?
16:40ibdknoxkotarak: does it have to, no
16:40technomancyan automated tool to go from :use :only to :require :as would be slick.
16:40brehautdmansen: yes
16:40ibdknoxkotarak: I was just trying to get rid of the incredibly annoying c3p0 messages that shouldn't be there for people who are just starting
16:40raekmcrittenden: more variations using simpler building blocks: https://gist.github.com/1498952
16:40brehautdmansen: minus the generality of a monadic definition
16:41technomancymight need a lossless reader for that though =)
16:41dmansenbrehaut: right, i was really happy when i found that construct
16:41dmansenvery helpful
16:41hiredmanorly
16:41hiredmanman, where could we get one...
16:41mcrittendenraek wow, very helpful, thanks a lot
16:41kotarakibdknox: Ah. Ok. Logging seems to be an annoying part of the Java world.
16:41brehauttechnomancy: i have one of those. but its in javascript
16:41ibdknoxkotarak: yeah :( I mean it's really, really bad with c3p0
16:42ibdknoxI spent a couple hours trying to find another way to fix it
16:42hiredman(oh, right, I started one of those and never finished it)
16:42ibdknoxkotarak: is it causing you problems? I recently made the properties file less stupid
16:42tscheiblibdknox: have you had a look at BoneCP?
16:43brehautdmansen: (do-monad seq-m …) in algo.monads is for implemented monadically
16:43ibdknoxtscheibl: no sir, what's that?
16:43kotarakibdknox: In theory, it sounds easy: use slf4j and leave the rest to the end application. It doesn't cause problems, I hope. At least I seem to managed to exclude log4j. But I haven't done much work, yet.
16:43tscheiblibdknox: a connection pool that claims to be the fastest
16:43krey,(clj-time.format/unparse (formatters :basic-date-time) now)
16:43raekmcrittenden: also, the function should probably named "list-directories", since it filters away all files from the seq. :-)
16:43clojurebot#<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.lang.ClassNotFoundException: clj-time.format>
16:43tscheiblibdknox: I've been using it for quite a while now
16:44dmansenbrehaut: i took a look at that package but haven't played with it yet
16:44mcrittendenraek I actually changed the .isDirectory to .isFile, that's what I actually needed. I had it backwards
16:44kreyclj_time.core$now cannot be cast to org.joda.time.ReadableInstant clj-time.format/unparse (format.clj:147) <<< ???
16:44lazybotkrey: How could that be wrong?
16:44kotarakibdknox: I remember someone having conflicts with the configuration due to the one shipped with korma complaining on the clojure google group.
16:44devinus_,(.start (new Thread))
16:44clojurebotnil
16:44technomancydevinus_: I'll do an issue round-up sometime this week; going to make a release of 1.3.4 soon
16:44technomancy(for swank)
16:45kreydon't know much about jodatime
16:45devinus_technomancy: nice! thanks, i just thought i'd point it out. it's weird tho (regarding that issue) Clojure Box on widows seems to work just fine with the default hook
16:45devinus_technomancy: not sure what's so special about emacs 24 on ubuntu -.-
16:46kotarakkrey: clj_time.core$now is a clojure function.
16:46devinus_but i'm just glad to know it wasn't just my problem
16:46kotarakkrey: use something like (now) instead of just now.
16:46kreyahhhh
16:46brehautkrey: now is a function, not a value
16:46TimMcbrehaut: sniped again!
16:47kotarakkrey: for obvious reasons. ;)
16:47kreythought it was part of jodatime
16:47brehautTimMc: of course :P
16:47kotarakkrey: Joda has good documentation.
16:47devinus_technomancy: also, slightly off topic, but why does the version of slime used by swank so old (2010)?
16:47ibdknoxtscheibl: can you log an issue against korma to tell me to go check it out? lol
16:47mcrittendenoh ibdknox just realized you're the noir guy. I've been following that project for months and it's part of what prompted me to start looking at clojure today. thanks
16:48ibdknoxmcrittenden: you are quite welcome :)
16:48technomancydevinus_: because it works, and upgrading it to a newer version would be a lot of work for very little benefit.
16:48ibdknoxkotarak: I think the new properties file should fix that
16:48brehautTimMc: im partly and idiot, and partly suffer from NZ internet latency
16:48devinus_technomancy: ah ok, jw
16:48tscheiblibdknox: sure ;)
16:48TimMcbrehaut: I was wondering how much latency contributed.
16:48technomancydevinus_: I could rant if you want more details
16:48TimMcI don't know much about the IRC topology, either.
16:49amalloyTimMc: re latency: brehaut just had this great idea: maybe we could write a compiler that converts clojure to javascript
16:49devinus_technomancy: if you don't mind, i'd love to hear it :)
16:49TimMcamalloy: hehe
16:49dmansentechnomancy: i am curious too
16:49TimMcThere's a way to send an IRC ping, yeah?
16:50technomancydevinus_: basically the slime developers want everyone to run from CVS, and they are not interested in making stable releases
16:50brehautamalloy: ive heard of this javascript. its that thing from sun that runs applets right?
16:50amalloyTimMc: /ping
16:50TimMcOK, gonna try that.
16:50devinus_technomancy: i got that feeling too when i was working with quicklisp
16:50TimMcbrehaut: Did that notify you? I seem to recall that pings generate a notification.
16:51brehautTimMc: err. not that ive seen?
16:51TimMcOK, cool.
16:51brehautcould just be slow though :P
16:52TimMcAh, it depends on your client. I get notified when I ping myself -- and it takes 3.43 seconds to ping myself?!
16:54technomancythat's not going to work for people with production code, but nobody uses CL in their day jobs, so presumably they don't care much about that. but anyway, for swank-clojure I just picked a revision that was stable and packaged that, but the slime devs have introduced incompatibilities in CVS so you can't use the newest slime with the stable swank.
16:54technomancyanyway, it causes problems when people want to use Clojure and CL from the same Emacs instance, but most people doing Clojure lose interest in CL, so it hasn't proven to be terrible in practice.
16:54technomancyit's too bad that rant is too long for a single clojurebot factoid since I could save a lot of time with that
16:55amalloytechnomancy: gist.github.com
16:55TimMcNot a bad idea.
16:55devinus_technomancy: i'm sure you've had to reiterate it a few times :P
16:56devinus_technomancy: i'm one of the unfortunately that would like to get CL and Clojure working from the same emacs instance at some point
16:56devinus_for now i'm fine (just working with Clojure)
16:59dmansentechnomancy: do you have any idea how much has changed since you last updated slime? i'd be willing to take a look
16:59technomancydmansen: scottj would know
17:00dmanseni'll probably try it out tonight...i've just been having so much fun i can't stop :)
17:01devinus_technomancy: do you work at heroku?
17:01technomancydevinus_: yeah
17:01devinus_technomancy: i've gotta say, deploying my clj app to heroku with lein… that was the most pleasant experience of my life
17:01technomancydevinus_: awesome =)
17:11kotarakAh! Korma is case-sensitive! How do I get rid of this in SQL?
17:11clojurebotTitim gan éirí ort.
17:12ibdknoxkotarak: you have two options, you can either tell it not to use quoted identifiers, or change the naming functions
17:13fridim_devinus, do you use a Clj framework ?
17:13kotarakibdknox: If I have just simple :keyword -> table/column translations. Is it then save to turn of these quoted identifiers?
17:13kotaraks/of/off
17:14ibdknoxkotarak: quoted identifiers are only there to save you from name collisions within sql itself, like "user" which is reserved in postgres
17:14ibdknoxso yes, it's safe :)
17:14kotarakAh. Ok. Then how do I do it?
17:15ibdknox(defdb prod (postgres {:delimiters "" ...}))
17:15ibdknoxor whatever DB you're using, just provide the :delimiters key
17:15ibdknoxkotarak: that only works in 0.3.0-alpha5+ (it's at alpha8 now)
17:16kotarakAnd does this also mean that response maps from eg. a select us lowercase keywords?
17:16kotarakibdknox: using alpha8 with h2 at the moment.
17:16ibdknoxdepends on the db manufacturer
17:16ibdknoxkotarak: if you want you can force everything to be lowercased by setting the :naming key
17:17ibdknox:naming {:fields string/lower-case :keys string/lower-case}
17:17ibdknox:keys sets the keywords you get back in maps
17:18ibdknox:fields modifies what goes into the db (many db's, for example, uppercase all identifiers
17:19kotarakibdknox: Ok. Thanks. (I just don't want to SHOUT everywhere IN my CODE.) I find lowercase easier to read. H2 at least copes with lower-case input.
17:19ibdknoxkotarak: definitely, it's annoying :)
17:20kreyclojurestack.core=> (str (binding [*print-dup* true] (clj-time.format/unparse (formatters :date-hour-minute-second) (now)))) "2011-12-19T22:18:58"
17:21kreyBut the result saved in memcached is like: #=(clojurestack.memcache$gen_timestamp. )
17:22hiredmankrey: looks like a bad print dup method is defined for whatever type that is
17:22kreyokay, forgot () again. mhhh
17:22kreyCan I get rid of all taht *print-dup* stuff?
17:23kotarakibdknox: I can't redef an existing defdb?
17:23brehautkrey: yes i think so; unparse generates a string anyway
17:24ibdknoxkotarak: I made them defonce's because terrible things happened if you constantly recreated those connections (you would kill your db)
17:25amalloyso if i have a string like "foo/bar/baz", anyone have a clever way to get out the stuff after the last /? i could do a regex, or a .lastIndexOf or something, but neither of those seem very nice
17:25kreyyes, works
17:26kotarakibdknox: I see. Maybe a shutdown command or something like that should be available? One does this in development only, anyway, I would suspect.
17:26kotarakibdknox: One ns-unmap later everything works perfectly, btw. :)
17:26kreyIs there a nice way to print records to stdout ? like they appear in the repl ?
17:26brehaut,(last (.split "foo/bar/baz" "/")) ;; amalloy ?
17:26clojurebot"baz"
17:27kotarak,(subs "foo/bar/baz" (.lastIndexOf "foo/bar/baz" "/"))
17:27clojurebot"/baz"
17:27ibdknoxkotarak: yeah, should be a dev only issue. There might be something better for that though, I'll see if I can come up with something :)
17:27kotarakplus an inc...
17:27ibdknoxbrehaut's is probably the shortest
17:28brehautibdknox: and slowest ;)
17:28ibdknoxyes :p
17:28amalloybrehaut: nahhhh, re-seq would be slower
17:28brehautah good point
17:28kreymakes it sense to encapsulate the binding [*print-dup* true] ? maybe into "escape [exp]"
17:29ibdknoxI assume lastIndexOf would be the fastest
17:29kotarakibdknox: Maybe just a warning or so. I was simply surprised that it ignored my setting. After manually defing to nil, it wouldn't switch to the given definition, Then it rang a bell. :)
17:29amalloyyeah, i was going to do lastIndexOf/subString but hoped someone knew of a prettier built-in
17:32kotarakibdknox: one more question: How do defdb things relate to java.jdbc's with-connection? Can I use them there also? (I suspect, no)
17:33ibdknoxkotarak: if you call korma.db/get-connection, you sure can :)
17:34kotarakibdknox: Ok. Thanks. :) (Nice support. :D)
17:37kreyWhat is happening to defstruct / structs ? Are they removed when records are the way to go? Or do they stay for any reason?
17:39technomancykrey: they may be removed at the next backwards-compatibility-break, but that is very far off in the future.
17:39technomancypeople are still licking their wounds from the last one.
17:40kenthHi, does anyone own the Joy of Clojure book? I have trouble understanding a piece of code on page 85
17:41technomancyclojurebot: slime cvs rant is http://p.hagelb.org/slime-cvs-rant.txt.html
17:41kreyAhhh thx technomancy ...
17:41clojurebot'Sea, mhuise.
17:41brehautkencausey2: listing 5.1 ?
17:41brehautsorry, kenth: listing 5.1 ?
17:41kreyWhat has been excluded in the last release? Is there a list of items?
17:41kenthYep, on the last line (map #(map + yx %) deltas)
17:42kenthI have never seen anonymous functions used that way
17:42brehautkenth: its reader shorthand
17:42brehaut,'#(map + yx %)
17:42clojurebot(fn* [p1__27#] (map + yx p1__27#))
17:43brehautkenth: see page 28, 2.3.4 In-place functions with #()
17:43raekthere: http://dev.clojure.org/jira/browse/CLJ-900
17:44TimMc&`#(map + yx %)
17:44lazybot⇒ (fn* [p1__9130__9131__auto__] (clojure.core/map clojure.core/+ clojure.core/yx p1__9130__9131__auto__))
17:44TimMcbrehaut: There are two levels of gensym there!
17:44brehautTimMc: lol true
17:45brehautkenth: is the anon function syntax that only thing you are having trouble with in that piece of code
17:46kenthI was trying to understand why + and yx are not in brackets, I'm looking at page 28 now..
17:48kenthtwo functions map, and + followed by 2 arguments yx and %, is that part of infix notation?
17:48kenthprefix I mean
17:49Chousukethe + is an argument to map
17:49brehautand map over two lists is like zip in some functions
17:49brehauts/functions/languages/
17:49brehauts/lists/seqs/
17:50Chousukekenth: in this case, #(map + yx %) expands to a function of one argument (the %) that maps + over yx and the argument
17:50TimMc&(map + [1 2 3] [300 200 100]) ; kenth
17:50lazybot⇒ (301 202 103)
17:50kenthOk I see, is yx a vector?
17:50Chousukeyx can be any seqable thing
17:50kenthOk got it, thanks
18:24sjlAnyone know what this exception is trying to say? Exception in thread "main" java.lang.NoSuchMethodError: clojure.lang.RT.keyword(Ljava/lang/String;Ljava/lang/String;)Lclojure/lang/Keyword;
18:30seancorfieldsounds like you've called keyword with two arguments?
18:31akhudekany clojureql experts around? I'm having trouble figuring out if what I'm trying to do is possible.
18:31akhudekbasically a conj! where one of the values is an aggregate result of a select
18:31akhudekin a single transaction
18:31seancorfieldsjl: &(doc keyword)
18:31seancorfielddarn, where's the bot?
18:31seancorfield,(doc keyword)
18:31clojurebot"([name] [ns name]); Returns a Keyword with the given namespace and name. Do not use : in the keyword strings, it will be added automatically."
18:31sjlseancorfield: hmm, I ran lein clean and lein deps again and now it doesn't happen, so it must be something in a lib I'm using...
18:32seancorfieldoh ok...
18:32accelis using Dynamic Vars (binding) an acceptable way to simulate the State Monad in clojure?
18:33sjlweird that lein deps alone didn't fix it
18:33raeksjl: could be due to old .class files from a compilation to a different clojure version
18:33sjlraek: ah, that must be it. I tried 1.3 but something in the libs I'm using didn't like it, so I switched back to 1.2.1 and got that
18:34seancorfielddid the signature of keyword change between 1.2 and 1.3?
18:35seancorfieldi find it a bit confusing that ns in some docstrings means a namespace object and in others means a namespace name (a string)
18:43akhudekI'm guessing this is not possible, looking through the source.
18:48akhudekI find I'm often fighting clojureql due to it's lack of transactions that combine selects and inserts. :/
18:49pandeiroanyone know what happened to https://github.com/bobby/trail ? ClojureScript MVC-like thing?
18:51acceldoes load-file not automatically reload all?
18:51acceli'm getting weird problems of running old code
18:51technomancycertain forms cannot be reloaded at runtime
18:51accelare defmulti one of them?
18:51accel*is* multimethods one of them?
18:52technomancyyou can do it, but it takes a little trick
18:52technomancybasically (def x nil) (defmulti x [...])
18:52accelURL? I'm clearly not doing such trick
18:52accelhmm
18:52accelthat's it?
18:52technomancy"it's a feature"
18:52technomancyyeah
18:52technomancyyou just have to redef it to nil before loading the defmulti
18:53accelsince you understand this and I do not; what is the intended benefit of this feature?
18:53technomancyif you have defmethods in a separate file from the defmulti, it's easy to reload the defmulti and lose all your methods without this behaviour.
18:54technomancy(not defending it; I think it's bad design, but that's the logic behind it.)
18:55accelit kind of makes sense; part of the coolness of multimethods is that they can be defined over different files
18:56technomancyyeah, but you can get into crazy circularity issues if you split up a defmulti and its methods
18:56accelI'll jot down your nick and bother you when I get into those. :-)
18:57pandeirowhy is it that 'doc' isnt available when i clojure-jack-in to a lein project from emacs? is that normal?
18:57technomancypandeiro: try C-c C-c C-d instead
18:57brehautpandeiro: clojure has multiple entry points (for lack of a better term), and only the repl one includes the repl tools by default
18:57technomancydoc was moved out of the clojure.core namespace
18:58pandeiroi see, C-c C-c C-d, cool
19:01accelcan I attach member methods to defstruct, defrecord, or deftype?
19:11aaelonyI'm wrapping my head around the examples here (http://clojure.org/concurrent_programming) and hungry for more clojure examples of java.util.concurrent. Any good links are most welcome...
19:24accelhow do I create something mutable taht I can call set! on?
19:25hiredmanwhy?
19:25clojurebothiredman: because you can't handle the truth!
19:25hiredmanclojurebot: it's true
19:25clojurebotTitim gan éirí ort.
19:25lancepantz_hehe
19:25acceldoes let create thread local vars?
19:25accel(thread local vars is what I wnat)
19:25hiredmanaccel: why?
19:25acceli'm keeping track of a cursor
19:26accelI understand clojure is all abou being functional
19:26accelfor this particular case, I have to maintain state
19:26accelelse I have to use amonad
19:26hiredmanwhat kind of cursor?
19:26amalloypandeiro, technomancy: C-c C-d C-d, right? not C-c C-c C-d
19:26accelx + y location no the screen
19:27technomancyamalloy: oh right
19:27accel*on*
19:27technomancywell, that or C-c C-d d
19:27hiredmanaccel: can you not just ask the cursor where it is?
19:28hiredmanif you are doing gui stuff in java, you are dealing with multiple threads, so threadlocals are kind of "meh"
19:29accelNote - you cannot assign to function params or local bindings. Only Java fields, Vars, Refs and Agents are mutable in Clojure. Hmm
19:29hiredmanif you don't have a cursor object you can just ask "where are you?" then most likely you are getting cursor information as a serias of events
19:29hiredmanwhat you'll want to do is give that series of events a single identity via a reference type
19:30hiredmanmost likely a ref or an atom
19:31hiredmanhttp://www.infoq.com/presentations/Are-We-There-Yet-Rich-Hickey
19:33accelI reallyw ant vars.
19:33accelQuestion: is there a way to create vars besides (def x ... )?
19:33hiredmanwhy?
19:33clojurebothiredman: because you can't handle the truth!
19:33lancepantz_lol
19:33hiredmanclojurebot: knock it off
19:33clojurebotI don't understand.
19:34accelah; with-local-vars
19:35accelthat is what I want
19:35technomancyclojurebot: with-local-vars
19:35clojurebotIt's greek to me.
19:35hiredmanaccel: no it isn't
19:35technomancyclojurebot: with-local-vars is not what you want.
19:35clojurebotc'est bon!
19:35technomancy(for all values of you ≠ rhickey)
19:36hiredmanaccel: why do you think you want a var?
19:36hiredmanfor all values of you where you can't answer the question "why do you want a var?"
19:37accelbecause I know for certain that these set of variables are only being modified in this one thread
19:37hiredmanso?
19:37accelSo why can't I use local vars?
19:37accelWhat do ou have against vars?
19:37accelDid you buy stocks of atoms/refs/agents ?
19:38brehautvars are more about language plumbing than mutation (at least for non-experts)
19:38accelI don't understand what you mean by "language plumbing." Can you explain?
19:39technomancyaccel: the only reason vars are mutable is to allow you to modify your program at runtime.
19:39hiredmanif you can say just say (MouseInfo/getPointerInfo) and get the info when you need it, why are you mutating anything?
19:39technomancyotherwise you'd get into situations like ml where redefinitions only affect functions defined after them.
19:39accelhiredman: the cursor is NOT managed by java; it's a virtual curosr I am amnaging in clojure
19:40hiredmanaccel: ok, so you have a pair that represents an x and y?
19:40accelhiredman: yes
19:40accelhiredman: and this is also a very very short lived cursor
19:40accelhiredman: it's basically a virtual cursor that helps me keep track of where to draw text
19:40brehautaccel: 'plumbing' as in the stuff under the surface that does important stuff that you dont need to understand just to use the sink
19:41acceli.e. y = tracks # of new lines; x = tracks number of "indents"
19:41accelbrehaut: so basically, vars were never meant for mortals to use?
19:42brehautmortals is too strong
19:42brehautthey have a specific purpose that is not blanket 'state'
19:42hiredmanaccel: no vars are very useful, and you should know what they do, and what you can do with them, but you should also know that if you managing mutation you should use a ref or an atom
19:42brehautwell. purposes
19:42akhudekoh nice, I think transactions are working in clojureql 1.0.3
19:42cemerickaccel: Clojure has a number of reference types; vars are just one of them.
19:42akhudekjdbc transactions that is
19:43hiredmanaccel: if your cursor is lexically scoped, then you can just recur around it
19:43accelalright you guys win. I will read page 172- of the clojure book; then decide if I want to use vars.
19:44dnolenaccel: if you need to maintain some state why don't atoms work?
19:44cemerickYes, we won! :-D
19:44pandeirodnolen: do you know anything about https://github.com/bobby/trail (clojurescript mvc) ie where it went?
19:44accelhttp://paste.lisp.org/display/126589 <-- what my code currently looks like; I need to provide functions (nl, sr, sl, drawstring) that other functions can call
19:44hiredmanaccel: I dunno if any clojure book as a decent treatment of vars
19:45brehautwow. defstruct
19:45brehautand an underscore
19:45hiredmanactually I just rewatched rhickey's talk on clojure and concurrency and he said something like "I could talk for 2 hours about vars"
19:45hiredman"well, why don't you?"
19:46accelbrehaut: I'm pretty sure I have more than 1 underscore, I think I have 4.
19:46brehautaccel: make_Cursor should probably be make-cursor, and just stick with a map for the cursor for now; defstructs are deprecated (?)
19:46dnolendefstruct is deprecated in favor of defrecord
19:46brehautdnolen: but not annotated as such in the code i think
19:47hiredmanaccel: you should just have an atom you call 'cursor' and (defn nl [cusor] ...)
19:47brehauthttp://clojure.org/data_structures#Data%20Structures-StructMaps says 'most uses of StructMaps would now be better served by records'
19:48brehautinfact in this case, i think a protocol and reify looks like a better candidate ?
19:48brehaut(over an atom)
19:49hiredmanbrehaut: why?
19:49brehauthiredman: rather than a map of functions?
19:49hiredmanoh, sure, no I thought you meant over just an atom
19:50brehautoh right sorry. i meant _closed over_ an atom
19:50brehautbut i am a muppet. sorry
19:50hiredman(defn make-cursor [x y] {:x x :y y})
19:51acceldefrecord expects me to provide typing
19:51accelhow do I provide the types of functions?
19:51hiredman(defn draw-cursor [g s {:keys [x y]}] (.drawString g s x y))
19:51hiredmanhmmm
19:51accelI have a field; its records stores functions. What is the type of a function?
19:52brehautdefrecord doesnt require types
19:52hiredmanoh, make-cursor should wrap the map in an atom, so the destructuring won't work
19:52brehautaccel: your code has a very OO factoring. its pretty weird looking clojure code
19:52hiredmanbut anyway, no need for with-local-vars, no need for passing around a map of functions, no need for reify
19:53dnolenhiredman: I'm not sure if make-cursor should do the atom wrapping.
19:53acceloay; it soudns like I'm doing sommething reallyr eallyw rong
19:53accelso let me repharse my question:
19:53accelI want to render sexps in a java graphics environment
19:53accelI want each () to be on a new line, and to be indenented appropriately
19:53accelhow should I solve this problem?
19:54cemerickaccel: do you have a text component, e.g. JTextArea, or are you drawing via Graphics2D?
19:54hiredmanyou are in for a world of pain
19:55hiredman(if not already apparent)
19:56brehauthiredman: is that for the indenting or the java2d? or both?
19:56hiredmanthe easiest thing would be to use clojure.ppint to print it, and write it to a jta, but the formatting isn't the best
19:56dnolenaccel: I have no comment on how you should do that, but I would write you paste like this, https://gist.github.com/1499686
19:56accelcemerick: Graphics2D
19:56hiredmanbrehaut: the first, but the second wouldn't surprise me
19:56hiredmanso the third would not either
19:57brehaut:)
19:57accelI have to roll the printing routines myself; I'm actually printing stuff more complicated than just sexps
19:57accelit's like sexps + graphics
19:57cemerickaccel: I'd do what hiredman said, and then rasterize the JTextArea to an image you draw to the graphics context.
19:57accelbut it's approximately the same problem
19:58brehauti have bad memories of font metric stuff in java 2d back in the 1.4 days
19:58brehaut(quite possible i was just a muppet though)
19:59accelscrew it; enough prermture planning
19:59cemerickNo, text rasterization is not an easy thing.
19:59accellet's see where this breaks :-)
20:00hiredmanyou can mix graphics and text without having draw everything yourself
20:00hiredmandepending on how much mixing you are doing
20:01cemerickhas anyone worked with canvas much after using Java2D extensively? How scared/enthusiastic should I be about the former in comparison?
20:02brehautive dabbled with both. canvas compares nicely for the basics
20:03cemerickand beyond the basics? That's where all the trouble usually happens :-)
20:03brehautcanvas doesnt have many more complex operations out of the box
20:03cemerickI've found 1.6 Graphics2D to be remarkably satisfying.
20:03brehauti think java2d is better for stuff with masking, image composition etc
20:03cemerickah
20:04brehautand things like complex curves
20:04cemerickprobably no quads and such
20:04brehautquads = quadratic beziers?
20:05brehautif so, then no
20:05cgraymidje question: I have a function (foo) that returns a set of vecs like #{["bar" "baz"] ["fred" "ethel"]} ... how do I check for the first vec in the set using midje? (foo) => (contains ["bar" "baz"]) doesn't seem to be working
20:06sritchiecontains?
20:06sritchiewith a ?
20:06clojurebotcontains? is for checking whether a collection has a value for a given key. If you want to find out whether a value exists in a Collection (in linear time!), use clojure.core/some or the java method .contains
20:06brehautcemerick: last time i tried to use j2d, i couldnt find a push/pop state/matrix operation. does one exist?
20:06brehautor just the set itself
20:06cgraysritchie: contains? is the normal clojure function right
20:07brehaut,(#{["bar" "baz"] ["fred" "ethel"]} ["bar" "baz"])
20:07clojurebot["bar" "baz"]
20:07cgraybrehaut: thanks, that works
20:07cemerickbrehaut: sure, Graphics.create(), been there forever :-)
20:07brehautcemerick: aha :)
20:08cemerickThere's no push/pop, you just get another context, so you can work in multiple levels of the "stack" at the same time.
20:08brehautsure, that makes a bunch of sense
20:08brehautoh, the other gotcha with canvas is that if you are doing pixel work, then you have to watch out for fun with Number sometimes being an int and sometimes being a float
20:09brehaut(also, whoa that stuff gets slow fast)
20:10cemerickyeah, that's my biggest concern
20:10cemerickaside from the whole programming-in-the-browser thing :-P
20:10brehautlol :)
20:11cemerickMaybe I'll just do the tiling thing and keep my sanity.
20:11dnolencemerick: are you going to be doing a lot of pixel level manipulation tho? I've found that even that can surprisingly fast in Chrome and Safari.
20:13cemerickdnolen: Not clear yet, but I suspect I'll have at least one layer doing detail work, even if the body of things are going to be tiled in.
20:14brehautcemerick: i found that safari and chrome can do a simple 3x3 convolution of a ~1400x1000 within acceptable time
20:14brehaut(it gets a little sluggish to do on resize, but its not unexceptable for other operations)
20:14cemerickBut FF and IE 9 dog it I take it?
20:15dnolencemerick: FF and IE 9 both have good canvas engines, Opera too.
20:15brehautIE9 didnt exist when i was trying this stuff
20:15dnolencemerick: but if your operations are compute intensive, Chrome & Safari have the edge.
20:15brehautits the javascript engine that is the real bottleneck for imagedata processing though
20:16brehautdnolen: FF has picked up its game. i think it might have an edge over Saf at the moment
20:16brehautsee also http://arewefastyet.com/
20:16brehautcemerick: however, you've got no hope of it working acceptably on an iphone or ipad
20:16brehaut(and a lot of android phones dont even have canvas :S)
20:18cemerickoh well
20:18dnolenyou can definitely do very complex graphics quickly in canvas. Our cartographers at Times are doing neat stuff with complex maps that used to be done in Flash.
20:19cemerickThat's promising then.
20:19dnolenworks great on iOS even though you have to render at double resolution on the newer devices.
20:19technomancyI wonder how many professional cartographers there are in the world.
20:19brehauti would guess that there are a lot more than their used to be
20:20brehautdnolen: are they drawing vector stuff on the iOS or doing pixel manipulation?
20:20dnolenbrehaut: mostly vector stuff, some pixel stuff I think for hit detection, it's all very custom for performance reasons.
20:21sritchiedo you guys have any advice for how to think about designing a throttling download manager in clojure?
20:21sritchiethis is my first real dive into the concurrency primitives
20:22brehautdnolen: interesting. i found i couldnt get a full screen image have 1 multiply pass on the iPad.
20:22brehautcertainly the vector stuff is much more attainable
20:23brehautcemerick: if you are just _drawing_ images to the canvas its obvious very fast btw, its just per px twiddling with JS that can get slow
20:23dnolenbrehaut: so far we've seen that JS performance is an order of magnitude slower on iOS. which is not a big deal for many things, certainly for graphics tho.
20:24brehautdnolen: did you see a noticable bump when the JIT was enabled in safari?
20:24brehaut(in iOS 4.2 or 5 i think?)
20:24dnolenbrehaut: I think it was like 25X slower before, now 10X slower.
20:24brehautright
20:24brehautthanks
20:25cemerickbrehaut: I presume it'd be faster to just put the tiles into a background element and draw detail on an otherwise-transparent canvas on top…
20:25brehautcemerick: yeah probably
20:25brehautyou dont have to manage the redraw for one thing
20:25cemerickright
20:25cemerickMore I can do via DOM/svg, the happier I get. ;-)
20:25brehautcemerick: i think you can probably just set the background css property on the canvas element too ;)
20:26brehaut:)
20:26brehautback in a bit
20:26dnolencemerick: you can also use a canvas for background images.
20:26cemericksure
20:26dnolencemerick: this is interesting since then you can draw to one surface and this is efficiently replicated.
20:26cemerickI'd hope I don't have to get that fancy.
20:27cemerickreplicated?
20:27dnolencemerick: it's a shared buffer
20:27dnolenfor those elements using that canvas as a background.
20:27cemerickoh, I see
20:48brehautcemerick: if you do plan on canvas stuff running on iOS devices, you also have to be careful of memory constraints; the browser only allows you a very small portion of the available system memory to be present in memory at once and all your JS objects (including any images) have to be within that allowance
20:51cgrayis set/select faster than filter on sets?
20:51hiredman,(require 'clojure.set)
20:52clojurebotnil
20:52hiredman~source clojure.set/select
20:53gfredericksthat may be the first time I've seen the same object used for the last two args of reduce
20:54brehautgfredericks: same. clever trick though eh
20:54gfredericksindeed. took a bit to make sense of it.
20:54gfrederickscgray: it's probably at least faster than using filter and putting it back into a set
20:55cgraygfredericks: true, but I could just use the output of filter as is
20:55cgrayI suppose it probably depends how many things are returned eh?
20:56gfredericksmy naive hunch is that for outputting a seq filter would be better
20:56gfredericksmaybe not noticeably
20:56gfredericksI say that because set/select has to muck with the structure of a hash-set
20:56brehauthuh. a quick and dirty time dotimes suggest that select is a few orders of magnitude slower
20:56gfrederickswhereas filter is just iterating
20:56gfrederickswhich select has to do anyhow
20:57brehautand by a few i mean 3
20:57cgrayorders of magnitude = powers of ten?
20:57hiredmanbrehaut: will a doall around filter?
20:57brehauthiredman: aha good catch
20:57brehaut0 orders of magnitude different
20:58TimMchaha, I always forget doall
20:58cgrayok, i'll just use filter then, because that way i don't have to require clojure.set
20:58TimMcor dorun, really
20:58brehautfilters still a bit faster but not by much
20:58brehautcgray: use the one that has the semantics you want
20:59brehautie if you want a seq use filter
20:59cgrayit doesn't really matter in this application... either works
20:59brehautcgray: sounds like it wants a seq then? you are passing it to a seq consuming function?
21:02cgraybrehaut: no, i'm going to choose one of the returned things at random
21:02brehautcgray: using rand-nth ?
21:02cgrayyeah i guess, so probably it wants to be a seq then
21:07accelslightly OT question: should pizza delivery be 10% or 20% tip?
21:07gfredericksthat's ironic because rand-nth could probably be faster on a set theoretically...
21:08brehautgfredericks: now i need to go look at the imp of nth
21:08cgraygfredericks: if only it worked... :P
21:08brehaut~source nth
21:08cgraythe nth of a set doesn't make much semantic sense
21:09gfrederickscgray: no, but I think rand-nth as a direct impl (not using nth) could be faster
21:09gfredericksat least if it could reach into the set's impl as well
21:09gfredericksI'm not suggesting this should exist
21:09brehautgfredericks: oh right. yes sure
21:11gfredericksthough now that I think about it, I think for a hash-set there's maybe not a fast way to do it with an even distribution... :/
21:12cgraygfredericks: maybe it would be better called clojure.set/rand-element or something
21:12gfrederickscertainly
22:14devnbest parser combinator library for clojure?
22:25devnCould someone enlighten me w/r/t (derive `Foo `Bar)
22:25devnIs a well-documented pattern? I personally haven't rubbed up against it until recently.
22:25devnIs it*
22:26devnIn general I tend to see (derive ::foo ::bar)
22:27brehautdevn: isnt that so you can make heirarchies that include classes?
22:27brehautalthough it appears that derive only cares that things are clojure.lang.Named
22:34cemerickbrehaut: `Foo yields a namespaced symbol
22:34cemerickdevn: decidedly not typical.
22:35devncemerick: I figured as much. This comes from a library which was a direct port by a Haskell guy. namesLookLikeThis, etc.
22:35devn,(derive `Foo `Bar)
22:35clojurebotnil
22:35devn,(ancestors `Foo)
22:35clojurebot#{sandbox/Bar}
22:35cemerickit's not going to hurt anything, but looks damn strange.
22:36devnSince it is a set I suppose you could call it like a fn, though, right?
22:36devn,(dervice ::foo ::bar)
22:36clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: dervice in this context, compiling:(NO_SOURCE_PATH:0)>
22:36devn,(derive ::foo ::bar)
22:36clojurebotnil
22:36devn,(ancestors ::foo)
22:36clojurebot#{:sandbox/bar}
22:36devnThere is a subtle difference. Hm.
22:37devnstill seems like the latter is to be preferred
22:37brehautcemerick: oh of course. my bad
22:37devnwhat with hashmaps being a more regular form of clojurian currency
22:37cemerickwhat do hashmaps have to do with it?
22:38devnI was just noting that `Foo => #{sandbox/Bar}, and ::foo => #{:sandbox/bar}
22:38cemerickthey're both sets
22:43devncemerick: yes, but one of them lends itself more to being used as a predicate
22:43devn,(remove #{:foo/bar} [:foo/bar :bar/baz])
22:43clojurebot(:bar/baz)
22:44cemerick,(remove #{`bar} `[bar baz])
22:44clojurebot(sandbox/baz)
22:44cemerick:-)
22:44devncemerick: yeah I knew that was coming
22:44cemerickI get what you mean, keywords are certainly more common in most places
22:45devnthe backticks everywhere is weird
22:45devns/is/are
22:45cemerickcertainly doesn't help readability, and also sets off alarms because they're so rare outside of macros
22:45devnexactly.
22:45devncemerick: going to clojure/west?
22:46cemerickmmm, hopefully
22:46cemerickneed to get my proposal in sometime this week
22:46devnI think I'm going to try my hand at a proposal or two as well.
22:46alexbaranoskydev: go for it!
22:46devnI've been conferencing a bit too much this year to not speak at another one.
22:47alexbaranoskydevn: what might you speak about?
22:48devnalexbaranosky: I don't know. I was thinking something about community maybe?
22:48cemerickdevn: you should :-)
22:49alexbaranoskydevn: that could be really cool depending how you spin it
22:49devnI think maybe I'll just get on stage and talk about all of the people who make clojure so great. I seem to constantly have about 30 tabs open with various clojure stuff in each of them.
22:50devn...daily...
22:50cgrayhmm, am i doing something wrong with marginalia? i've got lein-marginalia 0.6.1 in my dev-dependencies, but when I run lein marg, the docstrings don't get taken out of the function definitions
22:50alexbaranoskyI've thought of doing something on TDD in Clojure with Midje, but am procrastinating on a proposal
22:51devni don't know how the hell I would have found half of the stuff I know about if I had been spending my time in another community
22:51alexbaranoskycgray, I also noticed that, and wondered what I might've been doing wrong
22:51cgrayalexbaranosky: ok, at least i'm not crazy :)
22:51alexbaranoskydevn: its just an awesome and smart community
22:52alexbaranoskycgray, it seemed to put comented code onto the left margin, but leave the doc strings in place, which seemed wrong to me
22:53devnalexbaranosky: we gotta be careful to keep group hugs alive, but not drown ourselves in a sea of meaningless "awesomeee!"
22:54alexbaranoskydevn: it's an age old balance... I think
22:55devnbalance seems to be the key word there. i like beer and cake, but it wouldn't be as tasty were it not for the pot of brussel sprouts I ate yesterday
22:55alexbaranoskyhehe
22:56alexbaranoskythis macroexpand-scan function I wrote seems vaguely useful: https://gist.github.com/1499725
22:58devnalexbaranosky: forgive me for prying in public, but i met you at the conj, and from that moment until now I've seen you in IRC offering help, etc. all the time. Where were you before?! :)
22:59brehautcemerick: clutch 0.3 looks like a great change
22:59alexbaranoskydevn: didn't use IRC..... :) I've been working on Midje in my spare time, and using the Clojure mailing list every once in a while, or tweeting about Clojure, but didn't realize how cool the party was on IRC
22:59cemerickbrehaut: thanks, hope so :-)
23:00brehautcemerick: i look forward to upgrading my site
23:00cemerickI really want to get a proper CouchDB type in there, and cloudant query support.
23:00devnalexbaranosky: yeah I saw you listed on the contibutors list. Anyway, long story short: awesome you're on IRC; I really enjoyed chatting with you at the conj.
23:00cemerickAnd if we can get a clojurescript release, I'll bring https://github.com/cemerick/clutch-clojurescript in
23:01alexbaranoskydevn: I meant to chat more, but got swept up in the conference and before I knew it it was over
23:01devncemerick: ah, the question is not *if*, but *when*
23:01brehautcemerick: that would be excellent!
23:01sirvalianceWhere does "lein search" pull its information from?
23:01devnsirvaliance: clojars.org
23:01brehautim using plain old (crappy) JS views atm
23:01sirvaliancedevn: Ahh, thanks ;)
23:01devnsirvaliance: np. :)
23:02cemericksirvaliance: the maven indexes published by all the repositories you have registered in your project.
23:02cemerickdevn: here's hoping :-)
23:03devncemerick: I think tooling is really what needs to grow, but that's just a gut feeling.
23:05cemerickdevn: you mean w.r.t. cljs?
23:06brehautcemerick: its been a while since i touch my couch code, but the gist you linked in the ML post looks like the api is cleaner / consistent?
23:06devncemerick: yes.
23:06cemerickbrehaut: Yeah, it's gotten a pretty good scrubbing.
23:06brehautexcellent. i found the old api a bit forgetable
23:07cemerickIt's still more verbose than I'd like, but there are a *lot* of operations available.
23:07cemerickThat's why I want to tie things up with the typical clojure vocabulary.
23:07brehautmakes good sense
23:08cemerickOne of the bigger changes that's more subtle is that view results are all lazy now.
23:08brehautoh cool
23:09cemerickI used to implement that myself off to the side, so it was nice to be able to lift it up in to the lib proper.
23:10brehautis there any support for serialisation time document processors (ie, to turn date / time objects into strings)?
23:16devnoff the top of your head do you know if clojure.contrib.monads, contrib.except, and contrib.error-kit made the leap to 1.3?
23:16brehautclojure.contrib.monads is clojure.algo.monads, and has a 0.1.1-SNAPSHOT release in the sonatype snapshots repo
23:17brehaut(off the top of my head)
23:18cemerickdevn: except and error-kit are both dead-ends IIRC; try slingshot
23:19brehautcemerick: you could make that argument about a monads lib too ;)
23:19cemerickbrehaut: you mean have j.u.Dates round-trip through JSON automatically?
23:19brehautcemerick: yeah, or jodatime objects
23:19cemerickcrap, I don't get any monad jokes :-P
23:19brehautcemerick: that was a blunt one about the utility or applicability of monads in clojure
23:20clojurebotclojure is a language to use if you want to up your game
23:20cemerickah-ha
23:20brehaut(and that was a subtle monads joke)
23:20amalloyevery time cemerick gets a Maybe MonadJoke, it's Nothing
23:20cemerickbrehaut: register a method (or type extension) with clojure.data.json
23:20brehautamalloy: lol
23:20cemerickamalloy: see, I got *that* one! :-D
23:20brehautcemerick: aha fantastic :)
23:20cemerickbrehaut: that's system-wide though, so…
23:21brehautcemerick: aha
23:21brehautnot a problem for my app though
23:21devnoh man, I imagine a really terrible comedian doing monad jokes on a tuesday night open mic
23:22brehautdevn: im not sure the audience would have the appropriate comprehension
23:22devnexample punchline: "I don't know, *maybe* I will! Thank you. Thank you. You're really too kind. So anyway, I'm writing some haskell."
23:23devnbrehaut: that's what would make it so great and terrible at the same time. a comedian completely speaking over everyone's heads but does like a charicature of a comedian.
23:23devndoes it like*
23:24brehautall they really need is liftM audience
23:24devnlike "just flew in from the coast and boy are my arms tired. so anyway, monads, right?"
23:24devn"am i right people? how crazy are monads?"
23:24amalloy"I came here with a [[Joke]], but accidentally ran it through the List monad, and now I can't tell one group from the other"
23:24devn"little monad humor for you. dont forget to tip your waitress."
23:25devnamalloy: haha. but now imagine a struggling comedian doing monad humor in a night club with his own laugh track on a portable stereo.
23:26amalloydevn: my version is more fun, sorry
23:27devnmore like "more *fn*"! am i right people? little clojure humor for you.
23:27amalloydid you see someone had that on a shirt at the conj?
23:27amalloyClojure programmers have more fn
23:27brehautlol
23:28devnI didn't, but seancorfield and dnolen had a great idea: "Actuaries Do It With Prolog"
23:28devns/With/In -- I'm forgetting which it was
23:28seancorfieldYeah, I worked at a firm of actuaries in England and they had a whole bunch of software written in Prolog
23:29brehauthttp://spl.smugmug.com/Humor/Lambdacats/13227630_j2MHcg#960526161_yXhEz
23:30devnbrehaut: haha
23:30brehautimperative cat is quite excellent too
23:31devnexpectid type: cat -> tail, infurd type: (cat, tail)
23:31leo2007there are about 1200 clojars.
23:32seancorfieldi wonder how many of those are just forks of other libraries?
23:36devnseancorfield: there's probably a good answer if groups and extra dir structure, group, etc. is stripped from their ns's