Re: Executing a D script without an [extension in the filename] leads to an error

2019-03-01 Thread Cym13 via Digitalmars-d-learn
On Friday, 1 March 2019 at 11:38:51 UTC, BoQsc wrote: On Friday, 1 March 2019 at 09:27:33 UTC, Cym13 wrote: On Friday, 1 March 2019 at 09:00:43 UTC, BoQsc wrote: I've installed D compiler, and when i try to run a D script with filename without an extension/file type named: program via: ./prog

Re: Executing a D script without an [extension in the filename] leads to an error

2019-03-01 Thread Cym13 via Digitalmars-d-learn
On Friday, 1 March 2019 at 14:50:45 UTC, Jesse Phillips wrote: On Friday, 1 March 2019 at 11:38:51 UTC, BoQsc wrote: "And indeed rdmd won't call your script if it doesn't have the proper extension." Then why does Dlang Tour includes shebang: #!/usr/bin/env rdmd Instead of the one you mentione

Re: Executing a D script without an [extension in the filename] leads to an error

2019-03-01 Thread Seb via Digitalmars-d-learn
On Friday, 1 March 2019 at 11:38:51 UTC, BoQsc wrote: On Friday, 1 March 2019 at 09:27:33 UTC, Cym13 wrote: On Friday, 1 March 2019 at 09:00:43 UTC, BoQsc wrote: [...] In such questions it's important to show your shebang since that's what runs your script. Given your symptoms I guess you'

Re: Executing a D script without an [extension in the filename] leads to an error

2019-03-01 Thread Seb via Digitalmars-d-learn
On Friday, 1 March 2019 at 16:45:38 UTC, Seb wrote: On Friday, 1 March 2019 at 14:50:45 UTC, Jesse Phillips wrote: I don't know what value it brings with the -i switch existing. Almost none, except that it's twice as slow as DMD because it needs to run DMD twice to learn about all the depende

Re: Executing a D script without an [extension in the filename] leads to an error

2019-03-01 Thread Seb via Digitalmars-d-learn
On Friday, 1 March 2019 at 14:50:45 UTC, Jesse Phillips wrote: I don't know what value it brings with the -i switch existing. Almost none, except that it's twice as slow as DMD because it needs to run DMD twice to learn about all the dependencies. It's only useful for a few small things now:

Re: Executing a D script without an [extension in the filename] leads to an error

2019-03-01 Thread Jesse Phillips via Digitalmars-d-learn
On Friday, 1 March 2019 at 11:38:51 UTC, BoQsc wrote: "And indeed rdmd won't call your script if it doesn't have the proper extension." Then why does Dlang Tour includes shebang: #!/usr/bin/env rdmd Instead of the one you mentioned, that is fool proof. (#!/bin/dmd -run) Is that an error/mis

Re: Executing a D script without an [extension in the filename] leads to an error

2019-03-01 Thread BoQsc via Digitalmars-d-learn
On Friday, 1 March 2019 at 09:27:33 UTC, Cym13 wrote: On Friday, 1 March 2019 at 09:00:43 UTC, BoQsc wrote: I've installed D compiler, and when i try to run a D script with filename without an extension/file type named: program via: ./program I'm getting and error: vaidas@SATELLITE-L855:~/De

Re: Executing a D script without an [extension in the filename] leads to an error

2019-03-01 Thread Cym13 via Digitalmars-d-learn
On Friday, 1 March 2019 at 09:00:43 UTC, BoQsc wrote: I've installed D compiler, and when i try to run a D script with filename without an extension/file type named: program via: ./program I'm getting and error: vaidas@SATELLITE-L855:~/Desktop$ ./program Error: module `program` is in file './

Executing a D script without an [extension in the filename] leads to an error

2019-03-01 Thread BoQsc via Digitalmars-d-learn
I've installed D compiler, and when i try to run a D script with filename without an extension/file type named: program via: ./program I'm getting and error: vaidas@SATELLITE-L855:~/Desktop$ ./program Error: module `program` is in file './program.d' which cannot be read import path[0] = . im