X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=jfysci5HzfO16BDQu0+DFIVBoG1d8ekqWgY8cDprgM8=; b=ZxIO7A6t1OOPVSF4dMohNYDAKJtdhSUSc24g47jZlJwl3BN6A5l7D8LeUff9lOr3yX pt274jsoBGWtRnEYq47uWfINxLsSbbT+Sljo1ibKggFDbWGe4KS4tH2cSqE/N2ePsaTn 6tcMdJFgAiSyMHgECJ4yySenOmWABygxhcim1hWIGRPELar+6weuyHH4a2YB7G/UzI1t TCTaM/jvEL6W9bGBA8qGh4iw0QflONB8JbfGNKvtj/JwPou0KipEFJIhECm6Xf0hFe7V sy7WsNuub0oDpyDnm/3ZdezaQQghy0Yp3ZDOYDB6tw39Pio83Z1D5ZQmNnwufhzuh2Lo PPHQ== MIME-Version: 1.0 X-Received: by 10.60.103.242 with SMTP id fz18mr4049543oeb.14.1423261722794; Fri, 06 Feb 2015 14:28:42 -0800 (PST) In-Reply-To: <20150206204743.6a72346d@jive> References: <20150206204743 DOT 6a72346d AT jive> Date: Fri, 6 Feb 2015 17:28:42 -0500 Message-ID: Subject: Re: [geda-user] Using Lua to safely read configuration and layout files (program attached) From: Jason White To: geda-user AT delorie DOT com Content-Type: text/plain; charset=UTF-8 Reply-To: geda-user AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: geda-user AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Fri, Feb 6, 2015 at 2:47 PM, Lev wrote: > Hi, > > > I think Lua is a good scripting language, and particularly good for this kind > of application. > > However, I don't know if the Lua stack could handle this kind of use. Well, it certainly works fine in the program I wrote. (try it!) > I don't > know the internals of Lua, and I don't know if it is designed in a way to put > there a data of a layout. I have to say I don't completely understand your question. The stack is nothing more than an exchange medium between the Lua script and the C program. If a script defines a variable, the C program requests it and it gets pushed onto the top of the stack. When the C program wants to read its value, it pops it off the stack. -- Jason White