Mail Archives: geda-user/2015/07/14/05:21:00
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
- Raw text -