Using D in Android App

2016-04-15 Thread Justice via Digitalmars-d-learn
Is it difficult to create a D business like app and connect it to android through java for the interface? I'd rather create all the complex stuff in D and either use it natively through java(I need a UI). If it is workable, can the same be said for IOS(just recompile the D source to the IOS

Free paperback: "Programming in D" by Ali Çehreli. You pick up in San Francisco

2016-04-15 Thread throwaway389012 via Digitalmars-d-learn
Free paperback of "Programming in D" by Ali Çehreli. You'll pick it up in San Francisco. It's a great book, but I prefer to read it in electronic form. Send a message to the account "throwaway389012" on Reddit if you want it. Leave your phone number or email address. If you don't hear

Re: Is this a bug?

2016-04-15 Thread Jonathan M Davis via Digitalmars-d-learn
On Saturday, April 16, 2016 00:28:46 ag0aep6g via Digitalmars-d-learn wrote: > On 15.04.2016 20:55, Eric wrote: > > 13 class C : const (I!(J)) > > I think this const is ignored by the compiler. It's definitely ignored, and I'd argue that it's a bug in the compiler that it's even accepted.

Re: Accessing __FILE__ and __LINE__ of caller in combination with varargs?

2016-04-15 Thread Jonathan M Davis via Digitalmars-d-learn
On Friday, April 15, 2016 20:52:42 WebFreak001 via Digitalmars-d-learn wrote: > On Friday, 15 April 2016 at 20:43:08 UTC, pineapple wrote: > > I've written a very handy assertf method whose signature looks > > like this: > > > > void assertf(Args...)(lazy bool condition, in string message, > >

Re: Is this a bug?

2016-04-15 Thread ag0aep6g via Digitalmars-d-learn
On 15.04.2016 20:55, Eric wrote: 13 class C : const (I!(J)) I think this const is ignored by the compiler. 15F!(J) m; A little tip: You can omit the parentheses of template instantiations when the argument is a single identifier. That is, `F!(J)` can be written as `F!J`.

Re: Accessing __FILE__ and __LINE__ of caller in combination with varargs?

