Porting linux to pascal, would it be possible ?

classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

Porting linux to pascal, would it be possible ?

Skybuck Flying
Hello,

An open source pascal operating system could be cool.

Would translating/porting linux to pascal be possible ?

Bye,
  Skybuck.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Porting linux to pascal, would it be possible ?

Gerard N/A
As with many things, it only depends of the time you have.
But as you grow older you get a different idea of life expectancy and
the use of your remaing time.

Regards,

Gerard.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Porting linux to pascal, would it be possible ?

Marc Geldon
In reply to this post by Skybuck Flying
What is the use anyhow?

2008/12/4 Skybuck Flying <[hidden email]>

>
> Hello,
>
> An open source pascal operating system could be cool.
>
> Would translating/porting linux to pascal be possible ?
>
> Bye,
>  Skybuck.
> _______________________________________________
> fpc-pascal maillist  -  [hidden email]
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal



--
SCALA IT | Internet- und Softwareagentur
Büro Mannheim: L7, 7a | 68161 Mannheim
Firmensitz: Gutenbergstr. 18 | 67112 Mutterstadt

Tel: (06234) 600 57-6
Fax: (06234) 600 57-9

e-mail: [hidden email]
Mobil: (0176) 206 263 04

Inhaber: Marc Geldon
Steuernummer: 41/049/7267/0 (Finanzamt Speyer)
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Porting linux to pascal, would it be possible ?

leledumbo
Administrator
>> An open source pascal operating system could be cool.

There are already such projects (including mine ). Search google code and sourceforge.

>> Would translating/porting linux to pascal be possible ?

Yes, but who would? And if he/she would, does he/she have the time?
Reply | Threaded
Open this post in threaded view
|

Re: Porting linux to pascal, would it be possible ?

Guillermo Martínez Jiménez
In reply to this post by Skybuck Flying
> 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  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Re: Porting linux to pascal, would it be possible ?

Leonardo M. Ramé
--- On Fri, 12/5/08, Guillermo Martínez Jiménez <[hidden email]> 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  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Porting linux to pascal, would it be possible ?

Ingemar Ragnemalm
In reply to this post by Skybuck Flying

Leonardo M. Ram? <[hidden email]> wrote:

> --- On Fri, 12/5/08, Guillermo Martínez Jiménez <[hidden email]> 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?
>  

Yes, and there's nothing wrong with Pascal for an OS. It would be excellent.

> 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.
>  

Using C for Linux was the only way, because there was a free C compiler
(GCC) and none for Pascal or other comparable languages. Things have
changed since then, but much of the software industry is on a path
decided from the situation 20 years ago. The industry took the C route
since there was no cross-platform Pascal, while Linux made the choice
from available free software. Now everything must have inherited design
flaws from C just because of what was available in the 80's. That is,
unless the tide changes. It can happen.


"Felipe Monteiro de Carvalho" <[hidden email]> wrote:
> My open source project, for example, the Virtual Magnifying Glass,
> suffers in linux because KDE only wishes to distribute C++/Qt software
> and Gnome only distributes C and C# software, so it get's hard to be
> popular.
>  

Now, that sounds like one real problem, related to the porting issue,
which we can address. And not that doesn't need as much work.

So the KDE and Gnome projects are language-locked? (How? Surely users
don't select software by language? Or are the distros incomplete,
FPC-wise? Hard to recompile?) Anyway. that sounds bad! And that suggests
a much shorter path: Adapt a distribution to "Pascal Gnome" support,
with full Pascal interfaces and code, or whatever is missing. Port Gnome
examples, if it isn't already done, and show that Pascal (FPC) is not
only an option but a *better* solution. Easier than C/C++, faster than
Java, much faster than Python... I don't know if an FPC-tuned distro
would make any difference, stronger FPC support in, say, Ubuntu, would
make a bigger impact. Acceptance of FPC sounds like a good goal to me.

Who isn't distributing? Gnome? That isn't a distribution. I don't quite
understand what you mean.

The "FPC OS" doesn't have to be 100% written in FPC, not even 10%. No
hurry. The C code is ugly but it works as long as you don't take GCC
out. Port what really counts, making it possible and well supported to
write *new* programs in FPC.


