Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2008-12

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

31 messages · 15 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Ingemar Ragnemalm
"Skybuck Flying" wrote 6 lines
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" 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

Skybuck Flying
to Ingemar Ragnemalm

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.

Vincent Snijders
to Skybuck Flying
Skybuck Flying wrote
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

Skybuck Flying
to Vincent Snijders

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.

Earlier message 23 lines
----- Original Message ----- From: "Vincent Snijders" To: "FPC-Pascal users discussions" 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 - > http://lists.freepascal.org/mailman/listinfo/fpc-pascal >
Steve Howe
to Vincent Snijders: Some (arbitrary numbers) from http://www.ohloh.net/p/linux: Codebase 10,679,927 lines…

Hello all,

Show quoted text 9 lines
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
Felipe Monteiro de Carvalho
to Steve Howe

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
Gerard N/A
to Ingemar Ragnemalm: Absolutely. Most of Unix is plain C, which translates well to Pascal. C++ is harder, of…
Ingemar Ragnemalm 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.

Show quoted text 5 lines
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.

Prince Riley
to Gerard N/A

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

Gerard N/A wrote 32 lines
On Fri, Dec 5, 2008 at 1:18 PM, Ingemar Ragnemalm 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 - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Graeme Geldenhuys
to Skybuck Flying: If everybody does a little bit it could go quite quickly. Question is: Which linux distro…
Skybuck Flying wrote 5 lines
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/

Graeme Geldenhuys
to Felipe Monteiro de Carvalho: If you want to do some large work to increase the use of FPC I would recommend creating a…
Felipe Monteiro de Carvalho 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/

Ingemar Ragnemalm
" Guillermo Mart?nez Jim?nez " wrote 6 lines
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

leledumbo
to Ingemar Ragnemalm
> 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.

View this message in context: http://www.nabble.com/Re%3A-Porting-linux-to-pascal%2C-would-it-be%2C%09possible---tp20852694p20868042.html Sent from the Free Pascal - General mailing list .
Graeme Geldenhuys
to Skybuck Flying: Ok, so lots of code... Two possibilities come to mind: 1. Using automatic conversion from…
Skybuck Flying 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/

Andrew Haines
to Graeme Geldenhuys: On Fri, Dec 5, 2008 at 5:55 PM, Felipe Monteiro de Carvalho How far did you guys get with…
Graeme Geldenhuys wrote 11 lines
On Fri, Dec 5, 2008 at 5:55 PM, Felipe Monteiro de Carvalho 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

Prince Riley
to Andrew Haines

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

Andrew Haines wrote 31 lines
Graeme Geldenhuys wrote: > On Fri, Dec 5, 2008 at 5:55 PM, Felipe Monteiro de Carvalho > 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 - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Graeme Geldenhuys
to Andrew Haines: I just checked out fpwm and updated it and fpgui locally so it can compile. It does…
Andrew Haines wrote 7 lines
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/

Marco van de Voort
to Prince Riley: Hello Like ti weigh in on this thread in the discussion regarding increasing the GUI-ness…

In our previous episode, Prince Riley said:

Show quoted text 6 lines
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?

Prince Riley
to Marco van de Voort

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

Marco van de Voort wrote 23 lines
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 - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Marco van de Voort
to Prince Riley

In our previous episode, Prince Riley said:

Show quoted text 6 lines
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".

Graeme Geldenhuys
to Prince Riley: Thank you for your reply. Eclipse was first released as a Java development IDE several…
Prince Riley wrote 5 lines
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++.

That project is such a mess (my personal opinion). Just the other day I wanted to download the Eclipse IDE, to see what has changed over the last few years since I , after browsing their
website for 30 minutes, I still couldn't find a clear "download Eclipse IDE here" link! What's up with that!!! I simply gave up and moved on.

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Gerard N/A
to Graeme Geldenhuys

Hi Graeme,

Graeme Geldenhuys wrote 8 lines
On Mon, Dec 8, 2008 at 8:07 PM, Prince Riley wrote: That project is such a mess (my personal opinion). Just the other day I wanted to download the Eclipse IDE, to see what has changed over the last few years since I , after browsing their website for 30 minutes, I still couldn't find a clear "download Eclipse IDE here" link! What's up with that!!! I simply gave up and moved on.

