[Lift] Re: Documentation Site
Well, this is an apt discussion at this point in time I feel. One of the weakness of the Lift Project is really the sparse documentation, as well as the rapid cycle of development obsoleting virtually many of the slightly older code out there. I don't mind contributing my time improving the documentation. Perhaps one of the reasons why people don't contribute back is that the wiki is not very prominent, for one reason or another. It's just rarely referenced anywhere else most of the time. Would appreciate a more concentrated effort on this. I haven't actually seen the lift 1.1 scala docs. For example, http://www.scala-tools.org/mvnsites-snapshots/liftweb/lift-base/lift-common/scaladocs/index.html points to a blank page - that's for Lift common. I mostly rely on the IDE(idea) to open up declarations via maven.. not exactly the best method since the source code is more often than not not commented. The lift framework is pretty massive, I think that's the reason why it's difficult to write comprehensive documentation for it. I'm just wondering what is a good way to go about doing that? A list of how-tos plus in depth discussion about each part of the framework i.e. base, or common, or? Perhaps there can be one page for every logical object in Lift. regards, CH On Dec 21, 6:12 am, Timothy Perrett wrote: > I really don't think thats the issue - Lift is not "closed to committing"... > if that were the case, David would never have recruited us onto the team ;-) > > 95% of all OSS projects i've ever come across have the same policy when it > comes to wikis etc... they are organic, community driven beasts. For > instance, I was no aware that you had written any articles... but that is > great. You say you want them fleshed out? In what way / what information do > you need. > > Writing documentation is actually a great way to understand something because > it means you have to fully grok it in order to teach others - we need to > solve the documentation issue for sure, and any contribution you or others > have is very much welcome. > > Cheers, Tim > > On 20 Dec 2009, at 21:43, Randinn wrote: > > > > > To give the benefit of doubt to people who use Lift knowing that is > > closed to commiting they may think the same about the documentation. I > > have added a bit but I've more thrown up a few pages and figured > > someone with more knowledge would flesh them out. > > > On Dec 20, 8:47 pm, Timothy Perrett wrote: > >> 1.0 is the last official release that was not a milestone or snapshot > >> - thus, they are the primary api docs right now until we release 2.0 > >> (that is, what was being called 1.1 is being renamed to 2.0). API docs > >> are a process issue, and handled as part of our build process - they > >> will always live both on scala-tools and liftweb.net where applicable. > >> They wont ever sit anywhere else (officially). > > >> Yes, the wiki is a little out dated. I forget the number of times i've > >> tried to spear head a wiki effort... the bottom line is that other > >> people need to start writing content - there are a fair number of > >> competent lift users in the community who simply are not giving > >> anything back by way of articles or wiki cleaning - thus our docs get > >> out dated fast because the team prefer to write code than > >> documentation. We even tried to appointed a wiki gardener but he > >> appears to have just disappeared into the ether... Id be open to > >> hearing suggestions on how one could keep the wiki more up to date? > >> Short of users actually contributing back, there is a limit on what > >> the team can do at anyone time. We are getting there, but its not > >> going to be an overnight process. > > >> Blogs - a fundamental corner stone of the internet and your right, > >> they are a great information repository. Perhaps we could syndicate > >> some blogs onto liftweb.net during the rewrite (yes, im going to > >> rewrite it at last!)... certainly open for that. > > >> Cheers, Tim > > >> PS: Sorry that was a bit of a rant, but this is a frustrating issue > >> that i've been pushing for over a year ;-) > > >> On Dec 19, 1:16 pm, Hannes wrote: > > >>> Definitely! I would like one location for everything, but I believe that > >>> the current situation is not like that. > > >>> - there two API docs 1.0 and 1.1, the latter is hard to find > >>> - there's liftweb.net (a little bit out-dated) > >>> - there's the Wiki > >>> - there's David's Blog (that has some unique information) > > >>> What did I forget? > > >>> thanks. > > Why not improve the existing wiki on github? > > Or fork the book and make improvements that way? > > I'm not opposed to additional resources, but why create another place > where docs may or not be out of date? > > I think that Lift is still at the point where one location of docs is > better. > > My opinion. > > On Dec 19, 6:37 am, Hannes wrote: > > > Hi Lifters, > > > I'm thinking about setting
[Lift] Re: Understanding SessionVars and Objects
Thanks for the explanation! > SessionVars are kind of like thread local variables. They have an internal > "name" (which is guaranteed to be unique and is maintained by Lift) which is > used to check in a dictionary the session keeps around with the values of > each SessionVar for the current session. > > When you access a SessionVar with myVar.is (or myVar.get, or using the > implicit) under the covers it obtains the current session from a thread local > variable in S (I believe, maybe it's in LiftSession) and then looks for the > value for the variable in the current session. If not found, it executes the > initializer to pick an initial value. > > Similarly, when you set a SessionVar with myVar.set the same kind of thing > happens except it stores the value you give it in the session. > > So, the singleton within a singleton is essentially only keeping that unique > name you don't need to know about. > Is the object found via reflection? It's really interesting to me actually I'd like to know how it really works under the cover. Another small-ish question that I wanted to ask.. my textareas are swallowing up html tags (actually converting them to >) somewhere between clicking the save button and displaying them. Is there any part of the code that does the escaping? I'm trying to look for it.. The scaladocs seem to be blank. Is there some sort of bug in the build process? Thanks -- You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
[Lift] Understanding SessionVars and Objects
Hi, I'm trying to understand the implementation of MetaMegaProtoUser, reading the code, there are a couple of conceptual questions that I'd like to ask. I understand object as a singleton class, or perhaps vaguely similar to a static class (as in Java) so I'm wondering why is, in the MetaMegaProtoUser trait, the curUserId an object. In the sense, perhaps I can imagine an object inside an object is simple a singleton within a singleton, but the confusion kinda arises when it extends SessionVar. From my understanding of the functionality of SessionVars, it actually keeps the user logged in across sessions. So, I'm trying to understand how does a singleton in a singleton keeps the log in information safe? If I have multiple users on the site at the same time, why is the value not overwritten? I suspect this is related to the deficiency in my knowledge in how sessions are actually implemented, but please bear with me.. So, I look at the loggedIn_? method that is constantly called on the User object, it actually looks at currentUserId.isDefined, so I assume that the currentUserId, once set via the login method will persist throughout the session. How is that achieved? Is there a method at the beginning of lift's lifecycle that sets this variable via looking at the session information? Lastly, I'd like to ask where is the remove() method defined on the curUserId private object? I've looked at the implementation of SessionVar and AnyVar and I couldn't seem to find it. I'm hacking on a small-ish project and it's been a fun and frustrating journey so far. Love the framework, it makes doing things very flexible and easy, but the flexibility of the language is kinda daunting.. sometimes it really makes my brain hurt. But will try harder! regards, CH -- You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
[Lift] Re: Missing source files in 1.1-SNAPSHOT
FWIW, I'm seeing the same thing. Unfortunately. I'm downloading the source on another folder and cross referencing as I need. Thanks. regards, CH On Nov 19, 5:29 am, glenn wrote: > You can either use debugging facilities in Eclipse or, as I mostly > do, > sprinkle a lot of println or Log.info statements around. But coding it > right in the first place requires access to Lift source code, and for > that I use maven's facility for downloading source jars from the pom. > If the source jar isn't complete, or isn't in the maven repository, > I'm > out of luck. > > Glenn > > On Nov 18, 1:19 pm, Jeppe Nejsum Madsen wrote: > > > > > Kris Nuttycombe writes: > > > On Wed, Nov 18, 2009 at 1:51 PM, Jeppe Nejsum Madsen > > > wrote: > > >> Kris Nuttycombe writes: > > > >>> On Wed, Nov 18, 2009 at 12:31 PM, glenn wrote: > > Kris, > > > Don't want to clone the GitHub repo, as I need a Maven repo. > > > Glenn > > > >>> Out of curiosity, is this because you have a Maven tool that helps > > >>> automate interaction with a debugger? If so I'd be interested in > > >>> learning about it - I've got a Lift bug I'm looking at now that would > > >>> probably benefit from using an actual debugger on. > > > >> If you use Eclipse, it can automatically get the sourc files from the > > >> sources jar. "Open Type" -> Select e.g. Box -> You get the Box.scala > > >> file. It is readonly though, so you can't easily try a quick hack > > > >> /Jeppe > > > > Eclipse required? println debugging it is then! > > > Yeah, 2.7.x is not that great. I'm really looking forward to 2.8, keep > > hearing lots of good stuff. But first we need Lift to work on 2.8 :-) > > > /Jeppe -- You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=.
[Lift] Re: regarding maven archetype:generate
Ah, I wonder why I didn't see that in the maven docs. Thank you! On Nov 16, 2:01 am, Indrajit Raychaudhuri wrote: > Add -DarchetypeRepository=http://scala-tools.org/repo-snapshots > > That means, modify the command as thus: > > mvn archetype:generate -U -DarchetypeGroupId=net.liftweb > -DarchetypeArtifactId=lift-archetype-blank > -DarchetypeVersion=1.1-SNAPSHOT > -DarchetypeRepository=http://scala-tools.org/repo-snapshots > -DremoteRepositories=http://scala-tools.org/repo-snapshots > -DgroupId=demo.helloworld -DartifactId=helloworld -Dversion=1.0-SNAPSHOT > > Cheers, Indrajit > > On 15/11/09 10:50 PM, johncch wrote: > > > > > > > Dear all, > > > I'm trying to create a 1.1-SNAPSHOT project but I keep failing. I'm > > not sure what's happening so I'd really appreciate it if someone can > > point out my fault. > > > This is the exact command I type: > > > mvn archetype:generate -U -DarchetypeGroupId=net.liftweb - > > DarchetypeArtifactId=lift-archetype-blank -DarchetypeVersion=1.1- > > SNAPSHOT -DremoteRepositories=http://scala-tools.org/repo-snapshots- > > DgroupId=demo.helloworld -DartifactId=helloworld -Dversion=1.0- > > SNAPSHOT > > > This is the command line response > > > [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 u > > dates 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.plexu > > .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 {execution: default-cli}] > > [INFO] Generating project in Interactive mode > > [INFO] Archetype repository missing. Using the one from > > [net.liftweb:lift-arche > > ype-blank:RELEASE -> http://scala-tools.org/repo-releases] found in > > catalog int > > rnal > > [INFO] snapshot net.liftweb:lift-archetype-blank:1.1-SNAPSHOT: > > checking for upd > > tes from lift-archetype-blank-repo > > Downloading:http://scala-tools.org/repo-releases/net/liftweb/lift-archetype-bl > > nk/1.1-SNAPSHOT/lift-archetype-blank-1.1-SNAPSHOT.jar > > [INFO] Unable to find resource 'net.liftweb:lift-archetype-blank:jar: > > 1.1-SNAPSH > > T' in repository lift-archetype-blank-repo (http://scala-tools.org/ > > repo-release > > ) > > [INFO] > > > > [ERROR] BUILD FAILURE > > [INFO] > > > > [INFO] The desired archetype does not exist (net.liftweb:lift- > > archetype-blank:1 > > 1-SNAPSHOT) > > [INFO] > > > > [INFO] For more information, run Maven with the -e switch > > [INFO] > > > > [INFO] Total time: 8 seconds > > [INFO] Finished at: Mon Nov 16 01:15:43 SGT 2009 > > [INFO] Final Memory: 8M/14M > > [INFO] > > > > > which I'm quite curious why is the case. Why does it always default to > > repo-releases on the scala-tools.org website even when I specify the > > remote-repositories? > > > Sorry for the noob question. Thanks! --~--~-~--~~~---~--~~ 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] regarding maven archetype:generate
Dear all, I'm trying to create a 1.1-SNAPSHOT project but I keep failing. I'm not sure what's happening so I'd really appreciate it if someone can point out my fault. This is the exact command I type: mvn archetype:generate -U -DarchetypeGroupId=net.liftweb - DarchetypeArtifactId=lift-archetype-blank -DarchetypeVersion=1.1- SNAPSHOT -DremoteRepositories=http://scala-tools.org/repo-snapshots - DgroupId=demo.helloworld -DartifactId=helloworld -Dversion=1.0- SNAPSHOT This is the command line response [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 u dates 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.plexu .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 {execution: default-cli}] [INFO] Generating project in Interactive mode [INFO] Archetype repository missing. Using the one from [net.liftweb:lift-arche ype-blank:RELEASE -> http://scala-tools.org/repo-releases] found in catalog int rnal [INFO] snapshot net.liftweb:lift-archetype-blank:1.1-SNAPSHOT: checking for upd tes from lift-archetype-blank-repo Downloading: http://scala-tools.org/repo-releases/net/liftweb/lift-archetype-bl nk/1.1-SNAPSHOT/lift-archetype-blank-1.1-SNAPSHOT.jar [INFO] Unable to find resource 'net.liftweb:lift-archetype-blank:jar: 1.1-SNAPSH T' in repository lift-archetype-blank-repo (http://scala-tools.org/ repo-release ) [INFO] [ERROR] BUILD FAILURE [INFO] [INFO] The desired archetype does not exist (net.liftweb:lift- archetype-blank:1 1-SNAPSHOT) [INFO] [INFO] For more information, run Maven with the -e switch [INFO] [INFO] Total time: 8 seconds [INFO] Finished at: Mon Nov 16 01:15:43 SGT 2009 [INFO] Final Memory: 8M/14M [INFO] which I'm quite curious why is the case. Why does it always default to repo-releases on the scala-tools.org website even when I specify the remote-repositories? Sorry for the noob question. Thanks! --~--~-~--~~~---~--~~ 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: A Critique On Lift
I know this is not the programming languages weblog but I'll still like to chip in a bit.. I love Scala. I know it's confusing, sometimes (more often than not) it makes my head hurts. But the language itself is so expressive. I think it's kinda, well, maybe I'm machoistic, but there's often instances when I run through a hard to understand Scala code and it just struck me how concise the language is. I'm a relatively n00b programmer, probably 5 to 7 years coding and most of them dealing with c, php and all sorts of c spawn in various shallow degree, and at my work I deal with Java, JavaScript and ActionScript. For me, the first impression of Scala is that it far exceeds the awesomeness of JS coding. I think JavaScript is really a very nice scripting language, but there are certain quirks that makes it feel inadequate at times. But Scala eliminates them, and adds in static typing, which is like awesome. And well, far too many underscores. I think a good mature language is poetic, which I find Scala kinda do fit this criteria. When you read through a difficult routine you think "wow, this is clever", instead of times when I read C code and go like "wow, this is tedious" because a big portion of code ends up dealing with lower level problems. I know it's not comparable because the compiler abstracts out stuff, but speaking on a pure philosophical level, I just like it how the language allows you to do clever things. Unlike Java *sigh*. As for lift, I find some things very interesting, and mainly there is a big shift from the traditional php based or Java based frameworks (I worked on Drupal before, while not exactly the same stuff, but). I get the crux of it already, and am moving along and reading code as I go along. The use of snippets as opposed to a monolithic C layer struck me as odd, and xml spewing in snippets does feel a little wrong (oh the darn mvc brainwashing). But overall I like what I see and hope to do something useful with it. Will comment as I move in more. Thanks for the good job guys. I think it's Scala and Lift at this point of time that keeps my computing life exciting. Keep up the good work. regards, CH On Oct 23, 6:06 am, Ross Mellgren wrote: > Personally I think that Python is great for small simple things, but > as soon as you start to scale the lack of statically checked > guarantees starts to bite you. The larger and larger you get the more > often and more subtle the bites get. Conversely, with a rigorous > statically checked language, you can start to use the static checking > in your favor. And, the more you understand the nuances of the type > system the more and more you can form it to give you even stronger and > stronger guarantees. > > Anecdotally, Haskell (which is perhaps one of the most advanced > functional programming languages on the planet, particularly in the > type system department) has regular reports in the mailing list from > newbies that usually go from "wtf" to "whenever I get the compiler to > accept my program, it usually just works" in a fairly short time. > > The syntax of Scala is an interesting and convoluted beast straddling > an unusual line between more typical functional programming languages > (Haskell, O'Caml, etc) and Java, and overall I think it ends up doing > a fairly good job, though it does have its confusing parts. > > The ability to define operators in particular is a very tricky > subject. I find, along with implicits, that I treat it as a power tool > that should only be used in cases where it really makes quite alot of > sense (used extremely frequently, coming from math concepts, etc). > Luckily, it is fairly easy to find out where operators are coming from > -- if it looks like an operator, then check to see if it has a : > (colon), if it does, the thing on the right is where the operator is > defined, so look in its doc. Otherwise, it's the thing on the left > that has the operator, so look there. > > If neither place has the operator, then unfortunately you've just > strayed into implicit conversion territory, which is unfortunately > tricky to track down in many cases. Sometimes in that situation the > scala REPL will help, because it prints out the types of expressions. > > Coming from a background of knowing Java and Haskell (along with > Python and many other languages, not apropos to this discussion) I > found the syntax of Scala to initially be inscrutable but I warmed to > it after a month or two and now I think it's pretty good. > > Regarding () and {} BTW, you can replace a single-argument argument > list with {}, e.g. > > def myFunction(a: String): Unit = println(a) > > myFunction("foobar") > myFunction { "foobar" } > > The two calls are equivalent. It makes more sense with the latter > format with multiple argument lists or DSL-like things. I could write > up an example if you're interested, but it might be somewhat involved > if you're not familiar wi
[Lift] Re: Scala and Eclipse
> We have a large multi-module project that includes scala in a few key > artifacts and things are going somewhat smoothly. However, I think most of > the devs are bailing out of eclipse for intellij. I just downloaded IntelliJ IDEA CE with the scala plugin and it's really very nice. I think the usability of this IDE for scala is kilometres ahead Eclipse. Am able to get the whole Lift into the IDE and it indexes it nicely so I think if I need reference back to the source it'll be easier this way. Thanks for the recommendation. Might be switching for good. regards, CH --~--~-~--~~~---~--~~ 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 and Eclipse
I'm trying to get Lift to show up in Eclipse 3.5 (sorry for the yet another eclipse + lift thread) and it's giving me alot of problems. I'd just like to know if anyone else have been seeing the same problems? I looked through the group but I didn't see similar things. Basically I'm setting up like this: eclipse 3.5 scala plugin 2.7.6/2.7.7.rc1 Windows Vista X64 business JRE1.6_u10 For some reason when I do mvn eclipse:eclipse on the command line and later import it into eclipse, I get tons of exceptions. And it's different sorts of exception for different files which leaves me baffled. I manage to import lift and lift-mapper projects fine, but earlier today when I tried importing in lift-hello lift I'm getting editor shutdowns and what nots. Let's look at a few. 1: Unable to create editor ID scala.tools.eclipse.Editor: An unexpected exception was thrown. java.lang.NullPointerException at scala.tools.eclipse.ScalaPlugin$ProjectImpl$class.projectFor (ScalaPlugin.scala:210) at scala.tools.eclipse.Driver$Project.projectFor(Driver.scala:16) at scala.tools.eclipse.Compiler$class.computeDepends(Compiler.scala: 83) at scala.tools.eclipse.ScalaPlugin$ProjectImpl $compiler0$.computeDepends(ScalaPlugi... 2: Unhandled event loop exception scala.tools.nsc.symtab.Symbols$CyclicReference: illegal cyclic reference involving package at scala.tools.nsc.symtab.Symbols$Symbol$$anonfun$info$1.apply (Symbols.scala:550) at scala.tools.nsc.symtab.Symbols$Symbol$$anonfun$info$1.apply (Symbols.scala:548) at scala.tools.nsc.symtab.Symbols$Symbol.lock(Symbols.scala:208) at scala.tools.nsc.symtab.Symbols$Symbol.info(Symbols.scala:548) at scala.tools.nsc.typechecker.Contexts$class.$init$(Contexts.scala: 32).. Basically something like this. I tried downloading another copy of eclipse and running through both scala plugins give me the same problem. I just like reading code through eclipse because it makes the folder like package system more navigable. I just like to ask is it the same for you people or is it just me? Would appreciate any pointers. Thanks! --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---