[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

ruby shell?

Simon Schuster

8/23/2007 5:06:00 AM

what about a shell based on ruby? would such a thing be
useful/powerful? (aliasing Dir[/"usr/bin/*"] to ls returns an array,
can then specify ranges, etc) rash to
replace/include bash? :) I'm pretty new to both linux and ruby, but
why or why not?

23 Answers

Daniel Aquino

8/23/2007 6:47:00 AM

0

There is ruby based shells... Look them up and think about it some more...

You'd have to write a new shell with a ruby like syntax in all reality...

What about environment variables ?

You can't just start typing executable names that are in your path
you'd have to use back ticks or something for every single command you
want to run that isn't part of ruby...

etc...

On 8/23/07, Simon Schuster <significants@gmail.com> wrote:
> what about a shell based on ruby? would such a thing be
> useful/powerful? (aliasing Dir[/"usr/bin/*"] to ls returns an array,
> can then specify ranges, etc) rash to
> replace/include bash? :) I'm pretty new to both linux and ruby, but
> why or why not?
>
>

Robert Klemme

8/23/2007 7:02:00 AM

0

2007/8/23, Simon Schuster <significants@gmail.com>:
> what about a shell based on ruby? would such a thing be
> useful/powerful? (aliasing Dir[/"usr/bin/*"] to ls returns an array,
> can then specify ranges, etc) rash to
> replace/include bash? :) I'm pretty new to both linux and ruby, but
> why or why not?

The topic comes up frequently here. You can search the archives for
more detail.
http://blade.nagaokaut.ac.jp/ruby/ruby-talk/i...

Oh, and btw, there *is* a Ruby shell: IRB. :-)

Kind regards

robert

Daniel Aquino

8/23/2007 12:52:00 PM

0

It would be cool if we could some how write a patch that would alter
bash arrays and all that stuff to make it more rubyish...

Bash is a mess!

On 8/23/07, Robert Klemme <shortcutter@googlemail.com> wrote:
> 2007/8/23, Simon Schuster <significants@gmail.com>:
> > what about a shell based on ruby? would such a thing be
> > useful/powerful? (aliasing Dir[/"usr/bin/*"] to ls returns an array,
> > can then specify ranges, etc) rash to
> > replace/include bash? :) I'm pretty new to both linux and ruby, but
> > why or why not?
>
> The topic comes up frequently here. You can search the archives for
> more detail.
> http://blade.nagaokaut.ac.jp/ruby/ruby-talk/i...
>
> Oh, and btw, there *is* a Ruby shell: IRB. :-)
>
> Kind regards
>
> robert
>
>

Robert Klemme

8/23/2007 1:05:00 PM

0

2007/8/23, Daniel Aquino <mr.danielaquino@gmail.com>:
> It would be cool if we could some how write a patch that would alter
> bash arrays and all that stuff to make it more rubyish...
>
> Bash is a mess!

Interestingly enough the cases where I really needed arrays in bash
are extremely few. Do you need it frequently? If yes, what kind of
scripts / applications do you use it for?

Kind regards

robert

Daniel Aquino

8/23/2007 2:23:00 PM

0

It's not just arrays... lots of things are a pain..

On 8/23/07, Robert Klemme <shortcutter@googlemail.com> wrote:
> 2007/8/23, Daniel Aquino <mr.danielaquino@gmail.com>:
> > It would be cool if we could some how write a patch that would alter
> > bash arrays and all that stuff to make it more rubyish...
> >
> > Bash is a mess!
>
> Interestingly enough the cases where I really needed arrays in bash
> are extremely few. Do you need it frequently? If yes, what kind of
> scripts / applications do you use it for?
>
> Kind regards
>
> robert
>
>

M. Edward (Ed) Borasky

8/23/2007 3:00:00 PM

0

Daniel Aquino wrote:
> There is ruby based shells... Look them up and think about it some more...
>
> You'd have to write a new shell with a ruby like syntax in all reality...
>
> What about environment variables ?
>
> You can't just start typing executable names that are in your path
> you'd have to use back ticks or something for every single command you
> want to run that isn't part of ruby...

That was something that really irritated me when I migrated from "ksh"
to "ksh + (n)awk" and then to Perl. I just found actual *programming* in
"ksh" to be totally non-intuitive, and the pattern/action style of
"nawk" programming made more sense for what I was doing. Perl at least
was a real programming language. And of course Ruby is a lot more readable.


Robert Klemme

8/23/2007 4:23:00 PM

0

2007/8/23, Daniel Aquino <mr.danielaquino@gmail.com>:
> It's not just arrays... lots of things are a pain..

Sorry, I find that too unspecific. Bash is great for what it's
intended to do. It's not a general purpose programming environment
but rather a scripting engine for day to day admin tasks. Maybe you
used the wrong hammer for your nail? :-)

Kind regards

robert

Daniel Aquino

8/23/2007 4:52:00 PM

0

On 8/23/07, M. Edward (Ed) Borasky <znmeb@cesmail.net> wrote:

> I just found actual *programming* in "ksh" to be totally non-intuitive

Yea I don't really use shell's for programming unless its something
simple or a system script...

How do you compare ksh to bash scripting ?

--------

when it comes to shells... Bash is great for what it does..
It's completely based on what you need for moving around a unix system...
I'd love to have some easier ruby type syntax for the programming bits though...

Daniel Aquino

8/23/2007 4:54:00 PM

0

On 8/23/07, Robert Klemme <shortcutter@googlemail.com> wrote:
> It's not a general purpose programming environment
> but rather a scripting engine for day to day admin tasks.

I agree... but the programming side of it could becoming simpler...

Robert Klemme

8/23/2007 7:31:00 PM

0

On 23.08.2007 18:53, Daniel Aquino wrote:
> On 8/23/07, Robert Klemme <shortcutter@googlemail.com> wrote:
>> It's not a general purpose programming environment
>> but rather a scripting engine for day to day admin tasks.
>
> I agree... but the programming side of it could becoming simpler...

If you only would disclose *where* exactly you see issues. It's easy to
say "XYZ is bad" but the community (and probably you as well) would
benefit more if you came up with concrete critizism.

Cheers

robert