Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Ruby and Python, questions (not a flamewar!)

Reply
Thread Tools

Ruby and Python, questions (not a flamewar!)

 
 
William James
Guest
Posts: n/a
 
      01-19-2007
gga wrote:
> In terms on scripting language performance, LuaJIT has left
> YARV, CPython+Psyco, and Perl quite in the dust if you ask me (this is
> not so surprising as Lua is a much simpler language, albeit somewhat
> less friendly).


For more on LuaJIT, see the thread
"Intensive computing: Ruby? Ruby/C? Pure C++?" in this
newsgroup.

 
Reply With Quote
 
 
 
 
Giles Bowkett
Guest
Posts: n/a
 
      01-19-2007
> > (Or at least, more users for now. Ruby books are outselling Python
> > books today, according to O'Reilly.)

>
> Citation needed
>
> The information I've seen on this suggested that Ruby book sales were
> _growing_ at a faster rate than Python book sales. That's not at all
> the same thing as saying that Ruby books are outselling Python books.
>
> Of course, perhaps I haven't seen the most up-to-date information.


http://radar.oreilly.com/archives/20...ss_python.html

--
Giles Bowkett
http://www.gilesgoatboy.org
http://gilesbowkett.blogspot.com
http://gilesgoatboy.blogspot.com

 
Reply With Quote
 
 
 
 
r
Guest
Posts: n/a
 
      01-19-2007
Giles Bowkett wrote:
> > 2) Why are many mainstream organizations using Python rather than ruby?
> > Is it simply an age issue (Python has been around longer)? Is it a
> > performance issue? Is this changing currently?

>
> Ruby is of a comparable age, but it started in another country, a
> distant country whose language is so different it cannot really be
> translated literally, and Python's performance edge is signficant.


Seems like the language barrier puts about a 5-10 year lag on it.
Probably Python doesn't have much to do with it.

The same country that produced the joyful version of chess shogi
http://trout.customer.netspace.net.au/index.html
produced the joyful version of scripting... that designed pokemon,
digimon, yugi-oh, manga, anime, toyotas, datsuns, mazdas, nissans,
etc etc has designed Ruby and exported it with the same 5-10 year time
lag as the rest of the designs. Could just be the language thing.

-r

 
Reply With Quote
 
Brad Tilley
Guest
Posts: n/a
 
      01-19-2007
Quoting r <(E-Mail Removed)>:

> Seems like the language barrier puts about a 5-10 year lag on it.


Historically, software has been a product of the Western cultures. The English
language has greatly influenced every programming language. Everything seems to
originate from the C programming language (Python, Ruby, etc.) and extend from
there. C and Unix are a western concepts.

I find Ruby fascinating simply because it was written by a non-western culture.
IMO, languages (natural languages not programming languages) influence the way
we think, form ideas and solve problems as human beings.

We can examine many programming languages designed by western software designers
and clearly see the western way of problem solving, but unfortunately, there are
not very many popular programming languages designed by other cultures. Ruby is
one example of this and is very refreshing.

I do not find Ruby to be inherently noble or the ultimate programming language,
it's only different. And IMO, different is good because it allows us to see and
frame issues from a different vantage point. In the end, we all benefit from
this.


 
Reply With Quote
 
Xavier Noria
Guest
Posts: n/a
 
      01-19-2007
On Jan 18, 2007, at 8:03 PM, Giles Bowkett wrote:

> Python isn't really an interpreted language in the sense that Ruby is.
> Python scripts compile to Python bytecode, and it's the bytecode --
> not the script itself -- which the interpreter runs. This is an
> intermediate zone between a pure interpreted language like Ruby, and a
> pure compiled language like C. The Python bytecode interpreter is
> generally faster than regular scripting language interpreters, but
> slower than C. However, it's not always very much slower. Lots of
> low-level operations, like GUI stuff and I/O stuff, are handed off
> directly to C code within the interpreter, and run pretty quickly
> because of that. Long story short, Python's unusually fast for a
> scripting language.


Perl compiles to high-level bytecodes, for instance map or grep are
opcodes. Are Python bytecodes similar? What about YARV?

-- fxn


 
Reply With Quote
 
Giles Bowkett
Guest
Posts: n/a
 
      01-19-2007
> > Python isn't really an interpreted language in the sense that Ruby is.
> > Python scripts compile to Python bytecode, and it's the bytecode --
> > not the script itself -- which the interpreter runs. This is an
> > intermediate zone between a pure interpreted language like Ruby, and a
> > pure compiled language like C. The Python bytecode interpreter is
> > generally faster than regular scripting language interpreters, but
> > slower than C. However, it's not always very much slower. Lots of
> > low-level operations, like GUI stuff and I/O stuff, are handed off
> > directly to C code within the interpreter, and run pretty quickly
> > because of that. Long story short, Python's unusually fast for a
> > scripting language.

>
> Perl compiles to high-level bytecodes, for instance map or grep are
> opcodes. Are Python bytecodes similar? What about YARV?


