-
Notifications
You must be signed in to change notification settings - Fork 224
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
How to read stdin from file or pipe input to rockstar program on command line in Satriani? #297
Comments
I'm currently developing on GUIX (a GNU Linux distribution), which is a bit unusual distribution, so it could be a problem on my end. Should those commands above work? Seems that there can be similar problems on windows: https://stackoverflow.com/questions/45890339/stdout-is-not-a-tty-using-bash-for-node-tape-tap-spec (but the suggestions there did not seem to result in anything to resolve my problem). |
No, it's not a GUIX thing, it's to do with how nodeJS handles synchronous IO. Verified as a bug, although fixing it might be entertaining (yay nodeJS)... let me take a look, see if we can wrap the |
Let's try with Ruby, since no implementation of Rockstar can reliably read from a file yet (so sad: RockstarLang/rockstar#297) I'm going full-on TDD and overly object-oriented, because if I cannot use Rockstar then I might as well _act_ like a rock star: brazenly over the top
We'll be using a patched version of Satriani for this. (The patch is from RockstarLang/rockstar#298 because of RockstarLang/rockstar#297)
Rockstar 2.0 will not be built on nodeJS so won't have these kinds of headaches with async IO. |
How can stdin be read from file or pipe in Satriani?
I have these two files:
Now I want the parrot to say hello, but neither these work:
Both those commands still ask for input, and while I can manually paste the contents of hello.txt into the terminal, the goal is to automate that.
I'm currently developing on rocky, where both these constructs work. However, I'm trying to resolve some inconsistencies between Satriani and rocky, and copy pasting the code into the online editor is now the bottleneck, so I'm hoping to get the command-line working.
Maybe this is standard node behavior? This is the first time for me running node command line programs. Is there some flag I need to specify?
The text was updated successfully, but these errors were encountered: