Slashdot Mirror


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

40 of 284 comments (clear)

  1. Mixed Reaction.... by chefmonkey · · Score: 4, Funny

    Half of me is saying "cool!"

    The other half is looking very confused and asking "why?"

    1. Re:Mixed Reaction.... by TheRaven64 · · Score: 4, Interesting

      The other half is looking very confused and asking "why?" The last time I played with Free Pascal was as an undergraduate, doing coursework that was meant to be done in Delphi. At the time, Free Pascal supported all of the features of Delphi required to complete the assignment. I wonder how much orphaned legacy Delphi code there is out there looking for a support route.
      --
      I am TheRaven on Soylent News
    2. Re:Mixed Reaction.... by Dunbal · · Score: 4, Funny

      I wonder how much orphaned legacy Delphi code there is out there looking for a support route.

            OMG, powerful alliteration and anthropomorphism. Here I am with a visual image of a young code snippet out in the winter cold, begging people for a couple pence for a "cuppa tea".

      --
      Seven puppies were harmed during the making of this post.
    3. Re:Mixed Reaction.... by maxume · · Score: 5, Informative

      You're mixed up on what alliteration is.

      --
      Nerd rage is the funniest rage.
    4. Re:Mixed Reaction.... by arth1 · · Score: 5, Funny

      Half of me is saying "cool!"

      The other half is looking very confused and asking "why?"

      I'm also feeling rather blaise about it...
    5. Re:Mixed Reaction.... by Anonymous Coward · · Score: 5, Funny

      Who are you calling alliterate?

      You probly can't even read good either.

    6. Re:Mixed Reaction.... by fm6 · · Score: 4, Interesting

      The "support route" requires more than. a compiler. It requires developers who know both the technology and culture, which are drastically different from those of any other language. Not bad, just different. Which is why Turbo/Delphi/Object/Free Pascal has always been fiercely opposed by management (which doesn't care for nonstandard technology) and fiercely defended by developers (who love its tiny compile cycle and elegant features).

      The suits will win in the end, because they're breeding faster. There's not a lot of incentive to become a Pascal expert, because it's perceived as a fringe language. (To some extent, that's a self-fulfilling prophecy, but that doesn't make it any less true.) So there will be fewer and fewer developers who insist on working in Pascal, and always the same number of managers who insist on switching to a "standard" language.

      So Pascal is doomed. Yes, they've been saying that for a long time, because it's been true for a long time. Religions don't die quickly.

      Personal note: I used to work for Borland and was responsible for documenting a big chunk of the Delphi API. Fell in love with the language during those years. Driven out by the sheer insanity of Borland management. Now I can't bear to work in the language — too depressing.

    7. Re:Mixed Reaction.... by morgan_greywolf · · Score: 2, Interesting

      Your post is right on the money, but maybe I'm biased. While my first language was interpreted BASIC, my first compiled procuedural language was ... Turbo Pascal 3.02a. It was also my first OOP language, or, more correctly, Turbo Pascal 5.5 was. I yearn for the days of that Borland compiler ... it was FAST, and it generated small, highly-optimized executables -- well before anyone else did.

      I've used Free Pascal for the odd project here or there, but, well, sadly, these days I find myself mostly using C and Python. Don't get me wrong -- I like C, and I especially like gcc, and Python -- well, Python reminds me of the old days, in many ways, even though it's different. But Free Pascal will never pay the bills.

    8. Re:Mixed Reaction.... by fm6 · · Score: 4, Interesting

      it was FAST
      First bug report for Kylix (Linux version of Delphi): testers claimed the "compile" command wasn't doing anything. What they didn't understand was that their test programs were finishing compilation before they had a chance to release the mouse button!

      Thing is with Pascal: it's designed to be very easy to compile. (So CS students could use it for their first stab at writing a compiler; this was before grammar generators made hand-built compilers obsolete.) So compiling only takes one pass, and even that pass executes quickly. Very handy when you're working with an IDE....

      Ach. Getting depressed again.
    9. Re:Mixed Reaction.... by alico · · Score: 2, Insightful

      Pascal is the new COBOL and it's going to be around for a while. I've used the language for 20 years and really like it but I like to keep a balanced diet with other languages like C/C++ and C#.

    10. Re:Mixed Reaction.... by RichardKaufmann · · Score: 2, Interesting

      Pascal was defined after grammar generators (e.g. yacc) were around. Pascal was fun to compile because one could write a recursive descent parser for it straight off the "railroad diagrams" used to define the language. In fact, the ETH "P2" compiler (written by Urs Ammann) was such a compiler, and was the start of many other compilers. If I remember correctly, LL(1) is a proper subset of recursive-descent-able. Most everyone else uses LALR(1), which is not.

      You probably should have said "easier and faster to parse" rather than say "takes one pass." It's mostly human-in-the-loop and optimization issues that make compilers slow (especially on modern hardware). Decomposed problems are easier problems to solve, and common intermediate languages (across a variety of languages) help leverage the human investment across multiple compilers. Also, "back in the day" things like caches were oh-so-new, and optimization requirements were laughably simplistic.

    11. Re:Mixed Reaction.... by Nazlfrag · · Score: 5, Funny

      Assuming alliterations are always apparent admits absence of afterthought. Learn that linguistics leverage lost lines, lest ye languish. Parent poster presumably postulated the Pascal premise presuppositionally. Defined, 'I wonder how much orphaned legacy Delphi code there is out there looking for a support route.' distinctly diverges to 'Does destitute Delphi data desire duplicate development designs?'

    12. Re:Mixed Reaction.... by sg_oneill · · Score: 3, Interesting

      It was doomed, because Borland completely and dramatically misunderstood Linux. We ALL (Well the delphi heads) *WANTED* kylix, and we all collectively where sporting boners when told it 'did' GPL.

      What we instead got was a buggy product that appeared to have alot of winelib in it (what the heck was that font thing?), and more to the point, it treated the GPL as if it was shareware. If one got the 'open source' version, which wasn't actually open source, we could make 'gpl' programs only, but by GPL, it meant "Well your program is GPL, but we are going to force a splash screen on your program that says its gpl and suggest updating to the full version." That was insulting as hell, and completely wrote it all off as an option for us.

      Borlands problem is the attentiveness it paid the low-end and hobbyist market in the turbo days was completely blown out the window by the time it moved to Kylix. Hobbyists, students and small business MUST be paid attention to, or how the hells a kid supposed to learn your platform. Linux still has a large hobbyist contingent motoring it along, and in fact proved that hobbyist gift culture could power industry and commerce too.

      What was really hard, was Delphi coders understood open source well. We loved sites like torry.ru that had huge collections of awesome open source librarys we could mash into our stuff to make our work days easier. In return we often packaged up our own little inventions and put them out there for other coders to use. Thats why we where so excited about kylix. What a let down.

      Now of course we are being enticed back in with the 'turbo explorers' ('Hey kids! Its free!').

      Except one cant install open source libraries by design. Way to piss on the Fanbase Borland!. Its a shame too. I was looking forward to returning to Delphi after all those years. Us hobbyists are still out in the cold.

      I just hope people put some support into finally getting Lazarus and Free Pascal 'finished'. Its 95% there, and when that happens, we can finally tell the boss to cancel that Borland subscription, because coders *hate* being taken for granted.

      --
      Excuse the Unicode crap in my posts. That's an apostrophe, and slashdot is busted.
    13. Re:Mixed Reaction.... by fm6 · · Score: 2, Insightful

      A better VB for linux.
      This was a marketing ploy that always bothered me. I was the only one at Borland who actually had serious VB experience, and the notion that skills in that environment were transferable to Object Pascal was absurd.

      I couldn't get simple projects I tried out myself to run without it crashing on a regular basis. I would have stuck with it, but Borland gave up even faster than I did.
      Your experience was different from mine. I'm very curious what was different about your system, but I don't suppose there's any way of figuring it out.

      I don't think Borland gave up all the quickly. We went through three full development cycles, and even did a C++ version. The product didn't so much end early as start late. The 1.0 release was many months behind schedule, mainly because Borland's developers just didn't believe in schedules.
  2. I still like Pascal by Colin+Smith · · Score: 3, Funny

    TurboPascal was great. Or is it Delphi now?

    I still need a blue screen to write code quickly.

    --
    Deleted
    1. Re:I still like Pascal by suv4x4 · · Score: 4, Interesting

      TurboPascal was great. Or is it Delphi now?

      I still need a blue screen to write code quickly.


      FreePascal is probably the best representation of what Pascal used to be. Unfortunately after years and years of incompetent management, Delphi remains just an empty shell of its former self. The project was tossed around too many times now, shrunk down, and there are no guarantees for how long it'll exist or be sold to unknown 3rd party.

      Many companies with active Delphi code projects are porting to FreePascal (other reasons aside from the sad state of Delphi include compatibility with Mac and other platforms).

    2. Re:I still like Pascal by tepples · · Score: 5, Funny

      I still need a blue screen to write code quickly. You're in luck. Free Pascal works on Windows.
  3. Good Stuff by SirJorgelOfBorgel · · Score: 2, Insightful

    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!

  4. Hmph. by Anonymous Coward · · Score: 2, Funny

    Don't feed the trolls, it only encourages them.

  5. Re:Pascal is so '80s by Secret+Rabbit · · Score: 2, Insightful

    Just because you don't use it, doesn't mean it isn't used. For instance, I knew someone that used Pascal in industry as an Engineer. Can't remember exactly what kind of Engineer though (it's been about 6 years). But, even if it wasn't used in industry at all, these developments would still be *very* useful as it is quite useful as a learning language.

    Basically, please remember that there are lands beyond your horizon. Just because you can't see them doesn't mean that they don't exist nor does it mean that they aren't important.

  6. For some definition of the word 'free' by everphilski · · Score: 4, Informative

    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 :)

    1. Re:For some definition of the word 'free' by andreyw · · Score: 3, Insightful

      Why was parent modded troll? The article says "only free software compiler" which could mean either a compiler that is free software (as in FOSS), or a software compiler that is free. Certainly, Microsoft distributes a C++ compiler that targets both AMD64 and IA-64 and is compiler that is free, although not FOSS.

      It's this childish "Waah, its MS and not FOSS" attitude that make all of /. readers look like pimply basement dwelling dorks.

      Ugh...

  7. Re:What advantages does this have over Ada? by Just+Some+Guy · · Score: 3, Funny

    Does Free Pascal offer any advantages over Ada?

    It's not Ada. Isn't that enough?

    --
    Dewey, what part of this looks like authorities should be involved?
  8. I freed myself of Pascal... by AetherBurner · · Score: 2, Funny

    when I got out of college. I have been clean and sober from Pascal since then and I plan to stay on the wagon.

  9. 80's college nostalgia by theolein · · Score: 4, Insightful

    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.

    1. Re:80's college nostalgia by Tom9729 · · Score: 2, Informative

      http://taoyue.com/tutorials/pascal/contents.html

      I've been reading through that and it seems pretty decent.

      Googling "pascal tutorials" or something similar turns up quite a few results as well.

    2. Re:80's college nostalgia by FlyingGuy · · Score: 5, Informative

      Pascal is arguably one of the easiest languages to learn there ever was. It's very verboseness leads to readable code, but don't confuse that with weakness. Modern Pascal implementations like Delphi and Free Pascal are powerful languages.

      The basics of pascal are simple:

      // A simple function
      Function FooFunc(X : integer) : integer ;
      begin
      result := X + 1 ;
      end;

      // A simple Procedure
      Procedure FooProc(var X : integer );
      begin
      X := X + 1 ;
      end;

      Note the difference in the way the function and the procedure are declared above. Pascal passes parameters either by reference or by value. Using the var directive in the procedure declaration of x as integer I told the compiler to pass the value in by reference and therefor that value can be changed by the procedure. Note that when declaring the parameter this way I can ONLY pass a variable to it of the same type, or typecast a variable of a similar type. If I do NOT use the var invocation in declaring the parameter I can pass either a variable or a literal as below:

      // pass in a literal
      Y := FooFunc(1) ;

      // pass in a variable
      Y := FooFunc(i) ;

      // Y will contain the value of the operation of the function.

      FooProc(i) ;

      // The variable i is now modified by the procedure.

      FooProc(1);

      // Illegal syntax, a variable MUST be passed to the procedure.

      This should give you a basic start, the rest is really easy. Pascal does pointers, Structures, file I/O with either typed or untyped files, Inline Coding, Inline Assembler, pretty much everything you would expect from a robust language.
      --
      Hey KID! Yeah you, get the fuck off my lawn!
  10. Not the first free compiler to support win64 by Anonymous Coward · · Score: 3, Informative

    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.

  11. 64-bit Windows by zdude255 · · Score: 5, Insightful

    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!

  12. Re:um? size? by hangareighteen · · Score: 3, Informative
    Your examply only shows that you don't exactly know how to use the fpc compiler. It's okay.. it's got a lot of options, and it dosen't exactly work like C. For example, the pascal compiler generates, by default, static executables. And C, dynamic.

    Yes, simply looking at obj size will make this look bad. Actually looking at the object itself makes it pretty clear what's really happening. Remember, 'file' is your friend.

  13. Pascal is alive and well in installers by melstav · · Score: 4, Informative

    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.

  14. Re:um? size? by arth1 · · Score: 4, Informative

    Both were run through "strip" to remove any possible debug/extra details. testp is from this pascal program

    begin
                writeln('hello world');
    end.

    That's bad pascal. You lack the program declaration with specification of IO, and you also have a null statement at the end (the semicolon that should not be there). Try:

    program helloworld(output);
    begin
            writeln('hello world')
    end.

    why would I want Pascal?

    You might want a stronger typed language than C, where there's no risk of signed/unsigned typecasting behind your back, or where you can limit the data type. There's no risk of your plane thinking it's flying upside down when you cross the dateline, for example. Or of spinning clockwise 182 times to make a 65535 degree turn, when you really wanted a 1 degree left turn.
    Then there's legibility. Pascal /is/ very legible, compared to most other languages. If more than one person or team has to work on code, it's far easier than even well-written C or java.

    I personally miss UCSD-pascal and p-code. It did what java was meant to do -- run as a pseudo-machine with pre-compiled bytecode in a machine independent fashion. Too many youngsters today think that Sun created that concept with java, when in reality it was a ripoff of USCD-pascal's p-code for a C++-like language.

    Regards,
    --
    *Art
  15. What's pascal like now? by bcrowell · · Score: 2, Interesting
    I did a fair amount of pascal programming in the 80's, and it seemed all right I guess, but IIRC there were some problems with the language:
    1. The standardized language was very small, so there was a tendency for it to fracture into many incompatible languages.
    2. 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.
    3. I don't think there was any (standard) way to defeat the strong typing in cases where you needed to.
    4. 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...
    5. 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.
    1. Re:What's pascal like now? by jma05 · · Score: 2, Informative

      > 1. The standardized language was very small, so there was a tendency for it to fracture into many incompatible languages.

      Small is relative. Pascal language is now Object Pascal. It is not a small language.

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

      Delphi and FreePascal have PChar as well as AnsiString.

      > 3. I don't think there was any (standard) way to defeat the strong typing in cases where you needed to.

      Delphi and I believe FreePascal support the Variant data type (ala VB). So you do get weak typing when you need it. This is used for runtime COM and for cleanly interfacing with dynamic languages. Python for Delphi uses this with much success.

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

      There are Pascals that target VMs (Java/.NET). In fact Delphi for .NET is just that.

      > 5. I was always annoyed by the gotchas in the syntax -- the language seemed unnecessarily picky about periods and semicolons.

      I would not call it a gotcha but needs a bit of getting used to for someone from a C/C++ background. That remains.

      > Has any of this changed? Has modern pascal settled on a single standardized version of the language?

      Borland's implementation is still considered the standard.

      > Is gc easy, idiomatic, and consistently supported in libraries and language constructs?

      Delphi for .NET is just as well integrated as C# and VB.NET are.

      > Is there good unicode support?

      I recall Delphi doing that quite well. Don't have much experience on that.

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

      Modern Pascal compares favorably with C++.

      It's not about the language per se. FreePascal and Delphi offer great tools and libraries for certain types of tasks. OCaml is great as a language but is still considered an academic language. It does not have great tools or a comprehensive community compared to Delphi. For building native high performance GUIs with good OS integration and plenty of functionality, Delphi remains to be the most productive way to go with thousands of drag and drop widgets - both free open source as well as commercial. Currently Delphi for Win32 is the only real option to build native GUIs for Windows since MS has steered its RAD tool development towards .NET. Lazarus has still ways to go but is usable now.

  16. Dennis Ritchie on Pascal by Joce640k · · Score: 2, Informative

    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...
    1. Re:Dennis Ritchie on Pascal by k8to · · Score: 2, Insightful

      Many of his points are about primordial pascal, which no one has really used during the entire time of its popularity (the 80s, mostly) and of course thereafter. However, the 'improved' pascals do not have a formal specification, which is a sad thing. Most people shoot for "tastes like borland", which I guess is at least fairly static now that they've given up on it.

      Some of the typing weirdness remains, although it is better hidden. Some of the cosmetic issues remain.

      Really the big problem with Free Pascal generation pascal is it is only better than C in some fairly academic ways, and a lot worse than C in some quite practical ways. There are far better minority language choices to be made for most tasks. Free Pascal is more of a "because it's fun" language that people choose because people used Borland pascal for those purposes historically, not really for any virtues of the language itself.

      --
      -josh
  17. Explanation of VistA by tepples · · Score: 2, Informative

    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.

  18. A Valuable Resource by MacDaffy · · Score: 4, Informative

    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.

  19. Classic Pascal != Borland Pascal by DragonHawk · · Score: 2, Interesting

    Actually, it's fairly well known to suck as a learning language. Or at least some people think so.

    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.
  20. Re:Pascal is so '80s by TheRaven64 · · Score: 2, Informative

    Strings were also what made me hate Pascal. Delphi included support for two kinds of string, C strings and Pascal strings. C strings were NULL-terminated, Pascal strings had one byte at the start indicating their length. In principle, this isn't a problem, but a lot of API functions took C strings, but the documentation said they took Pascal strings. They would then iterate over the length of the string, and keep going well beyond the end because they never found a terminating NULL byte. The program would then crash. If you were running in the debugger, it would point to the end of the procedure that contained the error, not the line with the error, making it very hard to track down problems.

    --
    I am TheRaven on Soylent News