473,768 Members | 3,985 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

merits of Lisp vs Python

How do you compare Python to Lisp? What specific advantages do you
think that one has over the other?

Note I'm not a Python person and I have no axes to grind here. This is
just a question for my general education.

Mark

Dec 8 '06
852 28619
En Fri, 09 Mar 2007 16:10:51 -0300, Tim Bradshaw <tf*@tfeb.orges cribió:
On 2007-03-09 07:00:06 +0000, al***@mac.com (Alex Martelli) said:
>(nee "One Laptop Per Child", OLPC, and once known as the "$100 laptop")
uses Python as its preferred (only?-) application language, and it's
slated to be the most widely distributed Python distro if it hits even
half of its ambitious target-numbers...
But it won't get anywhere near that because it's a stupid an
ill-conceived idea (not because of Python, note!). The electronic
gadget people need in the developing world is a mobile phone not a
computer.
What for?
That requires a phone company, installed antennas everywhere, and
available power to charge batteries. Without forgetting you to pay the
bill, of course.
I don't think OLPC would actually help people so much, but a mobile phone
would be almost useless. Like it was -actually happened- donating nice
computers for use in remote elementary schools with no power source.

--
Gabriel Genellina

Mar 9 '07 #841
Gabriel Genellina wrote:
En Fri, 09 Mar 2007 16:10:51 -0300, Tim Bradshaw <tf*@tfeb.orges cribió:
The electronic gadget people need in the developing world is a mobile phone not a
computer.

What for?
That requires a phone company, installed antennas everywhere, and
available power to charge batteries. Without forgetting you to pay the
bill, of course.
"What people in the developing world needs is Iridium!" Oops! ;-) I've
heard of people doing interesting things with mobile phones in various
developing countries, and I'm sure that the infrastructure is
gradually expanding in some places, but the mobile phone is largely a
"consumer" device: you pay big corporations to use their networks and
to download largely frivolous content. I hardly think such things are
on the same page as the OLPC vision.
I don't think OLPC would actually help people so much, but a mobile phone
would be almost useless. Like it was -actually happened- donating nice
computers for use in remote elementary schools with no power source.
Yes, such things were mentioned in the FOSDEM OLPC talk [1]. It's all
very well having rich Europeans or Americans (especially thinking of
people like Bill Gates who seems to opine regularly on such things in
a way which is unlikely to be completely disconnected to his business
interests) saying that all the old kit that people don't want any more
(because they must have that new quad-core laptop!) should be shipped
out to places that "need" it, but the issue is whether the recipients
really do need to have aging, power-hungry technology with special
waste disposal requirements when it finally gives up the ghost.

Sure, give people a bunch of old PCs (and why not all those CRTs,
too?) which consume tens of watts per unit. Do we have any old solar
panels to ship out with them? Or how about building some nuclear power
stations to go with all this equipment? Still a good idea?!

Paul

[1] Videos are available at http://www.fosdem.org/2007/media/video -
and in an open format, too. (Hint to any conference people thinking of
just uploading stuff to YouTube!)

Mar 10 '07 #842
"Gabriel Genellina" <ga*******@yaho o.com.arwrites:
En Fri, 09 Mar 2007 16:10:51 -0300, Tim Bradshaw <tf*@tfeb.orges cribiÂŽó:
[...]
ill-conceived idea (not because of Python, note!). The electronic
gadget people need in the developing world is a mobile phone not a
computer.

What for?
That requires a phone company, installed antennas everywhere, and
available power to charge batteries. Without forgetting you to pay
the bill, of course.
I don't think OLPC would actually help people so much, but a mobile
phone would be almost useless.
[...]

How wrong can you get?

