Areal noob question

Can Ruby run without rails?

Do I have to have Ruby gems or is there other ways of using
packages/extensions?

I read the parts of the manual that I thought would explain such but to me,
the manual takes an "assumed knowledge" POV when it come to explaining the
details of "what" rails is, why you do/donot need it and the same for gems.

Hi --

Can Ruby run without rails?

Yes: Ruby is a general-purpose programming language. Rails is a
framework (a suite of programs and programming libraries) written in
Ruby. Ruby was around and in regular use for about 11 years before
Rails was written.

Do I have to have Ruby gems or is there other ways of using
packages/extensions?

It all depends what the package's author (or some third party)
prepares and releases. Gem format is very popular; you'll also find a
lot of things released as plain tar.gz or .zip files, and there's also
another package-manager in/for Ruby called rpa-base.

David

···

On Mon, 27 Mar 2006, Ryan and Kate Huff wrote:

--
David A. Black (dblack@wobblini.net)
Ruby Power and Light, LLC (http://www.rubypowerandlight.com)

"Ruby for Rails" chapters now available
from Manning Early Access Program! Ruby for Rails

Thank you very much for your insight. As far as language maturity goes,
Ruby is technically older than PHP if you count it's Japanese heritage. I
truly love PHP and I REALLY love Java. Maintaining code in them are
nightmares though. That's what sparked my interest about Ruby and it's
"less is more" approach to syntax. I still have my reservations because
sometimes complex syntax is the better way to go. I'll have to see it for
myself when I throw down some Ruby code and try to "break it".

Ruby is yet to offer the more advance features as JAVA or PHP in my opinion
but it has the basics covered and now is the time to strike with Ruby in my
opinion, and ride the wave to the 2nd and 3rd versions.

How are the core's version upgrades handled? Just stop Apache & cut/paste
the new runtime files in the Ruby folder - similar to a PHP upgrade I guess?

···

-----Original Message-----
From: dblack@wobblini.net [mailto:dblack@wobblini.net]
Sent: Sunday, March 26, 2006 12:13 PM
To: ruby-talk ML
Subject: Re: Areal noob question

Hi --

On Mon, 27 Mar 2006, Ryan and Kate Huff wrote:

Can Ruby run without rails?

Yes: Ruby is a general-purpose programming language. Rails is a
framework (a suite of programs and programming libraries) written in
Ruby. Ruby was around and in regular use for about 11 years before
Rails was written.

Do I have to have Ruby gems or is there other ways of using
packages/extensions?

It all depends what the package's author (or some third party)
prepares and releases. Gem format is very popular; you'll also find a
lot of things released as plain tar.gz or .zip files, and there's also
another package-manager in/for Ruby called rpa-base.

David

--
David A. Black (dblack@wobblini.net)
Ruby Power and Light, LLC (http://www.rubypowerandlight.com)

"Ruby for Rails" chapters now available
from Manning Early Access Program! Ruby for Rails

[snip]

lot of things released as plain tar.gz or .zip files, and there's also
another package-manager in/for Ruby called rpa-base.

Too bad rpa doesn't appear to have seen any action since 2004, I rather
liked it as a package/repository/installation system.

andrew

···

On Mon, 27 Mar 2006 02:12:35 +0900, dblack@wobblini.net <dblack@wobblini.net> wrote:

--
Andrew L. Johnson http://www.siaris.net/
      What have you done to the cat? It looks half-dead.
          -- Schroedinger's wife

Hi --

Thank you very much for your insight. As far as language maturity goes,
Ruby is technically older than PHP if you count it's Japanese heritage.

There's no "if about it :slight_smile: Ruby didn't become real when it started
to be popular outside Japan; it was utterly real already. I saw with
my own eyes, in the Fall of 2002, twenty-three books about Ruby in
Japanese: three on CGI programming, at least one "Learn to Program"
book that used Ruby, and so forth. Those years are not the
pre-history of Ruby; they're the history of Ruby.

I truly love PHP and I REALLY love Java. Maintaining code in them
are nightmares though. That's what sparked my interest about Ruby
and it's "less is more" approach to syntax. I still have my
reservations because sometimes complex syntax is the better way to
go.

All else being equal? :slight_smile:

I'll have to see it for
myself when I throw down some Ruby code and try to "break it".

Ruby is yet to offer the more advance features as JAVA or PHP in my opinion
but it has the basics covered and now is the time to strike with Ruby in my
opinion, and ride the wave to the 2nd and 3rd versions.

How are the core's version upgrades handled? Just stop Apache & cut/paste
the new runtime files in the Ruby folder - similar to a PHP upgrade I guess?

Apache isn't directly involved, unless you're running CGI stuff and
using Apache, but basically you can upgrade either from the source
code or from a platform-specific package.

David

···

On Mon, 27 Mar 2006, Ryan and Kate Huff wrote:

-----Original Message-----
From: dblack@wobblini.net [mailto:dblack@wobblini.net]
Sent: Sunday, March 26, 2006 12:13 PM
To: ruby-talk ML
Subject: Re: Areal noob question

Hi --

On Mon, 27 Mar 2006, Ryan and Kate Huff wrote:

Can Ruby run without rails?

Yes: Ruby is a general-purpose programming language. Rails is a
framework (a suite of programs and programming libraries) written in
Ruby. Ruby was around and in regular use for about 11 years before
Rails was written.

Do I have to have Ruby gems or is there other ways of using
packages/extensions?

It all depends what the package's author (or some third party)
prepares and releases. Gem format is very popular; you'll also find a
lot of things released as plain tar.gz or .zip files, and there's also
another package-manager in/for Ruby called rpa-base.

David

--
David A. Black (dblack@wobblini.net)
Ruby Power and Light, LLC (http://www.rubypowerandlight.com)

"Ruby for Rails" chapters now available
from Manning Early Access Program! Ruby for Rails

--
David A. Black (dblack@wobblini.net)
Ruby Power and Light, LLC (http://www.rubypowerandlight.com)

"Ruby for Rails" chapters now available
from Manning Early Access Program! Ruby for Rails

Ryan and Kate Huff wrote:

Thank you very much for your insight. As far as language maturity goes,
Ruby is technically older than PHP if you count it's Japanese heritage. I
truly love PHP and I REALLY love Java.

Could you summarize what you love about PHP and Java?

Ruby is yet to offer the more advance features as JAVA or PHP in my opinion
but it has the basics covered and now is the time to strike with Ruby in my
opinion, and ride the wave to the 2nd and 3rd versions.

What are the advanced features you believe Ruby lacks?

(Seriously. I'm not trolling or asking for a flame war; I'm genuinely curious how different people perceive and evaluate programming languages.)

···

--
James Britt

"A principle or axiom is of no value without the rules for applying it."
   - Len Bullard

Well PHP is a "try to be OO" language, it's not nearly true OO. JAVA on the
otherhand is really close to OO.

With PHP I love the languages ability to transition from low to high level
machine access and it's interpopularity. PHP has a wide lib for low-level
methods and classes ( file/folder .... etc ). The biggest "need to have"
item with PHP is it's localhost operations. PHP is truly meant for a web
server. It functions well within a LAN/Intranet but doesn't deal with
network resources like JAVA does, not even close.

JAVA has to be all about networking, for me anyhow. It is a super-fast
language (compared to PHP), primarily because it's compiled and not
interpreted. I'm not as much of a fan of JAVA as I am PHP when it comes to
a web server due to "politics".

By "politics" I mean everything legal between Billy G. & Sun. All that
hogwash rendered JAVA a bit clumsy for the end-user becasue of .... "Would
you like to download this ActiveX Component". There are a lot of users that
don't "get that" part. So as a JAVA programmer you can make these really
insane web apps but unless the user says, "yes" to the IE prompt (85%-89% of
surf happens in IE still) it's all pointless and results in alot of helpdesk
tickets.

If JAVA applets and .OCX files worked seamlessly in the browser, I wouldn't
be in this thread to tell you the truth.

I guess I'm a lost programmer, I want everything PHP & JAVA wrapped into 1
seamless package (and can work well with MSSQL, MySQL, PostGres, DB2, ...
etc). I don't know that I'll ever find it but we'll see where Ruby rates on
my "usable-o-meter".

···

-----Original Message-----
From: James Britt [mailto:james_b@neurogami.com]
Sent: Sunday, March 26, 2006 1:10 PM
To: ruby-talk ML
Subject: Re: Areal noob question

Ryan and Kate Huff wrote:

Thank you very much for your insight. As far as language maturity goes,
Ruby is technically older than PHP if you count it's Japanese heritage. I
truly love PHP and I REALLY love Java.

Could you summarize what you love about PHP and Java?

Ruby is yet to offer the more advance features as JAVA or PHP in my

opinion

but it has the basics covered and now is the time to strike with Ruby in

my

opinion, and ride the wave to the 2nd and 3rd versions.

What are the advanced features you believe Ruby lacks?

(Seriously. I'm not trolling or asking for a flame war; I'm genuinely
curious how different people perceive and evaluate programming languages.)

--
James Britt

"A principle or axiom is of no value without the rules for applying it."
   - Len Bullard

Thank you very much for your insight. As far as language maturity goes,
Ruby is technically older than PHP if you count it's Japanese heritage.
I truly love PHP and I REALLY love Java.

Could you summarize what you love about PHP and Java?

I'm still learning Ruby (so don't flame me too hard here), but some of the
programming paradigms I've grown accustomed to such as inline scope
declarations and type hinting are missed (at least by me).

protected foo( SomeObject o ) { ... }

In that one line I can tell you that the method is protected and requires
SomeObject to be passed to it. Versus Ruby's:

protected

def foo( o )
    ...
end

My issue here is that the 'protected' declaration might not occur anywhere
near the method which means I either have to scan up the class file looking
for that declaration or use reflection on the class. This is one of those
"less is more" view points where its nicer to declare protected once and
anything after it assumes that scope, yet I find it obscure since it might
be distant from a method I'm interested in. I'm also not sure what 'o' is
supposed to be. Should that be a String, Fixnum, or maybe a custom Object
(I guess I could inspect the method code to help identify what 'o' is)?

-Dave

Ryan and Kate Huff wrote:

Well PHP is a "try to be OO" language, it's not nearly true OO. JAVA on the
otherhand is really close to OO.

Does Ruby's "hardcore" OO suit you? Ruby is far more OO than either PHP or Java.

> ...

By "politics" I mean everything legal between Billy G. & Sun. All that
hogwash rendered JAVA a bit clumsy for the end-user becasue of .... "Would
you like to download this ActiveX Component". There are a lot of users that
don't "get that" part. So as a JAVA programmer you can make these really
insane web apps but unless the user says, "yes" to the IE prompt (85%-89% of
surf happens in IE still) it's all pointless and results in alot of helpdesk
tickets.

If JAVA applets and .OCX files worked seamlessly in the browser, I wouldn't
be in this thread to tell you the truth.

Interesting. About all I can say is that we're miles apart on how we each prefer to build Web applications.

For what it's worth, there are a number of Web development frameworks for Ruby, some of which include very good support for DTHML/AJAX client-side widgets; you might want to take a look at Nitro and Rails.

I don't know if you think modern JavaScript (i.e., DOM scripting + XMLHttpRequest) can replace applets and OCX controls, but it's worth considering.

···

--
James Britt

http://www.ruby-doc.org - Ruby Help & Documentation
Ruby Code & Style - The Journal By & For Rubyists
http://www.rubystuff.com - The Ruby Store for Ruby Stuff
http://www.jamesbritt.com - Playing with Better Toys
http://www.30secondrule.com - Building Better Tools

Well PHP is a "try to be OO" language; it's not nearly true OO

Have you seen PHP v5: PHP: Classes and Objects - Manual

-Dave

David Ishmael wrote:

I'm still learning Ruby (so don't flame me too hard here), but some of
the
programming paradigms I've grown accustomed to such as inline scope
declarations and type hinting are missed (at least by me).

protected foo( SomeObject o ) { ... }

In that one line I can tell you that the method is protected and
requires
SomeObject to be passed to it. Versus Ruby's:

protected

def foo( o )
    ...
end

Can't help much with the protected issue, but

  def foo(some_object)
  end

Tells you what foo expects as an argument.

···

--
-- Jim Weirich

--
Posted via http://www.ruby-forum.com/\.

It sure does, working with objects is so much easier than dealing with a
butt load of functions. That among the "less is more" approach to syntax is
what has sparked my interest in Ruby. I am hesitant about undergoing a
"standards conversion" on my employers web server(s) that I maintain because
I fear that I'll hit a brick wall in Ruby when trying to convert some of the
applications.

It's just a matter of playing and testing ....

···

-----Original Message-----
From: James Britt [mailto:james_b@neurogami.com]
Sent: Sunday, March 26, 2006 2:03 PM
To: ruby-talk ML
Subject: Re: Areal noob question

Ryan and Kate Huff wrote:

Well PHP is a "try to be OO" language, it's not nearly true OO. JAVA on

the

otherhand is really close to OO.

Does Ruby's "hardcore" OO suit you? Ruby is far more OO than either PHP
or Java.

> ...

By "politics" I mean everything legal between Billy G. & Sun. All that
hogwash rendered JAVA a bit clumsy for the end-user becasue of .... "Would
you like to download this ActiveX Component". There are a lot of users

that

don't "get that" part. So as a JAVA programmer you can make these really
insane web apps but unless the user says, "yes" to the IE prompt (85%-89%

of

surf happens in IE still) it's all pointless and results in alot of

helpdesk

tickets.

If JAVA applets and .OCX files worked seamlessly in the browser, I

wouldn't

be in this thread to tell you the truth.

Interesting. About all I can say is that we're miles apart on how we
each prefer to build Web applications.

For what it's worth, there are a number of Web development frameworks
for Ruby, some of which include very good support for DTHML/AJAX
client-side widgets; you might want to take a look at Nitro and Rails.

I don't know if you think modern JavaScript (i.e., DOM scripting +
XMLHttpRequest) can replace applets and OCX controls, but it's worth
considering.

--
James Britt

http://www.ruby-doc.org - Ruby Help & Documentation
Ruby Code & Style - The Journal By & For Rubyists
http://www.rubystuff.com - The Ruby Store for Ruby Stuff
http://www.jamesbritt.com - Playing with Better Toys
http://www.30secondrule.com - Building Better Tools

Sure we can! :wink: Use the other protected method declaration syntax:

def foo...

def bar...

protected :foo, :bar

Hope that helps.

James Edward Gray II

···

On Mar 27, 2006, at 7:52 AM, Jim Weirich wrote:

David Ishmael wrote:

I'm still learning Ruby (so don't flame me too hard here), but some of
the
programming paradigms I've grown accustomed to such as inline scope
declarations and type hinting are missed (at least by me).

