Live data from Hacker News

Lazarus 2.0 RC3 – Delphi-compatible cross-platform IDE

forum.lazarus-ide.org

21–30 of 129 posts

Re: Lazarus 2.0 RC3 – Delphi-compatible cross-platform IDE

#21
I was eyeing Lazarus, because it is close to my particular crossplatform toolkit ideal. I think that UI toolkit should use native widgets and near zero cost FFI. So any toolkit that draws for itself is not within my ideal. The most problematic platform for my ideal is Android as the toolkit should run without NDK. C++ does not cut it. Java would work for Android, but on other platforms there's FFI.

FreePascal does compile to Java bytecode. It is an experimental feature as far as know, but it's promising.

There is lots to like about FreePascal, even if I dislike the syntax a bit. See the Modern Object Pascal Introduction¹ for reference. But memory handling is something that does not fit my vision. I would hope for something similar to Swift - automatic reference counting. I like that the compiler is not LLVM or GCC based. With ARC I can forgive even the manual UUIDs for components.

That's how I saw it from quite a big height so excuse me if I'm misguided.

At the moment Swift looks promising for me without possible transpilation to Kotlin as seen in one project ². Or D, as it should be easier to fit Java. But I have my eye on Lazarus. It certainly is much more mature a project.

¹ https://castle-engine.io/modern_pascal_introduction.html

² https://github.com/angelolloqui/SwiftKotlin

Re: Lazarus 2.0 RC3 – Delphi-compatible cross-platform IDE

#22
post #15
post #4

Earlier quoted context omitted.

I miss WYSIWYG IDE's like Delphi, VB-classic, and Lazarus. Dealing with HTML "autoflow" and Bootstrap is a royal pain. You sketch a draft GUI that seems a good fit for the application and users, and then realize you have to jump through hoops backward on a unicycle while chewing gum blindfolded to get it right on web browsers. Jetsons WYSIWYG technology yanked from my happy fingers by an LSD "standard". (I'm assuming…

I cut my teeth on VB classic, as I'm sure a lot of folks my age did. I was learning C/C++ concurrently, got through the basics, and of course hurried to GUI programming since that's what I made. It's been 20 something years, but I remember it being something like 31 lines of code to just get an empty window in Windows. With VB it was basically zero effort. I wish WYSIWYG IDEs for both desktop programming AND html (re…

Re: I [now] shy away from GUI programming because of how tedious it is.

It's not really "GUI programming" anymore. It's making HTML/CSS/DOM act like a GUI.

Re: Lazarus 2.0 RC3 – Delphi-compatible cross-platform IDE

#23
post #9

Earlier quoted context omitted.

Can I interest you in a very Delphi-like IDE for building web apps with nothing but Python? https://anvil.works has a WYSIWYG visual designer, with Python for in-browser code as well as server-side. (We compile it to JS.) It's even got a built-in DB if you want it (Postgres-backed). Everything in one language, full front-to-back autocompletion...all the things we missed about Delphi!

Nice product but it may have been better to release this as a opensource product because there will always be a fear that if your company goes bottoms-up, those companies who used your platform will be left high and dry.

That's my fear also. Emulating GUI's in web browsers takes a ship-load of code. Therefore, it needs strong maintenance prospects to safely last into the future.

Re: Lazarus 2.0 RC3 – Delphi-compatible cross-platform IDE

#24
post #21

I was eyeing Lazarus, because it is close to my particular crossplatform toolkit ideal. I think that UI toolkit should use native widgets and near zero cost FFI. So any toolkit that draws for itself is not within my ideal. The most problematic platform for my ideal is Android as the toolkit should run without NDK. C++ does not cut it. Java would work for Android, but on other platforms there's FFI. FreePascal does co…

Re: I think that UI toolkit should use native widgets and near zero cost FFI.

If the target audience is cross-platform, that's hard to pull off. Each OS's native GUI engine is too different. Emulating a common target behavior is usually better (until a good general GUI standard comes along). Maybe your particular need is not cross-platform, but Lazarus's goal is.

