hello,
i'm looking for some feedback on how i've used Clojure to do some file
parsing
still getting the hang of Clojure ways of thinking and i'd love to hear any
advice on how to improve what i've done
for example, i'm guessing the way i've used cond blocks is a bit sketchy -
at that point, i w
Curious about which emacs packages folks use for increased Clojure
productivity (beyond the obvious, like slime/swank-clojure)...
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that
I am setting up tests with clojure.test that are driven by a CSV where
each line represents one test case. Right now, there is a single
deftest function that runs all the assertions. That's ok but creates
reporting like 1 test was run with 1000s of assertions. Clojure being
so dynamic, is it possib
How can lazytest describe blocks be run from the repl?
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your
first po
run-tests like a file full of deftests)?
On Oct 31, 9:56 am, Nate Young wrote:
> On 10/28/2011 09:42 AM, AndyK wrote:> I am setting up tests with clojure.test
> that are driven by a CSV where
> > each line represents one test case. Right now, there is a single
> > def
I would like to block the thread until an agent has done its thing -
in this case serving as a cap on a timer. I had thought that wrapping
a call to the timed-agent function with await would do just that, but
apparently not. At least in the repl, the function returns immediately
and you can follow
ideas for using Timer while blocking the
current thread? Is a future a better choice here?
On Nov 1, 4:19 pm, AndyK wrote:
> I would like to block the thread until an agent has done its thing -
> in this case serving as a cap on a timer. I had thought that wrapping
> a call to the timed-
not depend on the value of the agent -
the agent is just a convenient way to limit the timer.
On Nov 1, 4:29 pm, AndyK wrote:
> After a bit more digging - Timer is a background thread so clearly
> that's not going to mesh well as a foreground blocking activity with
> agent (which
I'm running into a strange problem that I can't see the bottom of.
Wonder if someone can explain why I'm seeing the behavior I'm
seeing...
I have a function that uses a Java timer to run a function and can
also check the results of that function by passing in an optional test
function
(defn timed
Is it possible to print information about a function from within the
repl? For example, after using comp or partial to create new
functions, can you display the arity, the source, etc? I'm trying to
debug a problem and it would be handy to be able to check that my
dynamic funcitons are what I think
I believe I have setup korma correctly with
(require '[korma.db :as db])
(require '[korma.core :as sql])
(db/defdb devdb (db/mysql {:db "mydb" :host "localhost" :user
"me" :password "mypass"}))
(sql/defentity mytable
(sql/select mytable (sql/fields :id) (sql/where {:id 1})))
But I'm getting
SQLExc
I've noticed that swank (which I run in emacs using M-x clojure-jack-
in) doesn't pickup changes to the classpath on-the-fly. For example,
if I update my leiningen project.clj with a new dependency and run
lein deps, I need to restart swank to have it use the library. Is
there a way to load somethi
(sql/
> where {:id 1})))
>
> I does this work?
>
> (sql/defentity mytable
> (:pk <<< YOUR PRIMARY KEY AS A KEYWORD>>>)
> (table <<>>)
> (database devdb))
>
> (sql/select mytable (sql/fields :id) (sql/where {:id 1}))
>
> On Nov 4
Is it possible to pass command-line arguments to tests using
leiningen? Looking for ways to control the way that tests are run
using lein test by passing in switches (e.g. which environment it runs
against, which tests run, etc). One workaround that occurs to me is to
use lein run where run calls r
Nov 7, 5:17 pm, Phil Hagelberg wrote:
> On Mon, Nov 7, 2011 at 2:14 PM, AndyK wrote:
> > Is it possible to pass command-line arguments to tests using
> > leiningen? Looking for ways to control the way that tests are run
> > usingleintestby passing in switches (e.g. which envir
; :: " scenario
the file did compile.
Is the fact that deftest is also a macro going to cause a problem with
the original idea?
On Nov 2, 8:36 am, Nate Young wrote:
> On 11/01/2011 03:05 PM, AndyK wrote:
>
> > How would (run-tests 'my-namespace) know to run all thosedynami
e a tabular fact. Tje tabular fact will give you good
> reporting.
> On Nov 8, 2011 1:44 PM, "AndyK" wrote:
>
>
>
>
>
>
>
> > I finally had a chance to try this out and it fails with
>
> > error: java.lang.ClassCastException: java.lang.String
I have been using Clojure to write tests on RESTful applications.
Since the requests are independent, parallelizing would speed things
along. What is the best approach? Using pmap is the obvious first
step. Afaik, pmap only creates a small pool of threads. Is there more
to gain by going to the Java
If you're willing to dig into another language, 'Erlang and OTP in
Action' gives a great overview of Erlang and the distributed
principles underlying that language. Though different from the
approach of distributed STM, the concepts of distributed applications
are baked into the core of Erlang.
On
I have Clojure code which makes HTTP requests to a server. Depending
on the context, I want to swap out the underlying HTTP library code.
For example, I use an instrumented library in a testing context and a
different library in a REPL context where the instrumented library
will not work. These are
lag and fork
> in the code O_o
>
>
>
>
>
>
>
> On Wed, Nov 30, 2011 at 5:53 PM,AndyK wrote:
> > I have Clojure code which makes HTTP requests to a server. Depending
> > on the context, I want to swap out the underlying HTTP library code.
> > For example,
I'd like to be using swank-cdt, but I'm running into the tools.jar
problem
warning: unabled to add tools.jar to classpath.
CDT 1.4.0a startup failed: #
In project.clj, I've tried
:extra-classpath-dirs ["/usr/lib/jvm/java-6-sun/lib/tools.jar"]
and
:dev-resources-path "/usr/lib/jvm/java-6-openjdk
ck-in
Thoughts?
On Dec 5, 1:32 pm, AndyK wrote:
> I'd like to be using swank-cdt, but I'm running into the tools.jar
> problem
>
> warning: unabled to add tools.jar to classpath.
> CDT 1.4.0a startup failed: # java.lang.RuntimeException: java.io.IOException: Not a debu
the
> problem. I'll look into it, but in the meantime, can you also try
> using "lein swank" and then "M-x slime-connect".
>
> On Dec 5, 10:32 am,AndyK wrote:
>
>
>
>
>
>
>
> > I'd like to be using swank-cdt, but I
On Feb 3, 10:47 am, Stuart Sierra wrote:
> Clojure 1.4 goes beta! This release is essentially the same as
> 1.4.0-alpha5. It will hit the Maven Central repository in a few hours.
>
> No new features in the 1.4 line after this point. Bug fixes are still allowed.
>
> Also, if somebody wants to compi
25 matches
Mail list logo