[Lift] Re: Can or Box or something else

2008-12-27 Thread Kris Nuttycombe
If we all get a say, I vote for "Trit" - after all, with Full, Empty and
Failure, aren't we talking about ternary logic?

Or does suggesting that make me a Twit?

Kris

On Sat, Dec 27, 2008 at 5:08 PM, Oliver Lambert  wrote:

> Ha :), I really think you've let the Can out of the Box by raising this
> thread. Don't we all get a vote? After reading all the threads -
> +1 Box
>
>
> On 27/12/2008, at 10:06 AM, David Pollak wrote:
>
>
>
> 2008/12/26 Alex Boisvert 
>
>> Just brainstorming here...  not sure if we're beating a dead horse... but
>> about Option3 to signify it has 3 states?  (i.e. Some3, None3, Error3)
>>
>> It's uglier but could be easier to explain and understand.
>
>
> Personally, it took me a lot to get the concept of Option... mainly because
> to me, an Option is this or that, not some or none.  Optional would have
> been a better choice as is Maybe.  In fact, it wasn't until I was playing
> around with Haskell and the Maybe monad, that I finally "got" Options.  I
> would despise the idea of perpetuating what I consider to be one of Scala's
> weakest naming schemes.
>
> It's going to stay "Can", but if I had it to do all over, I'd call it Box.
>
> Thanks for all your respective thoughts on the subject.
>
> David
>
> PS -- The code is pretty much frozen for Lift.  There'll be a few last
> minute minor changes between now and Jan 2 (or whenever 2.7.3 goes final) at
> which time we'll release Lift 0.10 and start on the Lift 1.0-SNAPSHOT
> version.  We're expecting to ship Lift 1.0 on the 2 year anniversary of the
> project.
>
>
>>
>>
>> alex
>>
>>
>> On Fri, Dec 26, 2008 at 3:29 AM, Mateusz Fiołka > > wrote:
>>
>>> If Maybe should be not used because of possible name clash in Scala
>>> library then how about considering synonyms: Possible and Perhaps?
>>>
>>>
>>> On Fri, Dec 26, 2008 at 10:31 AM, Caoyuan  wrote:
>>>

 and "Pack" ?

 On Fri, Dec 26, 2008 at 8:35 AM, Marc Boschma 
 >
 wrote:
 >
 > I know David has resigned to keeping 'Can', but wouldn't 'Jar' be an
 > alternative? That way Empty and Full still make sense...
 >
 > Initially I thought 'Tin' sounded better but I recognise that term
 > wouldn't be as universal.
 >
 > Marc
 >
 > On 26/12/2008, at 4:14 AM, Michael Campbell wrote:
 >
 >>
 >> David Pollak wrote:
 >>> Folks,
 >>>
 >>> Over the year that Lift has had Can[T] as a replacement for Scala's
 >>> Option[T], the name "Can" has required a lot of explaining.
 >>
 >>
 >> I've never liked "Can" as a name; always thinking that the opposite
 >> of one
 >> should be a "Can't".   I'm sure it's my own issue to solve, but it's
 >> cognitively dissonant to me.
 >>
 >> Any other container name works better for me, although of the ones
 >> you listed,
 >> I like "Box".
 >>
 >>
 >> --
 >> Twitter:  http://twitter.com/campbellmichael
 >>
 >> >
 >
 >
 > >
 >



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

--~--~-~--~~~---~--~~
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: Can or Box or something else

2008-12-27 Thread Oliver Lambert
Ha :), I really think you've let the Can out of the Box by raising  
this thread. Don't we all get a vote?
After reading all the threads -
+1 Box

On 27/12/2008, at 10:06 AM, David Pollak wrote:

>
>
> 2008/12/26 Alex Boisvert 
> Just brainstorming here...  not sure if we're beating a dead  
> horse... but about Option3 to signify it has 3 states?  (i.e. Some3,  
> None3, Error3)
>
> It's uglier but could be easier to explain and understand.
>
> Personally, it took me a lot to get the concept of Option... mainly  
> because to me, an Option is this or that, not some or none.   
> Optional would have been a better choice as is Maybe.  In fact, it  
> wasn't until I was playing around with Haskell and the Maybe monad,  
> that I finally "got" Options.  I would despise the idea of  
> perpetuating what I consider to be one of Scala's weakest naming  
> schemes.
>
> It's going to stay "Can", but if I had it to do all over, I'd call  
> it Box.
>
> Thanks for all your respective thoughts on the subject.
>
> David
>
> PS -- The code is pretty much frozen for Lift.  There'll be a few  
> last minute minor changes between now and Jan 2 (or whenever 2.7.3  
> goes final) at which time we'll release Lift 0.10 and start on the  
> Lift 1.0-SNAPSHOT version.  We're expecting to ship Lift 1.0 on the  
> 2 year anniversary of the project.
>
>
>
> alex
>
>
> On Fri, Dec 26, 2008 at 3:29 AM, Mateusz Fiołka  m> wrote:
> If Maybe should be not used because of possible name clash in Scala  
> library then how about considering synonyms: Possible and Perhaps?
>
>
> On Fri, Dec 26, 2008 at 10:31 AM, Caoyuan  wrote:
>
> and "Pack" ?
>
> On Fri, Dec 26, 2008 at 8:35 AM, Marc Boschma  +lift...@boschma.cx> wrote:
> >
> > I know David has resigned to keeping 'Can', but wouldn't 'Jar' be an
> > alternative? That way Empty and Full still make sense...
> >
> > Initially I thought 'Tin' sounded better but I recognise that term
> > wouldn't be as universal.
> >
> > Marc
> >
> > On 26/12/2008, at 4:14 AM, Michael Campbell wrote:
> >
> >>
> >> David Pollak wrote:
> >>> Folks,
> >>>
> >>> Over the year that Lift has had Can[T] as a replacement for  
> Scala's
> >>> Option[T], the name "Can" has required a lot of explaining.
> >>
> >>
> >> I've never liked "Can" as a name; always thinking that the opposite
> >> of one
> >> should be a "Can't".   I'm sure it's my own issue to solve, but  
> it's
> >> cognitively dissonant to me.
> >>
> >> Any other container name works better for me, although of the ones
> >> you listed,
> >> I like "Box".
> >>
> >>
> >> --
> >> Twitter:  http://twitter.com/campbellmichael
> >>
> >> >
> >
> >
> > >
> >
>
>
>
>
>
>
>
>
>
>
>
> -- 
> 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
>
> >


--~--~-~--~~~---~--~~
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: Can liftweb support Chinese?

2008-12-27 Thread Tim Perrett

I have a pet project that has Hebrew in it and I'm not having any  
issues - like David said, if it utf-8 then you won't have a problem :-)

Welcome to lift

Cheers

Tim

Sent from my iPhone

On 27 Dec 2008, at 10:11, OdinUshuaia  wrote:

>
> I'm a beginner of scala and liftweb. Because I am a Chinese, I want to
> build a website with liftweb in Chinese.
> So I follow the wiki of liftweb. But I found that even a static html
> page, if there are Chinese character in it, it will handle an
> exception.
> Exception occured while processing /hello
> Message: java.lang.OutOfMemoryError: Java heap space
>scala.StringBuilder$.scala$StringBuilder$ 
> $copyOf(StringBuilder.scala:
> 868)
>scala.StringBuilder.expandCapacity(StringBuilder.scala:113)
>scala.StringBuilder.append(StringBuilder.scala:365)
>scala.xml.parsing.MarkupParser$class.putChar(MarkupParser.scala: 
> 236)
>net.liftweb.util.PCDataXmlParser.putChar(PCDataMarkupParser.scala: 
> 77)
>scala.xml.parsing.MarkupParser$class.xText(MarkupParser.scala:761)
>net.liftweb.util.PCDataXmlParser.xText(PCDataMarkupParser.scala:77)
>scala.xml.parsing.MarkupParser$class.content(MarkupParser.scala: 
> 541)
>net.liftweb.util.PCDataXmlParser.content(PCDataMarkupParser.scala: 
> 77)
>scala.xml.parsing.MarkupParser$class.element1(MarkupParser.scala: 
> 682)
>net.liftweb.util.PCDataXmlParser.element1(PCDataMarkupParser.scala:
> 77)
>scala.xml.parsing.MarkupParser$class.content1(MarkupParser.scala: 
> 481)
>net.liftweb.util.PCDataXmlParser.content1(PCDataMarkupParser.scala:
> 77)
>scala.xml.parsing.MarkupParser$class.content(MarkupParser.scala: 
> 505)
>net.liftweb.util.PCDataXmlParser.content(PCDataMarkupParser.scala: 
> 77)
>scala.xml.parsing.MarkupParser$class.element1(MarkupParser.scala: 
> 682)
>net.liftweb.util.PCDataXmlParser.element1(PCDataMarkupParser.scala:
> 77)
>scala.xml.parsing.MarkupParser$class.content1(MarkupParser.scala: 
> 481)
>net.liftweb.util.PCDataXmlParser.content1(PCDataMarkupParser.scala:
> 77)
>scala.xml.parsing.MarkupParser$class.content(MarkupParser.scala: 
> 505)
>net.liftweb.util.PCDataXmlParser.content(PCDataMarkupParser.scala: 
> 77)
>scala.xml.parsing.MarkupParser$class.document(MarkupParser.scala: 
> 207)
>net.liftweb.util.PCDataXmlParser.document(PCDataMarkupParser.scala:
> 77)
>net.liftweb.util.PCDataXmlParser$.apply(PCDataMarkupParser.scala: 
> 88)
>net.liftweb.http.TemplateFinder$$anonfun$findAnyTemplate$1$$anonfun
> $apply$44.apply(LiftSession.scala:766)
>net.liftweb.http.TemplateFinder$$anonfun$findAnyTemplate$1$$anonfun
> $apply$44.apply(LiftSession.scala:766)
>net.liftweb.util.Full.flatMap(Can.scala:266)
>net.liftweb.http.TemplateFinder$$anonfun$findAnyTemplate$1.apply
> (LiftSession.scala:766)
>net.liftweb.http.TemplateFinder$$anonfun$findAnyTemplate$1.apply
> (LiftSession.scala:766)
>net.liftweb.util.Helpers$.first(Helpers.scala:167)
>net.liftweb.http.TemplateFinder$.findAnyTemplate(LiftSession.scala:
> 766)
>net.liftweb.http.LiftSession$$anonfun$net$liftweb$http$LiftSession$
> $findVisibleTemplate$1.apply(LiftSession.scala:400)
>
> So I wonder that if Liftweb do not support Chinese or any other Asian
> language?
> If Lift support, what should I do?
>
> >
>

--~--~-~--~~~---~--~~
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: Partial functions

2008-12-27 Thread Charles F. Munat

I see. So I looked up orElse and I see that it (and andThen) are methods 
of PartialFunction. Surprisingly, these aren't discussed at all in 
Programming in Scala. Apparently, they're beyond the scope of the book.

I understand the chaining and how this benefits the library designer 
(and the library consumer). I'm now reading through the source code and 
trying to get a better grasp of how partial functions benefit the Lift 
library.

Thanks! Your answers really helped.

BTW, if you do a search for Pf in the Lift code you'll find that there 
remain a couple of instances where the names haven't been changed to PF, 
namely line 259 of docs/presentations/lift-web-services/lift.html and 
lines 157 and 176 of src/main/scala/net/liftweb/http/CometActor.scala.

Chas.

Kris Nuttycombe wrote:
> As David has mentioned before on this list (and as I believe is 
> mentioned in the book as well) the concerns of a library designer and a 
> library user are somewhat different. Allowing the user of a library to 
> provide a partial function makes development using that library easier 
> because the user doesn't need to worry about potential match errors, or 
> having to provide for each possible case in a match; they can just 
> define their partial function over the values that they're interested in 
> and rely upon the framework to do the right thing if no match is available.
> 
> Internally, Lift will check isDefinedAt whenever a partial function is 
> used; this is an instance where the library designer takes on the 
> responsibility for providing correct handling in the undefined case, and 
> leaves the user free to handle whatever specific cases they wish. This 
> gives maximum flexibility to the users of the framework, and allows them 
> to focus on the problems they're trying to solve.
> 
> Kris
> 
> On Sat, Dec 27, 2008 at 1:18 AM, Marius  > wrote:
> 
> 
> Personally I think Partial functions are great because you can chain
> them ... see orEse. The other nice thing is pattern matching on
> function arguments. For instance:
> 
> val x: PartialFunction[String,String] = {
>  case "dog" => "bark"
> }
> 
> this PF is defined only if the argument is "dog". For anything else
> isDefined function returns false.But whenever you want to call a PF
> you should first call the isDefinedAt. If in the example above we'd
> use a complete function calling it with something else then a dog
> you'll get a MatchError at runtime.
> 
> So you'd call the above
> 
> val arg = "dog"
> if (x.isDefinedAt(arg)) {
>  x(arg)
> }
> 
> Br's,
> Marius
> 
> On Dec 27, 2:29 am, "Charles F. Munat"  > wrote:
>  > As a holiday gift to myself I am reading Programming in Scala
> from cover
>  > to cover. I've gotten as far as the pattern matching stuff and
> there's a
>  > discussion of partial functions. PiS says: "In general, you
> should try
>  > to work with complete functions whenever possible..."
>  >
>  > But I notice that the Lift code is filled with partial functions.
>  > They're all over the place.
>  >
>  > What is the benefit of using partial functions that outweighs the
>  > detriment of possible runtime errors? I'm trying to understand why
>  > partial functions might be useful.
>  >
>  > Thanks!
>  > Chas.
> 
> 
> 
> > 

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

