Page 2 of 3

Re:OSD - IDE

Posted: Fri Oct 15, 2004 5:51 am
by Solar
Ah, the other way round... you mean Literate Programming?

Re:OSD - IDE

Posted: Fri Oct 15, 2004 12:21 pm
by Curufir
Actually that could be quite useful. If, for instance, the IDE could hold an editor copy of the program which it splits automatically into source/documentation/whatever files as you edit the program.

Bad explanation. Here's a pseudo-example:

The combined file:

Code: Select all

{TITLE}Hello World{/TITLE}
{DOC}A simple program that prints Hello World! to stdout{/DOC}
{SECTION}
{SUBTITLE}Headers{/SUBTITLE}
{DOC}Standard headers for libc functions used in the program{/DOC}
{COMMENT 0}stdio.h includes the printf declaration for libc{/COMMENT}
{COMMENT_LINK 0}#include <stdio.h>{/COMMENT_CLINK}
{/SECTION}

{SECTION}
{SUBTITLE}functions{/SUBTITLE}
{SECTION}
{SUBTITLE}main(){/SUBTITLE}
{DOC}Program execution starts with this function{/DOC}
{COMMENT 1}Program execution starts at the main function.{/COMMENT 1}
int {COMMENT_LINK 1}main() {/COMMENT_CLINK} {
  {COMMENT 2}Output Hello World to stdout{/COMMENT}
  {COMMENT_LINK 2}printf("Hello World!");{/COMMENT_LINK}
  {COMMENT 3}End program with error code 0{/COMMENT}
  {COMMENT_LINK 3}return 0;{/COMMENT_LINK}
}
{/SECTION}
{/SECTION}
The Source file:

Code: Select all

#include<stdio.h>
int main() {
printf("Hello World!");
return 0;
}
Everything marked as a comment link in the combined file would give the appropriate comment when clicked/rolled over/whatever.

The Documentation file:
Hello World
A simple program that prints Hello World! to stdout
1.0 Headers
Standard headers for libc functions used in the program
2.0 Functions
2.1 main()
Program execution starts with this function

The current position of the documentation output could be linked to the current position in the source file. So if you are working on a function and want its documentation you just switch windows.

Of course all this would be hidden away. You'd add a comment just by selecting the text to link and then selecting add comment from a menu. You'd add docs in a similar manner, just inserting new sections/subtitles/docs at whatever point you see fit in the code. So effectively all you see in the editor is pure code, with accessible comments and documentation in another panel/window.

Just an idea, one which needs a lot of polishing (XML maybe), but would make for a nice environment. Especially if you could distribute these combined files instead of source files.

***

As usually happens I had a cup of tea and thought of an extension. The comment/doc entries don't have to be text. They could be anything. So if you want a UML diagram to appear as a comment that would be perfectly possible. Could be fun, imagine having the option of running a video clip explaining 3D positioning from the function that does the 3D positioning.

Re:OSD - IDE

Posted: Mon Oct 18, 2004 6:38 am
by bubach
maybe this is something c/c++ osdevers should check out..:
http://osdever.net/forums/viewtopic.php?t=944

/ Christoffer

Re:OSD - IDE

