#clojure logs

2011-11-12

02:36halarnold2000.
02:58zakwilsonClojureQL seems to support some extension mechanisms, but they're really poorly documented. I did a bit of googling, but couldn't find much on it. I would like to pre-process data sent to it and post-process data received from it - in particular, I want to convert dates to and from clj-time/jodatime. Is this doable?
03:15wtfcodernewb alert! http://ideone.com/cdKhn works fine using leiningen, lein run outputs 12, however if I run 'lein jar' i would of expect java -jar <filename-of-jar> to run main method due to gen-class, what simple/stupid thing am i missing?
03:15wtfcoderhowever i get class not found error
03:24tensorpuddingi assume you need to mention where the main method is in project.clj
03:25wtfcoder :main cljtest.core
03:26tensorpuddingis that an uberjar?
03:32wtfcodernot sure, just a basic lein example i could find
03:32tensorpuddingi mean
03:33tensorpuddingrunning java -jar <filename-of-jar> probably won't work, unless it knows where to find clojure
03:33tensorpuddingor the jar is an uberjar
03:33tensorpuddingmeaning it contains all its dependencies
03:34tensorpuddingi'm not sure if it checks subdirectories of the working directory for classes, though
03:38wtfcoderive upload my simple dumb experiment to wikisend. lein run works but java -jar file.jar doesnt (after lein jar). any idea would be immensly appreciated. http://wikisend.com/download/453590/cljtest.tar
03:47wtfcoderah uberjar works
03:51tensorpuddingthat just means that you can't run it without clojure, which is probably normal
03:57wtfcodertensorpudding, figure out why the normal jar wasnt working, cant specifiy -cp with jar, so long way is java -cp myjar.jar:lib/cloj*.jar cljtest.core
03:57tensorpuddingyes, that's what i mean
03:57tensorpuddingyou need to add clojure to the classpath
03:59wtfcodercool. are strings in clojure interined like in c# or does the keyword support negate such feature requirement
07:30licenserwoooh I got the CLJS-100 :D
07:56BorkdudeI am testing some function which gets a lot of json output from twitter in emacs
07:57leo2007folks, I want to use fuzzy completions in slime. for a fully-qualified symbol I can only complete to the namespace such as swank.core/ but not swank.core/break.
07:57leo2007any ideas?
07:57BorkdudeBut somehow emacs gets into a slime debug thing by the output that gets printed
07:58Borkdudeis there a better way to get the json in, without getting slime errors?
07:58_ulisesBorkdude: coincidence, I was doing that 1hr ago! :-o
07:59_ulisesBorkdude: exact.same.thing.
07:59Borkdude_ulises: great, any solutions? ;)
07:59_ulisessadly, I have to fixes for this
07:59_ulises:(
08:01Borkdudeif it is of any help, this is the *Backtrace*: https://gist.github.com/1360489
08:03_ulises*no
08:03BorkdudeSomeone able to help me out where it goes wrong?
08:03_ulisesno fixes
08:04Borkdude_ulises: we're on the same team then ;-)
08:04Borkdude_ulises: what are you working on?
08:04_ulisesnothing serious, just learning the twitter api
08:05Borkdude_ulises: what library are you using for it?
08:05_ulisesdid you try the streaming api? I came across ashafa's noozzle but that didn't work
08:05Borkdude_ulises: I'm only doing some restful stuff for now
08:05_ulisesBorkdude: none. using clj-http client straight
08:05_ulisesBorkdude: there are plenty clients but I don't know which one to choose, so I just use an http client
08:07Borkdude_ulises: I am using this one https://github.com/adamwynne/twitter-api
08:07_ulisesnice!
08:07_ulisesseems to be pretty active too
08:12Borkdude_ulises: hmm, https://github.com/technomancy/swank-clojure/issues/57
08:14_ulisesBorkdude: nice!
08:15Borkdudehmm
08:16Borkdudemy whole emacs was fucked up by setting this slime-net-coding-system variable
08:17BorkdudeHow do I know what coding system to use?
08:20Borkdude_ulises: ah now it works
08:21Borkdudedisconnect from your 'lein swank', set the variable, restart lein swank en reconnect
08:21Borkdude_ulises: set the variable: (setq slime-net-coding-system 'utf-8-unix)
08:47licenser_ulises Borkdude I think it is some kind of evaluation the slime does not like
08:48licenserfor the sake of laughing I was having the exact same problem with my own json a week ago - was driving me nuts
09:18Borkdudelicenser: it's fixed now though, by settings this encoding variable
09:18licensertricky
10:26kephalein 1.3 is there a way to do a defn that attaches all the metadata that used to be present by default in 1.2?
10:31BorkdudeHmm, I merged a branch and now I want to undo it. https://gist.github.com/1360680 Please help ! :)
11:01tomojis clojure-cake.org moving or something?
11:14klauern? http://stackoverflow.com/questions/2389361/git-undo-a-merge
11:18cgrayare the projects that were in clojure-contrib not all on clojars?
11:18tomojat least some of them are in maven central
11:18cgrayi'm looking specifically for algo.monads ...
11:19technomancyclojurebot: what happened to contrib?
11:19clojurebotGabh mo leithscéal?
11:19technomancyclojurebot: I mean where did contrib go?
11:19clojurebothttp://clojure.org/contributing
11:20technomancyclojurebot: botsmack
11:20clojurebotOwww!
11:20technomancycgray: http://dev.clojure.org/display/design/Where+Did+Clojure.Contrib+Go
11:23cgraytechnomancy: ok... i was trying to depend on the wrong version... algo.monads has a pom that says 0.1.1-SNAPSHOT on github, but it's only 0.1.0 on maven central
11:26technomancycgray: see also: lein search algo.monads
11:27cgraytechnomancy: cool, learn something new every day :)
11:27cgraythat'll save a lot of time
11:46ericmoritz\0is there a better way to express this... is smells bad, (apply hash-set (keys map))
11:47gtrakis there a good summary of the numerics difference from 1.3 and 1.2? I can't seem to find it by searching
11:48_ulisesericmoritz\0: maybe (into #{} (keys some-map)) ?
11:48ericmoritz\0Thanks
11:49_ulises,(into #{} (keys {1 2 2 3})
11:49clojurebot#<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: EOF while reading>
11:49technomancy,(set (keys {1 2 3 4 5 6}))
11:49clojurebot#{1 3 5}
11:49_ulisesor that
11:49technomancyI read that as apply hash-map at first and was briefly horrified
11:49technomancyanyway
11:49technomancyis anyone able to repro the bug I'm seeing where github uploads result in this? http://p.hagelb.org/github-download-bug.xml
11:52ericmoritz\0Thanks, (set ...) is the most explicit
11:56scottjgtrak: http://dev.clojure.org/display/doc/Enhanced+Primitive+Support and http://dev.clojure.org/display/doc/Documentation+for+1.3+Numerics
11:57gtrakthanks
12:02scottjthey were both mentioned in the changes.txt that outlines 1.3 changes
12:04k9quainttechnomancy: I think I found a bug in the 1.6.2-snapshot of lein jar
12:05technomancyk9quaint: in the jar file?
12:05k9quaintno, the command
12:05technomancyoh, what's up?
12:05k9quaintit was whacking the classes directory after compile, but before jarring
12:06technomancyare you seeing that on the latest from git?
12:06k9quaintthis was in combination with appengine-magic that i noticed it, rolling leiningen back to 1.6.1.1 fixed it
12:07k9quaintI am checking the latest now
12:22k9quainttechnomancy: ok, I wiped everything clean and regrabbed all the latest and it works
12:24technomancygreat
12:24technomancynow if only github would fix their upload process, I could release
12:24k9quaintI have found that my users experience far fewer bugs if I don't upload things
12:27technomancyactually in the past two days I have had three or four people ask me questions at the conj where the answer was "it's a bug, but it's fixed in git!"
12:28k9quaintunfortunately, I am on the bleeding edge of the appengine + clojure stuff, so I get some ephemeral glitches
12:28k9quaintplus, I am a clojure novice
12:35devntechnomancy: best way to (use 'clojure.repl) when connecting to the swank server?
12:35devntechnomancy: (automatically) :repl-init?
12:35technomancydevn: for the doc macro?
12:36devntechnomancy: *nod* and source, etc.
12:36technomancyjust use C-c C-c d and M-.
12:37devntechnomancy: hm, not sure we're talking about the same thing
12:38devntechnomancy: I want to, by default, have clojure.repl available
12:38technomancysure, but IIUC doc and source are really only useful outside slime
12:39devnfair enough -- just trying to have some sensible defaults in project.clj for people who aren't familiar with clojure
12:39technomancyyeah, I think :repl-init is your best bet there
12:39technomancygrrrr... github is still broken
12:39devndoes repl-init assume that sample-project is under my src/ dir, or can I just pull in my user.clj or something?
12:40devnfrom ~/.m2 or something
12:40technomancy:repl-init just does require and in-ns, as long as it's on your classpath you should be good
12:41devntechnomancy: cool, thanks
12:56klauernI'm getting an error when I start up a REPL, and I don't know what I did wrong in the file it's barking about: IllegalArgumentException Parameter declaration core/http-proxy should be a vector clojure.core/assert-valid-fdecl
12:56klauernI have an http proxy, so I created a simple function to set the Java system properties for it
12:56klauern(defn http-proxy [host port] (do (System/setProperty "http.proxyHost" host) .... etc)
13:03klauernah, nevermind,
13:03klauernI goofed on a separate (defn) in that I didn't pass in the empty [] args
13:04klauernPart of the problem was that it didn't tell me anything about where the error was occurring. I assumed it was in the defn itself, but instead it was in a completely different one that happened to use that
13:05klauern(defn no-proxy (core/http-proxy "" ""))
13:05klauernthrew the error
13:26antares_technomancy: is it just me or github leiningen downloads are broken?
13:26antares_technomancy: I tried to upgrade travis-ci.org cookbook to provide 1.6.2 ;)
13:50scottjantares_zzzz: 12:35 technoma : now if only github would fix their upload process, I could release
13:52ollimmaybe a stupid question, but here goes: is there a ready-made way to sort sequences of sequences? google didn't help me much. basically i need to do an "interleave-by" (by the next largest element)
13:53ollimto add: i'm building a sorted-set-by of the sequences
13:57technomancyantares_zzzz: yep, it's broken
13:57technomancygithub bug
13:59gtrakis there a node.js repl?
13:59gtrakfor cljs?
14:00scottjgtrak: "Currently there are implementations for two environments: Rhino and the browser."
14:01gtrakah, thanks
14:02scottjgtrak: although maybe there's a 3rd party one see mailing list thread subject "NodeJS REPL"
14:03gtrakah neat
14:04gtrakarguing with someone of the virtues of clojurescript for shell scripting over python :-)
14:08scottjcljs compilation phase and no special functionality for shell scripting would annoy me
14:22licensergtrak: why would you do clojurescript for shell scripting? clojure would be the right pick there
14:22gtraklicenser, startup cost
14:23licensercljs has a worst one
14:23licenseryou need java for the compiler + whatever you run your js code on
14:23gtraknot on v8
14:23gtrakpre-compile the js, run it on v8
14:23licenser-.-
14:24gtrakor set-up some sort of cache
14:24gtrakyou know, like python has .pyc
14:24licensera persistant jvm?
14:24kephalegtrak: nailgun?
14:25gtraki suppose if you have a persistent jvm, you don't need to run it on node :-)
14:25licenserI find adding so many layers is a bad idea
14:25licenserthe error handling get exponentially worst with every layer
14:25gtrakhowever, if you want to run-as user, jvm can't help you there, right?
14:25licenserand even clojure does not shine here
14:26licensergtrak: of cause look at cake
14:26gtrakwhat about cake?
14:27licenserit runs a persistent jvm on a user level
14:27gtraklicenser, i'm talking like a cron job
14:28licenserwhy is startup a problem then?
14:29gtrakbecause it takes longer to start the jvm than to do the task? it won't scale
14:29licenserscale?
14:29gtrakscale
14:29licenserscale?
14:30licenserespecially for scaling one time fixed costs are neglectable
14:31licenserit is not like they get worst as your data grows, only execution time is affected there
14:31gtrakit's not a one-time fixed cost, unelss you have a persistent jvm
14:32licenserit is unless you want to run it more frequently with more data in which case I think you have a conceptual problem
14:32gtrakmaybe there exists a scenario where that's not an option
14:32gtrakin that case I'll use python? there's a use-case for this
14:32licenserwhat is your crontab doing?
14:33gtrakpurely hypothetical
14:33licenserwait we are discussing a purely hypothetical problem where it won't scale?
14:34gtrakscalability and reality are orthogonal :-)
14:34licenserto answer that: yes if you have a purely hypothetical problem designed to target the 'week points' of jvm/clojure jvm/clojure is a bad choice :P
14:35licenserwhat I mean:
14:36licenserIf you have a task that runs so frequently that the startup time of jvm is a problem then running it in a crontab is the first bad choice made
14:36gtrakwell yea, if you're committed to the jvm, you'd use quartz
14:36licenseror just do the scheduling within your task
14:37licenserthat is what I mean with en problem engineered to break jvm/clojure
14:37licenserso if you design a system to not work - it won't :P
14:37licenseron the other hand if a task runs so frequently that 500ms startup time are a problem it simply does not belong in a crontab
14:38gtrakwell, you're putting those words in my mouth. actually hickey suggested using clojurescript for shell scripting, and I was just exploring the idea
14:38gtraki wasn't designing something to show a clojure weakness, in fact, I'm arguing with someone else in clojure's favor for this use-case :-)
14:38licensergtrak: I just analyze your problem, not put them in your mouth ;)
14:39licensergtrak: what exactly is the use case?
14:39gtrak'i want to write little shell scripts in clojure'
14:39gtrakbasically, stuff i'd use python for normally
14:40licenserso you want to hand run it not put it in a crontab?
14:40jacortinasyou would have to leverage node and v8 with clojurescript
14:40gtraki prefer clojure, but i know how to do python and haven't bothered with java for that sort of stuff, plus the jvm start-up cost is high
14:40gtrakjacortinas, yea
14:40gtraklicenser, perhaps?
14:40licenserthen a persistent jvm/nailgun would be the way to go
14:41technomancythe JVM's attitude towards posix is to stick its fingers in its ears, go in the corner, and hum loudly to itself.
14:41gtraklicenser, perhaps taking up a ton of memory is not an option
14:41licenserthen closjure is really not the right tool
14:42gtrakthat's a cop-out, what if i'm willing to make miinimal infrastructure changes to clojure to make it so?
14:42Ober?
14:43gtrakjust saying, x is not the right tool for y is bad, there's no design decision of the 'language' that makes it true
14:43TimMcduck1123: I reduced my Foo cannot be cast to Foo test case way down: https://gist.github.com/899696
14:43gtrakunlike say with python and concurrency
14:43licensergtrak: the design decision is to run on the jvm
14:43gtrakhave you heard of clojurescript?
14:43licenserso if your constrains are: low memory footprint, fast startup jvm is bad
14:44gtrakagreed
14:44licensergtrak: have you written a clojurescript something?
14:44gtraktried to :-)
14:44licenserexactly
14:44duck1123TimMc: I haven't seen it since then, but that's still an odd one
14:44gtraklicenser, have you decided that it will never be useful?
14:44licenserI would not trust clojurescript with a sysadmin task
14:44gtraki haven't
14:44licenserno I use it happily right now
14:44licenserjust not for that
14:45TimMcduck1123: gonna post it to reddit
14:45duck1123I'm still trying to figure out what causes this: https://gist.github.com/1349315
14:45licensersee the problem cljs give you is you have: cljs compiler, clojure, jvm, closure, the js vm as problem positions
14:45licenserthat is a lot
14:46licenserwhat I mean is if there is a error in your script trail and error is one of the only ways to find it
14:46gtrakindeed, it needs some help
14:46licenserand in that case I think using python is the better choice
14:46gtrakwell if you have like a nodejs cljs repl, its' not that big a deal
14:46gtrakif the script dev requires a running jvm, that's fine
14:47gtrakthough not optimal
14:47licenserwell compiling for simple programs take like 10s
14:47licenserwhich I find way too much
14:47gtraklicenser, from the api call or the command-line?
14:47gtrakit doesn't take that long for me
14:48licensercommand line
14:48gtrakyea, that sucks
14:48gtrakyou would use a running jvm for repl compilation with the way it exists now
14:48licenserthat means, the startup time for jam is really fast :P
14:54TimMcduck1123: More imports required?
14:56licenseron another topic: had anyone tried macros in clojurescript?
14:56duck1123TimMc: I get that I need to put in the import, and that fixed it. But I don't understand why. (.getBody (get-foo)) works just fine
14:56TimMcduck1123: Is basic/get a macro?
14:57TimMcwait, that doesn't make sense.
14:57duck1123TimMc: no. https://github.com/michaelklishin/langohr/blob/master/src/langohr/basic.clj#L132
14:58TimMcOK, so there's got to be something weird about the hinting.
14:58duck1123I also couldn't assign it in a let block
14:58TimMcfascinating
15:00duck1123I think it might have something to do with the fact that the args are hinted, but not the var
15:13TimMcduck1123: Is there any way to see what the Clojure compiler is generating there?
15:14duck1123TimMc: Not that I know of... other than decompiling the classes
15:14TimMcduck1123: Try (.getBody (#(basic/get channel "foo")))
15:18duck1123That appears to work
15:23duck1123Ok, fixing the type hinting on that fn made it all go away. So I'm going to submit a pull request
15:34TimMcduck1123: What's wrong with the hinting?
15:36duck1123correct me if I'm wrong, but you're supposed to hint a fns return type like (defn ^String foo [] "") and not (defn foo ^String [] "")
15:36TimMcaha
15:36TimMcThere are a couple of those in that file.
15:37duck1123Yeah, I'm going to correct them all and send in the pull request
15:37TimMcI actually don't know much about how hinting is supposed to be done.
15:37TimMcbut it seems like this is also a Clojure compiler problem.
16:07gtraklicenser, dnolen is presenting a node repl as we speak :-)
16:13licenserneta
16:52mindbender1how can I add multiple entry to :dev-resources-path
17:00duck1123try separating with a colon ?
17:05TimMcThat should work, looking at lein's source.
17:11mindbender1duck1123: when I seperate with ":" like this :dev-resources-path "foo":"bar" I get Exception: Invalid token: : (project.clj)
17:12TimMcmindbender1: Put it in the string: "foo:bar"
17:13TimMcIt has to be valid Clojure. Leiningen is just going to take all the relevant path strings and concatenate them with java.io.File/pathSeparator, which is probably ":" on your machine.
17:14mindbender1It works!
17:15mindbender1Thanks.. I've been trying out different things for ages
17:32arohnerdid c.c.shell make it into new contrib?
17:33arohneroh, it went into core 1.3
17:37gfredericksif I want a data structure to throw some elements into one at a time and then read off when I'm done (i.e., reading from it once after writing is completed), is a list going to perform better than a vector?
17:40duck1123gfredericks: there's always ConcurrentLinkedQueue
17:41duck1123also, lamina
17:41TimMcgfredericks: In what order will you read?
17:41gfredericksTimMc: doesn't matter
17:42gfredericksI was going with an atom+list, but was curious because I didn't know for sure that a vector would be worse
17:42gfredericksI think I saw somebody once insinuate that lists are not linked lists
17:42gfredericksI don't know what else they would be though
17:42TimMcThere are different kinds.
17:43TimMcerr... maybe not with lists
17:43TimMcPersistentList only knows about first and rest
17:44TimMcrest could be a non-linked list
17:45gfredericksokay
17:45gfredericksduck1123: I think using anything I haven't heard of would be overkill for this particular problem
17:46gfredericksit's not even performance sensitive. I was just curious.
17:46duck1123For the first one, I just searched on java queues and clicked the one that looked threadsafe.
17:47duck1123as for lamina... learn to love lamina, it's pretty awesome
17:48TimMcgfredericks: Then don't worry about it.
17:48gfredericksduck1123: a queue would be weird. The reading is being done by the same thread that wrote to it.
17:48gfredericksTimMc: but I like knowing how things work :/
17:48TimMcheh
17:48TimMcAbstraction-breaker!
17:48TimMc~guards
17:48clojurebotSEIZE HIM!
17:49duck1123conj should do the right thing no matter what, so if order doesn't matter... use vectors, less typing
17:49gfredericksduck1123: (= (count "[]") (count "()"))
17:50TimMcgfredericks: vs. Java class names
17:50mindbender1As I read and research on TDD and how it's done in clojure.. It continually looks to me like clojure programmers don't bother much about mocking.. is right to think of it like this?
17:50bhenrygfredericks: that only works for an empty list.
17:50duck1123,(= (count "[]") (count "'()"))
17:50clojurebotfalse
17:50TimMc,()
17:50clojurebot()
17:50gfredericksduck1123: you don't have to quote empty lists
17:51TimMcmindbender1: TDD is a contentious topic, I hear.
17:51TimMc,(cons \a "bcd")
17:51clojurebot(\a \b \c \d)
17:51duck1123mindbender1: if you want to mock, check out midje
17:52duck1123You can get away with a lot more things in clojure without resorting to mocking, so it's not as big of an issue
17:53mindbender1duck1123: I wish there was a resource that will show me how to do that
17:55gfredericksduck1123: I was thinking something similar but wasn't sure how to defend it
17:56daakui'm using lobos to write my schema and korma to access it with the h2 db in embedded mode, but seems like there's some conflict about quoting table names. in the h2 console gui, i see the table names quoted which works, and the queries from korma used unquoted table names which dont work. anyone run into this?
17:58duck1123Well, in a traditional OO program, all the state you need is locked up in the objects, since a good functional function is going to get everything it needs via the arguments, it's easier to get everything you need for a good test
17:59duck1123but do check out Midje. https://github.com/marick/Midje/wiki
18:11TimMcdaaku: I think someone else was complaining about that recently -- something about korma not quoting table names, that's all I know.
18:12daakuTimMc: yeah, looks like one quotes the other doesnt, and h2 treats them differently :/
18:15leo2007technomancy: I tried to use fuzzy completion in slime but it can only completes to, for example, swank.core/ but not swank.core/break. Ideas?
18:20archaichow do i go about putting a java library on clojars that i need access to, it's not on maven central (jgraphx), i have downloaded the jar file, is it a matter of placing this in a new project and running lein push?
18:45TimMcarchaic: You may have to hand-craft a pom.xml file according to clojars' expectations. It doesn't have to be very fancy.
18:47archaicthanks, ill start reading about them
18:54cgrayarchaic: I think you can also just install the library locally with maven and then lein will be able to see it
19:07TimMcWhen do we get lazy macros?
19:09aperiodicwhat would be a motivating use-case for lazy macros?
19:10TimMcI don't even know what I mean by that.
19:10TimMcI was hoping someone else would. :-)
19:10aperiodic(delay (macroexpand ...))?
19:11TimMcPerhaps some kind of late code generation. I've been reading "Why Are Black Boxes So Hard to Reuse?", which talks about that, and "lazy macro" popped into my head.
19:12aperiodicI interpreted it as being able to get the compiler to wrap macroexpands in a delay
19:13aperiodicdunno what good that would do, though
20:20archaicso i screwed up a pom file uploading to clojars how can i get the clojar/jar removed? (jgraphx 1.8.0.3)
20:28tolstoyWhen using clj-http, is there a way to see the full response when you get, say, a 400 error?
20:28cgrayis count a constant-time operation on vectors?
20:28duck1123cgray: IIRC, it's something like O(log 32 n) ie damn near 1
20:29cgrayduck1123: it adds the counts in all the subtrees or something? that makes sense...
20:30duck1123don't quite me on that. I just know that some of the things that are supposed to be O(1) are only really close to 1
20:30duck1123quote
20:31cgrayyeah, O(\log_32 n) is close enough for me... i just want it to not be O(n)
20:32duck1123Rich knows better than that
20:32cgraytrue
20:34arohnercgray: actually, count is O(1) on vectors
20:34cgrayarohner: nice
20:34arohnercgray: http://blogs.innoq.com/st/2010/04/clojure_performance_guarantees/
20:34arohnerthere might be an updated version of that somewhere on the internet...
20:36arohnercgray: anything that implements clojure.lang.Counted is O(1)
20:36cgrayarohner: I suppose nth on vector is near-constant
20:36arohnercgray: yes, O(log_32 n)
20:37taufiqprocessing binary files 3-6mb each, i'm using java classes and byte arrays a lot. is that generally how it's done?
20:39taufiqsorry, i realise that's not a lot of info to go on, happy to explain what i'm trying to do
20:43duck1123taufiq: Don't be afraid to go deep into the java classes for stuff like that
20:45taufiqthanks, duck1123. learning as I go, just checking I hadn't missed something
20:58klauernHow do you kill the REPL from leiningen? Ctrl+C doesn't seem to be working at all
20:59klauernI'm in WinXP FWIW
21:13duck1123klauern: C-d ?
21:14klauernThat detaches the Command from the process, but it continues to run
21:14klauernso my command-line will look like the REPL killed, but I can still see the process running
21:17klauernI've also found that the (exit) command does essentially the same as C-d, but it doesn't work at all if you're in a Leiningen project
21:35gfredericksbarfbag2273
21:51wlabelleAnyone working on swank support for clojurescript?
21:57duck1123How do I test is something is a byte array?
22:01usiegj00heya--any clojure users working on web apps w/Jetty within emacs / swank?
22:02usiegj00I've a question about realtime updating the actions...
22:02usiegj00can't seem to overwrite the functions linked to routes without restarting the jetty server
22:02duck1123pass your routes to the start function as a var
22:03usiegj00gotcha… trying
22:03usiegj00and if I update the function connected to a route
22:03usiegj00like
22:03duck1123https://github.com/mmcgrana/ring/wiki/Interactive-Development
22:03usiegj00(GET "/hello" [] hello-world)
22:03usiegj00if I change hello-world and send the buffer to my bound clojure process
22:03usiegj00it doesn't update
22:03usiegj00since
22:04usiegj00the route grabs the previous function def?
22:04usiegj00this is different to my allegro lisp memories (10 years ago now...)
22:05duck1123if you give the arg to run-jetty as a symbol, then those routes are stored, if you pass it as a var, then when you update the routes, it'll pick that up
22:07usiegj00gotcha
22:07usiegj00thank you!
22:10gfredericksduck1123: (= (type maybe-a-byte-array) (type (byte-array [])))
22:10gfredericksthat's how I did it anyways.
22:12duck1123that's a lot of writing for a simple midje test. Perhaps I should make a custom checker
22:59tolstoyIs there a multi-line string sort of literal in Clojure?
23:00tolstoyOh, I see. Just regular quotes.
23:02aperiodicduck1123: check the class?
23:05aperiodichm, that's seems to be the same as type for byte arrays
23:06aperiodicbut if you wanted it to be shorter, then it'd be (
23:06aperiodic(= (class testee) "[B")
23:07duck1123that should work
23:10duck1123but it didn't
23:11duck1123,(class (byte-array []))
23:11clojurebot[B
23:12duck1123,(= (class (byte-array [])) "[B")
23:12clojurebotfalse
23:23wtfcoderadding clojure-rabbitmq "0.3.2" to my project.clj and doing lein deps results in several errors "unable to locate resource in repo..".. answering my own question.. it looks like lein deps isnt searching mvnrepository.com - how to configure lein to do this?
23:24antares_wtfcoder: it should use maven central by default
23:24duck1123wtfcoder: also, you might want to check out https://github.com/michaelklishin/langohr
23:24antares_wtfcoder: if you need clojure-rabbitmq, i recommend you to take a look at Langohr
23:25antares_wtfcoder: it is on clojars
23:25antares_and I can tell you what repo to add to get RabbitMQ java client :)
23:26antares_wtfcoder: so if that resource is RabbitMQ Java client (which is usually pushed to Sonatype first), add it like this: https://gist.github.com/1361590
23:28wtfcoderthanks. so ive added [langohr 1.0.0] to my :dependencies vector and ran lein deps but still immediately results unable to locate resource in repo
23:29wtfcoderantares_ so I have to add that :respositories to my project.clj?
23:30antares_wtfcoder: Langohr is 1.0.0-SNAPSHOT
23:30antares_wtfcoder: yes, you need to add Sonatype repo to your project.clj
23:31antares_and same for clojure-rabbitmq, actually
23:31wtfcoderokay a few erros in my project.clj, fixed and now downloading.. thanks
23:32antares_wtfcoder: could you gist the error message? we cannot really know what artifact leiningen cannot locate
23:32antares_ok
23:32antares_wtfcoder: I am the author of Langohr and maintain a couple more AMQP clients so if you have questions, feel free to ask. We are working on the docs site and it is not yet ready :(
23:32duck1123antares_: did you see the discussion about the strange issue I was having earlier
23:33wtfcoderwith regarding to versioning does lein deps support defining dependencies like [ns/app "0.3.x"] which will get the latest in the 0.3.x ala npm/package.json
23:33duck1123it looks like the functions are type-hinted incorrectly
23:34wtfcoderantares_ thanks will give it a try porting a node.js consumer across
23:34antares_duck1123: sorry, I haven't
23:35antares_wtfcoder: do you use node-amqp? I am not very familiar with that but since it is Ruby amqp gem's port originally, I think understand the difference between them well enough :)
23:35antares_wtfcoder: also, maybe http://bit.ly/amqp-model-explained will help with understanding client lib differences
23:35duck1123Here's the gist https://gist.github.com/1349315 It turns out that some of the functions put type hints on the arg lists and it causes odd errors
23:36duck1123I was working on a pull request, but then I got distracted
23:36antares_duck1123: I think it is missing an import
23:36antares_duck1123: thanks for the script, I will look into it a bit later
23:39leo2007duck1123: do you fuzzy completion with slime for clojure?
23:40duck1123leo2007: I've never gotten the fuzzy completion package to work
23:40duck1123antares_: pull request sent
23:41leo2007duck1123: same here.
23:42duck1123the default completion works well enough for me
23:43antares_duck1123: hm, good catch. I was switching to the "per form" hinting and messed up in the process. Sorry about that.
23:44duck1123no problem. I finally got around to swapping out wabbitmq the other day, and that had my head scratching
23:44antares_duck1123: cutting a new snapshot already
23:44duck1123putting the import in there made it work though
23:44wtfcoderantares_ is publish async in https://github.com/michaelklishin/langohr/blob/master/src/langohr/examples/basic_publish.clj
23:45technomancydakrone: nice; connection pooling on the https
23:45antares_wtfcoder: publish is always async in AMQP so yes
23:45antares_wtfcoder: those examples are from very early days, check out tests
23:46antares_we just use Java client's Channel#basicPublish
23:46antares_nothing on top of that
23:49antares_wtfcoder: I just pushed a new Langohr snapshot, please run lein deps
23:58dakronetechnomancy: thanks!
23:58dakronetechnomancy: have you been using it a lot? does it help you at all?
23:59dakroneI'm anxious for feedback about it
23:59technomancyI haven't tried it yet