[Lift] Re: [SOLVED] Req lazy val xml not working

2009-01-31 Thread Tim Perrett

 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.

LOL! I'm sorry for the confusion - it was a pure typo - it was about  
1:30am GMT so my brain was starting to fail me :-)





 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






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

 

--~--~-~--~~~---~--~~
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: Suggested breaking changes for XMLApiHelper

2009-01-31 Thread David Pollak
Tim,
Please don't change the existing XMLApiHelpers, but feel free to create an
alternative.  I expect different people are going to have different styles
and providing them with lots of alternatives will be important.

I'm planning another alternative that will returns failures as different
HTTP codes to make things more RESTful.

Thanks,

David

On Sat, Jan 31, 2009 at 3:07 AM, Tim Perrett he...@timperrett.com wrote:


 Guys,

 Just doing some work with the XMLApiHelper and im finding some things
 that can be improved. For instance, the trait provides createTag which
 you then have to override like so:

 def createTag(in: NodeSeq) = api{in}/api

 IMO, it seems that this isnt ideal as if you were returning a list of
 users, your xml would be:

 api
  user/user
  user/user
 /api

 It would be better to have a configurable root node, so its a more
 logical semantic:

 users
  user/user
  user/user
 /users

 I've been playing around with the best way to do it and by changing
 the implicits and the xml build methods I now have it so that you can
 do:

 def listAllUsers = {
  ...
  (users, listOfUsers)
 }

 This appears to be the best way to do it, otherwise things start
 getting messy?

 Whilst I can make these changes code wise, im very aware that ESME
 uses this helper a lot and this would mean some significant breaking
 changes in the api construction, both for ESME, and no doubt other
 projects. IMHO, the change is worth the hassle as it will make
 services up of more logically formed xml.

 What are people's thoughts?

 Cheers

 Tim
 



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

--~--~-~--~~~---~--~~
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-31 Thread David Pollak
Greg,
If you go to the URL with a browser, you'll see a link for public clone
URL  The correct command is:
git clone git://github.com/dpp/lift-samples.git

The bad news is that you'll get my presentations on Lift and Scala as
well... but you can just delete them. :-)

Thanks,

David

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

 



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

--~--~-~--~~~---~--~~
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: Suggested breaking changes for XMLApiHelper

2009-01-31 Thread Tim Perrett


Hey David,

Ok splendid - another alternative it is.

FYI - I added a few more HTTP code representations to HttpResponse.scala
last night... Nothing crazy, but just some other ones I needed. I also need
to add some extra parameters to some of them so they directly represent the
RFC spec, but they are OK for the moment :-)

Cheers

Tim

On 31/01/2009 15:48, David Pollak feeder.of.the.be...@gmail.com wrote:

 Tim,
 
 Please don't change the existing XMLApiHelpers, but feel free to create an
 alternative.  I expect different people are going to have different styles and
 providing them with lots of alternatives will be important.
 
 I'm planning another alternative that will returns failures as different HTTP
 codes to make things more RESTful.
 
 Thanks,
 
 David
 
 On Sat, Jan 31, 2009 at 3:07 AM, Tim Perrett he...@timperrett.com wrote:
 
 Guys,
 
 Just doing some work with the XMLApiHelper and im finding some things
 that can be improved. For instance, the trait provides createTag which
 you then have to override like so:
 
 def createTag(in: NodeSeq) = api{in}/api
 
 IMO, it seems that this isnt ideal as if you were returning a list of
 users, your xml would be:
 
 api
   user/user
   user/user
 /api
 
 It would be better to have a configurable root node, so its a more
 logical semantic:
 
 users
   user/user
   user/user
 /users
 
 I've been playing around with the best way to do it and by changing
 the implicits and the xml build methods I now have it so that you can
 do:
 
 def listAllUsers = {
   ...
   (users, listOfUsers)
 }
 
 This appears to be the best way to do it, otherwise things start
 getting messy?
 
 Whilst I can make these changes code wise, im very aware that ESME
 uses this helper a lot and this would mean some significant breaking
 changes in the api construction, both for ESME, and no doubt other
 projects. IMHO, the change is worth the hassle as it will make
 services up of more logically formed xml.
 
 What are people's thoughts?
 
 Cheers
 
 Tim
 
 
 



--~--~-~--~~~---~--~~
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] S.servletRequest is empty

2009-01-31 Thread Joachim A.

Hi,
I was using S.hostAndPath and was surprised that it didn't include the 
protocoll and path.
I've found out that S.servletRequest returns Empty here.

The method is called by in an actor. 
Is some special initialisation necessary for this setup? 

Thanks,
Joachim

--~--~-~--~~~---~--~~
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: S.servletRequest is empty

