You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I currently maintain the Sample Programs repo, and I'm looking to expand our collection of Pyret scripts. I quite like the language, but I'm running into an issue where I can't seem to figure out how to provide command line arguments. We use this npm package in a Docker image, so we can run Pyret scripts. Is there a way to pass arguments to this compiler? Here are all the files and whatnot for reference:
A simple script that I'd like to implement is capitalize which just capitalizes the first letter of a user's input and prints the result. The script itself is pretty straightforward to write, but I can't figure out how to get something like the following to work:
pyret -qk capitalize.arr "capitalize"
Unfortunately, the command above produces the help dialog instead. After digging through docs, I was unable to solve this problem. Others seem to be having the same issue. Any help would be greatly appreciated!
The text was updated successfully, but these errors were encountered:
The first command compiles capitalize.arr to capitalize.jarr, which can be run by node with command-line arguments. You can parse the command-line arguments using this to get the command-line arguments:
I currently maintain the Sample Programs repo, and I'm looking to expand our collection of Pyret scripts. I quite like the language, but I'm running into an issue where I can't seem to figure out how to provide command line arguments. We use this npm package in a Docker image, so we can run Pyret scripts. Is there a way to pass arguments to this compiler? Here are all the files and whatnot for reference:
A simple script that I'd like to implement is capitalize which just capitalizes the first letter of a user's input and prints the result. The script itself is pretty straightforward to write, but I can't figure out how to get something like the following to work:
pyret -qk capitalize.arr "capitalize"
Unfortunately, the command above produces the help dialog instead. After digging through docs, I was unable to solve this problem. Others seem to be having the same issue. Any help would be greatly appreciated!
The text was updated successfully, but these errors were encountered: