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

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

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

Ingemar Ragnemalm
"Skybuck Flying" <[hidden email]> wrote:

> Hello,
>  
> An open source pascal operating system could be cool.
>  
> Would translating/porting linux to pascal be possible ?
>  

Absolutely. Most of Unix is plain C, which translates well to Pascal.
C++ is harder, of course.

"Gerard N/A" <[hidden email]> wrote:

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

This is an argument only after considering the time versus the goal. Is
the goal worth the time?

An operating system based on FPC code would be one way to give FPC more
(well deserved) attention, one way to make a wider range of people know
that the language is not dead, but significantly updated and a stronger
alternative than most people think.

But it is the best way? An OS kernel is not the most visible source code
that makes a lot of people gather to have a look. Showing off the
technology can be done in more time-efficient ways.

Another goal is to make a better OS. FPC programs use less memory and
starts faster. That can be a good thing. Would it be significant? I'm
not sure.

You are perfectly right in that we must choose our battles and spend our
time on things that are worth the time. I don't rule out that this could
be one. "Porting Linux" doesn't have to imply that every little program
is ported.


/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 ?

Skybuck Flying
If everybody does a little bit it could go quite quickly.

Question is:

Which linux distro ? ;)

Maybe even some BSD version so that closed-source os-es could be done as
well.

Though I onced tried FreeBSD... I couldn't even figure out the gui or how to
start an app..

So maybe linux more user friendly...

So first someone needs to find a good/user friendly linux distro which is
not to large.

Also for kicks maybe a floppy-disk based linux distro could be turned into
pascal as well.

So could even be multiple linux distro's turned into pascal...

Different flavors for everybody :)

Most important would be to be able to play with the to-be-pascal sources of
the linux distro so people can try out things with the os... ;)

So focus would be:

1. Linux distro(s)/kernel(s).

2. Linux gui(s).

3. Linux editor for editing pascal files.

4. Free pascal compiler probably already available.

Then anything else can be turned into pascal later on :)

Maybe even drivers and applications and such ;)

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 ?

Vincent Snijders-2
Skybuck Flying schreef:
> If everybody does a little bit it could go quite quickly.
>

Some (arbitrary numbers) from http://www.ohloh.net/p/linux:
Codebase   10,679,927 lines
Effort (est.) 3,396 Person Years

So, if everybody on this list (maybe 300 persons) work on it, then it
can be done in just over 11 years. Not so quickly, IMHO.

Vincent
_______________________________________________
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 ?

Skybuck Flying
Ok, so lots of code...

Two possibilities come to mind:

1. Using automatic conversion from C to Pascal but then the code would still
have to be checked by humans.

2. Only convert certain portions which are most interesting to people.

For example:

Linux's tcp/ip stack.

Linux gui.

So that for example Linux gui might be improved by pascal programmers ;) :)

Is that possible ? ;)

Bye,
  Skybuck.

----- Original Message -----
From: "Vincent Snijders" <[hidden email]>
To: "FPC-Pascal users discussions" <[hidden email]>
Sent: Friday, December 05, 2008 4:09 PM
Subject: Re: [fpc-pascal] Porting linux to pascal, would it be, possible ?


> Skybuck Flying schreef:
>> If everybody does a little bit it could go quite quickly.
>>
>
> Some (arbitrary numbers) from http://www.ohloh.net/p/linux:
> Codebase  10,679,927 lines
> Effort (est.) 3,396 Person Years
>
> So, if everybody on this list (maybe 300 persons) work on it, then it can
> be done in just over 11 years. Not so quickly, IMHO.
>
> Vincent
> _______________________________________________
> 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 ?

Steve Howe-4
In reply to this post by Vincent Snijders-2
Hello all,
> Skybuck Flying schreef:
> > If everybody does a little bit it could go quite quickly.
>
> Some (arbitrary numbers) from http://www.ohloh.net/p/linux:
> Codebase   10,679,927 lines
> Effort (est.) 3,396 Person Years
>
> So, if everybody on this list (maybe 300 persons) work on it, then it
> can be done in just over 11 years. Not so quickly, IMHO.
Although the effort is huge, and the topic is senseless, porting is much
faster then creating/coding/debugging. The numbers above do not reflect a port
and are pointless.

--
Best Regards,
Steve Howe
_______________________________________________
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
If you want to do some large work to increase the use of FPC I would
recommend creating a Window Manager instead, probably with fpgui.

The work is imensely smaller, althougth still large, and a window
manager usually comes with lot's of useful gui software, so this would
be an opportunity to distribute all kinds of software made with fpc
and lazarus.

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.

And don't expect people from the list to join your initiative. Usually
you have to start the project alone and get something working before
one or two people join in. Don't expect everyone to stop what they are
doing to help you in what you think is important.

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

Gerard N/A
In reply to this post by Ingemar Ragnemalm
On Fri, Dec 5, 2008 at 1:18 PM, Ingemar Ragnemalm <[hidden email]> wrote:
>
> This is an argument only after considering the time versus the goal. Is the
> goal worth the time?
>
No, and that was exactly my point. Life is too short to spend it
rewriting Linux in Pascal. <g>

>
> Another goal is to make a better OS. FPC programs use less memory and starts
> faster. That can be a good thing. Would it be significant? I'm not sure.
>

Then maybe it would better to focus on something different from Linux.

> You are perfectly right in that we must choose our battles and spend our
> time on things that are worth the time. I don't rule out that this could be
> one. "Porting Linux" doesn't have to imply that every little program is
> ported.
>
Not every little program, but only for the kernel + drivers +
filesystems the task is daunting.

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 ?

princeriley
Hello Everyone,

While I can't honestly say I share any enthusiasm for writing a OS in FreePascal, I do think there is merit in looking for projects of similar scope and interest that can demonstrate the power of the language and the tremendous tools that have been developed by this group over the past four years.

I do think that if someone were to interested in testing their mettle for writing something like an OS, he or she might first take a crack at writing a few of the GNU tools in FP. Say for example the BusyBox suite. Once they had done that, there are a few more code foothills they could climb to build up enough additional undestanding and programming techniques  others could then learn and then join them later on more ambitious OS projects.

My current projects are to port the FP compiler to the OpenSolaris platform and to eventually write an Eclipse plug-in oe a Mozilla based XUL application (like Komodo) for FP. Ultimately, I am interested in exploring more of the ARM platform support in FP.

Prince

On Fri, Dec 5, 2008 at 9:58 AM, Gerard N/A <[hidden email]> wrote:
On Fri, Dec 5, 2008 at 1:18 PM, Ingemar Ragnemalm <[hidden email]> wrote:
>
> This is an argument only after considering the time versus the goal. Is the
> goal worth the time?
>
No, and that was exactly my point. Life is too short to spend it
rewriting Linux in Pascal. <g>

>
> Another goal is to make a better OS. FPC programs use less memory and starts
> faster. That can be a good thing. Would it be significant? I'm not sure.
>

Then maybe it would better to focus on something different from Linux.

> You are perfectly right in that we must choose our battles and spend our
> time on things that are worth the time. I don't rule out that this could be
> one. "Porting Linux" doesn't have to imply that every little program is
> ported.
>
Not every little program, but only for the kernel + drivers +
filesystems the task is daunting.

Gerard.
_______________________________________________
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 ?

Graeme Geldenhuys-2
In reply to this post by Skybuck Flying
On Fri, Dec 5, 2008 at 3:19 PM, Skybuck Flying <[hidden email]> wrote:
> If everybody does a little bit it could go quite quickly.
>
> Question is:
>
> Which linux distro ? ;)

Well, you said "porting linux".  Linux to be only references the
Kernel only. That is the real OS part. All the other stuff like X11,
and 1000's of utilities and libraries are 3rd party stuff.  Having a
Linux system without a GUI is just as much a Linux system, as one with
a GUI.