2009-01-31 Thread David Pollak
On Sat, Jan 31, 2009 at 9:21 AM, Joachim A. wallaby.po...@googlemail.comwrote:


 Hi,
 I was using S.hostAndPath and was surprised that it didn't include the
 protocoll and path.
 I've found out that S.servletRequest returns Empty here.

 The method is called by in an actor.
 Is some special initialisation necessary for this setup?


The Actor code is outside of the HTTP request/response cycle, so there's no
way to access the request information from the Actor.




 Thanks,
 Joachim

 



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

--~--~-~--~~~---~--~~
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: S.servletRequest is empty

2009-01-31 Thread Joachim A.


  The method is called by in an actor.
  Is some special initialisation necessary for this setup?

 The Actor code is outside of the HTTP request/response cycle, so there's no
 way to access the request information from the Actor.

Correct. Next time I'll think a little bit longer :)
I'll find another solution, either by configuration setting or by asking my 
user's comet actor (still need to check if that works).

Thanks,
Joachim

--~--~-~--~~~---~--~~
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: S.servletRequest is empty

2009-01-31 Thread David Pollak
On Sat, Jan 31, 2009 at 10:13 AM, Joachim A.
wallaby.po...@googlemail.comwrote:



   The method is called by in an actor.
   Is some special initialisation necessary for this setup?
 
  The Actor code is outside of the HTTP request/response cycle, so there's
 no
  way to access the request information from the Actor.

 Correct. Next time I'll think a little bit longer :)
 I'll find another solution, either by configuration setting


I'd stuff the information in a SessionVar so it'll be accessible to the
CometActor.


 or by asking my
 user's comet actor (still need to check if that works).


The CometActor does not have access to the HTTP information, but it does
have access to other state in S.



 Thanks,
 Joachim

 



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

--~--~-~--~~~---~--~~
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] Scala-tools.org dns broken

2009-01-31 Thread David Pollak
Folks,
The DNS server that serves scala-tools.org's name is down.  If you're having
Maven build issues, they'll resolve once the DNS server is back.

I'll change the DNS provider to a more reliable company on Monday.

Sorry.

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

--~--~-~--~~~---~--~~
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] Cleaning up warnings

2009-01-31 Thread David Pollak
Folks,
I've been trying to clean up warnings in the Lift code.  I tried to change
Prop.property to Prop.forAll as ScalaCheck has deprecated property, but the
compiler complained the a String = Boolean was not a Gen.  Anybody have a
clue how to make these warning go away:
[WARNING]
C:\Users\dpp\Documents\liftweb\lift-util\src\test\scala\net\liftweb\ut
il\BoxUnit.scala:38: warning: method property in object Prop is deprecated
[WARNING]   property(equality) must pass
[WARNING]   ^
[WARNING]
C:\Users\dpp\Documents\liftweb\lift-util\src\test\scala\net\liftweb\ut
il\CombParserHelpersSpec.scala:52: warning: method property in object Prop
is de
precated
[WARNING]   property(whiteParse) must pass
[WARNING]   ^
[WARNING]
C:\Users\dpp\Documents\liftweb\lift-util\src\test\scala\net\liftweb\ut
il\CombParserHelpersSpec.scala:60: warning: method property in object Prop
is de
precated
[WARNING]   property(whiteSpaceParse) must pass
[WARNING]   ^
[WARNING]
C:\Users\dpp\Documents\liftweb\lift-util\src\test\scala\net\liftweb\ut
il\CombParserHelpersSpec.scala:69: warning: method property in object Prop
is de
precated
[WARNING]   property(ignoreCaseStringParse) must pass
[WARNING]   ^
[WARNING]
C:\Users\dpp\Documents\liftweb\lift-util\src\test\scala\net\liftweb\ut
il\CombParserHelpersSpec.scala:77: warning: method property in object Prop
is de
precated
[WARNING]   property(isDigit) must pass
[WARNING]   ^
[WARNING]
C:\Users\dpp\Documents\liftweb\lift-util\src\test\scala\net\liftweb\ut
il\CombParserHelpersSpec.scala:86: warning: method property in object Prop
is de
precated
[WARNING]   property(number) must pass
[WARNING]   ^
[WARNING]
C:\Users\dpp\Documents\liftweb\lift-util\src\test\scala\net\liftweb\ut
il\CombParserHelpersSpec.scala:119: warning: method property in object Prop
is d
eprecated
[WARNING]   property((s: String) = (!stringWrapper(s).isEmpty) ==
permuteA
llParsers(s)) must pass
[WARNING]   ^
[WARNING]
C:\Users\dpp\Documents\liftweb\lift-util\src\test\scala\net\liftweb\ut
il\CombParserHelpersSpec.scala:124: warning: method property in object Prop
is d
eprecated
[WARNING]   property((s: String) = (!stringWrapper(s).isEmpty) ==
repNNPar
ser(s)) must pass
[WARNING]   ^
[WARNING] 10 warnings found

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

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