Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STDIN / ARGF support #44

Open
metapsj opened this issue Jun 10, 2016 · 4 comments
Open

STDIN / ARGF support #44

metapsj opened this issue Jun 10, 2016 · 4 comments

Comments

@metapsj
Copy link

metapsj commented Jun 10, 2016

Is it possible to support STDIN / ARGF in mruby-cli?

I'm very new to the project and mruby.

After watching and reading a couple presentations about mruby-cli, I feel Hadoop and Spark stream based data processing for map-reduce jobs would be another great application of mruby-cli. In order to support stream based map-reduce in Hadoop and Spark, mruby-cli will need STDIN and ARGF support.

@Asmod4n
Copy link

Asmod4n commented Jun 21, 2016

Have written a small library which can handle STDIN like readline, https://github.com/Asmod4n/mruby-linenoise. It can kind of handle a file/pipe as input, but allocates as much ram as it gets input.

@toch
Copy link
Collaborator

toch commented Jul 28, 2016

@metapsj It's a good idea.

I don't think it's the role of mruby-cli to provide a solution to this for now. If your mruby-cli app requires to work with stdin, the best is to use a mruby gem doing that, as @Asmod4n suggested.

@Asmod4n is your mgem multi-platform?

@Asmod4n
Copy link

Asmod4n commented Jul 28, 2016

@toch currently would need cygwin on windows, but am investigating to use the ms open tech fork of it https://github.com/MSOpenTech/redis/tree/3.0/deps/linenoise

@toch
Copy link
Collaborator

toch commented Jul 28, 2016

thanks keep us informed. I'm thinking of listing useful mruby gems that are multi-plateform and can be used for mruby-cli apps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants