Re: [Freedos-user] Anyone want to write an article about FreeDOS?

2023-02-06 Thread Jim Hall
*I'm going to ignore all the off topic stuff in this conversation and bring
it back to the original focus:*

>> And yes, an article, possibly a series of articles, about programming on
> >> DOS, for DOS, will be forthcoming...
> > Would you prefer an article on Pascal? I know you (also) are a fan of
> > it. An article from your experience there might be useful.
> No, kind of programming language agnostic, with examples in BASIC, Turbo
> Pascal, C and assembler. As mentioned, it will be about programming in
> DOS for DOS.
> >
> >
>


Yes, I think articles about DOS programming in any language would be very
interesting. As long as the language variant is open source (for example:
NASM is an open source assembler, Microsoft MASM is not) the editors and
readers at OpenSource have shown great interest all kinds of programming
articles. They've run programming articles about Algol68 and other lesser
known languages.

So yes, write an article about programming for FreeDOS with FreePascal. Or
programming for FreeDOS with NASM. Or programming for FreeDOS with ___.

If you'd like a simple program to start with, they often use the "guess the
number game" as a simple programming example. Pick a random number between
1-100, and loop ("too high" and "too low") until the user guesses correctly.

Comparisons between DOS programming and Unix/Linux programming would also
be good. Like how would you port a Linux ncurses program to DOS conio? Or
how would your approach differ if you were to write a program on DOS vs for
Linux? As an example, I loved Jerome's article about large number
arithmetic on DOS.

>
___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user


Re: [Freedos-user] Anyone want to write an article about FreeDOS?

2023-02-06 Thread Ralf Quint

On 2/6/2023 5:40 PM, Rugxulo wrote:

Hi,

On Mon, Feb 6, 2023 at 4:35 PM Ralf Quint  wrote:

On 2/6/2023 2:03 PM, Rugxulo wrote:

Do you not understand that I see a lot of similarities between the two
OSes? Certainly they share enough for various ports of useful tools to
be made. It doesn't mean they have much in common, but I still see a
lot to learn from classic UNIX and the philosophy of some of the
authors and tools (as evidenced by my quotes from them). DOS is
"simple" (keep it simple!) but still useful (with the right tools and
the right ideas).

No, there aren't really "a lot of similarities" between DOS and
Unix/Linux.

DOS v1 was more like CP/M, but DOS v2 added file handles and
redirection. C compilers for DOS were abundant. C came from UNIX.
Well, no. For one, part of the programming API of DOS 1.xx was similar 
to that of CP/M-80. But it had a totally different underlying file 
system, as Paterson used the FAT filesystem that originally was inspired 
by the 8 bit FAT system used by Microsoft's Standalone BASIC (which he 
helped to implement at SCP) as well as Microsoft's unreleased 8-bit OS 
MDOS/MIDAS, which he was shown by Marc McDonald (Microsoft employee #1).


And C was developed to have a higher level language to implement Unix 
quicker "cross-platform", but while it has some features that it 
inherited from that initial task, it is not a Unix specific programming 
language. That is what in the end has made it so popular over a long 
time. In case of DOS, this shows in the use of very DOS specific 
libraries The file I/O stuff is a bit Unix like, but that's about it. 
The use of (n)curses for example is a typical Unix thing, that has 
nothing to do with DOS and should not be shoehorned into a DOS 
application...



Some *ix utilities MIGHT be useful for the use on DOS,

MKS Toolkit? GNUish? EMX? DJGPP? Heck, even Simtel and Garbo had a few.

I said "some" utilities. Not everything plus the kitchen sink.



"The Lessons of Unix Can Be Applied Elsewhere"

Nice statement, but I think that this is wrong. And just for the record, 
I used my first Unix system before I used my first DOS system...
Unix was from the start to be an abstraction of the hardware underneath, 
running on different hardware, usable with minimal knowledge of the 
hardware (specially, CPU wise).
DOS (as in MS-DOS/PC-DOS) is directly tied to the Intel 8086 CPU, it's 
segmented memory models, it's access to an underlying BIOS (and various 
extensions) on the hardware level and out of necessity, much more 
reliant on direct access to the hardware underneath.



And yes, an article, possibly a series of articles, about programming on
DOS, for DOS, will be forthcoming...

Would you prefer an article on Pascal? I know you (also) are a fan of
it. An article from your experience there might be useful.
No, kind of programming language agnostic, with examples in BASIC, Turbo 
Pascal, C and assembler. As mentioned, it will be about programming in 
DOS for DOS.


I built and tested P5 Pascal (ISO 7185) with GPC (and GNU Make) for
DOS, Windows, and Linux.


ISO 7185 is the worst thing that could happen to Pascal. Utterly useless 
and outdated by the time it was released.
Same as the standards for "minimal" and "extended" BASIC. There is not 
one mainstream BASIC implementation that is really sticking to either one..



Ralf



___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user


Re: [Freedos-user] Anyone want to write an article about FreeDOS?

2023-02-06 Thread Rugxulo
Hi,

On Mon, Feb 6, 2023 at 4:35 PM Ralf Quint  wrote:
>
> On 2/6/2023 2:03 PM, Rugxulo wrote:
> > Do you not understand that I see a lot of similarities between the two
> > OSes? Certainly they share enough for various ports of useful tools to
> > be made. It doesn't mean they have much in common, but I still see a
> > lot to learn from classic UNIX and the philosophy of some of the
> > authors and tools (as evidenced by my quotes from them). DOS is
> > "simple" (keep it simple!) but still useful (with the right tools and
> > the right ideas).
>
> No, there aren't really "a lot of similarities" between DOS and
> Unix/Linux.

DOS v1 was more like CP/M, but DOS v2 added file handles and
redirection. C compilers for DOS were abundant. C came from UNIX.

> Some *ix utilities MIGHT be useful for the use on DOS,

MKS Toolkit? GNUish? EMX? DJGPP? Heck, even Simtel and Garbo had a few.

> but that doesn't mean by any stretch that things like "The Art of Unix
> Programming" do make any sense on DOS. The main goal should still be to
> program for DOS, not for Unix...

The book is mostly historical and philosophical about the "UNIX
mindset", not so much about doing UNIX-specific coding. So their
overall philosophy (esp. "open source") still applies greatly to
FreeDOS (or others).

* http://www.catb.org/~esr/writings/taoup/html/pr01s01.html

[partial intended audience, but others welcome too]

"You should read this book if you are a non-Unix programmer who has
figured out that the Unix tradition might have something to teach you.
We believe you're right, and that the Unix philosophy can be exported
to other operating systems. So we will pay more attention to non-Unix
environments (especially Microsoft operating systems) than is usual in
a Unix book; and when tools and case studies are portable, we say so."

"The Lessons of Unix Can Be Applied Elsewhere"

* http://www.catb.org/~esr/writings/taoup/html/ch01s05.html#id2873180

> > Jim's topic list mentioned Awk, Bash, C, Curl, Emacs, GDB, Grep,
> > Python, Sed, SSH, Vim, wget. (We have versions of all of those.)
> >
> In case you missed it, this was the whole list of possible topics from
> the Open Source magazine, not a list of suggested topics in regards to
> FreeDOS, as that was what Jim was asking in the subject of this thread.

I have used most of these on FreeDOS host for FreeDOS target. That is
the advantage of "portable" or "standard". I'm not tied to "UNIX"
exclusively.

> And yes, an article, possibly a series of articles, about programming on
> DOS, for DOS, will be forthcoming...

Would you prefer an article on Pascal? I know you (also) are a fan of
it. An article from your experience there might be useful.

I built and tested P5 Pascal (ISO 7185) with GPC (and GNU Make) for
DOS, Windows, and Linux.
I built and tested P4 Pascal subset (via p2c) with GCC and OpenWatcom
for DOS, OS/2, Windows, and Linux.
p5c works with modern GCC (e.g. DJGPP) or Clang.
DJGPP still includes old GPC (ISO 7185, ISO 10206, BP 7).
FPC still supports Go32v2 host / target and i8086-msdos target (with
{$mode tp} or {$mode iso}, et al).

