Is there interest in a std.http?

Adam D. Ruppe destructionator at gmail.com
Tue Nov 20 06:09:23 PST 2012


On Tuesday, 20 November 2012 at 04:26:02 UTC, Andrei Alexandrescu 
wrote:
> We sorely need a server expert on board with the time and 
> inclination to write a good server-side networking framework.

I agree with this but it really should be generic; working at 
probably the file descriptor level, so we can do whatever 
protocols along with files, pipes, ... and ideally, any kind of 
injected event. I'd really like it if we could run one event loop 
and be able to do keyboard/joystick input, timers, GUI, threads, 
etc., including third party libraries, as well as networking. 
(Combining two different event loops is a pain in the butt.)

I have an implementation in mind (I'd use select() because I 
don't know libev, but we should be able to change that without 
changing the interface)...

... but I'm behind on my other work and have yet another deadline 
looming so can't do it myself right now. I can't wait till I'm 
retired!

> And they milk that for all it's worth: any discussion, article, 
> or blog post about Go gravitates toward the five-lines HTTP 
> server with the same implacable reach as conversations with 
> ideologists, which inevitably converge towards their 
> ideological stronghold.


You know, I'll never understand this. Anybody can do a five line 
http server. Hell, with my lib:

import arsd.cgi;
void hello(Cgi cgi) { cgi.write("hello!"); }
mixin GenericMain!hello;


Look, tiny http server (on port 8080)! Also works as cgi, 
fastcgi, scgi, and easy command line testing with a different 
compile option.

But not really that special language wise... yay, you can call a 
library function. Who can't do that?


More information about the Digitalmars-d mailing list