Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > compare between languages

Reply
Thread Tools

compare between languages

 
 
anoosh
Guest
Posts: n/a
 
      05-12-2007
what is the advantages and disadvantages of ruby vs. other programming
languages such as java, php, python

 
Reply With Quote
 
 
 
 
Nanyang Zhan
Guest
Posts: n/a
 
      05-12-2007
anoosh wrote:
> what is the advantages and disadvantages of ruby vs. other programming
> languages such as java, php, python



see
http://en.wikipedia.org/wiki/Compari...ming_languages
http://www.jvoegele.com/software/langcomp.html

enjoy!

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

 
Reply With Quote
 
 
 
 
Rick DeNatale
Guest
Posts: n/a
 
      05-12-2007
On 5/12/07, anoosh <> wrote:
> what is the advantages and disadvantages of ruby vs. other programming
> languages such as java, php, python


Programming languages are like shoes.

Do you want stylish, popular, or comfortable?

And if you want comfortable, sometimes you need time to break a new pair in.

And sometimes you keep wearing that old pair in the closet even though
they've gotten out of style and really need to have the soles
replaced.

Or you wear a popular/stylish shoe even though it kills your feet.

In other words this is a very personal question which only the
individual can decide.


--
Rick DeNatale

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

 
Reply With Quote
 
akbarhome
Guest
Posts: n/a
 
      05-12-2007
On May 12, 11:54 am, anoosh <pay...@gmail.com> wrote:
> what is the advantages and disadvantages of ruby vs. other programming
> languages such as java, php, python


http://wiki.mozilla.org/Bugzilla:Languages

 
Reply With Quote
 
xymip
Guest
Posts: n/a
 
      05-13-2007
HI,
Using terminal with ruby I encountered a problem
with the puts command. Here is the track:

Last login: Sun May 13 05:42:08 on console
Welcome to Darwin!
[stefan's-computer-2:~] stivi% echo hello world
hello world
[stefan's-computer-2:~] stivi% ruby -v
ruby 1.8.2 (2004-12-25) [universal-darwin8.0]
[stefan's-computer-2:~] stivi% puts 1+2
tcsh: puts: Command not found.

Has the command changed?

Thanks in advance
Stefan

 
Reply With Quote
 
Sebastian Hungerecker
Guest
Posts: n/a
 
      05-13-2007
xymip wrote:
> HI,
> Using terminal with ruby I encountered a problem
> with the puts command. Here is the track:
>
> Last login: Sun May 13 05:42:08 on console
> Welcome to Darwin!
> [stefan's-computer-2:~] stivi% echo hello world
> hello world
> [stefan's-computer-2:~] stivi% ruby -v
> ruby 1.8.2 (2004-12-25) [universal-darwin8.0]
> [stefan's-computer-2:~] stivi% puts 1+2
> tcsh: puts: Command not found.
>
> Has the command changed?


tcsh doesn't have a puts command and never had. Ruby has a puts command, but
you didn't actually start ruby, you entered the command into your shell.
You have to start the ruby interpreter or irb before you can enter ruby code.


--
NP: Milhaven - Clean Room
Ist so, weil ist so
Bleibt so, weil war so

 
Reply With Quote
 
philip
Guest
Posts: n/a
 
      05-13-2007
On Sun, 13 May 2007 05:52:56 -0700, xymip wrote:

> HI,
> Using terminal with ruby I encountered a problem
> with the puts command. Here is the track:
>
> Last login: Sun May 13 05:42:08 on console
> Welcome to Darwin!
> [stefan's-computer-2:~] stivi% echo hello world
> hello world
> [stefan's-computer-2:~] stivi% ruby -v
> ruby 1.8.2 (2004-12-25) [universal-darwin8.0]
> [stefan's-computer-2:~] stivi% puts 1+2
> tcsh: puts: Command not found.
>
> Has the command changed?
>
> Thanks in advance
> Stefan


Hi Stefan,
you should give irb a chance:

philip@jupiter:~$ irb
irb(main):001:0> puts "hello world"
hello world
=> nil
irb(main):002:0>
 
Reply With Quote
 
xymip
Guest
Posts: n/a
 
      05-14-2007
On May 13, 9:15 am, Sebastian Hungerecker <sep...@googlemail.com>
wrote:
> xymip wrote:
> > HI,
> > Using terminal with ruby I encountered a problem
> > with the puts command. Here is the track:

>
> > Last login: Sun May 13 05:42:08 on console
> > Welcome to Darwin!
> > [stefan's-computer-2:~] stivi% echo hello world
> > hello world
> > [stefan's-computer-2:~] stivi% ruby -v
> > ruby 1.8.2(2004-12-25) [universal-darwin8.0]
> > [stefan's-computer-2:~] stivi% puts 1+2
> > tcsh: puts: Command not found.

>
> > Has the command changed?

>
> tcsh doesn't have a puts command and never had. Ruby has a puts command, but
> you didn't actually start ruby, you entered the command into your shell.
> You have to start the ruby interpreter or irb before you can enter ruby code.
>
> --
> NP: Milhaven - Clean Room
> Ist so, weil ist so
> Bleibt so, weil war so


Yes.
Thanks both.
Starting irb the commands work.
I am using Chris Pine's 2005 book to learn ruby on mac.
The newer ruby books are still out (lots of demand in our library).
They are on reserve and I should get them in a few weeks.
In the meantime what is the best way to create a program file and then
run it via terminal?
Thanks for the help.

 
Reply With Quote
 
Martin DeMello
Guest
Posts: n/a
 
      05-14-2007
On 5/14/07, xymip <> wrote:
> In the meantime what is the best way to create a program file and then
> run it via terminal?


Edit the file with your favourite text editor, save it with a .rb
extension, then run it from the prompt using ruby <filename> <args>.
The command line arguments are captured in ARGV. For example

~ $ cat >> greet.rb
name = ARGV[0]
puts "Hello #{name}"
~ $ ruby greet.rb Martin
Hello Martin
~ $

martin

 
Reply With Quote
 
Sebastian Hungerecker
Guest
Posts: n/a
 
      05-14-2007
Martin DeMello wrote:
> On 5/14/07, xymip <> wrote:
> > In the meantime what is the best way to create a program file and then
> > run it via terminal?

>
> Edit the file with your favourite text editor, save it with a .rb
> extension, then run it from the prompt using ruby <filename> <args>.


Well, if it's a program that you are going to run a lot, I'd suggest
a) saving it without the .rb extension, making it executable via "chmod +x
<filename>" and moving it into a directory in your $PATH or
b) saving it with the .rb extension, making it executalbe and create a symlink
in your $PATH that doesn't have the extension.
Then you can call it via "<programmname> <args>" from anywhere you want.
The latter is what I do.


--
Ist so, weil ist so
Bleibt so, weil war so

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
FAQ 1.9 How does Perl compare with other languages like Java, Python, REXX, Scheme, or Tcl? PerlFAQ Server Perl Misc 0 04-08-2011 10:00 AM
Perl's reference is the best compare with other languages howa Perl Misc 4 01-02-2007 06:35 AM
how to interface between different languages eddiekwang@hotmail.com C++ 5 01-11-2006 11:16 PM
how to interface between different languages eddiekwang@hotmail.com C++ 1 01-09-2006 11:51 PM
Compare pairs of bits between two slv's ? Tony Benham VHDL 3 11-02-2003 12:29 PM



Advertisments
 



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 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57