2016-04-15 Thread pineapple via Digitalmars-d-learn
On Friday, 15 April 2016 at 20:52:42 UTC, WebFreak001 wrote: void assertf(string file = __FILE__, size_t line = __LINE__, Args...)(lazy bool condition, in string message, Args args) { Aha, you are the best. Thanks!

Re: Accessing __FILE__ and __LINE__ of caller in combination with varargs?

2016-04-15 Thread WebFreak001 via Digitalmars-d-learn
On Friday, 15 April 2016 at 20:43:08 UTC, pineapple wrote: I've written a very handy assertf method whose signature looks like this: void assertf(Args...)(lazy bool condition, in string message, Args args) But I'd also like to access the caller's file and line to use them in constructing a

Accessing __FILE__ and __LINE__ of caller in combination with varargs?

2016-04-15 Thread pineapple via Digitalmars-d-learn
I've written a very handy assertf method whose signature looks like this: void assertf(Args...)(lazy bool condition, in string message, Args args) But I'd also like to access the caller's file and line to use them in constructing a thrown AssertError, and I'm stumbling on how I can get

Re: De Facto standard for D programming language

2016-04-15 Thread jmh530 via Digitalmars-d-learn
On Friday, 15 April 2016 at 18:41:23 UTC, Ali Çehreli wrote: Having said that, there are some omissions of how some features interact. I think it is a fantastic resource and have made much use out of it. I hope you keep updating it. It just happens that there are always some random

Re: Is this a bug?

2016-04-15 Thread Eric via Digitalmars-d-learn
On Friday, 15 April 2016 at 18:28:58 UTC, Eric wrote: line 6 can be fixed like this: "const I!(J) i = a;" Now if I can just figure out how to fix line 15... This works: 1 alias J = const C; 2 3 void main(string[] args) 4 { 5 J a = new C(); 6 const (I!(J)) i = a; 7 } 8

Re: De Facto standard for D programming language

2016-04-15 Thread Ali Çehreli via Digitalmars-d-learn
On 04/15/2016 11:19 AM, jmh530 wrote: > On Friday, 15 April 2016 at 17:51:41 UTC, Napster wrote: >> I would like to start learning the De Facto standard. which book or >> document would you use? >> >> http://erdani.com/index.php/books/tdpl/ >> >> or >> >> https://dlang.org/spec/intro.html >> >>

Re: De Facto standard for D programming language

2016-04-15 Thread Ali Çehreli via Digitalmars-d-learn
On 04/15/2016 11:31 AM, Napster wrote: I am writing a survey paper about D programming language. I want to use De Facto standard in my paper. I am not sure which one is? Both look the same. https://dlang.org/spec/intro.html is it. TDPL is behind some of D changes at this point. Ali

Re: De Facto standard for D programming language

2016-04-15 Thread Napster via Digitalmars-d-learn
On Friday, 15 April 2016 at 18:19:44 UTC, jmh530 wrote: On Friday, 15 April 2016 at 17:51:41 UTC, Napster wrote: I would like to start learning the De Facto standard. which book or document would you use? http://erdani.com/index.php/books/tdpl/ or https://dlang.org/spec/intro.html which

Re: Is this a bug?

2016-04-15 Thread Eric via Digitalmars-d-learn
On Friday, 15 April 2016 at 18:22:02 UTC, Eric wrote: On Friday, 15 April 2016 at 17:43:59 UTC, ag0aep6g wrote: On 15.04.2016 19:13, Eric wrote: 1 alias J = const C; 2 3 void main(string[] args) 4 { 5 J a = new C(); 6 I!(J) i = a; 7 } 8 9 interface I(V) { }

Re: Is this a bug?

2016-04-15 Thread Eric via Digitalmars-d-learn
On Friday, 15 April 2016 at 17:43:59 UTC, ag0aep6g wrote: On 15.04.2016 19:13, Eric wrote: 1 alias J = const C; 2 3 void main(string[] args) 4 { 5 J a = new C(); 6 I!(J) i = a; 7 } 8 9 interface I(V) { } 10 11 class F(V) if (is(V : I!(V))) { } 12 13

Re: De Facto standard for D programming language

2016-04-15 Thread jmh530 via Digitalmars-d-learn
On Friday, 15 April 2016 at 17:51:41 UTC, Napster wrote: I would like to start learning the De Facto standard. which book or document would you use? http://erdani.com/index.php/books/tdpl/ or https://dlang.org/spec/intro.html which one would you call de facto standard? If I were learning

De Facto standard for D programming language

2016-04-15 Thread Napster via Digitalmars-d-learn
I would like to start learning the De Facto standard. which book or document would you use? http://erdani.com/index.php/books/tdpl/ or https://dlang.org/spec/intro.html which one would you call de facto standard?

Re: Is this a bug?

2016-04-15 Thread ag0aep6g via Digitalmars-d-learn
On 15.04.2016 19:13, Eric wrote: 1 alias J = const C; 2 3 void main(string[] args) 4 { 5 J a = new C(); 6 I!(J) i = a; 7 } 8 9 interface I(V) { } 10 11 class F(V) if (is(V : I!(V))) { } 12 13 class C : I!(J) 14 { 15 F!(J) m; 16 } The above

Is this a bug?

2016-04-15 Thread Eric via Digitalmars-d-learn
1 alias J = const C; 2 3 void main(string[] args) 4 { 5 J a = new C(); 6 I!(J) i = a; 7 } 8 9 interface I(V) { } 10 11 class F(V) if (is(V : I!(V))) { } 12 13 class C : I!(J) 14 { 15 F!(J) m; 16 } The above code gives the following compile error: Error:

Re: Internal compiler erorr

2016-04-15 Thread Anonymouse via Digitalmars-d-learn
On Friday, 15 April 2016 at 16:53:27 UTC, Eric wrote: On Monday, 11 April 2016 at 00:55:44 UTC, Mike Parker wrote: I don't see this specific error in bugzilla. Unfortunately I am getting this error in a large module that has "const string" all over. So I can't come up with a simple test case.

Re: Internal compiler erorr

2016-04-15 Thread Eric via Digitalmars-d-learn
On Monday, 11 April 2016 at 00:55:44 UTC, Mike Parker wrote: On Sunday, 10 April 2016 at 17:19:14 UTC, Eric wrote: I am getting this error when I compile: Error: Internal Compiler Error: unsupported type const(string) No line number is given. Does anyone know what causes this? compiler

Why does Reggae use mixins?

2016-04-15 Thread Nordlöw via Digitalmars-d-learn
Why does the build system Reggae use mixins everywhere in the D examples? Doesn't this severly limit what the build rules are capable of in terms of run-time flexibility? https://github.com/atilaneves/reggae

Re: DWT Cloning / Build fails

2016-04-15 Thread Chris via Digitalmars-d-learn
On Thursday, 14 April 2016 at 19:16:30 UTC, Jacob Carlborg wrote: On 2016-04-14 15:56, Chris wrote: I had to add ".a" to `-L-l:dwt-base` and `-L-l:org.eclipse.swt.gtk.linux.x86`, and add `-L-lgnomevfs-2` as well. I added `-L-lgnomevfs-2 to the example. I need to look into way the ".a" was

Re: Dlang UI - making widget extend to the bounds of the window

2016-04-15 Thread Vadim Lopatin via Digitalmars-d-learn
On Friday, 15 April 2016 at 00:58:58 UTC, stunaep wrote: I'm trying to make a gui program with dlangui, but no matter what I do, I cannot get widgets to fill the whole window. The window is resizable so I cannot just set the widths to static numbers. No layoutWidth and layoutHeight set:

Re: Problem with circular imports of modules with static ctors an immutable variables

2016-04-15 Thread Marc Schütz via Digitalmars-d-learn
On Friday, 15 April 2016 at 05:35:24 UTC, Uranuz wrote: In my program I have error with circular imports of modules with static ctors. So I decided to move ctors in separate file and import it only from the 1st file. But problem is that in the first file I have immutables that should be