Author
Topic: Free Pascal - Lazarus? (Read 15654 times)

HiI am thinking to start GUI programming and I am thinking that maybe Free pascal + Lazarus might be a decent choice since both are free and open source.I normall use Python for my needs but gui stuff is tedius with Python. Since I am a hobbiest I do not want to invest greatdeal of time to do some decent looking GUIs. I am not comparing both languages at all , I just have different needs sometimes. I use TKinter here and there for small needs and seems to be ok for my little needs.

What are your suggstions, ideas about Pascal in general and about GI programming?

I used pascal for years professionally, and for all of my hobby programs, and I can say that I enjoyed the language. The caveat is, I used Delphi the whole time. I've done some Lazarus stuff, and it was painful. Better than Python on the gui stuff, but really painful. If you want to go the pascal route, I'd really recommend Turbo Delphi at http://www.turboexplorer.com/. It's free also, so if open source isn't a necessity, it's an alternative.

I've kicked around the idea of learning Pascal for a while, but everyone I've talked to about it seems to think it's going the way of the buffalo.Sure doesn't look that way...

For the sake of perspective: there's still people developing in Visual Basic.

The first programming language I picked up was Borland Turbo Pascal 6.0, and at the time it was great - super fast compiler, could even compile&link directly to RAM (which made test/modify development cycles a lot faster than going to disk - this was before the days of UDMA harddrives). The IDE and help integration of Borland's products were ahead of everyone else. I even got around to play with Delphi after moving to Windows.

But after I went with C++, I haven't really looked back. My original reason for switching was the lack of 32bit compilers, and a growing feeling that it was a language "with training wheels". Also, the code generation of the compilers kinda sucked (haven't looked at recent Pascal compilers, but I'd be surprised if they're up to par with the leading C++ compilers). I fail to see why anybody would pick up Pascal as a new language today, really - C++ or C# for practical stuff, Java as an introductory language.

It's just a lot slower than delphi, and the ide is a lot less polished. Sometimes, events that I have linked up inexplicably lose their connection, and the database bit is definitely difficult to get going.

Depending how extensive/sophisticated the GUI needs to be.. you may want to try AutoIt3. It comes with KODA, which is a drag & drop form tool. You can tell the guys who wrote it did Delphi as they emulate the form designer.

It doesn't have dozens of component, but it has enough that you can get your basic form with buttons, edit controls, etc.. then add to it in code.

You can compile to exe and even use ActiveX Controls with AutoIt3, but the weakness there is event handling. Because it's not true compiled code ActiveX events don't trigger as they will in C++ VB or even C#. But especially for a single form GUI it's not difficult. The language itself is similar to basic and very easy to pick up. It is Windows only though. Most things absent from the language can be accomplished using DllCall to use WinAPI calls directly.

As example, to find out if Glass is enabled on the user's system you can use this function:

@MilesAheadThanks for the suggestion. I already use tiny ahk stuff here and there, maybe I can move to Autoit. But for now I am mpre interested in investing my time time into cross platform stuff. I do not think I will ever make big stuff but would be nice to have the options

PythonSo far I have looked into Tkinter(is ok), Pygtk(Glade), Wxpython. Pygtk seems fine and Glade is updated regularly. On the otherhand the Wxwidgets and Wxpython seems nice, cross platform and well documented, but all the Gui designers for Wx are old and has not been updated or abandoned. I do not think that I am interested in investing my time on abandoned projects. Although one can definetely write Gui apps without a designer. In Python it is not so hard, it just gets tedious at least based on my experience with Tkinter.

C++I have looked into Codeblocks+Wx integration.It looks like very viable visual designer and cross platform developement. The thing is that C++ is whole another universe and I am not suire if starting Gui pogramming with C++ is a good idea or not. I am open to ideas in this regard really.

Pascal-LazarusPascal is an old friend to me that was my main reason for bringing it up.

Pascal-LazarusPascal is an old friend to me that was my main reason for bringing it up.

Don't get me wrong- Lazarus is impressive. It's just not as good as native Delphi, just like SharpDevelop is not as good as Visual Studio (of course these are my own opinions). If you want to go the pascal way, Lazarus is a good way to go.

I am not recommending Delphi to anyone any more until they bring back the free turbos. And I am not recommending Lazarus to anyone unless they are already a Delphi developer and they want to develop for Linux and Mac.

I have only tried Lazarus under Ubuntu and not Windows.

It felt like a crude imitation of Delphi, not even up to the level Delphi 6 was, almost 10 years ago.

I am not sure if it has the same issues in Windows, but my word of advice is if you decide to use it (at least in Ubuntu) don't go more than a few minutes without saving your work. It likes to spontaneously combust. One second it's on your screen, then next, poof it's gone, and so is whatever you were working on.

The only reason why I even tried it was because object pascal is the language I feel most comfortable with, and I wanted to develop some cross platform software.

If it were not for that, I probably wouldn't use it again for another 10 years, and hope by then it at least is as good as Delphi 6.

I am not sure if it has the same issues in Windows, but my word of advice is if you decide to use it (at least in Ubuntu) don't go more than a few minutes without saving your work. It likes to spontaneously combust. One second it's on your screen, then next, poof it's gone, and so is whatever you were working on.

It doesn't have this problem on windows, or I wouldn't have even given it the reserved recommendation that I did. It's just, as app said, crude.

Btw I have found 2 alternatives for myself(for now) for Python. One is PyGtk+Glade and the other is WxformBuilder. Pygtk+Glade gives back an xml file which is nice so that the Gui file is seperate. Wxformdesigner looks nice and updated regularly some what

It's funny. After reading this thread I started looking around. You would think you'd be able to pick up like a used Delphi Pro or something cheap. I didn't notice anything like that though.

Actually, older version of delphi sell for *more* strangely enough. I have no idea why that is.

Was Delphi 5 the last to produce VCL stand-alone .exe? I don't know. I know it's the last version I bought. Delphi 5 Pro. The only reason I don't have it set up anymore is if I install Delphi 5, then I'll feel compelled to put on the Jedi stuff. Besides, for the stuff I'm doing now AutoIt3 and AHK are simpler and less maintenance. Small programs seem to compile to around 300 KB no matter which one I use.

It's funny. After reading this thread I started looking around. You would think you'd be able to pick up like a used Delphi Pro or something cheap. I didn't notice anything like that though.

There is an additional problem with older versions: After the sale to Embarcadero, they pulled all the updates to the older version off the site, and now even registered users can no longer get copies of the updates and bug fixes for them. This took effect August 2009 and affects BDS 2006 and all versions of Delphi v7 and older.

And you can no longer register those versions, too. So there would be no way you could use it unless you had already previously registered it.

I think Embarcadero is trying to force developers to upgrade to a non-Borland release in order to make some money on the whole deal.

There is an additional problem with older versions: After the sale to Embarcadero, they pulled all the updates to the older version off the site, and now even registered users can no longer get copies of the updates and bug fixes for them. This took effect August 2009 and affects BDS 2006 and all versions of Delphi v7 and older.

And you can no longer register those versions, too. So there would be no way you could use it unless you had already previously registered it.

I think Embarcadero is trying to force developers to upgrade to a non-Borland release in order to make some money on the whole deal.

Are you serious? That's just totally crazy! Actually, before D8, you could use your copy indefinitely without registering- that online registration stuff only went live with D8.

And people wonder why consumers grumble about heavy handed DRM...

I wonder if you contacted them and complained would they let you activate it...?

And the funny thing about this is I was considering buying the Embarcadero release even though I don't use Delphi much- just because it looked like a good environment, and I go back to Delphi every once in a while. Now? I don't think so. When I get my new computer and try to install BDS 2006, I guess I'll see...

afa the update, yes there were definitely some fixes to Delphi 5 Pro you needed to install. I used to keep the update files. If you need them and can't find them online anymore I suggest investigating the Jedi stuff. The last time I installed the JVCL installer that put on the whole package for D5 had an option to install the fix package, believe it or not. It all goes on seamlessly, if you can still get those JVCL installers. I think for D5 you need to use the installer that's a couple of versions back from the latest.

Hm, I'd wait another 6 weeks or so (April 12 is the planned release date...), and get the VS2010 C# Express edition (but the RC I have installed in a VM is much, much better than the beta 2 of a few months ago). Looks like VS is nearly up to par with Eclipse for an IDE (I still like Eclipse better, and it's always improving ) but VS2010 Express has big potential, and the price is right