Are we looking at the scripting world through Python colored glasses?
Has Python development been sleeping while the world of scripting
languages has passed us Pythonista's by?
On Saturday Slashdot ran this article on the "best" scripting
languages. http://developers.slashdot.org/devel...id=126&tid=156
"Folks at the Scriptometer conducted a practical survey of which
scripting language is the best. While question like that is bound to
generate flamewars between the usual Perl vs PHP, Python vs Perl,
VBScript vs everything crowds, the Scriptometer survey is practical:
if I have to write a script, I have to write it fast, it has to be
small (less typing), it should allow me to either debug itself via a
debugger or just verbose output mode. sh, Perl and Ruby won the
competition, and with the difference of 1-2 points they were
essentially tied for first place... Interesting that ICFP contests
lately pronounced OCaml as the winner for rapid development."
Scriptometer site: http://merd.sourceforge.net/pixel/la...ting-language/
Needless to say, the Ruby site was Slashdot-ed today.
What points are the Scriptometer survey missing, in regards to the
ease of use and beauty of the Python language?
Or should I convert my code base to Ruby and or OCaml? :)
Let the rabid "in defense of Python" flames begin!
-- R.J. 41 2805
Hi everybody
Richard James wrote: What points are the Scriptometer survey missing, in regards to the ease of use and beauty of the Python language?
Well, better look again at Guido's Tutorial, as it reads at the very
beginning:
"""
If you ever wrote a large shell script, you probably know this feeling:
you'd love to add yet another feature, but it's already so slow, and so
big, and so complicated; or the feature involves a system call or other
function that is only accessible from C
"""
The page misses completely the handling of more complex tasks than those
typically used in any shell (hey, those examples could even be realized
with a DOS batch file :-p). Python might not be the number one choice
for testing whether a file is readable, but ask them why Fedora has
chosen Python for their Anaconda OS Installer and not a shell script...
-Markus
Richard James wrote: Are we looking at the scripting world through Python colored glasses? Has Python development been sleeping while the world of scripting languages has passed us Pythonista's by?
On Saturday Slashdot ran this article on the "best" scripting languages. http://developers.slashdot.org/devel...id=126&tid=156 "Folks at the Scriptometer conducted a practical survey of which scripting language is the best.
"Practical surveys" are always as hilarious as practical programming, unless
one is asleep to their implications. One of the simple ones, which no doubt
formed much of the basis of this survey, always is: in which situation do I
have to type the least number of characters. For the brainless, this is a
valid test of programming excellence. Hopefully not all programmers in the
world have been reduced to such brainlessness yet.
On Sun, 13 Jun 2004 13:34:43 -0700, Richard James wrote: "Folks at the Scriptometer conducted a practical survey of which scripting language is the best. While question like that is bound to generate flamewars between the usual Perl vs PHP, Python vs Perl, VBScript vs everything crowds, the Scriptometer survey is practical: if I have to write a script, I have to write it fast, it has to be small (less typing), it should allow me to either debug itself via a debugger or just verbose output mode. sh, Perl and Ruby won the competition, and with the difference of 1-2 points they were essentially tied for first place... Interesting that ICFP contests lately pronounced OCaml as the winner for rapid development."
What points are the Scriptometer survey missing, in regards to the ease of use and beauty of the Python language?
Or should I convert my code base to Ruby and or OCaml? :)
I recently learned ruby, merely out of curiosity. Now that I know it, I
dont write ANY shell utilities with python anymore. Ruby is a much better
choice for almost all simple administrative tasks. For larger programs,
there are times when python seems like a better choice. Python enforces
consistency and readability. In an environment where many people will be
working on the same code for an extended period of time, the benefits of
python become apparent. That isnt to say that ruby *cant* be used in
situations like that. If ruby programmers layout strict guidelines for a
project regarding style and methodology, it would be just as effective.
The proof is in the source. This is part of a ruby program I wrote. This
snippet is actually a single 'line'. I broke it into several lines for
slightly improved readability. This single line would probably take at
least 15 lines to do in python, probably more if you wanted to do it
intelligently.
["*.rar.*", "*.r[0-9][0-9].*"].each {|fn|
Dir[$prefix+fn].collect {|x|
x.gsub(/\.\d+[\d.-]*$/,"")}.uniq.e ach {|x|
`cat #{sesc x}.* > #{sesc x}`} }
One of my other favorite features of ruby, is the ability to globally add
methods to base types. While I strongly feel that the ability to extend
base types is a powerful feature, I'm sure many python programmers would
disagree.
Or should I convert my code base to Ruby and or OCaml? :)
Ruby and Python really have a lot in common. The one you use should
ultimately be based on your style and how you feel about programming. If
you like lots of mutability, lots of functional idioms, and inline regular
expressions, switch to ruby! If not, stick with python.
I'm an ardent OCaml advocate. Anyone who uses c++ should have their head
examined. OCaml is a fast, statically typed, object oriented language with
type inference, pattern matching, automatic memory management, and
inherent parametric polymorphism (you dont need templates!). Native
compilers AND dynamic interpreters are available. It even comes with an
interactive top-level like python does. OCaml programs typically run
faster than comparable c++ programs, and they take significantly less time
to write. OCaml has a built-in list type, and it comes with all the usual
list manipulation functions (map and filter). OCaml is somewhat difficult
to learn however. If you have the intellectual capacity and the time
required to learn a challenging language, learn OCaml. Additionally, I
should mention that OCaml libraries can easily be integrated with python
programs via pycaml. I use OCaml instead of C to write python extensions.
--SegPhault rm******@yahoo. com (Richard James) wrote in message news:<2c******* *************** ****@posting.go ogle.com>... Needless to say, the Ruby site was Slashdot-ed today.
This has nothing to do with ./
The site was hacked and corrupted two weeks ago and since this time
one a stub is online.
Ryan Paul <se*******@sbcg lobal.net> wrote in message news:<pa******* *************** ******@sbcgloba l.net>... Ruby and Python really have a lot in common. The one you use should ultimately be based on your style and how you feel about programming. If you like lots of mutability, lots of functional idioms, and inline regular expressions, switch to ruby! If not, stick with python.
Or if you need real multithreading and WxPython. This are IMHO the
reasons not to switch to ruby. The python implementation is
technically much better. And the python libraries are still much
better then ruby.
As the person behind "http://www.python-ide.com" and
"http://www.ruby-ide.com" i can tell you that otherwise the language
are almost the same. For example from the 18000 lines of code for the
debugger about 2000 lines are different for this two languages.
But look yourself. A weekend should be enough for a python programmer
to learn ruby.
Richard James wrote: What points are the Scriptometer survey missing, in regards to the ease of use and beauty of the Python language?
Everything. It's definitely one of the most useless side-by-side
comparisons I've ever seen.
The program lengths criterion is ridiculous. It rewards Perl for
using unreadable line noise.
(Since when does Perl have an interactive interpretter?)
--
CARL BANKS http://www.aerojockey.com/software
"If you believe in yourself, drink your school, stay on drugs, and
don't do milk, you can get work."
-- Parody of Mr. T from a Robert Smigel Cartoon
Ryan Paul wrote:
.... required to learn a challenging language, learn OCaml. Additionally, I should mention that OCaml libraries can easily be integrated with python programs via pycaml. I use OCaml instead of C to write python extensions.
do you have examples? i could only get it to work the other way round.
graham
Richard James wrote: Are we looking at the scripting world through Python colored glasses? Has Python development been sleeping while the world of scripting languages has passed us Pythonista's by?
Everyone knows that any scripting language shootout that doesn't show
Python as the best language is faulty by design.
regards Max M This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: The_Incubator |
last post by:
As the subject suggests, I am interested in using Python as a scripting
language for a game that is primarily implemented in C++, and I am also
interested in using generators in those scripts...
Initially I was justing looking at using Python for some event
scripting. So basically an event would trigger an object to run the
appropriate Python script, which would be run in it's entirety and
return control to the C++ code.
After looking...
|
by: Quest Master |
last post by:
I am interested in developing an application where the user has an
ample amount of power to customize the application to their needs, and
I feel this would best be accomplished if a scripting language was
available. However, I want to code this application in Python, and I
have not yet heard of an implementation of another scripting language
into Python.
An example of what I mean is this (an implementation of Lua into Ruby
-- which I'd...
|
by: Yatin Soni |
last post by:
If my server doesnt support ASP, what would be the next best language
to use.
I need to create a simple security page... where a database on the
server stores usernames and passwords.
i need for it to query the database based on a username and password
entered in on the page.
I thought of using ASP because it is server side scripting, and that
prevents uses from viewing the source.
|
by: DrUg13 |
last post by:
In java, this seems so easy. You need a new object
Object test = new Object() gives me exactly what I want.
could someone please help me understand the different ways to do the
same thing in C++. I find my self sometimes, trying
Object app = Object();
Object *app = Object();
Object app = new Object();
|
by: gamaron |
last post by:
Summary
---------
I'm looking for a C++ IDE. If I'm going to learn something, I prefer it
to be free-of-charge (preferably and open-source base), extensible (read:
language independent, plug-in capable, etc), and platform independent. A
broad community of support would be nice, too.
| |
by: Matt Kruse |
last post by:
http://www.JavascriptToolbox.com/bestpractices/
I started writing this up as a guide for some people who were looking for
general tips on how to do things the 'right way' with Javascript. Their code
was littered with document.all and eval, for example, and I wanted to create
a practical list of best practices that they could easily put to use.
The above URL is version 1.0 (draft) that resulted. IMO, it is not a
replacement for the FAQ,...
|
by: neodem |
last post by:
PHP, and to a lesser degree JSF has become very popular ways to build web
applications. What I don't understand, and what I would like you all to
comment on, is how these methods are the best way to build web applications.
I come from the traditional Struts/JAVA world and the traditional MVC
archetecture. It seems to me, and I could be wrong, that PHP and JSF seem to
be pulling more business and data layer code up to the View Layer. I don't...
|
by: Patrick Finnegan |
last post by:
I need to write utility scripts for client sites that do not allow the
installation of C based interpreters like Perl, Python, Tcl, etc on
DB2 servers. My scripts must be cross plarform so no shell. The
option seems to be a java based implementation of an existing
scripting language such as Jython/Jacl/JRuby or Groovy used with the
JVM runtime supplied with DB2.
I heard that IBM are standardising on Python for their preferred...
|
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...
|
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,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
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...
|
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...
|
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();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| | |