[Lift] rendering embedded svg

2009-01-04 Thread Meredith Gregory
Lifted,

Here http://svn.biosimilarity.com/src/open/GraphL/trunk/ you will find the
source code for a Scala+Lift application in progress. It's a demonstration
of a compositional (read algebraic datatype) for graphs. If you've got
graphviz installed and the dot program on your path, then

 mvn jetty:run

followed by pointing your browser at localhost:8080 should do the trick. (If
not, i'd be grateful if you'd let me know what you do see.)

In the current state of things, i've got a little repl with a small window
in which to type expressions. Pressing the 'go' button evaluates the expr to
a normal form for the graph and renders it as svg. However, what's happening
currently is that instead of rendering the svg as a drawing it prints out
the text of the svg.

i note that if i point a browser at the svg (with header) it renders as a
drawing. i also note that if i take the svg and put it inside a static lift
page (with the lift:surround tag surrounding it) and add that to the site
menu, it renders as a drawing. Obviously, i'm not doing something right in
the REPLForm code. Any clues would be greatly appreciated.

Best wishes,

--greg

-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105

+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: rendering embedded svg

2009-01-04 Thread Meredith Gregory
Lifted,
i see my problem with the svg -- forgot to build the nodes from the string.
As usual, my stupidity overfloweth.

Best wishes,

--greg

On Sun, Jan 4, 2009 at 10:10 PM, Meredith Gregory
lgreg.mered...@gmail.comwrote:

 Lifted,

 Here http://svn.biosimilarity.com/src/open/GraphL/trunk/ you will find
 the source code for a Scala+Lift application in progress. It's a
 demonstration of a compositional (read algebraic datatype) for graphs. If
 you've got graphviz installed and the dot program on your path, then

  mvn jetty:run

 followed by pointing your browser at localhost:8080 should do the trick.
 (If not, i'd be grateful if you'd let me know what you do see.)

 In the current state of things, i've got a little repl with a small window
 in which to type expressions. Pressing the 'go' button evaluates the expr to
 a normal form for the graph and renders it as svg. However, what's happening
 currently is that instead of rendering the svg as a drawing it prints out
 the text of the svg.

 i note that if i point a browser at the svg (with header) it renders as a
 drawing. i also note that if i take the svg and put it inside a static lift
 page (with the lift:surround tag surrounding it) and add that to the site
 menu, it renders as a drawing. Obviously, i'm not doing something right in
 the REPLForm code. Any clues would be greatly appreciated.

 Best wishes,

 --greg

 --
 L.G. Meredith
 Managing Partner
 Biosimilarity LLC
 806 55th St NE
 Seattle, WA 98105

 +1 206.650.3740

 http://biosimilarity.blogspot.com




-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105

+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] Questions about User object and class

2009-01-05 Thread Meredith Gregory
Lifted,

i'm looking at this code in
githubhttp://github.com/dpp/liftweb/tree/master/lift-mapper/src/main/scala/net/liftweb/mapper/ProtoUser.scala.
Lines 258 and 274 - 279 would indicate to me that an object derived from
this class -- as i think the User object is in the std lift project
archetype -- would be able to manipulate onLogOut. However, placing this
code

/**
 * The singleton that has methods for accessing the database
 */
object User extends User with MetaMegaProtoUser[User, User with
KeyedMetaMapper[Long, User]] {
...
def wantsToKnow() : Boolean = {
this.onLogOut = (({ x = _wantsToKnow = false}) :: this.onLogOut)
_wantsToKnow
  }
...
}

in the object's def results in this complaint

[WARNING]
/Users/lgm/work/src/projex/biosimilarity/GraphL/src/main/scala/com/biosimilarity/GraphL/model/User.scala:23:
error: value onLogOut is not a member of object
com.biosimilarity.GraphL.model.User
[WARNING] this.onLogOut = (({ x = _wantsToKnow = false}) ::
this.onLogOut)
[WARNING]  ^
[WARNING] one error found
[INFO]

[ERROR] BUILD FAILURE

Also, what gives with the *two* type parameters to MetaMegaProtoUser --
which as declared in lift-util.mapper appears to take only 1 type parameter?

Clueless about lift, but still sending best wishes in the New Year,

--greg

-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105

+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] testing 1 2 3

2009-01-07 Thread Meredith Gregory
Lifted,

My mail to this list seems to be bouncing.

Best wishes,

--greg

-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105

+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] neophyte lift ajax question

2009-01-12 Thread Meredith Gregory
Lifted,

i have been using the AJAXForm example from the hellodarwin sample as a
template for my simple little experiments with lift. Occasionally, i have
gotten

XML Parsing Error: prefix not bound to a namespace
Location: http://localhost:8080/AJAXREPLForm
Line Number 72, Column 46:label for=whatFieldTerm
:/labelhello:whatField /
-^

when i try to visit my little AJAXForm. This is troublesome for two reasons.

   - often i just recopy and reedit a site that appears to work -- with the
   same edits -- and it just works.
   - after some digging i think this complaint is legit and wonder how it
   could work in the hellodarwin ajax example -- how is the 'hello' namespace
   being setup in the hellodarwin ajax example?

i hate to be asking questions of this type, but i can find no documentation
to help sort this out.

Best wishes,

--greg

-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105

+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: neophyte lift ajax question

2009-01-12 Thread Meredith Gregory
Chas,

That's exactly what i thought. But, that would be a bug -- unless i've
misunderstood something -- because, then the effect of the bind is bleeding
over into the behavior of the ajax form.

Best wishes,

--greg

On Mon, Jan 12, 2009 at 1:19 PM, Charles F. Munat c...@munat.com wrote:


 Greg,

 The hello namespace is set up in the call to bind in HelloForm2.scala:

 class HelloForm2 {
   object who extends RequestVar(Full(world))

   def show(xhtml: NodeSeq): NodeSeq = {
 bind(hello, xhtml,
 whoField - text(who.openOr(), v = who(Full(v))) % (size
 - 10) % (id - whoField),
 submit - submit(?(Send), () = println(value: +
 who.openOr() +  ::  + param(whoField))),
 who - who.openOr()
 )
   }
 }

 Note the bind(hello, above.

 Not sure if I'm understanding your question exactly, but hope that helps.

 Chas.

 Meredith Gregory wrote:
  Lifted,
 
  i have been using the AJAXForm example from the hellodarwin sample as a
  template for my simple little experiments with lift. Occasionally, i
  have gotten
 
  XML Parsing Error: prefix not bound to a namespace
  Location: http://localhost:8080/AJAXREPLForm
  Line Number 72, Column 46:label for=whatFieldTerm
  :/labelhello:whatField /
  -^
 
  when i try to visit my little AJAXForm. This is troublesome for two
 reasons.
 
  * often i just recopy and reedit a site that appears to work -- with
the same edits -- and it just works.
  * after some digging i think this complaint is legit and wonder how
it could work in the hellodarwin ajax example -- how is the
'hello' namespace being setup in the hellodarwin ajax example?
 
  i hate to be asking questions of this type, but i can find no
  documentation to help sort this out.
 
  Best wishes,
 
  --greg
 
  --
  L.G. Meredith
  Managing Partner
  Biosimilarity LLC
  806 55th St NE
  Seattle, WA 98105
 
  +1 206.650.3740
 
  http://biosimilarity.blogspot.com
 
  

 



-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105

+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: neophyte lift ajax question

2009-01-12 Thread Meredith Gregory
Chas, et al,

To clarify

   -  Suppose you only had the ajax form in the site menu. You would never
   call the bind. So, the namespace would not be set up and the form
   should/would not work.
   - Additionally, in the given sample application the behavior associated
   to the widgets in HelloForm2 is not (necessarily) the behavior in the
   ajaxform. So, that's also a source of confusing erroneous behavior, as i
   expect the user to see the behavior from the bind.
   - Furthermore, if you have the set up as in bullet one and make a call to
   bind before returning the xml:group, you still get the unknown namespace
   error.

Best wishes,

--greg

On Mon, Jan 12, 2009 at 1:22 PM, Meredith Gregory
lgreg.mered...@gmail.comwrote:

 Chas,

 That's exactly what i thought. But, that would be a bug -- unless i've
 misunderstood something -- because, then the effect of the bind is bleeding
 over into the behavior of the ajax form.

 Best wishes,

 --greg


 On Mon, Jan 12, 2009 at 1:19 PM, Charles F. Munat c...@munat.com wrote:


 Greg,

 The hello namespace is set up in the call to bind in HelloForm2.scala:

 class HelloForm2 {
   object who extends RequestVar(Full(world))

   def show(xhtml: NodeSeq): NodeSeq = {
 bind(hello, xhtml,
 whoField - text(who.openOr(), v = who(Full(v))) % (size
 - 10) % (id - whoField),
 submit - submit(?(Send), () = println(value: +
 who.openOr() +  ::  + param(whoField))),
 who - who.openOr()
 )
   }
 }

 Note the bind(hello, above.

 Not sure if I'm understanding your question exactly, but hope that helps.

 Chas.

 Meredith Gregory wrote:
  Lifted,
 
  i have been using the AJAXForm example from the hellodarwin sample as a
  template for my simple little experiments with lift. Occasionally, i
  have gotten
 
  XML Parsing Error: prefix not bound to a namespace
  Location: http://localhost:8080/AJAXREPLForm
  Line Number 72, Column 46:label for=whatFieldTerm
  :/labelhello:whatField /
  -^
 
  when i try to visit my little AJAXForm. This is troublesome for two
 reasons.
 
  * often i just recopy and reedit a site that appears to work -- with
the same edits -- and it just works.
  * after some digging i think this complaint is legit and wonder how
it could work in the hellodarwin ajax example -- how is the
'hello' namespace being setup in the hellodarwin ajax example?
 
  i hate to be asking questions of this type, but i can find no
  documentation to help sort this out.
 
  Best wishes,
 
  --greg
 
  --
  L.G. Meredith
  Managing Partner
  Biosimilarity LLC
  806 55th St NE
  Seattle, WA 98105
 
  +1 206.650.3740
 
  http://biosimilarity.blogspot.com
 
  

 



 --
 L.G. Meredith
 Managing Partner
 Biosimilarity LLC
 806 55th St NE
 Seattle, WA 98105

 +1 206.650.3740

 http://biosimilarity.blogspot.com




-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105

+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] scalac java compilation

2009-01-13 Thread Meredith Gregory
Scalads and lasses,

i believe i've hit a bug in the scalac java compilation. i'm not 100%
certain. To verify i need a way to tell scalac *not* to compile java files
in the mvn build process for a lift app.

i will briefly describe a portion of my build process. i'm building several
DSLs. i use BNFC to rapid prototype the grammars the build the java parsers.
Then i use the parsers in scala+lift applications. The reason i mention this
is because BNFC squirts out a makefile to build the java. So, i've got a
standalone build using gnu make just for the java parser. i can compare this
to mvn build. The parser is included in the model part of a lift app and
built using the mvn build system.

i just made a change to a parser and verified it builds and works as a java
parser. Then i essentially copied the working code into the lift app. Note,
when i build my app with mvn i've got the javac compilation line configured
to show the command line. So, when i hit the following error, i'm pretty
sure this is coming from the scalac compiler. Since the file in question
compiles just fine, i'm fairly certain this is a bug in scalac.

i can make all the code available, but i really, really don't have the
cycles just now to reduce this to a smallest test case. i don't have to be
blocked it i can just stop scalac from compiling the java files.

Best wishes,

--greg

-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105

+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: scalac java compilation

2009-01-13 Thread Meredith Gregory
Scalads and lasses,

i forgot to put the error in.

Best wishes,

--greg

[INFO] [compiler:compile]
[INFO] Compiling 139 source files to
/Users/lgm/work/src/projex/bobj/naturalselection/target/classes
[INFO]

[ERROR] BUILD FAILURE
[INFO]

[INFO] Compilation failure
/Users/lgm/work/src/projex/bobj/naturalselection/src/main/scala/com/biosimilarity/naturalselection/model/dataset/Absyn/TupleStructCond.java:[8,136]
visit(com.biosimilarity.naturalselection.model.dataset.Absyn.TupleValCond,A)
in
com.biosimilarity.naturalselection.model.dataset.Absyn.StructureTupleCondition.VisitorR,A
cannot be applied to
(com.biosimilarity.naturalselection.model.dataset.Absyn.TupleStructCond,A)



/Users/lgm/work/src/projex/bobj/naturalselection/src/main/scala/com/biosimilarity/naturalselection/model/dataset/Absyn/TupleStructCond.java:[8,136]
visit(com.biosimilarity.naturalselection.model.dataset.Absyn.TupleValCond,A)
in
com.biosimilarity.naturalselection.model.dataset.Absyn.StructureTupleCondition.VisitorR,A
cannot be applied to
(com.biosimilarity.naturalselection.model.dataset.Absyn.TupleStructCond,A)


[INFO]


On Tue, Jan 13, 2009 at 11:34 AM, Meredith Gregory lgreg.mered...@gmail.com
 wrote:

 Scalads and lasses,

 i believe i've hit a bug in the scalac java compilation. i'm not 100%
 certain. To verify i need a way to tell scalac *not* to compile java files
 in the mvn build process for a lift app.

 i will briefly describe a portion of my build process. i'm building several
 DSLs. i use BNFC to rapid prototype the grammars the build the java parsers.
 Then i use the parsers in scala+lift applications. The reason i mention this
 is because BNFC squirts out a makefile to build the java. So, i've got a
 standalone build using gnu make just for the java parser. i can compare this
 to mvn build. The parser is included in the model part of a lift app and
 built using the mvn build system.

 i just made a change to a parser and verified it builds and works as a java
 parser. Then i essentially copied the working code into the lift app. Note,
 when i build my app with mvn i've got the javac compilation line configured
 to show the command line. So, when i hit the following error, i'm pretty
 sure this is coming from the scalac compiler. Since the file in question
 compiles just fine, i'm fairly certain this is a bug in scalac.

 i can make all the code available, but i really, really don't have the
 cycles just now to reduce this to a smallest test case. i don't have to be
 blocked it i can just stop scalac from compiling the java files.

 Best wishes,

 --greg

 --
 L.G. Meredith
 Managing Partner
 Biosimilarity LLC
 806 55th St NE
 Seattle, WA 98105

 +1 206.650.3740

 http://biosimilarity.blogspot.com




-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105

+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: scalac java compilation

2009-01-13 Thread Meredith Gregory
Josh,

Thanks for the response. Just to be clear, is the plugin in question the one
listed below? What is the configuration that gets me the 2.8 version?

Best wishes,

--greg

plugin
groupIdorg.scala-tools/groupId
artifactIdmaven-scala-plugin/artifactId
executions
  execution
goals
  goalcompile/goal
  goaltestCompile/goal
/goals
  /execution
/executions
configuration
  scalaVersion${scala.version}/scalaVersion
/configuration
  /plugin

On Tue, Jan 13, 2009 at 11:42 AM, Josh Suereth joshua.suer...@gmail.comwrote:

 Use an older version of the maven plugin (like 2.8) *or* wait till I have
 the free time to make the option.

 -Josh


 On Tue, Jan 13, 2009 at 2:34 PM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Scalads and lasses,

 i believe i've hit a bug in the scalac java compilation. i'm not 100%
 certain. To verify i need a way to tell scalac *not* to compile java files
 in the mvn build process for a lift app.

 i will briefly describe a portion of my build process. i'm building
 several DSLs. i use BNFC to rapid prototype the grammars the build the java
 parsers. Then i use the parsers in scala+lift applications. The reason i
 mention this is because BNFC squirts out a makefile to build the java. So,
 i've got a standalone build using gnu make just for the java parser. i can
 compare this to mvn build. The parser is included in the model part of a
 lift app and built using the mvn build system.

 i just made a change to a parser and verified it builds and works as a
 java parser. Then i essentially copied the working code into the lift app.
 Note, when i build my app with mvn i've got the javac compilation line
 configured to show the command line. So, when i hit the following error, i'm
 pretty sure this is coming from the scalac compiler. Since the file in
 question compiles just fine, i'm fairly certain this is a bug in scalac.

 i can make all the code available, but i really, really don't have the
 cycles just now to reduce this to a smallest test case. i don't have to be
 blocked it i can just stop scalac from compiling the java files.

 Best wishes,

 --greg

 --
 L.G. Meredith
 Managing Partner
 Biosimilarity LLC
 806 55th St NE
 Seattle, WA 98105

 +1 206.650.3740

 http://biosimilarity.blogspot.com




 



-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105

+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] was there a breaking change to lift?

2009-01-14 Thread Meredith Gregory
Lifted,

i've got a lift app that was working just fine until i

   - mvn clean; mvn -U compile; mvn jetty:run

Now i'm getting when i point the browser at localhost:8080

HTTP ERROR: 500

net.liftweb.http.SessionMaster$.mailbox_$eq(Lscala/actors/MessageQueue;)V

RequestURI=/
Caused by:

java.lang.AbstractMethodError:
net.liftweb.http.SessionMaster$.mailbox_$eq(Lscala/actors/MessageQueue;)V
at scala.actors.Actor$class.$init$(Actor.scala:369)
at net.liftweb.http.SessionMaster$.(LiftSession.scala:59)
at net.liftweb.http.SessionMaster$.(LiftSession.scala)
at net.liftweb.http.LiftRules$.rewriteTable(LiftRules.scala:311)
at net.liftweb.http.LiftFilter.doFilter(LiftServlet.scala:403)
at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1115)
at 
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:361)
at 
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at 
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at 
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:417)
at 
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
at 
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at 
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at 
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:534)
at 
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:864)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:533)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:207)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:403)
at 
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
at 
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:522)

*Powered by Jetty:// http://jetty.mortbay.org/*


Best wishes,

--greg

-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105

+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: was there a breaking change to lift?

2009-01-14 Thread Meredith Gregory
David,

Thanks for the suggestion. i tried it, but still no joy.

Best wishes,

--greg

On Wed, Jan 14, 2009 at 2:22 PM, David Pollak feeder.of.the.be...@gmail.com
 wrote:

 Greg,
 Please remove your Maven repository (rm -rf ~/.m2) and see if that fixes
 things.

 Thanks,

 David


 On Wed, Jan 14, 2009 at 2:17 PM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 David,

 Thanks for the quick response. Unfortunately, i still see the same
 behavior.

 Best wishes,

 --greg

 Here's the relevant fragment of my pom.xml

 project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=
 http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=
 http://maven.apache.org/POM/4.0.0
 http://maven.apache.org/maven-v4_0_0.xsd;
   modelVersion4.0.0/modelVersion
   groupIdcom.biosimilarity.naturalselection/groupId
   artifactIdnaturalselection/artifactId
   version1.0-SNAPSHOT/version
   packagingwar/packaging
   namenaturalselection/name
   inceptionYear2007/inceptionYear
   properties
 scala.version2.7.3/scala.version
   /properties
 ...
 /project

 bash-3.2$ mvn clean; mvn compile; mvn jetty:run
 [INFO] Scanning for projects...
 [INFO]
 
 [INFO] Building naturalselection
 [INFO]task-segment: [clean]
 [INFO]
 
 [INFO] [clean:clean]
 [INFO] Deleting directory
 /Users/lgm/work/src/projex/bobj/naturalselection/target
 [INFO]
 
 [INFO] BUILD SUCCESSFUL
 [INFO]
 
 [INFO] Total time: 1 second
 [INFO] Finished at: Wed Jan 14 14:13:48 PST 2009
 [INFO] Final Memory: 6M/10M
 [INFO]
 
 [INFO] Scanning for projects...
 [INFO]
 
 [INFO] Building naturalselection
 [INFO]task-segment: [compile]
 [INFO]
 
 [INFO] [resources:resources]
 [INFO] Using default encoding to copy filtered resources.
 [INFO] [yuicompressor:compress {execution: default}]
 [INFO] nb warnings: 0, nb errors: 0
 [WARNING] POM for 'org.igniterealtime.smack:smack:pom:3.0.4:compile' is
 invalid. It will be ignored for artifact resolution. Reason: Not a v4.0.0
 POM. for project org.igniterealtime.smack:smack at
 /Users/lgm/.m2/repository/org/igniterealtime/smack/smack/3.0.4/smack-3.0.4.pom
 [WARNING] POM for 'org.igniterealtime.smack:smackx:pom:3.0.4:compile' is
 invalid. It will be ignored for artifact resolution. Reason: Not a v4.0.0
 POM. for project org.igniterealtime.smack:smackx at
 /Users/lgm/.m2/repository/org/igniterealtime/smack/smackx/3.0.4/smackx-3.0.4.pom
 [WARNING] POM for 'cup:java-cup-11a:pom:local:compile' is invalid. It will
 be ignored for artifact resolution. Reason: Not a v4.0.0 POM. for project
 cup:java-cup-11a at
 /Users/lgm/.m2/repository/cup/java-cup-11a/local/java-cup-11a-local.pom
 [WARNING] POM for 'cup:java-cup-11a-runtime:pom:local:compile' is invalid.
 It will be ignored for artifact resolution. Reason: Not a v4.0.0 POM. for
 project cup:java-cup-11a-runtime at
 /Users/lgm/.m2/repository/cup/java-cup-11a-runtime/local/java-cup-11a-runtime-local.pom
 [INFO] [compiler:compile]
 [INFO] Compiling 138 source files to
 /Users/lgm/work/src/projex/bobj/naturalselection/target/classes
 [WARNING] POM for 'org.igniterealtime.smack:smack:pom:3.0.4:compile' is
 invalid. It will be ignored for artifact resolution. Reason: Not a v4.0.0
 POM. for project org.igniterealtime.smack:smack at
 /Users/lgm/.m2/repository/org/igniterealtime/smack/smack/3.0.4/smack-3.0.4.pom
 [WARNING] POM for 'org.igniterealtime.smack:smackx:pom:3.0.4:compile' is
 invalid. It will be ignored for artifact resolution. Reason: Not a v4.0.0
 POM. for project org.igniterealtime.smack:smackx at
 /Users/lgm/.m2/repository/org/igniterealtime/smack/smackx/3.0.4/smackx-3.0.4.pom
 [WARNING] POM for 'cup:java-cup-11a:pom:local:compile' is invalid. It will
 be ignored for artifact resolution. Reason: Not a v4.0.0 POM. for project
 cup:java-cup-11a at
 /Users/lgm/.m2/repository/cup/java-cup-11a/local/java-cup-11a-local.pom
 [WARNING] POM for 'cup:java-cup-11a-runtime:pom:local:compile' is invalid.
 It will be ignored for artifact resolution. Reason: Not a v4.0.0 POM. for
 project cup:java-cup-11a-runtime at
 /Users/lgm/.m2/repository/cup/java-cup-11a-runtime/local/java-cup-11a-runtime-local.pom
 [INFO] [scala:compile {execution: default}]
 [INFO] suggestion: remove the scalaVersion from pom.xml
 [ERROR] /Users/lgm/work/src/projex/bobj/naturalselection/src/main/scala
 [INFO] Compiling 143 source files to
 /Users/lgm/work/src/projex/bobj/naturalselection/target/classes
 [INFO]
 
 [INFO] BUILD SUCCESSFUL

[Lift] Re: was there a breaking change to lift?

2009-01-14 Thread Meredith Gregory
David,

Excellent. i needed a nap anyway.

Best wishes,

--greg

P.S. Someone disappeared from the Seattle-Bainbridge ferry last night and
completely disrupted service. i spent 1.5 hours on the floor of the
Bainbridge ferry terminal and a little over 4 on a friend's living room
floor waiting for them to get the service up and running again -- so that i
could drive up to Vancouver to give a (lift) demo. Fortunately, i could do
the crucial bits of the demo using the scala console and it looks like there
was good reception. i think things will go over even better when i show them
a web wrapper for the core features.


On Wed, Jan 14, 2009 at 2:34 PM, David Pollak feeder.of.the.be...@gmail.com
 wrote:

 Folks,
 Give me an hour and all should be good (and I'll fix Buy a Feature and ESME
 while I'm at it.)

 Thanks,

 David


 On Wed, Jan 14, 2009 at 2:31 PM, Darren Hague dha...@fortybeans.comwrote:


 David,

 When changing pom.xml to Scala 2.7.3, should Lift be set to 0.10-
 SNAPSHOT or 0.10?

 Cheers,
 Darren
 [also suffering Sudden Build Failure Syndrome]

 On Jan 14, 10:22 pm, David Pollak feeder.of.the.be...@gmail.com
 wrote:
  Greg,
  Please remove your Maven repository (rm -rf ~/.m2) and see if that fixes
  things.
 
  Thanks,
 
  David
 
  On Wed, Jan 14, 2009 at 2:17 PM, Meredith Gregory
  lgreg.mered...@gmail.comwrote:
 
   David,
 
   Thanks for the quick response. Unfortunately, i still see the same
   behavior.
 
   Best wishes,
 
   --greg
 
   Here's the relevant fragment of my pom.xml
 
   project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=
  http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=
  
 http://maven.apache.org/POM/4.0.0http://maven.apache.org/maven-v4_0_0.xsd
   
 modelVersion4.0.0/modelVersion
 groupIdcom.biosimilarity.naturalselection/groupId
 artifactIdnaturalselection/artifactId
 version1.0-SNAPSHOT/version
 packagingwar/packaging
 namenaturalselection/name
 inceptionYear2007/inceptionYear
 properties
   scala.version2.7.3/scala.version
 /properties
   ...
   /project
 
   bash-3.2$ mvn clean; mvn compile; mvn jetty:run
   [INFO] Scanning for projects...
   [INFO]
  
 
   [INFO] Building naturalselection
   [INFO]task-segment: [clean]
   [INFO]
  
 
   [INFO] [clean:clean]
   [INFO] Deleting directory
   /Users/lgm/work/src/projex/bobj/naturalselection/target
   [INFO]
  
 
   [INFO] BUILD SUCCESSFUL
   [INFO]
  
 
   [INFO] Total time: 1 second
   [INFO] Finished at: Wed Jan 14 14:13:48 PST 2009
   [INFO] Final Memory: 6M/10M
   [INFO]
  
 
   [INFO] Scanning for projects...
   [INFO]
  
 
   [INFO] Building naturalselection
   [INFO]task-segment: [compile]
   [INFO]
  
 
   [INFO] [resources:resources]
   [INFO] Using default encoding to copy filtered resources.
   [INFO] [yuicompressor:compress {execution: default}]
   [INFO] nb warnings: 0, nb errors: 0
   [WARNING] POM for 'org.igniterealtime.smack:smack:pom:3.0.4:compile'
 is
   invalid. It will be ignored for artifact resolution. Reason: Not a
 v4.0.0
   POM. for project org.igniterealtime.smack:smack at
  
 /Users/lgm/.m2/repository/org/igniterealtime/smack/smack/3.0.4/smack-3.0.4.pom
   [WARNING] POM for 'org.igniterealtime.smack:smackx:pom:3.0.4:compile'
 is
   invalid. It will be ignored for artifact resolution. Reason: Not a
 v4.0.0
   POM. for project org.igniterealtime.smack:smackx at
  
 /Users/lgm/.m2/repository/org/igniterealtime/smack/smackx/3.0.4/smackx-3.0.4.pom
   [WARNING] POM for 'cup:java-cup-11a:pom:local:compile' is invalid. It
 will
   be ignored for artifact resolution. Reason: Not a v4.0.0 POM. for
 project
   cup:java-cup-11a at
  
 /Users/lgm/.m2/repository/cup/java-cup-11a/local/java-cup-11a-local.pom
   [WARNING] POM for 'cup:java-cup-11a-runtime:pom:local:compile' is
 invalid.
   It will be ignored for artifact resolution. Reason: Not a v4.0.0 POM.
 for
   project cup:java-cup-11a-runtime at
  
 /Users/lgm/.m2/repository/cup/java-cup-11a-runtime/local/java-cup-11a-runtime-local.pom
   [INFO] [compiler:compile]
   [INFO] Compiling 138 source files to
   /Users/lgm/work/src/projex/bobj/naturalselection/target/classes
   [WARNING] POM for 'org.igniterealtime.smack:smack:pom:3.0.4:compile'
 is
   invalid. It will be ignored for artifact resolution. Reason: Not a
 v4.0.0
   POM. for project org.igniterealtime.smack:smack at
  
 /Users/lgm/.m2/repository/org/igniterealtime/smack/smack/3.0.4/smack-3.0.4.pom
   [WARNING] POM

[Lift] Re: was there a breaking change to lift?

2009-01-14 Thread Meredith Gregory
David,

Progress... now the breakage is in a new place. The code generated from the
mvn lift archetype no longer compiles. What's the best way to address this?
i can attempt to fix the generated code in place or i can regenerate from
the archetype.

Best wishes,

--greg

[WARNING]
/Users/lgm/work/src/projex/bobj/naturalselection/src/main/scala/com/biosimilarity/naturalselection/model/User.scala:9:
error: wrong number of type arguments for
net.liftweb.mapper.MetaMegaProtoUser, should be 1
[WARNING] object User extends User with MetaMegaProtoUser[User, User with
KeyedMetaMapper[Long, User]] {
[WARNING]   ^
[WARNING]
/Users/lgm/work/src/projex/bobj/naturalselection/src/main/scala/com/biosimilarity/naturalselection/model/User.scala:26:
error: type mismatch;
[WARNING]  found   : com.biosimilarity.naturalselection.model.User.type
(with underlying type object com.biosimilarity.naturalselection.model.User)
[WARNING]  required:
net.liftweb.mapper.KeyedMetaMapper[Long,com.biosimilarity.naturalselection.model.User]
[WARNING]   def getSingleton = User // what's the meta server
[WARNING]  ^
[WARNING]
/Users/lgm/work/src/projex/bobj/naturalselection/src/main/scala/bootstrap/liftweb/Boot.scala:21:
error: overloaded method value schemify with alternatives (Boolean,(=
AnyRef) =
Unit,net.liftweb.mapper.ConnectionIdentifier,net.liftweb.mapper.BaseMetaMapper*)List[String]
and (Boolean,(= AnyRef) =
Unit,net.liftweb.mapper.BaseMetaMapper*)List[String] cannot be applied to
(Boolean,(= AnyRef) =
Unit,com.biosimilarity.naturalselection.model.User.type)
[WARNING] Schemifier.schemify(true, Log.infoF _, User)
[WARNING]^
[WARNING]
/Users/lgm/work/src/projex/bobj/naturalselection/src/main/scala/bootstrap/liftweb/Boot.scala:23:
error: value addTemplateBefore is not a member of object
net.liftweb.http.LiftRules
[WARNING] LiftRules.addTemplateBefore(User.templates)
[WARNING]   ^
[WARNING]
/Users/lgm/work/src/projex/bobj/naturalselection/src/main/scala/bootstrap/liftweb/Boot.scala:27:
error: type mismatch;
[WARNING]  found   : java.lang.String(/)
[WARNING]  required:
net.liftweb.sitemap.Loc.Link[net.liftweb.sitemap.NullLocParams]
[WARNING]   (Menu(Loc(Home, /, Home))
[WARNING] ^
[WARNING]
/Users/lgm/work/src/projex/bobj/naturalselection/src/main/scala/bootstrap/liftweb/Boot.scala:28:
error: value loggedIn_? is not a member of object
com.biosimilarity.naturalselection.model.User
[WARNING]:: Menu(Loc(REPLForm.1, /AJAXREPLForm, R-E-P-L,
If(User.loggedIn_? _, x)))
[WARNING]
^
[WARNING]
/Users/lgm/work/src/projex/bobj/naturalselection/src/main/scala/bootstrap/liftweb/Boot.scala:33:
error: value requestLoans is not a member of object
com.biosimilarity.naturalselection.model.User
[WARNING] S.addAround(User.requestLoans)
[WARNING]  ^
[WARNING]
/Users/lgm/work/src/projex/bobj/naturalselection/src/main/scala/bootstrap/liftweb/Boot.scala:39:
error: not found: type Can
[WARNING]   def newConnection(name: ConnectionIdentifier): Can[Connection] =
{
[WARNING]  ^
[WARNING]
/Users/lgm/work/src/projex/bobj/naturalselection/src/main/scala/com/biosimilarity/naturalselection/snippet/REPLForm.scala:79:
error: type mismatch;
[WARNING]  found   : java.lang.String($('#whatField').attr('value'))
[WARNING]  required: net.liftweb.http.js.JsExp
[WARNING]   { button type=button{?(Go)}/button % (onclick -
ajaxCall($('#whatField').attr('value'), s = updateWhat(s))) }
[WARNING]
^
[WARNING] 9 errors found
[INFO]

[ERROR] BUILD FAILURE
[INFO]


On Wed, Jan 14, 2009 at 3:12 PM, Meredith Gregory
lgreg.mered...@gmail.comwrote:

 David,

 Excellent. i needed a nap anyway.

 Best wishes,

 --greg

 P.S. Someone disappeared from the Seattle-Bainbridge ferry last night and
 completely disrupted service. i spent 1.5 hours on the floor of the
 Bainbridge ferry terminal and a little over 4 on a friend's living room
 floor waiting for them to get the service up and running again -- so that i
 could drive up to Vancouver to give a (lift) demo. Fortunately, i could do
 the crucial bits of the demo using the scala console and it looks like there
 was good reception. i think things will go over even better when i show them
 a web wrapper for the core features.



 On Wed, Jan 14, 2009 at 2:34 PM, David Pollak 
 feeder.of.the.be...@gmail.com wrote:

 Folks,
 Give me an hour and all should be good (and I'll fix Buy a Feature and
 ESME while I'm at it.)

 Thanks,

 David


 On Wed, Jan 14, 2009 at 2:31 PM, Darren Hague dha...@fortybeans.comwrote:


 David,

 When changing pom.xml to Scala 2.7.3, should Lift be set to 0.10-
 SNAPSHOT or 0.10?

 Cheers,
 Darren
 [also suffering Sudden Build Failure Syndrome]

 On Jan 14, 10:22 pm, David Pollak

[Lift] Re: was there a breaking change to lift?

2009-01-14 Thread Meredith Gregory
David,

Currently, i have the following code stuffed in a shell script. Should i be
modifying the archetype version?

Best wishes,

--greg

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

On Wed, Jan 14, 2009 at 3:30 PM, Meredith Gregory
lgreg.mered...@gmail.comwrote:

 David,

 Progress... now the breakage is in a new place. The code generated from the
 mvn lift archetype no longer compiles. What's the best way to address this?
 i can attempt to fix the generated code in place or i can regenerate from
 the archetype.

 Best wishes,

 --greg

 [WARNING]
 /Users/lgm/work/src/projex/bobj/naturalselection/src/main/scala/com/biosimilarity/naturalselection/model/User.scala:9:
 error: wrong number of type arguments for
 net.liftweb.mapper.MetaMegaProtoUser, should be 1
 [WARNING] object User extends User with MetaMegaProtoUser[User, User with
 KeyedMetaMapper[Long, User]] {
 [WARNING]   ^
 [WARNING]
 /Users/lgm/work/src/projex/bobj/naturalselection/src/main/scala/com/biosimilarity/naturalselection/model/User.scala:26:
 error: type mismatch;
 [WARNING]  found   : com.biosimilarity.naturalselection.model.User.type
 (with underlying type object com.biosimilarity.naturalselection.model.User)
 [WARNING]  required:
 net.liftweb.mapper.KeyedMetaMapper[Long,com.biosimilarity.naturalselection.model.User]
 [WARNING]   def getSingleton = User // what's the meta server
 [WARNING]  ^
 [WARNING]
 /Users/lgm/work/src/projex/bobj/naturalselection/src/main/scala/bootstrap/liftweb/Boot.scala:21:
 error: overloaded method value schemify with alternatives (Boolean,(=
 AnyRef) =
 Unit,net.liftweb.mapper.ConnectionIdentifier,net.liftweb.mapper.BaseMetaMapper*)List[String]
 and (Boolean,(= AnyRef) =
 Unit,net.liftweb.mapper.BaseMetaMapper*)List[String] cannot be applied to
 (Boolean,(= AnyRef) =
 Unit,com.biosimilarity.naturalselection.model.User.type)
 [WARNING] Schemifier.schemify(true, Log.infoF _, User)
 [WARNING]^
 [WARNING]
 /Users/lgm/work/src/projex/bobj/naturalselection/src/main/scala/bootstrap/liftweb/Boot.scala:23:
 error: value addTemplateBefore is not a member of object
 net.liftweb.http.LiftRules
 [WARNING] LiftRules.addTemplateBefore(User.templates)
 [WARNING]   ^
 [WARNING]
 /Users/lgm/work/src/projex/bobj/naturalselection/src/main/scala/bootstrap/liftweb/Boot.scala:27:
 error: type mismatch;
 [WARNING]  found   : java.lang.String(/)
 [WARNING]  required:
 net.liftweb.sitemap.Loc.Link[net.liftweb.sitemap.NullLocParams]
 [WARNING]   (Menu(Loc(Home, /, Home))
 [WARNING] ^
 [WARNING]
 /Users/lgm/work/src/projex/bobj/naturalselection/src/main/scala/bootstrap/liftweb/Boot.scala:28:
 error: value loggedIn_? is not a member of object
 com.biosimilarity.naturalselection.model.User
 [WARNING]:: Menu(Loc(REPLForm.1, /AJAXREPLForm, R-E-P-L,
 If(User.loggedIn_? _, x)))
 [WARNING]
 ^
 [WARNING]
 /Users/lgm/work/src/projex/bobj/naturalselection/src/main/scala/bootstrap/liftweb/Boot.scala:33:
 error: value requestLoans is not a member of object
 com.biosimilarity.naturalselection.model.User
 [WARNING] S.addAround(User.requestLoans)
 [WARNING]  ^
 [WARNING]
 /Users/lgm/work/src/projex/bobj/naturalselection/src/main/scala/bootstrap/liftweb/Boot.scala:39:
 error: not found: type Can
 [WARNING]   def newConnection(name: ConnectionIdentifier): Can[Connection]
 = {
 [WARNING]  ^
 [WARNING]
 /Users/lgm/work/src/projex/bobj/naturalselection/src/main/scala/com/biosimilarity/naturalselection/snippet/REPLForm.scala:79:
 error: type mismatch;
 [WARNING]  found   : java.lang.String($('#whatField').attr('value'))
 [WARNING]  required: net.liftweb.http.js.JsExp
 [WARNING]   { button type=button{?(Go)}/button % (onclick -
 ajaxCall($('#whatField').attr('value'), s = updateWhat(s))) }
 [WARNING]
 ^
 [WARNING] 9 errors found
 [INFO]
 
 [ERROR] BUILD FAILURE
 [INFO]
 


 On Wed, Jan 14, 2009 at 3:12 PM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 David,

 Excellent. i needed a nap anyway.

 Best wishes,

 --greg

 P.S. Someone disappeared from the Seattle-Bainbridge ferry last night and
 completely disrupted service. i spent 1.5 hours on the floor of the
 Bainbridge ferry terminal and a little over 4 on a friend's living room
 floor waiting for them to get the service up and running again -- so that i
 could drive up to Vancouver to give a (lift) demo. Fortunately, i could do
 the crucial bits of the demo using the scala console and it looks like

[Lift] Re: was there a breaking change to lift?

2009-01-14 Thread Meredith Gregory
David,

Well, i just nabbed that code from the liftweb site a day or two ago and
stuffed it into a shell script. i stared at the version number and wondered
whether that referred to the archetype version or the version of lift. Since
it was up on the site i reasoned it was the archetype version and was vetted
and blessed. ;-)

Best wishes,

--greg

On Wed, Jan 14, 2009 at 3:36 PM, David Pollak feeder.of.the.be...@gmail.com
 wrote:

 Yeah, it should be 0.10, not 0.9
 My god... you're still on 0.9?

 On Wed, Jan 14, 2009 at 3:32 PM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 David,

 Currently, i have the following code stuffed in a shell script. Should i
 be modifying the archetype version?

 Best wishes,

 --greg

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


 On Wed, Jan 14, 2009 at 3:30 PM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 David,

 Progress... now the breakage is in a new place. The code generated from
 the mvn lift archetype no longer compiles. What's the best way to address
 this? i can attempt to fix the generated code in place or i can regenerate
 from the archetype.

 Best wishes,

 --greg

 [WARNING]
 /Users/lgm/work/src/projex/bobj/naturalselection/src/main/scala/com/biosimilarity/naturalselection/model/User.scala:9:
 error: wrong number of type arguments for
 net.liftweb.mapper.MetaMegaProtoUser, should be 1
 [WARNING] object User extends User with MetaMegaProtoUser[User, User with
 KeyedMetaMapper[Long, User]] {
 [WARNING]   ^
 [WARNING]
 /Users/lgm/work/src/projex/bobj/naturalselection/src/main/scala/com/biosimilarity/naturalselection/model/User.scala:26:
 error: type mismatch;
 [WARNING]  found   : com.biosimilarity.naturalselection.model.User.type
 (with underlying type object com.biosimilarity.naturalselection.model.User)
 [WARNING]  required:
 net.liftweb.mapper.KeyedMetaMapper[Long,com.biosimilarity.naturalselection.model.User]
 [WARNING]   def getSingleton = User // what's the meta server
 [WARNING]  ^
 [WARNING]
 /Users/lgm/work/src/projex/bobj/naturalselection/src/main/scala/bootstrap/liftweb/Boot.scala:21:
 error: overloaded method value schemify with alternatives (Boolean,(=
 AnyRef) =
 Unit,net.liftweb.mapper.ConnectionIdentifier,net.liftweb.mapper.BaseMetaMapper*)List[String]
 and (Boolean,(= AnyRef) =
 Unit,net.liftweb.mapper.BaseMetaMapper*)List[String] cannot be applied to
 (Boolean,(= AnyRef) =
 Unit,com.biosimilarity.naturalselection.model.User.type)
 [WARNING] Schemifier.schemify(true, Log.infoF _, User)
 [WARNING]^
 [WARNING]
 /Users/lgm/work/src/projex/bobj/naturalselection/src/main/scala/bootstrap/liftweb/Boot.scala:23:
 error: value addTemplateBefore is not a member of object
 net.liftweb.http.LiftRules
 [WARNING] LiftRules.addTemplateBefore(User.templates)
 [WARNING]   ^
 [WARNING]
 /Users/lgm/work/src/projex/bobj/naturalselection/src/main/scala/bootstrap/liftweb/Boot.scala:27:
 error: type mismatch;
 [WARNING]  found   : java.lang.String(/)
 [WARNING]  required:
 net.liftweb.sitemap.Loc.Link[net.liftweb.sitemap.NullLocParams]
 [WARNING]   (Menu(Loc(Home, /, Home))
 [WARNING] ^
 [WARNING]
 /Users/lgm/work/src/projex/bobj/naturalselection/src/main/scala/bootstrap/liftweb/Boot.scala:28:
 error: value loggedIn_? is not a member of object
 com.biosimilarity.naturalselection.model.User
 [WARNING]:: Menu(Loc(REPLForm.1, /AJAXREPLForm, R-E-P-L,
 If(User.loggedIn_? _, x)))
 [WARNING]
 ^
 [WARNING]
 /Users/lgm/work/src/projex/bobj/naturalselection/src/main/scala/bootstrap/liftweb/Boot.scala:33:
 error: value requestLoans is not a member of object
 com.biosimilarity.naturalselection.model.User
 [WARNING] S.addAround(User.requestLoans)
 [WARNING]  ^
 [WARNING]
 /Users/lgm/work/src/projex/bobj/naturalselection/src/main/scala/bootstrap/liftweb/Boot.scala:39:
 error: not found: type Can
 [WARNING]   def newConnection(name: ConnectionIdentifier):
 Can[Connection] = {
 [WARNING]  ^
 [WARNING]
 /Users/lgm/work/src/projex/bobj/naturalselection/src/main/scala/com/biosimilarity/naturalselection/snippet/REPLForm.scala:79:
 error: type mismatch;
 [WARNING]  found   : java.lang.String($('#whatField').attr('value'))
 [WARNING]  required: net.liftweb.http.js.JsExp
 [WARNING]   { button type=button{?(Go)}/button % (onclick
 - ajaxCall($('#whatField').attr('value'), s = updateWhat(s))) }
 [WARNING]
 ^
 [WARNING] 9 errors found
 [INFO]
 
 [ERROR] BUILD FAILURE
 [INFO

[Lift] Re: Bug in with-param ?

2009-01-22 Thread Meredith Gregory
David,

Do you have a schema to govern lift tags so that this sort of syntactic
constraint could be statically checked?

Best wishes,

--greg

On Thu, Jan 22, 2009 at 2:11 PM, David Pollak feeder.of.the.be...@gmail.com
 wrote:



 On Thu, Jan 22, 2009 at 12:33 PM, Tim Perrett he...@timperrett.comwrote:


 It appears that to make with-param work you need to have a root node
 inside the with-param node and that the single closed element such as
 an ing tag is just a bit of a special case.

 It is a bit annoying to have to wrap valid markup with a div just to
 make it insert it properly - my understanding is that this is a a side
 effect of the scala XML lib rather than lift code? I wonder if there
 is anything that can be done to make with-param a little more robust?

 Thougts?


 The lift:with-param/ tag has to be a child of the lift:surround/ tag.

 I'm in the process of checking in a change to relax this constraint, but it
 will have a negative impact on the ability to do nested lift:surround/
 tags.




 Tim

 Sent from my iPhone

 On 22 Jan 2009, at 20:05, Tim Perrett he...@timperrett.com wrote:

 
  Guys,
 
  I think I might have just found a bug in the with-param use in
  layouts...
 
  If I do:
 
   lift:with-param name=topimage
 img src=/images/generic_top.jpg alt=Some image /
   /lift:with-param
 
  The bind doesn't actually work, and the img tag gets inserted just
  above the
  main content bind point. However, if I do:
 
  lift:with-param name=topimageimg src=/images/generic_top.jpg
  alt=
  //lift:with-param
 
  (in case google groups breaks it, it should all be on one, single
  line)
 
  Is anyone else seeing this? Im using the 0.10 release
 
  Cheers
 
  Tim
 
 
 
  
 





 --
 Lift, the simply functional web framework http://liftweb.net
 Collaborative Task Management http://much4.us
 Follow me: http://twitter.com/dpp
 Git some: http://github.com/dpp


 



-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105

+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] Fwd: lift production experience was Re: [scala-user] Are there any Scala friend small embeddable HTTP Severs?

2009-01-22 Thread Meredith Gregory
P.S. the liftweb alias escaped the cc line

-- Forwarded message --
From: Meredith Gregory lgreg.mered...@gmail.com
Date: Thu, Jan 22, 2009 at 2:38 PM
Subject: lift production experience was Re: [scala-user] Are there any Scala
friend small embeddable HTTP Severs?
To: David Pollak feeder.of.the.be...@gmail.com
Cc: Ricky Clarkson ricky.clark...@gmail.com, Christos KK Loverdos 
lover...@gmail.com, Seth Tisue s...@tisue.net, Tony Morris 
tmor...@tmorris.net, scala-u...@listes.epfl.ch


Lifted and Scalads and Lasses alike,

The he-said, she-said discussion is sociologically interesting, but i would
really like to get some hard core data from others' experience with lift in
production. i'm in the process of putting together real-world technical
proposals to people who really care about this stuff and actual data --
other than what we've been gathering on our own -- would be greatly
appreciated. In return, after we have done our homework, we will be happy to
share our results. (BTW, is there a place on liftweb for posting that sort
of data?)

Best wishes,

--greg

On Wed, Jan 21, 2009 at 10:01 AM, David Pollak 
feeder.of.the.be...@gmail.com wrote:

 Ricky et. al.,


 On Wed, Jan 21, 2009 at 5:12 AM, Ricky Clarkson 
 ricky.clark...@gmail.comwrote:

 I think Tony finds it odd that dpp says things like Box is Option which
 is algebraically false but as an analogy it is reasonable.


 Tony objected to the reputed Box is Option statement.  There was a
 discussion about this on the Lift list.  Tony gave no ground in any of the
 discussion (for example, when Jorge discussed the OO perspective) and was
 hostile and in my opinion, abusive.

 Near the end of the discussion, I stated that I did not recall stating that
 Box is Option but that Box is *like* Option, except...  See
 http://groups.google.com/group/liftweb/msg/a5493a6a9180a37d So, the
 factually basis for Tony's position was gone.  Did he apologize?  Did he
 behave at all reasonably?  No, he made a post (which I deleted because
 Tony's messages were moderated) which claimed that I had claimed identity
 between Box and Option but he was too lazy to find the post.  [Turns out
 that during the thread, I made the statement, but I've searched previous
 posts on the Lift list and could not find myself or anybody else claiming
 that Box (or Can) was an Option.]


 Tony tried to discuss this [in his usual exacting style] but found himself
 banned from the Lift list, and tried talking to dpp about it,


 Actually, it was somewhat different than this.  I had left a number of
 Tony's messages in the moderation queue.  I contacted him privately many
 posts before I banned him and asked him to tone it down.  Here's the text of
 my first private note:

 I'm not going to post your last two responses because you've crossed the
 line from being exacting to being abusive.  I have a great deal of respect
 for you as a coder and as a thinker.  But, your brand of argumentation does
 not have a place on the Lift list.

 Rather than showing any form of understanding what I was asking of him,
 Tony continued to behave in a manner that is inappropriate on the Lift
 list.  I banned him from the Lift list.

 Tony continued to contact me privately.  He did not contact me trying to
 understand why he was banned or to try to get unbanned.  He continued to
 have the pointless discussion about Boxes and Options.

  only to get personal threats in return.  I'll tell your employer.


 Yes, after the 3rd request from me to Tony to not contact me privately
 because the discussion was done, I told him that if he contacted me again, I
 would contact his employer.  At least Tony stopped sending me email.

 So, that's the history from my perspective.  Tony's the only substantive
 contributor to the Lift list who's ever been banned.  I regret that the Lift
 community will not be able to benefit from Tony's remarkable approach to
 development.  On the other hand, the Lift community is a warm and welcoming
 place and Tony's behavior chilled the place a whole lot.

 So... on to the substance of what I can read from Tony's comments.  He's
 right.  Lift is seriously lacking.  While I still think it's the best web
 framework, it is seriously lacking.

 I am projecting the kind of issues that Greg Meredith is having with Lift.
 From reading the code that Tony and Greg have written, they have a similar
 coding style and I believe a similarly rigorous approach to design and
 development.  Lift is a blend of FP and OO, stateless and stateful,
 transformative and imperative.  And, as Lift gets closer to 1.0, I'm not
 sure that we got the balance right.

 Perhaps some sort of pi-calculus based way of describing web app logic
 would allow for better reasoning.  I've noodled with doing some sort of
 stuff with pi-calculus in Lift.  I stopped the exploration because I was
 unable to find reasonable language constructs to express what I wanted
 economically and in a way that a Rails or Struts

[Lift] Re: Bug in with-param ?

2009-01-22 Thread Meredith Gregory
David,

If you can give me some quick and dirty informal description of the
constraints, i can code up a schema in short order.

Best wishes,

--greg

On Thu, Jan 22, 2009 at 2:20 PM, David Pollak feeder.of.the.be...@gmail.com
 wrote:



 On Thu, Jan 22, 2009 at 2:18 PM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 David,

 Do you have a schema to govern lift tags so that this sort of syntactic
 constraint could be statically checked?


 No.

 Perhaps it's something we should add to our documentation to-do list.




 Best wishes,

 --greg

 On Thu, Jan 22, 2009 at 2:11 PM, David Pollak 
 feeder.of.the.be...@gmail.com wrote:



 On Thu, Jan 22, 2009 at 12:33 PM, Tim Perrett he...@timperrett.comwrote:


 It appears that to make with-param work you need to have a root node
 inside the with-param node and that the single closed element such as
 an ing tag is just a bit of a special case.

 It is a bit annoying to have to wrap valid markup with a div just to
 make it insert it properly - my understanding is that this is a a side
 effect of the scala XML lib rather than lift code? I wonder if there
 is anything that can be done to make with-param a little more robust?

 Thougts?


 The lift:with-param/ tag has to be a child of the lift:surround/ tag.

 I'm in the process of checking in a change to relax this constraint, but
 it will have a negative impact on the ability to do nested lift:surround/
 tags.




 Tim

 Sent from my iPhone

 On 22 Jan 2009, at 20:05, Tim Perrett he...@timperrett.com wrote:

 
  Guys,
 
  I think I might have just found a bug in the with-param use in
  layouts...
 
  If I do:
 
   lift:with-param name=topimage
 img src=/images/generic_top.jpg alt=Some image /
   /lift:with-param
 
  The bind doesn't actually work, and the img tag gets inserted just
  above the
  main content bind point. However, if I do:
 
  lift:with-param name=topimageimg src=/images/generic_top.jpg
  alt=
  //lift:with-param
 
  (in case google groups breaks it, it should all be on one, single
  line)
 
  Is anyone else seeing this? Im using the 0.10 release
 
  Cheers
 
  Tim
 
 
 
  
 





 --
 Lift, the simply functional web framework http://liftweb.net
 Collaborative Task Management http://much4.us
 Follow me: http://twitter.com/dpp
 Git some: http://github.com/dpp






 --
 L.G. Meredith
 Managing Partner
 Biosimilarity LLC
 806 55th St NE
 Seattle, WA 98105

 +1 206.650.3740

 http://biosimilarity.blogspot.com






 --
 Lift, the simply functional web framework http://liftweb.net
 Collaborative Task Management http://much4.us
 Follow me: http://twitter.com/dpp
 Git some: http://github.com/dpp

 



-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105

+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] web logic

2009-01-23 Thread Meredith Gregory
David,

i just noticed this paragraph.

Perhaps some sort of pi-calculus based way of describing web app logic would
 allow for better reasoning.  I've noodled with doing some sort of stuff with
 pi-calculus in Lift.  I stopped the exploration because I was unable to
 find reasonable language constructs to express what I wanted economically
 and in a way that a Rails or Struts or Wicket developer could pick up
 reasonably easily.  But, I digress.


i would have to agree with this assessment. The pi-calculus is a formal
device. Just like the lambda calculus, it's a stripped down, minimal
expression of some intuitions about computation (in pi's case, it's
computation as interaction). That said, in the same way that lambda provides
excellent guidance -- a blueprint, if you will -- for the basic design of
languages like, Lisp, Scheme, OCaml, F#, Haskell and Scala, one might hope
that the pi-calculus could provide some guidance or a blueprint for a new
family of languages that is better suited to computing in a highly parallel,
highly distributed setting, such as the web applications powered up on
networks of racks and racks of multicore processors.

Some examples of languages following largely similar intuitions as expressed
in the pi-calculus include Erlang, Rosette and the actor sublanguage of
Scala. People have already given a pi-calculus semantics to core Erlang.
My PhD work was driven by my desire to give a similar account of Rosette. It
took forever for me to work out a reasonable account of reflection -- which
was a key feature of Rosette that i put to use in commercial,
mission-critical applications.

All that said, i would, and i think the whole community would also benefit
from your experience and intuitions regarding what sort of language features
have helped you and what didn't work out so well.

Best wishes,

--greg

-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105

+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: Jorge's birthday ...

2009-01-30 Thread Meredith Gregory
Jorge,

chestit rozden den

Best wishes,

--greg

On Fri, Jan 30, 2009 at 8:32 AM, Tim Perrett he...@timperrett.com wrote:


 lol! This is like the most global happy birthday greeting ever! ;-)

 On Jan 30, 4:04 pm, Derek Chen-Becker dchenbec...@gmail.com wrote:
  ¡Feliz cumpleaños, señor!

 



-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105

+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: Tic Tac Toe, Lift Style

2009-01-30 Thread Meredith Gregory
David,

Thanks for this! i'm looking forward to diving in.

Best wishes,

--greg

On Fri, Jan 30, 2009 at 5:18 PM, David Pollak feeder.of.the.be...@gmail.com
 wrote:

 Folks,

 I've committed up a Tic Tac Toe example:

 http://github.com/dpp/lift-samples/tree/c5d22b8bca126ea518107f231a27353b63841ef8/tictac

 It's an example of using the StatefulComet stuff.

 Things I like:
 ToeDisplay is very concise
 The example works

 Things I don't like:
 Way too much display stuff in ToeBoard
 The whole Lobby logic seems like a hack

 Enjoy.

 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
806 55th St NE
Seattle, WA 98105

+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: [SOLVED] Req lazy val xml not working

2009-01-30 Thread Meredith Gregory
Tim,

In this last email i'm trying to parse this sentence

XML request processing should not work perfectly


Is this

   - a philosophical stance
   - a warning, or
   - a typo?

Best wishes,

--greg

On Fri, Jan 30, 2009 at 3:14 PM, Tim Perrett he...@timperrett.com wrote:


 Ok, found the problem. Req.scala needed a patch, which I have applied
 and committed into master.

 XML request processing should not work perfectly

 Cheers, Tim

 On Jan 30, 10:48 pm, Tim Perrett he...@timperrett.com wrote:
  Attached is an example application that shows the problem
 
  Cheers, Tim
 
   problem_example.zip
  16KViewDownload
 



-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105

+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: [SOLVED] Req lazy val xml not working

2009-01-30 Thread Meredith Gregory
David,

i figured, but i know some people with really strong opinions about XML. ;-)

Best wishes,

--greg

On Fri, Jan 30, 2009 at 8:04 PM, David Pollak feeder.of.the.be...@gmail.com
 wrote:



 On Fri, Jan 30, 2009 at 7:02 PM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Tim,

 In this last email i'm trying to parse this sentence

 XML request processing should not work perfectly


 Is this

- a philosophical stance
- a warning, or
- a typo?


 typo... XML request processing should now work perfectly.


-

 Best wishes,

 --greg

 On Fri, Jan 30, 2009 at 3:14 PM, Tim Perrett he...@timperrett.comwrote:


 Ok, found the problem. Req.scala needed a patch, which I have applied
 and committed into master.

 XML request processing should not work perfectly

 Cheers, Tim

 On Jan 30, 10:48 pm, Tim Perrett he...@timperrett.com wrote:
  Attached is an example application that shows the problem
 
  Cheers, Tim
 
   problem_example.zip
  16KViewDownload




 --
 L.G. Meredith
 Managing Partner
 Biosimilarity LLC
 806 55th St NE
 Seattle, WA 98105

 +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
806 55th St NE
Seattle, WA 98105

+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: Tic Tac Toe, Lift Style

2009-01-30 Thread Meredith Gregory
David,

i'm probably just misusing git, but this is what happens for me

bash-3.2$ git clone
http://github.com/dpp/lift-samples/tree/c5d22b8bca126ea518107f231a27353b63841ef8/tictac
Initialized empty Git repository in
/Users/lgm/work/src/projex/biosimilarity/tictac/.git/
fatal:
http://github.com/dpp/lift-samples/tree/c5d22b8bca126ea518107f231a27353b63841ef8/tictac/info/refsnot
found: did you run git update-server-info on the server?
bash-3.2$

Any clues?

Best wishes,

--greg

On Fri, Jan 30, 2009 at 5:18 PM, David Pollak feeder.of.the.be...@gmail.com
 wrote:

 Folks,

 I've committed up a Tic Tac Toe example:

 http://github.com/dpp/lift-samples/tree/c5d22b8bca126ea518107f231a27353b63841ef8/tictac

 It's an example of using the StatefulComet stuff.

 Things I like:
 ToeDisplay is very concise
 The example works

 Things I don't like:
 Way too much display stuff in ToeBoard
 The whole Lobby logic seems like a hack

 Enjoy.

 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
806 55th St NE
Seattle, WA 98105

+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: Tic Tac Toe, Lift Style

2009-01-30 Thread Meredith Gregory
David,

i don't know if this is any help, but here's the git version i'm using.

Best wishes,

--greg

bash-3.2$ which git
/opt/local/bin/git
bash-3.2$ git -v
Unknown option: -v
usage: git [--version] [--exec-path[=GIT_EXEC_PATH]]
[-p|--paginate|--no-pager] [--bare] [--git-dir=GIT_DIR]
[--work-tree=GIT_WORK_TREE] [--help] COMMAND [ARGS]
bash-3.2$ git --version
git version 1.6.0.4
bash-3.2$

On Fri, Jan 30, 2009 at 9:13 PM, Meredith Gregory
lgreg.mered...@gmail.comwrote:

 David,

 i'm probably just misusing git, but this is what happens for me

 bash-3.2$ git clone
 http://github.com/dpp/lift-samples/tree/c5d22b8bca126ea518107f231a27353b63841ef8/tictac
 Initialized empty Git repository in
 /Users/lgm/work/src/projex/biosimilarity/tictac/.git/
 fatal:
 http://github.com/dpp/lift-samples/tree/c5d22b8bca126ea518107f231a27353b63841ef8/tictac/info/refsnot
  found: did you run git update-server-info on the server?
 bash-3.2$

 Any clues?

 Best wishes,

 --greg

 On Fri, Jan 30, 2009 at 5:18 PM, David Pollak 
 feeder.of.the.be...@gmail.com wrote:

 Folks,

 I've committed up a Tic Tac Toe example:

 http://github.com/dpp/lift-samples/tree/c5d22b8bca126ea518107f231a27353b63841ef8/tictac

 It's an example of using the StatefulComet stuff.

 Things I like:
 ToeDisplay is very concise
 The example works

 Things I don't like:
 Way too much display stuff in ToeBoard
 The whole Lobby logic seems like a hack

 Enjoy.

 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
 806 55th St NE
 Seattle, WA 98105

 +1 206.650.3740

 http://biosimilarity.blogspot.com




-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105

+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] Welcome to scala-xml!

2009-01-31 Thread Meredith Gregory
Alex,

This is probably way out of scope, but since someone brought up XPath, i
couldn't resist... LINQ-like support for XQuery?

Best wishes,

--greg

On Fri, Jan 30, 2009 at 3:34 PM, Alex Cruise a...@cluonflux.com wrote:

 Hi folks!

 I'm Alex Cruise (obviously!) I'm a software architect at
 http://www.layer7tech.com/ (located in Vancouver, Canada) and have been
 hanging around the Scala community for about a year and a half.  I have
 recently volunteered to serve as a coordinator for the Scala XML team.  At
 this time, the XML team (apart from EPFL people, of course) consists of
 myself, Michael Fogus, Normen Müller and (I think) David Pollak, but
 contributions--including bug reports, patches, complaints, feature requests
 and existential angst--are of course welcome from everyone.

 On behalf of said team, I would like to invite everyone who is interested
 in Scala's XML support to join the new scala-xml list!  (This post cc'd to
 scala and liftweb--the latter because the Lift project is easily one of the
 heaviest users of scala.xml, and I'm certain that members of that community
 will enthusiastically join in the discussion in short order. :)  If you'd
 like to watch the sausage being made, or even turn the crank a bit yourself,
 please subscribe to scala-xml by sending an empty email to
 scala-xml-subscr...@listes.epfl.ch .

 Here's some background info for anyone who is unfamiliar with Scala's XML
 support:  The Scala compiler supports XML literals in Scala source files,
 with very few additional restrictions on their syntax.  XML literals are
 translated into a tree built from instances of several classes in the
 scala.xml package (
 http://www.scala-lang.org/docu/files/api/scala/xml$package.html), and may
 contain nested Scala expressions (each of which can also incorporate
 sub-nested XML literals, etc...) whose results are interpolated into the
 XML.

 The scala.xml.Node class and its descendants form a comparatively
 lightweight, immutable, DOM-like representation of XML that can be used in
 pattern matching and provide simple, XPath-like node selection queries. The
 package also contains a few parsers and other assorted tools.

 IMO we owe a debt of gratitude to Burak Emir, the primary developer of
 scala.xml.  I believe he has laid a solid foundation that will serve us
 well.  Burak also wrote
 http://burak.emir.googlepages.com/scalaxbook.docbk.html which gives
 insight into the rationale behind the design and implementation of the
 library.

 Now, let's kick off the list with a small agenda:

 1) Bug triage

 Rather than list the (~18) known bugs here, I'll supply an URL (
 http://lampsvn.epfl.decenturl.com/scala-xml-bugs), and anyone who feels
 like their favourite bug merits further discussion should fire up a new
 topic on scala-xml and we'll start hashing it out.  If nobody pipes up I'll
 start posting individual emails regarding each bug with a few of my own
 comments in a few days.

 2) Proposed enhancements

 I'm sure many of us have a wish list of things we would like to see changed
 in Scala's XML support--please feel free to join in and tell us all about
 them.

 Thanks for your time,

 -0xe1a




-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105

+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: migration tools?

2009-02-04 Thread Meredith Gregory
Lifted,
It turns out that Hibernate already supplies this
functionalityhttp://www.hibernate.org/hib_docs/tools/reference/en/html/reverseengineering.html
.

Best wishes,

--greg

On Mon, Feb 2, 2009 at 1:45 PM, Meredith Gregory
lgreg.mered...@gmail.comwrote:

 Tim,

 Thanks for your note. i was largely referring to the possibility of sucking
 on the data model (mainly from the db schema side, as the parsing would be
 easier) to generate appropriate Model code.

 Best wishes,

 --greg

 On Mon, Feb 2, 2009 at 1:04 PM, Tim Perrett he...@timperrett.com wrote:



 Hey Greg,

 I have taken great pleasure in porting several leaking like a rusty
 bucket
 rails applications... Whilst there is no direct migration, once you
 understand exactly how lift works, it becomes simple.

 When you say db stuff squirted out from ActiveRecord? - what exactly do
 you mean? Queries? To_xml stuff?

 Cheers

 Tim

 On 02/02/2009 20:53, Meredith Gregory lgreg.mered...@gmail.com wrote:

  Lifted,
 
  Suppose one were to engage in porting a RoR app to a Lift app. Are there
 any
  tools in the Scala+Lift arsenal that ease that migration? For example,
 is
  there a nice path that allows to preserve the db stuff squirted out from
  ActiveRecord? Is the are way to auto-generate some basic Model code from
 that
  starting point?
 
  More generally, have you guys been thinking about this direction? What
 about
  migration from other sites?
 
  Best wishes,
 
  --greg



 



 --
 L.G. Meredith
 Managing Partner
 Biosimilarity LLC
 806 55th St NE
 Seattle, WA 98105

 +1 206.650.3740

 http://biosimilarity.blogspot.com




-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105

+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] Using Quaere in Scala

2009-02-05 Thread Meredith Gregory
Scalads and lasses and Lifted,
Does anyone have any experience with using Quaere under Scala? In
particular, i'm wondering if anyone has already done implementations for
flatMap, etc? This would seem a quick and relatively painless way to get
type safety on top of a nearly LINQ implementation that lacks some type
safety.

Best wishes,

--greg

-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105

+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: Using Quaere in Scala

2009-02-05 Thread Meredith Gregory
Jorge,

Much obliged.

Best wishes,

--greg

On Thu, Feb 5, 2009 at 12:10 PM, Jorge Ortiz jorge.or...@gmail.com wrote:

 You may want to look at this
 http://szeiger.de/blog/2008/12/21/a-type-safe-database-query-dsl-for-scala/

 --j


 On Thu, Feb 5, 2009 at 11:21 AM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Scalads and lasses and Lifted,
 Does anyone have any experience with using Quaere under Scala? In
 particular, i'm wondering if anyone has already done implementations for
 flatMap, etc? This would seem a quick and relatively painless way to get
 type safety on top of a nearly LINQ implementation that lacks some type
 safety.

 Best wishes,

 --greg

 --
 L.G. Meredith
 Managing Partner
 Biosimilarity LLC
 806 55th St NE
 Seattle, WA 98105

 +1 206.650.3740

 http://biosimilarity.blogspot.com




 



-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105

+1 206.650.3740

http://biosimilarity.blogspot.com

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



[Lift] lift jetty configuration question

2009-02-11 Thread Meredith Gregory
Lifted,

Suppose i generate an instance of the basic lift archetype and then start up
jetty. If i point two different browsers at localhost:8080 they both go to
the same instance state. So, if i

   - start up a browser, point it at localhost:8080, then login in
   - then start up another browser, point it at localhost:8080, i get to the
   logged in page

What do i need to do to configure jetty to start up another instance?

Best wishes,

--greg

-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105

+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: confusion about lift-archetype-version versus lift version

2009-02-12 Thread Meredith Gregory
Tim, David,

Thanks!

Best wishes,

--greg

On Thu, Feb 12, 2009 at 5:33 AM, Tim Perrett he...@timperrett.com wrote:


 Sorry my bad - I should have pointed that out.

 On Feb 12, 12:31 pm, David Bernard david.bernard...@gmail.com wrote:
  0.11 isn't released the correct version number is 0.11-SNAPSHOT

 



-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105

+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] basic lift question

2009-02-12 Thread Meredith Gregory
Lifted,

Suppose i've got the following fragment of lift tags

lift:surround with=default at=content
  !-- Begin Easy Widgets plugin HTML markup --

  div

   a onclick=AddWidget('widget1.html'); return false
href=# title=Add an activity align=right+ Create an activity/a

  /div
  ...
/lift:surround

and i want the onclick to call into a lift snippet instead of my jQuery
function, AddWidget, as it does above. How would i rewrite the anchor tag?

Best wishes,

--greg

-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105

+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 jetty configuration question

2009-02-12 Thread Meredith Gregory
Tim,

Essentially, i want every request for http://localhost:8080 to start up a
new session. This should force login each time.

Best wishes,

--greg

On Thu, Feb 12, 2009 at 3:30 AM, Tim Perrett he...@timperrett.com wrote:


 Can you clarify what you mean by instance? You mean run jetty on
 another TCP port other than 8080?

 And by other browser do you mean two seperate apps (like firefox and
 safari) or just two seperate windows in the same app?

 Cheers

 Tim

 On Feb 12, 2:27 am, Meredith Gregory lgreg.mered...@gmail.com wrote:
  Lifted,
 
  Suppose i generate an instance of the basic lift archetype and then start
 up
  jetty. If i point two different browsers at localhost:8080 they both go
 to
  the same instance state. So, if i
 
 - start up a browser, point it at localhost:8080, then login in
 - then start up another browser, point it at localhost:8080, i get to
 the
 logged in page
 
  What do i need to do to configure jetty to start up another instance?
 
  Best wishes,
 
  --greg
 
  --
  L.G. Meredith
  Managing Partner
  Biosimilarity LLC
  806 55th St NE
  Seattle, WA 98105
 
  +1 206.650.3740
 
  http://biosimilarity.blogspot.com
 



-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105

+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 jetty configuration question

2009-02-12 Thread Meredith Gregory
David,

This is merely demoware -- nothing deployable. i simply need the following
behavior

   - get http://localhost:8080 provides a login page (always)
   - login sets up the session so that subsequent req's of the form
   http://localhost:8080/mumble-with-session-info provide access to that
   session's state

This allows me to simulate two users using the system simultaneously without
having to switch between logins.

Best wishes,

--greg

On Thu, Feb 12, 2009 at 9:20 AM, David Pollak feeder.of.the.be...@gmail.com
 wrote:

 Greg,

 If each HTTP request to localhost had a new session, what would happen when
 you log in?

 If you can tell me a little more about your use case, I'll work on a
 solution.

 Thanks,

 David


 On Thu, Feb 12, 2009 at 9:09 AM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Tim,

 Essentially, i want every request for http://localhost:8080 to start up a
 new session. This should force login each time.

 Best wishes,

 --greg


 On Thu, Feb 12, 2009 at 3:30 AM, Tim Perrett he...@timperrett.comwrote:


 Can you clarify what you mean by instance? You mean run jetty on
 another TCP port other than 8080?

 And by other browser do you mean two seperate apps (like firefox and
 safari) or just two seperate windows in the same app?

 Cheers

 Tim

 On Feb 12, 2:27 am, Meredith Gregory lgreg.mered...@gmail.com wrote:
  Lifted,
 
  Suppose i generate an instance of the basic lift archetype and then
 start up
  jetty. If i point two different browsers at localhost:8080 they both go
 to
  the same instance state. So, if i
 
 - start up a browser, point it at localhost:8080, then login in
 - then start up another browser, point it at localhost:8080, i get
 to the
 logged in page
 
  What do i need to do to configure jetty to start up another instance?
 
  Best wishes,
 
  --greg
 
  --
  L.G. Meredith
  Managing Partner
  Biosimilarity LLC
  806 55th St NE
  Seattle, WA 98105
 
  +1 206.650.3740
 
  http://biosimilarity.blogspot.com




 --
 L.G. Meredith
 Managing Partner
 Biosimilarity LLC
 806 55th St NE
 Seattle, WA 98105

 +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
806 55th St NE
Seattle, WA 98105

+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 jetty configuration question

2009-02-12 Thread Meredith Gregory
Tim,

That's a great idea. That's exactly what i want to do. Now, we're back to my
initial report. Whoops! i must have used Firefox for both localhost requests
before. If i use FF and Safari i get the behavior i wanted. Nevermind. ;-(

Best wishes,

--greg

On Thu, Feb 12, 2009 at 9:28 AM, Tim Perrett he...@timperrett.com wrote:



 This might be a stupid suggestion, but cant you just use two different
 browsers to be logged in with two users at the same time?
 Im guessing you want to demo some kind of comet behavior or similar
 between two users?

 Tim

 On Feb 12, 5:25 pm, Meredith Gregory lgreg.mered...@gmail.com wrote:
  David,
 
  This is merely demoware -- nothing deployable. i simply need the
 following
  behavior
 
 - gethttp://localhost:8080provides a login page (always)
 - login sets up the session so that subsequent req's of the form
 http://localhost:8080/mumble-with-session-infoprovide access to that
 session's state
 
  This allows me to simulate two users using the system simultaneously
 without
  having to switch between logins.
 
  Best wishes,
 
  --greg
 
  On Thu, Feb 12, 2009 at 9:20 AM, David Pollak 
 feeder.of.the.be...@gmail.com
 
 
 
   wrote:
   Greg,
 
   If each HTTP request to localhost had a new session, what would happen
 when
   you log in?
 
   If you can tell me a little more about your use case, I'll work on a
   solution.
 
   Thanks,
 
   David
 
   On Thu, Feb 12, 2009 at 9:09 AM, Meredith Gregory 
   lgreg.mered...@gmail.com wrote:
 
   Tim,
 
   Essentially, i want every request forhttp://localhost:8080to start up
 a
   new session. This should force login each time.
 
   Best wishes,
 
   --greg
 
   On Thu, Feb 12, 2009 at 3:30 AM, Tim Perrett he...@timperrett.com
 wrote:
 
   Can you clarify what you mean by instance? You mean run jetty on
   another TCP port other than 8080?
 
   And by other browser do you mean two seperate apps (like firefox and
   safari) or just two seperate windows in the same app?
 
   Cheers
 
   Tim
 
   On Feb 12, 2:27 am, Meredith Gregory lgreg.mered...@gmail.com
 wrote:
Lifted,
 
Suppose i generate an instance of the basic lift archetype and then
   start up
jetty. If i point two different browsers at localhost:8080 they
 both go
   to
the same instance state. So, if i
 
   - start up a browser, point it at localhost:8080, then login in
   - then start up another browser, point it at localhost:8080, i
 get
   to the
   logged in page
 
What do i need to do to configure jetty to start up another
 instance?
 
Best wishes,
 
--greg
 
--
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105
 
+1 206.650.3740
 
   http://biosimilarity.blogspot.com
 
   --
   L.G. Meredith
   Managing Partner
   Biosimilarity LLC
   806 55th St NE
   Seattle, WA 98105
 
   +1 206.650.3740
 
  http://biosimilarity.blogspot.com
 
   --
   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
  806 55th St NE
  Seattle, WA 98105
 
  +1 206.650.3740
 
  http://biosimilarity.blogspot.com
 



-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105

+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: basic lift question

2009-02-12 Thread Meredith Gregory
David,

Thanks for your on-going support! From the looks of your example, i'm
guessing that if i want to subsequently call some JavaScript to provide
visual feedback of the server-side behavior i do something more interesting
than the  js.JsCmds.Noop in your code. However, i can't see exactly what i
should do. i went looking at the repo and found a comment to the effect

/**
  * JavaScript Expressions. To see these in action, check out
  * sites/example/src/webapp/json.html
  */


But that doesn't seem to exist in the repo. At least when i browse to
sites/example/src/ it contains nothing.

If you can just point me at some examples, i can probably work out most of
what i need.

Best wishes,

--greg

On Thu, Feb 12, 2009 at 9:23 AM, David Pollak feeder.of.the.be...@gmail.com
 wrote:



 On Thu, Feb 12, 2009 at 9:08 AM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Lifted,

 Suppose i've got the following fragment of lift tags

 lift:surround with=default at=content
   !-- Begin Easy Widgets plugin HTML markup --

   div

a onclick=AddWidget('widget1.html'); return false
 href=# title=Add an activity align=right+ Create an
 activity/a

   /div
   ...
 /lift:surround

 and i want the onclick to call into a lift snippet instead of my jQuery
 function, AddWidget, as it does above. How would i rewrite the anchor tag?


 Do you want the onclick to invoke a function on the server when the a is
 clicked?

 If so:

 SHtml.a(() = {println(Somebody clicked the link); js.JsCmds.Noop},
 Text(Create an activity))

 Should do the trick.  You can put whatever you want in the function.




 Best wishes,

 --greg

 --
 L.G. Meredith
 Managing Partner
 Biosimilarity LLC
 806 55th St NE
 Seattle, WA 98105

 +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
806 55th St NE
Seattle, WA 98105

+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] typed browser scripting languages?

2009-02-13 Thread Meredith Gregory
David,

Thanks! Has anybody used this?

Best wishes,

--greg

On Fri, Feb 13, 2009 at 2:47 PM, David Pollak feeder.of.the.be...@gmail.com
 wrote:

 http://haxe.org


 On Fri, Feb 13, 2009 at 2:46 PM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Scalads, lasses and Lifted,

 Does anyone know of efforts to create a typed functional equivalent to
 JavaScript? The current situation with the momentum to use third party
 components with no ability to catch interaction between components at
 compile time means that you are flying completely blind when you use third
 party code. This really weakens the value prop of providers like jQuery --
 especially jQuery as it has no dependency management, either.

 i know of one group that compiles OCaml to JavaScript (for a mobile
 platform). Are there other efforts people know about?

 Best wishes,

 --greg

 --
 L.G. Meredith
 Managing Partner
 Biosimilarity LLC
 806 55th St NE
 Seattle, WA 98105

 +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
806 55th St NE
Seattle, WA 98105

+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: strange interaction with jQuery

2009-02-15 Thread Meredith Gregory
Marius,

Agreed on two points:

   - JsRaw is not the culprit -- it seems to be a bad interaction with
   version of JavaScript modules
   - JavaScript is the source of the meta problem -- there's no way to get
   the compiler to warn about this because this world is devoid of useful
   typing info.

It would appear that a vast number of web technologies have accepted a
programming model proposition that is predicated on typelessness. 'This has
all happened before and it will happen again.' It looks like i'm going to
have to resurrect my rhoscript project.

Best wishes,

--greg

On Sat, Feb 14, 2009 at 2:20 PM, Marius marius.dan...@gmail.com wrote:


 Interesting ...

 When dragging I'm getting a JS error in jquery-ui.js:

 $.Event is not a function ... which appears to cause the odd
 behavior. I'm not sure yet why this error appears. BUt I found that
 this may appear when you have incompatible versions of jquery and
 jquery ui, Perhaps try here?

 http://groups.google.com/group/jquery-ui/browse_thread/thread/8fbe3061bd567e2f/a19f7e874ea48e74?lnk=raot

 I really do not think that JsRaw has anything to do with this. It
 fails even if you have a plain link in the page ... pretty much like
 in the static example.

 I don't think there is a way of detecting such behavioral things at
 compile time.

 Br's,
 Marius

 On Feb 13, 10:38 pm, Meredith Gregory lgreg.mered...@gmail.com
 wrote:
  Lifted,
 
  Attached is a minimal example of a strange interaction between lift and a
  jQuery plugin. If you unzip the example you will find inside the
  liftTestCase directory 5 subdirectories two of which contain behaviors to
  compare. The directory 23 contains an example that is purely jQuery with
 the
  EasyWidgets plugin. The directory dspace contains a lift-based site.
 
  If you open 23/index.html in a browser you will see a page that allows
 you
  to add widgets that can be dragged and dropped around. This all works. If
  you cd into dspace and launch mvn jetty:run, sign up, login, then you
 will
  see a boiled down version of the same thing. The difference is that the
  javascript jQuery call is run as a JsRaw. Everything seems to work except
  you attempt to drag and drop the components. Then you get very weird
  behavior that is easier to see than to describe.
 
  The thing is, we haven't actually done any interesting lift stuff, yet,
 in
  the boiled down sample. We're just calling into the EasyWidgets function
  just like in the sample. i would expect these two examples to exhibit
 nearly
  identical behavior. i'm guessing there's some weird interaction between
  lift-included javascript and the jQuery plugin.
 
  Several questions:
 
 - How could we devise a way to check at compile time that there is
 such
 an interaction? This seems to be a crucial point as the momentum is to
 use
 third party frontend web components.
 - What is the best way to go about finding the interaction if it has
 escaped compile time detection?
 
  Best wishes,
 
  --greg
 
  --
  L.G. Meredith
  Managing Partner
  Biosimilarity LLC
  806 55th St NE
  Seattle, WA 98105
 
  +1 206.650.3740
 
  http://biosimilarity.blogspot.com
 
   liftTestCase.zip
  407KViewDownload
 



-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105

+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] slightly off topic hibernate question

2009-02-16 Thread Meredith Gregory
Lifted,

Does anyone have experience with using the hibernate reverse-engineering
stuff under maven? Everything i've stumbled on is ant-driven.

Best wishes,

--greg

-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105

+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: slightly off topic hibernate question

2009-02-17 Thread Meredith Gregory
Lifted,

i've successfully taken a pretty complex ActiveRecord-gen'd db structure
(deployed on MySQL) to JPA with two cmdline invocations and pretty minimal
Hibernate config. To my mind this significantly eases the burder of porting
large RoR (or JRoR) apps to Lift. It also helps with cases where you'd like
RoR apps to work in tandem with a Lift+Scala backend.

To flesh out this part of the experiment it would be very helpful to look at
some examples of using Lift with JPA. Are there any lying around that i
might take a gander at?

Best wishes,

--greg

On Tue, Feb 17, 2009 at 9:46 AM, Derek Chen-Becker dchenbec...@gmail.comwrote:

 I've only used it under Eclipse. I would assume that there should be some
 way to call an ant script from Maven, though...

 Derek


 On Mon, Feb 16, 2009 at 1:16 PM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Lifted,

 Does anyone have experience with using the hibernate reverse-engineering
 stuff under maven? Everything i've stumbled on is ant-driven.

 Best wishes,

 --greg

 --
 L.G. Meredith
 Managing Partner
 Biosimilarity LLC
 806 55th St NE
 Seattle, WA 98105

 +1 206.650.3740

 http://biosimilarity.blogspot.com




 



-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105

+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: slightly off topic hibernate question

2009-02-17 Thread Meredith Gregory
Derek,

Thanks for your note. Can you tell me where the liftweb JPA demo is? Looking
at the repo under sites i see

sites http://code.google.com/p/liftweb/source/browse/#

   - example http://code.google.com/p/liftweb/source/browse/#
   - hellodarwin http://code.google.com/p/liftweb/source/browse/#
   - hellolift http://code.google.com/p/liftweb/source/browse/#
   - skittr http://code.google.com/p/liftweb/source/browse/#

Best wishes,

--greg

On Tue, Feb 17, 2009 at 10:02 AM, Derek Chen-Becker
dchenbec...@gmail.comwrote:

 There's the JPADemo site under liftweb, or I might be able to pull together
 some sample code in private.

 Derek


 On Tue, Feb 17, 2009 at 10:59 AM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Lifted,

 i've successfully taken a pretty complex ActiveRecord-gen'd db structure
 (deployed on MySQL) to JPA with two cmdline invocations and pretty minimal
 Hibernate config. To my mind this significantly eases the burder of porting
 large RoR (or JRoR) apps to Lift. It also helps with cases where you'd like
 RoR apps to work in tandem with a Lift+Scala backend.

 To flesh out this part of the experiment it would be very helpful to look
 at some examples of using Lift with JPA. Are there any lying around that i
 might take a gander at?

 Best wishes,

 --greg


 On Tue, Feb 17, 2009 at 9:46 AM, Derek Chen-Becker dchenbec...@gmail.com
  wrote:

 I've only used it under Eclipse. I would assume that there should be some
 way to call an ant script from Maven, though...

 Derek


 On Mon, Feb 16, 2009 at 1:16 PM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Lifted,

 Does anyone have experience with using the hibernate reverse-engineering
 stuff under maven? Everything i've stumbled on is ant-driven.

 Best wishes,

 --greg

 --
 L.G. Meredith
 Managing Partner
 Biosimilarity LLC
 806 55th St NE
 Seattle, WA 98105

 +1 206.650.3740

 http://biosimilarity.blogspot.com








 --
 L.G. Meredith
 Managing Partner
 Biosimilarity LLC
 806 55th St NE
 Seattle, WA 98105

 +1 206.650.3740

 http://biosimilarity.blogspot.com




 



-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105

+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: slightly off topic hibernate question

2009-02-17 Thread Meredith Gregory
Derek,

i found the JPA demo -- it seems to have been added recently. i don't know
JPA -- at all -- so i don't know if it's idiomatic, but the code in the
sample is easily read. Whoever did it did a nice job.

Best wishes,

--greg

On Tue, Feb 17, 2009 at 10:31 AM, Meredith Gregory lgreg.mered...@gmail.com
 wrote:

 Derek,

 Thanks for your note. Can you tell me where the liftweb JPA demo is?
 Looking at the repo under sites i see

 sites http://code.google.com/p/liftweb/source/browse/#

- example http://code.google.com/p/liftweb/source/browse/#
- hellodarwin http://code.google.com/p/liftweb/source/browse/#
- hellolift http://code.google.com/p/liftweb/source/browse/#
- skittr http://code.google.com/p/liftweb/source/browse/#

 Best wishes,

 --greg


 On Tue, Feb 17, 2009 at 10:02 AM, Derek Chen-Becker dchenbec...@gmail.com
  wrote:

 There's the JPADemo site under liftweb, or I might be able to pull
 together some sample code in private.

 Derek


 On Tue, Feb 17, 2009 at 10:59 AM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Lifted,

 i've successfully taken a pretty complex ActiveRecord-gen'd db structure
 (deployed on MySQL) to JPA with two cmdline invocations and pretty minimal
 Hibernate config. To my mind this significantly eases the burder of porting
 large RoR (or JRoR) apps to Lift. It also helps with cases where you'd like
 RoR apps to work in tandem with a Lift+Scala backend.

 To flesh out this part of the experiment it would be very helpful to look
 at some examples of using Lift with JPA. Are there any lying around that i
 might take a gander at?

 Best wishes,

 --greg


 On Tue, Feb 17, 2009 at 9:46 AM, Derek Chen-Becker 
 dchenbec...@gmail.com wrote:

 I've only used it under Eclipse. I would assume that there should be
 some way to call an ant script from Maven, though...

 Derek


 On Mon, Feb 16, 2009 at 1:16 PM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Lifted,

 Does anyone have experience with using the hibernate
 reverse-engineering stuff under maven? Everything i've stumbled on is
 ant-driven.

 Best wishes,

 --greg

 --
 L.G. Meredith
 Managing Partner
 Biosimilarity LLC
 806 55th St NE
 Seattle, WA 98105

 +1 206.650.3740

 http://biosimilarity.blogspot.com








 --
 L.G. Meredith
 Managing Partner
 Biosimilarity LLC
 806 55th St NE
 Seattle, WA 98105

 +1 206.650.3740

 http://biosimilarity.blogspot.com




 



 --
 L.G. Meredith
 Managing Partner
 Biosimilarity LLC
 806 55th St NE
 Seattle, WA 98105

 +1 206.650.3740

 http://biosimilarity.blogspot.com




-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105

+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: slightly off topic hibernate question

2009-02-17 Thread Meredith Gregory
Derek,

i noticed that it was pretty cleanly carved off and i could more or less
steal the bulk of it. Glad you've made an honest person of me again. ;-)

Best wishes,

--greg

On Tue, Feb 17, 2009 at 11:26 AM, Derek Chen-Becker
dchenbec...@gmail.comwrote:

 FYI, I've moved the Scala JPA stuff into its own module:

 http://scala-tools.org/mvnsites-snapshots/scalajpa/

 That way it can be used outside of Lift. I believe Kris might be working on
 refactoring the JPA demo site to use the ScalaJPA module for the 1.0
 release, but I'm not positive.

 Derek


 On Tue, Feb 17, 2009 at 12:20 PM, Charles F. Munat c...@munat.com wrote:


 That would be Derek, I believe. And it is very nicely done.

 Greg -- I'll send you some code off list.

 Chas.

 Meredith Gregory wrote:
  Derek,
 
  i found the JPA demo -- it seems to have been added recently. i don't
  know JPA -- at all -- so i don't know if it's idiomatic, but the code in
  the sample is easily read. Whoever did it did a nice job.
 
  Best wishes,
 
  --greg
 
  On Tue, Feb 17, 2009 at 10:31 AM, Meredith Gregory
  lgreg.mered...@gmail.com mailto:lgreg.mered...@gmail.com wrote:
 
  Derek,
 
  Thanks for your note. Can you tell me where the liftweb JPA demo is?
  Looking at the repo under sites i see
 
  sites http://code.google.com/p/liftweb/source/browse/#
 
  * example http://code.google.com/p/liftweb/source/browse/#
  * hellodarwin http://code.google.com/p/liftweb/source/browse/#
 
  * hellolift http://code.google.com/p/liftweb/source/browse/#
  * skittr http://code.google.com/p/liftweb/source/browse/#
 
  Best wishes,
 
  --greg
 
 
  On Tue, Feb 17, 2009 at 10:02 AM, Derek Chen-Becker
  dchenbec...@gmail.com mailto:dchenbec...@gmail.com wrote:
 
  There's the JPADemo site under liftweb, or I might be able to
  pull together some sample code in private.
 
  Derek
 
 
  On Tue, Feb 17, 2009 at 10:59 AM, Meredith Gregory
  lgreg.mered...@gmail.com mailto:lgreg.mered...@gmail.com
 wrote:
 
  Lifted,
 
  i've successfully taken a pretty complex ActiveRecord-gen'd
  db structure (deployed on MySQL) to JPA with two cmdline
  invocations and pretty minimal Hibernate config. To my mind
  this significantly eases the burder of porting large RoR (or
  JRoR) apps to Lift. It also helps with cases where you'd
  like RoR apps to work in tandem with a Lift+Scala backend.
 
  To flesh out this part of the experiment it would be very
  helpful to look at some examples of using Lift with JPA. Are
  there any lying around that i might take a gander at?
 
  Best wishes,
 
  --greg
 
 
  On Tue, Feb 17, 2009 at 9:46 AM, Derek Chen-Becker
  dchenbec...@gmail.com mailto:dchenbec...@gmail.com
 wrote:
 
  I've only used it under Eclipse. I would assume that
  there should be some way to call an ant script from
  Maven, though...
 
  Derek
 
 
  On Mon, Feb 16, 2009 at 1:16 PM, Meredith Gregory
  lgreg.mered...@gmail.com
  mailto:lgreg.mered...@gmail.com wrote:
 
  Lifted,
 
  Does anyone have experience with using the hibernate
  reverse-engineering stuff under maven? Everything
  i've stumbled on is ant-driven.
 
  Best wishes,
 
  --greg
 
  --
  L.G. Meredith
  Managing Partner
  Biosimilarity LLC
  806 55th St NE
  Seattle, WA 98105
 
  +1 206.650.3740
 
  http://biosimilarity.blogspot.com
 
 
 
 
 
 
 
 
  --
  L.G. Meredith
  Managing Partner
  Biosimilarity LLC
  806 55th St NE
  Seattle, WA 98105
 
  +1 206.650.3740
 
  http://biosimilarity.blogspot.com
 
 
 
 
 
 
 
 
  --
  L.G. Meredith
  Managing Partner
  Biosimilarity LLC
  806 55th St NE
  Seattle, WA 98105
 
  +1 206.650.3740
 
  http://biosimilarity.blogspot.com
 
 
 
 
  --
  L.G. Meredith
  Managing Partner
  Biosimilarity LLC
  806 55th St NE
  Seattle, WA 98105
 
  +1 206.650.3740
 
  http://biosimilarity.blogspot.com
 
  




 



-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105

+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

[Lift] Re: slightly off topic hibernate question

2009-02-17 Thread Meredith Gregory
Chas,

Thanks!

Best wishes,

--greg

On Tue, Feb 17, 2009 at 11:20 AM, Charles F. Munat c...@munat.com wrote:


 That would be Derek, I believe. And it is very nicely done.

 Greg -- I'll send you some code off list.

 Chas.

 Meredith Gregory wrote:
  Derek,
 
  i found the JPA demo -- it seems to have been added recently. i don't
  know JPA -- at all -- so i don't know if it's idiomatic, but the code in
  the sample is easily read. Whoever did it did a nice job.
 
  Best wishes,
 
  --greg
 
  On Tue, Feb 17, 2009 at 10:31 AM, Meredith Gregory
  lgreg.mered...@gmail.com mailto:lgreg.mered...@gmail.com wrote:
 
  Derek,
 
  Thanks for your note. Can you tell me where the liftweb JPA demo is?
  Looking at the repo under sites i see
 
  sites http://code.google.com/p/liftweb/source/browse/#
 
  * example http://code.google.com/p/liftweb/source/browse/#
  * hellodarwin http://code.google.com/p/liftweb/source/browse/#
  * hellolift http://code.google.com/p/liftweb/source/browse/#
  * skittr http://code.google.com/p/liftweb/source/browse/#
 
  Best wishes,
 
  --greg
 
 
  On Tue, Feb 17, 2009 at 10:02 AM, Derek Chen-Becker
  dchenbec...@gmail.com mailto:dchenbec...@gmail.com wrote:
 
  There's the JPADemo site under liftweb, or I might be able to
  pull together some sample code in private.
 
  Derek
 
 
  On Tue, Feb 17, 2009 at 10:59 AM, Meredith Gregory
  lgreg.mered...@gmail.com mailto:lgreg.mered...@gmail.com
 wrote:
 
  Lifted,
 
  i've successfully taken a pretty complex ActiveRecord-gen'd
  db structure (deployed on MySQL) to JPA with two cmdline
  invocations and pretty minimal Hibernate config. To my mind
  this significantly eases the burder of porting large RoR (or
  JRoR) apps to Lift. It also helps with cases where you'd
  like RoR apps to work in tandem with a Lift+Scala backend.
 
  To flesh out this part of the experiment it would be very
  helpful to look at some examples of using Lift with JPA. Are
  there any lying around that i might take a gander at?
 
  Best wishes,
 
  --greg
 
 
  On Tue, Feb 17, 2009 at 9:46 AM, Derek Chen-Becker
  dchenbec...@gmail.com mailto:dchenbec...@gmail.com
 wrote:
 
  I've only used it under Eclipse. I would assume that
  there should be some way to call an ant script from
  Maven, though...
 
  Derek
 
 
  On Mon, Feb 16, 2009 at 1:16 PM, Meredith Gregory
  lgreg.mered...@gmail.com
  mailto:lgreg.mered...@gmail.com wrote:
 
  Lifted,
 
  Does anyone have experience with using the hibernate
  reverse-engineering stuff under maven? Everything
  i've stumbled on is ant-driven.
 
  Best wishes,
 
  --greg
 
  --
  L.G. Meredith
  Managing Partner
  Biosimilarity LLC
  806 55th St NE
  Seattle, WA 98105
 
  +1 206.650.3740
 
  http://biosimilarity.blogspot.com
 
 
 
 
 
 
 
 
  --
  L.G. Meredith
  Managing Partner
  Biosimilarity LLC
  806 55th St NE
  Seattle, WA 98105
 
  +1 206.650.3740
 
  http://biosimilarity.blogspot.com
 
 
 
 
 
 
 
 
  --
  L.G. Meredith
  Managing Partner
  Biosimilarity LLC
  806 55th St NE
  Seattle, WA 98105
 
  +1 206.650.3740
 
  http://biosimilarity.blogspot.com
 
 
 
 
  --
  L.G. Meredith
  Managing Partner
  Biosimilarity LLC
  806 55th St NE
  Seattle, WA 98105
 
  +1 206.650.3740
 
  http://biosimilarity.blogspot.com
 
  

 



-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105

+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: uh, oh... can't find classes

2009-02-18 Thread Meredith Gregory
Lifted,

i definitely vote to get this feature somewhere in the backlog. i've been
bitten by this 3 times.

Best wishes,

--greg

On Wed, Feb 18, 2009 at 7:18 AM, David Pollak feeder.of.the.be...@gmail.com
 wrote:



 On Wed, Feb 18, 2009 at 6:56 AM, Tim Perrett he...@timperrett.com wrote:


 Agreed, that sounds pukka – I guess its dpp or marius who needs to
 make this call as we have a code freeze on for new features


 This isn't going to happen for 1.0, but it's a good idea for 1.1.




 On Feb 18, 2:39 pm, Viktor Klang viktor.kl...@gmail.com wrote:
  We could add another method that takes a Package and then deprecate the
 one
  that takes a String?
 
 
 
  On Wed, Feb 18, 2009 at 1:13 PM, Tim Perrett he...@timperrett.com
 wrote:
 
   This appears to be a trade off between marginal code verbosity and
   compile time checking... Viktor's solution could be the way to go
   however - this would be a massive breaking change though, as this
   would screw every lift app in existence!
 
   Cheers, Tim
 
   On Feb 18, 10:38 am, Viktor Klang viktor.kl...@gmail.com wrote:
Ok, what about this:
 
Why not have addToPackages take an actual Package?
 
usage:
 
addToPackages(com.my.stuff.SomeClass.getPackage) ?
 
This would prevent stuff from breaking if you refactor/move some
 classes.
 
Worth thinking about?
 
Cheers,
Viktor
 
On Wed, Feb 18, 2009 at 10:58 AM, Charles F. Munat c...@munat.com
   wrote:
 
 Ah! That was it. Forgot I changed the name of the app, and didn't
   change
 it there. Thanks very much! That saved me a lot of trouble.
 
 Chas.
 
 Jean-Luc wrote:
  Is your LiftRules defined according to your snippet package ?
 
  Exemple of addToPackages rule for snippets in
   org.ansoft.myapp.snippet
  package :
  LiftRules.addToPackages(org.ansoft.myapp)
 
  Jean-Luc
 
  2009/2/18 Charles F. Munat c...@munat.com mailto:
 c...@munat.com
 
  Everything starts fine, but when I try to go to the home
 page of
   the
  app, I get this:
 
  XML Parsing Error: prefix not bound to a namespace
  Location:http://localhost:9988/
  Line Number 81, Column 5:  choose:logged_out
  ---^
 
  And this:
 
  WARN - Snippet Failure: SnippetFailure(/ -
 
 ParsePath(List(index),,true,false),Full(LoginOps.login),Class Not
 Found)
  WARN - Snippet Failure: SnippetFailure(/ -
  ParsePath(List(index),,true,false),Full(Misc.logo),Class Not
   Found)
  WARN - Snippet Failure: SnippetFailure(/ -
 
 ParsePath(List(index),,true,false),Full(Menu.navbar),Stateful
 Snippet:
  Dispatch Not Matched)
  WARN - Snippet Failure: SnippetFailure(/ -
  ParsePath(List(index),,true,false),Full(Messages),Class Not
   Found)
  WARN - Snippet Failure: SnippetFailure(/ -
  ParsePath(List(index),,true,false),Full(error_class),Class
 Not
   Found)
  WARN - Snippet Failure: SnippetFailure(/ -
  ParsePath(List(index),,true,false),Full(warning_class),Class
 Not
 Found)
  WARN - Snippet Failure: SnippetFailure(/ -
  ParsePath(List(index),,true,false),Full(notice_class),Class
 Not
 Found)
 
  Did I screw something up or did I miss an update? Any ideas?
 
  Chas.
 
  --
  Jean-Luc Canela
  jlcane...@gmail.com mailto:jlcane...@gmail.com
 
--
Viktor Klang
Senior Systems Analyst
 
  --
  Viktor Klang
  Senior Systems Analyst




 --
 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
806 55th St NE
Seattle, WA 98105

+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] quick question about JPADemo

2009-02-18 Thread Meredith Gregory
Derek or other Lifted,

Is the string fed to the instance of ScalaEntityManager as persistenceName
to name of the DB?

Best wishes,

--greg

-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105

+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: Regression!

2009-02-18 Thread Meredith Gregory
David,

i'm testing in FF and Safari. i get the very same behavior.

Best wishes,

--greg

On Wed, Feb 18, 2009 at 2:17 PM, David Pollak feeder.of.the.be...@gmail.com
 wrote:

 Greg,
 I haven't had a chance to look at your code, but are you testing in
 Firefox?

 Firefox has a very, very, very nasty bug related to XHTML namepsaces that's
 further poked by jQuery.

 Marius is working on a fix and it should be out tomorrow.

 Please try Safari or Chrome for testing and see if the problems are the
 same.

 Thanks,

 David


 On Wed, Feb 18, 2009 at 2:07 PM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Lifted,

 The test case i submitted for strange behavior also happens to be a
 regression test for 11-SNAPSHOT. If you compile and run the dspace test case
 under lift .10, at least the activity creation code works as expected. If
 you compile and run the dspace test case under lift 11-SNAPSHOT, the
 activity creation code does nothing at all.

 i'd roll back to 10, but for the fact that i need changes related to JPA.
 i can haz a clue?

 Best wishes,

 --greg

 On Fri, Feb 13, 2009 at 12:38 PM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Lifted,

 Attached is a minimal example of a strange interaction between lift and a
 jQuery plugin. If you unzip the example you will find inside the
 liftTestCase directory 5 subdirectories two of which contain behaviors to
 compare. The directory 23 contains an example that is purely jQuery with the
 EasyWidgets plugin. The directory dspace contains a lift-based site.

 If you open 23/index.html in a browser you will see a page that allows
 you to add widgets that can be dragged and dropped around. This all works.
 If you cd into dspace and launch mvn jetty:run, sign up, login, then you
 will see a boiled down version of the same thing. The difference is that the
 javascript jQuery call is run as a JsRaw. Everything seems to work except
 you attempt to drag and drop the components. Then you get very weird
 behavior that is easier to see than to describe.

 The thing is, we haven't actually done any interesting lift stuff, yet,
 in the boiled down sample. We're just calling into the EasyWidgets function
 just like in the sample. i would expect these two examples to exhibit nearly
 identical behavior. i'm guessing there's some weird interaction between
 lift-included javascript and the jQuery plugin.

 Several questions:

- How could we devise a way to check at compile time that there is
such an interaction? This seems to be a crucial point as the momentum is 
 to
use third party frontend web components.
- What is the best way to go about finding the interaction if it has
escaped compile time detection?


 Best wishes,

 --greg

 --
 L.G. Meredith
 Managing Partner
 Biosimilarity LLC
 806 55th St NE
 Seattle, WA 98105

 +1 206.650.3740

 http://biosimilarity.blogspot.com




 --
 L.G. Meredith
 Managing Partner
 Biosimilarity LLC
 806 55th St NE
 Seattle, WA 98105

 +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
806 55th St NE
Seattle, WA 98105

+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: Regression!

2009-02-18 Thread Meredith Gregory
Lifted,

Here's a more detailed description of behavior.

What's supposed to happen (and what does under Lift-.10)

   -  unzip liftTestCase.zip; cd liftTestCase/dspace; mvn clean; mvn
   compile; mvn jetty:run
   - point browser at http://localhost:8080
   - signup; login; click on Activities submenu
   - click on + create activity link
   - a widget representing the activity should appear -- and Somebody
   clicked the link should scroll by in stdout

Here's what does happen (if you change pom to point to Lift-.11-SNAPSHOT

   - the same up to click on + create activity link
   - the Somebody clicked the link does scroll by, but the widget does not
   appear


Best wishes,

--greg

On Wed, Feb 18, 2009 at 2:19 PM, Meredith Gregory
lgreg.mered...@gmail.comwrote:

 David,

 i'm testing in FF and Safari. i get the very same behavior.

 Best wishes,

 --greg


 On Wed, Feb 18, 2009 at 2:17 PM, David Pollak 
 feeder.of.the.be...@gmail.com wrote:

 Greg,
 I haven't had a chance to look at your code, but are you testing in
 Firefox?

 Firefox has a very, very, very nasty bug related to XHTML namepsaces
 that's further poked by jQuery.

 Marius is working on a fix and it should be out tomorrow.

 Please try Safari or Chrome for testing and see if the problems are the
 same.

 Thanks,

 David


 On Wed, Feb 18, 2009 at 2:07 PM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Lifted,

 The test case i submitted for strange behavior also happens to be a
 regression test for 11-SNAPSHOT. If you compile and run the dspace test case
 under lift .10, at least the activity creation code works as expected. If
 you compile and run the dspace test case under lift 11-SNAPSHOT, the
 activity creation code does nothing at all.

 i'd roll back to 10, but for the fact that i need changes related to JPA.
 i can haz a clue?

 Best wishes,

 --greg

 On Fri, Feb 13, 2009 at 12:38 PM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Lifted,

 Attached is a minimal example of a strange interaction between lift and
 a jQuery plugin. If you unzip the example you will find inside the
 liftTestCase directory 5 subdirectories two of which contain behaviors to
 compare. The directory 23 contains an example that is purely jQuery with 
 the
 EasyWidgets plugin. The directory dspace contains a lift-based site.

 If you open 23/index.html in a browser you will see a page that allows
 you to add widgets that can be dragged and dropped around. This all works.
 If you cd into dspace and launch mvn jetty:run, sign up, login, then you
 will see a boiled down version of the same thing. The difference is that 
 the
 javascript jQuery call is run as a JsRaw. Everything seems to work except
 you attempt to drag and drop the components. Then you get very weird
 behavior that is easier to see than to describe.

 The thing is, we haven't actually done any interesting lift stuff, yet,
 in the boiled down sample. We're just calling into the EasyWidgets function
 just like in the sample. i would expect these two examples to exhibit 
 nearly
 identical behavior. i'm guessing there's some weird interaction between
 lift-included javascript and the jQuery plugin.

 Several questions:

- How could we devise a way to check at compile time that there is
such an interaction? This seems to be a crucial point as the momentum 
 is to
use third party frontend web components.
- What is the best way to go about finding the interaction if it has
escaped compile time detection?


 Best wishes,

 --greg

 --
 L.G. Meredith
 Managing Partner
 Biosimilarity LLC
 806 55th St NE
 Seattle, WA 98105

 +1 206.650.3740

 http://biosimilarity.blogspot.com




 --
 L.G. Meredith
 Managing Partner
 Biosimilarity LLC
 806 55th St NE
 Seattle, WA 98105

 +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
 806 55th St NE
 Seattle, WA 98105

 +1 206.650.3740

 http://biosimilarity.blogspot.com




-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105

+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: Regression!

2009-02-18 Thread Meredith Gregory
David,

Thanks! Now... if i could get help tracking down the bad jQuery interaction
that i originally made the test case for... ;-)

