|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Can you use irb in place of shells like bash or rc?
|
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
> Can you use irb in place of shells like bash or rc?
not really, but kinda, yeah. you can do "system ('any unix command')" from inside irb really easily, and you could also set up a method which automatically took any input you gave irb and passed that along to system, but you wouldn't get tab-completion, you'd have to manually print the strings you received back - they come back with newline escape sequences rather than newlines - and I really don't know how you would be able to get system (or backticks, which do almost exactly the same thing) to load your .profile or .foo_shrc files. you can do pretty much anything you want in Unix from within irb, but actual Unix shells remain the best way to do it. (although I think there was an actual irb shell written, so I could be wrong.) -- Giles Bowkett Podcast: http://hollywoodgrit.blogspot.com Blog: http://gilesbowkett.blogspot.com Portfolio: http://www.gilesgoatboy.org Tumblelog: http://giles.tumblr.com |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
On Dec 1, 2007, at 6:45 PM, Giles Bowkett wrote: >> Can you use irb in place of shells like bash or rc? > > not really, but kinda, yeah. > > you can do "system ('any unix command')" from inside irb really > easily, and you could also set up a method which automatically took > any input you gave irb and passed that along to system, but you > wouldn't get tab-completion, you'd have to manually print the strings > you received back - they come back with newline escape sequences > rather than newlines - and I really don't know how you would be able > to get system (or backticks, which do almost exactly the same thing) > to load your .profile or .foo_shrc files. > > you can do pretty much anything you want in Unix from within irb, but > actual Unix shells remain the best way to do it. (although I think > there was an actual irb shell written, so I could be wrong.) > > -- > Giles Bowkett > > Podcast: http://hollywoodgrit.blogspot.com > Blog: http://gilesbowkett.blogspot.com > Portfolio: http://www.gilesgoatboy.org > Tumblelog: http://giles.tumblr.com > Some day, some day, somebody smarter and more ambitious than me will build that Ruby-native shell with all the joy of Ruby and command line tools integrated... |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
John Joyce wrote:
> > On Dec 1, 2007, at 6:45 PM, Giles Bowkett wrote: > >>> Can you use irb in place of shells like bash or rc? >> >> not really, but kinda, yeah. >> >> you can do "system ('any unix command')" from inside irb really >> easily, and you could also set up a method which automatically took >> any input you gave irb and passed that along to system, but you >> wouldn't get tab-completion, you'd have to manually print the strings >> you received back - they come back with newline escape sequences >> rather than newlines - and I really don't know how you would be able >> to get system (or backticks, which do almost exactly the same thing) >> to load your .profile or .foo_shrc files. >> >> you can do pretty much anything you want in Unix from within irb, but >> actual Unix shells remain the best way to do it. (although I think >> there was an actual irb shell written, so I could be wrong.) >> >> -- >> Giles Bowkett >> >> Podcast: http://hollywoodgrit.blogspot.com >> Blog: http://gilesbowkett.blogspot.com >> Portfolio: http://www.gilesgoatboy.org >> Tumblelog: http://giles.tumblr.com >> > Some day, some day, somebody smarter and more ambitious than me will > build that Ruby-native shell with all the joy of Ruby and command > line tools integrated... Thanks to both of you and I can only hope that somebody comes along soon. I wish I had the experience and skill to do it my self, but multiple failure with other big and ambitious projects I took on taught me some humility. |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
This is one of those questions where consulting with rubyforge.org can
be ful. ![]() http://rubyforge.org/projects/rbsh/ I can't speak for it, I haven't really used it. Cameron |
|
|
|
#6 |
|
Messages: n/a
Hébergeur: |
> Some day, some day, somebody smarter and more ambitious than me will
> build that Ruby-native shell with all the joy of Ruby and command > line tools integrated... hehe working on that with my limited abilities... ![]() Unfortunately, aside from time problems, I found two stop things: First, I need something that can replace irb easily, so that you get all the important functionality of irb and which has sufficient docu to allow "normal" programmers unterstand what is going on (understanding how IRB works is possible, but i found it takes a lot of time, and isnt as fun as starting from scratch) Something that is as flexible as irb-in-a-browser too, but for some reason I didnt find this very easy... Second, I still have no real way on how to do piping of objects/data with a ruby shell. (After all we are talking of a real shell, no? One like in bash where you can apply filters...) And also... ruby-ncurses would be nice to have, so that we can get zsh-like "borders" around a prompt (and RPROMPT etc.. etc.. etc..) But for now its a lot easier to replace all t he simple unix tools in pure ruby... thats not that difficult, just quite some work "but you wouldn't get tab-completion" Well you can, with Readline.readline and using a proc object for tab completion. The docu is a little bit weird, but with a little i got that to work. -- Posted via http://www.ruby-forum.com/. |
|
|
|
#7 |
|
Messages: n/a
Hébergeur: |
> "but you wouldn't get tab-completion"
> Well you can, with Readline.readline and using a proc > object for tab completion. The docu is a little bit weird, > but with a little i got that to work. Is there a way to integrate that with irb? A Unix shell with .irbrc special sauce would be pretty nifty. Although I have to admit I haven't got the hang of it yet: ! ruby ruby_shell.rb RubyShell> ls (tab) svn/ ruby_shell/ ruby_shell.rb RubyShell> ls ../README RubyShell> ls -l !$ RubyShell> ls -l ../README ls: fts_open: No such file or directory -- Giles Bowkett Podcast: http://hollywoodgrit.blogspot.com Blog: http://gilesbowkett.blogspot.com Portfolio: http://www.gilesgoatboy.org Tumblelog: http://giles.tumblr.com |
|
|
|
#8 |
|
Messages: n/a
Hébergeur: |
On Dec 2, 1:29 pm, Giles Bowkett <gil...@gmail.com> wrote:
> > "but you wouldn't get tab-completion" > > Well you can, with Readline.readline and using a proc > > object for tab completion. The docu is a little bit weird, > > but with a little i got that to work. > > Is there a way to integrate that with irb? Tab completion? Already in there. In .irbrc... require 'irb/completion' > A Unix shell with .irbrc > special sauce would be pretty nifty. Although I have to admit I > haven't got the hang of it yet: > > ! ruby ruby_shell.rb > RubyShell> ls (tab) > svn/ ruby_shell/ ruby_shell.rb > RubyShell> ls ../README > RubyShell> ls -l !$ > RubyShell> ls -l ../README > ls: fts_open: No such file or directory > > -- > Giles Bowkett > > Podcast:http://hollywoodgrit.blogspot.com > Blog:http://gilesbowkett.blogspot.com > Portfolio:http://www.gilesgoatboy.org > Tumblelog:http://giles.tumblr.com Regards, Jordan |
|
|
|
#9 |
|
Messages: n/a
Hébergeur: |
> Tab completion? Already in there. In .irbrc...
> > require 'irb/completion' I know - got it already. Talking abut Unix tab completion. (That happens in ruby_shell, but I don't know how.) -- Giles Bowkett Podcast: http://hollywoodgrit.blogspot.com Blog: http://gilesbowkett.blogspot.com Portfolio: http://www.gilesgoatboy.org Tumblelog: http://giles.tumblr.com |
|
|
|
#10 |
|
Messages: n/a
Hébergeur: |
Hi,
I have downloaded Rails-1.2.6.zip manually as my proxy settings are restricting Ruby to do it automatically. Now that Rails-1.2.6.zip is with me.. To which directory should I extract these files to.=20 Thanks in advance Gowrisankar. narayan DISCLAIMER: This message contains privileged and confidential information and is = intended only for an individual named. If you are not the intended = recipient, you should not disseminate, distribute, store, print, copy or = deliver this message. Please notify the sender immediately by e-mail if = you have received this e-mail by mistake and delete this e-mail from = your system. E-mail transmission cannot be guaranteed to be secure or = error-free as information could be intercepted, corrupted, lost, = destroyed, arrive late or incomplete or contain viruses. The sender, = therefore, does not accept liability for any errors or omissions in the = contents of this message which arise as a result of e-mail transmission. = If verification is required, please request a hard-copy version. |
|
|
|
#11 |
|
Messages: n/a
Hébergeur: |
On Dec 2, 9:21 pm, Giles Bowkett <gil...@gmail.com> wrote:
> > Tab completion? Already in there. In .irbrc... > > > require 'irb/completion' > > I know - got it already. Talking abut Unix tab completion. (That > happens in ruby_shell, but I don't know how.) > > -- > Giles Bowkett > > Podcast:http://hollywoodgrit.blogspot.com > Blog:http://gilesbowkett.blogspot.com > Portfolio:http://www.gilesgoatboy.org > Tumblelog:http://giles.tumblr.com I figured you would already know that, which is why I was confused. Sorry about that. I've no idea about bash completion either.Regards, Jordan |
|
|
|
#12 |
|
Messages: n/a
Hébergeur: |
On Dec 1, 2007 9:55 PM, Robert Jones <robertjones21@hotpop.com> wrote:
> > Some day, some day, somebody smarter and more ambitious than me will > > build that Ruby-native shell with all the joy of Ruby and command > > line tools integrated... A group of developers, including the author of rbsh, recently got together for just such a project. http://rubyunix.rubyforge.org/ We're still working out the design and putting together everyone's ideas, but an interactive shell, ability to run UNIX shell scripts, and other such things are among our goals. Daniel Brumbaugh Keeney |
|
|
|
#13 |
|
Messages: n/a
Hébergeur: |
That's extremely nifty. I also like the name: rush. I recommend using
the 2112 cover art for maxiumum effect. On 12/3/07, Daniel Brumbaugh Keeney <devi.webmaster@gmail.com> wrote: > On Dec 1, 2007 9:55 PM, Robert Jones <robertjones21@hotpop.com> wrote: > > > Some day, some day, somebody smarter and more ambitious than me will > > > build that Ruby-native shell with all the joy of Ruby and command > > > line tools integrated... > > A group of developers, including the author of rbsh, recently got > together for just such a project. > http://rubyunix.rubyforge.org/ > > We're still working out the design and putting together everyone's > ideas, but an interactive shell, ability to run UNIX shell scripts, > and other such things are among our goals. > > Daniel Brumbaugh Keeney > > -- Giles Bowkett Podcast: http://hollywoodgrit.blogspot.com Blog: http://gilesbowkett.blogspot.com Portfolio: http://www.gilesgoatboy.org Tumblelog: http://giles.tumblr.com |
|
|
|
#14 |
|
Messages: n/a
Hébergeur: |
> > I know - got it already. Talking abut Unix tab completion. (That
> > happens in ruby_shell, but I don't know how.) > > I figured you would already know that, which is why I was confused. > Sorry about that. I've no idea about bash completion either.No worries. :-) -- Giles Bowkett Podcast: http://hollywoodgrit.blogspot.com Blog: http://gilesbowkett.blogspot.com Portfolio: http://www.gilesgoatboy.org Tumblelog: http://giles.tumblr.com |
|
|
|
#15 |
|
Messages: n/a
Hébergeur: |
Hello --
On 03/12/2007, Giles Bowkett <gilesb@gmail.com> wrote: > That's extremely nifty. I also like the name: rush. I recommend using > the 2112 cover art for maxiumum effect. Some of us are working on the rubyunix project: http://rubyunix.rubyforge.org/ -- Thomas Adam |
|
|
|
#16 |
|
Messages: n/a
Hébergeur: |
excellent! can't wait for it.
On Dec 3, 2007 8:50 AM, Daniel Brumbaugh Keeney <devi.webmaster@gmail.com> wrote: > On Dec 1, 2007 9:55 PM, Robert Jones <robertjones21@hotpop.com> wrote: > > > Some day, some day, somebody smarter and more ambitious than me will > > > build that Ruby-native shell with all the joy of Ruby and command > > > line tools integrated... > > A group of developers, including the author of rbsh, recently got > together for just such a project. > http://rubyunix.rubyforge.org/ > > We're still working out the design and putting together everyone's > ideas, but an interactive shell, ability to run UNIX shell scripts, > and other such things are among our goals. > > Daniel Brumbaugh Keeney > > |
|
|
|
#17 |
|
Messages: n/a
Hébergeur: |
Thomas Adam wrote:
> Hello -- > > On 03/12/2007, Giles Bowkett <gilesb@gmail.com> wrote: >> That's extremely nifty. I also like the name: rush. I recommend using >> the 2112 cover art for maxiumum effect. > > Some of us are working on the rubyunix project: > > http://rubyunix.rubyforge.org/ > > -- Thomas Adam Have you guys also looked at the hotwire project (a new python-shell) http://code.google.com/p/hotwire-shell/ It has some interesting ideas. Edwin -- Posted via http://www.ruby-forum.com/. |
|
|
|
#18 |
|
Messages: n/a
Hébergeur: |
I still think if it borrows lots from bash, it should be called rash,
not rush. |
|
|
|
#19 |
|
Messages: n/a
Hébergeur: |
> I still think if it borrows lots from bash, it should be called rash,
> not rush. no way, dude. that's like slime, the lisp environment. I don't care how awesome it is, I'm not working in slime. I definitely and vigorously vote against rash and in favor of rush. -- Giles Bowkett Podcast: http://hollywoodgrit.blogspot.com Blog: http://gilesbowkett.blogspot.com Portfolio: http://www.gilesgoatboy.org Tumblelog: http://giles.tumblr.com |
|
|
|
#20 |
|
Messages: n/a
Hébergeur: |
On Dec 3, 2007, at 8:00 PM, Giles Bowkett wrote: > I definitely and vigorously vote against rash and in favor of rush. In honor of how Rails and Rolls are both named after drugs, I think the shell should be named after some hard drug. Like maybe 'Rocks', which is slang for crack cocaine. -Ari |
|
|
|
#21 |
|
Messages: n/a
Hébergeur: |
On Dec 3, 2007 3:15 PM, Edwin Van leeuwen <edder@tkwsping.nl> wrote:
> Have you guys also looked at the hotwire project (a new python-shell) > http://code.google.com/p/hotwire-shell/ > It has some interesting ideas. http://www.scsh.net/ likewise, though the focus there is more on scripting than interactivity. martin |
|
|
|
#22 |
|
Messages: n/a
Hébergeur: |
rash: terrible
rush: terrible mogok! it sounds cool, it's related to rubies, erm, and apparently has a violent and oppressive history... hey it would also be humanitarian in how it brings to light an issue that people might not have thought about? 90% of the world's rubies come from Myanmar. The red stones from there are prized for their purity and hue. Thailand buys the majority of Myanmar's gems. The "Valley of Rubies", the mountainous Mogok area, 200 km (125 miles) north of Mandalay, is noted for its rare pigeon's blood rubies and blue sapphires. Working conditions in the mines, however, are said to be horrendous. Debbie Stothard of the Alternative ASEAN Network on Burma stated that mining operators used drugs on employees to improve productivity, with needles shared, raising the risk of HIV infection: "These rubies are red with the blood of young people." Brian Leber (jeweler who founded The Jewellers' Burma Relief Project) stated that "for the time being," Burmese gems should not be something to be proud of. (from wikipedia) http://www.ruby-sapphire.com/pigeons-blood-mogok.htm is friendlier. /usr/bin/mogok! /usr/bin/mogok! On Dec 3, 2007 5:11 PM, thefed <fedzor@gmail.com> wrote: > > On Dec 3, 2007, at 8:00 PM, Giles Bowkett wrote: > > > I definitely and vigorously vote against rash and in favor of rush. > > In honor of how Rails and Rolls are both named after drugs, I think > the shell should be named after some hard drug. > > Like maybe 'Rocks', which is slang for crack cocaine. > > -Ari > > |
|
|
|
#23 |
|
Messages: n/a
Hébergeur: |
Mogok is totally depressing. You must face down evil, but never focus
on it. First rule of whoever that spiritual guy was with the rules that one time. That's even worse than rash. Rush sounds exciting and fun, and has decades of drum solos to back up its reputation. Wow! What a rush! Besides, I only advocate rush because the project is already named rush, and was named rush by the people who are programming it. I think actually the voting process, if there even is one, will heavily bias the votes of people who contribute code to the project. On 12/3/07, Christopher Anderson <significants@gmail.com> wrote: > rash: terrible > rush: terrible > > mogok! it sounds cool, it's related to rubies, erm, and apparently has > a violent and oppressive history... > > hey it would also be humanitarian in how it brings to light an issue > that people might not have thought about? > > 90% of the world's rubies come from Myanmar. The red stones from there > are prized for their purity and hue. Thailand buys the majority of > Myanmar's gems. The "Valley of Rubies", the mountainous Mogok area, > 200 km (125 miles) north of Mandalay, is noted for its rare pigeon's > blood rubies and blue sapphires. Working conditions in the mines, > however, are said to be horrendous. Debbie Stothard of the Alternative > ASEAN Network on Burma stated that mining operators used drugs on > employees to improve productivity, with needles shared, raising the > risk of HIV infection: "These rubies are red with the blood of young > people." Brian Leber (jeweler who founded The Jewellers' Burma Relief > Project) stated that "for the time being," Burmese gems should not be > something to be proud of. (from wikipedia) > > http://www.ruby-sapphire.com/pigeons-blood-mogok.htm is friendlier. > > /usr/bin/mogok! /usr/bin/mogok! > > On Dec 3, 2007 5:11 PM, thefed <fedzor@gmail.com> wrote: > > > > On Dec 3, 2007, at 8:00 PM, Giles Bowkett wrote: > > > > > I definitely and vigorously vote against rash and in favor of rush. > > > > In honor of how Rails and Rolls are both named after drugs, I think > > the shell should be named after some hard drug. > > > > Like maybe 'Rocks', which is slang for crack cocaine. > > > > -Ari > > > > > > -- Giles Bowkett Podcast: http://hollywoodgrit.blogspot.com Blog: http://gilesbowkett.blogspot.com Portfolio: http://www.gilesgoatboy.org Tumblelog: http://giles.tumblr.com |
|
|
|
#24 |
|
Messages: n/a
Hébergeur: |
On 12/4/07, Giles Bowkett <gilesb@gmail.com> wrote:
> Rush sounds exciting and fun, and has decades of drum solos to back up > its reputation. Wow! What a rush! i'd be more excited if the shell can run on windows, too. Unix shells are already very powerful. One can throw just about any language to it. A windows shell is wanting, and would be a killer app for windows. The command shell in windows is terrible; heck, i cannot even do a ctrl-pgup - grr!@#$ kind regards -botp |
|
|
|
#25 |
|
Messages: n/a
Hébergeur: |
On Dec 4, 2007, at 1:46 AM, Giles Bowkett wrote:
> Mogok is totally depressing. You must face down evil, but never focus > on it. First rule of whoever that spiritual guy was with the rules > that one time. That's even worse than rash. > > Rush sounds exciting and fun, and has decades of drum solos to back up > its reputation. Wow! What a rush! > > Besides, I only advocate rush because the project is already named > rush, and was named rush by the people who are programming it. I think > actually the voting process, if there even is one, will heavily bias > the votes of people who contribute code to the project. You are all forgetting about three things: First, the code. We need code to go along with this! Second, the rubyunix mailing list. This thread belongs THERE! Third, Mr Bowket please update your blog with something Rubyish. Thanks, Ari |
|
![]() |
| Outils de la discussion | |
|
|