Re: HelloWordl in Webserver

2012-04-04 Thread Dmitry Olshansky
Not, I receive the error: $ gdmd-4.6 server.d cgi.d -version=embedded_httpd std.algorithm.indexOf has been scheduled for deprecation. You may want to use std.algorithm.countUntil instead. Oh my, indexOf was deprecated? News to me. cgi.d:2231: Error: undefined identifier lastSocketError -

Re: HelloWordl in Webserver

2012-04-04 Thread Adam D. Ruppe
On Wednesday, 4 April 2012 at 08:04:14 UTC, Xan wrote: Not, I receive the error: What version of D is that? lastSocketError is in phobos: http://dlang.org/phobos/std_socket.html#lastSocketError and it should work in windows and linux. Maybe your compiler is old.

Re: HelloWordl in Webserver

2012-04-04 Thread Xan
On Tuesday, 3 April 2012 at 13:33:19 UTC, Adam D. Ruppe wrote: On Tuesday, 3 April 2012 at 08:42:01 UTC, Xan wrote: I receive errors: I changed some stuff since the beginning of thi thread. cgi.d now includes a http server without needing the other modules. So if you just get the new cgi.d,

Re: HelloWordl in Webserver

2012-04-03 Thread David
Am 19.03.2012 20:36, schrieb Xan: On Sunday, 18 March 2012 at 05:19:48 UTC, Kapps wrote: 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 librar

Re: HelloWordl in Webserver

2012-04-03 Thread Xan
And with comment the UTC line I get: s$ gdmd-4.6 server.d cgi.d netman.d httpd.d Notice: As of Phobos 2.055, std.date and std.dateparse have been deprecated. They will be removed in February 2012. Please use std.datetime instead. httpd.d:72: Error: undefined identifier peerAddress httpd.d:72:

Re: HelloWordl in Webserver

2012-04-03 Thread Adam D. Ruppe
On Tuesday, 3 April 2012 at 19:07:10 UTC, Xan wrote: What happens now? Use the newer standalone code: http://forum.dlang.org/thread/cifekffsnaimfsvux...@forum.dlang.org?page=2#post-pfojnbnvhuahnyviekut:40forum.dlang.org don't need netman.d anymore. Just use: gdmd server.d cgi.d -version=embe

Re: HelloWordl in Webserver

2012-04-03 Thread Xan
Thanks, You can just comment out the code there (afaik it is only a custom formatting routine), or compile with the -d flag. $ gdmd-4.6 -d server.d cgi.d netman.d httpd.d Notice: As of Phobos 2.055, std.date and std.dateparse have been deprecated. They will be removed in February 2012. Pl

Re: HelloWordl in Webserver

2012-04-03 Thread Adam D. Ruppe
On Tuesday, 3 April 2012 at 11:39:24 UTC, Timon Gehr wrote: You can just comment out the code there (afaik it is only a custom formatting routine), or compile with the -d flag. You're probably thinking of the std.date use in web.d. This one though is just older stuff that you don't need with th

Re: HelloWordl in Webserver

2012-04-03 Thread Adam D. Ruppe
On Tuesday, 3 April 2012 at 08:42:01 UTC, Xan wrote: I receive errors: I changed some stuff since the beginning of thi thread. cgi.d now includes a http server without needing the other modules. So if you just get the new cgi.d, you can: dmd server.d cgi.d -version=embedded_httpd without b

Re: HelloWordl in Webserver

2012-04-03 Thread Timon Gehr
On 04/03/2012 10:45 AM, Xan wrote: On Tuesday, 3 April 2012 at 08:42:01 UTC, Xan wrote: I receive errors: xan@gerret:~/proves/dlang-proves$ ls cgi.d functions.d httpd.d netman.d server.d xan@gerret:~/proves/dlang-proves$ gdmd-4.6 server.d cgi.d netman.d httpd.d httpd.d:5: Error: module netman i

Re: HelloWordl in Webserver

2012-04-03 Thread Xan
On Tuesday, 3 April 2012 at 08:42:01 UTC, Xan wrote: I receive errors: xan@gerret:~/proves/dlang-proves$ ls cgi.d functions.d httpd.d netman.d server.d xan@gerret:~/proves/dlang-proves$ gdmd-4.6 server.d cgi.d netman.d httpd.d httpd.d:5: Error: module netman is in file 'arsd/netman.d' whic

Re: HelloWordl in Webserver

2012-04-03 Thread Xan
I receive errors: xan@gerret:~/proves/dlang-proves$ ls cgi.d functions.d httpd.d netman.d server.d xan@gerret:~/proves/dlang-proves$ gdmd-4.6 server.d cgi.d netman.d httpd.d httpd.d:5: Error: module netman is in file 'arsd/netman.d' which cannot be read import path[0] = /usr/include/d2/4.6

Re: HelloWordl in Webserver

2012-03-19 Thread simendsjo
On Sun, 18 Mar 2012 06:19:47 +0100, Kapps wrote: 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. I think phobo

Re: HelloWordl in Webserver

2012-03-19 Thread Xan
On Sunday, 18 March 2012 at 05:19:48 UTC, Kapps wrote: 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. A pain. A

Re: HelloWordl in Webserver

2012-03-18 Thread dennis luehring
Am 17.03.2012 21:08, schrieb Xan: I dont' want to battle among languages, its maybe only a library battle > 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]. no its creates and simple webserver

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.

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 https://github.com/adamdruppe/mis

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) {

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.