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

Support streaming input. #14

Open
Varriount opened this issue Jul 21, 2018 · 2 comments
Open

Support streaming input. #14

Varriount opened this issue Jul 21, 2018 · 2 comments

Comments

@Varriount
Copy link

There are times when one has a large (or possibly unlimited) amount of input. It would be nice to have match procedures that would accept a moreDataProc or similar parameter, to call when the internal logic needs more data from the string.

@nitely
Copy link
Owner

nitely commented Jul 21, 2018

Sure, it could take a closure function, a closure iterator, a Stream object, or something-something concepts (that would handle any iterator either string or stream). Problem is there isn't a buffered stream (or a unicode string stream for that matter) in the stdlib. I tried to implement something like this long ago [0], but it was crap. We need better IO primitives in the stdlib (similar to golang probably), otherwise the regex API would be really hard to use.

[0] nim-lang/Nim#6745

@nitely
Copy link
Owner

nitely commented Jul 23, 2018

I guess I can always deprecate the new functions later when there's a better way (or I find one) 🤔

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

2 participants