REPOST: Re: Two languages, too similar, competing in the same space.
rdsteph at earthlink.net
Fri Dec 28 00:36:15 CET 2001
I find this very interesting. Thanks for sharing it, it sounds very useful!
> On Fri, 28 Dec 2001 09:56:29 +1100, Ron Stephens wrote:
> > ... But
> > now that Ruby is out there, it absorbs enormous mind share, and
> > development time to recreate libraries etc., which are already available
> > in Python, thus hurting Python.
> I have only tried it in a very minimal way, just to see that it did
> basically what was advertised, but you might be interested in this.
> There's a Ruby library that allows you to do things like:
> require 'python'
> require 'python/httplib'
> h = Py::Httplib::HTTP.new(host)
> h.putrequest('GET', path)
> h.putheader('Accept', 'text/html')
> h.putheader('Accept', 'text/plain')
> Ie, the "require 'python'" makes pulling in Python libraries
> as simple as ...
> require 'python/SOME_PYTHON_LIB'
> which is almost as easy as doing it in Python.
> Similarly, referencing elements of such a library simply
> requires prefixing them with "Py::". Once you have a
> handle to a Python object, you call it the same way you
> would in Python. I don't think one could make it much simpler.
> So, to some extent, it's possible to avoid reinventing the
> wheel. How well this works, I can't say, just that the
> examples I played with worked as advertised.
> Obviously, there's some overhead, in that it's running a copy
> of the Python interpreter to execute the Python code, but so
> long as the work the library is doing for one is larger than
> the actual overhead of the call to it, that shouldn't be a
========= WAS CANCELLED BY =======:
From: Ron Stephens <rdsteph at earthlink.net>
Subject: cmsg cancel <3C2BB10D.BD5002C7 at earthlink.net>
Control: cancel <3C2BB10D.BD5002C7 at earthlink.net>
Date: Mon, 31 Dec 2001 02:56:47 GMT
Organization: A poorly-installed InterNetNews site
Message-ID: <cancel.3C2BB10D.BD5002C7 at earthlink.net>
X-Trace: news2.kornet.net 1009775497 27193 18.104.22.168 (31 Dec 2001 05:11:37 GMT)
X-Complaints-To: usenet at news2.kornet.net
NNTP-Posting-Date: Mon, 31 Dec 2001 05:11:37 +0000 (UTC)
X-Commentary: I love NewsAgent 1.10 and the Sandblaster Cancel Engine Build 74 (19 March 1999)
This message was cancelled from within Mozilla.
More information about the Python-list