Ruby vs. Rails

On Mon, Oct 09, 2006, Giles B. wrote:

Does Rails require Ruby?

Yes.

why?

I think the problem is that your question is a little too specific.
Rails (capital R, the Ruby on Rails Framework) does require Ruby…
because that’s what it’s written in and blah blah blah.

I think your real question, though, was “Is Ruby the only language in
which a framework like Rails can be written?” I’m inclined to say that
the answer to that question is no.

Obviously, it’s never going to be the same if it’s not written in Ruby.
Ruby’s expressiveness and readability are huge assets to Rails. But I
feel that a lot of the success of Rails boils down to the simple fact
that it makes it easy to do complex things, and it’s “fun” to do so.
That can be built in any language.

do the language differences lead to substantially different design
decisions? because if the similarities in the languages are part of
the frameworks’ success, then evidence should exist within the source
code, and in particular, the similarities in the languages should
probably have resulted in similar design decisions which are elegant
in Ruby and Seaside but less so elsewhere.

There’s an extended rant hiding behind this, but I’ll keep it simple:
“best” is almost always a relative term. What’s best for you and the
problems you need to solve may be the worst for someone else. What’s
best for a Java programmer is probably a Java framework.

Setting aside all of the arguments we usually hear about Java, I don’t
see any reason why a framework couldn’t be built that would deliver the
same ease and fun factor of Rails in a Java environment. Sure, it’d
take more code, and sure, it’d be Java code, but there’s nothing magical
about Ruby that enables Rails to do things.

I’m sure someone will correct me if I’m wrong, but I don’t think there
are any problems in the web application development world that can’t be
solved in any language you choose.

but the possibility also exists that just saying “this and that are
the best” is superficial and misses the point, and the real point is
you choose particular tools for particular problems. for example, I
worked with a Rails guy recently who didn’t want to use Beautiful Soup
(a Python screenscraper) because Python seemed too different from
Ruby. I disagreed, but it was his call. we benchmarked Rubyful Soup,
the Ruby port, but it was ten times slower than the Python version. so
he found a different Ruby screenscraper that was equivalent in terms
of performance with Beautiful Soup but less elegant in its use,
because it allowed him to stay within Ruby.

I should read the entire quote before I respond. This is basically what
I said above!

you might choose Django over Rails for a particular class of tasks. if
you re-implemented Django in Ruby, which parts of it would be
different upon translation, and would it still be preferable for the
same class of tasks? if you’ve ever read works in a foreign language
you know that certain literary nuances have a very difficult time
surviving translation.

Though I take your point, I don’t think comparing a translation of
programming languages to a translation of human languages is quite the
same thing. You would lose language-specific idioms, but that wouldn’t
be an issue.

A translation (for instance, Django -> Rjango), benefits primarily Ruby
programmers who hear cool things about Django and want to give it a
shot. In all likelihood they don’t know Python, or they’d be using
Django already. It wouldn’t be the same, but it would be good enough.

Ben

On Sun, 8 Oct 2006 04:10:50 +0900
“Giles B.” [email protected] wrote:

Before I go any further I should point out that I have in fact been
banned from the Rails list, probably for loud and vituperative
criticism of the list itself, but possibly also for advocating sex
with goats. (I have since made an effort at apology, although it seems
to have been unsuccessful.) At any rate, that’s one reason why I’m
posting this question here, rather than on the Rails list.

Wait, oh man this is good. Ok, I totally missed this but did you
actually advocate sex with goats or were you joking?

Please say you actually were advocating it. It’d be so much funnier.

If you were just joking and got booted then that just confirms my
opinion that most programmers have a sad sense of humor that only
understands puns, math, and physics.

On 10/8/06, Zed A. Shaw [email protected] wrote:

Wait, oh man this is good. Ok, I totally missed this but did you actually
advocate sex with goats or were you joking?

Please say you actually were advocating it. It’d be so much funnier.

