Discussion:
PIM1 .. 4, or ISO libraries
(too old to reply)
duke
2010-10-25 04:30:09 UTC
Permalink
Hello Group...

I've decided to seriously test-drive Modula-2 as well as learning
Oberon-2. To that end, I'm using `gm2' - thank you G. Mulley! I'm
using the Coronado tutorial and "porting" the examples to gm2. So far
so good - I like Modula-2. However, I'm more than a bit confused about
which library to use, and when. I realize that gm2 now supports PIM
1-4 and ISO (is that correct), but how does one go about choosing
which one to use? Is there a "mapping" somewhere of PIM1 to PIM2 to
PIM3 to PIM4 to ISO procedures? This library thing in Modula-2 seems a
bit of a muddle to me. Any references would be welcome (I've been to
RJ's site! ) TIA...
--
Duke
aaaaaaaaaaaaaaaaaaaaaaaaaa
2010-10-25 10:42:11 UTC
Permalink
Post by duke
Hello Group...
I've decided to seriously test-drive Modula-2 as well as learning
Oberon-2. To that end, I'm using `gm2' - thank you G. Mulley! I'm
using the Coronado tutorial and "porting" the examples to gm2.
Frank Grootjans did some work on this, a few years ago. Check out
www.modula2.org http://www.modula2.org/tutor/index.php
Post by duke
So far so good - I like Modula-2. However, I'm more than a bit confused
about which library to use, and when.
Pick the one you feel comfortable with.

That's the problem with software that tries to unite the whole world
in one suite. Everything is inside, so which part of everything should
one use?
Post by duke
I realize that gm2 now supports PIM 1-4 and ISO (is that correct),
but how does one go about choosing which one to use?
Choose the one you like.
Post by duke
Is there a "mapping" somewhere of PIM1 to PIM2 to
PIM3 to PIM4 to ISO procedures?
If you need it: create it. The differences are minimal. Not worth
paying attention to. It was already questionable to have them
included. As if the latest Toyota should still be compatible to the
first Otto engine.
Post by duke
This library thing in Modula-2 seems a bit of a muddle to me.
Any references would be welcome (I've been to RJ's site! )
Apparently that was not much of a help then....

Try

http://fruttenboel.verhoeven272.nl/mocka/index.html
http://fruttenboel.verhoeven272.nl/modula-2/index.html
http://fruttenboel.verhoeven272.nl/ack/index.html
http://fruttenboel.verhoeven272.nl/mhc/index.html
http://fruttenboel.verhoeven272.nl/cgi/index.html
http://fruttenboel.verhoeven272.nl/m4m/index.html

to get an indication how the module thing works. It's really simple.
As long as you keep in mind: Modula-2 is not C.
duke
2010-10-26 04:28:59 UTC
Permalink
Post by duke
Hello Group...
I've decided to seriously test-drive Modula-2 as well as learning
Oberon-2. To that end, I'm using `gm2' - thank you G. Mulley! I'm
using the Coronado tutorial and "porting" the examples to gm2.
[snip]
http://fruttenboel.verhoeven272.nl/mocka/index.htmlhttp://fruttenboel.verhoeven272.nl/modula-2/index.htmlhttp://fruttenboel.verhoeven272.nl/ack/index.htmlhttp://fruttenboel.verhoeven272.nl/mhc/index.htmlhttp://fruttenboel.verhoeven272.nl/cgi/index.htmlhttp://fruttenboel.verhoeven272.nl/m4m/index.html
Thanks for the URLs. Lots of information for me to digest. Much
obliged...
Christoph Schlegel
2010-10-25 20:56:45 UTC
Permalink
Post by duke
Hello Group...
I've decided to seriously test-drive Modula-2 as well as learning
Oberon-2. To that end, I'm using `gm2' - thank you G. Mulley!
Yes, thank you G. Mulley!
Post by duke
However, I'm more than a bit confused about
which library to use, and when. I realize that gm2 now supports PIM
1-4 and ISO (is that correct), but how does one go about choosing
which one to use? Is there a "mapping" somewhere of PIM1 to PIM2 to
PIM3 to PIM4 to ISO procedures? This library thing in Modula-2 seems a
bit of a muddle to me. Any references would be welcome (I've been to
RJ's site! ) TIA...
It's easy to confuse languages and libraries here. PIM2-4 refers to the
slightly differing versions of Modula-2 as defined by Niklaus Wirth in
his book "Programming in Modula-2". But these are differences of the
language Modula-2, not the libraries. So there are no differing
libraries corresponding to PIM2-4.

But: All versions of the PIM book defined some standard modules which
have often been implemented by compiler vendors as if they were a
standard (I could send you a list of these modules if this is of any
help). These are easy to use and get you going (especially when you are
using the Coronado Tutorial which often refers to these modules).

As these modules are very basic, nearly every compiler came with
additional modules. This made things complicated and of course ruined
portability between compilers. And that's why GNU Modula-2 went the hard
way to provide working versions of the ULM, Logitech, PIM (and ISO)
libraries. That is why XDS Modula-2 (which also supports PIM and ISO
Modula-2) offers a Topspeed compatibility pack.

The only standard library is the ISO library which in my opinion is very
powerful. Once one understands a few concepts behind the ISO modules
there is some inner logic in using them. But it is also a matter of
taste I guess.

As long as you use Modula-2 for personal projects and fun I guess it is
not that important which libraries you use. Flip through the docs to
find procedures which do the job you want - but it is also fun to use
ISO modules only (once again do not confound the language ISO Modula-2
with the set of libraries defined by the ISO committee).

Have fun with Modula-2!

Regards

Christoph
duke
2010-10-26 04:43:31 UTC
Permalink
Post by Christoph Schlegel
Post by duke
Hello Group...
I've decided to seriously test-drive Modula-2 as well as learning
Oberon-2. To that end, I'm using `gm2' - thank you G. Mulley!
Yes, thank you G. Mulley!
Post by duke
However, I'm more than a bit confused about
which library to use, and when. I realize that gm2 now supports PIM
1-4 and ISO (is that correct), but how does one go about choosing
which one to use? Is there a "mapping" somewhere of PIM1 to PIM2 to
PIM3 to PIM4 to ISO procedures? This library thing in Modula-2 seems a
bit of a muddle to me. Any references would be welcome  (I've been to
RJ's site! ) TIA...
It's easy to confuse languages and libraries here.
Isn't _that_ the truth...
Post by Christoph Schlegel
PIM2-4 refers to the
slightly differing versions of Modula-2 as defined by Niklaus Wirth in
his book "Programming in Modula-2". But these are differences of the
language Modula-2, not the libraries. So there are no differing
libraries corresponding to PIM2-4.
I see! So PIM4 is the most recent of Wirth's Modula incarnations, I
presume.
Post by Christoph Schlegel
But: All versions of the PIM book defined some standard modules which
have often been implemented by compiler vendors as if they were a
standard (I could send you a list of these modules if this is of any
help). These are easy to use and get you going (especially when you are
using the Coronado Tutorial which often refers to these modules).
Yes please - send the list.
Post by Christoph Schlegel
As these modules are very basic, nearly every compiler came with
additional modules. This made things complicated and of course ruined
portability between compilers. And that's why GNU Modula-2 went the hard
way to provide working versions of the ULM, Logitech, PIM (and ISO)
libraries. That is why XDS Modula-2 (which also supports PIM and ISO
Modula-2) offers a Topspeed compatibility pack.
There is a non-Wirth Modula-2 called ISO Modula-2? How different is it
from
the PIM-based versions?
Post by Christoph Schlegel
The only standard library is the ISO library which in my opinion is very
powerful. Once one understands a few concepts behind the ISO modules
there is some inner logic in using them. But it is also a matter of
taste I guess.
So I assume that the ISO library is included with ISO Modula-2...
Post by Christoph Schlegel
As long as you use Modula-2 for personal projects and fun I guess it is
not that important which libraries you use. Flip through the docs to
find procedures which do the job you want - but it is also fun to use
ISO modules only (once again do not confound the language ISO Modula-2
with the set of libraries defined by the ISO committee).
At this point in my Modula-2 experience, it matters very to me which
library I use. I sort of got abit mixed up when reading RJS's book and
trying out some code therein, then looking at the Coronado Tutorial,
and seeing something different modules being IMPORTed for IO, for
example.
Post by Christoph Schlegel
Have fun with Modula-2!
I hope to. Thanks for your input and clarifications.
Christoph Schlegel
2010-10-26 06:36:50 UTC
Permalink
Post by duke
Post by Christoph Schlegel
Post by duke
Hello Group...
I've decided to seriously test-drive Modula-2 as well as learning
Oberon-2. To that end, I'm using `gm2' - thank you G. Mulley!
Yes, thank you G. Mulley!
Post by duke
However, I'm more than a bit confused about
which library to use, and when. I realize that gm2 now supports PIM
1-4 and ISO (is that correct), but how does one go about choosing
which one to use? Is there a "mapping" somewhere of PIM1 to PIM2 to
PIM3 to PIM4 to ISO procedures? This library thing in Modula-2 seems a
bit of a muddle to me. Any references would be welcome (I've been to
RJ's site! ) TIA...
It's easy to confuse languages and libraries here.
Isn't _that_ the truth...
Post by Christoph Schlegel
PIM2-4 refers to the
slightly differing versions of Modula-2 as defined by Niklaus Wirth in
his book "Programming in Modula-2". But these are differences of the
language Modula-2, not the libraries. So there are no differing
libraries corresponding to PIM2-4.
I see! So PIM4 is the most recent of Wirth's Modula incarnations, I
presume.
Right.
Post by duke
Post by Christoph Schlegel
But: All versions of the PIM book defined some standard modules which
have often been implemented by compiler vendors as if they were a
standard (I could send you a list of these modules if this is of any
help). These are easy to use and get you going (especially when you are
using the Coronado Tutorial which often refers to these modules).
Yes please - send the list.
PIM4: Terminal, FileSystem, InOut, RealInOut, Windows, TextWindows,
GraphicWindows, CursorMouse, Menu, MathLib0;
Post by duke
Post by Christoph Schlegel
As these modules are very basic, nearly every compiler came with
additional modules. This made things complicated and of course ruined
portability between compilers. And that's why GNU Modula-2 went the hard
way to provide working versions of the ULM, Logitech, PIM (and ISO)
libraries. That is why XDS Modula-2 (which also supports PIM and ISO
Modula-2) offers a Topspeed compatibility pack.
There is a non-Wirth Modula-2 called ISO Modula-2? How different is it
from
the PIM-based versions?
http://en.wikipedia.org/wiki/Modula-2#Dialects
Post by duke
Post by Christoph Schlegel
The only standard library is the ISO library which in my opinion is very
powerful. Once one understands a few concepts behind the ISO modules
there is some inner logic in using them. But it is also a matter of
taste I guess.
So I assume that the ISO library is included with ISO Modula-2...
ISO Modula-2 is a standard. The library was invented with the standard.
You can find some interesting information here:

http://www.scifac.ru.ac.za/cspt/sc22wg13.htm
http://freepages.modula2.org/m2faq.html#faq5

The ISO compilers are: GNU, XDS, GPM, p1 (and Stonybrook Modula-2). As
far as I know they all come with the ISO modules.
Post by duke
Post by Christoph Schlegel
As long as you use Modula-2 for personal projects and fun I guess it is
not that important which libraries you use. Flip through the docs to
find procedures which do the job you want - but it is also fun to use
ISO modules only (once again do not confound the language ISO Modula-2
with the set of libraries defined by the ISO committee).
At this point in my Modula-2 experience, it matters very to me which
library I use. I sort of got abit mixed up when reading RJS's book and
trying out some code therein, then looking at the Coronado Tutorial,
and seeing something different modules being IMPORTed for IO, for
example.
I guess Coronado was written with Topspeed or FST Modula-2 in mind. It's
a PIM tutorial. The book by Mr. Sutcliffe teaches ISO Modula-2.

Christoph
Bartholomew
2010-10-26 12:04:40 UTC
Permalink
Post by Christoph Schlegel
Post by duke
Hello Group...
I've decided to seriously test-drive Modula-2 as well as learning
Oberon-2. To that end, I'm using `gm2' - thank you G. Mulley!
Yes, thank you G. Mulley!
Well said!
Post by Christoph Schlegel
Post by duke
However, I'm more than a bit confused about
which library to use, and when. I realize that gm2 now supports PIM
1-4 and ISO (is that correct), but how does one go about choosing
which one to use? Is there a "mapping" somewhere of PIM1 to PIM2 to
PIM3 to PIM4 to ISO procedures?
Running "info gm2" will tell how to choose PIM or ISO in gm2. (There
are also a "few" language differences between the two.) The DOS version
of GPM came with a very short tutorial on converting PIM to ISO (that
did not come with the other versions for some unknown reason.)

B
duke
2010-11-29 15:19:04 UTC
Permalink
Post by Bartholomew
Post by Christoph Schlegel
Post by duke
Hello Group...
I've decided to seriously test-drive Modula-2 as well as learning
Oberon-2. To that end, I'm using `gm2' - thank you G. Mulley!
Yes, thank you G. Mulley!
Well said!
Post by Christoph Schlegel
Post by duke
However, I'm more than a bit confused about
which library to use, and when. I realize that gm2 now supports PIM
1-4 and ISO (is that correct), but how does one go about choosing
which one to use? Is there a "mapping" somewhere of PIM1 to PIM2 to
PIM3 to PIM4 to ISO procedures?
Running "info gm2" will tell how to choose PIM or ISO in gm2.  (There
are also a "few" language differences between the two.)  The DOS version
of GPM came with a very short tutorial on converting PIM to ISO  (that
did not come with the other versions for some unknown reason.)
B
Great! I just read the "info" page, as you suggested. Exactly what I
needed to know! Thanks!
Christoph Schlegel
2010-10-26 12:43:33 UTC
Permalink
I forgot to add two links - just in case you don't know them yet:

ISO Modula-2:
http://www.excelsior-usa.com/doc/isom2.html

ISO library:
http://www.excelsior-usa.com/doc/isolib.html
tbreeden
2010-10-26 17:36:37 UTC
Permalink
ISO Modula-2:http://www.excelsior-usa.com/doc/isom2.html
ISO library:http://www.excelsior-usa.com/doc/isolib.html
I've not found any real documentation of the architecture of the lower
level IO ISO Lib specification,
but did try to put together a new M2 std "device" module by inspecting
the sources for StreamFile, SeqFile,
TermFile, etc.

This is my attempt at a module with sprintf() type facilities for ISO
Standard IO use.

Feel free to challenge and improve it.

Tom


http://www.modula2.org/projects/tbchans.php


DEFINITION MODULE TBChans; (* v0.1-031802 *)

(*
"Device" for ISO Std Channel I/O to memory.

This is an initial try at implementing a new ISO channel to use
with
TextIO, WholeIO, etc.
*)
Bartholomew
2010-10-27 11:39:27 UTC
Permalink
Post by tbreeden
I've not found any real documentation of the architecture of the lower
level IO ISO Lib specification,
Someone in WG13 (Peter Moylan?) once noted that a rationale was written
but never publically released. A great pity...

B
Chris Burrows
2010-10-27 23:35:26 UTC
Permalink
Post by Bartholomew
Post by tbreeden
I've not found any real documentation of the architecture of the lower
level IO ISO Lib specification,
Someone in WG13 (Peter Moylan?) once noted that a rationale was written
but never publically released. A great pity...
John Gough (also in WG13) commented on the ISO libraries only a couple of
days ago. He might be able to answer some specific questions:

http://tech.groups.yahoo.com/group/GPCP/message/465

Regards,
Chris Burrows
CFB Software
http://www.cfbsoftware.com/modula2
duke
2010-11-29 15:15:59 UTC
Permalink
Post by Christoph Schlegel
Post by duke
Post by Christoph Schlegel
Post by duke
Hello Group...
I've decided to seriously test-drive Modula-2 as well as learning
Oberon-2. To that end, I'm using `gm2' - thank you G. Mulley!
Yes, thank you G. Mulley!
Post by duke
However, I'm more than a bit confused about
which library to use, and when. I realize that gm2 now supports PIM
1-4 and ISO (is that correct), but how does one go about choosing
which one to use? Is there a "mapping" somewhere of PIM1 to PIM2 to
PIM3 to PIM4 to ISO procedures? This library thing in Modula-2 seems a
bit of a muddle to me. Any references would be welcome  (I've been to
RJ's site! ) TIA...
It's easy to confuse languages and libraries here.
Isn't _that_ the truth...
Post by Christoph Schlegel
PIM2-4 refers to the
slightly differing versions of Modula-2 as defined by Niklaus Wirth in
his book "Programming in Modula-2". But these are differences of the
language Modula-2, not the libraries. So there are no differing
libraries corresponding to PIM2-4.
I see! So PIM4 is the most recent of Wirth's Modula incarnations, I
presume.
Right.
Post by duke
Post by Christoph Schlegel
But: All versions of the PIM book defined some standard modules which
have often been implemented by compiler vendors as if they were a
standard (I could send you a list of these modules if this is of any
help). These are easy to use and get you going (especially when you are
using the Coronado Tutorial which often refers to these modules).
Yes please - send the list.
PIM4: Terminal, FileSystem, InOut, RealInOut, Windows, TextWindows,
GraphicWindows, CursorMouse, Menu, MathLib0;
Post by duke
Post by Christoph Schlegel
As these modules are very basic, nearly every compiler came with
additional modules. This made things complicated and of course ruined
portability between compilers. And that's why GNU Modula-2 went the hard
way to provide working versions of the ULM, Logitech, PIM (and ISO)
libraries. That is why XDS Modula-2 (which also supports PIM and ISO
Modula-2) offers a Topspeed compatibility pack.
There is a non-Wirth Modula-2 called ISO Modula-2? How different is it
from
the PIM-based versions?
http://en.wikipedia.org/wiki/Modula-2#Dialects
Post by duke
Post by Christoph Schlegel
The only standard library is the ISO library which in my opinion is very
powerful. Once one understands a few concepts behind the ISO modules
there is some inner logic in using them. But it is also a matter of
taste I guess.
So I assume that the ISO library is included with ISO Modula-2...
ISO Modula-2 is a standard. The library was invented with the standard.
http://www.scifac.ru.ac.za/cspt/sc22wg13.htmhttp://freepages.modula2.org/m2faq.html#faq5
The ISO compilers are: GNU, XDS, GPM, p1 (and Stonybrook Modula-2). As
far as I know they all come with the ISO modules.
Post by duke
Post by Christoph Schlegel
As long as you use Modula-2 for personal projects and fun I guess it is
not that important which libraries you use. Flip through the docs to
find procedures which do the job you want - but it is also fun to use
ISO modules only (once again do not confound the language ISO Modula-2
with the set of libraries defined by the ISO committee).
At this point in my Modula-2 experience, it matters very to me which
library I use. I sort of got abit mixed up when reading RJS's book and
trying out some code therein, then looking at the Coronado Tutorial,
and seeing something different modules being IMPORTed for IO, for
example.
I guess Coronado was written with Topspeed or FST Modula-2 in mind. It's
a PIM tutorial. The book by Mr. Sutcliffe teaches ISO Modula-2.
Christoph
Sorry, for the late reply. My ISP decided to shit down his NNTP
server, so there went my Usenet feed :(. So now Google Groups is my
friend :)

Thanks for the informative reply. I'm slowly wading through all of
Modula's intricacies - as well as learning Oberon-2. Much obliged!
--
Duke Normandin
Turner Valley, Alberta, Canada
Piero Soldi
2010-12-05 17:54:58 UTC
Permalink
Post by Christoph Schlegel
Post by duke
Post by Christoph Schlegel
Post by duke
Hello Group...
I've decided to seriously test-drive Modula-2 as well as learning
Oberon-2. To that end, I'm using `gm2' - thank you G. Mulley!
Yes, thank you G. Mulley!
[CUT]
Post by Christoph Schlegel
Post by duke
At this point in my Modula-2 experience, it matters very to me which
library I use. I sort of got abit mixed up when reading RJS's book and
trying out some code therein, then looking at the Coronado Tutorial,
and seeing something different modules being IMPORTed for IO, for
example.
I guess Coronado was written with Topspeed or FST Modula-2 in mind. It's
a PIM tutorial. The book by Mr. Sutcliffe teaches ISO Modula-2.
Christoph
If I recall right, Coronado was written for TopSpeed,
see differences using Coroutines with FST-M2 Ver. 4.

my 2 cents,

Piero.

Loading...