News for hackers. Stuff that matters.
Re:Delphi still exists and is actively developed by panki27 on Thursday August 18, 2022 @11:02AM (#32510625)
One of the best aspects of Delphi is how quickly you can whip together simple GUI applications. The main issue nowadays is finding helpful resources on the internet, as hardly anybody writes Delphi anymore.

For the interested, a free Delphi IDE exists (comes with FreePascal compiler): https://www.lazarus-ide.org/

Re:Delphi still exists and is actively developed by hengheng on Thursday August 18, 2022 @11:10AM (#32510772)
Asking as someone who last saw Delphi in computer class at school, what would be the modern equivalent?

Something that lets me draw a window with two number fields and a button that says "return sum", but it's two minutes of work and self-explanatory.

Re:Delphi still exists and is actively developed by jkaptur on Thursday August 18, 2022 @11:24AM (#32510948)
I get a little frustrated, because the web is AMAZING for this. Type this in anywhere. Anywhere!

  <input id=foo></input>
  <input id=bar></input>
  <button onclick="sum()">sum</button>
  <div id=result></div>
  <script>
    function sum() {
      result.innerText = parseFloat(foo.value) + parseFloat(bar.value);
    }
  </script>
That's full of "bad practices" but for the use case you're talking about, who cares?
Re:Delphi still exists and is actively developed by robin_reala on Thursday August 18, 2022 @11:42AM (#32511181)
Side note, but can I introduce you to the <output> element? You can just set its value instead of its innerText. It’s perfect for calculators.

https://html.spec.whatwg.org/multipage/form-elements.html#th...

Re:Delphi still exists and is actively developed by robocat on Thursday August 18, 2022 @01:29PM (#32512530)
Re:Delphi still exists and is actively developed by noSyncCloud on Thursday August 18, 2022 @02:04PM (#32512921)
Not supported by IE so we can't use it :(

/s

Re:Delphi still exists and is actively developed by hasperdi on Thursday August 18, 2022 @05:35PM (#32515181)
IE is outdated and unsupported by the maker. Time to let it die.
Re:Delphi still exists and is actively developed by radiojasper on Friday August 19, 2022 @08:43AM (#32520274)
Please learn what /s means :)
Re:Delphi still exists and is actively developed by hasperdi on Friday August 19, 2022 @09:13AM (#32520555)
/shutup?
Re:Delphi still exists and is actively developed by radiojasper on Saturday August 20, 2022 @06:10AM (#32530835)
Lead by example.
Re:Delphi still exists and is actively developed by jkaptur on Thursday August 18, 2022 @11:57AM (#32511357)
TIL - thanks!
Re:Delphi still exists and is actively developed by gavinray on Thursday August 18, 2022 @01:23PM (#32512451)
What?! TIL, thanks.
Re:Delphi still exists and is actively developed by arghwhat on Thursday August 18, 2022 @11:33AM (#32511063)
Unfortunately, nobody codes web apps like that. If they did they web probably wouldn't be that bad.

Instead they whip out React and because native browser elements apparently are the devil they add tailwind/material design/bootstrap/whatever on top.

Once you do it that way, the web approach honestly ends up as complex or worse than many of the alternatives...

Re:Delphi still exists and is actively developed by SCLeo on Friday August 19, 2022 @01:44AM (#32517843)
Actually I do. Whenever I need a small tool like a calculator for a video game or a simple GUI program for processing images, I always go for a barebones single html file web application.

For example, this is a simple visualizer for different numerical integrators that I wrote in a day or two for a college course: https://scleox.github.io/integrator-visualizer/index.html. The the source code is just one single html file: https://github.com/SCLeoX/integrator-visualizer/blob/master/...

Re:Delphi still exists and is actively developed by hasperdi on Thursday August 18, 2022 @05:40PM (#32515219)
That way doesn't scale well. Things become very messy and unmaintainable really quickly. This is how people code in the past, and there are good reasons why people moved on.
Re:Delphi still exists and is actively developed by arghwhat on Saturday August 20, 2022 @04:26AM (#32530351)
Code becomes unmaintainable when it was organized poorly and grows or if discipline was not maintained during growth.

React projects are just as susceptible to that, and "modern" web development is quite frankly a larger maintainability headache due to the dependency hell they bring.

Re:Delphi still exists and is actively developed by SCLeo on Friday August 19, 2022 @01:49AM (#32517865)
Just one more quick tip, you should probably use the unary operator "+" to convert strings to float. `parseFloat('2,000')` gives 2, which is probably not expected, while `+'2,000'` gives NaN indicating the input format is not recognized.
Re:Delphi still exists and is actively developed by badsectoracula on Thursday August 18, 2022 @11:21AM (#32510912)
The linked Lazarus. Here is a quick screencast making a window with two fields and a button that sums them (though i forgot the "return sum" caption :-P) in ~45 seconds:

https://i.imgur.com/cATdmhY.mp4

Re:Delphi still exists and is actively developed by aidenn0 on Thursday August 18, 2022 @12:29PM (#32511761)
Is that Afterstep you are running? I'm having flashbacks to 1999...
Re:Delphi still exists and is actively developed by zozbot234 on Thursday August 18, 2022 @11:28AM (#32510995)
> Something that lets me draw a window with two number fields and a button that says "return sum", but it's two minutes of work and self-explanatory.

Tcl/Tk would be the most straightforward choice. Even easier than Lazarus. It's not really a native look, but practically nothing is truly native these days.

Re:Delphi still exists and is actively developed by the_only_law on Thursday August 18, 2022 @11:11AM (#32510782)
> As someone who last saw Delphi in computer class at school, what would be the modern equivalent?

Maybe hard pressed to call it modern, but WinForms is still my go to for quickly making a UI, at least in Windows.

Re:Delphi still exists and is actively developed by Joker_vD on Thursday August 18, 2022 @11:25AM (#32510959)
Same here. I've tried to pick up WPF but holy fatcats, what an explosion of XAML files in exchange for... pretty much nothing, really. It's a shame, really.
Re:Delphi still exists and is actively developed by gduke on Sunday August 28, 2022 @05:59PM (#32632498)
Delphi's FireMonkey is in many ways similar to WPF in the way you can manipulate UI elements, except all the fluff and cruft WPF/XAML has. On the plus side, FireMonkey is multi platform too.

VCL is still the tried and tested UI framework for Windows only applications though, nothing beats its flexibility.

Re:Delphi still exists and is actively developed by the_only_law on Thursday August 18, 2022 @11:27AM (#32510986)
I would almost like XAML, if it wasn’t for styling. If it had some CSS like DSL, I’d use it more, but unfortunately overcrowding styles invokes nasty blobs of XML boilerplate often having to override stuff that doesn’t seem relevant to what you want to do.
Re:Delphi still exists and is actively developed by Fire-Dragon-DoL on Thursday August 18, 2022 @11:35AM (#32511093)
Isn't wpf deprecated too? I wish there was an official way to make apps in windows...
Re:Delphi still exists and is actively developed by pjmlp on Thursday August 18, 2022 @11:43AM (#32511188)
Not really, I doubt WinUI will ever match it in features, so most enterprises will keep ignoring it.

Basically Win32, Forms, WPF for .NET, Win32/MFC for C++, or web stuff like ASP.NET, possibly with Blazor.

Even though UWP did not went away, and they keep at the N interaction of it with WinAppSDK, I would lose any sleep over it.

Re:Delphi still exists and is actively developed by spfzero on Thursday August 18, 2022 @06:25PM (#32515583)
Same feeling about WPF. XAML just never caught on with me and I stayed with Forms for a long while after WPF came out. With XAML, it seemed like they were trying a bit too hard on declarative.

Now working in SwiftUI, which is declarative but in a more understandable way, with a View building mechanism behind it that ties things together so that you understand what you're doing a bit better. Not sure I'm explaining that well...

Not good enough at it yet to build anything fast, but I could see that being the case after a few more months with it.

Re:Delphi still exists and is actively developed by fomine3 on Thursday August 18, 2022 @09:40PM (#32516828)
You can ignore XAML if you make WPF app as like WinForms, just use GUI designer and absolute layout. It's not considered to good but it should work.
Re:Delphi still exists and is actively developed by Joker_vD on Friday August 19, 2022 @06:07AM (#32519227)
But in that case, why even use WPF if I can just keep using WinForms? Besides, judging by the news and announcements on the Microsoft site, it would seem that WinForms is still being sort of developed while WPF is... pretty much dead.
Re:Delphi still exists and is actively developed by fomine3 on Friday August 19, 2022 @07:35AM (#32519751)
You can easily adopt WPF features later, compared to migrate WinForms to WPF. I think both WinForms and WPF are being sort of developed, but WinForms is old so it have more developing needed area, like accessibility and HiDPI.
Re:Delphi still exists and is actively developed by gduke on Sunday August 28, 2022 @05:57PM (#32632480)
Delphi still exists and is available as a free Community Edition too.

There are plenty of resources and new books being written. You can find a collection at https://learndelphi.org

Re:Delphi still exists and is actively developed by bri3d on Thursday August 18, 2022 @11:48AM (#32511243)
For something trivial and cross platform: Tcl with Tk or Python with wxpython.

Java with Swing does still exist and works too.

It's harder (IMO) to "scale" a Tcl/Tk or wxpython project though as there aren't great built-in patterns and especially with wxpython, the API is a bit clunk and boilerplate heavy.

For a bigger project that you don't need to be cross-platform, you can still make a Windows Forms C# project in Visual Studio. It still works pretty well even, although Visual Studio seems to get slower and farther from this use case each year.

Re:Delphi still exists and is actively developed by runjake on Thursday August 18, 2022 @12:05PM (#32511480)
Windows Forms is probably the closest modern RAD equivalent of what you remember:

https://docs.microsoft.com/en-us/dotnet/desktop/winforms/

Re:Delphi still exists and is actively developed by tdeck on Thursday August 18, 2022 @07:10PM (#32515920)
Folks mentioned a few good options already, but another one is using C# and visual studio's built in form designer. It's very easy to get started with if you've seen a similar language before (e.g. Java).
Re:Delphi still exists and is actively developed by CRConrad on Sunday August 21, 2022 @07:44AM (#32539229)
> Asking as someone who last saw Delphi in computer class at school, what would be the modern equivalent?

As the GP said, FP / Lazarus.

Re:Delphi still exists and is actively developed by kwanbix on Thursday August 18, 2022 @11:24AM (#32510949)
Nowadays they have a free option. Community edition or the like.