Free Pascal 2.2 Has Been Released
Daniel Mantione writes "Free Pascal 2.2 has been released. Several new platforms are supported, like the Mac OS X on Intel platform, the Game Boy Advance, Windows CE and 64-Windows. Free Pascal is now the first and only free software compiler that targets 64-bit Windows. These advancements were made possible by Free Pascal's internal assembler and linker allowing support for platforms not supported by the GNU binutils. The advancement in internal assembling and linking also allow faster compilation times and smaller executables, increasing the programmer comfort. Other new features are stabs debug support, many new code optimizations, resourcestring smart-linking and more."
Half of me is saying "cool!"
The other half is looking very confused and asking "why?"
I learned Pascal in the 1980's when I was in college. Haven't used it since. I never did like the strict type checking or the whacky for loops that had to run at least once. FORTRAN and then C/C++ have served me pretty well over the years, although I write a lot of PHP, bash, and some C# now.
If you don't want crime to pay, let the government run it.
TurboPascal was great. Or is it Delphi now?
I still need a blue screen to write code quickly.
Deleted
FreePascal has come a long way, and at least for me, it's a very valuable tool. I may not be exactly the target audience, but I prefer Object Pascal over C(++) any day for many reasons, and FPC has been my sidekick ever since Delphi did it's magic trick of fading into obscurity and uselessness. Lazarus needs some more work though, but it's getting there. Hell, if I had the time to spare, I'd contribute myself (sadly, I don't). "Good work" and thanks to the guys that made it all happen!
Don't feed the trolls, it only encourages them.
With all the focus on JIT compiled and interpreted languages, it's nice to see this niche still being worked on and kept up to date with current software, like 64-bit Windows. There are still reasons to build applications for these platforms, while at the same time seeing cross platform source code as a benefit. This is why I also like the D programming language, although I have to admit Free Pascal got it beat as for the cross platform support, where it's still lacking things like native 64-bit and Windows CE compiling.
Beware: In C++, your friends can see your privates!
Microsoft's free C++ compiler has been able to target x64 for quite some time ... it isn't open source, but is free as in beer.
:)
C# programs even work in Linux, without a recompile, using Mono
Pascal. The eight wonder of the IT world.
load "$",8,1
Ada has the strong typing capabilities of Pascal, with multitasking and object support as well. [...] Does Free Pascal offer any advantages over Ada?
Object Pascal supports multitasking and objects for quite some time, so I guess the question should be the other way around.
And I suppose in this case the answer would be "Ada compilers are not widely available (and free) for as many platforms". Not to mention the huge libraries of Pascal code out there.
Oh and that comment of mine was missing that there's also an IDE for cross platform GUI development? Wow, now we're starting to get into rare territory... I've been looking for *good* IDE's for this purpose in the past, the closest I came to was something like wxWidgets. I dislike large libraries that need to be installed for GUI support, and this one apparently only needs GTK for Linux, and nothing special at all for Windows. Getting more interesting... :-) If I only knew Pascal better, it was something like a decade since I worked on it last time...
Beware: In C++, your friends can see your privates!
Cue the "the server must be written in Pascal" jokes...
Here's a MirrorDot link for the FreePascal site.
It's not Ada. Isn't that enough?
Dewey, what part of this looks like authorities should be involved?
Wait, let me get out the Depeche Mode album that I played while writing my high-school computers class assignments.
Who uses Pascal? Isn't Java or .NET the new Pascal?
when I got out of college. I have been clean and sober from Pascal since then and I plan to stay on the wagon.
GNAT, the GNU Ada Compiler, is free and part of GCC.
The Tao of math: The numbers you can count are not the real numbers.
http://www.networkmirror.com/p0HL5pKL5D9ZVmgq/www.freepascal.org/index.html
and
http://www.networkmirror.com/06poF0hRSRppE66S/www.osnews.com/story.php/18592/index.html
"I'd rather be a lightning rod than a seismometer." -Ken Kesey
I always liked coding in Pascal in college. I don't know what I'd use it for now, except maybe to see if my old code from school would compile and run.
Anyways, its nice to know that someone out there is still supporting the language. Maybe we can replace Javascript with some variant of Pascal? That would be pretty sweet.
Like many others here, I learnt Pascal at school in the early 80s before C, then C++ and finally Java became the standard teaching languages. The thing about Pascal, of course, is that it was designed to be a teaching language. All of that verbose syntax is meant to teach good structured programming. While Object Pascal will never reach the mainstream in any way more than Delphi did, it would perhaps have eliminated many of the errors made by coders due to the byzantine complexity of C++. At least thats what I think. That enforced verbosity made the code very readable, in a similar way to the way Java is, except that Pascal is native code.
I too learned Pascal in the early 80's when it was that or Fortran IV. Both seemed to me to require a lot of typing to accomplish anything. I picked up Modula2 for my Amiga as I already knew Pascal and it was quite similar, the Modula2 compiler was relatively inexpensive and the executables were tight and fast. Eventually I picked up Lattice C for the Amiga (an earlier version in a bargain bin, which I paid a bit more and upgraded to the latest release :o) and never looked back.
A feeling of having made the same mistake before: Deja Foobar
Well, there's GNAT. And generally most Pascal compilers are incompatible with one another, as Pascal itself is a somewhat ill-defined language which is unusable in its most "agreed upon" form, so having support for "Pascal" across a range of platforms is of questionable usefulness.
You are not alone. This is not normal. None of this is normal.
Pascal is still around? I used to do some light coding in Pascal back in the mid-1980s. So when is a new version of Modula going to be released? :-)
You want to know who isn't running Firefox 2.x? They spell it "definately" and "rediculous".
. . .but I learned three programming languages: BASIC, Pascal, and FORTRAN, in that order. That is all. Well, there was HP-41 synthetic programming and HP-48 too.
...the future crusty old bastards are already drinking the Kool-Aid.
Just the first free compiler that has an official release. The trunk of GCC supports Win64 for a while now. Just there has not been a release yet. This has been true since 2007-03-30. Binutils support win64 was added 2006-09-20.
This is one of my returning nightmares, after having programmed in c++ for years I had to take turbo pascal classes for one semester, then another one for an ancient version of delphi.
The advantage, in the end, is that it is Pascal, and if that's the language that someone wants then other languages like Ada and Eiffel, despite similarities just aren't Pascal.
Craft Beer Programming T-shirts
I just installed 2.2.0 on my x86_64 box and this is what I got for hello world ...
... why would I want Pascal?
tom@core2 ~ $ ls -lrt test?
-rwxr-xr-x 1 tom users 145208 Sep 10 19:03 testp
-rwxr-xr-x 1 tom users 6384 Sep 10 19:05 testc
Both were run through "strip" to remove any possible debug/extra details. testp is from this pascal program
begin
writeln('hello world');
end.
And testc from
#include <stdio.h>
int main(void)
{
puts("Hello World");
return 0;
}
Aside from the ubiquity of C, the fact that there are few moving targets [e.g. aim for C90 and you're usually fine], and that it seems to produce smaller binaries
Don't get me wrong, I was a pascal whore when I was kid too. But let's face it. Everything [that matters] is written in C, C compilers are everywhere, and their optimizers are highly kick ass. I just don't see why FPC matters beyond being a nice hobby project to rekindle "the old days."
Someday, I'll have a real sig.
Free Pascal is now the first and only free software compiler that targets 64-bit Windows.
Sure, but then you have to write it in Pascal!
At least bother to read the summary: FreePascal is the standard ported to many platforms. One single standard.
Wizardry I was written in Apple Pascal. I'd love to see the source code for it, for nostalgic reasons.
How do you expect me to use Pascal on my Apple IIgs or port my games to Super Famicom?
“Common sense is not so common.” — Voltaire
InstallShield and InnoSetup installers contain PascalScript engines. InnoSetup is written using Delphi -- Pascal. I believe InstallShield is too, but it's been a while since I quit using InstallShield in favor of InnoSetup.
What's the advantage of Free Pascal? Just curious, not being sarcastic...
Advice: on VPS providers
Thank god I came to my senses.
True confidence comes not from realising you are as good as your peers, but that your peers are as bad as you are.
* Available on a larger variety of platforms and OSes.
...and that's a good thing? I think one of the strengths of Ada is that all compilers implement the same language (except for the optional packages, which can be a problem).
Do you think so? Ada is available (as others have stated) as part of the GNU compiler collection, so is available on a large number of systems. Other compiler vendors supply compilers for other more obscure processors. How do you know that Pascal is more available?
* Great support for interfacing with external code.
It's pretty ordinary in comparison to Ada's Interface package hierarchy and collection of pragmas allowing you to specify in very fine detail. I just looked at the language reference section in FreePascal and it doesn't come close.
* The compiler is wickedly fast and is really good at producing compact executables.
If it's using gcc to do the code generation, then Gnat (which also uses gcc) should do the same job. I don't know about other compilers.
* FPC supports several different pascal dialects.
- The standardized language was very small, so there was a tendency for it to fracture into many incompatible languages.
- At that time, the implementations represented a string as a length byte followed by the string data, so you were limited to strings of length 255.
- I don't think there was any (standard) way to defeat the strong typing in cases where you needed to.
- Was there garbage collection? If so, I don't recall it as being an idiomatic part of the language, except maybe for strings...? Well, most languages back then didn't have it (and gc's sucked back then, so gc languages tended to be slow), but today...
- I was always annoyed by the gotchas in the syntax -- the language seemed unnecessarily picky about periods and semicolons.
Has any of this changed? Has modern pascal settled on a single standardized version of the language? Is gc easy, idiomatic, and consistently supported in libraries and language constructs? Is there good unicode support? It seems to me that today, if I wanted a typesafe language I'd use java, and if I wanted a language that compiled to native code I'd use C or OCaml.Find free books.
Oberon is the grandchild of Pascal and way cooler. It's seriously a bondage&discipline language: http://www.oberon.ethz.ch/
this;
is;
great('news');
SYNTAX ERROR: Missing " " after ";"
http://www.lysator.liu.se/c/bwk-on-pascal.html
I sincerely hope the language has been fixed since that was written...
No sig today...
* The compiler is wickedly fast and is really good at producing compact executables.
> If it's using gcc to do the code generation, then Gnat (which also uses gcc) should do the same job. I don't know about other compilers.
I think all your other points are quite valid. Ada was always a better specified language.
GPC (GCC), Lazarus, Virtual Pascal and Delphi are different compilers. GPC may be comparable to Gnat (I only had passing experience with it). Delphi is arguably the fastest native compiler I have seen. Certainly beats the GCC implementation of Ada in that aspect. From my memory, FreePascal was faster as well. Ada does a lot more checks on the code than Pascal does and will likely be a bit slower anyway.
For those who can't tell VistA from Windows Vista, VistA (notice final capital letter) is the electronic health record system used by veterans' hospitals under the United States Department of Veterans Affairs. VistA CPRS is its GUI front end.
Windows Forms? no... but prettymuch everything else does. I use it as a scripting language to write tools, not pretty GUI's :)
increasing the programmer comfort. I do not get this statement. What the heck does anyting in this article have to do with my comfort? Since this is a compiler, do you speak of my comfort at compile time? That would be helped by code that is better checked at compile time. Errrr! Not Pascal! You need a managed language like Java or C#. I understand that there is a .Net Pascal out there, but this announcement just does not interest me. It is 2007, not 1997! We are building big, complex systems with our software, and we need languages that are type safe and can help achieve more predictable results than C++.
WTF does this have to do with that?
Great ideas often receive violent opposition from mediocre minds. - Albert Einstein
I used P-code also, and other ancient virtual machines from the '60s. IMHO, however, the key feature of the Java virtual machine is the ability to create a secure sandbox for arbitrary p-code. The byte-code verifier allows maintaining the security even when compiling to native code. I don't know whether Java was the first with these features (and I seem to recall a similar verifier for some other obscure language), but it has succeeded in becoming the first widely used language with such features. As I recall, a subset of Java was even proved secure (in that you couldn't escape the VM semantics). Naturally, JNI libraries are necessary to do anything useful (like IO), and every JNI library is a potential security hole (as is every SecurityManager method). But at least Java VM security narrows the areas of concern.
Years ago (early 90's maybe?) I remember reading a paper about an empirical study -- as opposed to unsupported but vehement opinions -- of the relative efficiency of Pascal and C object code. As I recall, the conclusion was that Pascal fared better, because Pascal's strong typing and other semantic clues make it an easier target for an optimizer.
Anyone remember the paper, and have a pointer to it? The requisite five minutes with google haven't been successful for me.
Free Pascal/CGI vs. RoR vs. PHP5 vs. CakePHP? Am I right? I said am I right, folks?
Visual Basic Programmer's Journal, issue 1997, oct. "Inside the VB5 Compiler engine"...
That's where Microsoft's VB5, & VC++5.x got the shit kicked out of them on 7-10 tests by Borland Delphi 2.0!
(& most importantly, on math & strings processing, which every program does. Delphi won by HUGE margins on those (like 2.6x as fast iirc) & only lost to VC++ on form paints (by NOT that big of margins as it won by & text form loads))
The rest went almost across the boards to Delphi 2.0 vs. those 2 MS products.
Well - VB won 1 area over BOTH MSVC++ 5.x & even Delphi 2.0 was ActiveX form loads (which it is/was (since the VB5/6 line just died a year or so back) HEAVILY oriented to)...
There you go: One documented proof in publication in a competing trade journal's pages no less, where Delphi (object pascal 7 engines based) did in BOTH VB & VC++...
APK
P.S.=> & on std. single executable design Win32 PE format executables - fastest thing under the sun, especially when compiled with a good optimizing compiler (which Delphi has, best there is no less proven above as so vs. its major competitors) & inlined assembly + hand optimization techniques, & good error trapping on a coder's part... apk
That's what I thought too. Just download and install the PSDK. Perhaps it also works with VS2005 Express Edition (free too) for the Visual Studio environment. I have VS2005 Pro but used to build x64 applications with the PSDK.
I had only written in basic up until then. Losing the line numbers and gotos was like having a light shine down from heaven.
I will always think fondly of Pascal. To this day, whenever I'm writing in C, when I see an opening brace I think "begin". When I see a close brace I think "end".
Weaselmancer
rediculous.
Possibly. I think for similar programs though the extra checks shouldn't come into account. Pascal always checked array boundaries, and so long as you are only doing standard programming (no subtypes, no derived types etc.) it should be comparable.
Gnat Ada does use a source file model for the packages, so has to rescan any "with"ed packages (similar to #include) with every compilation unit. Does FreePascal precompile things? That could make it faster...
I've used Ada off and on, and never had this reaction. What do you think was wrong with it?
Bravo.
Bill Catambay has done yeoman work in keeping the Pascal spark alive in all its flavors. For those of you who are nostalgic, curious, desperate, eager to find a centralized repository for mockery, or want to try one of the easiest, most powerful tools you've ever used, visit Pascal Central. Tools, compilers, source code, links, Bill's article on the reasons Pascal is still relevant (which I helped edit), and a community of people ready, willing, and able to get those of you interested in giving the language another look (or a first look) a lot of help and support.
If you want power, readability, a maintainable code base, easier string-handling, no-brainer memory management, and an elegant "No-BS" language, try Pascal. It has survived this long for a reason.
on the Apple //e's in our computer lab in the mid 80's. Those were great classes, but of course I never used Pascal again. I admit it was more interesting than Basic.
I think part of the appeal was that the original Wizardry was written in Pascal. Then when I graduated I got trained on an answering service system (based on PCs) that was also written in Pascal.
It's worth pointing out that most, if not all, of the objections in Kernighan's famous essay do not apply to Borland's Pascal dialect.
dragonhawk@iname.microsoft.com
I do not like Microsoft. Remove them from my email address.
I view Turbo/Object Pascal the same way a lot of people view a classic car: It may have been eclipsed by more modern technology, but it still has a certain elegance and appeal to those who knew it in its heyday. Sure, the latest cars have electronic fuel injection and engine monitors and other advanced technology, but there's still nothing like working on a classic engine. It's nostalgia, yes, but good stuff, still.
END. (* PROGRAM *)
dragonhawk@iname.microsoft.com
I do not like Microsoft. Remove them from my email address.
I had to write a small program to create some special text files a few weeks ago. It was easy to write it in 20 mins, compiled and runs on any dos based machine. Means I could just run the exe anywhere on any system and it would just work. No special runtimes or funky dll files. It just did the job i asked.
Rock on pascal!
http://www.writeitfor.us - Writing IT for the IT generation.
Well, for what its worth, Freepascal pretty much does any flavor as long as its Borland. It supports both the Turbo pascal and Delphi variants of Obj Pascal, including the different object/class types. Which is kind of neat, as you can get those groovy old turbo pascal math libs and mush them into your Delphi code without too much drama.
Excuse the Unicode crap in my posts. That's an apostrophe, and slashdot is busted.
You might know Sedgewick's books about 'Algorithms in [language]', where the language is any of C, C++, Java. Well, I still have a (digital) copy of it's very first issue around where all those algorithms were written in Pascal - the book was called 'Algorithms'.
I did some Pascal coding back in the nineties (I was a thirteen yo Pascal newbie - when I take a look at the programs today I feel tempted to puke all over my keyboard) and re-learned part of it for the algorithms in this book - it's an elegant language, sad thing it's dying - the verbose syntax isn't all that bad; I think the most important thing about easy understanding of a program's logic is consistent indentation.
And google will give you some help with getting started with Pascal. I think there should be a lot around...
I'm an infovore...
I learned Pascal at the university in 1980. It was my second language
after BASIC. For a lot of years I was a big fan of Pascal.
Missing features of Pascal (and other programming languages)
lead me to the idea of an extensible programming lanuage.
For my diploma thesis (and later the dissertation) I wrote a
preprocessor in Pascal which produced Pascal code as output.
The preprocessor should provide an implementation for my
extensible programming language MASTER. As it showed, Pascal
is not a good target language. The portability of Pascal programs
was also bad at that time. Because of this reasons the
implementation of Seed7 (which is a successor of MASTER) uses
C as implementation and target language. I still think that the
basic ideas of Pascal are great. This is clear when you look at
Seed7:
The statements are like in Pascal/Modula2, everything must be
declared and the Seed7 interpreter uses one pass to read the
program. The Seed7 compiler compiles to C which compiles to
native code. Other features try to extend the possibilitys like:
Declaring new operators, statements, templates, abstract data
types, object orientation, multiple dispatch, and so on.
If someone likes Pascal he would probably like Seed7 too.
Greetings Thomas Mertes
Seed7 Homepage: http://seed7.sourceforge.net/
Seed7 - The extensible programming language: User defined statements
and operators, abstract data types, templates without special
syntax, OO with interfaces and multiple dispatch.
ADA is the meanest and coolest programming language in existence. It offers features that other languages can only dream of. But it's not suitable for business tasks and such; ADA's purpose is the 'serious' software engineering, i.e. weapon systems, power plants, NASA projects etc. And it may seem similar to Pascal, but that's only superficial; there are many great differences.
I was trying to make sense of the comment I was responding to. FreePascal is ported to many platforms, but so is the GCC (and by implication GNAT.) So the comment that Pascal is somehow on many more platforms than ADA makes little sense unless you assume you're talking about implementations. There certainly are more Pascal implementations than ADA implementations, but that's of questionable usefulness because they're mostly incompatible with one another.
You are not alone. This is not normal. None of this is normal.
Did you guys know, Pixel image editor is written using this FreePascal compiler? Well there's some C and assembler used, but still perfect example: http://www.kanzelsberger.com/
Photoshop for Linux? Wine? No. http://www.kanzelsberger.com
At least Turbo Pascal and Free Pascal support range checking for subtypes. FPC also supports checking type casts from one object/class type to another. Most checks are only turned on for debug builds though, which is a big difference with Ada.
It keeps precompiled versions of interfaces, yes. But even when building from scratch, FPC is a lot faster than gcc. In general, gcc is simply a slow compiler (I've recently heard it does over 200 passes over each compiled function, so actually it is lightning fast relative to the work it does, but in absolute numbers it's still pretty slow (even with all optimizations turned off).
Donate free food here
Unless I'm mistaken I believe Free Pascal is still used at the University of South Africa for it's first programming course. A great way to save students money.
I seem to remember that in Pascal, in order to pass a string from one function to another, they had to be declared to be of the same length. That was back in Turbo Pascal for DOS days, and maybe they fixed that up by then.
This is my sig.
Well, read the manifest. If you need a bit of memory for instance :-)
(not to speak of Kylix. Though I still think that Kylix demise says more about Linux than Kylix. The product was not perfect, but way better than any competition (including FPC/lazarus at the time, and I love them))
>Does Free Pascal offer any advantages over Ada?
Ada or GNAT? If GNAT, then, uhh, it is not GCC based.
One Free pascal binary allows you to generate code for both your PDA, Linux and your windows machine. Native code. Crosscompiled, and anything.
Seriously. GCC is a great compiler, but as a development platform it is slightly user unfriendly, specially on Windows. (see the article btw, where is a release worthy win64 gcc?)
I've investigated FPC vs gcc in the past, and fpc's speed depends on the following factors:
- compiled more than one compilation unit (sourcefile) per execution of the compiler.
- not having to interpret source to compile something dependant (IOW precompiled units)
- integrating AS. This is a factor 5 easily. Yes. Seriously. Just gcc generating ASCII, and AS reinterpreting it
Note btw, that the cuteness of the multi dialect support is being able to combine the various dialects in one binary.
No, the Mac Pascal mode goes a long way to standarized pascal, including mac dialects.
- Does gcc support Win64 in any release? .NET variants)
- FPC doesn't use GCC.
- I've no problem with Ada. Except that FPC hooks into the quite big commercial Delphi scene's codebase (despite all blabla about Python, Delphi is second in the commercial component market only after VB6 and MS
And of course the only available freely ADA compiler is GNAT, which is ok for a gcc derivate. But gcc derivates sucks on Windows, and that is still the main platform for most people
[sarcasm]
Yeah, while Anonymous Coward is one of the most respected posting persons (by far the most) on Slashdot!
[/sarcasm]
the GGP post didn't mention onomatopoeia...
I think the main reason for fpc's speed is simply that the compiler is much less complex (to the extent that a single person can still have a pretty good overview of pretty much the entire workings), while that cannot be said of gcc. And of course, fpc does a lot less passes over all the code.
Donate free food here
If I wanted what you describe, I would pick Ada. It is much better than Pascal in all regards, and it has a good real-world implementation that uses a good back-end (gnat->gcc). /David
How can there be orphaned legacy Delphi code if the current version of Delphi (Delphi 2007 aka Delphi 11) still supports everything back to Turbo Pascal?
.NET monstrosity which is the new versions of Delphi. Not to mention we went from an environment that could generate 200-300k stand-alone executables to requiring 30mb of runtime..
I have several projects stuck on Delphi 7 because a lot of third-party components don't work anymore under the
Now I will admit I haven't yet tried Delphi 11, but my experiences with 8 and 9 were so painful I just gave up on even trying to port my software over.
DJ kRYPT's Free MP3s!
http://youtube.com/watch?v=4BORxQ7L2BU/ Free Pascal kicks ass when it comes to cutting-edge textmode lightsourcing and particle effects.
Even leaves Java in the dust.
Maybe a little thing - but man I like that.... C++ has worn me down this way.
I am very small, utmostly microscopic.
1980 called and it wants its headline back
hmm.
Free, as in the banana in that box you see over there, monkey.
Yeah, that's right, just put your hand in that little gap between the bars. Just big enough for your hand. No, no, don't worry about whether it'll be big enough for your hand when it's holding the banana. Nothing to worry about at all.
Besides, when we come to help you, we'll give you a whole bunch of bananas and a nice little cage to ride in.
Really, I can do anything in Pascal that I can in C/C++, just differently. I like the more "rigorous structure" and cleaner syntax of Pascal - if it compiles, it probably will run too. I find a bit smaller bug count in Pascal code than in C. Maybe just because it makes me settle down a bit and put variable declarations and stuff together in a VAR block instead of accidentally just declaring them where I think it's needed like you can do in C, so scope problems are reduced.
And Pascal is a wee bit nicer for string handling.
The grunts behind freepascal decided to release freepascal under the GNU license. Irony?
ohp does not pwn