GNU Pascal Compiler Released For Mac OS X
MacDaffy writes "Kudos to Adriaan Van Os: He has produced a 'second prerelease' of the GNU Pascal compiler for Mac OS X. Work actively proceeds on porting the Carbon Pascal Interfaces for use with it (longtime Macintosh Pascal guru Peter N Lewis has already gotten a great start on this). Thanks to Adriaan, Peter, and Bill Catambay of Pascal Central for helping take Pascal on Macintosh into the future."
{ firstpost.pas }
var
s : String;
begin
Write('First post');
ReadLn(s);
WriteLn('You typed: ',s);
WriteLn('Hit <Enter> to exit');
ReadLn;
end.
I guess I'm not the only one, and there probably is a fair amount of old pascal code that is waiting to be ported to OS X. If the carbon bindings are ported, recompiling should be reasonably easy.
Pascal was the first language I ever used. I have to admit that for me, Pascal's syntax was very conducive to learning the basics of programming. Having said that, after less than a year of Pascal programming I finally braved a peak at C, and I never looked at pascal again.
I think pascal is a great language for teaching people how to program, and I also think it is perfect for Borland's Delphi product (a nice, easy to learn RAD environment to compete with Microsoft's Very Basic). However, I personally would never use Pascal on a project. If I wanted to use something like Delphi, I would use C++Builder. Of course, since this is a Mac discussion, most of this is irrelevant.
Anyway, I am not familiar with Objective C, but if I were going to program for a Mac, and OC and Pascal were the only two choices, in spite of already knowing Pascal, I think I would rather learn Objective C.
I can remember picking up maintenance on certain Mac apps and being horrified to find them written in a mixture of Pascal, C and 68K Assembler. All compiling under MPW and linking to a fat binary (yeah, with the 68K code).
Anyways - when I read the link, my initial reaction was 'Yeek! Pascal on the Mac again!'
Alison
"It is a miracle that curiosity survives formal education." - Albert Einstein
Archeo-computologists every where will rejoice at this. I'm still holding my breath for the long awaited GNU ENIAC emulator so I can get all my old eniac programms running again. Now if I can just remember where I stored the wiring punch boards...
Some drink at the fountain of knowledge. Others just gargle.
What is so wrong with Pascal, that it is not taken seriously as a language? I'm not a really a programmer, but I have written some small utilities in Delphi. It seems to work well for such things. I'm just curious as to why it is considered so bad.
I have FORTRAN, I have Pascal, now hurry up and finish my COBOL compiler!
...
Seriously, I started out programming for the Classic Mac OS in Pascal ages ago, but haven't touched it recently; with all the C, Java, etc. tools now available for OS X Pascal has been, quite correctly, left by the wayside. It feels kind of archaic to me now, and I gather I'm not alone
-- shayborg
Now that's funny.
Best Slashdot comment ever
Of course, that analogy only applies if you're a United States Nationalist.
Anyone NOT cut their teeth on a Tandy or IBM XT/AT, Turbo Pascal?
What was so great about TurboPascal?
The IDE. Pretty much the first hobbyist compiler package with an IDE. No more "exit editor, compile, get error, edit, compile, run" etc etc
Remember using it for demos? Compiled way faster and smaller than the C compilers did at the time.
Remember Turtle Graphics?
BGI?
Turbo Vision?
Remember using it for BBS doors? FOSSIL drivers?
Back in the early/mid-80's, when TurboPascal first came out, for $49, it rocked the world and made Borland in to a HUGE success.
I'm happy that for us pascal junkies, that pascal is finally becoming available for OS X. What would really be impressive, however, would be if Borland got it's act together and released the Delphi Kylix toolkit
Kylix is already a great cross-platform tool for Windows and Linux Object Oriented Pascal development. Making it available for Macs would make it definitely more competitive with the QT toolkit which is cross platform for Windows, Linux and OS X!
So to make a long rant short, I'm not jumping for joy just yet.
Length-prefixed strings (PStrings) are actually often useful. I know lots of projects developed entirely in C which use PStrings. Some people prefer structures with a length and a char pointer or char array. However for some things a PString does the job quite elegantly. Which is why you still see them so often in APIs. It typically has nothing to do with Pascal origins. (Although in Apple's case it does)
My only comment is that I'm an object oriented man. I think *very* much in terms of Objects, and find that I'm not as comfortable in non object oriented languages. As such, I find myself happier in languages like Ruby, Objective-C, and Java, than in C.
:)
Of course, this is all just my opinion. I respect your opinion, and would go so far as to agree that when I'm not working in an OO language, I prefer to work in either Perl or C.
I guess I just felt obligated to support the OO languages.
-Jeff
And, as I recall, it was the number one seller, numbers-wise, for a while.
Not that it didn't also require a lot of graphic work, but it is just one example of "silly basic stuff" that, as the saying could go, is more impressive than what it was made with.
For the record, Apple had a visually oriented Basic that Microsoft forced them to kill, as it would compete with their Basic (which wasn't visually oriented.) Hypercard was created to replace it, and from what I understand there are still many users who haven't gone to OS X simply because of Hypercard.
R: That voice. Where have I heard that voice before? B: In about 365 other episodes. But I don't know who it is either.
Now i can use all my first year computer science programs from 1992! It's been a long time since my computer said, "hello world!"
...and some of us hate C because it is the embodiment of excessive syntax, confusing idioms, and a notorious inease of use. Not all languages are easier to program at the expense of power. I can't say that I'm a huge fan of Pascal (not touched it in years), but C is pretty far down on the list of languages if I had to use only one for the rest of my life.
C has its place, to be sure. So does Pascal. Neither have much of a place in my toolbox for what I do.
Apple may have lost you as a programmer, and you seem to think that is a huge loss on Apple's part. What killer app did you bring to another platform that they missed out on?
Pascal is junk. Free software forever.
RTFA. The port is of GNU Pascal. Which is free software. It's sad to see so many oSs h4k3rz associate C so closeley with Free software that there is no room for any other languages.
What does C do that Pascal doesn't?
Working toward a usable PDA environment in the spirit of Newton OS: Dynapad
C-man could likely tell you that you can emulate OO in C quite easily. Nowhere near as natural as a language which inherently supports it (and makes your life easier when you want to use it), but C can do OO.
(IMHO, OO in perl is really quite cool.)
Working toward a usable PDA environment in the spirit of Newton OS: Dynapad
Since you mentioned "excessive syntax", I figure I'll just quickly ask...
What are your thoughts on Eiffel?
I couldn't afford to buy a complete set of Inside Macintosh.
FWIW, it's all online now.
One man's -1 Flamebait is another man's +5 Funny.
Eiffel isn't my bag either. I've not used it for any real projects, so I don't think I could make any real judgments and certainly no deep thought on the subject. First impressions are that it's a bit wordy.
Are you an Eiffel user?
Working toward a usable PDA environment in the spirit of Newton OS: Dynapad
Porting some of these to C is not exactly trivial.
http://www.sulaco.co.za/opengl.htm
And they could make really great screensavers...
OO in Perl is so hacked. I love Perl (indeed, it is my second favorite programming language), but, as I said, the OO is a hack. So now I use Ruby. I like Ruby. :)
-Jeff
Thanks, Macdaffy, for bringing us some GNU news about Pascal. Pascal proves that something doesn't have to be complicated to be good.
Harpo Tunnel Syndrome--my wrist feels funny.
I haven't yet found anybody who'll pay me to use it, but I do to keep my design skills reasonably close to my coding skills. I've found the statement that "it's only as verbose as it need to be to describe the concepts going on" quite accurate.
It also does a great job of handling multiple inheritance and operator overloading, with keywords to explicitly distinguish infix, prefix, and postfix operators. Constrained genercicity can be a nice tool too.
Screw Cocoa...those apps drive me up the wall!
I'll stick with Carbon apps until Apple fixes the text views and file i/o
>80 column hard wrapped e-mail is not a sign of intelligent
>life
The Turbo Pascal I learned Pascal on ran on CP/M on a Z-80 card that plugged into an Apple ][ with an expansion slot.
Today you'd call that a cool hack - back then it was how things were done.
My God, it's Full of Source!
OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
What does C do that Pascal doesn't?
Write me an OS kernel in Pascal, and then we'll talk.
There are no trails. There are no trees out here.
Oh no I used the wrong vowel. BTW what are you shitting?
-73, de n1ywb
www.n1ywb.com
I admit Pascal is somewhat of a dinosaur in the syntax department, but then I started out on FORTRAN and Cobol. I think that Visual Basic and Modula have the right idea with if-then-endif style syntax instead of the clunky if-then-begin-end-else-begin-end only begin-end not needed if it is a single statement which you better not follow with a semicolon if it is in the then clause, but you had better be darned careful not to nest if's without guard begin-end's unless you really know what your doing. Yes, Pascal has clunky syntax, and no one seems to agree on where to stuff those begin-end's (I prefer Kernigan and Plauger's style of treating them like C braces and sticking then off to the sides of then and els), but then people still use VI, now don't they.
But Modula-Oberon-Component Pascal haven't really caught fire, and the switch to case-sensitive and making IF THEN BEGIN END all in caps makes programs really ugly, and Component Pascal is so far off in left field that I can't make sense of it -- I think it is the Objective C of the Pascal family (I program in C++ and Objective C object notation looks like hierloglyphics).
The Pascal-zealot idea that C and C++ are too dangerous and then you need a restricted, sandboxed language has gotten traction in the form of Java and C#. Not everyone agrees with this idea, but there are enough Java programmers to confirm that the Pascal zealots had a point. On the other hand, C syntax has won, although if you look at the wordiness of C# console I/O, you will see that some Pascal got snuck in through the back door. There is a lot of C# that is Delphi-in-reality; think of C# as pretty much Delphi with C syntax.
Why am I still using Delphi? 1) The Pascal language was designed in a restrictive way, not just for the student in CS but for the compiler writer. It parses in one pass, and Delphi is the darned fasted thing on the planet -- it compiles 50,000 lines in a blink of an eye. I type fast, so the fast edit-compile-execute cycle is more important than avoiding the typing of a few begin-end's. 2) I can publish my source codes without fear of revealing any trade secrets because the sort of people replying to your post with nasty things to say about Pascal won't strain their eyes to look at them.