X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com From: Christian Riggenbach To: geda-user AT delorie DOT com Subject: Re: [geda-user] Using Lua to safely read configuration and layout files (program attached) Date: Sun, 08 Feb 2015 14:39:45 +0100 Message-ID: <1897145.BbSdS1MRWc@jasum> User-Agent: KMail/4.14.4 (Linux/3.18.4-1-ARCH; KDE/4.14.4; x86_64; ; ) In-Reply-To: <20150208135925.6f6ddab6@Parasomnia.thuis.lan> References: <3709636 DOT NVszrDDjOR AT jasum> <20150208135925 DOT 6f6ddab6 AT Parasomnia DOT thuis DOT lan> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 Sunday 08 February 2015 13.59:25 you wrote: > > My dream > > would be a console in gschem (or standalone) for executing our own > > scriptlets directly on the life data. > > > When using gschem try hitting the ':'-key, voila a console! Now you > need to brush up on your Guile coding skills... Like that? http://www.gnu.org/software/guile/manual/guile.html#Running-Guile-Interactively Yeah, very straighforward. Call me ignorant, but we all know C on some level, and learning yet another language with a completely different syntax sounds not like efficiently spent time to me. Simple scriptlets should be a mater of a couple of lines, not a jungle of brackets. Especialy as we wan't to attract new developers, we should lower the hurdles, not make them higher. I once wanted to change a netlister backend to my needs, but I gave up and used grep/awk/cut because of the (IMHO) obscure syntax of scheme. Simple tasks like outputing the filenames of all the referenced symbols should be possible with the netlister, not by pouring over the schematic files. Now I use a Makefile rule to generate a dependency file for each schematic page and import it. It works like a charm, but it took me some time (which rather spend in doing schematics) to see my error in searching in the wrong places. > > I'm no fanboy of lua, but with an standartised, scriptable data > > format, adding a custom netlister or other small housekeeping jobs > > like autonumbering, autoslotting should be straightforward. > > For autonumbering use the script named "auto-uref.scm", to activate > it use a hook. For an example see your gschemrc file, find "hooks" or > "add-hook!". I normally use 'tu' in gschem, works also. > When writing those custom netlisters or other scripts you need some > Guile knowledge. My guess is that I need to find a Python tutorial, it > is much quicker to teach myself Python than teaching others Guile. +1 -- mit freundlichem Gruss Christian Riggenbach