Re: [fpc-pascal] Re: Porting linux to pascal, would it be possible ?

2008-12-06 Thread Marco van de Voort
In our previous episode, Guillermo Mart?nez Jim?nez said:
  I think the problem here (again) is not the language, it's the critical 
  mass of users of the language. Using C for Linux was a good bet, not 
  because the language is good (Pascal is way better for me), but because C 
  has a wider user base who can fix/add features.
 
 I disagree.  C is better for write operating systems *by definition*:
 C was created to write UNIX, Pascal was created to learn good
 programming techniques.  C is low/mid-level language, Pascal is
 high-level (and Object Pascal is even higher):  OS are the lowest
 software level.

I don't see that at all. Sure original Pascal started and ended a bit
higher. But this is a Free Pascal list, and Free Pascal and Delphi can get
down and dirty too.

There sure isn't much in C that FPC can not do. And the few bits that miss
(if any) would probably be added soon when major OS development would start.

I think it is more a matter of FPC being geared towards apps development as
a compiler than a matter of language.

 I'm not saying it's impossible:  here you have MacOS and Toro. I'm
 just saying that _I think_ it isn't the best option.  Of course a
 better option is to write the kernel in C and Assembler and the
 utilities in Pascal and Object Pascal.

Well, it is a pity that there is so much routine discussion in this thread
that seems to boil down to a dogmatic kneejerk C is better, C has always
been better, because Linux/Unix was programmed in it, and so little real
funded argumentation why this is really the case.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Re: Porting linux to pascal, would it be possible ?

2008-12-05 Thread Guillermo Martínez Jiménez
 Would translating/porting linux to pascal be possible ?

Possible?  Yes it is.  Worth of...?  I'm afraid not.

By the way, Linux is good as it is now and Pascal isn't the best
option to create an operating system.

Guillermo Ñuño Martínez
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Re: Porting linux to pascal, would it be possible ?

2008-12-05 Thread Leonardo M . Ramé
--- On Fri, 12/5/08, Guillermo Martínez Jiménez [EMAIL PROTECTED] wrote:

 By the way, Linux is good as it is now and Pascal isn't the best
 option to create an operating system.

Are you sure? doesn't older MacOS's versions where written in Object Pascal?

I think the problem here (again) is not the language, it's the critical mass of 
users of the language. Using C for Linux was a good bet, not because the 
language is good (Pascal is way better for me), but because C has a wider user 
base who can fix/add features.

Leonardo M. Ramé
http://leonardorame.blogspot.com




___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Re: Porting linux to pascal, would it be possible ?

2008-12-05 Thread Guillermo Martínez Jiménez
 Are you sure?

Yes, I am.

 doesn't older MacOS's versions where written in Object Pascal?

Yes, it does, but as I said I think it wasn't the better options.

 I think the problem here (again) is not the language, it's the critical mass 
 of users of the language. Using C for Linux was a good bet, not because the 
 language is good (Pascal is way better for me), but because C has a wider 
 user base who can fix/add features.

I disagree.  C is better for write operating systems *by definition*:
C was created to write UNIX, Pascal was created to learn good
programming techniques.  C is low/mid-level language, Pascal is
high-level (and Object Pascal is even higher):  OS are the lowest
software level.

I'm not saying it's impossible:  here you have MacOS and Toro. I'm
just saying that _I think_ it isn't the best option.  Of course a
better option is to write the kernel in C and Assembler and the
utilities in Pascal and Object Pascal.

Guillermo Ñuño Martínez
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Re: Porting linux to pascal, would it be possible ?

2008-12-05 Thread Prince Riley
Hello

I don't mean to start a culture war here, but I think there is a bit of
overstatement in this post that 'C' is somehow a better language for writing
an OS in than say Pascal or OP or anything else.

In point of fact, the only 'best' language for any processor is its own
machine code which is always binary.
And the first operating system software written was done so in the assembly
language which is written to use mnemoics
that when 'assembled' convert directly into the binary machine language on a
one to one basis.

Now EVERY compiled language, including  C, must be processed from its
syntactical representation into assembly language or machine code. In fact,
if you download the GCC complier source code and read it, you'll see  almost
immediately that it actually a 'language' front-end connected to a
'assembler machine code' back end.

When the 'C' language was designed at ATT it used 'assembler' like
constructs and syntax because it's author wanted
to stop writing programs in a language called BCPL..

So aside from a 'historical accident'  that the first ATT OS ..UNIX.. was
being written at the same time C was being developed, there is no other
reason for any program, including an OS, to be written in C. To suggest that
C is better is rather like suggesting that Spanish is a better language than
English for writing a novel.

