By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,651 Members | 1,757 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,651 IT Pros & Developers. It's quick & easy.

perspective on ruby

P: n/a
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
Share this Question
Share on Google+
13 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.