Re: installing Mango with DMD instead of ldc

2014-05-26 Thread JJDuck via Digitalmars-d-learn
On Sunday, 25 May 2014 at 18:39:18 UTC, John Colvin wrote: That project hasn't been touched in 4 years. It will likely require a non-trivial amount of work to port it to modern D. It might be worth it, it might not, I don't know. If you did, you would want to use

Re: installing Mango with DMD instead of ldc

2014-05-26 Thread John Colvin via Digitalmars-d-learn
On Monday, 26 May 2014 at 07:07:47 UTC, JJDuck wrote: On Sunday, 25 May 2014 at 18:39:18 UTC, John Colvin wrote: That project hasn't been touched in 4 years. It will likely require a non-trivial amount of work to port it to modern D. It might be worth it, it might not, I don't know. If you

Re: installing Mango with DMD instead of ldc

2014-05-26 Thread JJDuck via Digitalmars-d-learn
On Monday, 26 May 2014 at 09:08:53 UTC, John Colvin wrote: What are your requirements? There may be an alternative library you could use. I need a secure private communication between clients and server. I don't use other common tools as it is not private enough. A good example is from

Re: installing Mango with DMD instead of ldc

2014-05-26 Thread JJDuck via Digitalmars-d-learn
On Monday, 26 May 2014 at 09:08:53 UTC, John Colvin wrote: What are your requirements? There may be an alternative library you could use. I did some research , D2 + phobos + tango + mango + encryption can give me what I want.

Re: dmd with shared lib

2014-05-26 Thread Dejan Lekic via Digitalmars-d-learn
bioinfornatics wrote: Hi, after building and installing dmd i fail to use generated executable because they are an undefined symbol. $ /opt/dmd/bin/dmd -L-lcurl testDelegate.d $ ./testDelegate ./testDelegate: symbol lookup error: /opt/dmd/lib/libphobos2.so.0.66: undefined symbol:

Re: installing Mango with DMD instead of ldc

2014-05-26 Thread Rene Zwanenburg via Digitalmars-d-learn
On Monday, 26 May 2014 at 10:48:09 UTC, JJDuck wrote: On Monday, 26 May 2014 at 09:08:53 UTC, John Colvin wrote: What are your requirements? There may be an alternative library you could use. I did some research , D2 + phobos + tango + mango + encryption can give me what I want. Vibe.d

Re: dmd with shared lib

2014-05-26 Thread bioinfornatics via Digitalmars-d-learn
On Monday, 26 May 2014 at 10:59:00 UTC, Dejan Lekic wrote: bioinfornatics wrote: Hi, after building and installing dmd i fail to use generated executable because they are an undefined symbol. $ /opt/dmd/bin/dmd -L-lcurl testDelegate.d $ ./testDelegate ./testDelegate: symbol lookup error:

How to create a vitual struct?

2014-05-26 Thread bioinfornatics via Digitalmars-d-learn
Hi, I would like to create a virtual struct, i mean as Input Range. You can create a new struct type and to be an input range. i know that use duck typing :-) In my case i would like to use duck typing if a stuct of any type have an a given attribute. By exbample if at least on field as @MyUDA

Re: installing Mango with DMD instead of ldc

2014-05-26 Thread JJDuck via Digitalmars-d-learn
On Monday, 26 May 2014 at 14:05:48 UTC, Rene Zwanenburg wrote: Vibe.d has support for ssl streams. You should be able to send and receive raw structs over such a stream, or if the server and client have a different arch you can use vibe's bson serialisation.

Re: installing Mango with DMD instead of ldc

2014-05-26 Thread bioinfornatics via Digitalmars-d-learn
On Monday, 26 May 2014 at 15:41:03 UTC, bioinfornatics wrote: On Monday, 26 May 2014 at 15:33:45 UTC, JJDuck wrote: On Monday, 26 May 2014 at 14:05:48 UTC, Rene Zwanenburg wrote: Vibe.d has support for ssl streams. You should be able to send and receive raw structs over such a stream, or if

Re: installing Mango with DMD instead of ldc

2014-05-26 Thread JJDuck via Digitalmars-d-learn
On Monday, 26 May 2014 at 15:41:03 UTC, bioinfornatics wrote: On Monday, 26 May 2014 at 15:33:45 UTC, JJDuck wrote: vibe.d is root an open-source project ? on about page is wrote is licensed under MIT which are an open source license. quote from http://vibed.org/about vibe.d is licensed

Re: installing Mango with DMD instead of ldc

2014-05-26 Thread bioinfornatics via Digitalmars-d-learn
On Monday, 26 May 2014 at 15:33:45 UTC, JJDuck wrote: On Monday, 26 May 2014 at 14:05:48 UTC, Rene Zwanenburg wrote: Vibe.d has support for ssl streams. You should be able to send and receive raw structs over such a stream, or if the server and client have a different arch you can use vibe's

Re: installing Mango with DMD instead of ldc

2014-05-26 Thread JJDuck via Digitalmars-d-learn
On Monday, 26 May 2014 at 14:05:48 UTC, Rene Zwanenburg wrote: On Monday, 26 May 2014 at 10:48:09 UTC, JJDuck wrote: Vibe.d has support for ssl streams. You should be able to send and receive raw structs over such a stream, or if the server and client have a different arch you can use vibe's

Re: installing Mango with DMD instead of ldc

2014-05-26 Thread bioinfornatics via Digitalmars-d-learn
On Monday, 26 May 2014 at 15:44:13 UTC, JJDuck wrote: On Monday, 26 May 2014 at 14:05:48 UTC, Rene Zwanenburg wrote: On Monday, 26 May 2014 at 10:48:09 UTC, JJDuck wrote: Vibe.d has support for ssl streams. You should be able to send and receive raw structs over such a stream, or if the

Re: TDPL - Andrei Alexandrescu

2014-05-26 Thread DLearner via Digitalmars-d-learn
On Sunday, 25 May 2014 at 15:27:05 UTC, Gary Willoughby wrote: On Sunday, 25 May 2014 at 15:07:56 UTC, DLearner wrote: Does the current D specification differ from that used in the book (and, if it does, is there a link to the changes)? http://erdani.com/tdpl/errata/ Thanks!

overloading operations for enums

2014-05-26 Thread Dominikus Dittes Scherkl via Digitalmars-d-learn
Hello. I want to create some finite algebra, where the elements are enumerated but operations on them are defined (with composition tables). e.g.: enum color = { white, yellow, red, blue, orange, violet, green, black }; color a = blue; a += yellow; assert(a == green); is this possible

Re: overloading operations for enums

2014-05-26 Thread Rene Zwanenburg via Digitalmars-d-learn
On Monday, 26 May 2014 at 16:54:02 UTC, Dominikus Dittes Scherkl wrote: Hello. I want to create some finite algebra, where the elements are enumerated but operations on them are defined (with composition tables). e.g.: enum color = { white, yellow, red, blue, orange, violet, green, black

Re: next!T

2014-05-26 Thread Andrew Edwards via Digitalmars-d-learn
On 5/25/14, 10:12 PM, Ali Çehreli wrote: On 05/25/2014 05:21 PM, Andrew Edwards wrote: Hello All, I wrote the following convenience functions to aid in my studies. Unfortunately, I'm using Java books (Ali I will get to yours soon enough) so the need was necessitated by the frequency of use in

Re: Using custom attribute for a general parser. Is possible in D ?

2014-05-26 Thread Ali Çehreli via Digitalmars-d-learn
On 05/23/2014 09:09 AM, bioinfornatics wrote: struct A { @section( ( word ) = word[0] == '@', ( word ) = word[0] == '\n') int a; } I was able to make that work if I used function instead of delegate: import std.stdio; struct attribute { } alias MatchFunc = bool

Re: Using custom attribute for a general parser. Is possible in D ?

2014-05-26 Thread bioinfornatics via Digitalmars-d-learn
On Monday, 26 May 2014 at 19:50:29 UTC, Ali Çehreli wrote: On 05/23/2014 09:09 AM, bioinfornatics wrote: struct A { @section( ( word ) = word[0] == '@', ( word ) = word[0] == '\n') int a; } I was able to make that work if I used function instead of delegate: import

One case of GC-allocated closure

2014-05-26 Thread bearophile via Digitalmars-d-learn
I don't know if this is a bug, an enhancement request, or just a mistake of mine. I don't understand why currently @nogc refuses this code: import std.algorithm: filter; struct Foo { bool bar(in int) @nogc { return true; } auto spam() @nogc { immutable static data

unittests D2.065.0 window 7

2014-05-26 Thread Phillip Shelton via Digitalmars-d-learn
I have the following code in a file called ex43.d dstring toFront(dstring str, in dchar letter) { dstring result; return result; } unittest { immutable str = hellod; assert(toFront(str, 'h') == hello); assert(toFront(str, 'o') == ohell); assert(toFront(str, 'l') == llheo); } void main() {} When

Re: unittests D2.065.0 window 7

2014-05-26 Thread Ali Çehreli via Digitalmars-d-learn
On 05/26/2014 08:30 PM, Phillip Shelton wrote: When I compile this code with dmd -run ex43.d -w -unittest there is no output. It is the -run variable. dmd says: -run srcfile args... run resulting program, passing args So, both -w and -unittest become arguments to your compiled program,

Re: unittests D2.065.0 window 7

2014-05-26 Thread Phillip Shelton via Digitalmars-d-learn
On Tuesday, 27 May 2014 at 04:03:27 UTC, Ali Çehreli wrote: On 05/26/2014 08:30 PM, Phillip Shelton wrote: When I compile this code with dmd -run ex43.d -w -unittest there is no output. It is the -run variable. dmd says: -run srcfile args... run resulting program, passing args So, both