That said, if someone wished to write a modern OS in FP, which has nearly
every programming construct that 'C' has (ints, doubles, floats, bytes, and
bits) and you were willing to put in the time to fine tune and modify the FP
compiler, you could produce a OS in FP that would be every bit as effective
and perform as well or better as one written in C.  And as far as the
processor running the OS couldn't tell what language the OS was written in.


If anyone wants to convince themselves on this its simple, you'll find
Ritchie (the creator of the C language) explained these points in the
preface to his first book on C. There is also a brief mention of this in the
Wikipedia article on the UNIX operating system. (see the article footnotes)

Prince


On Fri, Dec 5, 2008 at 6:59 PM, Guillermo Martínez Jiménez 
[EMAIL PROTECTED] wrote:

  Are you sure?

 Yes, I am.

  doesn't older MacOS's versions where written in Object Pascal?

 Yes, it does, but as I said I think it wasn't the better options.

  I think the problem here (again) is not the language, it's the critical
 mass of users of the language. Using C for Linux was a good bet, not because
 the language is good (Pascal is way better for me), but because C has a
 wider user base who can fix/add features.

 I disagree.  C is better for write operating systems *by definition*:
 C was created to write UNIX, Pascal was created to learn good
 programming techniques.  C is low/mid-level language, Pascal is
 high-level (and Object Pascal is even higher):  OS are the lowest
 software level.

 I'm not saying it's impossible:  here you have MacOS and Toro. I'm
 just saying that _I think_ it isn't the best option.  Of course a
 better option is to write the kernel in C and Assembler and the
 utilities in Pascal and Object Pascal.

 Guillermo Ñuño Martínez
 ___
 fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
 http://lists.freepascal.org/mailman/listinfo/fpc-pascal

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Re: Porting linux to pascal, would it be possible ?

2008-12-05 Thread Prince Riley
Here is a direct reference from the Wikipedia article I referenced in my
prior post ...

In 1973, Unix was rewritten in the C programming
languagehttp://en.wikipedia.org/wiki/C_%28programming_language%29,
contrary to the general notion at the time that something as complex as an
operating system, which must deal with time-critical events, had to be
written exclusively in assembly
language.[4]http://en.wikipedia.org/wiki/UNIX#cite_note-Stallings-3The
migration from assembly
language http://en.wikipedia.org/wiki/Assembly_Language to the higher-level
language http://en.wikipedia.org/wiki/High-level_programming_language C
resulted in much more
portablehttp://en.wikipedia.org/wiki/Software_quality#Portabilitysoftware,
requiring only a relatively small amount of machine-dependent code
to be replaced when porting Unix to other computing
platformshttp://en.wikipedia.org/wiki/Platform_%28computing%29
.

Prince


On Fri, Dec 5, 2008 at 7:57 PM, Prince Riley [EMAIL PROTECTED] wrote:

 Hello

 I don't mean to start a culture war here, but I think there is a bit of
 overstatement in this post that 'C' is somehow a better language for writing
 an OS in than say Pascal or OP or anything else.

 In point of fact, the only 'best' language for any processor is its own
 machine code which is always binary.
 And the first operating system software written was done so in the assembly
 language which is written to use mnemoics
 that when 'assembled' convert directly into the binary machine language on
 a one to one basis.

 Now EVERY compiled language, including  C, must be processed from its
 syntactical representation into assembly language or machine code. In fact,
 if you download the GCC complier source code and read it, you'll see  almost
 immediately that it actually a 'language' front-end connected to a
 'assembler machine code' back end.

 When the 'C' language was designed at ATT it used 'assembler' like
 constructs and syntax because it's author wanted
 to stop writing programs in a language called BCPL..

 So aside from a 'historical accident'  that the first ATT OS ..UNIX.. was
 being written at the same time C was being developed, there is no other
 reason for any program, including an OS, to be written in C. To suggest that
 C is better is rather like suggesting that Spanish is a better language than
 English for writing a novel.

 That said, if someone wished to write a modern OS in FP, which has nearly
 every programming construct that 'C' has (ints, doubles, floats, bytes, and
 bits) and you were willing to put in the time to fine tune and modify the FP
 compiler, you could produce a OS in FP that would be every bit as effective
 and perform as well or better as one written in C.  And as far as the
 processor running the OS couldn't tell what language the OS was written in.


 If anyone wants to convince themselves on this its simple, you'll find
 Ritchie (the creator of the C language) explained these points in the
 preface to his first book on C. There is also a brief mention of this in the
 Wikipedia article on the UNIX operating system. (see the article footnotes)

 Prince


 On Fri, Dec 5, 2008 at 6:59 PM, Guillermo Martínez Jiménez 
 [EMAIL PROTECTED] wrote:

  Are you sure?

 Yes, I am.

  doesn't older MacOS's versions where written in Object Pascal?

 Yes, it does, but as I said I think it wasn't the better options.

  I think the problem here (again) is not the language, it's the critical
 mass of users of the language. Using C for Linux was a good bet, not because
 the language is good (Pascal is way better for me), but because C has a
 wider user base who can fix/add features.

 I disagree.  C is better for write operating systems *by definition*:
 C was created to write UNIX, Pascal was created to learn good
 programming techniques.  C is low/mid-level language, Pascal is
 high-level (and Object Pascal is even higher):  OS are the lowest
 software level.

 I'm not saying it's impossible:  here you have MacOS and Toro. I'm
 just saying that _I think_ it isn't the best option.  Of course a
 better option is to write the kernel in C and Assembler and the
 utilities in Pascal and Object Pascal.

 Guillermo Ñuño Martínez
 ___
 fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
 http://lists.freepascal.org/mailman/listinfo/fpc-pascal