If you were just joking and got booted then that just confirms my
opinion that most programmers have a sad sense of humor that only
understands puns, math, and physics.

Sorry to disappoint you but I was just joking. I’m also fairly certain
the booting occurred for other reasons. However, I posted a comment
about goats, went off to do something more productive, came back to
post a new comment about goats – I’d seen a headline that a man
caught with a goat in some Third World country had been ordered by the
local legal system to marry it – but couldn’t log back in. Therefore
it’s stuck in my mind ever since that the goat comments must have been
what got me banned, although in reality I’m sure it was something
(marginally) more grown-up than that.

I do think the absence of a sense of humor may have played a role in
the proceedings on all sides, however.

Giles B. wrote:

Weirdly enough the only other place I’ve heard of R is the same place
this question comes from. Anyway – I’m also wondering if this is such
a great thing, or just a sort of balkanization.

  1. R is certainly not a “main stream” language in the sense that Perl or
    Python are. In its original form, it was an open source dialect of the S
    language. S in turn was a brilliant design by some people at Bell Labs,
    and was based on Lisp and APL in semantics. It was dedicated to
    scientific and statistical computing.

However, R has evolved to the point where you can do “Perlish” things
like regular expressions, GUIs, web servers and web applications and
other 21st century applications without leaving the language and its
contributed library packages. If I were starting this project over from
scratch, it would probably be all in R rather than mostly Perl with
escapes to R for the statistical computations and graphics.

  1. Languages, applications, operating systems and other software
    artifacts and their communities are complex adaptive systems. They are
    born, grow up, mature, age and die, and sometimes die in their infancy.
    JOVIAL, NELIAC and MAD, for example, most likely are not in use any
    more, although members of their communities still live. I don’t think
    Algol 68 went anywhere.

  2. Are there too many “new” languages? For the sake of argument, let’s
    say anything from Perl to the present is a new language. So the major
    “new” languages I know about are

Perl, Python, PHP, Ruby, Erlang, Haskell, Java, C#, and OCAML

And I’d add “minor” new languages Lua, Pike, Dylan and Eiffel. That’s 13
“new” languages, and I’m sure I’ve left a few out. Personally, I think
the two “best” of the bunch are Ruby and Erlang, and those are the two I
am learning.

And then when you consider all the well-known “old” languages, the list
gets longer still:

FORTRAN, C, Ada, Lisp, Scheme, Forth, Pascal, Smalltalk and BASIC.

That brings the total to 22! Again, I’m sure I’ve left a few out – I
think a dialect of APL is still in use, and probably COBOL, RPG and PL/I
as well.

I think you could write a Rails-like web application framework in any
one of these languages! The “metaprogramming” and “Domain Specific
Language” tricks are probably easier to do in Ruby, Lisp, Scheme, Forth
and Smalltalk than they are to do in most of the other languages, but
I’m not convinced that’s an advantage to the user of the framework.

In point of fact, to use Rails, you have to learn the Rails syntax and
semantics, just as you had to learn the syntax and semantics of dozens
of different config files to administer a Red Hat Linux 6.2 server. So
Rails is yet another language!

I’ve seen “Snakes and Rubies” – I got the impression that they didn’t
really have people working on that stuff who knew the frameworks that
well. That’s the problem, actually; there are so many languages that
even finding someone who could speak in detail on Django, Turbogears,
Rails, and Seaside would be unusual. This means that I’ll probably
have to do it myself, and that means it probably won’t happen for a
long time. (I’m supposed to be working now, in fact.)

On 10/8/06, M. Edward (Ed) Borasky [email protected] wrote:

However, R has evolved to the point where you can do “Perlish” things
like regular expressions, GUIs, web servers and web applications and
other 21st century applications without leaving the language and its
contributed library packages. If I were starting this project over from
scratch, it would probably be all in R rather than mostly Perl with
escapes to R for the statistical computations and graphics.

The R folks I know do complexity theory, ABM, stuff like that.

My question may be too philosophical to have a useful answer. You
could write Rails in assembly if you really wanted to. The link
between a language and frameworks written in it may be too subtle to
draw useful conclusions from.

Giles B. wrote:

My question may be too philosophical to have a useful answer. You
could write Rails in assembly if you really wanted to. The link
between a language and frameworks written in it may be too subtle to
draw useful conclusions from.

I’m not sure how DHH and the original Rails team came to the decision to
extract Rails from BaseCamp and release it as an open source project.
Perhaps that’s documented somewhere, but I personally haven’t heard that
story.

But that’s in fact what happened. DHH and his team built BaseCamp in
Ruby, using the tools available to them at the time. At some point, the
underlying components – ActiveRecord, ActionPack, etc. – were
extracted/abstracted/factored from BaseCamp and released as Ruby on
Rails. In any event, BaseCamp, Ruby, the early versions of Rails, DHH
and his team are probably inextricably intertwined.

But now, as an open source project with a much larger community, Rails
could very well evolve away from Ruby, although I don’t know what
advantage there would be in that.Interestingly enough, Rails seems to be
Ruby’s “killer app”, but I don’t know that Rails has – or will ever
have – a killer app of its own. :slight_smile:

But it’s all C under the hood, you know. :slight_smile:

On 10/8/06, Zed A. Shaw [email protected] wrote:

Wait, oh man this is good. Ok, I totally missed this but did you actually advocate sex
with goats or were you joking?

Giles was actually booted because he was hostile, abrasive, and
abusive during the poorly-executed mailing list transfer. He had been
filtering the Rails list to the trash and then the shift to a Google
group broke that filter, so he started getting dozens of mails?and he
like a few other folks got hyper-pissed off about the breaking of
their filters.

The mailing list transfer was poorly executed, but what happened after
that by certain select people affected by it was not a matter of
humour.

-austin

On 10/8/06, M. Edward (Ed) Borasky [email protected] wrote:

Giles B. wrote:

My question may be too philosophical to have a useful answer. You
could write Rails in assembly if you really wanted to. The link
between a language and frameworks written in it may be too subtle to
draw useful conclusions from.

I’m not sure how DHH and the original Rails team came to the decision to
extract Rails from BaseCamp and release it as an open source project.
Perhaps that’s documented somewhere, but I personally haven’t heard that
story.

It’s documented. I’ve read it. It’s relevant but it doesn’t entirely
answer the question.

But it’s all C under the hood, you know. :slight_smile:

Are you sure? I think it’s all assembler under the hood, although
somebody told me it was all circuit design under the hood, and I know
one guy who says it’s all particle physics under the hood.

The mailing list transfer was poorly executed, but what happened after
that by certain select people affected by it was not a matter of
humour.

Liar. You know it was all about the goats.

It’s prejudice against my sexual orientation!

Are you sure? I think it’s all assembler under the hood, although
somebody told me it was all circuit design under the hood, and I know
one guy who says it’s all particle physics under the hood.

You’re very clever, young man, but it’s turtles all the way down.

Martin

On 10/8/06, M. Edward (Ed) Borasky [email protected] wrote:

But only two languages would “change the way you think about
programming.” One was Lisp, and the other was APL. Since then, only two
more have come along that changed the way I think about programming –
Forth and Smalltalk.

Surely there should be at least one Algollike language in that list -
it may now be the default way to “think about programming”, but it had
to be instilled at some point.

martin

On 10/10/06, Martin C. [email protected] wrote:

Are you sure? I think it’s all assembler under the hood, although
somebody told me it was all circuit design under the hood, and I know
one guy who says it’s all particle physics under the hood.

You’re very clever, young man, but it’s turtles all the way down.

Ah, grasshopper, but what are those turtles made of? Molecules =>
Atoms => Particles => Quantum effects

Unless Quantum Effects are turtles.

By the way, I love those “Professor” jokes. Here are two more:

A linguistics professor was giving a lecture. He told the audience:
“Although there are many examples in many languages of a double
negative having the meaning of a positive. No examples have been found
of a double positive meaning a negative.”

At which someone at the back of the hall said: “yeah, yeah”.*

A student on the Princeton campus ran into Professor Einstein. The
famous theoretician said, “Excuse me young man, can you tell me where
the Faculty dining hall is?”

The student said: “It’s right behind you professor,”

Einstein replied. “Then I must have already EATEN lunch!”

*that first one might not come across well in written form since it
depends on the ‘yeah, yeah’ being spoken in the right tone with the
second yeah in a lower tone than the first.


Rick DeNatale

My blog on Ruby
http://talklikeaduck.denhaven2.com/

Martin DeMello wrote:

martin

For a very long time, most of my programming was in either Fortran or
macro assembler. I didn’t get paid to program in something else until
the early 1990s. I certainly knew about Algol; it was a “theoretical
language” in the USA for the most part unless you happened to be
involved with Burroughs machines. But it never changed the way I thought
about programming.

When you come down to it, about the only things in Algol that weren’t in
Fortran were recursion and the block structure variable name scoping.
And recursion is far more elegantly learned from Lisp!

M. Edward (Ed) Borasky wrote:

When you come down to it, about the only things in Algol that weren’t in
Fortran were recursion and the block structure variable name scoping.

And automatic storage and adjustable arrays and the ternary operator
(expressed with “if”, “then”, and “else” keywords), and structured
programming and boolean variables.

And by-name passing, but the less said of that, the better.

About 90% of languages, including modern dialects of FORTRAN and COBOL
take a large part of their DNA from ALGOL. Only SmallTalk, the LISP
family, the APL family, and RPG have no significant ALGOL ancestry.

John W. Kennedy wrote:

About 90% of languages, including modern dialects of FORTRAN and COBOL
take a large part of their DNA from ALGOL. Only SmallTalk, the LISP
family, the APL family, and RPG have no significant ALGOL ancestry.

Well, despite the fact that Chuck Moore cut his programming teeth on
Burroughs Algol before creating Forth, I think Forth has little Algol in
it other than the fact that it is stack-based.But C is a direct
descendant of Algol – Algol --> CPL --> BCPL --> B --> C. That may not
be 90% of languages but it’s got to be close to 90 percent of the code
that’s executed every day. :slight_smile:

M. Edward (Ed) Borasky wrote:

Well, despite the fact that Chuck Moore cut his programming teeth on
Burroughs Algol before creating Forth, I think Forth has little Algol in
it other than the fact that it is stack-based.But C is a direct
descendant of Algol – Algol --> CPL --> BCPL --> B --> C. That may not
be 90% of languages but it’s got to be close to 90 percent of the code
that’s executed every day. :slight_smile:

Not to mention that Pascal is also descended from Algol, thus taking in
things such as Delphi.

But Algol is descended from Fortran, which, yes, is still in use ALL
over the country.

And let’s not mention COBOL.

Hal

At 1:56 PM +0900 10/11/06, Hal F. wrote:

And let’s not mention COBOL.

Although COBOL is not my favorite tool, I don’t know of
any arguably superior replacements for it (all things
considered) in the environments where it is used.

So, enjoy your sports car, but don’t disparage the
semi in the next lane over…

-r

http://www.cfcl.com/rdm Rich M.
http://www.cfcl.com/rdm/resume [email protected]
http://www.cfcl.com/rdm/weblog +1 650-873-7841

Technical editing and writing, programming, and web development

On 2006-10-11 07:49:35 +0200, Rich M. [email protected] said:

-r
yeap… I’ve seen a lot of big 4x4 SUV downtown… not the environment
where they should be used
:-))) lol

Hal F. wrote:

Not to mention that Pascal is also descended from Algol, thus taking in
things such as Delphi.

But Algol is descended from Fortran, which, yes, is still in use ALL
over the country.

“the” country?