www.eclipse.org
On the upper menu, 5th item, "downloads".
Then choose whatever you wnat to download, and choose the mirror, and the download starts.
lazarus.freepascal.org on the other way seldom works lately and when it does it's so slow it can't be used.

Prince Riley
to Graeme Geldenhuys: That project is such a mess (my personal opinion). Just the other day I wanted to…

Graeme,

I find that very interesting. The Eclipse group has redesigned the web site and it now has a much cleaner and easier to navigate 'front door' that leads most visitors directly to the major Java or Rich Client IDE.

Prince

Graeme Geldenhuys wrote 29 lines
On Mon, Dec 8, 2008 at 8:07 PM, Prince Riley wrote: > > 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++. That project is such a mess (my personal opinion). Just the other day I wanted to download the Eclipse IDE, to see what has changed over the last few years since I , after browsing their website for 30 minutes, I still couldn't find a clear "download Eclipse IDE here" link! What's up with that!!! I simply gave up and moved on. Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Prince Riley
to Graeme Geldenhuys: That project is such a mess (my personal opinion). Just the other day I wanted to…

Graeme

I just took this snapshot of the www.eclipse.org kanding page .. you say you weren't able to find a clear download link .... lol .. ok well it appears directly in the center of the page ...

Let me know what you think after you download Eclipse ..

Prince

Graeme Geldenhuys wrote 29 lines
On Mon, Dec 8, 2008 at 8:07 PM, Prince Riley wrote: > > 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++. That project is such a mess (my personal opinion). Just the other day I wanted to download the Eclipse IDE, to see what has changed over the last few years since I , after browsing their website for 30 minutes, I still couldn't find a clear "download Eclipse IDE here" link! What's up with that!!! I simply gave up and moved on. Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Marco Ciampa
to Prince Riley: Thank you for your reply. Eclipse was first released as a Java development IDE several…
Prince Riley wrote 6 lines
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've seen people using Eclipse for developing in Fortran too...

Marco Ciampa +--------------------+ | Linux User #78271 | | FSFE fellow #364 | +--------------------+
Neil Graham
to Graeme Geldenhuys: That project is such a mess (my personal opinion). Just the other day I wanted to…
Graeme Geldenhuys wrote 6 lines
That project is such a mess (my personal opinion). Just the other day I wanted to download the Eclipse IDE, to see what has changed over the last few years since I , after browsing their website for 30 minutes, I still couldn't find a clear "download Eclipse IDE here" link! What's up with that!!! I simply gave up and moved on.

I did the exact same thing. It gave me serious doubts about their ability to understand what people actually need. An IDE doesn't do anything intrinsically itself, it is an enabler. It is supposed to make things that you can already do easier. You'd think that easy downloading should be a part of that.

hmm. That's not very Freepascal related. How about if I say that Eclipse is an excellent example of the direction that FPC should not go :)

Graeme Geldenhuys
to Prince Riley: I find that very interesting. The Eclipse group has redesigned the web site and it now…
Prince Riley wrote
I find that very interesting. The Eclipse group has redesigned the web site and it now has a much cleaner and easier to navigate 'front door' that leads most visitors directly to the major Java or Rich Client IDE.

OK, I just went to the www.eclipse.org and the website looks totally different to the one I was at a few months ago. Yes, it's much easier to find and download now. :-) Clearly they noticed their error in the previous web design.

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Graeme Geldenhuys
to Prince Riley: Graeme I just took this snapshot of the www.eclipse.org kanding page .. you say you…
Prince Riley wrote
I just took this snapshot of the www.eclipse.org kanding page .. you say you weren't able to find a clear download link .... lol .. ok well it appears directly in the center of the page ...

hehehe... Yes it seems funny now, but like I said, the last time I checked the website didn't look like is how it did look (Using the Web Archive's WayBack Machine).

Archive in February 2008
http://web.archive.org/web/20080214194714/http://www.eclipse.org/

This one was not so clear. ;-)

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/