Recent

Author Topic: Things Lazarus/FPC can do Delphi cannot?  (Read 36436 times)

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Things Lazarus/FPC can do Delphi cannot?
« Reply #15 on: December 06, 2012, 04:39:29 pm »
Do you mean that Delphi provides native object FPC units that directly connect to db servers without any need for DLLs? Seems like those Delphi guys have been reinventing the wheel as well as inviting a maintenance nightmare... but it would be impressive.
Or do you mean that there is some database server programmed in Delphi available for Delphi programs?

I wonder if you point out my bad explaining or if you are asking this.
Offcourse: database server programmed in delphi available for delphi programs.
Nope, didn't know what you meant.  I don't mind if the source code to my open source db is in another language... as long as it is a good product. Obviously you feel different.

2. No native remote debugger,
You can debug with gdb over SSH if your target platform is *nix, AFAIU... Haven't tried it though.
So not natively.. and if 'm correct: unix -> linux.
You can debug from your Windows (or Linux or OSX) IDE on a Linux, OSX, etc platform where the code rans. Don't know what you mean by "native" debugger; AFAIU from the wiki article, you can set breakpoints etc in your IDE just like you always do. (And the debugger that is used on the remote platform is the same one that is used by Lazarus locally on windows)

Yes. Glad it is. Hope that I can edit my post and add Lazarus for Android.
;)

Maybe offtopic for my initial remark but I tried to port all kinds of components, running into the differences with RTTI etc. Maybe I suggest one day that the main page of the Lazarus website could be better used to point to documentation sections and make the release announcements less important.
If you have specific suggestions, you can post them in the suggestions section. There's been some talk about reorganizing the pages, but nothing happened, AFAIR.
IMO, the wiki has improved tremendously in the last year - more organization, more cross-references, more articles. If you haven't lately, you may want to have another look.
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

teos

  • Full Member
  • ***
  • Posts: 157
Re: Things Lazarus/FPC can do Delphi cannot?
« Reply #16 on: December 06, 2012, 04:50:57 pm »
Do you mean that Delphi provides native object FPC units that directly connect to db servers without any need for DLLs? Seems like those Delphi guys have been reinventing the wheel as well as inviting a maintenance nightmare... but it would be impressive.
Or do you mean that there is some database server programmed in Delphi available for Delphi programs?

I wonder if you point out my bad explaining or if you are asking this.
Offcourse: database server programmed in delphi available for delphi programs.
Nope, didn't know what you meant.  I don't mind if the source code to my open source db is in another language... as long as it is a good product. Obviously you feel different.
No, I mostly agree with you. No fond of the DLL's involved to connect to that DB. I have learned that SQLite DLL's are quite version and OS dependant.

I would prefer native code because of portability. But for me that is different from the quality.
2. No native remote debugger,
You can debug with gdb over SSH if your target platform is *nix, AFAIU... Haven't tried it though.
So not natively.. and if 'm correct: unix -> linux.
You can debug from your Windows (or Linux or OSX) IDE on a Linux, OSX, etc platform where the code rans. Don't know what you mean by "native" debugger; AFAIU from the wiki article, you can set breakpoints etc in your IDE just like you always do. (And the debugger that is used on the remote platform is the same one that is used by Lazarus locally on windows)

Delphi's debugger is ofcourse written for Windows only. But yes it does provide flawless and zero configuration debugging what is running on another computer (ISAPI dll on IIS for example).

Yes. Glad it is. Hope that I can edit my post and add Lazarus for Android.
;)
Maybe offtopic for my initial remark but I tried to port all kinds of components, running into the differences with RTTI etc. Maybe I suggest one day that the main page of the Lazarus website could be better used to point to documentation sections and make the release announcements less important.
If you have specific suggestions, you can post them in the suggestions section. There's been some talk about reorganizing the pages, but nothing happened, AFAIR.
IMO, the wiki has improved tremendously in the last year - more organization, more cross-references, more articles. If you haven't lately, you may want to have another look.
I will. And I will start asking more questions on the forum. :)
« Last Edit: December 06, 2012, 04:54:47 pm by teos »

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Things Lazarus/FPC can do Delphi cannot?
« Reply #17 on: December 06, 2012, 05:28:32 pm »
Quote
Not to mention that most of the common dbms-es run on Windows, not on Linux.
I have no idea with your meaning of "common", since MySQL, PostgreSQL, SQLite(3), Firebird and many other run (and are even developed) on Linux.
Quote
3rd party support problem or not, fact remains that DevExpress and Jedi VCL only excist for Delphi. So do most of the reporting engines.
Yep, and still it's not Lazarus problem ;)
We have what we have, and the number is increasing, including commercial 3rd party support. It's just not yet at the same level as Delphi (don't ask us, as those 3rd parties).
Quote
I learned that it is very hard to port Delphi components to Lazarus if you don't have a very thorough knowledge of Lazarus (and lots of spare time).
It depends on how the components are coded. I've converted several well written Delphi components without too much trouble, despite the fact I've never truly used Delphi (and at that time, I haven't really known Lazarus, or LCL to be precise, internals). But I've also given up on those written with Windows in mind (and directly use Windows API = hell).
Quote
So not natively.. and if 'm correct: unix -> linux.
Nope: *nix = every OS that's based on *nix including Linux, Mac OS X, FreeBSD, etc.
Quote
Hmm, yes and no. I guess they want to encourage the use of more optimal ways. Case strings, and string comparison in general is extremely slow compared to indexing and all kinds of other ways.

But i guess it's ok if language supports it, and if it's used for small things. But there could be developers that take this into larger projects and hurt its performance.
The positive point of this feature is that we can get performance speed up without changing code when the implementation changes to use proper way. Current AnsiCompareText based implementation is indeed slow, but it should be possible to change to embedded prefix/suffix tree which should perform best both from development and execution point of view.
Quote
Won't keep me from using Lazarus. Delphi executables don't grow to 15 MB with only an empty form. But I could understand if the exe size is due to compiling everything installed in Lazarus.
Means you don't understand / haven't read the arcticle. Empty form withOUT debugging information, smartlinked and optimized should be around 1.5 MB, if you don't get that, then something is wrong with your options.

jarto

  • Full Member
  • ***
  • Posts: 106
Re: Things Lazarus/FPC can do Delphi cannot?
« Reply #18 on: January 19, 2013, 04:06:07 pm »
Won't keep me from using Lazarus. Delphi executables don't grow to 15 MB with only an empty form. But I could understand if the exe size is due to compiling everything installed in Lazarus.

Reading about optimizations on FPC and benchmarks compared to Delphi, I happened to find this topic. It seems to me that nobody took the time to explain well enough to teos, that Lazarus executables are not 15 MB. I do understand that this is the most FAQ, but as the concept of linking tons of debug info into the exe is completely alien to a Delphi user, it's a good idea to explain it well instead of pointing people to a page.

New project, select "Smart linkable", "Link smart" and "Use external gdb debug symbols file" results in about 1,7 MB exe size on 32 bit Windows, not 15 MB.

So every time you get a completely huge exe size, remember that it has tons of debug info in it, which can be removed with the right options.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Things Lazarus/FPC can do Delphi cannot?
« Reply #19 on: January 19, 2013, 04:58:15 pm »
Quote
It seems to me that nobody took the time to explain well enough to teos, that Lazarus executables are not 15 MB. I do understand that this is the most FAQ, but as the concept of linking tons of debug info into the exe is completely alien to a Delphi user, it's a good idea to explain it well instead of pointing people to a page.
But then you will have to answer the same question again and again, and that's what Frequently Asked Questions are for. Feel free to improve the article if you think it's not clear enough.

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Things Lazarus/FPC can do Delphi cannot?
« Reply #20 on: January 19, 2013, 05:02:04 pm »
Exactly. It's even worse when you get endless discussions that are all covered in the FAQ and the "size matters" wiki article

Edit: (help in) providing a patch for bug http://bugs.freepascal.org/view.php?id=22743
Provide default and debug build modes by default
would also be very welcome ;)
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11458
  • FPC developer.
Re: Things Lazarus/FPC can do Delphi cannot?
« Reply #21 on: January 19, 2013, 07:36:53 pm »
Since I have been using Lazarus I have discovered a couple of little gems I could never do in Delphi:
(these don't work in Delphi mode)

Forget the small potato, go directly for the big stuff.

Inline generic methods ?  Works with 2.7.1, not with Delphi XE..XE3.

jarto

  • Full Member
  • ***
  • Posts: 106
Re: Things Lazarus/FPC can do Delphi cannot?
« Reply #22 on: January 19, 2013, 11:07:48 pm »
But then you will have to answer the same question again and again, and that's what Frequently Asked Questions are for. Feel free to improve the article if you think it's not clear enough.
The FAQ us good. The challenge is to get people to read it. In this case the reader seems to have left the forum thinking that a one form Lazarus executable really is 15 MB and that we think it's normal. That's why I wanted to emphasize for any future readers, that Lazarus executables are in fact an order of magnitude smaller than that.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9908
  • Debugger - SynEdit - and more
    • wiki
Re: Things Lazarus/FPC can do Delphi cannot?
« Reply #23 on: January 19, 2013, 11:20:13 pm »
That is why the installer for 1.1 (snapshots, now displays the following info:

Quote
Some Info from our FAQ: http://wiki.lazarus.freepascal.org/Lazarus_Faq

    What is Lazarus?
Lazarus is a cross-platform IDE for Pascal. Its aim is write once, compile anywhere.

    How to reduce the exe file size?
The default binaries are very big because they include debug information. For release builds you can switch this off in the Project settings.

    Licensing:
- The LCL is licensed LGPL with linking exception. This allows you to create apps with any license you want, including comercial.
- The IDE is licensed GPL. If you distribute a modified IDE you must follow the GPL.
- Other packages and components have various licenses. See the readme of each package.

CaptBill

  • Sr. Member
  • ****
  • Posts: 435
Re: Things Lazarus/FPC can do Delphi cannot?
« Reply #24 on: January 20, 2013, 04:54:38 am »
Since I have been using Lazarus I have discovered a couple of little gems I could never do in Delphi:
(these don't work in Delphi mode)

Forget the small potato, go directly for the big stuff.

Inline generic methods ?  Works with 2.7.1, not with Delphi XE..XE3.

I understand that, since the addition of advanced records, this means that most of codebase for practically everything needs to be changed from classes to advanced records, to take advantage of a fairly significant overhead/speed reduction in Delphi's case. And doesn't seem high on the priority list at Delphi from what I heard.

Is FPC/Lazarus ahead of the curve in this regard, I wonder? I would imagine. If so, then Lazarus should have an advantage here.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11458
  • FPC developer.
Re: Things Lazarus/FPC can do Delphi cannot?
« Reply #25 on: January 21, 2013, 10:21:15 am »
I understand that, since the addition of advanced records, this means that most of codebase for practically everything needs to be changed from classes to advanced records, to take advantage of a fairly significant overhead/speed reduction in Delphi's case.

I don't understand the connection. Could you elaborate? Classes to advanced records is rarely a solution for anything, since advanced records only support static methods. (and not virtual ones).

The only benefit +/- is that in generics you can mass instantiate records by arranging them in an array and grow themwith setlength (with only one call to the heap manager for all instead of one each), but that effect won't be that big for records with dynamic types (like strings) in them.

Quote
And doesn't seem high on the priority list at Delphi from what I heard.

Is FPC/Lazarus ahead of the curve in this regard, I wonder? I would imagine. If so, then Lazarus should have an advantage here.

I don't understand what the "curve" is supposed to be.

snorkel

  • Hero Member
  • *****
  • Posts: 817
Re: Things Lazarus/FPC can do Delphi cannot?
« Reply #26 on: January 22, 2013, 06:16:06 pm »
LCL (the first choise in create new project), empty form is 14,6 MB, delphi 2007 same new project, empty form is 407 kb.

First off, Delphi 2007 is super old, compare it to Delphi XE 2 or XE3 and the sizes are almost exactly the same.

Also in Lazarus when you are done debugging you need to go into Project Options under the Linker settings and uncheck the "Generate Debugging info"  This dramatically reduces the exe size.

A empty form project compiled with no debug info is:  1.82 MB (1,915,392 bytes)  Which i think is pretty reasonable in this day and age. (You can also enable the smart linking which drops the size a bit more)

Delphi Xe2 with debug: 7.06 MB (7,408,317 bytes)
Delphi Xe2 without debug: 1.52 MB (1,600,000 bytes)
(with Xe2 the difference is even smaller)

So do you think there is a huge difference now?
« Last Edit: January 22, 2013, 06:21:40 pm by snorkel »
***Snorkel***
If I forget, I always use the latest stable 32bit version of Lazarus and FPC. At the time of this signature that is Laz 3.0RC2 and FPC 3.2.2
OS: Windows 10 64 bit

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Things Lazarus/FPC can do Delphi cannot?
« Reply #27 on: January 22, 2013, 06:18:40 pm »
@Snorkel: if he doesn't understand about not including debug info etc now after all these posts, he's probably a zombie ;)
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

snorkel

  • Hero Member
  • *****
  • Posts: 817
Re: Things Lazarus/FPC can do Delphi cannot?
« Reply #28 on: January 22, 2013, 06:22:34 pm »
@Snorkel: if he doesn't understand about not including debug info etc now after all these posts, he's probably a zombie ;)

Ha ha ha maybe :-)
***Snorkel***
If I forget, I always use the latest stable 32bit version of Lazarus and FPC. At the time of this signature that is Laz 3.0RC2 and FPC 3.2.2
OS: Windows 10 64 bit

snorkel

  • Hero Member
  • *****
  • Posts: 817
Re: Things Lazarus/FPC can do Delphi cannot?
« Reply #29 on: January 22, 2013, 06:35:06 pm »
When teos was talking about client/server was he really referring to 3 tier like Midas?
Isn't all the standard SQL stuff included with Lazarus client/server already?

If you want 3 tier you can easily use Synapse to create the middle application server part.

As far as 3rd party is concerned if teos started using Lazarus and then let his 3rd party devs know that he is using it, they may be more likely to support Lazarus and FPC.

The more people that use Lazarus the more likely 3rd parties will port their stuff.

Some great 3rd party tools that work on Lazarus are PostgreSQL DAC and Securebridge from DevArt.  The PostgreSQL offering from Devart is unique in it uses the wire protocol directly and does not require the libpq client access library at all.

So if you look closely and take the time to learn what the differences are Lazarus is a very very good alternative to Delphi.  Sure you might have to work around a few things but it's very much worth it.   I have access to Delphi Xe3 and I don't even use it because I actually prefer Lazarus, not to mention the community is much nicer here and there is no Team B....
***Snorkel***
If I forget, I always use the latest stable 32bit version of Lazarus and FPC. At the time of this signature that is Laz 3.0RC2 and FPC 3.2.2
OS: Windows 10 64 bit

 

TinyPortal © 2005-2018