DevHeads.net

Ruby without Rails?

Hi Rubyists!

I'm a beginner who is trying to learn Ruby. I have noticed how people
always link rails to ruby,I'm sure it's one hell of a framework and does
boosts Ruby's popularity.But I wanted to know if ruby can hold its own
against other languages if there is no rails.

Just a question from a newbie.

Yours Sincerely,

Surya Poojary.

Comments

Re: Ruby without Rails?

By Nicola Mingotti at 11/15/2017 - 09:32

I am a beginner like you.

I started to use Ruby one month ago and my priority was
making short scripts for Linux system administration and
controlling the BeagleBone Black.

I must say in this respect Ruby really rocks, these are my arguments
about it:

-] It has a REPL that is part of the language (irb) [Perl does not,
Python does]

-] It has great features from Perl: builtin regexp, powerful string
quoting %q, %Q, nice
string interpolation, clean way to call other shell programs : ` ` .
[Perl has, Python has but IMHO not so practical to use ]

-] You can write long numbers as "100_00_123_4_56", so, you can use Ruby
as a pocket calculator, I need it a lot of times. [ Perl has, but it is
not born to be used in a REPL,
Python has it only from release 3.6 (i guess) ]

-] As easy to read as Python. But in Ruby you can write your logic in a
single line, in Python not. So, good for one-liners. [ Perl is not so
nice to read, but rocks in one-liners ]

-] Ruby uses Scheme way of designing methods that return booeleans (with
"?") and methods that are destructive(with  "!") [ Perl does not, Python
does not ]

-] As in Lisp each time you run a "statement" you get a value back. This
is very
good, I appreciate it. [ Python does not do it always (AFAIRemember),
and Perl,
what it returns it depends on what it expects ]

-] In general, if you know other programming languages you will see
Ruby tries to take the best from each one of them. And, IMHO it succedes.

Given that, I will write all code I was writing in Python, Perl, Bash in
Ruby from
now on. Because I think it is a very clean and comprehensive generale
purpose tool.

Bye
Nicola

On 14/11/2017 08:21, Surya Poojary wrote:

Re: Ruby without Rails?

By Miguel Angel at 11/15/2017 - 10:07

excellent analysis!!

I am a beginner like you.

I started to use Ruby one month ago and my priority was
making short scripts for Linux system administration and
controlling the BeagleBone Black.

I must say in this respect Ruby really rocks, these are my arguments about it:

-] It has a REPL that is part of the language (irb) [Perl does not, Python does]

-] It has great features from Perl: builtin regexp, powerful string quoting %q, %Q, nice
string interpolation, clean way to call other shell programs : ` ` .
[Perl has, Python has but IMHO not so practical to use ]

-] You can write long numbers as "100_00_123_4_56", so, you can use Ruby as a pocket calculator, I need it a lot of times. [ Perl has, but it is not born to be used in a REPL,
Python has it only from release 3.6 (i guess) ]

-] As easy to read as Python. But in Ruby you can write your logic in a single line, in Python not. So, good for one-liners. [ Perl is not so nice to read, but rocks in one-liners ]

-] Ruby uses Scheme way of designing methods that return booeleans (with "?") and methods that are destructive(with "!") [ Perl does not, Python does not ]

-] As in Lisp each time you run a "statement" you get a value back. This is very
good, I appreciate it. [ Python does not do it always (AFAIRemember), and Perl,
what it returns it depends on what it expects ]

-] In general, if you know other programming languages you will see
Ruby tries to take the best from each one of them. And, IMHO it succedes.

Given that, I will write all code I was writing in Python, Perl, Bash in Ruby from
now on. Because I think it is a very clean and comprehensive generale purpose tool.

Bye
Nicola

Hi Rubyists!

I'm a beginner who is trying to learn Ruby. I have noticed how people always link rails to ruby,I'm sure it's one hell of a framework and does boosts Ruby's popularity.But I wanted to know if ruby can hold its own against other languages if there is no rails.

Just a question from a newbie.

Yours Sincerely,

Surya Poojary.

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe><mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk><http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>

Re: Ruby without Rails?

By Ken D'Ambrosio at 11/14/2017 - 20:55

On 2017-11-14 02:21, Surya Poojary wrote:
Hi! As a system administrator, I use Ruby -- plain, relatively vanilla
Ruby -- all the time. I prefer it over Perl (it's more modern, does OOP
much more gracefully, and overall feels more like a *language*), and
over Python (Python irks me in some trivial ways -- for example, it
always seems arbitrary whether something is a function or a method;
Python's space-indentation makes it a real PITA to cut-and-paste,
likewise the same for executing one-liners from the CLI). Right now,
I'm a cloud admin, and have taken to writing lots of scripts that talk
to the Openstack APIs, because the Openstack CLI tools are bugging me.
(Who sends errors to STDOUT?!?!)

I also like the fact that it still retains some of the easy regex use
that Perl had, as well as some other things.

$.02, YMMV, etc.

-Ken

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>

Re: Ruby without Rails?

By Ivan Cenov at 11/14/2017 - 13:32

See these books

Wicked Cool Ruby Scripts
Everyday Scripting with Ruby

An example of using Ruby scripts as framework is Unity Unit Test
framework <https://github.com/ThrowTheSwitch/Unity> for C language.

Regards

На 14.11.2017 г. в 9:21, Surya Poojary написа:

Re: Ruby without Rails?

By ali raza at 11/14/2017 - 14:28

thank you everyone

Re: Ruby without Rails?

By Patrick Bayford at 11/14/2017 - 16:19

On 14/11/2017 19:28, ali raza wrote:

Re: Ruby without Rails?

By Surya Poojary at 11/14/2017 - 10:53

I have been through that stage ...the problem is that you get bored fast of
languages.. I would suggest you learn Ruby and go through the standard
library and try to solve your problem with it.

RE: Ruby without Rails?

By Andy Jones at 11/14/2017 - 10:59

Learn Ruby first. Then learn Rails, if you want to.

I find <a href="http://exercism.io/" title="http://exercism.io/">http://exercism.io/</a> to be a good way to learn, but everyone is different.

I have been through that stage ...the problem is that you get bored fast of languages.. I would suggest you learn Ruby and go through the standard library and try to solve your problem with it.

Hi Rubyists!

I'm a beginner who is trying to learn Ruby. I have noticed how people always link rails to ruby,I'm sure it's one hell of a framework and does boosts Ruby's popularity.But I wanted to know if ruby can hold its own against other languages if there is no rails.

Just a question from a newbie.

Yours Sincerely,

Surya Poojary.

Click here to view Company Information and Confidentiality Notice.<http://www.jameshall.co.uk/index.php/small-print/email-disclaimer>

Re: Ruby without Rails?

By Mugurel Chirica at 11/14/2017 - 11:57

+10 for Exercism, it's a very website to work on exercises on any language,
and there are helpful peers and mentors that can help you improve your code.

Re: Ruby without Rails?

By Xavier Noria at 11/14/2017 - 02:25

Yes!

Re: Ruby without Rails?

By Surya Poojary at 11/14/2017 - 02:31

Thanks !!! for the quick reply!!!

Want to become a Rubyist like y'all :)

Re: Ruby without Rails?

By Maria Tikhonova at 11/14/2017 - 03:00

best of luck!

Re: Ruby without Rails?

By Surya Poojary at 11/14/2017 - 03:48

Thank you !