/Ingemar

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Porting linux to pascal, would it be possible ?

Felipe Monteiro de Carvalho
On Fri, Dec 5, 2008 at 2:40 PM, Ingemar Ragnemalm <[hidden email]> wrote:
> So the KDE and Gnome projects are language-locked?

Yes, they are.

> (How? Surely users don't select software by language?

Users don't care, but they usually use what comes with their distro
and window manager, so if KDE comes with a bunch of software they will
use it instead of looking for alternatives.

> Or are the distros incomplete, FPC-wise?

distributions are not the same thing as window manager.

Distributions are much more flexible language-wise, but they tend to
package whatever comes with the window manager.

It would also be possible to build a distribution instead of a window
manager, but I'm usually into writing code, as opposed to setting
things up, so building a distribution doesn't seam a lot of fun to me
=)

--
Felipe Monteiro de Carvalho
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Porting linux to pascal, would it be possible ?

Marc Santhoff
In reply to this post by Ingemar Ragnemalm
Am Freitag, den 05.12.2008, 17:40 +0100 schrieb Ingemar Ragnemalm:
> Now everything must have inherited design
> flaws from C just because of what was available in the 80's.

This is one strong argument against porting Lunix to Pascal, isn't it?
Porting means sort of translating old design flaws to another language.

>  That is,
> unless the tide changes. It can happen.

It has happened in the past. There has been OS/2 for example, with it's
superior OO design. RIP.

There have been many OSses with new appealing features, BEOS coming to
my mind.

And there have been some people starting to write an OS in pascal, but
I've never heard of something coming out as ... say at least an alpha
version or some sort of prototype.

SCNR,
Marc
--
UN*X is sexy!
who | grep -i blonde | date; cd ~; unzip; touch; strip; \
finger; mount; gasp; yes; uptime; umount; sleep

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Porting linux to pascal, would it be possible ?

Guillermo Martínez Jiménez
In reply to this post by Skybuck Flying
> 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  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Re: Porting linux to pascal, would it be possible ?

princeriley
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 AT&T 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 AT&T 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 <[hidden email]> 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  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Re: Porting linux to pascal, would it be possible ?

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

In 1973, Unix was rewritten in the C programming language, 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] The migration from assembly language to the higher-level language C resulted in much more portable software, requiring only a relatively small amount of machine-dependent code to be replaced when porting Unix to other computing platforms.

Prince


On Fri, Dec 5, 2008 at 7:57 PM, Prince Riley <[hidden email]> 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 AT&T 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 AT&T 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 <[hidden email]> 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  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal



_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Re: Porting linux to pascal, would it be possible ?

princeriley
Link to the article about the AT&T UNIX OS and C ....


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


On Fri, Dec 5, 2008 at 8:01 PM, Prince Riley <[hidden email]> 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 language, 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] The migration from assembly language to the higher-level language C resulted in much more portable software, requiring only a relatively small amount of machine-dependent code to be replaced when porting Unix to other computing platforms.

Prince



On Fri, Dec 5, 2008 at 7:57 PM, Prince Riley <[hidden email]> 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 AT&T 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 AT&T 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 <[hidden email]> 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  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal




_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Porting linux to pascal, would it be possible ?

Mehmet Erol Sanliturk-2
In reply to this post by Skybuck Flying

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/5000094_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  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Re: Porting linux to pascal, would it be possible ?

Graeme Geldenhuys-2
In reply to this post by Guillermo Martínez Jiménez
On Fri, Dec 5, 2008 at 1:24 PM, Guillermo Martínez Jiménez
<[hidden email]> 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  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Porting linux to pascal, would it be possible ?

Graeme Geldenhuys-2
In reply to this post by Marc Santhoff
On Fri, Dec 5, 2008 at 7:10 PM, Marc Santhoff <[hidden email]> wrote:
>
> It has happened in the past. There has been OS/2 for example, with it's
> superior OO design. RIP.

Ah yes... I surely miss OS/2!  The Workplace Shell was awesome.
Drag-and-Drop and Customization was awesome!


Regards,
  - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal