[Lift] Re: This is the official support channel for Lift

2009-07-10 Thread Spencer Uresk
   - GitHub... don't message me on GitHub.  None of the Lift committer will    pull from your repository.  The Lift IP is clean which means that unless you    are a committer and you have written the code yourself, it doesn't get into    Lift.  This allows businesses to use Lift knowing

[Lift] Re: Background jobs

2009-07-10 Thread DFectuoso
On Jul 9, 5:27 pm, Vlad Seryakov vserya...@gmail.com wrote: I am building Web application using Lift (my first one) which is the port of existing Tcl/Aolserver based application. In the existing one i have two parts: Web and backend. Backedn part consists of jobs running in the background

[Lift] Re: Code Review for Unique Key Constraints

2009-07-10 Thread DFectuoso
I for one would like to say: Cool! Thanks! If i need unique indexes in the next couple of weeks i'll get this baby to the war( .war thats it ) =) On Jul 9, 11:30 am, Calen Pennington calen.penning...@gmail.com wrote: As mentioned is this issue (http://github.com/dpp/liftweb/issues#issue/19),

[Lift] Actor and clusters?

2009-07-10 Thread DFectuoso
I'm hosting some experiments on Stax and right now im pondering over the idea of checking out how to have a database backed session so the SessionVars work in a cluster of 5 boxes; With that in mind, have anyone worked with actors and clustering? Is there some documentation around that? should it

[Lift] Re: Actor and clusters?

2009-07-10 Thread marius d.
Actors are local to the JVM. Scala also has RemoteActors but we don't really use them. For a lift app in a cluster environment we have to have sticky sessions concept and the reason is that functions bound to a session and mostly the references they are holding are not serialized distributed. So

[Lift] Re: Typesafe JSON builder?

2009-07-10 Thread DFectuoso
I've read some stuff about Jorge Ortiz's Json Parser and how its super type safe, i guess you could use that same logic to create your builder (and I would not be surprised if theres something like that laying around in Lift). I hope if there is, someone will point you in the right direction, all

[Lift] Re: Typesafe JSON builder?

2009-07-10 Thread marius d.
Please take a look on JsObj. But what is your exact use case? ... generate JSON constructs from Scala and send then to browser? Br's, Marius On Jul 9, 8:35 pm, Jeppe Nejsum Madsen je...@ingolfs.dk wrote: Hi, Has anyone made a typesafe JSON builder? Many Javascript libraries provides

[Lift] Re: Actor and clusters?

2009-07-10 Thread DFectuoso
Thanks, that was very useful, to enable sticky variables i would do something like (explain here http://wiki.stax.net/w/index.php/Application_Clustering ) that? So bottom line? An actor can send a message an actor that is living in another JVM using sticky variables(or anything else) (sorry i

[Lift] Re: Actor and clusters?

2009-07-10 Thread marius d.
On Jul 10, 10:40 am, DFectuoso santiago1...@gmail.com wrote: Thanks, that was very useful, to enable sticky variables i would do something like (explain herehttp://wiki.stax.net/w/index.php/Application_Clustering ) that? So bottom line? An actor can send a message an actor that is living

[Lift] Re: Background jobs

2009-07-10 Thread Timothy Perrett
You dont mention the kind of backend process you want to talk to, but you may well be interested in this post I wrote about lift-amqp: http://is.gd/CkPX Included is a neat example of how you can get inter-process communication using middleware messaging and it explains in fair detail the AMQP

[Lift] Re: Actor and clusters?

2009-07-10 Thread DFectuoso
Cool, thanks, this pretty much solves the question =) On Jul 10, 12:54 am, marius d. marius.dan...@gmail.com wrote: On Jul 10, 10:40 am, DFectuoso santiago1...@gmail.com wrote: Thanks, that was very useful, to enable sticky variables i would do something like (explain

[Lift] Speeding load time; liftAjax.js and other javascript minified?

2009-07-10 Thread DFectuoso
I dont know how liftAjax.js is generated, or if it changes or not, also I have no idea (if it regenerated) how it could be minified, and I know that minification seem like a micro-optimization but... With just GZipping and Javascript minification working together, the load time dropped from 16

[Lift] Re: Speeding load time; liftAjax.js and other javascript minified?

2009-07-10 Thread marius d.
liftAjax is dynamically generated and it does not represent static content. Please see ScriptRenderer.scala. However is is a pretty small script so I'm not sure how much we'll actually fain by minifying it. Can you run a benchmark? Take from the browser the generated script, minify it and the

[Lift] Re: Speeding load time; liftAjax.js and other javascript minified?

2009-07-10 Thread Timothy Perrett
Hey, liftAjax.js is not regenerated dynamically as far as im aware... By default, lift ships with the maven plugin for YUI compressor, so that should minify the CSS/JS in your webapp dir. Perhaps we should try and minify liftAjax.js during the build of lift... marius is probally the best man

[Lift] Re: Speeding load time; liftAjax.js and other javascript minified?

2009-07-10 Thread marius d.
Tim, sorry but I have to say that liftAjax.js IS generated dynamically as I stated above :). It is not a script sitting somewhere but it ultimately comes from ScriptRenderer.scala Br's, Marius On Jul 10, 11:26 am, Timothy Perrett timo...@getintheloop.eu wrote: Hey, liftAjax.js is not

[Lift] Re: NPE Problem with User.current in CRUDify action

2009-07-10 Thread Jeppe Nejsum Madsen
On Thu, Jul 9, 2009 at 11:44 PM, David Pollakfeeder.of.the.be...@gmail.com wrote: If it's still a problem, a reproducible example would be great! It's not a showstopper, since I can workaround it by reading the User again: def findMap[T](f: CustomCategory = Box[T]) : List[T] = {

[Lift] Re: Typesafe JSON builder?

2009-07-10 Thread Jeppe Nejsum Madsen
marius d. marius.dan...@gmail.com writes: Please take a look on JsObj. That's what I'm using now and it's a pain: def generateOptions = JsObj( (title, My title), (series, JsArray(JsObj((Label,MyLabel, (seriesColors, JsArray(#00,#cc)), (axes, JsObj(

[Lift] Re: Typesafe JSON builder?

2009-07-10 Thread Timothy Perrett
Perhaps consider this other scala JSON lib: http://github.com/jonifreeman/literaljson/tree/master NB: I've not used this, im just adding it for discussion as it might help you. Cheers, Tim On Jul 10, 9:44 am, Jeppe Nejsum Madsen je...@ingolfs.dk wrote: marius d. marius.dan...@gmail.com

[Lift] Re: Speeding load time; liftAjax.js and other javascript minified?

2009-07-10 Thread Jeppe Nejsum Madsen
DFectuoso santiago1...@gmail.com writes: I dont know how liftAjax.js is generated, or if it changes or not, also I have no idea (if it regenerated) how it could be minified, and I know that minification seem like a micro-optimization but... [...] So, analyzing a couple of lift apps with

[Lift] Re: Speeding load time; liftAjax.js and other javascript minified?

2009-07-10 Thread DFectuoso
Ok, i got my tools ready; but I am too tired so i'll run them tomorrow... Right now i did 2 different minifications on dfectuoso.com/liftAjax/ test1.html and test2.html in test.html its the liftAjax file we all use... so, im probably going to run a couple hundred hits on each one and see if

[Lift] Re: Speeding load time; liftAjax.js and other javascript minified?

2009-07-10 Thread DFectuoso
I kinda knew that coz i did a very fast search for a file called liftAjax.js... just wanted to be sure! And now I am... Why don't you guys let me run some benchmarks before actually investing some time on this? (but keep talking about this subject tho, nothing bad can come from exploring how to

[Lift] Re: Anyone tried to use Velocity with scala/lift?

2009-07-10 Thread Ewan
Thanks. I found that myself along with scala-javautils in github by Jorge Ortiz which helps out with the converting from Scala collections to Java ones. The @BeanProperty annotation works fine for val and vars but is not helpful if your passing around mapper instances where the attribs/ props

[Lift] Re: howto do simple calculation with MappedInt

2009-07-10 Thread Hannes
Dave, This helped me a lot to understand things better! thanks. Sorry it took so long to get to this... my inbox keeps growing... sigh. Anyway, Order.scala: 64 should be: def currentCost = Order.this.lots * (Order.this.marketPlace.obj.map(_.lotValue.is) openOr 0 ) The marketplace

[Lift] Re: Background jobs

2009-07-10 Thread David Pollak
On Thu, Jul 9, 2009 at 5:27 PM, Vlad Seryakov vserya...@gmail.com wrote: I am building Web application using Lift (my first one) which is the port of existing Tcl/Aolserver based application. In the existing one i have two parts: Web and backend. Backedn part consists of jobs running in the

[Lift] Re: Typesafe JSON builder?

2009-07-10 Thread David Pollak
On Fri, Jul 10, 2009 at 1:44 AM, Jeppe Nejsum Madsen je...@ingolfs.dkwrote: marius d. marius.dan...@gmail.com writes: Please take a look on JsObj. That's what I'm using now and it's a pain: def generateOptions = JsObj( (title, My title), (series,

[Lift] Re: Background jobs

2009-07-10 Thread Naftoli Gugenhem
I think paulp has a scala.xml that doesn't require loading everything into memory at once. He once demonstrated it on the scala list. I think it's for 2.8. I'm not sure how you load but I think you process it with the regular scala pattern matching and XPath. Either look in the 2.8 sources or

[Lift] Re: Typesafe JSON builder?

2009-07-10 Thread marius d.
On Jul 10, 6:32 pm, David Pollak feeder.of.the.be...@gmail.com wrote: On Fri, Jul 10, 2009 at 1:44 AM, Jeppe Nejsum Madsen je...@ingolfs.dkwrote: marius d. marius.dan...@gmail.com writes: Please take a look on JsObj. That's what I'm using now and it's a pain: def

[Lift] Re: Actor and clusters?

2009-07-10 Thread DFectuoso
Refering to why i want to know this: Im using stax because it's free, they are pretty cool and lift/scala worked out of the box pretty fast(i was having some issues getting some hosting for whatever i do in my free time with lift/scala). They have a cluster option right now(still, free) so, they

[Lift] Update on book

2009-07-10 Thread Derek Chen-Becker
Just a quick note: thanks to some work by retnuH on a fix script, I was able to (hopefully) get rid of all of the missing quotes in the master.pdf version of the book. There has been a lot of confusion due to this bug in LyX, so this should make things at least a little more clear. If you're

[Lift] Re: NPE Problem with User.current in CRUDify action

2009-07-10 Thread David Pollak
On Fri, Jul 10, 2009 at 9:28 AM, Jeppe Nejsum Madsen je...@ingolfs.dkwrote: On Fri, Jul 10, 2009 at 10:35 AM, Jeppe Nejsum Madsenje...@ingolfs.dk wrote: On Thu, Jul 9, 2009 at 11:44 PM, David Pollakfeeder.of.the.be...@gmail.com wrote: If it's still a problem, a reproducible example

[Lift] Re: JPA, Hibernate, c3p0

2009-07-10 Thread Ryan Donahue
The shutdown method works. Thanks. On Jul 9, 5:16 pm, Ryan Donahue donahu...@gmail.com wrote: Thanks, I'll try it tomorrow and let you know. On Thu, Jul 9, 2009 at 5:14 PM, Derek Chen-Beckerdchenbec...@gmail.com wrote: Whoops. Forgot about this one. I just pushed a fix in scalajpa

[Lift] Re: NPE Problem with User.current in CRUDify action

2009-07-10 Thread David Pollak
Okay... I just checked in a change to Lift that allows RequestVars to be reset once the session is known. Please do a build with the latest (if you're not building locally, please wait until Hudson finishes spinning the build) and let me know if it works. Thanks, David On Fri, Jul 10, 2009 at

[Lift] Re: Update on book

2009-07-10 Thread Peter Robinett
Hi Derek, Just a quick note on the book because I'm going over it right now: the code in Listing 13.3 (p. 210) seems to be missing a parenthesis after expense in the case that matches to PUT requests. Peter On Jul 10, 9:32 am, Derek Chen-Becker dchenbec...@gmail.com wrote: Just a quick note:

[Lift] Empty boxes and global error handler?

2009-07-10 Thread Jeppe Nejsum Madsen
Hi, I understand (I think :-) the use of Option/Box to avoid the common NPE. Also that map/for gives a nice way to conditionally do stuff with something that can be Empty. But sometimes the Box just have to be full and if it isn't, this is a logic error that is better handled than silently

[Lift] Re: Empty boxes and global error handler?

2009-07-10 Thread David Pollak
On Fri, Jul 10, 2009 at 1:39 PM, marius d. marius.dan...@gmail.com wrote: On Jul 10, 11:11 pm, Jeppe Nejsum Madsen je...@ingolfs.dk wrote: Hi, I understand (I think :-) the use of Option/Box to avoid the common NPE. Also that map/for gives a nice way to conditionally do stuff with