perspective on ruby

Discussion in 'Python' started by RK, Apr 20, 2006.

  1. RK

    RK Guest

    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
    RK, Apr 20, 2006
    #1
    1. Advertising

  2. 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.lang.python/msg/28422d707512283

    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
    BartlebyScrivener, Apr 20, 2006
    #2
    1. Advertising

  3. 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.
    Edward Elliott, Apr 20, 2006
    #3
  4. RK

    Peter Otten Guest

    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
    Peter Otten, Apr 20, 2006
    #4
  5. 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.
    Edward Elliott, Apr 20, 2006
    #5
  6. Edward Elliott <nobody@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
    Alex Martelli, Apr 21, 2006
    #6
  7. 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.
    Edward Elliott, Apr 21, 2006
    #7
  8. In article <dpQ1g.12815$>,
    Edward Elliott <nobody@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?
    Lawrence D'Oliveiro, Apr 21, 2006
    #8
  9. OT: Mozart (was Re: perspective on ruby)

    On Thu, 20 Apr 2006, Alex Martelli wrote:

    > Edward Elliott <nobody@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
    Dave Benjamin, Apr 21, 2006
    #9
  10. In article <w1_1g.73947$>,
    Edward Elliott <nobody@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.
    Lawrence D'Oliveiro, Apr 22, 2006
    #10
  11. RK

    robert Guest

    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
    robert, Apr 22, 2006
    #11
  12. 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.
    Edward Elliott, Apr 22, 2006
    #12
  13. [OT] Prolog and Regular Expressions, Was: Re: perspective on ruby

    Lawrence D'Oliveiro wrote:
    > In article <w1_1g.73947$>,
    > Edward Elliott <nobody@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
    Kenneth McDonald, Jun 28, 2006
    #13
  14. RK

    Harry George Guest

    Re: [OT] Prolog and Regular Expressions, Was: Re: perspective on ruby

    Kenneth McDonald <> 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/Cookbook/Python/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
    Harry George, Jun 29, 2006
    #14
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jay Eckles
    Replies:
    1
    Views:
    1,642
  2. Replies:
    0
    Views:
    324
  3. david wolf
    Replies:
    2
    Views:
    4,170
    samra
    Dec 10, 2012
  4. ES
    Replies:
    44
    Views:
    411
    Mark Hubbart
    May 30, 2005
  5. Diego Virasoro

    Ruby vs. Groovy: your perspective

    Diego Virasoro, Apr 13, 2009, in forum: Ruby
    Replies:
    43
    Views:
    459
    Rick DeNatale
    Jun 6, 2009
Loading...

Share This Page