4 ms·
I think "pretty close" is severely underselling Lazarus - it is way ahead of Visual Basic 6 in almost every aspect when it comes to making GUIs. Even Delphi 2 (
by badsectoracula 2y ago
I think "pretty close" is severely underselling Lazarus - it is way ahead of Visual Basic 6 in almost every aspect when it comes to making GUIs. Even Delphi 2 (the first 32bit Delphi) allowed for more complex GUIs compared to VB6, let alone something way more advanced like Lazarus.
The only thing that VB up to 6 had that you can't find in Lazarus (or Delphi for that matter) is being able to pause the program while it is running (or some error occurred), modify it and continue the execution without restarting it. But overall considering all the pros Lazarus has compared to VB6 i'd say it is much better than VB6 ever was.
- nickpsecurity 2y agoVB6 also used to start in about one second on a 400MHz P3. Test runs on the programs were about as fast. I had no mental pauses for compile times. Is Lazarus that fast?
- badsectoracula 2y agoMore or less, depending on many factors though. In general it is among the most lightweight IDEs, i've even used it on an original Raspberry Pi (though that was a few years ago) - it wasn't fast there, but it was usable which is more than can be said about most other still developed IDEs. Free Pascal is not as fast as Delphi 2 (especially if the target OS needs to use a native linker like GNU ld), for some decently sized projects it can take several seconds (or even a minute for multimillion lines of code) for a full build, though partial builds tend to be almost instant - at least in hardware released within the last 10 years (and SSDs help, like everywhere else). Of course both the language and the libraries (and Lazarus itself as an IDE and its own framework) do way more than Delphi 2, which itself was also more advanced than VB6. I do believe that the provided functionality scales well with its requirements. I'm not sure about a 400MHz P3, but i have tried a git build of Lazarus from last year on a late 2003 Athlon64 PC running Windows 7 and was very comfortable. A 400MHz P3 would be faster than an original Raspberry Pi, so i'd expect that if nothing else to be usable though might not be as comfortable as VB6 (or Delphi 2 for that matter). I do have a (IIRC) 800MHz P3 around for retro games, at some point i might try to install some lightweight Linux for fun and try to see how it performs there.
- nickpsecurity 2y agoThat sounds very competitive. One, more question. I used to use VB6 partly just for quickly drawing GUI’s, esp getting size right. Lazarus was one of free tools I found that was similar but most prefer other languages. Is there a way to make a GUI in Lazarus, save it to a file with types/dimensions, and then some other tool could generate a non-Pascal GUI from it? Does it have an export ability that’s detailed and parsable enough for that?
- 29athrowaway 2y agoVB6 was not very flexible in many ways but you could get an application going in no time. GAMBAS is the spiritual successor.
- FpUser 2y ago"VB6 was not very flexible in many ways but you could get an application going in no time" Same in Delphi / Lazarus. And the language was / is way more powerful.
- pjmlp 2y agoWhich is available in .NET.
- stavros 2y agoLazarus seems amazing, and I'd love to write some software with it, but I can't get past the language. You generally do want to pick languages with a big ecosystem, as everything you might want will have already been written. The difference between Python and Delphi isn't a bit more work, it's often the difference between "there's a library so I can make my thing" and "it would take way too long".
- doublerabbit 2y agoPascal is a workhorse and to tame the horse takes a lot of skill and blind knowledge. And then when tamed, your horse is the best at the show. I can't fault Pascal. It may not have every module ever like Python, it's syntax may feel archaic but the satisfaction and feel of producing a program with is fuzzy feeling great. I enjoy making my own things, especially wheels.
- badsectoracula 2y agoYou can interface with existing libraries if you really want, you need to somehow expose a C ABI (be it via the library written in C, exposing an official C ABI or you writing a C bridge). There is a 3rd party "Python-for-Lazarus" bridge[0] though for simple stuff you can use the python library directly: program foo; {$MODE OBJFPC} uses CTypes; const PyLib = 'python3.11'; procedure Py_Initialize; cdecl; external PyLib; function PyRun_SimpleString(Command: PChar): CInt; cdecl; external PyLib; begin Py_Initialize; PyRun_SimpleString( 'from tkinter import *'#13 + 'window = Tk()'#13 + 'window.title("Hello, world!")'#13 + 'button = Button(window, text="Clicky")'#13 + 'button.grid()'#13 + 'window.mainloop()'); end. The above uses the Tk library that comes with Python. Also depending on what you want to do chances are there is already a Free Pascal library or existing bindings to a library written in another language. If not, if the library has a C header file you can use the h2pas utility that comes with FPC to make your own (though the generated code does need some modifications to work more often than not). Of course all the above do assume you have knowledge of both Free Pascal and whatever you want to interface with, but at least as far as being able to access existing libraries is concerned, it should be possible - just with some hoops (and at that point it depends on how much you value whatever Lazarus provides over the effort involved in whatever library you want to use). EDIT: and truth be told IMO the biggest roadblock with Lazarus isn't so much the language but that it is just not easy to learn most of that stuff (the core language and runtime library is decently documented but anything outside of that can be a hit and miss) and you basically need an almost arrogant attitude of "this is just dumb code, not magic, if it is technically possible i can figure out myself how to do it" :-P. [0] https://github.com/Alexey-T/Python-for-Lazarus https://github.com/Alexey-T/Python-for-Lazarus