Stories
Slash Boxes
Comments

News for nerds, stuff that matters

Slashdot Log In

Log In

Create Account  |  Retrieve Password

Free Pascal 2.2 Has Been Released

Posted by ScuttleMonkey on Mon Sep 10, 2007 05:08 PM
from the never-say-die dept.
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."
+ -
story

Related Stories

This discussion has been archived. No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More
Loading... please wait.
  • by chefmonkey (140671) on Monday September 10 2007, @05:10PM (#20545543)
    Half of me is saying "cool!"

    The other half is looking very confused and asking "why?"
    • by TheRaven64 (641858) on Monday September 10 2007, @05:19PM (#20545649) Homepage Journal

      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.
      • by Dunbal (464142) on Monday September 10 2007, @05:37PM (#20545861)
        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".
        • by maxume (22995) on Monday September 10 2007, @05:43PM (#20545927)
          You're mixed up on what alliteration is.
          • by Anonymous Coward on Monday September 10 2007, @06:12PM (#20546235)
            Who are you calling alliterate?

            You probly can't even read good either.
          • by Nazlfrag (1035012) on Monday September 10 2007, @11:22PM (#20548801) Journal
            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?'
      • by fm6 (162816) on Monday September 10 2007, @06:13PM (#20546243) Homepage Journal
        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.
          • by fm6 (162816) on Monday September 10 2007, @07:10PM (#20546721) Homepage Journal

            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.
                • by sg_oneill (159032) on Tuesday September 11 2007, @03:16AM (#20550071)
                  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.
                  • Re: (Score:3, 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 d

    • by arth1 (260657) on Monday September 10 2007, @05:49PM (#20545975) Homepage Journal

      Half of me is saying "cool!"

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

      I'm also feeling rather blaise about it...
  • 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.
    • 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 th
        • 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.

    • I once wrote a AN/UYK-20 assembly to pseudocode generator in Pascal. This was done on a TOPS-20 system, and I didn't have access to shells/scripting or C, so I wrote it in Pascal.

      Ugh.
    • I have written a commercial application in Delphi (Object Pascal) that's still being sold today.
      Yeah, original Pascal is 80s. Modern Pascal (read: Object Pascal) is not, although it is 90s - it has good support for OO, but Delphi only recently added support for generics/templates.
    • 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.

      • Re: (Score:3, 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 wo
  • by Colin Smith (2679) on Monday September 10 2007, @05:14PM (#20545605)
    TurboPascal was great. Or is it Delphi now?

    I still need a blue screen to write code quickly.

     
    • by suv4x4 (956391) on Monday September 10 2007, @05:30PM (#20545775)
      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).
    • I still need a blue screen to write code quickly.
      You're in luck. Free Pascal works on Windows.
  • 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!
    • FPC has been my sidekick ever since Delphi did it's magic trick of fading into obscurity and uselessness.

      If you're looking for a Delphi replacement, you might want to consider Chrome [remobjects.com], which is Object Pascal with a variety of nice extra features, including lambda expressions, generics, nullable types, and design by contract. The downsides are that it is a .NET langauge (though it works with Mono [remobjects.com] apparently), and that only the command line tools are free -- the whole suite is pricey (though comparable in cost to Delphi I guess). It is, at the least, worth looking into if you're a Pascal fan.

  • 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
    • 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 li
  • by everphilski (877346) on Monday September 10 2007, @05:31PM (#20545785) Journal
    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 :)

    • by andreyw (798182) on Monday September 10 2007, @06:51PM (#20546559) Homepage
      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...
  • Pascal. The eight wonder of the IT world.
  • Cue the "the server must be written in Pascal" jokes...

    Here's a MirrorDot [mirrordot.org] link for the FreePascal site.

  • when I got out of college. I have been clean and sober from Pascal since then and I plan to stay on the wagon.
  • by theolein (316044) on Monday September 10 2007, @05:56PM (#20546077) Journal
    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.
      • by FlyingGuy (989135) <flyingguy@@@gmail...com> on Monday September 10 2007, @06:50PM (#20546547)

        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.
  • 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? :-)
  • by Anonymous Coward on Monday September 10 2007, @06:02PM (#20546141)
    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.
  • 64-bit Windows (Score:5, Insightful)

    by zdude255 (1013257) on Monday September 10 2007, @06:13PM (#20546245)
    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!
  • by bcrowell (177657) on Monday September 10 2007, @06:58PM (#20546629) Homepage
    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.
    • Re: (Score:3, 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
  • by Joce640k (829181) on Monday September 10 2007, @07:41PM (#20547071) Homepage
    http://www.lysator.liu.se/c/bwk-on-pascal.html [lysator.liu.se]

    I sincerely hope the language has been fixed since that was written...
  • A Valuable Resource (Score:5, Informative)

    by MacDaffy (28231) on Tuesday September 11 2007, @12:04AM (#20549081)
    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 [pascal-central.com]. 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.
    • 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.
      • Available on a larger variety of platforms and OSes.
      • Great support for interfacing with external code.
      • The compiler is wickedly fast and is really good at producing compact executables.
      • FPC supports several different pascal dialects.
    • Does Free Pascal offer any advantages over Ada?

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

    • Re:um? size? (Score:4, Informative)

      by hangareighteen (31788) on Monday September 10 2007, @06:24PM (#20546341) Homepage
      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.

    • Re:um? size? (Score:5, Informative)

      by arth1 (260657) on Monday September 10 2007, @06:50PM (#20546545) Homepage Journal

      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