Best wishes,

--greg

On Wed, Feb 18, 2009 at 2:50 PM, David Pollak feeder.of.the.be...@gmail.com
 wrote:

 Greg,

 You experienced a progression, not a regression. :-)

 I tightened up the Lift security model a little bit such that Lift will not
 pass requests to the Servlet container just because the request was not
 found in sitemap.

 So, what you can do is define a pattern that excludes the widget1.html,
 etc. files from being serviced by Lift.  Lift will pass the request right
 onto the container and all will work as you expect.  In Boot:

 LiftRules.liftRequest.append {
   case Req(n :: Nil, _, _) if n.startsWith(widget)  n != widgets
 = false
 }

 Thanks,

 David


 On Wed, Feb 18, 2009 at 2:26 PM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Lifted,

 Here's a more detailed description of behavior.

 What's supposed to happen (and what does under Lift-.10)

-  unzip liftTestCase.zip; cd liftTestCase/dspace; mvn clean; mvn
compile; mvn jetty:run
- point browser at http://localhost:8080
- signup; login; click on Activities submenu
- click on + create activity link
- a widget representing the activity should appear -- and Somebody
clicked the link should scroll by in stdout

 Here's what does happen (if you change pom to point to Lift-.11-SNAPSHOT

- the same up to click on + create activity link
- the Somebody clicked the link does scroll by, but the widget does
not appear


 Best wishes,

 --greg


 On Wed, Feb 18, 2009 at 2:19 PM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 David,

 i'm testing in FF and Safari. i get the very same behavior.

 Best wishes,

 --greg


 On Wed, Feb 18, 2009 at 2:17 PM, David Pollak 
 feeder.of.the.be...@gmail.com wrote:

 Greg,
 I haven't had a chance to look at your code, but are you testing in
 Firefox?

 Firefox has a very, very, very nasty bug related to XHTML namepsaces
 that's further poked by jQuery.

 Marius is working on a fix and it should be out tomorrow.

 Please try Safari or Chrome for testing and see if the problems are the
 same.

 Thanks,

 David


 On Wed, Feb 18, 2009 at 2:07 PM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Lifted,

 The test case i submitted for strange behavior also happens to be a
 regression test for 11-SNAPSHOT. If you compile and run the dspace test 
 case
 under lift .10, at least the activity creation code works as expected. If
 you compile and run the dspace test case under lift 11-SNAPSHOT, the
 activity creation code does nothing at all.

 i'd roll back to 10, but for the fact that i need changes related to
 JPA. i can haz a clue?

 Best wishes,

 --greg

 On Fri, Feb 13, 2009 at 12:38 PM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Lifted,

 Attached is a minimal example of a strange interaction between lift
 and a jQuery plugin. If you unzip the example you will find inside the
 liftTestCase directory 5 subdirectories two of which contain behaviors to
 compare. The directory 23 contains an example that is purely jQuery with 
 the
 EasyWidgets plugin. The directory dspace contains a lift-based site.

 If you open 23/index.html in a browser you will see a page that allows
 you to add widgets that can be dragged and dropped around. This all 
 works.
 If you cd into dspace and launch mvn jetty:run, sign up, login, then you
 will see a boiled down version of the same thing. The difference is that 
 the
 javascript jQuery call is run as a JsRaw. Everything seems to work except
 you attempt to drag and drop the components. Then you get very weird
 behavior that is easier to see than to describe.

 The thing is, we haven't actually done any interesting lift stuff,
 yet, in the boiled down sample. We're just calling into the EasyWidgets
 function just like in the sample. i would expect these two examples to
 exhibit nearly identical behavior. i'm guessing there's some weird
 interaction between lift-included javascript and the jQuery plugin.

 Several questions:

