feedback on file parsing with Clojure

2017-06-16 Thread AndyK
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

Which emacs packages?

2012-03-08 Thread AndyK
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

Re: ANN: Clojure 1.4.0-beta1

2012-02-03 Thread AndyK
On Feb 3, 10:47 am, Stuart Sierra the.stuart.sie...@gmail.com 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

Re: swank-cdt problems

2011-12-08 Thread AndyK
Thank you - I am able to use CDT now. Here's what I had to do... * updated lein plugin to 1.4.0-SNAPSHOT * symlinked to tools.jar in ~/.lein/plugins * added jvm-opts line to project.clj * ran swank using lein swank and M-x slime-connect Problems I still see.. * C-c C-x shortcuts do not work *

swank-cdt problems

2011-12-05 Thread AndyK
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: #RuntimeException java.lang.RuntimeException: java.io.IOException: Not a debuggee, or not listening for debugger to attach In project.clj, I've

Re: swank-cdt problems

2011-12-05 Thread AndyK
? On Dec 5, 1:32 pm, AndyK andy.kri...@gmail.com 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:  #RuntimeException java.lang.RuntimeException: java.io.IOException: Not a debuggee

Re: The Clojure way to solve this problem?

2011-12-03 Thread AndyK
Thank you - that worked brilliantly. I'm using a Java load testing tool called The Grinder and it has an instrumented HTTP library that is dependent on running within The Grinder. So I have clj-http for developing my tests and then I can drop them into load testing and substitute the Grinder using

Re: Avout: Distributed State in Clojure

2011-11-30 Thread AndyK
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.

The Clojure way to solve this problem?

2011-11-30 Thread AndyK
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

Proper parallelism?

2011-11-22 Thread AndyK
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

Re: Dynamic test creation?

2011-11-09 Thread AndyK
a acro to generate a tabular fact.  Tje tabular fact will give you good reporting. On Nov 8, 2011 1:44 PM, AndyK andy.kri...@gmail.com wrote: I finally had a chance to try this out and it fails with error: java.lang.ClassCastException: java.lang.String cannot be cast to clojure.lang.IObj

Re: lein test with command-line args?

2011-11-08 Thread AndyK
, 5:17 pm, Phil Hagelberg p...@hagelb.org wrote: On Mon, Nov 7, 2011 at 2:14 PM, AndyK andy.kri...@gmail.com 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

Re: Dynamic test creation?

2011-11-08 Thread AndyK
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 youn...@gmail.com wrote: On 11/01/2011 03:05 PM, AndyK wrote: How would (run-tests 'my-namespace) know to run all thosedynamic tests? I thought

lein test with command-line args?

2011-11-07 Thread AndyK
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

Re: Korma - cannot acquire connections

2011-11-06 Thread AndyK
My mistake in the original post - that should've read (sql/defenity mytable) Two seprate forms - the defentity + the select. On Nov 4, 3:21 pm, Base basselh...@gmail.com wrote: Did you mean to define the select within the defentity? (sql/defentity mytable    (sql/select mytable (sql/fields

Korma - cannot acquire connections

2011-11-04 Thread AndyK
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 SQLException:

Update swank classpath on the fly?

2011-11-04 Thread AndyK
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

Problem passing a function into a function

2011-11-03 Thread AndyK
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

Introspecting functions

2011-11-03 Thread AndyK
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

Re: Dynamic test creation?

2011-11-01 Thread AndyK
like a file full of deftests)? On Oct 31, 9:56 am, Nate Young youn...@gmail.com 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 deftest function that runs all

Await and thread blocking?

2011-11-01 Thread AndyK
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

Re: Await and thread blocking?

2011-11-01 Thread AndyK
for using Timer while blocking the current thread? Is a future a better choice here? On Nov 1, 4:19 pm, AndyK andy.kri...@gmail.com 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

Re: Await and thread blocking?

2011-11-01 Thread AndyK
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 andy.kri...@gmail.com 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

Dynamic test creation?

2011-10-28 Thread AndyK
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

Lazytest on the repl?

2011-10-28 Thread AndyK
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