___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Re: Porting linux to pascal, would it be possible ?

2008-12-05 Thread Prince Riley
Link to the article about the ATT UNIX OS and C 


http://en.wikipedia.org/wiki/UNIX


On Fri, Dec 5, 2008 at 8:01 PM, Prince Riley [EMAIL PROTECTED] wrote:

 Here is a direct reference from the Wikipedia article I referenced in my
 prior post ...

 In 1973, Unix was rewritten in the C programming 
 languagehttp://en.wikipedia.org/wiki/C_%28programming_language%29,
 contrary to the general notion at the time that something as complex as an
 operating system, which must deal with time-critical events, had to be
 written exclusively in assembly 
 language.[4]http://en.wikipedia.org/wiki/UNIX#cite_note-Stallings-3The 
 migration from assembly
 language http://en.wikipedia.org/wiki/Assembly_Language to the higher-level
 language http://en.wikipedia.org/wiki/High-level_programming_language C
 resulted in much more 
 portablehttp://en.wikipedia.org/wiki/Software_quality#Portabilitysoftware, 
 requiring only a relatively small amount of machine-dependent code
 to be replaced when porting Unix to other computing 
 platformshttp://en.wikipedia.org/wiki/Platform_%28computing%29
 .

 Prince



 On Fri, Dec 5, 2008 at 7:57 PM, Prince Riley [EMAIL PROTECTED]wrote:

 Hello

 I don't mean to start a culture war here, but I think there is a bit of
 overstatement in this post that 'C' is somehow a better language for writing
 an OS in than say Pascal or OP or anything else.

 In point of fact, the only 'best' language for any processor is its own
 machine code which is always binary.
 And the first operating system software written was done so in the
 assembly language which is written to use mnemoics
 that when 'assembled' convert directly into the binary machine language on
 a one to one basis.

 Now EVERY compiled language, including  C, must be processed from its
 syntactical representation into assembly language or machine code. In fact,
 if you download the GCC complier source code and read it, you'll see  almost
 immediately that it actually a 'language' front-end connected to a
 'assembler machine code' back end.

 When the 'C' language was designed at ATT it used 'assembler' like
 constructs and syntax because it's author wanted
 to stop writing programs in a language called BCPL..

 So aside from a 'historical accident'  that the first ATT OS ..UNIX.. was
 being written at the same time C was being developed, there is no other
 reason for any program, including an OS, to be written in C. To suggest that
 C is better is rather like suggesting that Spanish is a better language than
 English for writing a novel.

 That said, if someone wished to write a modern OS in FP, which has nearly
 every programming construct that 'C' has (ints, doubles, floats, bytes, and
 bits) and you were willing to put in the time to fine tune and modify the FP
 compiler, you could produce a OS in FP that would be every bit as effective
 and perform as well or better as one written in C.  And as far as the
 processor running the OS couldn't tell what language the OS was written in.


 If anyone wants to convince themselves on this its simple, you'll find
 Ritchie (the creator of the C language) explained these points in the
 preface to his first book on C. There is also a brief mention of this in the
 Wikipedia article on the UNIX operating system. (see the article footnotes)

 Prince


 On Fri, Dec 5, 2008 at 6:59 PM, Guillermo Martínez Jiménez 
 [EMAIL PROTECTED] wrote:

  Are you sure?

 Yes, I am.

  doesn't older MacOS's versions where written in Object Pascal?

 Yes, it does, but as I said I think it wasn't the better options.

  I think the problem here (again) is not the language, it's the critical
 mass of users of the language. Using C for Linux was a good bet, not because
 the language is good (Pascal is way better for me), but because C has a
 wider user base who can fix/add features.

 I disagree.  C is better for write operating systems *by definition*:
 C was created to write UNIX, Pascal was created to learn good
 programming techniques.  C is low/mid-level language, Pascal is
 high-level (and Object Pascal is even higher):  OS are the lowest
 software level.

 I'm not saying it's impossible:  here you have MacOS and Toro. I'm
 just saying that _I think_ it isn't the best option.  Of course a
 better option is to write the kernel in C and Assembler and the
 utilities in Pascal and Object Pascal.

 Guillermo Ñuño Martínez
 ___
 fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
 http://lists.freepascal.org/mailman/listinfo/fpc-pascal




