Re: Basic about setting upp Clojure and editor enviroment

2009-01-21 Thread Matt Clark
If you're not already an emacs user, I found it can be quite the learning curve getting into it. So I'd recommend you also give the eclipse clojure-dev plugin a shot. It now has a REPL, namespace browser, syntax highlighting, etc and works fine on windows. http://code.google.com/p/clojure-dev/ O

test-expect functional mocking library

2009-02-06 Thread Matt Clark
Hi all, I hope I'm not reinventing the wheel with this, but I put together a function mocking library to allow for functional test isolation. At this point it handles return values, argument expectations, and invocation counts. I've just put together a core for it so far, but I intend to add som

Re: Clojure + Slick - "stylistic" questions

2009-02-09 Thread Matt Clark
I agree with what Laurent said about clojuredev, I've been having great success using it myself, for my clojure/slick creations. My first project was converting Kevin Glass's platformer example over to clojure which gave me a chance to learn slick and Clojure all in one go! Unfortunately, the co

Re: mocking in clojure

2009-03-13 Thread Matt Clark
test-expect actually only depends on test-is for its own tests, and I'm planning on breaking the tests out into their own file. I thought it was an interesting idea having the tests and code in the same file, but in practice it ended up being less attractive than anticipated. - Matt On Mar 13,

[ANN] test-expect functional mocking/expectation library

2009-04-11 Thread Matt Clark
When I started working on this library, I thought to myself, "I can't believe no one has put together an expectation/mocking library" but I couldn't find one so I went ahead and started my own. Of course, it was not until I had an early working version that I discovered Allen Rohner's expectation

Re: Got a Clojure library?

2009-04-13 Thread Matt Clark
Name: test-expect URL: http://code.google.com/p/test-expect/ Author: Matt Clark Tags: testing, mocking, expectations, stubbing License: EPL Dependencies: none (optional dependency on test-is) Description: Supports setting up and validating expectations on mocked dependency functions. Informative

Re: Contribs with dependencies

2009-04-14 Thread Matt Clark
I like Stuart's idea, but I can see those dependency declarations becoming repetitive in any significantly large project. I think there would need to be someway to declare dependencies on a larger scope, perhaps application wide, or some mechanism to describe dependencies for sets of namespaces.

Re: Modifying data structures without changing their interface

2009-04-20 Thread Matt Clark
Maybe I'm missing something, but what is wrong with Stuart Sierra's solution? I quite like it, and it would probably be more appealing if it were encapsulated into a macro. (def-propholder person) (def me (person {:name "Matt Clark"})) (def-propholder person2 :name

Re: ns :use with :rename

2009-05-27 Thread Matt Clark
+1 for better info on :use/:require. I find I tend to go digging into the clojure-contrib source for decent examples just because I'm not sure where else to look. On May 27, 11:03 am, tsuraan wrote: > > Here's the correct syntax: > > > (ns namespace > >    (:use [other-namespace :rename {existin

Re: (re)setting a function globally

2009-06-10 Thread Matt Clark
Thanks for these ideas, I will give them a try tonight and update the adapter namespace with the changes. If anyone knows of a more idiomatic way I could have implemented the problem reporting functionality that would prevent the necessity of these "hacky" solutions, I'm all ears. - Matt On Jun

Re: test-expect functional mocking/expectation library

2009-06-10 Thread Matt Clark
Stuart, it is wonderful to hear that someone out there is using test- expect. I'll get the CA signed so its migration to contrib can proceed. -Matt On Jun 10, 7:52 am, Stuart Halloway wrote: > Hi Matt, > > I would definitely like to see test-expect added to contrib. If you   > will sign the CA

Re: (re)setting a function globally

2009-06-11 Thread Matt Clark
> > > > Can I help from the test-is side?  Could test-expect be added to > > clojure-contrib? > > -Stuart > > > On Jun 10, 1:36 pm, Matt Clark wrote: > >> Thanks for these ideas, I will give them a try tonight and update the > >> adapter namespa

Re: (re)setting a function globally

2009-06-12 Thread Matt Clark
jure modules" > > thread and starting a solution using deftemplate :) > > > - Matt > > > On Jun 11, 8:36 am, Stuart Halloway wrote: > >> Matt is signing the CA and I will be adding test-expect to contrib. > > >> Stu > > >>> Can I help

Re: Import all static methods and fields?

2009-06-12 Thread Matt Clark
Hi Patrick, I needed this too in order to make LWJGL's GL classes a little less cumbersome to use so I ended up writing my own function based on import-static. It's not done yet or polished as much as I'd like but it lets you write something like (use-statics fully-qualified- classnames+). You

Re: Clojure goes Git!

2009-06-17 Thread Matt Clark
On Jun 17, 9:16 am, Meikel Brandmeyer wrote: > For the mercurial users out there: > Both repos work with the latest hg-git > fromhttp://hg-git.github.com!:))) Meikel, thanks for this! I am one of those reticent Windows users who have given both git (with github) and mercurial a decent try and I

Re: Poll for a new name for clojure eclipse plugin 'clojure-dev'

2009-06-23 Thread Matt Clark
I vote for Clojure Development Tools. There's something to be said for consistency, and I agree that the j insertion will be getting old soon. On Jun 23, 8:47 am, Laurent PETIT wrote: > Hello, > > Since the switch to git, there has also been the creation of a mailing list > called clojure-dev f

Re: Mocking?

2009-09-28 Thread Matt Clark
This is exactly the sort of purpose I wrote c.c.mock for. It is essentially a glorified binding, but it should fit the bill. (expect [sms-func (times once (has-args [message recipient]))] (code-under-test)) This can tie into clojure.test as well if you are using that. On Sep 28, 3:50 am, Mar

Re: Dependency management

2010-01-22 Thread Matt Clark
>From my googling, the only way to solve this in the general case (IE the java case) is through using OSGi. I have no idea what the state of compatibility is between clojure and OSGi at this time. I'd be curious to find out in fact. Here's the stackoverflow.com page I found that describes the si

Android 'dex' stage takes a very long time with Clojure

2010-05-28 Thread Matt Clark
I'm new to Android, but I've been wanting to give it a try for a while so I thought I'd try using Clojure's master branch. It all seems to be working fairly well except the dex stage of installation takes around 2 minutes for a simple Hello World app. How do others get around this lag? I'm prett

Re: Android 'dex' stage takes a very long time with Clojure

2010-06-01 Thread Matt Clark
Do you have a public repository of the work you've done so far? I'm very interested to learn more about this. On May 29, 7:31 pm, MHOOO wrote: > Well, that was easy enough. I modified the load function inside > RT.java to load classes/namespaces out of .dex files. (use > 'my.compiled.namespace) w

Re: Suggestions on handling state for a game...

2008-10-20 Thread Matt Clark
I'm still learning Clojure myself, but I've had some good luck using Rich's Ant Colony demo source as a basis for a simple game I am making. I'm not sure how well it follows what might become "best practices" for clojure game programming, but it has helped me overcome some of the initial hurdles

Re: Clojure HTML Documentation

2008-11-22 Thread Matt Clark
This has now become my first stop for reference information, great job! Love the changes you've made in the last few days, the searching is fantastic. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group.