Bi-directional transformations

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Bi-directional transformations

Nathan Angelacos
Hi list,

Has anyone implemented something like boomerang
(http://alliance.seas.upenn.edu/~harmony/) in lua?

alternatively, is anyone already working on or have bindings for augeas
(http://www.augeas.net)

Thanks!
Reply | Threaded
Open this post in threaded view
|

Re: Bi-directional transformations

Javier Guerra Giraldez
On Fri, Feb 12, 2010 at 2:15 PM, Nathan Angelacos <[hidden email]> wrote:
> Has anyone implemented something like boomerang
> (http://alliance.seas.upenn.edu/~harmony/) in lua?

interesting.  maybe i'll check just to see how they manage
thermodynamic limitations of reversibility.


> alternatively, is anyone already working on or have bindings for augeas
> (http://www.augeas.net)

did you know that Lua itself evolved from a configuration language?
(and it's still quite appropriate on that role)


--
Javier
Reply | Threaded
Open this post in threaded view
|

Re: Bi-directional transformations

Nathan Angelacos
Javier Guerra wrote:

> On Fri, Feb 12, 2010 at 2:15 PM, Nathan Angelacos <[hidden email]> wrote:
>> Has anyone implemented something like boomerang
>> (http://alliance.seas.upenn.edu/~harmony/) in lua?
>
> interesting.  maybe i'll check just to see how they manage
> thermodynamic limitations of reversibility.
>
>
>> alternatively, is anyone already working on or have bindings for augeas
>> (http://www.augeas.net)
>
> did you know that Lua itself evolved from a configuration language?
> (and it's still quite appropriate on that role)
>
Yup - been lurking here for a while.

http://www.mail-archive.com/leaf-devel@.../msg05510.html

The target is to have some regex parser turn a config file into a tree
(in my case, json would be preferred), and back again.

And yes, our discussion has been along the lines of "do we integrate
something, or just roll it ourselves with lua"   No problems going down
the road of writing such a beast, but if someone else has done 90% of
the work already, I'm pretty lazy.

And, if you have other pointers, then that's appreciated too.






Reply | Threaded
Open this post in threaded view
|

Re: Bi-directional transformations

spir
On Fri, 12 Feb 2010 14:11:06 -0800
Nathan Angelacos <[hidden email]> wrote:

> The target is to have some regex parser turn a config file into a tree
> (in my case, json would be preferred), and back again.

May I ask why you don't use Lua itself as config language?

Denis
________________________________

la vita e estrany

http://spir.wikidot.com/
Reply | Threaded
Open this post in threaded view
|

Re: Bi-directional transformations

Nathan Angelacos
Hi,

spir wrote:
> On Fri, 12 Feb 2010 14:11:06 -0800
> Nathan Angelacos <[hidden email]> wrote:
>
>> The target is to have some regex parser turn a config file into a tree
>> (in my case, json would be preferred), and back again.
>
> May I ask why you don't use Lua itself as config language?
>
Good question.
I want to  parse config files from /etc,  for example,
        /etc/network/interfaces
        /etc/dnsmasq.conf
        /etc/resolv.conf
        /etc/modules
        /etc/ssh/sshd_config
I have no control over the format, and there are plenty of different
formats.  I then want to process the parsed tree with Lua.

The easiest way out of that problem is appears to be:

A) Use someone else's filter (and bind it to Lua)
B) Rewrite someone else's filter in Lua
C) Roll your own filter in Lua

Of the three options, A seems the least amount of work (and thus the
original question)

Hope that helps.