Documentation for any* dub package, any version

Adam D. Ruppe destructionator at gmail.com
Sat Mar 3 14:03:41 UTC 2018


On Saturday, 3 March 2018 at 13:17:15 UTC, Martin Nowak wrote:
> Why would you need to have that in RAM instead of leaving it to 
> the db cache layer?

The search "database" right now is an XML file. Keep in mind this 
is a static site generator meant to just work offline or when 
pushed to github pages and thus avoids dependencies on... well, 
anything. Even if the server side search program is running, it 
reuses that same xml file as it was the simplest thing that could 
possibly work. Reading the file was slow, so I kept it in memory 
with a hashtable index. And since it does a pretty good job and 
the server hosting Phobos was under no memory pressure anyway, 
I've left it to focus on other things for the last year.

So, when I say "optimize that search database" one of the options 
would be to actually use a real database layer :)

> Where are you hosting?
> https://www.hetzner.de/cloud has fairly affordable KVMs

The dub part is on a $5 digital ocean droplet right now. The 
phobos one is a spare computer in my house.


> That's a fallacy. If one doesn't have to do anything, it
> means it's more likely that nothing is done.

Empirical reality disagrees with you. Actually writing the doc 
comments is enough effort as it is and making people go through a 
12-step program to host it (or deal with ddoc's... quirks instead 
of focusing on the actual content) makes it enough of a hassle 
that plenty of people just don't bother. That's why so many dub 
packages are undocumented now.

Though since I put this up, three different people have already 
emailed me asking to delete their ~master caches because they 
added doc comments where none existed before and didn't want to 
leave the embarrassing empty page up any longer than they had to!

> Adding useful documentation is one of the most important
> tasks when writing a library and I'd expect any library with 
> basic quality standards to take care of that.

Yes, and that's why so many users are unimpressed with the 
code.dlang.org site as it was. Lots of packages with no online 
docs, and those who had them were hard to find, leading them to 
believe the whole library was trash.

Well, turns out a bunch of them DO have doc comments, they just 
aren't hosted, and among those without doc comments, they are 
willing to add them with just a bit of motivation and reduction 
of friction.

That's no changing, and it is already making a difference.


More information about the Digitalmars-d-announce mailing list