- How could we devise a way to check at compile time that there is
such an interaction? This seems to be a crucial point as the momentum 
 is to
use third party frontend web components.
- What is the best way to go about finding the interaction if it
has escaped compile time detection?


 Best wishes,

 --greg

 --
 L.G. Meredith
 Managing Partner
 Biosimilarity LLC
 806 55th St NE
 Seattle, WA 98105

 +1 206.650.3740

 http://biosimilarity.blogspot.com




 --
 L.G. Meredith
 Managing Partner
 Biosimilarity LLC
 806 55th St NE
 Seattle, WA 98105

 +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

[Lift] Re: [scala] typed browser scripting languages?

2009-02-18 Thread Meredith Gregory
Lifted, Scalads and Lasses,

Today i recalled that the skydeck http://skydeck.com/ folks had done an OCaml
- JS compiler http://code.google.com/p/ocamljs/ and then dogfooded for
their offerings. i've not played with it, myself, but the skydeck site is
pretty nifty.

Best wishes,

--greg

On Sun, Feb 15, 2009 at 2:28 PM, Mark Chadwick mark.chadw...@gmail.comwrote:



 Thanks! Has anybody used this?


 Yes.  I've used haxe extensively.  Though mostly for Flash apps, I've had
 to dig into its JavaScript a number of times (generally when doing Flash -
 DOM interactions).  Watch out if you don't need very much JavaScript code,
 as even the smallest haxe script will generate a substantial amount of
 boilerplate JS.

 I believe it's written in ocaml, so you may have some luck using it to
 pragmatically gen your JS, though I doubt there's much of a translation
 facility.

 It's a pretty clean language by itself.  Very close to ECMAScript.  Its
 type inference is no Scala, but does a good job in the majority of cases.
 Packages.  Most OO constructs.  First class functions.

 -Mark


 



-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105

+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] typed browser scripting languages?

2009-02-18 Thread Meredith Gregory
Mark,

Many thanks for this feedback. Do you know of any connection between the
HaXe codebase and the skydeck folks' ocamljs?

Best wishes,

--greg

On Sun, Feb 15, 2009 at 2:28 PM, Mark Chadwick mark.chadw...@gmail.comwrote:



 Thanks! Has anybody used this?


 Yes.  I've used haxe extensively.  Though mostly for Flash apps, I've had
 to dig into its JavaScript a number of times (generally when doing Flash -
 DOM interactions).  Watch out if you don't need very much JavaScript code,
 as even the smallest haxe script will generate a substantial amount of
 boilerplate JS.

 I believe it's written in ocaml, so you may have some luck using it to
 pragmatically gen your JS, though I doubt there's much of a translation
 facility.

 It's a pretty clean language by itself.  Very close to ECMAScript.  Its
 type inference is no Scala, but does a good job in the majority of cases.
 Packages.  Most OO constructs.  First class functions.

 -Mark


 



-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105

+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: [ANN] Lift 1.0 is released

2009-02-26 Thread Meredith Gregory
David,
i think i can speak for all concerned: very many thanks for the focus,
energy and do-what-it-takes-to-get-it-done-ness you've brought to bear on
this project!

Best wishes,

--greg

On Thu, Feb 26, 2009 at 12:28 PM, David Pollak 
feeder.of.the.be...@gmail.com wrote:

 Two years ago, today, I 
 launchedhttp://blog.lostlake.org/index.php?/archives/43-Announcing-the-lift-web-framework-version-0.1.0.htmlthe
  Lift Web Framework as an open source project.  Wow... it's been a long
 and fun experience... and today the dozen plus Lift committers and the whole
 Lift community together are releasing Lift 1.0.

 Lift is an expressive elegant web framework based on the 
 Scalahttp://scala-lang.org/programming language and released under an an 
 Apache 2.0 license.  Lift
 provides developers the best way to build interactive, high performance web
 applications.  Lift based applications are deployed as WAR files into J2EE
 containers such as Jetty, Tomcat, and WebLogic.  Lift based applications are
 high performance and can make use of your existing Java libraries.

 I could wax on for hours about:

- Lift's Comet and Ajax support which allows you to build real-time
interactive applications
- Lift's concise code allowing developer productivity normally
associated with Rails and TurboGears
- Lift's high performance and scalability
- Lift's built-in support for REST and other web services
- Lift's use of Scala's type-safety so your tests can focus on business
logic

 But, that's not the most impressive thing about Lift.  Lift is powered by a
 community of committers and users that cares about building tools for
 building great web apps.  Lift is impressive because of the people who use,
 drive, enhance and exchange ideas about Lift.  The Lift community is a warm,
 welcoming place for people of all backgrounds.  The Lift community and Lift
 committers strive to learn from others and roll that learning into Lift and
 their own projects.  That's my take on what makes Lift great, but let's hear
 what other have to say about Lift:

 The interest and excitement about Scala continues to grow.  It's great to
 see Lift reaching the 1.0 milestone as this is a proof point for the
 maturity of Scala as a software platform.
 Martin Odersky http://lamp.epfl.ch/%7Eodersky/, ACM Fellow, Father of
 Scala


 Lift is the only new framework in the last four years to offer fresh and
 innovative approaches to web development. It's not just some incremental
 improvements over the status quo, it redefines the state of the art. If you
 are a web developer, you should learn Lift. Even if you don't wind up using
 it everyday, it will change the way you approach web applications.
 Michael 
 Galpinhttp://www.ibm.com/developerworks/opensource/library/os-ag-lift/#author,
 Developer, eBay


  The slight added complexity of static typing is more than offset by the
 performance, scalability, and the benefits of type safety. Lift is maturing
 rapidly and has already proven itself many times over, and it will only get
 better.

 As much as I liked Ruby and Rails, I like Scala and Lift better. After more
 than two years of developing software in Ruby/Rails, we've shifted all our
 development efforts to Scala/Lift. And we are not looking back.
 Charles Munat, Lightsource Interactivehttp://lightsourceinteractive.com/


  Lift's excellent 'Comet made easy' philosophy made it an absolute
 no-brainer as the choice of framework for the Apache ESME project.
 Additionally, the fact that Lift-based applications run unchanged on the
 SAP's NetWeaver CE Java application server makes this an intriguing approach
 for enterprise applications in the SAP world.
 Darren Hague, SAP Mentor, ESME http://blog.esme.us/ team lead


  When I decided to put Innovation Games http://buyafeature.com/® online,
 I knew that I couldn't afford a massive development effort. I needed a
 small, sharp team who could leverage best-in-class tools to help us solve
 the problems we knew that we'd have to solve in creating a new kind of
 collaborative gaming experience on the web. David suggested Lift and Scala
 and initial testing proved that we could realize the developer efficiency
 and backend scalability that we felt was required to efficiently support
 thousands of simultaneous games. We're now very comfortable with Lift and
 Scala and are pleased with how the solution framework continues to evolve to
 meet our needs. While we've used lift to push the boundaries of interactive
 web design, I strongly recommend anyone who wants to build a compelling web
 experience using an elegant framework to consider using Lift.
 Luke Hohmann, CEO, Enthiosys http://enthiosys.com/


  If you're looking for a web framework on a strongly typed functional
 language and the JVM, Lift is the only game in town. Oh, and it just works,
 too.
 L.G. Meredith, Managing Partner, Biosimilarity LLC


  For me it's mainly because Lift represents collective web wisdom - all
 lessons 

[Lift] java parser?

2009-02-26 Thread Meredith Gregory
Scalads, lasses and Lifted,
i find myself in the situation where i need to parse a bunch of java source.
Unfortunately my google-fu is not up to snuff to ferret out good open source
java parsers. i'm wondering what the state of the scala java parsing is? i
assume it's available 2.7.3. Is it documented? Does anyone who's used it in
anger have any tips or resources they'd like to share?

Best wishes,

--greg

-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105

+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: Design + Logo Tweaks

2009-02-26 Thread Meredith Gregory
Ron,
Thanks for the pointers. You know Chas Munat has a good deal of learnin'
about logo design. i'd solicit an opinion from him. i do think your idea of
cloud imagery for the header is timely. It's a little too 'hello kitty' for
my personal taste, but my eye is just too idiosyncratic to provide much
useful feedback. Besides, if we got a bazillion teenagers of the fairer
gender using lift, that wouldn't necessarily be a bad thing ;-).

Best wishes,

--greg

On Thu, Feb 26, 2009 at 1:21 PM, Ron Kurti theperfectb...@gmail.com wrote:


 This is my first post.

 I expressed interest to David about helping out with
 the look  feel of LIFT so that the design gets as
 much attention to detail as the code.

 As a starting point...
 I'd like to contribute a more refined version of the logo.
 The differences are subtle... but the level of
 quality and detail is higher, IMO.

 logo on transparent background (32bit png) »
 http://ron.kurti.com/lift/logo2+alpha.png

 header image for the lift website (8bit png) »
 http://ron.kurti.com/lift/home-top-2.png

 I'm 100% open to comments and suggestions.
 I don't have much time to contribute, but I will try to
 add as much as I can wherever I can.

 I look forward to doing more in the future.

 Congrats on 1.0
 - ron

 



-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105

+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: java parser?

2009-02-26 Thread Meredith Gregory
Ricky,
Aha! i was off-by-1 on the number of c's. Thanks.

Best wishes,

--greg

On Thu, Feb 26, 2009 at 2:30 PM, Ricky Clarkson ricky.clark...@gmail.comwrote:

 No, I was pointing at javac, as in the Java compiler.

 2009/2/26 Meredith Gregory lgreg.mered...@gmail.com

 Derek, et al,
 Thanks for all the quick responses. i found that both versions of the
 ANTLR 1.6 grammar blow up (egregiously) in their own ANTLRWORKS tool. The
 1.5 grammar from Terry Parr seems to work.

 The google codebase javaparser (that i think Ricky Clarkson was pointing
 to) seems a good bet. That's my poison of choice for now.

 Best wishes,

 --greg

 On Thu, Feb 26, 2009 at 2:12 PM, Derek Chen-Becker dchenbec...@gmail.com
  wrote:

 I've only ever used ANTLR (http://www.antlr.org/) to do parsers. There's
 an experimental Java 6 grammar that you could use here:

 http://openjdk.java.net/projects/compiler-grammar/antlrworks/Java.g

 Derek


 On Thu, Feb 26, 2009 at 3:22 PM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Scalads, lasses and Lifted,
 i find myself in the situation where i need to parse a bunch of java
 source. Unfortunately my google-fu is not up to snuff to ferret out good
 open source java parsers. i'm wondering what the state of the scala java
 parsing is? i assume it's available 2.7.3. Is it documented? Does anyone
 who's used it in anger have any tips or resources they'd like to share?

 Best wishes,

 --greg

 --
 L.G. Meredith
 Managing Partner
 Biosimilarity LLC
 806 55th St NE
 Seattle, WA 98105

 +1 206.650.3740

 http://biosimilarity.blogspot.com




 



 --
 L.G. Meredith
 Managing Partner
 Biosimilarity LLC
 806 55th St NE
 Seattle, WA 98105

 +1 206.650.3740

 http://biosimilarity.blogspot.com





-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105

+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: java parser?

2009-02-26 Thread Meredith Gregory
Lifted,
FYI -- the google codebase javaproject has some interesting challenges to be
used with scala/lift project.

   1. binary not compiled with same version of the java compiler
   2. sources not utf-8

Nothing insurmountable, but colluding to make the usage experience less than
optimal. One interesting result of the non-utf-8ness: after a certain number
of warnings from the scala built-in java compiler the mvn build process just
craps out with no error reportage. It just falls over.

Best wishes,

--greg

On Thu, Feb 26, 2009 at 2:25 PM, Meredith Gregory
lgreg.mered...@gmail.comwrote:

 Derek, et al,
 Thanks for all the quick responses. i found that both versions of the ANTLR
 1.6 grammar blow up (egregiously) in their own ANTLRWORKS tool. The 1.5
 grammar from Terry Parr seems to work.

 The google codebase javaparser (that i think Ricky Clarkson was pointing
 to) seems a good bet. That's my poison of choice for now.

 Best wishes,

 --greg


 On Thu, Feb 26, 2009 at 2:12 PM, Derek Chen-Becker 
 dchenbec...@gmail.comwrote:

 I've only ever used ANTLR (http://www.antlr.org/) to do parsers. There's
 an experimental Java 6 grammar that you could use here:

 http://openjdk.java.net/projects/compiler-grammar/antlrworks/Java.g

 Derek


 On Thu, Feb 26, 2009 at 3:22 PM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Scalads, lasses and Lifted,
 i find myself in the situation where i need to parse a bunch of java
 source. Unfortunately my google-fu is not up to snuff to ferret out good
 open source java parsers. i'm wondering what the state of the scala java
 parsing is? i assume it's available 2.7.3. Is it documented? Does anyone
 who's used it in anger have any tips or resources they'd like to share?

 Best wishes,

 --greg

 --
 L.G. Meredith
 Managing Partner
 Biosimilarity LLC
 806 55th St NE
 Seattle, WA 98105

 +1 206.650.3740

 http://biosimilarity.blogspot.com




 



 --
 L.G. Meredith
 Managing Partner
 Biosimilarity LLC
 806 55th St NE
 Seattle, WA 98105

 +1 206.650.3740

 http://biosimilarity.blogspot.com




-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105

+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: jetty dependency weirdness

2009-02-26 Thread Meredith Gregory
David,
i did. that. and. other. things.

Eventually, it just started working again. Software: can't live with it;
can't kill it.

Best wishes,

--greg

On Thu, Feb 26, 2009 at 4:18 PM, David Pollak feeder.of.the.be...@gmail.com
 wrote:

 Greg,
 Try mvn -o compile and see if that makes a difference.

 Thanks,

 David


 On Thu, Feb 26, 2009 at 3:35 PM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Lifted,
 i'm suddenly unable to build. Anyone else experiencing this particular
 division of joy?

 Best wishes,

 --greg

 bash-3.2$ mvn compile
 [INFO] Scanning for projects...
 [INFO]
 
 [INFO] Building dspace
 [INFO]task-segment: [compile]
 [INFO]
 
 Downloading:
 http://repo1.maven.org/maven2/org/mortbay/jetty/maven-jetty-plugin/6.1.15.rc5/maven-jetty-plugin-6.1.15.rc5.pom
 Downloading:
 http://scala-tools.org/repo-releases/org/mortbay/jetty/maven-jetty-plugin/6.1.15.rc5/maven-jetty-plugin-6.1.15.rc5.jar
 Downloading:
 http://repo1.maven.org/maven2/org/mortbay/jetty/maven-jetty-plugin/6.1.15.rc5/maven-jetty-plugin-6.1.15.rc5.jar
 [INFO]
 
 [ERROR] BUILD FAILURE
 [INFO]
 
 [INFO] A required plugin was not found: Plugin could not be found - check
 that the goal name is correct: Unable to download the artifact from any
 repository

 Try downloading the file manually from the project website.

 Then, install it using the command:
 mvn install:install-file -DgroupId=org.mortbay.jetty
 -DartifactId=maven-jetty-plugin -Dversion=6.1.15.rc5
 -Dpackaging=maven-plugin -Dfile=/path/to/file

 Alternatively, if you host your own repository you can deploy the file
 there:
 mvn deploy:deploy-file -DgroupId=org.mortbay.jetty
 -DartifactId=maven-jetty-plugin -Dversion=6.1.15.rc5
 -Dpackaging=maven-plugin -Dfile=/path/to/file -Durl=[url]
 -DrepositoryId=[id]


   org.mortbay.jetty:maven-jetty-plugin:maven-plugin:6.1.15.rc5

 from the specified remote repositories:
   central (http://repo1.maven.org/maven2),
   scala-tools.org (http://scala-tools.org/repo-releases)

   org.mortbay.jetty:maven-jetty-plugin:maven-plugin:6.1.15.rc5

 from the specified remote repositories:
   central (http://repo1.maven.org/maven2),
   scala-tools.org (http://scala-tools.org/repo-releases)

 [INFO]
 
 [INFO] For more information, run Maven with the -e switch
 [INFO]
 
 [INFO] Total time: 1 second
 [INFO] Finished at: Thu Feb 26 15:33:38 PST 2009
 [INFO] Final Memory: 2M/5M
 [INFO]
 
 bash-3.2$

 --
 L.G. Meredith
 Managing Partner
 Biosimilarity LLC
 806 55th St NE
 Seattle, WA 98105

 +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
806 55th St NE
Seattle, WA 98105

+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: OS X lift installer

2009-02-27 Thread Meredith Gregory
Jon,
No. There are at least two options -- both of which i use.

   - once mvn has cached stuff you can run offline with the -o option
   - you can also deploy jars to a local repo which can be a directory
   resource or your own cloud resource
   - i have a little shell script deploy-jar.sh i use to deploy to a common
   place in my project structure // see listing below
   - i add the following repo structure to my pom.xml

repository
  idlocal-repo/id
  urlfile://${basedir}/vendor/lib/url
/repository


   - after i am happy that i've got the right dependencies, i push my local
   repo up to my own cloud resource


 cat deploy-jar.sh
#! /bin/sh
mvn deploy:deploy-file -Durl=file://`pwd`/vendor/lib -DrepositoryId=basedir
-Dfile=$1.jar -DgroupId=$2 -DartifactId=$1 -Dversion=$3 -Dpackaging=jar



Best wishes,

--greg

On Fri, Feb 27, 2009 at 2:03 PM, Jon Hancock shellsha...@gmail.com wrote:


 thanks.  based on your above mention that maven is web aware and some
 comment I read from David Pollak that his demo didn't go so well when
 he lacked an internet connection, is it the case that I have to always
 have a working internet connect to use maven/lift?

 thanks, Jon

 On Feb 27, 3:59 pm, Meredith Gregory lgreg.mered...@gmail.com wrote:
  Jon,
  The only thing i needed to do to get that running was
 
 
 
   sudo port install maven2
  ...
   export PATH=/opt/local/bin:$PATH
 
  This assumes, however, that you are already using macports.
 
  Best wishes,
 
  --greg
 
  On Fri, Feb 27, 2009 at 1:54 PM, Jon Hancock shellsha...@gmail.com
 wrote:
 
   thanks, I'll study this a bit more.
   The lift installer I mentioned ishttp://
 liftweb.net/download.html#macosx
 
   Jon
 
   On Feb 27, 3:41 pm, Meredith Gregory lgreg.mered...@gmail.com wrote:
Jon,
i'm not sure if you are talking about some specific lift installer,
 and
   i'm
no maven expert, but i use it and lift on my macbook pro. i think of
 mvn
   as
a make that is aware of the web (and whose language for expressing
 rules
   is
incredibly verbose). Being aware of the web, mvn allows project build
configurations to express dependencies on repositories in the
 cloud.
   These
it downloads and caches to ~/.m2 -- unless you configure it
 otherwise.
   Nine
times out of ten, it dependencies are jars that are mentioned as
dependency tags in the pom.xml file in your project. It is then
 able to
configure the classpath for the JVM targets (like compile). If you
 put
dependencies on other technologies, e.g. a container like jetty, and
 use
those maven plugin goals you will be launching and running those
 servers.
 
So... putting it together in terms of a usage scenario
 
 mklift.sh com.myorg.myservice myfeature // see listing for
 mklift.sh
   below
 
// causes mvn to generate a basic lift project
[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
Define value for version:  1.0-SNAPSHOT: :
Confirm properties configuration:
groupId: com.myorg.myservice
artifactId: myfeature
version: 1.0-SNAPSHOT
package: com.myorg.myservice
 Y: :
[INFO]
 
  
 ---
   -
[INFO] Using following parameters for creating OldArchetype:
lift-archetype-basic:0.10
[INFO]
 
  
 ---
   -
[INFO] Parameter: groupId, Value: com.myorg.myservice
[INFO] Parameter: packageName, Value: com.myorg.myservice
[INFO] Parameter: basedir, Value:
/Users/lgm/work/src/projex/biosimilarity/scratch
[INFO] Parameter: package, Value: com.myorg.myservice
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO

[Lift] Re: chaining servlets

2009-03-02 Thread Meredith Gregory
PPS The reason i want Jersey on the outbound path is that it has pretty
nifty support for rendering to XML and other formats. A single Produces
annotation at the class level, for example, suffices to cause all the web
methods to render according to format specified in the annotation. Oh, and
Jersey also autogenerates the WADL description of the service -- which is
going to come in handy for other stuff we're doing.

On Mon, Mar 2, 2009 at 3:16 PM, Meredith Gregory
lgreg.mered...@gmail.comwrote:

 Tim, et al,

 Thanks for the many responses. Here's the overall context. i've got a group
 that has done some significant work building a JRoR site. Now they want to
 scale. As a part of a midterm strategy to get some reasonable tooling in,
 we're building Scala-based RESTful APIs. Being an idiot, i want as general a
 soln as possible. So, here's what i've done.

- a plain, vanilla Hibernate reverse engineering strategy will fetch
both JPA and simple POJOs
   - This gets me Scala access to the backend
   - Now, i want to generate default controller behavior. i've
written a Scala program that eats what Hibernate spits out and creates
default controller behavior. It uses the Jersey annotations (Produces,
Consumes, Path, GET, PUT,...) to control rendering to/from the client of 
 the
RESTful API

 What i want to do now is to interject lift into the mix so that we can
 allow programmers to specialize the controller behavior in scala/lift code.

 The reason i've attempted to be fairly generic about all this is that i
 believe this represents a tool-chain that allows a semi-automated migration
 path from pick-you-webframework to lift/scala. The idea is that the SQL
 schema is about 80% of where the rubber meets the road, so that ought to be
 the place to hoist your app out of some existing solution. This works
 especially well if you're transition from a JVM soln (JRoR) to a JVM soln.

 Best wishes,

 --greg


 On Mon, Mar 2, 2009 at 3:02 PM, Timothy Perrett 
 timo...@getintheloop.euwrote:


 Greg, can I enquire to your specific use case?
 I’d be interested to hear what you feel Jersey adds value to over lift (im
 not familiar with Jersey)?

 In my experience when you need a round the houses solution such as this
 their can often be a simpler path :-)

 Cheers, Tim


 On 02/03/2009 22:46, Viktor Klang viktor.kl...@gmail.com wrote:

 hehe, no worries, I'm one of your fans. :)

 You should be able to accomplish this by having the filter mapping for
 Jersey in web.xml placed before the Lift filter mapping:

 Recall that a filter chain is one of the objects passed to the 
 doFiltermethod of a filter. This chain is formed indirectly via filter 
 mappings. The
 order of the filters in the chain is the same as the order that filter
 mappings appear in the web application deployment descriptor. 

 http://java.sun.com/products/servlet/Filters.html


 The Jersey will handle the request first, then pass it thru to Lift, then
 back.
 I of course have not tested this with Jersey and do not know if there are
 any strange things that can happen.
 But I'm sure you'll find out and get back to us ;)


 Cheers,
 Viktor

 On Mon, Mar 2, 2009 at 11:28 PM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Marius, Viktor,

 Many thanks for your prompt responses. You'll have to pardon me as i've
 not graduated from Web101 ;-). i was really looking for an example. To
 illustrate, in looking at web.xml in a archetype-generated lift project i
 see that only filter and filter mapping is defined. How is a servlet then
 chosen?

 Also, i'm sort of interested in *wrapping* lift's request processing.
 Here's what i mean. If i've understood what Jersey does correctly (and
 that's a big if), then it will do Request and Response rendering. So, what i
 want is

  == HttpRequest == (JerseyFilter) == ModifiedRequest == (LiftFilter) ==
 Response == (JerseyFilter) == ModifiedOutboundResponse ==

 It's not clear to me how this is accomplished. There's the dead obvious
 idea, but i'm leary that this won't work because the types are unlikely to
 line up.

 Best wishes,

 --greg

 On Mon, Mar 2, 2009 at 1:00 PM, Viktor Klang viktor.kl...@gmail.com
 wrote:



 On Mon, Mar 2, 2009 at 8:51 PM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Lifted, scalads and lasses,

 Does anybody have a working sample of chaining the lift servlet with a 3rd
 party servlet? i'm interested in doing this with the Jersey servlet to get
 some of their request/response rendering support.


 This is why we made Lift a Filter :)




 Best wishes,

 --greg


 



 --
 L.G. Meredith
 Managing Partner
 Biosimilarity LLC
 806 55th St NE
 Seattle, WA 98105

 +1 206.650.3740

 http://biosimilarity.blogspot.com




-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you

[Lift] Re: chaining servlets

2009-03-02 Thread Meredith Gregory
David,

Please find below the web.xml i'm currently experimenting with.

Best wishes,

--greg

?xml version=1.0 encoding=ISO-8859-1?

!DOCTYPE web-app
PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
http://java.sun.com/dtd/web-app_2_3.dtd;

web-app
filter
  filter-nameJerseyFilter/filter-name
  display-nameJersey Filter/display-name
  descriptionAttempting to use Jersey as a Filter/description

filter-classcom.sun.jersey.spi.container.servlet.ServletContainer/filter-class
/filter
filter
  filter-nameLiftFilter/filter-name
  display-nameLift Filter/display-name
  descriptionThe Filter that intercepts lift calls/description
  filter-classnet.liftweb.http.LiftFilter/filter-class
/filter

filter-mapping
  filter-nameJerseyFilter/filter-name
  url-pattern/*/url-pattern
/filter-mapping
filter-mapping
  filter-nameLiftFilter/filter-name
  url-pattern/*/url-pattern
/filter-mapping

/web-app


On Mon, Mar 2, 2009 at 3:00 PM, David Pollak
feeder.of.the.be...@gmail.comwrote:

 Not to be a nudge, but how about if Greg sends us his web.xml file and the
 name of his Jersey Filter, we re-write the web.xml file for him and he
 writes a wiki page explaining the process?


 On Mon, Mar 2, 2009 at 2:46 PM, Viktor Klang viktor.kl...@gmail.comwrote:

 hehe, no worries, I'm one of your fans. :)

 You should be able to accomplish this by having the filter mapping for
 Jersey in web.xml placed before the Lift filter mapping:

 Recall that a filter chain is one of the objects passed to the 
 doFiltermethod of a filter. This chain is formed indirectly via filter 
 mappings. The
 order of the filters in the chain is the same as the order that filter
 mappings appear in the web application deployment descriptor. 

 http://java.sun.com/products/servlet/Filters.html


 The Jersey will handle the request first, then pass it thru to Lift, then
 back.
 I of course have not tested this with Jersey and do not know if there are
 any strange things that can happen.
 But I'm sure you'll find out and get back to us ;)


 Cheers,
 Viktor

 On Mon, Mar 2, 2009 at 11:28 PM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Marius, Viktor,

 Many thanks for your prompt responses. You'll have to pardon me as i've
 not graduated from Web101 ;-). i was really looking for an example. To
 illustrate, in looking at web.xml in a archetype-generated lift project i
 see that only filter and filter mapping is defined. How is a servlet then
 chosen?

 Also, i'm sort of interested in *wrapping* lift's request processing.
 Here's what i mean. If i've understood what Jersey does correctly (and
 that's a big if), then it will do Request and Response rendering. So, what i
 want is

  == HttpRequest == (JerseyFilter) == ModifiedRequest == (LiftFilter)
 == Response == (JerseyFilter) == ModifiedOutboundResponse ==

 It's not clear to me how this is accomplished. There's the dead obvious
 idea, but i'm leary that this won't work because the types are unlikely to
 line up.

 Best wishes,

 --greg

 On Mon, Mar 2, 2009 at 1:00 PM, Viktor Klang viktor.kl...@gmail.comwrote:



 On Mon, Mar 2, 2009 at 8:51 PM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Lifted, scalads and lasses,

 Does anybody have a working sample of chaining the lift servlet with a
 3rd party servlet? i'm interested in doing this with the Jersey servlet to
 get some of their request/response rendering support.


 This is why we made Lift a Filter :)




 Best wishes,

 --greg

 --
 L.G. Meredith
 Managing Partner
 Biosimilarity LLC
 806 55th St NE
 Seattle, WA 98105

 +1 206.650.3740

 http://biosimilarity.blogspot.com





 --
 Viktor Klang
 Senior Systems Analyst





 --
 L.G. Meredith
 Managing Partner
 Biosimilarity LLC
 806 55th St NE
 Seattle, WA 98105

 +1 206.650.3740

 http://biosimilarity.blogspot.com





 --
 Viktor Klang
 Senior Systems Analyst





 --
 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
806 55th St NE
Seattle, WA 98105

+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] really stupid maven question

2009-03-02 Thread Meredith Gregory
Lifted,

i've got all the classes i generate making a class to a Model object derived
from the nice work that Derek did on the JPA demo. Now, here's the rub. For
some reason it's compiling the generated classes before tackling the
compilation of the model object. So... the compilation craps out. i've been
working around this by generating the classes, compiling the project
(without the classes) then moving them into place in the model directory and
compiling the project again. What's the pretty way to enforce this
sequentialization in maven. i really want these classes compiled *after* the
Model.scala file is compiled. i'd like not to say much more than this
ordering constraint to maven -- if at all possible.

Best wishes,

--greg

-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105

+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: [Jersey] jersey as filter

2009-03-02 Thread Meredith Gregory
Alex,

Thanks for all your help. i switched versions in the pom.xml (to 1.0.2 which
is the most recent on the sun repo that is not labeled SNAPSHOT) and i get
the right values from reflecting (BTW -- has anybody written a little lift
browser app that hooks into reflection so that one can graphically browse
the class/instances in memory?). Now i just need to figure out how to pass
the resources context to Jersey. It's got a config for the ServletContainer
class, but i don't see anything if i'm just using it as a filter.

Best wishes,

--greg

On Mon, Mar 2, 2009 at 6:13 PM, Alex Boisvert boisv...@intalio.com wrote:

 No, sorry, I've grown allergic to mvn.

 If you must know, I wrote a 5-line ruby script that bootstraps the scala
 interpreter with a given classpath.

 #!/usr/bin/env scalarun
 classpath  artifact(com.sun.jersey:jersey-server:jar:1.02)
 classpath  artifact(javax.servlet:servlet-api:jar:2.5)
 classpath  artifact(javax.ws.rs:jsr311-api:jar:1.0)
 interactive = true
 !#

 So we're down to two main possibilities... 1) something is wrong with your
 Maven pom.xml or 2) your local artifacts are inconsistent with what's in the
 repos.

 alex



 On Mon, Mar 2, 2009 at 6:05 PM, Meredith Gregory lgreg.mered...@gmail.com
  wrote:

 Alex,

 Interesting. Did you build with mvn? If so, what were your
 plugins/dependencies?

 Best wishes,

 --greg


 On Mon, Mar 2, 2009 at 6:01 PM, Alex Boisvert boisv...@intalio.comwrote:

 Greg,

 Something must be messed up in your configuration Here's what I get:

 Welcome to Scala version 2.7.3.final (Java HotSpot(TM) Server VM, Java
 1.6.0_10).
 Type in expressions to have them evaluated.
 Type :help for more information.

 scala new com.sun.jersey.spi.container.servlet.ServletContainer()
 res0: com.sun.jersey.spi.container.servlet.ServletContainer =
 com.sun.jersey.spi.container.servlet.servletcontai...@15cd9a

 scala res0.getClass.getInterfaces
 res2: Array[java.lang.Class[_]] = Array(interface javax.servlet.Servlet,
 interface javax.servlet.ServletConfig, interface javax.servlet.Filter,
 interface java.io.Serializable)

 (I'm using jersey-server-1.0.2.jar)

 alex


 On Mon, Mar 2, 2009 at 5:47 PM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Alex,

 i was coming to the same conclusion. OTOH, reflecting on
 com.sun.jersey.spi.container.servlet.ServletContainer i see different stuff
 than what's declared in the sources. See below.

 Best wishes,

 --greg

 scala new com.sun.jersey.spi.container.servlet.ServletContainer()
 new com.sun.jersey.spi.container.servlet.ServletContainer()
 new com.sun.jersey.spi.container.servlet.ServletContainer()
 res0: com.sun.jersey.spi.container.servlet.ServletContainer =
 com.sun.jersey.spi.container.servlet.servletcontai...@50b410

 scala res0.getClass
 res0.getClass
 res0.getClass
 res1: java.lang.Class[_ : java.lang.Object] = class
 com.sun.jersey.spi.container.servlet.ServletContainer

 scala res0.getClass.getSuperclass
 res0.getClass.getSuperclass
 res0.getClass.getSuperclass
 res7: java.lang.Class[_ : ?0] = class javax.servlet.http.HttpServlet

 // i was expecting to see WebComponent here

 scala res0.getClass.getInterfaces
 res0.getClass.getInterfaces
 res0.getClass.getInterfaces
 res8: Array[java.lang.Class[_]] = Array(interface
 com.sun.jersey.spi.container.ContainerListener)

 // i was expecting to see Servlet, ServletConfig, Filter, Serializable
 in this list.




 On Mon, Mar 2, 2009 at 5:13 PM, Alex Boisvert boisv...@intalio.comwrote:

 My guess would be that you have duplicate servlet-api-2.x.jar in your
 classloading hierarchy... can you check and remove any servlet.jar under
 your webapp WEB-INF/lib directory?

 alex




 On Mon, Mar 2, 2009 at 4:45 PM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Alex,

 Thanks for the interest. See below.

 Best wishes,

 --greg

 ?xml version=1.0 encoding=ISO-8859-1?

 !DOCTYPE web-app
 PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
 http://java.sun.com/dtd/web-app_2_3.dtd;

 web-app
 filter
   filter-nameJerseyFilter/filter-name
   display-nameJersey Filter/display-name
   descriptionAttempting to use Jersey as a Filter/description

 filter-classcom.sun.jersey.spi.container.servlet.ServletContainer/filter-class
 /filter
 filter
   filter-nameLiftFilter/filter-name
   display-nameLift Filter/display-name
   descriptionThe Filter that intercepts lift calls/description
   filter-classnet.liftweb.http.LiftFilter/filter-class
 /filter

 filter-mapping
   filter-nameJerseyFilter/filter-name
   url-pattern/*/url-pattern
 /filter-mapping
 filter-mapping
   filter-nameLiftFilter/filter-name
   url-pattern/*/url-pattern
 /filter-mapping

 /web-app



 On Mon, Mar 2, 2009 at 4:43 PM, Alex Boisvert 
 boisv...@intalio.comwrote:

 Can you post your web.xml?



 On Mon, Mar 2, 2009 at 3:50 PM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Marc,

 Thanks for the link! BTW, i'm looking at that sources from the
 Jersey jar and it appears

[Lift] Re: [Jersey] jersey as filter

2009-03-02 Thread Meredith Gregory
Lifted,

Well, at least i've got jetty launching and running with both filters. See
the web.xml that worked below.

Best wishes,

--greg

?xml version=1.0 encoding=ISO-8859-1?

!DOCTYPE web-app
PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
http://java.sun.com/dtd/web-app_2_3.dtd;

web-app
filter
  filter-nameJerseyFilter/filter-name
  display-nameJersey Filter/display-name
  descriptionAttempting to use Jersey as a Filter/description

filter-classcom.sun.jersey.spi.container.servlet.ServletContainer/filter-class
  init-param
param-namecom.sun.jersey.config.property.packages/param-name
param-valuecom.sap.dspace.model.constellation.resources/param-value
  /init-param
/filter
filter
  filter-nameLiftFilter/filter-name
  display-nameLift Filter/display-name
  descriptionThe Filter that intercepts lift calls/description
  filter-classnet.liftweb.http.LiftFilter/filter-class
/filter

filter-mapping
  filter-nameJerseyFilter/filter-name
  url-pattern/*/url-pattern
/filter-mapping
filter-mapping
  filter-nameLiftFilter/filter-name
  url-pattern/*/url-pattern
/filter-mapping

/web-app


On Mon, Mar 2, 2009 at 6:25 PM, Meredith Gregory
lgreg.mered...@gmail.comwrote:

 Alex,

 Thanks for all your help. i switched versions in the pom.xml (to 1.0.2
 which is the most recent on the sun repo that is not labeled SNAPSHOT) and i
 get the right values from reflecting (BTW -- has anybody written a little
 lift browser app that hooks into reflection so that one can graphically
 browse the class/instances in memory?). Now i just need to figure out how to
 pass the resources context to Jersey. It's got a config for the
 ServletContainer class, but i don't see anything if i'm just using it as a
 filter.

 Best wishes,

 --greg

 On Mon, Mar 2, 2009 at 6:13 PM, Alex Boisvert boisv...@intalio.comwrote:

 No, sorry, I've grown allergic to mvn.

 If you must know, I wrote a 5-line ruby script that bootstraps the scala
 interpreter with a given classpath.

 #!/usr/bin/env scalarun
 classpath  artifact(com.sun.jersey:jersey-server:jar:1.02)
 classpath  artifact(javax.servlet:servlet-api:jar:2.5)
 classpath  artifact(javax.ws.rs:jsr311-api:jar:1.0)
 interactive = true
 !#

 So we're down to two main possibilities... 1) something is wrong with your
 Maven pom.xml or 2) your local artifacts are inconsistent with what's in the
 repos.

 alex



 On Mon, Mar 2, 2009 at 6:05 PM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Alex,

 Interesting. Did you build with mvn? If so, what were your
 plugins/dependencies?

 Best wishes,

 --greg


 On Mon, Mar 2, 2009 at 6:01 PM, Alex Boisvert boisv...@intalio.comwrote:

 Greg,

 Something must be messed up in your configuration Here's what I get:

 Welcome to Scala version 2.7.3.final (Java HotSpot(TM) Server VM, Java
 1.6.0_10).
 Type in expressions to have them evaluated.
 Type :help for more information.

 scala new com.sun.jersey.spi.container.servlet.ServletContainer()
 res0: com.sun.jersey.spi.container.servlet.ServletContainer =
 com.sun.jersey.spi.container.servlet.servletcontai...@15cd9a

 scala res0.getClass.getInterfaces
 res2: Array[java.lang.Class[_]] = Array(interface javax.servlet.Servlet,
 interface javax.servlet.ServletConfig, interface javax.servlet.Filter,
 interface java.io.Serializable)

 (I'm using jersey-server-1.0.2.jar)

 alex


 On Mon, Mar 2, 2009 at 5:47 PM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Alex,

 i was coming to the same conclusion. OTOH, reflecting on
 com.sun.jersey.spi.container.servlet.ServletContainer i see different 
 stuff
 than what's declared in the sources. See below.

 Best wishes,

 --greg

 scala new com.sun.jersey.spi.container.servlet.ServletContainer()
 new com.sun.jersey.spi.container.servlet.ServletContainer()
 new com.sun.jersey.spi.container.servlet.ServletContainer()
 res0: com.sun.jersey.spi.container.servlet.ServletContainer =
 com.sun.jersey.spi.container.servlet.servletcontai...@50b410

 scala res0.getClass
 res0.getClass
 res0.getClass
 res1: java.lang.Class[_ : java.lang.Object] = class
 com.sun.jersey.spi.container.servlet.ServletContainer

 scala res0.getClass.getSuperclass
 res0.getClass.getSuperclass
 res0.getClass.getSuperclass
 res7: java.lang.Class[_ : ?0] = class javax.servlet.http.HttpServlet

 // i was expecting to see WebComponent here

 scala res0.getClass.getInterfaces
 res0.getClass.getInterfaces
 res0.getClass.getInterfaces
 res8: Array[java.lang.Class[_]] = Array(interface
 com.sun.jersey.spi.container.ContainerListener)

 // i was expecting to see Servlet, ServletConfig, Filter, Serializable
 in this list.




 On Mon, Mar 2, 2009 at 5:13 PM, Alex Boisvert boisv...@intalio.comwrote:

 My guess would be that you have duplicate servlet-api-2.x.jar in your
 classloading hierarchy... can you check and remove any servlet.jar under
 your webapp WEB-INF/lib directory?

 alex




 On Mon, Mar 2, 2009 at 4:45 PM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Alex,

 Thanks

[Lift] Re: [Jersey] jersey as filter

2009-03-03 Thread Meredith Gregory
Viktor,

Thanks. Jersey-1.0.2 *does* implement Filter. You can see that in the
sources jar and if you include it in a scala/lift project and reflect it
does the right thing.

Best wishes,

--greg

On Tue, Mar 3, 2009 at 1:46 AM, Viktor Klang viktor.kl...@gmail.com wrote:

 Unfortunately,


 https://jersey.dev.java.net/source/browse/*checkout*/jersey/tags/jersey-1.0.1/api/jersey/index.html

 says:

 public class *ServletContainer*extends 
 javax.servlet.http.HttpServletimplements ContainerListener 
 https://jersey.dev.java.net/source/browse/*checkout*/jersey/tags/jersey-1.0.1/api/jersey/com/sun/jersey/spi/container/ContainerListener.html


 which means that the ServletContainer is not implementing the
 javax.servlet.Filter


 This is just an idea, and I do not know if it will work, but you could try
 something like this, and map it as a filter:

 Java: (Feel free to rewrite as Scala :) )

 public class JerseyFilter extends ServletContainer implements Filter
 {
 @Override
 public void doFilter(ServletRequest req, ServletResponse res,
 FilterChain fChain)
 throws IOException, ServletException
 {
 service(req,res);
 fChain.doFilter(req, res);
 }

 @Override
 public void init(FilterConfig fConfig) throws ServletException
 {
 super.init();
 }

 @Override
 public void destroy()
 {
 super.destroy();
 }
 }

 Please get back to us :)

 Cheers,
 Viktor



 On Tue, Mar 3, 2009 at 3:32 AM, Meredith Gregory lgreg.mered...@gmail.com
  wrote:

 Lifted,

 Well, at least i've got jetty launching and running with both filters. See
 the web.xml that worked below.

 Best wishes,

 --greg

 ?xml version=1.0 encoding=ISO-8859-1?

 !DOCTYPE web-app
 PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
 http://java.sun.com/dtd/web-app_2_3.dtd;

 web-app
 filter
   filter-nameJerseyFilter/filter-name
   display-nameJersey Filter/display-name
   descriptionAttempting to use Jersey as a Filter/description

 filter-classcom.sun.jersey.spi.container.servlet.ServletContainer/filter-class
   init-param
 param-namecom.sun.jersey.config.property.packages/param-name

 param-valuecom.sap.dspace.model.constellation.resources/param-value
   /init-param
 /filter
 filter
   filter-nameLiftFilter/filter-name
   display-nameLift Filter/display-name
   descriptionThe Filter that intercepts lift calls/description
   filter-classnet.liftweb.http.LiftFilter/filter-class
 /filter

 filter-mapping
   filter-nameJerseyFilter/filter-name
   url-pattern/*/url-pattern
 /filter-mapping
 filter-mapping
   filter-nameLiftFilter/filter-name
   url-pattern/*/url-pattern
 /filter-mapping

 /web-app


  On Mon, Mar 2, 2009 at 6:25 PM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Alex,

 Thanks for all your help. i switched versions in the pom.xml (to 1.0.2
 which is the most recent on the sun repo that is not labeled SNAPSHOT) and i
 get the right values from reflecting (BTW -- has anybody written a little
 lift browser app that hooks into reflection so that one can graphically
 browse the class/instances in memory?). Now i just need to figure out how to
 pass the resources context to Jersey. It's got a config for the
 ServletContainer class, but i don't see anything if i'm just using it as a
 filter.

 Best wishes,

 --greg

 On Mon, Mar 2, 2009 at 6:13 PM, Alex Boisvert boisv...@intalio.comwrote:

 No, sorry, I've grown allergic to mvn.

 If you must know, I wrote a 5-line ruby script that bootstraps the scala
 interpreter with a given classpath.

 #!/usr/bin/env scalarun
 classpath  artifact(com.sun.jersey:jersey-server:jar:1.02)
 classpath  artifact(javax.servlet:servlet-api:jar:2.5)
 classpath  artifact(javax.ws.rs:jsr311-api:jar:1.0)
 interactive = true
 !#

 So we're down to two main possibilities... 1) something is wrong with
 your Maven pom.xml or 2) your local artifacts are inconsistent with what's
 in the repos.

 alex



 On Mon, Mar 2, 2009 at 6:05 PM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Alex,

 Interesting. Did you build with mvn? If so, what were your
 plugins/dependencies?

 Best wishes,

 --greg


 On Mon, Mar 2, 2009 at 6:01 PM, Alex Boisvert boisv...@intalio.comwrote:

 Greg,

 Something must be messed up in your configuration Here's what I
 get:

 Welcome to Scala version 2.7.3.final (Java HotSpot(TM) Server VM, Java
 1.6.0_10).
 Type in expressions to have them evaluated.
 Type :help for more information.

 scala new com.sun.jersey.spi.container.servlet.ServletContainer()
 res0: com.sun.jersey.spi.container.servlet.ServletContainer =
 com.sun.jersey.spi.container.servlet.servletcontai...@15cd9a

 scala res0.getClass.getInterfaces
 res2: Array[java.lang.Class[_]] = Array(interface
 javax.servlet.Servlet, interface javax.servlet.ServletConfig, interface
 javax.servlet.Filter, interface java.io.Serializable)

 (I'm using jersey-server-1.0.2.jar)

 alex


 On Mon, Mar 2, 2009 at 5:47 PM, Meredith Gregory

[Lift] Re: [Jersey] jersey as filter

2009-03-03 Thread Meredith Gregory
Viktor,

The combined servlet is eating http requests, but it's not processing them
correctly. i'm still not sure about all the Jersey path stuff. i'm the
process of debugging.

Best wishes,

--greg

On Tue, Mar 3, 2009 at 7:04 AM, Viktor Klang viktor.kl...@gmail.com wrote:

 Greg,

 Great, then it was just me finding the wrong API docs online :)


 But the real question is: Does it work? :)


 Cheers,
 Viktor


 On Tue, Mar 3, 2009 at 4:00 PM, Meredith Gregory lgreg.mered...@gmail.com
  wrote:

 Viktor,

 Thanks. Jersey-1.0.2 *does* implement Filter. You can see that in the
 sources jar and if you include it in a scala/lift project and reflect it
 does the right thing.

 Best wishes,

 --greg

 On Tue, Mar 3, 2009 at 1:46 AM, Viktor Klang viktor.kl...@gmail.comwrote:

 Unfortunately,


 https://jersey.dev.java.net/source/browse/*checkout*/jersey/tags/jersey-1.0.1/api/jersey/index.html

 says:

 public class *ServletContainer*extends 
 javax.servlet.http.HttpServletimplements ContainerListener 
 https://jersey.dev.java.net/source/browse/*checkout*/jersey/tags/jersey-1.0.1/api/jersey/com/sun/jersey/spi/container/ContainerListener.html


 which means that the ServletContainer is not implementing the
 javax.servlet.Filter


 This is just an idea, and I do not know if it will work, but you could
 try something like this, and map it as a filter:

 Java: (Feel free to rewrite as Scala :) )

 public class JerseyFilter extends ServletContainer implements Filter
 {
 @Override
 public void doFilter(ServletRequest req, ServletResponse res,
 FilterChain fChain)
 throws IOException, ServletException
 {
 service(req,res);
 fChain.doFilter(req, res);
 }

 @Override
 public void init(FilterConfig fConfig) throws ServletException
 {
 super.init();
 }

 @Override
 public void destroy()
 {
 super.destroy();
 }
 }

 Please get back to us :)

 Cheers,
 Viktor



 On Tue, Mar 3, 2009 at 3:32 AM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Lifted,

 Well, at least i've got jetty launching and running with both filters.
 See the web.xml that worked below.

 Best wishes,

 --greg

 ?xml version=1.0 encoding=ISO-8859-1?

 !DOCTYPE web-app
 PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
 http://java.sun.com/dtd/web-app_2_3.dtd;

 web-app
 filter
   filter-nameJerseyFilter/filter-name
   display-nameJersey Filter/display-name
   descriptionAttempting to use Jersey as a Filter/description

 filter-classcom.sun.jersey.spi.container.servlet.ServletContainer/filter-class
   init-param
 param-namecom.sun.jersey.config.property.packages/param-name

 param-valuecom.sap.dspace.model.constellation.resources/param-value
   /init-param
 /filter
 filter
   filter-nameLiftFilter/filter-name
   display-nameLift Filter/display-name
   descriptionThe Filter that intercepts lift calls/description
   filter-classnet.liftweb.http.LiftFilter/filter-class
 /filter

 filter-mapping
   filter-nameJerseyFilter/filter-name
   url-pattern/*/url-pattern
 /filter-mapping
 filter-mapping
   filter-nameLiftFilter/filter-name
   url-pattern/*/url-pattern
 /filter-mapping

 /web-app


  On Mon, Mar 2, 2009 at 6:25 PM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Alex,

 Thanks for all your help. i switched versions in the pom.xml (to 1.0.2
 which is the most recent on the sun repo that is not labeled SNAPSHOT) 
 and i
 get the right values from reflecting (BTW -- has anybody written a little
 lift browser app that hooks into reflection so that one can graphically
 browse the class/instances in memory?). Now i just need to figure out how 
 to
 pass the resources context to Jersey. It's got a config for the
 ServletContainer class, but i don't see anything if i'm just using it as a
 filter.

 Best wishes,

 --greg

 On Mon, Mar 2, 2009 at 6:13 PM, Alex Boisvert boisv...@intalio.comwrote:

 No, sorry, I've grown allergic to mvn.

 If you must know, I wrote a 5-line ruby script that bootstraps the
 scala interpreter with a given classpath.

 #!/usr/bin/env scalarun
 classpath  artifact(com.sun.jersey:jersey-server:jar:1.02)
 classpath  artifact(javax.servlet:servlet-api:jar:2.5)
 classpath  artifact(javax.ws.rs:jsr311-api:jar:1.0)
 interactive = true
 !#

 So we're down to two main possibilities... 1) something is wrong with
 your Maven pom.xml or 2) your local artifacts are inconsistent with 
 what's
 in the repos.

 alex



 On Mon, Mar 2, 2009 at 6:05 PM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Alex,

 Interesting. Did you build with mvn? If so, what were your
 plugins/dependencies?

 Best wishes,

 --greg


 On Mon, Mar 2, 2009 at 6:01 PM, Alex Boisvert 
 boisv...@intalio.comwrote:

 Greg,

 Something must be messed up in your configuration Here's what I
 get:

 Welcome to Scala version 2.7.3.final (Java HotSpot(TM) Server VM,
 Java 1.6.0_10).
 Type in expressions to have them evaluated.
 Type :help for more information

[Lift] mvn scala:script

2009-03-03 Thread Meredith Gregory
Scalads, lasses and Lifted,

i think i must not understand something about the mvn scala:script. i
thought that args was how you accessed cmdline args. However, see the trace
below.

Best wishes,

--greg

bash-3.2$ mvn scala:script
-Dscript=com.sap.dspace.othello.theIago.generateRESTfulResources(args(0))
-Dargs=/Users/lgm/work/src/projex/bobj/dspace/src/main/java/com/sap/dspace/model/constellation/
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'scala'.
[INFO]

[INFO] Building dspace
[INFO]task-segment: [scala:script]
[INFO]

