home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Ask a Tech Support Question (free)!

Ruby

Reply
Get bargains at  »  Dealighted.com
 
Thread Tools Search this Thread
Currently Active Users: 1592
Discussions: 200,933, Posts: 2,379,176, Members: 246,298
Old January 5th, 2003, 06:41 PM   Digg it!   #1 (permalink)
may contain mild peril
 
SpookyEddy's Avatar
 
Join Date: Oct 2001
Location: UK
Posts: 3,329
Ruby

Just wondering if anyone has used Ruby ? For those who haven't its an interpreted language and designed to be OO from the ground up (if you like that kind of thing).

I was messing around with it the other day & it has some nice features IMO. Integration of perl style in-line regexps is nice, especially if you do any text processing, and support for iterators is also present. The syntax is really clean, atleast to my eye, and messing around with simple OO stuff wasn't quite as scary as when I messed around with C++ at uni (and certainly cleaner than perls OO support).

The Ruby Application Archive (RAA) offers modules & other code created by the community. I don't expect its as large as Perl's CPAN but its a good start.

If anyone is on the lookout for a new language to learn, wants to play around with some OO stuff or is just bored you could do worse than take a look at Ruby.

Regards

eddy
SpookyEddy is offline   Reply With Quote
Old January 5th, 2003, 06:56 PM     #2 (permalink)
Not Really a Member
 
Join Date: Oct 2001
Posts: 25,385
how difficult is file manipulation? (moving/opening/modifying/deleting files)

I do quite a bit of that, so always on the lookout for a good language for that
Perl its pretty easy to do that stuff, with minimal code

heard of Ruby but never played with it...
I have no idea if I included the ruby interpreter on my RH install lol
__________________
Helicopters don't fly; they vibrate so much and make so much noise that the earth rejects them.
vass0922 is online now   Reply With Quote
Old January 5th, 2003, 07:13 PM     #3 (permalink)
Member
 
Join Date: Sep 2002
Posts: 364
I couldn't find any info on it for database access. I would be willing to try it out if it has something similar to ease of use as ADO or JDBC.
Creosote is offline   Reply With Quote
Old January 5th, 2003, 07:24 PM     #4 (permalink)
may contain mild peril
 
SpookyEddy's Avatar
 
Join Date: Oct 2001
Location: UK
Posts: 3,329
Well I haven't played with any IO beyond STDIN & STDOUT, however simple file access seems easy enough.

As best I can tell you just create a new File object & invoke its new or open method (depending on what you want). Provide the file name & the access you want (read, write etc) & thats about it. Something like;
Code:
log_file = File.new("logfile.txt", "w")
#Do some other voodoo
log_file.close
You also appear to be able to do some cool stuff with iterators & file IO to read by line or byte etc (and I am sure much more).

Thnk I will have a play around with file IO a bit more this evening, seems ok so far though.

Regards

eddy
__________________
I dreamt that a large eagle circled the room three times and then got into bed with me and took all the blankets.
SpookyEddy is offline   Reply With Quote
Old January 5th, 2003, 07:31 PM     #5 (permalink)
may contain mild peril
 
SpookyEddy's Avatar
 
Join Date: Oct 2001
Location: UK
Posts: 3,329
For the database stuff you could take a look at Ruby/DBI or Ruby-ODBC . I am not really into DB stuff so I have no idea how good they are.

Regards

eddy
SpookyEddy is offline   Reply With Quote
Old January 5th, 2003, 08:50 PM     #6 (permalink)
Not Really a Member
 
Join Date: Oct 2001
Posts: 25,385
Looks good! Will certainly have to look into it


--- edit ---
It actually looks a little like vbs in some ways... pretty


Last edited by vass0922 : January 5th, 2003 at 09:30 PM.
vass0922 is online now   Reply With Quote
Old January 6th, 2003, 10:48 PM     #7 (permalink)
Banned
 
qball's Avatar
 
Join Date: Oct 2001
Posts: 447
my $0.02.

Interesting, had not heard of Ruby...

Sounds a little like the java concept, which is already here, generally accepted, works great and is free...

Quote:
Ruby features single inheritance only, *on purpose*. But Ruby knows the concept of modules (called Categories in Objective-C). Modules are collections of methods. Every class can import a module and so gets all its methods for free. Some of us think that this is a much clearer way than multiple inheritance, which is complex, and not used very often compared with single inheritance

What the heck is "single inheritance"?

Is it only one level of inheritance, or a class can only inherit from, one other class? Versus multiple inheritance in which a class can inherit from more than one class?
qball is offline   Reply With Quote
Old January 6th, 2003, 11:29 PM     #8 (permalink)
Member
 
Join Date: Feb 2002
Posts: 161
Ruby's single inheritance = each class can only have one parent class.
Martee is offline   Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Most Active Discussions
Is It Just Me? (2878)
Obama the Muslim (14)
California Passes Anti-Flat-HDTV Le.. (39)
Is the PSU I received dead? (10)
windows vista security holes (9)
Install XP pro and a Vista laptop ?.. (11)
HIS HD5770 graphic card question (15)
Print spooler problem (13)
Foreign voltage (10)
Dept. of HS: NSA 'Helped' Develop V.. (15)
A good PSU? (10)
EVGA 9800 gtx help with finding a g.. (8)
New Computer wont recognize XP disc (7)
Ideal cheap graph card for PC-Gamin.. (17)
Recent Discussions
CPU fan stops spinning randomly (1)
Wireless Televisions. (1)
Ideal cheap graph card for PC-Gaming? (17)
BIOS won't read disk when I try to fl.. (0)
Install XP pro and a Vista laptop ?? (11)
Partition Magic caused HDD problem (2)
Graphics Card Upgrade Question (1)
favorit (1)
solutions for virtical white lines on.. (1)
Regular Build (3)
Fire in DVD (2)
Modern Warfare For the PC (33)
radeon x850xt platinum & shader 3 (3)
Have you switched yet? (84)
Wireless Router+Cable Modems and Much.. (0)
Optical Audio A-B Switch (1)
windows vista security holes (9)
The NTDVM CPU has encountered an ille.. (24)
[F@H SPAM 11/16/09] ! 1/2 months to r.. (34)
Wireless speakers for PC? (11)
Print spooler problem (13)
Help getting around port 80 for camer.. (2)
Display shows 3x5 inch in middle of s.. (3)
monitor will not turn on at all, (1)
World's largest Monopoly Game using G.. (331)


All times are GMT -4. The time now is 09:17 AM.
TechIMO Copyright 2009 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28