July 22, 2013
On Mon, Jul 22, 2013 at 11:48:10PM +0200, Brad Anderson wrote:
> On Monday, 22 July 2013 at 20:49:09 UTC, H. S. Teoh wrote:
> >On Mon, Jul 22, 2013 at 09:59:57PM +0200, Kagamin wrote:
> >>Didn't see hypenation on the web before, looks alien to me. From the typesetting point of view I find manpages with a larger font pleasure to read. http://man7.org/linux/man-pages/man3/fclose.3.html They are neither justified nor hyphenated.
> >
> >Exactly. While justification/hyphenation are nice to have, they are really only peripheral benefits. We should not be paying such a big price for them. I really have a hard time understanding the rationale behind trying to make hyphenation work, when the time could be much better spent improving the D docs that newbies keep complaining about.
[...]
> My recent changes to hyphenation were because Andrei vetoed my attempt to remove hyphenation so I spent some time trying to make it as bearable as possible.  Not much time has gone into it (and I'm not a great or qualified technical writer in any case).

I think the best approach at this point is to leave CSS hyphenation alone, and just remove/disable hyphenator.js. Removing *all* hyphenation seems be a bit too heavy-handed.


T

-- 
I am a consultant. My job is to make your job redundant. -- Mr Tom
July 22, 2013
On Monday, 22 July 2013 at 22:35:20 UTC, H. S. Teoh wrote:
> On Mon, Jul 22, 2013 at 11:48:10PM +0200, Brad Anderson wrote:
>> On Monday, 22 July 2013 at 20:49:09 UTC, H. S. Teoh wrote:
>> >On Mon, Jul 22, 2013 at 09:59:57PM +0200, Kagamin wrote:
>> >>Didn't see hypenation on the web before, looks alien to me. From the
>> >>typesetting point of view I find manpages with a larger font
>> >>pleasure to read.
>> >>http://man7.org/linux/man-pages/man3/fclose.3.html They are neither
>> >>justified nor hyphenated.
>> >
>> >Exactly. While justification/hyphenation are nice to have, they are
>> >really only peripheral benefits. We should not be paying such a big
>> >price for them. I really have a hard time understanding the rationale
>> >behind trying to make hyphenation work, when the time could be much
>> >better spent improving the D docs that newbies keep complaining
>> >about.
> [...]
>> My recent changes to hyphenation were because Andrei vetoed my
>> attempt to remove hyphenation so I spent some time trying to make it
>> as bearable as possible.  Not much time has gone into it (and I'm
>> not a great or qualified technical writer in any case).
>
> I think the best approach at this point is to leave CSS hyphenation
> alone, and just remove/disable hyphenator.js. Removing *all* hyphenation
> seems be a bit too heavy-handed.
>
>
> T

That's exactly what the current state of the pull request is.
July 23, 2013
On Sunday, 14 July 2013 at 20:19:06 UTC, Jacob Carlborg wrote:
> On 2013-07-14 14:34, bearophile wrote:
>
>> Do you like this? It's made with Python:
>> http://sphinx-doc.org/
>
> Ddoc in it self is not that bad, for documenting code. It's just that I would never create a web site using it. I would go with a server side script. I prefer Ruby on Rails for that.

There is absolutely nothing that Ruby, PHP or anything else would
buy us at this point. It would be just killing fly with the
hammer.

If someone is super stubborn to change DDOC for something
dynamically generated then PHP is available on DMD server.

The biggest issues with dlang.org are (basing on YSlow):
- Lack of compression of HTML, CSS and JS content.
     ---
     There are 7 plain text components that should be sent
compressed

     http://dlang.org/
     http://dlang.org/css/codemirror.css
     http://dlang.org/css/style.css
     ...
     ---

- Most of the java-script being included in header instead of
footer.
   That is also partially my fault, but I just went with flow back
then.
- No expire headers
- Lack of CDN


Other things that YSlow points out that may be important:
- There are 13 components with misconfigured ETags
- This page has 10 external Javascript scripts. Try combining
them into one.
- This page has 4 external stylesheets. Try combining them into
one.

I've done tests few months ago because people where complaining
about JavaScript and (wrongly) blamed run-able examples for this.

Hyphenate.js indeed has an impact on load times and removing it
in favor of CSS3 would fix the problem. Of course there is
probability that people with '90s browsers will complain (stares
at Nick ;>) but it is their choice to stick with such outdated
software.

Regards
Damian Ziemba
July 23, 2013
On Monday, 22 July 2013 at 15:40:47 UTC, Martin Nowak wrote:
> On 07/14/2013 05:19 AM, Val Markovic wrote:
>> 2. Looking at the Network data in the Chrome DevTools, realize the site
>>    isn't using a CDN. Make a note of mentioning this to the site
>>    maintainers; using a CDN is critical to performance and ever since
>>    CloudFlare came on the scene (fast & free CDN that's also trivial to
>>    set up) there's no excuse not to use one.
> Yes, I get 40kB/s download rate and it takes 4s to load an uncompressed HTML file.
> Compressing http://dlang.org/phobos/std_algorithm.html could save 139.9KiB (82% reduction).

