Live data from Hacker News

Lazarus 2.0 RC3 – Delphi-compatible cross-platform IDE

forum.lazarus-ide.org

71–80 of 129 posts

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

#71
Has anyone used a recent Lazarus version to create apps that can connect easily to an HTTP API?

Some months ago I had a need to create a "quick and dirty" API utility for internal use and I remembered about Lazarus.

However I couldn't find an HTTP client component that I could use. I just wanted to do the equivalent of a curl GET/POST call.

I'm not sure if maybe I'm not familiar enough with the wiki structure so I missed it, but I remember I searched for about an hour before I gave up.

I'd really like to start using a Delphi-like IDE again as I think it is a very useful and productive tool, especially for ad-hoc stuff.

Any pointers in the right direction would be greatly appreciated!

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

#72
post #51
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…

WYSIWYG web tools still exist, but they went SaaS. They’re called “low code development platforms”. If you want to play around with one you can download mendix’s modeler for free.

It's not going to take off like HTML did if one has to depend on "cloud" vendors playing nice or lasting.

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

#73
post #57

Earlier quoted context omitted.

Object Pascal is a nice language and it's terse (it's surface is quite small). In a lot of ways it feels like a forerunner of C# (unsurprising as the lead on Turbo Pascal/Object Pascal was Anders Hejlsberg). I loved Delphi 6, still miss it in some ways.

