473,386 Members | 2,078 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

perspective on ruby

RK
I apologize if this is a stupid question, I'm asking Python group for
perspective on Ruby, but I don't see how the alternative of going to a
ruby group for a perspective on Ruby is going to do me any good...

I just unpacked and tried out InstantRails, after turning off the
local Plone stack.

Looking over the IR stack, making the required hacks to the examples,
looking at all it's pieces(including some of the more powerful PHP
support mixed in), looking at the shipped examples, I had to marvel
again at how far behind these folks are compared to something like
Zope. They are 10 years behind an integrated platform like that.

I just don't get it. The scripted object-oriented clean programming
language is done.

I'm more than willing to supprt RoR if it's being sold as the popular
alternative to .NET programming, which it is in some CS curriculum
(where Java being thrown out).

But, all those "END"s are getting on my nerves.

Thx

Apr 20 '06 #1
13 1552
RK,

I always liked this Martelli post, which I found by searching on Ruby
early on when I was still trying to decide to learn Python or Ruby. For
a mere hobbyist doing both is out of the question:

http://groups.google.com/group/comp....8422d707512283

If you want more just search on "ruby" in comp.lang.python or "python"
in comp.lang.ruby

That should cover it.

rick

"A language is a dialect with an army and navy." --Max Weinrich

Apr 20 '06 #2
RK wrote:
I just don't get it. The scripted object-oriented clean programming
language is done.
Nothing's ever done except LISP. There's always room for experimentation
and improvement.
I'm more than willing to supprt RoR if it's being sold as the popular
alternative to .NET programming, which it is in some CS curriculum
(where Java being thrown out).


Switching to Java for CS was a tremendous blunder. Students need to
understand low-level resource management. They need to learn to think in
more than 1 programming paradigm that shoehorns everything into objects
(ok, java has generics now. if you squint really hard. sort of). One
course in C++ doesn't cut it, the curriculum should either use different
languages fitted to each task or emphasize a single language with broad
abilities (picking the best programming model for each task). Java is
piss-poor for most undergraduate classes (I've taught several). C++ isn't
perfect but it is pretty good, warts and all (some warts make good learning
experiences).

Note that I'm talking about teaching languages. Outside the classroom my
choices would be completely different.

Sorry, I don't know anything about Ruby on Rails. :) The fact that even
numeric literals are objects make me suspicious of Ruby as a
general-purpose language though.
Apr 20 '06 #3
Edward Elliott wrote:
The*fact*that*even numeric literals are objects make me suspicious of Ruby
as a general-purpose language though.

add_one = 1 .__add__
add_one(42)

43

Just in case you didn't know...

Peter

Apr 20 '06 #4
Peter Otten wrote:
Edward Elliott wrote:
The fact that even numeric literals are objects make me suspicious of Ruby
as a general-purpose language though.

add_one = 1 .__add__


Just in case you didn't know...


True enough, but I don't often see Python code treating numbers as objects.
In Ruby it's right in the tutorials. Which may be fine; I'm not
discounting Ruby, I'm just cautious.
Apr 20 '06 #5
Edward Elliott <no****@127.0.0.1> wrote:
...
course in C++ doesn't cut it, the curriculum should either use different
languages fitted to each task or emphasize a single language with broad
abilities (picking the best programming model for each task). Java is
The only "single language" I could see fitting that role is Mozart,
deliberately designed to be SUPER-multi-paradigm -- not even Lisp and
Scheme (the only real competition) can compare.

While Mozart appears cool, I really think that a wider variety of
languages would help -- some machine code (possibly abstract a la
Mixal), C (a must, *SO* much is written in it!), at least one of C++, D,
or ObjectiveC, either Scheme or Lisp, either *ML or Haskell, either
Python or Ruby, and at least one "OOP-only" language such as Java, C#,
Eiffel, or Smalltalk. For a tipycal CS bachelor course, a set of over
half a dozen languages might be overkill, admittedly (particularly
because these are just the "general purpose" languages -- you no doubt
also want to present XML and friends, possibly XSLT, definitely SQL, and
several other *special*-purpose language classes, too....!!!); too much
time would end up devoted to semirelevant syntax differences...
Note that I'm talking about teaching languages. Outside the classroom my
choices would be completely different.


Absolutely, I'm thinking about CS courses specifically -- for science
and engineering courses, I'd have much different sets (yes, Virginia,
there ARE fields where you still absolutely need to know Fortran!-), for
humanities and soft-sciences other ones yet, and the real world is a
different (and frightening;-) sort of place!-)
Alex

Apr 21 '06 #6
Alex Martelli wrote:
The only "single language" I could see fitting that role is Mozart,
deliberately designed to be SUPER-multi-paradigm -- not even Lisp and
Scheme (the only real competition) can compare.
Don't know Mozart. After 5 minutes of googling, it looks like strictly a
high-level language. Features like network transparency are jumping the
gun for undergrads. But it has potential.
While Mozart appears cool, I really think that a wider variety of
languages would help -- some machine code (possibly abstract a la
Mixal), C (a must, *SO* much is written in it!), at least one of C++, D,
or ObjectiveC, either Scheme or Lisp, either *ML or Haskell, either
Python or Ruby, and at least one "OOP-only" language such as Java, C#,
Eiffel, or Smalltalk.
Yeah I agree that more is better. The problem is using a new language
every couple courses without bogging down in implementation details.
Personally I'd just say "Here's a book, learn it yourself". It's what they
gotta do on the job anyway.
For a tipycal CS bachelor course, a set of over
half a dozen languages might be overkill, admittedly (particularly
because these are just the "general purpose" languages -- you no doubt
also want to present XML and friends, possibly XSLT, definitely SQL, and
several other *special*-purpose language classes, too....!!!); too much
time would end up devoted to semirelevant syntax differences...
Here's where I disagree. XML? Conceptually (and more elegantly) covered
as LISP s-expressions. XSLT? Just a bastardized spawn of Prolog. SQL
will be covered in databases. My problem with most domain-specific
languages is 1) they're usually too applied for a teaching environment and
2) they're easy to pick up once you master general programming concepts.
The one exception that's really invaluable is regular expressions, but
those are universal enough they get covered elsewhere.
Absolutely, I'm thinking about CS courses specifically -- for science
and engineering courses, I'd have much different sets (yes, Virginia,
there ARE fields where you still absolutely need to know Fortran!-), for
humanities and soft-sciences other ones yet, and the real world is a
different (and frightening;-) sort of place!-)


Yep, I hate how schools lump the CS majors and science majors into one
intro programming course. They both need to learn basic programming
concepts, but the majors need to understand implementation while the
non-majors need productivity. I'd put the majors on something like C and
the non-majors on Python (or Fortran if need be). But that won't fly
because non-majors who convert would have to retake the class. So maybe
put them both on Python and switch languages for the second course.
Rougher for the majors, but there's little reason for non-majors to know
C/C++/Java/Pascal. Scheme is an interesting option, I'm not sure how that
would work out.
Apr 21 '06 #7
In article <dp******************@newssvr11.news.prodigy.com >,
Edward Elliott <no****@127.0.0.1> wrote:
The fact that even
numeric literals are objects make me suspicious of Ruby as a
general-purpose language though.


Isn't Python going that way?
Apr 21 '06 #8
On Thu, 20 Apr 2006, Alex Martelli wrote:
Edward Elliott <no****@127.0.0.1> wrote:
...
course in C++ doesn't cut it, the curriculum should either use different
languages fitted to each task or emphasize a single language with broad
abilities (picking the best programming model for each task). Java is


The only "single language" I could see fitting that role is Mozart,
deliberately designed to be SUPER-multi-paradigm -- not even Lisp and
Scheme (the only real competition) can compare.


I agree that Mozart/Oz is probably the most ambitiously multi-paradigm
language out there, and anyone interested in some real mind expansion
should really check out the excellent book, "Concepts, Techniques, and
Models of Computer Programming" by Peter Van Roy and Seif Haridi.

