Re: Tapestry and Clojure

2015-01-07 Thread Massimo Lusetti
Please no... Scala no ;-) On Wed, Dec 31, 2014 at 6:08 PM, Ilya Obshadko wrote: > Thanks Lance, I've already sorted that out. Actually now I'm experimenting > with Scala instead of Clojure: looks like it's a better match for my > requirements. > > On Tue, Dec 30, 2014 at 6:07 PM, Lance Java > wr

Re: Tapestry and Clojure

2014-12-31 Thread Ilya Obshadko
Thanks Lance, I've already sorted that out. Actually now I'm experimenting with Scala instead of Clojure: looks like it's a better match for my requirements. On Tue, Dec 30, 2014 at 6:07 PM, Lance Java wrote: > The logger is not a service and cannot be @Injected into IOC services. > > You have p

Re: Tapestry and Clojure

2014-12-30 Thread Lance Java
The logger is not a service and cannot be @Injected into IOC services. You have probably seen that you can @Inject the logger into pages and components. @Inject has been extended (perhaps hijacked) for components and @Injected values can come from contributed InjectionProviders. See CommonResource

Re: Tapestry and Clojure

2014-12-28 Thread Ilya Obshadko
On Sun, Dec 21, 2014 at 10:22 PM, Thiago H de Paula Figueiredo < thiag...@gmail.com> wrote: > On Thu, 18 Dec 2014 20:01:11 -0200, Ilya Obshadko > wrote: > > One more question regarding ObjectLocator. >> Turns out it cannot resolve services like Logger, complaining that no >> service implements i

Re: Tapestry and Clojure

2014-12-26 Thread Ilya Obshadko
On Wed, Dec 24, 2014 at 9:30 PM, Howard Lewis Ship wrote: > I don't see why you need to make the var dynamic, as it contains a mutable > value (a promise) itself. > Actually it's not needed. Counterclockwise plugin complained about non-dynamic global var, so I made it dynamic to avoid this warni

Re: Tapestry and Clojure

2014-12-24 Thread Howard Lewis Ship
I don't see why you need to make the var dynamic, as it contains a mutable value (a promise) itself. However, this does bring to mind an idea for 5.5, that Tapestry could define a dynamic Var to contain the registry, and bind that Var whenever it invokes a Clojure function via the interop. On Mon

Re: Tapestry and Clojure

2014-12-22 Thread Ilya Obshadko
No, I didn't try getObject() yet. That means the code for injection would be a little bit more complex, but I'll explain using "simple" version from the previous message: https://gist.github.com/xfyre/f6a62b3f63ed01929054 Line 4: define dynamic global variable as (promise) - it's not available at

Re: Tapestry and Clojure

2014-12-21 Thread Thiago H de Paula Figueiredo
On Thu, 18 Dec 2014 20:01:11 -0200, Ilya Obshadko wrote: One more question regarding ObjectLocator. Turns out it cannot resolve services like Logger, complaining that no service implements its interface. Could you suggest how to solve it? Have you tried getObject() instead of getService()?

Re: Tapestry and Clojure

