std.system reports win32 when running OS X

2017-02-01 Thread Dave Chapman via Digitalmars-d-learn
I am running an iMac with OS X 10.11.5 (El Capitan) and dmd version 2.072.2 The following program prints out OS = win32. Is this the intended behavior? #!/usr/local/bin/rdmd import std.stdio; import std.system; void main (string[] args) { immutable OS os; writefln("OS = %s",os); }

Re: std.system reports win32 when running OS X

2017-02-02 Thread Dave Chapman via Digitalmars-d-learn
On Wednesday, 1 February 2017 at 21:43:09 UTC, Ali Çehreli wrote: On 02/01/2017 01:34 PM, Dave Chapman wrote: I am running an iMac with OS X 10.11.5 (El Capitan) and dmd version 2.072.2 The following program prints out OS = win32. Is this the intended behavior? #!/usr/local/bin/rdmd import

Converting from DirIterator to string[] without a loop

2017-01-13 Thread Dave Chapman via Digitalmars-d-learn
I would like to do something like the code shown below but I can't figure out how to do it without loops inside the if statement. When I use auto and print out the type of b it is something like args.main.FilterResult!(__lambda2, DirIterator).FilterResult and for the "if" version of b and

Re: Converting from DirIterator to string[] without a loop

2017-01-14 Thread Dave Chapman via Digitalmars-d-learn
On Saturday, 14 January 2017 at 01:02:38 UTC, Ali Çehreli wrote: On 01/13/2017 04:29 PM, Dave Chapman wrote: > When I use auto and print out the type of b it is something like > args.main.FilterResult!(__lambda2, DirIterator).FilterResult and for the > "if" version of > b and

Re: Using D for Raspberry Pi expirements

2019-09-26 Thread Dave Chapman via Digitalmars-d-learn
On Thursday, 26 September 2019 at 00:10:40 UTC, aberba wrote: On Wednesday, 25 September 2019 at 23:56:45 UTC, aberba wrote: I'm looking for resources on using D for basic Raspberry Pi programming...stuff like turning on and off an LED light. I believe it requires being able to call the

Re: Using D for Raspberry Pi expirements

2019-10-02 Thread Dave Chapman via Digitalmars-d-learn
On Sunday, 29 September 2019 at 11:26:41 UTC, aberba wrote: On Thursday, 26 September 2019 at 17:26:25 UTC, Dave Chapman wrote: [...] your code... can you push it to GitHub so I can check it out? I haven't used GitHub or git. Is there some other way?

How to Install D on my new MacBook with M1 ARM computer

2020-12-29 Thread Dave Chapman via Digitalmars-d-learn
Greetings, Apologies If I have double posted. I received a MacBook pro M1 for Christmas and I would like to install a D compiler on it. After looking at the downloads page I don't see how to install D on a new MacBook. I did not see a precompiled version to download with the possible

Re: How to Install D on my new MacBook with M1 ARM computer

2020-12-30 Thread Dave Chapman via Digitalmars-d-learn
On Wednesday, 30 December 2020 at 00:22:14 UTC, Guillaume Piolat wrote: Hello, 1. Download ldc2-1.24.0-osx-x86_64.tar.xz (or later version) from this page: https://github.com/ldc-developers/ldc/releases [...] Thank you very much. This got me going. Right now I don't expect to be