#clojure logs

2011-11-16

00:06klauern$implement-thought-in-brain ?
00:07klauernonce that works, I'll quit the internet and computers
00:12aperiodic&(doall (filter good? aperiodic/thoughts))
00:12lazybotjava.lang.RuntimeException: Unable to resolve symbol: good? in this context
00:12aperiodicdarn
00:13amalloyaperiodic: you forgot (map implement) too
00:13aperiodicoh, right
00:15aperiodicunless my thoughts turn out to be functions that implement themselves without requiring further input
00:15wtfcoderso i have clojure-contrib pull in via lein deps (i see it in /libs) however ('use clojure.contrib.sql) seems to throw class not found error from lein run, is there any thing else i should be doing?
00:19aperiodicwell you want to run (use 'clojure.contrib.sql), not ('use clojure.contrib.sql)
00:20aperiodicyou quote the symbol you want to use to avoid it being evaluated
00:20amalloyunless he's doing it in a ns form...
00:25aperiodici thought you could only use keywords in the ns form
00:25amalloyaperiodic: that *might* be the case, but adding a quote to c.c.sql would only make it worse. my point is we can't suggest a fix without context
00:28aperiodicamalloy: point taken
00:30amalloyfwiw, aperiodic, (ns foo (use clojure.java.io)) works fine - the ns macro just calls ##(doc name) on the grouping thingy
00:30lazybot⇒ "([x]); Returns the name String of a string, symbol or keyword."
00:32wtfcoder No matching field found: getRoot for class clojure.lang.Var, compiling:(sql.clj:29)
00:32wtfcoder at clojure.lang.Compiler$DefExpr.eval(Compiler.java:388)
00:32wtfcoder
00:32aperiodicamalloy: thanks, good to know
00:32wtfcoderthis comes up by just including clojure.contrib.sql via use or require and doing nothing else
00:32wtfcoderhow should i start to debug/troubleshoot this..
00:32amalloywtfcoder: don't use contrib
00:32amalloy(especially not in a clojure-1.3 program)
00:33wtfcoderusing contrib is considering bad practice now? (my study book is halloways first edition ~2yrs old)
00:34amalloyclojurebot: what happened to contrib?
00:34clojurebotTitim gan éirí ort.
00:34amalloyclojurebot: where did contrib go?
00:34clojurebotwell... it's a long story: http://dev.clojure.org/display/design/Where+Did+Clojure.Contrib+Go
00:41devthwhat's a good way to handle date/time in clojure?
00:41devthlooks like several of the previous libs went missing.
00:42Raynesdevth: clj-time
00:43aperiodicwhat's the canonical location of clj-time?
00:43devthRaynes: i saw that recommended a lot but the github page is gone. know of another place to find its docs?
00:43aperiodici was using github/getwoven/clj-time, but i just checked, and it's gone now
00:43RaynesYeah, just noticed that.
00:43RaynesStrange.
00:44Rayneshttps://github.com/seancorfield/clj-time <-- I think.
00:44amalloywow, sean took that over too?
00:44RaynesLooks like it.
00:44RaynesMan is a trooper.
00:44amalloydude is a machine
00:45RaynesBut mostly it's sad that everybody abandons their libraries.
00:45devthRaynes: thanks
00:45amalloyRaynes: don't look at me! just tonight i released an updated version of a library i haven't touched in half a year
00:45Raynesamalloy: Remember clj-config? Yeah, I still maintain that.
00:45wtfcoderhow can I change leiningen to use the jdk at /opt/bin32-jdk/ rather than the system one (sun 64bit) I dont want to change the global JVM that intellij uses for its IDE app etc..
00:47wtfcoderlooks like just exporting JAVA_CMD will work from reading the lein script?
00:48RaynesTry it.
00:48aperiodicbtw, Raynes, I really enjoyed your clojail slides
00:48Raynesaperiodic: :D!
00:48aperiodiclearned a lot even without having the video
00:48wtfcoderjust going to check if other bootstraps such as intellij launcher use this, but i think that uses JAVA_HOME instead
01:27ollimhmm.. why is this not working: (into (sorted-set) (map vec (sequence-of-lazy-sequences))) ? i get a clojure.lang.PersistentVector$ChunkedSeq cannot be cast to java.lang.Comparable exception
01:30amalloy&(sort [(range 2) (range 3)])
01:30lazybotjava.lang.ClassCastException: clojure.lang.LazySeq cannot be cast to java.lang.Comparable
01:41aperiodicollim: it's because vectors aren't comparable. you could work around that, but i think it would involve evaluating all of each lazy sequence, which is probably undesirable
01:42amalloyaperiodic: incorrect, vectors are comparable
01:43amalloybut seqs are not sortable, and his vectors contained seqs, so the vector couldn't compare its elements to the other vector's elements
01:44ollimamalloy: what i was trying to accomplish is in fact to turn the lazy sequences into a collection of vectors
01:44amalloyyou succeeded, but those vectors contained lazy sequences
01:45amalloy&(sort [ [(range 5)] [(range 9)] ] )
01:45lazybotjava.lang.ClassCastException: clojure.lang.LazySeq cannot be cast to java.lang.Comparable
01:46aperiodicamalloy: is the motivation for making vectors but not seqs comparable mainly performance?
01:46amalloy*shrug*
01:56ollimi still don't get it. my example data shows ((0 2) (0 1 2)) turned into ([0 2] [0 1 2]). and then i get the PersistentVector$ChunkedSeq cannot be cast to Comparable exception. I think I am just not properly understanding how the "chunked" plays into this. i think i will convert the code to use vectors all-round and forget entirely about lazy seqs for the time being.
02:00amalloychunked doesn't matter
02:00amalloy(in this context)
02:00amalloy&(into (sorted-set) (map vec (for [n (range 10)] (range n))))
02:00lazybot⇒ #{[] [0] [0 1] [0 1 2] [0 1 2 3] [0 1 2 3 4] [0 1 2 3 4 5] [0 1 2 3 4 5 6] [0 1 2 3 4 5 6 7] [0 1 2 3 4 5 6 7 8]}
02:01amalloyso if your input really were a seq of lazy seqs of "atoms", this would work fine
02:02amalloybut it sounds like you're getting something else you don't expect
02:03ollimamalloy: it seems so. thanks for clarifying.
02:04amalloythough a sorted-set of vectors is something you might be surprised by the sort order of anyway
02:05amalloyeg, ##(sort [[0 1 2] [3] [4 5]])
02:05lazybot⇒ ([3] [4 5] [0 1 2])
02:13ollimyes, what i
02:14ollim.. am in need of is a string-like sort but on integer sequences
02:14ollimthanks again
03:42Blktgood morning everyone
03:43ejacksonGood morning all
03:58dbushenkomorning!
04:53wtfcoderon this snippet http://ideone.com/HVUXk where is the magic happening with param-groups, is this just a redundant local variable?
04:55wtfcodersorry ignore figured it out, duh
05:17frankieboy,(+1 1)
05:17clojurebot#<ClassCastException java.lang.ClassCastException: java.lang.Long cannot be cast to clojure.lang.IFn>
05:17frankieboy,(+ 1 1)
05:17clojurebot2
06:06leo2007"Identities are modeled using one of the three reference types: refs, agents, atoms and vars."
06:06leo2007but he listed 4 types.
06:07leo2007a type?
06:07leo2007typo*
06:07Borkdudelol
06:09raekThere are exactly three (4) reference types in Clojure.
06:10lucianraek: i'm sure it's just a concurrent modification error :)
06:10Borkdudelol
06:10luciantext must've been generated with Java
06:14BahmanHi all!
06:20leo2007OK, I think I read the sentence wrongly.
06:30samaaronmorning, morning
06:35cemericksamaaron: Morning — good move on the nick change :-)
06:39samaaroncemerick: thanks :-)
06:40samaaroncemerick: the previous one had some interesting symmetric properties, but this one is far more transparent ;-)
06:40cemerickhah, so it did, I'd never noticed :-P
06:41cemerickwhen I started using irc again some years ago, I was la_mer for a while. Things got a whole lot simpler when I claimed cemerick.
06:42samaaroncemerick: are you a closet nin fan?
06:42cemericksamaaron: *very* astute!
06:42samaaroncemerick: it's one of the best tracks on that album
06:43samaaroncemerick: apparently it's one of the first tracks he wrote as he moved out of depression after sitting in a studio unproductively for a year
06:45arbschtcemerick: that was you? I never noticed!
06:46samaaronambrosebs: morning/afternoon to you goodly sir
06:46samaaronthat was a fleeting visit...
06:47cemericksamaaron: it's certainly on the better side of that double-album
06:47cemerickthat could have easily been a single CD
06:47samaaroncemerick: when that album was released I listened to it for a couple of months non stop
06:48cemericklikewise
06:48samaaronI haven't listened to it in a long while though - I kind of got bored of him being so angsty
06:48cemerickheh
06:48cemerickangsty since 1994 or whatever :-P
06:48samaaron"cheer up already!"
06:49cemerickarbscht: do you actually remember when I was still la_mer? That was years ago…
06:50arbschtcemerick: as far back as 2007 or something
06:50cemerickthat's about right
06:50cemerickswitched ~mid '08 IIRC
06:51cemerickgot tired of people always saying "who are you again?"
06:51arbschthaha
07:10clgv,(println "cemerick: Who are you again?")
07:10clojurebotcemerick: Who are you again?
07:12cemerickone of the bots should have a way for people to direct messages to people in-channel via privmsg
07:12cemerickThat'd be fun for about 10 minutes :-P
07:30BahmanWhat's the convention for defining constants in Clojure with 'def'? Using '+' like (def +some-const+ 100)?
07:31Bahmandefining = naming
07:31raekBahman: the convention is to not have any extra chars around the name
07:31samaaronBahman: I think the official stance is just to use lower case as normal
07:31raeksince all vars ideally are constants
07:32samaaronHowever, in Overtone we often use CAPS
07:32raekand things that change at runtime should be wrapped in a ref/atom/agent
07:32BahmanI see the point. So no need to add '*' or '+', right?
07:33raek*earmuffs* actually means something else in Clojure (dynamically rebindable var)
07:33raeki.e. vars meant to be rebound with 'binding'
07:33BahmanOh! Alright...then I will simply use (def some-const 100).
07:36cemerickBahman: I've used +const+ before given the scheme convention, but that is pretty unpopular in Clojure-land.
07:37cemerickThat tendency has *almost* been beaten out of me. ;-)
07:37kephalea leading ♥?
07:37frankieboyjay, just discovered the pleasure of auto-complete.el and ac-slime
07:38frankieboyone of the few things I really missed from IntelliJ
07:50leo2007I am using JDK 7 but the javadoc function always open java 6 documentation.
07:50leo2007Ideas?
07:51Arafangion"javadoc function"?
07:51leo2007(javadoc Math) for example.
07:51leo2007I am using java version "1.7.0_147-icedtea"
07:52ArafangionAh, from clojure.contrib.javadoc.
07:52leo2007clojure.java.javadoc
07:58raekleo2007: what does (System/getProperty "java.specification.version") return for you?
08:00leo2007raek: 1.7
08:07dbushenkoguys, do you have autocompletion of java standard library in your emacs?
08:09frankieboyhave just got it to work for clojure/lisp, have not experimented yet with java
08:09dbushenkofrankieboy, how did you manage that?
08:09dbushenkoM-/ ?
08:09dbushenkoetags?
08:09frankieboyused auto-complete and ac-slime.
08:10kzarIs there a shorthand for something like this? (get (get {"example" {"silly" 1}} "example") "silly")
08:11frankieboyYou can get them using the package manager, using the marmelade repository
08:11frankieboyI think you need to use emacs 24
08:12mangekzar: (get-in {"example" {"silly" 1}} ["example" "silly"])
08:12kephale,(get-in {:a {:b 3}} [:a :b])
08:12clojurebot3
08:12ArafangionSomeone needs to make a patch for emacs, such that it eventually becomes emacs 24.7
08:13frankieboydbushenko: watch http://www.youtube.com/watch?v=kH0gOE7rj7g to see how it works
08:13frankieboyI really like it
08:13kzar,(get-in {"example" {"silly" 1}} ["example" "silly"])
08:13clojurebot1
08:13kzarkephale: Cool thanks
08:13dbushenkofrankieboy, thanks!
08:16frankieboydbushenko: read this for something similiar for java: http://www.emacswiki.org/emacs/AutoJavaComplete
08:16frankieboyhaven't played with that yet, have to do some real work now
08:17dbushenkothanks!
08:20cemerickleo2007: `javadoc` directs you to JDK 6 documentation by default; it doesn't check your JDK version.
08:27leo2007cemerick: thanks.
08:36frankieboyIs the video of the Overtone presentation already available?
08:37frankieboyI am doing a presentation next week, and I would like to show sam aaron playing the monome
08:44cemerickfrankieboy: not yet.
08:44cemerickWhen it becomes available, you won't likely miss it. :-)
08:50duck1123frankieboy: you have caused me to get auto-complete working again, and for that, I thank you
08:52leo2007duck1123: auto-complete?
08:53duck1123leo2007: the auto-complete and ac-slime packages for emacs
08:53leo2007thx
08:57frankieboyI really, really love auto-complete. It was the final missing piece to make emacs for Clojure in the same league as IntelliJ for Java
08:59duck1123I had it working a while ago back before it was available in elpa. I lost it when I yanked a bunch of stuff out of my init file. This was the final push I needed to get it set back up
09:00frankieboythe package system, starter-kits, auto-complete and ac-slime, in addition to clojure-jack-in make my init.el really small, sane defaults and immediate productivity
09:02frankieboythe only wish is some kind of link into clojuredocs from the popup, so that I can look at documentation and code examples
09:03frankieboybut that is nitpicking
09:14fliebelWhat do you use for routing? Compojure? Moustache? core.match?
09:16bendlasfliebel: moustache
09:17fliebelI think core.match could be really interesting, has anyone tried that? I've been suing Moustache as well.
09:23duck1123I wrote my own tool for routing
09:26fliebelduck1123: Can I see it?
09:28duck1123I've yet to document how the routing system works, but it takes a sequence of predicates that take a matcher map and match it against the request map and pass the request on to the next checker. If all the checkers match, then the action is invoked
09:28duck1123https://github.com/duck1123/ciste/blob/master/src/ciste/routes.clj
09:29duck1123And here's an example of some of the routes in action https://github.com/duck1123/jiksnu/blob/master/src/jiksnu/routes.clj
09:30duck1123I really need to go back and fix up that namespace. I haven't needed to touch it in a while
09:30fliebelduck1123: So you basically have your own "regex" format?
09:32duck1123fliebel: each "predicate" (still need a better name) can read data from the matcher and use that to determine if the request matches. For HTTP routes, I just use Clout. But I can use this system for any request/response system
09:33fliebelah
09:34fliebelinterlude: How are checkout deps in lein supposed to work? I made a checkouts folder, but dependency resolution doesn;t work.
09:35fliebelIf I add them to the project.clj, lein deps errors, if I don't I don't get the deps of the checkout deps.
09:36duck1123I believe checkouts adds those source folders to the classpath, but you still need to install the artifact for maven's dependency resolution
09:36duck1123a simple lein install in that project once should do it
10:02kzarWhere's the function to take an array map and filter away some of the keys? I'm sure someone showed me in the past but I can't find it
10:04bendlaskzar: are you looking for &(dissoc {:foo "foo" :bar "bar" :moo "moo"} :foo :bar)
10:04cemerickkzar: select-keys
10:04cemerickdissoc will do, too; depends on whether you know which ones to keep vs. which ones to drop
10:05bendlasxctly
10:05kzarcemerick bendlas: cheers
10:05kzardid the trick :)
10:05cemerickdammit! No pint.
10:27ninjuddcemerick: of bacon?
10:28cemerickninjudd: frightening :-)
10:40BahmanHow can I make an executable jar out of lein project?
10:41Fossi,(macroexpand (let [a 1] (let [b 2] 3)
10:41clojurebot#<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: EOF while reading>
10:41Fossi,(macroexpand (let [a 1] (let [b 2] 3)))
10:41clojurebot3
10:41Fossi,(macroexpand '(let [a 1] (let [b 2] 3)))
10:41clojurebot(let* [a 1] (let [b 2] 3))
10:41Fossiwhy doesn't the second let not get expanded?
10:42bendlasbecause macroexpand and macroexpand-all always work on the outermost form
10:42bendlasto do full expansion, you need to walk the source tree
10:43bendlasi think there might be a helper for that somewhere in contrib
10:44fliebelclojure.walk/macroexpand-all
10:44bendlasit's clojure.walk/macroexpand-all
10:44BorkdudeWhat is the best thing to use in emacs for java support?
10:44bendlasyep
10:44BorkdudeI mean compiling etc
10:44Fossithanks i'll try
10:45bendlasBorkdude: (shell-command "eclipse") IMO
10:45klauernBahman: I haven't done it before, but I would think that specifying a :main in your project.clj and then doing `lein uberjar` would be enough to get it working
10:46Bahmanklauern: Thanks.
10:46Borkdude\
10:46fliebelDoes core.match provide access to all bindings? Like a macro has a hidden &env variable.
10:47klauernSee `lein help sample` for an exploded project.clj with mention of how the :main should look
10:47klauernor easier: https://github.com/technomancy/leiningen/blob/stable/sample.project.clj
10:47Fossiis clojure.walk new in 1.3?
10:47klauernhttps://github.com/technomancy/leiningen/blob/stable/sample.project.clj#L95-L100
10:47Bahmanklauern: Excellent...thanks again.
10:48Fossiah, just too dumb to type
10:48klauernlove that GitHub line highlighting thing
10:50dfilimonhi everyone! i'm trying to develop my first larger clojure program and i need to extend JPanel and override its paintComponent method in the process
10:50dfilimoni've made new class with gen-class and overrode the paintComponent method
10:50dfilimonbut i also want to first call the superclass' implementation before i do my own drawing
10:51dfilimonwill simply calling (.paintComponent this) work?
10:54churib,(meta ^test 'x)
10:54clojurebotnil
10:55churib,(meta (with-meta 'x {:key :myval}))
10:55clojurebot{:key :myval}
10:55churibwhy does the former not work?
10:55BahmanWhat are the parameters to '-main'? only [args]?
10:56Chousuke_churib: it puts the metadata on the (quote x) list, not the symbol x
10:57Chousuke_,(meta '^meta x)
10:57clojurebot{:tag meta}
10:57churibChousuke_: aah, thanks!
10:57Chousuke_^ is a read-time thing which is why it works like that.
10:58churibyes, of course. Didn't thought about that...
10:58Chousukeit's not obvious :)
10:58TimMcdfilimon: Do you actually need to call the super's paintComponent?
10:59dfilimoni don't really think i need to, but that's how it seems to be done in every java tutorial
10:59dfilimonanyway, i just tried something that seemed to work
10:59dfilimoni exposed the paintComponent method in the superclass under a different name
10:59dfilimonand then called that
11:00dfilimonbut that really feels like a nasty hack
11:01TimMcdfilimon: proxy-super
11:01dfilimonbut i'm not using proxy at all, i'm using gen-class
11:01TimMcappears to be a way to call a superclass' method from inside a proxy.
11:01TimMcah
11:02fliebelDoes let expose a hidden variable with all the bindings?
11:03TimMcdfilimon: Here's how I made a Swing app -- I just proxied a JComponent as a canvas: https://github.com/timmc/CS4300-hw6/blob/master/src/hw6/core.clj#L25
11:04dfilimonthanks for that!
11:04cemerickfliebel: "hidden variable"?
11:05fliebelcemerick: Yea, like a macro exposes &env
11:05cemerickah; nope
11:05dfilimonTimMc: will that work when resizing?
11:06fliebel... or any other way to get to all the binding of a let
11:06TimMcdfilimon: I don't recall.
11:08klauernBahman: If it follows java, it's probably analagous to "public void main (String[] args), "
11:10TimMcdfilimon: I think that app was not resizable. However, in a different app, I see that I added a (proxy'd) ComponentListener: https://github.com/timmc/CS4300-HW3/blob/master/src/timmcHW3/core.clj#L525
11:12Kototamahi, what's the best solution to have a bidirectional communication between two clojure processes?
11:13dfilimonTimMc: right now, i'm unsure whether to go for gen-classes of my own or try using proxies like you did
11:13lucianKototama: possibly sockets
11:16scgilardifliebel: here's a let variant that exposes bindings (has had approximately zero testing) https://gist.github.com/1370491
11:18Kototamai guess java pipes are more the solution but i was expecting something from clojure here
11:18fliebelscgilardi: yay. Only I don;t feel like patching clojure.match to use that ;)
11:19fliebelI'll just opt for the moustache approach.
11:20clgvfliebel: scgilardi's macro has the disadvantag to show you every binding from &env and not just the ones from the let.
11:22clgvor was that the intention?
11:22fliebelclgv: Hm, I guess it't better to use argv directly.
11:22clgvyou might use destructure from clojure.core
11:25fliebelBasically what I want to do is (match [1 2 3] [a 2 c] (f {:a 1 :c 3})) as a macro, so that you only need to supply the pattern and function.
11:27Kototamaor maybe that: http://clj-me.cgrand.net/2009/11/18/are-pipe-dreams-made-of-promises/
11:28cemericksamaaron: feh, I should have thought about doing the automation in overtone from the start :-P
11:29tsdhtechnomancy: Hi. I'm just trying to convert my documentation generator into a standalone leiningen project, but I have a bootstrap issue.
11:29samaaroncemerick: it would be totally possible, but might be a bit of overkill for such a simple task (firing up a JVM and a SC ServeR)
11:30samaaroncemerick: this might work for you: http://sox.sourceforge.net/
11:30tsdhtechnomancy: The plugin project's deps are clojure and hiccup, but since its sources reside in src/leiningen/gendoc.clj, invoking "lein <whatever>" wants to eval that and errors because hiccup is not there...
11:30cemerickI don't usually write scripts, but when I do, I like to wait for a JVM first.
11:32cemericksamaaron: certainly seems right; don't know how I didn't find that before. :-/ Might do it in overtone anyway, just as an excuse to see the relevant parts of the API.
11:32cemerickthanks in any case :-)
11:33samaaroncemerick: cool - it might also be the case that we need to brush up the wav output parts of Overtone too. It's been a while since I recorded some output.
11:33samaaroncemerick: the documentation is pretty sketchy in this area, so it would be useful use this experiment to beef things up.
11:34samaaroncemerick: I can totally help you work out what's necessary to get it to work if you like.
11:34michael_campbellGoing to be one of those days... can't even spell my name right.
11:34cemericksamaaron: thanks; I've got you on speed dial in case I hit a wall ;-)
11:35samaaroncemerick: the "Overtone bat phone"!
11:35cemerickright on
11:37cemericksamaaron: is there autodoc somewhere?
11:37samaaronwhat's autodoc?
11:37cemericksamaaron: it's what produces e.g. clojure.github.com/clojure/
11:37cemerickhttp://clojure.github.com/clojure/
11:38samaaronah, nice
11:38samaaronno, we don't have that
11:38samaarondoes it use the namespaces, fn names and docstrings to generate the docs?
11:38cemerickright
11:38samaaronwell we're jam full of docstrings
11:40cemericksamaaron: If you're interested, I'll see about adding autodoc to the project.clj; you could add the results to the pages so it appears as a subdir on http://overtone.github.com/
11:40cemericks/pages/pages branch
11:40samaaronsounds perfect
11:41samaaronbtw, do you know if BG lurks around in irc?
11:41cemerickvery occasionally
11:41cemerickG0SUB is his handle.
11:41samaaronnice
11:41samaaronhe had some advice regarding licensing
11:42samaaronOvertone is currently MIT and he was suggesting Eclipse or GPL
11:42cemerickCertainly gives you more latitude for e.g. selling a supported version
11:43fliebel$findfn 1 '(1)
11:43lazybot[clojure.core/xml-seq clojure.core/vector clojure.core/pvalues clojure.core/list]
11:43samaaronyup, that was one of the arguments
11:44cemerickI think you have a wide array of commercialization opportunities, really.
11:53samaaroncemerick: it would be interesting to explore them
12:00zerokarmaleftmmm, the moog minimoog overtone select badass series, just 3k quid
12:01samaaronzerokarmaleft: or you could build your own minimoog within Overtone for free ;-)
12:02zerokarmalefttrue, i think the attraction to moogs is largely to decorate studio apartments
12:03cemericksamaaron: see, you shoulda thrown in an ipad with touchosc preinstalled for £4k ;-)
12:03samaaroncemerick: are you the first customer? ;-)
12:04cemerickI'm just the ideas guy :-P
12:05cemerickI didn't even know what a moog was before ducking it.
12:05samaaronit would be cool to have a dedicated touch display that had an ethernet port and talked OSC
12:05samaaronI imagine trusting wifi at gigs isn't that sensible...
12:05cemerickwhy would it need to be wired?
12:05cemerickdedicated secured wireless?
12:06cemerickhard to jam on a thing trailing an ethernet cable, perhaps *shrug*
12:06samaaroncemerick: exactly and just fewer moving parts to go wrong
12:06gtrakbluetooth?
12:07gtraksamaaron, what order of magnitude of latency are you dealing with right now?
12:07samaarongtrak: from where to where?
12:07cemerickI think an android-based overtone/touchosc "appliance" sold with "premier" auto-updating, smooth documentation and a crazy asset library tucked in would be a killer offering that would see a lot of interest.
12:08gtrakwith the matrix-button-box to sound
12:08gtrakthrough overtone, through supercollider
12:08samaarongtrak: ah, super low - 10s of ms
12:09gtrakwell, the jump from say 5 to 20ms is meaningful, 20 to 60 is just as meaningful i think
12:10samaarongtrak: I measured it a while ago and it was plenty fast. Sadly I forget the numbers though. However, when I play the monome I can't perceive any latency
12:12nickmbailey:q
12:12nickmbaileydoh
12:18kzarI use org.apache.commons.codec.binary for Hex and Base64 but now I need Base16 and I can't see it there. Anyone know of a Base16 library?
12:20luciankzar: it should be easy to implement with java's Integer
12:28hiredman_~ping
12:28clojurebotPONG!
12:42BorkdudeDid I miss anything on Java in emacs while I was disconnected?
12:43nDuffWho's baby is the Clojure/conj survey? It's only allowing one selection each for favorite/good/excellent/poor talks
12:44rabbler:nDuff, I had the same issue.
12:44cemericknDuff: I've emailed them, and thickey tweeted them, but…
12:44samaaronI emailed them too...
12:44samaaron:-)
12:44RaynesYeah, I was just about to whine.
12:45rabblermeaning that I had the same 'concern'. But I already submitted.
12:45RaynesI mean, it isn't fair if I can only select my own talk as my favorite. ;)
12:45samaaronRaynes: you can even select your talk as your favourite AND as excellent!
12:46RaynesHeh
12:46cemerickI wonder if they'll send us our ratings
12:46Raynescemerick: I hope not.
12:46cemerickRaynes: oh, please :-P
12:46cemerickyou killed it
12:46rabblerraynes: your presentation was awesome.
12:47samaaronRaynes: it's super hard to have any idea how your talk is being perceived when you're doing the speaking
12:47RaynesOh I know, but I'd hate for others to feel lesser in the shadow of my greatness.
12:47cemericknice
12:47samaaronhail almighty greatness!
12:47Borkdudehaha
12:48rabblersamaaron: That is why rotten fruit/veg should be brought to cons. Then you know if you are tanking.
12:48samaaron"Turn your phone off - that's rude!"
12:48cemericksamaaron: I know, it's tough to tell how things are going over those standing ovations ;-)
12:48RaynesI *did* feel pretty fantastic after the talk. For example, I seem to recall telling chouser "good luck following that" while putting my laptop away.
12:48BorkdudeI saw Rich programmed on a national exit poll in linux magazine of 2010, so probably I know who the auther of this survey code is? ;-)
12:48samaaronRaynes: haha, you smug mofo
12:49cemerickpoor chouser got jammed up :-D
12:49RaynesI think I had two favorite talks. samaaron was one of them.
12:50samaaronRaynes: you're too kind
12:50cemericksamaaron's is going to be at least one SD above anyone else
12:50RaynesThe other was Spiewak's functional data structure talk.
12:50samaaronyeah, sadly I missed Daniel's talk - I was taking it easy before my own
12:50samaaronI'm looking forward to the video though
12:51RaynesI really enjoyed Stuart Sierra's talk, but they can't all be my favorites.
12:51michael_campbellSpiewak's was as much performance art as a talk. I loved it.
12:52dfilimonguys - question: i want to represent some sort of regular polygon in my code. i would be tempted to make a record or structure it somehow. should i rather leave it a map?
12:53devnRaynes: technomancy ninjudd -- good to hear you guys are going to devote efforts to the same build tool
12:53RaynesBuild tool powers -- UNITE!
12:54devnAlphazord megazord power, NOW!
12:54samaarondfilimon: I tend to start out with a map first - and if it becomes a perf bottle-neck I'll move to a record
12:54dfilimoncan i restructure records like maps?
12:54dfilimon*destructure
12:54devnsamaaron: Unfortunately I didn't get to see your talk -- had to leave the last day right after Craig's talk.
12:54devnI really liked Craig's talk.
12:54samaarondfilimon: it also depends how extensible you see the structure - maps are only fast if you know all the keys at compile time
12:55dfilimonsamaaron: i will not be adding more entries to the maps
12:55Raynesdevn: Unfortunately, samaaron won the Dancing On Stage During A Presentation badge instead of me.
12:56technomancydevn: yeah, I'm looking forward to rolling on 2.0
12:56samaarondfilimon: I'd still start with a map, and if after perf measurement you see an improvement with records, then use them - the transition is simple
12:57dfilimonalso, i'm feeling somewhat uncomfortable not having types for everything… is this normal for a beginner?
12:58RaynesDepending on your background, most likely.
12:58Borkdudedfilimon: everything has a type, but they're not always relevant
12:58samaarondfilimon: everything does have a type
12:59technomancydakrone: how hard would it be to support a bring-your-own-thread-pool model?
12:59technomancyfor clj-http?
12:59dfilimonyes they do, but if i put stuff in maps, most things are just maps, they don't have a type per-se
12:59cemericksamaaron: re: "maps are only fast if you know all the keys at compile time": I think you meant records
12:59samaaroncemerick: yep, I totally meant records :-)
13:00devntechnomancy: I'm going to continue to bug you on the status of clojars -- is it ready for local dev work yet?
13:00cemerickdfilimon: you can attach metadata to maps to indicate "type"
13:00cemerickused most often with multimethods, in my experience
13:00samaarondfilimon: everything you throw in a map does have types, they're just not statically declared by default
13:00devntechnomancy: I'd like to do a bit of design and help make clojars better
13:00cemerick,(type ^{:type :foobar} {:a 5 :b 6})
13:00clojurebot:foobar
13:00Raynestechnomancy, devn: Whatever you do, if you do *anything* for clojars, make the usernames not be case sensitive.
13:01danlarkincase insensitivity is bad
13:01devn:) I want to work on it, but it sounds like a local dev clojars (per technomancy) is a real pain to set up. There was some work by hiredman IIRC that would make that easier.
13:01dfilimoncemerick: did not know about that, thanks!
13:01Borkdudedevn: and allow me to remove a jar file I accidentally pushed
13:01technomancydanlarkin: case insensitivity on lookup is, but case insensitivity on validation rules is not necessarily
13:01cemerickdfilimon: read the docs for type so you know what it's doing ;-)
13:02technomancydevn: I mostly need to knock out this lein-as-a-lib question since the merge conflict potential is blocking others. then I'll be ready to roll on clojars
13:02Raynesdanlarkin: Case sensitivity is terrible when you can't remember if you signed up as Raynes raynes rayne Rayne DiscipleRayne disciplerayne et al.
13:02cemerickI have one thought for clojars if the suggestion box is open. :-P
13:02dfilimonalso, unrelated question: why is it that the default repl doesn't import namespaces like clojure.repl or clojure.java.javadoc by default?
13:03hiredmanwin 20
13:03dfilimonor rather, why aren't functions like doc always available without having to import them?
13:03samaarondfilimon: it doesn't make sense to pollute all namespaces with repl/javadoc fns by default
13:04dfilimonsure, not all the time, just when playing around in the repl
13:04dakronetechnomancy: it's actually already built-in, just not documented
13:04technomancydakrone: cool
13:04dfilimonalways having a help function seems to me pretty useful
13:04technomancydakrone: is it easy to just use the built-in agent thread pool
13:04technomancy?
13:04devnmaybe clojars should just get a rewrite? :X
13:05dakronetechnomancy: call core/make-reusable-conn-manager and bind the result to core/*connection-manager* whenever you make calls
13:05technomancydevn: it works amazingly considering it hasn't been updated in about two years
13:05devntechnomancy: *nod* ato did a great job without much work.
13:06technomancydakrone: rock. I want to make sure ability to share pools is considered a basic feature for every library that uses them.
13:06technomancyhttp://blog.ometer.com/2011/11/13/task-dispatch-and-nonblocking-io-in-scala/ <- actually a pretty interesting read on the subject
13:06dakronetechnomancy: it's not documented because I wasn't sure of the API, lemme know how it works for you
13:06technomancyapparently they really wish they had Clojure's send/send-off pools built-in
13:07technomancydakrone: it's for zkim actually. =)
13:07devn(maybe)
13:07technomancythough I don't know if he's having trouble with clj-http specifically, I just know in general the problem needs attention
13:10algernonhrm. I have a bit of a problem, possibly not clojure related, but perhaps someone here can shed a light on where I should look.. I'm using Storm, and from one of the bolts, I'm poking redis (via the accession lib). At work, everything's fine, and all that. On my home box, however, a new connection gets opened for each message passing through the bolt. I'm at a loss why this would happen. :|
13:11dakronedevn: eh? what's this about the clojuredocs' API?
13:11dfilimoncemerick: (= ^{:type 'cookie} {:x 1} {:x 1}) this seems to be true
13:11dfilimon,(= ^{:type 'cookie} {:x 1} {:x 1})
13:11clojurebottrue
13:12dfilimonwhy is this?
13:12cemerickdfilimon: yes, metadata does not impact equality
13:12cemerickconcrete type doesn't impact equality either
13:12cemerick(= (array-map :a 5) (hash-map :a 5))
13:12cemerickbah
13:12cemerick,(= (array-map :a 5) (hash-map :a 5))
13:12clojurebottrue
13:12Raynes&(identical? ^{:type 'cookie} {:x 1} {:x 1})
13:12lazybot⇒ false
13:12devndakrone: Since we're talking about adding a "shot of easy" to Clojure, I really like the idea of bringing ClojureDocs into the fold as a sensible default development dependency
13:13devndakrone: Or for the time being have a "sensible newbie project.clj" which includes the clojuredocs-api dependency
13:13ibdknoxclojuredocs-api
13:13ibdknox?
13:13dfilimonhmm, okay then; i'm not sure if i agree with the principle but anyway
13:14devnibdknox: there's a clojuredocs api querying thingamajig out there somewhere, im pretty sure dakrone wrote it
13:14ibdknoxdevn: ah, as in for the repl?
13:14devnyes
13:14devnIt's handy.
13:14ibdknoxcool :)
13:14devnIt's great for newcomers, and dumb people like me. :)
13:15ibdknoxme too!
13:15cemerickdfilimon: Clojure just pushes further in that direction than, e.g. Java does:
13:15cemerick,(= (java.util.ArrayList.) (java.util.LinkedList.))
13:15clojurebottrue
13:16dfilimonabout the clojuredocs api, how do i add it as a dev-dependency? is it an actual package?
13:17dakronedfilimon: https://github.com/dakrone/cd-client
13:17dakroneit can be used from lein
13:17ibdknoxyeah that's not a very useful name :p
13:17devnclojuredocs-client or something would be easier to find with google juice
13:18dakronedevn: yea, it's unfortunately named
13:18devndakrone: it shouldn't be a big deal to rename right?
13:18dfilimondakrone: thanks!
13:19dakronedevn: no, good idea, I will change it
13:19devni guess where I'm headed by bringing up cd-client and so on is that it'd be cool if you could say "lein suite", "lein juice" or something -- which would fill your project.clj with some nice sensible tools for local development.
13:20Raynesdevn: ibdknox and I are working on a new 'lein new' that uses templates and a little code gluing things together. You'll be able to distribute any kind of templates you want after we're done.
13:20devnOne reason I love noir is that it made a lot of the annoying dependency wrangling I used to have to do with ring a lot simpler
13:21dakroneI really just need to rewrite it, it's very old
13:21devnRaynes: that's awesome. Exactly what I want.
13:21devndakrone: I'll help.
13:21devndakrone: I have time today after work if you want to remote pair with zkim's pair.io
13:21dakronedevn: timezone?
13:21devnCST
13:21devnIIRC you're EST?
13:22RaynesAw, I want pair.io. :<
13:23dfilimondoes anyone use the user.clj config file in ~/.clojure to add functionality to the repl?
13:23dakronedevn: MST
13:23dfilimonand if so, why doesn't it get loaded when i run clojure-jack-in from emacs?
13:24dakronedevn: also renamed cd-client to clojuredocs-client and put a redirection notice at cd-client
13:24devndakrone: so what time is it for you right now? It's 12:18PM here.
13:24dakrone1 hour earlier
13:25dakronedevn: added you to the repo, tonight should work for me for a bit, ping me later?
13:26devndakrone: sounds good. :)
13:26technomancydfilimon: ~/.clojure is not on the classpath. you could add it with :dev-resources-path "/home/you/.clojure" in project.clj if you like
13:27dfilimontechnomancy: thanks!
13:28cemerickthe conj survey is fixed
13:28ibdknoxthere's a conj survey?
13:28cemerickibdknox: should be in your inbox?
13:29ibdknoxnever got it.. but there was also some weirdness with my ticket
13:29devntechnomancy: so, with marmalade on 24.0.91.1 -- Which packages do I need to get a nice working REPL with paredit
13:29ibdknoxso it could've been related to that
13:29devntechnomancy: does durendal still work?
13:30michael_campbellibdknox: http://www.surveymonkey.com/s/G9H3RF5
13:30ibdknoxmichael_campbell: thanks
13:33technomancydevn: hmm... probably? I mostly used it for jack-in.
13:53ibdknoxdakrone: when you guys redo the client you should use colorize :D
13:53cemerickibdknox: colorize?
13:54ibdknoxcemerick: ansi-color wrapping for console output :)
13:54ibdknox(blue "hey " (red "what's up?")) and so on
13:54ibdknoxor (color :blue "hey")
13:54ibdknoxcemerick: https://github.com/ibdknox/colorize
13:54ibdknoxI made that and watchtower at the conj
13:55ibdknoxhttps://github.com/ibdknox/watchtower
13:56tsdhIs there some kind of "namespace reset"? Say, you've :use-ed some namespace in your repl, then get a warning because of name clash, and now you want to require it only :as foo.
13:56devnibdknox: not sure if this at all interesting to you given it is in ruby, but my coworker Nick whipped this up, https://github.com/randland/colorful
13:57devnit adds backgrounds, blinks, resets, etc.
13:57ibdknoxI have reset, I didn't really have a use for blink and such, though I should probably add it
13:57cemerickibdknox: what is this "console" of which you speak?
13:58ibdknoxdevn: the cool thing about this is 256 color support :) I'll have to look into that
13:58ibdknoxcemerick: terminal :p
13:58raek_tsdh: you can use remove-ns and then start over with that ns
13:58cemerickAnd here I did that manually https://github.com/clojure/tools.nrepl/blob/master/src/main/clojure/clojure/tools/nrepl/cmdline.clj
13:58cemerickibdknox: mine is a dry irc wit ;-)
13:58cemerickor, none at all, depending on who you ask
13:58ibdknoxhaha
13:59tsdhraek: Yes, that did the trick. Thanks a ton.
13:59ibdknoxcemerick: (blue ..) is just so much prettier ;)
13:59raeknp :)
14:00cemerickibdknox: I agree wholeheartedly.
14:00cemerickI was dumbfounded when chouser pointed me at those ANSI color codes, etc.
14:00ibdknoxlol
14:00cemerickhardcore WTF
14:00ibdknoxyeah it's pretty ridiculous
14:00cemerickcan I get some CSS up in here?
14:00ibdknoxyay for abstraction!
14:00raektsdh: another more fine-grained approach is to use ns-unmap to remove mappings of the conflicting names and then use refer-clojure to bring in the original mappings
14:01tsdhraek: That could have spared me hundreds of skrew-up-ns/,sayonaraRET/M-xclojure-jack-inRET-cycles. :-)
14:01ibdknoxwatchtower is kind of neat: composable file/dir watchers
14:01ibdknoxI'm on a composability kick lately
14:02tsdhraek: Hm, since compiling anew is so fast, I prefer the simple brute-force method. :-)
14:03raekyeah, it's easier to get the namespace into a known state using remove-ns
14:04raekbut ns-unmap can be useful e.g. when you want to re-evaluate a defonce or a defmulti
14:04raek(so I though it could be a good idea to mention it too)
14:16amalloycemerick: i never got a survey either
14:17amalloyoh, that's a lie. wrong inbox
14:17tsdhraek: Sure, I'll try to remember it, but I'm low on RAM.
14:20technomancyI wish ns-unmap were exposed better by slime
14:22jcromartiethere's something weird about ring/ring-jetty-adapter
14:22jcromartieon clojars
14:22jcromartielein deps fails to get it with some zip file error
14:22amalloycemerick: i note that the age groups are "under 17" and "18-24", so Raynes has no correct box to check?
14:22jcromartieit says the POM is invalid and then throws a ZipException
14:22RaynesI just checked
14:23Raynes18-24
14:23RaynesI'm close enough to 18 to not particularly care.
14:23jcromartieI'm using [ring/ring-jetty-adapter "1.0.0-RC1"]
14:23amalloyjcromartie: rm -rf ~/.m2? fixes all kinds of problems :P
14:23jcromartiehm :) OK
14:23ibdknoxit really does
14:23ibdknoxit's magical
14:24technomancyexcept the problem of "it's taking forever"
14:24ibdknoxa magical nuclear bomb for all your maven woes
14:24jcromartiebingo
14:24jcromartiethanks guys
14:24jcromartieI just rm'ed ~/.m2/repository/ring
14:25amalloytechnomancy: that's an opportunity, not a problem. downloading the whole internet is just so dang exciting
14:32tsdhDoes anyone use core.logic here? I wanted to play around with it, but as soon as I do (defrel man x), I get Unable to resolve symbol: to-stream in this context...
14:32jcromartieLauJensen: is there a ClojureQL release I can use with 1.3
14:32tsdhThat's with 0.6.5 and clojure-1.3.0.
14:35ibdknoxjcromartie: out of curiosity, is there something specific missing from Korma that makes it not work for you?
14:37jcromartieibdknox: In the little bit of time I spent with Korma, I found problems with joins and complex relationships in our DB schema that basically "broke" everything nice about Korma.
14:37jcromartieibdknox: and is there a way around the "n + 1 selects" problem?
14:37ibdknoxjcromartie: yep :)
14:37ibdknoxjcromartie: if you use (join) instead of (with)
14:37jcromartiebasically, I find that being able to compose ClojureQL relations and sling them around is a lot more useful for our nasty NASTY db
14:38jcromartiebut (join) doesn't work with has-one has-many, does it?
14:38ibdknoxjcromartie: sure it does
14:38jcromartieoh ok
14:38ibdknoxjcromartie: it's literally the equivalent of writing a sql join clause
14:38jcromartieI see
14:38ibdknoxjcromartie: so you can build out whatever sql is necessary
14:38jcromartieis (join) documented?
14:39ibdknoxjcromartie: that being said, if you have a couple of simple examples, I'd love for you to shoot an email to the korma list. :) I want to make sure it can handle as much as possible
14:39jcromartieanother thing that bugged me in Korma: it doesn't normalize (all lowercase keywords) the columns like ClojureQL does
14:39jcromartieit makes it hard when your DB has strange capitalization going on
14:39jcromartielike ours
14:40ibdknoxjcromartie: ah, part of that is due to the use of quoted identifiers, which seems to be the only safe solution to the problem
14:40amalloyjcromartie: blame your db for that one?
14:40jcromartieyeah
14:40amalloylike, how should it "normalize" a column name like "the user's name goes here"
14:40jcromartiewe have a whole table where the table and all of its columns use the mis-spelling "tranaction"
14:41ibdknoxjcromartie: I think I can potentially provide a couple things to get let you shoot yourself in the foot (basically don't use quotes at all)
14:41jcromartieamalloy: I mean :fooBarBaz should become :foobarbaz
14:41jcromartiek
14:41jcromartieyeah
14:41jcromartie:)
14:44ibdknoxjcromartie: in any case, I'd love to hear your grievances! It's the only way I can make korma better :)
14:50jcromartieibdknox: sure :)
14:50jcromartieibdknox: I do like what I see with Korma
14:50jcromartieI hate waffling back and forth
14:50ibdknoxI know and I want to make sure you don't have to :)
14:50jcromartieone thing I really like about ClojureQL is the way the returned objects just represent the query
14:51jcromartieand deref gets the data
14:51jcromartiewhile in Korma the default is to execute
14:51gfrederi1ks$findfn [4 5] [7] [4 5 7]
14:51lazybot[clojure.set/union clojure.core/lazy-cat clojure.core/concat clojure.core/into]
14:51jcromartieand sql-only or dry-run is the extra work
14:52ibdknox(select* ..) is the equivalent for that
14:52ibdknoxif you want to carry around the query
14:52ibdknoxseems the same as (-> (table "blah"... to me
14:53ibdknoxyou can also ask for the sql in that case using as-sql
14:54ibdknox(def my-query (-> (select user) (where {:id [> 3]})))
14:54ibdknox(as-sql my-query)
14:54ibdknoxor (exec my-query)
14:55jcromartieyeah
14:56jcromartieI wish select and select* were swapped :)
14:56ibdknoxhaha I see
14:56jcromartieto make deferred execution the default
14:56manutteranybody else using cssgen under 1.3? I'm getting "Could not locate clojure/contrib/generic/arithmetic__init.class..." on compile
14:56ibdknoxwell, I think for 90% of cases execution is the default
14:56jcromartieit just seems like a cleaner abstraction
14:56manuttercssgen 0.2.5-SNAPSHOT
14:56jcromartieibdknox: probably so
14:57jcromartieibdknox: I think that in my case, I end up juggling and composing views because of the database schema
14:58ibdknoxjcromartie: absolutely, I don't think an extra * is so bad for that though :p
14:58jcromartieno
14:58amalloyjcromartie: define an alias: se1ect can return the sql
14:59ibdknoxamalloy: just for you
15:00jcromartieamalloy: no
15:00jcromartie:)
15:00technomancyibdknox: that would be swell; I've always wanted to refer to clj-http as gnir
15:00ibdknoxtechnomancy: haha
15:01technomancynot to mention clj-time as chrono
15:02ibdknoxdoes someone have chrono?
15:03ibdknoxwow
15:03ibdknoxit's open
15:03ibdknoxhmm
15:03brehautamalloy: https://github.com/fredericksgary/lib-2367
15:03jcromartieibdknox: one thing I have a problem with is where a logical "entity" in our system might exist across tables
15:04amalloybrehaut: classy
15:04amalloyglad to see someone following through on my crazy ideas
15:04gfrederi1kswhich idea was I following through on?
15:04ibdknoxjcromartie: is that addressed by clojureQL somehow?
15:04brehautgfrederi1ks: naming lib-2367 lib-2367
15:04technomancyibdknox: I wrote an early version of clj-time and called it chrono
15:04technomancybut that was before clojars
15:04gfrederi1ksbrehaut: I thought that was your idea
15:05jcromartieibdknox: by being able to (def some-complex-thing (joins and unions and stuff))
15:05brehautgfrederi1ks: amalloys
15:05brehauti was just the proxy
15:05technomancydisappointed to see it renamed, but I had dropped it by that point
15:05jcromartieibdknox: whereas in Korma I am constrained by Korma's idea that entities <-> tables
15:05ibdknoxjcromartie: hmm not really
15:05jcromartieno?
15:05gfrederi1kswhat do people do when they want hiccup to make formatted html?
15:05gfrederi1ksdecide not to want it?
15:06ibdknoxjcromartie: just define that as the base of your query and compose thereafter
15:07ibdknoxjcromartie: (def myent (-> (select* some-ent) (join some-other-thing) (join something-else)))
15:07jcromartiehm
15:07ibdknox(-> my-ent (where (= :cool 3)) (exec))
15:09jcromartieibdknox: what does (fields) do in defentity?
15:09ibdknox(entity-fields ...) is the one you want
15:09ibdknoxand adds fields by default to any query that uses that entity
15:10jcromartieright
15:10ibdknoxI may have screwed that up with explicit join though, I'll take a look later
15:11amalloygfrederi1ks: i know prxml and data.xml have a formatting setting; i wouldn't be surprised if hiccup does too
15:11jcromartieibdknox: and how about being able to specify a query modifier like "TOP 1"
15:11jcromartieor something like that
15:11ibdknoxjcromartie: that I don't have yet, does clojureQL allow that?
15:11jcromartieyes
15:11ibdknoxjcromartie: what's it look like?
15:11jcromartie(modify table "TOP 5")
15:12ibdknoxah
15:12ibdknoxok
15:12jcromartieso I can say (defn top [this n] (modify this (str "TOP " n)))
15:12ibdknoxwell that should be relatively trivial to add
15:14gfrederi1ksamalloy: cool, thx
15:14ibdknoxcemerick: when are you thinking of putting up the podcasts you did at the conj? :)
15:21TimMcIs there a way to get Leiningen to do static checking on my Clojure code (class not found, etc.) that references some Java classes, but without having to tell it where all the *Java*'s dependencies live?
15:21pmenon,(+ 1 2)
15:21clojurebot3
15:21pmenonyay
15:21pmenonlol
15:22pmenon,(reduce + (take 10 (range)))
15:22clojurebot45
15:22daniel__1pmenon: show off
15:23TimMc(I have a Maven-built Java project that I am trying to wedge some Clojure into; the Clojure code is not AOT, and runs against the Java classes that Maven has compiled.)
15:25daniel__1i can't find the clojure documentation on the for loop, can anyone help me out?
15:25TimMc,(doc for)
15:25clojurebot"([seq-exprs body-expr]); List comprehension. Takes a vector of one or more binding-form/collection-expr pairs, each followed by zero or more modifiers, and yields a lazy sequence of evaluations of expr. Collections are iterated in a nested fashion, rightmost fastest, and nested coll-exprs can refer to bindings created in prior binding-forms. Supported modifiers are: :let [binding-form expr ...], ...
15:25TimMcdaniel__1: http://clojuredocs.org/clojure_core/clojure.core/for
15:26daniel__1cheers, i need the examples
15:26TimMcdaniel__1: and http://richhickey.github.com/clojure/clojure.core-api.html#clojure.core/for
15:26lazybotNooooo, that's so out of date! Please see instead http://clojure.github.com/clojure/clojure.core-api.html#clojure.core/for and try to stop linking to rich's repo.
15:26TimMcoops! Thanks, lazybot!
15:26cemerickibdknox: First one this Friday.
15:26cemericklazybot: botsnack
15:26lazybotcemerick: Thanks! Om nom nom!!
15:26TimMcdaniel__1: rather, http://clojure.github.com/clojure/clojure.core-api.html#clojure.core/for
15:27daniel__1danke schoen
15:27cemerickdoes anyone know why gihub.com/richhickey/clojure is still there at all?
15:28hiredman~for
15:28clojurebotfor is a loop...in Java
15:28hiredman~for
15:28clojurebotfor is not used enough
15:28hiredman~for
15:28clojurebotfor is complected
15:29hiredmanclojurebot: damn your eyes
15:29clojurebotI don't understand.
15:29hiredman~for
15:29clojurebotfor is complected
15:29hiredman~for is not a loop
15:29clojurebotRoger.
15:29TimMchiredman: Maybe change clojurebot to prefer a factoid it hasn't recently said.
15:29TimMcI don't know how annoying that would be to code.
15:29daniel__1~let
15:29clojurebotTitim gan éirí ort.
15:30TimMc...and it might encourage people to iterate through the whole sequence.
15:30amalloycemerick: i agree, it should be wiped from the face of the earth
15:31hiredmanclojurebot: Titim gan éirí ort is irish for "may your recursive calls always be in the tail position"
15:31clojurebotAck. Ack.
15:31cemerickor maybe just replaced with redirects :-P
15:32amalloycemerick: you could redirect richhickey.github.com/clojure, but not github.com/richhickey/clojure (i think)
15:32cemerickright
15:32cemerickempty repos with a single link in the readme have a reliable effect tho
15:32jcromartiehiredman: having fun?
15:32hiredmanme?
15:32clojurebotnamespaces are (more or less, Chouser) java packages. they look like foo.bar; and corresponde to a directory foo/ containg a file bar.clj in your classpath. the namespace declaration in bar.clj would like like (ns foo.bar). Do not try to use single segment namespaces. a single segment namespace is a namespace without a period in it
15:32hiredmansure, always
15:33daakui seem to be getting a exception in lein: "java.lang.NoSuchMethodError: clojure.lang.KeywordLookupSite.<init>(ILclojure/lang/Keyword;)V", but i'm not sure how to backtrack from the trace: https://gist.github.com/c21a37a3e88c28a0243c
15:34hiredmanmeans you are using a library compiled for one version of clojure in a project using a different version
15:34hiredmanabi compat issue
15:34cemerickhiredman: is this the only (persistent) place where you ever commented on REPL protocols, etc? https://groups.google.com/group/clojure/browse_frm/thread/8b2a851d790ed0cc
15:35hiredmanyes
15:35daakuhiredman: i see. would this happen for different java versions?
15:35hiredmanactually I just started fiddling with slime.el to see if I could get it to speak nrepl
15:35hiredmandaaku: no, just different clojure versions
15:36hiredmanwhat version of clojure are you using?
15:36daakuhiredman: cool, thanks
15:36daaku1.3
15:36hiredmanare you trying to use contrib?
15:36daakui have a working env on one machine, and moving it to another and ran into this after lein deps
15:36cemerickhiredman: from a mechanical perspective, that should get a lot easier in the near future
15:36daakui thought i got rid of contrib in my own usage, but i probably missed something, will check that too
15:37cemerickreplacing commands w/ invocations on the remote side is potentially another story
15:37hiredmanmaybe, I dunno, there are several possible stumbling blocks to completely replacing swank-clojure
15:38cemerickand a few more no one knows about yet, I'ms ure
15:42hiredmanI am sort of surprised there isn't a simple elisp client already (have slime talk to nrepl instead of swank-clojure maybe over ambitious)
15:42hugodcemerick: do I remember correctly that nrepl can send multiple replies to a single request?
15:43cemerickhiredman: it's hard to get emacs folks to stray ;-)
15:44cemerickhugod: yup; that always happens, insofar as the current impl doesn't happen to mix responses that contain e.g. *out* content and printed value content.
15:45cemerickthe "spec" doesn't guarantee that separation, but it doesn't make sense to do anything else
15:45hugodcemerick: swank is definitely set up for a single reply to each request
15:45hiredmanwell
15:46cemerickand slime just always puts *out* before the value or something?
15:46hiredmansort of, but you have a similar separation (at least it seems like it from my mucking around in slime/swank)
15:46hugodstream output is handled by separate messages
15:46cemerickoh, ok
15:46hugodi.e., not linked to a request
15:47cemerickoooh.
15:47cemerickhrmph
15:48cemerickhugod: so multiple clients just get a muxed System/out or somesuch?
15:49hugodBeen a while since I last looked. I'm just refreshing my memory…
15:49cemerickYeah, I'll be there soon enough too.
15:49cemerickI need to knock out this strawman, and then we can all go to town.
15:50hugodthe stream is connection specific
15:50hiredmanI think it's more like a session kind of thing, you have a repl session, and you get output for that session
15:51hiredmanwhere session is basically via thread id?
15:52hugoda session is based on the connection, at least for ritz
15:53drewrcemerick: straying isn't the problem
15:54drewrit's worse-is-better syndrome
15:54cemerick:-)
15:54cemericksure. same-same in this case, perhaps
15:54drewra sort-of working swank setup is still better than anything else
15:55brehaut,1.2E3
15:55clojurebot1200.0
15:55brehautcrap
15:56TimMc?
15:56brehautclojure has a lot of variations on valid number literals
15:56TimMcnot as many as Racket
15:57brehautim glad im not writing a racket parser then
15:57TimMcbrehaut: Writing a highlighter?
15:57hiredmanwhat I really want is ensime
15:57brehautTimMc: yeah
15:58brehautTimMc: https://github.com/brehaut/inc-clojure-brush
15:58hiredmanwhich I mostly get with swank-clojure, I just want lexical hilighting
15:58hiredmansemantic hilighting, or whatever
15:59brehautTimMc: the screenshot there is a bit antiquated; either clone the repo and check out the demo or http://brehaut.net/blog/2011/l_systems
16:00cemerickbrehaut: in one table, FWIW: http://bit.ly/sfPJc9
16:00TimMcbrehaut: I am fairly sure that #e1.0+3.0e7i is a valid Racket number literal.
16:00brehautcemerick: thanks! apparently im missing hex numbers too
16:01TimMcexcuse me, drop the "#e"
16:01brehautTimMc: :O
16:02TimMcYou can include some mix of exact/inexact, complex/read/imaginary, ratio/decimal/integral, base, exp, pos/neg
16:05brehaut,0xffE5
16:05clojurebot65509
16:05brehaut,0xffE5/3
16:05clojurebot#<ExecutionException java.util.concurrent.ExecutionException: java.lang.NumberFormatException: Invalid number: 0xffE5/3>
16:05jcromartieibdknox: what about two-way relationships? do I need to specify those?
16:06jcromartieibdknox: like, (defentity clients (belongs-to client-type)) and (defentity client-type (has-many clients))
16:06TimMcbrehaut: If only Clojure had a formal spec for its reader...
16:06brehautTimMc: it does; it just happens to be written in java
16:07TimMcSelf-documenting code, eh?
16:07brehautwhat other kind is there ;)
16:07TimMcI'm just waiting for the self-coding documentation.
16:08brehaut,+3
16:08clojurebot3
16:08nDuffTimMc, I think that's "literate programming". :)
16:08RaynesShh, you'll wake up Tim Daly.
16:08brehautcemerick: your book notes that numbers can be prefixed with a dash, but it doesnt mention +
16:09TimMc,[-0 +0]
16:09clojurebot[0 0]
16:09cemerickbrehaut: nice :-D
16:09cemerickthanks
16:09TimMc,0/0
16:09clojurebot#<ExecutionException java.util.concurrent.ExecutionException: java.lang.ArithmeticException: Divide by zero>
16:11TimMcHow do clojure.org docs get updated? Do I open a JIRA or what?
16:14brehautTimMc: http://tech.puredanger.com/2011/11/10/improving-clojures-docs/ (although its 500'ing atm)
16:14brehautoh. back again
16:23TimMcOK, cool.
16:27broquaintWhat's the recommended way of documenting clojure code?
16:28brehautbroquaint: what do you mean?
16:28brehautlanguage style, amount, comments vs doc strings? tools?
16:28broquaintDoc strings & tools, brehaut.
16:28ohpauleezbroquaint: Doc strings on functions are pretty typical, line comments aren't seen a lot because of the structure of code
16:29ohpauleezsome people use literate style and marginalia
16:29broquaintIs there a dominant style across libraries?
16:29brehauthttp://fogus.me/fun/marginalia/
16:29ohpauleezThe best example to work from is clojuredocs.org if you don't use the literate style
16:29ohpauleez(the docs of clojure itself)
16:29hiredmanminimal maybe the dominant style
16:30brehautits uncommon to try to put fussy annotations into the docstrings themselves; metadata is a better place for that
16:30ohpauleezfor sure, minimal is preferred - usually with an example
16:30broquaintI've been wondering how much fun/pain it would be to get library docs into clojars.org (ala search.cpan.org) but wasn't sure where to start.
16:31ohpauleezbroquaint: it's not that painful, you can use an incomplete project of mine as a base: https://github.com/ohpauleez/clopi
16:32ohpauleezI pull the package list from clojars, then grab repo details from github and bitbucket
16:32brehautsyntax highlighting question: for quotes, [both '(form …) and (quote (form …))] should the heads of lists stop being highlighted as functions?
16:32broquaintThanks, brehaut, ohpauleez & hiredman :)
16:32ohpauleezbroquaint: totally welcome
16:33ohpauleezbrehaut: good question: vimclojure leaves highlighting intact when quoted
16:33amalloybrehaut: i don't think so
16:34amalloyyou're still "talking about" a function call, and it should be highlighted as such
16:34brehautcool :)
16:35brehauti can get behind no doing work
16:35brehauts/no/not/
16:48technomancyamalloy: hope I didn't come across as to dismissive on the require thread. I'm up for discussing import :as, just wanted to get that thread back on track.
16:49amalloyno worries
16:50technomancy*too dismissive
16:50technomancywhen you're pushing for a small change you don't want to get associated with the wilder brainstorming efforts.
16:51amalloyi don't really see require/:refer as larger or smaller than import/:as, but i understand the desire to limit scope
16:59cemerickamalloy: There was much gnashing of teeth around aliasing of packages years ago. Rich was dead-set against it, IIRC.
16:59jcromartieibdknox: here's one MAJOR point against ClojureQL - no LIKE operator
16:59cemerickThings change, of course, so who knows.
17:00jcromartieer hm
17:03hiredman^- what the hell? underscores?
17:05cemerickhrm
17:06cemerickMy clojars idea from before was: let's make org.clojars.* artifacts available only from their own repo URL
17:08hiredmaninteresting
17:10cemerickand don't search that repo's index from clojars.org's web UI unless a checkbox is marked
17:11technomancyooh; I could get behind that
17:11cemerickhttp://clojars.org/search?q=compojure => oh, there's compojure, org.clojars.strongh/compojure "1.0.0-SNAPSHOT"
17:14brehautis it poor form to not specify a groupid on a lein/clojars project?
17:14technomancybrehaut: not if you created the project
17:14technomancywell...
17:14technomancydepends on who you ask I guess. =) larger JVM ecosystem may say yes.
17:14cemerickthere are differing opinions on this :-)
17:15TimMcbrehaut: I get twitchy about the potential collisions.
17:15brehautoh dear
17:16cemerickI don't think it's a question of collisions but of squatting.
17:16TimMc?
17:17TimMcbrehaut: Why not just do net.brehaut/foo and be done with it?
17:18brehautTimMc: i guess that would work too
17:18TimMcI do org.timmc for my stuff.
17:19TimMcOr hell brehaut.net/foo :-)
17:19brehautTimMc: now im certain that whatever i do will be wrong :P
17:22TimMcUgh... I'm AOT'ing Clojure, and it doesn't want to compile against Foo.class since Foo.class was compiled against off-path Bar.class.
17:23TimMcI don't think I can get Bar.class onto the classpath. Is my mission doomed?
17:26technomancyI wonder if clojuresphere could add ecosystem-wide grep.
17:27ibdknoxlol
17:27technomancyClojureSphere: how many projects have :use with :rename?
17:27technomancybam
17:27ibdknoxvery, very few would be my guess
17:27technomancys/guess/hope/
17:28ibdknoxI've never seen it used
17:29ibdknoxexcept in the example code I saw from chouser once
17:29TimMcHuh. Does that rename individual items from the use'd namespace?
17:29ibdknoxyeah
17:29broquaintI feel there should be a more idiomatic way of doing this but can't think what - http://paste.lisp.org/display/125891
17:29TimMcIm'ma start using that!
17:29broquaintAlso what's a good clojure pastebin?
17:30TimMc~paste
17:30clojurebotpaste is http://gist.github.com/
17:30ibdknoxbroquaint: (apply alt (map lit-alt-seq ["my" "print" ...]))
17:30broquaints/lit-alt-seq/lit-conc-seq/ ; oops
17:30broquaintibdknox: alt is a macro :(
17:31ibdknoxbroquaint: the only solution is another macro then :(
17:31broquaintEverything can be solved with another layer of macros eh? ;)
17:31broquaintThanks, TimMc.
17:31ibdknoxbasically
17:31ibdknoxlol
17:31brehaut`(lit-conc-seq ~@(stuf)) ;)
17:31broquaint:)
17:31TimMc(applym alt ...)
17:31ibdknox... applym?
17:32ibdknox,(doc applym)
17:32clojurebotNo entiendo
17:32TimMc(defmacro applym ...) :-P
17:32ibdknoxhaha :p
17:33brehautthe use of macros in fnparse is unfortunate :(
17:34broquaintCould you recommend alternative parsing library, brehaut?
17:34brehautbroquaint: not really. theres a bunch of combinator libs (mostly parsec ports)
17:34brehautcgrand has parsley that looks intersting but isnt a combinator lib
17:34brehauti want to look into parsley more though
17:35broquaintThanks, will look into it too :)
17:36brehauti think cgrand might have talked about parsley during his conj talk
17:36brehautalthough perhaps only tangentially
17:37brehautbroquaint: https://github.com/relevance/clojure-conj/tree/master/2011-slides
17:42broquaintOoh, slides from clojure-conj, thanks!
17:45danbellare clojure charaters != java characters?
17:45danbelltrying to use isDigit, failing
17:45amalloy&(.isDigit \9)
17:45lazybotjava.lang.IllegalArgumentException: No matching field found: isDigit for class java.lang.Character
17:45hiredmanhow are you trying to use it?
17:45amalloy&(Character/isDigit \9)
17:45lazybot⇒ true
17:45danbellah
17:46pjstadig,(type \9)
17:46danbellit's a static method, then?
17:46clojurebotjava.lang.Character
17:46danbellthank you much, all
17:48brehautis it still reasonable to use type rather than just class?
17:48brehautfor some reason i thought that the :type metadata was not really the norm these days
17:49luciandoes anyone know of any news of Clojure on Android?
17:50samaaronlucian: it's possible: https://market.android.com/details?id=com.sattvik.clojure_repl&amp;hl=en
17:51nattohello, spending inordinate time on this simple issue: (def a {:x :y}); given "x", how get :y? (a (symbol ":x")) does not work
17:52luciansamaaron: i know of that, i was wondering if someone knows of anything newer (and ideally feasible)
17:52samaaronlucian: it's unclear to me what you mean by that
17:53brehaut,({:x :y) :x) ; natto
17:53clojurebot#<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: Unmatched delimiter: )>
17:53brehaut({:x :y} :x) ; natto
17:53brehaut,({:x :y} :x) ; natto
17:53clojurebot:y
17:53lucianthe approach taken by that project has severe limitations
17:53gfrederi1ksnatto: ##({:x :y} (keyword "x"))
17:53lazybot⇒ :y
17:54nattobrehaut & gfrederi1ks : thanks, gfrederi1ks answers it
18:02cemerickibdknox: did you resolve jcromartie's korma concerns?
18:03ibdknoxcemerick: mostly, there were one or two things he mentioned that aren't there
18:03ibdknoxfor the most part it's all there, it's just a matter of thinking slightly differently about it
18:04cemerickok; glad the loop got closed on that anyway
18:08cemerickInteresting that .clone isn't handled specially…
18:08cemerick,(.clone (make-array Double/TYPE 10))
18:08clojurebot#<IllegalArgumentException java.lang.IllegalArgumentException: No matching field found: clone for class [D>
18:08hiredmaninteresting?
18:14sritchiedo you guys have any ideas about how to extend a protocol to a byte array?
18:14sritchieI'm not sure how to get the class, aside from (class (make-array Byte/TYPE 0))
18:17brehautsritchie: heres a slightly squirrelly version https://github.com/brehaut/necessary-evil/blob/master/src/necessary_evil/value.clj#L161-163
18:17ibdknoxhaha
18:17ibdknoxI like that
18:18sritchieme too, that's great
18:18sritchiebrehaut: thanks a lot, that'd been bugging me
18:18brehautsritchie: no problem. im sure there must be a better way to do it, but i havent found it yet
18:18ibdknoxI can't think of anything obvious
18:18ibdknoxand that seems relatively clean
18:19brehautim just glad that you can :)
18:20simonadameithi
18:21simonadameitim somewhat lost at to what I need to install in emacs, to get clojure support with slime
18:21TimMcCounterclockwise doesn't seem to give me javadoc flyover support -- is there an IDE where I can get that?
18:21simonadameitthere are slime, slime-clj, slime-ritz and clojure-mode available
18:21simonadameitbut installing all of them seems to lead to conflicts
18:21hiredman~swank
18:21clojurebotswank is try the readme. seriously.
18:21TimMcsimonadameit: Get clojure-mode from marmalade.
18:22TimMcPh, sorry, misread.
18:22simonadameitTimMc: yes, I got that
18:22simonadameitTimMc: but where is the slime stuff?
18:22TimMcBut yes, swank.
18:22simonadameitis it included in clojure mode?
18:23TimMcI don't know, actually.
18:23simonadameithm
18:23simonadameitI can get clojure-mode running with a repl in the inferior-lisp buffer
18:24TimMcLooks like you want swank-clojure.
18:24simonadameitbut I thought there was slime integration for clojure
18:24TimMcI'm an Emacs n00b -- I just use the emacs-starter-kit to get set up.
18:25babilensimonadameit: https://github.com/technomancy/swank-clojure ← use that
18:27simonadameitah, ok i am somewhat confused with all the different versions of the same thing :)
18:27simonadameiti was using "ritz"
18:27simonadameitwhich should do the same - so I thought
18:34andrewm`so in 1.3 with the removal of dissoc-in is there a good func to remove keys from a nested map?
18:35technomancyandrewm`: doesn't update-in work with dissoc?
18:36andrewm`ahh yes that would be the obvious solution
18:36BahmanWould someone please guide me on how can I convert a vector into a byte array (i.e. byte[])?
18:36ibdknox,(doc to-byte-array)
18:36clojurebotPardon?
18:36ibdknoxdarn
18:37ibdknox,(doc byte-array)
18:37clojurebot"([size-or-seq] [size init-val-or-seq]); Creates an array of bytes"
18:37BahmanThanks ibdknox!
18:37TimMc,(byte-array [1 2 3])
18:37clojurebot#<ClassCastException java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Byte>
18:38TimMcyuck
18:38ibdknox,(byte-array (map byte [1 2 3]))
18:38clojurebot#<byte[] [B@f7a060>
18:39TimMcThere's no way that's the most efficient way.
18:39ibdknoxno one said anything about efficiency!
18:39ibdknox:p
18:39simonadameithm, how come clojure-mode on clojure-jack-in tries to download its own version of leiningen?
18:39simonadameitI already have leiningen installed via homebrew
18:40hiredmandon't use homebrew
18:40andrewm`technomancy: hmm nevermind that doesn't work as update-in operates on the values stored and will only create new entries
18:40andrewm`(update-in {:a {:b :c}} [:a :b] dissoc) => {:a {:b :c}}
18:41ibdknox,(update-in {:a {:b :c}} [:a] dissoc :b)
18:41clojurebot{:a {}}
18:41ibdknox:)
18:41ibdknoxandrewm`: ^
18:42andrewm`ibdknox: correct, but that still leaves keys in the map pointint to an empty map
18:43ibdknoxhuh?
18:43ibdknox,(doc dissoc-in)
18:43clojurebotCool story bro.
18:43hiredman,(dissoc {:b :c} :b)
18:43clojurebot{}
18:43hiredmanthat is how dissoc works
18:43andrewm`whoops correct
18:43ibdknox,(doc dissoc)
18:43clojurebot"([map] [map key] [map key & ks]); dissoc[iate]. Returns a new map of the same (hashed/sorted) type, that does not contain a mapping for key(s)."
18:44andrewm`tyvm
18:45simonadameitok, now I see how it should work
18:46simonadameitclojure-mode on clojure-jack-in will get slime.el passed through and evaluated from swank-clojure
18:46simonadameitbut unfortunately emacs gives this error in the process:
18:46simonadameiterror in process filter: clojure-eval-bootstrap-region: Search failed: "(run-hooks 'slime-load-hook) ; on port"
18:49simonadameitso maybe I have incompatible versions of clojure-mode and swank-clojure?
18:49andrewm`simonadameit: I got that error some time ago and it was due to me having an older version of lein swank installed. Remove any version of slime you may have installed already, make sure you have the newest version of lein-swank installed and install the newest version of clojure-mode and try again.
18:50ohpauleezIs anyone at the nyc clojure meet up right now?
18:51brehautcrap i started vi in my emacs shell and i cant work out how to quit
18:52ohpauleezbrehaut: from vi? or from viper mode?
18:52brehautvi running in a emacs shell mode terminal
18:53simonadameitandrewm`: wohoo!! thank you :)
18:54simonadameitandrewm`: :-*
18:54ohpauleezbrehaut: pressing escape a bunch and then ":q" doesn't work?
18:54ohpauleez(no quotes)
18:54brehautohpauleez: tried that; emacs kept capturing the esc
18:54ohpauleezahhh that sucks!
18:54brehaut(i also not that emacs was smart enough to not try to start up inside the emacs terminal)
18:55simonadameittechnomancy: at your swank-clojure repo the readme.md says to install swank-clojure 1.3.2, while the current version 1.3.3 is the one that will work with the current clojure-mode in elpa/marmelade
18:56paulfryzelsimonadameit: are you looking at https://github.com/technomancy/swank-clojure ?
18:56paulfryzeli see "swank-clojure 1.3.3"
18:56technomancysimonadameit: thanks, just fixed it
18:57simonadameitpaulfryzel:, technomancy : wow, now I wonder wether technomancy is really that fast, or I got it wrong :)
18:57simonadameita mystery
19:03simonadameittechnomancy: thanks for bringing the slime goodnesss to clojure :) - i just saw you commited an explanation how this all connects to clojure-mode
19:03technomancysimonadameit: yeah, long overdue; there was a bit too much "just do this and it works, heyyyy" which sucked when it didn't
19:05brehauteveryone loves the mumble style guide for lisp
19:06technomancysimonadameit: also, I didn't really bring it to clojure; I just halfheartedly maintain it.
19:16alex_baranoskyI'm trying to move some code of mine to 1.3, and am getting a ClassNotFoundException in the ns call re: a record I created. Mind you this error does not occur in 1.2
19:16alex_baranoskycode is here on GitHub: https://github.com/AlexBaranosky/EmailClojMatic/blob/master/src/core.clj
19:17hiredman:(
19:17hiredmandon't put dashes in type names
19:17alex_baranoskyit can't find the CannotPArseReminderStone
19:17amalloysingle-segment namespaces are evil also
19:17alex_baranoskyyou mean like "core"
19:18amalloyyes, and reminder-parsing
19:18alex_baranoskyyeah, let me fix that
19:18gfrederi1ks"core" is the only namespace I use
19:18alex_baranoskyright, basically the whole project
19:18alex_baranosky:)
19:18alex_baranosky'll fix that... do you think it's related to the failure?
19:18alex_baranoskyI'll fix it anyway :|
19:18amalloygfrederi1ks: your core namespace is the only one i use too
19:19amalloyalex_baranosky: hiredman is probably closer to the actual problem
19:19hiredmanit's very karmic, you do bad things and bad things happen to you
19:19amalloyhah
19:19alex_baranoskythe record type has no dashes though
19:19hiredmanit does
19:19amalloyalex_baranosky: its package does
19:19alex_baranoskyyou mean its namespace?
19:19amalloyyes, and also no
19:19hiredmanyou :import'ed it, right?
19:20hiredmanit's a java class
19:20hiredman:import is for java classes
19:20alex_baranoskythat's silly
19:20hiredmanalex_baranosky: I think what you meant is "I don't understand"
19:20alex_baranoskyits just an inconsistency
19:21hiredmanno it is not
19:21alex_baranoskyand those always bite people
19:21hiredmanyou just don't know anything about records
19:21hiredmanit's ok
19:22alex_baranoskyso, you can use a namespace anywhere in clojure using dashes, btu as soon as you want to create a Record in one, then it won't work as it once dide
19:22hiredmanno
19:22hiredmanjava types cannot have '-' in the name, records are java types, …
19:23dakronedevn: ping
19:23alex_baranoskyhow does a Clojure namespace look from Java? say 'alex.reminder-parsing' ?
19:24alex_baranoskydoes it substitute dashes with underscores?
19:24hiredmandepends on what you mean
19:24hiredmanthere is the namespace object, an object with a name attribute with the value alex.reminder-parsing
19:24hiredmanthere is the class generated when that namespace is compiled
19:25hiredmanwhich is something like alex.reminder_parsing
19:25amalloyhiredman: alex.reminder_parsing__init, i think?
19:25hiredmanactually
19:25hiredmanyeah
19:25hiredmanthat
19:25hiredmanwhich is written to the filesystem like alex/reminder_parsing__init if asked
19:25hiredmanyou do get a alex.reminder_parsing if you have a :gen-class
19:26hiredmanalex/reminder_parsing__init.class
19:26hiredmanthen there is the corresponding clojure file, alex/reminder_parsing.clj
19:26alex_baranoskyso the CannotParseReminderStone, seems to compile fine to a clss with a matching name
19:27hiredmanthe important bit is the package name
19:27hiredmanwhich is namespace the record/type is defined in
19:27hiredmanand in your case contains a dash
19:29alex_baranoskyso why did it work fine in 1.2?
19:29alex_baranoskyhmm...
19:29amalloywait, you're creating a stone class? the whole point of slingshot is that you don't have to create new classes for exceptions
19:30amalloyjust (throw+ {:reason :cannot-parse-reminder :other "whatever"})
19:30alex_baranoskyI thought it would be a bit of self-documentation, considering it could be conceivably hard to follow the code between throwing of the stone, and catching of it
19:30alex_baranoskybut maybe that's just old-fashioned oop bs talking
19:30alex_baranoskyI'll try just nuking it
19:38alex_baranoskywhat changed between 1.2 and 1.3 to effect package names on Records
19:39brehautname munging changed between 1.2.0 and 1.2.1
19:40brehautfoo-bar.Record is as is in 1.2.0 (and below? i cant remember when records were added) and foo_bar.Record in 1.2.1 and above
19:41amalloybrehaut: they're new to 1.2
19:41alex_baranoskyso can I import records that are in dashed namespaces with: (:import [dashed_namespace.RecordName]) ?
19:41brehauti cant rmemeber what the big changes in 1.1 were then. hmm.
19:42alex_baranoskythis project shouldn't even be using Records
19:42alex_baranoskyf me
19:42alex_baranosky:P
19:42amalloyhahaha
19:42amalloya frequent realization
19:43alex_baranoskyhowever the new ->Record functions are pretty sweet
19:43brehautalex_baranosky: you can only _import_ a record that exists; if the namespace containing the definition hasnt been loaded, and the record hadnt been AOT compiled, then you need to require the namespace first
19:43alex_baranoskybrehaut: thanks for the clarification
19:43brehautif that ball of words was clarifying, im glad. it looks like soup to me :P
19:44alex_baranoskybrehaut: dude I am *n* the soup
19:44alex_baranosky*in*
19:45brehautand your guess that you dont want records is probably right
19:46brehauti think ive created 2 records in all my clojure code, and one of them isnt really all that necessary
19:47alex_baranoskybrehaut: well, I originally added them in as a experiment with readability... that experiment has gone all sorts of terribly. Considering the potential pitfalls when using records
19:47amalloybrehaut: the only guy in here capable of making a ball of soup?
19:48alex_baranoskyamalloy: one of the bread bowls I assumed.
19:48brehautbread bowls?
19:48amalloybrehaut: for putting soup in?
19:48brehautis this some weirdo north american thing?
19:49amalloywell i didn't *think* it was
19:49brehauthttp://en.wikipedia.org/wiki/Bread_bowl
19:49brehauthuh. it really is a thing
19:49gfrederi1ksamalloy: wow you wrote that wikipedia article fast!
19:50amalloy$write-wiki Bread Bowl
19:50gfrederi1ksthat crazy lazy bot
19:50klauernbread bowls are pretty awesome, actually
19:50klauernIt's like a sandwich, for soup
19:50brehautrelevant: http://xkcd.com/978/
19:51brehautklauern: my mind is blown
19:51klauernlol
19:51amalloyi like the concept of bread bowls but usually not the execution
19:51brehautamalloy: huh. so like object orientation then?
19:51brehautbut breadish?
19:51gfrederi1ksbread-oriented soup
19:52brehautthis has gone to a weird place
19:52amalloybrehaut: welcome to soup-oriented irc?
19:52brehauti think its just an aspect
19:53brehautps, what the hell are aspects?
19:53amalloyoh god
19:53brehautamalloy: PTS ?
19:53hiredmanpeople always say "cross cutting concerns" which is like, what?
19:54gfrederi1ksmy friend was asking me just the other day how clojure people do aspect-oriented things
19:54amalloyno, more like embarrassment at my former self. i though AOP was really cool even though i knew i didn't understand it
19:54brehautamalloy: you programmed PHP professional, its hardly your greatest embarassment
19:54technomancyI'll orient your aspect.
19:54gfrederi1ksrun!
19:54hiredmanlike stuartsierra saying logic programming is the next cool thing, and then saying he didn't understand it?
19:55hiredmanmaybe you didn't do it on stage
19:55amalloymy understanding is AOP is this great way to create spaghetti code, by secretly injecting code all over your codebase
19:55brehautholy crap
19:56brehautthat sounds like the worst idea since C++
19:56technomancyamalloy: alias_method_chain!
19:56amalloytechnomancy: outside my area, i'm afraid
19:56hiredmansomeone just wrote a blog post
19:56technomancyamalloy: oh, it's a ruby thing. better not to know.
19:56hiredmanhttps://github.com/raganwald/homoiconic/blob/master/2011/11/COMEFROM.md
19:57alex_baranoskyall OOP is a mess on some level or another, and I can only assume production Clojure is also a mess, but LESS of a mess :) <bitter today>
19:57klauernhiredman: I was just going to find that post, as I just read it
19:57amalloybrehaut: like there was some notion of a "join point"; you could insert code before, after, or around various classes of join points. eg, "add this logging statement before every throw(foo) statement"
19:57brehautwait, doesnt emacs have a thing for that?
19:57hiredmanso, add-hook?
19:58amalloyi guess? like i said i never really understood it
19:58alex_baranoskyamalloy: it has an intricate lexicon
19:58gfrederi1ksI don't remember any use cases other than logging
19:59brehautamalloy: im slightly more informed than i was 10 minutes ago, so win!
19:59rippinrobr#clojureclr
19:59rippinrobrwoops
19:59brehauttheres a bit in the orielly beautiful code book about using the emacs hooks feature to make emacs work for the blind
20:00brehautthat was pretty cool
20:00amalloybrehaut: also, gravity on pluto is over ten times stronger than on earth! (pointing out here that being more informed is only useful if information is true)
20:00brehautamalloy: lol. point taken
20:00gfrederi1ksalso there's usefulness
20:00alex_baranoskyamalloy: unless you're trying to lie
20:01gfrederi1ksbrehaut: I had chicken and shrimp for lunch
20:01brehautmonads are just endofunctors in the category of monoids, whats the problem?
20:01alex_baranoskybrehaut: is that some new Parliament Funcadelic?
20:02amalloyso wait, in this analogy are shrimp the monads, or is lunch?
20:02brehauti think lunch is the category in this analogy
20:02brehautso i think shrimp must be endofunctors
20:02brehautand monads is _the whole thing_
20:03hiredmanclojurebot: shrimp |must be| endofunctors
20:03clojurebotIn Ordnung
20:03brehauthonestly, i think this is the most profound discussion of monads we have ever had
20:32hiredman~endofunctors |are| functors that map a category to itself.
20:32clojurebotIn Ordnung
20:32hiredman~shrimp
20:32clojurebotshrimp must be endofunctors
20:33brehaut~endofunctors
20:33clojurebot#<RuntimeException java.lang.RuntimeException: java.sql.SQLSyntaxErrorException: Syntax error: Encountered "=" at line 1, column 38.>
20:33amalloyhaha that's actually better than the expected result. he can't stand category theory
20:33brehautclojurebot is not a category theorist
20:34alex_baranoskybrehaut, so my example of mapping List[String] too List [String] would be Endofunctor??
20:34lazybotalex_baranosky: Definitely not.
20:34brehaut~monads is #<RuntimeException java.lang.RuntimeException: java.sql.SQLSyntaxErrorException: Syntax error: Encountered "=" at line 1, column 38.>
20:34clojurebotRoger.
20:34brehaut~monads
20:35brehautalex_baranosky: no idea ;)
20:35clojurebotPardon?
20:35amalloyalex_baranosky: well, you gave the example in a different channel, so he can't be expected to guess what it was :P
20:36alex_baranoskyoops! 8)
20:37amalloyclojurebot: monads is #<RuntimeException java.lang.RuntimeException: java.sql.SQLSyntaxErrorException: Syntax error: Encountered "=" at line 1, column 38.>
20:37clojurebotRoger.
20:37amalloy~monads
20:37alex_baranoskyamalloy: that's what I get for quadruple-tasting while falling sleep
20:37clojurebotTitim gan éirí ort.
20:37brehautalex_baranosky: are we talking about beer now?
20:37amalloyoh, i wonder if he's passing the factoid through the reader
20:37brehautcause thats a category worthy of some theory
20:38amalloyclojurebot: monads is #=(str "super" "awesome")
20:38clojurebotYou don't have to tell me twice.
20:38amalloy~monads
20:38clojurebotExcuse me?
20:38amalloydude's just confusing
20:39brehautle sigh
20:40hiredman~shrimp
20:40clojurebotshrimp must be functors that map a category to itself.
20:41brehauthiredman: is this the inference working?
20:41hiredmanyes
20:41brehautthats fantastic :)
20:42hiredmanwell, after I smashed on it a bit (was only working for stuff defined with "is")
20:45gfredericksclojurebot: itself is a reflexive pronoun
20:45clojurebotYou don't have to tell me twice.
20:45gfredericks~shrimp
20:45clojurebotshrimp must be functors that map a category to itself.
20:45technomancyclojurebot has the decency to consider anaphora harmful
20:46hiredmanif you botsnack with in 2 minutes of an infered result it becomes permanent
20:47hiredmanhttps://gist.github.com/1372115
21:06technomancyhiredman: how about the reverse for botsmack?
21:06Raynes~botsmack
21:06technomancyunlearn an accidentally-learned factoid if botsmacked within two minutes
21:06clojurebotOwww!
21:07alex_baranosky~botsmack
21:07hiredmanI'll think about it
21:07clojurebotOwww!
21:07amalloybest feature ever
21:07technomancyhiredman: it's a yin/yang thing
21:08technomancytwo sides of the same coin
21:08amalloywe'll all be like terribly abusive pet owners
21:11alex_baranosky~botsmack
21:11clojurebotclojurebot evades successfully!
21:11alex_baranoskylol
21:11TimMchaha
21:11ibdknox~botsmack
21:12clojurebotclojurebot evades successfully!
21:12ibdknoxdamn him
21:12alex_baranoskyshoot it's learning
21:12ibdknoxlol
21:12ibdknoxskynet here we come
21:12alex_baranoskyI give it 200 years
21:14alex_baranosky~shrimp
21:14clojurebotshrimp must be functors that map a category to itself.
21:16TimMcI leave this channel for 4 hours and what the shit are you going on about?
21:16alex_baranosky~monads
21:17hiredmanI may have to fiddle with the inference makes lookup expensive
21:17clojurebotGabh mo leithscéal?
21:18alex_baranosky~factoid
21:18clojurebotExcuse me?
21:19TimMcclojurebot: It's Turing complete |is| <reply>Turing completeness is the Godwin's Law of language arguments
21:19clojurebotRoger.
21:19TimMctechnomancy: ^
21:19TimMcDid you come up with that or did you hear it somewhere?
21:22hiredman~monads
21:23clojurebotmonads is http://okmij.org/ftp/Scheme/monad-in-Scheme.html
21:49alex_baranoskywhat do you say to someone who says that it is not practical (yet) to write a webapp in clojure, that Rails is more effective dollar for dollar?
21:50brehautalex_baranosky: ask them why they havent jumped to node?
21:51brehautyou have two differing statements in your question
21:51brehauta) is it practical to write web apps in clojure
21:51brehautb) is rails more effective
21:51brehauta) absolutely practical
21:51brehautb) may be true
21:52brehautid say it depends on the particular application whether or not rails comes out on top
21:52TimMcalex_baranosky: "dollar for dollar" depends on hiring and feeding costs of Ruby programmers as well as productiveness and stability of the resulting Ruby apps,
21:52TimMc.
21:52brehaut(the more that it is a web app rather than an application that happens to be on the web, the more it favors rails i would suggest)
21:56brehautalex_baranosky: speaking from the perspective of someone who does django day to day, django still has the edge over clojure because of the admin for CRUD cms type sites, and i wouldnt rush to try to replicate that in clojure yet
21:57brehautalex_baranosky: on the other hand, lein, enlive, and ring are all great
21:57brehaut</blather>
22:00alex_baranoskybrehaut: good points, I just looooove clojure and want to force everyone to use it :)
22:00alex_baranoskywe need more awesome libraries to supplement and support the great language
22:02lghtngvisual clojure 2011
22:02lghtngsry
22:03brehaut(i mean one that isnt part of webnoir obviously)
22:03klauernI feel Clojure needs something like playframework, but I have no idea what that would even be: www.playframework.org
22:03lghtngVisual Clojure Enterprise 2011 SP11
22:04brehautits 2011; can we get past needing a 'framework' for web development please?
22:05brehautlghtng: i believe you have misspelt 'emacs'
22:05lghtng$899/yr Subscription w/ unlimited downloads for 14 days from FAST Clojure Servers
22:05lghtngi spell emacs M-x
22:06klauernI'm not sure I follow. would "starter pack" or "boilerplate" or "starter kit" make it more appealing?
22:06brehautklauern: im not sure why we anything beyond a bit of documentation?
22:09lghtngls
22:09lghtnger
22:09brehautklauern: if you dont want to think about your web programming choices in clojure, theres already noir. its a good default
22:10lghtngmodlisp
22:10lghtngapache speed and punch, clojure sophistry
22:10lghtngand security
22:10brehautwait wait, apache _speed_ ?
22:11lghtngunless you are Oracle, yes
22:12lghtngi think its pretty fast if your not trawling a swamp
22:13lghtngziff-davis may disagree, but then again, they run a swamp
22:19technomancyTimMc: I don't think I came up with that
22:19technomancycouldn't tell you where it's from though
22:44duck1123Is there any way in clojure to disallow any http connectections and mock them out with known results for unit tests?
22:45alex_baranoskyduck1123: Midje is good for that kind of thing: https://github.com/marick/Midje
22:46duck1123I am using Midje, and I can mock out in known places. I'm just looking for something that can catch the ones I'm not thinking of
22:46duck1123There was a gem for Ruby that did the same thing
22:46brehautduck1123: why not just call the ring handler directly with request maps?
22:46technomancywith-redefs is another good one
22:47duck1123brehaut: I'm concerned with http connections going out from my server
22:48duck1123I think I might be able to figure something out
22:48brehautah right
22:53alex_baranoskydid something change in 1.3 affecting gen-class ?
22:54alex_baranoskycode used to work fine on 1.2 but now when I run 'lein run' it gives a ClassNotFoundException
22:54alex_baranoskyno dashes in namespace
22:54duck1123run doesn't compile
22:54duck1123do a lein compile first
22:54alex_baranoskywhat about uberjar ? does it compile?
22:55duck1123I would assume so, I don't use it though
22:55alex_baranoskycompiled then ran run, and got same error
22:56duck1123Oh well, I know that after cleaning, I need to compile before I can run
22:56technomancyanything that runs code in the project's JVM should cause compilation of whatever's in :aot in project.clj
22:56alex_baranoskyis that a change from 1.2 to 1.3?
22:58alex_baranoskywhat I am doing is creating a simple gen-class with a -main function. Adding that ns to project.clj, and then running lein uberjar
22:58technomancyduck1123: hmm; if so that's a bug; it should always detect the need to compile if classes/ is empty.
22:59alex_baranoskyin the past this made me a jar that worked fine at the command line
23:00technomancyalex_baranosky: if you can make a simple repro case please open a bug
23:00duck1123technomancy: It may be in part related to the peculiarities of Tigase's class loader. It scans every class file and jar for the implementations it needs
23:01technomancytigase?
23:01TimMcXMPP server, yeah?
23:01duck1123Yeah, I use it in my server
23:01TimMcI think I use their free server to host my XMPP.
23:01duck1123I have to gen class the plugin to hook it in
23:01alex_baranoskythanks guys, gotta go. If it is a bug, and not my own error, I'll submit a report
23:01alex_baranoskyadios
23:03spoon16how can I get lein to stop trying to use clojars and centeral?
23:03technomancyspoon16: :omit-default-repositories true
23:03spoon16thanks
23:03technomancysure
23:04spoon16technomancy are you up in Seattle?
23:04technomancyspoon16: yeah, shoreline technically
23:04spoon16recently moved down to the bay area, from Redmond
23:04technomancycool
23:04spoon16was kind of bummed out to see that you were from that area and I had not gone to any of the meetups or anything you are a part of
23:05spoon16great work on lein btw
23:05technomancythanks
23:05technomancyyeah we have a lot of fun at seajure
23:05duck1123much less hair fire
23:05technomancyspoon16: too bad you hadn't heard of it; anything we could do to make sure everyone doing Clojure in the area knows about it?
23:06technomancymaybe mention it on the main Clojure mailing list occasionally?
23:06gfredericksbillboards.
23:07technomancygfredericks: well I do have the leiningen logo in high-res now...
23:07spoon16I think you are doing alright
23:07spoon16I was just barely getting started when I moved
23:07spoon16so I just had not discovered much in the eco system
23:08technomancyspoon16: gotcha. there's a bay area meeting too, but it's not quite as cool as ours. =)
23:08spoon16yeah, I've started going to the bay area one
23:09spoon16me and two other guys from Netflix have started attending
23:09technomancygreat
23:11brehautdnolen: 'fair conjunction'? what is that?
23:11dnolenbrehaut: logical conjunction. miniKanren has fair disjunction.
23:11dnolenbrehaut: that means a branch in a logical or cannot steal all the computation time.
23:12brehautah right.
23:12gfredericksclojurebot: logic programming is the new monads
23:12clojurebotAck. Ack.
23:12dnolenbrehaut: but miniKanren still has some forms of divergence in clearly finite programs - because conjuction in miniKanren is not fair.
23:13dnolenP & Q, where P is a recursive call that needs information from Q to fail. currently P & Q will diverge. I think I may have a fix… shouldn't get to hopeful yet.
23:13brehaut~monads
23:13clojurebotmonads is #<RuntimeException java.lang.RuntimeException: java.sql.SQLSyntaxErrorException: Syntax error: Encountered "=" at line 1, column 38.>
23:14brehautbah
23:14gfredericksI guess it worked eventually?
23:14brehautdnolen: interesting
23:14brehautgfredericks: yeah. almost; apparently i dont know enough bot-fu to not have him say 'monads is'
23:15dnolenbrehaut: if this actual works, it'll fix a big wart in miniKanren, as well as remove a fairly strange hack.
23:15brehautvery cool :)
23:15gfredericksclojurebot: monads |are| the new gotos
23:15clojurebotYou don't have to tell me twice.
23:15brehautdnolen: core.logic must be about a year old now?
23:15gfredericks~monads
23:15clojurebotExcuse me?
23:21brehautdnolen: 9 days away from 1 year in fact
23:21brehautor maybe ten if you take timezones into account
23:22spoon16technomancy: how can I avoid repeating my repository credentials for each entry in :repositories (in a project.clj)?
23:23spoon16I swear I read this in the docs, but can't find it now
23:23technomancyspoon16: "lein help deploying" should cover it
23:23spoon16thanks
23:27dnolenbrehaut: oh yeah! wow
23:33spoon16it seems like you have to override "centeral" repository last in project.clj or the override will not take
23:39spoon16nevermind, it's some wierd local maven problem if I clear my local cache all is good
23:55Raynesdevn: https://github.com/Raynes/lein-newnewm <-- Thing we talked about earlier.