Skip to content

Conversation

CyberShadow
Copy link
Member

This is close to a rewrite of chmgen:

  • Compatibility with the new layout
  • Removing ancient hacks from the digitalmars.com/d/1.0/ days
  • General code decrummification
  • Removing KirkMcDonald's ancient index (it's no longer needed, anyway)
  • Operating on entire files instead of per-line
  • Slight clean-up of directory structure
  • Adding d.tag output file for dman
  • Navigation is parsed by rendering DDoc to almost-valid (trailing commas) JSON
  • Explicit linting, which finds broken links etc.

I really wanted to do the HTML modification part with DDoc, but doing so would mean adding a few pages of copy-pasta to win32.mak (incl. a listing of Phobos modules, i.e. another unmaintainable mess). So regexes it is.

Does anyone still use the CHM documentation, anyway?


----
// ' * '
string backSlashes(string s)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why these one-liners?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went back and forth between slashes and backslashes a few times. I'm not sure which way is more compatible with the CHM readers out there.

@MartinNowak
Copy link
Member

Just tried to build a release from master and currently chmgen dies with an access violation.
So can we please go on with this?

@CyberShadow
Copy link
Member Author

Rebased.

@andralex Anything else?

{
if (json.type == JSON_TYPE.ARRAY)
{
auto nodes = json.array;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove hard tabs pliz

@CyberShadow
Copy link
Member Author

remove hard tabs pliz

Why? Why are you so concerned about the coding style of an utility that, in all likeliness, nobody except me is going to touch? Why bother if the only people who use this, use this indirectly because it's part of the build process? Why expend the effort, if we haven't heard anyone say anything about the CHM in years, likely because no one uses it any more? Why chmgen, when you have tabs all over the place elsewhere, in much more important and "trodden" parts, such as the .css files and spec .dd files and Dub and Ddox? And why now, when tabs in chmgen are nothing new, and when you know that this blocks fixing the build?

Edit: The above probably sounds more dramatic than intended. I am only mildly peeved about this.

@andralex
Copy link
Member

andralex commented Feb 7, 2015

Why are you so concerned about the coding style of an utility that, in all likeliness, nobody except me is going to touch?

No need to make a thing out of this. Our general guidelines avoid hard tabs, and this code is part of our repository. Please let's just do it? Thanks!

@CyberShadow
Copy link
Member Author

No need to make a thing out of this.

Not the intention, it just got a little ... out of hand ... anyway, I did add a detab commit.

@CyberShadow
Copy link
Member Author

Ping? Does anyone want to explain or talk about the problem holding up this pull, and what needs to be done to fix it?

MartinNowak added a commit that referenced this pull request Feb 10, 2015
@MartinNowak MartinNowak merged commit fec887e into dlang:master Feb 10, 2015
@MartinNowak
Copy link
Member

I understand that some people on Windows expect a chm help in their start menu after installation.
But this looks like our website in a crappy browser. Is this really worth all the effort we're putting into it?
chm

@CyberShadow
Copy link
Member Author

It shouldn't look like that. I'll look into it.

@CyberShadow
Copy link
Member Author

I'm now getting an access violation... did you not get one?

@MartinNowak
Copy link
Member

It shouldn't look like that. I'll look into it.

That's not the point though, because I know you'll fix it. Since nobody looks at chm we'll always pile up regressions that we'll have to deal with before releasing, not funny.
And all of that for our website in a weird program that probably runs what, an IE7 engine?

BTW
Druntime isn't styled at all, but that might be an issue on my side.

@CyberShadow
Copy link
Member Author

That's not the point though, because I know you'll fix it. Since nobody looks at chm we'll always pile up regressions that we'll have to deal with before releasing, not funny.

Yeah, I know. I wanted to do it in DDoc, but... win32.mak.

And all of that for our website in a weird program that probably runs what, an IE7 engine?

Yeah, I know. I'm mostly maintaining it because Manu kept saying how important and widespread CHMs are in gamedev.

@CyberShadow
Copy link
Member Author

BTW, by "it shouldn't look like that" I didn't mean the brokedness by itself, I mean that the navigation and sidebars should be gone, as well as the header, i.e. the content fills up the entire frame.

@MartinNowak
Copy link
Member

BTW, by "it shouldn't look like that" I didn't mean the brokedness by itself, I mean that the navigation and sidebars should be gone, as well as the header, i.e. the content fills up the entire frame.

I built that one manually, I'll hopefully will get one from the release builder in a few minutes.
The druntime pages filled the whole screen, but weren't styled.

@CyberShadow
Copy link
Member Author

Something is really really wrong with the navigation now.

@MartinNowak
Copy link
Member

Yeah, I know. I'm mostly maintaining it because Manu kept saying how important and widespread CHMs are in gamedev.

Any comment on that @TurkeyMan?

@MartinNowak
Copy link
Member

On 02/17/2015 08:21 PM, Vladimir Panteleev wrote:

I'm now getting an access violation... did you not get one?

Wait an hour or so, I have a pile of fixes that I'm testing right now.

@CyberShadow
Copy link
Member Author

Sheesh, way to out a behind-the-back-talker ;) When I maintained my old CHM page, it was relatively popular ( http://thecybershadow.net/d/docs/ )

I should add a notice that it's in D now or something I guess.

@CyberShadow
Copy link
Member Author

The A/V was because I had an old Phobos checkout, I think. But I fixed the code too.

@CyberShadow
Copy link
Member Author

Something is really really wrong with the navigation now.

Never mind, that's because I broke it. D'oh.

@CyberShadow
Copy link
Member Author

The druntime pages filled the whole screen, but weren't styled.

Repro'd.

@CyberShadow
Copy link
Member Author

BTW, I think IRC might be a little more efficient. And Andrei was looking for you there the other day. ;)

@CyberShadow
Copy link
Member Author

#910

We could create a poll on the NG, if no one uses the CHM then we can remove it. But this program would still be useful, for d.tag generation and as a lint tool.

@MartinNowak
Copy link
Member

You can find my build output here.
I'd be glad if you could test the windows zip a little.
https://dlang.dawg.eu/downloads/master/

@MartinNowak
Copy link
Member

BTW, I think IRC might be a little more efficient.

I'll see what I can do. Somewhere in my emacs should be an IRC client.

@CyberShadow
Copy link
Member Author

I'd be glad if you could test the windows zip a little.

Builds Digger, rabcdasm and DFeed just fine.

What happened with the libcurl download link in download.dd? I was just thinking we should add an sqlite3.lib/.dll download.

@CyberShadow
Copy link
Member Author

Oh, of course, curl.lib is included now. That leaves sqlite.

@MartinNowak
Copy link
Member

Oh, of course, curl.lib is included now.

Yep :).