___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

[fpc-pascal] Re: Porting linux to pascal, would it be possible ?

2008-12-05 Thread Mehmet Erol Sanliturk


Dear All ,

In relation to programming language to be used to program
an operating sytem , the Burroughs Corporation is a very good
example .

( I am NOT saying that porting Linux to Free Pascal
is a good idea . There is MINIX3 , porting Free Pascal to MINIX3
could be a very good job .
For 'why' , please see ( http://www.minix3.org/ )
 ... Single-chip, small-RAM, low-power, $100 laptops  for
Third-World children ...
)


I worked on the Burroughs systems
( B3500 since 1974 ... later , B4700 , B6700 ) .


They designed the COBOL compiler , then the B2000 (?)
but I am sure that B3500 was in that form :

Burroughs mid-sized computers were at least 10 times faster
than equivalent other main-frames on data processing jobs
because COBOL statements were translated directly to machine code ,
i.e. , its machine codes were NOT like their contemporary main-frames .

(
http://en.wikipedia.org/wiki/Burroughs_B2000
 ... The architecture was built to support COBOL programming
in the most efficient way possible ...
)

Later , they designed their Algol-like language ESPOL ,
and then B5??? series . In the B6700 main-frame the machine language
was the ESPOL , i.e. , the computer was executing ESPOL
directly . During development of this series , design team did
not say to upper management that ... are designing a computer that
it will NOT have machine language ( assembler ) but a 'new machine' .
because acceptance of a design not having a machine language was very 
unlikely .


(
http://en.wikipedia.org/wiki/Burroughs_Corporation
http://en.wikipedia.org/wiki/Burroughs_large_systems
http://en.wikipedia.org/wiki/MCP_(Burroughs_Large_Systems)
http://en.wikipedia.org/wiki/ESPOL
http://bitsavers.org/pdf/burroughs/B6500_6700/594_B6700_ESPOL_Jun72.pdf
http://en.wikipedia.org/wiki/ALGOL_60
http://en.wikipedia.org/wiki/NEWP
)


Thank you very much ,

Mehmet Erol Sanliturk




___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Re: Porting linux to pascal, would it be possible ?

2008-12-05 Thread Graeme Geldenhuys
On Fri, Dec 5, 2008 at 1:24 PM, Guillermo Martínez Jiménez
[EMAIL PROTECTED] wrote:

 By the way, Linux is good as it is now and Pascal isn't the best
 option to create an operating system.

Other than Object Pascal not being as popular/mainstream as C... is
there any technical limitations in the language and the reason you say
it's not a good choice?


Regards,
  - Graeme -


___
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

[fpc-pascal] Re: Porting linux to pascal, would it be, possible ?

2008-12-05 Thread Ingemar Ragnemalm

 Guillermo Mart?nez Jim?nez  [EMAIL PROTECTED] wrote:


I disagree.  C is better for write operating systems *by definition*:
C was created to write UNIX, Pascal was created to learn good
programming techniques.  C is low/mid-level language, Pascal is
high-level (and Object Pascal is even higher):  OS are the lowest
software level.
  


This was true in the 70's. Then Pascal wasn't modular (C wasn't but 
hacked it in header files, and still does), it simply wasn't adapted for 
programming of that kind yet. And C was optimized for being similar to 
the machine code of the CPU's of the time. And it still is.


Today, the biggest difference between the languages are missing 
high-level features in C (which Pascal has had for decades), and that 
the syntax of C has a big range of obvious flaws. Neither of these make 
C a better language for anything.


The advantage to be able to mix operations on the same line, like the ++ 
operator, had importance for performance back then, before pipelining 
and caches. Today, it simply doesn't matter.


IMHO, C was simply the *first* language replacing assembly language on 
the OS level. And the first often gets chosen as standard, the only way.


Now, to return to the OS part: How could Linus Torvalds write the core 
of Linux in rather short time, single-handed, if it is such a huge task 
just to port it?


The window manager part is what I find really interesting. If Gnome is 
language-locked, there are two ways to change that: Either convince the 
Gnome team to open it up in our directions (just a matter of interfaces 
to them) or to make an FPC branch of Gnome (assuming that Gnome is under 
appropriate licenses), where appropriate parts are ported to FPC. I 
would call it Jedi Gnome, analogous to Jedi-SDL. Now, is there anyone 
more than me visualizing Yoda with a lightsabre as logotype? :-)



/Ingemar

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal