30th Anniversary of Pascal 587
GrokSoup writes "UC San Diego is holding a public symposium on Friday, October 22nd, honoring the 30th anniversary of the Pascal programming language. Oh the memories of undergraduate bubble-sorts ..."
"Ninety percent of baseball is half mental." -- Yogi Berra
Loved it!!!! (Score:5, Interesting)
Those memories may be distorted (Score:3, Interesting)
Sometimes you need a hack, and Pascal's purpose in life it to prevent those convient little hacks.
ah pascal (Score:3, Interesting)
Delphi (ObjectPascal) rules. (Score:5, Interesting)
WP.(Franciscan)
(P.S. I never ever shipped any app with the BDE in it. That, and the Database Desktop, are the crappiest things ever to come out of Borland. They are still in the latest native Win32 version of Delphi, Delphi 7, but at least you don't ever have to use them.)
So cool... (Score:5, Interesting)
Way, way ahead of its time. It was an IDE and the code it generated was bytecode, not native code. I love hearing all the Java weenies talk like the Java VM is somehow a "new" concept when P-code was availble for a real language in the early eighties.
I wrote a "conquer the galaxy" game in UCSD Pascal when I was 19. Such fun, dealing with overlays to fit it in the 64k of my Apple ][+. I never sold it, alas, so dreams of become a rich game programmer never panned out.
It's funny...it also had the last IDE I actually liked.
Unfortunately for UCSD, they priced it too high, and Phillipe Kahn came in and stole the PC Pascal market. Of course, the grad students who actually designed and wrote the system never saw a penny.
I wrote my Go playing program in UCSD Pascal (Score:3, Interesting)
The Apple II also had a fairly good interpreted Lisp (Pegasis Lisp) that I used a lot way back then. The Lisa editor/macro asembler was also great (as long as I am getting nostalgic, what about Bill Budge's great 3D library for the Apple II).
Pascal was great... (Score:2, Interesting)
Memories Indeed! (Score:3, Interesting)
My never-ending project to simulate a D&D world led me to explore the mysteries of virtual method tables, linked lists, B-trees, and that other structure -- a mesh of nodes without a head -- what was it called?
My favorite TP achievement was a homegrown BBS that I ran for 2 years on my 1200-baud modem. I had no hard drive, just two 360K floppy drives. So the system and programs were on one and the msg files were on the other. There were 10 message boards. I gave some users sysop privs on individual boards. Three of them ran RPGs -- AD&D, Traveller and Robotech -- one woman ran hers as an adults-only hot tub/bar. Eventually I wrote an adventure game parser as a unit that would plug into the BBS. I only created one game for it, but many people played it through to the end and commented on it. Good memories of the pre-web era.
I thought I knew C... (Score:3, Interesting)
Re:Delphi (ObjectPascal) rules. (Score:3, Interesting)
Re:What do they teach in undergrad now? (Score:3, Interesting)
Re:I thought I knew C... (Score:3, Interesting)
One more recollection (Score:3, Interesting)
Well Pascal was at that time really important.
Re:Delphi (ObjectPascal) rules. (Score:5, Interesting)
FYI there are attempts to make an open source version of it using freepascal. I have never tried them but I'd be interested in the experiences of anybody who has.
Re:What do they teach in undergrad now? (Score:5, Interesting)
Pity they're going with Java for beginners nowadays...
Pascal... (Score:5, Interesting)
Yet, commercial implementations of Pascal were in pretty common use, had all the low-level facilities of C, and yet gave programmers a decent amount of type safety and runtime error checking. In fact, a lot of the early Macintosh software was written in ObjectPascal, and TurboPascal was very popular and very useful on the PC. Even the Apple II ran a pretty good Pascal development environment (in 64k of memory), with a decent screen oriented editor, menu bars, and an integrated compile/edit/run/debug system. Pascal syntax also was quite a bit less error prone than C/C++'s. Having pointer dereferencing be a postfix operator alone is just so much more sensible.
Perhaps much more interesting than Pascal, historically, are Algol-60, Simula-67, and Algol-68, which are related to it; Pascal was probably never intended to compete with them, but rather serve as an educational introduction to them and their successors. Around the same time, many fundamental ideas in programming languages were developed and implemented, including APL, Lisp 1.5, Snobol, PL/I, Smalltalk, and Prolog. Window systems, GUI toolkits, constraint-based programming, MVC, and other concepts we take for granted today followed shortly thereafter.
Um, how about Pascal? (Score:3, Interesting)
Re:Delphi (ObjectPascal) rules. (Score:3, Interesting)
I also agree BDE SUCKS, I have long used Allround Automations Direct Oracle Access [allroundautomations.com] for database access. That rocks, fully integrating the OCI drivers easily into your application and it there is a Kylix and Delphi version as well as I am sure a
Re:Why didn't it succeed? (Score:4, Interesting)
1) It's much easier to write a C compiler than a Pascal compiler, therefore the (early) availability of the C language on new platforms became a near certainty.
2) It didn't take project and product managers long to realize that in the era of Moore's Law, platform flexibility had great value. A project stuck on an obsolete platform due to the unavailability of its language on a revolutionary new platform was doomed, perhaps prematurely.
So its portability and ubiquity were C's most significant advantages over Pascal, back when there was a realistic contest.
3) For a time, executables written in C were likely to be considerably faster than those written in Pascal. This was a byproduct of the re-use of the C compiler code itself, versus fresh (read: immature) attempts at Pascal compilers. The C compiler cores got better with each processor port, but the freshly-written Pascal compilers often were not very good.
Today on the x86 platform with Borland's highly-refined 8th-generation compiler core, executables built from well-written Pascal are as fast as those built from coherently-written C, in my experience. It may be possible to write incredibly concise C that'll be a hair faster than the same thing written in Pascal, but arguing that difference is a fool's errand in the days of 4GHz rocket-ship machines executing septillions of NOPs waiting for something to do.
Personally, I choose Delphi these days over C, because I write and support huge projects. It is incredibly easy to pick up Pascal source and quickly figure out exactly what it does. That's the first (and most crucial) step in any software maintenance, and I find that Pascal's support cost savings more than over-balance any possible advantages I've ever realized from using C. When I'm writing something that needs to be extremely fast, I drop into inline assembly, but everything else I code in Delphi these days.
Re:So cool... (Score:3, Interesting)
At least one guy did. Wizardry was done in UCSD Pascal. Even in 1980, it surprised the hell out of me to see a commercial game done like that.
Re:More serious apps... (Score:3, Interesting)
Re:What do they teach in undergrad now? (Score:4, Interesting)
> languages like Java or (before that) C++ rather than a language specifically
> designed to be clear to new programmers.
Pascal was created to teach "correct" structured programming.
When the prevalent paradigm shifted to OOP, it became outdated.
OMG! you too! (Score:5, Interesting)
But didnt Pascal lead people to think of P-code which foreshadowed Java bytecode? a link off the article's link [threedee.com] seems to agree with my memory...so i better not read it too carefully;)
and I certainly didn't use pascal just for academics. When I execavated the basement hole for my house, on an ostensibly unbuildable scrap of bedrock-studded land, a pascal contour mapping program that I wrote detected the one spot where the bedrock would be flat and need no blasting...back hoe guy was amazed an amateur could show him right where to dig.
Re:More serious apps... (Score:5, Interesting)
Though the world would have been a better place had it been so limited. My pet peeve was the weirdly brain dead default string implementation. Strings weren't null terminated, instead the length of the string was stored. That's a good idea. A bad idea is using the first byte of the string to hold the length. 8 bits to store the string length means a maximum string length of 255 characters. I worked on a large project that had originally been written in Pascal. We used p2c to convert it and maintained it in C. An early task was removing the 255 character long string brain damage and replace it with intelligent strings (in our case C++'s generally good and absolutely superior to Pascal's std::string). Still, I got to read and occasionally maintain the Pascal master for a variety of reasons. The code dealing with strings was always irritating. Sometimes it just ignored the problem (creating potential buffer overruns), sometimes it just crudely limited the string length (meaning, for example, that you couldn't have a URL longer than 255 characters), and sometimes it used some weird chained string extension that I never quite understood. Mac programmers I know told me that the 255 limit was pervasive throughout MacOS as late as MacOS 9. Most unfortunate.
(To be fair, it did seem like a pretty good language, and I really dug the "with" idiom. A healthy revision (that may have happened, I don't stay up to date on Pascal) could have turned it into something more mainstream and successful. Hell, let's be honest, I just wanted to bitch about the stupid strings...)
I used Pascal( could you pass me the Geritol?) (Score:2, Interesting)
It is a riot to read through all these posts on Pascal.
When I was knee high to a grasshopper I used Pascal to...
I remember once using pascal in high school to...
Man, Pascal is such a great language! Why I remember the last time I used it, it was just like yesterday...25 years ago...
Cut me some slack! Yes, it is a good language, I even have used it from time to time. But the adjectives pleasurable, cool, awesome, etc., are not what I would use to describe the experience. Perhaps okay, humdrum, yawn and eh? are some words I could use.
I know that people still use it but Borland/Inprise (yeah, remember the Inprise fiasco?) seem to do a real good job killing it. In fact, I would go so far as to suggest that Borland is Delphi's worse enemy.
I won't go down the list of things I hate about the language or Delphi, but if I were looking for a language to use for my next project, and I read the posts here, I would NOT choose a language that seems to have only fond memories going for it (btw, try doing a search for books about Delphi on Amazon).
If Delphi is so good and [ any language pascal users hate ] is so bad then how come Delphi is doing so miserably in the market? Ok, Ok! Yes, if you go to Brazil or the Ukraine EVERYONE and their grandmother is using it. But for as sucky as C/C++ (according to Pascalites) is it sure gets a whole LOT more air time then Pascal/Delphi. We could blame it on MSonopolies and cooperations, but that doesn't seem to go vary far either when you look at the open source community. And if cooperate America drove the use of language (not saying they don't have some say it it) then Java would be a rip roaring hit. Is it? NOT! It has a following but even it bills itself as a language that is much like C++. Even C# has a very C-ish look and feel (with a very Pascal-ish smell).
I remember once during a Delphi campaign Borland (or were they Inprise then?) tried to convince VB programmers that moving to Delphi would be easy and painless. If that doesn't give you chills then you are dead.
Sometime, if we all get together, I will show you my b&w photos of me using Pascal.
Re:Let me be the first to say... (Score:3, Interesting)
FROM InOut IMPORT WriteString,WriteLn;
BEGIN
WriteString("Happy Birthday, Dad!");
WriteLn;
END HappyBirthday.
Re:What do they teach in undergrad now? (Score:3, Interesting)
The hardest part was trying to figure out when to use '.' versus '->', and the always-fun '*' versus '&'. I knew what I was trying to say, but trying to figure out how to express it in valid C++ syntax was an absolute killer at a time when I was still very new to the language. I wish our department head had discovered Python at that point.
On the other hand, it did significantly thin out the herd of would-be compsci students. I suppose that was a good thing, maybe.
Re: Long live Pascal! (Score:1, Interesting)
C was created for writing operating system(s), recte Unix; therefore, it has features required for that task: flexibility in terms of data type passing, CPU instructions, a.s.o. Now what happened was, all geeks determined they had to do their software development in C, even if they were not involved in system programming. For someone who doesn't do programming for a living, strong typing (see Pascal) is a very good thing, as it avoids common errors. Then, someone decided C was not good enough because OOP in C/C++ was not an easy endeavor (true) so they invented Java, only they removed some very good things in the process, such as pointers and (user-controlled) dynamic memory allocation. And for those sysadmins who are still in love with C but all too aware of its limitations there is always Perl, a mutant born from a happy C + unix shell scripting marriage.
Thus, I canot repeat it often enough, long live Pascal!
Re:30th anniversary... D&D and Pascal (Score:2, Interesting)
I finally got my own Apple II in 1981, and promptly tried to write a program called "Dial a Dungeon" - a multi user modem text based dungeon. Alas, too big a project for me, and thus never finished.
Re:So cool... (Score:3, Interesting)
Couldn't seem to handle getting rid of a ';' before an 'else' though (one of the more brain-dead features of the Pascal syntax IMO).
Re:Loved it!!!! (Score:5, Interesting)
For my final CS project in high school, we had to basically write an interpreter for a small set of assembly instructions. A rudimentary virtual machine, in other words. Well of course the normal approach was a simple text-prompt interface, but I used a shareware graphics library (Fastgraf?) and built a GUI right up from the bare pixel level, with multi-windowing, menu system, illustrated help, 'advanced' features like Start At and Trace, and even user selectable mouse cursors. Ah the memories..
Anyway, welcome to Slashdot! Don't feed the trolls.
Re:Niklaus Wirth (Score:4, Interesting)
The version of this story that Niklaus Wirth told me (via e-mail) is that it happened when he was presenting a paper in New York in 1965. He was introduced by Aad van Wijngaarden as follows:
Wirth considered an excellent pun, but he doesn't take credit for it.
The UCSD Pascal Machine (Score:2, Interesting)
At my first job (in 1980) we did some programming with UCSD Pascal, although the majority of our work was in assembly (Z80 and friends). We dabbled around with UCSD Pascal on our CP/M machines and on a customer's Apple ][ and the performance was quite acceptable.
Then we got this strange beast -- I think it was a modified DEC PDP-11/03. IIRC, the 11/03's CPU was actually 3 chips: a core and what was essentially two microcode PALs. The microcode chips were replaced with ones that executed p-code (rather than PDP machine code). There was no interpreter -- raw execution of the p-code in hardware. It was so blazingly fast that we couldn't believe it. It was probably a 16-bit architecture too, so that may have helped (or was the PDP-11 one of those oddball 18-bit machines, 6 octal digits to a word...)
We never had a case for it, it just sat on the workbench on antistatic foam, with wires leading out to the floppy drives and the terminal. We did all of our Pascal development on that box, then moved it to the Apple (the customer's machine) for the "beta testing." It was mostly UI, so the performance didn't really matter.
Eventually, we switched to using C, since Pascal wasn't too practical for the embedded systems we were designing: we were mortified to see a compiled "hello world" was 8K bytes in size! That was four ROMs in those days... C had a much smaller footprint, so we began using it.
But I still wonder whatever happened to that machine...
Re:What do they teach in undergrad now? (Score:1, Interesting)
Much as the go-kart is a toy which was never meant to drive on public highways, Pascal is a language which was never meant to write real programs.
Pascal, as defined by Wirth, was a mainframe batch programming language, so things like filenames and array sizes could not be defined at runtime. Your programming assignment would tell you how many elements your array would need to be, you would hard-code that in, and you would run your program. There is no way to write a function that accepts an array of any size, or a string of any size, let alone an arbitray array of arbitrary strings!
Sure, just as you can add things like body panels and turn signals to a go-kart, any reasonable implementation of Pascal will have modern file I/O, variable-length strings, etc. -- but then it's closer to Ada than it is Pascal.
As long as you have to extend Pascal to make it useful, why not extend BASIC to make it useful? Just get rid of line numbers and add proper lexical functions and variables -- MS did this quite successfully with VB.NET. Afterall, BASIC is much easier for beginners because it doesn't have unnecessary syntax like semicolons after certain lines, strings defined as character arrays, or other things that are confusing for newbies.
For a better list of what's wrong with Pascal, read "Why Pascal is Not My Favorite Language", written by Brian Kernighan after trying to write some basic programming tools, such as a sort algorithm, in Pascal.
A few of the funnier/sadder reasons:
* a function that sorts a 10-element array cannot sort an 11-element array
* there is no way to exit from a loop from within the body of the loop
* there is no way for a function to remember local variables (static in C)
* there are no bitwise operators
* there are no cast operators, so there is no way to interperet a char as an integer, convert an integer to real, etc.
aQazaQa
Programming is all about the computer (Score:1, Interesting)
Contrast this with Pascal or Java, which are designed to hide the "difficult" parts of the computer from view. With those languages, you learn a programming language, not computer programming. Part of the reason performance is so bad in high level languages, is not because of the language itself, but because of the unskilled programmers who choose those languages.
Only by using a language which exposes the internal workings will one ever have a true understanding of a computer. I know I would have had a lot easier time if my college classes had started with Assembly and C rather than Pascal and Visual Basic. It took me a tremendous amount of effort to "unlearn" the bad habits of those languages and gain an understanding of the "computer" part of computer programming.
Once you've gained a mastery of low-level code, then you are better equipped to deal with ultra-high level languages like Java and C#. You will know which operations consume the most amount of CPU, and how to avoid memory leaks in the garbage collectors (which happens when you aren't paying attention to stale references you left lying around). You will understand how common data structures like linked lists and hash maps work because you've written your own for practice, so you'll be able to choose the right one for the task at hand...
Or perhaps, like me, you will realise that after trying Java and C#, you are still happiest with unfashionable languages like C++.
Re:More serious apps... (Score:1, Interesting)
Re:More serious apps... (Score:3, Interesting)
Re:More serious apps... (Score:3, Interesting)
Now, I'm an interested bystander but not a programmer. Nonetheless, just from knowing the app well in everyday use, I can make sense of the Pascal source (even tho there's not a single comment anywhere) -- enough to have some idea what I'd like to tweak, and maybe even how to do it.
Now THAT is readability!
Re:More serious apps... (Score:3, Interesting)