2014-12-18 Thread Ilya Obshadko
One more question regarding ObjectLocator. Turns out it cannot resolve services like Logger, complaining that no service implements its interface. Could you suggest how to solve it? On Thu, Dec 18, 2014 at 11:20 PM, Ilya Obshadko wrote: > So, my solution for this is actually quite simple: > > (n

Re: Tapestry and Clojure

2014-12-18 Thread Ilya Obshadko
So, my solution for this is actually quite simple: (ns com.xdance.tapestry.serviceregistry (:import (org.apache.tapestry5.ioc ObjectLocator))) (def ^:dynamic ^ObjectLocator *tapestry-registry-ref* (promise)) (defn init-registry [^ObjectLocator registry] "Must be called during service ini

Re: Tapestry and Clojure

2014-12-18 Thread Ilya Obshadko
Thanks Howard, that's making a lot of sense. However my initial though was about injecting Clojure globals (specifically, one global containing service registry) during the call to "require" IFn. I still couldn't find any ways to manipulate initial Clojure environment, although there are obvious w

Re: Tapestry and Clojure

2014-12-17 Thread Howard Lewis Ship
Actually, Clojure interop with Java is very good, so a Clojure function could be passed a Java object: (defn frobnicate-the-request [^Request request] (.setAttribute request "xyzzyx" (compute-the-magic-name))) The ^Request part is a type hint, it allows the Clojure compiler to generate proper

Re: Tapestry and Clojure

2014-12-16 Thread Thiago H de Paula Figueiredo
On Mon, 15 Dec 2014 18:29:22 -0200, Ilya Obshadko wrote: How are Java objects usually passed to Clojure code? The recommended way? Java objects are passed to Clojure functions in exactly the same way they are passed to Java method (because internally Clojure function is just an implementa

Re: Tapestry and Clojure

2014-12-15 Thread Ilya Obshadko
On Mon, Dec 15, 2014 at 10:12 PM, Thiago H de Paula Figueiredo < thiag...@gmail.com> wrote: > On Mon, 15 Dec 2014 17:34:10 -0200, Ilya Obshadko > wrote: > > ServiceBuilder's buildService() receives a ServiceResources instance as a >>> parameter. ServiceResources is an ObjectLocator (i.e. Tapestr

Re: Tapestry and Clojure

2014-12-15 Thread Thiago H de Paula Figueiredo
On Mon, 15 Dec 2014 17:34:10 -0200, Ilya Obshadko wrote: ServiceBuilder's buildService() receives a ServiceResources instance as a parameter. ServiceResources is an ObjectLocator (i.e. Tapestry-IoC registry). The wording of my question was not fully correct. tapestry-clojure doesn't use

Re: Tapestry and Clojure

2014-12-15 Thread Ilya Obshadko
On Sun, Dec 14, 2014 at 9:17 PM, Thiago H de Paula Figueiredo < thiag...@gmail.com> wrote: > On Sat, 13 Dec 2014 17:48:09 -0200, Ilya Obshadko > wrote: > > I have a question regarding potential Clojure integration in my >> application >> service layer. As of now, standard Tapestry mechanism of d

Re: Tapestry and Clojure

2014-12-14 Thread Thiago H de Paula Figueiredo
On Sat, 13 Dec 2014 17:48:09 -0200, Ilya Obshadko wrote: I have a question regarding potential Clojure integration in my application service layer. As of now, standard Tapestry mechanism of dependency injection won't work for Clojure-based services, because it's constructed using ServiceBui

Re: Tapestry and Clojure

2014-12-13 Thread Ilya Obshadko
project at > > https://github.com/freizl/clojure-tapestry. > > > > I did not tested all tapestry functionality but I think it should be > working > > well. > > > > PS: I'm new to both Tapestry and Clojure. > > > > > > -- > > View

Re: Tapestry and Clojure

2012-07-02 Thread Howard Lewis Ship
work with clojure seems not > difficult. > I have set up a tutorial project at > https://github.com/freizl/clojure-tapestry. > > I did not tested all tapestry functionality but I think it should be working > well. > > PS: I'm new to both Tapestry and Clojure. > >

Re: Tapestry and Clojure

2012-07-01 Thread freizl
: I'm new to both Tapestry and Clojure. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Tapestry-and-Clojure-tp5713643p5714226.html Sent from the Tapestry - User mailing list archive at Nabble.com. ---

Re: Tapestry and Clojure

2012-06-07 Thread Massimo Lusetti
On Wed, Jun 6, 2012 at 9:19 PM, Howard Lewis Ship wrote: > Possibilities for the future: > > tapestry-clojure might be able to access type hints on the function > and use the TypeCoercer to convert method parameters to the correct > function argument type. > > Likewise, it could (and probably sho

Re: Tapestry and Clojure

2012-06-06 Thread Howard Lewis Ship
Possibilities for the future: tapestry-clojure might be able to access type hints on the function and use the TypeCoercer to convert method parameters to the correct function argument type. Likewise, it could (and probably should) use the method return type as a guide to TypeCoerce the function r

Re: Tapestry and Clojure

2012-06-06 Thread Jochen Berger
Am 05.06.2012 19:56, schrieb Howard Lewis Ship: The code for this is very small, and could easily be ported back to 5.3, for 5.3.4. Any interest? Definitely! I already did this and successfully called the doubler fn from a 5.3.3 webapps's page. Very useful stuff. ;-) I think I'm going to like

Re: Tapestry and Clojure

2012-06-05 Thread David Woods
I'm just learning Clojure, but I see a lot of potential and intend to move more of my back-end functionality to it over time. A way to use Clojure services in a Tapestry webapp would be ideal, and will fit great into a project I'm just planning at the moment. Since I'm considering it for future p

Re: Tapestry and Clojure

2012-06-05 Thread Thiago H de Paula Figueiredo
On Tue, 05 Jun 2012 14:56:17 -0300, Howard Lewis Ship wrote: People who run into me are always asking me "Are you going to rewrite Tapestry in Scala? Or Clojure?" I really don't get the point of rewriting Tapestry, which is written in Java, in Java-the-platform languages as Scala and Clo

Tapestry and Clojure

2012-06-05 Thread Howard Lewis Ship
People who run into me are always asking me "Are you going to rewrite Tapestry in Scala? Or Clojure?" Well, I'm not going to be rewriting Tapestry at this point, just improving it in place. However, I do want to do some more work with Clojure; I'm really excited by http://datomic.com/ for exampl

Re: [Tapestry Central] Devoxx 2009: Tapestry and Clojure

2009-09-25 Thread Oliver Geisser
Hi all, maybe we can arrange an informal "Tapestry Meet & Greet", e.g. taking a beer or dinner together with other Tapestry developers? Last year at Devoxx it was a little bit problematic to find other Tapestry developers ... :-( Olli 2009/9/24 Howard > Coming up in November ... I'll be at th

Re: [Tapestry Central] Devoxx 2009: Tapestry and Clojure

2009-09-24 Thread Sebastian Hennebrueder
Howard schrieb: Coming up in November ... I'll be at the Devoxx 2009 conference in Antwerp, Belgium. I'll be presenting two 60 minute talks: one as an introduction to Tapestry (Nov 20th, 10:30-11:30, Room 9) and another as an introduction to Clojure (Nov 18th, 12:00-13:00, Room 6). Given that my

[Tapestry Central] Devoxx 2009: Tapestry and Clojure

2009-09-24 Thread Howard
Coming up in November ... I'll be at the Devoxx 2009 conference in Antwerp, Belgium. I'll be presenting two 60 minute talks: one as an introduction to Tapestry (Nov 20th, 10:30-11:30, Room 9) and another as an introduction to Clojure (Nov 18th, 12:00-13:00, Room 6). Given that my existing talks tak