Live data from Hacker News

Rsh: Ruby SHell

github.com

31–40 of 41 posts

Re: Rsh: Ruby SHell

#32
I think this is not a general shell like bash or csh, more of a custom REPL for some specific set of commands. A critical feature of every other shell is how they handle pipes, and this one doesn't seem to have gotten that far yet.

Perhaps it would have been better to wrap the limited shell functionalities in in gem instead, and run that inside `irb`. Currently the majority of the lines appears to be reimplementing a REPL, but those would come for free with `irb`.

Re: Rsh: Ruby SHell

#33

I think this is not a general shell like bash or csh, more of a custom REPL for some specific set of commands. A critical feature of every other shell is how they handle pipes, and this one doesn't seem to have gotten that far yet. Perhaps it would have been better to wrap the limited shell functionalities in in gem instead, and run that inside `irb`. Currently the majority of the lines appears to be reimplementing a…

Nope. It handles pipes and everything else as it shells out on system()

Re: Rsh: Ruby SHell

#36
post #23
post #21

(slight ot, sorry!) This brings back great memories of one of the best assignment from my college time: We had an "Agile web development" course (~2007) with a precursory Ruby 101 workshop as well as a pre-course assignment to "create a shell in Ruby". It was such a joy to hack on this and learn that way. It was clearly wayyy too vast of a task to ever _complete_ it, but I learned so much Ruby there and couldn't stop…

Sat in that same course. Nice to see Bremen people here

:D Great! What are you up to nowadays?

Re: Rsh: Ruby SHell

#37

I think this is not a general shell like bash or csh, more of a custom REPL for some specific set of commands. A critical feature of every other shell is how they handle pipes, and this one doesn't seem to have gotten that far yet. Perhaps it would have been better to wrap the limited shell functionalities in in gem instead, and run that inside `irb`. Currently the majority of the lines appears to be reimplementing a…

Nope. It handles pipes and everything else as it shells out on system()

But the outputs of those system() calls aren't accessible to rsh, unlike other shells where I might be able to do VARIABLE=$(command). I was looking for something more like IO.popen() and rsh does not seem to have those.

Re: Rsh: Ruby SHell

#38

Just a little screen recording of what we can expect would be awesome

That's an excellent request. Thanks. Will do.

Not sure if you've come across asciinema [1] before. I haven't used it myself, but it seems pretty popular for this kind of screen recording.

[1] https://asciinema.org/

Re: Rsh: Ruby SHell

#39

Earlier quoted context omitted.

Nope. It handles pipes and everything else as it shells out on system()

But the outputs of those system() calls aren't accessible to rsh, unlike other shells where I might be able to do VARIABLE=$(command). I was looking for something more like IO.popen() and rsh does not seem to have those.

[deleted]

Re: Rsh: Ruby SHell

#40

Earlier quoted context omitted.

That's an excellent request. Thanks. Will do.

Not sure if you've come across asciinema [1] before. I haven't used it myself, but it seems pretty popular for this kind of screen recording. [1] https://asciinema.org/

Thanks. Will check that out.
Post reply on HN