Hello everyone,

I just started to learn how to program in Ruby. It is a pretty cool language. You can get ruby from www.ruby-lang.org. You can see my code snippets on making widgets using fxRuby (fxRuby is downloaded seperatly from ruby, unless you get the one click installer, which installs everything). But first here is a hello world program written in Ruby:

Hello, World.rb

puts "Hello, World! I am writing in the Ruby programming language"

Recommended Answers

All 21 Replies

Pure genius Dark!

Here is the same in Python ...

print "Hello, World! I am writing in the Python programming language"

How are your C# efforts coming along?

I think I am going to learn python too, I have notice that a lot of people use it.

thanks vegaseat

Yeah, I wanna learn Ruby and I've started a self-tutorial on it on my blog, using the Sams Teach Yourself In 21 Days book and blogging out a post every day of the three weeks:

http://alabut.com/nonsense/2005/03/learn-ruby-in-3-weeks.html

I'm starting this Sunday, March 22, 2005, but the beauty of the blogosphere is that all the posts will be up forever for anyone else interested. It's building quite a bit of steam and I'm hoping this will be a great resource for anyone that wants to jump into this pool too.

Al Abut
- - -
http://alabut.com
- - -

Here is the same in Python ...

Code:
print "Hello, World! I am writing in the Python programming language"

I know this is from awhile back, but you can use print in ruby and it does the same thing as puts.

Seems like a nice laguage. I`m going to try it :p

Pure genius Dark!

Here is the same in Python ...

print "Hello, World! I am writing in the Python programming language"

How are your C# efforts coming along?

Lies! You replaced the word Ruby with Python!

Yes, I'll add a few words on RUBY. I saw it referenced a while ago along with hundreds of others. (So much creativity, so little time to learn.)

Recently, it was compared in Infoworld magazine against others for quick AJAX development frameworks and billed as Ruby on Rails. Since the competition was a hundred a seat all the way up to $50,000 to start while Ruby is Open Source, it was a simple choice.

I googled a fabulous tutorial by Chris Pine (as an author, he's smart and doesn't wear your eyes out). It is here: http://pine.fm/LearnToProgram/?Chapter=Contents

RUBY appears to have some incredibly strong structural advantages. It is clearly the product of someone with lots of other language experience. I hate language authors who use crazy new conventions like C++'s COUT and CIN. In Assembler, for example, all operands are right to left, except one and that one makes sense to be left to right. If you know Assembler, you know which one I mean. I thought I'd be settling in with Eiffel but after MS gave them the .NET imprimateur, they jacked their language to $5,000 a seat. Too rich for my blood!

A language needs predictability, which shortens the learning curve and increases the success to mistake ratio. Ruby accomplishes that with simple consistent structure and does it without all of the extra syntax parsing characters that many lazy compiler writers require.

AND did I mention it is Open Source?

If that isn't enough, it appears to be a pure OOL. I had to look up a lot of interesting terms (WIKIPEDIA RULES!) to develop a clear understanding of an OOL construct beyond the current C++ debacle. It was well worth it to find out why "Matz" chose single inheritance instead of multiple but allowed so much other power, e.g. blocks and procs can be passed through methods... WOWWWWW!!!

When I finished Chris's tutorial I had the same "Oh boy, here we go feeling." that I had in 1984 when I finished K&R's book on C. Now look where C is. Every Processor, every platform, most languages, most embedded code and most heavy duty apps. Yikes. Imagine the power of C if K&R had envisioned encapsulation. C++ would have never been born.

So how about it? Is Daniweb ready for Ruby?

Hi!

I know this is from awhile back, but you can use print in ruby and it does the same thing as puts.

Nor really ;). Try this

print "not"
puts "the"
p "same"

Regards, mawe

Along comes Boo, looks like Python and Ruby rolled into one, and you can compile it to an executable file, or use it in the shell.

http://boo.codehaus.org/

Will give a try, thanks for the website.

Went to the Boo code snipet here on this site. Downloaded BOO from recomended site and a nice editor/IDE called Boodle (hehe). The snipet works well and seems fun.

yes i want to learn ruby,and i am able to create some from also,but i dont know the database connectivity with MySql can anyone help me to connect my apllication to dtabase...plzz

can anybody tell me how to connect to mysql with my application ,i am ne wto ruby on rails,plzz

>>i am ne wto ruby on rails,plzz

what in the world does that mean :eek: :eek: Looks like half English and half Gibberish.

Member Avatar for iamthwee

>>i am ne wto ruby on rails,plzz

what in the world does that mean :eek: :eek: Looks like half English and half Gibberish.

converted

i am new to ruby on rails, please

Let's stop this right here guys, please.

Along comes Boo, looks like Python and Ruby rolled into one, and you can compile it to an executable file, or use it in the shell.

http://boo.codehaus.org/

Well it is really a .Net language so it still is a JIT language.

Hi Dark_Omen,

Interactive Programming Books can help you a lot to learn new programming language. Try out free interactive programming book on Ruby at http://roorky.com. You can edit or execute code snippets right out of the book.

Thanks
-- pkc

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.