Mobile phones have been making a significant economic impact in many
places in the third world. Sub-saharan Africa has seen huge growth in
access to mobile phones over the past few years, for example. A
recent report indicates there are now over 100 million mobile phones
in use in Africa. That's a huge change im communications from five
years ago, but more than that, since people often don't own a mobile,
but rent them by the minute from at the roadside, access levels must
be much higher than that would imply (i.e., much greater than 10% of
the continent's population).

Mobile connections are intrinsically cheaper than fixed-line networks,
can be rolled out faster, and have a disproportionat ely large impact
in places where such electronic communications have in the past been
absent, when compared with places like Europe and the US. For
example, farmers report that they find mobile phones valuable to get
information on market prices; without them, they would in the past
have little choice but to physically go to market and hope for the
best.

http://www.timesonline.co.uk/tol/new...icle737130.ece
I know nothing about OLPC, but I hope they're spending lots of time
talking to children, teachers, and academics, and to anybody with a
good criticism. It must be tricky for big projects to stay connected
to reality.
John
Mar 10 '07 #843
John Nagle <na***@animats. comwrites:
[...]
Python, on the other hand, is uphill all the way. Constant trouble
with version issues, especially with C components called from Python.
MySQLdb, M2Crypto, SSL - they all have platform/version
incompatibility problems. I just spent three days making M2Crypto
work on a new Linux server with a different Red Hat version.
Neither Python's packaging tools nor the platform's packaging
tools deal adequately with these issues.
[...]

You haven't been using mod_python, by any chance?
John
Mar 10 '07 #844
John J. Lee wrote:
John Nagle <na***@animats. comwrites:
[...]
> Python, on the other hand, is uphill all the way. Constant trouble
with version issues, especially with C components called from Python.
MySQLdb, M2Crypto, SSL - they all have platform/version
incompatibili ty problems. I just spent three days making M2Crypto
work on a new Linux server with a different Red Hat version.
Neither Python's packaging tools nor the platform's packaging
tools deal adequately with these issues.

[...]

You haven't been using mod_python, by any chance?
John
No, haven't started to deal with that yet. Still using
CGI. Not sure whether to use mod_python or fastcgi for the
small requests where the Python load time swamps the time
to do one SQL select and reply. Comments?

John Nagle
Mar 11 '07 #845
John Nagle <na***@animats. comwrites:
John J. Lee wrote:
John Nagle <na***@animats. comwrites:
[...]
Python, on the other hand, is uphill all the way. Constant trouble
with version issues, especially with C components called from Python.
MySQLdb, M2Crypto, SSL - they all have platform/version
incompatibilit y problems. I just spent three days making M2Crypto
work on a new Linux server with a different Red Hat version.
Neither Python's packaging tools nor the platform's packaging
tools deal adequately with these issues.
[...]
You haven't been using mod_python, by any chance?
John

No, haven't started to deal with that yet. Still using
CGI. Not sure whether to use mod_python or fastcgi for the
small requests where the Python load time swamps the time
to do one SQL select and reply. Comments?
mod_python relies on an unsupported feature of Python, namedly
multiple interpreters --risk of more pain with C extensions.
John
Mar 11 '07 #846
On Mar 11, 12:31 pm, j...@pobox.com (John J. Lee) wrote:
John Nagle <n...@animats.c omwrites:
John J. Lee wrote:
John Nagle <n...@animats.c omwrites:
[...]
> Python, on the other hand, is uphill all the way. Constant trouble
>>with version issues, especially with C components called from Python.
>>MySQLdb, M2Crypto, SSL - they all have platform/version
>>incompatibili ty problems. I just spent three days making M2Crypto
>>work on a new Linux server with a different Red Hat version.
>>Neither Python's packaging tools nor the platform's packaging
>>tools deal adequately with these issues.
[...]
You haven't been usingmod_python , by any chance?
John
No, haven't started to deal with that yet. Still using
CGI. Not sure whether to usemod_pythonor fastcgi for the
small requests where the Python load time swamps the time
to do one SQL select and reply. Comments?

mod_pythonrelie s on an unsupported feature of Python, namedly
multiple interpreters --risk of more pain with C extensions.
As usual, those bashing up on mod_python tend not to really know what
they are talking about. :-(

Although multiple Python interpreters cannot be manipulated directly
from within a Python script, they can from the Python C API and it is
very much a feature of Python and has been for a long time.

The only issue with multiple sub interpreters in respect of C
extension modules is that implementers of those C extension modules
take the easy path and use the simplified thread API for GIL locking.
The consequence of them doing that is that their C extension module
may not work when used in anything but the first interpreter created
by Python. If instead of using the simplified thread API for GIL
locking they used other parts of the Python threading API as
appropriate and did thread lock handling properly for multiple
interpreters, there would not be an issue.

Even so, to get such a C extension module working in the context of
mod_python simply means telling mod_python to run that particular
application in the first interpreter instance by specifying the
mod_python directive:

PythonInterpret er main_interprete r

Thus, the problem is not mod_python at all, but that the C extension
modules implementer didn't bother to implement their module so as to
be usable within a system such as mod_python where multiple
interpreters are used. Further, mod_python even provides a way to work
around the problems with such third party C extension modules.

If you feel that this is not the case and mod_python is still broken
in some way, please properly explain what the problem is.

PS. Yes I do know that forcing using of main interpreter in mod_python
only helps solve this problem in mod_python 3.2 and later and did not
help with older versions.

Graham

Mar 11 '07 #847
"Graham Dumpleton" <Gr************ **@gmail.comwri tes:
On Mar 11, 12:31 pm, j...@pobox.com (John J. Lee) wrote:
[...]
mod_python relies on an unsupported feature of Python, namely
multiple interpreters --risk of more pain with C extensions.

As usual, those bashing up on mod_python tend not to really know what
they are talking about. :-(

Although multiple Python interpreters cannot be manipulated directly
from within a Python script, they can from the Python C API and it is
very much a feature of Python and has been for a long time.
I didn't dispute that multiple interpreters are a feature of Python.
I said that they are an unsupported feature -- at least, Martin
v. Loewis says they're "just broken", which is close enough for me:

http://groups.google.co.uk/group/com...4accc133afbc96

"""
In any case, it looks like that the "multiple interpreters" feature of
Python is just broken.
"""

[...]
Even so, to get such a C extension module working in the context of
mod_python simply means telling mod_python to run that particular
application in the first interpreter instance by specifying the
mod_python directive:

PythonInterpret er main_interprete r
[...]

Is it possible to ask mod_python to start separate processes to serve
requests, rather than "separate" interpreters? We couldn't see a way.
John
Mar 14 '07 #848
On Mar 15, 7:22 am, j...@pobox.com (John J. Lee) wrote:
"Graham Dumpleton" <Graham.Dumple. ..@gmail.comwri tes:
On Mar 11, 12:31 pm, j...@pobox.com (John J. Lee) wrote:
[...]
>mod_pythonreli es on an unsupported feature of Python, namely
multiple interpreters --risk of more pain with C extensions.
As usual, those bashing up onmod_pythonten d not to really know what
they are talking about. :-(
Although multiple Python interpreters cannot be manipulated directly
from within a Python script, they can from the Python C API and it is
very much a feature of Python and has been for a long time.

I didn't dispute that multiple interpreters are a feature of Python.
I said that they are an unsupported feature -- at least, Martin
v. Loewis says they're "just broken", which is close enough for me:

http://groups.google.co.uk/group/com...e_thread/threa...

"""
In any case, it looks like that the "multiple interpreters" feature of
Python is just broken.
"""
For mod_python at least, the issues described there do not present as
a problem because in mod_python sub interpreters are never destroyed
while the process is running. Thus as far as the implementation of
mod_python goes it is fine to key off the pointer to the interpreter
as one knows interpreters will never go away.

In the more general case I can see that it may be an issue for some
small percentage of C extension modules which may want to cache
information per interpreter. This though would only be the case if
they wanted to exclusively hold everything directly within the C code
space. Although it would perceivably slow access down, there is
nothing to stop such a module instantiating its own pseudo module
within the context of a sub interpreter using PyImport_AddMod ule().
This Python module could then be used to hold objects created by
PyCObject_FromV oidPtr() with access later being had by using
PyCObject_AsVoi dPtr() after having looked up the object in the module.
As necessary, when creating these objects, the C extension module can
associate a cleanup function to be called when the object is destroyed
by virtue of the sub interpreter being destroyed. Thus the C extension
module would be able to cope with sub interpreters coming an going.

So, more work is required and some may be concerned about efficiency
and that a user may screw with the cached data from Python code, but
it is possible to have per interpreter information with a C extension
module.
[...]Even so, to get such a C extension module working in the context of
mod_pythonsimpl y means tellingmod_pyth onto run that particular
application in the first interpreter instance by specifying the
mod_pythondirec tive:
PythonInterpret er main_interprete r

[...]

Is it possible to askmod_pythonto start separate processes to serve
requests, rather than "separate" interpreters? We couldn't see a way.
Within the context of Apache it is possible to write modules which
could spawn off a separate daemon process to which requests could
later be passed for processing. An example of this included with
Apache is something like mod_cgid. Other examples of modules which
allow requests to be farmed off to separate processes, although they
work a bit differently, are mod_fastcgi, mod_scgi and mod_proxy_ajp.

To do something similar with mod_python isn't really practical because
of the way it hooks into more than just the response handling phase of
Apache. This concept though is being investigated for some version of
mod_wsgi after the initial version has been released. When
implemented, it would allow mod_wsgi to either handle WSGI
applications in the same style as mod_python within the Apache child
processes, or optionally farm the request off to a separate process
running either as the same user as Apache or a different user, in the
same style as mod_fastcgi and mod_scgi. The difference with mod_wsgi
would be that it would be one self contained module all managed from
Apache and would not require a separate executable or daemon process
to Apache to be run to which it would communicate with as the separate
daemon processes would ultimately just be a fork of the Apache parent
process and be running code from the Apache module itself. Also the
application scripts would be exactly the same no matter which mode it
was running in so no need to modify them in any special way to run
under the separate process.

Graham

Mar 14 '07 #849
John J. Lee wrote:
"Graham Dumpleton" <Gr************ **@gmail.comwri tes:
>>On Mar 11, 12:31 pm, j...@pobox.com (John J. Lee) wrote:
Is it possible to ask mod_python to start separate processes to serve
requests, rather than "separate" interpreters? We couldn't see a way.
That's what CGI does.

John Nagle
Mar 15 '07 #850

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
2184
by: Paddy3118 | last post by:
This month there was/is a 1000+ long thread called: "merits of Lisp vs Python" In comp.lang.lisp. If you followed even parts of the thread, AND previously used only one of the languages AND (and this is the crucial bit), were persuaded to have a more positive view of the other language; (deep breath, this is a long, as well as grammatically incorrect sentence), THEN WHY NOT POST ON WHAT ARGUMENTS PERSUADED YOU.
0
9576
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9407
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10175
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9961
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9843
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7384
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6656
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5283
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5425
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.