Re: regex issue

2012-03-17 Thread Dmitry Olshansky
On 16.03.2012 20:05, Joshua Niehus wrote: On Friday, 16 March 2012 at 08:34:18 UTC, Dmitry Olshansky wrote: Ehm, because they have different engines that _should_ give identical results. And the default one apparently has a bug, that I'm looking into. Fill the bug report plz. Ok, submitted:

Problem about Tuple.opEquals, const qualifier

2012-03-17 Thread Tongzhou Li
I'm learning D, and trying to convert My C++ code into D: http://pastebin.com/eCz9DdZ3 I wrote: auto stack = SList!(Tuple!(double, char))(); But I got an error Error: function std.typecons.Tuple!(double,char).Tuple.opEquals!(const(Tuple!(double,char))).opEquals (const(Tuple!(double,char)) rhs)

Re: comma inside is expression

2012-03-17 Thread Philippe Sigaud
On Thu, Mar 15, 2012 at 03:34, Jos van Uden user@domain.invalid wrote: I've been reading the tutorial on templates and found this example: template rank(T)  {    static if (is(T t == U[], U)) // is T an array of U, for some type U?        enum rank = 1 + rank!(U); // then let’s recurse down.

Re: Problem about Tuple.opEquals, const qualifier

2012-03-17 Thread Ali Çehreli
On 03/17/2012 09:27 AM, Tongzhou Li wrote: I'm learning D, and trying to convert My C++ code into D: http://pastebin.com/eCz9DdZ3 I wrote: auto stack = SList!(Tuple!(double, char))(); But I got an error Error: function

HelloWordl in Webserver

2012-03-17 Thread Xan
I dont' want to battle among languages, but I see that in Golang there is a beatiful solution to display HelloWorld program in web server [rosettacode.org/wiki/Hello_world/Web_server#Go]. I'm convinced there is a D equivalent? Can someone say what's its aspect? Thanks in advance, Xan.

Re: Problem about Tuple.opEquals, const qualifier

2012-03-17 Thread bearophile
Tongzhou Li: I'm learning D, and trying to convert My C++ code into D: http://pastebin.com/eCz9DdZ3 I have translated a small part of your C++ program: http://codepad.org/hnKGxRUM There is no good stack collection in Phobos yet (possibly decks-based). Bye, bearophile

Re: HelloWordl in Webserver

2012-03-17 Thread Adam D. Ruppe
On Saturday, 17 March 2012 at 20:08:24 UTC, Xan wrote: I'm convinced there is a D equivalent? It all depends on the library. If you use my code https://github.com/adamdruppe/misc-stuff-including-D-programming-language-web-stuff It looks like this: == import arsd.cgi; void hello(Cgi cgi) {

Re: HelloWordl in Webserver

2012-03-17 Thread Xan
So, there is not built-in functions? Thanks, Xan. On Saturday, 17 March 2012 at 20:18:39 UTC, Adam D. Ruppe wrote: On Saturday, 17 March 2012 at 20:08:24 UTC, Xan wrote: I'm convinced there is a D equivalent? It all depends on the library. If you use my code

Error 42 Symbol Undefined

2012-03-17 Thread Chris Pons
Hello, I'm trying to use the Gl3n (https://bitbucket.org/dav1d/gl3n) but I keep getting error 42 whenever I try this: alias Vector!(float, 2) vect2; vect2 position; position.x = 2.0f; //This is what causes the error I looked into how the struct was implemented and x is an alias for a

Re: Problem about Tuple.opEquals, const qualifier

2012-03-17 Thread Simen Kjærås
On Sat, 17 Mar 2012 17:27:21 +0100, Tongzhou Li zhangsong...@hotmail.com wrote: I'm learning D, and trying to convert My C++ code into D: http://pastebin.com/eCz9DdZ3 I wrote: auto stack = SList!(Tuple!(double, char))(); But I got an error Error: function

Re: Problem about Tuple.opEquals, const qualifier

2012-03-17 Thread Tongzhou Li
On Saturday, 17 March 2012 at 19:49:24 UTC, Ali Çehreli wrote: On 03/17/2012 09:27 AM, Tongzhou Li wrote: I'm learning D, and trying to convert My C++ code into D: http://pastebin.com/eCz9DdZ3 I wrote: auto stack = SList!(Tuple!(double, char))(); But I got an error Error: function

Re: Problem about Tuple.opEquals, const qualifier

2012-03-17 Thread Tongzhou Li
On Saturday, 17 March 2012 at 23:05:30 UTC, Simen Kjærås wrote: On Sat, 17 Mar 2012 17:27:21 +0100, Tongzhou Li zhangsong...@hotmail.com wrote: I'm learning D, and trying to convert My C++ code into D: http://pastebin.com/eCz9DdZ3 I wrote: auto stack = SList!(Tuple!(double, char))(); But I

Re: Problem about Tuple.opEquals, const qualifier

2012-03-17 Thread Tongzhou Li
On Saturday, 17 March 2012 at 23:05:30 UTC, Simen Kjærås wrote: As for a workaround, have you considered using a simple array instead of a linked list? Arrays in D, especially when combined with std.array, make for easy-to-use (though perhaps not particularly efficient) stacks: int[] stack;

Re: HelloWordl in Webserver

2012-03-17 Thread Kapps
On Saturday, 17 March 2012 at 20:52:33 UTC, Xan wrote: So, there is not built-in functions? Thanks, Xan. There's no built in webserver class, and it's not something that should be in the standard library in the first place.