Re: Lazarus 2.0 RC3 – Delphi-compatible cross-platform IDE

#25
post #21

I was eyeing Lazarus, because it is close to my particular crossplatform toolkit ideal. I think that UI toolkit should use native widgets and near zero cost FFI. So any toolkit that draws for itself is not within my ideal. The most problematic platform for my ideal is Android as the toolkit should run without NDK. C++ does not cut it. Java would work for Android, but on other platforms there's FFI. FreePascal does co…

> But memory handling is something that does not fit my vision

I do Delphi a lot of years (still remain as moderator in http://www.clubdelphi.com) and can say that is easy to just. Is much easier than use obj-c and the idioms around the language make things simply. Is the only language I have tried with manual memory management that I found simply to follow

P.D: Help a lot strings are refcounted and you can refcount some stuff if desired.

Re: Lazarus 2.0 RC3 – Delphi-compatible cross-platform IDE

#26

I love the idea of a WYSIWYG IDE that's integrated with the language like this, or like VB used to be, but personally I just can't stomach the whole "have to learn yet another language to use it" problem. From what little I've played with Lazarus and FPC it seems really nice though, and I might make use of it for some smaller projects at work in the near future. I'm sick of trying to make web apps and all the ridicul…

Back in the days existed a Delphi-like environment under a scripting version of Delphi, with a very close match of the IDE (it borrow all the controls of Delphi). it also have a VB dialect!

I think will be smart to build a Delphi/FreePascal renderer with an API to make easy to embed into other languages (like with TCL).

I sketch some of the idea in https://www.reddit.com/r/rust/comments/9bapwt/thoughts_on_wh...

Delphi/FreePascal integrate very well with C APIs so I think the glue could be easy.

Re: Lazarus 2.0 RC3 – Delphi-compatible cross-platform IDE

#27

I love the idea of a WYSIWYG IDE that's integrated with the language like this, or like VB used to be, but personally I just can't stomach the whole "have to learn yet another language to use it" problem. From what little I've played with Lazarus and FPC it seems really nice though, and I might make use of it for some smaller projects at work in the near future. I'm sick of trying to make web apps and all the ridicul…

> There really isn't a reason I can think of that I shouldn't be able to throw together a GUI in a WYSIWYG editor and maybe define some basic behavior, then give it one or more programs it should run in the background and pass messages back and forth. Or even let me just tie events to a command pipeline and dump the result into another widget, basically just letting a GUI be part of the composable toolset following t…

As I view the problem, what's lacking is a GUI markup standard roughly comparable to HTML. HTML browsers were not originally meant to build full-on GUI's in, but the industry has accepted the habit of forcing them to "do" GUI's using convoluted tricks and giant JavaScript libraries.

By the way, the "GUI markup language" doesn't necessarily have to be XML-only. Maybe JSON or CSV versions can be defined also. However, XML is a good start: learn to walk before you run.

As far as how interaction and screen changes could be handled, see: http://wiki.c2.com/?GuiMarkupProposal

I particularly dig the 3-type "update" technique that uses "Attribute", "Tag", and "Delete" scope. (It's about half way down in the document.)

Re: Lazarus 2.0 RC3 – Delphi-compatible cross-platform IDE

#28
post #21

I was eyeing Lazarus, because it is close to my particular crossplatform toolkit ideal. I think that UI toolkit should use native widgets and near zero cost FFI. So any toolkit that draws for itself is not within my ideal. The most problematic platform for my ideal is Android as the toolkit should run without NDK. C++ does not cut it. Java would work for Android, but on other platforms there's FFI. FreePascal does co…

> But memory handling is something that does not fit my vision.

Note that in practice memory management is almost never an issue with FreePascal since a lot of things are based on TComponent that provides an ownership-based model and dynamic arrays (at the language level) handle a lot of cases you'd need to worry yourself. Of course if you create raw objects you also need to release them, but this is something you generally do in constructors and destructors.

> I would hope for something similar to Swift - automatic reference counting.

I'm not sure how i feel about this personally since i think it adds a lot of hidden baggage to the language, but you can use reference counting using "COM" interfaces (the name is just a historic artifact, they work in non-Windows environments too) in current FPC. There is also work to allow any custom type become reference counted by defining some special operators (essentially functions) that the compiler will automatically call to incref/decref/etc (which can also be used to implement RAII).

> With ARC I can forgive even the manual UUIDs for components.

Is the manual UUIDs you are talking about in Swift? AFAIK you do not need to define any UUID in FreePascal (except for the COM interfaces mentioned above).

Re: Lazarus 2.0 RC3 – Delphi-compatible cross-platform IDE

#29
post #11

Free Pascal has come a long way. When I first messed with it, it lacked generics even though Delphi supported them. Nowadays I can compile Delphi code with generics just fine. I don't think I personally would want to use Delphi in this day and age, but there's still a lot of useful Delphi/Pascal code out there and it's great to be able to use it on Linux.

>I don't think I personally would want to use Delphi in this day and age

I totally understand where you are coming from, however I must say having everything compiled into a static-binary is a powerful thing that we often overlook today.

Case-in-point: Around 2007 I was consulting for a manufacturing facility, basically doing accounting system programming. Their warehouse department needed a small app that basic did two things (a) Check to see if a invoice was marked paid so they could ship, and (b) Record the Fedex / UPS tracking number back into the accounting system.

This was something that was meant to be added into the main accounting application and installed into the warehouse, but there were the usual practical issues (the PC that existed in the warehouse was an under-powered Win XP machine that couldn't actually run the accounting system, so a new machine needed to be purchased...basically weeks of time were required to solve it, but we needed a solution ASAP).

On a whim, I whipped up a simple single-dialog box "utility" in Lazarus / Pascal that would check if accounting had released the invoice and then record the tracking number. Literally took me maybe 3 hours to download, program, test, and deploy.

A few months ago I ran into the product owner from that consulting gig so many years ago....after catching up a bit, asking what had changed...he sheepishly added "I've still never got around to incorporating your warehouse 'utility' into the main program yet". I said 'surely its still not that old WinXP box?' and he said no they had upgraded a few times and just copied the .exe over each time and it continued to work.

Obviously such a simple 'utility' app is not a great example of why you would choose to use a language / platform, but it is a testament that what it does well, it does well. My 3 hours of billable time amortized out over 12 years now was a really good ROI.

Re: Lazarus 2.0 RC3 – Delphi-compatible cross-platform IDE

#30
post #9
post #4

Earlier quoted context omitted.

I miss WYSIWYG IDE's like Delphi, VB-classic, and Lazarus. Dealing with HTML "autoflow" and Bootstrap is a royal pain. You sketch a draft GUI that seems a good fit for the application and users, and then realize you have to jump through hoops backward on a unicycle while chewing gum blindfolded to get it right on web browsers. Jetsons WYSIWYG technology yanked from my happy fingers by an LSD "standard". (I'm assuming…

Can I interest you in a very Delphi-like IDE for building web apps with nothing but Python? https://anvil.works has a WYSIWYG visual designer, with Python for in-browser code as well as server-side. (We compile it to JS.) It's even got a built-in DB if you want it (Postgres-backed). Everything in one language, full front-to-back autocompletion...all the things we missed about Delphi!

Don't know if it is you specifically, but anvil.works comes up in these contexts a lot so for once I'm going to give you some feedback: anvil.works is not the same thing.

You have some nice looking tooling, but you insist on hosting the result and locking the user into paying rent to use something they built. Your on-prem is locked behind "if you have to ask you can't afford it".

You'd have more interest from people like me if I could just buy or subscribe to your tool and know that even if we eventually drop the subscription the application I produced would still be usable.

But I suspect that your goal isn't to convince people like me, but catch people reading this who might be more amenable to your terms.

Post reply on HN