Re: Linking to -framework on MacOS

2019-09-04 Thread Andrew Edwards via Digitalmars-d-learn
On Wednesday, 4 September 2019 at 15:22:51 UTC, Adam D. Ruppe wrote: On Wednesday, 4 September 2019 at 15:00:52 UTC, Andrew Edwards wrote: Could someone point me in the right direction please? You can also add `-L-framework -LCocoa` to dmd to pass the two arguments to the linker (they need

Re: Is there has an pdf document for Phobos.

2019-09-04 Thread bachmeier via Digitalmars-d-learn
On Wednesday, 4 September 2019 at 12:24:47 UTC, lili wrote: On Wednesday, 4 September 2019 at 04:21:10 UTC, Mike Parker wrote: On Wednesday, 4 September 2019 at 03:07:18 UTC, lili wrote: Hi: For some reason it too slow that some times i visited dlang.org, Can admin make a pdf document for

Re: Linking to -framework on MacOS

2019-09-04 Thread Adam D. Ruppe via Digitalmars-d-learn
On Wednesday, 4 September 2019 at 15:00:52 UTC, Andrew Edwards wrote: Could someone point me in the right direction please? You can also add `-L-framework -LCocoa` to dmd to pass the two arguments to the linker (they need to be separate -L things for the two pieces, which is kinda weird but

Re: Linking to -framework on MacOS

2019-09-04 Thread Andrew Edwards via Digitalmars-d-learn
On Wednesday, 4 September 2019 at 15:05:46 UTC, rikki cattermole wrote: Four years ago, I was linking against Cocoa via: "lflags-osx": ["/System/Library/Frameworks/Cocoa.framework/Cocoa"], I don't know if this will help you or not. Worked like a charm:

Re: Linking to -framework on MacOS

2019-09-04 Thread rikki cattermole via Digitalmars-d-learn
Four years ago, I was linking against Cocoa via: "lflags-osx": ["/System/Library/Frameworks/Cocoa.framework/Cocoa"], I don't know if this will help you or not.

Linking to -framework on MacOS

2019-09-04 Thread Andrew Edwards via Digitalmars-d-learn
Hello, I'm trying to link to "-framework OpenGL" on MacOS and finding any clues on how to accomplish this. If I pass that switch to clang and use clang to create the executable, it works perfectly but I would like to use dmd to create the executable. Here is the list of errors I'm trying to

Re: D1: How to declare an Associative array with data

2019-09-04 Thread jicman via Digitalmars-d-learn
On Wednesday, 4 September 2019 at 13:39:05 UTC, Adam D. Ruppe wrote: On Wednesday, 4 September 2019 at 13:33:02 UTC, jicman wrote: string[] d = ["1","2","three","4]; and this will be done at compiled time. I want to do the same with an associative array., ie. That's actually only at

Re: D1: How to declare an Associative array with data

2019-09-04 Thread Adam D. Ruppe via Digitalmars-d-learn
On Wednesday, 4 September 2019 at 13:33:02 UTC, jicman wrote: string[] d = ["1","2","three","4]; and this will be done at compiled time. I want to do the same with an associative array., ie. That's actually only at compile time if it is in static scope, if it inside a function, it is a

Re: Is there has an pdf document for Phobos.

2019-09-04 Thread Mike Parker via Digitalmars-d-learn
On Wednesday, 4 September 2019 at 12:24:47 UTC, lili wrote: On Wednesday, 4 September 2019 at 04:21:10 UTC, Mike Parker wrote: On Wednesday, 4 September 2019 at 03:07:18 UTC, lili wrote: Hi: For some reason it too slow that some times i visited dlang.org, Can admin make a pdf document for

D1: How to declare an Associative array with data

2019-09-04 Thread jicman via Digitalmars-d-learn
Yes, I know. I am using D1, and I love it. ;-) Greetings. I know that I can declare an array with data, ie. string[] d = ["1","2","three","4]; and this will be done at compiled time. I want to do the same with an associative array., ie. int[string] MyDigits = ["0" = 0, "1" = 1, "2" =

Re: Is there has an pdf document for Phobos.

2019-09-04 Thread lili via Digitalmars-d-learn
On Wednesday, 4 September 2019 at 04:21:10 UTC, Mike Parker wrote: On Wednesday, 4 September 2019 at 03:07:18 UTC, lili wrote: Hi: For some reason it too slow that some times i visited dlang.org, Can admin make a pdf document for download. Documentation is installed with the compiler.

Re: Is there has an pdf document for Phobos.

2019-09-04 Thread lili via Digitalmars-d-learn
On Wednesday, 4 September 2019 at 04:21:10 UTC, Mike Parker wrote: On Wednesday, 4 September 2019 at 03:07:18 UTC, lili wrote: Hi: For some reason it too slow that some times i visited dlang.org, Can admin make a pdf document for download. Documentation is installed with the compiler.

Re: How to use xargs to remove whitespaces (Dub executable path)

2019-09-04 Thread Andre Pany via Digitalmars-d-learn
On Wednesday, 4 September 2019 at 10:34:28 UTC, Sebastiaan Koppe wrote: On Wednesday, 4 September 2019 at 05:52:12 UTC, Andre Pany wrote: Hi, I try to get the executable path from a dub package using this command: dub describe dscanner --data=target-path,target-name --data-list | xargs

Re: Is removing elements of AA in foreach loop safe?

2019-09-04 Thread Ferhat Kurtulmuş via Digitalmars-d-learn
On Wednesday, 4 September 2019 at 06:20:00 UTC, berni wrote: On Tuesday, 3 September 2019 at 20:06:27 UTC, Ferhat Kurtulmuş wrote: I know, it is foreach loop in question. How about using a reverse for loop like: for (size_t i = arr.length ; i-- > 0 ; ){ arr.remove(i); } This would be

Re: How to use xargs to remove whitespaces (Dub executable path)

2019-09-04 Thread Sebastiaan Koppe via Digitalmars-d-learn
On Wednesday, 4 September 2019 at 05:52:12 UTC, Andre Pany wrote: Hi, I try to get the executable path from a dub package using this command: dub describe dscanner --data=target-path,target-name --data-list | xargs But the output always contains a space between target-path and

Re: How to use xargs to remove whitespaces (Dub executable path)

2019-09-04 Thread Les De Ridder via Digitalmars-d-learn
On Wednesday, 4 September 2019 at 08:23:19 UTC, Andre Pany wrote: On Wednesday, 4 September 2019 at 06:40:13 UTC, H. S. Teoh wrote: On Wed, Sep 04, 2019 at 05:52:12AM +, Andre Pany via Digitalmars-d-learn wrote: Hi, I try to get the executable path from a dub package using this command:

Re: How to use xargs to remove whitespaces (Dub executable path)

2019-09-04 Thread Andre Pany via Digitalmars-d-learn
On Wednesday, 4 September 2019 at 06:40:13 UTC, H. S. Teoh wrote: On Wed, Sep 04, 2019 at 05:52:12AM +, Andre Pany via Digitalmars-d-learn wrote: Hi, I try to get the executable path from a dub package using this command: dub describe dscanner --data=target-path,target-name --data-list

Re: How to use xargs to remove whitespaces (Dub executable path)

2019-09-04 Thread H. S. Teoh via Digitalmars-d-learn
On Wed, Sep 04, 2019 at 05:52:12AM +, Andre Pany via Digitalmars-d-learn wrote: > Hi, > > I try to get the executable path from a dub package using this command: > > dub describe dscanner --data=target-path,target-name --data-list | xargs > > But the output always contains a space between

Re: Is removing elements of AA in foreach loop safe?

2019-09-04 Thread berni via Digitalmars-d-learn
On Tuesday, 3 September 2019 at 20:06:27 UTC, Ferhat Kurtulmuş wrote: I know, it is foreach loop in question. How about using a reverse for loop like: for (size_t i = arr.length ; i-- > 0 ; ){ arr.remove(i); } This would be good, if it where for slices. But with associative arrays, this