[Lift] Re: scalajpa - while accessing two distincts databases, the second access is made with a connection to the first database

2009-06-18 Thread Viktor Klang
I yield to your superiority. Seriously. 2009/6/18 Meredith Gregory lgreg.mered...@gmail.com Oliver, Objects and monads are really not the same. At it's heart the concept of monad is an appropriately parametric notion of composition. If you have any experience with abstract algebra, you

[Lift] Re: scalajpa - while accessing two distincts databases, the second access is made with a connection to the first database

2009-06-18 Thread Meredith Gregory
Viktor, My co-routine yields back to yours! Hey, it's like Garrison Keillor's Tales from Lake Wobegonhttp://en.wikipedia.org/wiki/Lake_Wobegon: where *all* of the children are above average. If you think about it, that just keeps *lift*ing the children higher and higher and higher... Speaking

[Lift] Re: scalajpa - while accessing two distincts databases, the second access is made with a connection to the first database

2009-06-18 Thread Viktor Klang
I just want to say that it's educating and awesome (in the true sense of the word) to have you on this list, enriching us with alot of good ideas, theories and concepts. 2009/6/18 Meredith Gregory lgreg.mered...@gmail.com Viktor, My co-routine yields back to yours! Hey, it's like Garrison

[Lift] Re: scalajpa - while accessing two distincts databases, the second access is made with a connection to the first database

2009-06-18 Thread Meredith Gregory
Oliver, You wrote: we would have taken over Google by now. My not-so-secret plan for taking over Google is contained in the deck i posted in response to Viktorhttp://svn.biosimilarity.com/src/open/talks/MonadicDesignPatternsForTheWeb.pdf. Part of the reason i was excited that Jonas took on to

[Lift] Re: scalajpa - while accessing two distincts databases, the second access is made with a connection to the first database

2009-06-18 Thread Oliver Lambert
Hi Greg, Thank you, I enjoyed reading that. Perhaps the Greedy Empire, should indeed, be worried. cheers Oliver 2009/6/18 Meredith Gregory lgreg.mered...@gmail.com Oliver, You wrote: we would have taken over Google by now. My not-so-secret plan for taking over Google is contained in the

[Lift] Re: scalajpa - while accessing two distincts databases, the second access is made with a connection to the first database

2009-06-18 Thread Derek Chen-Becker
No one need fear. Greg is a benevolent evil genius ;) Seriously, it's threads like this that make me realize just how many freakin' brilliant people are on list. Derek 2009/6/18 Oliver Lambert olambo...@gmail.com Hi Greg, Thank you, I enjoyed reading that. Perhaps the Greedy Empire, should

[Lift] Re: scalajpa - while accessing two distincts databases, the second access is made with a connection to the first database

2009-06-17 Thread Derek Chen-Becker
I agree that it's an issue. In my own defense, what I meant was not that I didn't think people would use more than one DB. I actually have several apps (not yet converted to Lift) that use 4 or more persistence units that represent various legacy databases. Rather, I failed to realize the problem

[Lift] Re: scalajpa - while accessing two distincts databases, the second access is made with a connection to the first database

2009-06-17 Thread Jorge Ortiz
In Derek's defense, it's not how objects in classes work but how Lift RequestVars work. Scala objects in classes aren't global singletons, just per-class-instance singletons. But a Lift ReuqestVar object in a class is pretty much a global singleton (unless you do some hacking like Derek did). --j

[Lift] Re: scalajpa - while accessing two distincts databases, the second access is made with a connection to the first database

2009-06-17 Thread Oliver Lambert
You made an assumption and programmed a solution based on the knowledge you had at the time. Thats fine and there is nothing wrong with it - start with the simplest solution that fits. If it need to be changed due to changing requirements, thats fine too. There is a tradeoff in creating a overly

[Lift] Re: scalajpa - while accessing two distincts databases, the second access is made with a connection to the first database

2009-06-17 Thread TSP
In my own defense ... failed to realize the problem that would arise from defining the EM factory as a singleton Are you being honest here Derek? Was not the real problem that you failed to truly embrace the shape of the paradoxical combinator?

[Lift] Re: scalajpa - while accessing two distincts databases, the second access is made with a connection to the first database

2009-06-17 Thread Viktor Klang
Read this and join me in having your brains implode: http://www.mail-archive.com/everything-l...@googlegroups.com/msg05959.html On Wed, Jun 17, 2009 at 11:07 AM, TSP tim.pig...@optrak.co.uk wrote: In my own defense ... failed to realize the problem that would arise from defining the EM

[Lift] Re: scalajpa - while accessing two distincts databases, the second access is made with a connection to the first database

2009-06-17 Thread Jean-Luc
Hi Derek, I had issues with the http proxy, so I checked building from source code (scalajpa + lift-jpa) . It's perfect, just what I need ! Thank you very much ;-) Jean-Luc 2009/6/16 Derek Chen-Becker dchenbec...@gmail.com OK, I just checked in code that should allow this to work. Could you

[Lift] Re: scalajpa - while accessing two distincts databases, the second access is made with a connection to the first database

2009-06-17 Thread Eric Bowman
Oliver Lambert wrote: Do we need to do some sort of course to understand this language? This could help: http://www.mitadmissions.org/topics/apply/the_freshman_application/index.shtml :) -- Eric Bowman Boboco Ltd ebow...@boboco.ie http://www.boboco.ie/ebowman/pubkey.pgp

[Lift] Re: scalajpa - while accessing two distincts databases, the second access is made with a connection to the first database

2009-06-17 Thread Andrew Scherpbier
Isn't this just the result of JIT development? Don't need something right now, don't implement it. If you need it later, refactor. I'm probably looking at this too much from a low level grunt developer. I understand that when developing a framework or anything with a public API these are

