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

Mac OS X Support #8

Open
fatlotus opened this issue Aug 21, 2013 · 1 comment
Open

Mac OS X Support #8

fatlotus opened this issue Aug 21, 2013 · 1 comment

Comments

@fatlotus
Copy link

(I'm working on this one — if I find something I'll send a pull request. Consider this as much a development log as a feature request!)

Apple's version of nc doesn't support -q, though -w seems to do something similar. Even with the change, it results in the rather mystifying behavior of reading the input and producing no output, and I have no idea why.

(This is of course after installing pv from Homebrew; one could easily alias pv=cat if one was so inclined!)

@fatlotus
Copy link
Author

A few discoveries:

First, the reason awk is so slow (I think) is that it the "distribution" isn't actually a distribution at all, at least as I understood it. At least on my machine, seed(...) only accepts an integer parameter, and AWK casts anything that's not a number to 0. This means that doing a distributed computation with non-integral input data will only hit a single node.

Second, I'm wondering if perhaps xargs -P might help simplify the internal architecture of this script a bit. Right now nc fails on me when I run nc with -q0, since that's not supported on OS X. It seems like this option is there to control termination — I'm away from my normal Linux box so I can't check on the function of that flag. Using xargs automatically manages sub-processes in a clean manner, and terminates once all have finished, which simplifies the logic significantly.

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

1 participant