So you first need to decide what you want to port?  The kernel only,
or a whole distro?  The latter is absurd, as it will take a lifetime
to complete, plus - what's the point?

As for a OS that can boot a computer, implement a basic filesystem and
copy/rename files is doable. I had friends that had to write such a
simple OS as a end-of-year project in there studies. I guess you can
take a peak at the Linux code to accomplish that, but again, what's
the point. Other that being able to say "yes it can be done with Free
Pascal as well".  Maybe you have more free time available than I do.
:-)


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 Felipe Monteiro de Carvalho
On Fri, Dec 5, 2008 at 5:55 PM, Felipe Monteiro de Carvalho
<[hidden email]> wrote:
> If you want to do some large work to increase the use of FPC I would
> recommend creating a Window Manager instead, probably with fpgui.

How far did you guys get with the 'fpwm' project?  Did it actually run
at some point. I see the last code changes was 2 years ago.


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 ?

Ingemar Ragnemalm
In reply to this post by Steve Howe-4
" Guillermo Mart?nez Jim?nez " <[hidden email]> 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  -  [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
>> 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?

Because he didn't really write it from scratch, instead he just improves what's already there (Unix source code, maybe?) and poing! Linux comes up.
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 Skybuck Flying
On Fri, Dec 5, 2008 at 5:19 PM, Skybuck Flying <[hidden email]> wrote:
>
> 1. Using automatic conversion from C to Pascal but then the code would still
> have to be checked by humans.

I can just imagine it will generate ugly code. I would much rather
imagine that a clean design with a good objects structure would be a
much better solution in the long term.


> 2. Only convert certain portions which are most interesting to people.
> For example:
> Linux's tcp/ip stack.
> Linux gui.

You are jumping the gun here!  You FIRST need a kernel. Then you need
file system support. Then you can start with networking, utilities and
GUI applications.


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 ?

Felipe Monteiro de Carvalho
In reply to this post by Graeme Geldenhuys-2
On Sat, Dec 6, 2008 at 5:20 AM, Graeme Geldenhuys
<[hidden email]> wrote:
> How far did you guys get with the 'fpwm' project?  Did it actually run
> at some point. I see the last code changes was 2 years ago.

I think it was able to run, but wouldn't do much.

Too many other tasks at hand, and this one isn't making any money, so
it has very low priority...

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

Andrew Haines
In reply to this post by Graeme Geldenhuys-2
Graeme Geldenhuys wrote:

> On Fri, Dec 5, 2008 at 5:55 PM, Felipe Monteiro de Carvalho
> <[hidden email]> wrote:
>  
>> If you want to do some large work to increase the use of FPC I would
>> recommend creating a Window Manager instead, probably with fpgui.
>>    
>
> How far did you guys get with the 'fpwm' project?  Did it actually run
> at some point. I see the last code changes was 2 years ago.
>
>  
I just checked out fpwm and updated it and fpgui locally so it can
compile. It does almost nothing atm but can reparent and close windows
:) not alot. I was thinking I might write a widget for resizing and
moving windows. Currently the window "title bar" is a Label and a Button
that has an "X" for it's text and stdimg.quit as the image.  I might
work on it some in the coming week if I can find the time.

Regards,

Andrew
_______________________________________________
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 ?

princeriley
Hello

Like ti weigh in on this thread in the discussion regarding increasing the GUI-ness of FP.
Has anyone looked into writing an Eclipse plug-in for FP (as an was done for Python and Ruby)?

Given the huge base of Eclipse users this might be a way to reach the goal with both a better developer tool and plugging into a big audience of potential users.

Prince

On Sat, Dec 6, 2008 at 10:34 PM, Andrew Haines <[hidden email]> wrote:
Graeme Geldenhuys wrote:
On Fri, Dec 5, 2008 at 5:55 PM, Felipe Monteiro de Carvalho
<[hidden email]> wrote:
 
