On Sat May 5 18:56:19 2012
rug...@gmail.com wrote:
Hello rugxulo, why don't you post through a news server? I enjoy reading
your posts, you have a lot to say and a good writing style. Unfortunately I
never see them anymore since I killfile all google posts like all good
netizens.
> I get it. C is everywhere, everybody pushes it. It has some nice features
> and "can be" relatively portable. The syntax leaves some things to be
> desired, but overall it's not that bad. But it's also not my
> favorite. Still, it is so universal and popular that you almost can't
> ignore it. Almost.
Well yes, I can as long as I don't talk to UNIX or PC people. It's a shame
but true. I have been working since 1975 and haven't written a line of C or
C++ or Java yet.
> Yes, I hate to say it, no offense intended to anyone, yes *nix is semi-
> popular, but the constant propaganda of "Linux Linux Linux" is 1000x
> overblown (and they often hide behind "POSIX") and can be annoying. Not so
> much that it's so bad, but it's often not portable enough or is really
> complicated and messy. Not great for anyone using another "lesser" OS. You
> will not find a lot of Linux users who care about other OSes. I don't know
> why. So it's not always easy to share code.
Sharing code is not something I do or something I want from anybody else. I
would like to hear how people look at different problems, more info is
usually a good thing. I found most of those views don't work in my
environment though so the interest is mostly academic but that is ok too.
I don't like Linux or UNIX. I think they're ok desktop OS but they're not
good OS from a technical perspective. I know many people think they are but
when that is all you know your opinion isn't that valuable. When all you
have to choose is UNIX or Windows then yeah, I think UNIX is better in most
areas but I really don't care since I am not a UNIX or Windows fanboy and
what happens with those OS doesn't affect me since I don't work with them. I
don't like Windows from a user point of view but I haven't ever looked at
the internals so I really can't say anything about it except from outside
impressions. Which are not good.
> Yeah, I don't know what your OS provides.
Here is the home page of the OS:
http://www-03.ibm.com/systems/z/os/zos/
This is the entire manual collection for the latest release of z/OS. It
includes most of what is available (672 manuals) but doesn't include
information on compilers except for C (but it does include the runtime
information, oddly). The other manuals (COBOL, PL/I, FORTRAN) have separate
home pages.
http://www-03.ibm.com/systems/z/os/zos/bkserv/r13pdf/index.html
Here is the Architecture Manual for the System Z CPU:
http://publibfi.boulder.ibm.com/epubs/pdf/dz9zr008.pdf
The above manual explains the system architecture and facilities and is
where the CPU is defined. It covers registers, addressing modes, etc. It is
the ISA description. It is produced and owned by IBM, unlike other ISAs that
are standardized so one company gives you all the info on the OS and
hardware. To me this is much better than most other OS where you have an ISA
specification, library specification, assemblers, compilers, etc, POSIX
etc. all specified by external bodies and the resulting mayhem of
documentation. You have to go to ten companies to get all the doc you need
and there are always big holes where each company says it's not their
responsibility to document something or refers you to standard that cost 300
bucks to get a printed copy for each of ten standards you need. With z/OS
everything is presented by one company with one documentation standard. Once
you get to know the manual system you can find anything and everything is
presented in the same style. Very nice.
Here are the Programming Interfaces for Unauthorized Programs (Applications
programs):
Assembler Services Guide is an overview of the various services applications
programs can use.
http://publibz.boulder.ibm.com/epubs/pdf/iea2a6b0.pdf
The next manuals are detailed descriptions of how to use each of the services.
http://publibz.boulder.ibm.com/epubs/pdf/iea2a7b0.pdf
http://publibz.boulder.ibm.com/epubs/pdf/iea2a9c0.pdf
Here are the Programming Interfaces for Authorized Programs (Systems
software):
Authorized Assembler Services Guide as above but contains additional
information on features and extensions only allowed to systems software.
http://publibz.boulder.ibm.com/epubs/pdf/iea2a8c0.pdf
and Reference manuals showing the details of how to invoke each specific
service:
http://publibz.boulder.ibm.com/epubs/pdf/iea2a1b0.pdf
http://publibz.boulder.ibm.com/epubs/pdf/iea2a2c1.pdf
http://publibz.boulder.ibm.com/epubs/pdf/iea2a3b0.pdf
http://publibz.boulder.ibm.com/epubs/pdf/iea2a4b0.pdf
The next manual describes how to use facilities like address spaces and data
spaces as well as the new 64 bit memory management services
http://publibz.boulder.ibm.com/epubs/pdf/iea2a580.pdf
The next two manuals describe the program linker and loader and the APIs
http://publibz.boulder.ibm.com/epubs/pdf/iea2b1b0.pdf
http://publibz.boulder.ibm.com/epubs/pdf/iea2b2b0.pdf
The next two manuals describe the High Level Assembler Language in a
Programmer's Guide and Language Reference. The first one explains how to use
the assembler and the second one explains the assembler language. Nobody
besides IBM produces such clear, useful documentation. The other assembler
manuals I have seen don't come close.
http://publibz.boulder.ibm.com/epubs/pdf/asmp1020.pdf
http://publibz.boulder.ibm.com/epubs/pdf/asmr1020.pdf
There are more books on the assembler but these two above are the main ones.
This is one of many Data Areas manuals that describes the control blocks
used by the OS and other MVS products that run under the OS. The OS is not
open source but most of the control blocks are described so we can write
systems software that people will buy
http://publibz.boulder.ibm.com/epubs/pdf/a3208532.pdf
This is a manual that describes System Codes (abnormal termination codes)
http://publibz.boulder.ibm.com/epubs/pdf/iea2h7c1.pdf
This is one of several manuals that describes various error codes given by
components of the OS and products that run under it. Each error on z/OS or
the products that run under it are completely and consistently
documented. No oops or sorry messages, all have a prefix to let you know
which product or component detected the error, a number that specifies the
error exactly, and return and reason codes that describe the specific error
and how to fix it or how to report it to IBM or the software product team or
vendor.
This is a good sampling of manuals to get started with. It will take you
probably less than 10 years to go over this material, then you can review
the other 660 or so manuals. But they are interesting because they show you
an OS written in assembler with assembler interface, how nice the ISA and
system are, and how nice it is to have all the doc in one format, in one
place, written by people who actually created all of it. All the header files
are in assembler and PL/X (a high level assembler) and it really makes
working on this OS enjoyable. On UNIX or Windows and most other OS if you
want to write assembly language you have to beat your head against C header
files and C syscalls etc. And nobody offers this quality and coverage of doc.
> I think you mentioned before liking Ada (and since you mention Algol-W
> below, I guess that makes you Wirth-ian). I sympathize.
I like Ada because of the discipline but I like anything designed well. I don't
think I ever used ALGOL-W although I did use several ALGOL variants long
ago. The ALGOL-W discussion in this thread was because of something somebody
else said.
> Your best bet will be going the Wirth route, which means Pascal or
> similar. FreePascal is pretty good, but I don't know how easy (or not) it
> would be to cross-compile to your target.
It's probably out of the question since it is boostrapped in Pascal, unless
there is a Pascal compiler for z/OS or earlier that is good enough to
bootstrap FPC. And then there is the issue of not having libc available. I
ASSume FPC uses libc but maybe I am wrong. There probably is some POSIX
library available somewhere on z/OS but I haven't ever used it because not
much is done in C on z/OS and nothing we write uses it. I am sure there is
one in the UNIX that comes built into z/OS but many people prefer not to use
that from the main OS, either running everything natively or running
everything under the UNIX portion. I haven't used it but I understand it's a
full POSIX UNIX environment.
> So you don't like yacc and lex, I don't blame you. I guess the best
> "language agnostic" alternative would be Coco/R, for LL(1) I suppose. And
> Pat Terry has a book online about compilers using it. Coco/R has been
> itself ported to various languages: Pascal, Ada, Modula-2, Java, C ++,
> etc. It's quite funny, actually!
It's not that I don't like yacc or lex, I have no idea what they are. I do
know I don't use anybody else's code or tools except for the OS and
assemble. It's one of the things I like about what I work on. I don't have
to depend on tons of layers of broken crap. Everything works, everything is
documented. Everything makes sense. With UNIX it's all legacy burden, same
thing with Intel. I'm sure Coco is just as much impossible to use on z/OS as
yacc or lex. But thanks for the links. I have his book but I haven't gone
over it.
> I sympathize with you, lots of people tend to drop "older" languages in
> lieu of Java or C# (ugh, why?). Seriously, it's kinda horrific. For
> instance, Andrew Appel has some compiler books (and teaches a course), but
> nowadays he seems to focus on Java (whereas older editions used C+ + or C,
> which I would almost prefer for simplicity, even though they aren't my
> languages of choice). He doesn't have a book online, but I'm just telling
> you for comparison.
I have those books. I just don't know how helpful they would be since
they're all in languages I don't use or want to use. I keep wanting to like
ML or OCaml but they're just too damnned ugly and have wierd runtime
issues. That's another thing I like about assembler, no runtime!
>
http://www.cs.sjsu.edu/~mak/CS153/index.html
Thanks, I'll have a look. And thanks for the other links as well.
> There's also Welsh's "standard" [old] Pascal compiler implementation book
> from the '80s, but it seems hard to find and fairly expensive. Plus,
> "classic" Pascal is heavily shunned these days, and I'm not sure how
> useful that is (I don't have it, and writing a standard Pascal compiler in
> standard Pascal may not be useful to you unless you want to use GCC-based
> GPC, heh, which I doubt, though it is a nice compiler, just hard to
> bootstrap!). You'd do better, IMO, to focus onP5 (P4 brought up to full
> standard Pascal), which is documented and available online and is public
> domain.
We do have a really fantastic PL/I compiler available and I don't know
anything a Pascal-derivative could do that this particular PL/I couldn't so
I don't see the point. I like the assembler so much I rarely have use for
anything else. Part of the idea is for me to think of something that would
be useful beyond the assembler, but PL/I and COBOL are so good there isn't
anything more I could ask for. I'll go over the Wirth stuff because it's
interesting from a historical view. He seems to have laid the foundations
for lots of interesting stuff, even if he himself was actually never
involved with any of the successful parts. It's kind of weird, but it shows
he had some idea what he was talking about because people took what he
started and turned it into very useful things. Maybe he is the kind of guy
who gets bored after he accomplishes something and then instead of refining
it and making it practical he goes on to the next thing.
> GWU / NYU Ada (83) exists too in C sources, though I know you despise
> that, but it's the only Ada that I could think of that is relatively
> useful and semi-portable. But I don't even know if it will compile, they
> used an old Intel compiler for DOS. But I'm sure it can't be that hard to
> port to OpenWatcom or whatever (famous last words!).
I'll look at the Ada 83 but as far as I know from the language itself it's
more than I can bite off. Ada is awfully hard on a compiler writer. And
again C sources won't help me much and OpenWatcom doesn't run on z/OS. There
is what is supposed to be a very good C compiler on z/OS and I have access
to it, I have just never used it.
> I know you've been interested in Forth, too. At least Forth has almost no
> syntax, so it should be easier to port.
I have been playing around with Forth a little and I am wondering if it
could be the "value-added" language that would be worth doing. I may
implement a fast cheap one just to play around with some other unrelated
ideas I have been working on. I don't know if I will or not. I find it
interesting for a few reasons. I like the idea of stack machines even though
Z architecture is not stack based and has no application stack. I don't
necessarily like the UNIX way stacks are implemented but stacks are
interesting in reducing complexity and storage references. And I like the
Forth idiom of building up stuff from the bottom. It's a very overlooked
under appreciated way of doing difficult things in code. People actually do
use this but not as far as they know. Most of the popular languages would be
nothing without their libraries. It's just that for those popular languages,
somebody else built up the language from small pieces. The kiddie coders
don't realize that. They just use all that stuff in the programs.
> But if you're interested in Wirth languages, grammar, LL(1), or something
> in the vein of Algol, you'll have to read up on some of Wirth's stuff (or
> similar). There is an old old Modula-2 subset out there somewhere written
> in old old Forth, though I've never tried it. FPC (Forth-83) for DOS
> supposed had a Pascal subset translator or whatever. Even old CAML Light
> had something similar. Maybe even UCB Logo did too, I can't remember. So
> you can write a compiler in anything, it just depends on how complex you
> want to make it!
I find Wirth difficult reading and I feel even though his designs seem
elegant and extensible they always seem to be impractical as presented. I
think somebody with more experience could get more out of it than I can at
this point. Thanks for your post. Consider getting more exposure by dumping
g00gloe groups, many people will appreciate it!