Re: [Lift] Is this a bug?

2010-02-15 Thread Meredith Gregory
Dear Jeppe,

Thanks! i was just sorting through that... ;-)

Best wishes,

--greg

On Mon, Feb 15, 2010 at 2:00 PM, Jeppe Nejsum Madsen wrote:

> On Mon, Feb 15, 2010 at 10:46 PM, Meredith Gregory
>  wrote:
>
> > Dear Jeppe,
> > Thanks! A quick test shows that
> >>curl -o test.txt
> >>
> http://localhost:8080/biosimilarity-services/grammar/banana-cream-pie?file=file://
> 
> > also results in test.txt containing banana-cream-pie.
> > As for the latter comment, i'm writing an URL-passing protocol. That is,
> the
> > service is being told the URL for a resource -- which it will use
> > subsequently. That's still well within RESTful doctrine ;-).
>
> Sorry, didn't see your original code :-) The parameters will not be
> part of the url and thus not put into grammar. You'll have to fetch
> the parameters manually either by way of S.params or Req.params
>
> /Jeppe
>
> --
> You received this message because you are subscribed to the Google Groups
> "Lift" group.
> To post to this group, send email to lift...@googlegroups.com.
> To unsubscribe from this group, send email to
> liftweb+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/liftweb?hl=en.
>
>


-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] Is this a bug?

2010-02-15 Thread Meredith Gregory
Dear Jeppe,

Thanks! A quick test shows that

>curl -o test.txt
http://localhost:8080/biosimilarity-services/grammar/banana-cream-pie?file=file://


also results in test.txt containing banana-cream-pie.

As for the latter comment, i'm writing an URL-passing protocol. That is, the
service is being told the URL for a resource -- which it will use
subsequently. That's still well within RESTful doctrine ;-).

Best wishes,

--greg

On Mon, Feb 15, 2010 at 1:38 PM, Jeppe Nejsum Madsen wrote:

> On Mon, Feb 15, 2010 at 10:34 PM, Meredith Gregory
>  wrote:
> > Dear David,
> > Thanks!
> > So, what's the recommended way of building a headless RESTful webservice
> > that takes parameters?
>
> You could use normal url parameters:
>
> biosimilarity-services/grammar/banana-cream-pie?file=xx&file2=yy&file3=zz
>
> But a more idiomatic way is probably to use the uri to represent the
> resources. But whole Phd dissertations have been written about this
> :-)
>
> /Jeppe
>
> --
> You received this message because you are subscribed to the Google Groups
> "Lift" group.
> To post to this group, send email to lift...@googlegroups.com.
> To unsubscribe from this group, send email to
> liftweb+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/liftweb?hl=en.
>
>


-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] Is this a bug?

2010-02-15 Thread Meredith Gregory
P.S. By headless, i mean no browser involved...

On Mon, Feb 15, 2010 at 1:34 PM, Meredith Gregory
wrote:

> Dear David,
>
> Thanks!
>
> So, what's the recommended way of building a headless RESTful webservice
> that takes parameters?
>
> Best wishes,
>
> --greg
>
>
> On Mon, Feb 15, 2010 at 1:26 PM, David Pollak <
> feeder.of.the.be...@gmail.com> wrote:
>
>>
>>
>> On Mon, Feb 15, 2010 at 1:23 PM, Meredith Gregory <
>> lgreg.mered...@gmail.com> wrote:
>>
>>> Dear Lifted,
>>>
>>> Here are some steps to create the observed behavior.
>>>
>>>- Create an instance of the lift basic archetype
>>>
>>> put the following script into mklift.sh
>>> #! /bin/sh
>>> mvn archetype:generate -U   \
>>>  -DarchetypeGroupId=net.liftweb \
>>>  -DarchetypeArtifactId=lift-archetype-basic \
>>>  -DarchetypeVersion=2.0-scala280-SNAPSHOT   \
>>>  -DarchetypeRepository=http://scala-tools.org/repo-snapshots \
>>>  -DremoteRepositories=http://scala-tools.org/repo-releases  \
>>>  -DgroupId=$1 -DartifactId=$2
>>>
>>> > mklift.sh org.my.lift thingy
>>>
>>>
>>>- Modify Boot.scala by adding the following code to the Boot class
>>>
>>> def dispatch: LiftRules.DispatchPF = {
>>>   case req @ Req(
>>> List(
>>>   "biosimilarity-services",
>>>   "grammar",
>>>   grammar
>>>  ), "", GetRequest) => {
>>>   println( "* What is going on HERE *" )
>>>   () => Full(
>>> PlainTextResponse(
>>>   grammar + "\n",
>>>   List( "Content-Type" -> "text/plain; charset=UTF-8" ),
>>>   200
>>> )
>>>   )
>>>   }
>>> }
>>>
>>> LiftRules.dispatch.prepend(dispatch)
>>>
>>>
>>>- Start up lift
>>>
>>> > mvn clean compile jetty:run
>>>
>>>
>>>- Call curl
>>>
>>> > curl -o test.txt
>>> http://localhost:8080/biosimilarity-services/grammar/banana-cream-pie#file=file://
>>> 
>>>
>>>
>>> i expected to find text.txt containing:
>>> banana-cream-pie#file=file://
>>>
>>> However, it contains banana-cream-pie. This means that the fragment is
>>> being dropped. How do i get the fragment?
>>>
>>
>> You don't.  According to the HTTP spec, the stuff that comes after the #
>> is not passed to the server (you can verify this with Wireshark).  The # and
>> what comes after it is client side only.
>>
>>
>>>
>>> Best wishes,
>>>
>>> --greg
>>>
>>> --
>>> L.G. Meredith
>>> Managing Partner
>>> Biosimilarity LLC
>>> 1219 NW 83rd St
>>> Seattle, WA 98117
>>>
>>> +1 206.650.3740
>>>
>>> http://biosimilarity.blogspot.com
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "Lift" group.
>>> To post to this group, send email to lift...@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> liftweb+unsubscr...@googlegroups.com
>>> .
>>> For more options, visit this group at
>>> http://groups.google.com/group/liftweb?hl=en.
>>>
>>
>>
>>
>> --
>> Lift, the simply functional web framework http://liftweb.net
>> Beginning Scala http://www.apress.com/book/view/1430219890
>> Follow me: http://twitter.com/dpp
>> Surf the harmonics
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Lift" group.
>> To post to this group, send email to lift...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> liftweb+unsubscr...@googlegroups.com
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/liftweb?hl=en.
>>
>
>
>
> --
> L.G. Meredith
> Managing Partner
> Biosimilarity LLC
> 1219 NW 83rd St
> Seattle, WA 98117
>
> +1 206.650.3740
>
> http://biosimilarity.blogspot.com
>



-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] Is this a bug?

2010-02-15 Thread Meredith Gregory
Dear David,

Thanks!

So, what's the recommended way of building a headless RESTful webservice
that takes parameters?

Best wishes,

--greg

On Mon, Feb 15, 2010 at 1:26 PM, David Pollak  wrote:

>
>
> On Mon, Feb 15, 2010 at 1:23 PM, Meredith Gregory <
> lgreg.mered...@gmail.com> wrote:
>
>> Dear Lifted,
>>
>> Here are some steps to create the observed behavior.
>>
>>- Create an instance of the lift basic archetype
>>
>> put the following script into mklift.sh
>> #! /bin/sh
>> mvn archetype:generate -U   \
>>  -DarchetypeGroupId=net.liftweb \
>>  -DarchetypeArtifactId=lift-archetype-basic \
>>  -DarchetypeVersion=2.0-scala280-SNAPSHOT   \
>>  -DarchetypeRepository=http://scala-tools.org/repo-snapshots \
>>  -DremoteRepositories=http://scala-tools.org/repo-releases  \
>>  -DgroupId=$1 -DartifactId=$2
>>
>> > mklift.sh org.my.lift thingy
>>
>>
>>- Modify Boot.scala by adding the following code to the Boot class
>>
>> def dispatch: LiftRules.DispatchPF = {
>>   case req @ Req(
>> List(
>>   "biosimilarity-services",
>>   "grammar",
>>   grammar
>>  ), "", GetRequest) => {
>>   println( "* What is going on HERE *" )
>>   () => Full(
>> PlainTextResponse(
>>   grammar + "\n",
>>   List( "Content-Type" -> "text/plain; charset=UTF-8" ),
>>   200
>> )
>>   )
>>   }
>> }
>>
>> LiftRules.dispatch.prepend(dispatch)
>>
>>
>>- Start up lift
>>
>> > mvn clean compile jetty:run
>>
>>
>>- Call curl
>>
>> > curl -o test.txt
>> http://localhost:8080/biosimilarity-services/grammar/banana-cream-pie#file=file://
>> 
>>
>>
>> i expected to find text.txt containing:
>> banana-cream-pie#file=file://
>>
>> However, it contains banana-cream-pie. This means that the fragment is
>> being dropped. How do i get the fragment?
>>
>
> You don't.  According to the HTTP spec, the stuff that comes after the # is
> not passed to the server (you can verify this with Wireshark).  The # and
> what comes after it is client side only.
>
>
>>
>> Best wishes,
>>
>> --greg
>>
>> --
>> L.G. Meredith
>> Managing Partner
>> Biosimilarity LLC
>> 1219 NW 83rd St
>> Seattle, WA 98117
>>
>> +1 206.650.3740
>>
>> http://biosimilarity.blogspot.com
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Lift" group.
>> To post to this group, send email to lift...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> liftweb+unsubscr...@googlegroups.com
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/liftweb?hl=en.
>>
>
>
>
> --
> Lift, the simply functional web framework http://liftweb.net
> Beginning Scala http://www.apress.com/book/view/1430219890
> Follow me: http://twitter.com/dpp
> Surf the harmonics
>
> --
> You received this message because you are subscribed to the Google Groups
> "Lift" group.
> To post to this group, send email to lift...@googlegroups.com.
> To unsubscribe from this group, send email to
> liftweb+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/liftweb?hl=en.
>



-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



[Lift] Is this a bug?

2010-02-15 Thread Meredith Gregory
Dear Lifted,

Here are some steps to create the observed behavior.

   - Create an instance of the lift basic archetype

put the following script into mklift.sh
#! /bin/sh
mvn archetype:generate -U   \
 -DarchetypeGroupId=net.liftweb \
 -DarchetypeArtifactId=lift-archetype-basic \
 -DarchetypeVersion=2.0-scala280-SNAPSHOT   \
 -DarchetypeRepository=http://scala-tools.org/repo-snapshots \
 -DremoteRepositories=http://scala-tools.org/repo-releases  \
 -DgroupId=$1 -DartifactId=$2

> mklift.sh org.my.lift thingy


   - Modify Boot.scala by adding the following code to the Boot class

def dispatch: LiftRules.DispatchPF = {
  case req @ Req(
List(
  "biosimilarity-services",
  "grammar",
  grammar
), "", GetRequest) => {
  println( "* What is going on HERE *" )
  () => Full(
PlainTextResponse(
  grammar + "\n",
  List( "Content-Type" -> "text/plain; charset=UTF-8" ),
  200
)
  )
  }
}

LiftRules.dispatch.prepend(dispatch)


   - Start up lift

> mvn clean compile jetty:run


   - Call curl

> curl -o test.txt
http://localhost:8080/biosimilarity-services/grammar/banana-cream-pie#file=file://



i expected to find text.txt containing:
banana-cream-pie#file=file://

However, it contains banana-cream-pie. This means that the fragment is being
dropped. How do i get the fragment?

Best wishes,

--greg

-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift Announce] Re: [Lift] Lift and Scala 2.8 Beta1

2010-01-29 Thread Meredith Gregory
Dear Indrajit,

Thanks! That works.

Best wishes,

--greg

On Fri, Jan 29, 2010 at 11:27 AM, Indrajit Raychaudhuri  wrote:

> For SNAPSHOTs, you need to add the SNAPSHOT repo explicitly.
>
> Try this command:
>
>
> mvn archetype:generate -U \
>   -DarchetypeGroupId=net.liftweb \
>   -DarchetypeArtifactId=lift-archetype-basic \
>   -DarchetypeVersion=2.0-scala280-SNAPSHOT \
>   -DarchetypeRepository=http://scala-tools.org/repo-snapshots \
>   -DremoteRepositories=http://scala-tools.org/repo-snapshots \
>   -DgroupId=$1 -DartifactId=$2
>
> NB: My previous reply was a supplement of this one:
> http://groups.google.com/group/liftweb/msg/0734a3a1b7d0424d
>
> Cheers, Indrajit
>
>
> On 30/01/10 12:50 AM, Meredith Gregory wrote:
>
>> Dear Indrajit,
>>
>> See the trace below with the archetypeVersion set as you suggest.
>>
>> Best wishes,
>>
>> --greg
>>
>> bash-3.2$ bin/mklift.sh com.biosimilarity.identity WhiteRabbit
>> [INFO] Scanning for projects...
>> [INFO] Searching repository for plugin with prefix: 'archetype'.
>> [INFO] org.apache.maven.plugins: checking for updates from central
>> [INFO] org.codehaus.mojo: checking for updates from central
>> [INFO] artifact org.apache.maven.plugins:maven-archetype-plugin:
>> checking for updates from central
>> [INFO]
>> 
>> [INFO] Building Maven Default Project
>> [INFO]task-segment: [archetype:generate] (aggregator-style)
>> [INFO]
>> 
>> [INFO] Preparing archetype:generate
>> [INFO] No goals needed for project - skipping
>> [INFO] Setting property: classpath.resource.loader.class =>
>> 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
>> [INFO] Setting property: velocimacro.messages.on => 'false'.
>> [INFO] Setting property: resource.loader => 'classpath'.
>> [INFO] Setting property: resource.manager.logwhenfound => 'false'.
>> [INFO] [archetype:generate]
>> [INFO] Generating project in Interactive mode
>> [INFO] Archetype repository missing. Using the one from
>> [net.liftweb:lift-archetype-basic:RELEASE ->
>> http://scala-tools.org/repo-releases] found in catalog internal
>> [INFO] snapshot net.liftweb:lift-archetype-basic:2.0-scala280-SNAPSHOT:
>> checking for updates from lift-archetype-basic-repo
>> Downloading:
>>
>> http://scala-tools.org/repo-releases/net/liftweb/lift-archetype-basic/2.0-scala280-SNAPSHOT/lift-archetype-basic-2.0-scala280-SNAPSHOT.jar
>> [INFO]
>> 
>> [ERROR] BUILD FAILURE
>> [INFO]
>> 
>> [INFO] The desired archetype does not exist
>> (net.liftweb:lift-archetype-basic:2.0-scala280-SNAPSHOT)
>> [INFO]
>> 
>> [INFO] For more information, run Maven with the -e switch
>> [INFO]
>> 
>> [INFO] Total time: 5 seconds
>> [INFO] Finished at: Fri Jan 29 11:19:16 PST 2010
>> [INFO] Final Memory: 8M/15M
>> [INFO]
>> 
>> bash-3.2$
>>
>> On Fri, Jan 29, 2010 at 11:16 AM, Meredith Gregory
>> mailto:lgreg.mered...@gmail.com>> wrote:
>>
>>Dear Indrajit,
>>
>>-DarchetypeVersion=2.0-scala280-SNAPSHOT
>>
>>was the first thing i tried and that failed. ;-(
>>
>>Best wishes,
>>
>>--greg
>>
>>
>>On Fri, Jan 29, 2010 at 11:15 AM, David Pollak
>>><mailto:feeder.of.the.be...@gmail.com>> wrote:
>>
>>
>>
>>On Thu, Jan 28, 2010 at 9:04 PM, Indrajit Raychaudhuri
>>mailto:indraj...@gmail.com>> wrote:
>>
>>The Lift 2.0 snapshot jars for Scala 2.8 are now available
>>on scala-tools Maven repository. Feel free to try your Lift
>>application against 2.0-scala280-SNAPSHOT jars.
>>
>>You can change Lift artifact dependencies version to
>>2.0-scala280-SNAPSHOT in you application pom and proceed to
>>build as usual.
>>
>>
>>Awesome!  Let the Lift on Scala 2.8 Beta1 testing and feedback
>>commence.
>>
>>
>>Cheers, Indrajit
&g

Re: [Lift Announce] Re: [Lift] Lift and Scala 2.8 Beta1

2010-01-29 Thread Meredith Gregory
Dear Indrajit,

See the trace below with the archetypeVersion set as you suggest.

Best wishes,

--greg

bash-3.2$ bin/mklift.sh com.biosimilarity.identity WhiteRabbit
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO] org.apache.maven.plugins: checking for updates from central
[INFO] org.codehaus.mojo: checking for updates from central
[INFO] artifact org.apache.maven.plugins:maven-archetype-plugin: checking
for updates from central
[INFO]

[INFO] Building Maven Default Project
[INFO]task-segment: [archetype:generate] (aggregator-style)
[INFO]

[INFO] Preparing archetype:generate
[INFO] No goals needed for project - skipping
[INFO] Setting property: classpath.resource.loader.class =>
'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
[INFO] Setting property: velocimacro.messages.on => 'false'.
[INFO] Setting property: resource.loader => 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound => 'false'.
[INFO] [archetype:generate]
[INFO] Generating project in Interactive mode
[INFO] Archetype repository missing. Using the one from
[net.liftweb:lift-archetype-basic:RELEASE ->
http://scala-tools.org/repo-releases] found in catalog internal
[INFO] snapshot net.liftweb:lift-archetype-basic:2.0-scala280-SNAPSHOT:
checking for updates from lift-archetype-basic-repo
Downloading:
http://scala-tools.org/repo-releases/net/liftweb/lift-archetype-basic/2.0-scala280-SNAPSHOT/lift-archetype-basic-2.0-scala280-SNAPSHOT.jar
[INFO]

[ERROR] BUILD FAILURE
[INFO]

[INFO] The desired archetype does not exist
(net.liftweb:lift-archetype-basic:2.0-scala280-SNAPSHOT)
[INFO]

[INFO] For more information, run Maven with the -e switch
[INFO]

[INFO] Total time: 5 seconds
[INFO] Finished at: Fri Jan 29 11:19:16 PST 2010
[INFO] Final Memory: 8M/15M
[INFO]
--------
bash-3.2$

On Fri, Jan 29, 2010 at 11:16 AM, Meredith Gregory  wrote:

> Dear Indrajit,
>
> -DarchetypeVersion=2.0-scala280-SNAPSHOT
>
> was the first thing i tried and that failed. ;-(
>
> Best wishes,
>
> --greg
>
>
> On Fri, Jan 29, 2010 at 11:15 AM, David Pollak <
> feeder.of.the.be...@gmail.com> wrote:
>
>>
>>
>> On Thu, Jan 28, 2010 at 9:04 PM, Indrajit Raychaudhuri <
>> indraj...@gmail.com> wrote:
>>
>>> The Lift 2.0 snapshot jars for Scala 2.8 are now available on scala-tools
>>> Maven repository. Feel free to try your Lift application against
>>> 2.0-scala280-SNAPSHOT jars.
>>>
>>> You can change Lift artifact dependencies version to
>>> 2.0-scala280-SNAPSHOT in you application pom and proceed to build as usual.
>>>
>>
>> Awesome!  Let the Lift on Scala 2.8 Beta1 testing and feedback commence.
>>
>>
>>
>>>
>>> Cheers, Indrajit
>>>
>>>
>>> On 28/01/10 2:31 AM, David Pollak wrote:
>>>
>>>> Folks,
>>>>
>>>> Lift is currently building against Scala 2.8 Beta1 and currently runs
>>>> the examples/example app (the app that's at http://demo.liftweb.net).
>>>> We have disabled many of the tests during the automated build because as
>>>> of last night, not all the test frameworks (ScalaTest, Specs, and
>>>> ScalaCheck) were compiled against 2.8 Beta1.
>>>>
>>>> We are doing continuous builds of Lift against the 280_port_refresh
>>>> branch at http://hudson.scala-tools.org/job/lift-scala280/  And will be
>>>> publishing to the scala-tools.org <http://scala-tools.org> Maven
>>>>
>>>> repository very soon now (today or tomorrow).
>>>>
>>>> Once we get the JAR files publishing to the Scala-tools.org Maven
>>>> repository, we will open up the Lift list to report of problems running
>>>> Lift apps against 2.8 Beta 1.  Please do not file tickets until there's
>>>> been a discussion on the Lift list.
>>>>
>>>> Thanks,
>>>>
>>>> David
>>>>
>>>> --
>>>> Lift, the simply functional web framework http://liftweb.net
>>>> Beginning Scala http://www.apress.com/book/view/1430219890
>>>> 

Re: [Lift Announce] Re: [Lift] Lift and Scala 2.8 Beta1

2010-01-29 Thread Meredith Gregory
Dear Indrajit,

-DarchetypeVersion=2.0-scala280-SNAPSHOT

was the first thing i tried and that failed. ;-(

Best wishes,

--greg

On Fri, Jan 29, 2010 at 11:15 AM, David Pollak <
feeder.of.the.be...@gmail.com> wrote:

>
>
> On Thu, Jan 28, 2010 at 9:04 PM, Indrajit Raychaudhuri <
> indraj...@gmail.com> wrote:
>
>> The Lift 2.0 snapshot jars for Scala 2.8 are now available on scala-tools
>> Maven repository. Feel free to try your Lift application against
>> 2.0-scala280-SNAPSHOT jars.
>>
>> You can change Lift artifact dependencies version to 2.0-scala280-SNAPSHOT
>> in you application pom and proceed to build as usual.
>>
>
> Awesome!  Let the Lift on Scala 2.8 Beta1 testing and feedback commence.
>
>
>
>>
>> Cheers, Indrajit
>>
>>
>> On 28/01/10 2:31 AM, David Pollak wrote:
>>
>>> Folks,
>>>
>>> Lift is currently building against Scala 2.8 Beta1 and currently runs
>>> the examples/example app (the app that's at http://demo.liftweb.net).
>>> We have disabled many of the tests during the automated build because as
>>> of last night, not all the test frameworks (ScalaTest, Specs, and
>>> ScalaCheck) were compiled against 2.8 Beta1.
>>>
>>> We are doing continuous builds of Lift against the 280_port_refresh
>>> branch at http://hudson.scala-tools.org/job/lift-scala280/  And will be
>>> publishing to the scala-tools.org  Maven
>>>
>>> repository very soon now (today or tomorrow).
>>>
>>> Once we get the JAR files publishing to the Scala-tools.org Maven
>>> repository, we will open up the Lift list to report of problems running
>>> Lift apps against 2.8 Beta 1.  Please do not file tickets until there's
>>> been a discussion on the Lift list.
>>>
>>> Thanks,
>>>
>>> David
>>>
>>> --
>>> Lift, the simply functional web framework http://liftweb.net
>>> Beginning Scala http://www.apress.com/book/view/1430219890
>>> Follow me: http://twitter.com/dpp
>>> Surf the harmonics
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Lift" group.
>>> To post to this group, send email to lift...@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> liftweb+unsubscr...@googlegroups.com
>>> .
>>> For more options, visit this group at
>>> http://groups.google.com/group/liftweb?hl=en.
>>>
>>
>
>
> --
> Lift, the simply functional web framework http://liftweb.net
> Beginning Scala http://www.apress.com/book/view/1430219890
> Follow me: http://twitter.com/dpp
> Surf the harmonics
>
> --
> You received this message because you are subscribed to the Google Groups
> "Lift" group.
> To post to this group, send email to lift...@googlegroups.com.
> To unsubscribe from this group, send email to
> liftweb+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/liftweb?hl=en.
>



-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



Re: [Lift] Lift and Scala 2.8 Beta1

2010-01-29 Thread Meredith Gregory
Dear Indrajit,

i have a lot better luck with this way of testing before plunging if i
change my archetype generation script to use  -DarchetypeVersion=2.0-M1.

Best wishes,

--greg

On Fri, Jan 29, 2010 at 10:37 AM, Meredith Gregory  wrote:

> Dear Indrajit,
>
> Thanks for your diligence on this effort! However, i'm not having a lot of
> luck. Here's my methodology.
>
>- i would like to test using an archetype generated project before i
>test with my project code -- which is likely to be so stupid and
>error-ridden as to cause all kinds of problems. i've got a feeling that the
>archetype i'm getting is out of sync (please see the script i use and the
>trace it generates).
>- After generating the project from the archetype i change the lift
>version as you indicate and the lift jars cannot be resolved. This may have
>to do with the problem above.
>
> Best wishes,
>
> --greg
>
>
>- Script
>
> #! /bin/sh
> mvn archetype:generate -U   \
>  -DarchetypeGroupId=net.liftweb \
>  -DarchetypeArtifactId=lift-archetype-basic \
>  -DarchetypeVersion=1.0 \
>  -DremoteRepositories=http://scala-tools.org/repo-releases  \
>  -DgroupId=$1 -DartifactId=$2
>
>
>
>- Trace
>
> bash-3.2$ bin/mklift.sh com.biosimilarity.identity testLift280
> [INFO] Scanning for projects...
> [INFO] Searching repository for plugin with prefix: 'archetype'.
> [INFO] org.apache.maven.plugins: checking for updates from central
> [INFO] org.codehaus.mojo: checking for updates from central
> [INFO] artifact org.apache.maven.plugins:maven-archetype-plugin: checking
> for updates from central
> [INFO]
> 
> [INFO] Building Maven Default Project
> [INFO]task-segment: [archetype:generate] (aggregator-style)
> [INFO]
> 
> [INFO] Preparing archetype:generate
> [INFO] No goals needed for project - skipping
> [INFO] Setting property: classpath.resource.loader.class =>
> 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
> [INFO] Setting property: velocimacro.messages.on => 'false'.
> [INFO] Setting property: resource.loader => 'classpath'.
> [INFO] Setting property: resource.manager.logwhenfound => 'false'.
> [INFO] [archetype:generate]
> [INFO] Generating project in Interactive mode
> [INFO] Archetype repository missing. Using the one from
> [net.liftweb:lift-archetype-basic:RELEASE ->
> http://scala-tools.org/repo-releases] found in catalog internal
> Downloading:
> http://scala-tools.org/repo-releases/net/liftweb/lift-archetype-basic/1.0/lift-archetype-basic-1.0.jar
> 15K downloaded
> Define value for version:  1.0-SNAPSHOT: :
> Confirm properties configuration:
> groupId: com.biosimilarity.identity
> artifactId: testLift280
> version: 1.0-SNAPSHOT
> package: com.biosimilarity.identity
>  Y: :
> [INFO]
> 
> [INFO] Using following parameters for creating OldArchetype:
> lift-archetype-basic:1.0
> [INFO]
> 
> [INFO] Parameter: groupId, Value: com.biosimilarity.identity
> [INFO] Parameter: packageName, Value: com.biosimilarity.identity
> [INFO] Parameter: basedir, Value: /Users/lgm/work/src/projex/biosimilarity
> [INFO] Parameter: package, Value: com.biosimilarity.identity
> [INFO] Parameter: version, Value: 1.0-SNAPSHOT
> [INFO] Parameter: artifactId, Value: testLift280
> [INFO] * End of debug info from resources from
> generated POM ***
> [INFO] OldArchetype created in dir:
> /Users/lgm/work/src/projex/biosimilarity/testLift280
> [INFO]
> 
> [INFO] BUILD SUCCESSFUL
> [INFO]
> 
> [INFO] Total time: 12 seconds
> [INFO] Finished at: Fri Jan 29 10:28:16 PST 2010
> [INFO] Final Memory: 8M/15M
> [INFO]
> 
> bash-3.2$ cd testLift280/
> bash-3.2$ mvn -U clean compile
> [INFO] Scanning for projects...
> [INFO]
> 
> [INFO] Building testLift280
> [INFO]task-segment: [clean, compile]
> [INFO]
> 
> [INFO] artifact org.scala-

Re: [Lift] Lift and Scala 2.8 Beta1

2010-01-29 Thread Meredith Gregory
Dear Indrajit,

Thanks for your diligence on this effort! However, i'm not having a lot of
luck. Here's my methodology.

   - i would like to test using an archetype generated project before i test
   with my project code -- which is likely to be so stupid and error-ridden as
   to cause all kinds of problems. i've got a feeling that the archetype i'm
   getting is out of sync (please see the script i use and the trace it
   generates).
   - After generating the project from the archetype i change the lift
   version as you indicate and the lift jars cannot be resolved. This may have
   to do with the problem above.

Best wishes,

--greg


   - Script

#! /bin/sh
mvn archetype:generate -U   \
 -DarchetypeGroupId=net.liftweb \
 -DarchetypeArtifactId=lift-archetype-basic \
 -DarchetypeVersion=1.0 \
 -DremoteRepositories=http://scala-tools.org/repo-releases  \
 -DgroupId=$1 -DartifactId=$2



   - Trace

bash-3.2$ bin/mklift.sh com.biosimilarity.identity testLift280
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO] org.apache.maven.plugins: checking for updates from central
[INFO] org.codehaus.mojo: checking for updates from central
[INFO] artifact org.apache.maven.plugins:maven-archetype-plugin: checking
for updates from central
[INFO]

[INFO] Building Maven Default Project
[INFO]task-segment: [archetype:generate] (aggregator-style)
[INFO]

[INFO] Preparing archetype:generate
[INFO] No goals needed for project - skipping
[INFO] Setting property: classpath.resource.loader.class =>
'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
[INFO] Setting property: velocimacro.messages.on => 'false'.
[INFO] Setting property: resource.loader => 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound => 'false'.
[INFO] [archetype:generate]
[INFO] Generating project in Interactive mode
[INFO] Archetype repository missing. Using the one from
[net.liftweb:lift-archetype-basic:RELEASE ->
http://scala-tools.org/repo-releases] found in catalog internal
Downloading:
http://scala-tools.org/repo-releases/net/liftweb/lift-archetype-basic/1.0/lift-archetype-basic-1.0.jar
15K downloaded
Define value for version:  1.0-SNAPSHOT: :
Confirm properties configuration:
groupId: com.biosimilarity.identity
artifactId: testLift280
version: 1.0-SNAPSHOT
package: com.biosimilarity.identity
 Y: :
[INFO]

[INFO] Using following parameters for creating OldArchetype:
lift-archetype-basic:1.0
[INFO]

[INFO] Parameter: groupId, Value: com.biosimilarity.identity
[INFO] Parameter: packageName, Value: com.biosimilarity.identity
[INFO] Parameter: basedir, Value: /Users/lgm/work/src/projex/biosimilarity
[INFO] Parameter: package, Value: com.biosimilarity.identity
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] Parameter: artifactId, Value: testLift280
[INFO] * End of debug info from resources from generated
POM ***
[INFO] OldArchetype created in dir:
/Users/lgm/work/src/projex/biosimilarity/testLift280
[INFO]

[INFO] BUILD SUCCESSFUL
[INFO]

[INFO] Total time: 12 seconds
[INFO] Finished at: Fri Jan 29 10:28:16 PST 2010
[INFO] Final Memory: 8M/15M
[INFO]

bash-3.2$ cd testLift280/
bash-3.2$ mvn -U clean compile
[INFO] Scanning for projects...
[INFO]

[INFO] Building testLift280
[INFO]task-segment: [clean, compile]
[INFO]

[INFO] artifact org.scala-tools:maven-scala-plugin: checking for updates
from scala-tools.org
[INFO] artifact org.scala-tools:maven-scala-plugin: checking for updates
from central
[INFO] artifact org.mortbay.jetty:maven-jetty-plugin: checking for updates
from scala-tools.org
[INFO] artifact org.mortbay.jetty:maven-jetty-plugin: checking for updates
from central
[INFO] artifact net.sf.alchim:yuicompressor-maven-plugin: checking for
updates from scala-tools.org
[INFO] artifact net.sf.alchim:yuicompressor-maven-plugin: checking for
updates from central
[INFO] artifact org.apache.maven.plugins:maven-eclipse-plugin: checking for
updates from scala-tools.org
[INFO] artifact org.apache.maven.plugins:maven-eclipse-plugin: checking for
updates from central
[INFO] [clean:clean]
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.

Re: [Lift] Lift and Scala 2.8 Beta1

2010-01-28 Thread Meredith Gregory
Dear David,

Did the jars get pushed up to the Scala-tools.org Maven repository?

Best wishes,

--greg

On Wed, Jan 27, 2010 at 1:01 PM, David Pollak  wrote:

> Folks,
>
> Lift is currently building against Scala 2.8 Beta1 and currently runs the
> examples/example app (the app that's at http://demo.liftweb.net).  We have
> disabled many of the tests during the automated build because as of last
> night, not all the test frameworks (ScalaTest, Specs, and ScalaCheck) were
> compiled against 2.8 Beta1.
>
> We are doing continuous builds of Lift against the 280_port_refresh branch
> at http://hudson.scala-tools.org/job/lift-scala280/  And will be
> publishing to the scala-tools.org Maven repository very soon now (today or
> tomorrow).
>
> Once we get the JAR files publishing to the Scala-tools.org Maven
> repository, we will open up the Lift list to report of problems running Lift
> apps against 2.8 Beta 1.  Please do not file tickets until there's been a
> discussion on the Lift list.
>
> Thanks,
>
> David
>
> --
> Lift, the simply functional web framework http://liftweb.net
> Beginning Scala http://www.apress.com/book/view/1430219890
> Follow me: http://twitter.com/dpp
> Surf the harmonics
>
> --
> You received this message because you are subscribed to the Google Groups
> "Lift" group.
> To post to this group, send email to lift...@googlegroups.com.
> To unsubscribe from this group, send email to
> liftweb+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/liftweb?hl=en.
>



-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.



[Lift] Re: [scala] EclipseLink?

2009-10-06 Thread Meredith Gregory
Dear Ismael,

Prompted by this thread i did some digging and saw that in the attempt to
move from hibernate to toplink to eclipselink i had not consistently
switched from toplink to eclipselink. So, i'm now getting the download to
work. Thanks again. BTW, i wonder if you know whether eclipselink has
equivalents to the maven-hibernate targets for generating ddl and such.

Best wishes,

--greg

On Tue, Oct 6, 2009 at 1:25 PM, Ismael Juma  wrote:

> On Tue, 2009-10-06 at 09:47 -0700, Meredith Gregory wrote:
> > Dear Ismael,
> >
> > i got buried under some other work and forgot to thank you for this
> > note. If you look further down on the web page you referenced you will
> > see that the pom.xml snippets they include have the characters escaped
> > as you suggested. i cut and pasted these into my pom.xml for my
> > experiments and the download failed.
>
> That is strange as I have been using that repository for many months
> now.
>
> Ismael
>
>


-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: [scala] EclipseLink?

2009-10-06 Thread Meredith Gregory
Dear Ismael,

i got buried under some other work and forgot to thank you for this note. If
you look further down on the web page you referenced you will see that the
pom.xml snippets they include have the characters escaped as you suggested.
i cut and pasted these into my pom.xml for my experiments and the download
failed.

Best wishes,

--greg

On Mon, Sep 28, 2009 at 9:07 PM, Ismael Juma  wrote:

> On Mon, 2009-09-28 at 13:53 -0700, Meredith Gregory wrote:
> > Dear Ismael,
> >
> > Thanks. i knew about that and tried it. My version of maven barf'ed on
> > the download url and so it didn't work for me. i would much prefer not
> > to have to ferret out and maintain the jar myself. ;-)
>
> That's probably because you didn't escape the characters in the XML, the
> following works:
>
>
> http://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/rt/eclipselink/maven.repo
>
> Best,
> Ismael
>
>


-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Removing Scala Actors from Lift

2009-09-29 Thread Meredith Gregory
Dear David,

i don't really see this as losing our Scala Actors so much as *gaining* an
interface. Surely, someone can wire up Scala Actors to that interface if
there is a need. ;-)

Best wishes,

--greg

On Mon, Sep 28, 2009 at 7:30 PM, David Pollak  wrote:

> Folks,
>
> Given the continued instability of Scala Actors, I've decided to remove
> them from Lift.
>
> Specifically, I'm migrating CometActors to sit on top of Lift's Actors.
> But, you'll also be able to use Akka Actors to power Lift's CometActors.
> Specifically, I'm working with Jonas to make sure that we share a common
> interface to Actors.
>
> I've gotten Lift nearly completely migrated over to Lift's Actors on the
> dpp_wip_actorize branch.  See
> http://github.com/dpp/liftweb/tree/dpp_wip_actorize
>
> There will be some breaking changes to your applications.  Specifically:
>
>- Box will be moved to a new package, net.liftweb.base (this is where
>the interface for Actors will live as well)
>- If you make any assumptions about your CometActors being Scala Actors
>(e.g., using linking), you will have to rewrite this code
>- Some methods in Lift that currently take Scala Actors as parameters
>will take Lift Actors (e.g., ActorPing)
>
> There will be a parallel Maven repository with the new Lift Actor stuff in
> it so you will be able to build you apps against the new code before the
> official switch-over.
>
> Milestone 6 (which should be out next week) will be based on the existing
> Actor model.  After we get feedback from the community about the new Actor
> stuff, we will switch -SNAPSHOT over to the new Actor stuff.
>
> Questions, thoughts, or comments?
>
> Thanks,
>
> David
>
>
>
> --
> Lift, the simply functional web framework http://liftweb.net
> Beginning Scala http://www.apress.com/book/view/1430219890
> Follow me: http://twitter.com/dpp
> Surf the harmonics
>
> >
>


-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Code Plugability in Lift

2009-09-28 Thread Meredith Gregory
Dear Derek,

You hit the nail on the head. JPA is a quagmire disguised as an abstraction.


Best wishes,

--greg

On Mon, Sep 28, 2009 at 11:01 AM, Derek Chen-Becker
wrote:

> It's a really ugly corner that JPA paints us into here. There aren't any
> vendor-neutral APIs for programmatically wiring entities up, so it's going
> to have to be some sort of trickery.
>
>
> On Fri, Sep 25, 2009 at 4:23 PM, Timothy Perrett 
> wrote:
>
>> Are you feeling OK david? For a moment I thought you said *runtime*
>> bytecode generation?!
>>
>> Cheers, Tim
>>
>> On 25 Sep 2009, at 23:06, David Pollak wrote:
>>
>> I've been thinking about vomitting (I mean creating) bytecode at runtime
>> that creates a mock class for Hibernate consumption.
>>
>> On Fri, Sep 25, 2009 at 3:01 PM, Derek Chen-Becker > > wrote:
>>
>>> I've been thinking about it in the back of my head. I may be able to get
>>> something working that's vendor specific (e.g. Hibernate) by using their
>>> internal API to have the Record+JPA driver wire up the entities at runtime
>>> based on Record metadata. Feels kinda dirty, but if it works that would be
>>> great.
>>>
>>> Derek
>>>
>>>
>>> On Mon, Sep 21, 2009 at 4:29 PM, Timothy Perrett <
>>> timo...@getintheloop.eu> wrote:
>>>

 I know we've discussed this before, but ultimately we'd like to wrap
 JPA with a Record front end somehow...

 Cheers, Tim

 On Sep 21, 10:42 pm, David Pollak 
 wrote:
 > On Mon, Sep 21, 2009 at 2:03 PM, glenn  wrote:
 >
 > > David,
 >
 > > Does this mean you could write an entity class, like so:
 >
 > > class User(val firstName: String, val lastName: String, val
 userName:
 > > String, val email: String, val password: String) with myTrait {...}
 >
 > > and it would be useable in either a JPA or mapper or record
 > > implementation?
 >
 > No.  Mapper/Record require a richer representation of fields than
 Pojos.
 >  The reason for this can be found athttp://
 blog.lostlake.org/index.php?/archives/19-Keeping-the-meaning-w...
 >
 >
 >
 >
 >
 >
 >
 > > That would be the ticket.
 >
 > > Glenn
 >
 > > On Sep 21, 12:47 pm, David Pollak 
 > > wrote:
 > > > This is an impedance mis-match between POJOs (what JPA expects)
 and the
 > > > richer fields that Mapper and Record have.
 > > > I'm working on an interface (
 > >
 http://github.com/dpp/liftweb/blob/master/lift-util/src/main/scala/ne..
 .)
 > > > that should be a base trait on everything in Lift that's gettable
 or
 > > > gettable/settable.
 >
 > > > Then you could write a trait that looks like:
 >
 > > > trait MyThing {  def name: PSettableValueHolder[String]
 > > > *
 > > > *
 > > > * def getName(): String = name.is*
 > > > * def setName(in: String) = name.set(in)*
 > > > *
 > > > *
 > > > * *
 >
 > > > }
 >
 > > > Such a trait should be able to bridge a JPA implementation and a
 Lift
 > > mapper
 > > > implementation.
 >
 > > > If you've got a better solution, please code it up and let's talk
 about
 > > it.
 >
 > > > On Mon, Sep 21, 2009 at 9:31 AM, glenn  wrote:
 >
 > > > > Forgive me. I'm bringing up the subject of modularization in
 Lift
 > > > > under a new heading, but the last discussion was, sadly, all
 over the
 > > > > map and only served to emphasize the problem. So let me narrow
 it
 > > > > down, a bit, here, and ask:
 >
 > > > > How is it possible to create two different snippet
 implementations, or
 > > > > two different models, one JPA and one not, or one using the
 mapper
 > > > > framework and another the record, and replace one with the other
 > > > > without having to recompile the application?
 >
 > > > > We're not talking here about interface design - you still have
 to deal
 > > > > with boot.  And traits, as has been suggested by others...well,
 you'd
 > > > > better not expose them to the world outside your implementation,
 as
 > > > > any changes would require recompilation. In other words, you
 can't
 > > > > really use traits for your interface.
 >
 > > > > To use Lift in the enterprise does require that teams be able to
 work
 > > > > independently, doesn't it.
 >
 > > > > Glenn
 >
 > > > --
 > > > Lift, the simply functional web frameworkhttp://liftweb.net
 > > > Beginning Scalahttp://www.apress.com/book/view/1430219890
 > > > Follow me:http://twitter.com/dpp
 > > > Git some:http://github.com/dpp
 >
 > --
 > Lift, the simply functional web frameworkhttp://liftweb.net
 > Beginning Scalahttp://www.apress.com/book/view/1430219890
 > Follow me:http://twitter.com/dpp
 > Git some:http://github.com/dpp


>>>
>>>
>>>
>>
>>
>> --
>> Lift, the simply fu

[Lift] Re: [scala] EclipseLink?

2009-09-28 Thread Meredith Gregory
Dear Ismael,

Thanks. i knew about that and tried it. My version of maven barf'ed on the
download url and so it didn't work for me. i would much prefer not to have
to ferret out and maintain the jar myself. ;-)

Best wishes,

--greg

On Mon, Sep 28, 2009 at 12:56 PM, Ismael Juma  wrote:

> Hey Greg,
>
> On Mon, 2009-09-28 at 10:57 -0700, Meredith Gregory wrote:
> > Is there maven support?
>
> http://wiki.eclipse.org/EclipseLink/Maven
>
> Ismael
>
>


-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] EclipseLink?

2009-09-28 Thread Meredith Gregory
Dear Lifted and Scalarazzi,

Does anyone have experience with using EclipseLink in a Scala/Lift setting?
Is there maven support?

Best wishes,

--greg

-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: You are not banned from this group!!

2009-09-24 Thread Meredith Gregory
Dear Oliver,

As a father of five, i know the feeling. Sending good will and good wishes
to you and yours,

--greg

On Thu, Sep 24, 2009 at 6:29 AM, Oliver Lambert  wrote:

> My son was born a week ago, with a heart defect that has just been operated
> on - I've been biting my nails for months and haven't felt like
> communicating or working. Things are starting to look good for him so maybe
> Im back.
> cheers
> Oliver
>
>
> On Thu, Sep 24, 2009 at 12:08 PM, Charles F. Munat  wrote:
>
>>
>> Funny, I was just wondering what happened to you maybe two days ago. Are
>> you back, or just checking in?
>>
>> Chas.
>>
>> Oliver Lambert wrote:
>> >
>> >
>> > On Tue, Sep 22, 2009 at 7:21 AM, David Pollak
>> > mailto:feeder.of.the.be...@gmail.com>>
>> > wrote:
>> >
>> >
>> > I will gladly buy beer/coffee/food for anyone who gets such a
>> > notice.  I sincerely apologize for any problems this is causing.
>> >
>> >
>> > Can you send me such a notice, I'd like a beer!
>> > Oh, and I've been away for a while, its nice to see the lift mailing
>> > list is going so strong.
>> >
>> > Oliver
>> >
>> > >
>>
>>
>>
>
> >
>


-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: You are not banned from this group!!

2009-09-23 Thread Meredith Gregory
Dear David,

My coffee addiction says i'm feeling very banned.

Best wishes,

--greg

On Wed, Sep 23, 2009 at 7:08 PM, Charles F. Munat  wrote:

>
> Funny, I was just wondering what happened to you maybe two days ago. Are
> you back, or just checking in?
>
> Chas.
>
> Oliver Lambert wrote:
> >
> >
> > On Tue, Sep 22, 2009 at 7:21 AM, David Pollak
> > mailto:feeder.of.the.be...@gmail.com>>
> > wrote:
> >
> >
> > I will gladly buy beer/coffee/food for anyone who gets such a
> > notice.  I sincerely apologize for any problems this is causing.
> >
> >
> > Can you send me such a notice, I'd like a beer!
> > Oh, and I've been away for a while, its nice to see the lift mailing
> > list is going so strong.
> >
> > Oliver
> >
> > >
>
> >
>


-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: You are not banned from this group!!

2009-09-21 Thread Meredith Gregory
Dear Chas,

Didn't you know... more than half the data in world is still flying over
sneakernet. ;-)

Best wishes,

--greg

On Mon, Sep 21, 2009 at 2:58 PM, Charles F. Munat  wrote:

>
> But were the sneakers any good?
>
> Chas.
>
> David Pollak wrote:
> > Folks,
> >
> > Google Groups has apparently sent messages to a number of folks posting
> > to the Lift group telling them that they were banned.  This is simply
> > wrong and sucks for the people who received the messages.
> >
> > There has been one substantive poster who was so abusive on the Lift
> > list that he was banned (this was after a number of private emails to
> > the party).  We ban spammers (people posting links to adult sites, cheap
> > knock-off Nike shoes, etc.)  I accidentally banned a person once because
> > I mis-read his mail and it sounded like he was selling sneakers.
> >
> > So, if you've received email stating you were banned, please forward the
> > email to me (yes, this is an exception to the rule of not contacting me
> > personally).  If you have a screen shot of being banned, please send it
> > to me.
> >
> > I will gladly buy beer/coffee/food for anyone who gets such a notice.  I
> > sincerely apologize for any problems this is causing.
> >
> > And, *YOU ARE NOT BANNED!!*
> >
> > Thanks,
> >
> > David
> >
> > --
> > Lift, the simply functional web framework http://liftweb.net
> > Beginning Scala http://www.apress.com/book/view/1430219890
> > Follow me: http://twitter.com/dpp
> > Git some: http://github.com/dpp
> >
> > >
>
> >
>


-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Welcome Indrajit Raychaudhuri to the Lift Committers

2009-09-18 Thread Meredith Gregory
Indrajit! Glad you could join the party! B.w. --greg

On Fri, Sep 18, 2009 at 6:54 PM, marius d.  wrote:

>
> Outstanding! Welcome aboard!
>
> Br's,
> Marius
>
> On Sep 18, 7:00 pm, David Pollak 
> wrote:
> > Folks,
> >
> > Please join me in welcoming Indrajit Raychaudhuri to the Lift committers.
> >
> > Indrajit has been very visible on the Lift list of late, offering lots of
> > good solutions to people's questions.  He's got some ideas of improving
> the
> > Lift Maven infrastructure and build process and will be contributing to
> the
> > build side (and may substantive code side) of Lift.
> >
> > Thanks,
> >
> > David
> >
> > --
> > Lift, the simply functional web frameworkhttp://liftweb.net
> > Beginning Scalahttp://www.apress.com/book/view/1430219890
> > Follow me:http://twitter.com/dpp
> > Git some:http://github.com/dpp
> >
>


-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Where's LiftFilter connected in with LiftServlet?

2009-09-18 Thread Meredith Gregory
Dear Lifted,
bash-3.2$ cd liftweb/
bash-3.2$ ls
builtin http sitemap
bash-3.2$ find . -name *.scala -exec grep "LiftFilter" '{}' \; -print
class LiftFilter extends ServletFilterProvider
./http/LiftServlet.scala
 * @see LiftFilter
./http/S.scala
bash-3.2$

The web.xml file references LiftFilter. The class LiftFilter extends the
Java class ServletFilterProvider and has no body. It looks like all the
logic is in LiftServlet. What makes the connection?

Best wishes,

--greg

-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: id selectors discouraged?

2009-08-24 Thread Meredith Gregory
David,

Thanks! i've no idea why you guys put up with me, but i'm glad you do!

Best wishes,

--greg

On Mon, Aug 24, 2009 at 5:22 PM, David Pollak  wrote:

> Please make sure you're using Scala 2.7.5 in your pom.xml
>
> Please make sure that List("paint") is in lower case in your sitemap.
>
> On Mon, Aug 24, 2009 at 3:53 PM, Meredith Gregory <
> lgreg.mered...@gmail.com> wrote:
>
>> Lifted,
>>
>> At the pixillion 
>> master<http://github.com/leithaus/pixillion/tree/master>i've an example 
>> where it appears that id selectors are not working
>> correctly... Or, maybe i just don't know how to use CSS. The site map (after
>> login) will show three pages of interest: paint, chat, combo. Paint is raw
>> js without lift intervention and works as intended (for now). Chat is
>> cribbed from the lift chat example. Combo attempts to put the two on the
>> same page with lift tags in the drivers seat. As you can see the style is
>> not being governed in the same way on the combo page, causing erroneous
>> behavior in the paint rendering. Any help would be greatly appreciated.
>
>
> If you remove the:
>
>
> 
>
> lines from /templates-hidden/default.html, you'll get a much better
> result.  The CSS in Blueprint CSS is munging the CSS used by the paint
> program.
>
> Please take a look at Firebug... it's a debugger for browsers... you can
> see exactly how the browser applies style to each element.  It's mighty
> helpful.
>
> On other notes, any JavaScript on the page *must* be escaped in 
>
>
> The change set I sent out the last time you used the pixillion stuff as an
> example should be applied to your project.  It fixes the Scala version issue
> as well as the 

[Lift] id selectors discouraged?

2009-08-24 Thread Meredith Gregory
Lifted,

At the pixillion master
i've an example
where it appears that id selectors are not working
correctly... Or, maybe i just don't know how to use CSS. The site map (after
login) will show three pages of interest: paint, chat, combo. Paint is raw
js without lift intervention and works as intended (for now). Chat is
cribbed from the lift chat example. Combo attempts to put the two on the
same page with lift tags in the drivers seat. As you can see the style is
not being governed in the same way on the combo page, causing erroneous
behavior in the paint rendering. Any help would be greatly appreciated.

Best wishes,

--greg

-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Notes from 8/19/09 Lift Committers Call - LIFT SESSION REPLICATION DISCUSSION

2009-08-24 Thread Meredith Gregory
David,

Can one leave proxies in place for things that are not actually
serializable?

Best wishes,

--greg

On Mon, Aug 24, 2009 at 12:55 PM, David Pollak <
feeder.of.the.be...@gmail.com> wrote:

>
>
> On Mon, Aug 24, 2009 at 12:36 PM, marius d. wrote:
>
>>
>> Just a FYI. I briefly talked with Martin and he said this idea is
>> possible but quite tricky. Stephane Micheloud did something similar
>> and he may share some of his work. I'm waiting some feedback from him.
>
>
> I think we can do it at runtime in development mode.  This is just for data
> gathering, not for actual implementation.  We just need to calculate whether
> a given class is serializable once... so we don't have to worry about cyclic
> graphs or anything else... just... are the "slots" (instance variables) for
> each class serializable.
>
>
>>
>>
>> Br's,
>> Marius
>>
>> On Aug 24, 10:46 am, "marius d."  wrote:
>> > On Aug 24, 10:39 am, Viktor Klang  wrote:
>> >
>> >
>> >
>> > > On Mon, Aug 24, 2009 at 8:13 AM, marius d. 
>> wrote:
>> >
>> > > > On Aug 24, 12:06 am, David Pollak 
>> > > > wrote:
>> > > > > On Sun, Aug 23, 2009 at 10:45 AM, marius d. <
>> marius.dan...@gmail.com>
>> > > > wrote:
>> >
>> > > > > > Hmmm .. I'm wondering if we can write aScalacompilerpluginthat
>> > > > > > transform functions provided to Lift's S/SHtml function etc.
>> into a
>> > > > > > richer FunctionX implementation that knows how to "serialize"
>> it's
>> > > > > > members. We could restrict the types that as LiftSerializable on
>> top
>> > > > > > of primitives, Calenars, SessionVar/RequestVar etc. If users
>> need
>> > > > > > their own classes to be LiftSerilizable they would have to
>> implement
>> > > > > > LiftSerializable trait.
>> >
>> > > > > I think we can do it without explicit traits.  I think we just
>> need to
>> > > > walk
>> > > > > the graph for everything that's added to the LiftSession and see
>> where it
>> > > > > leads.  Any graph we can walk is something that we can
>> serialize... even
>> > > > > without Java serialization.  Any graph that ends in globals or
>> some class
>> > > > > that refers to native stuff (e.g., IO), then we're toast.
>> >
>> > > > Totally agree. The rationale for explicit LiftSerializable would be
>> > > > just for user defined types. Otherwise user's won't have to use it.
>> > > > Graphs may also have be cyclic paths ... it shouldn't be too big of
>> a
>> > > > pain though. Furthermore if a dependency graph path leads say to an
>> IO
>> > > > reference maybe that's unintentional user code doesn't really use
>> that
>> > > > but compiler put it for whatever reason. If such cases are possible
>> > > > and could be determined maybe we could exclude that silently from
>> the
>> > > > serialization operation and add a compile time warning.
>> >
>> > > > I guess we need to dig more intoscalacompilerpluginsystem.
>> >
>> > > 1. Isn't there a problem with references _inside_ methods that are
>> > > impure/sideeffecting?
>> >
>> > > s => { Db.myCachedInfoNotInSession foo s  }
>> >
>> > > Regarding member references, a simple check for "transient"
>> > > (sca...@transient == java *transient*) to forcve people to use
>> transient
>> > > members for non-serializable state.
>> >
>> > > But IMHO the serialization problem is a (negative?) sideeffect of
>> Lifts rich
>> > > model GUID=>Func approach.
>> > > Perhpas there is a middle way, a way where we can replicate just
>> enough to
>> > > survive a node crash?
>> >
>> > That's exactly it. We probably don't need everything that Java
>> > Serialization does. Just enough to make it consistent ... the
>> > dependency graphs that is actually used by the user's function.
>> >
>> >
>> >
>> > > > > > Thoughts?
>> >
>> > > > > > Br's,
>> > > > > > Marius
>> >
>> > > > > > On Aug 23, 8:30 pm, "marius d." 
>> wrote:
>> > > > > > > At a first glace Java serialization is needed because of its
>> > > > awareness
>> > > > > > > of the reference graph. But in the same time it does not
>> perform
>> > > > well.
>> > > > > > > One way might be the byte level instrumentation that would
>> induce
>> > > > code
>> > > > > > > to figure out the reference graph and know how to stream-ify
>> it using
>> > > > > > > a given efficient protocol. But that induces risks and it
>> involves
>> > > > > > > tons of work. I think would be doable though.
>> >
>> > > > > > > The problem is not really the technology of propagating
>> session
>> > > > > > > information to other nodes. That's the easiest part, but tough
>> one is
>> > > > > > > figuring out the low level reference graph and serialization
>> > > > > > > semantics. This is why JINI, JavaSpaces, JGroups, CORBA, JXTA,
>> you
>> > > > > > > name it, are unlikely to help solving the fundamental problem.
>> >
>> > > > > > > Br's,
>> > > > > > > Marius
>> >
>> > > > > > > On Aug 23, 8:16 pm, Arthur  wrote:
>> >
>> > > > > > > > On Sun, Aug 23, 2009 at 7:04 PM, David
>> >
>> > > > > > > > Pollak wrote:
>> > > > > > > > > On Sun, Aug 23, 2009 at 4:5

[Lift] Re: Notes from 8/19/09 Lift Committers Call - LIFT SESSION REPLICATION DISCUSSION

2009-08-23 Thread Meredith Gregory
Marius,

This is closely related to the proposal to deal with http streams via
delimited continuations. Sorry i haven't fleshed this out a bit. Let me put
my thoughts on paper/pseudo code and email it out for comment in a day or
so.

Best wishes,

--greg

On Sun, Aug 23, 2009 at 10:45 AM, marius d.  wrote:

>
> Hmmm .. I'm wondering if we can write a Scala compiler plugin that
> transform functions provided to Lift's S/SHtml function etc. into a
> richer FunctionX implementation that knows how to "serialize" it's
> members. We could restrict the types that as LiftSerializable on top
> of primitives, Calenars, SessionVar/RequestVar etc. If users need
> their own classes to be LiftSerilizable they would have to implement
> LiftSerializable trait.
>
> Thoughts?
>
> Br's,
> Marius
>
> On Aug 23, 8:30 pm, "marius d."  wrote:
> > At a first glace Java serialization is needed because of its awareness
> > of the reference graph. But in the same time it does not perform well.
> > One way might be the byte level instrumentation that would induce code
> > to figure out the reference graph and know how to stream-ify it using
> > a given efficient protocol. But that induces risks and it involves
> > tons of work. I think would be doable though.
> >
> > The problem is not really the technology of propagating session
> > information to other nodes. That's the easiest part, but tough one is
> > figuring out the low level reference graph and serialization
> > semantics. This is why JINI, JavaSpaces, JGroups, CORBA, JXTA, you
> > name it, are unlikely to help solving the fundamental problem.
> >
> > Br's,
> > Marius
> >
> > On Aug 23, 8:16 pm, Arthur  wrote:
> >
> > > On Sun, Aug 23, 2009 at 7:04 PM, David
> >
> > > Pollak wrote:
> > > > On Sun, Aug 23, 2009 at 4:50 AM, Kevin Wright
> > > >  wrote:
> >
> > > >> I'm wondering if we can't leverage JavaSpaces to handle a lot of
> this
> > > >> stuff.  From my experience with the technology it seems to be a
> pretty good
> > > >> fit for the problem.
> >
> > > > Two reasons:
> > > > - JavaSpaces is as far as I know, GPL and we will not mix any GPL
> into Lift
> >
> > > JavaSpaces is just the specification. There are two implementations I
> > > know of: BlitzJavaSpaces (BSD) and GigaSpaces (proprietary?). I don't
> > > have hands on experience with either.
> >
> > > > - It doesn't solve the issue with low-level session replication which
> relies
> > > > on serialization of the session data for transfer to another app
> server
> > > > instance.
> >
> > > Arthur
> >
>


-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Lift vs Rails

2009-08-23 Thread Meredith Gregory
Jack,

For my money Rails is somewhat more mature than lift, but lift is on a
trajectory to overtake Rails feature-wise and is certainly already there
performance-wise. The real issue, to me, is Scala vs Ruby. Quite apart from
being more slightly more performant and equally expressive, the real win of
Scala is its types allow you scale the code over time. What i mean by that
is that a type system like Scala's allows you to

   - navigate code
   - substitute and refactor code while preserving properties
   - design for abstraction

One of the biggest problems of Ruby code -- and seasoned Ruby devs will tell
you this -- is that in a code block of 10 lines -- that is part of say a
100K line project -- if i point to a line of code, you can't tell me what it
is doing. This is compounded by the fact that with monkey-patching, even if
you thought you knew, with the next check-in in some other part of the
codebase, you don't.

In the same situation in Scala any given expression has a type that the
compiler may infer. So, i don't need to know Joe Bloggs who wrote that
block. i reason about what it does through the types. This gives better
separation of *dev team*s -- not just code blocks. This is good if you want
to scale up your efforts organizationally -- either by spreading it out over
different groups working at approximately the same time, or by spreading
development out over time. i'm not saying this is a silver bullet. Software
is hard and there are always non-linear or cyclical dependencies, but types
really help with practical development. After a while, you get to the point
where you can design using types, and then cutting the code is like falling
off a log. At this point designing for highly leveraged abstractions that
significantly reduce the amount of code and increase the applicability of
code is within your grasp.

The guy who makes these points in a much less zealous and much more
reasoned, dispassionate way with lots of practical examples is Bill Venners.
His recent talk for JavaOne -- which is on video (i'll look for the link) --
is quite powerful in this regard. Heck, even Charles Nutter, in his own blog
acknowledges that Scala is the heir apparent of Java for the JVM.

Don't get me wrong -- i'm not a Scala biggot. There are a lot of corners of
this language i don't like. For my money, Haskell is a better language. But,
Haskell doesn't run on the JVM. You can't ship Haskell apps as jars or wars
and smoothly hook them into maven repos, and you can't very easily build
Haskell apps using standard JVM libs. So, that's why Scala, and that's why
lift.

Well... there's also the fact that the Scala and lift communities are
populated by very impressive people who are very open and incredibly
responsive.

Best wishes,

--greg

On Sun, Aug 23, 2009 at 7:45 AM, jack  wrote:

>
> I am doing a startup company that involves both a lot of processing on
> the backend (in the code) and a decent amount of comet/ajax in the
> frontend.It is very important that the code quickly  on the server.  I
> have seen the light with respect to Scala and Lift looks terrific. My
> only concern is how new it is and the availability of resources
> (programmers, books etc).
>
> I really do want to use Lift instead of Rails. Could somebody please
> convince me? :)
>
> >
>


-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: clue for the clueless?

2009-08-20 Thread Meredith Gregory
David, et al,

i pushed my little experiments back up to
github<http://github.com/leithaus/pixillion/tree/master>.
Any thoughts or suggestions would be greatly appreciated.

Best wishes,

--greg

On Thu, Aug 20, 2009 at 11:23 AM, Meredith Gregory  wrote:

