X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com X-Original-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=zuN/nbJnOo69i96KuDpyPx9gVNWqABpoQoTTyiKSpoY=; b=vMDEt/1AmHgkLtYXgkVazomBph+29WbZ/jpoAF8M9X+curihzGfw6WSJS5lJtvsPcY MJupWVLwQMBg0sKkfEHpXEeW87ZadUfPVOy7OgDniyaYB4eaGMjA2G0Nn/dChaziB4sp OSVOLtQdxa49k4zQ6ry8yn57NkM8ohX9K7nBqKZ2nwJojwd38eqN7uO0x5oscv4U7+z4 AvRBzVFypTZ23a9mMiulRdJkHfYa/8kA19sV0Pjq7Dx7ngdgQCuNMKG4zagu7HSQ44ME t7VUAVwz5yL16Gsdq30T98lBLVV3OrWXgUdFCjl/arsjv12aqf9z74C/0eCNSjMJQ9TF IJig== MIME-Version: 1.0 X-Received: by 10.50.30.65 with SMTP id q1mr1838146igh.28.1436866575496; Tue, 14 Jul 2015 02:36:15 -0700 (PDT) In-Reply-To: References: <0A5D410F-D1EF-4FC6-AF0F-BB13218B1615 AT icloud DOT com> <20150714084906 DOT GC14371 AT localhost DOT localdomain> Date: Tue, 14 Jul 2015 11:36:15 +0200 Message-ID: Subject: Re: [geda-user] The new to do From: "Levente (leventelist AT gmail DOT com) [via geda-user AT delorie DOT com]" To: gEDA User Mailing List Content-Type: multipart/alternative; boundary=047d7bb03c5ad27c47051ad29178 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 --047d7bb03c5ad27c47051ad29178 Content-Type: text/plain; charset=UTF-8 I think Lua is the best for this purpose. It is designed to be embeddable. And it is very easy to embed. I did it once. Lev On Tue, Jul 14, 2015 at 11:27 AM, wrote: > > > On Tue, 14 Jul 2015, Vladimir Zhbanov (vzhbanov AT gmail DOT com) [via > geda-user AT delorie DOT com] wrote: > > On Tue, Jul 14, 2015 at 04:16:06AM +0200, Kai-Martin Knaak wrote: >> >>> gedau AT igor2 DOT repo DOT hu wrote: >>> >>> I had such an effort years ago. It was a standalone plugin for PCB >>>> of the time. It used GPMI to support multiple languages - not >>>> requiring all of them installed, but letting the user install >>>> language plugins. It supported all the languages you listed above >>>> (gpmi even has a guile backend!). >>>> >>>> Unfortunately it did not attract any user. I think only a very few >>>> people are actually interested in scripting PCB (other than with the >>>> builtin action language). >>>> >>> >>> IMHO, the ability to script just every action and even the UI on a >>> user level is one of the strengths of eagle. I get the impression that >>> scripting is used a lot by seasoned eagle users. The way eagle does it >>> with its own exclusive languages (plural!) is a different story >>> though. I'd recommend a look at freeCAD for a more convincing example >>> on how to tackle scripting in a CAD environment. >>> >>> IMHO, to get widely adopted scripting must be readily available in the >>> default install of the suite. Plus, its use must be covered by the >>> manual, by howtos and by first-steps. When these conditions are met. >>> scripting can get quite an asset. >>> >> >> Let's start? >> >> What a first scripting example would you like to see in the scripting >> how to? >> > > My personal favorite is awk, but it's not widespread anymore. Also, I will > try to list what'd work even against my personal preferences. > > If we want to go for popularity/accessibility: python. Lua is smaller and > in some sense may be better suited to embedding (but the general hype > behind it seems to be smaller than behind python). My personal preference, > if I had to chose between these two, would be lua. > > Javascript is also popular and there should be "small" interpreters > available. > > Many years ago perl would have been a good candidate too, but I don't > think it'd attract the young generation. Same goes for tcl. > > I am not sure about the popularity of ruby; I think it's either here, at > the end of this section, or above perl & tcl. > > If these all fail, something young and modern could be used. It is a > higher risk, tho: who knows if they will be popular (or even alive) in a > 5..10 years time scale? > > Finally, for me at the end of the list, in the "should not be used at all > if we wanted to attract users" category: > > - lisp, scheme and other classic functional stuff > > - experimental and/or dead "was a pet project of someone once" languages > (like stutter) > > - m4 (it can not be easily embedded anyway, last time I checked it didn't > have a lib, only executable) > > - shell (not really suitable, can't be embedded) > > > > Btw, my opinion is using gpmi or something alike is the best way: instead > of limiting the software to one language, it's not much harder to support > 10+ languages. > > Regards, > > Igor2 > --047d7bb03c5ad27c47051ad29178 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I think Lua is the best for this purpose. It is desig= ned to be embeddable. And it is very easy to embed. I did it once.

<= /div>Lev

On Tue, Jul 14, 2015 at 11:27 AM, <gedau AT igor2 DOT repo DOT hu> = wrote:


On Tue, 14 Jul 2015, Vladimir Zhbanov (vzhbanov AT gmail DOT com) [via geda-user AT delorie DOT com] wrote:

On Tue, Jul 14, 2015 at 04:16:06AM +0200, Kai-Martin Knaak wrote:
gedau AT igor2 DOT repo DOT h= u wrote:

I had such an effort years ago. It was a standalone plugin for PCB
of the time. It used GPMI to support multiple languages - not
requiring all of them installed, but letting the user install
language plugins. It supported all the languages you listed above
(gpmi even has a guile backend!).

Unfortunately it did not attract any user. I think only a very few
people are actually interested in scripting PCB (other than with the
builtin action language).

IMHO, the ability to script just every action and even the UI on a
user level is one of the strengths of eagle. I get the impression that
scripting is used a lot by seasoned eagle users. The way eagle does it
with its own exclusive languages (plural!) is a different story
though. I'd recommend a look at freeCAD for a more convincing example on how to tackle scripting in a CAD environment.

IMHO, to get widely adopted scripting must be readily available in the
default install of the suite. Plus, its use must be covered by the
manual, by howtos and by first-steps. When these conditions are met.
scripting can get quite an asset.

Let's start?

What a first scripting example would you like to see in the scripting
how to?

My personal favorite is awk, but it's not widespread anymore. Also, I w= ill try to list what'd work even against my personal preferences.

If we want to go for popularity/accessibility: python. Lua is smaller and i= n some sense may be better suited to embedding (but the general hype behind= it seems to be smaller than behind python). My personal preference, if I h= ad to chose between these two, would be lua.

Javascript is also popular and there should be "small" interprete= rs available.

Many years ago perl would have been a good candidate too, but I don't t= hink it'd attract the young generation. Same goes for tcl.

I am not sure about the popularity of ruby; I think it's either here, a= t the end of this section, or above perl & tcl.

If these all fail, something young and modern could be used. It is a higher= risk, tho: who knows if they will be popular (or even alive) in a 5..10 ye= ars time scale?

Finally, for me at the end of the list, in the "should not be used at = all if we wanted to attract users" category:

- lisp, scheme and other classic functional stuff

- experimental and/or dead "was a pet project of someone once" la= nguages (like stutter)

- m4 (it can not be easily embedded anyway, last time I checked it didn'= ;t have a lib, only executable)

- shell (not really suitable, can't be embedded)



Btw, my opinion is using gpmi or something alike is the best way: instead o= f limiting the software to one language, it's not much harder to suppor= t 10+ languages.

Regards,

Igor2

--047d7bb03c5ad27c47051ad29178--