After five years of development, Free Pascal 2.0 is ready. With the new compiler, its authors believe they are ready to become a larger open source development platform. In the MS-DOS world, Pascal was one of the major programming languages and is by means of Borland Delphi an important programming language in the Windows world. In the open source world, Free Pascal is the leading Pascal compiler and while open source is a bit biased using the C language, the Pascal language has a lot to offer to open source programmers.
Free Pascal is a GPL compiler for 32-bit and 64-bit CPU architectures such as Intel 32/64 bit, AMD 32/64 bit, SPARC, PowerPC and Intel ARM.
It is language compatible to Turbo Pascal, Delphi (till version 7), and partly Metrowerks Pascal. It supports many operating systems: Dos, Linux, Windows, OS/2, FreeBSD, NetBSD and OpenBSD, Novell Netware, Mac OS classic, Mac OS X and MorphOS.
It comes with a cross-platform Run-Time Library, many interfaces to existing libraries, and a large set of non-visual classes in the Free Component Library. Last but not least, a text-mode IDE exists on various platforms, and FPC comes with 1800 pages of documentation.
What is new when compared to version 1.0 ?
– More supported CPUs:
AMD64, SPARC, PPC (32 bit), ARM.
– More supported platforms:
Mac OS classic, Mac OS X, MorphOS, Novell Netware.
– Improved inlining
– Improved register variables
– Improved 80×86 assembler optimizer
– Threading support.
– Rudimentary variant support.
– Interfaces support.
– WideString support.
– More Delphi compatibility units.
– Greatly improved database access.
– New compiler mode:
MACPAS for compatibility with Pascal compilers on Mac OS.
– Complete documentation of RTL units, generated using a new documentation
tool, included in the distribution: fpdoc
– Completely rewritten Unix support.
– Completely rewritten compiler, allowing for easier ports to new
architectures.
– IDE
– Free Vision text-mode windowing system.
– Many new packages.
– And of course, Numerous bugfixes.
2. Why Pascal?
The 3d-game Lentil Wars is being written with Free Pascal
Because the open source world is a bit biased to C, we’ll have to answer the question “what is Pascal good for?”. To answer this question, we need to compare Pascal to other modern programming languages which are currently available. Pascal is about as old as the C programming language and there are many similarities between both languages; both are procedural third generation languages that allow the programmer to do structured programming and both languages have been used to write large real world applications.
New languages, like Java and C#, promise to ease programming by providing managed code with automatic memory management. As this frees the programmer from a task this makes programming somewhat easier. Therefore one can ask whether interest in old school languages is still justified. It is the case however, although recently a lot of progress has been made to reduce the speed disadvantages of managed code, these languages tend to produce software that requires large bloated runtime environments and is often perceived as slow by users. At this time, these are reasons for many programmers and users to dislike those new school languages. (By the way, how novel is managed code? Been there, done that, didn’t work. Remember the USCD P-system?)
Anyway, today, the majority of software being written runs directly on the operating system, and we believe this will at least remain the case for quite a while. As of such it is important to have good tools available to write such software. The various C compiler suites provide such a tool and so does Free Pascal. While Pascal and C are similar, the language Pascal has still many things to offer that aren’t available to many programmers. For example, Pascal’s traditional strength, type-safety, is as valid today as it was 30 years ago. Modular programming was introduced in a much nicer way and so are the object oriented extensions.
Pascal removes things for you to worry about. For example, every use of a string in C needs measures to be taken to prevent buffer overflows. Pascal does not remove any freedom from you, so if you would like to build a buffer overflow vulnerability in your code, go ahead! However, using something trivial like a string does not require you to worry about buffer overflows and as a result, they are less likely to happen.
Modern Pascal offers many ways to build better software. In modern object oriented software design, Pascal’s properties give you a powerful tool to guard the integrity of your objects, and interfaces give you the power of multiple inheritance without the semantical difficulties.
The use of RTTI (Run-Time Type Information) provide easy streaming and many RAD design options.
See for instance the Lazarus project, which makes a cross-platform IDE using Free Pascal.
As for Free Pascal, I’m sure many programmers will appreciate it compiles 9 times faster than GCC, provides clear, helpful error messages, and frees you from the task to write make files.
Summing up, programming in Pascal gives you as programmer many advantages over your collegues writing C.
3. Free Pascal
The 3D terrain renderer Voxel World was written with Free pascal.
In the early 90’s, Borland’s Turbo Pascal was the leading Pascal compiler. It had a very large programmer community and when, in 1994 it became clear that it would be discontued many programmers were left in the cold. Some projects were started by such users to write a new compiler and in 1993, Free Pascal, initially known as FPK-Pascal, started out as one of those projects. All early Free Pascal developers were highly satisfied Turbo Pascal users and the goal of the compiler was clear, to build a modern, 32-bit replacement for Turbo Pascal.
The project quickly attracted people from the large Turbo Pascal community and got a large user base. In July 2000, the crown on the work, Free Pascal 1.0 was released. Free Pascal did what it promised, it was 32-bit, modern Pascal compiler that was extremely compatible to Turbo Pascal. It also turned out to be a very reliable compiler and could be trusted to write large programs in. In education, tradionally a Pascal stronghold, Turbo Pascal got replaced by Free Pascal and many code gurus started to design software in FPC. The downloads skyrocketed and as of now, they still do, with the three servers forming ftp.freepascal.org throw out 0,5 terabyte a month of traffic.
However, the world had changed. Turbo Pascal had disappeared from people’s mind, and its successor, Delphi, mostly used to develop business applications, was a now dominant factor in the Pascal world. So, demand changed from a modern Turbo Pascal successor to an open source Delphi alternative. However, this posed challenges the way the compiler had been written. In fact, the compiler had been written by a group of skilled young and crazy programmers, who were at the time relatively unexperienced with compiler design.
Another more important flaw became apparent. Version 0.99 of the compiler had been ported to the Commodore Amiga. This was done by writing a second code generator, one for i386 and one for the M68000. This approach turned out to be totally unmaintainable, since an awfull lot of changes required both code generators to be updated, while correctness of changes could not be guaranteed by people developing on PC’s. On the code generation front, the compiler design was by far not up to the task to generate efficient assembler code.
In other words, a redesign became necessary. Most urgent was a new code generator, but for a solid compiler architecture the parser tree and register allocator had to be rewritten as well.
4. Architecture
Architecture of the Free Pascal 1 compiler
The new compiler uses an architecture we have not yet seen anywhere else and we’re quite proud of it. First we’ll discuss the architecture of the 1.0 compiler. The 1.0 compiler was basically pretty straightforward. A scanner did convert a program into tokens which where then parsed into a parser tree. Then the compiler did a first pass to evualate constant expressions and collect information for code generation.
Then the CPU-dependent second pass generated the actual code, after which a CPU-dependent optimizer could improve the generated code.
Free Pascal 2 does three passes, constant evalution, collection of information and highlevel optimization, and code generation. The code generator has been split in a front-end and back-end. Tree, constant pass, information collection and highlevel code generation are built into an object oriented class structure. The CPU-dependent back-end is also implemented as class that needs to be overridden for each CPU. A CPU-dependent parameter manager helps the code generator to pass parameters to procedures without knowing anything about the CPU and calling convention that is being used.
The advantage of this architecture is that few CPU-dependent code has to be written to port the compiler, one can suffice by implementing the code generator back-end, the parameter manager and supplying the right information to the other parts of the compiler.
Architecture of the Free Pascal 2 compiler
However, any part of the code generation process can be overridden to take advantage of CPU-specific tricks. For example, the x86 archtecture has powerful addressing modes which are very useful for index arrays. To take advantage of this, the x86 part of the code generator overrides the code generation for array indexing and generates x86 specific instructions.
We believe that by using this architecture we are better able to take advantage of weird CPU features than by using a more traditional intermediate code approach. Current processors that benefit a lot from this are the ARM and x86.
Lastly, the new architecture uses a new register allocator. By doing register allocation after code generation, the compiler is able to make much smarter register assignment decisions. Previously, while allocating registers the compiler did not know what code did follow in the future and therefore usually put data in uncomfortable places so extra code had to be generated to move things around.
On the library front, a big overhaul was done on the Unix front, allowing code sharing between Unixes, so many of them are now supported. The already very fast heap manager got an overhaul to behave better in a lot of less common situations and to support deallocation of memory back to operating system (important for daemons).
5. New features
Lazarus is a Delphi-alike RAD tool that allows quick development of GUI applications
A new compiler not only needs a new architecture, it also needs new features. What’s new? Not surprisingly, many ports have been made. Free Pascal 2 is available for the i386, x86_64, PowerPC/32, Sparc and ARM processors. Operating systems did already include Dos, Linux, Windows, OS/2, and FreeBSD. Now, some of these are available on multiple processors and big newcomers are Novell Netware, Mac OS classic and Mac OS X.
Second, the compiler generates better code, does proper inlining, and can use multiple calling conventions. It has some language additions, like 64 bit constant parsing, interfaces, dynamic arrays and more. There is a better heap manager and both the compiler and runtime library now can do multi-threading. Internationalization support helps you to translate your application and widestrings will make it possible to also target those languages with weird character sets. Delphi compatibility has been improved a lot and many quirks are emulated in the special Delphi mode. Apple programmers will be pleased that a Mac Pascal mode implements many language features from Think Pascal and Metrowerks Pascal.
A good compiler is useless without good libraries, and loads of new libraries are available. Describing all improvements here would need a long article on its own, though.
6. Future
What does the future hold? Now the major architectural hurdles have been taken, we expect to make rapid progress on the code optimization front, which still is a bit behind compared with other open source compilers. Big improvements are expected by implementation of a static single assignment variables in the parser tree, which will greatly save on the amount of data moved between temporary locations. We also expect the amount of platforms the compiler is available on to increase even further. Big advances are expected in development tools based on Free Pascal which will become powerful RAD tools.
7. Closing words
Free Pascal 2.0 is the crown on five years of intense compiler development. Within those five years, its code base has evolved from a simple compiler of which you can find many on the internet to an advanced masterpiece and should be considered one of the major open source compilers. It does not implement a new sexy language of which many have appeared and disappeared, but instead builds on a foundation that has proven itself to be reliable, useful and competitive for over 30 years. And if you want to write software that matters, Free Pascal is among the better tools available for the job.
If you would like to see your thoughts or experiences with technology published, please consider writing an article for OSNews.
Is “Free Pascal” a different entity than GPC (GNU project Pascal Compiler). If so, what are the advantages or disadvantages of using one vs the other.
The biggest reason that I see for these, in my opinion anyways, is for supporting legacy code. If there’s already a lot of Pascal code around to do a specific task, why waste time rewriting it when it can be compiled still and used on modern operating systems?
http://www.freepascal.org/faq.html#FPandGNUPascal
There you go. No thinking involved.
The later Object Pascal versions of the language is actually very nice to use in most respects.
There are features in OP7 from Borland that I would die for in C++ or Java (methods attached transparently for property get/set).
But, there are also langauage features that get in the way IMHO (the whole “begin” and “end” syntax for one).
Whoa. If you want a flash from the far far past, go download the release and start up the “IDE.”
… its an old school DOS-based thing.
It has *COLORED TEXT-BASED GRAPHICS*
Its like a time machine. This. Is. So.Cool.
Gonna have to give this a try. I’ve used FPC in most of it’s incarnations, but have rarely deployed it for anything as delphi/kylix or resorting to C has generally made faster programs. The earlier incarnations were solid enough compilers, just… lacking in execution speed.
Pascal has a warm spot for me, mostly because I went to it from doing Z80 Assembly and DiBol… It was the first high level language I was exposed to, and taught me most every good programming habit I have today. While today I deal daily in C, Java and Perl, I often long for a decent pascal apart from Delphi (which has it’s place, but visual programming is counter-intuitive for me, making 80% of it useless)… Most modern languages let you get too many stupid mistakes past the compiler, especially in terms of memory handling or even stupid {censored} like letting typo’s compile as new variables…
The sheer cryptic nature of C and it’s myriad of cousins makes debugging a royal bitch, and frustrates many ‘normal’ Joe’s right out of programming. I often wonder if C and the languages that use basically the same syntax are popular for the sheer fact it makes programming look more complex than it really is. The ‘unix and C a hoax’ routine, where they say “when we got a clean compile from”
for(;P(”
“),R-;P(“|”))for(e=C;e-;P(“_”+(*u++/8)%2))P(“|”+(*u/4)~* ~@~2);
They thought they had something they could sell to the russians to set them back two decades…
How’s the old joke go? Pascal won’t let you shoot yourself in the foot.
Hows
I have been using FreePascal for various projects since the early 1.0 days. I have always been impressed by the speed of the compiler, good implementation of current Delphi language standards, and its cross-platform support.
Definitely worth looking at!
Get real. The real programming in windows has been in C/C++ for years now. It is only a small select few that use Delphi for any real projects. And most of them are hobbie programmers.
IIRC, one of the nice things about the original Pascal was that the compiler needed only to make one pass. Is that true, and does this new version really need to make three passes, or is it better for the sake of maintainability and/or sanity?
FreePascal could be very useful at universities, since Pascal is great as a 1st programming language, very clean and close to pseudocode.
I wish I had the old TurboPascal programs I developed at school, to recompile them and see how they are
Pascal needs only to do a single pass through the source code to get all symbolic information. That did save on compilation speed and it still does. However, by doing some preprocessing before you generate the actual code you have much more information available to optimize and generate better code.
Actually, I’d say you’re almost entirely wrong.
From my experience, a depressing amount of Windows applications are done in VB, happily followed by Delphi (Borland’s proprietary Pascal variant), Visual C++ and then a hodge podge of different things, including Java.
Until C# came along, Delphi was by far the nicest platform available for developing Windows applications. It made for easy RAD development but also allowed you go right down to the metal (Delphi has pointers, but it makes life easy enough that you just don’t need to use them that often).
I use Delphi at work, and it’s a lovely language. There are some issues, like the sparseness of the library in comparison with Java and C#, and the fact that Interfaces force memory management, but otherwise it’s very nice indeed. In fact, most of the advances in Java (String primitives, single inheritance with multiple interfaces, object hierarchy rooted with a built-in Object type, easy RTTI, etc.) and C# (delegates, properties, indexed properties) are straight out of Borland’s Delphi.
I’ve never tried any other Pascal implementation, I’d be interested to see how this stacks up.
I’ll post a link to our sister project <A href=”http://www.lazarus.freepascal.org/“>Lazarus project, which allows modern GUI development with Free Pascal.
t is only a small select few that use Delphi for any real projects.
I use it profesionally every day, I would pick it any day before C# or C++, but I admit there’s a lot people missinformed about Delphi and the great tool and time saver it is.
t is only a small select few that use Delphi for any real projects.
I use it profesionally every day. The only negative thing about Delphi is that it doesn’t run on Mac OS, other than that I think it is one of the most productive prgramming environments I’ve ever used (And before the python people have something to say, I teach python). For GUI work, Delphi wins hands down compared to thinks like SWING, SWT, GTK, QT.
What a load of crap.
Delphi is used for MAJOR projects all the time, you probaly use software created by Delphi right now and don’t know it.
Homesite from macromedia is one, Epop(www.wiredred.com),
Lightning Messenger(http://www.amsoftwaredesign.com)
All the EMS tools (www.ems-hightech.com)
it boggles the mind the amount of really big projects that use
Delphi.
There is also work being done on a Free Pascal plugin that will
compile Delphi code from the Delphi IDE.
Lazarus is nice, but it needs tons more work to be used for production.
Another great thing about Delphi is it’s execution speed and the fact that it compiles everything into one self-contained binary (exe) file. No need to worry about runtime libraries and associated version compatibilities.
I’ve always felt that execution speed is a very important element for any compiler. It’s also something that’s minimized or played down by advocates of languages that are hardly stellar in the speed stakes (e.g. Python or Java for GUI apps).
So, for those of you who’ve tried Free Pascal, how does it fare in the speed stakes?
Lazarus is nice, but it needs tons more work to be used for production.
More than tons, please (at least the linux version of bad joke).
If anything lazarus might be a good start for anyone porting their old application from windows to linux in the line of the quickest result. I won’t dispute that. But, as far as gtk is taken into consideration, I wouldn’t like to see it would get adopted.
They completely discriminated gtk to the unrecognisable level. No container based design which leads for interface to fail to be displayed properly with themes.
Second, reinventing the wheels where cars already exist. I mean tables, buttons, image loaders??? No gtk2 support?
never benchmarked it myself but afaict it comes down to how you code
from what i gather if you code like a C coder and ignore things like high level strings it will be nearly as fast as C i seem to remember that on arm freepascal beat GCC in simple test though thats probablly a case of GCC being badly optimised for that platform
if you start overusing things like high level strings (ansistrings and widestrings) in performance critical parts of the code then your app will be considerablly slower.
finally because there is no GC in the java sense you don’t get anything like sudden slowdowns caused by GC passes
anyone know where i can get this look cool?
many windows users have equally bad things to say about gtk apps
lazarus decided to try and be as toolkit neutral as possible and as compatible as possible with the delphi vcl. This may result in some cleanness issues when used with other toolkits.
thats life you either deal with a slightly no native look on some platforms or you rewrite your gui for every platform.
Its been almost 15 years since i programed in Pascal but i loved it when i was doing it. From what i understand it was primarily used to teaching. I will defintely put on my programming hat again to see if i still have it. One question does it come with an installer? if i do generate useful binaries how hard is it to distribute the files?
What a Nice language is Pascal…
I always loved it… There are too many people missinformed about the potential of pascal, IMHO..
compile speed was THE reason for me to use pascal instead of C(++). the compile time of C always bothered me, my dual g5 is slower when compiling c code than my p166 was compiling pascal code.
Pixel32 image editor is written in FreePascal too. http://www.kanzelsberger.com“>http://www.kanzelsberger.com or <a href=”http://pixel32.box.sk“>http://pixel32.box.sk
I know that you try to make it sound informative, but…
thats life you either deal with a slightly no native look on some platforms or you rewrite your gui for every platform.
SLIGHTLY???? Wow, (broken != slightly) just for information.
Wow I remember using pascal in high school on old Apple IIe’s with a CP/M card using a Z-80 processor addin. Clunky but it was good for learning something on….God knows this is better
Pascal was always good for a quick start but like all Open source projects Freepascal is somehow cryptic to new users.
This must not be, but GNU Pascal has even a more bloathed interface with the world. The mozilla page redesign shows what can be done to attract users.
Lazarus is a very ambitious project, so I hope it will now get a boost as it slowly completes.
i find learning pascal to be a lot easier than C.
the power? i am no hard core programmer, but as far as i’ve read and saw, pascal can do anything that any programmer may need.
the speed? as history would tell, pascal is among the leading compilers for this aspect.
as for RAD, delphi is excellent, while lazarus is promising. with a comprehensive and well-structured documentation or book, it (lazarus) may get more attracted newcomers and up and running users.
As for Free Pascal, I’m sure many programmers will appreciate it compiles 9 times faster than GCC,
I appreciate e.g. the interprocedural optimization and SIMD autovecorization in the Intel C++ Compiler, while I still can compile at a reasonable speed without them. Compiler is not just about the speed the compiler dwells on the code.
frees you from the task to write make files.
How is this going to help for large projects?
Summing up, programming in Pascal gives you as programmer many advantages over your collegues writing C.
I think Pascal gives me no significant advantage than my collegues writing C++, e.g. using ANSI string STL class.
And to another comment:
How’s the old joke go? Pascal won’t let you shoot yourself in the foot.
No, even Ada will let you shoot yourself in the foot. If you enjoys aiming your foot, you should seek another profession than anything involving programming.
I don’t mind being part of the “select few”, but i defy anyone to come up with a more productive environment for doing desk top apps than Delphi, it has the grunt of C++ (fact) but smart enough to reference and dereference objects pointers. I’m an old hand at this coding stuff (i go back to the Burroughs L2000 days) i have done Cobol (gasp), RPGII, Assembler, C, C++, all manor of xBase Dialects (Clipper with Classy was nice), but none of them we’re as nice to work with as Delphi.
There is a project that is just starting that aims to allow the current Delphi 7 and Kylix IDEs use the Free Pascal Compiler as a option to the standard delphi one.
Check it out on the borland newsgroups under Kylix Non Technical:
http://groups-beta.google.com/group/borland.public.kylix.non-techni…
The project is looking for help, so check it out.
It is not a useable alternative.
1. The Kylix/D7 line is dead. The borland seems to abadoned this product.
2. The biggest problem in Kylix line is not the developement environment (I use it every day without too big problems) but the CLX and the Qt. The Qt2.0 is a little bit problematic in newer linux distbributions (clipboard problems, etc), and also on windows (Layout problems in TPrinter, Jpg handling, etc). And the full CLX is very buggy and inconsistent (you can use TSQLClientDataSet in K3, but in D7 it is obsolote (you can compile it only from source), etc)…
IMHO the Lazarus+Free Pascal combo (with LazReport and Zeos) can be a very useable tool in the near future.
do YOU use pascal in a project right now?
Yes. My little business application is written in Object Pascal (Kylix3 / Delhi7). About 60 000 line of code + ~ 6 000 line stored procedure (Firebird RDBMS).
And it is not a big company – one-man business. It is a really small application, I know far bigger Object Pascal projects.
“The Kylix/D7 line is dead. The borland seems to abadoned this product.”
This is sadly true. Although, I suspect that people in Borland have starting to realize that they threw out their biggest cash cow. I mean, if I need C++ environment/compiler, then I choose VC++ or GCC. If I need .NET language, I’ll use C# and not Delphi.NET.
I am still using Delphi 7 myself. I tried Delphi 2005, but I hated the environment – it managed to make the actual code window too small to have usability in my 19″ TFT screen! Not to mention that Win32 units were as buggy as in Delphi 7 – atrocious winhelp, buggy flat buttons etc etc.
I’d really be interested in Freepascal compiler working from Delphi IDE. One thing that is always made me back up from GNU- and FreePascal is the lack of a decent RAD environment.
When in the 1968 Niklaus Wirth created Pascal it was designed as a simple language for learning structured programming and as a tool for learning compiler design (for simply and well designed language it is much easier to create a fast and effective compiler).
Latter on Wirth has created Modula and Oberon – much better and more advanced languages for real programming (i.e. system programming, modularity, object oriented etc.) but noone cares for them and people still use old good Pascal with its limitations.
Isn’t it strange?
I agree, with .NET I also will use C# (and M$ Visual Studio instead of Delphi 2k5). But lazarus+FPC seems a very attractive alternative for smaller projects when the small bugs will be repaired.
It’s a good point on Modula and Oberon, but I would point out that with the Object Pascal standard that Borland ‘adopted’ from Apple’s compiler circa Turbo 5.5, modern pascal damned near IS Modula… Just with some minor differences in how objects are named and handled (the word object instead of class… ooh).
Either way, I’d stack Object Pascal with it’s strict typecasting and object model up against C++ any day…
Actually calling something like Delphi or Freepascal, Pascal is wrong. They have little to do with 1968’s Pascal and some of the ideas of Pascal derived languages like Modula1/2/3 have been incorporated into those >>Pascal<< dialects.
What I find strange is that everybody was bitching about how Pascal’s type checking was bad and restrictive compared to C, and now most new languages that are not dynamic are strictly typed.
I’m the author of that thing
The game is not yet ready but a playable 1st beta will be available on lwars.sf.net soon. The sf homepage is not yet finished(it’s more like a tech demo of the page now).
You can see more screens here: https://sourceforge.net/project/screenshots.php?group_id=127746
The game is already playable and available for download but it’s on a very unreliable server. If you’re really interrested you can contact me, otherwise wait some week or so for the official 1st beta.
As to Free Pascal, I’ve started using it after I switched to linux. Kylix was just too buggy(the compiler itself) and bloated. I first started with pure FPC and then went on with Lazarus as IDE(I use it to make my level editor currently).
What I really LOVE about FPC is that it’s so easily cross-platform. I just go to windows press F9 and viola.
I can also cross-compile from both platforms to any other.
Also bear in mind this is my 1st project
When I started this I had no idea how to work with 2d arrays or classes.
Almindor: what graphics library do you use?
BTW. Are the characters based on the Czech and Slowak “Lentilky” candy? I have been in both countries many times, it is always nice to see that you preserved your own branding of Smarties .
People who like Pascal may want to check out Ada (the
latest gcc supports Ada). Ada was based on Pascal, but
has all kinds of “extra goodness” like built-in support
for multitasking programs. See http://www.adapower.com/
Is it me or are the executables that FreePascal creates HUGE?
program test;
uses windows;
BEGIN
windows.messagebox(0,’testing’,’testing’,0);
END.
This creates a 105KB file! And while in “release” mode.
In Delphi, same code results to 15KB executable.
If UPX’ed, 92 and 9KB, respectively.
I shudder on the thought what size button-label ‘Hello World’ would be….
Did you enable smartlinking? This reduces the executable size a lot. It cannot be enabled by default unfortunately because the GNU linker becomes very slow with smartlinking enabled, it’s not designed to do the kind of jobs Free Pascal with smart linking gives it.
For normal development, you develop with smartlinking disabled, so the compiler is fast, and when you release your program you can compile with smartlinking enabled.
Also, make sure you disable generation of debug information.
With smartlinking 25.5KB, 11KB when UPX’d. Much better.
Stupid me, for some reason I thought “release” would mean that smartlinking will be automatically enabled…
Also, in docs: “Remark: In the WIN32 version, strip is called stripw.” Nope, it is still strip.exe.
I get 26 kb with smartlinking enabled.
Since this is a site for OS fans: There is a project over at http://sibyl.netlabs.org/ that aims to create a visual development IDE (including visual form buidler) to sit on top of FreePascal for OS/2. Progress is very slow (3 news items in almost 3 years!!!), but that’s probably because it’s a one or two man project I guess. If it ever gets finished, I’ll probably resurrect my copy of eComStation and port some programs over that I wrote a while back… Could be fun
… and TOAD as well
I use SDL, SDL_Image, SDL_Mixer, SDL_Ttf, SDL_Gfx.
I’ve made my own networking units so I don’t use SDL_net.
I’ve abstracted the blitter so I will be able to add various(at minimum GL) backends in the near future. Oh and the game is 2D not 3D
Does this support data structures like hashmap, queue, etc?
Thanks for the information!
Don’t get me wrong, I don’t program in Pascal, I do C, Java and Python. But come on lets be honest ANYTHING that isn’t C derived today is looked down upon. What in your opinion makes Pascal and I mean modern Pascal like Freepascal and Delphi >>toy languages<<? I don’t see anything toyish about them.
Sorry people this is not true.
There has been no official announcement by borland that
Kylix is dead.
And if there is anyone to blame it’s all the people that where to cheap to buy Kylix at the reasonable price of 249.00
When they first released it, it was priced way to high, but they came to their senses and reduced the price. At 249.99 is a
very good deal.
arghh!! I had to sit through two months of ADA school when I joined the Marine Corps as a programmer ten years ago. Nice language I guess, but I remember having to do A LOT of thing explicitly that most languages take care of for you.
It did have built in libraries for threading… which was cool for the days of DOS.
I have used Delphi since version 1.0 for various projects, large and small. I am currently writing an application to perform occupational job clustering with Delphi 2005.
Where do you enable smartlinking
I went into compiler options and checked link to smart libraries, but this had no effect, exe stayed at 105k.
The “extra exception” to the LGPL is very nice:
http://www.freepascal.org/faq.html#general-license
rephrasing:
“you may use the run-time libraries for proprietary programs (which is allowed by the LGPL anyway!) provided that you still comply to the LGPL.”
Nice! You could simply use the LGPL, whoever wants to create a proprietary exe must statically link your libs!
Specify -CX to make the compile generate smartlinkable units and also -XS to let the compiler smartlink against those units. Do not use the -g which generates debugging information. There are equivalent options in the IDE, but you’ll have to see yourself, I haven’t it available to me at the moment.
Pardon me. Correction: Specify -CX and -XX.
>There has been no official announcement by
>borland that Kylix is dead.
But if you see the Borland product line the win32 based Pascal/BCB line seems to dead. The newest stuff is based on .NET. And the background of Kylix is the win32 based Delphi line + the wine windows emulator (and the Qt based CLX – it is also discontinued in newer Delphi versions (D8/D2k5)).
>And if there is anyone to blame it’s all the people that
>where to cheap to buy Kylix at the reasonable
>price of 249.00
> When they first released it, it was priced way to
>high, but they came to their senses and reduced the
>price. At 249.99 is a very good deal.
The price is not a problem, I have officialy legal Kylix from 1.0 to 3.0. But the K3 the latest Kylix version is certified only the following linux distributions:
– Red Hat 7.2
– SuSE 7.3
– Mandrake 8.2
This distributions are a “little bit” outdated. And in the newest linux distributions you must use black magic, wooodo or similar things to use kylix (LD_ASSUME_KERNEL, “1” to /proc/sys/vm/legacy_va_layout, etc). And at least I cannot use it with newer kernel then 2.6.10.
And it is only the one problem. The bigger is the CLX bugs and the old Qt. The maximized window in K3 applications changed to normal if you change the virtual desktop window, the clipboard not always works correctly between the k3 and other applications (IMHO it is Qt2 problem), etc. And because it is used for multiplatform applications: the D7 CLX also very buggy (more then K3 CLX).
It is very sad for me, because I based my business to CLX and the change to any new platform will very painful procedure – but at the near future I must change. And because of Kylix fiasco this technology will borland-free: only microsoft based (.NET/M$ Visual Studio) or totally open source(java, C++/wxWidgets, Lazarus/FPC) or combinantion (mono).
press F1 and it says: “no help file installed”.
is there an available help file? i remember that of Turbo Pascal which was very useful, and that was ages ago.
Yes, that of Free Pascal is useful as well. There is a small but great html-browser built into the IDE. First you download the documentation. Select help -> files and add index.html from the directory rtl and ref.html from the directory ref.
To make it better, old Turbo Pascal .tph files are also accepted and you can also add any other html documentation you download from the internet.
Have fun!
Port your apps from to the Lazarus Component Library. Unlike the CLX it has a group of skilled programmers on it who are dedicated to their users. It doesn’t have the finishing touches of commercial software (yet!), but is certainly very usefull and reasonably cheap to port to from both VCL and CLX.
Want to see what is possible? A nice example is Checkbook Tracker: http://tony.maro.net/mod.php?mod=userpage&menu=9&page_id=4
At this moment LCL also buggy and little bit incompleted. The main missing thing is the dbExpress (but the ZEOS port of Lazarus seems hopefully) and the MDI windows.
The biggest bug IMHO in the datagrid in the CVS version: if you scroll out the cursor from the grid only the last visible line will be repainted.
But because the full LCL is open source, at this moment a new Lazasrus project better idea then new Kylix project.
“But if you see the Borland product line the win32 based Pascal/BCB line seems to dead. The newest stuff is based on .NET. And the background of Kylix is the win32 based Delphi line + the wine windows emulator (and the Qt based CLX – it is also discontinued in newer Delphi versions (D8/D2k5)).”
Win32 in Delphi is certainly not dead. Delphi 2005 allows both .net and win32 development and has significant enhancements to both.
Good question. I’ve been implementing several of the benchmarks for the Great Computer Language Shootout (http://shootout.alioth.debian.org/) and find the lack of a standard hash table class “disturbing”. TStringList is good enough for small datasets, but it just doesn’t cut it for the problems used in the shootout.
Ah… playing with FPC is bringing back the good old days of Turbo Pascal on my PC-XT. I wonder if I still have those old floppies around? (Or an old 5 1/4″ drive for that matter…)
Lazarus shows great promise and I will probably start using it when it matures a bit more. (for now it’s still Kylix)
I first remember seeing Lazarus years ago and I have come back to check it out every year and it is starting to look really good. Go Lazarus!!!
I also would not count out Kylix just yet, I think Borland will come around and release a updated version.
There has been no official anouncment from Borland that it is dead. The problem was that sales of the 249.00 Pro version did go well.
If you want to see a new updated Kylix go and buy the Pro version for 249 or update your Kylix 1 or 2 for 110.00.
Even though making GUIs with it stinks it works GREAT for apache DSOs,Daemons,Console apps,TCP/IP apps with Synapse
(http://www.ararat.cz/synapse/) which also works with Free Pascal. I have daemons that implement custom TCP/IP protocols(with Synapse) that have been running for over 1 year with no downtime, So lets not say Kylix is dead or useless, it’s far from the truth.
Win32 in Delphi is certainly not dead. Delphi 2005 allows both .net and win32 development and has significant enhancements to both.
Yes, but the full infrastructure is based on .NET. The Kylix product line is based on a win32 version of D6/D7/BCB6 with the wine emulator. D8/D2k5 never will run with wine…
Get real. The real programming in windows has been in C/C++ for years now.
Stan, you need a reality check. A lot of welknown Windows applications are written in Delphi.
E.g. Skype the world most used Internet telephony – the Windows client is written in Delphi. Two of the best desktop search tools X1 and Copernic are both written in Delphi. PowerArchiver the most feature rich ZIP/archive tool is written in Delphi.
There is a list of Delphi made app here:
http://delphi.wikicities.com/wiki/Good_Quality_Applications_Built_W…
Ups, a slash too much in the link… The list of Delphi apps is here:
http://delphi.wikicities.com/wiki/Good_Quality_Applications_Built_W…
Thank you very much, developers of FreePascal. I’m a very happy user of your FreePascal Compiler.
Best regards
I use FreePascal from version 1.0 and i think, that is cool compiler. I make apps on win32 and on linux and I have good results.
Many thanks to developer team.
About Pascal/C: I’m a Pascal fan for 12 years. I know deeply several languages, including C++ or Actionscript. I think Object Pascal allows programmers to make less mistakes in the source code lines.
The biggest sofware developer companies have big investments in C programming. So much that they almost cannot use anything else. That’s why many think Delphi (or Pascal) is not a real programming language. Small companies with little time and money for specific GUI developments mostly use Delphi in Hungary.
About Cross-Platform GUI: I had seen Kylix and Larus. I tried to create a small cross-platform GUI app with DB access.
There is no problem until you want to create a cross-platform GUI application. Win32 definitely has its own GUI environment. Linux doesn’t … it has many of them so they compete each other. Only few of them reach the level that a big software developer company with windows programming experience needs. The only existing GUI toolkit I would really use is QT. QT is strongly coupled to C++ so hard to use it from other languages. Kylix/Delphi/CLX tries this – with less success I think.
I was wondering how hard could be to create a GUI toolkit for Linux in Pascal (FPC of course), so I started to play with X-window system. In the FPC it is very easy to use C libraries (.so). This is how LPTK has born (see lptk.sourceforge.net). Unfortunately now I don’t have time to develop it or to write its documentation. It was a test really. It showed that it is not to hard to create basicly a GUI system. I achieved results worth to see I think. I hope this work will be used by others too. Most of you know that such a big work cannot be done by a single person. And it would require several years of usage before anyone with big responsibility would choose it for a large project.
The salvation of the Pascal fans would be that the Borland tried to implement the cross-platform GUI in my way. They would need to reimplement the GUI elements using only low-level drawing routines. Borland has most of the source code and knowledge required to do this. (You know FPC would not exist without Borland.)
I think this time there is no “good” GUI development tool for Linux in Pascal only “not bad”.
About the FPC 2.0.: I looked it in many times in the years of development. It changed too much so I could’t risk to use it in production. I’m glad to see it is released finally. So I’ll deeply check it. And LTPK will be compiled with it soon.
The Pascal language can be the powerful as you want…
I’ve benn programming since 1995 into C and Pascal, and
frankly, the generated code are simetrical fast, just write it clean and inteligently. There’s no base of comparasion because there isn’t out there to much software written in Pascal, but that’s a good start of thinking in creating such that software. Open communities to do such a job would be nice and very welcomed. I’ll surely join to one.