(For UNIX Pascals besides FPC, Berkeley, ACK, and GPC are all on Github.)


___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user


Re: [Freedos-user] Anyone want to write an article about FreeDOS?

2023-02-06 Thread Ralf Quint

On 2/6/2023 2:03 PM, Rugxulo wrote:

Do you not understand that I see a lot of similarities between the two
OSes? Certainly they share enough for various ports of useful tools to
be made. It doesn't mean they have much in common, but I still see a
lot to learn from classic UNIX and the philosophy of some of the
authors and tools (as evidenced by my quotes from them). DOS is
"simple" (keep it simple!) but still useful (with the right tools and
the right ideas).
No, there aren't really "a lot of similarities" between DOS and 
Unix/Linux. Some *ix utilities MIGHT be useful for the use on DOS, but 
that doesn't mean by any stretch that things like "The Art of Unix 
Programming" do make any sense on DOS. The main goal should still be to 
program for DOS, not for Unix...


Jim's topic list mentioned Awk, Bash, C, Curl, Emacs, GDB, Grep,
Python, Sed, SSH, Vim, wget. (We have versions of all of those.)

In case you missed it, this was the whole list of possible topics from 
the Open Source magazine, not a list of suggested topics in regards to 
FreeDOS, as that was what Jim was asking in the subject of this thread.


And yes, an article, possibly a series of articles, about programming on 
DOS, for DOS, will be forthcoming...



Ralf




___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user


Re: [Freedos-user] Anyone want to write an article about FreeDOS?

2023-02-06 Thread Rugxulo
Hi,

On Mon, Feb 6, 2023 at 3:18 PM Ralf Quint  wrote:
>
> On 2/5/2023 12:06 AM, Rugxulo wrote:
> > The Art of Unix Programming attempts to capture the engineering wisdom
> > and philosophy of the Unix community as it's applied today — not
> > merely as it has been written down in the past, but as a living
> > "special transmission, outside the scriptures" passed from guru to
> > guru. Accordingly, the book doesn't focus so much on "what" as on
> > "why", showing the connection between Unix philosophy and practice
> > through case studies in widely available open-source software.
>
> And how does this pertain to FreeDOS? :?

Someone (Mart?) mentioned Sam, another successor to UNIX's Ed (after
Vi). You well know that we have many DJGPP tools ported from UNIX
(e.g. GCC or Make or Diff or Patch). Most of the Sed ports in DOS that
I have used (hhsed, sedmod, csed, minised) were derived from code
written by Eric Raymond. He co-founded the "Open Source Initiative"
(OSI) and has written a lot about "open source", including the above
book.

Do you not understand that I see a lot of similarities between the two
OSes? Certainly they share enough for various ports of useful tools to
be made. It doesn't mean they have much in common, but I still see a
lot to learn from classic UNIX and the philosophy of some of the
authors and tools (as evidenced by my quotes from them). DOS is
"simple" (keep it simple!) but still useful (with the right tools and
the right ideas).

Jim's topic list mentioned Awk, Bash, C, Curl, Emacs, GDB, Grep,
Python, Sed, SSH, Vim, wget. (We have versions of all of those.)

Where would you recommend I start (thinking or writing)? What topic
would be most instructive?


___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user


Re: [Freedos-user] Anyone want to write an article about FreeDOS?

2023-02-06 Thread Ralf Quint

On 2/5/2023 12:06 AM, Rugxulo wrote:

The Art of Unix Programming attempts to capture the engineering wisdom
and philosophy of the Unix community as it's applied today — not
merely as it has been written down in the past, but as a living
"special transmission, outside the scriptures" passed from guru to
guru. Accordingly, the book doesn't focus so much on "what" as on
"why", showing the connection between Unix philosophy and practice
through case studies in widely available open-source software.

And how does this pertain to FreeDOS? :?


Ralf




___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user