delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2015/07/03/23:35:57

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
Date: Sat, 4 Jul 2015 05:41:17 +0200 (CEST)
X-X-Sender: igor2 AT igor2priv
To: geda-user AT delorie DOT com
X-Debug: to=geda-user AT delorie DOT com from="gedau AT igor2 DOT repo DOT hu"
From: gedau AT igor2 DOT repo DOT hu
Subject: Re: [geda-user] gEDA/gschem still alive?
In-Reply-To: <43EFD2E2-AA0B-40DE-BE7D-B460EB022B90@noqsi.com>
Message-ID: <alpine.DEB.2.00.1507040524070.6924@igor2priv>
References: <1435510363 DOT 682 DOT 26 DOT camel AT ssalewski DOT de> <20150703030409 DOT 32398 DOT qmail AT stuge DOT se> <CAM2RGhSb=z35RYaJQmh-S4N73ng9WOj4ySmy_05J-7KGdBv8SA AT mail DOT gmail DOT com> <CAOP4iL3VBaS+bJhKJDk=_iuBSjDPY2-pvMdz5zPnf7A_rwD0Jw AT mail DOT gmail DOT com> <1435942066 DOT 672 DOT 22 DOT camel AT ssalewski DOT de>
<CAM2RGhQuyymEB++nY0tJVP1qxofbx2-C5yPBvBzF5i1gQzk-bw AT mail DOT gmail DOT com> <CAM2RGhRKbOnTecQhrukd_YXJM8RV++yFisT-o3jdYdqyhgtFdg AT mail DOT gmail DOT com> <43EFD2E2-AA0B-40DE-BE7D-B460EB022B90 AT noqsi DOT com>
User-Agent: Alpine 2.00 (DEB 1167 2008-08-23)
MIME-Version: 1.0
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


On Fri, 3 Jul 2015, John Doty wrote:

>
> On Jul 3, 2015, at 12:32 PM, Evan Foss (evanfoss AT gmail DOT com) [via geda-user AT delorie DOT com] <geda-user AT delorie DOT com> wrote:
>
>> Stefan, It is very telling that almost none of the symbol generators
>> or other small scripts and etc written by users and even the
>> developers use scheme. I see a lot of python, perl and etc.
>
> But most netlist generation uses Scheme. Creating a symbol or pseudo-schematic from some simpler representation is relatively easy text processing. My personal favorite language for this is AWK.

The main (or only?) reason most netlisters are written in scheme is that 
the current infrastructure pretty much decides that you have to use 
scheme unless you want to rewrite a lot of stuff from scratch. It's not a 
big deal if you wanted to use scheme or if you like to use scheme.

I disagree that the difference would be the simpler format or that 
non-netlist parts are more text processing than the netlist ones, see 
below.

>
> For netlist generation, the internal machinery in gnetlist is critical. This is not so trivial, and the API via which you may access the processed data is in Guile (Scheme). It could be another language, of course, but I think the choices are narrower. I don?t see AWK as a practical language here.

I do.

My devmap scripts are written in awk. Back when I started to develope it, 
I had to decide between two hard ways:

- use scheme for most parts, so that I can rely on the netlister infra

- use something else and just reproduce the relevant parts of the 
netlister infra

I chose the second way and I managed to do it, and I am certain I spent 
less time reproducing the relevant scheme stuff in awk than writing the 
new parts in scheme. Meanwhile I did realize there's much more code 
burried there in the scheme. I gave the other method a try, with the 
test/json/xml/lihata exporters (and scheme was a real PITA).

My conclusion is that the netlister part more or less requires/forces 
scheme. But it is very clear that it's so not because scheme is any more 
suitable for the task than anything else, but because the amount of code 
that's already there. It's just the pure inertia of a big amount of 
code. Been there, done that, both ways.

Now that I worked this problem around with the exporters, there's a good 
"binding" to other languages. My later netlister related scripts simply 
use the exporter-written-in-scheme as a preprocessor than do the real job 
in another language.

Regards,

Igor2

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019