Shifting this thread over from gpc@gnu.de... (excuse the length of this)
At 3:04 AM +0100 28/1/03, Frank Heckenbach wrote:
If you try use --interface-only on its own, the compiler stops and says you must use either -c or -S with it. So I presumed (always a bad thing to do!) after reading the -c description that your interface modules are stored as object files. (see below, also)
Yes, I agree the behaviour is OK; Its the docs that need attending to! I wasn't actually meaning to complain about the behaviour.
I sort-of got this right the first time around ;-)
The reason I went astray, was that I expected that compiling a unit would produce an object file, which would later be linked in when the main was compiled. In practice, none of the units I've tried compile fully on their own. You get complaints about undefined main, etc., which lead me to thinking that there much be some sort of compiler switch that'd tell it to not look for / create a main function, just create an object file 9library if that suits you better) to later be linked to a main program. That, in turn, lead me to fiddling around with different options. Which... you get the drift, anyway.
This is why a description of how to compile units/modules would have helped... I suppose there is something down in the description of generation of .gpi/.gpm files that might have caused the penny to drop. But currently there appears to be nothing explicit says how its supposed to work.
This paragraph ought to be inserted into the docs in the --interface-only description! (Nicely, worded - thanks.)
I read the reset docs, not rewrite. I might tweak the docs at some stage.
But how about an explicit default by the user from the command-line? Easier than fiddling with their code (not that that's a terribly to do in this case)... low priority... its solvable if faintly irritating. if it was C, I'd use a macro to solve this, FWIW.
Or redefine type File, doing which, err, must raise its own issues...
type file = file of void ; {or} file = file[1] ; { ie file[<bufsize] }
{or assigning it, a la OOP in an initialisation section } file.bufsize = 1 ;
Hmm. Getting a bit fanciful, perhaps. What I'm trying to do is to tie the buffer size with the file handle, which does makes some sense. I suspect fewe users would vary the buffer size from one reset/rewrite to another, so in principle it could be associated with the file for most folk. But I can see the merits of sometimes needing to altering it.
Grr. Any ideas on how long its going to take for this to appear?
I got the vague idea that part of the strategy of GPC was to allow keywords to be redefined so that older code won't bump into keywords from newer/different implementations of Pascal. So this isn't really in place yet?
But no topic headings... yet ;-)
Hmm. Both, but in my ideal world (!) I'd lay out the docs. in a different way. To me the best indexing/reference scheme I have seen is in 'Web Design in a Nutshell' (O'Reilly). I wish O'Reilly would use it in their other books. The index (or appendix) has the keywords in alphabetical order, referring you to an appendix with brief synopses of the keywords in alphabetical order. These, in turn, refer you to a complete synopsis at the head of a chapter. If you still can't remember how to use the thing, you're conveniently at the start of the chapter that covers that subject area needed to (re)learn it.
The beauty of this is that it can be read either front-to-back or as a reference via the index/appendices without either disrupting the use of the other.
For example, <frameset> in the index, points to p473, which contains
<frameset> Chapter 11, page 207 ------------------------------------------------- Description: Frameset Attributes: border bordercolour cols frameborder framespacing ...
Page 207 has the full synopsis, with standards support and short descriptions of the keyword's functions, eg:
<frameset> NN: 2,3,4 - MSIE: 3,4,5 - HTML 4 - WebTV - Opera3 ------------------------------------------------------------------------ <frameset> ... </frameset>
Defines a collection of frames or other framesets
Attributes
border=number Sets frame border thickness (in pixels) ... ...
If you're _still_ stuck, you read the chapter that follows.
There is a nice hierarchy that you traverse, stopping when you've reached the level you need. If you're learning, you read from the front.
This looks like a lot of work, but if done from HeaderDoc or the like, it might be possible to automate much of this straight from descriptions in the source code.
Besides, we could aim to write our own O'Reilly Nutshell book :-) JK! And I really mean JK!
[snip]
I know, but... :-)
[snip]
What I'm suggesting is a little different. Provide a framework within the docs that users can add their own observations to, but one that such that readers can see that its a user contribution. Then users can add as little or much as they like.
You'd occasionally want an editor to run over the whole thing and make it more consistent. (Or have two versions of the docs - last edited version and the free-for-all version)
If you can get the automatic docs out in some format, have a field 'user notes' or whatever present. Let the users add to that. You can then receive contrib.s as diffs or simply merge the new and old docs.
So I suggest to focus on the content first, not on the formalities.
I agree. Fits with what I see as the pragmatic nature of GPC. The user notes can help in this respect.
:-)
I'd just have people submit their bits "without delay" so we'd discover that soon enough before they built up too much of a head of steam... :-) Lazier than some formal coordination scheme!
I've been working on something along these lines myself. (I'm very slowly working towards writing my very own little language, which will probably have an audience of one, ie. me!)
I agree: the learning curve needs to be small.
If there is some real interest, I could write my ideas (which now
are just some random notes).
I'd be interested to see how our ideas compare. I'm working in C, but trying to make it language-independent in a simplistic way.
I know what you mean :-)
Grant Jacobs wrote:
OK, I think I can do that -- to add an input form at the bottom of each page, so anything entered there will appear on the page (just above the input form I guess) marked as user notes, and is sent to me so I can put it into the main documentation if it's alright. Is that what you mean?
I'm still skeptical how much it will gain us in the end, but since there's not much to lose, I'll try it (with the next update) ...
Frank
At 11:03 PM +0100 30/1/03, Frank Heckenbach wrote:
I was thinking more of a field like the ones already there. E.g. You have for each item synopsis, description ... see also.
I was thinking after 'see also' add 'User's observations' (or some-such)
This way their observations are tied to each element, rather the bottom of each page. Let that field be added to by users as they see fit. Periodically spring-clean shifting bits that look OK to the main ("certified" :-) ) part of the docs.
Its a little awkward, but ideally you'd have a section like this after every section in the docs. You could filter the docs so that empty User observation sections are stripped (outside the appendix listings of the keywords, that is; these probably should have a fixed format as they do now so its easier for a reader to spot missing stuff) before making the PDFs, etc.
So, say I want to add some of my own observations to '3.4.6 What about C strings', I can submit/add to a 3.4.6U (of sorts), which will appear under 'User observations' (or whatever) in that section. Later these can be integrated if they are deemed OK, or possibly junked if they can be contradicted.
Would this be too difficult? Or am I too confusing :-)
I'm still skeptical how much it will gain us in the end, but since there's not much to lose, I'll try it (with the next update) ...
You gotta try!! If there is an easy route for people to add their bits they are more likely to do it - we hope...
Grant
Grant Jacobs wrote:
Perhaps we mean the same thing. By page I meant HTML pages, not printed pages in the PS/PDF version, and in HTML, each routine etc. has its own page. (Or do you actually mean one input field for synopsis, one for description, etc.? I think that would be too much.)
I've now set up a test version of the GPC pages with the input forms as I understand them at http://www.gnu-pascal.de/test-input/. (Some links may not work correctly, or point to the original page, but this is only a demo.) This way has the advantage that it was relatively easy to set up, and it can be applied to basically any HTML page.
Let me know what you think of it.
Frank
At 5:00 AM +0100 3/2/03, Frank Heckenbach wrote:
Right, we did get confused on the word page! Its like me trying not to use the word client in case my prospective customers think I'm referring to them instead of the client in the client-server stuff...
What I was thinking was that 'User observations' would appear as the last keyword/section in each portion of the resulting documentation.
You're way ahead of me :-) This is very nice! Its a wonder other projects don't do something this. (Do they?) Now I guess we (you!) get to sit back and if anything happens.
Grant
Grant Jacobs wrote:
I haven't seen this before. This is just what came to my mind when I read your mails, and it was surprisingly easy to implement.
Now I guess we (you!) get to sit back and if anything happens.
As soon as it's on the official pages. I'll do that with the next update (perhaps next week). Until then, it would be nice of some of you could test it to make sure it basically works ...
Frank