protected foo( SomeObject o ) { ... }

In that one line I can tell you that the method is protected and
requires
SomeObject to be passed to it. Versus Ruby's:

protected

def foo( o )
    ...
end

Can't help much with the protected issue, but

Jim Weirich wrote:

def foo( o )
    ...
end

Can't help much with the protected issue, but

  def foo(some_object)
  end

Tells you what foo expects as an argument.

We must next ask: Do we care what the
class/type/race/gender/religion/political-inclination of some_object is?

def foo( some_object )
  # All I care about is...
  if some_object.respond_to? do_some_job
    some_object.do_some_job
  end
end

David Ishmael: It looks like you might still have some grime stuck to
your clothes from previous languages. :slight_smile: I've been doing Ruby now for
about 4 years, coming from a Java background, and type declarations like
you pointed out are one thing I just don't miss, nor found the need for
in Ruby...

···

--
Posted via http://www.ruby-forum.com/\.

I didn't know you could do that (seems I learn something new about Ruby
everyday)! That's pretty handy, however to be useful it should be at the
top of the class versus at the bottom (after the methods are declared). The
following generates an error ...

class Test
  protected :foo

  def foo
  end

end

ruby Test.rb

Test.rb:2:in `protected': undefined method `foo' for class `Test'
(NameError)
        from Test.rb:2

I understand why I get the error (I'm declaring a method before it's seen)
but logically, the scope declaration should appear (IMO) at the top of the
class along with class properties and attr_* statements. Why can I declare
an attribute readable/writeable/both before it's declared but not methods?
It seems like the interpreter should peek ahead for methods too. *shrug*

-Dave

···

-----Original Message-----
From: James Edward Gray II [mailto:james@grayproductions.net]
Sent: Monday, March 27, 2006 9:00 AM
To: ruby-talk ML
Subject: Re: Areal noob question

On Mar 27, 2006, at 7:52 AM, Jim Weirich wrote:

David Ishmael wrote:

I'm still learning Ruby (so don't flame me too hard here), but
some of
the
programming paradigms I've grown accustomed to such as inline scope
declarations and type hinting are missed (at least by me).

protected foo( SomeObject o ) { ... }

In that one line I can tell you that the method is protected and
requires
SomeObject to be passed to it. Versus Ruby's:

protected

def foo( o )
    ...
end

Can't help much with the protected issue, but

Sure we can! :wink: Use the other protected method declaration syntax:

def foo...

def bar...

protected :foo, :bar

Hope that helps.

James Edward Gray II

Using one of the attr* methods just declares a new method or two for you (as a shortcut). No peeking ahead is involved.

James Edward Gray II

···

On Mar 27, 2006, at 8:12 AM, David Ishmael wrote:

Why can I declare an attribute readable/writeable/both before it's declared but not methods?
It seems like the interpreter should peek ahead for methods too. *shrug*