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
cant use w/ #!shebang #66
Comments
And i wrote a Nimrod script kicker, cush named from nimrod's father. :-) # cush.nim
import
os, osproc
var nim = paramStr(1)
when defined(windows):
var null = "nul"
else:
var null = "/dev/null"
var ret = execCmd("nimrod c " & nim & " > " & null)
var bin = changeFileExt(nim, "")
ret = execCmd(bin) compile it and put it on $PATH. And then fix hallo.nim in examples as below. #!/usr/bin/env cush
# Hello world program
echo "Hello World!" And you can now, just type
Wow. My Nimrod life is accelerated by cush and having more fun! would you accept cush.nim and builtin build script? |
sorry for miss closing. :-( |
What about |
thank you for your comment! i know about its options, but i wrote cush.nim since below two reasons.
thankyou. |
If you change your nimrod.cfg to contain --verbosity:0, --hints:off, --warnings:off the compile is completely quiet. ;-) Your 'else' is actually not indented properly but the compiler does not complain and the grammar allows it too. :D I am unsure what to do about it because actually your way of indentation makes some sense too... I close this issue because you found a nice solution to work around the problem which however I don't feel like adding to the distribution ;-) as the compiler's command line handling will change a bit in the future for better editor/IDE support. |
thanks for your comment, and i feel ease for loadmap of command line and Edit/IDE support! :-) thanks to ask me reason of this issue and how to solve it! thank you. |
If cush works, might I request making it an part of the official part of the language (ideally under a more obvious, less namespace-polluting) name, like nimrod-script)? The thing is, shebang support is often possible in one way or another, but making scripts just work on any plaform that has Nimrod installed... that's a big step forward. |
I think silencing all output from the compiler is a bad idea, as it is it looks as if you're running a script interpreted. Maybe a message that says how long it took to compile or something. |
So we want self-compiling binaries now? |
Now that I hear it Tass way I say YES that sounds like the future to me! |
66: [DOC] Link to the spec project instead of nim-lang#10 r=saem a=haxscramper Co-authored-by: haxscramper <haxscramper@gmail.com>
Many script programming languages are commonly able to comment out w/ '#'.
Nimrod is also able to do it.
And many script programming languages are able to use w/ #!shebang.
!shebang is i.e.
But Nimrod cant kick w/ #!shebang.
The text was updated successfully, but these errors were encountered: