#clojure logs

2014-02-09

00:32ivanI fixed the pygments clojure lexer but now everything looks worse when the specials list only includes specials
00:32ivannow I have to come up with elaborate rationale for a list of builtin macros to highlight as a pygments Keyword instead of a Name.Builtin
00:34ivanbindings_and_control_flow = [...]
00:41dsrxany way I can use destructuring to bind to the last several elements of a sequence?
00:41dsrxsomething like [[& _ x y] [1 2 3 4]]
00:41dsrxwhere i'd like x and y to be bound to 3 and 4
01:01xuserdsrx: you can use map destructuring in that case
01:02xuserdsrx: [{x 2 y 3}
01:02quizdrxuser i suppose you mean where 2 and 3 are the index keys, right?
01:02xuser [{x 2 y 3} [1 2 3 4]]
01:02xuserquizdr: yes
01:02quizdrbut what if you don't know how long the args list is? I suspect that's what dsrx is asking
01:03quizdrin which case i'd think you just get the entire collection as a single binding, and call collection functions to get the last couple elements [& everything]
01:06xuserquizdr: yeah, I guess you can pull the values from the collection in the bingding vector
01:16quizdrxuser what i mean i don't know if you can actually do what dsrx in the destructuring, you'd have to call functions on your entire passed collection list within the function definition
01:17quizdralthough i know destructing can be a deep minilanguage on its own so i might be overlooking an obvious solution
05:26piranha_damn, somehow core.async fails me in advanced compilation mode :(
05:51piranha_is the author of sablono here? :)
08:17voldymanany recommendations for caching data in a web server?
08:18mercwithamouthok '(blah) vs (list blah) (list ...) evaluates they say. can someone sort of help me out here? i'm not even sure what to ask
08:19llasrammercwithamouth: Well, what are you trying to understand?
08:19d11wtqmercwithamouth: What's the question? '(blah) is equivalent to (list 'blah), but (list blah) is the list of variable "blah".
08:20llasram,(read-string "'(blah)")
08:20clojurebot(quote (blah))
08:20scottj,(let [blah 1] ['(blah) (list blah)])
08:20clojurebot[(blah) (1)]
08:21llasramhaha, too many teachers in the classroom
08:21d11wtq,(= '(blah) (list 'blah))
08:21clojurebottrue
08:21mercwithamouthlol
08:21mercwithamouthoverload
08:21mercwithamouth(list ...) allows you toevaluate...but evaluate what?
08:22mercwithamouth,(count '(1 2 3))
08:22clojurebot3
08:22mercwithamouth,(count (list 1 2 3))
08:22clojurebot3
08:22d11wtqmercwithamouth: (list ...) allows you to interpolate variables into lists, effectively.
08:22llasramEr
08:22d11wtqmercwithamouth: While '(... ) quotes the entire list.
08:22llasramI think starting a little earlier might help
08:22mercwithamouthah! ok
08:23llasramCode is data. We store the data as strings. The reader translates strings into data.
08:23mercwithamouthwell i gotcha. i'm reading programming clojure and clojure in action. i'm just going through http://java.ociweb.com/mark/clojure/article.html so i decided to stop and see what they meant
08:23llasram,(read-string "'(blah)")
08:23clojurebot(quote (blah))
08:23llasram,(read-string "(list blah)")
08:23clojurebot(list blah)
08:23llasramThe compiler is what turns data into code
08:24voldymanmercwithamouth: braveclojure.com explains these things pretty nicely.
08:24mercwithamouthvoldyman: ahh yeah, i have that site in my bookmarks as well
08:25voldymanits what helped me go from 0 - a simple website in a week
08:25voldymanand #clojure is always helpful
08:25mercwithamouthi'll go ahead and work my way through it today. i suppose it would help if i didn't jump around
09:32AeroNotixDid anyone get JSVC working with Clojure apps? https://github.com/clojure-cookbook/my-daemon/issues/1
09:32AeroNotixThe cookbook claims to have this working, but I can't get it to on my system.
09:33AeroNotixI can't even get the example project to run? Same error with my personal projects.
09:41AeroNotixif I `jar -tf $MY_UBERJAR` then it has the class in it!
09:41AeroNotixhuh
09:42AeroNotixI've tried lein-daemon but for some reason it hangs on my CI server and never starts
09:44AeroNotixany ideas guys/gals?
09:45AeroNotixhow do you guys daemonize your Clojure applications?
09:48hyPiRionAeroNotix: http://www.rkn.io/2014/02/06/clojure-cookbook-daemons/ has a tutorial on that.
09:48AeroNotixhyPiRion: please look at the link I posted, I already said I'm following _that_exact_thing_
09:49AeroNotixI get the same error with the code associated with that blog post and my own projects
09:49benzapIs there an article out there outlining the several different clojure web frameworks / methods of deployment?
09:49benzapI'm having a really hard time finding something I like
09:53AeroNotixhyPiRion: could you try running this locally? It takes like 2 minutes to try\
09:57llasramAeroNotix: I daemonize Clojure applications by building uberjars then running them under an init system (runit), essentially as with any other language
09:57hyPiRionAeroNotix: wish I could, but I'm away from work computer now
09:57AeroNotixhyPiRion: ok
10:08piranha_dnolen: here by any chance?
10:26hyPiRionAeroNotix: perhaps try what llasram suggested instead?
10:26AeroNotixWhat did he say?
10:27AeroNotixhyPiRion: ^
10:27hyPiRion"I daemonize Clojure applications by building uberjars then running them under an init system (runit), essentially as with any other language
10:27llasramAeroNotix: Haha, I un-/ignored you, but you have me /ignored ?
10:27hyPiRion"
10:28AeroNotixllasram: I don't, nor have ever /ignored you
10:28llasramFair enough then
10:28AeroNotixllasram: the problem with that is, how to programmatically do it in a sane way with CI?
10:28AeroNotixI want to run acceptance test suites, essentially just running the jar, then my external test suite, then killing the server.
10:29AeroNotixAt the moment, I hacked together a Python script to spawn the server, then the test suite and then recursively kill the process tree
10:29AeroNotixdue to the jar forking plenty of proceses
10:29AeroNotixprocesses
10:29AeroNotixlein-daemonize worked locally, but failed to start on my jenkins server, and it's annoying to debug. So I looked into other methods
10:29llasramI see... Maybe just build the uberjar and spawn that as the service then? Should match what you'd end up doing in production
10:31technomancy(inc uberjars+runit)
10:31lazybot⇒ 1
10:31AeroNotixllasram: I'd like to get the daemon working since this would also help our ops team with making services
10:31llasramheh
10:31AeroNotixsince it seems to allow arbitrary code execution when stopping/killing services
10:32llasramAeroNotix: What init system are you using? I guess I'm not following what differentiates a script launching the JVM w/ an uberjar from a service
10:32technomancyself-daemonizing processes usually involve a lot of wheel-reinventing
10:32AeroNotixllasram: the fact that it blocks, and needs killing, for a start.
10:32AeroNotixtechnomancy: exactly why I want to use apache daemon
10:32technomancyAeroNotix: eh; apache just NIH'd it too
10:33technomancythis stuff is a ton simpler if you do it outside your process
10:33AeroNotixllasram: in production? Not sure, tbh. The ops team uses Ubuntu, so whatever Ubuntu uses I guess?
10:33technomancythat'd be upstart
10:33technomancyclojars uses upstart
10:33AeroNotixI'll take your word for it, I don't touch ubuntu
10:33technomancyit's not great, but it is simple
10:33AeroNotixWhy isn't this a solved problem though?
10:33AeroNotixtechnomancy: you work for Heroku, what do they use?
10:33technomancyhm; I don't see that it isn't
10:34technomancyAeroNotix: an out-of-process daemonization system =)
10:34technomancyhttps://github.com/ato/clojars-web/blob/master/SYSADMIN.md
10:34technomancyhm; I guess that doesn't give the exact upstart config
10:34llasramAeroNotix: upstart works with processes which do not daemonize themselves. In my experience, that model is simpler for everyone
10:34AeroNotixthe other thing is, I want a solution which can work in isolation, cross platform and on-demand. It's a lot to ask for, I know. Our developers use a mix of MacOSX and Linux, so a pure Java solution would be perfect.
10:35llasramdevelopment OS != production OS -> madness
10:35AeroNotixllasram: don't the majority of developers use MacOSX these days?
10:35llasramEspecially with all the options (vagrant etc) to make them match
10:35technomancy(inc *1)
10:35lazybot⇒ 2
10:35technomancyoops race condition
10:36llasramhaha
10:36technomancyAeroNotix: lots of macosecksists just use it as a platform on which to run linux for development
10:36AeroNotixtechnomancy: *this* sounds like madness, as far as I am concerned. But that's for another day.
10:37AeroNotixRegardless, did anyone try the my-daemon demo app?
10:37technomancyyou'll never get things to work the same
10:37llasramAeroNotix: You can run whatever you want on your development system as the bare-metal OS, but the code you're developing should run in development under the close-as-possible env to what you run in production
10:37AeroNotixllasram: I get that. It's a nice idea to strive for.
10:37AeroNotixvagrant isn't a panacea
10:37AeroNotixnor is docker
10:38AeroNotixRunning things locally is fine for a whole slew of languages/platforms
10:38llasramNo, but they're both better than "it works under OS X" :-)
10:38AeroNotixllasram: I don't run things on OSX
10:38AeroNotixMy development machine is Linux.
10:38technomancythe effort it takes to try to get the exact same version numbers across OSes is an ongoing time suck; getting a production-like env on your laptop is a one-time up-front cost that pays back over time
10:38llasram(inc technomancy)
10:39lazybot⇒ 97
10:39AeroNotixI'm not arguing with that
10:39AeroNotixbut there are other factors at play here
10:39AeroNotixnamely, political issues regarding getting mac users to put down their shinies
10:39technomancy=\
10:40AeroNotixI'm introducing clojure at my workspace with a periphery project. I want to make it as seamless as possible
10:40AeroNotixLein has gone a long way, especially in contrast with Rebar
10:40AeroNotixBut Erlang comes with releases, which allow the developer to not even realise that application daemonizing is a thing
10:41AeroNotixso I want to have something which I can literally have "app {start,stop}"
10:41AeroNotixwhich Erlang has, and I'm sure is possible in Clojure/JVM land
10:42hyPiRionQ: Do people tend to define all records in the same namespace in an application?
10:43llasramhyPiRion: Elaborate?
10:43AeroNotixtechnomancy: so how do you guys do CI/testing?
10:43AeroNotixwith Clojure applications
10:43hyPiRionllasram: I want to define a couple of records. Should I put them all in the same for namespace? They're essentially just used as structs.
10:43llasramAeroNotix: In Turing, all things are possible. I consider what you've described undesirable, and thus have no experience with to suggest options :-)
10:44AeroNotixllasram: which aspect is undesireable?
10:44llasramAeroNotix: Processes daemonizing themselves
10:44AeroNotixllasram: Erlang gives you the option
10:45technomancyAeroNotix: when I was using clojure we just used jenkins
10:45llasramSure. And maybe it makes sense for Erlang in historical context. I don't think it's a good way to think about services on current Unix-y distros
10:45AeroNotixtechnomancy: great, we're using Jenkins. Can you give me any more information?
10:46technomancyAeroNotix: there wasn't really anything clojure-specific about our setup
10:46AeroNotixtechnomancy: so what did you do for testing e.g. REST endpoints or some other http listener?
10:46AeroNotixI want to do end-to-end testing
10:46technomancywe just had a bin/setup script in the repo that would pull in apt-get dependencies and a bin/ci script that would kick off the CI run
10:46technomancythe system I worked on was an AMQP worker
10:47llasramhyPiRion: Ah. I don't use defrecord much... Interesting question
10:47technomancyAeroNotix: FWIW the platform independence thing is different on erlang; they have a strong motivation not to rely on anything outside the BEAM VM for reliability reasons which simply arent' present on the JVM
10:47technomancybut I understand that decisions like that can't always be made for technical reasons
10:48AeroNotixtechnomancy: it's part of it, but there's a whole deployment / upgrade philosphy around Erlang where it makes sense. It just doubles as a succinct way to test things.
10:49technomancyAeroNotix: but as far as organizing our code, we had a primary entry point as a -main invoked via an uberjar, and then some admin helper namespaces also done as -main defns
10:49AeroNotixtechnomancy: so, did you spawn these processes off and then run tests/
10:49AeroNotix?
10:50technomancyAeroNotix: oh, no the tests were just `lein test` affairs. we didn't do any fully end-to-end tests
10:50AeroNotixtechnomancy: ok, cool
10:50AeroNotixhttps://gist.github.com/AeroNotix/db274b8e6863a412de0a
10:50AeroNotixI'm using this at the moment
10:51benzapHey guys, i'm trying to include other directories for the ring-server to monitor, and i'm not really certain on the relative path
10:51benzapdoes this look correct? http://cljbin.com/paste/52f7a2cbe4b014e0a4429c5e
10:51benzapI have a folder resources with a template folder, with templates
10:51benzapand then i'm still referencing my src directory
10:52benzapi've found that it still works with my handler in the src directory, but modifying my templates don't have any effect
10:58technomancyAeroNotix: seems reasonable
11:02ornicarhello there!
11:03ornicarI've been trying and googling for long enough now, time to try asking #clojure :P
11:04ornicarI have 2 async channels, I want to wait and do something when both chans have outputed a message.
11:04ornicarI've been trying merge, but it gives me only the first message sent by the channel that completes the faster
11:04ornicar(<! (merge chan-a chan-b)) ; I get the message of whatever chan outputs first
11:05ornicarwhat I want is:
11:05ornicar(let [[a b] (<! (??? [chan-a chan-b]))
11:06ornicarwhere ??? is the function I'm looking for.
11:06ornicardoes it make sense?
11:15llasramornicar: Don't you just want (let [a (<! chan-a), b (<! chan-b)] ...)
11:16ornicarI don't know which one will return first.
11:16ornicardoes it matter?
11:17AeroNotixTIL you can merge channels
11:17llasramOh, I guess it could, because of fixed-size queues
11:17llasramI haven't actually used core.async yet, so can comment no further :-)
11:18AeroNotixornicar: alts?
11:19ornicarno, alts! behaves like merge in this case
11:20AeroNotixdo you need to know which channel the message came from?
11:20llasramBut doesn't alts! let you know the channel? Then you just wait on the other one
11:20ornicarafaik, (<! (merge [a b])) is similar to (alts! [a b])
11:20ornicarexcept, yes, you know the chan
11:21ornicarwell I can hack my way around, but I wanted to know if there was a standard solution to this, imo, common problem: parallelism.
11:21clojurebotPardon?
11:48tpopebbloom: is it just (comment ...) stuff tripping you up?
11:48bbloomtpope: yeah, getting used to it a bit, but as you know, it's hard to retrain your fingers :-)
11:49bbloomtpope: also my workflow has changed a bit over time
11:50bbloomtpope: i used to re-eval individual defs a bunch, but now i just cpr the whole file
11:50bbloomtpope: my workflow used to involve re-evaling top-levels a lot back when i used tmux hackery to emulate real repl integration, but when you released foreplay, i no longer had to do that
11:51bbloomtpope: since then, i've basically stopped evaluating top levels, since cpr is so easy to do
11:53bbloomthe only time i really have to eval a top level form is if i'm changing a definition in namespace with deftypes or defprotocols other than the namespace i'm currently working on
12:13ambrosebsfor those core.typed + vim users out there https://github.com/typedclojure/vim-typedclojure
13:33bacon1989Hello, i've been trying to get a simple development server running clojure for a while now, and i'm having a hard time getting some more advanced functionality working
13:33bacon1989I tried following this example http://stackoverflow.com/questions/1665760/compojure-development-without-web-server-restarts
13:33bacon1989and made a few changes into this http://cljbin.com/paste/52f7c8b4e4b0f2c6653e9f1d
13:34bacon1989i'm able to get the web-server running just fine, but the wrap-reload line doesn't seem to be working
13:34bacon1989i've even been running the server within the repl, which means the evaluating certain things, like the main-routes, should have changed the web-server's main-routes variable, no?
13:36technomancyambrosebs: have you seen https://github.com/technomancy/nrepl-discover ?
13:37technomancyI would like to see more tooling like that happen in an editor-agnostic way
13:39bacon1989Has no one here ever set up a clojure web server?
13:40technomancybacon1989: if it's not picking up reloads then probably you need to pass a var to run-jetty instead of a function
13:40technomancy(just a guess; that's the common mistake)
13:42bacon1989so I should change my defn app to an def app, etc?
13:43technomancybacon1989: yeah, and do (run-jetty #'app ...)
13:44bacon1989technomancy: oh nice, that did the trick
13:44technomancyvars are great
13:44bartxxMaybe this time I'll have more luck (sory for asking same question 3rd time): is there any way to extract and save (to file for example) state of core async's "go" state machine?
13:44bacon1989that's interesting, I wonder if I should respond to that stack overflow article, and update it
13:58clojuredoodhey guys.. just wondering what a concise way is to check if string starts with any one of a collection of substrings ?
14:08clojuredoodI suppose I'm basically hoping I can supply a set to a 'startsWith' alike function
14:08clojuredoodany ideas ?
14:09fowlslegsclojuredood: are the substrings of variable length?
14:09clojuredoodyes
14:10clojuredoodis regex the best way to go instead ?
14:10systemfaultsome + startsWith (I'm a noob so don't trust me)
14:10clojuredoodsystemfault: I don't understand that sorry
14:11systemfaulthttp://clojure.github.io/clojure/clojure.core-api.html#clojure.core/some + String.startsWith ?
14:12fowlslegsMaybe something like this
14:12fowlslegsActually hold on
14:12clojuredoodsystemfault: I begin to see thanks
14:13sdegutisDo you have to manually convert a clojure.lang.PersistentVector into a System.Collections.Generic.IEnumerable?
14:14sdegutisI thought since the first is concrete and the second is an interface, it wouldn't need a conversion.
14:14sdegutisBut then I see: Unable to cast object of type 'clojure.lang.PersistentVector' to type 'System.Collections.Generic.IEnumerable`1[System.String]'.
14:22fowlslegs)
14:23fowlslegs(for [x (range 1 longest prefix)] (if #(some (apply str (take x "string")) prefixlist) (apply str (take x "string"))))
14:23fowlslegs^clojuredood
14:23clojuredoodfowlslegs: thanks! I will take a look now
14:26pyrtsafowlslegs: What was that supposed to do? o_O
14:29fowlslegs(def stringlist '("p" "f" "li" "far"))
14:30logic_progI thought I was going to get some work done today. Then, I stumble across http://www.youtube.com/watch?v=Y8gttn9xmtA
14:30fowlslegs(def stringlist '("p" "f" "li" "far"))
14:30fowlslegs(for [x (range 1 4)] (let [prefix (apply str (take x "fargo"))] (if (some #(= prefix %) stringlist) prefix)))
14:30fowlslegsclojuredood pyrtsa ^^
14:30pyrtsaTo find which prefix matched?
14:31fowlslegsYeah
14:31fowlslegsclojuredood asked for a simple way. I am pretty new to Cloj, but that's what seemed most simple to me.
14:31pyrtsa,(first (filter #(.startsWith "fargo" %) '("p" "f" "li" "far")))
14:31clojurebot"f"
14:32clojuredoodfolwslegs: you've given me a boost... gave me some ideas... I've got as far as : (some #(if (.startsWith some-string %) true false) prefixes)
14:32clojuredoodseems to be working so far
14:32clojuredoodthanks!
14:33fowlslegsI wonder if that java function is performing the same comparisons as my fn.
14:33pyrtsaclojuredood: The (if ... true false) is redundant though. Just do #(.startsWith ...) there.
14:33clojuredoodpyrtsa: awesome, another refinement
14:34pyrtsa,(some #(.startsWith "fargo" %) '("p" "f" "li" "far"))
14:34clojurebottrue
14:36clojuredoodlol, clojure is just awesome
14:36fowlslegsMy fn ran in .33ms vs .11ms for pyrtsa
14:36pyrtsaIf the list of substrings is a compile-time constant, you can just use e.g. ##(re-find #"^(?:p|f|li|far)" "fargo")
14:36lazybot⇒ "f"
14:36clojuredoodthanks guys
14:46fowlslegspyrtsa: I'm new to regex. Would you enlighten me as to how to alter the above function s.t. "f" and "far" are returned.
14:49pyrtsafowlslegs: Doesn't sound like a problem that you'd tackle with (one) regex anymore.
14:49fowlslegsYeah I thought that too and was trying to figure out the re-find/re-matcher relationship.
14:50pyrtsafowlslegs: ##(keep #(re-find % "fargo") [#"^p" #"^f" #"^li" #"^far"])
14:50lazybot⇒ ("f" "far")
14:53fowlslegsSo in the original ^ means "starts with" and x|y means "find x or y", but why the ?:
14:53pyrtsaThe regex part of clojure.core is a bit limited, by the way. It doesn't expose a way of finding *where* the pattern matched in the string, only *whether* and *what* it matched.
14:54pyrtsafowlslegs: The (?: ... ) is a non-capturing block.
14:54pyrtsaIf you omit the ?:, it turns into a capturing one, and -- somewhat surprisingly -- re-find starts to return vectors instead of strings.
14:55fowlslegsYeah I noticed.
14:55pyrtsaVectors containing both the whole match as well as the captured blocks (one or many).
14:55pyrtsaI don't think it's the prettiest API design, but it's pretty common practice in many dynamic languages.
14:56fowlslegsI don't see anything about non-capturing blocks on the oracle regex doc http://docs.oracle.com/javase/tutorial/essential/regex/index.html
14:56fowlslegsmaybe I just skipped over it.
14:56pyrtsafowlslegs: http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html
14:56pyrtsa"(?:X) -- X, as a non-capturing group"
14:57fowlslegspyrtsa gratsi
15:54steckerhalterif I fetch some content from url and store that in a variable (I will update it from time to time), what should I use? atom/ref/..
15:55llasramsteckerhalter: Depends on the update model, but it sounds like an agent could be appropriate
16:09steckerhalterllasram: ok, I'll try that, thanks
16:09akyte`Can clojure/android handle intents without issue?
16:50KrajsnickIs it possible getting code completion for Clojure and imported deps within Vim?
17:49seangroveI have a bunch of :style attributes I need to modify in an emacs buffer. I wrote a clojure function that does what I want for each individual one. I then recorded an emacs macro that finds the next :style attribute, cuts it, switches to the clojure repl, transforms it into the desired for, then copies the new form back into the original location
17:50seangroveThe problem is, it always fails on copying the result from the repl. I think ti could be a race condition, where the macro step to copy the resultant form runs before the repl can return, so it copies the wrong thing. Any tips on how to do this in a cleaner way?
17:53llasramseangrove: The communication between emacs and the nrepl server is async, so that's almost certainly what's happening. I don't have any good ideas on how to fix w/o just writing some elisp to call into the nrepl server yourself though
17:54seangrovellasram: Yeah, I'm not clear on how to do that either. Probably a good idea long term to figure it out though. Any idea if it's clean/simple enough?
17:54seangroveMaybe I should just write the function in elisp
17:55llasramThe functions looked straightforward when I've poked around, but I haven't actually tried to do anything like what you're describing myself
18:18seangrovellasram: The hack for today is just M-: (sleep-for 0.25)
18:32greghendershottIs HEAD wonky? I pushed a commit that only fails HEAD (not 4 other vers inc 5.92): https://travis-ci.org/greghendershott/rackjure/builds/18548966
18:33greghendershottand fails it with SIGSEGV MAPERR https://travis-ci.org/greghendershott/rackjure/jobs/18548971 O_o
18:34greghendershott... and I'm on the wrong channel ... sorry!
18:34gfredericksclojurebot: HEAD is wonky
18:34clojurebotOk.
19:11scape_how could i merge a smaller byte array into a larger? or should I do this sequentially with aset-byte?
19:16hyPiRionscape_: System/arraycopy perhaps?
19:16benkaya test fixtures question: i'd like to spin up a tcp server in the setup phase of my fixture, and tear it down in the teardown phase. to stop this tcp server (aleph) I need to call the function returned when I start the tcp server. would it be idiomatic to (def stop-server (tcp-server {blablabla})) in the setup phase and then (stop-server) in the teardown phase?
19:22scape_ill take a look thx hyPiRion
19:25scape_benkay: it's somewhat familiar in other frameworks to do that-- I personally don't like it, it'd make more sense to receive some server object/map that you'd pass to a stop-server function. which is how I modeled my tcp server (not using aleph)
23:10tolstoydnolen: Do we need to do something extra to get onMouseOver and so on to work in OM?
23:12tolstoydnolen: Hm. Maybe somehow get the react-with-addons....
23:15tolstoyOh, alas: https://github.com/swannodette/om/issues/59 (22 days ago)
23:32ambrosebstechnomancy: not aware of nrepl-discover
23:32ambrosebstechnomancy: love the idea. I'm going to have to reimplement this functionality many times I bet.
23:33amalloybenkay: why would you def it rather than just letting it? setup and teardown happen in the same lexical scope for test fixtures
23:35benkayso (let [thinger (stuffs)] ... (thinger))
23:35benkay?
23:36amalloyindeed
23:36benkay(defn my-fxt [fn] (let [close-server (open-server)] (fn) (close-server)))
23:38benkayyeah that makes a great deal of sense. i think i was assuming that the let'd be the setup phase, and that I'd have to close the let in the setup phase and lose access to the bindings declared therein.
23:38benkaythanks amalloy!
23:47frozenlo`Is there a `distinct' fn that's like `filter'? (distinct my-fn [coll])
23:48amalloynothing built in, Frozenlock, but of course you can implement distinct-by pretty easily
23:51Frozenlockamalloy: ok, thanks
23:54srrubyWhich jdk do you recommend? My server runds debian wheezy. Thanks, John