For our April Community Choice Project of the Month, our community has selected Free Pascal, an advanced open source compiler for Pascal and Object Pascal. The project founder, Florian Klaempfl, tells us about the project’s history, purpose, and direction.
SourceForge: Tell us about the Free Pascal project please…
Florian Klaempfl: Free Pascal is an OSS pascal compiler supporting different pascal dialects including modern Object Pascal (for more details see theFree Pascal Homepage). It is written itself in Object Pascal, so users do not have to learn another language if they want to improve their compiler.
SF: What made you start this?
FK: In the early nineties, I wrote chess programs using Turbo Pascal. TP was a 16 bit compiler so it didn’t take advantage of the i386 getting popular at this time. After trying some alternatives, none of them made me happy, I decided to write my own compiler. This was in 1992. The current code base
of FPC was started in 1993. Sounds like Linux at the beginning of Linux, right :)?
SF: Has the original vision been achieved?
FK: In the sense having a 32 bit compiler pascal compiler yes, in the sense to use it for my chess programs, no. I never ported my chess programs to FPC.
SF: Who can benefit the most from your project?
FK: I think there are multiple groups who can benefit from it:
– People who want to learn only one programming language which allows them to use it for almost everything: FPC can be used to do big database applications but it can be also used to program embedded devices. It can used to write numerical applications but also to code for mobile devices.
– People who have a large Pascal/Object Pascal code base
– People who are interested in a programming language which offers a compromise between high
productivity and the advantages of native code.
Obviously, the most can benefit people who are part of all three groups.
SF: What is the need for this particular programming language?
FK: Modern Object Pascal supports most language features which are expected from an OOP language. In combination with its good readability it is a very powerful language.
Further, the concept of modern pascal allows very fast turn around times. While some people might say this does not matter with today’s machines, I still think it makes a difference: FPC rebuilds its own compiler sources (i386: ~330k lines) on an i7-4770 in 4.2 s. So no need for a cup of coffee while compiling a project.
SF: What’s the best way to get the most out of using Free Pascal?
FK: Using it in combination with Lazarus: a RAD built on top of FPC.
SF: What has your project team done to help build and nurture your community?
FK: I think the most important thing which helps to build and nurture the community is stability in
– we try to break never people’s code, so backward compatibility is an important thing
– we do heavy automated regression testing to avoid bugs being reintroduced, every night, regression tests are run with >100 different configurations and the results are collected in a central database. Developers get a daily summary of the
tests with information if regressions appeared.
Further, FPC tries to give everybody being interested in an working on an OSS pascal compiler a “home”. So the development directions are mainly driven by the contributors as long as two basic rules are obeyed: FPC is a pascal* compiler and other people’s code may not be broken**. Recent example: revived m68k support. It makes little sense to do so to get a lot of new users of FPC, but if somebody implements it, he is free to do so.
*This is subject to be discussed, “wirthian language” compiler might be also ok.
**Of course, sometimes this cannot be avoided.
SF: Have you all found that more frequent releases helps build up your community of users?
FK: FPC has a very slow release cycle: during the last years it is approx. one release per year. There are multiple reasons for this:
– FPC is almost 21 years old, so it has a certain maturity
– Building FPC from development head is not hard and normally done, see above, within a few minutes
– Due to its maturity and a development model grown over years, the development head is normally also very stable.
– We normally prepare binary releases and these binary are not just compiled, packed and uploaded but also tested. Due to the amount of platforms this takes considerable time so each release cycle eats also time which could be spent in other things.
SF: What was the first big thing that happened for your project?
FK: For me it was when the compiler was able to build its own sources, this was in 1995 after almost two years of work.
SF: What is the next big thing for Free Pascal (and/or feel free to talk more in depth about the “write once, compile anywhere” concept, sounds interesting)?
FK:The next big thing for FPC will be the 3.0 release: Besides a lot of new language features, bug fixes and improvements, 3.0 will extend the compile anywhere concept further. It is expected to be the first FPC release version which can output jvm code as well as i8086 code and maybe also the avr port will be in a usable shape.
SF: How long do you think that will take?
FK: We expect to release 3.0 in 2015.
SF: Do you have the resources you need to make that happen?
FK: Normally yes, the only question is what will be in 3.0.
SF: If you had it to do over again, what would you do differently for Free Pascal?
FK: Actually not much.
SF: Is there anything else we should know?
FK: I think the most interesting aspect is that FPC has no company in the background: it is developed by a community of people having either a need for it or having just fun working on it as their hobby.