#clojure logs

2012-04-24

00:08dnolenyoklov: a bit late for Ludum dare but (set! ctxt -fillStyle "...") is now in master.
00:08dnolenyoklov: gave it a quick spin and I think it's a big win for JS interop.
00:10yoklovdnolen: it looks much better
00:11spjtI think Emacs is harder just because it seems impossible to find out how to do anything
00:11yoklovdnolen: it looks like like it will help a lot
00:12kovasbdnolen: how is it different from using aset?
00:15kovasbspjt: lol
00:15dnolenyoklov: excellent.
00:16emezeskespjt: If you want to measure that, you'll need a metric to describe how good someone is at each (Clojure and Emacs) after a certain amount of time.
00:17emezeskespjt: And then you need some way to objectively compare that metric between the two.
00:17yoklovkovasb: aset feels like breaking the abstraction somewhat
00:17yoklovlike aset on a dom node
00:17clojurebotyour random number generator is brokem
00:18dnolenkovasb: not that much different, but reads more sensibly, and emits more sensible looking JS code.
00:18kovasbyoklov: agree, was just wondering if there is a functional difference
00:18yoklovkovasb: i don't think so, but the closure compiler might behave differently?
00:19kovasbyoklov: yea, with aset you have to refer to the property as a string
00:19dnolenmmarczyk: about your hash code caching patch.
00:19spjtemezeske: Maybe I just had a rough start with Emacs. I really enjoyed Clojure until I tried to get it working in Emacs.
00:19mmarczykdnolen: ?
00:21emezeskespjt: I could see learning two big new things at the same time being very difficult.
00:21ivanspjt: IntelliJ is okay, but better for browsing code than editing lisp
00:21dnolenmmarczyk: perhaps we can avoid calling aset and using and an exposed key name.
00:21dnolenmmarczyk: about about a ^:mutable hashCode field and an Object setCache method.
00:21devndnolen: i drew you a portrait: https://skitch.com/thinkslate/8ik1x/dnolen
00:21devnin honor of student acceptance for GSoC
00:21dnolendevn: haha awesome :)
00:22devn:)
00:22dnolenmmarczyk: setHashCode rather.
00:22mmarczykdnolen: sure, but then that will need to be supported explicitly by all data structures
00:23mmarczykdnolen: and then
00:23mmarczykdnolen: either the functions calculating the hashes will assume setHashCode is available
00:23spjtI'm actually starting to like emacs now, although I just use inferior-lisp because I gave up on that slime/swank stuff. Is there really any benefit to it?
00:23mmarczykdnolen: so could as well assume they know which property is used
00:23mmarczykdnolen: or the DSs will be doing the entirety of the hashing
00:24dnolenmmarczyk: you can't set hashCode on things like strings, numbers anyway.
00:24mmarczykdnolen: they don't use hash-coll / hash-imap / hash-iset though
00:24dnolenmmarczyk: I'm also thinking about portability - that's not going to fly elsewhere.
00:25mmarczykdnolen: sure, the only approach which always works is having the DS handle this itself
00:25mmarczykdnolen: actually that can still be done in a clean way, though
00:26dnolenmmarczyk: yes, but that's what happens in the Java implementations right?
00:26mmarczykdnolen: yes, although there there are those APersistentFoo abstract base classes which handle this
00:26mmarczykdnolen: so less repetition
00:27mmarczykdnolen: *but*, I can just write a macro for this
00:27mmarczykdnolen: then -hash becomes (-hash [coll] (caching-hash hash-coll coll __hash)), say
00:29muhooany idea why the datomic docs consider the postgres backend to be not for "production" use?
00:29dnolenmmarczyk: sounds better.
00:29mmarczykdnolen: ok
00:31dnolenmmarczyk: hmm, I'm a bit confused.
00:31mmarczykdnolen: ?
00:31dnolenmmarczyk: why can't those aset lines become (.setHashCode x h) ?
00:32mmarczykdnolen: they could, but then you'd have to be sure that there is a .setHashCode method (method, not protocol method) available on x
00:32mmarczykdnolen: so may or may not fly elsewhere
00:32mmarczykdnolen: so if the goal is to make this future proof
00:33dnolenmmarczyk: hmm ... any reason to no make it a protocol?
00:33dnolenmmarczyk: overhead of protocol doesn't matter here now that I think about it.
00:34mmarczykdnolen: adding .setHashCode is no more extra complexity in code than adding a macro and handling it in -hash
00:35mmarczykdnolen: the latter approach also let's the DS decide whether it wants to have its hash code cached -- I don't care that much about it (as evidenced by the current patch), but it feels cleaner, so if the code becomes more complex anyway...
00:35wkmanireHowdy folks.
00:36muhoowkmanire: yo
00:37wkmaniremuhoo: Whatchya up to Muhoo?
00:37muhoodoing my newbie thang, is all :-)
00:38wkmanireI got to spend the day hacking javascript.
00:38scriptorhow was it?
00:38muhoois that an improvement over vb?
00:38wkmanireSo, much better than usual.
00:38wkmanireJavascrit vies for my #1 spot as favorite language.
00:38wkmanireJavascript*
00:38scriptorinteresting
00:38scriptorbetter than vbscript ;?
00:38dnolenmmarczyk: hmm ICacheHashCode seems enticing, perhaps some interesting uses for perf sensitive applications?
00:39spjtEven the guy who invented javascript thinks it sucks.
00:39ben_mJust have to avoid the not so good parts, then it's a nice language.
00:39wkmanirespjt: His views clash with most of the community.
00:40mmarczykdnolen: well, it doesn't feel like a public interface to me
00:40ivanwkmanire: tell me where the find JavaScript's repr() or == ;)
00:40muhooi figured out that if i looked at (comp foo bar baz) as #(foo (bar (baz))) without all the parens, i won't get confused as to its order of operations :-)
00:40wkmanireivan: where to find?
00:40ivanand which properties you shouldn't put in an object because IE6-8 won't iterate over them
00:41spjt"JS had to 'look like Java' only less so, be Java?s dumb kid brother or boy-hostage sidekick. Plus, I had to be done in ten days or something worse than JS would have happened"
00:41dnolenmmarczyk: you're probably right, that's why I didn't jump on the current patch :) seems a bit too exposed.
00:41ivanwkmanire: they're pretty useful things to have, in any (?) language
00:41mmarczykdnolen: hm :-)
00:42dnolenmmarczyk: let's go with each DS doing it's own caching in -hash
00:42wkmanireivan: Well, you have == and ===.
00:42wkmanireivan: Coercive and strict/reference comparison.
00:42scriptorkinda like good ole' php
00:42mmarczykdnolen: cool, ultimately it is probably the cleanest approach conceptually -- clean is good -- will be back with an appropriate patch in a minute
00:43wkmanireYou can algorithmically traverse any object tree (that you made yourself)...
00:43ivanI like my [1, 2] == [1, 2] == True
00:43ivanwkmanire: indeed. but a proper equality and repr protocol should really be part of the language, and thankfully it is in ClojureScript
00:44scriptorivan: isn't that the same in python?
00:44wkmanireivan: You don't like [object Object]?
00:44ivanscriptor: in JS non-primitives are compared by reference
00:45ivanwkmanire: heh, no
00:45scriptorah
00:45wkmanireYou can always attach a toString implementation to your object.
00:45wkmanireI admit it is a pain in the ass to always do that.
00:45ivanstring-based repr protocols are wrong because they involve repeated copying for deeply nested objects
00:46ivanbut anyway I solved this in my own library that no one uses :)
00:46wkmanireIf you see it as text on your screen then concatenation is happening somewhere.
00:55wkmanireanway, I'm excited to mess with clojure script.
00:55wkmanireI plan to do that as soon as I get through basic HTML form and query CRUD with Noir.
00:56muhooclojurescript is very exciting
00:57mmarczykdnolen: I'm leaning towards not having all the types declare a __hash field and just set!-ing it instead when appropriate, which is at initial hash calculation time and whenever with-meta is called; does this seem fine?
00:58dnolenmmarczyk: you can't call set! inside of deftypes
00:59dnolenmmarczyk: unless the field is marked ^:mutable
01:01mmarczykdnolen: not (set! __hash 1235), (set! this -__hash 1235)
01:01mmarczykdnolen: which works fine
01:03dnolenmmarczyk: ha! no guarantee that the second one will continue to work.
01:03dnolenmmarczyk: lets make the field explicit. I think that will have to be the case with many hosts.
01:03mmarczykdnolen: sounds like it's gonna be an explicit __hash field then? :-P
01:04mmarczykoh, I've been late by a second.
01:04jlongsterhey guys, I'm trying to get a basic clojurescript example compiling. I'm doing something basically like this: https://github.com/emezeske/lein-cljsbuild/blob/0.1.8/example-projects/simple/project.clj
01:04jlongsterbut when I run "lein cljsbuild once", I get nothign
01:04jlongster*nothing
01:07emezeskejlongster: When you say "basically like this", what is different?
01:08dnolenjlongster: "nothing" as in not even "Compiling Clojurescript" ?
01:08jlongsteremezeske: my project doesn't have any clojure in it, so it's simpler: http://paste.lisp.org/display/129129
01:08jlongsterdnolen: I see that, but no files are created
01:08dnolenjlongster: does your src file actually end in a .cljs extension and not .clj
01:09dnolenjlongster: I screw that up often.
01:09jlongsterdnolen: ah, nope.
01:09dnolenjlongster: dcpu compiler in CLJS I see, exciting!
01:10jlongsterdnolen: yep! should be fun!
01:10jlongsterI'd like for it to be a long-term project and be based on cljs so it benefits from all you guys' work
01:11jlongsterawh, I get a file but now it throws an error
01:12jlongsterhere's my source: http://paste.lisp.org/display/129129#1
01:12dnolenjlongster: your Scheme-y ways won't fool the CLJS compiler.
01:12jlongsterdnolen: I can fool it with macros, just you watch!
01:13dnolenjlongster: throws an error when? when you try to run?
01:13jlongster"Cannot set property 'Unicode' of undefined" when I just do `node dcpu.js`
01:13kovasbcljsbuild silently fails in my experience
01:13dnolenjlongster: yeah another common error that I need to fix.
01:13wkmanirejlongster: Can you paste the javascript it output?
01:13jlongstergood.string is null?
01:14wkmanireI'm curious to see it.
01:14jlongsterit's 13000 lines long :/
01:14dnolenjlongster: if you're targeting node you need to compile w/ :optimizations :simple
01:14wkmanireSeriously?
01:14wkmanirehelloworld?
01:14wkmanire:(
01:14jlongsterdnolen: ah
01:14dnolenjlongster: well at least :simple, :advanced works too.
01:14jlongsteris it not doing dead code elimination?
01:14dnolenjlongster: only :advanced does that.
01:14jlongsteroooh, right
01:15wkmanire:advanced will put it through closure compiler's advanced mode if I remember, so there would be nothing for me tos ee.
01:15dnolenjlongster: any particular reason you're dev'ing against node instead of against a browser?
01:15wkmanireto see8
01:15kovasbjlongster: you can also try to manually invoke the cljs compiler, as shown on the clojurescript wiki
01:15wkmanireJust a bunch of munged shtuff.
01:16jlongsterdnolen: it's just a library, I'd like to develop it cli-style with some Makefiles and stuff for a few helpful things
01:16jlongsterI think cljs should support that, maybe not quite as focused on it, but still should have some love
01:17jlongsterkovasb: that's true, though lein is nice
01:17dnolenjlongster: definitely - there's just not good interactive Node.js support yet is all.
01:17dnolentho perhaps some folks are workig on that.
01:17kovasbjlongster: yea, i resort to it only when I think errors are happening that are not being shown
01:18emezeskekovasb: If you can make a repro case for silent failures, I'd love to fix that
01:18jlongsterdnolen: fwiw, outlet didn't support interactive stuff with node.js yet either, so I was developing it test driven-style, so it should be fine
01:18emezeskekovasb: Never seen it myself, though, so not much I can do.
01:19jlongsterdnolen: though it might be worth throwing it in the browser if I feel like interactiveness would help
01:19jlongsterI might be interested helping developing some libraries for node interactiveness too
01:20dnolenjlongster: the CLJS test driven style of development could improve as well.
01:20kovasbemezeske: i think it might have to do with stale files; when i remove all the generated stuff it seems to be better
01:20jlongsterdnolen: early stages!
01:21dnolenjlongster: way early.
01:21kovasbemezeske: i also tend to run it side by side with cljs-noir, so dunno if there is an interaction there.
01:21emezeskekovasb: What version of the plugin?
01:22kovasbemezeske: i've used several, not sure if I've seen it in the latest
01:22kovasbemezeske: will keep an eye out
01:22emezeskekovasb: Okay, well if you figure out a way to trigger silent errors on demand, I will definitely fix that.
01:23kovasbemezeske: cool
01:24dnolenjlongster: you know about lein cljsbuild auto right?
01:24jlongsterdnolen: yep, that's what I'm using, `lein cljsbuild auto`
01:24dnolenjlongster: cool, that saves a lot of time.
01:25jlongsteryeah
01:25jlongsteralthough it's been stuck for about 30 seconds now with optimization :simple?
01:25jlongsteroh, does "auto" make it stay alive?
01:26jlongsteroh, nevermind, there we go
01:30dnolen30s is really long, I think the release version of CLJS may have mem leak that I recently fixed.
01:32jlongsterdnolen: gotcha. it seems to be compiling faster once cljsbuild boots up (with the auto mode)
01:32charles_rHaving trouble getting java into my code. Can anyone help me with this?
01:32yoklovjlongster: i had that issue too, its totally fixed in newer releases
01:32dnolenjlongster: actually I'm wrong, current release came out before my foobar.
01:33jlongsterdnolen: yoklov: I installed lein through homebrew and then cljsbuild through lein, I have no idea if that's up-to-date or not
01:35emezeskejlongster: You want :plugins [[lein-cljsbuild "0.1.8"]] in your project.clj file. If that's there, you're good.
01:35jlongsteremezeske: cool, got that
01:36jlongsterfor some reason it's the "auto" mode that seems slow, not sure. just using "once", it seems to build it in 10 seconds
01:37emezeskejlongster: And how long in auto mode?
01:38jlongsteremezeske: it never finished :/ indicative of some kind of loop or blocked thread?
01:38dnolenjlongster: does it get slower over time?
01:38emezeskejlongster: Never finished? Have you tried saving a file?
01:38emezeskejlongster: It won't do anything if the target is up to date
01:38jlongsterdnolen: haven't watched it long enough to see
01:38dnolenjlongster: I mean, did it successfully build a few times?
01:39jlongsteremezeske: dnolen: ah, I didn't realized it stayed alive and kept recompiling, and I had to save the file after running it. it seems normal now!
01:39jlongsterand compiles much faster on subsequent compilations
01:39jlongsterfrom 10s to ~3s
01:39dnolenjlongster: heh yes :)
01:40jlongsterneat
01:40emezeske^_^
01:40jlongsterthanks guys
01:40jlongsterawh, I get no output though when running the script with node
01:40jlongstermaybe I'll solve that later
01:41dnolenjlongster: paste?
01:41jlongsterdnolen: same as before: http://paste.lisp.org/display/129129#1
01:41KognizantKogjlongster: Sorry, just showed up, but I am curious as to what you are working on currently? I used to follow your scheme on iphone blog posts.
01:42arohneris there a hiccup-like thing for XML?
01:43jlongsterKognizantKog: oh hai! glad to here that! Currently hacking on a static Lisp that compiles everything out to optimized assembly code :)
01:43jlongsterKognizantKog: think GOAL, currently targeting DCPU-16 for the new Mojang game
01:43KognizantKogOh, very cool!
01:43jlongsterhttps://github.com/jlongster/dcpu-lisp
01:44jlongsteryeah, it's nice, I'd like to high computation stuff for games some day
01:46dnolenjlongster: did you set :target :nodejs in your project.clj :cjlsbuild :compiler settings?
01:47jlongsterdnolen: I had not! trying that now
01:47dnolenjlongster: just tried it seems to work.
01:48KognizantKogI'd like it if you did that, as well. Lol. And I've been seeing a lot of articles dealing with DCPU-16, but all I really know is that notch designed a CPU and assembly language for an upcoming game. Why is everyone so excited about writing compilers for it (genuine curiosity)?
01:49jlongsterKognizantKog: it's fun to hack on stuff with such a vibrant community, and Notch has a good reputation for succeeded in his ideas which will be an awesome game, and the earlier we build stuff for it the better
01:49jlongster*succeeding
01:51jlongsterdnolen: it works now, thanks!
01:51jlongsterout of curiousity, what makes subsequent builds so much faster?
01:51dnolenjlongster: jvm warmup time mostly.
01:51KognizantKogGotcha. Just wondering. I've never played minecraft (mostly because I live in an area where the best I can do it satellite internet, and that isn't good enough), but I know his reputation, so I can understand.
01:52dnolenjlongster: er, that and files that haven't changed don't recompiled.
01:52dnolendon't get.
01:52jlongsterdnolen: damn, really? yeah, this is just one file, so must be the jvm
01:52dnolenjlongster: and 4000 lines of core.cljs
01:53jlongsteroh, true
01:53jlongsterit takes Outlet about 12 seconds to compile dcpu-lisp right now anyway, heh
01:53jlongsterunfortunately, it's not a constant warmup time, it's just slow
01:53jlongsterbut the live compiling is nice
01:54jlongster(in cljs that is)
01:56jlongsterthanks for the help guys, I'll save my language-specific questions for tomorrow :)
02:17photexhi folks, what am I misunderstanding, when the namespace of a static method gets stripped during macro expansion?
02:18photexso, in my macro I have System/getenv
02:18photexbut after expansion it's just getenv
02:25tomojare you using emacs' macroexpansion?
02:25photexyeah
02:25photexand I'm trying to compile with slime
02:26photexC-c C-c
02:26tomoj,(macroexpand-1 '(foo (System/getenv)))
02:26_KY_Is it good practice to modify a def variable with a new binding?
02:26clojurebot(foo (System/getenv))
02:26tomojslime is just lying to you
02:26photexthanks tomoj
02:27tomojit tries to remove namespaces so you don't wind up with stuff like this
02:27tomoj,`(+ 1 2)
02:27clojurebot(clojure.core/+ 1 2)
02:27tomojbecause that can be very hard to read
02:27tomojunfortunately it removes too much...
02:28_KY_I'm trying to modify a hash-map...
02:30photexI see
02:31_KY_I can use merge but how can I change the original def'ed variable?
02:35yoklov_KY_: you should try to avoid mutation
02:35_KY_But it's a large data structure...
02:35yoklovif that was your question
02:36yoklovso?
02:36_KY_I just want to grow a hash-map
02:36_KY_That's how they are supposed to be used, right?
02:36yoklovyou want to add/remove a value?
02:36yoklovyou can get a new one with that change
02:36_KY_Yeah
02:37yoklovif you want a mutable variable you can use a reference type
02:37_KY_But what if I want to refer to the new one globally?
02:37_KY_Instead of passing it around among functions
02:38yoklov(def foo (atom {}))
02:38yoklov(swap! foo assoc :baz 1)
02:38yoklovor use refs if you're messing with threads
02:39yoklovi guess. if thats the case you might know about the issue than i.
02:39tomojyou likely need neither refs nor atoms
02:40yoklovi usually end up having at least one piece of state
02:40yoklovessentially always
02:40_KY_tomoj: what should I use?
02:41tomojimpossible to tell without more detail
02:41yoklov_KY_: he means you should thread the value through your computation
02:41yoklovprobably
02:42yoklovinstead of ever actually changing its value, update it over time
02:42_KY_Lets say I (def myhash (hash-map :a one :but 2))
02:42_KY_Lets say I (def myhash (hash-map :a 1 :b 2))
02:42_KY_But then I added some more elements to the hash
02:42_KY_I want to be able to use the new hashmap globally
02:43_KY_It seems to be more intuitive
02:43yoklov_KY_: global mutable state is probably not good
02:43yoklovwhy don't you try passing the value into a function
02:43_KY_Not good because of threads?
02:44yoklovNot good either way. Especially terrible if you have threads
02:44yoklovNot good because of high coupling
02:45_KY_I may use refs then
02:46yoklovdo you have threads?
02:46yoklovatoms are still thread safe, but use refs if you want it to be synchronous
02:46yokloverr
02:46yoklovcoordinated
02:46tomojif you want good advice you need to give more detail about what you're actually trying to do
02:46_KY_I may use threads in the future....'
02:47_KY_The hash-map is just a data store
02:47_KY_And I expect it would be used globally by various functions
02:47yoklov_KY_: atoms are still thread safe, but if you are going to care about the order of the updates, i think.
02:47_KY_It's like a small-scale database
02:48yoklov*err you use refs, i think
02:48tomojif you really need an in-memory key/value store it may make sense to use a hashmap inside an atom
02:49_KY_What's difference between atom and refs?
02:49tomojuse refs when you have more than one object across which to coordinate 'changes'
02:49tomojlike a bunch of hash-maps instead of just one
02:50_KY_The order of update may not matter that much for my use-case
02:50_KY_IE, things can happen asynchronously
02:51tomoj(set db k v) is (swap! db assoc k v) and (get db k) is (@db k)
02:51_KY_I see....
02:51espeedHi, this will print the sequence all on one line: (-> (generate-seq) println) -- how would you modify that so that it prints each item in the sequence?
02:52tomojget rid of the arrow, use doseq
02:52yoklov(->> (generate-seq) (map println) doall)
02:52espeedI'm trying to learn how to use the Thrush op
02:52_KY_What does the arrow do?
02:53yoklovespeed: ->> is the same as -> but with the last element
02:53espeedyoklov: will it not work with -> ?
02:54yoklovespeed: yeah because it would end up as (doall (map (generate-seq) println))
02:54yoklovand map wants the seq as the 2nd arg
02:55yoklov,(macroexpand '(-> (generate-seq) (map println) doall))
02:55clojurebot(doall (clojure.core/-> (generate-seq) (map println)))
02:55yoklov,(macroexpand '(->> (generate-seq) (map println) doall))
02:55clojurebot(doall (clojure.core/->> (generate-seq) (map println)))
02:56yokloverr
02:57yoklov,(require 'clojure.pprint)
02:57clojurebotnil
02:57yoklov,(clojure.pprint/macroexpand-all '(-> (generate-seq) (map println) doall))
02:57clojurebot#<CompilerException java.lang.RuntimeException: No such var: clojure.pprint/macroexpand-all, compiling:(NO_SOURCE_PATH:0)>
02:57yoklovhm.
02:57yoklovwhatever i'm out
02:58espeedyoklov: thanks.
03:06_KY_I can't find the reference to ->, what is it?
03:06ben_m,(doc ->)
03:07clojurebot"([x] [x form] [x form & more]); Threads the expr through the forms. Inserts x as the second item in the first form, making a list of it if it is not a list already. If there are more forms, inserts the first form as the second item in second form, etc."
03:13espeed-> is sometimes called the Thrush macro
03:17tomoj,(do (require 'clojure.tools.macro) (clojure.tools.macro/mexpand-all '(-> (generate-seq) (map println) doall)))
03:18clojurebot#<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.lang.ClassNotFoundException: clojure.tools.macro>
03:25_KY_Thanks=)
03:26fooblya_monadHow do you exit from lein repl in Windows? :)
03:36muhooreboot? :-)
04:22kralnamaste
04:48Joe___hey, how do I add third-path libraries to my clojure?
04:50clgv Joe___: you should be using leiningen and then you can add them to the :dependencies
04:50Joe___thanks, clgv
04:51clgvJoe___: "lein deps" will then fetch the dependencies for you
04:51AWizzArdIf you use Leiningen 2 then you don’t even need to run “lein deps”.
04:54clgvdidnt know that yet.
05:08espeedIn my project.clj file I have :main myproj.core so it executes when I do lein run. Say you have another file in your project that you want to execute with lein, how do you do that?
05:09clgvespeed: you can use "lein repl" and switch to that namespace
05:10espeedbut what if you just want to run it in the console?
05:11clgvespeed: you want to run the content of the namespace standalone?
05:12clgvespeed: in that case: I read an announcement of the "lein exec" plugin
05:12clgvthat could fit
05:13espeedyes. I think I just found it -- you add an alias to the namespace in project.clj -- :something some.namespace
05:13espeedand then do "lein run :something"
05:17ben_mYou can just do lein run -m namespace
05:19espeedthanks ben_m
05:19ben_mnp :)
05:19ben_mlein help run for more details
05:42AWizzArdHow can I add [criterium "0.2.1-SNAPSHOT"] as a dev dependency for every project with Leiningen 2? I tried to add it in my profiles.clj under :dev {:dependencies […]}, but under “lein pprint” it then doesn’t show up, and isn’t available via “lein swank”. Adding it to my :user {:dependencies […]} works, but it then also goes into my Überjar, which I don’t want.
05:44tomojdo you only use criterium from the repl?
05:47AWizzArdtomoj: I have several more libs that I want to use a dev deps in every project.
05:48tomojand you only use them all from the repl?
05:48AWizzArdOver seven, and I don’t want to add them manually to every single project.
05:48AWizzArdYes, only for the repl. But sometimes I decide lateron that I want some in my project. Then I move them of course into the project.clj file.
05:48tomojright, well, dunno.
06:06ivanstrings with backslashes are not simple
06:06BorkdudeI have a noir website which I "lein uberjarred". java -jar uberjarfile.jar works great, but only when I run it from the project's directory
06:06Borkdudewhat could be wrong?
06:11fliebelBorkdude: what does it do when tie does not run?
06:11Borkdudefliebel: tie?
06:11fliebelit
06:11Borkdudemaybe it is this issue: http://groups.google.com/group/clj-noir/browse_thread/thread/cdd5449cd344d964/ec45996748d8da67?show_docid=ec45996748d8da67&amp;pli=1
06:12Borkdudefliebel: then it doesn't do anything?
06:12fliebelBorkdude: Not even a stack trace?
06:13Borkdudefliebel: I don't understand. when I don't run it, the webserver is not running
06:15fliebelBorkdude: Well, if you leave the jar inside the project it works, and starts a server, but when you take the jar somewhere else, and run it, what happens? It just sits there?
06:15Borkdudefliebel: the web server starts and noir comes with an error message: "we lost that one"
06:16Borkdudevery informative :)
06:17fliebelBorkdude: git clone gh.com/noir; grep -r "we lost that one" .
06:18kab3wmBorkdude: I'm working on a noir project right now.. give me a sec, I'll test mine like you did.
06:20Borkdudekab3wm: I moved the uberjar from a mac machine to a windows machine and then tested it
06:20Borkdudekab3wm: but it doesn't even work when I run it from another directory on my mac
06:20kab3wmok, I'm going to test the second scenario..
06:21Borkdudekab3wm: when I unzip the jar I see all the resources are there
06:24Borkdudekab3wm: when I change the (server/load-views …) to a static require, it works now on my mac
06:27Borkdudekab3wm: fliebel: great, works on windows now too
06:27kab3wmlol.. sounds like a bug. mines still compiling.
06:28Borkdudekab3wm: yes, weird
06:32Borkdudekab3wm: how is it going now?
06:34kab3wmBorkdude: still compiling.. seems unusually long.
07:05muhooany good advice for a nice format for documenting a REST api?
07:16vijaykiranmuhoo: http://swagger.wordnik.com/ looks good
07:16vijaykiranbut I think it is for JAX-RS/Java stuff
07:17vijaykiranwould be nice to have a clojure version of it though
07:31tomojhttps://gist.github.com/412667882bd834a455ec
07:31tomojanything missing?
07:31tomojemacs or paredit or clojure-mode or whatever
07:36groundnutyhey, are there any clojure based frameworks? like groovy has grail and griffon
07:40vijaykirangroundnuty: web-app frameworks ?
07:40vijaykiranthere's noir
07:41groundnutyvijaykiran: I just googled a few. I guess I wanted to ask you guys for recomendations. Grails seems quite mature - anything liket that?
07:44G0SUBgroundnuty, Clojure has libraries, frameworks, not so much.
07:55vijaykirangroundnuty: clojure way of doing it would be pick-your-own-libs to build a framework
07:56cmiles74whois tmciver
07:56vijaykirannoir does it for you - with ring/compojure/hiccup etc.
08:43RickInGAUncle Bob is backing light table https://twitter.com/#!/unclebobmartin/status/194701465980383232
08:54Borkdudegroundnuty: frameworks? noooooooo.. libraries
08:56clgvhairsplitting :P
09:10beffbernardIn what situations would one use hiccup.def/defelem over noir.core/defpartial?
09:11RickInGAbeffbernard: defpartial is used for combining elements that you use together… for example add and edit forms for the same data will have a lot of fields in common
09:14beffbernardRickInGA: it also returns a string instead of a vector
09:15RickInGAbeffbernard: I haven't used defelm, but if it does have similar behavior, remember you can use hiccup without noir
09:15xumingmingv a silly question, what's the coding style for clojure's parenthesis?
09:15xumingmingvwhen there are too many levels of parenthesis
09:15RickInGAxumingmingv: you mean an indentation style?
09:15xumingmingvyes
09:16xumingmingvwhen should be seperate several parenthesis into several line
09:16xumingmingve.g.https://github.com/nathanmarz/storm/blob/master/src/clj/backtype/storm/daemon/task.clj#L107
09:16xumingmingvall in one line
09:17xumingmingve.g.https://github.com/nathanmarz/storm/blob/master/src/clj/backtype/storm/daemon/task.clj#L126-L127
09:17xumingmingvin two lines
09:17xumingmingvis there a rule for this?
09:18xeqiall in one line
09:18RickInGAxumingmingv: no hard rule, generally you don't want lines to grow too long because people tend to work in small console windows
09:19RickInGAxumingmingv: generally the best place to break is at a new open parens, and tabbed over a couple of spaces to show that it is related
09:20beffbernardI leave my closing parens all on my last line of code but having a mode like paredit-mode makes you forget about the matching closing paren
09:20xumingmingvoh, i actually mean the right part of "()" -> ")", when there are too many levels, it becomes hard to tell which matches which, for example ")))))", when should be seperate it into "))"
09:21RickInGAxumingmingv: I don't put closing parens on a separate line, but the code you posted does, and I am not going to say that nathanmarz is doing it wrong!
09:21S11001001I don't know anything about nathanmarz, but broadly, the rule is all on one line, no matter how many there are.
09:22RickInGAxumingmingv: I don't really worry about closing parens, but that might be because I use paredit, which keeps my parens matched. If I didn't have a tool like that, I may be tempted to start lining them up
09:25xumingmingvhaha, yeah, i just feel difficult when i need to tell which right-parenthesis matches its left. So the general rule is keeping all the closing parenthesis in one line?
09:29S11001001xumingmingv: Aye. I don't think paredit is a prerequisite for getting it right, but editor highlighting definitely is
09:30S11001001as for picking out structure, the idea is to use indentation rather than counting parens to figure out code structure
09:30S11001001I would call knowing how to indent lisp an editor prerequisite too
09:31xumingmingvthanks S11001001 RickInGA beffbernard
09:35rmrfchikerrr, looking for Meikel Brandmeyer (VimClojure author). email on vim.sf.net is wrong
09:38noidirmrfchik, his homepage's contact button links to mailto:mb@kotka.de
09:40rmrfchiknoidi: thanks!
09:40rmrfchiknoidi: and what homepage address is...?
09:49Borkdudeouch… from twitter: i love how #clojure ’s official news feed is a blogger site that hasn’t been updated since 2010
09:49Borkdudemaybe just delete that blogger site ;-)
09:49Borkdudeor is it immutable?
09:49solussd_Noir question: is :as valid syntax in the destructuring form of a defpage?
09:55Borkdudeor wait, in the history of lisp 1.5 year is almost nothing
09:55Borkdudesolussd: yes, I think so
09:56solussd_hmm.. I'm getting the error: "Routes must either be a string or vector, not a class clojure.lang.PersistentArrayMap"
09:57solussd_with something of the form (defpage [:get "/somewhere"] {:keys [a b c] :as all} ..)
09:57Borkdudesolussd: I'm working on something that looks like this: (defpage [:post "/"] {:as button-pressed}
09:57solussd_ill try that
09:59hugodAWizzArd: I think you want to add criterium to your :user profile in ~/.lein/profiles.clj
09:59mmarczykdnolen: I think I might have run into a compiler bug while working on the hash caching ticket, so it'll take a while longer while I produce a fix
10:00hugodAWizzArd: And I just released criterium 0.2.1
10:00mmarczykdnolen: in the meantime, I've run into a couple smaller issues while going through the code making changes, there's a patch ready on http://dev.clojure.org/jira/browse/CLJS-201 -- includes at least one serious bug fix
10:02AWizzArdhugod: I also had it in my :user {:dependencies […]}. It is not so much about Criterium (which I want to use). I could put in anything else there. This seems to be a Leiningen issue. Leiningen 2 treats the entries in my profiles.clj as project dependencies, not as dev dependencies.
10:02AWizzArdThat means it will include them in my Überjar too.
10:02hugodthat seems like a bug in lein2
10:02AWizzArdOnly because I used a snapshot version of Criterium I noticed this, because when I wanted to make an Überjar, Leiningen suddenly complained.
10:03AWizzArdhugod: yes, probably a bug in L2. I already filed an Issue in the tracker for this.
10:05noidirmrfchik, http://kotka.de/
10:29Borkdudewhat is the kind of "map" fn you use if you're only interested in side effects? doseq?
10:30AWizzArdBorkdude: yes
10:30bsteuberBorkdude: or (dorun (map ...))
10:30BorkdudeI see, I don't really need a binding, this is why I doubted if doseq was "the way"
10:31Borkdudetnx
10:31bsteuberyes if the function already exists dorun + map might be prettier
10:31bsteuberotherwise doseq is the common way
10:32Borkdudefor readability it is nice to have the binding though
10:32mmarczykdoseq avoids constructing a seq
10:33AWizzArdBorkdude: so your side effects actually have nothing to do with the sequence over which you want to map a function?
10:33AWizzArdMaybe repeatedly could then be useful for you too.
10:34BorkdudeAWizzArd: no, the side effects have something to do, but I don't need to name the element I want to "map" over in a binding
10:34dnolenmore JS->CLJS synonyms http://himera.herokuapp.com/synonym.html
10:35BorkdudeAWizzArd: to illustrate what I'm trying to do: https://gist.github.com/2480095
10:35AWizzArdBorkdude: in this example you have two doseqs, which both make use of the binding
10:36AWizzArdLooks pretty good to me.
10:36BorkdudeAWizzArd: yes, but I could avoid it by using (dorun (map …)) but this reads easier I think
10:36AWizzArdBorkdude: can you show this example with dorun+map?
10:39BorkdudeAWizzArd: added below, at least avoided one doseq
10:40AWizzArdHmm, both look good to me.
10:40mmarczykBorkdude: why do you want to avoid a doseq though? it is the more efficient solution
10:40AWizzArdI personally would use doseq here, but this is just a matter of taste.
10:40mmarczykBorkdude: and it's hardly less legible
10:42BorkdudeAWizzArd: another one added blow
10:42Borkdudebelow
10:42Borkdudemmarczyk: you're right and I find doseq even more legible here
10:43mmarczykok
10:43Borkdudewould maybe be a nice refactoring option for "a future IDE": turn (dorun (map …)) into (doseq […] …) and vice versa ;-)
10:44mmarczykwell, it is *the* most efficient solution, in fact, since a handwritten loop/recur is unlikely to take chunking into account like doseq does
10:45gfredericksBorkdude: kibit could catch that
10:46Borkdudegfredericks: cool, never toyed with that
10:46gfredericksme neither
10:47mmarczykoh, interesting!
10:49BorkdudeI wonder what logic programming has to do with.. refactoring.. but I guess I have to find this out
10:50gfredericksI imagine it lets you describe the refactoring possibilities declaratively
11:00laurusHow can I understand the function from _The Joy of Clojure_ at http://cljbin.com/paste/4f96bdf2e4b0b761a9752e81 ?
11:01S11001001laurus: uh, er, how about trying it out with some different values, and then maybe walking through the function with an imaginary value, imagining what happens at each step?
11:02laurusS11001001, I'm trying to do that, but somehow it's difficult.
11:02Borkdudelaurus: from what I see, it returns the position of key (in the case of a map) of an element in a collection
11:02augustldo the dots in namespace names have any meaning, or is it just a naming convention? Can I for example dynamically get all "sub" namespaces of com.mything? I.e. com.mything.foo, com.mything.bar.
11:03noidilaurus, the code samples in JoC are far from obvious, but it's very enlightening to take the time to work them out
11:04TimMcaugustl: Well, I guess you could go through java.lang.reflect with Packages...
11:04laurusnoidi, ok. Maybe I just need to go "deeper" into it.
11:04Borkdudelaurus: http://cljbin.com/paste/4f96bf09e4b0b761a9752e84
11:04augustlTimMc: it seems like the namespaces aren't stored in a structured map based on the dots, or something like that
11:04S11001001laurus: you can also try out pieces of the code to break it down. Trying out that cmp separately should be enlightening
11:04augustlguess I could also iterate (all-ns) and see if the name starts with com.mything
11:06Borkdudenice thing, this cljbin… no information about the author etc?
11:06augustlwhat I'm actually trying to do: Load all files in a folder and assume they have a public var "pages", and use those pages vars in my program. Perhaps that's a bad idea
11:06augustljust seems less magical than a singleton atom or something like that
11:06BorkdudeI have a suspicion who made it ;)
11:07laurusThanks!
11:07mmarczykBorkdude: there's GitHub link on the page
11:07Borkdudemmarczyk: ah, of course. I thought it meant, it stored the source of the paste on github… stupid me ;)
11:08mmarczyk:-)
11:09Borkdudethat would make sense I guess, use github as a storage for the source but evaluate it somewhere else
11:25mwillhiteI'm having a noob issue: trying to access a def binding from another file
11:26mwillhiteI require the other file as foo.bar.templates
11:26mwillhitethe def is called "templates"
11:27mwillhitein the other file, when I try to call "templates" in my core.clj it can't find it
11:27gfredericksfoo.bar.templates/templates then?
11:28mwillhitenice thanks :)
11:47timvisherhey all
11:48timvisherdid stu's work with repl reflection ever go anywhere. i think he talked about it at the end of his simple ain't easy talk, perhaps?
12:14mmarczykdnolen: ping?
12:14dnolenmmarczyk: pong
12:14mmarczykhi
12:15mmarczykgot a minute to look at CLJS-201 ?
12:15mmarczykincludes a major bugfix for PTM
12:16laurusWhat does this impenetrable sentence mean? "As shown, we’re still using type-based predicates, but we’ve raised the level of abstraction to the equality partitions in order to build contextually relevant indices."
12:16mmarczyk(CLJS-200 -- hash caching -- is ready too, though as of now w/o support for defrecords -- coming soon)
12:17RickInGAlaurus what is that from?
12:17laurusRickInGA, _The Joy of Clojure_.
12:18mmarczyklaurus: without knowing the relevant passage I'd guess maybe it's about ifn? / map? / etc. abstractions being checked for (as opposed to concrete types)
12:18mmarczyklaurus: page number for context?
12:19dnolenmmarczyk: resolved, will have to look at the other ticket later, thx.
12:19laurusmmarczyk, 102.
12:19mmarczykdnolen: cool, thanks!
12:22pandeirolaurus: he's saying that now the type checking is happening over the equality partitions instead of just somewhat randomly
12:22pandeiroi just re-read that chapter
12:22laurusWhat is an "equality partition"?
12:22pandeirodifferent kinds of sequences that will be equal to each other or not
12:23RickInGAdnolen: the synonyms page looks great!
12:23dnolenRickInGA: thanks
12:23antares_cemerick: your url lib deals with constructing URLs, right? or parsing them, too?
12:23pandeirodid you do a synonyms like the dart link?
12:23pandeiro(dnolen)
12:24cemerickantares_: all parsing is passed off to java.net.URL, with all the caveats that that implies
12:24pandeirooh nice found it
12:24cemerickReally, it just provides strings -> record -> string round-tripping.
12:24TimMclaurus: Last table on this page: http://www.brainonfire.net/files/seqs-and-colls/main.html
12:25antares_cemerick: ok. I am working on a forgiving URL/URI parser in Java (well, Ragel that will generate Java). Do you think I should try making it a standalone library and not part of Urly?
12:25laurusTimMc, ah, that's what it's talking about. Thanks!
12:25cemerickantares_: That's up to you :-)
12:25laurusAlso thanks, pandeiro.
12:25cemerickURL/URI parsing sounds like something I wouldn't want to touch with a 10-foot pole.
12:25antares_cemerick: if it's a standalone lib, url could reuse it. If it is part of Urly, then no.
12:26Hali_303hi! is there a utility function that takes x and if x is a seq then returns it unchanged if x is a non-seq, it wraps it in a seq?
12:26antares_cemerick: but maybe you just never had problems with java.net.URL. If you don't parse URLs found on the web, I definitely can see why the JDK parser is good enough.
12:26cemerickantares_: Many things may want to reuse it. To be clear, I'm never consuming URLs from outside sources, so my use cases are a lot narrower than yours I suspect.
12:26TimMcHali_303: So (range) -> (range) but 5 -> (cons 5 nil)?
12:26cemerickyeah
12:26RickInGAibdknox: did you see Uncle Bob's tweets about Light Table?
12:27antares_cemerick: understood. Ok, I will try making it a standalone lib.
12:27cemerickantares_: so, most of my url lib usage is input to clj-http, etc.
12:27Hali_303TimMc: yes
12:27cemericki.e. to drive rest API access, etc
12:27TimMcHali_303: And you're certain that you'll never be passed a seq as a data element?
12:28Hali_303TimMc: ?
12:28TimMcBut no, not that I know of.
12:28Hali_303i see, thanks!
12:28TimMcHali_303: How will you handle nil?
12:28gfredericks(flatland.useful.fn/fix foo seq? list)
12:29gfrederickss/flatland.//
12:29pandeirook how do i discover a java class's methods at the repl again? there's a better way than (seq (class ...)) ? something more readable?
12:29pandeiroerr forgot the .getMethods in the middle
12:30gfredericksreadable code or readable output?
12:30pandeirojust for inspecting at the repl, so output i guess
12:31gfredericks(->> x class .getMethods seq (map (memfn getName))) maybe?
12:31gfredericksmaybe add sort at the end for good measure
12:31pandeirogfredericks: cool, thanks... i thought there might be a shorthand for something similar
12:31laurusI don't understand the function here (also from _The Joy of Clojure_): http://cljbin.com/paste/4f96d335e4b0b761a9752e86 . I don't understand how i is set to v, since v is not defined before the for.
12:31gfredericksnot that I know of
12:32gfrederickslaurus: for is list comprehension
12:32gfredericksso (index coll) is expected to return a seq of pairs
12:33gfredericksand for each one i will be bound to the first element of the pair and v to the second
12:33laurusgfredericks, yes, but how can it loop over i if i is set to v but v is undefined?
12:33gfrederickslaurus: it is equivalent to (for [pair (index coll)] (let [[i v] pair] ...))
12:33gfredericksat least if we ignore the :when clause
12:34gfrederickslaurus: do you understand what (let [[x y] foo] ...) does?
12:34laurusgfredericks, yes
12:34gfredericksokay; I'm not sure what you mean by "loop over i" and "i is set to v"
12:35Borkdudelaurus: does the term destructuring ring any bells?
12:35gfredericks&(for [[k v] {:foo "jams" 12 15}] (str "I have a " k " and a " v))
12:35lazybot⇒ ("I have a :foo and a jams" "I have a 12 and a 15")
12:35laurusBorkdude, oh, I had forgotten about that :P
12:35clojurebot:negative/num-1 + :positive/num-1 = :zero/zero
12:36gfredericksclojurebot: what the heck are you talking about?
12:36clojurebotLeiningen's "checkout dependencies" feature (see the README) allows you to override a declared dependency with a local copy symlinked inside the ./checkouts dir.
12:37exuperoI'm trying to do `lein run` on a Noir project and it dies with: lein: line 292: 4890 Killed $RLWRAP $LEIN_JAVA_CMD -Xbootclasspath/a:"$CLOJURE_JAR" -client $LEIN_JVM_OPTS -XX:+TieredCompilation -Dleiningen.original.pwd="$ORIGINAL_PWD" -Dleiningen.trampoline-file=$TRAMPOLINE_FILE -cp "$CLASSPATH" $JLINE clojure.main -e "(use 'leiningen.core)(-main)" $NULL_DEVICE "$@"
12:37exuperoAny ideas why?
12:45laurusAh, I get it.
12:53antares_what repository Clojure 1.5-SNAPSHOTs are published to?
12:54antares_oss.sonatype.org: https://oss.sonatype.org/index.html#nexus-search;classname~Clojure
12:56ibdknoxRickInGA: yeah :) He's one of the 1k backers!
12:57RickInGAibdknox: nice, but his endorsement should help even more
12:57AimHereantares > clojure/clojure on github, I reckon
12:57AimHereIf you're willing to use git to fetch your snapshots, at least
12:57RickInGAibdknox gratz on crossing 50%
12:58ibdknoxRickInGA: thanks :)
13:06RickInGAcool, someone is doing SICP in Clojure http://sicpinclojure.com/
13:07redingerRickInGA: I was excited when i found that a couple years ago, but I don't think it's been updated in quite a while
13:07yoklovit's pretty hard to do the later chapters in anything other than scheme
13:07AimHereI think the guy doing 'On Lisp' in Clojure didn't get that far
13:09gfrederickscommon lisp symbols are _weird_
13:10technomancygfredericks: it's a floor wax! it's a dessert topping! it's a storage location!
13:11gfrederickstechnomancy: I kinda hope I never learn about them :/
13:12RickInGAAimHere: a couple of people have done some of OnLisp in Clojure. Fogus did chapters 2-6 and Stuart, (7, 9 and 10?) I am slowly going through onlisp now. I will post the first half of chapter 7 later today
13:14RickInGAs/Stuart/Stuart Halloway/
13:15redingergfredericks: You've just given me an idea of how we should differentiate between the Stuarts around the office
13:17gfredericksStuarth & Stuarts
13:17gfrederickshopefully "Stuarts" and "The stuarts" are grammatically disjoint
13:18gfredericksredinger: apologize to Stuarth for me if it catches on
13:19redingerI'm sure it'll be an upgrade from the evil Stuart
13:22laurusWhen I run this in clojure-py: (def [n min_max mean var skew kurt] (vector (stats/describe s))) , I get AttributeError: 'PersistentVector' object has no attribute 'ns' . Here, stats refers to scipy.stats.
13:22laurusWhy?
13:22clojurebotWhy is the ram gone is <reply>I blame UTF-16. http://www.tumblr.com/tagged/but-why-is-the-ram-gone
13:23gfrederickslaurus: doesn't def normally require a symbol as the first thing?
13:23gfredericksare you trying to destructure within def?
13:23laurusgfredericks, yes :P Haha
13:23ibdknoxthat won't work
13:23ibdknoxlol
13:23gfrederickslaurus: lesson learned too well
13:24gfredericksibdknox: it's not theoretically impossible is it?
13:24ibdknoxnot at all
13:24ibdknoxit could be done
13:24laurusgfredericks, how would you convert this Python code into Clojure?
13:24laurusn, min_max, mean, var, skew, kurt = stats.describe(s)
13:24ibdknoxjust doesn't work in the current implementation :)
13:24gfrederickslaurus: if you're not trying to def globals then you should use let instead
13:24gfrederickswhich does support destructuring
13:25gfredericksalthough that's not a happy solution for working in a repl :/
13:25gfredericksthat would be a fun macro
13:25laurusgfredericks, yeah. :P
13:25gfredericksdefd
13:25laurusBut it's okay actually, I'll just define a function to print out all those terms.
13:25laurusThanks.
13:26gfredericksI wonder if it could be written without having to enumerate all destructuring forms...
13:26hiredman,(doc destructure)
13:27clojurebot"([bindings]); "
13:27hiredman,(destrucuture '[[a b] x])
13:27clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: destrucuture in this context, compiling:(NO_SOURCE_PATH:0)>
13:27hiredman,(destructure '[[a b] x])
13:27clojurebot[vec__78 x a (clojure.core/nth vec__78 0 nil) b ...]
13:27gfrederickshiredman: well that certainly helps :)
13:28hiredmanmaybe a little
13:28gfredericksI guess you'de have to filter out the gensyms
13:28gfredericksI was thinking just flatten the form and pull out all the symbols
13:28hiredman~flatten
13:28clojurebotflatten is rarely the right answer. Suppose you need to use a list as your "base type", for example. Usually you only want to flatten a single level, and in that case you're better off with concat. Or, better still, use mapcat to produce a sequence that's shaped right to begin with.
13:29gfredericks...does that apply here?
13:31gfrederickswould just need a version of flatten that pulls out keys/values from maps
13:33daniel_im in a lein project and have code like this (def some-string "Fsdfdsfds")
13:33daniel_in the lein repl, what if i change this in the code? how can i reload it?
13:33daniel_im trying use and require, neither seems to reload this var
13:34gfredericks(require 'foo :reload)
13:34ibdknox(require 'some.ns :reload)
13:34daniel_ta
13:34fdaoudhi everyone. say you have afn that takes [x & xs], so normally (afn "a" 1 2 3 4). But now you have xs being [1 2 3 4]. Would you use (apply afn (cons "a" xs)), or (apply (partial afn "a") xs), or something else?
13:35gfredericksthe first should work, but also (apply afn "a" xs)
13:35daniel_and a normal require doesnt work because...
13:35gfredericksdaniel_: because it would be bad if require always reloaded
13:35fdaoudgfredericks: oh,nice, I don't know how I missed that. Thanks!
13:36daniel_i see, so it caches it
13:36daniel_:reload doesn't seem to work either
13:36gfredericksdid you save the file?
13:36daniel_yeah
13:36gfredericksthen I don't know
13:37ibdknox:reload definitely works, so there's something else going on
13:37gfredericksunless you def'd a separate var in the repl
13:37gfredericksi.e., the one in the code is in a different namespace than the one you're seeing at the repl
13:37gfredericksif you give the fully qualified name for the var-from-the-code at the repl, it is still stale?
13:38daniel_ah, thats it
13:38daniel_i was in the user namespace and not giving the fully qualified path
13:38daniel_i see the same works with use
13:39daniel_so i dont have to namespace everything
13:39solussdkorma's 'insert' function says it returns the id of the last inserted item, but it looks like it returns this form {:last_insert_rowid() 234}. Note the () at the end of the keyword. Is the database specific? I'm using sqlite
13:41ibdknoxsolussd: it depends on the driver unfortunately :(
13:41ibdknoxjdbc isn't the most uniform thing I've ever seen
13:41ibdknoxheh
13:44rplevyThere was a discussion a while ago about more flexible string literals. As a less powerful alternative, does any util library contain a string function that given reader-valid content allows you have unquoted strings? kind of like the comment macro but for string? Here is what I mean (via my implementation): https://gist.github.com/2481715 I feel like I must have thought of this before, because it's so obvious. I thi
13:44rplevynk this would be useful, just as the comment macro is useful despite the reader-validity requirement.
13:45hiredmanthe jdbc api actually provides a jdbcCompliant method that returns a boolean
13:46hiredmanit is great
13:46gfrederickshiredman: so I guess legal responses are true, false, and a NotImplementedException? :)
13:47jonnyHelllo people
13:47jonnyAnybody here have any experience getting clojure to work in emacs?
13:48hiredmanwhoop
13:48gfredericksrplevy: your interpolation solution only works with read-time values; but http://github.com/fredericksgary/misquote gives an alternative way to do that kind of thing
13:48hiredmans
13:48hiredmanI wrote part of a jdbc driver on top of the rest api provided by agilezen
13:48rplevyah, nice
13:48rplevyhiredman:
13:48rplevyer gfredericks
13:48rplevysorry
13:49gfredericksrplevy: also I don't think you could ever get something to work in metadata the way you have it
13:50gfredericksat least not without some manual post-processing
13:50jonnyI'm having a really hard time getting emacs working with slime and clojure-swank
13:50jonnyHas anybody had success?
13:50RickInGAjohnny: yes
13:50jonnyI know at least somebody has done it before
13:50jonnyit's in all the the tutorials
13:50jonnybut it's not working for me :(
13:50RickInGAwhat operating system are you using?
13:50jonnyMac OS X
13:51RickInGAhave you installed leiningen?
13:51jonnyyup
13:51rplevygfredericks: what do you mean, re metadata?
13:51jonnyi've been trying different setups for hours
13:51gfredericksrplevy: I believe metadata is only read, not evaled
13:51jonnybut i'll figure out what error i was getting
13:52jonnyand come back here
13:52ystaeljonny: i found that it caused problems when i had too much installed, or stale versions
13:52gfredericks&(meta (read-string "#^{:foo (+ 1 2)} bar"))
13:52lazybot⇒ {:foo (+ 1 2)}
13:52ystaelwhat emacs are you using?
13:52jonnyoh
13:52jonnyumm
13:52gfredericksrplevy: like that ^
13:52RickInGAjohnny: are you trying to launch from gui or from terminal?
13:52jonnyI'm launching from GUI
13:52jonnycarbon emacs i think
13:52RickInGAOS X screws up the paths when you launch from gui
13:52jonnyoh
13:53jonnyyeah i was having problems with paths
13:53RickInGAyou will need to navigcate to a project inside of a terminal, and then launch emacs from there
13:53jonnyI'll try just using termincal
13:53jonnyahhhh
13:53gfredericksrplevy: though another macro that processes the metadata could get around that
13:53gfredericksalso with-meta should work I think
13:54jonnyokay i'm going to give this another shot from terminal
13:54ystaelRickInGA: can you describe that problem a little more? i have a working GUI-launch setup on my mac that doesn't seem to suffer from it, but i may be missing something
13:54jonnyshould i be using the most recent versions of everything?
13:55jonnyI was reading in some places that clojure-swank doesn't work with the newest version of SLIME
13:55rplevygfredericks: this is kind of a mind-bending use case because you are constructing a string to pass to the reader, when it has already gone through the reader by virtue of being processed by qq
13:55RickInGAysteal: I don't know enough to elaborate. It was just a fact I came accross a couple of timees when I was trying to get set up on a mac
13:56technomancyjonny: if you just stick with the swank-clojure readme and ignore everything else you should be fine
13:56ystaeljonny: i can tell you what worked for me. install a 24.0.9x pretest from emacsformacosx.com/builds. then follow the directions on github.com/technomancy/swank-clojure
13:56jonnyk i'll try that
13:56technomancythere are a lot of really bad instructions out there that will waste your time
13:57jonnyI've been experience that...
13:57rplevygfredericks: or rather, in order to have been processed by qq it had to be processed by the reader first
13:57gfredericksyep
13:57technomancyjonny: if you can leave comments on the bad instructions pointing people to the swank-clojure readme or "getting started with emacs" on dev.clojure.org that might help people in the future
13:57technomancyunfortunately sometimes there's nothing you can do
13:57jonnyyeah that's a good idea, i'll try to do that
13:58gfrederickstechnomancy: maybe if we can pass one of these excellent internet censorship bills you can send a takedown notice or something
13:58rplevygfredericks: so when would that be useful?
13:58gfredericksrplevy: what part?
13:58technomancygfredericks: yeah, we could copyright all possible misleading instructions and then DCMA those suckers!
13:58gfrederickshell yeah
13:59rplevydealing with metadata in the hypothetical qq macro
13:59technomancyI like it
13:59gfrederickscut off their advertising accounts
13:59gfredericksrplevy: well you were trying to do it in the gist example
13:59gfredericksis the only reason I brought it up
14:00rplevyoh I see...
14:00gfredericksmy point was the way you have it there qq would never get called
14:00gfredericksnot on line 12 at least
14:00muhoowhat's the name of the lein tool for noir that will automatically reload namespaces as the files change?
14:01ibdknoxmuhoo: noir does that by default
14:01RickInGAugghh I hate writing cover letters
14:01muhoodoes it do that when running the server from the repl? from trampoline repl too?
14:02ibdknoxmuhoo: yep
14:02muhoothanks!
14:05rplevygfredericks: I fixed to say what I meant, this was a typo
14:05gfredericksoh okay
14:06mdeboardin-flight wi-fi, this is seriously the future.
14:06rplevygfredericks: the metadata was supposed to be on the function, as a docstring
14:06laurusI want to convert this Python to Clojure: stats.norm.rvs(loc=3.5, scale=2.0)
14:06rplevygfredericks: (defn ^{:doc (qq this docstring is "a little better")} myfn2 [] )
14:06ibdknoxmdeboard: lol I can never bring myself to pay that much for it though
14:06laurusThe closest I can get is (kwapply (.rvs (stats/norm)) {"loc" 3.5 "scale" 2.0})
14:06laurusBut it gives a bug.
14:07gfredericksrplevy: that would still not work
14:07mdeboardibdknox: $5 for wifi for the whole flight?
14:07rplevyit does though
14:07mdeboardthat's a bargain
14:07ibdknoxmdeboard: woah it's only $5?
14:07mdeboardYeah, on Delta
14:07ibdknoxwell shit
14:07ibdknoxthat's totally worth it then :)
14:07rplevygfredericks: I can tell you for sure that it does because I tried it :)
14:07mdeboardyeah it's pretty speedy too, surprisingly.
14:07mdeboardAnyway totally off-topic, I was just surprised. Sorry.
14:08jonnyIn Emacs for Mac OS X (terminal version), I'm pressing M-x and it's just inserting this character into the buffer: ≈
14:08gfredericksrplevy: okay then I must not know how clojure works
14:08rplevygfredericks: and the interpolation works too
14:08rplevygfredericks: always more to learn :)
14:08jonnyit was working normally in the gui version...
14:08gfredericksyeah that I expect. I just don't expect code in the metadata to ever get run
14:09gfredericksrplevy: compare with ##(meta (read-string "^{:doc (str (+ 1 2))} foo"))
14:09lazybot⇒ {:doc (str (+ 1 2))}
14:09laurusGot it: (kwapply (.-rvs stats/norm) {"loc" 3.5 "scale" 2.0})
14:10jonnyoh
14:10technomancyjonny: I think that's just the Mac terminal being buggered
14:10jonnyM is escape
14:10jonnyi thought so too, but M-x is Esc-x
14:10jonnyfor some reason
14:10technomancyyeah, the default settings on the mac terminal are awful
14:13rplevyjonny: usually meta is both ESC and ALT, right?
14:13rplevyeither / or
14:13jonnywell, in Carbon Emacs it was just Alt
14:14jonnyesc was for cancelling
14:14technomancyI don't think that's true; esc always functions as an additional meta
14:14rplevyI don't know I have Ubuntu on my work mac :) this solves all problems
14:14jonnyhmm
14:15jonnymaybe I was just unaware of that
14:15jonnyprobably the case
14:15technomancyrplevy: good man
14:15rplevytechnomancy: :)
14:15rplevyother than power managment / battery life problems haha (I think I can fix that thoghgh)
14:15rplevythough*
14:16technomancypowertop is really good for that kind of thing
14:17rplevyyeah
14:17jonnyThe instructions for installing Clojure Mode on github ask me to do M-x eval-buffer and then M-x package-refresh-contents. What's the purpose of M-x eval-buffer?
14:17jonnyIt always just fails for me
14:17technomancyjonny: to load the code that adds marmalade as a package source
14:17technomancyif you've added it to init.el, you could restart; it will serve the same purpose
14:18jonnycalling M-x eval-buffer just results in: "Symbol's value as variable is void: Welcome"
14:19technomancyok, either you're running it in the wrong buffer or you've pasted something that doesn't belong
14:20jonnyohhhhhh
14:20jonnyYeah, the instructions were asking me to edit ~/.emacs.d/init.el, which I was doing in vim
14:21jonnynot in emacs
14:21jonnybut if were doing it in emacs
14:21jonnyit would have worked
14:21jonnycool, thanks for clearing that up for me
14:22mdeboardAnyone seen this error for `clojure-jack-in`: "Process swank exited abnormally with code 1
14:22mdeboardThat's not a task. Use "lein help" to list all tasks.
14:22mdeboard"
14:22mdeboardcor
14:24jonasensattvik: thanks for leinjacker! I needed it
14:24technomancymdeboard: means lein-swank isn't installed
14:25mdeboardI see. Is this a separate installation?
14:27mdeboardI ask because I've never had to do anything but follow the instructions at the repo. I just ran lein upgrade just in case, but..
14:27muhoois there cl-format magick to get "first", "second","third", etc from an int?
14:29sattvikjonasen: No problem. I'm glad someone's finding it helpful.
14:30technomancymdeboard: what version of lein, and how did you install the swank plugin?
14:31mdeboardlein 1.7 and...
14:33daniel_(ns chess.core (:use [clojure.string :only split]))
14:33daniel_whats wrong with that?
14:34mdeboardHow is swank not installed. bleh. Also not an available choice from elpa
14:34ibdknox:only [split]
14:34Raynesmdeboard: You don't want any slime or swank from elpa
14:35Raynesmdeboard: All you need is clojure-mode and the swank-clojure leiningen plugin.
14:35daniel_thanks ibdknox
14:36mdeboardWeird, I guess I've reformatted this machine since last using clojure mode on it.
14:39Raynesibdknox: 105k!
14:39mdeboardahhh there we go.
14:39RaynesSomehow. Still no 10k or 5k backers.
14:39ibdknoxRaynes: yeah :) Gruber and UncleBob helped a lot there
14:39daniel_can anyone tell me the regular expression to split by "/" or " "?
14:41Raynes&(clojure.string/split #"/" "10/02/1994")
14:41lazybotjava.lang.ClassCastException: java.lang.String cannot be cast to java.util.regex.Pattern
14:41Raynes&(clojure.string/split "10/02/1994" #"/")
14:41lazybot⇒ ["10" "02" "1994"]
14:41RaynesDamn ordering.
14:41daniel_got it, it's 3
14:42daniel_#("/| ") even
14:42RaynesOh. I didn't realize you meant the same regex.
14:42Raynes:p
14:42RaynesHey, I got you half way thre!
14:42Raynesthere*
14:44TimMcdaniel_: #"[/ ]"
14:45muhoojqueryui tabs made sleazy: https://refheap.com/paste/2323
14:45daniel_TimMc: works as well, thanks
14:52jweissare there docs about the 1.4 reader beyond the release notes?
14:54dgrnbrgjweiss: I think there's not much to it: you define the shortname/qualified name mapping, and the function that you write takes the item read after the reader macro and returns the new object.
14:55jweissdgrnbrg: what comprises an "item"
14:55dgrnbrgjweiss: the thing which is read
14:55dgrnbrga form == an item
14:56dgrnbrgso if you have #foo (blah [baz]), you'll get '(blah [baz]) passed to the function that you aliased to #foo
14:56dgrnbrgif you have #foo "00_00_11_11", then you'll get "00_00_11_11" passed to the function that you aliased to #foo
14:56jweissdgrnbrg: so if i wanted to read, say, csv, it would have to be in quotes?
14:57jweissand then process the string?
14:57dgrnbrgYes
14:57dgrnbrgbut that's not a proper application of 1.4's reader
14:57jweissright, just an example
14:58dgrnbrgit's more useful for things you wish had a literal/immediate representation
14:58jweisscsv is better read using the csv lib :)
14:58dgrnbrgsay, you could do it for ssh connections
14:58dgrnbrgas #remote "user:password@host:port"
14:58jweissah i see, so kinda the same functionality as print-dup but easier :)
14:58dgrnbrgand #remote returns some sort of object representing the connection (or a potential connection)
14:59dgrnbrgit's exactly for print-dup type applications
14:59dgrnbrgfor a form that's easier for humans to understand when its serialized
14:59dgrnbrgand for terser representations of different types of objects
15:00jweissi see. i am supposed to implement 'keyword driven testing' keywords are just function calls, so i thought maybe the reader could just read a table-like file and spit out (myfn arg arg)
15:00jweissbut i think that's better done outside the reader
15:00dgrnbrgah, yeah
15:01dgrnbrgi'd do that in another way
15:01jweissdgrnbrg: i assume i'd have to use eval then
15:01dgrnbrg(-> (read-lines my-file) (split '.') (eval `(myfn (first %) (second %)))
15:01dgrnbrgthat doesn't work, but it's the model I'd try
15:02dgrnbrgor actually, just do (->> (read-lines my-file) (split " ") (apply myfn))
15:03jweissdgrnbrg: the fn name is in the file too
15:03jweissso it'd need to be resolved
15:03dgrnbrg(apply veal)?
15:03jonnyyeessss! i have finally arrived!
15:04dgrnbrg(apply eval)?
15:04jweissdgrnbrg: yep
15:04jonnyclojure coding heaven!
15:04jonnywelll maybe that's going too far...
15:05jonnythanks technomancy for your help!
15:05daniel_whats the best way of converting a string into a vector of chars
15:06dgrnbrg,(into [] "mystr")
15:06clojurebot[\m \y \s \t \r]
15:06dgrnbrg,(vec "mystr")
15:06clojurebot[\m \y \s \t \r]
15:06dgrnbrgdaniel_: I prefer the second one
15:07jonnyIn lisp, there's a &body parameter type which is used so that the editor knows how to properly indent the parameters of a function call
15:07jonnydoes clojure have that?
15:09daniel_yeah, just vec is nice and simple
15:09daniel_thanks dgrnbrg
15:09dgrnbrgdaniel_: anytime :)
15:10solussdwhat's the best way to get the mime-type of a file sent in a multipart post to Noir
15:10solussd(?)
15:15dgrnbrgjonny: i don't understand what you mean wrt indenting the parameters of a function?
15:15dgrnbrgdo you mean at the declaration site or at the call site?
15:15jonnylike
15:15muhoosolussd: http://francesco-cek.com/uploading-a-file-to-amazon-s3-using-clojure-and-noir-2/
15:15daniel_ (vec (replace lst #"[0-8]" #(take % (repeat \-)))))
15:15nDuffIf I use ensure on my refs before changing them, will this prevent anything past the ensure from potentially needing to be retried?
15:16daniel_,(vec (replace "fff4" #"[0-8]" #(take % (repeat \-)))))
15:16clojurebot#<ArityException clojure.lang.ArityException: Wrong number of args (3) passed to: core$replace>
15:16muhoosolussd: or https://gist.github.com/1315692
15:16daniel_replace takes 3 args doesnt it?
15:16daniel_ah, wait
15:17daniel_need to apply str to the last bit probably
15:17solussdmuhoo: thanks
15:17muhooman i am so happy. with stencil/moustache, i can have my html crap in nxml-mode, nice and clean. and anything i need to generate programmatically i can use hiccup and {{{}}} to unescape it. joy.
15:17jonnydgrnbrg: this is taken from Practical Common Lisp "Another special feature of macro parameter lists is that you can use &body as a synonym for &rest. Semantically &body and &rest are equivalent, but many development environments will use the presence of a &body parameter to modify how they indent uses of the macro--typically &body parameters are used to hold a list of forms that make up the body of the macro."
15:17amalloyjonny: not really. you have to configure the editor
15:17jonnyoh
15:18jonnydarn
15:18amalloyare you using emacs? it's pretty easy to configure for new macros
15:18daniel_still doesnt work :(
15:18jonnyyeah
15:18jonnyhow does that work?
15:18jonnyi'm completely new to emacs
15:18amalloyM-x customize-variable RET clojure-defun-indents
15:18jonnyoh
15:18dgrnbrgdaniel_: what is your input and goal output?
15:19raekdaniel_: are you trying to use clojure.core/replace or clojure.string/replace?
15:19solussdmuhoo: those don't show how to extract the mime type. :( I need to know so I can give them proper extensions-- or, can I get the original filename?
15:19daniel_say i have a string "fff4", i want that turned into "fff----" (4 dashes)
15:19daniel_oh raek, good point
15:20raek&(clojure.string/replace "fff4" #"[0-8]" #(take % (repeat \-)))
15:20lazybotjava.lang.ClassCastException: clojure.lang.LazySeq cannot be cast to java.lang.String
15:20raek&(clojure.string/replace "fff4" #"[0-8]" #(apply str (take % (repeat \-))))
15:20lazybotjava.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Number
15:21raek&(clojure.string/replace "fff4" #"[0-8]" #(apply str (take (Integer/parseInt %) (repeat \-))))
15:21lazybot⇒ "fff----"
15:21daniel_great, i'd just run into that String cast to Number and was gunna ask what that was about
15:23beffbernardDoes (apply hash-map {"trevor" "Trevor"}) turn a clojure map into a java hashmap?
15:23Raynes&(doc hash-map)
15:23lazybot⇒ "([] [& keyvals]); keyval => key val Returns a new hash map with supplied mappings."
15:23RaynesIt returns a Clojure map.
15:23beffbernardbah
15:23raekbeffbernard: no, (hash-map a b c d) is the same as {a b c d}
15:23Raynes(type (hash-map :foo "bar"))
15:24Raynes&[(type (hash-map :foo "bar"))
15:24lazybotjava.lang.RuntimeException: EOF while reading, starting at line 1
15:24RaynesDamn it.
15:24raekbut as a function
15:24Raynes&(type (hash-map :foo "bar"))
15:24lazybot⇒ clojure.lang.PersistentHashMap
15:24sattvikIt still implement's Java's Map interface, I believe.
15:24beffbernardO'rly?
15:25raekbeffbernard: you can use the constructor of java.util.HashMap that takes another java.util.Map
15:25jonnyamalloy: you're right, that was easy! thanks for the tip
15:25raekbeffbernard: (HashMap. {:a 1, :b 2})
15:26raekbecause of what sattvik said
15:26amalloyjonny: you're welcome! i also added the feature :)
15:26beffbernardraek: I'm mucking around with thrift and one of my stucts has a map<string, string> which is just java.util.Map
15:26beffbernardraek: also, thanks
15:26jonnyoh! wow! you're a genius!!
15:27daniel_is it a convention writing function names like somelist->somevector when it's converting one form into another?
15:27Raynesjonny: It's true, he is. It's his ponytail. The longer it grows, the more he knows.
15:27jonny:O
15:28jonnymind=blown
15:28beffbernardI thought I had to coerce clojure map -> java map but I can just pass it in and works fine
15:28jonnythe world of clojure is really a magical place
15:28beffbernardsattvik: +1
15:29sattvikbeffbernard: Thanks. All of the Clojure collections generally implement a read-only version of the various Java collections interfaces.
15:29Raynes&(supers (class {}))
15:29lazybot⇒ #{java.util.Map clojure.lang.IMeta clojure.lang.APersistentMap clojure.lang.IEditableCollection clojure.lang.Seqable clojure.lang.MapEquivalence java.lang.Object java.io.Serializable java.lang.Iterable java.util.concurrent.Callable java.lang.Runnable clojure.lang.IP... https://refheap.com/paste/2327
15:29Raynesbeffbernard: ^
15:30RaynesA Clojure map *is* a Java map.
15:30beffbernardRaynes: thanks.. I need to remember (supers (class …))
15:30Raynesbeffbernard: I just spent the last 10 minutes trying to remember what that function was called, so don't feel bad.
15:31beffbernardRaynes: word
15:31gfredericks"trying to remember" is a difficult action to describe
15:31gfredericksat least beyond those three words
15:32gfredericksI will consider AI to be unattained until the computer has to try to remember things
15:34beffbernard&(java.util.Hashmap. {:foo :bar})
15:34lazybotjava.lang.ClassNotFoundException: java.util.Hashmap
15:34beffbernard&(java.util.HashMap. {:foo :bar})
15:34lazybot⇒ #<HashMap {:foo=:bar}>
15:34beffbernard&(into {} (java.util.HashMap. {:foo :bar}))
15:34lazybot⇒ {:foo :bar}
15:37muhoosolussd: it's in the map returned by that function, IIRC
15:37solussdmuyou are correct. thanks again
15:39maioEmacs question: is it possible to show function signature in minibuffer? (as Emacs do in elisp files?)
15:40amalloythat Just Works if you're connected with slime/swank
15:40beffbernardEldoc mode?
15:40maioit works in REPL but not whan I'm editing buffer
15:41maiobeffbernard: thanks
15:45pellebGuys I just pushed the first feature complete version of Clauth, which is a OAuth2 provider library, which can also be used for primary authentication in ring apps. http://pelle.github.com/clauth/
15:47fliebelpelleb: Cool. Provider, uh? Last tiem I checked the Clojure client thing, it was fairly outdated.
15:49pellebI'll take a look at it to see if I can help it out. I started work on a provider part for clj-oauth a couple of years back. Never had time to finish it, but it was OAuth1 and should not be used for new projects anyway now.
15:49fliebelIs that still true, or can we happily connect to Twitter and such using Clojure? (i understand that is probably not your lib, bu tI suppose you know the field)
15:49gfrederickspelleb: cemerick just started an auth library I think
15:50pellebYeah friend I think. I want to take a look at it. If anything can be integrated/shared it would be cool.
15:50_KY_Is clojure lazy by default?
15:51cemerickAll the OAuth stuff baffles me, frankly.
15:51cemerickterminology overload
15:51fliebel_KY_: I'd say so....
15:51pellebRight now clauth is pretty low level and has a focus on the oauth backend which I need for my apps
15:51Raynescemerick: Thank you so very much.
15:51RaynesIt is ridiculously complicated.
15:51_KY_Pretty much like haskell?
15:51xeqino, but some functions return lazy seqs
15:51pellebcemerick: oauth 1 was very complex, oauth2 not so much.
15:52cemerick*shrug*
15:52cemerickRaynes: what, is that a controversial point?
15:52Raynes*shrug*
15:52_KY_Ok...
15:52cemerickWe'll all *shrug* our way to the yak barn now…
15:52Raynesfliebel: The entire languge is lazy.
15:52Rayneslanguage*
15:52RaynesNot just collections.
15:53cemerickpelleb: I'd be stoked to have an OAuth workflow for Friend around, FWIW.
15:53gfredericksevery haskell program returns immediately and just prints a lazy object
15:53RaynesHaskell is so lazy that code doesn't even run.
15:53cemerickWhat baffles me the most is that, even among sites that use OAuth, support for them appears to require site-specific stuff.
15:54RaynesIt tells you to do it yourself.
15:54pellebcemerick: one thing is that is a provider and not designed to say authenticate towards facebook. I'll look and see if it can be done as a workflow.
15:54beffbernardCan you typehint a map?
15:55pellebWhat you have to remember is that oauth2 is just a building block in your api, it doesn't tell you how to build your api.
15:55mpenetA lot of the big services using oauth manage to add their own sauce for making it no so trivial to make something really cross-service compatible
15:55pellebIt was never designed either for Facebook Connect type apis. OpenID Connect (the new OpenID standard) is though, which I hope to implement soon as well.
15:55mpenetlike custom parameters for device type or whatever
15:55mpeneta bit of a pita
15:55fliebelRaynes, gfredericks: ... you either run code or you don't. So in what sense can code be lazy?
15:56cemerickpelleb: a meta authentication api, then
15:56gfredericksfliebel: I don't actually know I was just making haskell jokes
15:56ibdknoxfliebel: they were being funny
15:56xeqifliebel: lazy as a language descriptor usually means function arguments are not evaluated
15:56Raynesfliebel: For example, there is no short circuiting 'and' or 'or'.
15:56xeqifliebel: so if can just be a function
15:56pellebmpenet: for oauth1 a lot of those things were necessary, for oauth2 it shouldn't be. But I agree many providers overcomplicated it.
15:56dnolenibdknox: your last tweet has a bad link
15:56mpenetyup, it is getting better, fortunately
15:57fliebelok... so it's another macro avoidance trick. good.
15:57Raynesfliebel: 'and' and 'or' are just functions, because the second argument isn't evaluated unless it is actually used.
15:57ibdknoxdnolen: thanks for the heads up :)
15:58cemerickpelleb: FWIW, the readme for Clauth is impenetrable to me. :-)
15:58S11001001fliebel: it's a macro-avoidance-and-you-can-compose-them-at-runtime trick
15:58dnolenibdknox: I think you've got a good chance of making it.
15:58ibdknoxdnolen: it'll come down to companies in the end I think
15:58ibdknoxdnolen: either that or more of these "celebrity" endorsements
15:59ibdknoxdnolen: either way though, the social proof is there. I could raise money to make it happen
15:59dnolenor 900 people w/ $100 donations ;)
16:00ibdknox:D
16:00fliebelibdknox: FYI, I didn't pledge because I don't have a credit card. There is not much you can do about it, but credit cards are not in wide use in NL.
16:00dnolen2000 donations is a lot
16:00ibdknoxdnolen: it's a ton, I'm tremendously impressed by the whole thing
16:01ibdknoxfliebel: really? That's interesting. Everything is done in hard currency?
16:01hiredman^- ditto
16:01hiredman(fascinating)
16:01fliebelibdknox: No, we have debit cards, and use IDEAL for online banking.
16:02ibdknoxI guess now that I think about it, all the time I spent in Germany people didn't use cards much either
16:02fliebelNetherlands
16:02gfredericksNew Leazand?
16:02gfredericksoh
16:02jodaroheh
16:02gfredericksNew Lampshire
16:02jodaroNew Lizardville
16:02fliebelNear Pizza
16:02gfredericksif there's not a New London somewhere in the world I'll be upset
16:03ibdknoxthere is
16:03gfredericksgood
16:03jodaroi think there is one in CT
16:03hiredmanfliebel: debit cards in the us are usually usable as "credit cards" at online stores
16:03ibdknoxit's in connecticut
16:03jodaroyes, nailed it!
16:03jodaroits good to be right about at least one thing per day
16:03ibdknoxhaha
16:03ibdknoxsrsly
16:03raekswedish debit cards are usually usable as credit cards
16:04fliebelhiredman: I'm not sure if it's the same thing. I think you can pay a monthly fee to have a credit card on you debit card...
16:05hiredmanin canada they have some kind of chips in their debit cards, and tim horton's doesn't take visa
16:05hiredman(or doesn't take visa debit cards, or something)
16:05cemerickpelleb: BTW, that's just a function of my not understanding OAuth, not a comment on your documentation (which appears very comprehensive).
16:07jodaroif you have an O that requires Auth, you use OAuth
16:07jodaropretty straightforward, actually
16:07muhoothroughotu the northeast towns are named (map #(str "New " %) seq-of-towns-in-england)
16:07cemerickjodaro: ooooooh, I get it now! :-P
16:08cemerickmuhoo: some of 'em are lifted wholesale, e.g. Northampton
16:08ibdknoxcemerick: seriously man, where did you learn to program? ;)
16:09jodaromuhoo: yeah, the brits were just like "fuck it, lets just call it New Whatever"
16:09_KY_I have a sequence of sequences, I want to find all permutations of its elements, ie, a1.b1.c1... and a2.b1.c1... and a3.b1.c1.... and so on...
16:09cemerickibdknox: I'm the proverbial million monkeys, all rolled up.
16:09ibdknoxhaha
16:09fliebelmuhoo: Also, some used to be called New <dutch city>, but I don't think they stayed long enough.
16:09gfredericksjodaro: the other half of the time they'd name something after whoever was the monarch at the time
16:09TimMcfliebel: If you send me Bitcoin, I can pledge for you. :-P
16:09amalloy_KY_: that's a cartesian product, not permutations. and there's something in algo.combinatorics (i think that's the name now?) to do that
16:09jodaro"oy vey, another town to name? hey nigel, where are you from?"
16:10gfrederickslotta things were named after the local natives, which isn't so lame
16:10_KY_Maybe doseq can do that?
16:10gfredericksuntil you kill them all
16:10amalloyif the sequence were of fixed length you could do it trivially with for (not doseq)
16:10jodarolike
16:10jodarowoonsocket
16:10_KY_(Doseq [a seq1 b seq2 c seq3 ....])
16:10ibdknoxamalloy: :p
16:11gfredericks_KY_: doseq is for side effects
16:11muhooi wouldn't call oauth hard, just byzantine and messy and filled with incidental complexity
16:11_KY_No, they're not of fixed length
16:11gfredericksmuhoo: what would you call hard?
16:11TimMcjodaro: Lake Chargoggagoggmanchauggagoggchaubunagungamaugg, Webster, MA
16:11fliebelTimMc: I don't have any. How much bitcoin is 17 dollar?
16:11gfredericksTimMc: please tell me you made that up
16:11jodarowebstah mass
16:11ibdknoxamalloy: oh, I thought you were referencing the previous (str "New " ..) bit of code
16:11muhoogfredericks: haskell :-)
16:11TimMc$google Chargoggagoggmanchauggagoggchaubunagungamaugg
16:11ibdknoxamalloy: carry on
16:11lazybot[Lake Chaubunagungamaug - Wikipedia, the free encyclopedia] http://en.wikipedia.org/wiki/Lake_Chaubunagungamaug
16:12jodarowow
16:12_KY_I read that doseq can take multiple sequences and permute their elements automatically
16:12TimMcfliebel: Like 3 BTC. But it's still tricky to get them outside of the US. -.-
16:12amalloyman, ibdknox, i can't even *find* that previous thing to figure out what you were accusing me of
16:13fliebelTimMc: That's weird, for a distributed virtual corrency.
16:13gfredericks_KY_: doseq has the same behavior as for in that regard, but doesn't return the result (since it's just for side effects)
16:13muhooi distinguish between "hard", as in , you have to be really smart to understand this, and "messy", which means you just need patience and fortitude and time to get into the twisted head of whomever wrote it.
16:13ibdknoxamalloy: "muhoo: throughotu the northeast towns are named (map #(str "New " %) seq-of-towns-in-england)"
16:13gfredericksmuhoo: that makes sense
16:13raek_KY_: both in (doseq [x x-seq, y y-seq] (f x y)) and (for [x x-seq, y y-seq] (f x y)) f will be applied to each pair of the cartesian product of x-seq and y-seq
16:13TimMcfliebel: Existing financial systems tend to discourage interchange with novel currencies, I think.
16:14raek(assuming that the whole sequence for returns is consumed)
16:14_KY_,(doseq [a [1 2] b '[x y z w]] (println a "." b))
16:14pellebcemerick: I guess I need to move all the standards specific stuff down and start with how you use it. Thats what comes from working in the standards world for too long.
16:14clojurebot1 . x
16:14clojurebot1 . y
16:14clojurebot1 . z
16:14clojurebot1 . w
16:14clojurebot2 . x
16:14clojurebot2 . y
16:14clojurebot2 . z
16:14clojurebot2 . w
16:14muhooclojurebot does doseq?!
16:14_KY_=)
16:14gfredericksI've never seen a bot make that much noise
16:15raekgfredericks: you should have seen when I accidentally gave it a chunked seq of println calls...
16:15gfredericks32 lines I bet
16:15raekyup :-)
16:15gfredericksnow I think I have seen such a thing before
16:15gfrederickswhat a spectacle
16:15gfredericksthe locals were talking about it for months
16:15_KY_What's difference between doseq and for?
16:16gfredericks_KY_: doseq is for side-effects and returns nil; for is lazy and returns a seq
16:16S11001001_KY_: for is a sugary do for the list monad, doseq is a sugary forM_
16:16_KY_Ah I see... "for" is what I need then
16:16muhoocemerick: pelleb: is there some inclination to have clauth and friend integrated somehow?
16:16mpenetfor also has some nice additions, ilke :while :let etc
16:17mpenet*like
16:17TimMcgfredericks: I think it only stops when the rate-limiter collides with the timeout.
16:17cemerickmuhoo: I've been wanting to see an OAuth workflow for Friend from day one.
16:17ibdknoxmpenet: doseq does too, doesn't it?
16:17pellebmuhoo: I'd be happy to help making an oauth provider workflow for friend
16:17mpenetoh it does? I didn't know
16:17muhooiirc, friend needed some mods in order to make the auth providers modular?
16:17cemerickThere's about 20 different OAuth bits for Clojure though, and I've clearly not taken the time to understand what each does. :-)
16:18pellebcemerick: I can help on an oauth client workflow as well for authenticating with facebook.
16:18gunnarahlberg:q
16:18gunnarahlbergoups
16:18hiredmandoseq does crazy stuff like
16:18pellebcemerick: I'll look through the client libraries and try to get a status on where they all are.
16:18hiredman,(doseq [] 1)
16:18clojurebot1
16:18cemerickmuhoo: no mods needed; a workflow is just a function — essentially, a ring handler with some additional options.
16:18hiredman,(for [] 1)
16:18clojurebot#<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.lang.Exception: Unsupported binding form: >
16:18jodaroare my jvm heap utilization graphs supposed to look like a serrated knife?
16:19pellebcemerick: I believe clj-oauth does both oauth 1 and 2 so it would work in theory with both twitter, facebook and github.
16:19pellebBut I'll look at where it is.
16:19TimMchiredman: I guess that makes sense from a cartesian product perspective.
16:19cemerickpelleb: Oh, so clauth is for hosting your own OAuth endpoint?
16:19pellebcemerick: yes
16:19cemerickheh, well, that explains part of my confusion
16:19TimMcHow many runs? (apply * (map count seqs))
16:19hiredmanTimMc: it's jsut an accident of doseq's implementation
16:19gfredericksTimMc: it does? it wouldn't be just an empty list?
16:20pellebcemerick: I need it for a bunch of payment applications I am working on based on http://opentransact.org
16:20gfredericksTimMc: or [[]]
16:20S11001001jodaro: yes
16:20jodaroi'm guessing thats gc in action
16:20gfredericksTimMc: since your product there returns 1
16:20pellebcemerick: clauth should support pretty much everything facebooks oauth implementation does.
16:20gfredericksTimMc: oh wait sorry didn't see stuff
16:21TimMc&(doseq [x (range 5)] 8)
16:21lazybot⇒ nil
16:21muhoothat'd make it really useful as a test harness for any ouath client lib maybe
16:24hiredmanjodaro: you will in all likelihood see more of a sawtooth pattern in clojure than say java, due in some part to immutable structures generating more garbage than mutable ones, but if there is a problem there are usually ways to deal with it
16:24jodarothis is actually all java for now
16:25hiredmanI am staring at a saw tooth heap usage graph at this very moment
16:25jodaroi'm debugging my new employers various java codebase woes in preparation for dropping the whole damn thing and rewriting it
16:25jodaromakes sense
16:26hiredman(which is an improvement over the constant 45 degree climb that was on the graph before)
16:27jodarothis app stays pretty steady but it definitely grows
16:27jodaroand then we get an influx of these new "configs" which it previously stored and never aged out in a map
16:27jodarountil the twice daily restart cleaned it up
16:27jodarono one bothered to actually figure out how to deal with it
16:28TimMcjodaro: Don't check in the fix or they'll want to keep using it. :-(
16:28jodaroheh
16:28jodarototally
16:28jodarowell i quickly replaced the map with ehcache
16:29jodarofortunately it worked in a way that would allow it to lazy load configs that lru out
16:29jodarobut it turns out apparently that that isn't whats sucking up all the memory
16:29jodaroso now i'm digging deeper
16:30muhoois there a cache in noir or something, or some way to fore-invalidate it, or otherwise to make the ns recompile for the jetty server?
16:30muhooi've made changes to a view, but the generated html is not changing. works fine in the repl, if i :reload especially, but it doesn't seem to change what gets sent to the browser
16:31TimMcdev mode?
16:31ibdknoxit should
16:31muhooit's in dev mode
16:31ibdknoxone reason that can happen
16:31ibdknoxis if your file is compile erroring
16:32ibdknoxwhich is not uncommon when working in a repl (usually because of ordering)
16:32TimMcoooh
16:32ibdknoxit should still throw up a 500 the first time you bring it up
16:32muhooit's the browser
16:33ibdknoxnoir doesn't cache anything
16:33muhooi sniffed the network, noir is putting out the right stuff. the browser is showing me cached crap
16:33ibdknoxlol
16:33TimMcC-F5
16:33ibdknoxcmd-shift-r ;)
16:34ibdknoxTimMc: mine's cooler. it has COMMAND in it
16:34TimMc:-(
16:34muhooyeah, i tried that already like 5 times. oh well, manually clearing cache in prefernces fixed it
16:35TimMcSo is a Command & Control center a computer lab with both Mac and Linux (or Windows)?
16:35ibdknoxTimMc: haha
16:35ibdknox~rimshot
16:35clojurebotBadum, *tish*
16:35TimMcmuhoo: What did you use to sniff?
16:37muhoowireshark
16:37TimMcAh, makes sense. I should learn to use that.
16:39jodarohow many "can you please ..." emails before the ops guy just give me ALL=(ALL) ALL
16:39felideonso what's a good Clojure book for someone with a Common Lisp background.
16:40austinhfelideon: I'm really enjoying "Clojure Programming"
16:40S11001001felideon: watch half an hour of rhickey's presentation for lispers, play around in the repl, stop using side-effects, done
16:40muhoohehehe
16:40fliebelfelideon: Clojure is sufficiently complicated that it contains an ad hoc, informally- specified, bug-ridden, slow implementation of half of Common Lisp
16:40muhoooh and learn to love (->)
16:41muhooand [ ]
16:41amalloystill trying to get the #clojure logs into the results for that google search, fliebel?
16:41felideonmuhoo: -> will be a tough one to love
16:41felideonfliebel: :)
16:41amalloyfelideon: so were parens, once
16:41felideonnever for me!
16:41fliebelamalloy: yup. Failing horribly though.
16:42muhooi really love the threading macros, but then i come from a.land().where().this[].happens().alot();
16:42felideoni feel like i'm figuring most of it out just by reading clojure code.
16:42felideonwhile looking up stuff i dont get (like -> at first)
16:43felideonS11001001: i'll look that up
16:43muhooit's just the reverse of (foo (bar (baz))) => (-> baz bar foo)
16:43fliebelamalloy: Second page!!!! http://www.google.nl/search?client=safari&amp;rls=en&amp;q=half+broken+implementation+lisp+big&amp;ie=UTF-8&amp;oe=UTF-8&amp;redir_esc=&amp;ei=2g2XT5vMG8qYOorjrO8N#q=ad+hoc%2C+informally-+specified%2C+bug-ridden%2C+slow+implementation+of+half+of+Common+Lisp+clojure&amp;hl=nl&amp;client=safari&amp;rls=en&amp;prmd=imvns&amp;ei=eA6XT__HGcehOq29vNcN&amp;start=10&amp;sa=N&amp;bav=on.2,or.r_gc.r_pw.r_cp.r_qf.,cf.osb&amp;fp=998e298776ba03c5
16:43muhoofine be you'll and backwards read to learn
16:43S11001001muhoo: you put too many parens in
16:43TimMcaieeee
16:43austinh:)
16:44felideonmuhoo: i like reading inside out
16:44felideon:)
16:44dnolen_austinh: are you Austin Haas?
16:44S11001001-> is smalltalky so I like it
16:44muhoofliebel: then blow off (-> ) and use comp instead?
16:44austinhdnolen_: Yes.
16:44TimMcfelideon: (doc) new functions, there are some surprisingly-named things (like contains?)
16:44muhooat least comp is in lisp order: (comp foo bar baz), just without the parans
16:45dnolen_austinh: cool! swannodette on Twitter - I was bugging you earlier today about your CL game stuff.
16:45fliebelJuts a few more mentions of "ad hoc, informally- specified, bug-ridden, slow implementation of half of Common Lisp" and we'll be on page one.
16:45austinhdnolen_: BTW, you are 90% responsible for getting me interested in Clojure. I'd been aware of it for a long time, of course, but people kept retweeting you, then I started following you on Twitter...
16:45muhoofelideon: iirc, the -> macro was specificlaly added to deal with java interop. i guess if you're not doing much java, you can live without ->
16:46felideonmuhoo: ah, well the docs say -> is more 'readable'
16:46TimMcNah, I use -> for non-interop stuff all the time.
16:46felideoni guess for rubyists and stuff it might be
16:46gfredericksmuhoo: yeah me too
16:46muhooi do too, but that's my preference. if you don't like it, i can't think of a situation where it'd be necessary to use it
16:46gfredericksfelideon: well it's more flexible than comp, and certainly nicer than any nested equivalent
16:47dnolen_austinh: haha, I *am* ethusiastic.
16:47TimMcTo heck with syntactic sugar, the language is Turing-complete! That was good enough for my grand-pappy...
16:47amalloyfelideon: -> is best in moderation. i love it not because it reduces nesting or parens, but mostly because it lets me write my code in an order that emphasizes or "describes" what i'm doing
16:48_KY_How do I merge 2 lists such that [1 2 3 4] and [x y z w] becomes [1 x, 2 y, 3 z, 4 w]?
16:49TimMcinterleave
16:49_KY_Thanks=)
16:50felideonI see
16:50TimMc$findfn [1 2 3] '[a b c] '[1 a 2 b 3 c]
16:50lazybot[clojure.core/interleave]
16:50gfredericksTimMc: (mapcat vector ...) would be the unpreferred way to do it
16:51TimMcI think I would have to agree.
16:51S11001001you can also write <- and add it to rplevy's swiss-arrows; <<- is already there
16:55gfredericksI wonder how often html/xml is clojure-readable
16:55gfredericks&(quote (<html><head><script type="text/javascript"></script></head></html>))
16:55lazybot⇒ (<html><head><script type= "text/javascript" ></script></head></html>)
16:56dnolen_felideon: there's not many good resources for folks coming from other Lisps. Would make a nice online resource.
16:57puchaczis there any?
16:57gfredericksthere's that list of differences on clojure.org
16:57puchaczonline resources for common lispers
16:57felideonhttp://clojure.org/lisps has some stuff
16:57dnolen_puchacz: not much beyond rhickye's presentations, clojure.org, and that ridiculous Lisp feature matrix.
16:58puchaczok, thx....
16:59austinhI thought I would just be skimming Clojure Programming, picking up trivial syntax and naming differences, but I'm finding it necessary to read pretty much the whole thing.
16:59felideonaustinh: really?
16:59puchaczhas anybody installed clojure as a procedural language in postgres btw?
16:59puchacz(this is my attraction, I cannot put CL there)
17:00dnolen_austinh: the new O'Reilly one?
17:00technomancypuchacz: the JVM is not very good for embedding, but clojurescript would probably work on the embedded v8 engine
17:00austinhfelideon: Yeah. I mean, it's easy to grok macros, of course, and other minor differences, but the way Clojure is structured on those simple immutable data types is really pervasive.
17:00austinhdnolen_: Yes.
17:01hiredmantechnomancy: there are projects for using java as a PL
17:01puchacztechnomancy: there is PL/Java in postgres already
17:01technomancyoh, shows how much I know
17:01puchacznot sure how well it plays with clojure though
17:01puchaczin production environment!
17:02hiredmanonly real way to tell
17:02puchaczyes, find a person who did it before me :)
17:02gfredericksmodify the cljs compiler to emit java?
17:02patchworkWhere is the ring.server.leiningen namespace defined?
17:03patchworkI mean, what project?
17:03patchworkIt is not in lein-ring or any of the ring-core subprojects
17:04technomancypatchwork: I think there's a ring-server jar
17:04technomancyhttp://clojars.org/ring-server
17:05patchworkAha, which is different from ring-serve
17:06jayunit100been wondering --- alot of the advantages of clojure are adding dynamic aspects to the JVM, getting around boiler plate, and integration with the vast existing java landscape. Dont you lose this when you move to clojurescript ? And then... make the language fork into two different varieties ?
17:07gfredericksjayunit100: there's a stack of similar benefits to being in JS-land
17:07ibdknoxjayunit100: JS is collecting quite a landscape of libraries itself. But yes, that means there will be different layers of interop
17:07technomancyjayunit100: the main thing you lose is eval and reified namespaces afaik
17:07ibdknoxjayunit100: but given the trend toward base abstractions (e.g. ring) in the clojure community, that may not mean fracturing at all
17:07technomancyfrom a dynamicity perspective
17:08hiredmanand vars
17:14mebaran151I'm having a little bit of trouble clj-http? On error statuses, I can't seem to get it to return the body of the error or the ExceptionInfo objects as documented
17:14mebaran151Also is there an easy way to spy on the request it's posting?
17:15dnolen_jayunit100: not sure I follow
17:15dakronemebaran151: check out :throw-entire-message? and send :save-request?
17:15joegallomebaran151: httptea is a clever little http proxy (written in java) that i've used for such things
17:15dakronemebaran151: how are you catching the exception?
17:16dakroneI need to actually document :save-request?
17:19mebaran151hey dakrone, try+ with a catch block
17:20mebaran151let me make a gist of of the method
17:21jayunit100sorry guys got distracted by solr
17:21jayunit100dnolen : the JVM was an excellent selling point for clojure. One of the biggest ones.
17:24jayunit100javascript is dynamic (one of clojures benefits), and isnt generally run inside the JVM (Another core aspect of cloJure's original identity) ...
17:25jayunit100so i guess im kind of wondering - what non-obvious benefits we might get from writing clojure that doesn't compile down to java byte code. Other than just the fun of being able to write clojure on the browser.
17:26dnolen_jayunit100: I take it you haven't written a lot of JavaScript
17:26austinhI'd rather write Clojure than Javascript.
17:26gfredericksjayunit100: I think a lot of people consider that aspect to be a bit more than just "fun"
17:26jayunit100not tooo much. okay... touche maybe
17:27technomancyI'd say it's more about not losing your mind than about fun in and of itself
17:27jayunit100okay... I see.
17:28austinhThe prospect of reusing code between the frontend and backend is also very appealing to me.
17:28umrenthat's why node exists :
17:29jayunit100ive seen some nightmarish javascript... but then again, but I've also seemed some succint js to. js is generally easier to be succint w/ than java. not as much boilerplate.
17:29umrenclojure can't beat it there..
17:29jodaromouthless
17:30jodarolike in the twilight zone movie
17:30RoxxiWhat is the clojure idiom for appending lists? (e.g. scheme's srfi-1 append: (append '(a b c) '(d e f)) => '(a b c d e f))
17:30gfredericksjodaro: perhaps "i" would be winking or something
17:30gfredericksRoxxi: concat
17:30Roxxithanks
17:32dnolen_jayunit100: you looked at the Himera JS synonym page right? gives a good quick summary of what ClojureScript offers over JS.
17:32jayunit100dnolen: I haven't I was more just thinking out loud
17:32Roxxigfredericks: http://srfi.schemers.org/srfi-1/srfi-1.html
17:32jodaroscheme requests for implementation
17:32RoxxiThat too
17:33dnolen_jayunit100: http://himera.herokuapp.com/synonym.html
17:33jodarolet me google that for me
17:33gfredericksI was reading a paper with some CL in it today and so it seemed believable that "srfi-1" was something you put in your code
17:34jayunit100dnolen thanx btw - i saw the predicate dispatch talk the other day - very in depth i think i have to watch it again. but it was super pedagogical for me
17:34gfredericksokay g2g
17:39mebaran151dakrone: here's a gist: https://gist.github.com/2483993. I keep getting plain exceptions without the body.
17:40dakronemebaran151: change the catch line from (catch Exception e e) to (catch map? m m)
17:41mebaran151dakrone, now it just throws the Exception
17:42mebaran151it's also weird I'm getting a 400 response code
17:43dakronemebaran151: you shouldn't, I get a map from: (try+ (get "http://aoeu.com/aoeu&quot;) (catch map? m m))
17:43dakronemebaran151: do you have an older version of something?
17:44mebaran151oh my I do!
17:44solussdanyone use Korma w/ sqlite? Seems to choke on (aggregate (count :*))
17:44mebaran151I took the lein line from the mmcgrana version not yours
17:44dakronemebaran151: oh yea, that's a very old version that won't have any of this stuff
17:45mebaran151heh now it works
17:45mebaran151I guess :form-params was not implmented earlier
17:46iwohey, is there a way in clojure to pass a symbol (or symbols) to a function, then refer to that symbol by name within the function?
17:47mebaran151and the :as :json option is so clutch, thanks Dakrone
17:47dakronemebaran151: good luck!
17:47iwoi'd like to pass a collection of symbols to a function, but allow the function to refer to them by name. is this possible?
17:48technomancyiwo: refer to them by what kind of name?
17:48iwosomething like this: #('a 'b 'c)
17:50neotykdnolen_: updated CLJS-35, can't reproduce this failure
17:50iwoor better yet this: (defn myfunc [s] (...)) (myfunc ['a 'b 'c])
17:51dnolen_neotyk: I consistently got an error about robot.txt being invalid for property ppu
17:51iwois there any way to refer to 'a 'b and 'c inside ...
17:52_tcarefer to them by name?
17:52dnolen_if anybody wants to see CLJS use a new version of Closure, please test this patch http://dev.clojure.org/jira/browse/CLJS-35 - I could not get browser REPL working. More experience reports needed.
17:54neotykdnolen_: I got that error with file protocol
17:54dnolen_neotyk: and what did you do different, serve the page from ring instead?
17:54neotykdnolen_: nginx
17:55neotykbut yes, used http
17:55dnolen_neotyk: yeah I won't take that patch unless it's been fully explored whether that can be avoided.
17:55neotykdnolen_: I got same error with file protocol on current release as well
17:55dnolen_neotyk: it works fine for me.
17:55iwotechnomancy: so i have a collection that i know contains N symbols, and a function that needs to refer to those symbols
17:55neotykdnolen_: let me revert and test file protocol
17:56dnolen_neotyk: recheckout the repo, bootstrap and try again. many files get left around and don't get recompiled.
17:56iwoi don't know N, but I know that all symbols needed by the function will be present in the collection
17:56dnolen_neotyk: I got into a weird state yesterday where I had reverted and saw the same issue.
17:57technomancyiwo: are you asking how to check if a given object is in a collection?
17:57neotykdnolen_: will clean up samples/repl before
17:57dnolen_neotyk: again, it full it working for me after I reverted your patches, checked master and boostrapped
17:58iwotechnomancy: hmm, no. sorry i don't have the knowledge to explain this better. example:
17:59iwo(defn use-some-symbols ['a 'b 'c] #(str 'a 'b 'c))
17:59neotykdnolen_: on master got "Uncaught Error: URI file:/robots.txt is invalid for field ppu"
17:59neotykdnolen_: let me bootstrap from clean clone
18:00mfexneotyk, dnolen_ : I use this to use a more recent closure version: https://github.com/thegeez/clj-browserchannel/blob/master/chat-demo/project.clj
18:00technomancy,((fn [[a b c]] (str a "-" b "-" c)) [:a :b :c])
18:00clojurebot":a-:b-:c"
18:00technomancyiwo: that might be what you're looking for; not sure
18:01_tcaiwo: you want #(stuff %a %b %c) instead of #(stuff %1 %2 %3) ?
18:02iwoyeah, don't really want it to be order dependent
18:02dnolen_neotyk: I gotta run, but in order to take that patch I will need to hear more confirmations that it doesn't break stuff.
18:02iwotechnomancy: is the comma significant there? (or is it for the bot?)
18:02technomancyit's for the bot
18:03ivanI'm calling a 0-arg Clojure function from Java (it's a Runnable?) and I get: Exception in thread "AWT-EventQueue-0" clojure.lang.ArityException: Wrong number of args (0) passed to: repl$thread-stopper$fn
18:03ivanis there some kind of arg I have to pass in?
18:03neotykdnolen_: reproduced, clean clone on master works with file proto
18:04iwotechnomancy: yeah, i guess i'm probably just talking about named arguments here :\
18:04sritchieivan: should just be myFn.invoke()
18:05sritchieivan: treat it as an IFn
18:05iwotechnomancy: i was hoping i could somehow refer to symbols (known within some scope) without explicitly declaring them via fn
18:05ivansritchie: thanks, I'll try that
18:05technomancy,((fn [& {:keys [a b c]}] (str a "-" b "-" c)) :a "hello" :b "world")
18:05clojurebot"hello-world-"
18:05technomancyall locals must be declared in the parameter list
18:08iwotechnomancy: thanks for the help, i need to take what i've learned and rethink what i'm trying to do here :)
18:08technomancysure
18:09ivanlooks like run() does call invoke()
18:11ivandoes this function take more than 0 args? (fn [] (stopper))
18:11ivanI am a little bewildered by the error message
18:12ivanstopper is (clojure.repl/thread-stopper thread)
18:13sritchieivan: looks like the error's with stopper
18:13sritchiewhat's the actual fn definition of stopper?
18:14ivanstopper is a local created in a let block: stopper (clojure.repl/thread-stopper thread)
18:15ivanI thought there might be some bug with multi-arity functions, which is why I wrapped it in a fn
18:15mfexivan stopper requires 1 argument
18:15ivanusing IFn and .invoke() results in the same
18:16mfexthe doc says "Returns a function that takes one arg" http://clojure.github.com/clojure/clojure.repl-api.html#clojure.repl/thread-stopper
18:16ivanmfex: oh yeah, you're right, sorry!
18:16ivanpity about the tracebacks ;)
18:17mfexwell you are passing the wrong number of args to repl thread-stopper :)
18:45banjiewentechnomancy: does leiningen have a verbose output option? I'm hanging on `lein uberjar` with no output.
18:47technomancybanjiewen: not really. are you on the latest?
18:47banjiewentechnomancy: no, 1.7.1
18:47technomancyhm; does `lein compile` have the same problem?
18:49banjiewenyep
18:49technomancybanjiewen: ok, so you've got something in your code keeping it from finishing
18:50banjiewentechnomancy: well I assumed it was my fault ;)
18:50ivanis there a language-agnostic Callable/Runnable interface that lets me pass arguments to the function?
18:51ivanperhaps even just one string argument
18:56amalloybanjiewen: often this is caused by one of your namespaces doing something side-effectful at the top level - at compile time. eg, (def connection (get-sql-connection))
18:57mebaran151ivan, any reason wouldn't just make close the run method over your argument?
18:57ivanmebaran151: I didn't want to pass multiple runnables into Java, but maybe I'll just do that
18:58mebaran151do you instantiate your own runnable? You could create the closure in the factory function
19:01ivanmebaran151: I just pass a function from Clojure -> Java
19:01ivanmebaran151: but I'll think about that. Thanks.
19:02mebaran151heh probably partial would be all you need actually
19:02mebaran151(partial function str-arg) => instant runnable builder
19:03sattvikivan: Functions are runnable/callabe.
19:03sattvik,(.call #(str "foo"))
19:03clojurebot"foo"
19:03ivansattvik: I didn't want to make this Java code depend on clojure.lang.IFn though
19:04sattvikivan: It doesn't have to. Function implement the Runnable and Callable interfaces.
19:04ivanand those don't take args :-)
19:04ivanmebaran151: thanks
19:05sattvikAre you making them in Clojure and passing them to Java?
19:05ivanyes
19:05mebaran151,((partial count "foo"))
19:05clojurebot3
19:06sattvikIs the argument being passed from Clojure or from Java?
19:06ivanJava decides on the string argument
19:07ivanOTOH maybe I should just rewrite all this Java in Clojure, heh
19:08sattvikivan: Well, if you want to interop with Java, it might be easiest to use a deftype that also implements Callable or Runnable. That makes the interop relatively painless.
19:08mebaran151sattvik: using partial, he gets all that for free :)
19:08mebaran151he just gets to prepass his string argument
19:09sattvikmebaran151: That's the thing: how is he passing the string argument?
19:09sattvikI premuse you'd want to avoid things like RT.invoke(...).
19:09sattviks/premuse/presume/
19:09hiredmanjust use IFn from java
19:10hiredmannew AFn(){ public Object invoke(Object) {...}}
19:10hiredman(AFn is the abstract version of IFn if you want to avoid typing a lot of stuff)
19:13sattvikhiredman: That's a good option, especially if the implementation doesn't have to be in Clojure.
19:15aperiodicusing IFn in java is pretty painless; that's how i patched up a java kinect wrapper so i could have it run clojure functions as callbacks
19:15aperiodictook all of five minutes
19:19netrealmIs it possible to overload a function with same arity, but using type hints to differentiate?
19:19hiredmanno
19:19alex_baranoskynope
19:21netrealmOkay, cool. Thanks.
19:21alex_baranoskynetrealm, use a multimethod
19:21alex_baranoskyor protocol
19:22sattviknetrealm: Under most circumstances, you can't (though you can still check types at runtime).
19:23sattvikAlthough, definterface to do it.
19:23netrealmalex_baranosky: is there a preference between those two? Or does it mainly depend on how one is using it?
19:23netrealmsattvik: Thanks, I will look at definterface.
19:23alex_baranoskymultimethods are more flexible, I always use them first
19:23sattvikWell, protocols can only dispatch on the type of the first argument, I believe.
19:24alex_baranoskyand consider protocols an optimization
19:25netrealmAlright, cool.
19:37beffbernardIs there any way to change values in a defrecord? Or do I have to create a new instance with the updated value?
19:40sattvikbeffbernard: You can use any standard map function, but records are immutable. I don't think there is any way to mutate in place.
19:41beffbernardso something like update-in?
19:41beffbernardthen just use the resulting value?
19:41sattvikbeffbernard: Yes.
19:41beffbernardsattvik: fair enough
19:42sattvikPretty much, anything you can 'do' to a map, you can do to a record as well.
19:46beffbernardOk.. I feel that I don't need to use defrecord, is there a stigma against using defstruct or just a plain old map?
19:47beffbernardI also ran into an issue trying to use a defrecord in another namespace.. import didn't seem to work and I wasn't aot compiling
19:48technomancybeffbernard: definitely best to start with maps
19:49beffbernardtechnomancy: I'll probably refactor my defrecords shortly then
19:49aaelonyHow can I get clojure.lang.LazySeq@.... values to resolve? Basically, I need to convert non strings. apply str gets me closer but it seems to do some clobbering as well. https://refheap.com/paste/2329 any help appreciated...
19:52sattvikaaelony: You could try something like doall to realise the seq.
19:53sattvikMaybe (str (doall x)) might do it?
19:53aaelonyI've tried doall, must not be doing it right
19:53technomancymaybe apply pr-str instead of str
19:53aaelonyah.. interesting...
19:54aaelonyno worries, I'll keep tinkering :)
19:54cemerickamalloy: when can I reasonably start pestering you to push a release of ring-gzip-middleware? ;-)
19:56alex_baranoskybeffbernard, start with maps, then if you're not sure use maps anyway. You pretty much never need to use records.
20:00yoklovbeffbernard: use records if you are using maps and you run into performance issues
20:05aaelonyhere is a simpler formulation: https://refheap.com/paste/2330 basically i need to convert [["abc" "def"]["xyz" 123] to [["abc" "def"]["xyz" "123"]
20:07emezeske&(for [x [["abc" "def"] ["xyz" 123]]] (map str x))
20:07lazybot⇒ (("abc" "def") ("xyz" "123"))
20:07emezeskeaaelony: ^
20:08aaelonyemezeske: thanks... looks so simple
20:09emezeskeaaelony: I don't know if it's the best way, but it's *a* way :)
20:09aaelonylooks fine to me
20:09aaelonythanks
20:09emezeskeaaelony: np
20:14amalloycemerick: 0.1.2 is on clojars now
20:14cemerickamalloy: you are a gentleman and a scholar :-)
20:15amalloyi guess maybe i should have made it 0.2.0 or something, since you totally broke it for lein1 users
20:16technomancyring middleware that depends on your lein version?
20:17amalloytechnomancy: oh, only to build, not to use
20:17amalloyhttps://github.com/amalloy/ring-gzip-middleware/blob/master/project.clj
20:17technomancyoh, whew
20:19amalloycemerick: github says you've now done more work on this project than i have
20:20cemerickI really need to work on my yak tolerance.
20:20ibdknoxI had bad things happen when I tried to use ring-gzip on heroku
20:20ibdknoxit would randomly choose not to serve certain files
20:20ibdknoxtwas very odd
20:21cemerickibdknox: using it right now…seems ok?
20:21emezeskecemerick: FYI: I'm almost done integrating friend into my project, and it's been great so far.
20:21ibdknoxit worked fine locally
20:21ibdknoxI haven't tried it in a while :)
20:21cemerickemezeske: awesome. :-D
20:25amalloyibdknox: i'm choosing to write that down to some sort of chris-granger-specific disease
20:26ibdknoxlol
20:27dougs87Clojure newb question: I have a jar file that my project needs that isn't from clojars. where can i put that file for lein to find it at compile time? (lein 2.x)
20:27hiredmandougs87: a maven repo
20:28dougs87hiredman: is clojars just a maven repo at some level?
20:29hiredmanat every level
20:29hiredmanlein just talkes to maven repos
20:29hiredmanit has some set of default repos and you can add more if you like
20:30dougs87so a private repo is my only option? there's no location on my filesystem that would be searched by default, or directory in my project home?
20:30hiredmanhttps://github.com/technomancy/leiningen/blob/master/doc/DEPLOY.md
20:30dnolendougs87: you can also install that jar locally
20:30amalloy~repeatability
20:30clojurebotrepeatability is crucial for builds, see https://github.com/technomancy/leiningen/wiki/Repeatability
20:31hiredmanyou can, for example, just toss the jars on s3 in the right way and they can be used as a maven repo
20:31hiredmanmaven repos are just bunch of files served over http
20:32dougs87ok - thanks all for the direction
20:34hiredmanI'd also recommend you search other public maven repos for the library you are looking for, unless it is some kind of internal thing it is most likely in a maven repo already
20:36technomancydougs87: if this is an OSS jar, then you should open a bug report if it's not in a public maven repo
20:40ivanis there a way to say "private except when you call it from the code generated by a public macro"?
20:41ivanotherwise I think I think I have to turn these helpers into macros too
20:41technomancyivan: I use ^:internal for that
20:41ivanthanks
20:45ivanI don't even know why this giant macro is a macro, perhaps because it needs to capture the local vars
20:45ivanI should probably turn most of it into a function
21:21FrozenlockI have a macro with keys argument-> {:keys [arg1 arg2 arg3]} & body... . Calling the function with the following arguments works: (my-fn {:arg1 1 :arg2 2 :arg3 3} body). However, I'm unable to place the arguments in a let binding -> (let [config {:arg1 1 :arg2 2 :arg3 3}] (my-fn config body). Any advice?
21:35ivanif you grabbed a fancy Clojure REPL that did (set! *print-level* 15) (set! *print-length* 103) by default, would you be annoyed?
21:36felideontechnomancy: why do you think db-agnostic migrations are unrealistic, such as Lobos? (and Rails migrations, Django South, etc., in turn)
21:40hiredmanmigrations on non-relational stores are generally a bad idea
21:40felideoni dont think Lobos purports to support non-relational stores?
21:41hiredmanthen what is so agnostic about it?
21:41felideonwell it's not tied to a specific vendor
21:42felideoneg postgres
21:42gfredericksFrozenlock: that's not how macros work
21:43hiredmanfelideon: I imagine if technomancy said something about db agnostic migrations being unrealistic he was most likely talking about migrations and nosql whatever
21:43gfredericksFrozenlock: the macro receives the syntactic forms you give it; any further advice would probably require knowing why you're making a macro
21:44FrozenlockWithout going too much in details, I'm trying to do a secure operation (à la with-open).
21:44felideonhiredman: maybe
21:44FrozenlockThe keys argument are there to setup the evironment.
21:44gfredericksFrozenlock: I think most with-foo macros can be done with a very small macro that defers to a with-foo-fn function
21:45gfredericksmy theory is that that can make it easier to do
21:45gfredericksi.e., (defmacro with-foo [x & body] `(with-foo-fn ~x (fn [] ~@body)))
21:46FrozenlockNice! Would be easier to read too!
21:46FrozenlockThanks :)
21:47gfredericksFrozenlock: yessir :)
21:48ivanwhat does the @ do in (map key @clojure.lang.Compiler/LOCAL_ENV)?
21:49amalloy&'@foo
21:49lazybot⇒ (clojure.core/deref foo)
21:49ivanoh, right, thanks
21:50laurusDoes anyone know how to translate this Python to clojure-py? stats.binom.pmf(tries, 10, 0.5)
21:50laurusHere, stats refers to scipy.stats, and tries = range(11)
21:54laurusIs there any way to turn a LazySeq into a non-lazy one?
21:54xeqidorun
21:55xeqiwait, doall
21:56laurusxeqi, so how would I make a non-lazy seq out of (range 11) ? If I run (doall (range 11)) I get ((0 1 2...)) rather than (0 1 2...).
21:57xeqi&(doall (range 11))
21:57lazybot⇒ (0 1 2 3 4 5 6 7 8 9 10)
21:58laurusHmm. I was defining a variable as (range 11) and then running (doall myvariable).
21:58xeqi&(let [x (range 11)] (doall x))
21:58lazybot⇒ (0 1 2 3 4 5 6 7 8 9 10)
21:58laurusAh, thanks!
21:58laurusBut it still seems to be a lazyseq somehow.
21:59xeqiare you trying to mutate your variable?
21:59laurusI guess so.
21:59laurusI'm using clojure-py, and I'm getting this:
21:59laurusTypeError: unsupported operand type(s) for -: 'LazySeq' and 'float'
22:00laurusThat's why I'm trying to de-lazify it.
22:00xeqiI'm not use to clojure-py, is that saying you are calling the fn '-'?
22:00xeqior "-:"
22:00laurusThat - is in Python.
22:01xeqiah
22:01laurusIt refers to k = arr((k-loc))
22:01laurusIn the scipy library :P
22:01xeqiso you have a (def varname (range 11)) somewhere?
22:01laurusYes.
22:02xeqido (def varname (doall (range 11))) instead
22:02laurusI tried that too, but it's still a LazySeq
22:02xeqiah, so it is
22:03laurusWhat should I do?
22:03xeqitried py/list?
22:04laurusThat did it!
22:04laurusThanks xeqi!
22:04laurusIt's too bad this stuff doesn't integrate a bit better though.
22:05xeqisometimes interop with the host environment requires converting to a host type
22:05bdesham&(seq (doall (range 11)))
22:05lazybot⇒ (0 1 2 3 4 5 6 7 8 9 10)
22:06laurusbdesham, unfortunately that doesn't work well either because it's ChunkedCons now :P
22:06bdeshamgoodness gracious, what is that
22:06technomancyfelideon: trying to normalize queries and inserts across all relational DBs is reasonable since there is a standard, but normalizing DDL is basically going to amount to a huge pile of edge cases where fixing a bug in one adapter causes bugs in others
22:06laurusbdesham, no idea! ;)
22:07bdesham:)
22:07laurusWelcome to the exciting new world of clojure-py! ;)
22:09technomancyfelideon: furthermore I think usually DB-agnostic migrations are driven by a desire to be able to swap out the DB as an implementation detail, which seemed like a reasonable goal when ActiveRecord came out but has proven to be a pipe dream
22:09felideontechnomancy: so current 'solutions' are limited to a certain subset of DDL capabilities?
22:10technomancywell, portability is limited to a subset
22:12felideontechnomancy: how has that been proven? numerous edge case issues?
22:13technomancyfelideon: right; the notion of "develop against sqlite and deploy against postgres" used to be popular among rails devs it became obvious there are simply too many subtle differences
22:14felideonoh wow, people actually did that?
22:14technomancy=(
22:14xeqiand more
22:14technomancyI would argue that even developing on a different OS and version of your database from production is asking for trouble for complex applications
22:14xeqilocal nginx or webrick, deploy apache
22:14xeqimac vs linux
22:15felideonor deploy webrick
22:15felideon(in my company's case)
22:15xeqiheh, I never saw that one
22:15technomancyhttp://teddziuba.com/2011/03/osx-unsuitable-web-development.html <- totally flamebait, but makes some good points
22:15felideonyeah. a shell script that launched 20 webrick instances behind apache load balancing
22:15technomancywhoa
22:16xeqieven worse than mongrel clustering
22:17technomancyhttp://jp1.r0tt.com/l_134c4160-6ab5-11e1-860d-f73448f00001.jpg
22:17bdeshamoh, I love it when people call it "MacOS X" or "MacOSX" or "MAC" or crap like that
22:17felideonI came in without knowing a lick about Rails and stuff, but I slapped on Passenger on REE.
22:17technomancybdesham: my favourite is macosecks
22:17felideonlol
22:18technomancythere are still people around who refuse to write LISP in lower case
22:18felideonbdesham: i call it 'best linocks distro'
22:18felideontechnomancy: ugh yes
22:19amalloylaurus: it seems like you ask a lot about clojure-py in here, and there's never anyone who knows the answer. maybe you'd be better off asking on their mailing list or similar?
22:21laurusamalloy, ok!
22:21laurusSorry if it's bothering you.
22:21amalloyi'm not especially bothered (and if i were, who cares - i don't own this channel)
22:22amalloybut you'd probably get better answers
22:22laurusAlright, I'll give it a whirl.
22:25felideontechnomancy: heh, i had neer read that dziuba post
22:27technomancyit makes me smile
22:29technomancyI'm surprised he doesn't mention case-insensitivity; that's a huge facepalm issue
22:29felideonhaha
22:29ivandoes anything look wrong in https://github.com/alandipert/clj-swingrepl/blob/ivank-fixes/src/clj/org/dipert/swingrepl/main.clj?
22:30ivanI changed a lot of stuff and I had no idea what I was doing
22:36felideon,'foo
22:36clojurebotfoo
22:36felideon&'foo
22:36lazybot⇒ foo
22:36felideonoh
22:39bdesham,"&'foo"
22:39clojurebot"&'foo"
22:40bdeshamdamn
22:40gfredericks,(println "&'foo")
22:40clojurebot&'foo
22:40lazybot⇒ foo
22:41bdeshamah, there you go
22:44felideonhmm too bad laybot prepends the ⇒
22:44felideonlazybot*
22:45RaynesYeah, it'd be great if I were stupid.
22:45gfredericks:)
22:45amalloyhaha
22:45amalloyi have good news, then
22:45gfredericksRaynes: what you didn't want to make the channel totally worthless for most hours of the day?
22:45RaynesShucks.
22:46gfrederickswait I guess the channel would shut them up for spamming pretty quick
22:46felideonRaynes: hahaha sorry
22:58LajlaRaynes, why do we have 2 bots?
23:03Frozenlockgfredericks: i just realized that what I was trying to do wouldn't have worked with a function either. If I have a function with keys argument, how can I use a map as input? For example, if I have (fn [:keys {arg1 arg2 arg3}] body), is there a way to use the hashmap {:arg1 1 :arg 2 :arg3 3} as input?
23:05xeqi&((fn [{:keys [a b c]}] [a b c]) {:a 1 :b 2 :c 3})
23:05lazybot⇒ [1 2 3]
23:05skelternetI didn't expect compiling my app to actually call the function and attempt to connect to the ldap server.
23:05gfredericksFrozenlock: are you hoping to be able to call it with varargs like (f :a 1 :b 2 :c 3), or just the way xeqi just did?
23:06gfredericksskelternet: anything you do at the top level will get run when compiling
23:07skelternetgfred: Ok…so…for things like connections, should I use (delay…) ?
23:07gfredericksI've done that. there might be a more idiomatic way I'm not thinking of.
23:07FrozenlockWell I was hoping to avoid rewriting everything in the map.; (fn map body). Done.
23:07gfredericksFrozenlock: it should work; check the example xeqi gave
23:08xeqi(when-not *complile-files* ...) ?
23:08skelternetgfred: yeah…I'd like whoever I hand this off to to be able to compile while not connected to a network with our active directory and database connections ;)
23:08xeqi*compile-files*
23:09gfredericksxeqi: so that'll still be run later?
23:12xeqi.. I'm not sure, just learned about it last week
23:13xeqibut I've seen it used for reading configs later, so I think so
23:16Frozenlock,((fn [&{:keys [a b c]}] [a b c]) {:a 1 :b 2 :c 3})
23:16clojurebot#<IllegalArgumentException java.lang.IllegalArgumentException: No value supplied for key: {:a 1, :c 3, :b 2}>
23:16Frozenlockbingo- the & was messing everything
23:17xeqi,((fn [&{:keys [a b c]}] [a b c]) :a 1 :b 2 :c 3})
23:17clojurebot#<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: Unmatched delimiter: }>
23:17xeqi,((fn [&{:keys [a b c]}] [a b c]) :a 1 :b 2 :c 3)
23:17clojurebot[1 2 3]
23:17gfredericksFrozenlock: yeah that's for if you want to do it varargs style like I mentioned earlier
23:17gfredericksand like xeqi just demonstrated once again :)
23:18FrozenlockYes, but I couldn't for the life of me see what I was doing differently than xeqi's
23:21gfredericksstupid characters
23:21Frozenlockwell.. stupid me :p
23:26skelternet(bind [*goodnights*...