Downloading:
http://scala-tools.org/repo-releases/org/igniterealtime/smack/smack/3.1.0/smack-3.1.0.pom
Downloading:
http://download.java.net/maven/2/org/igniterealtime/smack/smack/3.1.0/smack-3.1.0.pom
Downloading:
file:///Users/lgm/work/src/projex/bobj/dspace/vendor/lib/org/igniterealtime/smack/smack/3.1.0/smack-3.1.0.pom
Downloading:
http://repo1.maven.org/maven2/org/igniterealtime/smack/smack/3.1.0/smack-3.1.0.pom
Downloading:
http://scala-tools.org/repo-releases/org/igniterealtime/smack/smackx/3.1.0/smackx-3.1.0.pom
Downloading:
http://download.java.net/maven/2/org/igniterealtime/smack/smackx/3.1.0/smackx-3.1.0.pom
Downloading:
file:///Users/lgm/work/src/projex/bobj/dspace/vendor/lib/org/igniterealtime/smack/smackx/3.1.0/smackx-3.1.0.pom
Downloading:
http://repo1.maven.org/maven2/org/igniterealtime/smack/smackx/3.1.0/smackx-3.1.0.pom
[INFO] [scala:script]
[INFO] suggestion: remove the scalaVersion from pom.xml
[INFO] Checking for multiple versions of scala
[INFO] cmd:
/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/bin/java
-classpath
/Users/lgm/.m2/repository/org/scala-lang/scala-library/2.7.3/scala-library-2.7.3.jar:/Users/lgm/.m2/repository/org/scala-lang/scala-compiler/2.7.3/scala-compiler-2.7.3.jar
-Xbootclasspath/a:/Users/lgm/.m2/repository/org/scala-lang/scala-library/2.7.3/scala-library-2.7.3.jar
-Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005
scala.tools.nsc.Main -classpath
/Users/lgm/.m2/repository/com/sun/jersey/jersey-server/1.0.2/jersey-server-1.0.2.jar:/Users/lgm/.m2/repository/org/hibernate/hibernate-entitymanager/

[Lift] Re: mvn scala:script

2009-03-03 Thread Meredith Gregory
goals
  goalexec/goal
/goals
configuration
  executablescala/executable
  arguments
argument-classpath/argument
classpath refid=compile.classpath/
argumentscripts/GenerateFiles.scala/argument

argument${basedir}/src/main/scala/com/sap/dspace/model/constellation//argument
  /arguments
/configuration
  /execution
!--   execution --
!-- idpublish/id --
!-- phaseprocess-classes/phase --
!-- goals --
!--   goalexec/goal --
!-- /goals --
!-- configuration --
!--   executablecp/executable --
!--   arguments --
!-- argument-r/argument --
!--
argument${project.build.directory}/generated-java/reverse/com/sap/dspace/model/constellation/resources/argument
--
!--
argument${basedir}/src/main/scala/com/sap/dspace/model/constellation/argument
--
!--   /arguments --
!-- /configuration --
!--   /execution --
/executions
  /plugin

  plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-antrun-plugin/artifactId
executions
  execution
idreverse/id
phasegenerate-sources/phase
configuration
  tasks
property name=reverse.root
value=${basedir}/src/main/java/reverse/
!-- property name=reverse.dest
value=${project.build.directory}/generated-java/--
property name=reverse.dest value=${basedir}/src/main/scala/
ant antfile=${basedir}/src/main/java/reverse/build.xml
  target name=reveng.entities/
/ant
  /tasks
/configuration
goals
  goalrun/goal
/goals
  /execution
/executions
  /plugin

/plugins
  /build
  reporting
plugins
  plugin
groupIdorg.scala-tools/groupId
artifactIdmaven-scala-plugin/artifactId
configuration
  scalaVersion${scala.version}/scalaVersion
/configuration
  /plugin
/plugins
  /reporting
/project


On Tue, Mar 3, 2009 at 11:50 AM, Josh Suereth joshua.suer...@gmail.comwrote:

 The args parameter as defined in:
 http://scala-tools.org/mvnsites/maven-scala-plugin/script-mojo.html  is
 meant to be used in the configuration section of your maven-scala-plugin
 defintion section in your pom.   Maven has some sugar to allow environment
 variables to replace these configuraiton variables, using something like
 -Dmaven.scala-plugin.args=...   I'll have to look this up, but for now
 please use the pom file or Jean-Luc's suggestion.

 -Josh


 On Tue, Mar 3, 2009 at 1:24 PM, Jean-Luc jlcane...@gmail.com wrote:

 the -Dargs parameter is labelled as compiler additionnals arguments in
 http://scala-tools.org/mvnsites/maven-scala-plugin/script-mojo.html

 Moreover, from the source code :
 step 1 : a scala class is generated in ./target/.scalaScriptGen ; it looks
 like this :
 class embeddedScript_1  {
 // your script content here
Thread.sleep(1)
 }

 step 2 : it is executed here :
 http://scala-tools.org/mvnsites/maven-scala-plugin/xref/org/scala_tools/maven/ScalaScriptMojo.html#172
 step 3 : the temp files are removed

 The only way I see to get some external parameter is using something like
 System.getProperty(args) in yourscript.scala with a
 -DscriptFile=yourscript.scala


 Jean-Luc


 2009/3/3 Meredith Gregory lgreg.mered...@gmail.com

  Scalads, lasses and Lifted,

 i clearly don't understand the mvn scala:script widget. This just works

  scala -classpath $MYSCRIPTCLASSPATH scripts/GenerateFiles.scala
 /Users/lgm/work/src/projex/bobj/dspace/src/main/java/com/sap/dspace/model/constellation/

 (where MYSCRIPTCLASSPATH was set with and export to the value generated
 by a mvn compile with appropriate verbosity on). But this doesn't

  mvn scala:script -DscriptFile=scripts/GenerateFiles.scala
 -Dargs=src/main/java/com/sap/dspace/model/constellation/

 The latter complains -- as in the message below -- that 'args' is not
 defined.

 Best wishes,

 --greg
 - Mostrar texto citado -


 --
 Jean-Luc Canela
 jlcane...@gmail.com





 



-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105

+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: [Jersey] jersey as filter

2009-03-03 Thread Meredith Gregory
Viktor, et al,

Well, i've scoped things down to just running the Jersey helloworld-webapp
sample in jetty with Jersey as the ServletContainer, rather than a Filter.
Even that is displaying the same behavior where the server is eating the
requests, but it's not hitting the resource class get method. Frankly, i
can't see a substantive difference between their sample and the one i've got
-- apart from swapping out glassfish for jetty.

Best wishes,

--greg

On Tue, Mar 3, 2009 at 7:50 AM, Meredith Gregory
lgreg.mered...@gmail.comwrote:

 Viktor,

 The combined servlet is eating http requests, but it's not processing them
 correctly. i'm still not sure about all the Jersey path stuff. i'm the
 process of debugging.

 Best wishes,

 --greg


 On Tue, Mar 3, 2009 at 7:04 AM, Viktor Klang viktor.kl...@gmail.comwrote:

 Greg,

 Great, then it was just me finding the wrong API docs online :)


 But the real question is: Does it work? :)


 Cheers,
 Viktor


 On Tue, Mar 3, 2009 at 4:00 PM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Viktor,

 Thanks. Jersey-1.0.2 *does* implement Filter. You can see that in the
 sources jar and if you include it in a scala/lift project and reflect it
 does the right thing.

 Best wishes,

 --greg

 On Tue, Mar 3, 2009 at 1:46 AM, Viktor Klang viktor.kl...@gmail.comwrote:

 Unfortunately,


 https://jersey.dev.java.net/source/browse/*checkout*/jersey/tags/jersey-1.0.1/api/jersey/index.html

 says:

 public class *ServletContainer*extends 
 javax.servlet.http.HttpServletimplements ContainerListener 
 https://jersey.dev.java.net/source/browse/*checkout*/jersey/tags/jersey-1.0.1/api/jersey/com/sun/jersey/spi/container/ContainerListener.html



 which means that the ServletContainer is not implementing the
 javax.servlet.Filter


 This is just an idea, and I do not know if it will work, but you could
 try something like this, and map it as a filter:

 Java: (Feel free to rewrite as Scala :) )

 public class JerseyFilter extends ServletContainer implements Filter
 {
 @Override
 public void doFilter(ServletRequest req, ServletResponse res,
 FilterChain fChain)
 throws IOException, ServletException
 {
 service(req,res);
 fChain.doFilter(req, res);
 }

 @Override
 public void init(FilterConfig fConfig) throws ServletException
 {
 super.init();
 }

 @Override
 public void destroy()
 {
 super.destroy();
 }
 }

 Please get back to us :)

 Cheers,
 Viktor



 On Tue, Mar 3, 2009 at 3:32 AM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Lifted,

 Well, at least i've got jetty launching and running with both filters.
 See the web.xml that worked below.

 Best wishes,

 --greg

 ?xml version=1.0 encoding=ISO-8859-1?

 !DOCTYPE web-app
 PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
 http://java.sun.com/dtd/web-app_2_3.dtd;

 web-app
 filter
   filter-nameJerseyFilter/filter-name
   display-nameJersey Filter/display-name
   descriptionAttempting to use Jersey as a Filter/description

 filter-classcom.sun.jersey.spi.container.servlet.ServletContainer/filter-class
   init-param
 param-namecom.sun.jersey.config.property.packages/param-name

 param-valuecom.sap.dspace.model.constellation.resources/param-value
   /init-param
 /filter
 filter
   filter-nameLiftFilter/filter-name
   display-nameLift Filter/display-name
   descriptionThe Filter that intercepts lift calls/description
   filter-classnet.liftweb.http.LiftFilter/filter-class
 /filter

 filter-mapping
   filter-nameJerseyFilter/filter-name
   url-pattern/*/url-pattern
 /filter-mapping
 filter-mapping
   filter-nameLiftFilter/filter-name
   url-pattern/*/url-pattern
 /filter-mapping

 /web-app


  On Mon, Mar 2, 2009 at 6:25 PM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Alex,

 Thanks for all your help. i switched versions in the pom.xml (to 1.0.2
 which is the most recent on the sun repo that is not labeled SNAPSHOT) 
 and i
 get the right values from reflecting (BTW -- has anybody written a little
 lift browser app that hooks into reflection so that one can graphically
 browse the class/instances in memory?). Now i just need to figure out 
 how to
 pass the resources context to Jersey. It's got a config for the
 ServletContainer class, but i don't see anything if i'm just using it as 
 a
 filter.

 Best wishes,

 --greg

 On Mon, Mar 2, 2009 at 6:13 PM, Alex Boisvert 
 boisv...@intalio.comwrote:

 No, sorry, I've grown allergic to mvn.

 If you must know, I wrote a 5-line ruby script that bootstraps the
 scala interpreter with a given classpath.

 #!/usr/bin/env scalarun
 classpath  artifact(com.sun.jersey:jersey-server:jar:1.02)
 classpath  artifact(javax.servlet:servlet-api:jar:2.5)
 classpath  artifact(javax.ws.rs:jsr311-api:jar:1.0)
 interactive = true
 !#

 So we're down to two main possibilities... 1) something is wrong with
 your Maven pom.xml or 2) your local artifacts are inconsistent

[Lift] jersey and lift side-by-side + request for link to URL rewrite example

2009-03-03 Thread Meredith Gregory
Viktor, et al,

i don't know if anyone's still interested in this thread... but it turns out
i was missing the contextPath in the jetty plugin config. Setting that
enables the two filters to run side-by-side. Now, on to better things...
what's the best lift sample for the URL rewrite machinery? The simpler the
better for a bear of very little brains, like myself.

Best wishes,

--greg

On Tue, Mar 3, 2009 at 3:08 PM, Meredith Gregory
lgreg.mered...@gmail.comwrote:

 Viktor, et al,

 Well, i've scoped things down to just running the Jersey helloworld-webapp
 sample in jetty with Jersey as the ServletContainer, rather than a Filter.
 Even that is displaying the same behavior where the server is eating the
 requests, but it's not hitting the resource class get method. Frankly, i
 can't see a substantive difference between their sample and the one i've got
 -- apart from swapping out glassfish for jetty.

 Best wishes,

 --greg


 On Tue, Mar 3, 2009 at 7:50 AM, Meredith Gregory lgreg.mered...@gmail.com
  wrote:

 Viktor,

 The combined servlet is eating http requests, but it's not processing them
 correctly. i'm still not sure about all the Jersey path stuff. i'm the
 process of debugging.

 Best wishes,

 --greg


 On Tue, Mar 3, 2009 at 7:04 AM, Viktor Klang viktor.kl...@gmail.comwrote:

 Greg,

 Great, then it was just me finding the wrong API docs online :)


 But the real question is: Does it work? :)


 Cheers,
 Viktor


 On Tue, Mar 3, 2009 at 4:00 PM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Viktor,

 Thanks. Jersey-1.0.2 *does* implement Filter. You can see that in the
 sources jar and if you include it in a scala/lift project and reflect it
 does the right thing.

 Best wishes,

 --greg

 On Tue, Mar 3, 2009 at 1:46 AM, Viktor Klang viktor.kl...@gmail.comwrote:

 Unfortunately,


 https://jersey.dev.java.net/source/browse/*checkout*/jersey/tags/jersey-1.0.1/api/jersey/index.html

 says:

 public class *ServletContainer*extends 
 javax.servlet.http.HttpServletimplements ContainerListener 
 https://jersey.dev.java.net/source/browse/*checkout*/jersey/tags/jersey-1.0.1/api/jersey/com/sun/jersey/spi/container/ContainerListener.html




 which means that the ServletContainer is not implementing the
 javax.servlet.Filter


 This is just an idea, and I do not know if it will work, but you could
 try something like this, and map it as a filter:

 Java: (Feel free to rewrite as Scala :) )

 public class JerseyFilter extends ServletContainer implements Filter
 {
 @Override
 public void doFilter(ServletRequest req, ServletResponse res,
 FilterChain fChain)
 throws IOException, ServletException
 {
 service(req,res);
 fChain.doFilter(req, res);
 }

 @Override
 public void init(FilterConfig fConfig) throws ServletException
 {
 super.init();
 }

 @Override
 public void destroy()
 {
 super.destroy();
 }
 }

 Please get back to us :)

 Cheers,
 Viktor



 On Tue, Mar 3, 2009 at 3:32 AM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Lifted,

 Well, at least i've got jetty launching and running with both filters.
 See the web.xml that worked below.

 Best wishes,

 --greg

 ?xml version=1.0 encoding=ISO-8859-1?

 !DOCTYPE web-app
 PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
 http://java.sun.com/dtd/web-app_2_3.dtd;

 web-app
 filter
   filter-nameJerseyFilter/filter-name
   display-nameJersey Filter/display-name
   descriptionAttempting to use Jersey as a Filter/description

 filter-classcom.sun.jersey.spi.container.servlet.ServletContainer/filter-class
   init-param
 param-namecom.sun.jersey.config.property.packages/param-name

 param-valuecom.sap.dspace.model.constellation.resources/param-value
   /init-param
 /filter
 filter
   filter-nameLiftFilter/filter-name
   display-nameLift Filter/display-name
   descriptionThe Filter that intercepts lift calls/description
   filter-classnet.liftweb.http.LiftFilter/filter-class
 /filter

 filter-mapping
   filter-nameJerseyFilter/filter-name
   url-pattern/*/url-pattern
 /filter-mapping
 filter-mapping
   filter-nameLiftFilter/filter-name
   url-pattern/*/url-pattern
 /filter-mapping

 /web-app


  On Mon, Mar 2, 2009 at 6:25 PM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Alex,

 Thanks for all your help. i switched versions in the pom.xml (to
 1.0.2 which is the most recent on the sun repo that is not labeled 
 SNAPSHOT)
 and i get the right values from reflecting (BTW -- has anybody written a
 little lift browser app that hooks into reflection so that one can
 graphically browse the class/instances in memory?). Now i just need to
 figure out how to pass the resources context to Jersey. It's got a 
 config
 for the ServletContainer class, but i don't see anything if i'm just 
 using
 it as a filter.

 Best wishes,

 --greg

 On Mon, Mar 2, 2009 at 6:13 PM, Alex Boisvert 
 boisv...@intalio.comwrote:

 No, sorry, I've grown allergic

[Lift] Re: [Jersey] jersey as filter

2009-03-04 Thread Meredith Gregory
Viktor,

Thanks for your note. i got things more or less working. See this thread:
jersey and lift side-by-side + request for link to URL rewrite exampleBest
wishes,

--greg

On Wed, Mar 4, 2009 at 1:35 AM, Viktor Klang viktor.kl...@gmail.com wrote:

 Greg,

 have you tried Jersey completely standalone and verified that it's working?


 Cheers,
 Viktor- Show quoted text -


 On Wed, Mar 4, 2009 at 12:08 AM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Viktor, et al,

 Well, i've scoped things down to just running the Jersey helloworld-webapp
 sample in jetty with Jersey as the ServletContainer, rather than a Filter.
 Even that is displaying the same behavior where the server is eating the
 requests, but it's not hitting the resource class get method. Frankly, i
 can't see a substantive difference between their sample and the one i've got
 -- apart from swapping out glassfish for jetty.

 Best wishes,

 --greg


 On Tue, Mar 3, 2009 at 7:50 AM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Viktor,

 The combined servlet is eating http requests, but it's not processing
 them correctly. i'm still not sure about all the Jersey path stuff. i'm the
 process of debugging.

 Best wishes,

 --greg


 On Tue, Mar 3, 2009 at 7:04 AM, Viktor Klang viktor.kl...@gmail.comwrote:

 Greg,

 Great, then it was just me finding the wrong API docs online :)


 But the real question is: Does it work? :)


 Cheers,
 Viktor


 On Tue, Mar 3, 2009 at 4:00 PM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Viktor,

 Thanks. Jersey-1.0.2 *does* implement Filter. You can see that in the
 sources jar and if you include it in a scala/lift project and reflect it
 does the right thing.

 Best wishes,

 --greg

 On Tue, Mar 3, 2009 at 1:46 AM, Viktor Klang 
 viktor.kl...@gmail.comwrote:

 Unfortunately,


 https://jersey.dev.java.net/source/browse/*checkout*/jersey/tags/jersey-1.0.1/api/jersey/index.html

 says:

 public class *ServletContainer*extends 
 javax.servlet.http.HttpServletimplements ContainerListener 
 https://jersey.dev.java.net/source/browse/*checkout*/jersey/tags/jersey-1.0.1/api/jersey/com/sun/jersey/spi/container/ContainerListener.html





 which means that the ServletContainer is not implementing the
 javax.servlet.Filter


 This is just an idea, and I do not know if it will work, but you could
 try something like this, and map it as a filter:

 Java: (Feel free to rewrite as Scala :) )

 public class JerseyFilter extends ServletContainer implements Filter
 {
 @Override
 public void doFilter(ServletRequest req, ServletResponse res,
 FilterChain fChain)
 throws IOException, ServletException
 {
 service(req,res);
 fChain.doFilter(req, res);
 }

 @Override
 public void init(FilterConfig fConfig) throws ServletException
 {
 super.init();
 }

 @Override
 public void destroy()
 {
 super.destroy();
 }
 }

 Please get back to us :)

 Cheers,
 Viktor



 On Tue, Mar 3, 2009 at 3:32 AM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Lifted,

 Well, at least i've got jetty launching and running with both
 filters. See the web.xml that worked below.

 Best wishes,

 --greg

 ?xml version=1.0 encoding=ISO-8859-1?

 !DOCTYPE web-app
 PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
 http://java.sun.com/dtd/web-app_2_3.dtd;

 web-app
 filter
   filter-nameJerseyFilter/filter-name
   display-nameJersey Filter/display-name
   descriptionAttempting to use Jersey as a Filter/description

 filter-classcom.sun.jersey.spi.container.servlet.ServletContainer/filter-class
   init-param
 param-namecom.sun.jersey.config.property.packages/param-name

 param-valuecom.sap.dspace.model.constellation.resources/param-value
   /init-param
 /filter
 filter
   filter-nameLiftFilter/filter-name
   display-nameLift Filter/display-name
   descriptionThe Filter that intercepts lift calls/description
   filter-classnet.liftweb.http.LiftFilter/filter-class
 /filter

 filter-mapping
   filter-nameJerseyFilter/filter-name
   url-pattern/*/url-pattern
 /filter-mapping
 filter-mapping
   filter-nameLiftFilter/filter-name
   url-pattern/*/url-pattern
 /filter-mapping

 /web-app


  On Mon, Mar 2, 2009 at 6:25 PM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Alex,

 Thanks for all your help. i switched versions in the pom.xml (to
 1.0.2 which is the most recent on the sun repo that is not labeled 
 SNAPSHOT)
 and i get the right values from reflecting (BTW -- has anybody written 
 a
 little lift browser app that hooks into reflection so that one can
 graphically browse the class/instances in memory?). Now i just need to
 figure out how to pass the resources context to Jersey. It's got a 
 config
 for the ServletContainer class, but i don't see anything if i'm just 
 using
 it as a filter.

 Best wishes,

 --greg

 On Mon, Mar 2, 2009 at 6:13 PM, Alex Boisvert boisv...@intalio.com
  wrote:

 No, sorry, I've grown allergic

[Lift] i can haz scala xml???

2009-03-04 Thread Meredith Gregory
Sir and Dame Scalahads,

i was attempting to do something really simple-minded with scala.xml._ and
it didn't perform according to Burak's tutorial. So, any clues about the
following would be greatly appreciated.


   - When i type the following into Scala version 2.7.2.final repl, it all
   works

scala
scala.xml.Elem(null,fu,null,scala.xml.TopScope,scala.xml.Elem(null,bar,null,scala.xml.TopScope,scala.xml.Text(5)))
res9: scala.xml.Elem = fubar5/bar/fu

scala

   - But when i attempt to compile a similar expression in Scala version
   2.7.3, it doesn't.

[WARNING]
/Users/lgm/work/src/projex/bobj/dspace/src/main/scala/com/sap/dspace/model/othello/render.scala:26:
error: type mismatch;
[WARNING]  found   : scala.xml.TopScope.type (with underlying type object
scala.xml.TopScope)
[WARNING]  required: scala.xml.MetaData
[WARNING]   TopScope,
[WARNING]   ^

   - Where do i go to see the new api?

It would be cooler if i could do something like
{computeTag(context)}{computeTagContents(context)}/{computeTag(context}

but i think that might be a parsing nightmare and so i'm guessing this isn't
supported. i'd love to know if i'm wrong.

Best wishes,

--greg

-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105

+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] i can haz scala xml???

2009-03-04 Thread Meredith Gregory
David,

Thanks, but not quite. Unfortunately, i do not know the name of the tag. i
have to compute it. So, your soln won't work. As i mentioned in my email,
the following

{computeTag(context)}{computeTagContents(context)}/{computeTag(context}
 is a scheme for what i'd like to do, but it's probably too hard to make
work.

Best wishes,

--greg

On Wed, Mar 4, 2009 at 1:13 PM, David Pollak
feeder.of.the.be...@gmail.comwrote:

 scala fubar5/bar/fu
 res0: scala.xml.Elem = fubar5/bar/fu

 scala fu{(1 to 3).map(i = item{i}/item)}/fu
 res1: scala.xml.Elem = fuitem1/itemitem2/itemitem3/item/fu

 Does that give you what you want (XML literals are part of the language)

 On Wed, Mar 4, 2009 at 1:10 PM, Meredith Gregory lgreg.mered...@gmail.com
  wrote:

 Sir and Dame Scalahads,

 i was attempting to do something really simple-minded with scala.xml._ and
 it didn't perform according to Burak's tutorial. So, any clues about the
 following would be greatly appreciated.


- When i type the following into Scala version 2.7.2.final repl, it
all works

 scala
 scala.xml.Elem(null,fu,null,scala.xml.TopScope,scala.xml.Elem(null,bar,null,scala.xml.TopScope,scala.xml.Text(5)))
 res9: scala.xml.Elem = fubar5/bar/fu

 scala

- But when i attempt to compile a similar expression in Scala version
2.7.3, it doesn't.

 [WARNING]
 /Users/lgm/work/src/projex/bobj/dspace/src/main/scala/com/sap/dspace/model/othello/render.scala:26:
 error: type mismatch;
 [WARNING]  found   : scala.xml.TopScope.type (with underlying type object
 scala.xml.TopScope)
 [WARNING]  required: scala.xml.MetaData
 [WARNING]   TopScope,
 [WARNING]   ^

- Where do i go to see the new api?

 It would be cooler if i could do something like

 {computeTag(context)}{computeTagContents(context)}/{computeTag(context}

 but i think that might be a parsing nightmare and so i'm guessing this
 isn't supported. i'd love to know if i'm wrong.

 Best wishes,

 --greg

 --
 L.G. Meredith
 Managing Partner
 Biosimilarity LLC
 806 55th St NE
 Seattle, WA 98105

 +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
806 55th St NE
Seattle, WA 98105

+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] i can haz scala xml???

2009-03-04 Thread Meredith Gregory
David,

Thanks for the attention to the problem. i resolved the issue. There was a
missing param in my programmatic call: cut-n-pasto.

Best wishes,

--greg

On Wed, Mar 4, 2009 at 2:03 PM, David Pollak
feeder.of.the.be...@gmail.comwrote:



 On Wed, Mar 4, 2009 at 1:16 PM, Meredith Gregory lgreg.mered...@gmail.com
  wrote:

 David,

 Thanks, but not quite. Unfortunately, i do not know the name of the tag. i
 have to compute it. So, your soln won't work. As i mentioned in my email,
 the following


 {computeTag(context)}{computeTagContents(context)}/{computeTag(context}
  is a scheme for what i'd like to do, but it's probably too hard to make
 work.



 Sorry for being dense about your question.

 If you want to send me your file directly, I think I know what's going on
 (I think it's an import related issue...)




 Best wishes,

 --greg- Show quoted text -


 On Wed, Mar 4, 2009 at 1:13 PM, David Pollak 
 feeder.of.the.be...@gmail.com wrote:

 scala fubar5/bar/fu
 res0: scala.xml.Elem = fubar5/bar/fu

 scala fu{(1 to 3).map(i = item{i}/item)}/fu
 res1: scala.xml.Elem =
 fuitem1/itemitem2/itemitem3/item/fu

 Does that give you what you want (XML literals are part of the language)

 On Wed, Mar 4, 2009 at 1:10 PM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Sir and Dame Scalahads,

 i was attempting to do something really simple-minded with scala.xml._
 and it didn't perform according to Burak's tutorial. So, any clues about 
 the
 following would be greatly appreciated.


- When i type the following into Scala version 2.7.2.final repl, it
all works

 scala
 scala.xml.Elem(null,fu,null,scala.xml.TopScope,scala.xml.Elem(null,bar,null,scala.xml.TopScope,scala.xml.Text(5)))
 res9: scala.xml.Elem = fubar5/bar/fu

 scala

- But when i attempt to compile a similar expression in Scala
version 2.7.3, it doesn't.

 [WARNING]
 /Users/lgm/work/src/projex/bobj/dspace/src/main/scala/com/sap/dspace/model/othello/render.scala:26:
 error: type mismatch;
 [WARNING]  found   : scala.xml.TopScope.type (with underlying type
 object scala.xml.TopScope)
 [WARNING]  required: scala.xml.MetaData
 [WARNING]   TopScope,
 [WARNING]   ^

- Where do i go to see the new api?

 It would be cooler if i could do something like

 {computeTag(context)}{computeTagContents(context)}/{computeTag(context}

 but i think that might be a parsing nightmare and so i'm guessing this
 isn't supported. i'd love to know if i'm wrong.

 Best wishes,

 --greg

 --
 L.G. Meredith
 Managing Partner
 Biosimilarity LLC
 806 55th St NE
 Seattle, WA 98105

 +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
 806 55th St NE
 Seattle, WA 98105

 +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
806 55th St NE
Seattle, WA 98105

+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] documentation for structural/partial type bounds

2009-03-04 Thread Meredith Gregory
Dam and Sir Scalahads,

Where is the documentation for the structural/partial type syntax? i want to
express a bound on a type that says it has to at least have method m with
signature sig.

Best wishes,

--greg

-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105

+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] documentation for structural/partial type bounds

2009-03-04 Thread Meredith Gregory
David,

Thanks!

Best wishes,

--greg

On Wed, Mar 4, 2009 at 3:46 PM, David Pollak
feeder.of.the.be...@gmail.comwrote:

 scala def doClose(in: {def close(i: Int): Unit}) {in.close(42)}
 doClose: (AnyRef{def close(Int): Unit})Unit




 On Wed, Mar 4, 2009 at 3:26 PM, Meredith Gregory lgreg.mered...@gmail.com
  wrote:

 Dam and Sir Scalahads,

 Where is the documentation for the structural/partial type syntax? i want
 to express a bound on a type that says it has to at least have method m with
 signature sig.

 Best wishes,

 --greg

 --
 L.G. Meredith
 Managing Partner
 Biosimilarity LLC
 806 55th St NE
 Seattle, WA 98105

 +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
806 55th St NE
Seattle, WA 98105

+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] documentation for structural/partial type bounds

2009-03-04 Thread Meredith Gregory
Szymon,

That's pretty nifty.

Best wishes,

--greg

On Wed, Mar 4, 2009 at 3:54 PM, Szymon Jachim sjac...@gmail.com wrote:

 What surprised me recently is that you can use these in asInstanceOf:

 x.asInstanceOf[ {def aMethod(i: Int): Unit} ].aMethod(888)

 Interesting way to do reflective calls...


 On Thu, Mar 5, 2009 at 12:48 AM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 David,

 Thanks!

 Best wishes,

 --greg


 On Wed, Mar 4, 2009 at 3:46 PM, David Pollak 
 feeder.of.the.be...@gmail.com wrote:

 scala def doClose(in: {def close(i: Int): Unit}) {in.close(42)}
 doClose: (AnyRef{def close(Int): Unit})Unit




 On Wed, Mar 4, 2009 at 3:26 PM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Dam and Sir Scalahads,

 Where is the documentation for the structural/partial type syntax? i
 want to express a bound on a type that says it has to at least have method 
 m
 with signature sig.

 Best wishes,

 --greg

 --
 L.G. Meredith
 Managing Partner
 Biosimilarity LLC
 806 55th St NE
 Seattle, WA 98105

 +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
 806 55th St NE
 Seattle, WA 98105

 +1 206.650.3740

 http://biosimilarity.blogspot.com




 --
 ʎɐqǝ uo pɹɐoqʎǝʞ ɐ ʎnq ı ǝɯıʇ ʇsɐן ǝɥʇ sı sıɥʇ




-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105

+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: Fwd: unexpected crashing behavior...

2009-03-04 Thread Meredith Gregory
Eric,

Thanks for your note. If you look at the previous version of the code --
lower down in the thread -- there is no use of generics -- and i still get
the crashing behavior.

Best wishes,

--greg

On Wed, Mar 4, 2009 at 9:36 PM, Eric Willigers ewillig...@gmail.com wrote:

 Meredith Gregory wrote:

  trait XMLRenderer[T ...] {


   else if (value.isInstanceOf[T])


 This test won't work - T is erased, it is not available at runtime.
 You might have received a compiler warning.




-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105

+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] generic programming question

2009-03-05 Thread Meredith Gregory
Mein Scalan und Liften,

Please find below a very simplistic view of transform a POJO to an XML
container. At it's heart is the recognition that a POJO is an in-memory
representation of a relation. i would like to generalize this code to
include other container types, e.g. JSON. i started down the path of
abstracting the type for the container, but realized the container ctor
might -- as in the case of XML -- have a reliance on some outer
context/scope. (In the case of XML the scala Elem ctor requires arguments
like a namebinding scope and a prefix and a bunch of other things.) So, the
abstraction along the lines of requiring that the container have a
prototypical object that supported an apply method became a prohibitively
complex design pattern. My question then, is what's a simpler design pattern
that will

   - keep the core design principle that what we really have here is a monad
   (more accurately a monad transformer -- the POJO itself is really a monad
   and the code to change the shape is a means of transforming one kind of
   comprehension/monad to another)
   - allow for a wider range of possible target container types (XML, JSON,
   kinda-separated-lists[1], dump format for MySQL,...)


Best wishes,

--greg

[1] Not to be confused with comma-separated-lists that are almost never
found in the wild, kinda-separated-lists occur everywhere where programs and
other creatures might dump data and forget a comma or two or...

package com.sap.dspace.model.othello;

import scala.xml._

trait XMLRenderer {
  def recurse() : Boolean
  def failOnUnknownType() : Boolean
  def inView(
field : java.lang.reflect.Field,
pojo : {def getClass() : java.lang.Class[_]}
  ) : Boolean = {
// a possible strategy is to create a little DSL for views and
// process those here
true
  }
  def isGroundValueType(
value : {def getClass() : java.lang.Class[_]}
  ) : Boolean = {
((value.isInstanceOf[Boolean])
 || (value.isInstanceOf[Integer])
 || (value.isInstanceOf[Float])
 || (value.isInstanceOf[String])
 // put more ground types here
   )
  }
  def groundValue2Container(
value : {def getClass() : java.lang.Class[_]}
) : Node = {
  Text( value.toString )
}
  def unmatchedValue2Container(
vUnmatched : {def getClass() : java.lang.Class[_]},
field : java.lang.reflect.Field,
pojo  : {def getClass() : java.lang.Class[_]}
) : Node = {
  if (! failOnUnknownType() )
unmatchedType
  theType
{vUnmatched.getClass.toString}
  /theType
  theValue
{vUnmatched.toString}
  /theValue
/unmatchedType
  else throw new Exception(
(
  unmatched type
  + vUnmatched.getClass.toString
  + when attempting render the 
  + field.getName
  + field of 
  + pojo
)
  )
}
  def value2Container(
value : {def getClass() : java.lang.Class[_]},
field : java.lang.reflect.Field,
pojo  : {def getClass() : java.lang.Class[_]}
  ) : Node = {
value match {
case null = Text( null )
case vUnmatched =
  if ( isGroundValueType( vUnmatched ) )
groundValue2Container( vUnmatched )
  else if ((value.isInstanceOf[java.io.Serializable])  (recurse()))
pojo2Container( value.asInstanceOf[{def getClass() :
java.lang.Class[_]}] )
  else unmatchedValue2Container( vUnmatched, field, pojo )
  }
  }
  def field2Container(
field : java.lang.reflect.Field,
pojo : {def getClass() : java.lang.Class[_]}
  ) : Node = {
// reflectively break java access control mechanisms
val accessible = field.isAccessible;
field.setAccessible( true );

val fldValXML : Node = value2Container( field.get( pojo ),field, pojo )

// put java access mechanisms back in place
field.setAccessible( accessible );

Elem( null, field.getName, null, TopScope, fldValXML )
  }

  // This is the basic monadic/monad transformer view of the pojo
  // rendering process. It shouldn't be surprising that this would
  // have this form: if you stop to think about it a pojo is a relation.
  def pojo2Container( pojo : {def getClass() : java.lang.Class[_]} ) : Node
= {
val tag = pojo.getClass.getSimpleName;
val progeny =
  for (field - pojo.getClass.getDeclaredFields
   if inView( field, pojo ))
  yield field2Container( field, pojo);

Elem( null, tag, null, TopScope, (progeny : _*))
  }
}

case class POJO2XMLRenderer( doRecurse : Boolean, doFastFail : Boolean )
 extends XMLRenderer {
   override def recurse() = doRecurse
   override def failOnUnknownType() = doFastFail
}

object thePOJO2XMLRenderer extends POJO2XMLRenderer( true, false ) {
}


-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To 

[Lift] Re: [Jersey] jersey as filter

2009-03-09 Thread Meredith Gregory
Paul,

Many thanks for your note. i've been endeavoring to run Jersey and Lift in a
filter chain. i was not seeing the requests passed on into Lift. Your
explanation fits. What i really need is

httpreq -- jersey -- lift -- jersey -- httpresp

i can just hack this up myself, or i can log an issue (or both).

Best wishes,

--greg

On Mon, Mar 9, 2009 at 1:39 AM, Paul Sandoz paul.san...@sun.com wrote:

 Hi Greg,
 I hope you have resolved things. I have been away on holiday, hence
 my silence.

 For Jersey 1.0.2 the Jersey filter support requires that the filter
 be configured at the end of the filter chain, see:


 https://jersey.dev.java.net/source/browse/*checkout*/jersey/tags/jersey-1.0.2/api/jersey/com/sun/jersey/spi/container/servlet/ServletContainer.html

 This is somewhat limited because we added this feature very close to the
 Jersey release.

 For Jersey 1.0.3-SNAPSHOT one can declare a regex that if matched defers to
 the next filter in the chain. See the Bookstore sample for more details on
 such a configuration:


 http://download.java.net/maven/2/com/sun/jersey/samples/bookstore/1.0.3-SNAPSHOT/bookstore-1.0.3-SNAPSHOT-project.zip

 We do not currently support a filter that passes things through to the next
 filter in the chain if Jersey does not match the URI. If you require this
 functionality please log an issue.

 Hope that helps,
 Paul.

 On Mar 3, 2009, at 3:32 AM, Meredith Gregory wrote:

 Lifted,

 Well, at least i've got jetty launching and running with both filters. See
 the web.xml that worked below.

 Best wishes,

 --greg

 ?xml version=1.0 encoding=ISO-8859-1?

 !DOCTYPE web-app
 PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
 http://java.sun.com/dtd/web-app_2_3.dtd;

 web-app
 filter
   filter-nameJerseyFilter/filter-name
   display-nameJersey Filter/display-name
   descriptionAttempting to use Jersey as a Filter/description

 filter-classcom.sun.jersey.spi.container.servlet.ServletContainer/filter-class
   init-param
 param-namecom.sun.jersey.config.property.packages/param-name
 param-valuecom.sap.dspace.model.constellation.resources/param-value
   /init-param
 /filter
 filter
   filter-nameLiftFilter/filter-name
   display-nameLift Filter/display-name
   descriptionThe Filter that intercepts lift calls/description
   filter-classnet.liftweb.http.LiftFilter/filter-class
 /filter

 filter-mapping
   filter-nameJerseyFilter/filter-name
   url-pattern/*/url-pattern
 /filter-mapping
 filter-mapping
   filter-nameLiftFilter/filter-name
   url-pattern/*/url-pattern
 /filter-mapping

 /web-app


 On Mon, Mar 2, 2009 at 6:25 PM, Meredith Gregory lgreg.mered...@gmail.com
  wrote:

 Alex,

 Thanks for all your help. i switched versions in the pom.xml (to 1.0.2
 which is the most recent on the sun repo that is not labeled SNAPSHOT) and i
 get the right values from reflecting (BTW -- has anybody written a little
 lift browser app that hooks into reflection so that one can graphically
 browse the class/instances in memory?). Now i just need to figure out how to
 pass the resources context to Jersey. It's got a config for the
 ServletContainer class, but i don't see anything if i'm just using it as a
 filter.

 Best wishes,

 --greg

 On Mon, Mar 2, 2009 at 6:13 PM, Alex Boisvert boisv...@intalio.comwrote:

 No, sorry, I've grown allergic to mvn.

 If you must know, I wrote a 5-line ruby script that bootstraps the scala
 interpreter with a given classpath.

 #!/usr/bin/env scalarun
 classpath  artifact(com.sun.jersey:jersey-server:jar:1.02)
 classpath  artifact(javax.servlet:servlet-api:jar:2.5)
 classpath  artifact(javax.ws.rs:jsr311-api:jar:1.0)
 interactive = true
 !#

 So we're down to two main possibilities... 1) something is wrong with
 your Maven pom.xml or 2) your local artifacts are inconsistent with what's
 in the repos.

 alex



 On Mon, Mar 2, 2009 at 6:05 PM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Alex,

 Interesting. Did you build with mvn? If so, what were your
 plugins/dependencies?

 Best wishes,

 --greg


 On Mon, Mar 2, 2009 at 6:01 PM, Alex Boisvert boisv...@intalio.comwrote:

 Greg,

 Something must be messed up in your configuration Here's what I
 get:

 Welcome to Scala version 2.7.3.final (Java HotSpot(TM) Server VM, Java
 1.6.0_10).
 Type in expressions to have them evaluated.
 Type :help for more information.

 scala new com.sun.jersey.spi.container.servlet.ServletContainer()
 res0: com.sun.jersey.spi.container.servlet.ServletContainer =
 com.sun.jersey.spi.container.servlet.servletcontai...@15cd9a

 scala res0.getClass.getInterfaces
 res2: Array[java.lang.Class[_]] = Array(interface
 javax.servlet.Servlet, interface javax.servlet.ServletConfig, interface
 javax.servlet.Filter, interface java.io.Serializable)

 (I'm using jersey-server-1.0.2.jar)

 alex


 On Mon, Mar 2, 2009 at 5:47 PM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Alex,

 i was coming to the same conclusion. OTOH, reflecting

[Lift] slicing off a web front end

2009-04-22 Thread Meredith Gregory
Lifted,

After diving into what it takes to more or less auto-generate a decent
starting point for a midtier from the backend of a RoR (or other) website,
i'm now interested in the least painful way to slice off the frontend of an
existing website and paste it onto a lift(ed) midtier.

Suppose i've got an existing RoR-based application with a relatively
sophisticated AJAX frontend and i want to do minimal messing about with the
front end. What is least i could do to have the existing frontend-generated
requests end up in a lift handler?

i can provide links to an existing code context if that will facilitate
discussion.

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

2009-04-22 Thread Meredith Gregory
Lifted,

Apparently i'm not keeping pace with the Jones'. The following code fragment
used to work and now it doesn't.

  val entries =
  (Menu(Loc(Home, /, Home))
   :: Menu(Loc(REPLForm.1, /AJAXREPLForm, R-E-P-L,
If(User.loggedIn_? _, x)))
   :: Menu(Loc(GrammarSpec.1, /GrammarSpec, Grammar,
If(User.loggedIn_? _, x)))
//   :: Menu(Loc(Examples.1, examples, Examples,
If(User.loggedIn_? _, x)))
   :: User.sitemap)