2008-12-27 Thread David Pollak
To the extent that Lift and HAppS both take advantage of their respective
underlying languages, yes.

At the practical level, they bear very little resembelence to each other.
Lift sits on top of an ActiveRecord style ORM where HAppS has a monad-based
mechanism for mapping in and out of persistent store.  HAppS has no
templating (other than a jvm powered xslt translation layer), no ajax or
comet support, etc.

I think HAppS is a thing of beauty, but I haven't found ways of bringing
HAppS goodness into Lift.

On Dec 26, 2008 7:20 PM, "Stefan Scott"  wrote:


Is lift very similar to HAppS?


--~--~-~--~~~---~--~~
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: Partial functions

2008-12-27 Thread Kris Nuttycombe
As David has mentioned before on this list (and as I believe is mentioned in
the book as well) the concerns of a library designer and a library user are
somewhat different. Allowing the user of a library to provide a partial
function makes development using that library easier because the user
doesn't need to worry about potential match errors, or having to provide for
each possible case in a match; they can just define their partial function
over the values that they're interested in and rely upon the framework to do
the right thing if no match is available.

Internally, Lift will check isDefinedAt whenever a partial function is used;
this is an instance where the library designer takes on the responsibility
for providing correct handling in the undefined case, and leaves the user
free to handle whatever specific cases they wish. This gives maximum
flexibility to the users of the framework, and allows them to focus on the
problems they're trying to solve.

Kris

On Sat, Dec 27, 2008 at 1:18 AM, Marius  wrote:

>
> Personally I think Partial functions are great because you can chain
> them ... see orEse. The other nice thing is pattern matching on
> function arguments. For instance:
>
> val x: PartialFunction[String,String] = {
>  case "dog" => "bark"
> }
>
> this PF is defined only if the argument is "dog". For anything else
> isDefined function returns false.But whenever you want to call a PF
> you should first call the isDefinedAt. If in the example above we'd
> use a complete function calling it with something else then a dog
> you'll get a MatchError at runtime.
>
> So you'd call the above
>
> val arg = "dog"
> if (x.isDefinedAt(arg)) {
>  x(arg)
> }
>
> Br's,
> Marius
>
> On Dec 27, 2:29 am, "Charles F. Munat"  wrote:
> > As a holiday gift to myself I am reading Programming in Scala from cover
> > to cover. I've gotten as far as the pattern matching stuff and there's a
> > discussion of partial functions. PiS says: "In general, you should try
> > to work with complete functions whenever possible..."
> >
> > But I notice that the Lift code is filled with partial functions.
> > They're all over the place.
> >
> > What is the benefit of using partial functions that outweighs the
> > detriment of possible runtime errors? I'm trying to understand why
> > partial functions might be useful.
> >
> > Thanks!
> > Chas.
> >
>

--~--~-~--~~~---~--~~
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: Can liftweb support Chinese?

2008-12-27 Thread David Pollak
Lift supports and language as well as the JVM supports that language.

I suspect that you've saved the .html file in an encoding other than utf-8.
Lift assumes all xml files it loads are utf-8.  Scala's xml parser gets
confused sometimes if the file is saved with a different encoding.

If saving with utf-8 doesn't work, please post an entire project that
demonstates the problem and I'll fix it.

On Dec 27, 2008 5:20 AM, "OdinUshuaia"  wrote:


I'm a beginner of scala and liftweb. Because I am a Chinese, I want to
build a website with liftweb in Chinese.
So I follow the wiki of liftweb. But I found that even a static html
page, if there are Chinese character in it, it will handle an
exception.
Exception occured while processing /hello
Message: java.lang.OutOfMemoryError: Java heap space
   scala.StringBuilder$.scala$StringBuilder$$copyOf(StringBuilder.scala:
868)
   scala.StringBuilder.expandCapacity(StringBuilder.scala:113)
   scala.StringBuilder.append(StringBuilder.scala:365)
   scala.xml.parsing.MarkupParser$class.putChar(MarkupParser.scala:236)
   net.liftweb.util.PCDataXmlParser.putChar(PCDataMarkupParser.scala:77)
   scala.xml.parsing.MarkupParser$class.xText(MarkupParser.scala:761)
   net.liftweb.util.PCDataXmlParser.xText(PCDataMarkupParser.scala:77)
   scala.xml.parsing.MarkupParser$class.content(MarkupParser.scala:541)
   net.liftweb.util.PCDataXmlParser.content(PCDataMarkupParser.scala:77)
   scala.xml.parsing.MarkupParser$class.element1(MarkupParser.scala:682)
   net.liftweb.util.PCDataXmlParser.element1(PCDataMarkupParser.scala:
77)
   scala.xml.parsing.MarkupParser$class.content1(MarkupParser.scala:481)
   net.liftweb.util.PCDataXmlParser.content1(PCDataMarkupParser.scala:
77)
   scala.xml.parsing.MarkupParser$class.content(MarkupParser.scala:505)
   net.liftweb.util.PCDataXmlParser.content(PCDataMarkupParser.scala:77)
   scala.xml.parsing.MarkupParser$class.element1(MarkupParser.scala:682)
   net.liftweb.util.PCDataXmlParser.element1(PCDataMarkupParser.scala:
77)
   scala.xml.parsing.MarkupParser$class.content1(MarkupParser.scala:481)
   net.liftweb.util.PCDataXmlParser.content1(PCDataMarkupParser.scala:
77)
   scala.xml.parsing.MarkupParser$class.content(MarkupParser.scala:505)
   net.liftweb.util.PCDataXmlParser.content(PCDataMarkupParser.scala:77)
   scala.xml.parsing.MarkupParser$class.document(MarkupParser.scala:207)
   net.liftweb.util.PCDataXmlParser.document(PCDataMarkupParser.scala:
77)
   net.liftweb.util.PCDataXmlParser$.apply(PCDataMarkupParser.scala:88)
   net.liftweb.http.TemplateFinder$$anonfun$findAnyTemplate$1$$anonfun
$apply$44.apply(LiftSession.scala:766)
   net.liftweb.http.TemplateFinder$$anonfun$findAnyTemplate$1$$anonfun
$apply$44.apply(LiftSession.scala:766)
   net.liftweb.util.Full.flatMap(Can.scala:266)
   net.liftweb.http.TemplateFinder$$anonfun$findAnyTemplate$1.apply
(LiftSession.scala:766)
   net.liftweb.http.TemplateFinder$$anonfun$findAnyTemplate$1.apply
(LiftSession.scala:766)
   net.liftweb.util.Helpers$.first(Helpers.scala:167)
   net.liftweb.http.TemplateFinder$.findAnyTemplate(LiftSession.scala:
766)
   net.liftweb.http.LiftSession$$anonfun$net$liftweb$http$LiftSession$
$findVisibleTemplate$1.apply(LiftSession.scala:400)

So I wonder that if Liftweb do not support Chinese or any other Asian
language?
If Lift support, what should I do?


--~--~-~--~~~---~--~~
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] Can liftweb support Chinese?

2008-12-27 Thread OdinUshuaia