If you want to do some large work to increase the use of FPC I would
recommend creating a Window Manager instead, probably with fpgui.
   

How far did you guys get with the 'fpwm' project?  Did it actually run
at some point. I see the last code changes was 2 years ago.

 
I just checked out fpwm and updated it and fpgui locally so it can compile. It does almost nothing atm but can reparent and close windows :) not alot. I was thinking I might write a widget for resizing and moving windows. Currently the window "title bar" is a Label and a Button that has an "X" for it's text and stdimg.quit as the image.  I might work on it some in the coming week if I can find the time.

Regards,

Andrew

_______________________________________________
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 ?

Graeme Geldenhuys-2
In reply to this post by Andrew Haines
On Sun, Dec 7, 2008 at 6:34 AM, Andrew Haines <[hidden email]> wrote:
>
> I just checked out fpwm and updated it and fpgui locally so it can compile.
> It does almost nothing atm but can reparent and close windows :) not alot. I
> was thinking I might write a widget for resizing and moving windows.
> Currently the window "title bar" is a Label and a Button that has an "X" for
> it's text and stdimg.quit as the image.  I might work on it some in the
> coming week if I can find the time.

Umm... I have though of trying my hand at the X11 tutorial on creating
a simply window manager, but never got around to it. The last time
(years ago) when I tried to compile 'fpwm', I managed to get it to
compile, but didn't know how to test/run it.

Could you give some hints on the latter, or is there a readme file in
the fpwm project that explains this?  How do I temporarily test a new
window manager? I'm using Ubuntu, and have quite a few window managers
available from GDM (sessions menu), but I have no idea how those
options got there, or how to add my own. :-)


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 ?

Marco van de Voort
In reply to this post by princeriley
In our previous episode, Prince Riley said:
>
> Like ti weigh in on this thread in the discussion regarding increasing the
> GUI-ness of FP.

> Has anyone looked into writing an Eclipse plug-in for FP (as an was done for
> Python and Ruby)?

Afaik there was a more editor like plugin at one time. But at that time
designer support only existed for C++ and Java. Haven't heard much since.
 
> Given the huge base of Eclipse users this might be a way to reach the goal
> with both a better developer tool and plugging into a big audience of
> potential users.

Afaik most Eclipse users use Java?
_______________________________________________
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 ?

princeriley
Thank you for your reply.

Eclipse was first released as a Java development IDE several years ago, but if you take a look at the Eclipse web site www.eclipse.org you'll see that since then Eclipse has evolved and been extended to support Ruby, Python, C/C++.

The suggestion I was making is there is a very large base of programmers, developer, and others  who now use Eclipse as their primary IDE in much the same way UNIX folks use emacs and
if there were a Eclipse FPC plugin they could discover and learn the language.

Prince

On Mon, Dec 8, 2008 at 3:58 AM, Marco van de Voort <[hidden email]> wrote:
In our previous episode, Prince Riley said:
>
> Like ti weigh in on this thread in the discussion regarding increasing the
> GUI-ness of FP.

> Has anyone looked into writing an Eclipse plug-in for FP (as an was done for
> Python and Ruby)?

Afaik there was a more editor like plugin at one time. But at that time
designer support only existed for C++ and Java. Haven't heard much since.

> Given the huge base of Eclipse users this might be a way to reach the goal
> with both a better developer tool and plugging into a big audience of
> potential users.

Afaik most Eclipse users use Java?
_______________________________________________
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 ?

Marco van de Voort
In our previous episode, Prince Riley said:
> Thank you for your reply.
>
> Eclipse was first released as a Java development IDE several years ago, but
> if you take a look at the Eclipse web site www.eclipse.org you'll see that
> since then Eclipse has evolved and been extended to support Ruby, Python,
> C/C++.

I know that, and that was not the point. You say "support", I say "usage".
 
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
12