> David,
>
> Thanks. i'll pop the recent changes up to github in a bit. i think it might
> be easier to look at this as a whole.
>
> Best wishes,
>
> --greg
>
>
> On Thu, Aug 20, 2009 at 11:19 AM, David Pollak <
> feeder.of.the.be...@gmail.com> wrote:
>
>>
>>
>> On Thu, Aug 20, 2009 at 11:13 AM, Meredith Gregory <
>> lgreg.mered...@gmail.com> wrote:
>>
>>> Everybody,
>>>
>>> Thanks for the replies. The browser source is the same as from the chat
>>> example, but i've included it below. The element in which the name space is
>>> not bound is the first element with the chat name space.
>>
>>
>> Greg,
>>
>> This means that none of the page was processed by Lift.  What URL are you
>> using to get to this page?
>>
>> Thanks,
>>
>> David
>>
>>
>>>
>>>
>>> Best wishes,
>>>
>>> --greg
>>>
>>> 
>>>   
>>> Group Chat
>>> 
>>>   
>>> Hello 
>>>   
>>> 
>>>: 
>>> 
>>>   
>>>   
>>>   
>>>  
>>>   
>>> 
>>>   
>>>   
>>> The total chat app, including the ask/answer component for soliciting
>>> a
>>> name
>>> comments, etc. is listed on this page.
>>> There is no special code to support AJAX/Comet
>>> (all the wrapping is done automatically by Lift).
>>>   
>>>
>>>   
>>> When the Chat comet widget is added to the page, it needs to solict
>>> the
>>> user for a "chat name".  It asks the "AskName" comet widget for the
>>> name.
>>> Until the AskName comet widget provides a name, all rendering
>>> messages
>>> are forwarded to AskName.
>>> Here's the code for the "AskName":
>>>
>>> 
>>> /* <![CDATA[ */
>>>   .comment {
>>> /* font-lock-comment-face */
>>> color: #b2;
>>>   }
>>>   .comment-delimiter {
>>> /* font-lock-comment-delimiter-face */
>>> color: #b2;
>>>   }
>>>   .constant {
>>> /* font-lock-constant-face */
>>> color: #5f9ea0;
>>>   }
>>>   .function-name {
>>> /* font-lock-function-name-face */
>>> color: #ff;
>>>   }
>>>   .keyword {
>>> /* font-lock-keyword-face */
>>> color: #a020f0;
>>>   }
>>>   .string {
>>> /* font-lock-string-face */
>>> color: #bc8f8f;
>>>   }
>>>   .type {
>>> /* font-lock-type-face */
>>> color: #228b22;
>>>   }
>>>   .variable-name {
>>> /* font-lock-variable-name-face */
>>> color: #b8860b;
>>>   }
>>>
>>> /* ]]> */
>>> 
>>>
>>> 
>>> class AskName
>>> extends CometActor {
>>>   def >> class="function-name">render =
>>>   ajaxForm(<div>What is your username?</div> ++
>>>text("",name =>
>>> answer(name.trim)) ++
>>><input type=>> class="string">"submit" value=>> class="string">"Enter"/>)
>>> }
>>> 
>>>
>>>   
>>> When the user submits the form, the question asked by the Chat comet
>>> widget
>>> is answered with the value the user submitted.  This is
>>> similar to the ask/answer paradigm in Seaside, except that there's
>>> no need for continuations.
>>>   
>>>
>>>   Now, onto the heart of the chat app:
>>>
>>> 
>>> class Chat >> class="keyword">extends CometActor >> class="keyword">with CometListener {
>>>   private var
>>> userName = ""
>>>   private var
>>> chats: >> class=&quo

[Lift] Re: clue for the clueless?

2009-08-20 Thread Meredith Gregory
David,

Thanks. i'll pop the recent changes up to github in a bit. i think it might
be easier to look at this as a whole.

Best wishes,

--greg

On Thu, Aug 20, 2009 at 11:19 AM, David Pollak <
feeder.of.the.be...@gmail.com> wrote:

>
>
> On Thu, Aug 20, 2009 at 11:13 AM, Meredith Gregory <
> lgreg.mered...@gmail.com> wrote:
>
>> Everybody,
>>
>> Thanks for the replies. The browser source is the same as from the chat
>> example, but i've included it below. The element in which the name space is
>> not bound is the first element with the chat name space.
>
>
> Greg,
>
> This means that none of the page was processed by Lift.  What URL are you
> using to get to this page?
>
> Thanks,
>
> David
>
>
>>
>>
>> Best wishes,
>>
>> --greg
>>
>> 
>>   
>> Group Chat
>> 
>>   
>> Hello 
>>   
>> 
>>: 
>> 
>>   
>>   
>>   
>>  
>>   
>> 
>>   
>>   
>> The total chat app, including the ask/answer component for soliciting
>> a
>> name
>> comments, etc. is listed on this page.
>> There is no special code to support AJAX/Comet
>> (all the wrapping is done automatically by Lift).
>>   
>>
>>   
>> When the Chat comet widget is added to the page, it needs to solict
>> the
>> user for a "chat name".  It asks the "AskName" comet widget for the
>> name.
>> Until the AskName comet widget provides a name, all rendering messages
>> are forwarded to AskName.
>> Here's the code for the "AskName":
>>
>> 
>> /* <![CDATA[ */
>>   .comment {
>> /* font-lock-comment-face */
>> color: #b2;
>>   }
>>   .comment-delimiter {
>> /* font-lock-comment-delimiter-face */
>> color: #b2;
>>   }
>>   .constant {
>> /* font-lock-constant-face */
>> color: #5f9ea0;
>>   }
>>   .function-name {
>> /* font-lock-function-name-face */
>> color: #ff;
>>   }
>>   .keyword {
>> /* font-lock-keyword-face */
>> color: #a020f0;
>>   }
>>   .string {
>> /* font-lock-string-face */
>> color: #bc8f8f;
>>   }
>>   .type {
>> /* font-lock-type-face */
>> color: #228b22;
>>   }
>>   .variable-name {
>> /* font-lock-variable-name-face */
>> color: #b8860b;
>>   }
>>
>> /* ]]> */
>> 
>>
>> 
>> class AskName > class="keyword">extends CometActor {
>>   def > class="function-name">render =
>>   ajaxForm(<div>What is your username?</div> ++
>>text("",name =>
>> answer(name.trim)) ++
>><input type=> class="string">"submit" value=> class="string">"Enter"/>)
>> }
>> 
>>
>>   
>> When the user submits the form, the question asked by the Chat comet
>> widget
>> is answered with the value the user submitted.  This is
>> similar to the ask/answer paradigm in Seaside, except that there's
>> no need for continuations.
>>   
>>
>>   Now, onto the heart of the chat app:
>>
>> 
>> class Chat > class="keyword">extends CometActor > class="keyword">with CometListener {
>>   private var
>> userName = ""
>>   private var
>> chats: > class="type">List[ChatLine] = Nil
>>   private lazy
>> val infoId =
>> uniqueId + "_info"
>>   private lazy
>> val infoIn =
>> uniqueId + "_in"
>>   private lazy
>> val > class="variable-name">inputArea = findKids(defaultXml, > class="string">"chat", "input")
>>   private lazy
>> val bodyArea
>> = findKids(defaultXml, "chat", > class="string">"body")
>>   private lazy
>> val > class="variable-name">singleLine = deepFindKids(bodyArea, > class="string">"chat", "list")
>>
>>   // handle
>> an update to the chat lists
>>   // > class="comment">by d

[Lift] Re: clue for the clueless?

2009-08-20 Thread Meredith Gregory
Everybody,

Thanks for the replies. The browser source is the same as from the chat
example, but i've included it below. The element in which the name space is
not bound is the first element with the chat name space.

Best wishes,

--greg


  
Group Chat

  
Hello 
  

   : 

  
  
  
 
  

  
  
The total chat app, including the ask/answer component for soliciting a
name
comments, etc. is listed on this page.
There is no special code to support AJAX/Comet
(all the wrapping is done automatically by Lift).
  

  
When the Chat comet widget is added to the page, it needs to solict the
user for a "chat name".  It asks the "AskName" comet widget for the
name.
Until the AskName comet widget provides a name, all rendering messages
are forwarded to AskName.
Here's the code for the "AskName":


/* <![CDATA[ */
  .comment {
/* font-lock-comment-face */
color: #b2;
  }
  .comment-delimiter {
/* font-lock-comment-delimiter-face */
color: #b2;
  }
  .constant {
/* font-lock-constant-face */
color: #5f9ea0;
  }
  .function-name {
/* font-lock-function-name-face */
color: #ff;
  }
  .keyword {
/* font-lock-keyword-face */
color: #a020f0;
  }
  .string {
/* font-lock-string-face */
color: #bc8f8f;
  }
  .type {
/* font-lock-type-face */
color: #228b22;
  }
  .variable-name {
/* font-lock-variable-name-face */
color: #b8860b;
  }

/* ]]> */



class AskName extends CometActor {
  def render
=
  ajaxForm(<div>What is your username?</div> ++
   text("",name => answer(name.trim))
++
   <input type="submit" value="Enter"/>)
}


  
When the user submits the form, the question asked by the Chat comet
widget
is answered with the value the user submitted.  This is
similar to the ask/answer paradigm in Seaside, except that there's
no need for continuations.
  

  Now, onto the heart of the chat app:


class Chat extends CometActor with CometListener {
  private var
userName = ""
  private var
chats: List[ChatLine] = Nil
  private lazy
val infoId =
uniqueId + "_info"
  private lazy
val infoIn =
uniqueId + "_in"
  private lazy
val inputArea = findKids(defaultXml, "chat", "input")
  private lazy
val bodyArea
= findKids(defaultXml, "chat", "body")
  private lazy
val singleLine = deepFindKids(bodyArea, "chat", "list")

  // handle an
update to the chat lists
  // by
diffing the lists and then sending a partial update
  // to
the browser
  override def lowPriority =
{
case ChatServerUpdate(value) =>
  val update = (value -- chats).reverse.map(b =>
AppendHtml(infoId, line(b)))
  partialUpdate(update)
  chats = value
  }

  // render the
input area by binding the
  // appropriate dynamically generated code to the
  // view supplied by the template
  override lazy val fixedRender: Box[NodeSeq] =
  ajaxForm(After(100, SetValueAndFocus(infoIn, "")),
   bind("chat", inputArea,
"input" -> text("", sendMessage _, "id"
-> infoIn)))

  // send a
message to the chat server
  private def sendMessage(msg: String) =
ChatServer ! ChatServerMsg(userName, msg.trim)

  // display a
line
  private def line(c: ChatLine) =
bind("list", singleLine,
   "when"
-> hourFormat(c.when),
   "who"
-> c.user,
   "msg"
-> c.msg)

  // display a
list of chats
  private def displayList(in: NodeSeq): NodeSeq = chats.reverse.flatMap(line)

  // render the
whole list of chats
  override def render =
  bind("chat", bodyArea,
   "name" -> userName,
   AttrBindParam("id", Text(infoId), "id"),
   "list" -> displayList _)

  // setup the
component
  override def localSetup {
askForName
super.localSetup
  }

  // register
as a listener
  def registerWith = ChatServer

  // ask for
the user's name
  private def askForName {
if (userName.length == 0) {
  ask(new AskName, "what's your username") {
case s: String if (s.trim.length > 2) =>
  userName = s.trim
  reRender(true)

case _ =>
  askForName
  reRender(false)
  }
}
  }

}


  
This example demonstrates the power of Scala's Actors and Lift.
With very few lines of code, we've got a complete AJAX/Comet app that
has Seaside style Ask/

[Lift] version issues for comet actor stuff

2009-08-19 Thread Meredith Gregory
David, et al,

i cribbed the Chat.scala and related files from the liftweb examples dir as
a beginning for the Pixillion project. i'm getting issues compiling these
files around missing defns for CometListener, deepFindKids and findKids. My
lift version in the pom is 1.0. i thought that would be sufficient to get
the CometActor stuff. However, when i issue a

find . -exec grep "CometListener" '{}' \; -print

in ~/.m2/repository/net/liftweb

i get a big fat nada. A similar query in a snap of github has

bash-3.2$ find . -exec grep "CometListener" '{}' \; -print
trait CometListener extends CometListenee
./lift/src/main/scala/net/liftweb/http/CometActor.scala
class Chat extends CometActor with CometListener {
./sites/example/src/main/scala/net/liftweb/example/comet/Chat.scala
class Chat extends CometActor with CometListener {
./sites/example/src/main/webapp/chat.html
bash-3.2$

So, what is the most conservative version of lift that gets me this version
of CometActor?

Best wishes,

--greg

/Users/lgm/work/src/projex/biosimilarity/pixillion/src/main/scala/com/biosimilarity/games/comet/Chat.scala:32:
error: not found: type CometListener
class Chat extends CometActor with CometListener {
   ^
/Users/lgm/work/src/projex/biosimilarity/pixillion/src/main/scala/com/biosimilarity/games/comet/Chat.scala:37:
error: not found: value findKids
  private lazy val inputArea = findKids(defaultXml, "chat", "input")
   ^
/Users/lgm/work/src/projex/biosimilarity/pixillion/src/main/scala/com/biosimilarity/games/comet/Chat.scala:38:
error: not found: value findKids
  private lazy val bodyArea = findKids(defaultXml, "chat", "body")
  ^
/Users/lgm/work/src/projex/biosimilarity/pixillion/src/main/scala/com/biosimilarity/games/comet/Chat.scala:39:
error: not found: value deepFindKids
  private lazy val singleLine = deepFindKids(bodyArea, "chat", "list")

-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] clue for the clueless?

2009-08-19 Thread Meredith Gregory
Lifted,

i readily confess to being a total idiot. i'm always running into this
problem of not knowing when the namespace binding is in effect. i've cribbed
Chat.scala and other files from liftweb/site/example and added it whole sale
to my project.When i add

val entries =
  ( Menu(Loc("Home", List("index"), "Home"))
...
:: Menu(Loc("Chat.1", List("chat"), "Chat", If(User.loggedIn_? _, "x")))
...
:: User.sitemap )

to my site menu and fire things up i get 'namespace chat undefined'.  This
is despite

override def render =
   bind("chat", bodyArea,
"name" -> userName,
AttrBindParam("id", Text(infoId), "id"),
"list" -> displayList _)

being defined in the chat class. Any body have a clue for the clueless?

Best wishes,

--greg

-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Has anyone tried Stax?

2009-08-18 Thread Meredith Gregory
Guys,

This really seems like a weakness. Can someone walk me through the issues on
the lift committers call, tomorrow?

Best wishes,

--greg

On Tue, Aug 18, 2009 at 1:51 PM, Viktor Klang wrote:

>
>
> On Tue, Aug 18, 2009 at 4:22 PM, marius d. wrote:
>
>>
>>
>>
>> On Aug 18, 5:05 pm, Naftoli Gugenheim  wrote:
>> > You set whether you want a shared server, or dedicated/various speeds.
>> > In any case, is there room to entertain the thought of at some point
>> adding support in Lift to propogate sessions across instances? (Is it easier
>> now that it's been decoupled from servlets?)
>>
>> No it is not easier. The fundamental problem in distributing lift
>> sessions is the bound functions. Sure, functions are serializable but
>> their references may not be. For instance one can bind an ajax
>> anonymous function and that functions can have a bunch of other
>> references inside potentially other lambdas etc. Viktor was doing in
>> the past some research to integrate with Terracotta but there were
>> some issues. So consistently distributing Lift sessions in a clustered
>> environment is a challenge but of course good ideas are more then
>> welcome.
>>
>
> Yeah, it really was a can of worms...
>
>
>>
>>
>> >
>> > -
>> >
>> > Ryan Donahue wrote:
>> >
>> > Is anybody using Stax for anything more than prototyping or examples?
>> > If so, what has your experience been?  Stax doesn't seem to fit lift
>> > very well, but I'd like to find out I'm wrong.  Specifically, it does
>> > not support sticky sessions:
>> http://developer.stax.net/forum/topics/initial-questions.
>> > I assume a Stax app shares resources with others on the same server,
>> > so you'd likely need to scale to additional servers sooner than
>> > normal.  However, the lack of sticky sessions effectively caps a
>> > stateful lift app to one server.
>>
>>
>
>
> --
> Viktor Klang
>
> Rogue Scala-head
>
> Blog: klangism.blogspot.com
> Twttr: viktorklang
>
>
> >
>


-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: ws-generated code in lift

2009-08-17 Thread Meredith Gregory
David,

Go for it, Dude! Who knows, you might come up with something new. With a
Scala encoding as the 'informal spec' i can tell you what semantics are
already out there and how yours compares.

Best wishes,

--greg

On Mon, Aug 17, 2009 at 11:19 AM, David Pollak <
feeder.of.the.be...@gmail.com> wrote:

>
>
> On Mon, Aug 17, 2009 at 10:37 AM, Meredith Gregory <
> lgreg.mered...@gmail.com> wrote:
>
>> Dear David,
>>
>> *This* is a can of night-crawlers. Do you have a specification of the
>> abstract syntax of your flow language? Do you have a semantics?
>
>
> No & No.  Flying by the seat of my pants (as usual).  Always happy for
> pointers to the works of people with bigger brains than me.
>
>
>>
>>
>> Best wishes,
>>
>> --greg
>>
>> On Mon, Aug 17, 2009 at 10:20 AM, David Pollak <
>> feeder.of.the.be...@gmail.com> wrote:
>>
>>>
>>>
>>> On Mon, Aug 17, 2009 at 9:25 AM, Derek Chen-Becker <
>>> dchenbec...@gmail.com> wrote:
>>>
>>>> I think that that's a general issue with SOAP, not particular to Lift ;)
>>>>
>>>>
>>>> On Sat, Aug 15, 2009 at 1:04 PM, Timothy Perrett
>>>>  wrote:
>>>>
>>>>>
>>>>> Id be interested to hear those stories... all the ones i've heard so
>>>>> far that involve anything to do with SOAP have usually been tales of
>>>>> woe ;-)
>>>>>
>>>>
>>> With Goat Rodeo, you can define message flow with an abstract source
>>> (input) and sink (output) in the form:
>>>
>>> Foo %> Bar %> (Baz * Distribution)
>>>
>>> You can define fork/join constructs, tee constructs, etc. in the high
>>> level flow description.  The flow description defines the type-safe
>>> progression from each logic unit.  The location of each logic unit and the
>>> threading/transport model is decided at runtime.  This means that you can
>>> define logic models and plug in an "Akka distribution and threading"
>>> strategy for production or a "single threaded" strategy for your local test
>>> harness.
>>>
>>> You'll also be able to register the composed modules that can be composed
>>> into larger flows.
>>>
>>> So, how does this work with SOAP?  Well.. the SOAP piece is just a source
>>> and sink for the logic flow.
>>>
>>>
>>>
>>>>
>>>>> Cheers, Tim
>>>>>
>>>>> On Aug 15, 6:47 pm, David Pollak 
>>>>> wrote:
>>>>> > I think there will be an important Goat Rodeo/Lift/SOAP story that
>>>>> I'll be
>>>>> > able to tell in a week or so... integrating WS into Lift (rather than
>>>>> > running on the side) will, I think, have benefits.
>>>>> >
>>>>> > On Sat, Aug 15, 2009 at 9:45 AM, Timothy Perrett
>>>>> wrote:
>>>>> >
>>>>> > > Sounds like a classic situation what is technically possible is
>>>>> > > one thing but what you should do to preserve your sanity is most
>>>>> > > probably another ;-)
>>>>> >
>>>>> > > Good luck!
>>>>> >
>>>>> > > Cheers, Tim
>>>>> >
>>>>> > > On Aug 15, 4:29 am, Meredith Gregory 
>>>>> wrote:
>>>>> > > > Tim, Viktor,
>>>>> >
>>>>> > > > Thanks for the insights and sharing of experience. i'm in a
>>>>> situation
>>>>> > > where
>>>>> > > > i'm working with legacy stuff. i was just wondering how deeply
>>>>> into lift
>>>>> > > i
>>>>> > > > could push the WSDL-based Java handlers.
>>>>> >
>>>>> > > > Best wishes,
>>>>> >
>>>>> > > > --greg
>>>>> >
>>>>> > > > On Fri, Aug 14, 2009 at 2:54 PM, Timothy Perrett
>>>>> >>>> > > >wrote:
>>>>> >
>>>>> > > > > I agree with Viktor - in a similar vein, this is exactly what I
>>>>> > > > > implemented with Akka; the servlet runs in conjunction with
>>>>> lifts
>>>>> > > > > filter and lift just hands off stuff it doesnt kno

[Lift] Re: ws-generated code in lift

2009-08-17 Thread Meredith Gregory
Dear David,

*This* is a can of night-crawlers. Do you have a specification of the
abstract syntax of your flow language? Do you have a semantics?

Best wishes,

--greg

On Mon, Aug 17, 2009 at 10:20 AM, David Pollak <
feeder.of.the.be...@gmail.com> wrote:

>
>
> On Mon, Aug 17, 2009 at 9:25 AM, Derek Chen-Becker 
> wrote:
>
>> I think that that's a general issue with SOAP, not particular to Lift ;)
>>
>>
>> On Sat, Aug 15, 2009 at 1:04 PM, Timothy Perrett > > wrote:
>>
>>>
>>> Id be interested to hear those stories... all the ones i've heard so
>>> far that involve anything to do with SOAP have usually been tales of
>>> woe ;-)
>>>
>>
> With Goat Rodeo, you can define message flow with an abstract source
> (input) and sink (output) in the form:
>
> Foo %> Bar %> (Baz * Distribution)
>
> You can define fork/join constructs, tee constructs, etc. in the high level
> flow description.  The flow description defines the type-safe progression
> from each logic unit.  The location of each logic unit and the
> threading/transport model is decided at runtime.  This means that you can
> define logic models and plug in an "Akka distribution and threading"
> strategy for production or a "single threaded" strategy for your local test
> harness.
>
> You'll also be able to register the composed modules that can be composed
> into larger flows.
>
> So, how does this work with SOAP?  Well.. the SOAP piece is just a source
> and sink for the logic flow.
>
>
>
>>
>>> Cheers, Tim
>>>
>>> On Aug 15, 6:47 pm, David Pollak 
>>> wrote:
>>> > I think there will be an important Goat Rodeo/Lift/SOAP story that I'll
>>> be
>>> > able to tell in a week or so... integrating WS into Lift (rather than
>>> > running on the side) will, I think, have benefits.
>>> >
>>> > On Sat, Aug 15, 2009 at 9:45 AM, Timothy Perrett
>>> wrote:
>>> >
>>> > > Sounds like a classic situation what is technically possible is
>>> > > one thing but what you should do to preserve your sanity is most
>>> > > probably another ;-)
>>> >
>>> > > Good luck!
>>> >
>>> > > Cheers, Tim
>>> >
>>> > > On Aug 15, 4:29 am, Meredith Gregory 
>>> wrote:
>>> > > > Tim, Viktor,
>>> >
>>> > > > Thanks for the insights and sharing of experience. i'm in a
>>> situation
>>> > > where
>>> > > > i'm working with legacy stuff. i was just wondering how deeply into
>>> lift
>>> > > i
>>> > > > could push the WSDL-based Java handlers.
>>> >
>>> > > > Best wishes,
>>> >
>>> > > > --greg
>>> >
>>> > > > On Fri, Aug 14, 2009 at 2:54 PM, Timothy Perrett
>>> >> > > >wrote:
>>> >
>>> > > > > I agree with Viktor - in a similar vein, this is exactly what I
>>> > > > > implemented with Akka; the servlet runs in conjunction with lifts
>>> > > > > filter and lift just hands off stuff it doesnt know what to do
>>> with.
>>> > > > > So if you want to use AxisServlet or whatever its real easy.
>>> >
>>> > > > > From my point of view, you'd need a good reason to bring the SOAP
>>> > > > > stuff into lift; right now i havent found one... I write a lot of
>>> lift
>>> > > > > apps that consume SOAP services, but as yet have no good reason
>>> to
>>> > > > > write a SOAP serving app with lift - If i were to do one, id do
>>> > > > > exactly as with the JAX-RS stuff in Akka and passNotFoundToChain.
>>> >
>>> > > > > Cheers, Tim
>>> >
>>> > > > > On Aug 14, 10:24 pm, Viktor Klang 
>>> wrote:
>>> > > > > > Gregory,
>>> >
>>> > > > > > Depending on what WS-* stuff you're using, you _should_ be able
>>> to
>>> > > wire
>>> > > > > the
>>> > > > > > AxisServlet in web.xml under /ws/* or something like that, and
>>> then
>>> > > have
>>> > > > > > lift passNotFoundToChain=true
>>> >
>>> > > > > > But I guess it boils down to what liftiness yo

[Lift] Re: ws-generated code in lift

2009-08-14 Thread Meredith Gregory
Tim, Viktor,

Thanks for the insights and sharing of experience. i'm in a situation where
i'm working with legacy stuff. i was just wondering how deeply into lift i
could push the WSDL-based Java handlers.

Best wishes,

--greg

On Fri, Aug 14, 2009 at 2:54 PM, Timothy Perrett wrote:

>
> I agree with Viktor - in a similar vein, this is exactly what I
> implemented with Akka; the servlet runs in conjunction with lifts
> filter and lift just hands off stuff it doesnt know what to do with.
> So if you want to use AxisServlet or whatever its real easy.
>
> From my point of view, you'd need a good reason to bring the SOAP
> stuff into lift; right now i havent found one... I write a lot of lift
> apps that consume SOAP services, but as yet have no good reason to
> write a SOAP serving app with lift - If i were to do one, id do
> exactly as with the JAX-RS stuff in Akka and passNotFoundToChain.
>
> Cheers, Tim
>
> On Aug 14, 10:24 pm, Viktor Klang  wrote:
> > Gregory,
> >
> > Depending on what WS-* stuff you're using, you _should_ be able to wire
> the
> > AxisServlet in web.xml under /ws/* or something like that, and then have
> > lift passNotFoundToChain=true
> >
> > But I guess it boils down to what liftiness you're planning to do. Can
> you
> > elaborate a bit on what you're aiming for?
> >
> > On Fri, Aug 14, 2009 at 9:00 PM, Meredith Gregory
> > wrote:
> >
> >
> >
> >
> >
> > > Tim, Viktor,
> >
> > > Do you wire your SOAP services into lift or do you keep that
> independent? i
> > > was just talking to DPP and according to him it appears you can
> successfully
> > > wire WS-generated code anywhere along in the http-request processing
> > > pipeline. He pointed out a gotcha that i think can be circumvented with
> > > HttpServletResponse trampoline. Both lift and the WS-generated code are
> > > likely to want to be in the driver's seat regarding who's returning the
> > > bytes. But, i think you can just fool the WS-generated code into
> thinking
> > > it's got an HttpServletResponse that is really a widget that will just
> write
> > > into the one lift returns. In this way you can write a 1-size-fits-all
> > > return adapter. Is this what you guys are doing, or am i making this
> too
> > > complicated?
> >
> > > Best wishes,
> >
> > > --greg
> >
> > > --
> > > L.G. Meredith
> > > Managing Partner
> > > Biosimilarity LLC
> > > 1219 NW 83rd St
> > > Seattle, WA 98117
> >
> > > +1 206.650.3740
> >
> > >http://biosimilarity.blogspot.com
> >
> > --
> > Viktor Klang
> >
> > Rogue Scala-head
> >
> > Blog: klangism.blogspot.com
> > Twttr: viktorklang
> >
>


-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] ws-generated code in lift

2009-08-14 Thread Meredith Gregory
Tim, Viktor,

Do you wire your SOAP services into lift or do you keep that independent? i
was just talking to DPP and according to him it appears you can successfully
wire WS-generated code anywhere along in the http-request processing
pipeline. He pointed out a gotcha that i think can be circumvented with
HttpServletResponse trampoline. Both lift and the WS-generated code are
likely to want to be in the driver's seat regarding who's returning the
bytes. But, i think you can just fool the WS-generated code into thinking
it's got an HttpServletResponse that is really a widget that will just write
into the one lift returns. In this way you can write a 1-size-fits-all
return adapter. Is this what you guys are doing, or am i making this too
complicated?

Best wishes,

--greg

-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: SOAP web services?

2009-08-13 Thread Meredith Gregory
Tim,

How do you compose JAX-WS generated services with lift or do you? i'm trying
to enumerate the ways to do this.

Best wishes,

--greg

On Thu, Aug 6, 2009 at 5:15 PM, Timothy Perrett wrote:

>
>
> Myself and Viktor are two committers who do a lot of SOAP work - right now,
> the best route forward it to use the Java JAX-WS code and call into it with
> a scala wrapper - this is exactly what I do and it works perfectly.
>
> Because there is toll free calling of Java code, there is little point in
> porting such massive projects to Scala; just make a wrapper that suits your
> needs.
>
> In my environment I have about 40+ endpoints, with hundreds of methods so I
> just made a scala wrapper that lets me do:
>
> DriverManager.whateverdriver.myMethod(params) // Box[T]
>
> IMO, that's a damn lot easier than calling a boat load of Java (of course
> its doing the under the hood, but like I said, its just a wrapper).
>
> HTH
>
> Cheers, Tim
>
> On 06/08/2009 16:26, "Jacek Furmankiewicz"  wrote:
>
> >
> > I was reading through the Lift book PDF and it mentions only REST-
> > style web services.
> >
> > In our case, we need to look at re-implementing a set of existing SOAP
> > web services (is there anything like 'wsdl2scala' anywhere?).
> >
> > I would appreciate any best practices and suggestions for implementing
> > SOAP web services in the context of a larger Lift app (and Scala in
> > general).
> >
> > >
> >
>
>
>
> >
>


-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: SOAP web services?

2009-08-13 Thread Meredith Gregory
All,

As a follow up, i was able to get the Apache Axis2 maven plugin to accept
WSDL 2.0. Below is what i had to add to my pom.xml. Attached is an example
that will get you an Http binding that should work "RESTfully".

Best wishes,

--greg


...
   
  plugin.axis2.apache.org
  Apache Axis2 Repository
  http://apache.sunsite.ualberta.ca/ws/axis2/tools/1_4_1






...

org.apache.axis2
axis2-wsdl2code-maven-plugin
1.4.1

  

  wsdl2code

  


  ${groupId}.${artifactId}.model
  2.0
  true
  true
  true
  true
  true

  


2009/8/11 Meredith Gregory 

> Marius,
>
> The original design goals of WSDL were very straightforward:
>
>- a Port Type is a set of Message Types governing all the messages
>arriving on the Port
>- A Message Type is given precisely by an XML Schema (e.g. an XSD)
>- A Port is instanced by binding a Port Type to an Endpoint (URL)
>supporting a transport protocol
>
> In symbols, WSDL was intended to be able to make statements of the form
>
>- URL+Transport : { XMLSchema1, ..., XMLSchemaN }
>- Notice the close correlation between this and the statement you see
>on the Scala REPL all the time:
>- ScalaExpr 
>   - res1 : ScalaType
>
> URL is the location of the resource/instance in the same way that res1
> provides a location that the Scala REPL can use to look up the instance.
> PortType is very much like a ScalaType. In the case of typing at the Scala
> REPL from a command shell there is no question of transport and any
> encoding/decoding necessary. However, if one had a more remote network
> access to the Scala REPL that did involve some issues around transport and
> encoding/decoding, then these two cases would be isomorphic.
>
> BTW, this lines up nearly perfectly with the idea of sorts and sorting in
> Milner's π-calculus.
>
> Because message exchange usually involves parameter-passing & because of
> confusion about the role of "Object Technology" in all this, WSDL was
> extended with the notion of Operation. This could have been done more
> cleanly, but was not. Not everyone involved in WSDL's design had the same
> picture in their minds of what they were attempting to accomplish.
>
> As for what happens today, i could easily imaging WSDL and/or WSDL+SOAP
> over RabbitMQ, for example. i think something like this is considerably
> better than JSON over transport. The basic reason for this is
> straightforward. XMLSchema are a form of typing discipline. So, you get a
> typing discipline for messaging-style applications that fits well with the
> typing discipline of a language like Scala.
>
> This could, for example, play out very nicely in an actor framework. An
> actor's mailbox is a good thing to locate at an URL. Then you have
> statements of the form
>
>- URL + Transport/Actor : { MessageType1, ..., MessageTypeN }
>
> Today, Scala actors do not even support statements of this basic form,
> though they would greatly enhance the actor package.
>
> Beyond this, you can imagine putting constraints on the order of messages.
> Here's a general scheme
>
>- Actor : ( { MsgType1 -> Type1, ..., MsgTypeN -> TypeN },
>RegularExpressionOver(MsgType1,...,MsgTypeN) )
>- The first element in the pair just maps message type names to Scala
>types (or the types of some host language) and the second element in the
>pair says the order you expect to see messages in the mailbox.
>- Here's an example: ( { Init -> OpenSession( id, pwd ), Read ->
>ReadDb( ... ), Update -> UpdateDB( ... ), Finish -> CloseSession( ... ) },
>Init.(Read+Update)*.Finish )
>   - It says that the only legal sequences of messages in the mbox are
>   of the form Init :: Read-or-Update :: ... :: Read-or-Update :: FInish.
>
>
> Best wishes,
>
> --greg
>
>
> On Tue, Aug 11, 2009 at 9:27 AM, marius d. wrote:
>
>>
>>
>>
>> On Aug 11, 7:09 pm, Meredith Gregory  wrote:
>> > Tim,
>> >
>> > i was under the same impression, but then read a couple of IBM
>> comparison
>> > articles and a WSO2 blog and it seemed that the WSDL 2.0 was gaining
>> ground.
>> > Further, the tooling for WSDL, with integration into all the major
>> IDE's,
>> > has been significantly more developed than the WADL tooling. However,
>> > yesterday i tried a simple example with a schema-valid WSDL 2.0 xml
>> document
>> > for a simple service with 1 operation and the Apache Axis2 tool barfed
>> on
>> > the fact that the schema pointed to in the document was for WSDL 2

[Lift] Re: [Lift committers] Welcome Joni Freeman to the Lift committers

2009-08-13 Thread Meredith Gregory
Joni,

Welcome!

Best wishes,

--greg

On Thu, Aug 13, 2009 at 9:06 AM, David Pollak  wrote:

> Folks,
>
> I'm pleased to announce that Joni Freeman has joined the Lift committers.
>
> Joni will be adding his high performance JSON library as a module in
> Lift... and I certainly hope that Lift's JSON support will improve.
>
> Please join me in welcoming Joni!
>
> Thanks,
>
> David
>
> --
> Lift, the simply functional web framework http://liftweb.net
> Beginning Scala http://www.apress.com/book/view/1430219890
> Follow me: http://twitter.com/dpp
> Git some: http://github.com/dpp
>
> >
>


-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: SOAP web services?

2009-08-11 Thread Meredith Gregory
Marius,

The original design goals of WSDL were very straightforward:

   - a Port Type is a set of Message Types governing all the messages
   arriving on the Port
   - A Message Type is given precisely by an XML Schema (e.g. an XSD)
   - A Port is instanced by binding a Port Type to an Endpoint (URL)
   supporting a transport protocol

In symbols, WSDL was intended to be able to make statements of the form

   - URL+Transport : { XMLSchema1, ..., XMLSchemaN }
   - Notice the close correlation between this and the statement you see on
   the Scala REPL all the time:
   - ScalaExpr 
  - res1 : ScalaType

URL is the location of the resource/instance in the same way that res1
provides a location that the Scala REPL can use to look up the instance.
PortType is very much like a ScalaType. In the case of typing at the Scala
REPL from a command shell there is no question of transport and any
encoding/decoding necessary. However, if one had a more remote network
access to the Scala REPL that did involve some issues around transport and
encoding/decoding, then these two cases would be isomorphic.

BTW, this lines up nearly perfectly with the idea of sorts and sorting in
Milner's π-calculus.

Because message exchange usually involves parameter-passing & because of
confusion about the role of "Object Technology" in all this, WSDL was
extended with the notion of Operation. This could have been done more
cleanly, but was not. Not everyone involved in WSDL's design had the same
picture in their minds of what they were attempting to accomplish.

As for what happens today, i could easily imaging WSDL and/or WSDL+SOAP over
RabbitMQ, for example. i think something like this is considerably better
than JSON over transport. The basic reason for this is straightforward.
XMLSchema are a form of typing discipline. So, you get a typing discipline
for messaging-style applications that fits well with the typing discipline
of a language like Scala.

This could, for example, play out very nicely in an actor framework. An
actor's mailbox is a good thing to locate at an URL. Then you have
statements of the form

   - URL + Transport/Actor : { MessageType1, ..., MessageTypeN }

Today, Scala actors do not even support statements of this basic form,
though they would greatly enhance the actor package.

Beyond this, you can imagine putting constraints on the order of messages.
Here's a general scheme

   - Actor : ( { MsgType1 -> Type1, ..., MsgTypeN -> TypeN },
   RegularExpressionOver(MsgType1,...,MsgTypeN) )
   - The first element in the pair just maps message type names to Scala
   types (or the types of some host language) and the second element in the
   pair says the order you expect to see messages in the mailbox.
   - Here's an example: ( { Init -> OpenSession( id, pwd ), Read -> ReadDb(
   ... ), Update -> UpdateDB( ... ), Finish -> CloseSession( ... ) },
   Init.(Read+Update)*.Finish )
  - It says that the only legal sequences of messages in the mbox are of
  the form Init :: Read-or-Update :: ... :: Read-or-Update :: FInish.


Best wishes,

--greg

On Tue, Aug 11, 2009 at 9:27 AM, marius d.  wrote:

>
>
>
> On Aug 11, 7:09 pm, Meredith Gregory  wrote:
> > Tim,
> >
> > i was under the same impression, but then read a couple of IBM comparison
> > articles and a WSO2 blog and it seemed that the WSDL 2.0 was gaining
> ground.
> > Further, the tooling for WSDL, with integration into all the major IDE's,
> > has been significantly more developed than the WADL tooling. However,
> > yesterday i tried a simple example with a schema-valid WSDL 2.0 xml
> document
> > for a simple service with 1 operation and the Apache Axis2 tool barfed on
> > the fact that the schema pointed to in the document was for WSDL 2.0 and
> not
> > WSDL 1.1 -- despite the fact that they claim on their home page to
> support
> > WSDL 2.0.
> >
> > For the record, WSDL -- as much as i hate it -- was not meant to be tied
> to
> > a transport. As a matter of fact, neither was SOAP. You should be able to
> > effect these over any transport, HTTP included, and presumably in more
> than
> > one way. WADL is tied to HTTP. This means its scope is considerably more
> > limited.
>
> Very true. But then again in reality how often are we seeing WSDL/SOAP
> bound to something else then HTTP? ... in some respects this seems a
> false selling point of SOAP.
>
> Assuming an enterprise application where let's say we can escape HTTP
> realm, probably RMI/IIOP, JINI, JXTA etc. even proprietary on the wire
> representation etc.becomes valid choices.
>
> >
> > Best wishes,
> >
> > --greg
> >
> > On Tue, Aug 11, 2009 at 12:55 AM, Timothy Perrett
> > wrote:
> >
> >
> >
> >
> 

[Lift] Re: SOAP web services?

2009-08-11 Thread Meredith Gregory
Tim,

i was under the same impression, but then read a couple of IBM comparison
articles and a WSO2 blog and it seemed that the WSDL 2.0 was gaining ground.
Further, the tooling for WSDL, with integration into all the major IDE's,
has been significantly more developed than the WADL tooling. However,
yesterday i tried a simple example with a schema-valid WSDL 2.0 xml document
for a simple service with 1 operation and the Apache Axis2 tool barfed on
the fact that the schema pointed to in the document was for WSDL 2.0 and not
WSDL 1.1 -- despite the fact that they claim on their home page to support
WSDL 2.0.

For the record, WSDL -- as much as i hate it -- was not meant to be tied to
a transport. As a matter of fact, neither was SOAP. You should be able to
effect these over any transport, HTTP included, and presumably in more than
one way. WADL is tied to HTTP. This means its scope is considerably more
limited.

Best wishes,

--greg

On Tue, Aug 11, 2009 at 12:55 AM, Timothy Perrett
wrote:

>
> Hey Greg,
>
> Im not sure about WSDL2.0, but my understanding was that WADL
> ( https://wadl.dev.java.net/ ) was making the most ground in the REST
> service description arena.
>
> Cheers, Tim
>
> On Aug 10, 10:58 pm, Meredith Gregory 
> wrote:
> > Lifted RESTafarians,
> >
> > Has anyone tried the Apache Axis 2 WSDL 2.0 support? i'm looking at this
> > page<
> http://ws.apache.org/axis2/tools/1_2/maven-plugins/maven-wsdl2code-pl..
> .>and
> > it claims they have a maven plugin to generate the stubs for a WSDL
> > 2.0
> > REST binding. i'm going to play around with it to wrap BNF Converter in a
> > RESTful service; but, i was wondering if anyone else had experience with
> it.
> >
> > Best wishes,
> >
> > --greg
> >
> > On Fri, Aug 7, 2009 at 12:31 AM, Viktor Klang  >wrote:
> >
> >
> >
> >
> >
> > > Hello Jacek,
> >
> > > actually, if I were you I'd consider implementing your webservices as
> REST
> > > services and then just have your SOAP stubs call your rest services.
> (If
> > > you're not using anything voodooesque)
> >
> > > Then you have the benefit of using the existing plumbing as much as
> > > possible, while still maintaining your SOAP interface as well as a
> potential
> > > migration path to something non-WSDL.
> >
> > > (I am severely biased by having to work with SOAP, which has scarred me
> for
> > > life)
> >
> > > On Thu, Aug 6, 2009 at 5:26 PM, Jacek Furmankiewicz  >wrote:
> >
> > >> I was reading through the Lift book PDF and it mentions only REST-
> > >> style web services.
> >
> > >> In our case, we need to look at re-implementing a set of existing SOAP
> > >> web services (is there anything like 'wsdl2scala' anywhere?).
> >
> > >> I would appreciate any best practices and suggestions for implementing
> > >> SOAP web services in the context of a larger Lift app (and Scala in
> > >> general).
> >
> > > --
> > > Viktor Klang
> >
> > > Rogue Scala-head
> >
> > > Blog: klangism.blogspot.com
> > > Twttr: viktorklang
> >
> > --
> > L.G. Meredith
> > Managing Partner
> > Biosimilarity LLC
> > 1219 NW 83rd St
> > Seattle, WA 98117
> >
> > +1 206.650.3740
> >
> > http://biosimilarity.blogspot.com
> >
>


-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: SOAP web services?

2009-08-10 Thread Meredith Gregory
Lifted RESTafarians,

Has anyone tried the Apache Axis 2 WSDL 2.0 support? i'm looking at this
pageand
it claims they have a maven plugin to generate the stubs for a WSDL
2.0
REST binding. i'm going to play around with it to wrap BNF Converter in a
RESTful service; but, i was wondering if anyone else had experience with it.

Best wishes,

--greg

On Fri, Aug 7, 2009 at 12:31 AM, Viktor Klang wrote:

> Hello Jacek,
>
> actually, if I were you I'd consider implementing your webservices as REST
> services and then just have your SOAP stubs call your rest services. (If
> you're not using anything voodooesque)
>
> Then you have the benefit of using the existing plumbing as much as
> possible, while still maintaining your SOAP interface as well as a potential
> migration path to something non-WSDL.
>
> (I am severely biased by having to work with SOAP, which has scarred me for
> life)
>
> On Thu, Aug 6, 2009 at 5:26 PM, Jacek Furmankiewicz wrote:
>
>>
>> I was reading through the Lift book PDF and it mentions only REST-
>> style web services.
>>
>> In our case, we need to look at re-implementing a set of existing SOAP
>> web services (is there anything like 'wsdl2scala' anywhere?).
>>
>> I would appreciate any best practices and suggestions for implementing
>> SOAP web services in the context of a larger Lift app (and Scala in
>> general).
>>
>>
>>
>
>
> --
> Viktor Klang
>
> Rogue Scala-head
>
> Blog: klangism.blogspot.com
> Twttr: viktorklang
>
>
> >
>


-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: location for chat sample source?

2009-08-03 Thread Meredith Gregory
David,

Cheers!

Best wishes,

--greg

On Mon, Aug 3, 2009 at 1:53 PM, David Pollak
wrote:

> sites/example/src/main/scala/net/liftweb/example/comet/Chat.scala
>
>
> On Mon, Aug 3, 2009 at 1:12 PM, Meredith Gregory  > wrote:
>
>> Lifted,
>>
>> Is the chat sample in github somewhere?
>>
>> Best wishes,
>>
>> --greg
>>
>> --
>> L.G. Meredith
>> Managing Partner
>> Biosimilarity LLC
>> 1219 NW 83rd St
>> Seattle, WA 98117
>>
>> +1 206.650.3740
>>
>> http://biosimilarity.blogspot.com
>>
>>
>>
>
>
> --
> Lift, the simply functional web framework http://liftweb.net
> Beginning Scala http://www.apress.com/book/view/1430219890
> Follow me: http://twitter.com/dpp
> Git some: http://github.com/dpp
>
> >
>


-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] location for chat sample source?

2009-08-03 Thread Meredith Gregory
Lifted,

Is the chat sample in github somewhere?

Best wishes,

--greg

-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: HadoopDB

2009-07-23 Thread Meredith Gregory
Viktor,

Yep.

Best wishes,

--greg

On Thu, Jul 23, 2009 at 10:08 AM, Viktor Klang wrote:

>
>
> On Thu, Jul 23, 2009 at 6:46 PM, Meredith Gregory <
> lgreg.mered...@gmail.com> wrote:
>
>> Viktor,
>>
>> Yes. For example, in the biotech case the data is coming in from a
>> device-based origin.
>
>
> This is interesting. Analyzing the AST of the query for the data, then
> identify the different data sources and then query each for all relevant
> data since last refresh, then push that into partitions and then schedule
> the Jobs and execute SQL and then merge/reduce the results.
>
>
>>
>>
>> Best wishes,
>>
>> --greg
>>
>> On Thu, Jul 23, 2009 at 2:35 AM, Viktor Klang wrote:
>>
>>>
>>>
>>> On Wed, Jul 22, 2009 at 11:52 PM, Meredith Gregory <
>>> lgreg.mered...@gmail.com> wrote:
>>>
>>>> Alex, Viktor,
>>>>
>>>> i think write semantics could get complicated quickly, actually.
>>>> However, i was initially responding to the idea that trad business object
>>>> models don't give way to analytics. Being able to make read-only queries
>>>> against large volumes of data using the original business object schema
>>>> seems to me like a win -- even if it's only used to populate a db that's
>>>> sliced up in a different way for further analytics processing.
>>>
>>>
>>> So basically, what's needed on top of HadoopDB is a service that updates
>>> data as needed from external data sources.
>>>
>>>
>>>>
>>>>
>>>> Best wishes,
>>>>
>>>> --greg
>>>>
>>>> On Wed, Jul 22, 2009 at 2:44 PM, Alex Cruise wrote:
>>>>
>>>>>
>>>>> Viktor Klang wrote:
>>>>> > Absolutely, perhaps I'm tainted by write-heavy systems and perhaps
>>>>> I'm
>>>>> > just failing to see the overhead we're talking about.
>>>>> > Perhaps I overlooked it, but the paper didn't mention performance for
>>>>> > small writes and potentially multiple nodespanning transactions.
>>>>> HadoopDB makes no claim to any support for writes at all, I'm just
>>>>> speculating that It Should Be Possible given my understanding of its
>>>>> architecture, which is admittedly limited and based solely on reading
>>>>> the paper and a bit of the code. :)
>>>>> > I'm inclined to believe that some sort of immutable records storage
>>>>> > would simlify the semantics (analytic queries are IMHO very seldom
>>>>> > demanding real-time snapshots)
>>>>> Analytical queries against static data are exactly what it's for.  I
>>>>> have no experience with its competition, namely parallel/distributed
>>>>> column-oriented databases, so I can't say whether they're any happier
>>>>> with writes.
>>>>>
>>>>> FYI I brought up HadoopDB on the NoSQL list too but so far not too many
>>>>> takers...
>>>>>
>>>>> -0xe1a
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> L.G. Meredith
>>>> Managing Partner
>>>> Biosimilarity LLC
>>>> 1219 NW 83rd St
>>>> Seattle, WA 98117
>>>>
>>>> +1 206.650.3740
>>>>
>>>> http://biosimilarity.blogspot.com
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Viktor Klang
>>>
>>> Rogue Scala-head
>>>
>>> Twttr: viktorklang
>>>
>>>
>>>
>>
>>
>> --
>> L.G. Meredith
>> Managing Partner
>> Biosimilarity LLC
>> 1219 NW 83rd St
>> Seattle, WA 98117
>>
>> +1 206.650.3740
>>
>> http://biosimilarity.blogspot.com
>>
>>
>>
>
>
> --
> Viktor Klang
>
> Rogue Scala-head
>
> Twttr: viktorklang
>
> >
>


-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: HadoopDB

2009-07-23 Thread Meredith Gregory
Viktor,

Yes. For example, in the biotech case the data is coming in from a
device-based origin.

Best wishes,

--greg

On Thu, Jul 23, 2009 at 2:35 AM, Viktor Klang wrote:

>
>
> On Wed, Jul 22, 2009 at 11:52 PM, Meredith Gregory <
> lgreg.mered...@gmail.com> wrote:
>
>> Alex, Viktor,
>>
>> i think write semantics could get complicated quickly, actually. However,
>> i was initially responding to the idea that trad business object models
>> don't give way to analytics. Being able to make read-only queries against
>> large volumes of data using the original business object schema seems to me
>> like a win -- even if it's only used to populate a db that's sliced up in a
>> different way for further analytics processing.
>
>
> So basically, what's needed on top of HadoopDB is a service that updates
> data as needed from external data sources.
>
>
>>
>>
>> Best wishes,
>>
>> --greg
>>
>> On Wed, Jul 22, 2009 at 2:44 PM, Alex Cruise  wrote:
>>
>>>
>>> Viktor Klang wrote:
>>> > Absolutely, perhaps I'm tainted by write-heavy systems and perhaps I'm
>>> > just failing to see the overhead we're talking about.
>>> > Perhaps I overlooked it, but the paper didn't mention performance for
>>> > small writes and potentially multiple nodespanning transactions.
>>> HadoopDB makes no claim to any support for writes at all, I'm just
>>> speculating that It Should Be Possible given my understanding of its
>>> architecture, which is admittedly limited and based solely on reading
>>> the paper and a bit of the code. :)
>>> > I'm inclined to believe that some sort of immutable records storage
>>> > would simlify the semantics (analytic queries are IMHO very seldom
>>> > demanding real-time snapshots)
>>> Analytical queries against static data are exactly what it's for.  I
>>> have no experience with its competition, namely parallel/distributed
>>> column-oriented databases, so I can't say whether they're any happier
>>> with writes.
>>>
>>> FYI I brought up HadoopDB on the NoSQL list too but so far not too many
>>> takers...
>>>
>>> -0xe1a
>>>
>>>
>>>
>>
>>
>> --
>> L.G. Meredith
>> Managing Partner
>> Biosimilarity LLC
>> 1219 NW 83rd St
>> Seattle, WA 98117
>>
>> +1 206.650.3740
>>
>> http://biosimilarity.blogspot.com
>>
>>
>>
>
>
> --
> Viktor Klang
>
> Rogue Scala-head
>
> Twttr: viktorklang
>
> >
>


-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: HadoopDB

2009-07-22 Thread Meredith Gregory
Alex, Viktor,

i think write semantics could get complicated quickly, actually. However, i
was initially responding to the idea that trad business object models don't
give way to analytics. Being able to make read-only queries against large
volumes of data using the original business object schema seems to me like a
win -- even if it's only used to populate a db that's sliced up in a
different way for further analytics processing.

Best wishes,

--greg

On Wed, Jul 22, 2009 at 2:44 PM, Alex Cruise  wrote:

>
> Viktor Klang wrote:
> > Absolutely, perhaps I'm tainted by write-heavy systems and perhaps I'm
> > just failing to see the overhead we're talking about.
> > Perhaps I overlooked it, but the paper didn't mention performance for
> > small writes and potentially multiple nodespanning transactions.
> HadoopDB makes no claim to any support for writes at all, I'm just
> speculating that It Should Be Possible given my understanding of its
> architecture, which is admittedly limited and based solely on reading
> the paper and a bit of the code. :)
> > I'm inclined to believe that some sort of immutable records storage
> > would simlify the semantics (analytic queries are IMHO very seldom
> > demanding real-time snapshots)
> Analytical queries against static data are exactly what it's for.  I
> have no experience with its competition, namely parallel/distributed
> column-oriented databases, so I can't say whether they're any happier
> with writes.
>
> FYI I brought up HadoopDB on the NoSQL list too but so far not too many
> takers...
>
> -0xe1a
>
> >
>


-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: HadoopDB

2009-07-22 Thread Meredith Gregory
Viktor,

Your comment is intriguing to me. As near as i can tell the Web 2.0 trend
has this effect that what started out as a traditional domain/business
object model scales out to the point where it starts to look a lot like an
analytics db -- especially when you're trawling for patterns, trends and
other marketing-like data.

As for my little project, i think it's a perfect match for DSLs that cover
analytic set ups like i see in biology and computational finance.

Best wishes,

--greg

On Wed, Jul 22, 2009 at 12:03 PM, Viktor Klang wrote:

>
>
> On Wed, Jul 22, 2009 at 8:05 PM, Alex Cruise  wrote:
>
>>
>> Viktor Klang wrote:
>> > Read it earlier today.
>> >
>> > It's quite interesting, transcoding SQL to MapReduce jobs that uses
>> > RDBMes as datasources
>> >
>> > I see this really useful for analytical querying over huge datasets,
>> > but I wouldn't imagine it as an option as persistence-store for
>> > domain/business objects.
>> Definitely not yet, but their approach *should* be amenable to
>> read-mostly/some-writes use cases in that it tries to discover which
>> node(s) hold the data that will be affected by analyzing the SQL AST;
>> distributed transactions are awful but at least they can be contained to
>> a subset of DBMS nodes.
>
>
> I'm also interested in the possibility to use other/develop new query
> languages that can use the same mechanics.
>
> Gregory: Do you see Project Stockholm benefitting from this?
>
>
>>
>>
>> -0xe1a
>>
>>
>>
>
>
> --
> Viktor Klang
>
> Rogue Scala-head
>
> Twttr: viktorklang
>
> >
>


-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] HadoopDB

2009-07-22 Thread Meredith Gregory
David, et al,

Alex Cruise brought to my attention this paper and
prototypeof a mapping of
SQL to Hadoop. i believe this has relevance both to lift and
goat rodeo.

Best wishes,

--greg

-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Feedback on presentation

2009-07-20 Thread Meredith Gregory
Derek,

Any chance you could rent a time machine and give me these slides back in
2007 when i was first working out how to build a lift app? Nice work.

Best wishes,

--greg

On Mon, Jul 20, 2009 at 3:22 PM, Timothy Perrett wrote:

> +1 it looks really good mate. Presumably your doing a live demo at the
> start or similar?
>
> Cheers, Tim
>
> Sent from my iPhone
>
> On 20 Jul 2009, at 23:09, David Pollak 
> wrote:
>
> Looks good to me.
>
> On Mon, Jul 20, 2009 at 3:05 PM, Derek Chen-Becker <
> dchenbec...@gmail.com> wrote:
>
>> I've attached the slides that I'll be using for my talk to the Boulder JUG
>> in August. It's mainly cribbed from the excellent presentations that other
>> people here have made, but I would appreciate any feedback on content or
>> structure.
>>
>> Thanks,
>>
>> Derek
>>
>>
>>
>
>
> --
> Lift, the simply functional web framework 
> http://liftweb.net
> Beginning Scala 
> http://www.apress.com/book/view/1430219890
> Follow me: http://twitter.com/dpp
> Git some: http://github.com/dpp
>
>
>
> >
>


-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



Re: [scala] Re: [Lift] Re: Jersey + Lift, whats the story?

2009-07-19 Thread Meredith Gregory
David,

Thanks for your query. Here's an example from Hinze and Jeuring's
paper<http://www.informatik.uni-bonn.de/%7Eralf/publications/TheWeb.ps.gz>,
the syntax is Haskell(ish), but it's also simple enough to transliterate to
Scala.

rhs = Abs "n" (If (App (App (Var "=") (Var "n")) (Var "0"))
  (Var "1")
  (App (App (Var "+") (Var "n"))
   (App (Var "fac") (App (Var "pred") (Var
"n")

This is the body of a factorial calculation that has a typo in it. It should
have a (Var "*") where there is a (Var "+"). We'd like to navigate to that
location. Using a zipper our navigation would look like

> top rhs
Abs "n" (If (App ... ) )
> down $$
If (App (App ...) )
> down $$
App (App (Var ...) )
> right $$
Var "1"
> right $$
App (App (Var "+") (Var "n")) (App (Var "fac") ...)
> down $$
App (Var "+") (Var "n")
> down $$
Var "+"
> $${ it = (Var "*") }
Var "*"
> up $$
App (Var "*") (Var "n")

Let me know if this helps.

Best wishes,

--greg

On Sat, Jul 18, 2009 at 4:38 PM, David Pollak  wrote:

> Greg,
> This sounds interesting... but I'd like to see what the Scala code would
> look like that would manipulate the Zipper-based data structures.  If you've
> got a pile of XML, what does it look like to map it to nested [case]
> classes?  What does it look like to manipulate the XML?
>
> Thanks,
>
> David
>
>
> On Fri, Jul 17, 2009 at 10:54 AM, Meredith Gregory <
> lgreg.mered...@gmail.com> wrote:
>
>> Guys,
>>
>> After playing around with integrating Lift and Jersey before the Jersey
>> guys did an 'official' integration and thinking hard about how i wanted to
>> reference locations in data structures via URLs, i realized that 
>> zipper<http://en.wikipedia.org/wiki/Zipper_%28data_structure%29>(cf. this
>> explanation <http://www.haskell.org/haskellwiki/Zipper>) is a much
>> better, much more functional, generic and maintainable solution.
>>
>> Briefly, the way this works is to automate the calculation of a context
>> type, C(T), from a data type T. The context type will allow for the
>> representation of locations in an instance of T in terms of contexts and
>> holes. There's a natural way to get from contexts to paths. So, there's a
>> natural map from URLs (viewed as paths) to locations. One great example of
>> how this works in practice is Oleg Kiselyov's Zipper-based file system. The
>> analogy between paths to files and URLs to resources should be clear.
>>
>> This has led me to look at where to cut the line on calculating zippers.
>> As the wikipedia article mentions above, it is possible do this completely
>> generically, provided one has a notion of differentiation on data
>> structures; that is, the zipper can be expressed in terms of the derivative
>> of a data structure. There are two natural (and somewhat competing) places
>> to hang the differentiation calculation:
>>
>>- the new collections library for scala
>>- the target of a mapping from one of the XML schema proposals to
>>scala types
>>
>> Jorge and i were chatting about this the other day. Either route is a bit
>> of a large task and i've got a bunch of other stuff on my plate right now.
>> However, i'd be very happy to collaborate with anyone who wants to make this
>> happen. Also, by the way, this works really well with a lot of other
>> monadically based machinery.
>>
>> Best wishes,
>>
>> --greg
>>
>>
>> On Fri, Jul 17, 2009 at 8:17 AM, TylerWeir  wrote:
>>
>>>
>>> >>Wait a few days, and I think there'll be some very good news on this
>>> front.
>>>
>>> Tease! :)
>>>
>>> On Jul 17, 10:51 am, David Pollak 
>>> wrote:
>>> > There are benefits to both approaches.  I prefer the partial function
>>> > composition, but annotations on Pojos have their place.
>>> > Wait a few days, and I think there'll be some very good news on this
>>> front.
>>> >
>>> > On Fri, Jul 17, 2009 at 7:28 AM, Timothy Perrett
>>> wrote:
>>> >
>>> >
>>> >
>>> >
>>> >
>>> > > Hey guys,
>>> >
>>> > > I've been taking a look at Jersey and how it operates with Lift by
>>> way

[Lift] Re: Jersey + Lift, whats the story?

2009-07-17 Thread Meredith Gregory
Guys,

After playing around with integrating Lift and Jersey before the Jersey guys
did an 'official' integration and thinking hard about how i wanted to
reference locations in data structures via URLs, i realized that
zipper(cf.
this
explanation ) is a much better,
much more functional, generic and maintainable solution.

Briefly, the way this works is to automate the calculation of a context
type, C(T), from a data type T. The context type will allow for the
representation of locations in an instance of T in terms of contexts and
holes. There's a natural way to get from contexts to paths. So, there's a
natural map from URLs (viewed as paths) to locations. One great example of
how this works in practice is Oleg Kiselyov's Zipper-based file system. The
analogy between paths to files and URLs to resources should be clear.

This has led me to look at where to cut the line on calculating zippers. As
the wikipedia article mentions above, it is possible do this completely
generically, provided one has a notion of differentiation on data
structures; that is, the zipper can be expressed in terms of the derivative
of a data structure. There are two natural (and somewhat competing) places
to hang the differentiation calculation:

   - the new collections library for scala
   - the target of a mapping from one of the XML schema proposals to scala
   types

Jorge and i were chatting about this the other day. Either route is a bit of
a large task and i've got a bunch of other stuff on my plate right now.
However, i'd be very happy to collaborate with anyone who wants to make this
happen. Also, by the way, this works really well with a lot of other
monadically based machinery.

Best wishes,

--greg

On Fri, Jul 17, 2009 at 8:17 AM, TylerWeir  wrote:

>
> >>Wait a few days, and I think there'll be some very good news on this
> front.
>
> Tease! :)
>
> On Jul 17, 10:51 am, David Pollak 
> wrote:
> > There are benefits to both approaches.  I prefer the partial function
> > composition, but annotations on Pojos have their place.
> > Wait a few days, and I think there'll be some very good news on this
> front.
> >
> > On Fri, Jul 17, 2009 at 7:28 AM, Timothy Perrett  >wrote:
> >
> >
> >
> >
> >
> > > Hey guys,
> >
> > > I've been taking a look at Jersey and how it operates with Lift by way
> > > of the recent integration that cropped up on dev.java.net...
> >
> > > From my perspective, I see how having a standard RS service framework
> > > could be helpful, but it appears to bypass important lift concepts
> > > like SiteMap etc so I'm just wondering what the benefit of using such
> > > a layer would be over using DispatchPF etc to create REST services or
> > > serving xml fragments for templates? (I have no idea about Jersey
> > > apart from the basic docs ive read, so if im missing a major benefit
> > > id love to hear discuss)
> >
> > > Cheers for any thoughts
> >
> > > Tim
> >
> > --
> > Lift, the simply functional web frameworkhttp://liftweb.net
> > Beginning Scalahttp://www.apress.com/book/view/1430219890
> > Follow me:http://twitter.com/dpp
> > Git some:http://github.com/dpp
> >
>


-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: organizing views of synchronous streams

2009-07-07 Thread Meredith Gregory
Andrew,

Thanks! This looks quite interesting.

Best wishes,

--greg

On Tue, Jul 7, 2009 at 3:13 PM, Andrew Scherpbier wrote:

>  Maybe you should take a look at this:
>
> http://www.simile-widgets.org/timeline/
>
> Ever since I discovered that widget I've wanted to use it for something...
>
> Cheers!
>
> --Andrew
>
>
> Meredith Gregory wrote:
>
> All,
>
> Here's a blog 
> post<http://biosimilarity.blogspot.com/2009/07/scores-and-comics-and-views-of.html>outlining
>  a way to organize synchronous streams of information. i post it
> here to get an opinion regarding how much work you all think it might be to
> do in lift.
>
> Best wishes,
>
> --greg
>
> --
> L.G. Meredith
> Managing Partner
> Biosimilarity LLC
> 1219 NW 83rd St
> Seattle, WA 98117
>
> +1 206.650.3740
>
> http://biosimilarity.blogspot.com
>
>
>
> >
>


-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: organizing views of synchronous streams

2009-07-07 Thread Meredith Gregory
Alex,

Thanks. i'm aware of the BPMN and other diagrams of this type, which go back
to Role-Interaction Nets which go back to place-transition nets. i was
really asking more about feasibility with existing Lift stuff. This all gets
a lot more interesting in a browser. Also, explaining the ideas using the
metaphor of musical scores opens this dialogue up to many more folks than
attempting to go by way of Petri Nets. ;-)

Best wishes,

--greg

On Tue, Jul 7, 2009 at 3:04 PM, Alex Boisvert  wrote:

> For what it's worth, the Business Process Modeling Notation (BPMN) uses a
> similar notation to convey concurrent events, actions, etc.
>
> http://www.scribd.com/doc/2334639/Introduction-to-BPMN  (See pages 5, 7, 9
> for diagrams with pools and lanes)
> http://www.eclipse.org/bpmn/images/screenshots/
>
> Some company [cough cough] has already developed an open-source Eclipse
> plugin that can can be used to programmatically or interactively design
> diagrams and export them as SVG such that they can be displayed in a browser
> and manipulated via JavaScript.
>
> alex
>
>
> On Tue, Jul 7, 2009 at 2:44 PM, Meredith Gregory  > wrote:
>
>> All,
>>
>> Here's a blog 
>> post<http://biosimilarity.blogspot.com/2009/07/scores-and-comics-and-views-of.html>outlining
>>  a way to organize synchronous streams of information. i post it
>> here to get an opinion regarding how much work you all think it might be to
>> do in lift.
>>
>> Best wishes,
>>
>> --greg
>>
>> --
>> L.G. Meredith
>> Managing Partner
>> Biosimilarity LLC
>> 1219 NW 83rd St
>> Seattle, WA 98117
>>
>> +1 206.650.3740
>>
>> http://biosimilarity.blogspot.com
>>
>>
>>
>
> >
>


-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] organizing views of synchronous streams

2009-07-07 Thread Meredith Gregory
All,

Here's a blog 
postoutlining
a way to organize synchronous streams of information. i post it
here to get an opinion regarding how much work you all think it might be to
do in lift.

Best wishes,

--greg

-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: JTA Transaction Monad - Early Access Program

2009-07-07 Thread Meredith Gregory
Jonas,

i'm going to begin playing with it after i've finished the conversion of the
DSL stuff to scala-query. The JTA monad should just fit with scala-query.

Best wishes,

--greg

On Tue, Jul 7, 2009 at 10:18 AM, Jonas Bonér  wrote:

>
> No I haven't. Should I? Is everyone happy with it?
> Have anyone tried it? Is anyone using it?
>
> 2009/6/30 Timothy Perrett :
> >
> > Jonas,
> >
> > Did you roll this into master? What's its status?
> >
> > Cheers, Tim
> >
> > On Jun 10, 4:46 pm, James Strachan  wrote:
> >> 2009/6/9 Jonas Bonér :
> >>
> >>
> >>
> >> > 2009/6/9 David Pollak :
> >> >> Jonas,
> >> >> We always use Maven to load dependencies.  We never use GPL
> dependencies.
> >> >>  If you have a question about the license of a dependency and its use
> in
> >> >> Lift, please ping me privately.
> >>
> >> > I am using Maven. But as I said I could not find the Atomikos in any
> >> > public library, putting them in lib will let the user easily install
> >> > them in their local repo.
> >> > Do you know if they are in any public repo?
> >>
> >> If its any help I added them here a while back for an integration test
> >> in ActiveMQhttp://repo.fusesource.com/maven2-all/com/atomikos/
> >>
> >> the repo is:http://repo.fusesource.com/maven2-all/
> >>
> >> you might wanna put more recent jars up on some public repo though.
> >>
> >> --
> >> James
> >> ---http://macstrac.blogspot.com/
> >>
> >> Open Source Integrationhttp://fusesource.com/
> > >
> >
>
>
>
> --
> Jonas Bonér
>
> twitter: @jboner
> blog:http://jonasboner.com
> work:   http://crisp.se
> work:   http://scalablesolutions.se
> code:   http://github.com/jboner
>
> >
>


-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Anyone out there using SBT?

2009-07-06 Thread Meredith Gregory
Tim,

Scala-query uses SBT, but i've been able to incorporate it as a part of a
maven-based project with 0 pain, by just dropping the project dir. So, it
doesn't seem to get in the way, in this case.

Best wishes,

--greg

On Mon, Jul 6, 2009 at 1:40 PM, Timothy Perrett wrote:

>
> Thanks for the response mark.
>
> I've taken a good look at SBT and have been pretty impressed to be
> honest - its nice and clean.
>
> I really like the packaged jar which can "unpack" and then you have a
> fully working SBT project - that would make distribution very very
> nice indeed. However, after chatting with Nathan, he concurred with me
> that the only downside of such packages vs archetypes is that right
> now there is no way to set your own package name etc etc as you can
> with maven archetypes.
>
> He mentioned that it would be likely for SBT to get some kind of code-
> generation feature with the next few months - if this is the case, SBT
> would really rock as the main build system for lift based applications
> IMO as it would just be so easy to get started.
>
> Cheers, Tim
>
>
>
>
>
>
> On Jul 6, 5:10 pm, Mark Harrah  wrote:
> > > Maven is totally the right tool for lift project management, and im not
> > > suggesting moving that or anything, but im considering having a lift
> > > archetype that uses SBT so people have the choice when developing their
> > > applications.
> >
> > You might have already seen this, but Nathan and I did some work that
> > you might find useful.  In particular, I used Hello Lift as a demo of
> > the sbt plugin that packages a project as a
> > self-extracting-and-building jar.  You can check it out in the first
> > section of [1].
> >
> > Thanks,
> > Mark
> >
> > [1]http://code.google.com/p/simple-build-tool/wiki/SbtPlugins
> >
>


-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: [scala] Re: higher-kinded types

2009-06-30 Thread Meredith Gregory
Adriaan,

i believe the examples below indicate that Scala's type-checker agrees with
me that your proposed correction for my encoding allows for potential
loosening of "A"-ness. See the example below.

In English, in a monad C over A we don't want to encounter some other type
besides A's. We see the problem when we insist that A's have some property,
like being at least Option'ed.

Best wishes,

--greg

// smallest expression of monad i can find
trait MBrace[C[X] <: MBrace[C,X],A] {
  def nest( a : A ) : C[A]
  def flatten[T <: C[C[A]]]( bsq : T ) : C[A]
}

// a monad that is a Seq
trait MBraceSeq[C[X] <: MBrace[C,X] with Seq[X],A] extends MBrace[C,A]

// This is fine
abstract class MLink[A]( a : Option[A], na : Option[MLink[A]] ) extends
Seq[A] with MBrace[MLink,A]

// But this is not
//abstract class MLink[A <: Option[_]]( a : Option[A], na : Option[MLink[A]]
) extends Seq[A] with MBrace[MLink,A]

The complaint is exactly in line with my concern:

scala> :6: error: the kinds of the type arguments (MLink,A) do not
conform to the expected kinds of the type parameters (type C,type A) in
trait MBrace.
MLink's type parameters do not match type C's expected parameters: type A's
bounds >: Nothing <: Option[_] are stricter than type X's declared bounds >:
Nothing <: Any
   abstract class MLink[A <: Option[_]]( a : Option[A], na :
Option[MLink[A]] ) extends Seq[A] with MBrace[MLink,A]


On Fri, Jun 26, 2009 at 10:24 AM, Meredith Gregory  wrote:

> Adriaan,
>
> First of all, thanks for the time and thought you put into this. i'm not
> happy with your interpretation. i cannot convince myself that refinements
> might not relax the "A"-ness (apologies for the awful sfunctor of a pun
> hiding here ;-) of the contained element. More importantly, the bug is a bug
> regardless of whether my encoding has the semantics i want. The compiler is
> complaining that type bounds are not met that to my eyes plainly are --
> unless you can convince me otherwise. For example, if you can give me the
> interpretation into the appropriate type calculus of the situation i
> reported, i will do the calculation myself.
>
> Best wishes,
>
> --greg
>
>
> On Fri, Jun 26, 2009 at 2:35 AM, Adriaan Moors <
> adriaan.mo...@cs.kuleuven.be> wrote:
>
>> Hi,
>> I think you meant to write
>>
>> trait MBrace[C[X] <: MBrace[C,X], A]
>>
>> instead of
>>
>> trait MBrace[C[_] <: MBrace[C,A], A]
>>
>> (see also ticket 2096 <http://lampsvn.epfl.ch/trac/scala/ticket/2096>)
>>
>> We only used type members in our (OOPSLA) paper
>> to hide some of the higher-kinded types away for backward compatibility.
>>
>> I would not advocate encoding type constructors using something like your
>> TypeCtor1 trait, as the encoding makes type&kind checking less precise, and
>> you'll lose type inference (type constructor inference should be coming to
>> 2.8.x, btw).
>>
>> cheers
>> adriaan
>>
>> On Thu, Jun 25, 2009 at 8:47 AM, Meredith Gregory <
>> lgreg.mered...@gmail.com> wrote:
>>
>>> All,
>>>
>>> The following code works without going through the M-P-O construction. It
>>> enjoys approximately the same brevity as a Haskell type class.
>>>
>>> // smallest expression of monad i can find
>>> trait MBrace[C[_] <: MBrace[C,A],A] {
>>>   def nest( a : A ) : C[A]
>>>   def flatten[T <: C[C[A]]]( bsq : T ) : C[A]
>>> }
>>>
>>> // one of the simplest witnesses of monad i can find
>>> class MBraceSeq[A]( a_ : A* ) extends Seq[A] with MBrace[MBraceSeq,A] {
>>>   override def nest( a : A ) = new MBraceSeq[A]( a )
>>>   override def flatten[T <: MBraceSeq[MBraceSeq[A]]]( bsq : T ) :
>>> MBraceSeq[A] = {
>>> (new MBraceSeq[A]( ) /: bsq)( {
>>>   ( acc : MBraceSeq[A], e : MBraceSeq[A] ) => ( acc ++ e
>>> ).asInstanceOf[MBraceSeq[A]]
>>> } )
>>>   }
>>>   override def length = a_.length
>>>   override def elements = a_.elements
>>>   override def apply( n : Int ) = a_.apply( n )
>>> }
>>>
>>> Best wishes,
>>>
>>> --greg
>>>
>>>
>>> On Wed, Jun 24, 2009 at 3:49 PM, Meredith Gregory <
>>> lgreg.mered...@gmail.com> wrote:
>>>
>>>> All,
>>>>
>>>> Am i correct in concluding that the solution in The
>>>> Moors-Piessens-Odersky paper only works with collections that have been
>>>> clever enough to have used type members rather that type parameters? Or, 

[Lift] Re: preso on monadic design patterns for the web

2009-06-29 Thread Meredith Gregory
Everyone,

Thanks for all the positive feedback. Eric Bowman found the link to the
slides.

Best wishes,

--greg

On Mon, Jun 29, 2009 at 1:51 AM, Eric Bowman  wrote:

>
> Here?
>
> http://svn.biosimilarity.com/src/open/talks/MonadicDesignPatternsForTheWeb.pdf
>
> Timothy Perrett wrote:
> > +1 would love to read the slides properly.
> >
> > Cheers, Tim
> >
> > On Jun 29, 8:59 am, Jonas Bonér  wrote:
> >
> >> Great talk. Thanks.
> >> Could you post the slides? It was a bit hard to see them.
> >> /Jonas
> >>
> >> 2009/6/29 Meredith Gregory :
> >>
> >>
> >>
> >>
> >>
> >>
> >>> All,
> >>>
> >>> The talk i recently gave on this topic is now available online.
> >>>
> >>> Best wishes,
> >>>
> >>> --greg
> >>>
> >>> --
> >>> L.G. Meredith
> >>> Managing Partner
> >>> Biosimilarity LLC
> >>> 1219 NW 83rd St
> >>> Seattle, WA 98117
> >>>
> >>> +1 206.650.3740
> >>>
> >>> http://biosimilarity.blogspot.com
> >>>
> >> --
> >> Jonas Bonér
> >>
> >> twitter: @jboner
> >> blog:http://jonasboner.com
> >> work:  http://crisp.se
> >> work:  http://scalablesolutions.se
> >> code:  http://github.com/jboner
> >>
> > >
> >
>
>
> --
> Eric Bowman
> Boboco Ltd
> ebow...@boboco.ie
> http://www.boboco.ie/ebowman/pubkey.pgp
> +35318394189/+353872801532<http://www.boboco.ie/ebowman/pubkey.pgp%0A+35318394189/+353872801532>
>
>
> >
>


-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] preso on monadic design patterns for the web

2009-06-28 Thread Meredith Gregory
All,

The talk i recently gave on this topic is now available
online
.

Best wishes,

--greg

-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: [scala] unexpectedly abrupt end for such an innocent mistake

2009-06-26 Thread Meredith Gregory
Paul,

Thanks for all your kind feedback. i wasn't really concerned about the long
stack trace. i was concerned about the termination of the REPL process.

Best wishes,

--greg

On Fri, Jun 26, 2009 at 2:44 PM, Paul Phillips  wrote:

> On Fri, Jun 26, 2009 at 02:34:06PM -0700, Meredith Gregory wrote:
> > See the trace below. Is this how we'd like this error to be handled?
>
> There was a fierce debate between outputting a brief error message and
> spewing a long stack trace, but in the end we went with the stack trace.
>
> (Perhaps you don't realize how "Is this how we'd like this error to be
> handled?" comes across.)
>
> Can I give some general encouragement to people to use the bug database
> to report bugs rather than sending them to the lists, unless there is
> something super unusual and fascinating about that particular bug,
> keeping in mind there are hundreds of open tickets which should be no
> less important for being a little (or a lot) older.
>
> --
> Paul Phillips  | Where there's smoke, there's mirrors!
> Apatheist  |
> Empiricist |
> pal, i pill push   |--* http://www.improving.org/paulp/*--
>



-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] unexpectedly abrupt end for such an innocent mistake

2009-06-26 Thread Meredith Gregory
All,

See the trace below. Is this how we'd like this error to be handled?

Best wishes,

--greg

Welcome to Scala version 2.7.4.final (Java HotSpot(TM) Client VM, Java
1.5.0_16).
Type in expressions to have them evaluated.
Type :help for more information.

scala> List( 1, 2, 3 ) match { case List( 1, x* ) => x case _ => throw new
Exception() }
Exception in thread "main" java.lang.Error: symbol value x does not exist in
line1$object$$iw$$iw.
at
scala.tools.nsc.backend.icode.GenICode$ICodePhase.scala$tools$nsc$backend$icode$GenICode$ICodePhase$$genLoad(GenICode.scala:912)
at
scala.tools.nsc.backend.icode.GenICode$ICodePhase.scala$tools$nsc$backend$icode$GenICode$ICodePhase$$genLoad(GenICode.scala:402)
at
scala.tools.nsc.backend.icode.GenICode$ICodePhase.scala$tools$nsc$backend$icode$GenICode$ICodePhase$$genLoad(GenICode.scala:455)
at
scala.tools.nsc.backend.icode.GenICode$ICodePhase.scala$tools$nsc$backend$icode$GenICode$ICodePhase$$genLoad(GenICode.scala:939)
at
scala.tools.nsc.backend.icode.GenICode$ICodePhase.scala$tools$nsc$backend$icode$GenICode$ICodePhase$$genStat(GenICode.scala:171)
at
scala.tools.nsc.backend.icode.GenICode$ICodePhase$$anonfun$genStat$1.apply(GenICode.scala:146)
at
scala.tools.nsc.backend.icode.GenICode$ICodePhase$$anonfun$genStat$1.apply(GenICode.scala:145)
at scala.List.foreach(List.scala:841)
at
scala.tools.nsc.backend.icode.GenICode$ICodePhase.genStat(GenICode.scala:145)
at
scala.tools.nsc.backend.icode.GenICode$ICodePhase.scala$tools$nsc$backend$icode$GenICode$ICodePhase$$genLoad(GenICode.scala:938)
at
scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:114)
at
scala.tools.nsc.backend.icode.GenICode$ICodePhase$$anonfun$gen$1.apply(GenICode.scala:71)
at
scala.tools.nsc.backend.icode.GenICode$ICodePhase$$anonfun$gen$1.apply(GenICode.scala:71)
at scala.List.foreach(List.scala:841)
at
scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:71)
at
scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:136)
at
scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:90)
at
scala.tools.nsc.backend.icode.GenICode$ICodePhase$$anonfun$gen$1.apply(GenICode.scala:71)
at
scala.tools.nsc.backend.icode.GenICode$ICodePhase$$anonfun$gen$1.apply(GenICode.scala:71)
at scala.List.foreach(List.scala:841)
at
scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:71)
at
scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:81)
at
scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:67)
at
scala.tools.nsc.backend.icode.GenICode$ICodePhase.apply(GenICode.scala:63)
at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:267)
at
scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:246)
at
scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:246)
at scala.Iterator$class.foreach(Iterator.scala:414)
at
scala.collection.mutable.ListBuffer$$anon$1.foreach(ListBuffer.scala:266)
at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:246)
at
scala.tools.nsc.backend.icode.GenICode$ICodePhase.run(GenICode.scala:56)
at scala.tools.nsc.Global$Run.compileSources(Global.scala:574)
at scala.tools.nsc.Interpreter$Request.compile(Interpreter.scala:820)
at scala.tools.nsc.Interpreter.interpret(Interpreter.scala:505)
at scala.tools.nsc.Interpreter.interpret(Interpreter.scala:494)
at
scala.tools.nsc.InterpreterLoop.interpretStartingWith(InterpreterLoop.scala:242)
at scala.tools.nsc.InterpreterLoop.command(InterpreterLoop.scala:230)
at scala.tools.nsc.InterpreterLoop.repl(InterpreterLoop.scala:142)
at scala.tools.nsc.InterpreterLoop.main(InterpreterLoop.scala:298)
at scala.tools.nsc.MainGenericRunner$.main(MainGenericRunner.scala:141)
at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala)

Process inferior-scala exited abnormally with code 1


-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] implementation hiding

2009-06-26 Thread Meredith Gregory
All,

Am i being stupid or is it impossible in the code below to construct a
natural way to hide the concrete case class?

Best wishes,

--greg

trait MBrace[C[X] <: MBrace[C,X],A] {
  def nest( a : A ) : C[A]
  def flatten[T <: C[C[A]]]( bsq : T ) : C[A]
}

// a monad that is a Seq
trait MBraceSeq[C[X] <: MBrace[C,X] with Seq[X],A] extends MBrace[C,A]

// one of the simplest witnesses of monad i can find
case class MSequitor[A]( a_ : A* ) extends Seq[A] with MBrace[MSequitor,A] {
  override def nest( a : A ) = new MSequitor[A]( a )
  override def flatten[T <: MSequitor[MSequitor[A]]]( bsq : T ) :
MSequitor[A] = {
(new MSequitor[A]( ) /: bsq)( {
  ( acc : MSequitor[A], e : MSequitor[A] ) => ( acc ++ e
).asInstanceOf[MSequitor[A]]
} )
  }
  override def length = a_.length
  override def elements = a_.elements
  override def apply( n : Int ) = a_.apply( n )
}

// a statement of the instance relation
class MBraceSequitor[A] extends MBraceSeq[MSequitor,A] {
  val empty : MSequitor[A] = new MSequitor[A]( )
  override def nest( a : A ) = empty.nest( a )
  override def flatten[T <: MSequitor[MSequitor[A]]]( bsq : T )
  : MSequitor[A] = empty.flatten( bsq )
}

-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: [scala] Re: higher-kinded types

2009-06-26 Thread Meredith Gregory
Adriaan,

First of all, thanks for the time and thought you put into this. i'm not
happy with your interpretation. i cannot convince myself that refinements
might not relax the "A"-ness (apologies for the awful sfunctor of a pun
hiding here ;-) of the contained element. More importantly, the bug is a bug
regardless of whether my encoding has the semantics i want. The compiler is
complaining that type bounds are not met that to my eyes plainly are --
unless you can convince me otherwise. For example, if you can give me the
interpretation into the appropriate type calculus of the situation i
reported, i will do the calculation myself.

Best wishes,

--greg

On Fri, Jun 26, 2009 at 2:35 AM, Adriaan Moors  wrote:

> Hi,
> I think you meant to write
>
> trait MBrace[C[X] <: MBrace[C,X], A]
>
> instead of
>
> trait MBrace[C[_] <: MBrace[C,A], A]
>
> (see also ticket 2096 <http://lampsvn.epfl.ch/trac/scala/ticket/2096>)
>
> We only used type members in our (OOPSLA) paper
> to hide some of the higher-kinded types away for backward compatibility.
>
> I would not advocate encoding type constructors using something like your
> TypeCtor1 trait, as the encoding makes type&kind checking less precise, and
> you'll lose type inference (type constructor inference should be coming to
> 2.8.x, btw).
>
> cheers
> adriaan
>
> On Thu, Jun 25, 2009 at 8:47 AM, Meredith Gregory <
> lgreg.mered...@gmail.com> wrote:
>
>> All,
>>
>> The following code works without going through the M-P-O construction. It
>> enjoys approximately the same brevity as a Haskell type class.
>>
>> // smallest expression of monad i can find
>> trait MBrace[C[_] <: MBrace[C,A],A] {
>>   def nest( a : A ) : C[A]
>>   def flatten[T <: C[C[A]]]( bsq : T ) : C[A]
>> }
>>
>> // one of the simplest witnesses of monad i can find
>> class MBraceSeq[A]( a_ : A* ) extends Seq[A] with MBrace[MBraceSeq,A] {
>>   override def nest( a : A ) = new MBraceSeq[A]( a )
>>   override def flatten[T <: MBraceSeq[MBraceSeq[A]]]( bsq : T ) :
>> MBraceSeq[A] = {
>> (new MBraceSeq[A]( ) /: bsq)( {
>>   ( acc : MBraceSeq[A], e : MBraceSeq[A] ) => ( acc ++ e
>> ).asInstanceOf[MBraceSeq[A]]
>> } )
>>   }
>>   override def length = a_.length
>>   override def elements = a_.elements
>>   override def apply( n : Int ) = a_.apply( n )
>> }
>>
>> Best wishes,
>>
>> --greg
>>
>>
>> On Wed, Jun 24, 2009 at 3:49 PM, Meredith Gregory <
>> lgreg.mered...@gmail.com> wrote:
>>
>>> All,
>>>
>>> Am i correct in concluding that the solution in The
>>> Moors-Piessens-Odersky paper only works with collections that have been
>>> clever enough to have used type members rather that type parameters? Or, is
>>> there a trick to making the vast majority of the collections types that are
>>> parametrically typed look as if they have type members? (See example below.)
>>>
>>> Best wishes,
>>>
>>> --greg
>>>
>>> // Paraphrasing the basic Moors-Piessens-Odersky construction
>>> trait TypeCtor1 { type E }
>>> trait Brace[A] extends TypeCtor1 {
>>>   type C <: TypeCtor1
>>>   def nest( a : A ) : C{type E = A}
>>>   def flatten( bsq : C{type E=C{type E=A}} ) : C{type E=A}
>>> }
>>>
>>> // Now, how to make a version of BraceList since List is parametrically
>>> typed?
>>>
>>>
>>> --
>>> L.G. Meredith
>>> Managing Partner
>>> Biosimilarity LLC
>>> 1219 NW 83rd St
>>> Seattle, WA 98117
>>>
>>> +1 206.650.3740
>>>
>>> http://biosimilarity.blogspot.com
>>>
>>
>>
>>
>> --
>> L.G. Meredith
>> Managing Partner
>> Biosimilarity LLC
>> 1219 NW 83rd St
>> Seattle, WA 98117
>>
>> +1 206.650.3740
>>
>> http://biosimilarity.blogspot.com
>>
>> Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm for more
>> information.
>>
>
>


-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] From JPA question to ScalaQuery to Collection Abstractions

2009-06-25 Thread Meredith Gregory
 2:21 AM, TSP  wrote:
>
>>
>> Derek
>> Would you distinguish between what is achievable in a specific ORM
>> such as Hibernate from JPA in this statement or would you think it
>> applies to all. I've got to "go with hibernate" in any case because of
>> widespread use of UserTypes. Unlike Greg, in my case I can hand-craft
>> all my hibernate xml files if I need.
>>
>> Tim
>>
>> On Jun 23, 1:46 am, Derek Chen-Becker  wrote:
>> > For sufficiently complex relationships, JPA is not a good fit. Beyond a
>> > certain point it's usually simpler to roll your own. I think that this
>> is
>> > somewhat of a failing of the model, but it's not a simple problem to
>> solve
>> > in the generic case.
>> >
>> > Derek
>> >
>> > On Mon, Jun 22, 2009 at 6:45 PM, Derek Chen-Becker <
>> dchenbec...@gmail.com>wrote:
>> >
>> >
>> >
>> > > Ah, sorry, I lost track of the thread.
>> >
>> > > On Mon, Jun 22, 2009 at 4:55 PM, Meredith Gregory <
>> > > lgreg.mered...@gmail.com> wrote:
>> >
>> > >> Derek,
>> >
>> > >> You are correct and i noted and reported this on Scala on Friday.
>> However,
>> > >> if you have a chain of the form
>> >
>> > >> AbstractClass <- Class <-contains- AbstractClass <-Class <-contains-
>> ...
>> >
>> > >> The @MappedSuperclass solution fails at level 2.
>> >
>> > >> Best wishes,
>> >
>> > >> --greg
>> >
>> > >> On Mon, Jun 22, 2009 at 3:52 PM, Derek Chen-Becker <
>> dchenbec...@gmail.com
>> > >> > wrote:
>> >
>> > >>> Something I just want to throw out into the discussion: Since you're
>> > >>> using table-per-class, having a @Table annotation on
>> AbstractContainer
>> > >>> doesn't do anything since abstract classes can't have instances.
>> Tables are
>> > >>> only generated for abstract classes if you're using a JOINED
>> inheritance
>> > >>> strategy. You might want to look at using the MappedSuperclass
>> annotation
>> > >>> for the abstract base class instead. If I change the
>> AbstractContainer def
>> > >>> to:
>> >
>> > >>> @MappedSuperclass
>> > >>> public abstract class AbstractContainer implements
>> java.io.Serializable {
>> >
>> > >>> and then modify MySampleFuContainer to:
>> >
>> > >>> public class MySampleFuContainer extends AbstractContainer {
>> >
>> > >>> then I seem to get the proper schema:
>> >
>> > >>> create table lingo_production.MySampleFuContainer_table (
>> > >>> id varchar(255) not null,
>> > >>> uuid varchar(255),
>> > >>> mysamplingmumble__idSuper varchar(255),
>> > >>> primary key (id),
>> > >>> unique (uuid)
>> > >>> );
>> >
>> > >>> Having said that, I think that the behavior you're currently seeing
>> > >>> appears to be a bug.
>> >
>> > >>> Derek
>> >
>> > >>> On Mon, Jun 22, 2009 at 3:43 PM, Meredith Gregory <
>> > >>> lgreg.mered...@gmail.com> wrote:
>> >
>> > >>>> Kris,
>> >
>> > >>>> Here<
>> http://svn.biosimilarity.com/src/open/codesamples/trunk/hibernate/>is a
>> link to the self-contained example that now uses just Java. i included
>> > >>>> the target dir in the repo to speed up investigation, but you can
>> just blow
>> > >>>> that away and build from scratch. The example is currently written
>> to
>> > >>>> Java1.6, but also exhibits the same behavior under Java1.5. To run
>> the
>> > >>>> example
>> >
>> > >>>> > svn co
>> > >>>>http://svn.biosimilarity.com/src/open/codesamples/trunk/hibernate
>> > >>>> ...
>> > >>>> > env PATH=:$PATH JAVA_HOME= mvn
>> clean
>> > >>>> compile process-classes
>> >
>> > >>>> If you switch comment and decl at line 22 in
>> > >>>> src/main/java/maxb/hbex2/MySampleFuContainer.j

[Lift] Re: higher-kinded types

2009-06-24 Thread Meredith Gregory
All,

The following code works without going through the M-P-O construction. It
enjoys approximately the same brevity as a Haskell type class.

// smallest expression of monad i can find
trait MBrace[C[_] <: MBrace[C,A],A] {
  def nest( a : A ) : C[A]
  def flatten[T <: C[C[A]]]( bsq : T ) : C[A]
}

// one of the simplest witnesses of monad i can find
class MBraceSeq[A]( a_ : A* ) extends Seq[A] with MBrace[MBraceSeq,A] {
  override def nest( a : A ) = new MBraceSeq[A]( a )
  override def flatten[T <: MBraceSeq[MBraceSeq[A]]]( bsq : T ) :
MBraceSeq[A] = {
(new MBraceSeq[A]( ) /: bsq)( {
  ( acc : MBraceSeq[A], e : MBraceSeq[A] ) => ( acc ++ e
).asInstanceOf[MBraceSeq[A]]
} )
  }
  override def length = a_.length
  override def elements = a_.elements
  override def apply( n : Int ) = a_.apply( n )
}

Best wishes,

--greg

On Wed, Jun 24, 2009 at 3:49 PM, Meredith Gregory
wrote:

> All,
>
> Am i correct in concluding that the solution in The Moors-Piessens-Odersky
> paper only works with collections that have been clever enough to have used
> type members rather that type parameters? Or, is there a trick to making the
> vast majority of the collections types that are parametrically typed look as
> if they have type members? (See example below.)
>
> Best wishes,
>
> --greg
>
> // Paraphrasing the basic Moors-Piessens-Odersky construction
> trait TypeCtor1 { type E }
> trait Brace[A] extends TypeCtor1 {
>   type C <: TypeCtor1
>   def nest( a : A ) : C{type E = A}
>   def flatten( bsq : C{type E=C{type E=A}} ) : C{type E=A}
> }
>
> // Now, how to make a version of BraceList since List is parametrically
> typed?
>
>
> --
> L.G. Meredith
> Managing Partner
> Biosimilarity LLC
> 1219 NW 83rd St
> Seattle, WA 98117
>
> +1 206.650.3740
>
> http://biosimilarity.blogspot.com
>



-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Stax

2009-06-24 Thread Meredith Gregory
Jon,

Sweet!

Best wishes,

--greg

On Wed, Jun 24, 2009 at 3:11 PM, jon  wrote:

>
> I was able to get the latest lift-example application deployed without
> a problem: http://helloworld.hoffrocket.staxapps.net/.  It's running
> against a mysql DB that they're hosting, not h2.
>
> I got an nginx 502 gateway down with a more substantial app, but their
> log files were all blank, so I have no idea what the problem was.
>
> Their deployment mechanism is war/ear based (ear built locally, then
> uploaded).  It would be cool if they supported standard mvn layouts
> and could just build your war from source.  I'm on a 512kb max upload
> and lift-example took 5 minutes to deploy.
>
> - Jon
>
> On Jun 24, 4:21 pm, Tim Nelson  wrote:
> > I think they use Gant.http://gant.codehaus.org/
> >
> >
> >
> > On Wed, Jun 24, 2009 at 3:10 PM, fan...@gmail.com 
> wrote:
> >
> > > Tim Nelson a écrit :
> > > [...]
> > > > I did install their SDK and from what I can tell it's basically some
> > > > Groovy scripts that use Ant + Ivy.
> >
> > > Gradle perhaps ?http://www.gradle.org/
> >
> > > --
> > > Francois Armand
> > >http://fanf42.blogspot.com
>
> >
>


-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: JPA and auto generation of id

2009-06-24 Thread Meredith Gregory
David,

The GenericGenerator annotation was the solution i found worked for me for
Hibernate 3.3.2GA, and the one i suggested you investigate. i'm glad you've
gotten past that one.

Best wishes,

--greg

On Wed, Jun 24, 2009 at 3:29 PM, David Persons  wrote:

>
> Thanks for all the answers guys.
>
> I managed to fix the id problem, I needed the Hibernate specific class
> GenericGenerator to fix it, which of cource is less pretty then using
> only JPA. Someone has an example of how to make it work with MySql and
> only JPA annotations? Current version:
>
> @Entity
> class Scene {
>  @Id
>  @GenericGenerator{val name="hibernate-increment", val
> strategy="increment"}
>  @GeneratedValue{val strategy = GenerationType.SEQUENCE, val
> generator = "hibernate-increment"}
>   var id : Long = _
>
>  @Column{val unique = true, val nullable = false}
>  var ordering : Int = _
>
>  @Column{val unique = true, val nullable = false}
>  var name : String = ""
>
>  @ManyToOne{val optional = false}
>  var storyBoard : StoryBoard = _
> }
>
> However, now I get an org.hibernate.PropertyValueException: not-null
> property references a null or transient value:
> model.Scene.storyBoard :-s I tried a lot of things already, the
> corresponding StoryBoard is saved and not null, so I guess it has to
> be transient. Merging the StoryBoard however still gives the same
> error..
>
> I tried to get JPA and Lift working together in the same way as in the
> JPADemo example.. Is it the use of MySql which prevents the example
> from working for me?
>
> regards,
> David
>
> On 23 jun, 00:54, Derek Chen-Becker  wrote:
> > Also, what does the schema for the entity's table look like?
> >
> > On Mon, Jun 22, 2009 at 4:54 PM, Derek Chen-Becker <
> dchenbec...@gmail.com>wrote:
> >
> > > Mind posting the snippet of code where you're saving the instance? A
> merge
> > > should interpret a null ID as a fresh instance, and a persist should
> just
> > > save it.
> >
> > > Derek
> >
> > > On Mon, Jun 22, 2009 at 1:50 PM, David Persons  >wrote:
> >
> > >> I am using MySql (5). After setting the hibernate.dialect to
> > >> org.hibernate.dialect.MySQLDialect in my persistence.xml file, I get a
> > >> org.hibernate.AssertionFailure: null id :-s
> >
> > >> cheers
> >
> > >> On 22 jun, 19:18, Derek Chen-Becker  wrote:
> > >> > That's not accurate, at least with Hibernate. By putting the
> annotations
> > >> on
> > >> > vars, the compiler ends up putting them on the internal fields,
> which
> > >> then
> > >> > forces Hibernate into a field-based persistence model and not a
> > >> > getter/setter based one. The SQLGrammarException is most likely what
> the
> > >> > other people have said. If you're in Oracle or PostgreSQL, for
> instance,
> > >> you
> > >> > need a sequence set up for the auto identity model. What database
> are
> > >> you
> > >> > using?
> >
> > >> > Derek
> >
> > >> > On Mon, Jun 22, 2009 at 8:54 AM, Eric Bowman 
> wrote:
> >
> > >> > > David Persons wrote:
> > >> > > > Hello guys,
> >
> > >> > > > I get a org.hibernate.exception.SQLGrammarException: could not
> get
> > >> or
> > >> > > > update next value error everytime I try to save the following
> > >> Entity:
> >
> > >> > > > @Entity
> > >> > > > class Scene {
> > >> > > >   @Id
> > >> > > >   @GeneratedValue(){val strategy = GenerationType.AUTO}
> > >> > > >   var id : Long = _
> >
> > >> > > >   @Column{val unique = true, val nullable = false}
> > >> > > >   var ordering : Int = _
> >
> > >> > > >   @Column{val unique = true, val nullable = false}
> > >> > > >   var name : String = ""
> >
> > >> > > >   @ManyToOne{val optional = false}
> > >> > > >   var storyBoard : StoryBoard = _
> > >> > > > }
> >
> > >> > > You almost certainly need some scala.reflect.BeanProperty
> annotations
> > >> on
> > >> > > your fields.
> >
> > >> > > cheers,
> > >> > > Eric
> >
> > >> > > --
> > >> > > Eric Bowman
> > >> > > Boboco Ltd
> > >> > > ebow...@boboco.ie
> > >> > >http://www.boboco.ie/ebowman/pubkey.pgp
> > >> > > +35318394189/+353872801532<
> > >>http://www.boboco.ie/ebowman/pubkey.pgp%0A+35318394189/+353872801532>
>
> >
>


-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Stax

2009-06-24 Thread Meredith Gregory
David,

Cool. About 6 weeks ago i started down the path of evaluating them, but saw
no free service and stopped; and then the GAE noise began.

Best wishes,

--greg

On Wed, Jun 24, 2009 at 12:08 PM, David Pollak <
feeder.of.the.be...@gmail.com> wrote:

> They will have a free level
>
> On Jun 24, 2009 11:46 AM, "Naftoli Gugenheim" 
> wrote:
>
> Anyone know what kind of pricing they have? Do they have a free level like
> GAE?
>
>
> On Wed, Jun 24, 2009 at 12:43 PM, David Pollak <
> feeder.of.the.be...@gmail.com> wrote:
>
>> > > > > On Wed, Jun 24, 2009 at 9:02 AM, Timothy Perrett
>>  wrote: >> >> >> A...
>>
>> > Lift, the simply functional web framework http://liftweb.net >
>> Beginning Scala http://www.apress.c...
>>
>
> >
>


-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: [scala] JPA question

2009-06-23 Thread Meredith Gregory
Oliver,

Thanks. This proposal has been put forward before.

   - The code is generated. If the top class is annotated @MappedSuperclass,
   why not label every abstract class that is top of its hierarchy
   @MappedSuperclass. That's the simplest change to the compilation strategy
   that generates this code.
   - This fails for the contained element. Specifically, if you also label
   the top of the contained element hierarchy @MappedSuperclass, then hibernate
   fails to be able to find the Id of the subclasses.
   - Futher, how does the compilation scheme know which top class is
   contained. That's not possible because someone could always come along and
   add another class that was a container. So, this fails to be compositional,
   in the extreme.


Best wishes,

--greg

On Tue, Jun 23, 2009 at 4:55 PM, Oliver Lambert  wrote:

> I don't understand from the code sample why AbstractContainer has to be an
> entity or
> have a table or id annotation. I'd be looking at just using the
> @MappedSuperclass annotation.
>
>
> On Wed, Jun 24, 2009 at 9:27 AM, Meredith Gregory <
> lgreg.mered...@gmail.com> wrote:
>
>> Kris,
>>
>> Thanks for this code sample. i will study and see if it offers a way
>> around the conundrum. In the meantime, here's a code 
>> sample<http://svn.biosimilarity.com/src/open/codesamples/trunk/hibernate/hbex/>illustrating
>>  exactly what i'm talking about.
>>
>> Best wishes,
>>
>> --greg
>>
>>
>> On Tue, Jun 23, 2009 at 2:21 PM, Kris Nuttycombe <
>> kris.nuttyco...@gmail.com> wrote:
>>
>>>
>>> Oops, forgot a member of the hierarchy, inline below:
>>>
>>> On Tue, Jun 23, 2009 at 3:19 PM, Kris
>>> Nuttycombe wrote:
>>> > I'm just so puzzled by this thread because I have the following entity
>>> > hierarchy in my app:
>>> >
>>> > @Entity
>>> > @Inheritance(strategy = InheritanceType.JOINED)
>>> > @Table(name = "payment_source_transaction")
>>> > public abstract class PaymentSourceTransaction>> PaymentSource>
>>> >extends SubscriptionTransaction implements
>>> > MonetaryTransaction, Serializable {
>>> >
>>> >@ManyToOne(cascade = {CascadeType.MERGE, CascadeType.PERSIST},
>>> > optional = false, targetEntity = PaymentSource.class)
>>> >private T paymentSource;
>>> >
>>> >...
>>> > }
>>> >
>>> > @Entity
>>> > public abstract class CreditCardTransaction extends
>>> > PaymentSourceTransaction { ... }
>>> >
>>>
>>> @MappedSuperclass
>>> public abstract class VoidableCCTransaction extends
>>> CreditCardTransaction implements Serializable { ... }
>>>
>>>@OneToOne(cascade = {CascadeType.MERGE, CascadeType.PERSIST},
>>> mappedBy="voidedTransaction")
>>>private CCVoidTransaction voidTransaction;
>>>
>>> > @Entity
>>> > public class CCAuthTransaction extends VoidableCCTransaction
>>> > implements AuthTransaction, Divisional, Serializable { ..
>>> > }
>>> >
>>> > @Entity
>>> > @Inheritance(strategy = InheritanceType.SINGLE_TABLE)
>>> > public abstract class CCCaptureTransaction extends
>>> > VoidableCCTransaction implements Serializable,
>>> > CaptureTransaction {
>>> >private static final long serialVersionUID = 1L;
>>> >
>>> >@OneToOne(cascade = {CascadeType.PERSIST, CascadeType.MERGE})
>>> >private CCAuthTransaction authTransaction;
>>> >
>>> >...
>>> > }
>>> >
>>> > @Entity
>>> > public class EcometryCaptureTransaction extends CCCaptureTransaction
>>> > implements EcometryOrder, Serializable { ... }
>>> >
>>> > @Entity
>>> > @Inheritance(strategy = InheritanceType.JOINED)
>>> > public abstract class PaymentSource>
>>> > extends UUEntity implements MutationControlled, Serializable { ...
>>> > }
>>> >
>>> > @Entity
>>> > public class CreditCard extends PaymentSource implements
>>> > Addressable, Serializable { ... }
>>> >
>>> > @Entity
>>> > public class CheckingAccount extends PaymentSource
>>> > implements Serializable { ... }
>>> >
>>> > This works for me without difficulty. What am I missing that is
>>> > different about this schem

[Lift] Re: [scala] JPA question

2009-06-23 Thread Meredith Gregory
Kris,

Do you have a self-contained, compilable sample i could compare to the one i
made? i can craft one from your snippet below, but it'd be a better
comparison if you had one already.

Best wishes,

--greg

On Tue, Jun 23, 2009 at 2:21 PM, Kris Nuttycombe
wrote:

>
> Oops, forgot a member of the hierarchy, inline below:
>
> On Tue, Jun 23, 2009 at 3:19 PM, Kris
> Nuttycombe wrote:
> > I'm just so puzzled by this thread because I have the following entity
> > hierarchy in my app:
> >
> > @Entity
> > @Inheritance(strategy = InheritanceType.JOINED)
> > @Table(name = "payment_source_transaction")
> > public abstract class PaymentSourceTransaction PaymentSource>
> >extends SubscriptionTransaction implements
> > MonetaryTransaction, Serializable {
> >
> >@ManyToOne(cascade = {CascadeType.MERGE, CascadeType.PERSIST},
> > optional = false, targetEntity = PaymentSource.class)
> >private T paymentSource;
> >
> >...
> > }
> >
> > @Entity
> > public abstract class CreditCardTransaction extends
> > PaymentSourceTransaction { ... }
> >
>
> @MappedSuperclass
> public abstract class VoidableCCTransaction extends
> CreditCardTransaction implements Serializable { ... }
>
>@OneToOne(cascade = {CascadeType.MERGE, CascadeType.PERSIST},
> mappedBy="voidedTransaction")
>private CCVoidTransaction voidTransaction;
>
> > @Entity
> > public class CCAuthTransaction extends VoidableCCTransaction
> > implements AuthTransaction, Divisional, Serializable { ..
> > }
> >
> > @Entity
> > @Inheritance(strategy = InheritanceType.SINGLE_TABLE)
> > public abstract class CCCaptureTransaction extends
> > VoidableCCTransaction implements Serializable,
> > CaptureTransaction {
> >private static final long serialVersionUID = 1L;
> >
> >@OneToOne(cascade = {CascadeType.PERSIST, CascadeType.MERGE})
> >private CCAuthTransaction authTransaction;
> >
> >...
> > }
> >
> > @Entity
> > public class EcometryCaptureTransaction extends CCCaptureTransaction
> > implements EcometryOrder, Serializable { ... }
> >
> > @Entity
> > @Inheritance(strategy = InheritanceType.JOINED)
> > public abstract class PaymentSource>
> > extends UUEntity implements MutationControlled, Serializable { ...
> > }
> >
> > @Entity
> > public class CreditCard extends PaymentSource implements
> > Addressable, Serializable { ... }
> >
> > @Entity
> > public class CheckingAccount extends PaymentSource
> > implements Serializable { ... }
> >
> > This works for me without difficulty. What am I missing that is
> > different about this scheme than the one that you describe?
> >
> > Kris
> >
> >
> >
> > On Tue, Jun 23, 2009 at 11:29 AM, Meredith
> > Gregory wrote:
> >> Derek,
> >>
> >> i completely concur. i wanted to give it a serious go, however, before i
> >> abandoned it. The issue is that so much of the incumbent technology goes
> >> across this object-relational boundary, i needed a simple case to
> justify
> >> walking away from this technology. This example provides it. To see just
> how
> >> non-complex it is, let me state it in common sense terms.
> >>
> >> Suppose we are building an app for a manufacturing firm, and the firm
> ships
> >> out its goods in different kinds of containers: plastic-coated cardboard
> >> boxes, metal boxes, etc.
> >> Suppose that different kinds of materials go into different kinds of
> boxes,
> >> and sometimes medicinal or toxic substances go into these containers;
> but,
> >> every container gets a manifest. When the container contains these
> materials
> >> that need to be handled with care or attention, the manifest is a
> special
> >> kind of certified manifest.
> >>
> >> We might imagine that this firm has already constructed an object model
> that
> >> looks like
> >>
> >> abstract class Container { ...; Manifest getManifest(); void
> setManifest(
> >> Manifest manifest ); ... }
> >> class CardboardContainer extends Container { ... }
> >> class MetalContainer extends Container { ... }
> >> abstract class Manifest { ... }
> >> class StdManifest extends Manifest { ... }
> >> class CertifiedManifest extends Manifest { ... }
> >>
> >> We need to work with their existing infrastructure. However, this
> >> situation/model breaks Hibernate's imp

[Lift] Re: [scala] JPA question

2009-06-23 Thread Meredith Gregory
Kris,

Thanks for this code sample. i will study and see if it offers a way around
the conundrum. In the meantime, here's a code
sample<http://svn.biosimilarity.com/src/open/codesamples/trunk/hibernate/hbex/>illustrating
exactly what i'm talking about.

Best wishes,

--greg

On Tue, Jun 23, 2009 at 2:21 PM, Kris Nuttycombe
wrote:

>
> Oops, forgot a member of the hierarchy, inline below:
>
> On Tue, Jun 23, 2009 at 3:19 PM, Kris
> Nuttycombe wrote:
> > I'm just so puzzled by this thread because I have the following entity
> > hierarchy in my app:
> >
> > @Entity
> > @Inheritance(strategy = InheritanceType.JOINED)
> > @Table(name = "payment_source_transaction")
> > public abstract class PaymentSourceTransaction PaymentSource>
> >extends SubscriptionTransaction implements
> > MonetaryTransaction, Serializable {
> >
> >@ManyToOne(cascade = {CascadeType.MERGE, CascadeType.PERSIST},
> > optional = false, targetEntity = PaymentSource.class)
> >private T paymentSource;
> >
> >...
> > }
> >
> > @Entity
> > public abstract class CreditCardTransaction extends
> > PaymentSourceTransaction { ... }
> >
>
> @MappedSuperclass
> public abstract class VoidableCCTransaction extends
> CreditCardTransaction implements Serializable { ... }
>
>@OneToOne(cascade = {CascadeType.MERGE, CascadeType.PERSIST},
> mappedBy="voidedTransaction")
>private CCVoidTransaction voidTransaction;
>
> > @Entity
> > public class CCAuthTransaction extends VoidableCCTransaction
> > implements AuthTransaction, Divisional, Serializable { ..
> > }
> >
> > @Entity
> > @Inheritance(strategy = InheritanceType.SINGLE_TABLE)
> > public abstract class CCCaptureTransaction extends
> > VoidableCCTransaction implements Serializable,
> > CaptureTransaction {
> >private static final long serialVersionUID = 1L;
> >
> >@OneToOne(cascade = {CascadeType.PERSIST, CascadeType.MERGE})
> >private CCAuthTransaction authTransaction;
> >
> >...
> > }
> >
> > @Entity
> > public class EcometryCaptureTransaction extends CCCaptureTransaction
> > implements EcometryOrder, Serializable { ... }
> >
> > @Entity
> > @Inheritance(strategy = InheritanceType.JOINED)
> > public abstract class PaymentSource>
> > extends UUEntity implements MutationControlled, Serializable { ...
> > }
> >
> > @Entity
> > public class CreditCard extends PaymentSource implements
> > Addressable, Serializable { ... }
> >
> > @Entity
> > public class CheckingAccount extends PaymentSource
> > implements Serializable { ... }
> >
> > This works for me without difficulty. What am I missing that is
> > different about this scheme than the one that you describe?
> >
> > Kris
> >
> >
> >
> > On Tue, Jun 23, 2009 at 11:29 AM, Meredith
> > Gregory wrote:
> >> Derek,
> >>
> >> i completely concur. i wanted to give it a serious go, however, before i
> >> abandoned it. The issue is that so much of the incumbent technology goes
> >> across this object-relational boundary, i needed a simple case to
> justify
> >> walking away from this technology. This example provides it. To see just
> how
> >> non-complex it is, let me state it in common sense terms.
> >>
> >> Suppose we are building an app for a manufacturing firm, and the firm
> ships
> >> out its goods in different kinds of containers: plastic-coated cardboard
> >> boxes, metal boxes, etc.
> >> Suppose that different kinds of materials go into different kinds of
> boxes,
> >> and sometimes medicinal or toxic substances go into these containers;
> but,
> >> every container gets a manifest. When the container contains these
> materials
> >> that need to be handled with care or attention, the manifest is a
> special
> >> kind of certified manifest.
> >>
> >> We might imagine that this firm has already constructed an object model
> that
> >> looks like
> >>
> >> abstract class Container { ...; Manifest getManifest(); void
> setManifest(
> >> Manifest manifest ); ... }
> >> class CardboardContainer extends Container { ... }
> >> class MetalContainer extends Container { ... }
> >> abstract class Manifest { ... }
> >> class StdManifest extends Manifest { ... }
> >> class CertifiedManifest extends Manifest { ... }
> >>
> >> We need to work with their existing infrastructure

[Lift] Re: [scala] JPA question

2009-06-23 Thread Meredith Gregory
Derek,

i completely concur. i wanted to give it a serious go, however, before i
abandoned it. The issue is that so much of the incumbent technology goes
across this object-relational boundary, i needed a simple case to justify
walking away from this technology. This example provides it. To see just how
non-complex it is, let me state it in common sense terms.

   1. Suppose we are building an app for a manufacturing firm, and the firm
   ships out its goods in different kinds of containers: plastic-coated
   cardboard boxes, metal boxes, etc.
   2. Suppose that different kinds of materials go into different kinds of
   boxes, and sometimes medicinal or toxic substances go into these containers;
   but, every container gets a manifest. When the container contains these
   materials that need to be handled with care or attention, the manifest is a
   special kind of certified manifest.

We might imagine that this firm has already constructed an object model that
looks like

abstract class Container { ...; Manifest getManifest(); void setManifest(
Manifest manifest ); ... }
class CardboardContainer extends Container { ... }
class MetalContainer extends Container { ... }
abstract class Manifest { ... }
class StdManifest extends Manifest { ... }
class CertifiedManifest extends Manifest { ... }

We need to work with their existing infrastructure. However, this
situation/model breaks Hibernate's implementation of JPA. That such a simple
situation would cause problems indicates to me that these technologies have
never been used in any significant way in production -- otherwise they would
have bumped into such a common case. If i'm wrong about something, here, i'd
love to be disabused of my misunderstanding(s). Currently, i feel i have
enough justification to go to a different kind of solution, such as a
LINQ-based solution.

Best wishes,

--greg

On Mon, Jun 22, 2009 at 5:46 PM, Derek Chen-Becker wrote:

> For sufficiently complex relationships, JPA is not a good fit. Beyond a
> certain point it's usually simpler to roll your own. I think that this is
> somewhat of a failing of the model, but it's not a simple problem to solve
> in the generic case.
>
> Derek
>
>
> On Mon, Jun 22, 2009 at 6:45 PM, Derek Chen-Becker 
> wrote:
>
>> Ah, sorry, I lost track of the thread.
>>
>>
>> On Mon, Jun 22, 2009 at 4:55 PM, Meredith Gregory <
>> lgreg.mered...@gmail.com> wrote:
>>
>>> Derek,
>>>
>>> You are correct and i noted and reported this on Scala on Friday.
>>> However, if you have a chain of the form
>>>
>>> AbstractClass <- Class <-contains- AbstractClass <-Class <-contains- ...
>>>
>>> The @MappedSuperclass solution fails at level 2.
>>>
>>> Best wishes,
>>>
>>> --greg
>>>
>>>
>>> On Mon, Jun 22, 2009 at 3:52 PM, Derek Chen-Becker <
>>> dchenbec...@gmail.com> wrote:
>>>
>>>> Something I just want to throw out into the discussion: Since you're
>>>> using table-per-class, having a @Table annotation on AbstractContainer
>>>> doesn't do anything since abstract classes can't have instances. Tables are
>>>> only generated for abstract classes if you're using a JOINED inheritance
>>>> strategy. You might want to look at using the MappedSuperclass annotation
>>>> for the abstract base class instead. If I change the AbstractContainer def
>>>> to:
>>>>
>>>> @MappedSuperclass
>>>> public abstract class AbstractContainer implements java.io.Serializable
>>>> {
>>>>
>>>> and then modify MySampleFuContainer to:
>>>>
>>>> public class MySampleFuContainer extends AbstractContainer {
>>>>
>>>> then I seem to get the proper schema:
>>>>
>>>> create table lingo_production.MySampleFuContainer_table (
>>>> id varchar(255) not null,
>>>> uuid varchar(255),
>>>> mysamplingmumble__idSuper varchar(255),
>>>> primary key (id),
>>>> unique (uuid)
>>>> );
>>>>
>>>>
>>>> Having said that, I think that the behavior you're currently seeing
>>>> appears to be a bug.
>>>>
>>>> Derek
>>>>
>>>>
>>>> On Mon, Jun 22, 2009 at 3:43 PM, Meredith Gregory <
>>>> lgreg.mered...@gmail.com> wrote:
>>>>
>>>>> Kris,
>>>>>
>>>>> Here<http://svn.biosimilarity.com/src/open/codesamples/trunk/hibernate/>is
>>>>>  a link to the self-conta

[Lift] Re: [scala] JPA question

2009-06-22 Thread Meredith Gregory
P.S. While i am waiting for the Hibernate folks to respond to the issue, i
am looking into Stefan Zeiger's LINQ implementation for Scala more
seriously. If it is reasonably stable, this is a much better target for my
compilation scheme, anyway.

On Mon, Jun 22, 2009 at 3:55 PM, Meredith Gregory
wrote:

> Derek,
>
> You are correct and i noted and reported this on Scala on Friday. However,
> if you have a chain of the form
>
> AbstractClass <- Class <-contains- AbstractClass <-Class <-contains- ...
>
> The @MappedSuperclass solution fails at level 2.
>
> Best wishes,
>
> --greg
>
>
> On Mon, Jun 22, 2009 at 3:52 PM, Derek Chen-Becker 
> wrote:
>
>> Something I just want to throw out into the discussion: Since you're using
>> table-per-class, having a @Table annotation on AbstractContainer doesn't do
>> anything since abstract classes can't have instances. Tables are only
>> generated for abstract classes if you're using a JOINED inheritance
>> strategy. You might want to look at using the MappedSuperclass annotation
>> for the abstract base class instead. If I change the AbstractContainer def
>> to:
>>
>> @MappedSuperclass
>> public abstract class AbstractContainer implements java.io.Serializable {
>>
>> and then modify MySampleFuContainer to:
>>
>> public class MySampleFuContainer extends AbstractContainer {
>>
>> then I seem to get the proper schema:
>>
>> create table lingo_production.MySampleFuContainer_table (
>> id varchar(255) not null,
>> uuid varchar(255),
>> mysamplingmumble__idSuper varchar(255),
>>     primary key (id),
>> unique (uuid)
>> );
>>
>>
>> Having said that, I think that the behavior you're currently seeing
>> appears to be a bug.
>>
>> Derek
>>
>>
>> On Mon, Jun 22, 2009 at 3:43 PM, Meredith Gregory <
>> lgreg.mered...@gmail.com> wrote:
>>
>>> Kris,
>>>
>>> Here<http://svn.biosimilarity.com/src/open/codesamples/trunk/hibernate/>is 
>>> a link to the self-contained example that now uses just Java. i included
>>> the target dir in the repo to speed up investigation, but you can just blow
>>> that away and build from scratch. The example is currently written to
>>> Java1.6, but also exhibits the same behavior under Java1.5. To run the
>>> example
>>>
>>> > svn co
>>> http://svn.biosimilarity.com/src/open/codesamples/trunk/hibernate
>>> ...
>>> > env PATH=:$PATH JAVA_HOME= mvn clean
>>> compile process-classes
>>>
>>> If you switch comment and decl at line 22 in
>>> src/main/java/maxb/hbex2/MySampleFuContainer.java then you see the error.
>>> The schema goes from
>>>
>>> create table lingo_production.MySampleFuContainer_table (
>>> id_AbstractContainer varchar(255) not null,
>>> varchar(255) not null,
>>> uuid varchar(255),
>>>     mysamplingmumble__idSuper varchar(255),
>>> primary key (id),
>>> unique (uuid)
>>> );
>>>
>>> to
>>>
>>> create table lingo_production.MySampleFuContainer_table (
>>> id_AbstractContainer varchar(255) not null,
>>> id varchar(255),
>>> mysamplingmumble_ tinyblob,
>>> uuid varchar(255),
>>> primary key (id_AbstractContainer),
>>> unique (id_AbstractContainer)
>>> );
>>>
>>> Best wishes,
>>>
>>> --greg
>>>
>>>
>>> On Mon, Jun 22, 2009 at 1:38 PM, Meredith Gregory <
>>> lgreg.mered...@gmail.com> wrote:
>>>
>>>> Kris,
>>>>
>>>> Thanks for the suggestion. i've now got a tiny little example that
>>>> compiles on its own that illustrates the problem. Changing the inheritance
>>>> strategy to JOINED makes no difference. Hibernate still does the wrong
>>>> thing.
>>>>
>>>> Best wishes,
>>>>
>>>> --greg
>>>>
>>>>
>>>> On Mon, Jun 22, 2009 at 8:55 AM, Kris Nuttycombe <
>>>> kris.nuttyco...@gmail.com> wrote:
>>>>
>>>>> This may be off the mark, but I'm wondering if the reason that you're
>>>>> having difficulty with the parallel inheritance hierarchy problem is
>>>>> not your use of TABLE_PER_CLASS inheritance. In my application, I have
>>&

[Lift] Re: [scala] JPA question

2009-06-22 Thread Meredith Gregory
Derek,

You are correct and i noted and reported this on Scala on Friday. However,
if you have a chain of the form

AbstractClass <- Class <-contains- AbstractClass <-Class <-contains- ...

The @MappedSuperclass solution fails at level 2.

Best wishes,

--greg

On Mon, Jun 22, 2009 at 3:52 PM, Derek Chen-Becker wrote:

> Something I just want to throw out into the discussion: Since you're using
> table-per-class, having a @Table annotation on AbstractContainer doesn't do
> anything since abstract classes can't have instances. Tables are only
> generated for abstract classes if you're using a JOINED inheritance
> strategy. You might want to look at using the MappedSuperclass annotation
> for the abstract base class instead. If I change the AbstractContainer def
> to:
>
> @MappedSuperclass
> public abstract class AbstractContainer implements java.io.Serializable {
>
> and then modify MySampleFuContainer to:
>
> public class MySampleFuContainer extends AbstractContainer {
>
> then I seem to get the proper schema:
>
> create table lingo_production.MySampleFuContainer_table (
> id varchar(255) not null,
> uuid varchar(255),
> mysamplingmumble__idSuper varchar(255),
> primary key (id),
> unique (uuid)
> );
>
>
> Having said that, I think that the behavior you're currently seeing appears
> to be a bug.
>
> Derek
>
>
> On Mon, Jun 22, 2009 at 3:43 PM, Meredith Gregory <
> lgreg.mered...@gmail.com> wrote:
>
>> Kris,
>>
>> Here <http://svn.biosimilarity.com/src/open/codesamples/trunk/hibernate/>is 
>> a link to the self-contained example that now uses just Java. i included
>> the target dir in the repo to speed up investigation, but you can just blow
>> that away and build from scratch. The example is currently written to
>> Java1.6, but also exhibits the same behavior under Java1.5. To run the
>> example
>>
>> > svn co
>> http://svn.biosimilarity.com/src/open/codesamples/trunk/hibernate
>> ...
>> > env PATH=:$PATH JAVA_HOME= mvn clean
>> compile process-classes
>>
>> If you switch comment and decl at line 22 in
>> src/main/java/maxb/hbex2/MySampleFuContainer.java then you see the error.
>> The schema goes from
>>
>> create table lingo_production.MySampleFuContainer_table (
>> id_AbstractContainer varchar(255) not null,
>> varchar(255) not null,
>> uuid varchar(255),
>> mysamplingmumble__idSuper varchar(255),
>> primary key (id),
>> unique (uuid)
>> );
>>
>> to
>>
>> create table lingo_production.MySampleFuContainer_table (
>> id_AbstractContainer varchar(255) not null,
>> id varchar(255),
>> mysamplingmumble_ tinyblob,
>> uuid varchar(255),
>> primary key (id_AbstractContainer),
>> unique (id_AbstractContainer)
>> );
>>
>> Best wishes,
>>
>> --greg
>>
>>
>> On Mon, Jun 22, 2009 at 1:38 PM, Meredith Gregory <
>> lgreg.mered...@gmail.com> wrote:
>>
>>> Kris,
>>>
>>> Thanks for the suggestion. i've now got a tiny little example that
>>> compiles on its own that illustrates the problem. Changing the inheritance
>>> strategy to JOINED makes no difference. Hibernate still does the wrong
>>> thing.
>>>
>>> Best wishes,
>>>
>>> --greg
>>>
>>>
>>> On Mon, Jun 22, 2009 at 8:55 AM, Kris Nuttycombe <
>>> kris.nuttyco...@gmail.com> wrote:
>>>
>>>> This may be off the mark, but I'm wondering if the reason that you're
>>>> having difficulty with the parallel inheritance hierarchy problem is
>>>> not your use of TABLE_PER_CLASS inheritance. In my application, I have
>>>> a similar construct, but I am using JOINED_TABLE inheritance. This
>>>> allows for a normal foreign key relationship to be created in the
>>>> database between C2_table and the base table for CThing, with the
>>>> result that Hibernate will generate the query for CThing member as a
>>>> union. Using table per class inheritance, I would expect Hibernate to
>>>> need to synthesize an additional dtype field in C2_table along with
>>>> the key column in order to enforce the uniqueness of the keys to the
>>>> joined entities, and I don't believe that it does this.
>>>>
>>>> I'm not sure how the fact that the code is generated is particularly
>>>> rele

[Lift] Re: [scala] JPA question

2009-06-22 Thread Meredith Gregory
Kris,

Here <http://svn.biosimilarity.com/src/open/codesamples/trunk/hibernate/> is
a link to the self-contained example that now uses just Java. i included the
target dir in the repo to speed up investigation, but you can just blow that
away and build from scratch. The example is currently written to Java1.6,
but also exhibits the same behavior under Java1.5. To run the example

> svn co http://svn.biosimilarity.com/src/open/codesamples/trunk/hibernate
...
> env PATH=:$PATH JAVA_HOME= mvn clean
compile process-classes

If you switch comment and decl at line 22 in
src/main/java/maxb/hbex2/MySampleFuContainer.java then you see the error.
The schema goes from

create table lingo_production.MySampleFuContainer_table (
id_AbstractContainer varchar(255) not null,
varchar(255) not null,
uuid varchar(255),
mysamplingmumble__idSuper varchar(255),
primary key (id),
unique (uuid)
);

to

create table lingo_production.MySampleFuContainer_table (
id_AbstractContainer varchar(255) not null,
id varchar(255),
mysamplingmumble_ tinyblob,
uuid varchar(255),
primary key (id_AbstractContainer),
unique (id_AbstractContainer)
);

Best wishes,

--greg

On Mon, Jun 22, 2009 at 1:38 PM, Meredith Gregory
wrote:

> Kris,
>
> Thanks for the suggestion. i've now got a tiny little example that compiles
> on its own that illustrates the problem. Changing the inheritance strategy
> to JOINED makes no difference. Hibernate still does the wrong thing.
>
> Best wishes,
>
> --greg
>
>
> On Mon, Jun 22, 2009 at 8:55 AM, Kris Nuttycombe <
> kris.nuttyco...@gmail.com> wrote:
>
>> This may be off the mark, but I'm wondering if the reason that you're
>> having difficulty with the parallel inheritance hierarchy problem is
>> not your use of TABLE_PER_CLASS inheritance. In my application, I have
>> a similar construct, but I am using JOINED_TABLE inheritance. This
>> allows for a normal foreign key relationship to be created in the
>> database between C2_table and the base table for CThing, with the
>> result that Hibernate will generate the query for CThing member as a
>> union. Using table per class inheritance, I would expect Hibernate to
>> need to synthesize an additional dtype field in C2_table along with
>> the key column in order to enforce the uniqueness of the keys to the
>> joined entities, and I don't believe that it does this.
>>
>> I'm not sure how the fact that the code is generated is particularly
>> relevant; surely if it's possible to hand-write a successful solution,
>> then your code generator could be made aware of how to construct a
>> viable solution?
>>
>> Kris
>>
>> On Fri, Jun 19, 2009 at 8:47 PM, Meredith
>> Gregory wrote:
>> > All,
>> >
>> > i had a similar problem and found the source of the issues. Spse you
>> have a
>> > container hierarchy (CTop <- C2) side-by-side with a contained hierarchy
>> > (CThing <- CThing1). The inheritance at the top of the container
>> hierarchy,
>> > CTop, causes hibernate to bail on tracking the relations and punt to
>> > embedded values instead. Rewriting the top to be a @MappedSuperClass
>> fixes
>> > the problem in this specific case. However, if your hierarchy is deep,
>> > you're screwed.
>> >
>> > If anybody has a suggestion for a workaround, i'm all ears. The problem
>> is
>> > that it would appear that both Mr Crowley and i are generating Java +
>> JPA
>> > code. So, the solution needs to be algorithmic and not 1-off.
>> >
>> > Perhaps the best solution is to find an alternative to hibernate as this
>> is
>> > a particularly irritating bug.
>> >
>> > Best wishes,
>> >
>> > --greg
>> >
>> > @Entity
>> > @Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
>> > abstract class CTop {
>> >...
>> >@Id
>> > @GeneratedValue(generator = "system-uuid")
>> > @GenericGenerator(name = "system-uuid", strategy = "uuid")
>> > private String id_CTop;
>> > }
>> >
>> > @Entity
>> > @Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
>> > abstract class CThing {
>> >...
>> >@Id
>> > @GeneratedValue(generator = "system-uuid")
>> > @GenericGenerator(name = "system-uuid", strategy = "uuid")
>> > private String id_CThing;
>> > }
>> >
>> >

[Lift] Re: [scala] JPA question

2009-06-22 Thread Meredith Gregory
Kris,

Thanks for the suggestion. i've now got a tiny little example that compiles
on its own that illustrates the problem. Changing the inheritance strategy
to JOINED makes no difference. Hibernate still does the wrong thing.

Best wishes,

--greg

On Mon, Jun 22, 2009 at 8:55 AM, Kris Nuttycombe
wrote:

> This may be off the mark, but I'm wondering if the reason that you're
> having difficulty with the parallel inheritance hierarchy problem is
> not your use of TABLE_PER_CLASS inheritance. In my application, I have
> a similar construct, but I am using JOINED_TABLE inheritance. This
> allows for a normal foreign key relationship to be created in the
> database between C2_table and the base table for CThing, with the
> result that Hibernate will generate the query for CThing member as a
> union. Using table per class inheritance, I would expect Hibernate to
> need to synthesize an additional dtype field in C2_table along with
> the key column in order to enforce the uniqueness of the keys to the
> joined entities, and I don't believe that it does this.
>
> I'm not sure how the fact that the code is generated is particularly
> relevant; surely if it's possible to hand-write a successful solution,
> then your code generator could be made aware of how to construct a
> viable solution?
>
> Kris
>
> On Fri, Jun 19, 2009 at 8:47 PM, Meredith
> Gregory wrote:
> > All,
> >
> > i had a similar problem and found the source of the issues. Spse you have
> a
> > container hierarchy (CTop <- C2) side-by-side with a contained hierarchy
> > (CThing <- CThing1). The inheritance at the top of the container
> hierarchy,
> > CTop, causes hibernate to bail on tracking the relations and punt to
> > embedded values instead. Rewriting the top to be a @MappedSuperClass
> fixes
> > the problem in this specific case. However, if your hierarchy is deep,
> > you're screwed.
> >
> > If anybody has a suggestion for a workaround, i'm all ears. The problem
> is
> > that it would appear that both Mr Crowley and i are generating Java + JPA
> > code. So, the solution needs to be algorithmic and not 1-off.
> >
> > Perhaps the best solution is to find an alternative to hibernate as this
> is
> > a particularly irritating bug.
> >
> > Best wishes,
> >
> > --greg
> >
> > @Entity
> > @Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
> > abstract class CTop {
> >...
> >@Id
> > @GeneratedValue(generator = "system-uuid")
> > @GenericGenerator(name = "system-uuid", strategy = "uuid")
> > private String id_CTop;
> > }
> >
> > @Entity
> > @Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
> > abstract class CThing {
> >...
> >@Id
> > @GeneratedValue(generator = "system-uuid")
> > @GenericGenerator(name = "system-uuid", strategy = "uuid")
> > private String id_CThing;
> > }
> >
> > @Entity
> > @Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
> > @Table(name = "C2_table", catalog = "mydb_production", uniqueConstraints
> = {
> > @UniqueConstraint(columnNames = "uuid") })
> > class C2 extends CTop {
> >CThing thing;
> > ...
> >   @OneToOne
> > @JoinColumn
> > public CThing getThing() {
> > return this.thing;
> > }
> > public void setThing( CThing thing ) {
> > this.thing = thing;
> > }
> >
> > @Column(name = "uuid", unique = false, nullable = true, insertable =
> true,
> > updatable = true)
> > public String getUuid() {
> > return this.uuid;
> > }
> >
> > public void setUuid(String uuid) {
> > this.uuid = uuid;
> > }
> >
> > @Id
> > @GeneratedValue(generator = "system-uuid")
> > @GenericGenerator(name = "system-uuid", strategy = "uuid")
> > @Column(name = "id", unique = false, nullable = true, insertable =
> true,
> > updatable = true)
> > public String getId() {
> > return this.id;
> > }
> >
> > }
> >
> > @Entity
> > @Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
> > @Table(name = "CThing1_table", catalog = "mydb_production",
> > uniqueConstraints = { @UniqueConstraint(columnNames = "uuid") })
> > class CThing1 extends CThing {
> > ...
> >   // lots of ground type fields
> >
>

[Lift] Re: JPA and auto generation of id

2009-06-22 Thread Meredith Gregory
David,

i recently ran into an issue that smells exactly like this. For hibernate i
had to do the following:

@Id
@GeneratedValue(){generator = "system-uuid"}
@GenericGenerator(){name = "system-uuid", strategy = "uuid"}

This is hibernate specific. This was for an Id property that was typed
String.

Best wishes,

--greg

On Mon, Jun 22, 2009 at 2:08 AM, David Persons  wrote:

>
> Hello guys,
>
> I get a org.hibernate.exception.SQLGrammarException: could not get or
> update next value error everytime I try to save the following Entity:
>
> @Entity
> class Scene {
>  @Id
>  @GeneratedValue(){val strategy = GenerationType.AUTO}
>  var id : Long = _
>
>  @Column{val unique = true, val nullable = false}
>  var ordering : Int = _
>
>  @Column{val unique = true, val nullable = false}
>  var name : String = ""
>
>  @ManyToOne{val optional = false}
>  var storyBoard : StoryBoard = _
> }
>
> What am I doing wrong??
>
> grtz,
> David Persons
>
> >
>


-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: interaction with hibernate crowd?

2009-06-18 Thread Meredith Gregory
Derek, Kris,

Thanks. The problem is more subtle. i have modified my code emitter to not
mark the field as final and to add the setter. i still get the same problem.
However, i've got sample code derived from the emitted code that generates
the correct schema. That is the key is used, not a tinyblob.

Best wishes,

--greg

On Thu, Jun 18, 2009 at 3:07 PM, Derek Chen-Becker wrote:

> Is this final field something that is intended to be retrieved from the DB?
> As far as I know, JPA doesn't support final fields, period. If this getter
> is really just wrapping something else, it should be marked as @Transient.
>
> Derek
>
>
> On Thu, Jun 18, 2009 at 4:09 PM, Meredith Gregory <
> lgreg.mered...@gmail.com> wrote:
>
>> Viktor,
>>
>> i finally got someone on the hibernate IRC channel to take a look at the
>> problem. He claims that if he removes the final declarator from a field for
>> which i have only a getter and then adds a setter hibernate works as
>> advertised. i will test this out. If no joy i might take you up on your kind
>> offer.
>>
>> Best wishes,
>>
>> --greg
>>
>>
>> On Thu, Jun 18, 2009 at 1:10 PM, Viktor Klang wrote:
>>
>>> Gregory, send the available debug info regarding the suspected defect and
>>> I'll see what I can do.
>>>
>>> Viktor,Rogue Software Architect
>>>
>>> 18 jun 2009 kl. 21.24 Meredith Gregory  skrev:
>>>
>>> Lifted and Scalata,
>>>
>>> Has anyone had any joy engaging the hibernate crowd? i've been trying
>>> every channel i can to get someone in the hibernate know to take a look at
>>> what i believe is a bug and no one even responds at all.
>>>
>>> Best wishes,
>>>
>>> --greg
>>>
>>> --
>>> L.G. Meredith
>>> Managing Partner
>>> Biosimilarity LLC
>>> 1219 NW 83rd St
>>> Seattle, WA 98117
>>>
>>> +1 206.650.3740
>>>
>>> <http://biosimilarity.blogspot.com>http://biosimilarity.blogspot.com
>>>
>>>
>>>
>>>
>>>
>>
>>
>> --
>> L.G. Meredith
>> Managing Partner
>> Biosimilarity LLC
>> 1219 NW 83rd St
>> Seattle, WA 98117
>>
>> +1 206.650.3740
>>
>> http://biosimilarity.blogspot.com
>>
>>
>>
>
> >
>


-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: interaction with hibernate crowd?

2009-06-18 Thread Meredith Gregory
All,

Can anyone recommend an alternative to hibernate for a JPA implementation?
i've been stuck on this bug for several days, now; i need to move on.

Best wishes,

--greg

On Thu, Jun 18, 2009 at 2:09 PM, Meredith Gregory
wrote:

> Viktor,
>
> i finally got someone on the hibernate IRC channel to take a look at the
> problem. He claims that if he removes the final declarator from a field for
> which i have only a getter and then adds a setter hibernate works as
> advertised. i will test this out. If no joy i might take you up on your kind
> offer.
>
> Best wishes,
>
> --greg
>
>
> On Thu, Jun 18, 2009 at 1:10 PM, Viktor Klang wrote:
>
>> Gregory, send the available debug info regarding the suspected defect and
>> I'll see what I can do.
>>
>> Viktor,Rogue Software Architect
>>
>> 18 jun 2009 kl. 21.24 Meredith Gregory  skrev:
>>
>> Lifted and Scalata,
>>
>> Has anyone had any joy engaging the hibernate crowd? i've been trying
>> every channel i can to get someone in the hibernate know to take a look at
>> what i believe is a bug and no one even responds at all.
>>
>> Best wishes,
>>
>> --greg
>>
>> --
>> L.G. Meredith
>> Managing Partner
>> Biosimilarity LLC
>> 1219 NW 83rd St
>> Seattle, WA 98117
>>
>> +1 206.650.3740
>>
>> <http://biosimilarity.blogspot.com>http://biosimilarity.blogspot.com
>>
>>
>>
>> >>
>>
>
>
> --
> L.G. Meredith
> Managing Partner
> Biosimilarity LLC
> 1219 NW 83rd St
> Seattle, WA 98117
>
> +1 206.650.3740
>
> http://biosimilarity.blogspot.com
>



-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: interaction with hibernate crowd?

2009-06-18 Thread Meredith Gregory
Viktor,

i finally got someone on the hibernate IRC channel to take a look at the
problem. He claims that if he removes the final declarator from a field for
which i have only a getter and then adds a setter hibernate works as
advertised. i will test this out. If no joy i might take you up on your kind
offer.

Best wishes,

--greg

On Thu, Jun 18, 2009 at 1:10 PM, Viktor Klang wrote:

> Gregory, send the available debug info regarding the suspected defect and
> I'll see what I can do.
>
> Viktor,Rogue Software Architect
>
> 18 jun 2009 kl. 21.24 Meredith Gregory  skrev:
>
> Lifted and Scalata,
>
> Has anyone had any joy engaging the hibernate crowd? i've been trying every
> channel i can to get someone in the hibernate know to take a look at what i
> believe is a bug and no one even responds at all.
>
> Best wishes,
>
> --greg
>
> --
> L.G. Meredith
> Managing Partner
> Biosimilarity LLC
> 1219 NW 83rd St
> Seattle, WA 98117
>
> +1 206.650.3740
>
> <http://biosimilarity.blogspot.com>http://biosimilarity.blogspot.com
>
>
>
> >
>


-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] interaction with hibernate crowd?

2009-06-18 Thread Meredith Gregory
Lifted and Scalata,

Has anyone had any joy engaging the hibernate crowd? i've been trying every
channel i can to get someone in the hibernate know to take a look at what i
believe is a bug and no one even responds at all.

Best wishes,

--greg

-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[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
Viktor<http://svn.biosimilarity.com/src/open/talks/MonadicDesignPatternsForTheWeb.pdf>.
Part of the reason i was excited that Jonas took on to make the JTA wrapper
monadic is that it composes perfectly with the ideas explained in the deck.
These ideas dovetail perfectly with the DSL stuff i've been working on.

My feeling is that we are at a point where things could really start to
happen. The ideas are 'in the air' so to speak.

Best wishes,

--greg

2009/6/17 Oliver Lambert 

>
>
> 2009/6/18 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.
>>
>> I think if we were all 20X (or 2X) smarter than you, we would have taken
> over Google by now.
>
>>
>>-
>>- And also, help is always available, if there is something specific
>>you don't understand, let me know and i will do my best to convey it to 
>> you.
>>
>> As suggested by another kind person, I may have to start by going back to
> (an American?) school.
>
> Heres a question, why should I care about Monad's when they are already in
> OO, just not called Monads?
>
>
>>
>>-
>>
>> Best wishes,
>>
>> --greg
>>
>> P.S. Here is a version of the paragraph with links to useful bits of lore
>> from the literature.
>>
>> For myself, i was unhappy with the notion of name. The 
>> π-calculi<http://en.wikipedia.org/wiki/Pi-calculus>and lambda
>> calculi <http://en.wikipedia.org/wiki/Lambda_calculus> suffer a
>> dependence on a notion of name. Both families of calculi require at least 
>> countably
>> infinitely <http://en.wikipedia.org/wiki/Countable> many 
>> names<http://www.cs.nps.navy.mil/research/languages/statements/gordon.html>,
>> and a notion of equality on names. If names have no internal structure then
>> these theories *cannot be 
>> effective<http://en.wikipedia.org/wiki/Computable_function>
>> *. The reasons is that the notion of equality must then be realized as an
>> infinitary table which cannot fit in any computer we have access to.
>> Therefore, in effective theories, names must have internal structure. Since
>> they have internal structure and are at least countably infinite, one is in
>> danger of undermining the foundational character of these proposals for
>> computing. Therefore, the only possible solution is that the notion of
>> structured name must come from the notion of program proposed by the model.
>> This argument is airtight. If you want a foundational model of computing
>> with nominal structure, the nominal structure must derive from the notion of
>> computation being put forward, i.e. it must *reflect* the notion of
>> computation<http://svn.biosimilarity.com/src/open/papers/trunk/concurrency/rho/ex_nihilo_entcs/ex_nihilo_finco.pdf>.
>> This gives rise to all kinds of new an beautiful phenomena. One measure of
>> your way into compositional thinking is whether this is happening. Is your
>> approach to compositional thinking beginning to yield whole new aspects of
>> computing, and new 'wholes' of computation, new forms of organization.
>>
>>
>> 2009/6/16 Oliver Lambert 
>>
>>
>>>
>>> 2009/6/17 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 know the data making up a distributive law between
>>>>   monads
>>>>   - use them in real world applications and see where they fail
>>>>   - when is calculating the least/greatest fixpoint of a recursive
>>>>   spec for a problem the suboptimal solution
>>>>   - when is a monad not the answer
>>>>   - when is an indexed form of composition inadequate
>>>>   - improve them
>>>>   - is it a situational improvement or
>>>>   - a fundamental improvement
>>>> 

[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
Wobegon<http://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 of which, i think David's goat rodeo ideas fit pretty well with
some ideas i've been working on regarding a uniform approach to data. This
takes the whole LINQ idea up a couple of notches. To see what i mean, take a
look at the slides for a recent talk i
gave<http://svn.biosimilarity.com/src/open/talks/MonadicDesignPatternsForTheWeb.pdf>.
Comments (peanuts, rotten tomatoes...) would be most welcome.

Best wishes,

--greg

P.S. Oliver's sincere question compelled me to respond with my own best
understanding of the topic.

2009/6/18 Viktor Klang 

> I yield to your superiority.
> Seriously.
>
>
> 2009/6/18 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 appropriately
>> parametric notion of symmetry. Groups give an exceptionally well abstracted
>> account of symmetry. Monads give an exceptionally well abstracted notion of
>> composition. This is a lot easier to see in the Category Theoretic
>> presentation.
>>
>> A monad <http://en.wikipedia.org/wiki/Monad_%28category_theory%29> is
>> presented by three pieces of data:
>>
>>- An endofunctor <http://en.wikipedia.org/wiki/Functor> M : C -> C
>>(intuitively, think of M as a parametric type constructor and C as the
>>universe of types and maps)
>>- A natural 
>> transformation<http://en.wikipedia.org/wiki/Natural_transformation>unit: Id 
>> -> M -- this is a higher-order critter: it takes maps to maps; but
>>i'll give you a metaphor in just a moment.
>>- A natural transformation mult: M^2 -> M
>>
>> One picture you can have in your mind is M is a kind of "box" factory.
>> Then unit says how you can put things into a box, and mult says how you can
>> flatten nested boxes into an ordinary box (this is the origins of flatMap in
>> Scala's presentation). Another way of understanding this is that M is a kind
>> of higher-order compositor, i.e. a way of combining things just like
>> multiplication, as in a*b, is a way of combining things. Then the unit is
>> the analog of having a unit for your multiplication and mult is the analog
>> of an associativity law ( a*(b*c) = (a*b)*c ). These line up with the box
>> analogy more easily if you write things with prefix notation instead of
>> infix notation.
>>
>>- Let's write {*| a, b |*} instead of a*b. The reason we adopt this
>>more verbose notation is that we can note the different kind of boxes with
>>the 'color' of the braces. M-colored braces, {M| a, b |M}, are associated
>>with an M-box.
>>- Then unit( a ) = {M| a |M}, it puts a in an M-box. This has an
>>alternate presentation of the form {M| |M}.{M| a |M} = {M| a |M}. i 
>> mention
>>it to point out the analogy with the binary operation _*_, but it muddies
>>the water a little with begging the question about the _._. So, i will 
>> just
>>leave it -- without explanation -- for you to explore.
>>- And mult( {M| {M| a11, ..., a1J |M} ... {M| aI1, ... aIJ' |M} |M} )
>>= {M| a11, ..., aIJ' |M}. It tells you how to canonically flatten M-boxes.
>>This functions as an association because if boxes canonically flatten, 
>> then
>>{M| a, {M| b, c |M} |M} = {M| a, b, c |M} = {M| {M| a, b |M}, c |M}.
>>
>>
>> The apparent lexical connection between this way of thinking about things
>> and XML *is not accidental*. Monads can be viewed as colored braces, aka
>> matched tags. Monads are a semantical creature that presents syntactically
>> like XML.
>>
>> This way of thinking about things is really different from objects. To be
>> sure, there are notions of objects that are universal and so can be made to
>> fit or encode just about anything; but, that doesn't mean the encodings are
>> nice, or scalable or maintainable. You have only to to look at something
>> like LINQ -- which is really just a presentation of monads -- to see just
>> how flexible and yet compact the monadic way of structuring composition is.
>> Specifi

[Lift] take a lift to the opera for a better performance?

2009-06-17 Thread Meredith Gregory
Lifted,

Has anyone played with Opera's Unite? i tried it out, today and was
disappointed by the performance of their chat service/lounge. i was running
over a network that is notoriously slow, but google chat between yvr and sfo
was beating the pants off what i was getting from the machine to itself
opera <-> safari.

i was wondering if it might be possible to inject lift into the opera mix at
a level where you might see some performance improvement. As it stands,
their out of the box perf is so bad i can't believe they released when they
did. i think it will hurt adoption.

Best wishes,

--greg

-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[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 appropriately
parametric notion of symmetry. Groups give an exceptionally well abstracted
account of symmetry. Monads give an exceptionally well abstracted notion of
composition. This is a lot easier to see in the Category Theoretic
presentation.

A monad <http://en.wikipedia.org/wiki/Monad_%28category_theory%29> is
presented by three pieces of data:

   - An endofunctor <http://en.wikipedia.org/wiki/Functor> M : C -> C
   (intuitively, think of M as a parametric type constructor and C as the
   universe of types and maps)
   - A natural 
transformation<http://en.wikipedia.org/wiki/Natural_transformation>unit:
Id -> M -- this is a higher-order critter: it takes maps to maps; but
   i'll give you a metaphor in just a moment.
   - A natural transformation mult: M^2 -> M

One picture you can have in your mind is M is a kind of "box" factory. Then
unit says how you can put things into a box, and mult says how you can
flatten nested boxes into an ordinary box (this is the origins of flatMap in
Scala's presentation). Another way of understanding this is that M is a kind
of higher-order compositor, i.e. a way of combining things just like
multiplication, as in a*b, is a way of combining things. Then the unit is
the analog of having a unit for your multiplication and mult is the analog
of an associativity law ( a*(b*c) = (a*b)*c ). These line up with the box
analogy more easily if you write things with prefix notation instead of
infix notation.

   - Let's write {*| a, b |*} instead of a*b. The reason we adopt this more
   verbose notation is that we can note the different kind of boxes with the
   'color' of the braces. M-colored braces, {M| a, b |M}, are associated with
   an M-box.
   - Then unit( a ) = {M| a |M}, it puts a in an M-box. This has an
   alternate presentation of the form {M| |M}.{M| a |M} = {M| a |M}. i mention
   it to point out the analogy with the binary operation _*_, but it muddies
   the water a little with begging the question about the _._. So, i will just
   leave it -- without explanation -- for you to explore.
   - And mult( {M| {M| a11, ..., a1J |M} ... {M| aI1, ... aIJ' |M} |M} ) =
   {M| a11, ..., aIJ' |M}. It tells you how to canonically flatten M-boxes.
   This functions as an association because if boxes canonically flatten, then
   {M| a, {M| b, c |M} |M} = {M| a, b, c |M} = {M| {M| a, b |M}, c |M}.


The apparent lexical connection between this way of thinking about things
and XML *is not accidental*. Monads can be viewed as colored braces, aka
matched tags. Monads are a semantical creature that presents syntactically
like XML.

This way of thinking about things is really different from objects. To be
sure, there are notions of objects that are universal and so can be made to
fit or encode just about anything; but, that doesn't mean the encodings are
nice, or scalable or maintainable. You have only to to look at something
like LINQ -- which is really just a presentation of monads -- to see just
how flexible and yet compact the monadic way of structuring composition is.
Specifically, both set-comprehension notation and SELECT-FROM-WHERE, when
interpreted polymorphically, provide a natural representation of the monad.

   - { pattern | t1 <- generator1, ..., tn <- generatorN, constraint1, ...,
   constraintK }
   - SELECT pattern FROM generator WHERE constraint

Those to pieces of computational machinery have very simple, and natural
mappings to the monad operations. You will win if you work these out for
yourself. Phil Wadler has excellent papers to provide cheat sheets. The
Scala for-comprehension and the corresponding operations of map, flatMap and
filter are also excellent cheat sheets. But, you get the joy if you work
this out for yourself.

Best wishes,

--greg

2009/6/17 Oliver Lambert 

>
>
> 2009/6/18 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.
>>
>> I think if we were all 20X (or 2X) smarter than you, we would have taken
> over Google by now.
>
>>
>>- And also, help is always available, if there is something specific
>>you don't understand, let me know and i will do my best to convey it to 
>> you.
>>
>> As suggested by another kind person, I may have to start by going back to
> (an American?) school.
>
> Heres a question, why should I c

[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  wrote:

>
> >>  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?
>
>
> >
>


-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[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 you
   don't understand, let me know and i will do my best to convey it to you.

Best wishes,

--greg

P.S. Here is a version of the paragraph with links to useful bits of lore
from the literature.

For myself, i was unhappy with the notion of name. The
π-calculi<http://en.wikipedia.org/wiki/Pi-calculus>and lambda
calculi <http://en.wikipedia.org/wiki/Lambda_calculus> suffer a dependence
on a notion of name. Both families of calculi require at least countably
infinitely <http://en.wikipedia.org/wiki/Countable> many
names<http://www.cs.nps.navy.mil/research/languages/statements/gordon.html>,
and a notion of equality on names. If names have no internal structure then
these theories *cannot be
effective<http://en.wikipedia.org/wiki/Computable_function>
*. The reasons is that the notion of equality must then be realized as an
infinitary table which cannot fit in any computer we have access to.
Therefore, in effective theories, names must have internal structure. Since
they have internal structure and are at least countably infinite, one is in
danger of undermining the foundational character of these proposals for
computing. Therefore, the only possible solution is that the notion of
structured name must come from the notion of program proposed by the model.
This argument is airtight. If you want a foundational model of computing
with nominal structure, the nominal structure must derive from the notion of
computation being put forward, i.e. it must *reflect* the notion of
computation<http://svn.biosimilarity.com/src/open/papers/trunk/concurrency/rho/ex_nihilo_entcs/ex_nihilo_finco.pdf>.
This gives rise to all kinds of new an beautiful phenomena. One measure of
your way into compositional thinking is whether this is happening. Is your
approach to compositional thinking beginning to yield whole new aspects of
computing, and new 'wholes' of computation, new forms of organization.


2009/6/16 Oliver Lambert 

>
>
> 2009/6/17 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 know the data making up a distributive law between monads
>>   - use them in real world applications and see where they fail
>>   - when is calculating the least/greatest fixpoint of a recursive
>>   spec for a problem the suboptimal solution
>>   - when is a monad not the answer
>>   - when is an indexed form of composition inadequate
>>   - improve them
>>   - is it a situational improvement or
>>   - a fundamental improvement
>>   - see where the very programming model itself fails
>>   - is functional composition the only sort of composition
>>   - how is parallel composition like functional composition
>>   - is parallel composition easily represented in categorical
>>   composition
>>   - improve it
>>   - what is the view of the world in your notion of composition
>>   - play with new programming models
>>   - does your new notion of composition give rise to a whole
>>   generation of different models
>>   - invent new idioms in these models
>>   - what are the things these models naturally express
>>   - and teach them to someone who wishes to bootstrap thinking
>>compositionally
>>
>> For myself, i was unhappy with the notion of name. The π-calculi and
>> lambda calculi suffer a dependence on a notion of name. Both families of
>> calculi require at least countably infinitely many names, and a notion of
>> equality on names. If names have no internal structure then these theories
>> *cannot be effective*.
>
>
> Do we need to do some sort of course to understand this language?
>
>
>> The reasons is that the notion of equality must then be realized as an
>> infinitary table which cannot fit in any computer we have access to.
>> Therefore, in effective theories, names must have internal structure. Since
>> they have internal structure and are at least countably infinite, one is in
>> danger of undermining the foundational character of these proposals for
>> computing. Therefore, the only possible solution is that the notion of
>> structure

[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 know the data making up a distributive law between monads
  - use them in real world applications and see where they fail
  - when is calculating the least/greatest fixpoint of a recursive spec
  for a problem the suboptimal solution
  - when is a monad not the answer
  - when is an indexed form of composition inadequate
  - improve them
  - is it a situational improvement or
  - a fundamental improvement
  - see where the very programming model itself fails
  - is functional composition the only sort of composition
  - how is parallel composition like functional composition
  - is parallel composition easily represented in categorical
  composition
  - improve it
  - what is the view of the world in your notion of composition
  - play with new programming models
  - does your new notion of composition give rise to a whole generation
  of different models
  - invent new idioms in these models
  - what are the things these models naturally express
  - and teach them to someone who wishes to bootstrap thinking
   compositionally

For myself, i was unhappy with the notion of name. The π-calculi and lambda
calculi suffer a dependence on a notion of name. Both families of calculi
require at least countably infinitely many names, and a notion of equality
on names. If names have no internal structure then these theories *cannot be
effective*. The reasons is that the notion of equality must then be realized
as an infinitary table which cannot fit in any computer we have access to.
Therefore, in effective theories, names must have internal structure. Since
they have internal structure and are at least countably infinite, one is in
danger of undermining the foundational character of these proposals for
computing. Therefore, the only possible solution is that the notion of
structured name must come from the notion of program proposed by the model.
This argument is airtight. If you want a foundational model of computing
with nominal structure, the nominal structure must derive from the notion of
computation being put forward, i.e. it must *reflect* the notion of
computation. This gives rise to all kinds of new an beautiful phenomena. One
measure of your way into compositional thinking is whether this is
happening. Is your approach to compositional thinking beginning to yield
whole new aspects of computing, and new 'wholes' of computation, new forms
of organization.

Best wishes,

--greg

On Tue, Jun 16, 2009 at 7:31 PM, Jeremy Day  wrote:

> Greg,
>
> On Tue, Jun 16, 2009 at 6:38 PM, Meredith Gregory <
> lgreg.mered...@gmail.com> wrote:
>
>> 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
> it's all too easy to fall into procedural patterns when learning or working
> with functional programming in a multi-paradigm language.  But what are good
> ways for programmers to learn to think compositionally and, more
> importantly, practice?  Do you know of any books or online references that
> might help make the transition for anyone who is interested?
>
> Jeremy
>
> >
>


-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[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,


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. They don't
think about solutions that are composed of ... (wait for it)... solutions!
It takes some serious training to think compositionally. Compositional
solutions, however, are the only realistic way to scale. When solutions are
compositional, you can *de*compose. The db example is a case in point. One
of the most natural ways to scale data access is sharding and partitioning
-- which requires upfront machinery to support decomposition of the store.

Lest you feel bad, note that some of the best scientific minds of all time
have fallen prey to this blind spot. Newtonian physics as well as Einstein's
update to Newton's proposal is a non-compositional solution. Quantum
mechanics also exhibits compositional failures. This is why physics is
failing to find proposals that link theories of gravitation (essentially
large scale) to quantum mechanical theories of the other forces (essentially
very small scale) -- the physical theories are non-compositional -- they
don't scale!

One of the real things functional programming has going for it is that the
basic model of computation underlying the means of structuring and
manipulating programs is compositional. That's why it is important to have a
technology like Scala resting atop the incumbent execution model (JVM) being
deployed on web-scale problems. Compositionality is the only way to tackle
applications at global scale.


Thanks for getting the fix to this problem in so quickly.

Best wishes,

--greg

On Tue, Jun 16, 2009 at 11:53 AM, Derek Chen-Becker
wrote:

> Using multiple EMs was not something I had considered when I wrote this. I
> think that I can modify the code to provide a __nameSalt def to
> differentiate instances. Let me work on it and I'll have something soon.
>
> Derek
>
>
> On 6/16/09, Jean-Luc  wrote:
>>
>> 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 are made using the singleton emVar.
>> => trait RequestVarEM allow only one connection to a database within the
>> same HttpRequest context.
>>
>>
>> Jean-Luc
>>
>> 2009/6/15 Jean-Luc 
>>
>>>  Hello,
>>>
>>> I have two databases, db1 (a.k.a. Motorbike) and db2 (a.k.a. Motorway)
>>> defined with RequestVarEM :
>>> - object ModelDb1 extends LocalEMF("db1") with RequestVarEM  // Motorbike
>>> database
>>> - object ModelDb2 extends LocalEMF("db2") with RequestVarEM  // Motorway
>>> database
>>>
>>> I thought one could access to any databases independently from any
>>> snippet as long as the correct Model object were used (ModelDb1 or ModelDb2
>>> for exemple) ; but when I access both databases from the same page, the
>>> second database access issues a "Named query not found" exception.
>>>
>>> I have two snippets, one to display a list of "motorbike", another to
>>> display a list of "motorway" :
>>> - page1 :
>>> ModelDb1.createNamedQuery[Motorbike]("Motorbike.findAll).getResultList() =>
>>> ok
>>> - page2
>>> : ModelDb2.createNamedQuery[Motorway]("Motorway.findAll).getResultList() =>
>>> ok
>>> - page3 : calling from page 3 motorbike & motorway snippets : Named query
>>> not found: Motorway.findAll
>>> - page4 : calling from page 4 motorway & motorbike snippets : Named query
>>> not found: Motorbike.findAll
>>> - page3 & changing the query of *Motorway* snippet :
>>>   - 
>>> ModelDb2.createNamedQuery[*Motorbike*]("*Motorbike*.findAll).getResultList()
>>> => it's ok and I do NOT have an exception !
>>>
>>> I joined a sample application, ...
>>>
>>> any idea about this issue ?
>>> (bad use of LocalEMF in the application code ? issue with LocalEMF or
>>> RequestVarEM ?)
>>>
>>> Jean-Luc
>>>
>>> PS :
>>> I don't know if it's related but I have this in the log :
>>> [INFO] Checking for multiple versions of scala
>>> [WARNING] Multiple versions of scala libraries detected!
>>>
>>>
>>> --
>>> Jean-Luc Canela
>>> jlcane...@gmail.com
>>>
>>
>>
>>
>> --
>> Jean-Luc Canela
>> jlcane...@gmail.com
>>
>>
>>
>
> >
>


-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~---

[Lift] Re: Wolfram Alpha integration for Lift

2009-06-12 Thread Meredith Gregory
Tim,

Thanks for the prompt. Can you point me to a description of what's possible
with W|A? i can put together a draft that you can then rev.

Best wishes,

--greg

On Fri, Jun 12, 2009 at 6:26 AM, Timothy Perrett wrote:

>
> Greg,
>
> If you have any thoughts on effective ways to model this query grammar
> id be interested in your thoughts :-)
>
> Cheers, Tim
>
> On Jun 11, 10:38 pm, Meredith Gregory 
> wrote:
> > All,
> >
> > Thanks for all this input. It certainly helps me see the value-prop
> better.
> >
> > Best wishes,
> >
> > --greg
> >
> > On Thu, Jun 11, 2009 at 2:07 PM, Kris Nuttycombe
> > wrote:
> >
> >
> >
> >
> >
> >
> >
> > > I sort of see Wolfram Alpha as simply an incredibly sophisticated
> > > calculator instead of an information discovery tool. What were you
> > > trying to compute about polyadic pi-calculus?
> >
> > > Alpha seems to be trying to put all sorts of different kinds of data
> > > into a common, hugely high-dimensional space so that you can perform
> > > computations on it, where your computations are expressed in a mix of
> > > mathematical and natural language. There are certainly a lot of things
> > > that it's not useful for yet, but it's a tremendously interesting
> > > problem.
> >
> > > Kris
> >
> > > On Thu, Jun 11, 2009 at 12:42 PM, Meredith
> > > Gregory wrote:
> > > > Tim,
> >
> > > > Thanks for the response. i'll have to noodle on that one. Off the top
> of
> > > my
> > > > head, i'm usually in this loop
> >
> > > > Initially, usually badly formulated question
> > > > Get information sources
> > > > Reformulate question
> > > > Loop
> >
> > > > So, i don't really see much difference between the two, except by
> use. i
> > > > will think about it, though.
> >
> > > > Best wishes,
> >
> > > > --greg
> >
> > --
> > L.G. Meredith
> > Managing Partner
> > Biosimilarity LLC
> > 1219 NW 83rd St
> > Seattle, WA 98117
> >
> > +1 206.650.3740
> >
> > http://biosimilarity.blogspot.com
> >
>


-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Wolfram Alpha integration for Lift

2009-06-11 Thread Meredith Gregory
All,

Thanks for all this input. It certainly helps me see the value-prop better.

Best wishes,

--greg

On Thu, Jun 11, 2009 at 2:07 PM, Kris Nuttycombe
wrote:

>
> I sort of see Wolfram Alpha as simply an incredibly sophisticated
> calculator instead of an information discovery tool. What were you
> trying to compute about polyadic pi-calculus?
>
> Alpha seems to be trying to put all sorts of different kinds of data
> into a common, hugely high-dimensional space so that you can perform
> computations on it, where your computations are expressed in a mix of
> mathematical and natural language. There are certainly a lot of things
> that it's not useful for yet, but it's a tremendously interesting
> problem.
>
> Kris
>
> On Thu, Jun 11, 2009 at 12:42 PM, Meredith
> Gregory wrote:
> > Tim,
> >
> > Thanks for the response. i'll have to noodle on that one. Off the top of
> my
> > head, i'm usually in this loop
> >
> > Initially, usually badly formulated question
> > Get information sources
> > Reformulate question
> > Loop
> >
> > So, i don't really see much difference between the two, except by use. i
> > will think about it, though.
> >
> > Best wishes,
> >
> > --greg
> >
>
> >
>


-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: lift stress tests and comet

2009-06-11 Thread Meredith Gregory
David,

Btw, i don't see a use of the Bayeux lib in lift, but want to double check
that it's not being used.

Best wishes,

--greg

On Thu, Jun 11, 2009 at 11:44 AM, Meredith Gregory  wrote:

> David,
>
> Many thanks for the quick response. Is the test set up available anywhere?
> i'd like to see what the major differences are. We're using comet with
> Jetty.
>
> Best wishes,
>
> --greg
>
>
> On Thu, Jun 11, 2009 at 11:19 AM, David Pollak <
> feeder.of.the.be...@gmail.com> wrote:
>
>>
>>
>> On Thu, Jun 11, 2009 at 11:02 AM, Meredith Gregory <
>> lgreg.mered...@gmail.com> wrote:
>>
>>> Lifted,
>>>
>>> i know that DPP has done some extensive lift stress testing. i'm
>>> wondering how comet has been exercised in that testing. We're seeing comet
>>> fall over in a load situation that would not be acceptable for production.
>>> We'd like to suss out how/why this is happening and whether we can work
>>> around it. Does anyone have any hard test data for comet?
>>
>>
>> What app server are you using?
>>
>> I've did a comet test last year with Jetty serving 700 pages/sec to 2,250
>> sessions and did not notice significant issues.  I haven't done stress
>> testing since then.
>>
>>
>>>
>>>
>>> Best wishes,
>>>
>>> --greg
>>>
>>> --
>>> L.G. Meredith
>>> Managing Partner
>>> Biosimilarity LLC
>>> 1219 NW 83rd St
>>> Seattle, WA 98117
>>>
>>> +1 206.650.3740
>>>
>>> http://biosimilarity.blogspot.com
>>>
>>>
>>>
>>
>>
>> --
>> Lift, the simply functional web framework http://liftweb.net
>> Beginning Scala http://www.apress.com/book/view/1430219890
>> Follow me: http://twitter.com/dpp
>> Git some: http://github.com/dpp
>>
>> >>
>>
>
>
> --
> L.G. Meredith
> Managing Partner
> Biosimilarity LLC
> 1219 NW 83rd St
> Seattle, WA 98117
>
> +1 206.650.3740
>
> http://biosimilarity.blogspot.com
>



-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] maven question

2009-06-11 Thread Meredith Gregory
Lifted,

Spse you've got a maven plugin configured with multiple executions in the
same life-cycle phase, distinguished by id. How do you invoke one of them by
id? For example, suppose i've got the maven-exec-plugin configured with two
executions in the package phase, with ids, 'one' and 'two', respectivelys.
What's the maven command line invocation that allows me to execute one
without the other?

Best wishes,

--greg

-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: lift stress tests and comet

2009-06-11 Thread Meredith Gregory
David,

Many thanks for the quick response. Is the test set up available anywhere?
i'd like to see what the major differences are. We're using comet with
Jetty.

Best wishes,

--greg

On Thu, Jun 11, 2009 at 11:19 AM, David Pollak <
feeder.of.the.be...@gmail.com> wrote:

>
>
> On Thu, Jun 11, 2009 at 11:02 AM, Meredith Gregory <
> lgreg.mered...@gmail.com> wrote:
>
>> Lifted,
>>
>> i know that DPP has done some extensive lift stress testing. i'm wondering
>> how comet has been exercised in that testing. We're seeing comet fall over
>> in a load situation that would not be acceptable for production. We'd like
>> to suss out how/why this is happening and whether we can work around it.
>> Does anyone have any hard test data for comet?
>
>
> What app server are you using?
>
> I've did a comet test last year with Jetty serving 700 pages/sec to 2,250
> sessions and did not notice significant issues.  I haven't done stress
> testing since then.
>
>
>>
>>
>> Best wishes,
>>
>> --greg
>>
>> --
>> L.G. Meredith
>> Managing Partner
>> Biosimilarity LLC
>> 1219 NW 83rd St
>> Seattle, WA 98117
>>
>> +1 206.650.3740
>>
>> http://biosimilarity.blogspot.com
>>
>>
>>
>
>
> --
> Lift, the simply functional web framework http://liftweb.net
> Beginning Scala http://www.apress.com/book/view/1430219890
> Follow me: http://twitter.com/dpp
> Git some: http://github.com/dpp
>
> >
>


-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Wolfram Alpha integration for Lift

2009-06-11 Thread Meredith Gregory
Tim,

Thanks for the response. i'll have to noodle on that one. Off the top of my
head, i'm usually in this loop

   - Initially, usually badly formulated question
   - Get information sources
   - Reformulate question
   - Loop

So, i don't really see much difference between the two, except by use. i
will think about it, though.

Best wishes,

--greg

On Thu, Jun 11, 2009 at 11:31 AM, Timothy Perrett
wrote:

>
> Hey Greg,
>
> Im not sure that drawing comparisons to google is right? IMO, they
> dont do the same job...? I see why one would see similarities, but
> isnt google's purpose to find the sources of information, where as
> wolfram's aim is to provide an objective set of answers based on
> "human" input;
>
> http://www.wolframalpha.com/about.html
>
> Cheers, Tim
>
> On Jun 11, 7:14 pm, Meredith Gregory  wrote:
> > Tim,
> >
> > Could you enlighten me on the coolness of Wolfram Alpha? My initial
> forays
> > and comparison to Google were depressingly unfavorable, but excellent if
> > you're looking for some humor. See the summary below.
> >
> > Best wishes,
> >
> > --greg
> >
> > My standard test of a search engine: polyadic pi-calculus
> > Google result: first hit is the Edinburgh tutorial prepared by Milner,
> still
> > the best reference
> > Wolfram Alpha: "*Wolfram|Alpha isn't sure what to do with your input.
> > Related inputs to try: pi.*"
> >
> > This test, by the way, should be right in W|A's sweet spot.
> >
> > My next test: phred weasley
> > Google result: Did you mean: *fred*
> > weasley<
> http://www.google.ca/search?hl=en&client=firefox-a&rls=org.mozilla:en..
> .>and
> > then several links to Harry Potter
> > W|A result: "*Wolfram|Alpha isn't sure what to do with your input.
> Related
> > inputs to try: Wesley.*"
> >
> > My next test: fred weasley
> > Google result: the top Harry Potter sites
> > W|A result:
> >
> > Interpreting "weasley" as "wesley"
> > --
> > --
> > Assuming Fred (female) | Use Fred
> >
> (male) tatesMaleName-')>instead
> > --
> > --
> > --
> > Input interpretation:[image: Fred (female given name) | Wesley (male
> given
> > name)]
> > --
> > --
> > Latest information for US births:[image: | Fred | Wesley\nrank | 985th
> > (1929) | 194th (2008)\nfraction | 1 in 21277 people (0.0047%) (1929) | 1
> in
> > 1058 people (0.094%) (2008)\nnumber | 54 people per year (1929) | 2033
> > people per year (2008)]
> > --
> > --
> > History for US births:Log
> >
> scale 11d660aid2aa&s=61',%20'0300','fred+weasley','',0)>
> >
> More 06e54df6b4e&s=61',%20'0300','fred+weasley','',0)>
> > Fraction:[image: Fraction]
> >
> > On Thu, Jun 11, 2009 at 10:35 AM, Timothy Perrett
> > wrote:
> >
> >
> >
> >
> >
> >
> >
> > > Hey Ty,
> >
> > > Essentially the wolfram API is a REST / XMLRPC hybrid, so my plan is
> > > to model a scala abstraction around Apache HTTP (similar to the paypal
> > > integration) - speaking of which, i might actually abstract some of
> > > the common factories out of lift-paypal into lift-util if applicable.
> >
> > > The interesting challenge will be that with wolfram, it can return a
> > > whole bunch of things, they could be graphs, text, sound - so i'll
> > > need some abstract way of making that presentable - perhaps some
> > > decoupled thing with a core communication group, then some lift
> > > specific abstractions for hooking into bind() or something...
> >
> > > I've not figured it out yet in my head, so any thoughts are most
> > > welcome.
> >
> > > Cheers, Tim
> >
> > > On Jun 11, 6:16 pm, TylerWeir  wrote:
> > > > Sounds cool, I agree that there is much awesome in Alpha.
> >
> > > > How do you see this integration planning out?
> >
> > > > On Jun 11, 12:02 pm, Timothy Perrett 
> wrote:
> >
> > > > > Hey chaps,
> >
> > > > > Im going to start work on integration with the wolfram alpha engine
> > > > > that i've of 

[Lift] Re: Wolfram Alpha integration for Lift

2009-06-11 Thread Meredith Gregory
Tim,

Could you enlighten me on the coolness of Wolfram Alpha? My initial forays
and comparison to Google were depressingly unfavorable, but excellent if
you're looking for some humor. See the summary below.

Best wishes,

--greg

My standard test of a search engine: polyadic pi-calculus
Google result: first hit is the Edinburgh tutorial prepared by Milner, still
the best reference
Wolfram Alpha: "*Wolfram|Alpha isn't sure what to do with your input.
Related inputs to try: pi.*"

This test, by the way, should be right in W|A's sweet spot.

My next test: phred weasley
Google result: Did you mean: *fred*
weasleyand
then several links to Harry Potter
W|A result: "*Wolfram|Alpha isn't sure what to do with your input. Related
inputs to try: Wesley.*"

My next test: fred weasley
Google result: the top Harry Potter sites
W|A result:

Interpreting "weasley" as "wesley"
--
--
Assuming Fred (female) | Use Fred
(male)instead
--
--
--
Input interpretation:[image: Fred (female given name) | Wesley (male given
name)]
--
--
Latest information for US births:[image: | Fred | Wesley\nrank | 985th
(1929) | 194th (2008)\nfraction | 1 in 21277 people (0.0047%) (1929) | 1 in
1058 people (0.094%) (2008)\nnumber | 54 people per year (1929) | 2033
people per year (2008)]
--
--
History for US births:Log
scale
More
Fraction:[image: Fraction]

On Thu, Jun 11, 2009 at 10:35 AM, Timothy Perrett
wrote:

>
> Hey Ty,
>
> Essentially the wolfram API is a REST / XMLRPC hybrid, so my plan is
> to model a scala abstraction around Apache HTTP (similar to the paypal
> integration) - speaking of which, i might actually abstract some of
> the common factories out of lift-paypal into lift-util if applicable.
>
> The interesting challenge will be that with wolfram, it can return a
> whole bunch of things, they could be graphs, text, sound - so i'll
> need some abstract way of making that presentable - perhaps some
> decoupled thing with a core communication group, then some lift
> specific abstractions for hooking into bind() or something...
>
> I've not figured it out yet in my head, so any thoughts are most
> welcome.
>
> Cheers, Tim
>
> On Jun 11, 6:16 pm, TylerWeir  wrote:
> > Sounds cool, I agree that there is much awesome in Alpha.
> >
> > How do you see this integration planning out?
> >
> > On Jun 11, 12:02 pm, Timothy Perrett  wrote:
> >
> >
> >
> > > Hey chaps,
> >
> > > Im going to start work on integration with the wolfram alpha engine
> > > that i've of late become most obsessed with as its the coolest thing
> > > since sliced bread...http://www.wolframalpha.com/
> >
> > > New branch here:
> http://github.com/dpp/liftweb/tree/wip-tim-wolframalpha
> >
> > > Anyone else in the commit team interested in working on this with me?
> >
> > > Cheers, Tim
> >
>


-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] lift stress tests and comet

2009-06-11 Thread Meredith Gregory
Lifted,

i know that DPP has done some extensive lift stress testing. i'm wondering
how comet has been exercised in that testing. We're seeing comet fall over
in a load situation that would not be acceptable for production. We'd like
to suss out how/why this is happening and whether we can work around it.
Does anyone have any hard test data for comet?

Best wishes,

--greg

-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: JTA Transaction Monad - Early Access Program

2009-06-10 Thread Meredith Gregory
Lifted,

i gotta say this thread of activity is just so cool. It's what i always
dreamed open source would be like. The community essentially gets to access
and think with each others' best minds and act with each others' best
talents to arrive on a path to a better concrete realization of feature,
function and design. We all know, individually and collectively, just how
hard it is to make excellent software and know that we're more likely to
achieve that aim working together. i can't help but notice that there is no
explicit representation of the profit motive here. Each of us might
individually be in contact with some aspect of profit motive, but it does
not have an explicit representation in this little snippet of process. That
gives this entrepreneur pause for thought.

Best wishes,

--greg

On Tue, Jun 9, 2009 at 3:46 PM, David Pollak
wrote:

>
>
> On Tue, Jun 9, 2009 at 1:08 PM, Jonas Bonér  wrote:
>
>>
>> Now I have deleted the lib dir with all jars and fixed the POM.
>
>
> Thanks!
>
>
>>
>>
>> 2009/6/9 Derek Chen-Becker :
>> > In my email above I have the link to the Maven artifacts for Atomikos:
>> >
>> > http://mvnrepository.com/artifact/com.atomikos
>> >
>> > I think that the dependency you want is:
>> >
>> > 
>> > com.atomikos
>> > transactions-jta
>> > 3.2.3
>> > 
>> >
>> > Derek
>> >
>> > On Tue, Jun 9, 2009 at 12:54 PM, Meredith Gregory <
>> lgreg.mered...@gmail.com>
>> > wrote:
>> >>
>> >> Jonas,
>> >>
>> >> Awesome! i look forward to digging into this stuff!
>> >>
>> >> Best wishes,
>> >>
>> >> --greg
>> >>
>> >> On Tue, Jun 9, 2009 at 6:18 AM, Jonas Bonér  wrote:
>> >>>
>> >>> Hey guys.
>> >>>
>> >>> I have hacked together an early draft of the JTA transaction stuff.
>> >>>
>> >>> I have wrapped it up in a monad. Here  are some examples of usage:
>> >>>
>> >>>  for {
>> >>>   ctx <- TransactionContext.Required
>> >>>   entity <- updatedEntities
>> >>>   if !ctx.isRollbackOnly
>> >>>  } {
>> >>>   // transactional stuff
>> >>>   ctx.getEntityManager.merge(entity)
>> >>>  }
>> >>>
>> >>> val users = for {
>> >>>   ctx <- TransactionContext.Required
>> >>>   name <- userNames
>> >>>  } yield {
>> >>>   // transactional stuff
>> >>>   val query = ctx.getEntityManager.createNamedQuery("findUserByName")
>> >>>   query.setParameter("userName", name)
>> >>>   query.getSingleResult
>> >>>  }
>> >>>
>> >>> If you don't like the monadic approach you can just use the high-order
>> >>> functions:
>> >>>
>> >>> TransactionContext.withTxRequired {
>> >>>... // REQUIRED semantics
>> >>>
>> >>>  TransactionContext.withTxRequiresNew {
>> >>>... // REQUIRES_NEW semantics
>> >>>  }
>> >>> }
>> >>>
>> >>> I have implemented the same semantics as used in the EJB spec.
>> >>> Required, RequiresNew, Mandatory, Supports, Never. All these are
>> >>> monadic objects in the TransactionContext object.
>> >>> I don't have a webapp to try this out, so I would be happy to get all
>> >>> kinds of feedback, but API wise and bug reports or fixes.
>> >>>
>> >>> This API is hooked into Derek's Scala-JPA stuff. I had my own impl of
>> >>> this but replaced it with Derek's work.
>> >>>
>> >>> Derek,
>> >>> please go through the integration to see if I have done it correctly,
>> >>> and where things code be improved.
>> >>>
>> >>> All committers,
>> >>> feel free to hack and change this code anyway you want.
>> >>>
>> >>> The code is in a branch (wip-jta-jonas), you can find it here:
>> >>>
>> >>>
>> http://github.com/dpp/liftweb/tree/3783b9e2200cc57dd72baa1bd8cabdb1365ee923/lift-jta
>> >>>
>> >>> Check the ScalaDoc (or the source) for the documentation on usage,
>> >>> semantics etc.
>> >>> Also see the README

  1   2   3   >