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
- is special and indicates stdin; it shouldn't be used as output filename. - is bad because it breaks many shell commands, eg: ls - requires quoting.
Example
echo'echo 0.3'| nim c -r -
Current Output
creates a file ./- in current dir: $PWD/-
Expected Output
in nim 0.18.0 it used to create ./stdinfile; that's better; however IMO it should be hidden inside nimcache.
option 1 (simple, and should probably be implemented first)
create a $nimcache/@stdin & $exeExt
option 2
creates a temporary file $nimcache/$random & $exeExt (random so it won't clobber in case other commands are run simultaneously while a program is executing etc, even though os would make it safe in that case but still)
the temporary file would auto-delete upon child process exiting