Re: Python extension commands in git - request for policy change

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Dec 12, 2012 at 7:43 AM, Eric S. Raymond <esr@xxxxxxxxxxx> wrote:
> Patrick Donnelly <batrick@xxxxxxxxxxxx>:
>>        How would another language (e.g. Python) mitigate this?
>
> The way you mitigate this sort of problem is to have a good set of
> high-level bindings for standard services (like socket I/O) built in
> your extension language and using its abstractions, so you don't get a
> proliferation of low-level semi-custom APIs for doing the same stuff.
>
> I have elsewhere referred to this as "the harsh lesson of Perl", which
> I do not love but which was the first scripting language to get this
> right.  There is a reason Tcl and a couple of earlier designs like csh
> that we would now call "scripting languages" were displaced by Python
> and Perl; this is it.

Okay, I understand what you were trying to say earlier.

I'm not going to say Lua is a silver bullet for all embedded language
needs. If you seriously need an exotic suite of libraries built into
the language, then Lua is not really going to work well for you. In
reality though, many projects that require an extension language do
not need all the system programming facilities thrown in. In fact,
many don't want them due to bloat or security considerations. So, you
take on a hyperopic viewpoint by ruling out Lua simply because it
lacks a suite of system libraries.

With Jeff's response:

> As for "interacting with the outside world", I was specifically thinking
> of stuff like git-send-email (currently in perl) and git-imap-send
> (written in C). They need to open network sockets and speak standard
> protocols. I suspect Lua would need a module or custom bindings to do
> the former at all, and certainly the code would be much simpler if we
> re-used standard modules for speaking SMTP and IMAP (which of course
>increases our dependencies again...).

I would think this can perhaps be exported into another script Lua
could exec as needed. Or luasocket may be sufficient. These
dependencies would need to be examined in detail. I wouldn't recommend
selecting a language because of one odd network protocol dependency
satisfied by an obscure built-in library (I realize Jeff's example was
exactly that, an example).

On Wed, Dec 12, 2012 at 7:43 AM, Eric S. Raymond <esr@xxxxxxxxxxx> wrote:
>> I don't see how these languages are more appropriate based on your concerns.
>
> Your previous exchange with Jeff King indicates that you don't
> understand glue scripting very well.  Your puzzlement here just
> confirms that.  Trust both of us on this, it's important.  And
> reread my previous three paragraphs.

What I didn't understand coming into this thread was Git's ecosystem.
I understand embedded scripting languages very well and have been
working with Lua for years.

What does puzzle me is your dismissal of Lua because it doesn't have
the library suite Python does. Lua is not a system programming
language and I could argue Python is not really an embedded language.
I came here to try to stimulate discussion about what Git actually
needs/wants from a higher level language. If a small embedded language
would fit well, the Lua should be a candidate for consideration.

--
- Patrick Donnelly
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]