[Lift] Re: scalajpa - while accessing two distincts databases, the second access is made with a connection to the first database

2009-06-17 Thread Matt Williams
JIT development ;) In all serious though, its better to have a minimal set of features that work well and can be refactored effortlessly, than to define an entire API and have everything need to change in an updated release. And at the speed this particular fix went in, its hardly hindering

[Lift] Re: scalajpa - while accessing two distincts databases, the second access is made with a connection to the first database

2009-06-17 Thread Meredith Gregory
Oliver, The short answer is no. The longer answer is - i worked this all out on my own; so, you guys -- who can program lift on top of scala on top of JVM and are therefore about 20X smarter than i am -- can too. - And also, help is always available, if there is something specific

[Lift] Re: scalajpa - while accessing two distincts databases, the second access is made with a connection to the first database

2009-06-17 Thread David Pollak
On Wed, Jun 17, 2009 at 12:04 PM, Derek Chen-Becker dchenbec...@gmail.comwrote: Argh, that's what I was trying to say. No more posting after Midnight for me :( Folks, We are all on the path to doing better development... but it's a journey, not a destination. I like Greg's suggestion of

[Lift] Re: scalajpa - while accessing two distincts databases, the second access is made with a connection to the first database

2009-06-17 Thread Meredith Gregory
Tim, LOL! Derek, i'm amazed at all the good work you've done on lift. You're unstoppable! i trust that all understood i was having good fun. Best wishes, --greg On Wed, Jun 17, 2009 at 2:07 AM, TSP tim.pig...@optrak.co.uk wrote: In my own defense ... failed to realize the problem that

[Lift] Re: scalajpa - while accessing two distincts databases, the second access is made with a connection to the first database

2009-06-17 Thread Matt Williams
i trust that all understood i was having good fun. The only thing I understood is that there are some people out there vastly more knowledgeable than myself! :D Brgds, Matt --~--~-~--~~~---~--~~ You received this message because you are subscribed to

[Lift] Re: scalajpa - while accessing two distincts databases, the second access is made with a connection to the first database

2009-06-17 Thread Oliver Lambert
2009/6/18 Meredith Gregory lgreg.mered...@gmail.com Oliver, The short answer is no. The longer answer is - i worked this all out on my own; so, you guys -- who can program lift on top of scala on top of JVM and are therefore about 20X smarter than i am -- can too. I think if we

[Lift] Re: scalajpa - while accessing two distincts databases, the second access is made with a connection to the first database

2009-06-17 Thread Meredith Gregory
Oliver, Objects and monads are really not the same. At it's heart the concept of monad is an appropriately parametric notion of composition. If you have any experience with abstract algebra, you might recognize that the notion of a group http://en.wikipedia.org/wiki/Symmetry_group is an

[Lift] Re: scalajpa - while accessing two distincts databases, the second access is made with a connection to the first database

2009-06-16 Thread Jean-Luc
For your information, here is an extract of source code of RequestVarEM : Trait RequestVarEM extends ScalaEntityManager with ScalaEMFactory { object emVar extends RequestVar[EntityManager](openEM()) { ... } } EntityManager is stored in the singleton emVar; so, all db access of Model objects

[Lift] Re: scalajpa - while accessing two distincts databases, the second access is made with a connection to the first database

2009-06-16 Thread Derek Chen-Becker
OK, I just checked in code that should allow this to work. Could you please test and make sure that it's functioning correctly? Thanks, Derek On 6/16/09, Derek Chen-Becker dchenbec...@gmail.com wrote: Using multiple EMs was not something I had considered when I wrote this. I think that I can

[Lift] Re: scalajpa - while accessing two distincts databases, the second access is made with a connection to the first database

2009-06-16 Thread Meredith Gregory
Derek, soapbox You have just demonstrated a process that i have been talking about for the last 15 years. People have a blind spot when it comes to thinking compositionally. They think -- almost to a person -- about god's eye view solutions where there's only one of some key solution component.

[Lift] Re: scalajpa - while accessing two distincts databases, the second access is made with a connection to the first database

2009-06-16 Thread Oliver Lambert
I think you have just volunteered to help refactor this code to make it more composition friendly :) On Wed, Jun 17, 2009 at 9:38 AM, Meredith Gregory lgreg.mered...@gmail.comwrote: Derek, soapbox You have just demonstrated a process that i have been talking about for the last 15 years.

[Lift] Re: scalajpa - while accessing two distincts databases, the second access is made with a connection to the first database

2009-06-16 Thread Jeremy Day
Greg, On Tue, Jun 16, 2009 at 6:38 PM, Meredith Gregory lgreg.mered...@gmail.comwrote: It takes some serious training to think compositionally. No doubt it is extremely tough to think compositionally, and it's all too easy to fall back on non-compositional ways of thinking. In a similar vein

[Lift] Re: scalajpa - while accessing two distincts databases, the second access is made with a connection to the first database

2009-06-16 Thread Meredith Gregory
Jeremy, Most excellent question award to you, sir! How to bootstrap thinking compositionally... this is what i did - learn some compositional idioms by heart - do you know the shape of the paradoxical combinator by heart - do you know the data making up a monad - do you

[Lift] Re: scalajpa - while accessing two distincts databases, the second access is made with a connection to the first database

2009-06-16 Thread Oliver Lambert
2009/6/17 Meredith Gregory lgreg.mered...@gmail.com Jeremy, Most excellent question award to you, sir! How to bootstrap thinking compositionally... this is what i did - learn some compositional idioms by heart - do you know the shape of the paradoxical combinator by heart