#clojure logs

2011-10-17

03:02kiumahello, is there a clojure plugin for netbeans 7.0.1 ?
03:03scottjthere's whatever's the latest on enclojure's website
03:24Blktgood morning everyone
03:32depyyo
03:38Blkt:D
04:00khaliGhas anyone here used proguard to optimise their clojure app?
06:40todunI am trying to do unit=testing. I write all my test functions into one file that is in the test/sractch path in the clojure project I create. Then I call the test like so: (clojure.contrib.test-is/run-tests & namespaces). This is how I saw it done in an example. No compilation. No change of namespaces. I get the following exception: java.lang.ClassNotFoundException: clojure.contrib.test-is (NO_SOURCE_FILE:0). Am I doing something wrong, yes?
07:13todunAnother question. I try to remove a specific character from an input string using the following function http://pastebin.com/F1FBrRsd . I get an exception when I try this is in the REPL (java.lang.IllegalArgumentException: Don't know how to create ISeq from: java.lang.Character). Is there a way to ensure that I don't get this error or I re-cast the input or accepting input of the function?
07:15todunWhen I try to cast it by making the input a list '(input) or a vector [input] I get the following exception in either case: java.lang.ClassCastException: java.lang.Character cannot be cast to clojure.lang.IFn
07:17cemericktodun: clojure.test supersedes c.c.test-is in all cases
07:17todun1I'm a bit confused as to how to use def. the docs talk about (def symbol init?). def is defined to be a general form a function. And yet when I try to use the notation of defn to define a function, I get "too many argument" errors and such. Am I missing something here?
07:18toduncemerick: is that the exact syntax I should put in?
07:18cemerickis what the exact syntax?
07:19toduncemerick: clojure.test supersedes c.c.test-is in all cases
07:19cemerickthat's not syntax, that's a sentence :-)
07:19todunlol
07:19todunok.
07:20cemerickIt sounds like you could use a good Clojure book to help you along. There are many fine choices.
07:20toduncemerick: I'm reading two actively as I type.
07:21cemerickah, ok
07:21todundo not know if they are the standard. But I welcome your suggestions.
07:21todun"Programming in Clojure" of which most just flies over my head, especially recursion which I'm trying to learn first.
07:22todun"Seven Languages in Seven Weeks" shorter intro lacks the necessary depth I need for problems that arise like the questions I've been asking.
07:22cemerickwell, I'll help with your zg function; what are you trying to do exactly?
07:23todunremove certain characters from the string .eg. newline , tabs etc.
07:24todunI think I have the functionality down, but I don't know how to do the casting. perhaps I'm looking at the problem the wrong way.
07:24cemerickso `w` is a String?
07:26todunabout to quickly change internet locations brb
07:29toduncemerick: yes. the input is a string
07:31toduncemerick: I tried making it a list or vector but I got a different exception as shown above.
07:35cemericktodun: there are many ways you can do this, but only one efficient way
07:36toduncemerick: ok...
07:36todunis my way right, wrong, efficient?
07:37cemerickOK, outside of benchmarking things, I retract that. :-)
07:37cemerickconsider:
07:37cemerick,(.replaceAll "hello\nthere" "\\n" "")
07:37clojurebot"hellothere"
07:37cemerickThat's just using the replaceAll method on the java.lang.String class
07:38cemerickIf you wanted to use sequences with remove, you would need to do:
07:39cemerick,(apply str (remove #(= \newline %) "hello\nthere"))
07:39clojurebot"hellothere"
07:39cemericktodun: you were getting the error because `remove` is a function that takes a function as its first argument; you were passing a character
07:40cemerick(remove f sequence) is the equivalent of (filter (complement f) sequence), FWIW
07:41toduncemerick: ok. so I didn't even need to do filter all along
07:41todunI was repeating myself.
07:41cemerickwell, you can filter if you want, but the result of that is a sequence, not a string
07:41todun, (defn zg [w] (filter (fn [w] (= w (not(char (range 32 126))))) (remove (char 10) w)) )
07:41clojurebot#<Exception java.lang.Exception: SANBOX DENIED>
07:42cemerick,(filter #(not= \newline %) "hello\nthere")
07:42clojurebot(\h \e \l \l \o ...)
07:42toduncemerick: what does % do in that?
07:42gfrederickscemerick: clojure ruins the example again :)
07:42todunis it like a wildcard?
07:42cemericktodun: you can't define var in the bot; only non-side-effecting expressions work.
07:42gfrederickss/clojure/clojurebot
07:42lazybot<gfredericks> cemerick: clojurebot ruins the example again :)
07:43cemericktodun: that's the short form of an anonymous fn.
07:43todungfredericks: :)
07:43toduncemerick: ok. good to know.
07:43cemerick,(filter (fn [char] (not= char \newline)) "hello\nthere")
07:43clojurebot(\h \e \l \l \o ...)
07:43cemerickto illustrate remove:
07:43cemerick,(remove #(not= \newline %) "hello\nthere")
07:43clojurebot(\newline)
07:44cemerick,(filter (complement #(not= \newline %)) "hello\nthere")
07:44clojurebot(\newline)
07:45toduncemerick: allot of new syntax. I'm testing as youshow.
07:45todun*you show
07:46cemerickI think I'm done with show and tell, back to work for me. :-)
07:46cemericktodun: There's lots of helpful people here, ask when you have questions/trouble. Make sure you keep reading, though.
07:47toduncemerick: thanks for clearly that up.
07:47toduncemerick: keep reading. always. but how can one escape the allure of coding first?
07:47todun*clearing
07:47cemerickGoes hand in hand, of course. :-)
07:48todun:)
07:48archaichi just a quick question before I go digging is there an easy way to autodetect log files coming into a folder?
07:50cemerickarchaic: In JDK 7, yes. Otherwise, no; polling, IIRC.
07:54archaicahh java.nio.file?
07:58cemericksounds right, yeah
08:11fdaoudgood morning
08:11fdaoudI'm wondering why this doesn't work:
08:12fdaoud,((first '(+ 1 1)) 38 4)
08:12clojurebot4
08:12ljosHi - Where did import-static go?
08:12ljosin clojure 1.3
08:12fdaoudcan anyone help? How do I call + after getting a hold of it from a list?
08:15ljosfdaoud: I think you should be able to get it from the list and it should call, clojure being a lisp-1.
08:16fdaoudljos: I think you're right, but how?
08:16khaliGyou're getting back the symbol + not the function
08:22gfredericksfdaoud: you'd have to eval the symbol
08:22gfredericksi.e., ((eval (first '(+ 1 2))) 3 4)
08:23fdaoud,((eval (first '(+ 1 2))) 3 4)
08:23clojurebot#<Exception java.lang.Exception: SANBOX DENIED>
08:23gfredericksfdaoud: and the bots don't let you do eval :)
08:23gfredericksit makes them skiddish
08:24fdaoudgfredericks: right :) well thanks.. but so is there a way without eval? 4clojure won't let you do eval either ;)
08:24gfredericksis this to actually solve a 4clojure problem or just some weird golfing thing you guys are always doing?
08:24raekfdaoud: ((first (list + 1 1)) 38 4)
08:25khaliGmaybe you could implement scheme first? :P
08:25fdaoud,((first (list + 1 1)) 38 4)
08:25clojurebot42
08:25raeknow the first element in the list is not the symbol "+", but the function that "+" refers to
08:26fdaoudraek: is that different because in the first case, + is a symbol, and in the second case, it is the actual function?
08:26raekyes
08:26gfredericksat this point why don't we just simplify it to ##(+ 38 4)? Rather unclear constraints here
08:26lazybot⇒ 42
08:26fdaoudraek: right, you beat me to it :)
08:26raek'list' is an ordinary function that evaluates its arguments
08:26gfredericks(def + (comp - (partial - 0)))
08:27fdaoudgfredericks: call it a learning experience :)
08:27gfredericksfdaoud: okay :)
08:27fdaoudthanks raek
08:27raekin my experience, quote is mostly used in macros in clojure
08:27fdaoud,((first [+ 3 4]) 38 4)
08:27clojurebot42
08:28fdaoudmakes sense now
08:28raekfdaoud: yeah, [..] instead of (list ..) is how you usually write collecions constants in code in clojure
08:30fdaoudraek: so say you are given '(+ 3 4) by a caller. How do you go from the symbol "+" to the function "+"? there is no other way than with eval?
08:30gfredericksfdaoud: that's a weird situation in the first place because + could mean different things in different namespaces
08:30ljosWhat is the easiest way to get public static variables into clojure from java? I'm getting a bit sic of this: (. Class var) . I was looking into import static, but I can't seem to find the package it is a part of in Clojure 1.3.
08:30gfredericksfdaoud: so it depends on what you want it to mean
08:31raekfdaoud: that is a very unusual situation, but yes either you have to use eval, or you have to write a function that interprets that data
08:31kzarI have the contents of file as a string, is there a way to make a java.io.File object or InputStream from it without saving it to disk as an actual file?
08:31kzar(Those are what clutch requires to add an attachment)
08:31raekfdaoud: if you want to delay the evaluation of a piece of code, wrap it in a (fn [] ...) instead
08:31khaliGfdaoud, i think in CL the symbol is a function designator so you can funcall it all the same. Not in Clojure though..
08:32raekkzar: yes. use java.io.StringReader
08:32fdaoudI'm looking at http://www.4clojure.com/problem/121
08:32fdaoudsorry I should have said that up front!
08:33gfredericksfdaoud: if you don't like eval and you have a small set of symbols you need to resolve you could create a map for it: {'+ +, '- -, ...}
08:33raekfdaoud: in that case, I think you should write a function that interprets the expression
08:33fdaoudgfredericks: it's 4clojure that doesn't like eval, not me
08:33gfredericksfdaoud: true :)
08:35raekkzar: if you need an InputStream, you can call (.getBytes the-string desired-encoding) and pass the result of that to the constructor of ByteArrayInputStream
08:35fdaoudgfredericks, raek: I think you're right, I'd have to write a function that interprets the expression, and actually map the symbols to the functions
08:36fdaoudI'll have a go at it.. thanks for your help!
08:39kzarraek: Gotya, thanks
08:40fdaoudljos: I think (Class/var) works
08:40fdaoud,(Math/PI)
08:40clojurebot3.141592653589793
08:40raek,Math/PI
08:40clojurebot3.141592653589793
08:41raekfor some reason, reading static fields and calling static methods have interchangable syntaxes
08:41raekbut I prefer the notation without the parens for fields
08:42fdaoudright
08:42fdaoudI wouldn't use parens, my mistake
08:42fdaoud,(* 2 Math/PI)
08:42clojurebot6.283185307179586
08:44gfredericks(def tau (* 2 Math/PI))
08:45ljosfdaud: thank you.
08:47jcromartieooh...
08:47jcromartieGZIPInputStream
09:00ljoshmmm.. I get an illegalArgumentException when I do Class/var. It says "no matching method".
09:01ljoshepp. probably somthing wrong on my end :)
09:07bendlasHey, anybody else got troubles fetching [org.clojure/java.data "0.0.1-SNAPSHOT"] over maven?
09:24micahmartinI'm stumped on this one….
09:24micahmartinHow can I set metadata on a var inside a macro?
09:25micahmartin(declare ^:dynamic foo) works, but inside a macro the "^:dynamic" is stripped
09:26micahmartin… and the resulting var doesn't have the :dynamic metadata set
09:27micahmartinAny ideas?
09:32duck1123there was a thread about this recently
09:32duck1123you have to set the dynamic manually,
09:33duck1123http://groups.google.com/group/clojure/browse_thread/thread/d5efd00c699f73a7/e59708f4c7b8e83f?hl=en&amp;lnk=gst&amp;q=dynamic#e59708f4c7b8e83f
09:34duck1123this might be a slightly different issue
09:50micahmartinGood morning?
09:50amcnamaratrue
09:57llasrammicahmartin: Are you sure that's the exact problem you're having?
09:58llasram,(do (defmacro keep-meta [name] `(def ~name nil)) (keep-meta ^:dynamic example) (.isDynamic #'example))
09:58clojurebot#<Exception java.lang.Exception: SANBOX DENIED>
09:58llasramStupid bot
09:58llasramAnyway, I get get 'true' with 1.3
09:58gfredericksyeah, stupid bot.
09:58llasramThe metadata is attached to the symbol, which moves unmodified through the macro
09:59llasramIf you're generating a new symbol, you need to copy the metadata manually using with-meta
09:59llasramgfredericks: Ok, I'm sure it's a very intelligent bot. :-)
09:59gfredericks:)
10:00gfredericksare the bots intelligent???
10:00lazybotgfredericks: Yes, 100% for sure.
10:01llasramhaha. awesome
10:01micahmartinllasram: Maybe I can take that approach and add the metadata to the symbol first.
10:02llasrammicahmartin: Oh, are you trying to have the macro add :dynamic true to the metadata?
10:02llasramYou can use with-meta for that too
10:03micahmartinyes… here's the src:
10:03micahmartin(defmacro with [name & body]
10:03micahmartin `(do
10:03micahmartin (let [with-component# (new-with '~name (fn [] ~@body))]
10:03micahmartin (declare ^:dynamic ~(symbol name))
10:03micahmartin with-component#)))
10:05llasrammicahmartin: Ahhh, yeah. So the ^ metadata stuff hapens at read time, so it's getting applied to the (symbol name) form, *not* the macro-expansion time result of that
10:05micahmartinyeah.. that's what I found out.
10:07khaliGso what are people using clojure for? i'm getting the feeling it's mainly used for web stuff, is this correct?
10:07llasrammicahmartin: I think it'll work if you try instead something like: (declare ~(with-meta name (assoc (meta name) :dynamic true)))
10:07micahmartinllasram: What you suggested worked. I added the meta data to the symbol before passing it into declare
10:07llasrammicahmartin: Awesome!
10:07micahmartinllasram: Thanks!
10:08llasramkhaliG: That's a question I have too, although I don't have the same impression re: web stuff. Well, beyond the fact that "web stuff" is most of the dev work going on right now, and thus is most of what anyone is doing with anything
10:14jcromartieOK this is insane: http://www.jamesjohnson.me/2011/10/05/beginners-guide-to-programming.html
10:14jcromartieI have to imagine that a basic (sans Emacs) introduction to Clojure and Compojure would be simpler
10:18llasramI think the lack of a builtin (or sane) package management on OS X is the real hassle there. I think full-and-honest "get setup from scratch" instructions for anything on OS X or Windows are going to look like that
10:30andrewclegghey, does anyone know if it's possible to customize the thread pool used by futures?
10:36andrewcleggn/m, I found a good blog on this (thanks raek)
10:39jcrossley3andrewclegg: url?
10:39andrewclegghttp://blog.raek.se/2011/01/24/executors-in-clojure/
10:41jcromartiellasram: except Rails has a ton of dependencies and hand-wavy magic
10:41jcromartiein order to get a n00b up
10:41andrewcleggmore like a manual way to do the same thing though, rather than a way to control futures and send-off
10:42lnostdal_are there better ways of dealing with (manipulating) arguments than e.g. this: http://paste.lisp.org/display/125362 .. ?
10:43jcrossley3andrewclegg: thx
10:45lnostdal_(show-ModalDialog some-widget :js-options {:width 800} :on-close (alert "dialog was closed") ;; the goal is to add :modal :true to :js-options so it'll look like {:width 800 :modal :true} when passed on to show-Dialog
10:48andrewcleggI guess if an exception happens in some code being run by a future, it'll pop out when I deref the future, right?
10:49gfredericks,@(future (throw (new Exception "POP!")))
10:49clojurebot#<RuntimeException java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.Exception: POP!>
10:49gfredericksin a nested sort of way apparently
10:49lnostdal_(let [later (future (/ 42 0))] (Thread/sleep 1000) @later)
10:49lnostdal_yeah
10:51andrewclegghah, yeah, should've just tested it myself :-)
10:51raekandrewclegg: yes, unless you have a try/catch block in the future body
10:51andrewcleggstill getting used to how quickly you can test these hypotheses in clj...
10:51raekso futures are not ideal for background threads...
10:52guhi, can someone please solve a doubt about leiningen? it is exposed here: http://stackoverflow.com/questions/7787911/compojure-lein-ring-in-production
10:52raek*background threads that should stay alive indefinitely
10:52gfredericksraek: are they also bad for that because they hog resources from the thread pool? Or do I misunderstand how that works?
10:53ThreeCupsI'm new to clojure. I'm using congomongo. I'm trying to figure out the pattern/idiom for getting/using a connection to the mongodb server in a thread-safe way. congomongo has a method make-connection that returns a connection map that is to be used with a with-mongo macro (or a set-connection! method, but I'm not using this). I have a library/file/namespace (not sure which word is best here)...
10:53ThreeCups...where I do something like (def db (make-connection ...)). My understanding is that db is now a Var and it will be shared by all threads. Is this correct? If that's the case, then I just need to be sure that db is a thread-safe connection.
10:54raekclojure uses a thread pool of unbounded size for futures, so it's safe to execute long processes in it
10:54jcrossley3raek: what is the ideal for bg threads that must stay up indefinitely?
10:54raekhrm, well the default error handling mechanism is not ideal...
10:55gfredericksraek: okay, good to know
10:55raekI usually end up with somehting like this: https://gist.github.com/1098366
10:55ipostelnikjcrossley3, the real question is what do you want to happen when your background code throws an exception
10:56ipostelnikyou can wrap your code in a try/catch that swallows (or logs) exceptions and recurs to the start of the method
10:56raek...but the default error handling mechanism for java.lang.Threads (print stacktrace to stdout) might not be what you want either
10:57raekyou should always catch exceptions at the top level anyway (e.g. to log them)
10:58gfredericks(defmacro cautious-future ...)
10:58raekin another thread than the repl, you don't have the repl to catch them for you...
10:58cemericktechnomancy: aside from my snark, what really happened? Does ubuntu re-repackage stuff?
11:00jcrossley3ipostelnik: i thought raek was implying there was a better abstraction than futures to use for long-running tasks, but i gather he meant "better than a future using default error-handling"
11:01raekfor initial development, using j.l.Thread might be simpler for long-running background threads, since the default error handling prints to stdout instead of saving the exception until you dereference the future
11:02jcrossley3raek: cool, thx
11:03raekexecutors and their Futures have richer apis, though
11:03raek(e.g. you can query it if it's still running)
11:08raekif you send stuff to the swing thread for execution, you have the same problem with exceptions
11:09raekso rather than trying to make a safe variant of one of the threading apis (e.g. future), maybe you do need to have a "safety net" macro that you can easily wrap code in
11:30todunwhen I try to compile my code in emacs, I get this: C-c C-k is undefined. I've restarted emacs but still get this error. Anyone else experience this? thanks.
11:35ljosDoes clojure have a -1 operator like CL?
11:35gfrederickswhat does that do?
11:35cemerickdec
11:35gfredericksoh it does that
11:35cemerick(so I presume)
11:36cemerickI suppose it might negate, in which case (partial * -1)
11:36gfredericksI also thought he could have meant ##(- 7), but dec seems much more plausible
11:36lazybot⇒ -7
11:36cemerick…if you don't care about boxing
11:36ljosI think dec is what I am looking for.
11:37cemerickgfredericks: heh, thats a lot more sensible, as long as you've got only one arg :-|
11:37gfrederickscemerick: how often do you define multi-arg negation functions? :)
11:38gfredericks(partial * -1) also does weird stuff if you give more than one arg
11:38cemerickgfredericks: You don't, but - is multi-arg :-)
11:38cemericktrue enough
11:38gfredericks(fn [x] (- x)) to be safe
11:38cemerickthis is why I try to avoid quickest-keyboard-in-the-west irc conversations
11:39cemerick(and yet…)
11:39gfredericks:)
11:44khaliGit would help if ljos got the right function which is 1- not -1 :)
11:51carllerchetechnomancy: is it sane to try to run leiningen w/ 1.3 projects right now?
11:54andrewcleggumm... I'm trying to make a vector of ints (not longs) to pass into java
11:54andrewcleggor rather to put into an arraylist to pass into java
11:55andrewcleggbut I'm getting an arraylist of longs
11:55andrewclegg(def resources (conj (vector-of :int) 1 2 3))
11:56andrewcleggthen (def foo (ArrayList. resources))
11:56andrewcleggwould've thought that would give me an ArrayList<Long> but they're Integers -- any ideas?
11:56duck1123carllerche: lein works fine with 1.3 projects
11:57duck1123lein still uses it's own version though
11:57carllercheI'm getting a thrown exception when I run `lein test`… I submitted an issue
12:00pjstadigandrewclegg: you mean you would've thought that would give you an ArrayList<Integer>?
12:01andrewcleggerr yeah, sorry
12:01andrewcleggreverse of what I said
12:01pjstadigwell generics are a fabrication of the java compiler
12:01andrewcleggI'm after an ArrayList<Integer>
12:01pjstadigso it's really an array list of objects
12:01andrewcleggok, well I'm after an arraylist with ints in :-)
12:01pjstadigthe things you're putting in are Integers
12:01pjstadigandrewclegg: which version of clojure?
12:01andrewclegg1.3
12:02andrewclegglongs by default now right?
12:02pjstadigso you need to do something like (def resources (conj (vector-of :int) (int 1) (int 2) (int 3)))
12:02pjstadigyeah longs are default
12:02andrewcleggoh, I assumed the (vector-of :int) would create a vector that only accepted ints, for some reason
12:03andrewclegghttp://clojuredocs.org/clojure_core/clojure.core/vector-of makes it look like that
12:05pjstadigi've never used vector-of
12:07andrewclegg,(.getClass (int 3))
12:07clojurebotjava.lang.Long
12:07andrewcleggwtf? ^
12:07andrewclegg,(.getClass (short 3))
12:07clojurebotjava.lang.Short
12:07andrewclegg(sorry)
12:08andrewcleggwhy does (int 3) return a long?
12:08pjstadighttps://groups.google.com/d/msg/clojure-dev/1kkjqq8Yois/E0nsEY1XcEAJ
12:09pjstadighmm
12:09pjstadigthought that might be relevant, but maybe it isnt
12:09hiredmanandrewclegg: do you have some kind of actual problem?
12:10andrewclegghiredman: sadly yes. trying to construct an ArrayList of Integers to pass into a Java method
12:11dnolenandrewclegg: int does not return a long.
12:11andrewcleggso I see
12:11hiredmanandrewclegg: then create some integers
12:11dnolenandrewclegg: int casts to a primitive int.
12:11pjstadigandrewclegg: you may just skip the primitives then
12:11pjstadig,(map type (java.util.ArrayList. [(Integer/valueOf 1)]))
12:11clojurebot(java.lang.Integer)
12:12andrewcleggok, thanks
12:16andrewcleggthat worked -- thanks everyone
12:16gfrederickscemerick: there's a stray "&amp;" in your new blog post, in the code snippet below "so let's have it:"
12:22cemerickgfredericks: thanks, fixed
12:23gfredericks\o/
12:35ipostelnikin lein, is it possible to include env variables in the jar manifest ?
12:35ipostelnikI'm trying to get the build number into the manifest
12:38technomancycemerick: apparently the packaging for asm changed in debian unstable, and the corresponding fixes for lein didn't get synced into ubuntu
12:38technomancysomething getting split into multiple jars
12:39zilti"Write a function which allows you to create function compositions. The parameter list should take a variable number of functions, and create a function applies them from right-to-left." That does mean that I have to do (apply last second-to-last) right? "Wrong number of args (0) passed"
12:39cemericktechnomancy: so it wasn't actually a repackaging
12:39technomancywell... clojure bundles its own asm to prevent things like this
12:39cemerickwait, why is asm relevant at all?
12:39cemerickRight, that's what I was getting at.
12:40technomancybut they had to undo that to fit with policy
12:40cemerickwaitaminute :-)
12:40cemerickthe clojure package on debian has asm ripped out of it?
12:40technomancyit's actually not lein-specific; anything using the clojure package is broket
12:40technomancyI think so =\
12:40cemerick:-D
12:40cemerickoy vey
12:41technomancytotal culture clash
12:43cemerickNot sure it's a culture thing.
12:43cemerickWhat if Clojure shipped with modified asm?
12:44cemerick(probably wouldn't be allowed into the official repositories, I suppose)
12:44technomancywell, if they called it out as an explicit fork probably would be fine
12:44technomancyit's just that a lot of people bundle stuff like that out of laziness, specifically because they don't have a good dependency mechanism
12:45technomancyand that's what the policy is meant to prevent
12:45TimMcWhat is the asm?
12:45technomancyTimMc: bytecode generation library
12:46ziltiTimMc: Apache asm is a library to modify java bytecode.
12:46TimMcok
12:46hiredmanit
12:46hiredmanasm is not an apache project as far as I know
12:46hiredmanapache has something else
12:46hiredmanbcl?
12:47hiredmanbcel
12:47joegalloi think bcel is built on asm
12:47cemerickbytecode engineering library, yeah?
12:47hiredmanjoegallo: interesting
12:47joegalloor maybe i'm confusing bcel and cglib
12:48joegalloi got it backwards
12:48joegallocglib uses bcel
12:49joegallo(or so claims the cglib website)
12:50joegallolooking at the maven info, that claim seems to be false
12:51TimMc"SparseStringArrayVectorDeserializer" <- just seen in codebase
12:52babilencemerick: I guess that in that case the clojure asm would have to be released and packaged seperately
12:54cemerickyeah
12:54cemerickbabilen: I generally don't think it's right for downstream packagers to mess with whatever original authors have done.
12:55cemerickthough I understand the motivations / priorities, despite the smoke I throw about it.
12:55babilencemerick: I beg to differ, but that is probably due to the same culture clash :)
12:55technomancyanyway thanks to babilen it does work fine in debian. it's just that ubuntu goofed up.
12:56TimMcNothing's new there. -.-
12:57cemerickbabilen: do you differ with my opinion, or the notion that I understand the motivations? ;-)
12:57TimMc<-- increasingly pissed-off Ubuntu user
12:57babilencemerick: hehe, no :)
12:57babilencemerick: I mean the opinion, not your understanding
12:58cemerickbabilen: I can reasonably believe either! :-D
12:58cemerickI'm JVM-centric, so what I care about is likely always going to run counter to distro / repository maintainers.
12:59hiredmanjvm on the metal!
12:59cemerickstill in the lab, no?
13:00babilenProbably, even though I believe that having 1000 identical instances of the same library on one system is not necessarily a good thing. But anyway, we have to live with those different cultures and the packaging tools ease a lot of the pain that is associated with it.
13:00technomancyI'm ok with tweaks like that for application-level packages like lein and its dependencies. I would balk if developers were hacking against it, but they're not; they're getting clojure directly from mvn central.
13:01technomancylibraries for end user applications vs libraries for developers are vastly different use cases; most people tend to lump them together.
13:01babilen+1
13:01gfredericksTimMc: I just tried to upgrade 11.04 -> 11.10 last night. Looked at it this morning and it had bogged down on a download task because the wifi connection had died for some reason. Couldn't turn the connection back on even by plugging in ethernet.
13:07carllercheAre there any guarantees regarding the key order when iterating a map?
13:07TimMcgfredericks: But it keeps getting more shiny! At least they are working on that.
13:07TimMccarllerche: No.
13:07gfredericksTimMc: I'm strongly considering giving up on that upgrade and installing debian
13:08gfrederickscarllerche: I think only that (keys) returns the same order as (vals)
13:08nickmbaileycarllerche: you can use a sorted map
13:09gfredericksTimMc: if "shiny" means "GUI I don't like" and "perpetually buggy" then I can do without it
13:09technomancygfredericks: I tried that a few months ago. Found the polish to be lacking, but I feel like I have a lot more in common with the target Debian user.
13:10gfrederickstechnomancy: so you're content with debian?
13:10cemericktechnomancy: is lein an application or a library for authors of plugins?
13:11technomancygfredericks: no, I ended up going back. the attitude towards non-free drivers required for basic functionality pissed me off, plus there were a few bugs with the USB auto-mounting stuff.
13:11technomancycemerick: good question. I don't have a great answer right now, but 2.0 will definitely address that.
13:12technomancycemerick: I briefly considered retroactively explicitly defining a public API, but I think for 1.x that's a lost cause.
13:12cemericktechnomancy: Yeah, I know. :-) That was a weak rhetorical challenge to the notion of library management being different for apps than libraries.
13:13raekcarllerche: only that (keys m) and (vals m) will traverse the etries in the same order
13:13technomancycemerick: I was hoping not to get called out on that since I realized it was a bit sloppy =)
13:15technomancyseancorfield: do the java.jdbc tests require a local mysql server?
13:16RaynesI hate new releases.
13:16gfredericksRaynes: only old releases from now on!
13:16RaynesIt's never about updating your own projects. It's about updating everyone elses!
13:16RaynesYou're all lazy, you know. All of you.
13:16RaynesShould be ashamed.
13:18chouserI think I'm still unwilling to accept that making code public means I'm promising to maintain it forever.
13:18chouserMaybe that's naive of me.
13:18technomancychouser: that's what 0.x.0 releases are for! =)
13:19chouserI thought maybe having *no* release, and just code on github would be sufficiently standoffish. But no, I've gotten dinged for that too, with "difficulty to install" and "poor docs" added to the out-of-dateness complaint.
13:20technomancychouser: that's usually just a sign that your code is compelling enough that people are willing to put up with more crap to use it. =)
13:21chouserheh. I guess that's the silver lining.
13:21technomancymaybe if you start threatening to hand out commit rights that would put a damper on things.
13:22chouserha!
13:22technomancyit's worked all right for me on swank
13:22technomancythis is about finger tree, right?
13:22chousertechnomancy: ah, but not lein, now has it. I bet you have a queue full of well-meant patches demanding your attention there...
13:23chousertechnomancy: oh, I think finger trees are ok. No, data.xml needs love but I'm just too worried about my conj talk to give it any time.
13:23technomancychouser: related observation: the less polished the overall experience, the more likely people are to think they can help.
13:24technomancyif you come across as having it all together, it's more inviting for users but sometimes a bit less for contributors
13:24RaynesYou're worried about your talk? Seriously? You could walk up to the microphone and fart and people would applaud. I'm the one who has to worry.
13:24technomancy(probably not consciously)
13:25chouserRaynes: goodness, that sounds harder than anything I'm considering.
13:25gfredericks"Audible Finger Trees"
13:25babilentechnomancy: Hmm, btw. Do you have an ETA for the 2.0 release? (Just want to plan accordingly)
13:26technomancybabilen: if it's usable (not released) in 6 months I will be surprised.
13:26technomancyI do plan on at least one more 1.x release in the next 2 months or so, but that will be pretty minor.
13:26babilentechnomancy: Wonderful
13:27technomancybabilen: of course I keep thinking "this will be the last 1.x" release and keep being wrong, so be aware of that. =)
13:29Raynescake should be the Chrome to your 2010 firefox and start releasing things every 3 days.
13:30babilentechnomancy: That is all fine, but I have this feeling that the 2.0 release will take a bit more packaging time than all the 1.x ones. Just want to plan accordingly so the version in the repos does not lag behind.
13:37ziltiWhat are the big new things planned for 2.0?
13:40Rayneszilti: I expect that 2.0 will park your car for you.
13:41technomancyzilti: there's a thread on it here: http://groups.google.com/group/leiningen/browse_thread/thread/1223cd092b83f007
13:41technomancyzilti: the big things are switching the underlying mvn infrastructure and moving towards running more code in a single process
13:41technomancyas well as a better split between internals and public API
13:42ziltiThanks. Well, parking my car is a nice gimmick, but I don't have one. Damn. Now I have to buy one. ;)
13:45cemerickchouser, Raynes: we have to talk at the Conj? I thought I was entering a raffle.
13:45RaynesYou should have seen the look on my face when I was told otherwise.
13:46ibdknoxI entered the raffle ;)
13:47ghiuwhy doesn't the quote work? (let [] (-> 3 (+ 2))) => (let [x '(+ 2)] (-> 3 x))
13:47gfrederickswow
13:47gfredericksthat's creative
13:47gfredericks(-> 3 x) will immediately "expand" to (x 3)
13:47cemerickibdknox: the only contest where entrants aren't sure whether they want to win or not :-P
13:48fliebelcemerick: re partial et all: Yuk, nested calls *will* be ugly, right?
13:48cemerickfliebel: Don't think so. Where?
13:48ibdknoxcemerick, haha it's true.. damn those double-edged swords
13:49ghiugfredericks: because it's a macro, right?
13:49fliebelcemerick: What you said in point one.
13:50raekghiu: (let [x '(+ 2)] (-> 3 x)) = (let [x '(+ 2)] (-> 3 (x))) = (let [x '(+ 2)] (x 3)) = ('(+ 2) 3)
13:50cemerickfliebel: Right, they're a problem, if you don't put each fn definition within a closure that provides references to all of the original functions.
13:50raekghiu: '(+ 2) is a list, and you can't call a list as a function
13:50cemerick(which I'm doing at the moment in clutch)
13:51Raynescemerick: I read that as 'church'. I was about to ask you if you were imbuing your code with the holy spirit.
13:51fliebelcemerick: What if you take it a step further and *gulp* walk the AST to replace all calls with the partial one?
13:51chouserIt doesn't help that I'm pretty sure that, of all the people dabbling with ClojureScript, I've done only the least interesting things.
13:52cemerickfliebel: That's what I foolishly started doing. It's not fun. :-)
13:52hiredmanyou want letmacro
13:52fliebelIt's kinda like doto.
13:52hiredmanwell, no
13:53hiredmanfliebel: that won't work
13:53srid,(clojure.java.shell/sh "ls -l")
13:53ziltiCan someone help me? I don't know what's wrong with this: https://gist.github.com/1293255
13:53clojurebot#<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.lang.ClassNotFoundException: clojure.java.shell>
13:53sridfails. not sure why.
13:53hiredmanfliebel: I assume you are talking about cemerick's blog post?
13:53srid,(slurp (.getInputStream (.exec (Runtime/getRuntime) "ls -l"))) ;; this works
13:53clojurebot#<AccessControlException java.security.AccessControlException: access denied (java.io.FilePermission <<ALL FILES>> execute)>
13:53cemerickRaynes: he lays me down in green threads, he replicates my databases.
13:53fliebelhiredman: yes
13:53RaynesAmen.
13:53sridclojure.java.shell/sh uses Runtime.exec as per documentation, but it is behaving differently
13:54hiredmanfliebel: walking the ast will get you lexical changes, just like if you lexically shadowed the names, but won't work dynamically
13:54cemerickRaynes: We're all going to hell. ;-)
13:54hiredman(with-whatever (foo))
13:54raeksrid: have you tried this? (sh "ls" "-l")
13:54hiredmanat this point you may as well use the state or reader monad
13:55hiredman:/
13:55sridraek: oh? I thought the arguments (after "sh") must be one of :in, :out, :dir or :env - http://richhickey.github.com/clojure/clojure.java.shell-api.html
13:55Rayneshttp://clojure.github.com/clojure/clojure.java.shell-api.html
13:56RaynesI'm not entirely certain how, but it might be useful to make clojurebot throw down a snarky but helpful remark when people link to richhickey.github.com/clojure
13:57RaynesOr perhaps just a helpful one.
13:57fliebel&(letfn [(foo [conf bar] (println conf bar)) (bar [conf baz] (println conf baz))] (doto {:aap "noot"} (foo 1) (bar 2)))
13:57lazybot⇒ {:aap noot} 1 {:aap noot} 2 {:aap "noot"}
13:58sridraek: i have my wrapper that then calls `(sh cmd args :return-map true) :out))` but this is incorrect as `args` is a list of arguments. how would I fix this? (previously I did not have to pass 'args' at all, and it worked)
13:58srid(the wrapper accepts both cmd and args as parameter -- [cmd & args]
13:59seancorfieldtechnomancy: no, the java.jdbc tests don't require a local mysql server - unless you add :mysql to the list of DBs to test in test_jdbc.clj
14:00gfredericksI don't imagine there's an easy way to do a 'lein checkouts'-equivalent setup with this maven project that depends on a lein project is there?
14:00fliebelhiredman, cemerick: Works, right? ^^
14:01cemerickfliebel: sure, but…so?
14:01technomancyseancorfield: cool; thanks
14:02technomancyseancorfield: in general, the tests against the in-process DBs are sufficient?
14:02fliebelcemerick: Hm, dunno. Not flexible enough I guess, but you can apply a couple of db fns that way with the conf only in one place.
14:03seancorfieldi run tests against mysql locally when i'm working on it
14:03cemerickfliebel: Right; the same applies to any API that takes "configuration" as a first arg (including clutch 0.3.0 at the moment)
14:03seancorfieldbut the build server does not (yet) have a mysql instance handy
14:03cemericke.g. (doto "localhost" (put-document …) (put-document …) (get-view …)), etc
14:04seancorfieldeventually i expect it to have more tests against more DBs but it all depends on Clojure/core time to set stuff up around build.clojure.org
14:04cemerickdoto is just a macro though — certainly not equivalent to dynamic scope
14:04hiredmanright
14:04sridraek: my solution: ((apply sh (flatten [cmd args :return-map true])) :out))
14:04hiredmanand that is almost exactly the reader monad
14:04sridi had to read sh's source to find out how args are being parsed
14:05cemerickBeing a proper dullard, I've never internalized the use of monad names as identifiers of common patterns.
14:06fliebelOkay, you win. Still don't like the fn macro though.
14:06hiredmanno problem, I am just pointing out where this is heading, in case some wants to make a u-turn
14:06cemerickfliebel: sorry, wasn't trying to 'win' :-)
14:07technomancyseancorfield: have you seen http://travis-ci.org?
14:07fliebelcemerick: Haha, I didn't mean it like that. More like, I don't know anything better.
14:09fliebelI'd love to have a perfect solution though.
14:10hiredmanthe reader monad is the state monad without the ability to write new state, so e.g. you have configuration values that you read and those values get passed everywhere
14:14gfredericksfliebel: macros writing macros?
14:15fliebelgfredericks: Even worse.
14:15fliebelWhat if you wrapped the binding in a trampoline, and converted the whole shebang to CPS, then you could drop out of the binding for inter-api calls.
14:15fliebel... maybe
14:15hiredman
14:16ghiuguys, i need to do this: (-> mylist (function1 a b) (function2 c d) (function3 e f).. ), but i need to generate dynamically how many functions and their values. what's the way to go?
14:16cemerickhelluva can of worms I've opened up :-P
14:16gfredericksghiu: do it without a macro
14:16ghiuhmmm
14:17gfredericksghiu: use reduce or something like that
14:17ghiuok, i'll try
14:17ghiui've never used macros :$
14:17seancorfieldtechnomancy: i had not seen travis... looks very ruby focused?
14:17ghiu(i'm on my first week of clojure :P)
14:17gfredericksghiu: -> is a macro
14:17technomancyseancorfield: it's primarily ruby, but it has clojure support.
14:18ghiui know what macros are, just i've never written any in clojure
14:18technomancynot sure if it'd be appropriate for jdbc, just thought it was interesting
14:18seancorfieldtechnomancy: and lots of DB support?
14:18gfredericksghiu: if you have a list of [f args] pairs, you could do (reduce (fn [v [f args]] (apply f v args)) init-val farg-list)
14:18technomancyseancorfield: I think so
14:18seancorfieldi'll put it on my todo list then :)
14:19fliebelcemerick: Meh, how many inter-api call do you really use. I think it's fine in practice.
14:20ziltiWhat's the eager "equivalent" to map?
14:20gfredericksdoseq
14:20gfrederickssorta
14:20Raynes&(doc doall)
14:20lazybot⇒ "([coll] [n coll]); When lazy sequences are produced via functions that have side effects, any effects other than those needed to produce the first element in the seq do not occur until the seq is consumed. doall can be used to force any effects. Walks through the ... https://gist.github.com/1293343
14:20cemerickfliebel: some alternatives have been suggested in the blog comments and elsewhere. We'll see what percolates up. :-)
14:21technomancyseancorfield: are you planning another 0.1.x release before 0.2.0?
14:21ghiugfredericks: i'm trying with reduce then
14:21ghiugfredericks: thanks
14:21gfredericksghiu: yep
14:21seancorfieldtechnomancy: probably several
14:21technomancycool
14:22seancorfieldthe 0.1.0 -> 0.2.0 path will be evolving the new API that Clojure/core seem to want
14:22seancorfield(don't take that the wrong way: i asked about the path to 1.0.0 releases and they gave some great feedback)
14:23seancorfieldso consider 0.1.0 the first full stable release of a pure replacement for c.c.sql :)
14:23technomancymakes sense
14:25fliebelcemerick: Oh, right, I like the generated namespace.
14:26cemerickgfredericks has another idea that's much simpler than all the rest, though I've not considered it entirely. He has yet to comment, tho. :-)
14:27gfredericksI guess I gotta put it in a gist...no pretty code in the comments, right?
14:28technomancyseancorfield: have you considered providing a default mapping for :subprotocol -> :classname?
14:28technomancyhaving to specify both seems like unnecessary boilerplate
14:29seancorfieldi had not considered that and i agree it sounds like a good idea - JIRA ticket pls!
14:29technomancywill do
14:37gfrederickscemerick: okay done
14:40cemerickgfredericks: the (not (identical? …)) bit was a nice touch. Will think about it, thanks.
14:50technomancyseancorfield: JDBC-22 is about inferring :classname and JDBC-21 is about accepting a string arg for the connection parameter. OK to make the latter depend upon the former?
14:50seancorfieldsure
14:51seancorfieldthx for the tix!
14:51technomancyk, patch is in for 22
14:51technomancyno problem
14:58zakwilsonUnsupportedDataTypeException with Apache Commons Mail is a really nasty little problem. It sure would be nice if there was a good way to send email that never ran in to this.
15:00ziltizakwilson: JavaMail?
15:00zakwilsonI can't remember why I rejected that, but I think it was a good reason.
15:01ziltiI remember it being dead-easy to use
15:01ziltiWhat's the difference between next and rest?
15:02gfrederickscemerick: yeah, that was the new thought
15:02raekzilti: (next x) is like (seq (rest x))
15:02seancorfieldtechnomancy: patch for 22 applied and pushed
15:02raekzilti: seq is guaranteed to return nil if the sequence is empty
15:02jcromartie,(doc rest)
15:02ziltiok thanks
15:02technomancygroovay
15:02clojurebot"([coll]); Returns a possibly empty seq of the items after the first. Calls seq on its argument."
15:09ejacksonis there a way to get the output of (macroexpand-1 ...) into a test ? Any ideas of which libraries I should go trawl to find an example ?
15:09hiredman,(macroexpand-1 '(binding [x y] 1))
15:10clojurebot(clojure.core/let [] (clojure.core/push-thread-bindings (clojure.core/hash-map (var x) y)) (try 1 (finally (clojure.core/pop-thread-bindings))))
15:10ejacksonhiredman: yes, but in an (is ...) block it doesn't expmand.
15:11gfredericksejackson: (let [form (expand ...)] (is (= form ...)))
15:11ejacksongfredericks: nice idea, lemme try that.
15:11gfredericksejackson: is is a macro that can muddle things up, so as long as you do all your macro-ey things outside it should be okay
15:11ejacksoni already tried passing it through a function in a similar vein
15:12gfredericksejackson: ultimately any test should be reducible to (let [boolean (...)] (is boolean))
15:12gfredericksexcept for error reporting I guess
15:12ejacksonk
15:14ejacksonno dice
15:14ejackson (let [f (macroexpand-1 '(rel/chain :author))]
15:14ejackson (is (= f :x)))
15:14ejacksonresults inFAIL in (test-defrelation) (relation.clj:17)
15:14ejacksonexpected: (= f :x)
15:14ejackson actual: (not (= (rel/chain :author) :x))
15:15gfredericksthat weird.
15:15ejacksonrel/chain should expand to something like (clojure.core/-> (clojureql.core/table relation.database/db :authors))
15:16hiredmanis rel/chain really a macro?
15:16hiredman,(macroexpand-1 '(x y))
15:16clojurebot(x y)
15:16ejacksonhiredman: yup
15:16ejackson(defmacro chain
15:16ejackson "This constructs a chain from keywords representing relations. EG
15:16ejackson(chain :author :post :comment)"
15:16ejackson [base & rest]
15:16ejackson `(-> (cql/table db/db ~(rel-to-table base))
15:16ejackson ~@(map make-ns-qualified (partition 2 1 (cons base rest)))))
15:17hiredmanplease don't paste multiline chunks of text
15:17ejacksonhiredman: yeah, I'm sorry.
15:17ejacksoni'm trying to get you guys a github link to that
15:18ejacksonhttps://github.com/ejackson/relation/blob/master/src/relation/relation.clj#L145
15:20ejacksonthe failing test in question is at https://github.com/ejackson/relation/blob/master/test/relation/test/relation.clj#L15
15:23ejacksonthe comparison is generated by expanding the macro in the test namespace, so I think its an interaction with the (is macro in clojure.test.
15:28gfredericksoh wait
15:28gfredericksdeftest is a macro too
15:28gfrederickstry outside that?
15:29gfredericksI believe I remember having to do that once
15:29ejacksonok.
15:29ejacksonfound something odd, as it does work with -> Perhaps namespaces or something.
15:30ejacksonhttps://gist.github.com/1293529 expands correctly
15:33ejacksongfredericks: yes, pulling the macroexpand into a (def ...) outside the deftest does work.
15:33ejacksonthank you.
15:34gfredericksejackson: np; you could even avoid the def with (let [f (macroexpand-1 ...)] (deftest ...))
15:34ejacksongfredericks: yes, that's even better.
15:35ejacksonI'll try chase down the namespace idea
15:36jweisscan someone point me in the right direction for clojure1.3 upgrade? looks like c.c.prxml is not being maintained - doesn't look difficult to fix, is there doc on how i get it into the modular contrib? (or is there a replacement for prxml i don't know about)
15:38amalloyjweiss: data.xml
15:38amalloyno official release as chouser is busy and i am maven-clueless, but it works and a number of people have put private forks on clojars
15:40ejacksongfredericks: hm. its to do with require. check out https://gist.github.com/1293529
15:42gfredericksejackson: it sounds like the symbols get resolved in a different namespace for some reason
15:42gfredericksno clue why that would happen, but can't think of anything more plausible
15:45ejacksongfredericks: ha, solved (not by me !)
15:45gfredericksyes?
15:45ejacksonns uses an alias for the namespace in requrie
15:45ejacksonand deftest and is are macros
15:46ejacksonso if I use syntax unquote, as in (is (= (macroexpand-1 `(rel/min-macro 1)) {:a 1})) then it expands the whole thing
15:46gfredericksejackson: that's what I would expect. I still don't know why that would be required though. Normally you don't have to worry about this when using somebody else's macro
15:47ejacksonits because rel is an alias
15:47ejacksonso it doesn't expand properly (or so I'm told)
15:47gfredericksi.e., IF indeed the symbols are resolved in another namespace, then backquoting would certainly circumvent the problem. But I still don't know why they would be resolved in another namespace
15:48gfredericksejackson: could you reproduce the behavior using your own macro instead of deftest/is?
15:48ejacksonlemme try.
15:49gfredericksejackson: try a simple macro like (defmacro rev-form [form] (reverse form))
16:09ejacksongfredericks: see the difference in how they expand: https://gist.github.com/1293529
16:13ejacksonso somewhere along the line ' gives up and gives you just the symbol, whereas ` carries on expanding.
16:14ejacksonanyway, I'm shattered, catch you all tomorrow.
16:16gfredericksoh well. even a mystery.
16:16gfrederickss/even/ever
16:20ziltiNow that's weird:
16:20zilti,(some true? '((= 5 5) false false))
16:20clojurebotnil
16:20zilti,(some true? [(= 5 5) false false])
16:20clojurebottrue
16:20hiredmanwhat is weird?
16:20gfrederickszilti: ##(true? '(= 5 5))
16:20lazybot⇒ false
16:20gfredericksvs ##(true? (= 5 5))
16:20lazybot⇒ true
16:21zilti,(some true? ((= 5 5) false false)) ;doesn't work
16:21clojurebot#<ClassCastException java.lang.ClassCastException: java.lang.Boolean cannot be cast to clojure.lang.IFn>
16:21hiredmanof course not
16:21gfrederickszilti: I think what you're trying to do is ##(some true? (list (= 5 5) false false))
16:21lazybot⇒ true
16:21ziltiyeah. Always thought '( is short for (list
16:21gfrederickszilti: when you quote the list, everything inside gets quoted too
16:22gfrederickszilti: not at all :)
16:22ziltiSeems like ^^
16:22gfredericks'(foo bar) is short for (quote (foo bar))
16:22ziltiHow to unquote btw?
16:22ziltiinside a '(
16:22hiredmanstop quoting stuff
16:22Bronsalol
16:22ziltilol
16:23gfrederickszilti: yeah, if you want a list literal then a vector is almost always a worthy substitute
16:23gfredericks,(some true? [(= 5 5) false false])
16:23clojurebottrue
16:24ziltiAnd it is easier to read.
16:24llasram,(some true? `(~(= 5 5) false false))
16:24clojurebottrue
16:24gfrederickssee you don't want to be messing with tildes
16:25ziltiexcept in defmacro I guess
16:25llasramYeah, I agree vectors capture most of the non-mcaro uses for syntax-quote. Just being completionist :-)
16:27ziltiIs it somehow possible to see the shortest public solution to a 4clojure problem? Codegolf shows me my score and a chart but no way to see other solutions
16:29robermannafaik you can see the solutions of "followed" people
16:29ziltiYes, but only those?
16:29robermannyes
16:29robermanni suggest to you darren's solution
16:29robermannsolutions
16:31robermannoften they are very short, although not among the more readble imho
16:32ziltiI've just seen at the tictactoe problem that they also aren't among the "universal solutions" but only solve the exact tests.
16:34robermannyes, it can happen :)
16:36amalloyzilti: are you talking about one of darren's solutions? i don't think he has any intentionally-incomplete solutions
16:38ziltiamalloy: Yes, about his solution to problem 73
16:39ziltiMaybe I just can't read it
16:39amalloyzilti: apparently. he solves every possible configuration
16:54robermann_anyone here using Midje?
16:54jweissamalloy: do you know if clojure.data.xml supports emitting CDATA?
16:54amalloyjweiss: i don't think it does
16:55jweissah nuts
16:55amalloyactually though, i think it may wrap everything in cdata where necessary?
16:56jweissamalloy: i'm giving it prxml-like input and wrapping with sexp-as-element - how should i tell it it's cdata?
16:56jweissi could use a different input i guess
16:56jweissi'll try just removing the cdata tag
16:57amalloyjweiss: unless you're trying to hide one xml document inside another as "just some characters, nothing to see here" you should be marking elements as if they were cdata
16:58jweissamalloy: i'm just trying to put a stacktrace in a junit-style xml doc
16:58jweissall the other junit-style xml out i've seen uses cdata for that
16:58amalloygod, junit has xml stacktraces? i guess i'm glad i never got that deep
16:59jweissamalloy: no, it's not xml formatted
16:59jweissjust the text
16:59jweissbut it's inside a <failure > </failure> tag
16:59amalloyjweiss: you shouldn't need to mark it as cdata unless it has stuff inside it which could be interpreted as xml. and my understanding is that data.xml will escape it in that case
17:00jweissamalloy: if you don't mark it as cdata it loses all the whitespace formatting, doesn't it?
17:01jweissxml is normally rendered with some kind space-normalizing function, unless you use cdata
17:02jweissi don't think i have a choice here anyway, because stacktrace messages could have & or < in them
17:03amalloyjweiss: (a) reference for claim re cdata/whitespace interaction? all i can find says that cdata just prevvents interpretation of & and <
17:03amalloy(b) like i said, i *believe* data.xml escapes those for you if necessary; have you tried and found that it doesn't?
17:04jweissamalloy: i could be wrong about the whitespace thing. my example doesn't have those characters in it, let me try
17:05jweissamalloy: it does escape them using &lt; etc
17:05jweissstill, i still maintain the proper thing to do here is not to have the xml parser parsing these stacktraces, which is what cdata is for
17:06amalloy*nod* that's probably best, although doesn't seem very high-importance to me
17:08jweissamalloy: yeah, i would guess many people who want to parse/emit xml don't need it
17:08amalloyjweiss: if a feature/todo list existed, cdata would be high on it
17:12ziltiI get a "java.lang.ClassNotFoundException: clojure.string" in my REPL when trying to use clojure.string/split, why that?
17:13gfredericksanybody here on ubuntu 11.10 and knows how to alt-tab between same-app windows?
17:13gfrederickszilti: maybe you have to require it?
17:13amalloyzilti: (require 'clojure.string)
17:18ziltiamalloy: I tried that. Gives me a "classnotfound" as well
17:18amalloyyou forgot the ' probably
17:19ziltiamalloy: No, I didn't
17:19ziltiOh wait, no, require gives me nil
17:21ziltiWell ok it works now. No way to directly access something in another namespace without "require"?
17:22amalloyyou can't run code what ain't been loaded
17:23joegallothe way i think of it is that require says "load this file and make it available in memory as a namespace"
17:23joegalloso, no, you can't reference a namespace without at least requiring it, because there wouldn't be anything to reference
17:26ziltijoegallo: Still too much java/scala in my head :)
17:27joegallono worries, it takes a while to get the pieces to fit such that it seems natural
17:41patchworkhey all, trying to use this geocoding library with lein: http://clojars.org/geocoder-clj
17:41patchworkworks fine normally, except when I run lein tasks with it?
17:41patchworkI get this: "Exception in thread "main" java.lang.IllegalArgumentException: Unable to resolve classname: :dynamic (maxmind.clj:34)"
17:42patchworkIt is defining the variable fine it seems (since it works normally)
17:42patchwork(def ^:dynamic *service*
17:42technomancypatchwork: looks like it's meant for clojure 1.3
17:42patchworkbut this fails when required inside a lein task?
17:42patchworkYeah, I am using 1.3
17:42patchwork :dependencies [[org.clojure/clojure "1.3.0"]
17:42technomancylein uses 1.2
17:43technomancyfor its own process
17:43patchworkOh
17:43patchwork: (
17:43patchworkSo how do I use this from inside lein then?
17:43patchworkare you saying there is no way?
17:43technomancyyou would have to port the library to 1.2
17:43patchworkAny path to using lein with 1.3?
17:44patchworkthe rest of my app uses 1.3 successfully, it is great
17:44technomancyit's a pretty long-term goal; there are a lot of other changes going into leiningen 2.0
17:44patchworkcrazy
17:44technomancyand we can't upgrade to clojure 1.3 in leiningen 1.x since it would break compatibility with nearly every plugin
17:45patchworkHmm, I had a little pain converting but it was not such a big deal overall
17:45patchworkI'm using all kinds of libraries too
17:45patchworkthis is… unfortunate
17:46technomancyyeah, but breaking plugins in a 1.x release would be really bad form
17:46patchworkwhat plugins would be broken?
17:46technomancyat the very least, anything that uses contrib and binding
17:46technomancywhich probably covers a good 50%
17:47technomancyit would probably be easy to add 1.2 support to this geocoder though
17:47patchworkI thought the idea was that we would be purging libraries that aren't actively maintaining
17:47patchworktechnomancy: it is a small project, what would backporting entail?
17:49patchworkThe thing is, then I would have a 1.3 version I'm using in my app, and a 1.2 version I use in lein?
17:49technomancyI think purging unmaintained libs was just for old monolithic contrib
17:49technomancypatchwork: I don't think there are very many situations that would call for a split like that.
17:49technomancyusually it's just a matter of using backwards-compatible syntax
17:49technomancy^{:dynamic true} instead of ^:dynamic
17:49technomancyetc
17:50technomancyand of course ensuring monolithic contrib isn't used
17:51patchworkI have the repo linked in my checkouts dir (to make some edits), but it doesn't seem to be using that one for lein tasks
17:51patchworkis that right?
17:51technomancyyeah, leiningen's own classpath cannot use checkouts
17:51patchworkI tried to correct the issue but it keeps repeating the same error on the same line number (even though the line numbers have changed)
17:51technomancysince it has to be calculated from the bin/lein shell script
17:51patchworkAha
17:52technomancyannoying but unavoidable
18:18amalloyman, every time i try to use (symbol ns name), i'm astonished to find that neither of the args can be symbols
18:27llasramHuh. That is pretty weird.
18:33srid,(sort #(compare (:foo %) (:foo %2)) [{:foo 3} {:foo 2}]) ;; is there a better way to write this?
18:33clojurebot({:foo 2} {:foo 3})
18:33brehaut,(sort-by :foo [{:foo 3} {:foo 2}])
18:33clojurebot({:foo 2} {:foo 3})
18:33sridhah, nice
18:33jamparthaving trouble with ns syntax (:use & :exclude, in particular) but can't seem to find a language spec for clojure. Anyone know where it lives?
18:35brehautjampart: (doc use)
18:37technomancyclojurebot: ns?
18:37clojurebotns is unfortunately more complicated than it needs to be, but http://blog.8thlight.com/articles/2010/12/6/clojure-libs-and-namespaces-require-use-import-and-ns may be helpful.
18:38technomancyjampart: that URL has a pretty good tutorial behind it. the docs are pretty poor in that regard.
18:39jamparttechnomancy: thanks, I'll peruse it later.
18:47patchworkwhenever I try to run cake (osx 10.6.7, java 1.6, ruby 1.9.2), I get this error:
18:47patchwork [cake] connection to jvm is taking a long time...
18:48patchwork [cake] you can use ^C to abort and use 'cake kill' or 'cake kill -9' to force the jvm to restart
18:48patchworkBut no jvm is running?
18:48patchworkis there further setup I need to do?
18:48amalloyninjudd: ^
18:52ninjuddpatchwork: i'm in the middle of something right now, but i can help you in a bit. or you may want to ask in #flatland and see if anyone else can help you right now
18:53patchworkninjudd: okay, thanks
19:09technomancyit's cute how jira thinks I need to be reminded via email that I posted a comment.
19:09technomancywait, did I say cute. that's not what I meant.
19:10hiredman:)
19:16technomancyseancorfield: I snuck in a little bonus that lets you specify on the CLI which DBs you want to test against: TEST_DBS=mysql,postgres mvn test
19:16seancorfieldnice!
19:17technomancyplus readme instructions because I ALWAYS screw up "sudo -u postgres createdb" etc.
19:18technomancyI suspect half the reason nosql is so popular is just that the out-of-the-box dev experience for mysql and postgres is pretty crappy.
19:18seancorfieldmysql's experience is good IMO but i agree on postgresql
19:19amalloyyeah, with no db experience at all i didn't find mysql that intimidating, but pgsql is so far inscrutable
19:20brehautive never successfully set up postgres without becoming filled with rage first
19:20brehautbut mysql is simple
19:21S11001001sqlite is simpler, use that
19:21brehautS11001001: it still has SQL though
19:22technomancyyeah, when I was doing ruby I always chose sqlite for that reason
19:22technomancyno setup nonsense; once it's installed you're good to go
19:24patchworkI love postgres
19:24patchworkafter mysql it is a dream
19:25brehautpatchwork: you can love postgres and hate its setup process
19:25patchworkbuilt in recursive queries? table inheritance? awesome
19:25technomancybrehaut: exactly =)
19:25patchworkbrehaut: True
19:25patchworkthe cost of flexibility I suppose
19:26patchworkthough most flexibility I never use
19:26brehautcareful there, anything that you interact with via SQL is inherently not flexible :P
19:26patchworkha!
19:26brehauti think you mean less inflexible
19:29patchworkwhat does everyone have against sql? I used to dog on it too, until I learned how to use it ; )
19:30S11001001live on the edge, set up a caching system and use it as your database
19:30brehautpatchwork: not a fan of compositon?
19:30S11001001if it gets expired you probably didn't need it anyway
19:30S11001001honestly, if your rows started disappearing occasionally, would you even notice?
19:30patchworkbrehaut: how does sql limit composition? sincerely curious
19:31patchworksubqueries are pretty compositional
19:31brehautpatchwork: the constituent pieces of the query cant be named and reused
19:31patchworkbrehaut: Aha, yes of course
19:31patchworkthat is why I use clojure : )
19:31patchworkI see what you mean now
19:32patchworkbut, you can write sql functions
19:32patchworknot that I do that
19:40duck1123Does anyone know what causes this error when I do a deps after cleaning? https://gist.github.com/1294201
19:41S11001001duck1123: did you do the clean and deps in the same lein command?
19:42duck1123I get it both ways
19:42duck1123A second deps will fix it, it's just annoying
19:43duck1123no lein clean, deps, test, cuke, install for me.
19:43duck1123more realistically, no lein test!
19:47hiredmanduck1123: are you running from a lein checkout?
19:47duck1123Leiningen 1.6.1.1 on Java 1.6.0_26 Java HotSpot(TM) 64-Bit Server VM
19:48hiredmanright, but are you running lein from a git checkout?
19:48hiredman(if you are you may need to fetch deps for lein)
19:48duck1123I had checked out lein, but I don't think I'm using it
19:49duck1123let me try anyway
19:49amalloyhow can i type-hint an expression? instead of (let [^String x (identity "test")] (.length x)) i'd like to be able to do (.length ^String (identity "test")). i think i know why it doesn't work but i don't know the solution
19:51S11001001amalloy: going through walk or syntax-quote?
19:52dnolenamalloy: from what I understand the problem is the expression is getting type-hinted and not the return value.
19:53hiredmanactually I think that should work
19:53amalloydnolen: right, that's my understanding also. i thought there was a way around it but i guess if there isn't i'll survive
19:53dnolenamalloy: there's no way to make the second case work as far as I know. You have to create a local and type-hint that.
19:53amalloyhiredman: doesn't, though. on 1.2.1 at least
19:53sritchie,(clojure-version)
19:53clojurebot"1.3.0-master-SNAPSHOT"
19:54sritchieone quick question, guys -- I'm converting some code to 1.3.0 and noticed this
19:54sritchie,(class (int 10))
19:54clojurebotjava.lang.Long
19:54S11001001amalloy: tried it locally in 1.2.1; works
19:54hiredmanamalloy: works for me
19:54duck1123is there any way to type hint the contents of a ref, or do I need to hint when I use it?
19:54amalloyreally? hm, wonder what i'm doing wrong. thanks, i'll poke it some more
19:54S11001001sritchie: int and lon don
19:54S11001001don't do that anymore; they can only really hint
19:55sritchiegot it; so I have to use (Integer. 10)?
19:55S11001001sritchie: even then, not sure how long it would survive; best to use the primitive coercion at the point of java call
19:55dnolenas far as I know expressions can never be type-hinted. Only vars and locals.
19:56S11001001I've hinted plenty of exprs with success
19:56sritchieS11001001: I guess I'm confused about how to use primitive coercion
19:56S11001001did it on Wednesday in 1.3 to suppress that try with reflection thing
19:56amalloydnolen: (fn [x] (.length ^String (identity x))) seems to not issue any reflection warnings
19:56S11001001sritchie: if you use (int blah) in an arg position for a java method call, it'll try to pick a primitive int method
19:56amalloyand without the hint, it does
19:57S11001001because the inferred type of (int blah) is int
19:57sritchiegot it
19:57nathanmarzthat's pretty confusing
19:57nathanmarzis that a bug with int or is that the expected behavior?
19:57S11001001duck1123: I suggest writing a function to read the ref that is itself hinted with the intended type
19:58S11001001nathanmarz: by design in 1.3
19:58S11001001in combination with the changes so that primitives can cross function boundaries, it eliminates a combinatorial explosion of AFunction methods
19:58duck1123S11001001: That's probably what I'll end up doing. I was trying to eliminate reflection over the weekend and I use that pattern a lot
20:00S11001001one of my favorite things
20:00S11001001,(str (proxy [Object] [] (toString [] nil)))
20:00clojurebotnil
20:00S11001001can't trust anything
20:01dnolenamalloy: huh weird, I could have sworn I've seen cases where it doesn't work, wondering why in your earlier case it didn't work.
20:01amalloydnolen: yeah, i'm about to put together a gist of the broken/working modes
20:03amalloydnolen, hiredman: https://gist.github.com/1294255 shows what i think should be two equivalent formations of a macro, one with reflection and one without
20:04S11001001amalloy: meta doesn't survive syntax quote expansion
20:04S11001001sometimes :)
20:04hiredmanright
20:04dnolenamalloy: yeah you can't type-hint in macros like that.
20:04amalloyah, i think i see what you mean now
20:04hiredmanwell, it's tricky, depends how syntax quote decides to mangle it
20:05amalloybecause syntax-quote constructs new lists, so the hints on lists might not survive
20:05amalloybut a hint on a non-list happens to stick around
20:05S11001001I think it's because of the ~ in the list
20:05S11001001might be constant if no unquote inside the list
20:05amalloythat's vicious
20:06S11001001have done ~(vary-meta for that
20:06hiredmansyntax quote is rather nasty
20:06S11001001clojure.walk also unfortunately blows it all away
20:06dnolen(with-meta … {:tag 'Traversal})
20:06amalloyright
20:07dnolenI never tag any other way in a macro, it's too hard to sort out.
20:07hiredmanwell, 'Traverasl will cause the classname to be resolved in the namespace where the macro is expanded
20:07amalloyhiredman: is anyone interested in your impl of syntax-quote? seems nicer to have it in clojure than in the reader
20:07hiredmanamalloy: not interest has been expressed, but I haven't been pushing it
20:07dnolenhiredman: yes, I meant to write out the full namespace, but don't know what it is in this case.
20:08amalloydnolen: i think his point is `Traversal would work
20:08hiredmanor just Traversal
20:08S11001001or hint the traversal function
20:09amalloyhiredman: interesting. that would result in a tag that's a Class rather than a Symbol; are the two interchangeable in this context?
20:09dnolenhiredman: It seems like I've run into weird cases with using just Traversal.
20:09hiredmaninteresting
20:09hiredmanI certainly thought they were interchangable
20:17cemerickYes, it needs to be a symbol; classes don't work (or, never have for me, at any rate).
20:17hiredmanOh, yes
20:17S11001001or string with fully qualified name
20:17cemerickright
20:17dnolencemerick: classes do work … sometimes
20:17dnolenS11001001: yup
20:18cemerickdnolen: that's strange
20:18cemerick"sometimes" — any idea of the conditions?
20:18amalloyi still seem to be having trouble. as far as i can tell i've succeeded in getting the meta onto the list the macro generates, but i still get this reflection warning: https://gist.github.com/1294255
20:18hiredmanhttps://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Compiler.java#L6874
20:19amalloyat this point it's easier to just go back to hinting a symbol instead, but my understanding of metadata in macros could really use some improvement
20:20S11001001amalloy: can the traversal function not be hinted?
20:21amalloyS11001001: this is code i'm maintaining, not writing from scratch, and tbh i can't even tell where traversal is defined
20:21S11001001hee
20:22amalloythere are no bare :use clauses, and it's not anywhere in this file. i'm baffled as to where it could be defined, really
20:22dnolenhiredman: gotcha, mistaken about using the class then. ah macros ...
20:23S11001001(meta #'traversal) ?
20:23amalloyS11001001: ah. there's a macro in this file defining it
20:23hiredmandnolen: I dunno, no guarantee that is the only path
20:24hiredman:(
20:25amalloythanks for the nudge S11001001. it wouldn't be practical to hint it, as it's autogenerated from a record definition
20:25S11001001you could always (def ^Traversal fancy-shmancy-traversal traversal) :)
20:25amalloyheh
20:27amalloyi could probably change the generate-accessors-from-record macro to accept a map of return-value hints though
20:28nathanmarzso, still confused about this int/long stuff
20:28nathanmarz,(class (Integer/parseInt "1"))
20:28clojurebotjava.lang.Long
20:28S11001001nathanmarz: class is a clojure function, so it has a method that takes primitive long instead of Object
20:28hiredmanno
20:29amalloyno, way wrong. it takes an Object, and ints are boxed into Longs
20:29hiredmanclass is a clojure function, and takes arguments as Objects, so ints have to be boxed, clojure 1.3 boxes ints as Long
20:29nathanmarz,(.getClass (Integer/parseInt "1"))
20:29clojurebotjava.lang.Long
20:29nathanmarzok
20:29hiredman.getClass is a method on an object
20:29nathanmarzso clojure changes all ints to longs, even from java call?
20:30hiredman(Integer/parseInt "1") returns a primitive long
20:30hiredmanin order to call a method on it, it must be boxed
20:30amalloyhiredman: primitive int, which is boxed into a Long, you mean?
20:30hiredmanright
20:30nathanmarzthis is new behavior in 1.3
20:30S11001001,(class (Integer/valueOf "42"))
20:30clojurebotjava.lang.Integer
20:30amalloynathanmarz: yeah
20:30nathanmarzhm
20:31nathanmarzwhat's difference between valueOf and parseInt?
20:31danlarkin,(version)
20:31clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: version in this context, compiling:(NO_SOURCE_PATH:0)>
20:31danlarkin,(clojure-version)
20:31clojurebot"1.3.0-master-SNAPSHOT"
20:31S11001001valueOf returns Integer, parseInt returns int
20:31nathanmarzi see
20:31S11001001(similar for all of those classes)
20:31RaynesGod willing, lazybot will be on 1.3 soon.
20:31nathanmarzi have to say i really disagree with that behavior
20:32danlarkinnathanmarz: get in line
20:37chouserthere's a giant ponderous thread on the google group that led to this behavior
20:38amalloymore than one, right?
20:38danlarkinchouser: why do you always have to be so reasonable
20:39dnolennathanmarz: if you want to get a primitive int / Integer you always can. But from 1.3.0 stand point int / Integer is for interop now.
20:41dnolenchouser: heh, the behavior was decided upon, the thread is simply the ponder bike-shedding.
20:41dnolenponderous
20:42chouserhm, I suppose you're right.
20:42chouserdanlarkin: I can be grouchy and unreasonable. Shall we talk about classpaths?
20:42danlarkinI'm in favor!
20:42hiredman(of all the classes having a path)
21:01jstrateHi, I need to add the \q
21:47kd4joadoes anyone know if the midje test framework works with clojure 1.3? specifically I'm having trouble with the lein-midje plugin
21:48jodarohaven't tried it yet
21:51duck1123kd4joa: get the new version it works now
21:54kd4joathanks. where do I get it from though? I'm just specifying lein-midje "1.0.0" in my dev-dependencies
22:08BruceBGordonnewbiie emacs-starter-kit, what version should I install? the stable version from http://emacs.naquadah.org/, and then apt-get install emacs?
22:13duck1123I'm not sure what the latest lein-midje is, but you want 1.3-alpha4 for midje
22:14kd4joayeah I think I got it. thanks. it looks like it's 1.0.4
22:14kd4joait's working now. thanks!
22:14kd4joayou don't happen to use midje-mode in emacs too, do you?
22:14kd4joaI'm having a problem with that too
22:15duck1123I didn't really like it
22:15kd4joaok thanks. it's nice to be able to run the tests from the emacs buffer with the tests
22:15duck1123I had it working once, but I just wrap everything in a deftest, so it wasn't working very well
22:16duck1123clojure-test-mode still works if you do it that way
22:17kd4joathanks. I'm pretty new to clojure and haven't tried that yet. I like the way midje specifies the tests
22:17amalloykd4joa: i was pretty miffed at midje-mode because it uses keybindings that are supposed to be reserved for personal use
22:18kd4joaI get so baffled by the inconsistencies between use, require, import, :use, :require, :import that I spend so much time just trying to get my environment setup
22:20duck1123there's still too much of an element of style with ns forms. It fits in with Clojure's philosophy, but it also makes my OCD tick when dealing with libs that use their ns form differently
22:20duck1123I'm talking about using () vs []
22:21amalloyduck1123: those aren't always interchangeable, which is the worst part
22:21kd4joaoh yeah. some take a vector, some can take a vector of vectors, some want a list, etc, etc. frankly it's baffling.
22:22amalloyi've finally settled down into a style that is easy to understand, and everyone else's style is terrible :P
22:22duck1123I try to stick to (:usc (clojure.core [incubator :only (-?>)]))
22:22duck1123er, :use
22:23duck1123parens for namespace prefixes, braces for the inner part, and parens for the inner lists
22:24amalloyduck1123: i think vectors for the inner lists are definitely better
22:24duck1123I've yet to see a definitive style guide to say I'm doing it wrong, and it's hard to tell by looking at other code
22:24amalloy(foo bar baz) implies foo is special, and emacs indents accordingly if you need to span lines. [foo bar baz] puts them all on equal footing
22:24duck1123so (clojure.core [incubator :only [-?>]])
22:25duck1123I think I did that at one time, but I saw more people doing ()
22:26amalloyyeah. then there are the folks who don't like prefix lists. i think they're not wrong, but it's sad to have to type stuff more than once
22:27duck1123I go back and forth on them, but lately I've been pro. I also have many namespaces that'll all share a common prefix
22:29duck1123I'm trying to get better about my naked uses, but sometimes it's hard not to
22:29amalloy~guards
22:29clojurebotSEIZE HIM!
22:29amalloymany sins may be forgiven...but naked :use sends you straight to hell
22:30duck1123I've been making it a point to go back through and fix all my ns forms
22:31amalloyduck1123: tried slamhound?
22:31duck1123This is my nastiest ns form by far https://github.com/duck1123/jiksnu/blob/master/src/jiksnu/routes.clj
22:31duck1123I've played with it, but need to get it working right
22:31amalloyyeah, it won't work on this ns form. wouldn't work on mine either, so i don't use it
22:34amalloyanyway rather than look at that code for one more second i'm heading outta here
22:34duck1123aww... it's not that bad is it?
22:34duck1123later
22:34konrif I have two mutually-calling functions such as "(defn a [n] (if (= n 1) 1 (b (dec n)))) (defn b [n] (+ (a n) n))", what can I do to make evaluate? Define their names before their definitions?
22:34amalloyi'll be back with more mock-criticism later
22:34S11001001konr: yes, (declare b) before the defn a
22:35jcromartieduck1123: holy living crap on a stick attacking Tokyo
22:35jcromartiet
22:35jcromartieha
22:35konrS11001001: thanks!
22:35jcromartiethat's one heck of a ns
22:37duck1123I plan on moving some of it out and use my definitialize macro to load the views/filters/triggers later
22:38duck1123It's been hell juggling the namespaces to avoid circular deps