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 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://
 pathToFile


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

 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.comliftweb%2bunsubscr...@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.comliftweb%2bunsubscr...@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
lgreg.mered...@gmail.comwrote:

 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://
 pathToFile


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

 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.comliftweb%2bunsubscr...@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.comliftweb%2bunsubscr...@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 Jeppe,

Thanks! A quick test shows that

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

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 je...@ingolfs.dkwrote:

 On Mon, Feb 15, 2010 at 10:34 PM, Meredith Gregory
 lgreg.mered...@gmail.com 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=xxfile2=yyfile3=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.comliftweb%2bunsubscr...@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! i was just sorting through that... ;-)

Best wishes,

--greg

On Mon, Feb 15, 2010 at 2:00 PM, Jeppe Nejsum Madsen je...@ingolfs.dkwrote:

 On Mon, Feb 15, 2010 at 10:46 PM, Meredith Gregory
 lgreg.mered...@gmail.com wrote:

  Dear Jeppe,
  Thanks! A quick test shows that
 curl -o test.txt
 
 http://localhost:8080/biosimilarity-services/grammar/banana-cream-pie?file=file://
 pathToFile
  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.comliftweb%2bunsubscr...@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,

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-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 lgreg.mered...@gmail.com
 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-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

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 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
 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.comliftweb%2bunsubscr...@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.comliftweb%2bunsubscr...@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 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 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 
 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
 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.comliftweb%2bunsubscr...@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

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 indraj...@gmail.com
 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
 lgreg.mered...@gmail.com 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
feeder.of.the.be...@gmail.com
mailto:feeder.of.the.be...@gmail.com wrote:



On Thu, Jan 28, 2010 at 9:04 PM, Indrajit Raychaudhuri
indraj...@gmail.com 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


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

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 feeder.of.the.be...@gmail.com
 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.comliftweb%2bunsubscr...@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,

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 mli...@juma.me.uk 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=1amp;nf=1amp;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: [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 mli...@juma.me.uk 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: 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 feeder.of.the.be...@gmail.com
 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: [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 mli...@juma.me.uk 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] 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 olambo...@gmail.com 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 c...@munat.com 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
  feeder.of.the.be...@gmail.com 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 c...@munat.com 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
  feeder.of.the.be...@gmail.com 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] 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: 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. marius.dan...@gmail.com wrote:


 Outstanding! Welcome aboard!

 Br's,
 Marius

 On Sep 18, 7:00 pm, David Pollak feeder.of.the.be...@gmail.com
 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] 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. marius.dan...@gmail.comwrote:


 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. marius.dan...@gmail.com wrote:
  On Aug 24, 10:39 am, Viktor Klang viktor.kl...@gmail.com wrote:
 
 
 
   On Mon, Aug 24, 2009 at 8:13 AM, marius d. marius.dan...@gmail.com
 wrote:
 
On Aug 24, 12:06 am, David Pollak feeder.of.the.be...@gmail.com
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. marius.dan...@gmail.com
 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 avand...@gmail.com wrote:
 
On Sun, Aug 23, 2009 at 7:04 PM, David
 
Pollakfeeder.of.the.be...@gmail.com wrote:
 On Sun, Aug 23, 2009 at 4:50 AM, Kevin Wright
 kev.lee.wri...@googlemail.com 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
 

[Lift] id selectors discouraged?

2009-08-24 Thread Meredith Gregory
Lifted,

At the pixillion master
http://github.com/leithaus/pixillion/tree/masteri'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: 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 feeder.of.the.be...@gmail.com
 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 
 masterhttp://github.com/leithaus/pixillion/tree/masteri'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:

lift:CSS.blueprint /
 lift:CSS.fancyType /

 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 ![CDATA[
 blocks:

 script type=text/javascript
 $(document).ready(function() {
 
/script

 becomes:

   script type=text/javascript
 // ![CDATA[
 $(document).ready(function() {
 ...
// ]]
/script

 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 script escaping issue.



 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: 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 jack.wid...@gmail.com 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
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

lift:surround with=default at=content
  div class=widget sidebar
centerbGroup Chat/b/centerbr /
lift:comet type=Chat name=Other
  chat:body
Hello chat:name/
  ul chat:id=na
chat:list
  lilist:when/ list:who/: ilist:msg//i/li
/chat:list
  /ul
  /chat:body
  chat:input
chat:input/ input type=submit value=Post It /
  /chat:input
/lift:comet
  /div
  p
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 iLift/i).
  /p

  p
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:/p

style type=text/css
/* ![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;
  }

/* ]] */
/style

pre
span class=keywordclass/span span class=typeAskName/span span
class=keywordextends/span span class=typeCometActor/span {
  span class=keyworddef/span span class=function-namerender/span
=
  ajaxForm(lt;divgt;What is your username?lt;/divgt; ++
   text(span class=string/span,name =gt; answer(name.trim))
++
   lt;input span class=keywordtype/span=span
class=stringsubmit/span value=span
class=stringEnter/span/gt;)
}
/pre

  p
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.
  /p

  pNow, onto the heart of the chat app:/p

pre
span class=keywordclass/span span class=typeChat/span span
class=keywordextends/span span class=typeCometActor/span span
class=keywordwith/span span class=typeCometListener/span {
  span class=keywordprivate/span span class=keywordvar/span
span class=variable-nameuserName/span = span class=string/span
  span class=keywordprivate/span span class=keywordvar/span
span class=variable-namechats/span: span
class=typeList[ChatLine]/span = Nil
  span class=keywordprivate/span span class=keywordlazy/span
span class=keywordval/span span class=variable-nameinfoId/span =
uniqueId + span class=string_info/span
  span class=keywordprivate/span span class=keywordlazy/span
span class=keywordval/span span class=variable-nameinfoIn/span =
uniqueId + span class=string_in/span
  span class=keywordprivate/span span class=keywordlazy/span
span class=keywordval/span span
class=variable-nameinputArea/span = findKids(defaultXml, span
class=stringchat/span, span class=stringinput/span)
  span class=keywordprivate/span span class=keywordlazy/span
span class=keywordval/span span class=variable-namebodyArea/span
= findKids(defaultXml, span class=stringchat/span, span
class=stringbody/span)
  span class=keywordprivate/span span class=keywordlazy/span
span class=keywordval/span span
class=variable-namesingleLine/span = deepFindKids(bodyArea, span
class=stringchat/span, span class=stringlist/span)

  span class=comment-delimiter// /spanspan class=commenthandle an
update to the chat lists
/span  span class=comment-delimiter// /spanspan class=commentby
diffing the lists and then sending a partial update
/span  span class=comment-delimiter// /spanspan class=commentto
the browser
/span  span class=keywordoverride/span span
class=keyworddef/span span class=function-namelowPriority/span =
{
span class=keywordcase/span span
class=typeChatServerUpdate/span(span
class=variable-namevalue/span) =gt;
  span class=keywordval/span span
class=variable-nameupdate/span = (value -- chats).reverse.map(b =gt;
AppendHtml(infoId, line(b)))
  partialUpdate(update)
  chats = value
  }

  span class=comment-delimiter// /spanspan class=commentrender the
input area by binding the
/span  span class=comment-delimiter// /spanspan
class=commentappropriate 

[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

 lift:surround with=default at=content
   div class=widget sidebar
 centerbGroup Chat/b/centerbr /
 lift:comet type=Chat name=Other
   chat:body
 Hello chat:name/
   ul chat:id=na
 chat:list
   lilist:when/ list:who/: ilist:msg//i/li
 /chat:list
   /ul
   /chat:body
   chat:input
 chat:input/ input type=submit value=Post It /
   /chat:input
 /lift:comet
   /div
   p
 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 iLift/i).
   /p

   p
 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:/p

 style type=text/css
 /* ![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;
   }

 /* ]] */
 /style

 pre
 span class=keywordclass/span span class=typeAskName/span span
 class=keywordextends/span span class=typeCometActor/span {
   span class=keyworddef/span span
 class=function-namerender/span =
   ajaxForm(lt;divgt;What is your username?lt;/divgt; ++
text(span class=string/span,name =gt;
 answer(name.trim)) ++
lt;input span class=keywordtype/span=span
 class=stringsubmit/span value=span
 class=stringEnter/span/gt;)
 }
 /pre

   p
 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.
   /p

   pNow, onto the heart of the chat app:/p

 pre
 span class=keywordclass/span span class=typeChat/span span
 class=keywordextends/span span class=typeCometActor/span span
 class=keywordwith/span span class=typeCometListener/span {
   span class=keywordprivate/span span class=keywordvar/span
 span class=variable-nameuserName/span = span class=string/span
   span class=keywordprivate/span span class=keywordvar/span
 span class=variable-namechats/span: span
 class=typeList[ChatLine]/span = Nil
   span class=keywordprivate/span span class=keywordlazy/span
 span class=keywordval/span span class=variable-nameinfoId/span =
 uniqueId + span class=string_info/span
   span class=keywordprivate/span span class=keywordlazy/span
 span class=keywordval/span span class=variable-nameinfoIn/span =
 uniqueId + span class=string_in/span
   span class=keywordprivate/span span class=keywordlazy/span
 span class=keywordval/span span
 class=variable-nameinputArea/span = findKids(defaultXml, span
 class=stringchat/span, span class=stringinput/span)
   span class=keywordprivate/span span class=keywordlazy/span
 span class=keywordval/span span class=variable-namebodyArea/span
 = findKids(defaultXml, span class=stringchat/span, span
 class=stringbody/span)
   span class=keywordprivate/span span class=keywordlazy/span
 span class=keywordval/span span
 class=variable-namesingleLine/span = deepFindKids(bodyArea, span
 class=stringchat/span, span class=stringlist/span)

   span class=comment-delimiter// /spanspan class=commenthandle
 an update to the chat lists
 /span  span class=comment-delimiter// /spanspan
 class=commentby diffing the lists and then sending a partial update
 /span  span class=comment-delimiter// /spanspan
 class=commentto

[Lift] Re: clue for the clueless?

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

i pushed my little experiments back up to
githubhttp://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 lgreg.mered...@gmail.com
 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

 lift:surround with=default at=content
   div class=widget sidebar
 centerbGroup Chat/b/centerbr /
 lift:comet type=Chat name=Other
   chat:body
 Hello chat:name/
   ul chat:id=na
 chat:list
   lilist:when/ list:who/: ilist:msg//i/li
 /chat:list
   /ul
   /chat:body
   chat:input
 chat:input/ input type=submit value=Post It /
   /chat:input
 /lift:comet
   /div
   p
 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 iLift/i).
   /p

   p
 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:/p

 style type=text/css
 /* ![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;
   }

 /* ]] */
 /style

 pre
 span class=keywordclass/span span class=typeAskName/span
 span class=keywordextends/span span class=typeCometActor/span {
   span class=keyworddef/span span
 class=function-namerender/span =
   ajaxForm(lt;divgt;What is your username?lt;/divgt; ++
text(span class=string/span,name =gt;
 answer(name.trim)) ++
lt;input span class=keywordtype/span=span
 class=stringsubmit/span value=span
 class=stringEnter/span/gt;)
 }
 /pre

   p
 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.
   /p

   pNow, onto the heart of the chat app:/p

 pre
 span class=keywordclass/span span class=typeChat/span span
 class=keywordextends/span span class=typeCometActor/span span
 class=keywordwith/span span class=typeCometListener/span {
   span class=keywordprivate/span span class=keywordvar/span
 span class=variable-nameuserName/span = span class=string/span
   span class=keywordprivate/span span class=keywordvar/span
 span class=variable-namechats/span: span
 class=typeList[ChatLine]/span = Nil
   span class=keywordprivate/span span class=keywordlazy/span
 span class=keywordval/span span class=variable-nameinfoId/span =
 uniqueId + span class=string_info/span
   span class=keywordprivate/span span class=keywordlazy/span
 span class=keywordval/span span class=variable-nameinfoIn/span =
 uniqueId + span class=string_in/span
   span class=keywordprivate/span span class=keywordlazy/span
 span class=keywordval/span span
 class=variable-nameinputArea/span = findKids(defaultXml, span
 class=stringchat/span, span class=stringinput/span)
   span class=keywordprivate/span span class=keywordlazy/span
 span class=keywordval/span span class=variable-namebodyArea/span
 = findKids(defaultXml, span class=stringchat/span, span
 class=stringbody/span)
   span class=keywordprivate/span span class=keywordlazy/span
 span class=keywordval/span span
 class=variable-namesingleLine/span = deepFindKids(bodyArea, span
 class=stringchat/span, span class=stringlist/span

[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 viktor.kl...@gmail.comwrote:



 On Tue, Aug 18, 2009 at 4:22 PM, marius d. marius.dan...@gmail.comwrote:




 On Aug 18, 5:05 pm, Naftoli Gugenheim naftoli...@gmail.com 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 Donahuedonahu...@gmail.com 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
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 
 dchenbec...@gmail.comwrote:

 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 timo...@getintheloop.eu
  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 feeder.of.the.be...@gmail.com
 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
 timo...@getintheloop.euwrote:
 
   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 lgreg.mered...@gmail.com
 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
 timo...@getintheloop.eu
   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 viktor.kl...@gmail.com
 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
  lgreg.mered...@gmail.comwrote:
 
   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

[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
 timo...@getintheloop.eu 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 feeder.of.the.be...@gmail.com
 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
 timo...@getintheloop.euwrote:
 
   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 lgreg.mered...@gmail.com
 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
 timo...@getintheloop.eu
   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 viktor.kl...@gmail.com
 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
  lgreg.mered...@gmail.comwrote:
 
   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

[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: [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 feeder.of.the.be...@gmail.com
 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-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

pluginRepositories
...
   pluginRepository
  idplugin.axis2.apache.org/id
  nameApache Axis2 Repository/name
  urlhttp://apache.sunsite.ualberta.ca/ws/axis2/tools/1_4_1/url
/pluginRepository
/pluginRepositories



plugins
...
plugin
groupIdorg.apache.axis2/groupId
artifactIdaxis2-wsdl2code-maven-plugin/artifactId
version1.4.1/version
executions
  execution
goals
  goalwsdl2code/goal
/goals
  /execution
/executions
configuration
  packageName${groupId}.${artifactId}.model/packageName
  wsdlVersion2.0/wsdlVersion
  generateAllClassestrue/generateAllClasses
  generateServerSidetrue/generateServerSide
  generateServerSideInterfacetrue/generateServerSideInterface
  generateServicesXmltrue/generateServicesXml
  generateTestCasetrue/generateTestCase
/configuration
  /plugin
/plugins

2009/8/11 Meredith Gregory lgreg.mered...@gmail.com

 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 ret
   - 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. marius.dan...@gmail.comwrote:




 On Aug 11, 7:09 pm, Meredith Gregory lgreg.mered...@gmail.com 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

[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 timo...@getintheloop.euwrote:



 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 jace...@gmail.com 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-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
timo...@getintheloop.euwrote:


 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 lgreg.mered...@gmail.com
 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 viktor.kl...@gmail.com
 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 jace...@gmail.com
 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-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 ret
  - 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. marius.dan...@gmail.com wrote:




 On Aug 11, 7:09 pm, Meredith Gregory lgreg.mered...@gmail.com 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
  timo...@getintheloop.euwrote:
 
 
 
 
 
   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 lgreg.mered...@gmail.com
   wrote:
Lifted RESTafarians,
 
Has

[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
pagehttp://ws.apache.org/axis2/tools/1_2/maven-plugins/maven-wsdl2code-plugin.htmland
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 viktor.kl...@gmail.comwrote:

 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 jace...@gmail.comwrote:


 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] 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: 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
feeder.of.the.be...@gmail.comwrote:

 sites/example/src/main/scala/net/liftweb/example/comet/Chat.scala


 On Mon, Aug 3, 2009 at 1:12 PM, Meredith Gregory lgreg.mered...@gmail.com
  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] 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 viktor.kl...@gmail.comwrote:



 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 a...@cluonflux.com 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-23 Thread Meredith Gregory
Viktor,

Yep.

Best wishes,

--greg

On Thu, Jul 23, 2009 at 10:08 AM, Viktor Klang viktor.kl...@gmail.comwrote:



 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 viktor.kl...@gmail.comwrote:



 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 a...@cluonflux.comwrote:


 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-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 viktor.kl...@gmail.comwrote:



 On Wed, Jul 22, 2009 at 8:05 PM, Alex Cruise a...@cluonflux.com 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] 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 a...@cluonflux.com 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: 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 timo...@getintheloop.euwrote:

 +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 feeder.of.the.be...@gmail.com
 wrote:

 Looks good to me.

 On Mon, Jul 20, 2009 at 3:05 PM, Derek Chen-Becker dchenbec...@gmail.com
 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
 http://liftweb.net
 Beginning Scala http://www.apress.com/book/view/1430219890
 http://www.apress.com/book/view/1430219890
 Follow me: http://twitter.com/dpphttp://twitter.com/dpp
 Git some: http://github.com/dpphttp://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
paperhttp://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 feeder.of.the.be...@gmail.com
 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 
 zipperhttp://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 tyler.w...@gmail.com 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 feeder.of.the.be...@gmail.com
 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
 timo...@getintheloop.euwrote:
 
 
 
 
 
   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




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

[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
zipperhttp://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 tyler.w...@gmail.com 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 feeder.of.the.be...@gmail.com
 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 timo...@getintheloop.eu
 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: 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 jbo...@gmail.com 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 timo...@getintheloop.eu:
 
  Jonas,
 
  Did you roll this into master? What's its status?
 
  Cheers, Tim
 
  On Jun 10, 4:46 pm, James Strachan james.strac...@gmail.com wrote:
  2009/6/9 Jonas Bonér jbo...@gmail.com:
 
 
 
   2009/6/9 David Pollak feeder.of.the.be...@gmail.com:
   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] organizing views of synchronous streams

2009-07-07 Thread Meredith Gregory
All,

Here's a blog 
posthttp://biosimilarity.blogspot.com/2009/07/scores-and-comics-and-views-of.htmloutlining
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: [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 console: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 lgreg.mered...@gmail.com
 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 typekind 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

[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 ebow...@boboco.ie 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 jbo...@gmail.com wrote:
 
  Great talk. Thanks.
  Could you post the slides? It was a bit hard to see them.
  /Jonas
 
  2009/6/29 Meredith Gregory lgreg.mered...@gmail.com:
 
 
 
 
 
 
  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/+353872801532http://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
onlinehttp://www.vimeo.com/5318303
.

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] 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.init
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] 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 pa...@improving.org 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] Re: higher-kinded types

2009-06-25 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
lgreg.mered...@gmail.comwrote:

 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] From JPA question to ScalaQuery to Collection Abstractions

2009-06-25 Thread Meredith Gregory
 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 dchenbec...@gmail.com 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.comwrote:
 
 
 
   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-to-java1.6:$PATH JAVA_HOME=path-to-java1.6 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
   relevant; surely if it's possible to hand-write a successful
 solution

[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 naftoli...@gmail.com
 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
 timo...@getintheloop.eu 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: 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 dhwpers...@gmail.com 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 dchenbec...@gmail.com 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.comwrote:
 
   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 dhwpers...@gmail.com
 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 dchenbec...@gmail.com 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 ebow...@boboco.ie
 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
Jon,

Sweet!

Best wishes,

--greg

On Wed, Jun 24, 2009 at 3:11 PM, jon jonhoff...@gmail.com 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 tnell...@gmail.com wrote:
  I think they use Gant.http://gant.codehaus.org/
 
 
 
  On Wed, Jun 24, 2009 at 3:10 PM, fan...@gmail.com 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: [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 dchenbec...@gmail.comwrote:

 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.comwrote:

 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,

 Herehttp://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-to-java1.6:$PATH JAVA_HOME=path-to-java1.6 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

[Lift] Re: [scala] JPA question

2009-06-23 Thread Meredith Gregory
  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 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-to-java1.6:$PATH JAVA_HOME=path-to-java1.6 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
  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
  Gregorylgreg.mered...@gmail.com 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

[Lift] Re: [scala] JPA question

2009-06-23 Thread Meredith Gregory
, 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 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-to-java1.6:$PATH JAVA_HOME=path-to-java1.6 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
  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
  Gregorylgreg.mered...@gmail.com 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

[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 olambo...@gmail.com 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 
 samplehttp://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
 Nuttycombekris.nuttyco...@gmail.com 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 PaymentSourceTransactionT extends
 PaymentSourceT
 extends SubscriptionTransaction implements
  MonetaryTransactionT, Serializable {
 
 @ManyToOne(cascade = {CascadeType.MERGE, CascadeType.PERSIST},
  optional = false, targetEntity = PaymentSource.class)
 private T paymentSource;
 
 ...
  }
 
  @Entity
  public abstract class CreditCardTransaction extends
  PaymentSourceTransactionCreditCard { ... }
 

 @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 AuthTransactionCreditCard, Divisional, Serializable { ..
  }
 
  @Entity
  @Inheritance(strategy = InheritanceType.SINGLE_TABLE)
  public abstract class CCCaptureTransaction extends
  VoidableCCTransaction implements Serializable,
  CaptureTransactionCreditCard {
 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 PaymentSourceT extends PaymentSourceT
  extends UUEntity implements MutationControlledT, Serializable { ...
  }
 
  @Entity
  public class CreditCard extends PaymentSourceCreditCard implements
  Addressable, Serializable { ... }
 
  @Entity
  public class CheckingAccount extends PaymentSourceCheckingAccount
  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
  Gregorylgreg.mered...@gmail.com 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

[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 dhwpers...@gmail.com 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: [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
kris.nuttyco...@gmail.comwrote:

 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
 Gregorylgreg.mered...@gmail.com 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
 
  @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;
  }
 
  }
 
 
  On Tue, Jun 16, 2009 at 1:45 PM, Derek Chen-Becker j...@chen-becker.org
 
  wrote:
 
  John Nilsson wrote:
   Hi,
  
   I think the showSql property has been deprecated in favor of log4j
   loggers.
  
   If you set the log4j level to TRACE for org.hibernate you'll get
   everything Hibernate has to say about what it is doing. Can't remember
   which one it is, but I know one of the loggers will give you the
   values used in queries at the TRACE level.
 
  Good to 

[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-to-java1.6:$PATH JAVA_HOME=path-to-java1.6 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.comwrote:

 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
 Gregorylgreg.mered...@gmail.com 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

[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 dchenbec...@gmail.comwrote:

 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-to-java1.6:$PATH JAVA_HOME=path-to-java1.6 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
 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
 Gregorylgreg.mered...@gmail.com 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

[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
lgreg.mered...@gmail.comwrote:

 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.comwrote:

 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,

 Herehttp://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-to-java1.6:$PATH JAVA_HOME=path-to-java1.6 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
 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
 Gregorylgreg.mered...@gmail.com 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

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

2009-06-18 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-18 Thread Meredith Gregory
Viktor,

My co-routine yields back to yours!

Hey, it's like Garrison Keillor's Tales from Lake
Wobegonhttp://en.wikipedia.org/wiki/Lake_Wobegon:
where *all* of the children are above average. If you think about it, that
just keeps *lift*ing the children higher and higher and higher...

Speaking 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
gavehttp://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 viktor.kl...@gmail.com

 I yield to your superiority.
 Seriously.


 2009/6/18 Meredith Gregory lgreg.mered...@gmail.com

 Oliver,

 Objects and monads are really not the same. At it's heart the concept of
 monad is an appropriately parametric notion of composition. If you have any
 experience with abstract algebra, you 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 
 transformationhttp://en.wikipedia.org/wiki/Natural_transformationunit: 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

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

2009-06-18 Thread Meredith Gregory
Oliver,

You wrote:

we would have taken over Google by now.


My not-so-secret plan for taking over Google is contained in the deck i
posted in response to
Viktorhttp://svn.biosimilarity.com/src/open/talks/MonadicDesignPatternsForTheWeb.pdf.
Part of the reason i was excited that Jonas took on to 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 olambo...@gmail.com



 2009/6/18 Meredith Gregory lgreg.mered...@gmail.com

 Oliver,

 The short answer is no. The longer answer is

- i worked this all out on my own; so, you guys -- who can program
lift on top of scala on top of JVM and are therefore about 20X smarter 
 than
i am -- can too.

 I think if we 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 
 π-calculihttp://en.wikipedia.org/wiki/Pi-calculusand 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 
 nameshttp://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 
 effectivehttp://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
 computationhttp://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 olambo...@gmail.com



 2009/6/17 Meredith Gregory lgreg.mered...@gmail.com

 Jeremy,

 Most excellent question award to you, sir!

 How to bootstrap thinking compositionally... this is what i did

- learn some compositional idioms by heart
   - do you know the shape of the paradoxical combinator by heart
   - 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

[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: 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 viktor.kl...@gmail.comwrote:

 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 lgreg.mered...@gmail.com 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.comhttp://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
lgreg.mered...@gmail.comwrote:

 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 viktor.kl...@gmail.comwrote:

 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 lgreg.mered...@gmail.com 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.comhttp://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
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 dchenbec...@gmail.comwrote:

 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 viktor.kl...@gmail.comwrote:

 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 lgreg.mered...@gmail.com 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.comhttp://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: 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
π-calculihttp://en.wikipedia.org/wiki/Pi-calculusand 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
nameshttp://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
effectivehttp://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
computationhttp://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 olambo...@gmail.com



 2009/6/17 Meredith Gregory lgreg.mered...@gmail.com

 Jeremy,

 Most excellent question award to you, sir!

 How to bootstrap thinking compositionally... this is what i did

- learn some compositional idioms by heart
   - do you know the shape of the paradoxical combinator by heart
   - 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
 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

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

2009-06-17 Thread Meredith Gregory
Tim,

LOL!

Derek,

i'm amazed at all the good work you've done on lift. You're unstoppable!

i trust that all understood i was having good fun.

Best wishes,

--greg

On Wed, Jun 17, 2009 at 2:07 AM, TSP tim.pig...@optrak.co.uk wrote:


   In my own defense ...  failed to realize the problem that 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,

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 
transformationhttp://en.wikipedia.org/wiki/Natural_transformationunit:
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 olambo...@gmail.com



 2009/6/18 Meredith Gregory lgreg.mered...@gmail.com

 Oliver,

 The short answer is no. The longer answer is

- i worked this all out on my own; so, you guys -- who can program
lift on top of scala on top of JVM and are therefore about 20X smarter 
 than
i am -- can too.

 I think if we 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

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

2009-06-16 Thread Meredith Gregory
Derek,

soapbox
You have just demonstrated a process that i have been talking about for the
last 15 years. People have a blind spot when it comes to thinking
compositionally. They think -- almost to a person -- about god's eye view
solutions where there's only one of some key solution component. 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.
/soapbox

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
dchenbec...@gmail.comwrote:

 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 jlcane...@gmail.com 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 jlcane...@gmail.com

  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: 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 jeremy@gmail.com 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: 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 timo...@getintheloop.euwrote:


 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 lgreg.mered...@gmail.com
 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
  kris.nuttyco...@gmail.comwrote:
 
 
 
 
 
 
 
   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
   Gregorylgreg.mered...@gmail.com 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
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*
weasleyhttp://www.google.ca/search?hl=enclient=firefox-arls=org.mozilla:en-US:officialhs=ePUei=T0gxSvHvF8nRjAfzn5S2Bwsa=Xoi=spellresnum=0ct=resultcd=1q=fred+weasleyspell=1and
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)javascript:applyAssumption(1,'*DPClash.GivenNameE.fred-_*FredUnitedStatesMaleName-')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
scalejavascript:asynchronousPod('pod.jsp?id=MSP41119646i0hb5a62fg04fe211d660aid2aas=61',%20'0300','fred+weasley','',0)
Morejavascript:asynchronousPod('pod.jsp?id=MSP41219646i0hb5a62fg058i0506e54df6b4es=61',%20'0300','fred+weasley','',0)
Fraction:[image: Fraction]

On Thu, Jun 11, 2009 at 10:35 AM, Timothy Perrett
timo...@getintheloop.euwrote:


 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 tyler.w...@gmail.com 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 timo...@getintheloop.eu 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] 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
timo...@getintheloop.euwrote:


 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 lgreg.mered...@gmail.com 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=enclient=firefox-arls=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)javascript:applyAssumption(1,'*DPClash.GivenNameE.fred-_*FredUnitedS
 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
 
 scalejavascript:asynchronousPod('pod.jsp?id=MSP41119646i0hb5a62fg04fe2
 11d660aid2aas=61',%20'0300','fred+weasley','',0)
 
 Morejavascript:asynchronousPod('pod.jsp?id=MSP41219646i0hb5a62fg058i05
 06e54df6b4es=61',%20'0300','fred+weasley','',0)
  Fraction:[image: Fraction]
 
  On Thu, Jun 11, 2009 at 10:35 AM, Timothy Perrett
  timo...@getintheloop.euwrote:
 
 
 
 
 
 
 
   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 tyler.w...@gmail.com 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 timo...@getintheloop.eu
 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
 



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

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

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 lgreg.mered...@gmail.com
 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] 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
kris.nuttyco...@gmail.comwrote:


 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
 Gregorylgreg.mered...@gmail.com 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: 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
feeder.of.the.be...@gmail.comwrote:



 On Tue, Jun 9, 2009 at 1:08 PM, Jonas Bonér jbo...@gmail.com wrote:


 Now I have deleted the lib dir with all jars and fixed the POM.


 Thanks!




 2009/6/9 Derek Chen-Becker dchenbec...@gmail.com:
  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:
 
  dependency
  groupIdcom.atomikos/groupId
  artifactIdtransactions-jta/artifactId
  version3.2.3/version
  /dependency
 
  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 jbo...@gmail.com 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 for configuration in persistence.xml etc.
 
  Currently it is hard-coded to use the Atomikos Transaction library and
  Hibernate JPA, that would have to be configurable + some other options
  as well. See the TODOs in the code.
 
  As I said, this needs feedback and testing. Thanks.
 
  --
  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
 
 
 
 
  
 



 --
 Jonas Bonér

 twitter: @jboner
 blog:http://jonasboner.com
 work:   http://crisp.se
 work:   http://scalablesolutions.se
 code:   http://github.com/jboner





 --
 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: JTA Transaction Monad - Early Access Program

2009-06-09 Thread Meredith Gregory
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 jbo...@gmail.com 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 for configuration in persistence.xml etc.

 Currently it is hard-coded to use the Atomikos Transaction library and
 Hibernate JPA, that would have to be configurable + some other options
 as well. See the TODOs in the code.

 As I said, this needs feedback and testing. Thanks.

 --
 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: JTA

2009-06-08 Thread Meredith Gregory
Jonas,

i just got back from a week of Guitar on Raft Island. So, i just saw this
message. If you want any help, design review, code review, peanuts from the
peanut gallery, just give me a shout. Also, i wanted to reiterate that i
think you can also provide an annotation-style solution over the top of a
monadic solution -- which i think would solve some concerns Josh might have
raised (if my music-addled brain has grasped them). i'm looking forward to
see what you come up with.

Best wishes,

--greg

On Sat, May 30, 2009 at 1:15 PM, Jonas Bonér jbo...@gmail.com wrote:


 Thanks a lot Greg.

 That's sounds like a great idea. I'll see what I can come up with.

 /Jonas

 2009/5/30 Meredith Gregory lgreg.mered...@gmail.com:
  Jonas,
 
  i applaud the effort. i agree with DPP sentiments regarding annotations.
  That said, i feel pretty comfortable that transactions fit entirely in a
  monadic context. Since LINQ demonstrates that query fits into monadic
  context, and there's already at least one Scala implementation of LINQ,
  might i suggest that you come up with a monadic presentation first and
 then
  map the sugar to that. My guess is that the sugar will be informed by the
  monadic presentation.
 
  To be suggestive... think of a context with a Tx object, TxCtxt, as like
 an
  Option widget. Then you do stuff inside a transaction via
 
  for ( myTransactedWidget - TxCtxt if someCondition ) yield {
  someOperationsThatNeedToBeTransacted }
 
  If you implement flatMap, yada, on TxCtxt you can have fun with nested
  transaction semantics. The point is that this should just work with a
  LINQ-like presentation of query.
 
  Best wishes,
 
  --greg
 
  On Fri, May 29, 2009 at 6:54 AM, Jonas Bonér jbo...@gmail.com wrote:
 
  I'll go for closures. Much simpler and less intrusive into Lift.
  The current impl is based on Atomikos and Hibernate, I'll start with
  pushing that in and we can make it pluggable later.
  For example for Hibernate one need to add a line to the hibernate
  config to register the
  org.hibernate.transaction.TransactionManagerLookup class in order to
  make Hibernate aware of our TX manager.
 
  Should I fork the github repo and submit patches or how do you guys
 work?
 
  /Jonas
 
 
  2009/5/29 Derek Chen-Becker dchenbec...@gmail.com:
   I'd vote for closures. We use annotations for JPA because we have to,
   but
   IMHO closures provide a nicer semantic approach because they
   syntactically
   enclose the block where the action is occurring.
  
   Derek
  
   On Fri, May 29, 2009 at 7:44 AM, Jonas Bonér jbo...@gmail.com
 wrote:
  
   No perf difference. The annotations are turned into the same exact
   closures.
  
   2009/5/29 Timothy Perrett timo...@getintheloop.eu:
   
   
Are there any performance implications considering closures vs
annotations?
Agreed that closures are more lift like however.
   
Cheers, Tim
   
On 29/05/2009 10:21, marius d. marius.dan...@gmail.com wrote:
   
   
I think that would be really good. But I'd rather not use
annotations.
Personally I find closures approach a much better fit here.
   
withTxRequired {
  ... // do transational stuff
   
}
   
   
Br's,
Marius
   
On May 29, 11:55 am, Jonas Bonér jbo...@gmail.com wrote:
Hi guys.
   
I have been talking with David Pollak the rest of the lift team
about
adding JTA to Lift. I have implemented that for a product written
in
Scala some time ago. Now some of that code is OSS
at:http://github.com/jboner/skalman/tree
   
We used using two different APIs.
1. Annotations (would require Lift to support proxied objects,
 e.g.
grab them from a factory):
   
@TransactionAttribute(REQUIRED)
def transactionalMethod = { ... }
   
2. Call-by-name:
   
withTxRequired {
  ... // do transational stuff
   
}
   
But I don't know what fits Lift and would like to know how you
 guys
would like to have JTA integrated.
At which level? Which APIs? Etc.
   
--
Jonas Bonér
   
twitter: @jboner
blog:http://jonasboner.com
work:  http://crisp.se
work:  http://scalablesolutions.se
code:  http://github.com/jboner

   
   
   
   

   
  
  
  
   --
   Jonas Bonér
  
   twitter: @jboner
   blog:http://jonasboner.com
   work:   http://crisp.se
   work:   http://scalablesolutions.se
   code:   http://github.com/jboner
  
  
  
  
   
  
 
 
 
  --
  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
 
  
 



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

[Lift] LiftOff

2009-05-29 Thread Meredith Gregory
David,

i didn't realize the LiftOff conflicted with a long-planned participation in
a Guitar Craft course. i will definitely send good will and good wishes to
the community. i'm certain you guys will have much too much fun. Maybe i can
organize some kind of functional-computing-and-the-web event in the Pacific
Northwest in the not too distant future, so that i can catch up with
everybody.

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: How important is AJAX to you?

2009-05-29 Thread Meredith Gregory
Joe,

i love questions like this: 'what are the real requirements?'

i have no particular interest in technology like AJAX -- except as a means
to an end. i need to be able to build sites that are the web's equivalent of
CSCW apps from the late 80s/early 90s. In the web apps i'm working on users
have an experience of sharing a common space to design and edit complex
computational models and large, rich data sets.

One can imagine all sorts of technologies to do this on the existing web
infrastructure. The real issue is not having to reinvent a bunch of stuff in
order to remain focused on the very hard problems of providing the stuff
above. AJAX took off. That fact that it got embodied in a bunch of
unmaintainable crap like JavaScript -- well i'll ride that wave for a while.


Frameworks like Lift can alleviate some of the problem, but you really need
a good, statically typed language on the client side. A few people are
beginning to take this problem on. It'd be great to see a ScalaScript for
rich client-side experiences.

Best wishes,

--greg

On Fri, May 29, 2009 at 10:36 AM, Charles F. Munat c...@munat.com wrote:


 Lift makes AJAX easy, but Lift has nothing to do with AJAX. Lift makes a
 lot of things easy.

 I've built half a dozen sites in Lift so far, with several more in the
 works, and most of them use no AJAX at all.

 That said, there is a lot to be said for AJAX when used properly. I
 think you're way off on that. The problem is (as with pretty much
 everything else on the Web), it's rarely used properly. Google does it
 mostly right. Facebook is mostly a mess.

 Chas.

 Joe Wass wrote:
  This may be heresy on this list, but I'll ask it anyway. A general
  point for discussion which I'm raising because the Lift Book mentions
  AJAX early on in the PocketChange app.
 
  How important is AJAX and all the associated Web 2.0 stuff to you and
  to your projects? I'm quite happy without Javascript and AJAX. More
  often than not they're doing the kind of thing you could just as
  easily do with traditional technologies. Save for one web-app (Google
  Mail), I don't think a single site I use has been improved for it.
  Particular examples are Slashdot and Facebook. Give me good old HTML
  any day.
 
  I've got a few projects in the pipeline and I intend to use Lift for
  all of them, it looks excellent and from the source I've read very
  nicely engineered. But I will expressly avoid using anything other
  than old-fashioned HTML as much as I can, largely because I'm
  targetting browsers of unknown vintage in less economically developed
  countries and I'd like to be able to use my own site without cookies
  or javascript if I want to.
 
  Have I missed the point of Lift entirely? Am I in a small minority? Am
  I crazy?
 
  Joe
 
  

 



-- 
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] project stockholm update

2009-05-27 Thread Meredith Gregory
All,

The latest version in github now successfully generates SQL persistence
layer from the BNF.

   - git clone git://github.com/leithaus/stockholm.git
   - mvn clean compile process-classes process-classes

Note bene: the process-classes goal currently needs to be called twice to
generate the DDL scripts. Unfortunately, currently the persistence layer has
to duplicate the abstract syntax class structure. The visitor to transform
the abstract syntax classes to the persisted versions is not currently
generated. It's easy to write, but it will be auto-generated in subsequent
versions.

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: project stockholm update

2009-05-27 Thread Meredith Gregory
All,

And i've added basic support for messaging with JSON over Rabbit.

Best wishes,

--greg

On Wed, May 27, 2009 at 5:04 AM, Meredith Gregory
lgreg.mered...@gmail.comwrote:

 All,

 The latest version in github now successfully generates SQL persistence
 layer from the BNF.

- git clone git://github.com/leithaus/stockholm.git
- mvn clean compile process-classes process-classes

 Note bene: the process-classes goal currently needs to be called twice to
 generate the DDL scripts. Unfortunately, currently the persistence layer has
 to duplicate the abstract syntax class structure. The visitor to transform
 the abstract syntax classes to the persisted versions is not currently
 generated. It's easy to write, but it will be auto-generated in subsequent
 versions.

 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] JPA woes

2009-05-27 Thread Meredith Gregory
Lifted,

This little method

def handle( db : String )( contents: String ) : Unit = {
var obj : java.lang.Object = null;
try {
  obj =
new XStream(
  new JettisonMappedXmlDriver()
).fromXML( contents );

  try {
entityManager( db ).getTransaction().begin();
entityManager( db ).persist( obj );
entityManager( db ).getTransaction().commit();
  }
  catch {
case e = {
  println( persistence error )
  e.printStackTrace
}
  }
}
catch {
  case e = {
  println( marshaling error )
  e.printStackTrace
}
}
  }

is resulting in this stack trace

scala res8.handle( stockholm )( res3.toXML( res5 ) )
res8.handle( stockholm )( res3.toXML( res5 ) )
res8.handle( stockholm )( res3.toXML( res5 ) )
log4j:WARN No appenders could be found for logger
(org.hibernate.cfg.annotations.Version).
log4j:WARN Please initialize the log4j system properly.
persistence error
javax.persistence.PersistenceException:
org.hibernate.exception.SQLGrammarException: Cannot open connection
at
org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:637)
at org.hibernate.ejb.TransactionImpl.begin(TransactionImpl.java:41)
at
net.liftweb.amqp.JSONToSQLHandler$class.handle(JSONAMQPDispatcher.scala:80)
at
net.liftweb.amqp.JSONAMQPListener$JSONListener.handle(JSONAMQPDispatcher.scala:118)
...

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: JPA woes

2009-05-27 Thread Meredith Gregory
Lifted,

Whoops -- hit send too soon.

Has anyone seen this sort of thing before? i'm guessing it's a common
problem. But i'm not clear on what's causing it and my google-fu is failing
me. ;-(

Best wishes,

--greg

On Wed, May 27, 2009 at 11:22 AM, Meredith Gregory lgreg.mered...@gmail.com
 wrote:

 Lifted,

 This little method

 def handle( db : String )( contents: String ) : Unit = {
 var obj : java.lang.Object = null;
 try {
   obj =
 new XStream(
   new JettisonMappedXmlDriver()
 ).fromXML( contents );

   try {
 entityManager( db ).getTransaction().begin();
 entityManager( db ).persist( obj );
 entityManager( db ).getTransaction().commit();
   }
   catch {
 case e = {
   println( persistence error )
   e.printStackTrace
 }
   }
 }
 catch {
   case e = {
   println( marshaling error )
   e.printStackTrace
 }
 }
   }

 is resulting in this stack trace

 scala res8.handle( stockholm )( res3.toXML( res5 ) )
 res8.handle( stockholm )( res3.toXML( res5 ) )
 res8.handle( stockholm )( res3.toXML( res5 ) )
 log4j:WARN No appenders could be found for logger
 (org.hibernate.cfg.annotations.Version).
 log4j:WARN Please initialize the log4j system properly.
 persistence error
 javax.persistence.PersistenceException:
 org.hibernate.exception.SQLGrammarException: Cannot open connection
 at
 org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:637)
 at org.hibernate.ejb.TransactionImpl.begin(TransactionImpl.java:41)
 at
 net.liftweb.amqp.JSONToSQLHandler$class.handle(JSONAMQPDispatcher.scala:80)
 at
 net.liftweb.amqp.JSONAMQPListener$JSONListener.handle(JSONAMQPDispatcher.scala:118)
 ...

 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: project stockholm update

2009-05-27 Thread Meredith Gregory
Chas,

Man -- if i could get your help with a hibernate connection failure issue, i
would be ever so grateful.

Best wishes,

--greg

On Wed, May 27, 2009 at 12:07 PM, Charles F. Munat c...@munat.com wrote:


 Gh! I can't keep up. Does it ever slow down???

 Chas.

 Timothy Perrett wrote:
 
  Sweet!!!
 
  On 27/05/2009 16:20, Meredith Gregory lgreg.mered...@gmail.com
 wrote:
 
  All,
 
  And i've added basic support for messaging with JSON over Rabbit.
 
  Best wishes,
 
  --greg
 
  On Wed, May 27, 2009 at 5:04 AM, Meredith Gregory
  lgreg.mered...@gmail.com wrote:
 
  All,
 
  The latest version in github now successfully generates SQL
  persistence layer from the BNF.
 
  * git clone git://github.com/leithaus/stockholm.git
http://github.com/leithaus/stockholm.git
  * mvn clean compile process-classes process-classes
 
  Note bene: the process-classes goal currently needs to be called
  twice to generate the DDL scripts. Unfortunately, currently the
  persistence layer has to duplicate the abstract syntax class
  structure. The visitor to transform the abstract syntax classes
  to the persisted versions is not currently generated. It's easy
  to write, but it will be auto-generated in subsequent versions.
 
  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: help with JPA annotation?

2009-05-26 Thread Meredith Gregory
John,

Thanks for your response. i included in my first email query on this topic
the complete impl of ListVariableExpr, but that was a lengthy message and
it's small enough to be missed, so here it is again.

// container class generated to hold lists of variables
package com.biosimilarity.reflection.model.rlambda.Absyn; // Java Package
generated by the BNF Converter.

public class ListVariableExpr extends java.util.LinkedListVariableExpr {
}

i also checked that LinkedList implements Collection. Then i checked
hibernate documentation -- which said that if you don't have a generic you
have to provide a targetEntity annotation. i've done everything by the
book with no joy.

Best wishes,

--greg

On Mon, May 25, 2009 at 8:05 PM, John D. Heintz jhei...@gmail.com wrote:


 Hello Greg,

 What is the type of ListVariableExpr? Does Hibernate recognize that as
 a java.util.collection?

 My guess is that you need to change that type to a ListVariableExpr
 for Hibernate to do the right thing.

 That's probably not something you want to do, the alternative would be
 to implement a UserType to customize the Hibernate mapping process. I
 don't actually know how that would work with a collection type, but I
 suspect some strange incantations would work.

 Hope this helps,
 John Heintz

 On Mon, May 25, 2009 at 5:42 PM, Meredith Gregory
 lgreg.mered...@gmail.com wrote:
  All,
 
  Below are the contents of three classfiles. The first and second
 generated
  by BNFC from the grammar here. The second is a subclass generated from
 the
  first to provide persistence to the abstract syntax. My procedure is
 working
  for everything but those classes that contain collections. The call to
  hibernate via the maven-hibernate-plugin is generating the following
 error.
 
  [INFO]
  
  [ERROR] FATAL ERROR
  [INFO]
  
  [INFO] org.hibernate.AnnotationException: Illegal attempt to map a non
  collection as a @OneToMany, @ManyToMany or @CollectionOfElements:
 
 com.biosimilarity.reflection.model.rlambda.Absyn.persistence.sql.AbstractionResource.listvariableexpr_
  [INFO]
  
  [INFO] Trace
  javax.persistence.PersistenceException:
 org.hibernate.AnnotationException:
  Illegal attempt to map a non collection as a @OneToMany, @ManyToMany or
  @CollectionOfElements:
 
 com.biosimilarity.reflection.model.rlambda.Absyn.persistence.sql.AbstractionResource.listvariableexpr_
  at
  org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:247)
  at
 
 org.codehaus.mojo.hibernate3.configuration.JPAComponentConfiguration.createConfiguration(JPAComponentConfiguration.java:26)
  ...
 
  However, as the contents of the second class indicate, the member is
 clearly
  a collection. Is it that hibernate can't deal with subclasses of
  collections?
 
  Best wishes,
 
  --greg
 
 
  // class generated for abstractions
  package com.biosimilarity.reflection.model.rlambda.Absyn; // Java Package
  generated by the BNF Converter.
 
  public class Abstraction extends Expression {
public final ListVariableExpr listvariableexpr_;
public final Expression expression_;
 
public Abstraction(ListVariableExpr p1, Expression p2) {
 listvariableexpr_
  = p1; expression_ = p2; }
 
public R,A R
 
 accept(com.biosimilarity.reflection.model.rlambda.Absyn.Expression.VisitorR,A
  v, A arg) { return v.visit(this, arg); }
 
public boolean equals(Object o) {
  if (this == o) return true;
  if (o instanceof
  com.biosimilarity.reflection.model.rlambda.Absyn.Abstraction) {
com.biosimilarity.reflection.model.rlambda.Absyn.Abstraction x =
  (com.biosimilarity.reflection.model.rlambda.Absyn.Abstraction)o;
return this.listvariableexpr_.equals(x.listvariableexpr_) 
  this.expression_.equals(x.expression_);
  }
  return false;
}
 
public int hashCode() {
  return
  37*(this.listvariableexpr_.hashCode())+this.expression_.hashCode();
}
 
 
  }
 
  // container class generated to hold lists of variables
  package com.biosimilarity.reflection.model.rlambda.Absyn; // Java Package
  generated by the BNF Converter.
 
  public class ListVariableExpr extends java.util.LinkedListVariableExpr
 {
  }
 
 
  // Generated by stockholm to add persistence to abstraction class
 
  package com.biosimilarity.reflection.model.rlambda.Absyn.persistence.sql;
 
  import javax.persistence.CascadeType;
  import javax.persistence.Column;
  import javax.persistence.Entity;
  import javax.persistence.FetchType;
  import javax.persistence.Id;
  import javax.persistence.OneToMany;
  import javax.persistence.Table;
  import javax.persistence.UniqueConstraint;
  import java.util.Date;
  import java.util.HashSet;
  import java.util.Set;
  import java.util.Iterator;
  import java.net.URI;
  import

[Lift] Re: help with JPA annotation?

2009-05-26 Thread Meredith Gregory
John,

Thanks for your suggestions. It appears that there are two problems that
come together, here.

   - The custom subclass is actually a container for an abstract super class
   of the possible concrete content classes. Only the concrete subclasses have
   been given JPA annotations. In full generality, i've got to avail myself of
   some single-table-inheritance (STI) strategy to push this through.
   - i don't really have full control of the container class used -- unless
   i write my own trampoline. The JPA annotated class is generated from a class
   that is generated from a BNF Converter spec. They chose to implement lists
   in this way.

It's easy to generate a trampoline -- which i can use to test the first
level of the problem. The STI is a bit more involved.

Best wishes,

--greg

On Tue, May 26, 2009 at 9:21 AM, John D. Heintz jhei...@gmail.com wrote:


 I think I know, the custom subclass is breaking things.

 From
 http://docs.jboss.org/hibernate/stable/annotations/reference/en/html/entity.html#entity-mapping-association-collections
 You can map Collection, List (ie ordered lists, not indexed lists),
 Map and Set

 These are the interfaces, not any concrete class. The reason is that
 at runtime Hibernate will replace the property with a Hibernate
 subclass of Collection or List that has the magic lazy-loading and
 query caching details in it.

 I think a viable strategy for you would be to:
 * expose a ListVariableExpr instead of a LinkedList subclass

 That loses two of the features you wanted: linkedList and specialized type
 name.

 I think the LinkedList just isn't persistable, and the second could be
 re-obtained by providing a secondary method that wraps the primary
 collection list with a new one for typing purposes.

 Cheers,
 John

 ps - I prefer to annotate fields, not methods. It lets me alter the
 persistence and public interfaces separately.

 On Tue, May 26, 2009 at 7:59 AM, Meredith Gregory
 lgreg.mered...@gmail.com wrote:
  John,
 
  Thanks for your response. i included in my first email query on this
 topic
  the complete impl of ListVariableExpr, but that was a lengthy message and
  it's small enough to be missed, so here it is again.
 
  // container class generated to hold lists of variables
  package com.biosimilarity.reflection.
  model.rlambda.Absyn; // Java Package generated by the BNF Converter.
 
  public class ListVariableExpr extends java.util.LinkedListVariableExpr
 {
  }
  i also checked that LinkedList implements Collection. Then i checked
  hibernate documentation -- which said that if you don't have a generic
 you
  have to provide a targetEntity annotation. i've done everything by the
  book with no joy.
 
  Best wishes,
 
  --greg
 
  On Mon, May 25, 2009 at 8:05 PM, John D. Heintz jhei...@gmail.com
 wrote:
 
  Hello Greg,
 
  What is the type of ListVariableExpr? Does Hibernate recognize that as
  a java.util.collection?
 
  My guess is that you need to change that type to a ListVariableExpr
  for Hibernate to do the right thing.
 
  That's probably not something you want to do, the alternative would be
  to implement a UserType to customize the Hibernate mapping process. I
  don't actually know how that would work with a collection type, but I
  suspect some strange incantations would work.
 
  Hope this helps,
  John Heintz
 
  On Mon, May 25, 2009 at 5:42 PM, Meredith Gregory
  lgreg.mered...@gmail.com wrote:
   All,
  
   Below are the contents of three classfiles. The first and second
   generated
   by BNFC from the grammar here. The second is a subclass generated from
   the
   first to provide persistence to the abstract syntax. My procedure is
   working
   for everything but those classes that contain collections. The call to
   hibernate via the maven-hibernate-plugin is generating the following
   error.
  
   [INFO]
  
 
   [ERROR] FATAL ERROR
   [INFO]
  
 
   [INFO] org.hibernate.AnnotationException: Illegal attempt to map a non
   collection as a @OneToMany, @ManyToMany or @CollectionOfElements:
  
  
 com.biosimilarity.reflection.model.rlambda.Absyn.persistence.sql.AbstractionResource.listvariableexpr_
   [INFO]
  
 
   [INFO] Trace
   javax.persistence.PersistenceException:
   org.hibernate.AnnotationException:
   Illegal attempt to map a non collection as a @OneToMany, @ManyToMany
 or
   @CollectionOfElements:
  
  
 com.biosimilarity.reflection.model.rlambda.Absyn.persistence.sql.AbstractionResource.listvariableexpr_
   at
  
  
 org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:247)
   at
  
  
 org.codehaus.mojo.hibernate3.configuration.JPAComponentConfiguration.createConfiguration(JPAComponentConfiguration.java:26)
   ...
  
   However, as the contents of the second class indicate

[Lift] help with JPA annotation?

2009-05-25 Thread Meredith Gregory
All,

Below are the contents of three classfiles. The first and second generated
by BNFC from the grammar
herehttp://github.com/leithaus/stockholm/blob/c64f6287a986c8f9f05220e5d3efd5dbfaad9c69/src/main/bnfc/rlambda.cf.
The second is a subclass generated from the first to provide persistence to
the abstract syntax. My procedure is working for everything but those
classes that contain collections. The call to hibernate via the
maven-hibernate-plugin is generating the following error.

[INFO]

[ERROR] FATAL ERROR
[INFO]

[INFO] org.hibernate.AnnotationException: Illegal attempt to map a non
collection as a @OneToMany, @ManyToMany or @CollectionOfElements:
com.biosimilarity.reflection.model.rlambda.Absyn.persistence.sql.AbstractionResource.listvariableexpr_
[INFO]

[INFO] Trace
javax.persistence.PersistenceException: org.hibernate.AnnotationException:
Illegal attempt to map a non collection as a @OneToMany, @ManyToMany or
@CollectionOfElements:
com.biosimilarity.reflection.model.rlambda.Absyn.persistence.sql.AbstractionResource.listvariableexpr_
at
org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:247)
at
org.codehaus.mojo.hibernate3.configuration.JPAComponentConfiguration.createConfiguration(JPAComponentConfiguration.java:26)
...

However, as the contents of the second class indicate, the member is clearly
a collection. Is it that hibernate can't deal with subclasses of
collections?

Best wishes,

--greg


// class generated for abstractions
package com.biosimilarity.reflection.model.rlambda.Absyn; // Java Package
generated by the BNF Converter.

public class Abstraction extends Expression {
  public final ListVariableExpr listvariableexpr_;
  public final Expression expression_;

  public Abstraction(ListVariableExpr p1, Expression p2) { listvariableexpr_
= p1; expression_ = p2; }

  public R,A R
accept(com.biosimilarity.reflection.model.rlambda.Absyn.Expression.VisitorR,A
v, A arg) { return v.visit(this, arg); }

  public boolean equals(Object o) {
if (this == o) return true;
if (o instanceof
com.biosimilarity.reflection.model.rlambda.Absyn.Abstraction) {
  com.biosimilarity.reflection.model.rlambda.Absyn.Abstraction x =
(com.biosimilarity.reflection.model.rlambda.Absyn.Abstraction)o;
  return this.listvariableexpr_.equals(x.listvariableexpr_) 
this.expression_.equals(x.expression_);
}
return false;
  }

  public int hashCode() {
return
37*(this.listvariableexpr_.hashCode())+this.expression_.hashCode();
  }


}

// container class generated to hold lists of variables
package com.biosimilarity.reflection.model.rlambda.Absyn; // Java Package
generated by the BNF Converter.

public class ListVariableExpr extends java.util.LinkedListVariableExpr {
}


// Generated by stockholm to add persistence to abstraction class

package com.biosimilarity.reflection.model.rlambda.Absyn.persistence.sql;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import java.util.Iterator;
import java.net.URI;
import com.biosimilarity.reflection.model.rlambda.Absyn.*;
import com.biosimilarity.reflection.model.rlambda.Absyn.persistence.sql.*;

@Entity
@Table(name = Abstraction_table, catalog = rlambda_production,
uniqueConstraints = { @UniqueConstraint(columnNames = uuid) })
public class AbstractionResource extends Abstraction {

private String uuid;

private String id;

public AbstractionResource(ListVariableExpr listvariableexpr_,
Expression expression_) {
super(listvariableexpr_, expression_);
}

@Id
@Column(name = uuid, unique = true, nullable = false, insertable =
true, updatable = true)
public String getUuid() {
return this.uuid;
}

public void setUuid(String id) {
this.uuid = id;
}

@Id
@Column(name = id, unique = true, nullable = false, insertable = true,
updatable = true)
public String getId() {
return this.uuid;
}

public void setId(String id) {
this.uuid = id;
}

@OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY,
mappedBy = AbstractionResource)
public ListVariableExpr getListvariableexpr_() {
return this.listvariableexpr_;
}

@Column(name = expression_, unique = false, nullable = true,
insertable = true, updatable = true)
public Expression getExpression_() {
return this.expression_;
}
}


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

+1 206.650.3740


[Lift] Re: help with JPA annotation?

2009-05-25 Thread Meredith Gregory
All,

Based on some web documentation i found for the OneToMany annotation, i
modified my compiler's output to generate

@OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY, mappedBy =
abstractionResource, targetEntity = VariableExpr.class)
public ListVariableExpr getListvariableexpr_() {
return this.listvariableexpr_;
}

instead of

@OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY, mappedBy =
AbstractionResource)
public ListVariableExpr getListvariableexpr_() {
return this.listvariableexpr_;
}

and i still get the same error

16:44:08,780  INFO org.hibernate.cfg.annotations.EntityBinder - Bind entity
com.biosimilarity.reflection.model.rlambda.Absyn.persistence.sql.AbstractionResource
on table Abstraction_table
[INFO]

[ERROR] FATAL ERROR
[INFO]

[INFO] org.hibernate.AnnotationException: Illegal attempt to map a non
collection as a @OneToMany, @ManyToMany or @CollectionOfElements:
com.biosimilarity.reflection.model.rlambda.Absyn.persistence.sql.AbstractionResource.listvariableexpr_
[INFO]

[INFO] Trace
javax.persistence.PersistenceException: org.hibernate.AnnotationException:
Illegal attempt to map a non collection as a @OneToMany, @ManyToMany or
@CollectionOfElements:
com.biosimilarity.reflection.model.rlambda.Absyn.persistence.sql.AbstractionResource.listvariableexpr_
at
org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:247)
at
org.codehaus.mojo.hibernate3.configuration.JPAComponentConfiguration.createConfiguration(JPAComponentConfiguration.java:26)

...

Best wishes,

--greg

On Mon, May 25, 2009 at 3:42 PM, Meredith Gregory
lgreg.mered...@gmail.comwrote:

 All,

 Below are the contents of three classfiles. The first and second generated
 by BNFC from the grammar 
 herehttp://github.com/leithaus/stockholm/blob/c64f6287a986c8f9f05220e5d3efd5dbfaad9c69/src/main/bnfc/rlambda.cf.
 The second is a subclass generated from the first to provide persistence to
 the abstract syntax. My procedure is working for everything but those
 classes that contain collections. The call to hibernate via the
 maven-hibernate-plugin is generating the following error.

 [INFO]
 
 [ERROR] FATAL ERROR
 [INFO]
 
 [INFO] org.hibernate.AnnotationException: Illegal attempt to map a non
 collection as a @OneToMany, @ManyToMany or @CollectionOfElements:
 com.biosimilarity.reflection.model.rlambda.Absyn.persistence.sql.AbstractionResource.listvariableexpr_
 [INFO]
 
 [INFO] Trace
 javax.persistence.PersistenceException: org.hibernate.AnnotationException:
 Illegal attempt to map a non collection as a @OneToMany, @ManyToMany or
 @CollectionOfElements:
 com.biosimilarity.reflection.model.rlambda.Absyn.persistence.sql.AbstractionResource.listvariableexpr_
 at
 org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:247)
 at
 org.codehaus.mojo.hibernate3.configuration.JPAComponentConfiguration.createConfiguration(JPAComponentConfiguration.java:26)
 ...

 However, as the contents of the second class indicate, the member is
 clearly a collection. Is it that hibernate can't deal with subclasses of
 collections?

 Best wishes,

 --greg


 // class generated for abstractions
 package com.biosimilarity.reflection.model.rlambda.Absyn; // Java Package
 generated by the BNF Converter.

 public class Abstraction extends Expression {
   public final ListVariableExpr listvariableexpr_;
   public final Expression expression_;

   public Abstraction(ListVariableExpr p1, Expression p2) {
 listvariableexpr_ = p1; expression_ = p2; }

   public R,A R
 accept(com.biosimilarity.reflection.model.rlambda.Absyn.Expression.VisitorR,A
 v, A arg) { return v.visit(this, arg); }

   public boolean equals(Object o) {
 if (this == o) return true;
 if (o instanceof
 com.biosimilarity.reflection.model.rlambda.Absyn.Abstraction) {
   com.biosimilarity.reflection.model.rlambda.Absyn.Abstraction x =
 (com.biosimilarity.reflection.model.rlambda.Absyn.Abstraction)o;
   return this.listvariableexpr_.equals(x.listvariableexpr_) 
 this.expression_.equals(x.expression_);
 }
 return false;
   }

   public int hashCode() {
 return
 37*(this.listvariableexpr_.hashCode())+this.expression_.hashCode();
   }


 }

 // container class generated to hold lists of variables
 package com.biosimilarity.reflection.model.rlambda.Absyn; // Java Package
 generated by the BNF Converter.

 public class ListVariableExpr extends java.util.LinkedListVariableExpr {
 }


 // Generated by stockholm to add persistence to abstraction class

 package

[Lift] Re: [scala] project stockholm

2009-05-22 Thread Meredith Gregory
Christos,

It would be easy to target Scala. However, since it targets Java, i've not
yet seen the need.

Best wishes,

--greg

On Fri, May 22, 2009 at 1:59 AM, Christos KK Loverdos lover...@gmail.comwrote:

 Hi Greg,
 I didn't know of BNFC until you mentioned it in the Scala lists some time
 ago and I admit I find it very interesting. Since it is apparent you know
 the software, I was wondering how easy would it be to add support for Scala
 as an output language.

 Christos.


 On Fri, May 22, 2009 at 05:13, Meredith Gregory 
 lgreg.mered...@gmail.comwrote:

 All,

 i've been working in earnest on a little open source project for DSL
 generation that my wife suggested i call stockholm (whom am i to argue).
 At this point it's just about syntax, not execution. From a BNF file you
 generate

- a web-hosted parser/repl
- the abstract syntax class of the parser support visitor pattern
traversal
- a set of subclasses that map the abstract syntax to store
   - right now i've got SQL via a JPA layer
   - shortly i will also have an XML persistence layer via DBXML

 Slightly burdensome dependencies

- i use BNFC which means you need Haskell + Happy + Alex installed on
your system. (On a mac this is port install Haskell, port install Happy,
port install Alex.)
- When the XML persistence comes on line there will be a dependency on
DBXML.
- Neither of these dependencies play nicely with maven. i've got some
strategies for workin around this for the parser generator, but not for 
 the
XML persistence layer.

 In a not too distant release i will add some support for specifying and
 generating operational semantics via techniques borrowed from Peter Sewell's
 Ott.

 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




 --
  __~O
 -\ ,   Christos KK Loverdos
 (*)/ (*)  http://ckkloverdos.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
-~--~~~~--~~--~--~---



  1   2   3   >