From the early days I thought it was a mistake for Java and .NET not to follow on what was common back then, and offer AOT compilation out of the box. Java AOT solutions were all commercial (gcj doesn't really count) and .NET had NGEN, but it was only meant for fast startups. .NET was specially disappointing in this regard, given that it had quite some influences from Delphi. We had to wait around 20 years for AOT to…

Indeed, Object Pascal in Delphi 6 had blazing fast compilation (for various reasons not least it's unit system), like click and it runs a half second later on a 250,000 line codebase.

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

#75
post #71

Has anyone used a recent Lazarus version to create apps that can connect easily to an HTTP API? Some months ago I had a need to create a "quick and dirty" API utility for internal use and I remembered about Lazarus. However I couldn't find an HTTP client component that I could use. I just wanted to do the equivalent of a curl GET/POST call. I'm not sure if maybe I'm not familiar enough with the wiki structure so I mi…

I made one that consumed the HN API a little while ago (maybe a year?) using the fphttpclient library bundled with Lazarus. It was pretty simple to use and all the documentation is on the wiki[1]. It is a lot more low level than I am used to personally but it was fun nonetheless.

[1]http://wiki.lazarus.freepascal.org/fphttpclient

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

#76
post #71

Has anyone used a recent Lazarus version to create apps that can connect easily to an HTTP API? Some months ago I had a need to create a "quick and dirty" API utility for internal use and I remembered about Lazarus. However I couldn't find an HTTP client component that I could use. I just wanted to do the equivalent of a curl GET/POST call. I'm not sure if maybe I'm not familiar enough with the wiki structure so I mi…

I made one that consumed the HN API a little while ago (maybe a year?) using the fphttpclient library bundled with Lazarus. It was pretty simple to use and all the documentation is on the wiki[1]. It is a lot more low level than I am used to personally but it was fun nonetheless. [1] http://wiki.lazarus.freepascal.org/fphttpclient

Ah!

I do remember I clicked on that briefly but I thought it was too low level like you said, and I thought there would be something else so I kept looking.

I guess I was wrong, but it's good to know there is something that works.

It also doesn't look that bad anyway, so I might as well give it a try.

Thanks!

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

#77
post #50

Earlier quoted context omitted.

FWIW LCL (Lazarus' framework) emulates the Windows behavior (there are even some reimplementations of Windows functions in non-Windows platforms to assist with that) since the API "descends" from Delphi's VCL which is Windows-only (and IMO it makes perfect sense that if you need to emulate some OS's behavior to focus on the most popular one). The end result is obviously that under Windows things work great, under X11…

Making it fit every OS well is indeed a tricky task. Perhaps the option of using native widgets can be given. Actually, ideally there'd be 3 choices for developers: 1) A default single uniform style for a given widget(s), 2) Emulation of OS-specific styles, 3) Native widgets. But providing all 3 without making a mess or bloatware is easier said than done.

The tricky thing about cross-platform UI dev, when considering macOS, isn't just about the widgets and so on. It's things like placement, hierarchies, etc. Like you said, easier said than done. To demonstrate for those who aren't sure:

Say Joe Bloggs wants to make an alert window to confirm if the user wants to save the document, but needs to add custom text and graphics so can't rely on a default implementation on each platform. So he makes an alert window, looks great.

Except his design is utterly confusing for macOS users. See, on Windows (and plenty of Linux environments), the Save and Cancel buttons would be centred on the window, and Save would be at the left. On macOS, Save and Cancel would be aligned to the right, and Save would be the right-most button.

Okay, so that's a pretty easy thing to solve with a cross-platform toolkit. Instead of defining the placement of buttons, you just define the text and action for the default button, the text and action for the cancel button, and they'll be put in the right place for every platform. Easy.

But that's such a small example. Try scaling that to the way macOS and Windows/Linux differ in the use of view hierarchies. Windows-style tab controls vs NSTabView; Windows/Linux-style tabbed, left-aligned settings windows vs standard macOS-style centre-aligned preference windows with NSToolbar at the top; each window/section of an app having its own menu bar as opposed to macOS having a static menu bar whose items enable/disable depending on context; MDI vs document-based apps; the fact that macOS apps can still be running even with no windows open, meaning that certain parts of the UI can still be opened, and your UI must account for this despite another window that you would expect to be open (on Windows or Linux) not being in memory at all.

To an engineer, these might seem trivial or not that big a deal. To a user, that's potential data loss.

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

#78
post #33
post #10

Earlier quoted context omitted.

Heeeey, but actually, unicycle is real fun! Sorry for being OT, but I couldn't resist :D it's just that this exercise you mention seems as a seriously fun idea for one of the many unicycle trials competitions :) just I'm not sure if the chewing gum would up the challenge in any way? That said, I wouldn't really compare JS fighting as similar to really fun unicycle tricks ;D Again, sorry for OT :D https://youtu.be/ePW…

Sorry, didn't mean to offend unicycle riders and jugglers. It was just an analogy about having to "juggle" (coordinate) many tricky activities at the same time.

Ahhh, ok, thanks a lot for the explanation; I didn't grasp the metaphor!

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

#79
post #57

Earlier quoted context omitted.

From the early days I thought it was a mistake for Java and .NET not to follow on what was common back then, and offer AOT compilation out of the box. Java AOT solutions were all commercial (gcj doesn't really count) and .NET had NGEN, but it was only meant for fast startups. .NET was specially disappointing in this regard, given that it had quite some influences from Delphi. We had to wait around 20 years for AOT to…

Indeed, Object Pascal in Delphi 6 had blazing fast compilation (for various reasons not least it's unit system), like click and it runs a half second later on a 250,000 line codebase.

A tradition all the way back to its MS-DOS early life.

Turbo Pascal 5.5 had an advertised compilation speed of 34 000 lines/minute, on 1989's hardware.

http://edn.embarcadero.com/article/20803

So something like PC 386 running MS-DOS 4.x, real mode with 640KB, eventually 1MB, if making use of highmem.

So excuse me for not being that amazed with Go's compilation speed achievements. :)

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

#80
post #57

Earlier quoted context omitted.

Object Pascal is a nice language and it's terse (it's surface is quite small). In a lot of ways it feels like a forerunner of C# (unsurprising as the lead on Turbo Pascal/Object Pascal was Anders Hejlsberg). I loved Delphi 6, still miss it in some ways.

From the early days I thought it was a mistake for Java and .NET not to follow on what was common back then, and offer AOT compilation out of the box. Java AOT solutions were all commercial (gcj doesn't really count) and .NET had NGEN, but it was only meant for fast startups. .NET was specially disappointing in this regard, given that it had quite some influences from Delphi. We had to wait around 20 years for AOT to…

I think one of the reasons why new languages are going for compilation again is the death of the multi-architecture ecosystem. Support x64 and ARM and you can play with the big boys.

Back then? Intel was barely considered mature, every Unix manufacturer (including sun) had their own processor architecture, and who knew what was coming out for the smaller devices ("thin clients" were all the rage).

I still think that for those scenarios Sun should've stuck with PostScript, and we still might have C/C++, but would be spared JS/HTML/CSS.

I've got no idea why Microsoft was going apesh* for bytecode all of a sudden. Especially considering that they had the heads of Modula-3 and Delphi...

Post reply on HN