Re:New D programming language forum, written entirely in D
by dark_c on Wednesday February 15, 2012 @02:48AM
(#3593508)
The site is amazingly fast (at least subjectively), even though there must be a higher traffic coming from HN. Has anyone inspected the code to see how it's done and if there's some kind of a web framework for D?
Re:New D programming language forum, written entirely in D
by tintin on Wednesday February 15, 2012 @05:04AM
(#3593713)
Funny that people notice this. I think this is how all pages on the internet should be!
Lately I'm getting tired of all those fancy Javascript pages or pages build on bloated frameworks.
The speed of this forum has nothing to do with D. You can achieve this in a language like PHP as well.
While there are equivalents available for interpreted/CGI languages (e.g. opcode caches, memcached), there is still a significant performance advantage. With a warm cache, most pages can be written out in under 5ms, and the busiest in under 50.
For some perspective, the time needed to compose the busiest view (threaded or split-view) halved when I moved from naive string concatenation to an optimized appender.
Re:New D programming language forum, written entirely in D
by CyberShadow on Wednesday February 15, 2012 @07:59AM
(#3594038)
Yes, there are way too many things hard-coded at the moment. I want to refactor all of it out into templates, config files and library code. There's apparently some interest of adopting some code into D's standard library, too.
Re:New D programming language forum, written entirely in D
by CyberShadow on Wednesday February 15, 2012 @09:15AM
(#3594271)
Yes. D1 is pending deprecation at the end of this year. D2 uses a common runtime separated from the standard library, and you can use Phobos and Tango alongside each other.
Re:New D programming language forum, written entirely in D
by EnderMB on Wednesday February 15, 2012 @03:39AM
(#3593585)
It's probably not the deciding option, but the front-end code is only just over 20K because outside of a few images and a stylesheet there's very little going on.
A lot of Web Designers today tend to completely forget that page size matters, and that just because many of us have broadband connection it's no reason to throw JS and screen size images everywhere.
Re:New D programming language forum, written entirely in D
by EnderMB on Wednesday February 15, 2012 @05:25AM
(#3593749)
I didn't say that it was the underlying reason, but it's nice to note that even though the page looks nice it's also small and efficient, especially when you compare it to more established forums.
Re:New D programming language forum, written entirely in D
by hasenj on Wednesday February 15, 2012 @03:19AM
(#3593554)
It looks like web.d implements the response handler from scratch, so I doubt there's a framework. Maybe a framework will be extracted from this in the future.
It looks like there isn't even a template language -- it seems to build the html using the plain old string concatenation method.
Re:New D programming language forum, written entirely in D
by thebigshane on Wednesday February 15, 2012 @11:04AM
(#3594728)
D's design goals attempt to combine the performance of
compiled languages with the safety and expressive power
of modern dynamic languages. Idiomatic D code is
commonly as fast as equivalent C++ code, while being
shorter and memory-safe.
D seems to have similar goals with Go (golang). Has anybody here used both?
Re:New D programming language forum, written entirely in D
by stonemetal on Wednesday February 15, 2012 @07:44AM
(#3593998)
The core team never went dormant. There was a point where the community seemed to have contracted sharply, back before 1.0. Is that what you mean? If so then yeah it seems to have turned itself around.
The speed of this forum has nothing to do with D. You can achieve this in a language like PHP as well.
Just skip the bloat (server and client side).
* Optimized and deflated static resources
* Deflated HTML output
* SQLite prepared statements
* Integrated HTTP server (although it's currently in front of an Apache proxy)
* An optimized string builder (https://github.com/CyberShadow/DAppenderResearch)
* RAM cache of frequent DB queries
While there are equivalents available for interpreted/CGI languages (e.g. opcode caches, memcached), there is still a significant performance advantage. With a warm cache, most pages can be written out in under 5ms, and the busiest in under 50.
For some perspective, the time needed to compose the busiest view (threaded or split-view) halved when I moved from naive string concatenation to an optimized appender.
http://en.wikipedia.org/wiki/D_(programming_language)#Histor...
A lot of Web Designers today tend to completely forget that page size matters, and that just because many of us have broadband connection it's no reason to throw JS and screen size images everywhere.
It looks like there isn't even a template language -- it seems to build the html using the plain old string concatenation method.
https://github.com/CyberShadow/DFeed
[http://en.wikipedia.org/wiki/D_%28programming_language%29]
More different than I thought.
HN -> http://forum.dlang.org/ -> http://dlang.org/overview.html -> http://digitalmars.com/NewsGroup.html