Honestly, I don't know, but Perl files are saved as Perl files. Python
files, the first time you run them, get compiled to .pyc files. Perl
files run through a Perl interpreter; Python files never actually run
at all. Only the .pyc files run.

(Perl and Python is kind of a Hatfields/McCoys situation, though, at
least it is on the Python lists I used to read.)

--
Giles Bowkett
http://www.gilesgoatboy.org
http://gilesbowkett.blogspot.com
http://gilesgoatboy.blogspot.com

 
Reply With Quote
 
Giles Bowkett
Guest
Posts: n/a
 
      01-19-2007
> I find Ruby fascinating simply because it was written by a non-western culture.
> IMO, languages (natural languages not programming languages) influence the way
> we think, form ideas and solve problems as human beings.


Kind of a tangent but I find this pretty interesting too. It's
probably the programming language which reads most like English and it
comes from a place where English is kind of weird compared to the
structure of the local language. It's an interesting little paradox.

--
Giles Bowkett
http://www.gilesgoatboy.org
http://gilesbowkett.blogspot.com
http://gilesgoatboy.blogspot.com

 
Reply With Quote
 
Xavier Noria
Guest
Posts: n/a
 
      01-20-2007
On Jan 19, 2007, at 9:01 PM, Giles Bowkett wrote:

> Honestly, I don't know, but Perl files are saved as Perl files. Python
> files, the first time you run them, get compiled to .pyc files. Perl
> files run through a Perl interpreter; Python files never actually run
> at all. Only the .pyc files run.


Yeah I know, but I guess that's orthogonal to having high-level
opcodes or not. Broadly speaking, it is a matter of generating an
intermediate file or not. In fact there's a Perl bytecode generator
(B::Bytecode) and a source filter[*] that interprets it (ByteLoader),
though those are not normally used.

-- fxn
[*] For those not into Perl, a source filter is a special module that
intercepts source code before it arrives to the parser, and it is
free to modify it at its will. Filters can be chained, and once they
are done the parser receives the result and the regular flow follows.

 
Reply With Quote
 
Tom Pollard
Guest
Posts: n/a
 
      01-20-2007

On Jan 19, 2007, at 11:21 AM, Brad Tilley wrote:
> Quoting r <(E-Mail Removed)>:
> Historically, software has been a product of the Western cultures.
> The English
> language has greatly influenced every programming language.
> Everything seems to
> originate from the C programming language (Python, Ruby, etc.) and
> extend from
> there. C and Unix are a western concepts.


C and Unix are not concepts, but artifacts. And, on the scale of
computer science "history" (funny to use that to describe something
that has arisen largely within the lifetime of many of the people
reading this list) they're not extraordinarily old. Many languages
predated C (notably, Lisp and Fortran) and many of those old
languages are still influential today.


> I find Ruby fascinating simply because it was written by a non-
> western culture.

[...]
> We can examine many programming languages designed by western
> software designers
> and clearly see the western way of problem solving, but
> unfortunately, there are
> not very many popular programming languages designed by other
> cultures. Ruby is
> one example of this and is very refreshing.


Well, Ruby was written by a /person/, not a culture, and it's largely
a tasteful amalgam of good ideas introduced in those old "Western"
languages. I'd be interested to hear what you (or anyone else)
thinks is distinctively non-Western about Ruby, as opposed to C or
Lisp or Smalltalk.


Tom

 
Reply With Quote
 
Andrei Maxim
Guest
Posts: n/a
 
      01-20-2007
On 19.01.2007, at 18:21, Brad Tilley wrote:

> I find Ruby fascinating simply because it was written by a non-
> western culture.
> IMO, languages (natural languages not programming languages)
> influence the way
> we think, form ideas and solve problems as human beings.


There's the Whorf-Sapir Hypothesis that states that the language that
you speak influences the way you think. While linguists and cognitive
scientists believe that the hypothesis is flawed, most of them
believe there's at least an ounce of truth in that statement. A
somewhat similar and more accepted theory is the one advanced by
George Lakoff, but centered on the concept of metaphor.

David West reasons that on a similar level programming languages
influence the way a programmer might write a specific piece of code.
And I'm pretty sure that's an accurate statement.

Andrei



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ruby extension (C++) on OS X [ruby 1.8.2] and Google-Sketchup [ruby 1.8.5] Nicholas Ruby 3 01-28-2007 01:48 AM
The Ruby Edge - Digg for Ruby and Ruby On Rails roschler Ruby 0 10-15-2006 11:35 PM
#!/usr/bin/ruby , #!/usr/bin/ruby -w , #!/usr/bin/ruby -T?, #!/usr/bin/ruby -T1... anne001 Ruby 1 04-23-2006 03:02 PM
Questions about SWIG, Ruby/DL and embedding calls to ruby withinC++ Code Charles Comstock Ruby 1 06-25-2004 09:49 PM
Re: Questions....questions....questions Patrick Michael A+ Certification 0 06-16-2004 04:53 PM



Advertisments