Posted: Mon Oct 18, 2004 6:45 am
by Solar
Pff... any C/C++ coder mature enough to do OS development should have outgrown MSVC. More like a yet-easier for the kids. (And I hear 'em crying for a VB.NET setup...)

Re:OSD - IDE

Posted: Mon Oct 18, 2004 6:51 am
by bubach
And I hear 'em crying for a VB.NET setup...
hehe, i was thinking about:
that should compile a kernel and run BOCHS right from the IDE with CTRL+F5.

Re:OSD - IDE

Posted: Mon Oct 18, 2004 10:25 am
by Colonel Kernel
Solar wrote: Pff... any C/C++ coder mature enough to do OS development should have outgrown MSVC. More like a yet-easier for the kids. (And I hear 'em crying for a VB.NET setup...)
"And when I was young, we had to walk 5 miles to and from school everyday in the snow in our underwear, and it was uphill both ways..."

There's nothing wrong with a little convenience. I use VS.NET at work all the time and it's the best IDE I've used by far. It has a really good editor with Intellisense and all that good stuff. It also beats the hell out of makefiles for whipping up large project structures with complex interdependencies.

Of course, for OS dev I would expect anyone using it to be smart enough to customize everything to use GCC instead of VC 7.x... ;)

I guess what I'm saying is (and I feel the same way re: the GRUB debate) -- mock the beginners all you want, but those of us who develop software for a living and have enough experience ought to be allowed a few conveniences without being labelled "lazy".

Re:OSD - IDE

Posted: Mon Oct 18, 2004 11:02 am
by Curufir
Colonel Kernel wrote: "And when I was young, we had to walk 5 miles to and from school everyday in the snow in our underwear, and it was uphill both ways..."
Luxury. We used to have to get out of the lake at six o'clock in the morning, clean the lake, eat a handful of 'ot gravel, work twenty hour day at mill for tuppence a month, come home, and Dad would thrash us to sleep with a broken bottle, if we were lucky!
mock the beginners all you want, but those of us who develop software for a living and have enough experience ought to be allowed a few conveniences without being labelled "lazy".
Nonsense. If it can't be done with a front-panel and a single digit LED then it shouldn't be done at all ;D.

Re:OSD - IDE

Posted: Mon Oct 18, 2004 1:25 pm
by Solar
Yes, yes, funny... (you *should* hear the Three Dead Troll's interpretation of that though ;-) )

Get me right, I'm using VS at office myself, and I don't say that there's something bad in having your recompile / image creation / Bochs cycle just a mouseclick away.

Hell, I even configured my UltraEdit to do just that.

But - and no offense intended to the original poster - that has nothing to do with OS development per se. Making it easy to start things (like recommending GRUB or writing a PD C library for everyone to use) is fine and well. But being able to configure your friggin' development environment to do your whim, that's not getting obstacles out of your way, that's basics...

OK, I shut up. :)

Re:OSD - IDE

Posted: Tue Oct 19, 2004 3:34 am
by KieranFoot
This program would also include wizards for basic logical structures eg.

Code: Select all

if ... then ... else
do ... loop  [until ...]
[do ...] while ... wend
The might also be wizards for things such as bios print routines, color print routines, bios disk access routines, pmode routines, GDT/IDT Examples, Everything you would need

Have any of you guys heard of the Gold Parser Builder ???

This allows you to recreate programming language syntax's.
This would allow the manager to have language plugin's, in other words if the manager doesn't support a language you just download it an wham youve got syntax checking for the language you want...

Also the manager would chec org statements, locals, externals (Exports)...

Re:OSD - IDE

Posted: Tue Oct 19, 2004 3:38 am
by Pype.Clicker
<joke>
oh ... and i'd like to have a "smart assistant" too that could google for RBIL or redirect me to "HowToAskQuestions" when i'm wondering what's wrong ...

Something like a big book with glasses and mustache
</joke>

Re:OSD - IDE

Posted: Tue Oct 19, 2004 4:02 am
by KieranFoot
;D ::) :P ;)

Re:OSD - IDE

Posted: Tue Oct 19, 2004 4:04 am
by KieranFoot
;D ::) ??? :P :-\ :'( ;)

Re:OSD - IDE

Posted: Tue Oct 19, 2004 6:22 am
by Solar
IDE's are about automating, about metaprogramming, about code generation, about building from pre-made blocks.

OS design is about questioning other people's designs, engineering with atoms, about getting it to run with your own hands.

I simply doubt you can get the two to work together in any way that could satisfy a majority.

Re:OSD - IDE

Posted: Tue Oct 19, 2004 6:26 am
by KieranFoot
An IDE would be used to implament these new ideas into an existing os structure, providing useful code snippets and code wizards to do menial tasks...

The IDE would be to speed thing up, and help stop errors (with the wizards).

Also with a lot of hard work a code checker could be created to check for common errors, such as pushing values and then not popping them, or not setting the segment registers after jumps to other programs... ::)

Re:OSD - IDE

Posted: Tue Oct 19, 2004 6:54 am
by Curufir

Code: Select all

PUSH EBX
PUSH EAX

...

RET
And that's just one case where an IDE isn't able to second guess what my intentions are. Having it brought up as an error would just be annoying.