Forum: Ruby Re: Does Ruby simplify our tasks and lives?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Peña, Botp (Guest)
on 2006-04-04 12:38
(Received via mailing list)
Simplicity [mailto:removed_email_address@domain.invalid] wrote last Tuesday, 
April
04, 2006 3:24 PM:

#I suppose anyone can make something complex or messy, no
#matter what the language or tool.  Agree?

yes, but why care/think about that (and worst, aim for it??) ?

programmers solve (people's) problems. it is not easy solving problems.
Ergo, the humble programmer must find ways that will make his life
happy...  On my case, I found ruby, and it has lesser "abstraction
impedance", and it has made me happy. Agree?

kind regards -botp
unknown (Guest)
on 2006-04-04 13:03
(Received via mailing list)
I think this may be more of a unix question than a Ruby question...

If I create a test script:
  echo "echo hello world" > test_script

On "source" this from the unix command line:
  . ./test_script

...and I get the expected result.

I can also run it from the unix command line:
  chmod 755 ./test_script
  ./test_script

...again, I get the expected result.


However, if I now dive in to irb and try to run the script...
  irb(main):001:0> `./test_script`

It comes back with:
  (irb):1: command not found: ./test_script

However, if I ammend test_script by adding a sh'bang line at the start,
so that it now reads...
  #!/bin/sh
  echo hello world

And run it from irb, it will "do the right thing". :) I'm just wondering
why?!?!?!

Thankyou for any elucidation,
  Benjohn B.
Simplicity (Guest)
on 2006-04-05 01:36
(Received via mailing list)
I'm not sure people purposely aim for complexity, it is something that
many people, in my experience, just do naturally.  Don't know why.
Maybe, it's an attempt to create something better than it needs to be,
but resulting in something more complex than necessary.

I agree.  We all want to get home early, enjoy the family, and have a
life.  Work smarter, not longer.  Choosing the right tools for the job
is a smart thing.

Barry
http://www.simplicityfirst.org
kevin (Guest)
on 2006-04-05 01:45
(Received via mailing list)
It's because your shell is made to read shell scripts. Ruby needs to
know what to use if it's a different syntax than ruby.
This topic is locked and can not be replied to.