Thread overview | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
January 31, 2021 Article: Why I use the D programming language for scripting | ||||
---|---|---|---|---|
| ||||
It's finally out! https://opensource.com/article/21/1/d-scripting |
January 31, 2021 Re: Article: Why I use the D programming language for scripting | ||||
---|---|---|---|---|
| ||||
Posted in reply to aberba | On 1/31/21 3:36 PM, aberba wrote:
> It's finally out!
>
> https://opensource.com/article/21/1/d-scripting
Hm... right off I see the shebang is not the first line in the example. It has to be.
Nice writeup!
-Steve
|
January 31, 2021 Re: Article: Why I use the D programming language for scripting | ||||
---|---|---|---|---|
| ||||
Posted in reply to aberba | On 1/31/2021 12:36 PM, aberba wrote:
> It's finally out!
>
> https://opensource.com/article/21/1/d-scripting
Very nice and informative article!
|
January 31, 2021 Re: Article: Why I use the D programming language for scripting | ||||
---|---|---|---|---|
| ||||
Posted in reply to aberba | On Sunday, 31 January 2021 at 20:36:43 UTC, aberba wrote:
> It's finally out!
>
> https://opensource.com/article/21/1/d-scripting
Very nice! Clearly I'm not taking enough advantage of scripting capabilities!
--Jon
|
January 31, 2021 Re: Article: Why I use the D programming language for scripting | ||||
---|---|---|---|---|
| ||||
Posted in reply to aberba | On Sunday, 31 January 2021 at 20:36:43 UTC, aberba wrote:
> It's finally out!
>
> https://opensource.com/article/21/1/d-scripting
Thanks for your work, nice article, I wasn't even aware how easy this is.
|
February 01, 2021 Re: Article: Why I use the D programming language for scripting | ||||
---|---|---|---|---|
| ||||
Posted in reply to aberba | On Sunday, 31 January 2021 at 20:36:43 UTC, aberba wrote:
> It's finally out!
>
> https://opensource.com/article/21/1/d-scripting
FYI, the code will compile faster if you use `dmd -run` instead of `rdmd`. If you have multiple files that need to be compiled you can use `dmd -i -run`.
--
/Jacob Carlborg
|
February 01, 2021 Re: Article: Why I use the D programming language for scripting | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jacob Carlborg | On Monday, 1 February 2021 at 09:36:15 UTC, Jacob Carlborg wrote:
> On Sunday, 31 January 2021 at 20:36:43 UTC, aberba wrote:
>> It's finally out!
>>
>> https://opensource.com/article/21/1/d-scripting
>
> FYI, the code will compile faster if you use `dmd -run` instead of `rdmd`. If you have multiple files that need to be compiled you can use `dmd -i -run`.
>
> --
> /Jacob Carlborg
Unfortunately, you can't pass more than one command-line argument on a #! line.
|
February 01, 2021 Re: Article: Why I use the D programming language for scripting | ||||
---|---|---|---|---|
| ||||
Posted in reply to Steven Schveighoffer | On Sunday, 31 January 2021 at 20:47:13 UTC, Steven Schveighoffer wrote:
> On 1/31/21 3:36 PM, aberba wrote:
>> It's finally out!
>>
>> https://opensource.com/article/21/1/d-scripting
>
> Hm... right off I see the shebang is not the first line in the example. It has to be.
Please fix, Aberba, right now the examples don't work because of this...
-- Bastiaan.
|
February 01, 2021 Re: Article: Why I use the D programming language for scripting | ||||
---|---|---|---|---|
| ||||
Posted in reply to Bastiaan Veelo | On Monday, 1 February 2021 at 11:29:02 UTC, Bastiaan Veelo wrote:
> On Sunday, 31 January 2021 at 20:47:13 UTC, Steven Schveighoffer wrote:
>> On 1/31/21 3:36 PM, aberba wrote:
>>> It's finally out!
>>>
>>> https://opensource.com/article/21/1/d-scripting
>>
>> Hm... right off I see the shebang is not the first line in the example. It has to be.
>
> Please fix, Aberba, right now the examples don't work because of this...
>
> -- Bastiaan.
Yes, noted. I don't have direct access to edit it myself. I have to wait till the editors make the changes (depending on their TZ)
I should really get someone here to proofread it next time 😅 Sorry about that.
|
February 01, 2021 Re: Article: Why I use the D programming language for scripting | ||||
---|---|---|---|---|
| ||||
Posted in reply to Paul Backus | On Monday, 1 February 2021 at 11:10:28 UTC, Paul Backus wrote: > On Monday, 1 February 2021 at 09:36:15 UTC, Jacob Carlborg wrote: >> On Sunday, 31 January 2021 at 20:36:43 UTC, aberba wrote: >>> It's finally out! >>> >>> https://opensource.com/article/21/1/d-scripting >> >> FYI, the code will compile faster if you use `dmd -run` instead of `rdmd`. If you have multiple files that need to be compiled you can use `dmd -i -run`. >> >> -- >> /Jacob Carlborg > > Unfortunately, you can't pass more than one command-line argument on a #! line. It is possible, using `/usr/bin/env -S command arg1 arg2` , as of coreutils 8.30. I have been using it at work and it's working perfectly. This functionality was already supported by FreeBSD [1] for ~15 years, but the coreutils developers implemented it just ~3 years ago [2]. The main disadvantage is that it's obviously not very portable, e.g. all users/developers need to use a modern linux distro, but for some teams this requirement already there for other reasons, so it's not a problem. Example: https://gist.github.com/PetarKirov/72168d8dc909c670444ca649ec28f80f This was extracted from a larger project, so it may not be useful on its own, but hopefully it should be enough to showcase the usage. Also, if you can use rund [3], it's likely a much cleaner option. [1]: https://www.freebsd.org/cgi/man.cgi?env [2]: https://lists.gnu.org/r/coreutils/2017-05/msg00020.html [3]: https://github.com/dragon-lang/rund |
Copyright © 1999-2021 by the D Language Foundation