I was just thinking we should add an sqlite3.lib/.dll download.

As long as we don't stuff everything onto the download page again.
https://web.archive.org/web/20141109181718/http://dlang.org/download.html

And I don't even know how to build it. There is http://wiki.dlang.org/Curl_on_Windows, but http://wiki.dlang.org/?search=sqlite is fairly empty. Something like a build manual in the wiki and a link to ftp.digitalmars.com would work. Or better yet one could host the bins on github.

@CyberShadow
Copy link
Member Author

The DLL download (http://www.sqlite.org/2015/sqlite-dll-win32-x86-3080802.zip) contains a .dll and a .def.

@CyberShadow
Copy link
Member Author

SQLite is really easy to compile (as a static library, anyway) because in one of its forms it comes as a single .c file, and is compatible with DMC.

@CyberShadow
Copy link
Member Author

The druntime pages filled the whole screen, but weren't styled.

This is still not fixed BTW, but the problem is not with chmgen. The Windows docs are built like that!

@CyberShadow
Copy link
Member Author

The druntime pages filled the whole screen, but weren't styled.

Figured it out. You just need to force a rebuild of Druntime docs. As they're all built in Phobos' win32.mak, it can't track dependencies, so all you have to do is a clean build.

@TurkeyMan
Copy link
Contributor

@MartinNowak I still stand by that .chm claim. All gamedev docs are .chm files. It's familiar and comfortable to that industry.
I do think the importance is slowly regressing with time though, as people are more and more accustomed to just go straight for google than to worry about reading a document on their local machine.
I'd like to see it remain for the time being though. New comers from the games industry might find it useful and get a small confidence boost from it's presence :)

@MartinNowak
Copy link
Member

@MartinNowak I still stand by that .chm claim. All gamedev docs are .chm files. It's familiar and comfortable to that industry.

Fair enough, I'm just worried that the quality we're delivering rather turns people off and that even though we're spending quite some time on it. Maybe it would be better spend improving the pdf?
http://dlang.org/dlangspec.pdf

@TurkeyMan
Copy link
Contributor

Speaking for myself, I would sooner go to the internet than ever open a pdf. But if it's absorbing significant time, then I'm not sure the value holds.
I'll say, I think the .chm is valuable, but I'll let someone who knows the maintenance burden decide if it should live.

@MartinNowak
Copy link
Member

I say we'll keep it for now since @CyberShadow just rewrote the chmgen tool (with the nice side-effect of making dman way more useful).
But in the longer-term we should reconsider our options.

@CyberShadow
Copy link
Member Author

Eh, I enjoy working on it.

I'll probably stop when the CHM stops carrying its weight (in zip filesize).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants