Mail Archives: geda-user/2015/07/14/05:36:43
--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, <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 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
<div dir=3D"ltr"><div>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.<br><br><=
/div>Lev<br></div><div class=3D"gmail_extra"><br><div class=3D"gmail_quote"=
>On Tue, Jul 14, 2015 at 11:27 AM, <span dir=3D"ltr"><<a href=3D"mailto=
:gedau AT igor2 DOT repo DOT hu" target=3D"_blank">gedau AT igor2 DOT repo DOT hu</a>></span> =
wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;bord=
er-left:1px #ccc solid;padding-left:1ex"><span class=3D""><br>
<br>
On Tue, 14 Jul 2015, Vladimir Zhbanov (<a href=3D"mailto:vzhbanov AT gmail DOT com=
" target=3D"_blank">vzhbanov AT gmail DOT com</a>) [via <a href=3D"mailto:geda-use=
r AT delorie DOT com" target=3D"_blank">geda-user AT delorie DOT com</a>] wrote:<br>
<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
On Tue, Jul 14, 2015 at 04:16:06AM +0200, Kai-Martin Knaak wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
<a href=3D"mailto:gedau AT igor2 DOT repo DOT hu" target=3D"_blank">gedau AT igor2 DOT repo DOT h=
u</a> wrote:<br>
<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
I had such an effort years ago. It was a standalone plugin for PCB<br>
of the time. It used GPMI to support multiple languages - not<br>
requiring all of them installed, but letting the user install<br>
language plugins. It supported all the languages you listed above<br>
(gpmi even has a guile backend!).<br>
<br>
Unfortunately it did not attract any user. I think only a very few<br>
people are actually interested in scripting PCB (other than with the<br>
builtin action language).<br>
</blockquote>
<br>
IMHO, the ability to script just every action and even the UI on a<br>
user level is one of the strengths of eagle. I get the impression that<br>
scripting is used a lot by seasoned eagle users. The way eagle does it<br>
with its own exclusive languages (plural!) is a different story<br>
though. I'd recommend a look at freeCAD for a more convincing example<b=
r>
on how to tackle scripting in a CAD environment.<br>
<br>
IMHO, to get widely adopted scripting must be readily available in the<br>
default install of the suite. Plus, its use must be covered by the<br>
manual, by howtos and by first-steps. When these conditions are met.<br>
scripting can get quite an asset.<br>
</blockquote>
<br>
Let's start?<br>
<br>
What a first scripting example would you like to see in the scripting<br>
how to?<br>
</blockquote>
<br></span>
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.<br>
<br>
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.<br>
<br>
Javascript is also popular and there should be "small" interprete=
rs available.<br>
<br>
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.<br>
<br>
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.<br>
<br>
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?<br>
<br>
Finally, for me at the end of the list, in the "should not be used at =
all if we wanted to attract users" category:<br>
<br>
- lisp, scheme and other classic functional stuff<br>
<br>
- experimental and/or dead "was a pet project of someone once" la=
nguages (like stutter)<br>
<br>
- m4 (it can not be easily embedded anyway, last time I checked it didn'=
;t have a lib, only executable)<br>
<br>
- shell (not really suitable, can't be embedded)<br>
<br>
<br>
<br>
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.<br>
<br>
Regards,<br>
<br>
Igor2<br>
</blockquote></div><br></div>
--047d7bb03c5ad27c47051ad29178--
- Raw text -