This now generates the following complaints.

 mvn compile
...

[INFO] Compiling 93 source files to
/Users/lgm/work/src/projex/biosimilarity/agency/target/classes
[WARNING]
/Users/lgm/work/src/projex/biosimilarity/agency/src/main/scala/bootstrap/liftweb/Boot.scala:28:
error: type mismatch;
[WARNING]  found   : java.lang.String(/)
[WARNING]  required:
net.liftweb.sitemap.Loc.Link[net.liftweb.sitemap.NullLocParams]
[WARNING]   (Menu(Loc(Home, /, Home))
[WARNING] ^
[WARNING]
/Users/lgm/work/src/projex/biosimilarity/agency/src/main/scala/bootstrap/liftweb/Boot.scala:29:
error: overloaded method value apply with alternatives
(String,net.liftweb.sitemap.Loc.Link[net.liftweb.sitemap.NullLocParams],net.liftweb.sitemap.Loc.LinkText[net.liftweb.sitemap.NullLocParams],List[net.liftweb.sitemap.Loc.LocParam])net.liftweb.sitemap.Loc[net.liftweb.sitemap.NullLocParams]
and
(String,net.liftweb.sitemap.Loc.Link[net.liftweb.sitemap.NullLocParams],net.liftweb.sitemap.Loc.LinkText[net.liftweb.sitemap.NullLocParams],net.liftweb.sitemap.Loc.LocParam*)net.liftweb.sitemap.Loc[net.liftweb.sitemap.NullLocParams]
cannot be applied to
(java.lang.String,java.lang.String,java.lang.String,net.liftweb.sitemap.Loc.If)
[WARNING]:: Menu(Loc(REPLForm.1, /AJAXREPLForm, R-E-P-L,
If(User.loggedIn_? _, x)))
[WARNING]^
[WARNING] two errors found
[INFO]

[ERROR] BUILD FAILURE
[INFO]

[INFO] command line returned non-zero value:1
[INFO]

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

[INFO] Total time: 27 seconds

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

2009-04-22 Thread Meredith Gregory
Chas,

David beat you to the punch. Thanks to the both of you. i sent some
brain-candy along to the scala list in return for the help. [See my post on
implicits and concurrency.]

Best wishes,

--greg

On Wed, Apr 22, 2009 at 5:27 PM, Charles F. Munat c...@munat.com wrote:


 I haven't looked at the Loc signature, but mine looks like this:

 Menu(Loc(Home, / :: Nil, Home))

 or

 Menu(Loc(Home, List(/), Home))

 Could that be the trouble?

 Chas.

 Meredith Gregory wrote:
  Lifted,
 
  Apparently i'm not keeping pace with the Jones'. The following code
  fragment used to work and now it doesn't.
 
val entries =
(Menu(Loc(Home, /, Home))
 :: Menu(Loc(REPLForm.1, /AJAXREPLForm, R-E-P-L,
  If(User.loggedIn_? _, x)))
 :: Menu(Loc(GrammarSpec.1, /GrammarSpec, Grammar,
  If(User.loggedIn_? _, x)))
  //   :: Menu(Loc(Examples.1, examples, Examples,
  If(User.loggedIn_? _, x)))
 :: User.sitemap)
 
  This now generates the following complaints.
 
mvn compile
  ...
 
  [INFO] Compiling 93 source files to
  /Users/lgm/work/src/projex/biosimilarity/agency/target/classes
  [WARNING]
 
 /Users/lgm/work/src/projex/biosimilarity/agency/src/main/scala/bootstrap/liftweb/Boot.scala:28:
  error: type mismatch;
  [WARNING]  found   : java.lang.String(/)
  [WARNING]  required:
  net.liftweb.sitemap.Loc.Link[net.liftweb.sitemap.NullLocParams]
  [WARNING]   (Menu(Loc(Home, /, Home))
  [WARNING] ^
  [WARNING]
 
 /Users/lgm/work/src/projex/biosimilarity/agency/src/main/scala/bootstrap/liftweb/Boot.scala:29:
  error: overloaded method value apply with alternatives
 
 (String,net.liftweb.sitemap.Loc.Link[net.liftweb.sitemap.NullLocParams],net.liftweb.sitemap.Loc.LinkText[net.liftweb.sitemap.NullLocParams],List[net.liftweb.sitemap.Loc.LocParam])net.liftweb.sitemap.Loc[net.liftweb.sitemap.NullLocParams]
  and
 
 (String,net.liftweb.sitemap.Loc.Link[net.liftweb.sitemap.NullLocParams],net.liftweb.sitemap.Loc.LinkText[net.liftweb.sitemap.NullLocParams],net.liftweb.sitemap.Loc.LocParam*)net.liftweb.sitemap.Loc[net.liftweb.sitemap.NullLocParams]
  cannot be applied to
 
 (java.lang.String,java.lang.String,java.lang.String,net.liftweb.sitemap.Loc.If)
  [WARNING]:: Menu(Loc(REPLForm.1, /AJAXREPLForm, R-E-P-L,
  If(User.loggedIn_? _, x)))
  [WARNING]^
  [WARNING] two errors found
  [INFO]
  
  [ERROR] BUILD FAILURE
  [INFO]
  
  [INFO] command line returned non-zero value:1
  [INFO]
  
  [INFO] For more information, run Maven with the -e switch
  [INFO]
  
  [INFO] Total time: 27 seconds
 
  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: slicing off a web front end

2009-04-25 Thread Meredith Gregory
Derek,

Apologies for the delay. i just saw this. The requests are in
rails/app/controllers/pipes_controller.rb . For quick clickability, here you
gohttp://svn.biosimilarity.com/src/open/pipe-cutter/rails/app/controllers/pipes_controller.rb.


Best wishes,

--greg

On Fri, Apr 24, 2009 at 2:58 PM, Derek Chen-Becker dchenbec...@gmail.comwrote:

 It's been a long time since I've touched Rails, and even then it was brief.
 Could you direct me to where the Ajax requests are handled in rails? Is
 there consistency to what the URLs look like for the Ajax callbacks?

 Derek

 On Wed, Apr 22, 2009 at 5:14 PM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Tim, et al,

 Here http://svn.biosimilarity.com/src/open/pipe-cutter/'s a link to the
 root of the project. What it does can be summarized as follows.

- scrape the frontend off Yahoo Pipes
- implement a JRoR app to field the Pipes requests
- implement JRoR controller hands off to a piece of scala code that
compiles a Pipes Graph to a CAL [1] expression and then -- if the 
 expression
is closed (no free variables) -- evalute it and return the result
- the builtin pipes are populated from CAL via a JPA model
(ultimately) generated from the schema generated by the RoR app


 This one might not build for you as i've not uploaded a bunch of changes
 i've made -- so the code is in a slightly inconsistent state. But, it works
 to provide an actual code context (that works for me! ;-).

 My aim is to repeat the original scraping we did to get the frontend off
 of Yahoo Pipes, itself. But, this time we're replacing the RoR controllers
 with Lift controllers. The ideal case would be that i can simply duplicate
 the RoR controller semantics with Lift controller semantics and start up
 jetty+lift instead of webrick+jruby and a user cannot tell the difference.

 Best wishes,

 --greg

 [1] CAL is an open source JVM implementation of a variant of Haskell

 On Wed, Apr 22, 2009 at 3:54 PM, Timothy Perrett timo...@getintheloop.eu
  wrote:


 Hmm Id tend to agree – you’d probably have to rewrite a lot of the JS
 away from prototype if your using RJS but from a migration POV, I think the
 main issue will be translating some of the rails black-box magic to, as
 Derek says, JsonResponses etc.

 If you provide a bit more context that would be splendid.

 Cheers, Tim

 On 22/04/2009 23:31, Derek Chen-Becker dchenbec...@gmail.com wrote:

 Worst case you might be able to use custom dispatch hooks combined with
 JavaScriptResponse or JsonResponse.

 Derek

 On Wed, Apr 22, 2009 at 4:21 PM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Lifted,

 After diving into what it takes to more or less auto-generate a decent
 starting point for a midtier from the backend of a RoR (or other) website,
 i'm now interested in the least painful way to slice off the frontend of an
 existing website and paste it onto a lift(ed) midtier.

 Suppose i've got an existing RoR-based application with a relatively
 sophisticated AJAX frontend and i want to do minimal messing about with the
 front end. What is least i could do to have the existing frontend-generated
 requests end up in a lift handler?

 i can provide links to an existing code context if that will facilitate
 discussion.

 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: Feedback on screen cast, please

2009-04-27 Thread Meredith Gregory
David,

Your screencast is very well done. There is one small change i would make to
add a layer regarding the management of complexity. Make a change to the
app: a small but noticeable change, like reorder the messages newest to
oldest with a timestamp, or something. It would be ideal if somewhere in
your modification you commit an error that is subsequently caught by typing.
These two basic points dovetail nicely into a crucial point that Bill
Venner's makes in his JavaOne presentation: types don't prove your program
correct; types prove changes to your program correct. i think you could
increase the bang-for-buck by a factor of 2 while only adding 15 - 20 secs
to the time.

Best wishes,

--greg

On Fri, Apr 24, 2009 at 8:50 AM, David Pollak feeder.of.the.be...@gmail.com
 wrote:

 Folks,

 I did a draft of a screencast for a real-time chat app.  It's at
 http://tunaforcats.com/LiftScreenCast.avi

 I'd like to get some critical feedback on it so I can improve it.

 Thanks,

 David

 PS -- What's the best output format?  AVI, QuickTime, Flash?

 --
 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] namespace problem again

2009-04-29 Thread Meredith Gregory
Lifted,

i'm getting the following error. i've run into this before and resolved it,
but i can't for the life of me remember what i did. All my other lift sites
are constructed pretty much isomorphic to this one. Any help would be
greatly appreciated.

Best wishes,

--greg

XML Parsing Error: prefix not bound to a namespace
Location: http://localhost:8080/AJAXREPLForm
Line Number 78, Column 58:label for=initTimeFieldInitial time
:/labelhello:initTimeField/hello:initTimeField
-^

lift:surround with=default at=content
h1R-E-P-L/h1
lift:REPLForm.show form=POST
label for=initTimeFieldInitial time
:/labelhello:initTimeField/
label for=finalTimeFieldFinal time
:/labelhello:finalTimeField/
hello:submit/br/
Result: hello:resultChart/
/lift:REPLForm.show
/lift:surround

class REPLForm {
 // ...

// close to what i usually do
//   def show(xhtml: NodeSeq): NodeSeq = {
// xml:group
//   label for=initialTimeFieldInital time :/label
//   { text(Nil, (updateInitialTime _)) % (size - 60) % (id -
initialTimeField) }
//   label for=finalTimeFieldFinal time :/label
//   { text(Nil, (updateFinalTime _)) % (size - 60) % (id -
finalTimeField) }
//   { button type=button{?(Go)}/button %
//(onclick -
ajaxCall(JsRaw($('#initialTimeField').attr('value')), s =
updateInitialTime(s))) }
//   br/
//   div id=resultChart{whatNode(evalStr())}/div
// /xml:group
//   }

// attempt to resolve the problem by putting in a call to bind
  def show(xhtml: NodeSeq): NodeSeq = {
xml:group{
  bind( hello, xhtml,
   initialTimeField -- text(Nil, (updateInitialTime _)) % (size
- 60) % (id - initialTimeField),
   finalTimeField -- text(Nil, (updateFinalTime _)) % (size -
60) % (id - finalTimeField),
   submit -- button type=button{?(Go)}/button % (onclick -
ajaxCall(JsRaw($('#initialTimeField').attr('value')), s =
updateInitialTime(s)))
  )
}
  br/
  div id=resultChart{whatNode(evalStr())}/div
/xml:group
  }
}

-- 
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: namespace problem again

2009-04-29 Thread Meredith Gregory
David,

Thanks for the suggestion, but no joy. The error is the same. BTW, the only
difference i could spot between your proposal and mine was changing the
-- to -.

Best wishes,

--greg

XML Parsing Error: prefix not bound to a namespace
Location: http://localhost:8080/AJAXREPLForm
Line Number 78, Column 58:label for=initTimeFieldInitial time
:/labelhello:initTimeField/hello:initTimeField
-^

On Wed, Apr 29, 2009 at 11:00 AM, David Pollak 
feeder.of.the.be...@gmail.com wrote:

 Try:

   def show(xhtml: NodeSeq): NodeSeq = {
 xml:group{
   bind( hello, xhtml,
initialTimeField - text(Nil, (updateInitialTime _)) % (size
 - 60) % (id - initialTimeField),
finalTimeField - text(Nil, (updateFinalTime _)) % (size -
 60) % (id - finalTimeField),
submit - button type=button{?(Go)}/button % (onclick -
 ajaxCall(JsRaw($('#initialTimeField').attr('value')), s =
 updateInitialTime(s)))
)
 }
   br/
   div id=resultChart{whatNode(evalStr())}/div
 /xml:group
   }
 }


 On Wed, Apr 29, 2009 at 10:51 AM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Lifted,

 i'm getting the following error. i've run into this before and resolved
 it, but i can't for the life of me remember what i did. All my other lift
 sites are constructed pretty much isomorphic to this one. Any help would be
 greatly appreciated.

 Best wishes,

 --greg

 XML Parsing Error: prefix not bound to a namespace
 Location: http://localhost:8080/AJAXREPLForm
 Line Number 78, Column 58:label for=initTimeFieldInitial time
 :/labelhello:initTimeField/hello:initTimeField
 -^

 lift:surround with=default at=content
 h1R-E-P-L/h1
 lift:REPLForm.show form=POST
 label for=initTimeFieldInitial time
 :/labelhello:initTimeField/
 label for=finalTimeFieldFinal time
 :/labelhello:finalTimeField/
 hello:submit/br/
 Result: hello:resultChart/
 /lift:REPLForm.show
 /lift:surround

 class REPLForm {
  // ...

 // close to what i usually do
 //   def show(xhtml: NodeSeq): NodeSeq = {
 // xml:group
 //   label for=initialTimeFieldInital time :/label
 //   { text(Nil, (updateInitialTime _)) % (size - 60) % (id
 - initialTimeField) }
 //   label for=finalTimeFieldFinal time :/label
 //   { text(Nil, (updateFinalTime _)) % (size - 60) % (id -
 finalTimeField) }
 //   { button type=button{?(Go)}/button %
 //(onclick -
 ajaxCall(JsRaw($('#initialTimeField').attr('value')), s =
 updateInitialTime(s))) }
 //   br/
 //   div id=resultChart{whatNode(evalStr())}/div
 // /xml:group
 //   }

 // attempt to resolve the problem by putting in a call to bind
   def show(xhtml: NodeSeq): NodeSeq = {
 xml:group{
   bind( hello, xhtml,
initialTimeField -- text(Nil, (updateInitialTime _)) % (size
 - 60) % (id - initialTimeField),
finalTimeField -- text(Nil, (updateFinalTime _)) % (size -
 60) % (id - finalTimeField),
submit -- button type=button{?(Go)}/button % (onclick
 - ajaxCall(JsRaw($('#initialTimeField').attr('value')), s =
 updateInitialTime(s)))
   )
 }
   br/
   div id=resultChart{whatNode(evalStr())}/div
 /xml:group
   }
 }

 --
 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: namespace problem again

2009-04-29 Thread Meredith Gregory
Lifted,

It appears that the interface for binding a namespace is side-effecting.
That's fine. But, i can't seem to understand the semantics. For example,

   - if one puts a call to bind at the beginning of a block for a method
   that handles a post, and yet returns a different nodeseq, the desired effect
   is not present.
   - If one nests the bind call inside the construction of a nodeseq, the
   effect is not present.
   - On the other hand, if one puts a call to bind on a completely different
   form, the desired effect is present in the post handler.

i find that a little confusing. Is there a clean, simple model that will
help me understand how to use bind?

Best wishes,

--greg

On Wed, Apr 29, 2009 at 11:17 AM, Meredith Gregory lgreg.mered...@gmail.com
 wrote:

 David,

 Thanks for the suggestion, but no joy. The error is the same. BTW, the only
 difference i could spot between your proposal and mine was changing the
 -- to -.

 Best wishes,

 --greg

 XML Parsing Error: prefix not bound to a namespace
 Location: http://localhost:8080/AJAXREPLForm
 Line Number 78, Column 58:label for=initTimeFieldInitial time
 :/labelhello:initTimeField/hello:initTimeField
 -^

 On Wed, Apr 29, 2009 at 11:00 AM, David Pollak 
 feeder.of.the.be...@gmail.com wrote:

 Try:

   def show(xhtml: NodeSeq): NodeSeq = {
 xml:group{
   bind( hello, xhtml,
initialTimeField - text(Nil, (updateInitialTime _)) % (size
 - 60) % (id - initialTimeField),
finalTimeField - text(Nil, (updateFinalTime _)) % (size -
 60) % (id - finalTimeField),
submit - button type=button{?(Go)}/button % (onclick
 - ajaxCall(JsRaw($('#initialTimeField').attr('value')), s =
 updateInitialTime(s)))
)
 }
   br/
   div id=resultChart{whatNode(evalStr())}/div
 /xml:group
   }
 }


 On Wed, Apr 29, 2009 at 10:51 AM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Lifted,

 i'm getting the following error. i've run into this before and resolved
 it, but i can't for the life of me remember what i did. All my other lift
 sites are constructed pretty much isomorphic to this one. Any help would be
 greatly appreciated.

 Best wishes,

 --greg

 XML Parsing Error: prefix not bound to a namespace
 Location: http://localhost:8080/AJAXREPLForm
 Line Number 78, Column 58:label for=initTimeFieldInitial time
 :/labelhello:initTimeField/hello:initTimeField
 -^

 lift:surround with=default at=content
 h1R-E-P-L/h1
 lift:REPLForm.show form=POST
 label for=initTimeFieldInitial time
 :/labelhello:initTimeField/
 label for=finalTimeFieldFinal time
 :/labelhello:finalTimeField/
 hello:submit/br/
 Result: hello:resultChart/
 /lift:REPLForm.show
 /lift:surround

 class REPLForm {
  // ...

 // close to what i usually do
 //   def show(xhtml: NodeSeq): NodeSeq = {
 // xml:group
 //   label for=initialTimeFieldInital time :/label
 //   { text(Nil, (updateInitialTime _)) % (size - 60) % (id
 - initialTimeField) }
 //   label for=finalTimeFieldFinal time :/label
 //   { text(Nil, (updateFinalTime _)) % (size - 60) % (id -
 finalTimeField) }
 //   { button type=button{?(Go)}/button %
 //(onclick -
 ajaxCall(JsRaw($('#initialTimeField').attr('value')), s =
 updateInitialTime(s))) }
 //   br/
 //   div id=resultChart{whatNode(evalStr())}/div
 // /xml:group
 //   }

 // attempt to resolve the problem by putting in a call to bind
   def show(xhtml: NodeSeq): NodeSeq = {
 xml:group{
   bind( hello, xhtml,
initialTimeField -- text(Nil, (updateInitialTime _)) %
 (size - 60) % (id - initialTimeField),
finalTimeField -- text(Nil, (updateFinalTime _)) % (size -
 60) % (id - finalTimeField),
submit -- button type=button{?(Go)}/button % (onclick
 - ajaxCall(JsRaw($('#initialTimeField').attr('value')), s =
 updateInitialTime(s)))
   )
 }
   br/
   div id=resultChart{whatNode(evalStr())}/div
 /xml:group
   }
 }

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

[Lift] Re: namespace problem again

2009-04-29 Thread Meredith Gregory
Lifted,

Sorry for the sound and fury. i found the soln again: the following call had
gotten mangled in boot

LiftRules.addToPackages(com.biosimilarity.weather)

That's a nasty one to get wrong. No help from the compiler. Error message
completely misleading.

Best wishes,

--greg

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

 Lifted,

 It appears that the interface for binding a namespace is side-effecting.
 That's fine. But, i can't seem to understand the semantics. For example,

- if one puts a call to bind at the beginning of a block for a method
that handles a post, and yet returns a different nodeseq, the desired 
 effect
is not present.
- If one nests the bind call inside the construction of a nodeseq, the
effect is not present.
- On the other hand, if one puts a call to bind on a completely
different form, the desired effect is present in the post handler.

 i find that a little confusing. Is there a clean, simple model that will
 help me understand how to use bind?

 Best wishes,

 --greg


 On Wed, Apr 29, 2009 at 11:17 AM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 David,

 Thanks for the suggestion, but no joy. The error is the same. BTW, the
 only difference i could spot between your proposal and mine was changing the
 -- to -.

 Best wishes,

 --greg

 XML Parsing Error: prefix not bound to a namespace
 Location: http://localhost:8080/AJAXREPLForm
 Line Number 78, Column 58:label for=initTimeFieldInitial time
 :/labelhello:initTimeField/hello:initTimeField
 -^

 On Wed, Apr 29, 2009 at 11:00 AM, David Pollak 
 feeder.of.the.be...@gmail.com wrote:

 Try:

   def show(xhtml: NodeSeq): NodeSeq = {
 xml:group{
   bind( hello, xhtml,
initialTimeField - text(Nil, (updateInitialTime _)) % (size
 - 60) % (id - initialTimeField),
finalTimeField - text(Nil, (updateFinalTime _)) % (size -
 60) % (id - finalTimeField),
submit - button type=button{?(Go)}/button % (onclick
 - ajaxCall(JsRaw($('#initialTimeField').attr('value')), s =
 updateInitialTime(s)))
)
 }
   br/
   div id=resultChart{whatNode(evalStr())}/div
 /xml:group
   }
 }


 On Wed, Apr 29, 2009 at 10:51 AM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Lifted,

 i'm getting the following error. i've run into this before and resolved
 it, but i can't for the life of me remember what i did. All my other lift
 sites are constructed pretty much isomorphic to this one. Any help would be
 greatly appreciated.

 Best wishes,

 --greg

 XML Parsing Error: prefix not bound to a namespace
 Location: http://localhost:8080/AJAXREPLForm
 Line Number 78, Column 58:label for=initTimeFieldInitial
 time :/labelhello:initTimeField/hello:initTimeField
 -^

 lift:surround with=default at=content
 h1R-E-P-L/h1
 lift:REPLForm.show form=POST
 label for=initTimeFieldInitial time
 :/labelhello:initTimeField/
 label for=finalTimeFieldFinal time
 :/labelhello:finalTimeField/
 hello:submit/br/
 Result: hello:resultChart/
 /lift:REPLForm.show
 /lift:surround

 class REPLForm {
  // ...

 // close to what i usually do
 //   def show(xhtml: NodeSeq): NodeSeq = {
 // xml:group
 //   label for=initialTimeFieldInital time :/label
 //   { text(Nil, (updateInitialTime _)) % (size - 60) % (id
 - initialTimeField) }
 //   label for=finalTimeFieldFinal time :/label
 //   { text(Nil, (updateFinalTime _)) % (size - 60) % (id
 - finalTimeField) }
 //   { button type=button{?(Go)}/button %
 //(onclick -
 ajaxCall(JsRaw($('#initialTimeField').attr('value')), s =
 updateInitialTime(s))) }
 //   br/
 //   div id=resultChart{whatNode(evalStr())}/div
 // /xml:group
 //   }

 // attempt to resolve the problem by putting in a call to bind
   def show(xhtml: NodeSeq): NodeSeq = {
 xml:group{
   bind( hello, xhtml,
initialTimeField -- text(Nil, (updateInitialTime _)) %
 (size - 60) % (id - initialTimeField),
finalTimeField -- text(Nil, (updateFinalTime _)) % (size
 - 60) % (id - finalTimeField),
submit -- button type=button{?(Go)}/button %
 (onclick - ajaxCall(JsRaw($('#initialTimeField').attr('value')), s =
 updateInitialTime(s)))
   )
 }
   br/
   div id=resultChart{whatNode(evalStr())}/div
 /xml:group
   }
 }

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

