www.delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2015/10/07/00:23:37

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
Date: Wed, 7 Oct 2015 06:23:36 +0200 (CEST)
X-X-Sender: igor2 AT igor2priv
To: "Evan Foss (evanfoss AT gmail DOT com) [via geda-user AT delorie DOT com]" <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] GTK3, Glade interface designer (how to support
multiple scripting languages without n^2 effort)
In-Reply-To: <CAM2RGhQFe5C+Z4Ko0zLt02xNDEyZUFQBosq6m7b34zwVV-V4Lg@mail.gmail.com>
Message-ID: <alpine.DEB.2.00.1510070555020.7137@igor2priv>
References: <20151003210701 DOT de392b925f54dadb0a5fedd8 AT gmail DOT com> <1443903758 DOT 1873 DOT 13 DOT camel AT ssalewski DOT de> <56104A0A DOT 9020507 AT xs4all DOT nl> <1443909591 DOT 1873 DOT 18 DOT camel AT ssalewski DOT de> <CAC4O8c_g7e562Gaotrbi6gLfjP6cJU1ys=MtEkDE7bSh4F9dfg AT mail DOT gmail DOT com>
<1443975731 DOT 671 DOT 52 DOT camel AT ssalewski DOT de> <20151004191717 DOT bf8223417541a9306bfbd9ea AT gmail DOT com> <CAC4O8c9Bi5HJfcW6wUgm_+4O2gs4vDdBMbS2hF_0dCqnBuJahQ AT mail DOT gmail DOT com> <1443997480 DOT 2068 DOT 32 DOT camel AT ssalewski DOT de> <CAC4O8c-bnGky=Nab59-pOTJkB8Q9Tc5t5hqE+dnEF-777hUjMg AT mail DOT gmail DOT com>
<1444070851 DOT 1014 DOT 20 DOT camel AT ssalewski DOT de> <muv4ua$hat$1 AT ger DOT gmane DOT org> <alpine DOT DEB DOT 2 DOT 00 DOT 1510060356440 DOT 7137 AT igor2priv> <56133047 DOT 7030402 AT neurotica DOT com> <alpine DOT DEB DOT 2 DOT 00 DOT 1510060433080 DOT 7137 AT igor2priv> <56133CC4 DOT 7000306 AT neurotica DOT com> <alpine DOT DEB DOT 2 DOT 00 DOT 1510060523170 DOT 7137 AT igor2priv>
<56135F05 DOT 9000203 AT neurotica DOT com> <CAC4O8c-OZHX2PLEKEW9X1N4BV0xXf_WfH=JkfiEjAXS6eypLsw AT mail DOT gmail DOT com> <CAM2RGhQFe5C+Z4Ko0zLt02xNDEyZUFQBosq6m7b34zwVV-V4Lg AT mail DOT gmail 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 Tue, 6 Oct 2015, Evan Foss (evanfoss AT gmail DOT com) [via geda-user AT delorie DOT com] wrote:

> On Tue, Oct 6, 2015 at 2:44 PM, Britton Kerin
> (britton DOT kerin AT gmail DOT com) [via geda-user AT delorie DOT com]
> <geda-user AT delorie DOT com> wrote:
>>
>>
>> On Mon, Oct 5, 2015 at 9:41 PM, Dave McGuire (mcguire AT neurotica DOT com) [via
>> geda-user AT delorie DOT com] <geda-user AT delorie DOT com> wrote:
>>>
>>> On 10/05/2015 11:34 PM, gedau AT igor2 DOT repo DOT hu wrote:
>>>>>  Well, considering the fact that I use gEDA and PCB nearly every day,
>>>>> *I* am the user base.  And to watch the traffic around here, I'm the
>>>>> only guy busy actually USING this stuff!
>>>>
>>>> I am an user too in that sense. Britton too. We both say scripting is
>>>> good, so you are losing this by rate 2:1.
>>>
>>>   Oh hey, no, I never said scripting wasn't good.  I like scripting.  I
>>> just don't like people getting their panties in a bunch when it isn't
>>> done in their favorite language so they insist it be changed to suit them.
>>
>>
>> There's no real reason not to support multiple scripting languages, as Igor
>> has shown with his fork.
>
> I agree but other people did not. The limitation is in the longer term
> with packaging when distros think that it means they need to build
> against all of them so that every possible 3rd party script works. It
> is also a concern for support/maintenance reasons over having a
> polyglot developer base/contribution.

I do not think it works like that. At least, not with gpmi. In the below 
wall of text I will try to show how having multiple languages won't casue 
more trouble to the developer or the user than having a modern desktop 
system up and running.

To overcome the problem, there are 2 different set of glue layers. One 
layer glues pcb-rnd to gpmi and the other glues gpmi to a specific 
scripting language. This way gpmi is language-neutral, pcb-rnd is 
language-neutral too. When you need a new language, you just need to 
install (or compile) the language glue for that one language. By default 
it all loads dynamically, so you don't recompile gpmi, you don't 
recompile pcb-rnd. No recompilation even if you are installing the glue 
for a new scripting language that did not even exist by the time you 
compiled pcb-rnd and/or gpmi.

This means a distro can support as many language glues as it wants. This 
also means an application that supports one language already supports al 
language for which anyone ever made the glue. (All binary API language 
glue layers to the currently supported langages are between 150 and 300 
sloc in volume so it is not very hard to support a new language.) There's 
nothing that forces it to support language foo if foo is incompatible 
with the distro for whatever reason. It also means the user doesn't need 
to install all languages, just because of the potential need for an user 
script in the future. He can install the glues just when he needs them.

The analogy is like if you get to edit a file, for example svg. If you 
have a base system, you probably don't have a graphical svg editor 
installed. You figure your task now requires editing the svg; you just 
install the tool that does it, and do the job. Same with the scripts: you 
can install pcb-rnd and gpmi with 0 script languages, then another day you 
download an advanced panelizing script written in ruby and figure you need 
a ruby glue for that and install the ruby glue. Installing inkscape to 
deal with svg doesn't look very different to me than installing a ruby 
and the gpmi ruby glue lib to be able to deal with the ruby script.

... in other words:

Everyone writes everything in different languages one level up. If you 
want to run peted, you need ruby. If you want to run gimp, on Debian it 
brings python. If you install a lot of programs, sooner or later you will 
have a lot of different languages on your system. The only ways to avoid 
this are either using a single application (e.g. some people use emacs 
and try to edit everything with emacs) or carefully selecting your 
applications that they all use the same language. I don't think these 
happen too often. In my exeprience most users just install the 
software they think they need and it rarely keeps them back if the 
package brings in another scripting language. Even, when I need to decide 
which application to install from two that do the same job, and I say "one 
of my reasons for application A is that it is written in languages I 
prefer [because then I have more chance to debug it or fix bugs]", I am 
considered to be an alien.

So all in all I don't think it is bad or any more risky to have the same 
thing on application level (rather than on system level). Because of the 
double glue layer, it doesn't require more effort from the application's 
side. With proper dependencies, it doesn't require more effort from the 
user's side than installing any other software.

Regards,

Igor2

- Raw text -


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