I'm a beginner of scala and liftweb. Because I am a Chinese, I want to
build a website with liftweb in Chinese.
So I follow the wiki of liftweb. But I found that even a static html
page, if there are Chinese character in it, it will handle an
exception.
Exception occured while processing /hello
Message: java.lang.OutOfMemoryError: Java heap space
scala.StringBuilder$.scala$StringBuilder$$copyOf(StringBuilder.scala:
868)
scala.StringBuilder.expandCapacity(StringBuilder.scala:113)
scala.StringBuilder.append(StringBuilder.scala:365)
scala.xml.parsing.MarkupParser$class.putChar(MarkupParser.scala:236)
net.liftweb.util.PCDataXmlParser.putChar(PCDataMarkupParser.scala:77)
scala.xml.parsing.MarkupParser$class.xText(MarkupParser.scala:761)
net.liftweb.util.PCDataXmlParser.xText(PCDataMarkupParser.scala:77)
scala.xml.parsing.MarkupParser$class.content(MarkupParser.scala:541)
net.liftweb.util.PCDataXmlParser.content(PCDataMarkupParser.scala:77)
scala.xml.parsing.MarkupParser$class.element1(MarkupParser.scala:682)
net.liftweb.util.PCDataXmlParser.element1(PCDataMarkupParser.scala:
77)
scala.xml.parsing.MarkupParser$class.content1(MarkupParser.scala:481)
net.liftweb.util.PCDataXmlParser.content1(PCDataMarkupParser.scala:
77)
scala.xml.parsing.MarkupParser$class.content(MarkupParser.scala:505)
net.liftweb.util.PCDataXmlParser.content(PCDataMarkupParser.scala:77)
scala.xml.parsing.MarkupParser$class.element1(MarkupParser.scala:682)
net.liftweb.util.PCDataXmlParser.element1(PCDataMarkupParser.scala:
77)
scala.xml.parsing.MarkupParser$class.content1(MarkupParser.scala:481)
net.liftweb.util.PCDataXmlParser.content1(PCDataMarkupParser.scala:
77)
scala.xml.parsing.MarkupParser$class.content(MarkupParser.scala:505)
net.liftweb.util.PCDataXmlParser.content(PCDataMarkupParser.scala:77)
scala.xml.parsing.MarkupParser$class.document(MarkupParser.scala:207)
net.liftweb.util.PCDataXmlParser.document(PCDataMarkupParser.scala:
77)
net.liftweb.util.PCDataXmlParser$.apply(PCDataMarkupParser.scala:88)
net.liftweb.http.TemplateFinder$$anonfun$findAnyTemplate$1$$anonfun
$apply$44.apply(LiftSession.scala:766)
net.liftweb.http.TemplateFinder$$anonfun$findAnyTemplate$1$$anonfun
$apply$44.apply(LiftSession.scala:766)
net.liftweb.util.Full.flatMap(Can.scala:266)
net.liftweb.http.TemplateFinder$$anonfun$findAnyTemplate$1.apply
(LiftSession.scala:766)
net.liftweb.http.TemplateFinder$$anonfun$findAnyTemplate$1.apply
(LiftSession.scala:766)
net.liftweb.util.Helpers$.first(Helpers.scala:167)
net.liftweb.http.TemplateFinder$.findAnyTemplate(LiftSession.scala:
766)
net.liftweb.http.LiftSession$$anonfun$net$liftweb$http$LiftSession$
$findVisibleTemplate$1.apply(LiftSession.scala:400)

So I wonder that if Liftweb do not support Chinese or any other Asian
language?
If Lift support, what should I do?

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

2008-12-27 Thread Marius

I don't see in what way. Lift runs in a J(2)EE web container (Jetty,
Tomcat ... you name it).

Br's,
Marius

On Dec 27, 5:17 am, Stefan Scott  wrote:
> Is lift very similar to HAppS?
--~--~-~--~~~---~--~~
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: Partial functions

2008-12-27 Thread Marius

Personally I think Partial functions are great because you can chain
them ... see orEse. The other nice thing is pattern matching on
function arguments. For instance:

val x: PartialFunction[String,String] = {
 case "dog" => "bark"
}

this PF is defined only if the argument is "dog". For anything else
isDefined function returns false.But whenever you want to call a PF
you should first call the isDefinedAt. If in the example above we'd
use a complete function calling it with something else then a dog
you'll get a MatchError at runtime.

So you'd call the above

val arg = "dog"
if (x.isDefinedAt(arg)) {
  x(arg)
}

Br's,
Marius

On Dec 27, 2:29 am, "Charles F. Munat"  wrote:
> As a holiday gift to myself I am reading Programming in Scala from cover
> to cover. I've gotten as far as the pattern matching stuff and there's a
> discussion of partial functions. PiS says: "In general, you should try
> to work with complete functions whenever possible..."
>
> But I notice that the Lift code is filled with partial functions.
> They're all over the place.
>
> What is the benefit of using partial functions that outweighs the
> detriment of possible runtime errors? I'm trying to understand why
> partial functions might be useful.
>
> Thanks!
> Chas.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---