[Lift] Re: namespace problem again

2009-04-29 Thread Meredith Gregory
David,

Thanks, as always, for your responsiveness. i don't know if you saw my
earlier post, but i found and fixed the problem. However, now i'm running
into a more subtle problem related to how the JSRaw is handled. See below.

Best wishes,

--greg

Here's the error according to firebug

F507651869906K3V is not defined
onclick(click clientX=479, clientY=201)6FsTX8d6...J7Q%3D%3D (line 2)
(F507651869906K3V, lift_ajaxHand...TimeField).attr(value), null, null));

function onclick(event) { (F507651869906K3V,
lift_ajaxHandler(F507651869906K3V= + $(#initialTimeField).attr(value)
+ -- + $(#finalTimeField).attr(value), null, null));
 }

The code that causes this problem is the handler for the onclick event for
the button. As near as i can tell, my raw JS is fine. This seems to have to
do with how the JsRaw is generating the onclick code.

  def show(xhtml: NodeSeq): NodeSeq = {
xml:group
  label for=initialTimeFieldInital time :/label
  { text(Now, (updateInitialTime _)) % (size - 60) % (id -
initialTimeField) }
br/
  label for=finalTimeFieldFinal time :/label
  { text(Now, (updateFinalTime _)) % (size - 60) % (id -
finalTimeField) }
br/
{ button type=button{?(Go)}/button %
   (onclick -
ajaxCall(JsRaw($('#initialTimeField').attr('value')+'--'+$('#finalTimeField').attr('value')),
s = updateChart(s))) }
  br/
  div id=resultChart{whatNode()}/div
/xml:group
  }


On Wed, Apr 29, 2009 at 11:44 AM, David Pollak 
feeder.of.the.be...@gmail.com wrote:



 On Wed, Apr 29, 2009 at 11:17 AM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 David,

 Thanks for the suggestion, but no joy. The error is the same. BTW, the
 only difference i could spot between your proposal and mine was changing the
 -- to -.


 Yeah... that was the difference.

 Can you send me breaking code and I'll fix it?




 Best wishes,

 --greg

 XML Parsing Error: prefix not bound to a namespace
 Location: http://localhost:8080/AJAXREPLForm
 Line Number 78, Column 58:label for=initTimeFieldInitial time
 :/labelhello:initTimeField/hello:initTimeField
 -^

 On Wed, Apr 29, 2009 at 11:00 AM, David Pollak 
 feeder.of.the.be...@gmail.com wrote:

 Try:

   def show(xhtml: NodeSeq): NodeSeq = {
 xml:group{
   bind( hello, xhtml,
initialTimeField - text(Nil, (updateInitialTime _)) % (size
 - 60) % (id - initialTimeField),
finalTimeField - text(Nil, (updateFinalTime _)) % (size -
 60) % (id - finalTimeField),
submit - button type=button{?(Go)}/button % (onclick
 - ajaxCall(JsRaw($('#initialTimeField').attr('value')), s =
 updateInitialTime(s)))
)
 }
   br/
   div id=resultChart{whatNode(evalStr())}/div
 /xml:group
   }
 }


 On Wed, Apr 29, 2009 at 10:51 AM, Meredith Gregory 
 lgreg.mered...@gmail.com wrote:

 Lifted,

 i'm getting the following error. i've run into this before and resolved
 it, but i can't for the life of me remember what i did. All my other lift
 sites are constructed pretty much isomorphic to this one. Any help would be
 greatly appreciated.

 Best wishes,

 --greg

 XML Parsing Error: prefix not bound to a namespace
 Location: http://localhost:8080/AJAXREPLForm
 Line Number 78, Column 58:label for=initTimeFieldInitial
 time :/labelhello:initTimeField/hello:initTimeField
 -^

 lift:surround with=default at=content
 h1R-E-P-L/h1
 lift:REPLForm.show form=POST
 label for=initTimeFieldInitial time
 :/labelhello:initTimeField/
 label for=finalTimeFieldFinal time
 :/labelhello:finalTimeField/
 hello:submit/br/
 Result: hello:resultChart/
 /lift:REPLForm.show
 /lift:surround

 class REPLForm {
  // ...

 // close to what i usually do
 //   def show(xhtml: NodeSeq): NodeSeq = {
 // xml:group
 //   label for=initialTimeFieldInital time :/label
 //   { text(Nil, (updateInitialTime _)) % (size - 60) % (id
 - initialTimeField) }
 //   label for=finalTimeFieldFinal time :/label
 //   { text(Nil, (updateFinalTime _)) % (size - 60) % (id
 - finalTimeField) }
 //   { button type=button{?(Go)}/button %
 //(onclick -
 ajaxCall(JsRaw($('#initialTimeField').attr('value')), s =
 updateInitialTime(s))) }
 //   br/
 //   div id=resultChart{whatNode(evalStr())}/div
 // /xml:group
 //   }

 // attempt to resolve the problem by putting in a call to bind
   def show(xhtml: NodeSeq): NodeSeq = {
 xml:group{
   bind( hello, xhtml,
initialTimeField -- text(Nil, (updateInitialTime _)) %
 (size - 60) % (id - initialTimeField),
finalTimeField -- text(Nil, (updateFinalTime _)) % (size
 - 60) % (id - finalTimeField),
submit -- button type=button{?(Go)}/button %
 (onclick - ajaxCall(JsRaw($('#initialTimeField').attr('value')), s =
 updateInitialTime(s)))
   )
 }
   br/
   div id=resultChart{whatNode(evalStr())}/div

[Lift] CometListener and CometActor

2009-04-29 Thread Meredith Gregory
David, et al,

i wanted to attempt to recapitulate some version of the screencast for the
comet stuff. Where does CometListener live?

Best wishes,

--greg

[INFO] Compiling 2 source files to
/Users/lgm/work/src/projex/biosimilarity/chart/target/classes
[WARNING]
/Users/lgm/work/src/projex/biosimilarity/chart/src/main/scala/com/biosimilarity/weather/snippet/REPLForm.scala:25:
error: not found: type CometListener
[WARNING] class REPLForm extends CometActor with CometListener {
[WARNING]^
[WARNING]
/Users/lgm/work/src/projex/biosimilarity/chart/src/main/scala/com/biosimilarity/weather/snippet/REPLForm.scala:122:
error: REPLForm.this.? of type Any does not take parameters
[WARNING] { button type=button{?(Go)}/button %
[WARNING]  ^
[WARNING]
/Users/lgm/work/src/projex/biosimilarity/chart/src/main/scala/com/biosimilarity/weather/snippet/REPLForm.scala:102:
error: type mismatch;
[WARNING]  found   : net.liftweb.http.RenderOut
[WARNING]  required: scala.xml.NodeSeq
[WARNING]   def show(xhtml: NodeSeq): NodeSeq = { render }
[WARNING] ^
[WARNING]
/Users/lgm/work/src/projex/biosimilarity/chart/src/main/scala/com/biosimilarity/weather/snippet/REPLForm.scala:105:
error: not found: value Messages
[WARNING] case Messages( what ) = {
[WARNING]  ^
[WARNING]
/Users/lgm/work/src/projex/biosimilarity/chart/src/main/scala/com/biosimilarity/weather/snippet/REPLForm.scala:107:
error: not found: value what
[WARNING] Some( what ).asInstanceOf[Option[DataSample]]
[WARNING]   ^
[WARNING] 5 errors found
[INFO]

[ERROR] BUILD FAILURE
[INFO]

[INFO] command line returned non-zero value:1
[INFO]

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

[INFO] Total time: 8 seconds
[INFO] Finished at: Wed Apr 29 14:12:10 PDT 2009
[INFO] Final Memory: 13M/25M
[INFO]

bash-3.2$

-- 
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] really basic lift question

2009-04-29 Thread Meredith Gregory
Charles, et al,

i'm trying to do something dead simple and it is exposing all kinds of
ignorance on my part regarding lift. (Yay! i get to learn new stuff -- which
would be great if i weren't under a terrible time crunch.)

Now, all i want to do is create a form with

   - 3 text boxes
   - 1 submit button
   - and an area for rendering a chart that results from a computation on
   the values of the text boxes

Here's the minor complication. The submit is going to kick off a process
that may be quite long running. So, i'll render immediately what's possible
with the existing data and then when the long-running computation gets back
to me i'll refresh the feedback. i thought this would be a poster-child app
for the comet support. But, i'm realizing i don't really understand how

   - bind
   - text
   - submit
   - ...

work and i find it difficult to navigate to their defns. For example,
suppose i want the submit button to be greyed-out and inactive unless the 3
text boxes have validated input in them. What is the simplest pair of a
snippet and controller that will do that?

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] buttons and textbox

2009-05-02 Thread Meredith Gregory
Lifted,

i'm putting together a little lift-based testharness in which to evaluate
various solutions to the challenge Martin posted recently regarding scalable
abstractions for a little lambda interpreter. You can get a copy of the app
here http://svn.biosimilarity.com/src/open/rlambda/trunk/. (Please note:
this is a testharness and not a proposed solution. i've got a couple of
solutions in mind, but before i post them, i'd like to put them in a web
container.) As usual, i'm running into problems on the frontend. i'm not
getting expected callback behavior, and, moreover, the code i'm using used
to work fine.

The snippet code is included below this email's closing. The relevant
fragment is listed just below. The behavior i see is that the button
produces no behavior on the server at all. The CR/LF event on the text field
causes updateWhat to be called twice. Any advice on the frontend behavior
would be greatly appreciated.

def whatNode(termStr : String) = {
theTerm = termStr
theClientRequestStr = evalStr()
var theParseResponseStr : String =
  (failure:  + theClientRequestStr + \n);
try {
  theParseResponseStr =
theREPL.showClientRequestParseTree(theClientRequestStr)
  println( parsed :  + theParseResponseStr );
//theREPL.readEvalPrint(theClientRequestStr)
}
catch {
  case e = {
val sw : java.io.StringWriter =new java.io.StringWriter( );
e.printStackTrace( new java.io.PrintWriter( sw, true ) );
theParseResponseStr = theParseResponseStr + e.toString
  }
}
div id=parseTree{theParseResponseStr}/div
  }

  def updateWhat(str: String): JsCmd = {
println(updateWhat with  + str)
JsCmds.SetHtml(parseTree, whatNode(str))
  }

  def show(xhtml: NodeSeq): NodeSeq = {
xml:group
  label for=whatFieldTerm :/label
  { text(lambda x.x, (updateWhat _)) % (size - 60) % (id -
whatField) }
  { button type=button{?(Go)}/button %
   (onclick - ajaxCall(JsRaw($('#whatField').attr('value')), s =
updateWhat(s))) }
  br/
  div id=parseTree{whatNode(evalStr())}/div
/xml:group
  }

Best wishes,

--greg

package com.biosimilarity.reflection.snippet

import net.liftweb._
import http._
import S._
import SHtml._
import util._
import Helpers._
import mapper._
import textile._
import js.{JE, JsCmd, JsCmds}
import JsCmds._
import JE._

import com.biosimilarity.reflection.model.REPL

import scala.xml._

class REPLForm {
  val theREPL = new REPL()
  var theTerm : String = lambda x.x
  var theClientRequestStr : String = evalStr()

  def evalStr() = theTerm
  def clientRequestRequest() = theClientRequestStr

  def parseTreeNode(clientRequestStr : String) = {
theClientRequestStr = clientRequestStr.replace( \n,  );
var theParseResponseStr : String =
  ( failure:  + theClientRequestStr + \n );
try {
  theParseResponseStr =
theREPL.showClientRequestParseTree(theClientRequestStr)
//theREPL.readEvalPrint(theClientRequestStr)
}
catch {
  case e = {
val sw : java.io.StringWriter =new java.io.StringWriter( );
e.printStackTrace( new java.io.PrintWriter( sw, true ) );
theParseResponseStr = theParseResponseStr + e.toString
  }
}
div id=parseTree{theParseResponseStr}/div
  }

  def whatNode(termStr : String) = {
theTerm = termStr
theClientRequestStr = evalStr()
var theParseResponseStr : String =
  (failure:  + theClientRequestStr + \n);
try {
  theParseResponseStr =
theREPL.showClientRequestParseTree(theClientRequestStr)
  println( parsed :  + theParseResponseStr );
//theREPL.readEvalPrint(theClientRequestStr)
}
catch {
  case e = {
val sw : java.io.StringWriter =new java.io.StringWriter( );
e.printStackTrace( new java.io.PrintWriter( sw, true ) );
theParseResponseStr = theParseResponseStr + e.toString
  }
}
div id=parseTree{theParseResponseStr}/div
  }

  def updateWhat(str: String): JsCmd = {
println(updateWhat with  + str)
JsCmds.SetHtml(parseTree, whatNode(str))
  }

  def show(xhtml: NodeSeq): NodeSeq = {
xml:group
  label for=whatFieldTerm :/label
  { text(lambda x.x, (updateWhat _)) % (size - 60) % (id -
whatField) }
  { button type=button{?(Go)}/button %
   (onclick - ajaxCall(JsRaw($('#whatField').attr('value')), s =
updateWhat(s))) }
  br/
  div id=parseTree{whatNode(evalStr())}/div
/xml:group
  }
}


-- 
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: buttons and textbox

2009-05-03 Thread Meredith Gregory
Lifted,

When i look at the button behavior using firebug, this is the following
error i see.

F891109765602PT1 is not defined
onclick(click clientX=950, clientY=152)1tbfBLwe...6bg%3D%3D (line 2)
(F891109765602PT1, lift_ajaxHand...whatField).attr(value), null, null));

It would appear that however the

ajaxCall(JsRaw($('#whatField').attr('value'))

is working it is setting up a handle that is stale by the time the behavior
is actually invoked. This is behind-the-scenes stuff for a programmer like
me. It's part of what lift is s'posed to provide. Moreover, i get no help
from the compiler. The code i have written is well-typed. Any help would be
greatly appreciated.

Best wishes,

--greg


On Sat, May 2, 2009 at 8:50 PM, Meredith Gregory
lgreg.mered...@gmail.comwrote:

 Lifted,

 i'm putting together a little lift-based testharness in which to evaluate
 various solutions to the challenge Martin posted recently regarding scalable
 abstractions for a little lambda interpreter. You can get a copy of the app
 here http://svn.biosimilarity.com/src/open/rlambda/trunk/. (Please note:
 this is a testharness and not a proposed solution. i've got a couple of
 solutions in mind, but before i post them, i'd like to put them in a web
 container.) As usual, i'm running into problems on the frontend. i'm not
 getting expected callback behavior, and, moreover, the code i'm using used
 to work fine.

 The snippet code is included below this email's closing. The relevant
 fragment is listed just below. The behavior i see is that the button
 produces no behavior on the server at all. The CR/LF event on the text field
 causes updateWhat to be called twice. Any advice on the frontend behavior
 would be greatly appreciated.

 def whatNode(termStr : String) = {
 theTerm = termStr
 theClientRequestStr = evalStr()
 var theParseResponseStr : String =
   (failure:  + theClientRequestStr + \n);
 try {
   theParseResponseStr =
 theREPL.showClientRequestParseTree(theClientRequestStr)
   println( parsed :  + theParseResponseStr );
 //theREPL.readEvalPrint(theClientRequestStr)
 }
 catch {
   case e = {
 val sw : java.io.StringWriter =new java.io.StringWriter( );
 e.printStackTrace( new java.io.PrintWriter( sw, true ) );
 theParseResponseStr = theParseResponseStr + e.toString
   }
 }
 div id=parseTree{theParseResponseStr}/div
   }

   def updateWhat(str: String): JsCmd = {
 println(updateWhat with  + str)
 JsCmds.SetHtml(parseTree, whatNode(str))
   }

   def show(xhtml: NodeSeq): NodeSeq = {
 xml:group
   label for=whatFieldTerm :/label
   { text(lambda x.x, (updateWhat _)) % (size - 60) % (id -
 whatField) }
   { button type=button{?(Go)}/button %
(onclick - ajaxCall(JsRaw($('#whatField').attr('value')), s =
 updateWhat(s))) }
   br/
   div id=parseTree{whatNode(evalStr())}/div
 /xml:group
   }

 Best wishes,

 --greg

 package com.biosimilarity.reflection.snippet

 import net.liftweb._
 import http._
 import S._
 import SHtml._
 import util._
 import Helpers._
 import mapper._
 import textile._
 import js.{JE, JsCmd, JsCmds}
 import JsCmds._
 import JE._

 import com.biosimilarity.reflection.model.REPL

 import scala.xml._

 class REPLForm {
   val theREPL = new REPL()
   var theTerm : String = lambda x.x
   var theClientRequestStr : String = evalStr()

   def evalStr() = theTerm
   def clientRequestRequest() = theClientRequestStr

   def parseTreeNode(clientRequestStr : String) = {
 theClientRequestStr = clientRequestStr.replace( \n,  );
 var theParseResponseStr : String =
   ( failure:  + theClientRequestStr + \n );
 try {
   theParseResponseStr =
 theREPL.showClientRequestParseTree(theClientRequestStr)
 //theREPL.readEvalPrint(theClientRequestStr)
 }
 catch {
   case e = {
 val sw : java.io.StringWriter =new java.io.StringWriter( );
 e.printStackTrace( new java.io.PrintWriter( sw, true ) );
 theParseResponseStr = theParseResponseStr + e.toString
   }
 }
 div id=parseTree{theParseResponseStr}/div
   }

   def whatNode(termStr : String) = {
 theTerm = termStr
 theClientRequestStr = evalStr()
 var theParseResponseStr : String =
   (failure:  + theClientRequestStr + \n);
 try {
   theParseResponseStr =
 theREPL.showClientRequestParseTree(theClientRequestStr)
   println( parsed :  + theParseResponseStr );
 //theREPL.readEvalPrint(theClientRequestStr)
 }
 catch {
   case e = {
 val sw : java.io.StringWriter =new java.io.StringWriter( );
 e.printStackTrace( new java.io.PrintWriter( sw, true ) );
 theParseResponseStr = theParseResponseStr + e.toString
   }
 }
 div id=parseTree{theParseResponseStr}/div
   }

   def updateWhat(str: String): JsCmd = {
 println(updateWhat with  + str)
 JsCmds.SetHtml(parseTree, whatNode(str))
   }

   def show(xhtml: NodeSeq): NodeSeq

[Lift] Re: buttons and textbox

2009-05-03 Thread Meredith Gregory
Marius,

Thanks! That works much better. One final question, if i wanted to have the
CR/LF event on the textbox have the same behavior as the button, what would
be the simplest approach? Currently, i have

{ text(evalStr(), (updateWhat _)) % (size - 60) % (id - whatField)
}

which always reverts back to the initla value of the textbox.

Best wishes,

--greg

On Sun, May 3, 2009 at 1:08 AM, marius d. marius.dan...@gmail.com wrote:


 First of all instead of:

  (onclick - ajaxCall(JsRaw($('#whatField').attr('value')), s =
 updateWhat(s))._2)

 I would use:

  (onclick - ajaxCall(ValById(whatField), s = updateWhat(s))._2)


 That should work  I think in your case you are setting the value
 attribute of the text field to lambda.x.x and $('#whatField').attr
 ('value') is just returning the 'value' attribute of the whatField
 node. This returns the value set statically which is different from
 document.getElementById(whatField).value. I know it's a bit odd ...

 Br's,
 Marius

 On May 3, 10:51 am, Meredith Gregory lgreg.mered...@gmail.com wrote:
  Marius,
 
  Thanks for the tip! That gets me a little further. However, what i really
  don't understand is why it is that after i have modified the textbox from
  lambda x.x to lambda x.(x x), then when i type
  $('#whatField').attr('value') in the javascript evaluation window in
 firebug
  it's returning lambda x.x. How do i access the contents of the textbox
  except by that call?
 
  Best wishes,
 
  --greg
 
 
 
  On Sun, May 3, 2009 at 12:11 AM, marius d. marius.dan...@gmail.com
 wrote:
 
   Greg,
 
   ajaxCall returns a tuple (String, JsExp) ... so when you use it try
   something like:
 
(onclick - ajaxCall(JsRaw($('#whatField').attr('value')), s =
   updateWhat(s))._2)
 
   Br's,
   Marius
 
   On May 3, 9:00 am, Meredith Gregory lgreg.mered...@gmail.com wrote:
Lifted,
 
When i look at the button behavior using firebug, this is the
 following
error i see.
 
F891109765602PT1 is not defined
onclick(click clientX=950, clientY=152)1tbfBLwe...6bg%3D%3D (line 2)
(F891109765602PT1, lift_ajaxHand...whatField).attr(value), null,
   null));
 
It would appear that however the
 
ajaxCall(JsRaw($('#whatField').attr('value'))
 
is working it is setting up a handle that is stale by the time the
   behavior
is actually invoked. This is behind-the-scenes stuff for a programmer
   like
me. It's part of what lift is s'posed to provide. Moreover, i get no
 help
from the compiler. The code i have written is well-typed. Any help
 would
   be
greatly appreciated.
 
Best wishes,
 
--greg
 
On Sat, May 2, 2009 at 8:50 PM, Meredith Gregory
lgreg.mered...@gmail.comwrote:
 
 Lifted,
 
 i'm putting together a little lift-based testharness in which to
   evaluate
 various solutions to the challenge Martin posted recently regarding
   scalable
 abstractions for a little lambda interpreter. You can get a copy of
 the
   app
 here http://svn.biosimilarity.com/src/open/rlambda/trunk/.
 (Please
   note:
 this is a testharness and not a proposed solution. i've got a
 couple of
 solutions in mind, but before i post them, i'd like to put them in
 a
   web
 container.) As usual, i'm running into problems on the frontend.
 i'm
   not
 getting expected callback behavior, and, moreover, the code i'm
 using
   used
 to work fine.
 
 The snippet code is included below this email's closing. The
 relevant
 fragment is listed just below. The behavior i see is that the
 button
 produces no behavior on the server at all. The CR/LF event on the
 text
   field
 causes updateWhat to be called twice. Any advice on the frontend
   behavior
 would be greatly appreciated.
 
 def whatNode(termStr : String) = {
 theTerm = termStr
 theClientRequestStr = evalStr()
 var theParseResponseStr : String =
   (failure:  + theClientRequestStr + \n);
 try {
   theParseResponseStr =
 theREPL.showClientRequestParseTree(theClientRequestStr)
   println( parsed :  + theParseResponseStr );
 //theREPL.readEvalPrint(theClientRequestStr)
 }
 catch {
   case e = {
 val sw : java.io.StringWriter =new java.io.StringWriter( );
 e.printStackTrace( new java.io.PrintWriter( sw, true ) );
 theParseResponseStr = theParseResponseStr + e.toString
   }
 }
 div id=parseTree{theParseResponseStr}/div
   }
 
   def updateWhat(str: String): JsCmd = {
 println(updateWhat with  + str)
 JsCmds.SetHtml(parseTree, whatNode(str))
   }
 
   def show(xhtml: NodeSeq): NodeSeq = {
 xml:group
   label for=whatFieldTerm :/label
   { text(lambda x.x, (updateWhat _)) % (size - 60) %
 (id
   -
 whatField) }
   { button type=button{?(Go)}/button %
(onclick -
 ajaxCall(JsRaw($('#whatField').attr('value

[Lift] textarea overrides?

2009-05-03 Thread Meredith Gregory
Lifted,

i gave up on trying to understand how to to the brain-dead simple version of
what i was trying to do and went for a more complex version. This works
(better, anyways). However, i notice that despite the instructions to render
the textarea with 1 row, it is rendering it with about 10 rows. Anybody have
any clues as to why?

lift:surround with=default at=content
h1R-E-P-L/h1
lift:REPLForm.show
  json:script/
  select id=json_verb
option value=parseParse term/option
option value=evaluateEvaluate term/option
option value=typeType term/option
  /select
  br /
  textarea id=expression rows=1lambda x.x/textarea
  br /
  button json:onclick=onclickGo/button
  br /
  div id=result/div
/lift:REPLForm.show
/lift:surround

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: textarea overrides?

2009-05-03 Thread Meredith Gregory
Tyler, Charles,

Thanks for the tip!

i decided that it looks like i've intended for people to input more complex
expressions. So, i've left the size the way it is. (You know in jazz when
you play a wrong note once, it's a mistake, but if you keep hammering it,
it's what you meant to do. i'm improvising, sort of. ;-) That begs another
question, however. Is there a more complex text edit widge, like the one
around the edit area in gmail. Is there a jquery widget that handles most of
this?

Best wishes,

--greg

On Sun, May 3, 2009 at 4:28 PM, Charles F. Munat c...@munat.com wrote:


 It's not likely, it IS blueprint, which in it's infinite wisdom, sets
 the height and width of textareas in pixels.

 You can override it generically in CSS, or you could add a class (or id)
 attribute to that specific textarea and then set it with CSS.

 (There are some things I really don't like about Blueprint, and default
 sizes on the textareas is at the top of my list.)

 Chas.

 TylerWeir wrote:
  If you're using the standard CSS, it's likely blueprint is controlling
  the size:
  http://blueprintcss.org/blueprint/src/forms.css
 
 
 
  On May 3, 6:16 pm, Meredith Gregory lgreg.mered...@gmail.com wrote:
  Lifted,
 
  i gave up on trying to understand how to to the brain-dead simple
 version of
  what i was trying to do and went for a more complex version. This works
  (better, anyways). However, i notice that despite the instructions to
 render
  the textarea with 1 row, it is rendering it with about 10 rows. Anybody
 have
  any clues as to why?
 
  lift:surround with=default at=content
  h1R-E-P-L/h1
  lift:REPLForm.show
json:script/
select id=json_verb
  option value=parseParse term/option
  option value=evaluateEvaluate term/option
  option value=typeType term/option
/select
br /
textarea id=expression rows=1lambda x.x/textarea
br /
button json:onclick=onclickGo/button
br /
div id=result/div
  /lift:REPLForm.show
  /lift:surround
 
  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: textarea overrides?

2009-05-03 Thread Meredith Gregory
Charles,

That's pretty cool. i'll give it a whirl. It's a little bulky, but bulk can
have it's merits (although i'm told it's not the meat, it's the motion ;-).

Best wishes,

--greg

On Sun, May 3, 2009 at 6:20 PM, Charles F. Munat c...@munat.com wrote:


 Do you mean a rich text editor? Something like TinyMCE?

 http://tinymce.moxiecode.com/

 Or something less bulky than that?

 Chas.

 Meredith Gregory wrote:
  Tyler, Charles,
 
  Thanks for the tip!
 
  i decided that it looks like i've intended for people to input more
  complex expressions. So, i've left the size the way it is. (You know in
  jazz when you play a wrong note once, it's a mistake, but if you keep
  hammering it, it's what you meant to do. i'm improvising, sort of. ;-)
  That begs another question, however. Is there a more complex text edit
  widge, like the one around the edit area in gmail. Is there a jquery
  widget that handles most of this?
 
  Best wishes,
 
  --greg
 
  On Sun, May 3, 2009 at 4:28 PM, Charles F. Munat c...@munat.com
  mailto:c...@munat.com wrote:
 
 
  It's not likely, it IS blueprint, which in it's infinite wisdom, sets
  the height and width of textareas in pixels.
 
  You can override it generically in CSS, or you could add a class (or
 id)
  attribute to that specific textarea and then set it with CSS.
 
  (There are some things I really don't like about Blueprint, and
 default
  sizes on the textareas is at the top of my list.)
 
  Chas.
 
  TylerWeir wrote:
If you're using the standard CSS, it's likely blueprint is
  controlling
the size:
http://blueprintcss.org/blueprint/src/forms.css
   
   
   
On May 3, 6:16 pm, Meredith Gregory lgreg.mered...@gmail.com
  mailto:lgreg.mered...@gmail.com wrote:
Lifted,
   
i gave up on trying to understand how to to the brain-dead
  simple version of
what i was trying to do and went for a more complex version.
  This works
(better, anyways). However, i notice that despite the
  instructions to render
the textarea with 1 row, it is rendering it with about 10 rows.
  Anybody have
any clues as to why?
   
lift:surround with=default at=content
h1R-E-P-L/h1
lift:REPLForm.show
  json:script/
  select id=json_verb
option value=parseParse term/option
option value=evaluateEvaluate term/option
option value=typeType term/option
  /select
  br /
  textarea id=expression rows=1lambda x.x/textarea
  br /
  button json:onclick=onclickGo/button
  br /
  div id=result/div
/lift:REPLForm.show
/lift:surround
   
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
 
  

 



-- 
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] 1st draft of response to Martin's code challenge for scalable componentized lambda evaluator

2009-05-04 Thread Meredith Gregory
Lifted, Scalad and lasses,

Recently Martin passed along a little code challenge regarding scalable
abstractions for building a little lambda calculus evaluator. i've finally
put together a 1st draft response. i've still got a lot of debugging to do,
but the solution http://code.google.com/p/rlambda/source/browse/trunk/ is
end-to-end.

   - there is a parser and evaluator hosted inside a lift-based
   web-container
   - the parser is built using BNFC and can target
   Java/C#/OCaml/Haskell/F#/...
   - the parser comes with visitor pattern support
   - the evaluator is built in a two-level type style and demonstrates that
   the only OO you need is just enough to make Scala happy -- the abstractions
   are all FP-based

As i said, this is very much a draft and the code falls over most of the
time. But, at this point, it's really a pedagogical device and framework for
hosting and evaluating different solutions.

Again, one the main reasons i see for using Scala is it's seamless interop
with Java. The OCaml solution is intriguing (though ther are some
strangenesses in it that i've yet to grok), but i would like to see that
solution hosted in this manner.

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: 1st draft of response to Martin's code challenge for scalable componentized lambda evaluator

2009-05-05 Thread Meredith Gregory
Marius,

Thanks for the query. Yes, there is a not so subtle point. Take a look at
the 
grammarhttp://code.google.com/p/rlambda/source/browse/trunk/src/main/bnfc/rlambda.cf.
To my way of thinking, these are it's advantages.

   - Readable (and therefore maintainable)
   - Targets the following languages with only 1 small change to the build
   process
   - Java -- therefore available in Scala, but faster than Scala
  - C/C++
  - C#
  - F#
  - OCaml
  - Haskell
  - XML
  - Generates visitor patterns

i find the parser combinator stuff certainly idiosyncratic, but nearly
unreadable. i also note that in Haskell, the language (community) that
originated the parser combinator stuff, the parser combinator machinery is
nicely hidden behind a more standard BNF frontend, such as Alex + Happy.
This is the way it should be.

Best wishes,

--greg

On Tue, May 5, 2009 at 4:15 AM, marius d. marius.dan...@gmail.com wrote:


 Any reason why not using Scala's combinator parsers? ... or this is
 beyond the point of the exercise?

 Br's
 Marius

 On May 5, 4:55 am, Meredith Gregory lgreg.mered...@gmail.com wrote:
  Lifted, Scalad and lasses,
 
  Recently Martin passed along a little code challenge regarding scalable
  abstractions for building a little lambda calculus evaluator. i've
 finally
  put together a 1st draft response. i've still got a lot of debugging to
 do,
  but the solution http://code.google.com/p/rlambda/source/browse/trunk/
 is
  end-to-end.
 
 - there is a parser and evaluator hosted inside a lift-based
 web-container
 - the parser is built using BNFC and can target
 Java/C#/OCaml/Haskell/F#/...
 - the parser comes with visitor pattern support
 - the evaluator is built in a two-level type style and demonstrates
 that
 the only OO you need is just enough to make Scala happy -- the
 abstractions
 are all FP-based
 
  As i said, this is very much a draft and the code falls over most of the
  time. But, at this point, it's really a pedagogical device and framework
 for
  hosting and evaluating different solutions.
 
  Again, one the main reasons i see for using Scala is it's seamless
 interop
  with Java. The OCaml solution is intriguing (though ther are some
  strangenesses in it that i've yet to grok), but i would like to see that
  solution hosted in this manner.
 
  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
-~--~~~~--~~--~--~---



  1   2   3   >