Re: Clojure as a Java lib documentation / examples?

2009-05-22 Thread David Powell



On Fri 22/05/09 02:23 , Brett Morgan brett.mor...@gmail.com sent:
> 
> Hi guys,
> 
> I have some evil thoughts of using Clojure as a java library so that i
> can use both the STM and the persistent data structures in projects
> that my team of java developers can work with.
> 
> As much as I'd like to get the team coding in Clojure properly, I have
> enough trouble selling the idea of using immutable data structures. If
> I hide the clojure magic behind interfaces, I can have the team coding
> in plain java, and wrap what they do in clojure transactions and what
> not. I'd like to do this in a way that the clojure repl can still be
> used to interact with the running server.
> 
> So where do I start reading? =)

The TransactionalHashMap class in clojure is a class that has really been 
designed to be used from Java.  You 
need to use it in conjunction with LockingTransaction.runInTransaction().

-- 
Dave


--~--~-~--~~~---~--~~
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
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~--~~~~--~~--~--~---



Re: Clojure as a Java lib documentation / examples?

2009-05-21 Thread Adrian Cuthbertson

Check out clojure.org - focus on java interop, compilation and class
generation. Mark Volkmann's
http://java.ociweb.com/mark/clojure/article.html has a good general
clojure overview and nice examples. Gen-class and proxy are the main
tools you'll need for exposing your clojure libraries as java api's.

Rgds, Adrian.

On Fri, May 22, 2009 at 2:23 AM, Brett Morgan  wrote:
>
> Hi guys,
>
> I have some evil thoughts of using Clojure as a java library so that i
> can use both the STM and the persistent data structures in projects
> that my team of java developers can work with.
>
> As much as I'd like to get the team coding in Clojure properly, I have
> enough trouble selling the idea of using immutable data structures. If
> I hide the clojure magic behind interfaces, I can have the team coding
> in plain java, and wrap what they do in clojure transactions and what
> not. I'd like to do this in a way that the clojure repl can still be
> used to interact with the running server.
>
> So where do I start reading? =)
>
> --
>
> Brett Morgan http://brett.morgan.googlepages.com/
>
> >
>

--~--~-~--~~~---~--~~
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
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~--~~~~--~~--~--~---



Re: Clojure as a Java lib documentation / examples?

2009-05-21 Thread Nathan Hawkins

Try here:

http://code.google.com/p/clojure/source/browse/


Brett Morgan wrote:
> Hi guys,
>
> I have some evil thoughts of using Clojure as a java library so that i
> can use both the STM and the persistent data structures in projects
> that my team of java developers can work with.
>
> As much as I'd like to get the team coding in Clojure properly, I have
> enough trouble selling the idea of using immutable data structures. If
> I hide the clojure magic behind interfaces, I can have the team coding
> in plain java, and wrap what they do in clojure transactions and what
> not. I'd like to do this in a way that the clojure repl can still be
> used to interact with the running server.
>
> So where do I start reading? =)
>
>   


--~--~-~--~~~---~--~~
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
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~--~~~~--~~--~--~---



Clojure as a Java lib documentation / examples?

2009-05-21 Thread Brett Morgan

Hi guys,

I have some evil thoughts of using Clojure as a java library so that i
can use both the STM and the persistent data structures in projects
that my team of java developers can work with.

As much as I'd like to get the team coding in Clojure properly, I have
enough trouble selling the idea of using immutable data structures. If
I hide the clojure magic behind interfaces, I can have the team coding
in plain java, and wrap what they do in clojure transactions and what
not. I'd like to do this in a way that the clojure repl can still be
used to interact with the running server.

So where do I start reading? =)

-- 

Brett Morgan http://brett.morgan.googlepages.com/

--~--~-~--~~~---~--~~
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
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~--~~~~--~~--~--~---