FreePascal and Lazarus Foundation
lists.freepascal.org
lists.freepascal.org
As a few other people here mentioned, I'm creating a FreePascal edition of my ancient Turbo Pascal book, ripping out stuff that nobody needs anymore, like CGA graphics and TurboVision. (I believe that there's a Turbo Vision clone available for FreePascal, but I just can't force myself to learn it again and write about it, even though I was writing paying apps with it in 1993.) The book is free, and the current version (I tinker with it irregularly) can be found here:
http://www.copperwood.com/pub/FreePascalSquareOne--08-06-201...
I'm going to stop building the release date into the filename with the next release; just search for "FreePascal SquareOne.pdf".
I'm programming almost exclusively in Lazarus these days, a lot of it for the Raspberry Pi. At some point I'd like to write a couple of shortish books on specific Lazarus topics like databases, and once we get settled in Phoenix I'll give it a try.
BTW, my friend erbo told me about this thread, so I figured I'd stop in and say hi.
--73--
Jeff Duntemann K7JPD
Hi Jeff, can't wait to buy a copy of everything you write for FreePascal and Lazarus.
Getting my hands on an early edition (first or second, I'm not not quite sure) of Complete Turbo Pascal in my teens is a big party of why I ended up as a programmer.
I'm glad to see its still alive, and hopefully still inspiring new programmers.
Much of what exists in contemporary dev tools can trace some DNA back to Turbo Pascal and Delphi 1.0
Anders Hejlsberg is a footnote in the story of a few tools - but was as instrumental as DHH in changing perception of how software could be developed, how the tools look/feel and how objects are interacted with at design time
I see a lot of current work on the DOM, I see a lot of companies wanting portable desktop apps and looking at the DOM as the platform for that, then I look at what Anders did in early 90s and think there is so much that can be applied to current problems
http://www.modulaware.com/mdlt69.htm
Just found a Github page while looking for it where they might have put up the old source:
Recently look at some Go code and thought it looked like simplified pascal. LOL. Agree with the other posters that pascal wasnt ever 'cool' because when it was being used for cool-stuff like writing MacOS it wasnt widely publicised, and unfortunately it was used as a learning language (and lets face it not many of us remember school as being uber-cool!).
There are precious few languages that can be used for learning and for getting real work done - but if you look at those, they have been around for a long time: Fortran, COBOL, C, Pascal, Lisp.
On another note i look at the code, and platforms, and I think that Pascal has an opportunity to be used in IoT applications. Small footprint objects are well suited to constrained environments like my own projects (Arduino, Pi, CHiP, Xbee) where one also needs a compiler that helps to keep the world safe from my bad code (like strict types and pointer bounds!).
The folks working on FPK and with Lazarus have done a superb job. Great tools, amazing cross platform support, and delivering stuff that helps get things done.
Excitedly went to click on documentation to learn more and...there is no documentation! Instead, there is a sort of slush pile wiki that, at best, might be considered an unorganized outline for documentation, but that's all. In 2016, that wiki doesn't cut it.
To the Lazarus developers: Lazarus looks awesome. Technically, it appears very mature, but without solid, deep, well-organized documentation how do you expect anyone to learn how use it?
There's also context sensitive help. Put the text cursor over a type name, like 'TForm' in the default code that's there when you start Lazarus. Press F1 to see the documentation for that type.
What exactly do you mean by that? At a shallow level, it should be fairly obvious - it would be like any other event-driven GUI development environment - create and place widgets on a window, set their properties, write routines that respond to (keyboard and mouse) events, build and start the app, the event loop takes over, your routines get triggered by events and do stuff, etc. Are you looking for more depth, maybe on the internals? Asking out of interest in the question and answer myself.
But I'm not sure you need a lot of that depth to start using it. Just looking at some basic code examples, and using the online help as a nearby comment said, should give enough information on Free Pascal and Lazarus widgets, their inheritance hierarchy, their properties and events to which you can respond, etc. I know this because I have followed such an approach in other GUI environments, e.g. wxPython, after learning the basics of event-driven GUI programming, from my first such GUI env, and managed to get some work done.
What if I'm a first-time programmer or have only ever programmed in MIT Scratch? What if I'm a PHP programmer? Do the Lazarus components work like Swing? Do you register event handling the same way?
I want tons of examples for every component--examples that start simple and work up in terms of complexity with comprehensive explanation along the way and I want it all linked under "Documentation" off the front page.
Now that's a lot. I recognize that. But I don't care. There are whole books available for Swing, JavaFX, Windows Forms, and WPF, not to mention Web Design. That's the standard today. Book scale documentation...
I'll say it again: I'd like to use Lazarus. I spent the morning programming a desktop application that could have been done in Lazarus, but it wasn't because I'd rather build programs than decipher an undocumented system, and I suspect I'm not alone.
Got it now. From your initial comment in the thread (you used words like 'Threw a few gui components onto the blank form and hit compile.', I thought that you were a programmer with knowledge of at least the basic concepts and some practical experience of GUI development in at least some other GUI dev env. And my answer was based on that assumption. I now see that, whether you are an experienced programmer or not, you are looking for docs that start from the beginner level and are very comprehensive.
I have to say I sympathize with that viewpoint. It would be great if all software products were documented as well as that. However, going by real-life experience, I am not sure that many are.
>What if I'm a first-time programmer or have only ever programmed in MIT Scratch? What if I'm a PHP programmer? Do the Lazarus components work like Swing? Do you register event handling the same way?
Got it. But see my answer to your next point below.
>I want tons of examples for every component--examples that start simple and work up in terms of complexity with comprehensive explanation along the way and I want it all linked under "Documentation" off the front page. Now that's a lot. I recognize that. But I don't care. There are whole books available for Swing, JavaFX, Windows Forms, and WPF, not to mention Web Design. That's the standard today. Book scale documentation...
Yes, there are books - and there were, years ago too, for earlier products of those times. (In fact, see my other comment in this thread, in reply to teraflop's comment about door-stoppers - https://news.ycombinator.com/item?id=12045536 :) Again, though, going by my own experience, there are not many software products that have that level of documentation in the product or online help. (Microsoft MSDN and Borland earlier come to mind as some that did.) I am not saying this is a good thing. As you say, I've also found, that one often has to resort to books on the subject of that software (if they are available - since they are not available for some less popular subjects). I've learned many different software technologies that way - via in-depth books on the subject, that I bought, or borrowed from company libraries.
>I'll say it again: I'd like to use Lazarus. I spent the morning programming a desktop application that could have been done in Lazarus, but it wasn't because I'd rather build programs than decipher an undocumented system, and I suspect I'm not alone.
Out of interest, what technology did you program it in?
No, you're definitely not alone.
However, in the kind of doc scenario that you describe (e.g. for Lazarus), there are still ways, though somewhat less efficient, of getting the learning and work done. Like this: read what docs are available (thoroughly, over time), read the sample programs, run them (correlating the code with the docs available for the code in the sample), step through them in a debugger to see what happens to program state (i.e. variables) internally as the program runs, read a lot of posts on the mailing list for the software, ask relevant questions on the mailing list as needed, to help you learn, share your own learnings on the same list, google for other online info on the topic, such as blogs, free online tutorials, etc. etc. A lot of people, me included, have learned those techniques over time and use them to overcome somewhat the disadvantages of less than perfect documentation. I realize that you may know all this already, but thought of posting it for the benefit of some readers who might not. As a trainer, I often find that beginners are not aware of many of these learning techniques - which are pretty effective, over some time. The main thing many of them know is how to use Google and StackOverflow, and if they don't find the answer there (and quickly), some of them give up overly soon (and thereby not meet their goal).
HTH.
Edit: grammar and typos.
Interestingly, here's a new link on HackerNews for the new haskell website: https://haskell-lang.org/
Now that's what I'm talking about...
I guess that partly depends on how much work you plan to do with it, the expected benefits of that work, a few other factors, and also partly it is "each to their own".
Anyway, good luck, whatever tech you use ...
Will check out the new Haskell site, thanks.
I can think of a couple of minor improvements, but overall for Windows and Linux desktop and database development in Lazarus (which is all I do) I have not really seen anything that needs much in the way of fixing and the code it is producing is pretty efficient and has been in my clients production systems for over 12 months now.
Keep up the great work chaps :-)
http://wiki.lazarus.freepascal.org/Screenshots
Rare to see a Native UI targeting so many platforms.
Neither Java, nor Qt nor anything else come even close. And the apps are native!
As for the "I don't like Pascal because Pascal is ugly" crowd: it's only different, and it's almost by chance (i.e. reasons external to the language itself) that most of today's production languages have used C for their syntax template; if they've used Pascal, then the C syntax would be the "ugly" one.
Microsoft has basically poached developers working on Delphi to develop the first versions of C# and it showed both in the design of the language (properties, the type system) and the early IDE.
Except they build on GTK 2, Qt 4, and Carbon on OSX. I haven't used it, but the whole LCL architecture seems absurd to me as there's no way that a project like theirs can keep things up to date.
https://upload.wikimedia.org/wikipedia/commons/6/65/LCLArchi...
- GTK1 interface is obsolete (was mainstream), GTK2 is mainstream, GTK3 is on the write - QT4 is mainstream, QT5 is on the write - Carbon is mainstream, Cocoa is near completion
I believe legacy already shows how the project can keep things up to date. It's the power of full community driven project, there's no necessity for a single maintainer to update everything on his own. Contributors may come and go, but they're there to update things.
[0] https://www.embarcadero.com/app-development-tools-store/delp...
So programming tools come from some source that has an agenda. Oracle. Microsoft. Google. Even Mozilla.
It's just that $1.5k is hard to justify for a single language environment/compiler. VS2015 Pro is $499, while a yearly Pro/MSDN subscriptions is $1,199/year.
For some languages, lower prices won't significantly increases sales volume. And 1.5K is not a barrier if it's your bread and butter language. It's in the same ballpark as a developer machine.
Charging the developer, before they even have a chance to try the language out, when there are other free options available, means they'll never even give the language a chance.
Making Delphi or Common Lisp the next hotness is pretty much a lost cause, and has been for a long time. The people using those things tend to be heavily invested in them, and still making money. If you're not making enough money to spend US1.5K on your primary tool then you're not really making money.
Most of the people who balk at $1,500 will probably still pick the free option rather than pay $19.99.
Even though there are good free options (in the case of common lisp there are multiple good free options), there's still no gaining of traction.
So these companies charging money have defined their target market as people already using the language professionally, and they've found a price point that lets them stay in business and provide quality tooling (specialized IDEs, debuggers, GUI frameworks, et al). If they lowered their prices to $19.99, rather than attract loads of new mindshare they'd simply go out of business.
It's actually gotten so bad that my company is opting to migrate to C# for future development, in spite of our long investment in Delphi.
I did like Kylix. I messed about with it and I remember going to watch the UK demo of it by Charlie Calvert in the Polish Centre in London circa 2001/2002. I had a licensed version of 1.0 (and used the Betas as my company at the time was sub contracted by Borland UK, so we got perks like being NDA'd.) That they got the IDE to work was cool. But CLX really messed up the direction.
By the time they did the .Net version, the writing was on the wall.... that bug in the compiler that tied the compiler down in a way that made the 2.0 framework unhappy to run 1.1 binaries, that really told me all I wanted to know. I transitioned to .Net and C#.
- Both: No undo in the UI builder
- Delphi: There are about 3 different ways of adding an existing file to a project. They seem to differ in how they track dependencies.
- Both: Project files periodically get corrupted.
- Both: Renaming a control on a form by only changing case causes some references to the control not to be updated.
- Both: No customizable keybindings
- C++Builder (might be true with Delphi too): The debugger periodically crashes.
- C++Builder: Sometimes the project fails to build and gives a bunch of errors in system headers. The solution? Close the IDE and open it again.
Those are just the big ones. There are a million tiny annoyances that add up to be very frustrating.
lisp, prolog, smalltalk, forth, fortran, even ada.
The challenge for programming languages today is not so much the syntax/language constructs but the ecosystem, libraries, community & support.
See php, it has all that and is very successful.
p/s. I write PHP code and believe pascal is a better language.
I actually quite liked it. I thought Pascal provided the right level of hand-holding necessary for a newbie programmer. I was probably able to pick up C more quickly the next year because of the solid foundation from Pascal.
Writing "if" statements without short-circuit operators is both tedious and error-prone.
So, yeah, I like the C syntax. It's not a question of "ugly", though. Pascal is tedious. It's more work to write. And, of the kinds of tedious I've complained about here, it's not tedious in a way that gets you more correct code. It's just tedious in a way that takes effort and saps your energy for stuff that doesn't matter.
Syntax is definitely a personal preference. I know multiple PLs from different families, and even then, I still prefer a certain syntax.
Well, except that the cascade of ends is a frequent complaint about Ruby, rather than something "never cited".
By default both Delphi and Free Pascal perform short-circuit evaluation of boolean operators. The Delphi and Free Pascal documentation has more:
http://docwiki.embarcadero.com/RADStudio/Berlin/en/Boolean_s...
http://docwiki.embarcadero.com/RADStudio/Berlin/en/Expressio...
http://www.freepascal.org/docs-html/current/ref/refsu48.html...
grumble grumble kids get off my lawn...
Basic "original" Pascal is very much a teaching language first, and a "real" language second. But the small tweaks (or big, depending on your point of view) to Object Pascal/the default dialect for Free Pascal makes a world of difference IMNHO. So, I think someone can both agree that early Pascal (or plain Pascal) is uncomfortably verbose and rigid, while at the same time think that modern Free/Object Pascal is a great language to work with.
I wonder if there's anyone working on a Pascal back-end for Nim? In some ways is seems like a "waste" that the default target is C.
This probably is part of the reasons: People that optimize for write instead of reading.
However, after python I consider "begin/end" marks redundant with indentation...
But then some people hate clear code, and prefer mess with the layout!
It's really too bad about Modula-2. It was a very nice language, comparatively speaking, and it should have been what Pascal eventually became through its dialects (notably Apple's and Borland's).
Modula-2, though, has a nice trait in that it has exactly the feature set necessary for "better C", and nothing more.
After that recent Object Pascal guide was on HN [1] I've been meaning to try the language out. It looks like it might be a nice alternative to using Ruby on some small side projects where I need a quick OO language to work with.
I've grown attached to static types so it looks like it might be a good option. My only concern is whether the tooling has been modernized or not.
(Static types, basic OO, syntax, fast compilation)
I remember his name as a computer book author from older PC days and mags/books, but have forgotten what he used to write about. Did he write about C or Pascal, say Turbo Pascal, earlier too? Just saw his site (http://www.duntemann.com/) and it seems to show only assembly language books (on a quick look). Not that it matters, of course he could write books on Pascal now, but just wondering whethere he wrote any Pascal books before.
>It's a great language and a killer environment.
Agreed. Was a Turbo Pascal user for some years, great language and lightning fast dev env. Done smaller amounts of Delphi work too, and loved it. Too bad about the corp. issues that have happened, and about no current low-cost edition. They discontinued Turbo Delphi Explorer, or rather the Turbo Explorer series (existed in around 2006) which included Turbo C++ Explorer too, IIRC. And the TD Explorer at the time was available in two versions, for Win 32 and .NET.
It's a bit of a door-stopper, but it was one of the first programming books I ever read as a kid, and I have vague memories of it being a great introduction to software design in general.
In those days many of those topics were new - being the early-ish days of the PC revolution - and Internet (and hence online docs) was less prevalent, so those books served a real need, despite the size. I remember reading the Turbo Pascal manual cover to cover, the DOS Tech Ref manual and many others too. Calling the DOS equivalent of Unix system calls (i.e. interrupt 21H calls) and so on, from TP, TC and sometimes assembly - using just DEBUG.EXE's A (Assemble) command. Good fun and learning ...
Jeff's blog is at http://www.contrapositivediary.com/ , and he updates that more frequently than his main Web site. (Which is to say, pretty infrequently at the moment, though I expect that to change once his big move is over.)
http://www.copperwood.com/pub/FreePascalSquareOne--08-06-201...
Had a quick look at the book. He says:
"Yessir, the book you’re reading has been around the block a few times since I began writing it in November of 1983—which I boggle to think was over thirty years ago. It’s been through four print editions and on paper sold over 125,000 copies. It’s been translated into five languages."
I had said recently, here (in another HN thread):
https://news.ycombinator.com/item?id=11889412
that I heard from a McGraw-Hill editor, that Scott Meyers' book Effective C++ had sold in the region of 50,000 copies. And the editor, Simon Yates, said that was a fairly high number of sales for a computer book.
And now I read (above) that Duntemann's books sold 125,000 copies.
Phew.
I do remember reading that Turbo Pascal was hugely popular in those days, being the first under $100-dollar language compiler (it was $50, IIRC, others were probably closer to $500 at the time). My guess is that it was a combination of factors that led to such good sales of the book - Duntemann's own programming and writing expertise, for sure, but also the huge popularity of Turbo Pascal, and the fact that it was a boom time for desktop software apps and companies. Let's hope that his new books also become hits.
Edit: spelling.
Available on Kindle Unlimited: his novel The Cunning Blood [0], a newer novel, Ten Gentle Opportunities [1], and his collection Souls in Silicon: Tales of AI Confronting The Infinite. [2] More to come, too, stay tuned!
(Disclaimer: I've designated myself as Jeff's "#1 fanboy.")
[0] https://www.amazon.com/Cunning-Blood-Jeff-Duntemann-ebook/dp...
[1] https://www.amazon.com/Ten-Gentle-Opportunities-Jeff-Duntema...
[2] https://www.amazon.com/Souls-Silicon-Tales-Confronting-Infin...
Not to mention: "I mention all this history because I want people to understand where FreePascal from Square One came from, emphasizing that it’s been a work in progress for thirty years. Why stop now? I don’t have to cater to publishers, paper costs, print runs, or release schedules anymore. The book can evolve with the compiler, and every so often you can download the latest update. My publishing company Copperwood Press offers a print-on-demand paper edition if you’d like one, but you can print it yourself if you prefer. That’s how technical publishing ought to be, and someday will be."
Bravo! If this was how copyright worked - that someone could make a (presumably) decent living for a few years, and the give it all away - would not have as much issues with the intellectual property lobby and Micky Mouse extensions.
Either way, I think it is fantastic to see someone liberating a project of 30 years like this!
One clarification: I have not yet posted a POD edition of the book, though once it gets a little more toward finished I'm sure I will. You can always print it locally if you want hardcopy.
Turbo Pascal's low price compared to most other compilers made it an impulse buy. $50? Why not? And word-of-mouth did a lot of the rest.
Programs written in Turbo C ran faster than programs written in Turbo Pascal, that's why it lost in the MSDOS world.
As an example, WWIV was a very popular BBS in the 80s and early 90s that included source code, so it was popular with a large group of hobbyists. It was originally written in Turbo Pascal but when converted to Turbo C and ran noticeably faster. Other BBSes (Telegard) took WWIV code (allegedly) written in Pascal for their software and they ran slower than the Turbo C version of WWIV. We're talking about 286 4/10Mhz machines with a turbo button, so the difference was noticable. The idea that Turbo C was faster than Turbo Pascal is probably why Pascal lost the MSDOS wars.
Visual Basic was marketed better than Delphi, that's why it lost the Windows wars. Delphi was way ahead of it's time. The VCL (the Delphi library) was robust and modern for the TCP/IP stack. There were components for everything. They released a Linux version called Kylix started in the late 90s. Delphi had many features and compiled to machine code, so it was technically superior to VB. It was much faster to develop with than Visual C++ also. Borland got some executives that made some poor branding decisions, like renaming the company to Inprise (??) then naming it back. Once C# gained traction, Delphi slid into obscurity and was purchased by Embarcado. It mainly exists as a tax on companies who haven't migrated to a more common language.
I learned Turbo Pascal and Turbo C in middle school by tinkering with BBS code. I was taught CS in High School using Turbo Pascal and again in college. It was a great little language that runs very fast machine code, and served me well. It is very capable for production environments, but I prefer C syntax now a days though. If Pascal prompts a return from web to native, I'd embrace it. Web is significantly more tedious than the RAD tools for native applications it replaced for front end development.
Interesting aside, Object Pascal conventions state you should prefix class names with a T (for Type I think). So if are rummaging through an API and you see a lot of types that start with T, you know it was written in a Pascal.
I wonder if a rewrite of WWIV from Pascal to Pascal would've yielded similar speedups, or if it really just was the optimization passes that made all the difference. If so, one might think that a Pascal compiler that targeted C might have been an (almost) as good solution at the time.
I think 20 years ago, Delphi (Pascal) was far superior to Visual C++. It didn't run noticeably slower but had all the RAD tools for fast development time that VC++ lacked. Too bad Microsoft's juggernaut defeated it with VB.
WWIV could have been improved algorithmically between the Pascal and C++ versions, certainly. Also, the fact that the processors of the day were so slow, the difference today would hardly be noticeable unless you ran thousands of iterations and timed them in the code.
http://lists.freepascal.org/fpc-pascal/2016-June/048216.html
http://lists.freepascal.org/fpc-pascal/2016-June/048217.html
I don't see any explicit dates in that site's content. Oh, except that the projects have dates on them. Both current and past projects are tagged 2016. Busy beavers! Mid 2016, and already three 2016-dated items are "past projects".