However, my impression of Mozart/Oz so far can be summed up like this:
"You can have any paradigm you want, as long as it's concurrent". The
degree to which out-parameters are used (in the form of "dataflow
variables") is very unusual for OO or FP, and this is a source of both
amazement and confusion for me. It's clearly possible to program in many
styles, but you still need to adapt your thinking to the Mozart way.

Also worth a mention is Alice ML, which runs on the Mozart system but is
statically typed, type-inferred, very similar to SML but with concurrency
support (lazies and futures), typesafe marshalling, and "packages", which
allow for dynamically-typed interfaces between modules.

--
.:[ dave benjamin -( ramen/sp00 )- http://spoomusic.com/ ]:.
"one man's constant is another man's variable" - alan perlis
Apr 21 '06 #9
In article <w1*******************@newssvr21.news.prodigy.com> ,
Edward Elliott <no****@127.0.0.1> wrote:
XML? Conceptually (and more elegantly) covered
as LISP s-expressions.
"...Lisp is still #1 for key algorithmic techniques such as recursion
and condescension."
-- Verity Stob
<http://www.regdeveloper.co.uk/2006/01/11/exception_handling/>
XSLT? Just a bastardized spawn of Prolog.


As is any kind of pattern matching, including everyone's favourite
regular expressions. Prolog did it all.
Apr 22 '06 #10
Edward Elliott wrote:
Alex Martelli wrote:
While Mozart appears cool, I really think that a wider variety of
languages would help -- some machine code (possibly abstract a la
Mixal), C (a must, *SO* much is written in it!), at least one of C++, D,
or ObjectiveC, either Scheme or Lisp, either *ML or Haskell, either
Python or Ruby, and at least one "OOP-only" language such as Java, C#,
Eiffel, or Smalltalk.

Yeah I agree that more is better. The problem is using a new language
every couple courses without bogging down in implementation details.
Personally I'd just say "Here's a book, learn it yourself". It's what
they gotta do on the job anyway.


Yes - start them explore. I'd not want to be "teached" a specific
_language_ in a course longer that one day. A language cannot be teached.
Who of the posters in this thread want themselves to be _teached_ more
than one day on a language?

I've seen many graduates who "know" Java, C, this and that words and
patterns, but hardly can write a loop and evolve things. Those, who can
write loops are mostly self-educated and can do all things quickly in
any language.

Isn't the fun, finding the right tools for certain purposes one-self?

The job of (CS) courses more to provide a map ( "what fun to explore
yourself" ) and display extremes (ASM and Lisp) to prevent from
identification ?

-robert
Apr 22 '06 #11
robert wrote:
Yes - start them explore. I'd not want to be "teached" a specific
_language_ in a course longer that one day. A language cannot be teached.
Who of the posters in this thread want themselves to be _teached_ more
than one day on a language?

Isn't the fun, finding the right tools for certain purposes one-self?


That holds for bright, motivated students. The problem is the others.
Some people are totally lost when you throw them a book and say "learn
this". So the choices are:

1. Do it and watch the rank-and-file students abandon the major
2. Provide more language-specific instruction

Now places like Berkeley and MIT can afford to take route 1. They already
have a surplus of bright, motivated students. But at many (most?) schools,
route 2 is in the dept's best interest. Number of majors affects prestige,
influence, and at many state schools funding. Telling the rank-and-file to
shove off is shooting themselves in the foot, and ultimately hurts the good
students as well with a lesser dept. These depts are walking a tightrope
as they try hard to maintain minimum standards. It's not a binary choice
really, it's a spectrum.

So while route 1 may be better for the profession as a whole, the current
educational system has some pretty strong pressures for route 2.
Apr 22 '06 #12
Lawrence D'Oliveiro wrote:
In article <w1*******************@newssvr21.news.prodigy.com> ,
Edward Elliott <no****@127.0.0.1> wrote:

XML? Conceptually (and more elegantly) covered
as LISP s-expressions.


"...Lisp is still #1 for key algorithmic techniques such as recursion
and condescension."
-- Verity Stob
<http://www.regdeveloper.co.uk/2006/01/11/exception_handling/>

XSLT? Just a bastardized spawn of Prolog.


As is any kind of pattern matching, including everyone's favourite
regular expressions. Prolog did it all.

I'm assuming you're kidding--there is a lot of difference between an RE
that produces a highly optimized finite state machine to quickly match a
string, and a language that uses brute-force depth-first recursion, plus
some nonobvious tricks, to do the same thing. Like many orders of
magnitude in execution time :-)

That said, it'd be nice if there were some easy way to access a Prolog
engine from Python. When Prolog is appropriate, it's _really_ appropriate.
Cheers,
Ken

Jun 28 '06 #13
Kenneth McDonald <ke****************@sbcglobal.net> writes:
[snip]

That said, it'd be nice if there were some easy way to access a Prolog
engine from Python. When Prolog is appropriate, it's _really_
appropriate.
Cheers,
Ken


http://christophe.delord.free.fr/en/pylog/
http://aspn.activestate.com/ASPN/Coo.../Recipe/303057
http://www.ibiblio.org/obp/py4fun/prolog/prolog2.html
http://sourceforge.net/projects/pyprolog/

Also, before these showed up, we locally did prolog-calls-python and
python-calls-prolog (all from a C++ CAD engine) by using the embedding
libraries and bindings.

--
Harry George
PLM Engineering Architecture
Jun 29 '06 #14

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

Similar topics

220
by: Brandon J. Van Every | last post by:
What's better about Ruby than Python? I'm sure there's something. What is it? This is not a troll. I'm language shopping and I want people's answers. I don't know beans about Ruby or have...
54
by: Brandon J. Van Every | last post by:
I'm realizing I didn't frame my question well. What's ***TOTALLY COMPELLING*** about Ruby over Python? What makes you jump up in your chair and scream "Wow! Ruby has *that*? That is SO...
13
by: Wayne Folta | last post by:
I've been a long-time Perl programmer, though I've not used a boatload of packages nor much of the tacky OO. A couple of years ago, I decided to look into Python and Ruby. Python looked OK, but...
30
by: Christian Seberino | last post by:
How does Ruby compare to Python?? How good is DESIGN of Ruby compared to Python? Python's design is godly. I'm wondering if Ruby's is godly too. I've heard it has solid OOP design but then...
10
by: Neal | last post by:
I'm beginning some experiments with Ruby in XHTML 1.1. I'm finding very odd results which surprise me. I'm using a PHP snippet which serves application/xml+xhtml and XHTML 1.1 to those browsers...
65
by: Amol Vaidya | last post by:
Hi. I am interested in learning a new programming language, and have been debating whether to learn Ruby or Python. How do these compare and contrast with one another, and what advantages does one...
22
by: Francois | last post by:
I discovered Python a few months ago and soon decided to invest time in learning it well. While surfing the net for Python, I also saw the hype over Ruby and tried to find out more about it, before...
28
by: robert | last post by:
In very rare cases a program crashes (hard to reproduce) : * several threads work on an object tree with dict's etc. in it. Items are added, deleted, iteration over .keys() ... ). The threads are...
0
by: bruce | last post by:
hey guys... i managed to solve what i was attempting.. my goal was rather simple, to be able to have a python script, call a ruby app, and be able to return a value from the ruby (child) app to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...
0
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,...
0
jinu1996
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...

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.