Re: Can D still compile html files? Seems not.

2013-02-26 Thread Dan Olson
Maybe you want Knuth's Literate Programming. 

http://en.wikipedia.org/wiki/Literate_programming

Long ago it was only for pascal and C (web and cweb), but now I see
there is noweb that works with any programming language.
-- 
Dan




Re: Can D still compile html files? Seems not.

2013-02-23 Thread Charles Hixson

On 02/23/2013 06:30 PM, Jesse Phillips wrote:

On Saturday, 23 February 2013 at 19:07:31 UTC, Charles Hixson wrote:

What actually brought this up is that I've gotten so disgusted with
ddoc that I was looking for pretty much ANY alternative.


ah, then Tex isn't what you want. As for improving DDOC several attempts
have been made. CandyDoc

http://www.dsource.org/projects/helix/wiki/CandyDoc

and vibe.d does something different

http://vibed.org/api/

Default DDoc is definitely not very usable. There have also been others,
several based on CandyDoc.


CandyDoc looked like it was abandoned years ago, and, in any case (IIUC) 
it was just a wrapper around DDoc, so any real deficiencies wouldn't be 
fixed, though it might be less verbose and have friendlier macros.


Re: Can D still compile html files? Seems not.

2013-02-23 Thread Jesse Phillips
On Saturday, 23 February 2013 at 19:07:31 UTC, Charles Hixson 
wrote:
What actually brought this up is that I've gotten so disgusted 
with ddoc that I was looking for pretty much ANY alternative.


ah, then Tex isn't what you want. As for improving DDOC several 
attempts have been made. CandyDoc


http://www.dsource.org/projects/helix/wiki/CandyDoc

and vibe.d does something different

http://vibed.org/api/

Default DDoc is definitely not very usable. There have also been 
others, several based on CandyDoc.


Re: Can D still compile html files? Seems not.

2013-02-23 Thread Charles Hixson

On 02/22/2013 08:59 PM, Jesse Phillips wrote:

Nope, removed. While not the same and may not do anything that you are
considering.

This was made to compile listings and then put the output of compiler
and run into a new tex file.

https://github.com/JesseKPhillips/listings-dlang-extractor

What actually brought this up is that I've gotten so disgusted with ddoc 
that I was looking for pretty much ANY alternative.  It looks, though, 
like I've got to use a mixture of ddoc and doxygen.  Doxygen won't 
handle extern(C) code that I need to document, and ddoc is basically a 
verbose and crippled system that doesn't generate an index or a usable 
table of contents.


FWIW, I'm not too pleased with doxygen either, but it has decent indexes 
and a decent table of contents, and the pdf it generates has a 
reasonable legibility.  (The html is only useful for small pieces of 
code, because the fonts are too big.  I'm sure if I were better at html 
I could fix this, but the last time I studied html everything was 
static.  (I.e., before either javascript or css.)  So if I can make a 
pdf do the job, that's what I'll use.  (And, FWIW, I've never studied 
TEX, so I don't even think about customizing THAT format.)


This is really annoying.  Documentation should just be something that I 
use to keep track of what I've done when the program has gotten too big 
to hold in my memory...or was done too long ago.  None of these are even 
potentially useful as end user documentation, and I'm not planning on 
publishing the library as closed source.  (Even open source is dubious. 
 The parts I'm currently writing are documentation of pieces of a C 
library that I use in the current project, not the complete thing, so 
it's general utility is dubious.)  Eventually the entire project will, 
if successful, be GPL, so the documentation is for 
programmers...especially me.  And having it be a big and annoying 
imposition is a distraction that I really don't need.  But this kludge 
of a solution that I've come up with is "better", or at least faster, 
than writing my own doc system.  And probably lots faster, even though I 
would write it in a language better suited to the process than D. 
Probably Python or Ruby.  (And the probably means Python.)  I did take 
the idea seriously enough at one point though to start putting together 
an appropriate syntax.  It wouldn't be THAT hard.  The hardest part 
would be generating the index and table of contents.


For that matter, I like that ddoc allows/requires that you specify the 
file(s) that are being documented.  But I want to be able to do it 
piecemeal instead of all at once.  Arrgh!  I shouldn't think about how 
to do it, or I might decide to go ahead, even though it's an insane 
diversion of effort.


Re: Can D still compile html files? Seems not.

2013-02-22 Thread Jesse Phillips
Nope, removed. While not the same and may not do anything that 
you are considering.


This was made to compile listings and then put the output of 
compiler and run into a new tex file.


https://github.com/JesseKPhillips/listings-dlang-extractor



Re: Can D still compile html files? Seems not.

2013-02-22 Thread Adam D. Ruppe
That's not very difficult to do with a script of some sort 
(though I really wish dmd could take a file from stdin to avoid 
the intermediate file)


I don't have one off the top of my head, but a regexp could 
probably do it well enough.


Re: Can D still compile html files? Seems not.

2013-02-22 Thread bearophile

Andrej Mitrovic:


However it's still listed in the spec as a feature:


I see a similar feature used every day in online articles that 
contain Haskell code. But apparently D programmers are not 
interested in it...


Bye,
bearophile


Re: Can D still compile html files? Seems not.

2013-02-22 Thread Andrej Mitrovic
On 2/22/13, Steven Schveighoffer  wrote:
> http://dlang.org/changelog.html#new2_060
>
> "HTML input file support completely removed."
>
> -Steve
>

However it's still listed in the spec as a feature: http://dlang.org/html.html


Can D still compile html files? Seems not.

2013-02-22 Thread Charles Hixson

.../projects/D/cells$ dmd test1.html
Error: unrecognized file extension html

test1.html is:











This is a test.

main()
{
}