Not just about speed but also total data transfer, this is important for anyone using e.g. a mobile or tablet device with 3G data rather than wifi (as I was yesterday, working on a train:-)
July 23, 2013
On Sunday, 14 July 2013 at 20:35:45 UTC, Walter Bright wrote:
>
> 3. HTML, PDF, Ebook, and CHM outputs are generated from Ddoc.

Walter, with respect, I know you're too smart to be saying something silly like this. Surely you know that ebooks and CHM are specially-compiled HTML files. To imply that DDoc, and not HTML, is the common denominator between these outputs brings me to the acme of frustration as I have said over and over again that, at the very least, ebooks depend upon good HTML output.

To this end, I have tried for months to help bring dlang.org up to HTML 5 standard if, for no other end, to be able to compile the spec into an epub format. I even toed the github waters by submitting a trivially simple PR which, for the past months, has gone completely ignored.

In the meantime, my offers on help with other dlang.org PRs have also gone ignored. The thread in which I keep offering to help (Dlang spec rewrite) has gone ignored. To argue that contributions are not languishing or that volunteers are not being ignored necessarily means that I do not exist.

If I have learnt one thing in the past few months, it is that any attempt to dispute using DDoc to program an entire website is a fool's exercise. Despite vocal objections from the plebian masses, the DDoc architects and maintainers will stubbornly defend its usefulness. One can hardly blame them: wouldn't any of us defend code that we had carefully designed or write?

Therefore, dlang.org will stay, for better or worse, in DDoc. It's not worth arguing. As for willing contributors, it seems to me that the maintainers have an agenda to which they are adhering. Contributions focussed on other areas are diversions.

Have I said anything that is factually incorrect?
July 23, 2013
On Tuesday, 23 July 2013 at 07:47:03 UTC, nazriel wrote:
> Hyphenate.js indeed has an impact on load times and removing it
> in favor of CSS3 would fix the problem. Of course there is
> probability that people with '90s browsers will complain (stares
> at Nick ;>) but it is their choice to stick with such outdated
> software.
>
> Regards
> Damian Ziemba

100% agree on this.
July 23, 2013
On 2013-07-23 09:47, nazriel wrote:

> There is absolutely nothing that Ruby, PHP or anything else would
> buy us at this point. It would be just killing fly with the
> hammer.

I guess you don't see the advantage of having:

* Built in support for Sass, CoffeeScript and similar techniques
* Using a well known framework that have plenty of documentation available
* Having a server and database backing up new features as such comments

BTW, you do know that you can do server side caching to avoid hitting the Rails/PHP stack at all most times? The web server (apache) would just serve the raw HTML just as it does now.

-- 
/Jacob Carlborg
July 23, 2013
On Tuesday, 23 July 2013 at 12:29:38 UTC, Jacob Carlborg wrote:
> * Built in support for Sass, CoffeeScript and similar techniques
> * Using a well known framework that have plenty of documentation available
> * Having a server and database backing up new features as such comments

There is nothing here D can't do. Dogfooding ftw.
July 23, 2013
On Tuesday, 23 July 2013 at 13:19:12 UTC, Dicebot wrote:
> There is nothing here D can't do. Dogfooding ftw.

hell, I've done my own versions of that stuff in D! Though most the similarities are actually coincidence since I've never actually used the Ruby stuff, there are a lot of similarities.

In the perhaps poorly named html.d in my github
https://github.com/adamdruppe/misc-stuff-including-D-programming-language-web-stuff


There's a macro expander thing that includes a css and javascript subclass. The javascript one is nothing special, it just adds a foreach macro to it. (Which is btw a text expansion macro, but hey it works for me fixes the biggest annoyance I have with that language.)

The really useful one comes with the expandAndDenest css one which translates stuff like

 .test {
    color: red;
    .bold { font-weight: bold; }
 }

into

 .test { color: red; }
 .test .bold { font-weight: bold; }


and has a bunch of macros you can define and use yourself for stuff like some color manipulation, reuse of declarations, and so on.




Of course, no framework for the site is required here, since you can always just convert the file ahead of time in the makefile and serve plain generated code to the website.
July 23, 2013
On Tue, Jul 23, 2013 at 09:47:02AM +0200, nazriel wrote: [...]
> Hyphenate.js indeed has an impact on load times and removing it in favor of CSS3 would fix the problem. Of course there is probability that people with '90s browsers will complain (stares at Nick ;>) but it is their choice to stick with such outdated software.
[...]

Honestly, I think hyphenation is blown wayyyy out of proportion. I turned off JS on dlang.org (I use Opera) because it was so slow, and now the site is significantly faster. And guess what? I didn't even *notice* the lack of hyphenation until I saw threads about the slowness of hyphenate.js. Seriously, we need to take a deep breath, step back, and get the right perspective on things. Hyphenation is mostly a *non-issue*. Most people don't even notice it! Have you ever seen threads on the forum about why dlang.org sucks because it lacks hyphenation? I haven't. So why are we paying such a hefty tax on it (i.e. hyphenate.js's slow performance)? On the contrary, there are tons of threads about slow loading times.

So I say, leave the CSS3 hyphenation stuff in, so that whoever uses browsers that support it will get the benefit, and take out hyphenate.js, because the ROI is simply too small to justify such a big performance hit.


T

-- 
Stop staring at me like that! You'll offend... no, you'll hurt your eyes!