Ruby, brother of VB?

Hi. I am researching a language to switch to after Microsoft EOL'd classic
Visual Basic. Visual Basic.NET is nothing like the old VB. Having been
burned by relying on a commercial vendor, I am on a quest to find a VB like
language that is free from corporate whims. I went on a computer language
site that documented the history of computer languages and their lineage.

It was quite a shock to learn that Ruby may possibly be the brother of VB,
and that Ruby is the son of Algol 60. Just a cursery glance over Ruby
confirmed that my beloved "begin" and "end" are there. Sharing the same
genes as a Algol is quite a statement of pedigree. No wonder 60 percent of
all programers speak VB to their computers. And now, my fellow Algol 60
decendants, I am now close to making Ruby my langauge of choice. My
langauge, VB, is dying a cruel cancer of corporate apathy, but now I have
found its brother so I am rejoicing.

So my question is, what do I need to know to get started from a VB
background?

P.S. Here's the link to the comp. lang lineage chart:
http://www.levenez.com/lang/history.html

In article <3a6pkoF69qdjpU1@individual.net>,

Hi. I am researching a language to switch to after Microsoft EOL'd classic
Visual Basic. Visual Basic.NET is nothing like the old VB. Having been
burned by relying on a commercial vendor, I am on a quest to find a VB like
language that is free from corporate whims.

Well, I wouldn't call Ruby (the Ruby we all speak around these here c.l.r
parts) VB-like (some might call them fight'n words). But it is free
from corporate whims.

I went on a computer language
site that documented the history of computer languages and their lineage.

It was quite a shock to learn that Ruby may possibly be the brother of VB,

There was apparently a language which was the precursor to VB which
was called Ruby. That Ruby became VB, however that other Ruby has
nothing to do with the Ruby we're dealing with here on this
newsgroup/mailing list. Actually, about a year ago one of the creators
of that other Ruby (Mike Geary) was hanging out here on c.l.r (I think
he even made the 100,000th post). If he is
still lurking, perhaps he can offer more info on that other Ruby.

and that Ruby is the son of Algol 60. Just a cursery glance over Ruby
confirmed that my beloved "begin" and "end" are there. Sharing the same
genes as a Algol is quite a statement of pedigree.

Well, lots of languages came out of the Algol branch of the
computer language family tree.

No wonder 60 percent of
all programers speak VB to their computers. And now, my fellow Algol 60
decendants, I am now close to making Ruby my langauge of choice. My
langauge, VB, is dying a cruel cancer of corporate apathy, but now I have
found its brother so I am rejoicing.

So my question is, what do I need to know to get started from a VB
background?

Having never coded in VB, I'm not sure I'm qualified to point you in the
right direction, however, I would start by getting a copy of Dave Thomas'
"Programming Ruby" 2nd edition. I suspect you'll find that Ruby is very
different from VB, but if you stick with it I suspect you'll be
pleasantly surprised and you'll probably learn a lot.

Phil

···

Mike Cox <mikecoxlinux@yahoo.com> wrote:

Mike Cox wrote:

...
So my question is, what do I need to know to get started from a VB
background?

Forget all the VB you've ever learned. Really. I was a VB hacker for some time. I liked it, it paid the rent, got me published. But habits acquired using VB will get in the way of using Ruby.

There are essential aspects to Ruby that don't really have a counterpart in VB. Certainly the approach to OO programming in VB is, um, quite different than in Ruby.

As others have mentioned, go read Programming Ruby by Dave Thomas. But also try to find a good book that explains object-oriented programming; perhaps Designing Object-Oriented Software, by Rebecca Wirfs-Brock.

(I'd be leery of books that focused too much on Java or C#, as they have their own OO quirks that might impede grokking Ruby goodness.)

And read a lot of Ruby code. Maybe start with the Weekly Ruby Quiz (posted to this list). See if you can figure out what are doing. Ask questions. Stick around.

P.S. Here's the link to the comp. lang lineage chart:
http://www.levenez.com/lang/history.html

Means nothing, really, as it does not indicate just what was borrowed and to what degree.

James

···

--

http://catapult.rubyforge.com
http://orbjson.rubyforge.com
http://ooo4r.rubyforge.com
http://www.jamesbritt.com

[sinp all good stuff]

So my question is, what do I need to know to get started from a VB
background?
P.S. Here's the link to the comp. lang lineage chart:
http://www.levenez.com/lang/history.html

Not sure of the resemblance with Algol, but no doubt there will be a
number of differences between VB and Ruby to get started with.

There are certain things you get with Ruby that you didn't have with
VB, and viceversa.

Bad news first:
* None of the Ruby IDEs available out there resemble to the VB IDE
* You can't create OCX/ActiveX components with Ruby
* The current implementation of Ruby doesn't compile to bytecode or
native executable binary

On the other hand, the good news are really great, and I think they
greatly outnumber the disadvantages
* You get a beautiful and very clean language that doesn't get in the way.
* You usually end up having more time to think about your code, and
you end up writing less due to Ruby's expresiveness.
* There's a great number of libraries available from everything (GUI,
database, web development, graphics, and a large etcetera)
* Ruby is cross-platform and runs wonderfully on unices and Linux as
well as Windows and other platforms.
* On Windows, you can have access to the full array of niceties that
come with the platform. ( COM objects, GUI, Windows API, Services,
etc. etc.)
* It's free !! Free of charge, and free for you to read, learn and
use the source code of Ruby itself (ever wished fixing any of the
bugs inside VB ?)
* Rubyscript2exe can pack your ruby programs inside of a regular .EXE
for deployment
* No Microsoft, no discontinuation of products

To get started with all this on Windows you need 3 things:

* Windows 2000, Windows XP, 2003 or newer (Ruby will work on older
versions of Windows, but the full array of possibilities is better
exploited in the newest

* One-click Ruby Installer downloadable from
http://rubyforge.org/frs/download.php/2407/ruby182-14.exe

* Optionally, a set of useful libraries for Win32 development:
http://rubyforge.org/frs/download.php/3473/win32utils-V.0.0.3.zip

I think most Ruby coders will agree that the best way to get started
is having a look at "Programming Ruby"

( 1st edition downloadable from:
http://www.bdelmee.easynet.be/ruby/pr03a_chm.zip Windows CHM format,
Programming Ruby Phrogz' annotated PR online,
http://www.ruby-doc.org/downloads/palm/plucker/ProgrammingRuby.pdb
Palm Plucker format)

or buy the 2nd. updated and corrected edition that covers Ruby 1.8.x

Also highly recommendable "The Ruby Way" by Hal Fulton
http://www.amazon.com/exec/obidos/ASIN/0672320835/002-7526443-8888002

Finally, if you're up to a non-traditional approach to technical
writing, not faint hearted and able to appreciate one of the best
things in life is "chunky bacon", there's "Why's (Poignant) Guide to
Ruby" here:
http://poignantguide.net/ruby/
by our fellow rubyist self baptised Why The Lucky Stiff.

Happy coding !

                                   vruz

Mike

Sounds like you are in exactly the same boat as me. I've been a VB
programmer since VB2 and really can't get into (or be bothered with!)
either VB.NET or C#. I have vaguely considered Java as a possible
alternative.

However, most of my programs that I usually write in VB are
project-level front-end interfaces to Oracle database backends. I'm
starting to move over to the idea that developing these now as web
apps, using something like Ruby on Rails might be the best way to go.

It is a bit of a mind-shift to move from VB to Ruby though - certainly
I'm not easy, but I am persevering.

Glenn

"Mike Cox" <mikecoxlinux@yahoo.com> wrote in message news:<3a6pkoF69qdjpU1@individual.net>...

···

Hi. I am researching a language to switch to after Microsoft EOL'd classic
Visual Basic. Visual Basic.NET is nothing like the old VB. Having been
burned by relying on a commercial vendor, I am on a quest to find a VB like
language that is free from corporate whims. I went on a computer language
site that documented the history of computer languages and their lineage.

It was quite a shock to learn that Ruby may possibly be the brother of VB,
and that Ruby is the son of Algol 60. Just a cursery glance over Ruby
confirmed that my beloved "begin" and "end" are there. Sharing the same
genes as a Algol is quite a statement of pedigree. No wonder 60 percent of
all programers speak VB to their computers. And now, my fellow Algol 60
decendants, I am now close to making Ruby my langauge of choice. My
langauge, VB, is dying a cruel cancer of corporate apathy, but now I have
found its brother so I am rejoicing.

So my question is, what do I need to know to get started from a VB
background?

P.S. Here's the link to the comp. lang lineage chart:
http://www.levenez.com/lang/history.html

"Phil Tomson" <ptkwt@aracnet.com> answered:

Hi. I am researching a language to switch to after Microsoft EOL'd
classic
Visual Basic. Visual Basic.NET is nothing like the old VB. Having been
burned by relying on a commercial vendor, I am on a quest to find a VB
like
language that is free from corporate whims.

Well, I wouldn't call Ruby (the Ruby we all speak around these here c.l.r
parts) VB-like (some might call them fight'n words). But it is free
from corporate whims.

I have been noticing recently, writing both VB and Ruby, that they do often
look alike (ever so clean and beautiful), but, I think, for different
reasons.

VB looks clean because the syntax is very simple and inflexible, and doesn't
allow you to do all that much. 95% of all VB programs are built-in language
constructs and functions.
Ruby has "everything is an object" and that's a very powerful abstraction.
The clean syntax is clever window-dressing on this very powerful and
consistent system.

While VB makes it easy to do a lot of the things you need to do all the
time, Ruby makes doing more complicated things almost as easy. Dynamic
typing and being able to change classes or objects' behaviour as you need to
is cool. Blocks make it easy to pass code around, which is useful
surprisingly often (coming from a Basic/Java background).
OO + duck typing + blocks = you won't like VB as much afterwards.

I went on a computer language
site that documented the history of computer languages and their lineage.

It was quite a shock to learn that Ruby may possibly be the brother of VB,

There was apparently a language which was the precursor to VB which
was called Ruby. That Ruby became VB, however that other Ruby has
nothing to do with the Ruby we're dealing with here on this
newsgroup/mailing list. Actually, about a year ago one of the creators
of that other Ruby (Mike Geary) was hanging out here on c.l.r (I think
he even made the 100,000th post). If he is
still lurking, perhaps he can offer more info on that other Ruby.

and that Ruby is the son of Algol 60. Just a cursery glance over Ruby
confirmed that my beloved "begin" and "end" are there. Sharing the same
genes as a Algol is quite a statement of pedigree.

Well, lots of languages came out of the Algol branch of the
computer language family tree.

IMHO, Ruby is like Perl, but the object-orientation aspect of it is not
tacked on with sticky-tape, it's right at the foundation where it should be.
And it looks better.

No wonder 60 percent of
all programers speak VB to their computers. And now, my fellow Algol 60
decendants, I am now close to making Ruby my langauge of choice. My
langauge, VB, is dying a cruel cancer of corporate apathy, but now I have
found its brother so I am rejoicing.

So my question is, what do I need to know to get started from a VB
background?

Having never coded in VB, I'm not sure I'm qualified to point you in the
right direction, however, I would start by getting a copy of Dave Thomas'
"Programming Ruby" 2nd edition. I suspect you'll find that Ruby is very
different from VB, but if you stick with it I suspect you'll be
pleasantly surprised and you'll probably learn a lot.

I have coded in VB, but I haven't heard of anything specifically for VB-ers.
But the Pickaxe II [1] is great if it is (as it's reputed to be) as good as
Pickaxe I [2]which I have used, updated to Ruby 1.8. Also check out Why's
(Poignant) Guide to Ruby [3] and/or Matz' Ruby User's Guide [4].

Cheers,
Dave

[1] http://www.amazon.com/exec/obidos/ISBN=0974514055
[2] http://www.whytheluckystiff.net/ruby/pickaxe/
[3] http://www.poignantguide.net/ruby/
[4] http://www.ruby-doc.org/docs/UsersGuide/rg/

···

Mike Cox <mikecoxlinux@yahoo.com> wrote:

Dave Burt wrote:

VB looks clean because the syntax is very simple and inflexible, and doesn't allow you to do all that much. 95% of all VB programs are built-in language constructs and functions.

Wow. We have very different VB exposure. Most VB code I've worked with involves numerous custom classes and interfaces, along with assorted calls to the Win32 API.

Late binding and the Variant data type are quite handy, too, for dynamic programming.

Writing apps that exposed an OLE automation API (so you can script instances using external scripts), as well has hosting the Windows script control (so your application itself can load scripts), was quite entertaining.

> VB looks clean because the syntax is very simple and inflexible, and doesn't
> allow you to do all that much. 95% of all VB programs are built-in language
> constructs and functions.

Wow. We have very different VB exposure. Most VB code I've worked with
  involves numerous custom classes and interfaces, along with assorted
calls to the Win32 API.

Yeah, you get all sorts of language constructs both in VB and Ruby...
But I bet in VB you can't get something like "Microsoft's Poignant
Guide to Visual Basic" !

you can't beat that :slight_smile:

"James Britt" <jamesUNDERBARb@neurogami.com> came back with:

Dave Burt wrote:

VB looks clean because the syntax is very simple and inflexible, and
doesn't allow you to do all that much. 95% of all VB programs are
built-in language constructs and functions.

Wow. We have very different VB exposure. Most VB code I've worked with
involves numerous custom classes and interfaces, along with assorted calls
to the Win32 API.

I've certainly imported chunks of Windows API, and built pages of wrapper
functions to have them make sense in the VB context... I guess I sometimes
block those memories - maybe a psychological response. But I never got any
value whatsoever out of VB clunky classes. Classes made sense when I learned
Java.

The only VB I code now is behind MS Office, and in ASP (VBScript at least).

Late binding and the Variant data type are quite handy, too, for dynamic
programming.

True, but if you declare Variants you don't get context-menus full of
applicable properties and methods in the IDE's code editor. I often end up
declaring a fake variable just to get that list, then deleting it after
writing the line of code. Anyone?
Dim x as RecordSet
x.<look through list, pick the method, check the params it needs...>

Writing apps that exposed an OLE automation API (so you can script
instances using external scripts), as well has hosting the Windows script
control (so your application itself can load scripts), was quite
entertaining.

Gee, James, that does sound like fun, but I'll leave it to you!

Back to Ruby on the topic of scripts: I often imported
"Scripting.Dictionary" and "Scripting.Regexp" into VB/VBA/VBScript, and
Ruby's syntax sugar around these (hashes and regexps) I found a major
advantage over VB. Not to mention arrays, and having to ReDim Preserve them
to append to them. Argh.

Cheers,
Dave

vruz wrote:

VB looks clean because the syntax is very simple and inflexible, and doesn't
allow you to do all that much. 95% of all VB programs are built-in language
constructs and functions.

Wow. We have very different VB exposure. Most VB code I've worked with
involves numerous custom classes and interfaces, along with assorted
calls to the Win32 API.

Yeah, you get all sorts of language constructs both in VB and Ruby...
But I bet in VB you can't get something like "Microsoft's Poignant
Guide to Visual Basic" !

you can't beat that :slight_smile:

Not specifically VB, but:

Mr. Bunny's Guide to ActiveX

http://www.mrbunny.com/mbgtax.html
and
http://www.amazon.com/gp/reader/0201485362

James

···

--

http://catapult.rubyforge.com
http://orbjson.rubyforge.com
http://ooo4r.rubyforge.com
http://www.jamesbritt.com

Dave Burt wrote:

"James Britt" <jamesUNDERBARb@neurogami.com> came back with:

Writing apps that exposed an OLE automation API (so you can script instances using external scripts), as well has hosting the Windows script control (so your application itself can load scripts), was quite entertaining.

Gee, James, that does sound like fun, but I'll leave it to you!

That was in another life, but, given another thread going on here, I'm amused to recall that back when I was doing VB (late '90s) I was also writing what are now buzzworded as "AJAX" apps, using Internet Explorer and ASP.

James

On Sunday 20 March 2005 20:14, Dave Burt said something like:

True, but if you declare Variants you don't get context-menus full of
applicable properties and methods in the IDE's code editor. I often
end up declaring a fake variable just to get that list, then deleting
it after writing the line of code. Anyone?
Dim x as RecordSet
x.<look through list, pick the method, check the params it needs...>

That is THE number one thing I miss about VB. Not that I really like VB
all that much, but that drop-down list for objects saves having to
remember so much, and always having to go for the reference or man
page. I think I just realized why VB always felt so productive: I
wasn't having to read all the time. I knew there was function that fit
my needs, and I didn't have to look up the syntax: it would be provided
for me. Anything like this in the works for Ruby?

j----- k-----

···

--
Joshua J. Kugler -- Fairbanks, Alaska -- ICQ#:13706295
Every knee shall bow, and every tongue confess, in heaven, on earth, and
under the earth, that Jesus Christ is LORD -- Count on it!

I'm hoping to implement this style of code completion in a Ruby Editor
Plugin I'm developing for jEdit:

    animal = Duck.new
    animal.<look though list, pick the method,
                  check the params it needs>

Also I hope to allow you to do this:

    def animate(animal)
        animal.quack
        animal.<look through list, pick the method, ...>

I'll notify the list when the first release of the plugin is available.

Rob

···

Dave Burt <dave@burt.id.au> wrote:

True, but if you declare Variants you don't get context-menus
full of applicable properties and methods in the IDE's code
editor. I often end up declaring a fake variable just to get that
list, then deleting it after writing the line of code. Anyone?

Dim x as RecordSet
x.<look through list, pick the method,
     check the params it needs...>

"James Britt" <jamesUNDERBARb@neurogami.com> reminisced:

That was in another life, but, given another thread going on here, I'm
amused to recall that back when I was doing VB (late '90s) I was also
writing what are now buzzworded as "AJAX" apps, using Internet Explorer
and ASP.

That is cool. My other life doesn't even have computers in it.

"Joshua J. Kugler" <jkugler@bigfoot.com> asked:

On Sunday 20 March 2005 20:14, Dave Burt said something like:

True, but if you declare Variants you don't get context-menus full of
applicable properties and methods in the IDE's code editor. I often
end up declaring a fake variable just to get that list, then deleting
it after writing the line of code. Anyone?
Dim x as RecordSet
x.<look through list, pick the method, check the params it needs...>

That is THE number one thing I miss about VB. Not that I really like VB
all that much, but that drop-down list for objects saves having to
remember so much, and always having to go for the reference or man
page. I think I just realized why VB always felt so productive: I
wasn't having to read all the time. I knew there was function that fit
my needs, and I didn't have to look up the syntax: it would be provided
for me. Anything like this in the works for Ruby?

An upcoming (soon) version of FreeRIDE (0.9.4, I believe) has:
- Ruby Documentation plugin integrated (hit F1 to launch the plugin,
and/or to get help anywhere in your code). Hold your breath, it's coming.

Also, IRB apparently has tab-completion, but I think it needs readline,
which, on my poor Windows box, I haven't got working yet.

Cheers,
Dave

Dave Burt wrote:

"Joshua J. Kugler" <jkugler@bigfoot.com> asked:
> On Sunday 20 March 2005 20:14, Dave Burt said something like:
>> True, but if you declare Variants you don't get context-menus full of
>> applicable properties and methods in the IDE's code editor. I often
>> end up declaring a fake variable just to get that list, then deleting
>> it after writing the line of code. Anyone?
>> Dim x as RecordSet
>> x.<look through list, pick the method, check the params it needs...>
>
> That is THE number one thing I miss about VB. Not that I really like VB
> all that much, but that drop-down list for objects saves having to
> remember so much, and always having to go for the reference or man
> page. I think I just realized why VB always felt so productive: I
> wasn't having to read all the time. I knew there was function that fit
> my needs, and I didn't have to look up the syntax: it would be provided
> for me. Anything like this in the works for Ruby?

An upcoming (soon) version of FreeRIDE (0.9.4, I believe) has:
- Ruby Documentation plugin integrated (hit F1 to launch the plugin,
and/or to get help anywhere in your code). Hold your breath, it's coming.

Yes, it does... and its *really* nice!

If you don't want to wait for the release (which should be in the next week
or two), you can get it from CVS.

Curt