Thanks for the link to that email thread, that helped me. My concerns were pretty much those expressed by Mike at the time. At the time, there was talk about eventually eliminating the old Tupfile format entirely. Is that still a goal?
My biggest concern with the lua parser is that it seems a very clumsy alternative to the run-script option. True, it can be a little clumsy generating strings, but writing a parser for an arbitrary language in lua seems much clumsier. And that is precisely what one often wants when writing rules: you want to know the inputs and outputs of a given build, which often can be determined by parsing an input file. True, you can write hokey regular expressions, but when those fail, I'd like to be able to do it right. As far as I can see from the lua parser docs, there is no way to achieve the functionality in run-script, since I see no way to run an external script. Is that an intentional limitation? The only advantage that I can see in the lua parser is that it is built in, so you don't require an external tool. But in most cases, one will use an external tool to build your code anyhow, so that seems a moderately weak advantage. David On Monday, November 3, 2014 8:19:36 PM UTC-8, Rendaw wrote: > > The documentation for the Lua API is here: > http://gittup.org/tup/lua_parser.html > http://gittup.org/tup/ex_lua_examples.html > > Lua, as a fully featured programming language, is more powerful than the > default Lua parser. > > If you feel the current syntax is expressive enough for your purposes, > there's no reason to use Lua. I've found it a great help abstracting > common behavior in my projects. > > The original discussion for the creation of the Lua parser can be found > here: > https://groups.google.com/forum/#!topic/tup-users/6Z-FjZNAFQg > > On 11/04/2014 12:08 PM, David Roundy wrote: > > I was wondering what the role of lua is in yup. So far I haven't touched > it, and it seems little documented, and I don't feel a need for scripting, > given that the "run" directive which lets me write rules in whatever > language I care for. > > > > Is there some specific (and ideally common) pattern that requires lua? > > > > One thing I like about tup so far, and I'm still new to it, is that it > seems pretty language agnostic, and without lua it's pretty easy to > understand. So why lua? > > > > > > David > > > > -- -- tup-users mailing list email: [email protected] unsubscribe: [email protected] options: http://groups.google.com/group/tup-users?hl=en --- You received this message because you are subscribed to the Google Groups "tup-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
