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

implement streaming helpers to for/map/grep/reduce all lines in a file #58

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wchristian
Copy link
Contributor

This is a first sketch to suss out things we want or do not want.

@ingydotnet , @frioux , @shadowcat-mst : Please comment and bikeshed.

@frioux
Copy link
Collaborator

frioux commented Dec 10, 2014

I like and agree with what @ingydotnet said about just naming them for/map/grep/reduce, instead of including lines, so that they could have alternate meanings when used with, for instance, a directory object.

@wchristian
Copy link
Contributor Author

Alright, that makes sense.

I renamed them and updated the code to be able to handle streaming arbitrary items off various io object types.

What are the streaming methods for the other object types?

@wchristian
Copy link
Contributor Author

I just noticed we already have one related thing:

my @odd = io->curdir->filter(sub {$_->size % 2})->All_Files;

@frioux frioux force-pushed the master branch 3 times, most recently from 4c30e64 to dcdd4d8 Compare December 14, 2014 08:06
@shlomif
Copy link
Collaborator

shlomif commented Nov 30, 2016

hi! It seems that documentation ought to be added.

@wchristian
Copy link
Contributor Author

Hey @shlomif, as the previous comments indicate, this is just an RFC prototype, and i was hoping to get more input from @ingydotnet , @frioux , @shadowcat-mst and any other interested parties before fleshing it out, but it kind of fell by the wayside.

If you'd read through the proposed code and opine on whether it makes sense as it is, and maybe look at the other questions raised, i'd be happy to move forward with it. (Though at this point i would need to refamiliarize myself as well.)

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

Successfully merging this pull request may close these issues.

3 participants