Hacker News new | ask | show | jobs
by bruno2223 3239 days ago
I still compile a old project in Delphi 7 once every 3 months just to add 5 lines of code, and they pay me monthly for it. It's cheaper than porting the whole system to any other language.

It is a project that I've built 8 years ago. Delphi was already a "strange think" on that time, it was declining fast. I think Java killed Delphi - "One codebase for all platforms, even your freezer will have Java!" - this was the cool sentence on that time.

Since I started with Delphi when I was 14 (I am now 33), a lot of thinks changed to me. Now I mainly work in back-end field, building APIs, Bots, Crawlers and Queues to do massive things (like receive million SMS per hour in a voting system for a TV Reality Show program)

When I am programming, 70% of my time is Nodejs, 10% Python and 20% Vuejs.

But I still miss the old days of drag-N-drop GUI of Delphi, really easy.

9 comments

> Since I started with Delphi when I was 14 (I am now 33)

Almost the exact same experience: started at 14 and now close to 30.

Back in the day, we used to exchange game CDs in my small town, and by a mistake I got one with Delphi 5. I knew nothing about programming, just installed it, clicked around, somehow managed to run the default app, and got an empty window. We didn't have internet, so I had to ask around what this thing was about, someone said all other programs were done with it. There were no books about Delphi in local bookshops, the closest I found was an introductory book about Visual Basic. Armed with a book on VB and Delphi 3, by trial and error I had managed to produce my first ever working apps.

Few months later I was a well-known "programmer" in my town and wrote my first production ready app: a management system for a taxi company that managed exactly 20 cars. Why twenty? Because I haven't figured out loops and all my loops over those 20 cars were "unrolled" - 20 consecutive lines of if/else statements! But it worked! I don't know for how long, but it was still in use when I moved from the town few years later.

> Delphi 5 instead of Games CDs

LOL!!!!

> 20 consecutive lines

Haha that's nice think about trial and error.

Cool history!

I wish I could upvote this several times. That's my exact experience as well.

I would like more people to experience what was the way of creating software with Delphi, seamless and easy, really closing the loop between creating and the resulting application and then look back at what unnecessary complexity we are dealing with every day when working with software. (nb I think there was a blog somewhere by one of Delphi's creators where they explicitly mentioned that the language and IDE were designed to be simple to use).

If I will be teaching programming to my children I will dig up old installation of Delphi 7 and just let them play.

Absolutely. I did GUI programming with Delphi in high school, then haven't touched it till now, and I am somewhat shocked how the ability to create desktop (or web) GUIs today seems to lag so much behind how I remember Delphi.

Might be nostalgia speaking, but even if it doesn't lag behind, I'm pretty sure it hasn't gotten better. I guess QT Creator actually comes close.

(Plus: Compile times were never ever an issue...)

The majority of tools for native apps desktops and mobile OSes (minus deployment) still comes close to Delphi.

Now for the web, nevermind.

I don't do desktop app dev, but what tools are there? I'm aware of .NET under Visual Studio and NetBeans UI designer.
.NET has Windows Forms and XAML Visual Studio designer, and Blend for XAML.

Java has Netbeans Matisse for Swing, Eclipse WindowsBuilder for Swing and SWT, Scene Builder for JavaFX, Android Studio designer. Not sure what InteliJ offers.

Objective-C and Swift have the XCode GUI design tools, based on the NeXTStep development environment.

C++ has UI designers for Qt/QML, C++ Builder, UWP/XAML.

Object Pascal has Delphi and Lazarus.

Xojo as Visual Basic dialect also has its own designer.

Commercial Common Lisp environments like Alegro CL and LispWorks also have their designers in the tradition of Lisp Machines.

Smalltalk environments also have GUI designers.

These are just some examples that come to my mind.

I did that with Lazarus. Only real difficulty is finding kid-centric tutorials, but they manage.
I feel similar nostalgia about HyperCard on the Mac.
Also started Delphi at 14, now 37. Always had a soft spot for it, but Borland managed it into the ground, and the later owners never figured out a way to make it successful again, even though to this day it has a lot of unrealized market potential.

I often think nostalgically back to my NT4 system. A full office suite, photoshop, and delphi IDE running side by side in 128 MB of RAM, with room to spare, and very zippy. I see some functional improvements in modern day software, but nothing that warrants the incredible bloat.

I notice that the software industry as a whole still lives in the assumption that hardware can fix slow software. However, that doesn't seem to be the case. If you look at single-threaded performance the improvements are much less than they used to be. We may reach a point where CPUs stop getting faster at all. At what point should we go back to micro-optimizing our code?

Hell, just optimising would be a start.
Delphi 7 was last of greatest IDE (on that time) exists. New one add .Net and became larger and unstable. Probably 2007 bring stability.

I also start with Pascal (Turbo 3, 4, 5, 5.5 (greatest!), 6 and little bit 7). Then jump to Delphi (all 1-7) and then abandon it.

Yeah, I used Turbo Pascal, starting with TP 1.0 on 8 MHz, 8 bit Z80 with 64kB RAM (entire compiler and TUI in 64kB! compiled even large programs in a few seconds).

Much kudos must go to Anders Hejlsberg, who wrote the compiler in assembly language, starting on it at age 20[1]. Hejlsberg went on to create Delphi, J++, C#, and TypeScript.

I still regard TP 1.0 as one of the best software products I've used, and feel it is a testament to brilliant, performant, compact software development - and to its developer.

[1]: https://en.m.wikipedia.org/wiki/Anders_Hejlsberg

Which is one reason I am still sore about the whole VM thing instead of adopting AOT compilation from the get go.
"But I still miss the old days of drag-N-drop GUI of Delphi, really easy."

How many years later and the web still does not catch up.

In order to do a Delphi-like product for the web, you need to solve these problems:

1) JS isn't discoverable from the perspective of the IDE. There's no static typing and no way for the IDE to hook up code to UI elements, and vice-versa. You need a statically-typed language that can transpile to JS without too much "impedance mismatch".

2) HTML layout functionality isn't really geared for the type of layouts that are present in desktop applications. Document-oriented layouts have a completely different set of requirements.

3) You have to solve the design-time/run-time issue, and this is not an easy issue to solve due to 1). You can't just use a browser engine at design-time for the WYSIWYG portion, so you need to create a whole "browser emulation" layer in the IDE, along with an execution environment for your statically-typed language.

Our product, Elevate Web Builder, solves these issues and implements a Delphi-like IDE for developing single-page web applications:

https://www.elevatesoft.com/products?category=ewb&type=web

We've got a new version coming out soon that will also offer server-side coding in Object Pascal, giving developers a single-source-language approach to developing complex web applications.

Your IDE looks cool especially for Object Pascal die-hards but your way wrong with JS. One doesn't need static typing to discover patterned functions. You need a convention and a parser that can recognize that convention.
Thanks.

Re: patterned functions: you can't rely on patterned functions in a full-featured IDE that allows any class method to be an event handler/delegate for another class instance. What you end up may look like what Delphi is doing, but it is just an approximation of the real thing that won't work very well for general-purpose usage. There's going to be all sorts of edge cases that don't work correctly because you can't get a reliable signature for a given method.

Smalltalk was able to do #1 in the 70s without static types.
And also #3.1: you program within the environment you are programming.
I'm not familiar enough with Smalltalk to comment, but I'm guessing that it had a formal, discoverable system of hooking events to event handlers. Was that the case ?
There is no "formal" system for events, but there are patterns and most Smalltalk systems follow. For example, Pharo makes use of an object called `Announcer`, which you then subclass to make your own announcements. It works similarly to a pub/sub pattern, but using pure live objects and by sending specific messages to subscribers.

Previously, systems like Squeak used a pattern where objects had a collection of "dependents" that would be updated when sent the `changed` message. I think this is still how input events -- keys, mouse, etc -- work in Morphic.

In either case, the "handler" is whatever you want it to be, so long as the target object implements the appropriate message.

As for discoverable, I'd say most things in a Smalltalk are easily discoverable, though some of the patterns can get convoluted if you're inheriting an ancient object structure.

Thanks, very interesting. I think a lot of the confusion here is over my terminology and a general lack of understanding about what the Delphi IDE is actually doing.

By "discoverable", I mean can the IDE:

1) Compile/analyze the code in the component library/run-time,

2) Figure out which type of method can be used for a certain type of event property for a given class, and

3) Display all matching methods in the current unit/module for the user to select.

This is what Delphi does (and Visual Studio with WinForms), and all of it is done at design-time, meaning that your application is not getting compiled in order to determine any of this.

From what you're describing, I don't think Smalltalk is doing the same thing. However, it could be doing something similar if it enforces (at design-time) this part:

"so long as the target object implements the appropriate message"

I think this is because of the unpredictiveness of html/css. The css api is not intuitive and there is difference between browsers.
True, but we've solved that reasonably well enough when hand-coding that slapping a GUI code generator on top of it should be workable.
A GUI web site generator is trivial and many already exist. The difference between the web and traditional desktop based programs is that you have a lot more freedom in constructing the experience on the web. Whereas a typical WinForms app is made up of a bunch of drag and drop common controls like the button or text edit, simple text editing and buttons can take many different creative forms to best suit the intended experience.

So I guess another way of saying it is that older desktop based technologies like WinForms are more geared towards purely functional experiences. The web can go above and beyond providing merely functional experiences. The aesthetic and the experience as a whole is important.

>A GUI web site generator is trivial and many already exist.

>older desktop based technologies like WinForms are more geared towards purely functional experiences. The web can go above and beyond providing merely functional experiences.

Not talking about web sites here, but web apps, which in the modern sense are much more aligned with desktop apps than websites of old.

I meant web apps. Modern web apps offer a lot of freedom in constructing the precise experience we want the user to get. This is unlike traditional desktop applications with the cookie cutter controls that behave the same way from app to app.
Web is much more advanced (and complex), and that's why you can't just drag and drop. Or can you? Remember Wix.
Do you really know how complex Win32 GUI is on low level? Yet Delphi manages it nicely and wraps it up into handy abstractions.
I don't really know anything on low level.

But I've never seen any layout render engine with the same feature set as modern HTML/CSS engines.

XAML is comparable.

HTML has more features about layout. Also styling is more flexible in HTML.

XAML has better rendering (esp. in WPF), better alpha blending (esp. in UWP), much better animations, better vector graphics, and better editor (you can create acceptable layouts using WYSIWYG, not touching raw markup). Also it has templating, data binding, and other features not found in HTML.

I imagine you never used Qt, Gtk, Motif, NeXTStep, XAML, iOS or Android layout managers, for citing a few possible examples.
True, iOS and Android have fairly decent native render engines.

Other technologies cited are very limited, not even close to what current web technologies offer.

Bubble.is is Delphi for the web, but better.
Delphi and VB4-6 used to be the RAD tools. (RAD = rapid application developed) One could drag and drop controls and create an GUI application in WYSIWYG-style. Then in 1999 when Microsoft abdomen VB for their new dotNet vision, MSFT was about to be split up, etc Web took over and Dreamweaver (and Frontpage) offered a similar IDE experience for HTML4 with a tables and PHP (or ASP, etc). To this day VB6 has the easiest to use RAD IDE, no other newer IDE allows one to create GUIs that fast. Nowadays XCode has a good GUI tool. Traditional Windows applications are out of fashion for many years. Only Win32/64 games are made, everything else is crosspatform electron JS apps or legacy apps that get a yearly minor update. Android and iOS apps thrive, and SaaS web apps too. And on Windows UWP hasn't got traction, it's like a failed experiment - I use zero UWP apps, 1% dotNetFramework4 apps and 99% WinAPI C++ based apps.
You don't use the Start Menu in Windows 10 or the Settings application or the calculator or the WiFi menu or the Action Center or ...? UWP apps are more ubiquitous than you think they are in Windows 10. Zero times visited the Windows Store to directly install apps? Sure, that's possible. Actually using Zero UWP apps? Increasingly unlikely.

UWP isn't a failed experiment by most measures, and you may not directly notice the API transition in many major Windows components from Win32 to UWP, but it's happening.

For what it is worth, the RAD experience for UWP is pretty good and if you want to make a not-very-well-architected "VB6-ish code behind" app with Visual Studio RAD tools, you can knock it out in about the time it would have taken you in VB6.

I have tried Win10, but all these new UWP based parts tacked on Win7 shell are so laggy. I mean click on start button, it takes several noticeable milliseconds to show up, the same for the windows clock pop up (calendar), etc. even the calc has now a loading screen and animation. And even though these UWP parts like the start menu are coded in C++ for the UWP API, they are like 100 times slower than the old C++ WinAPI based applications. I know, I had a discussion with the MSFT startmenu devs over here on HN in a thread several months ago - it's a lot less responsive than what could be done with a WebView control and HTML and CSS yet it's even solver than both a webview and a native C++ WinAPI implementation - sucks. I stay with Win7, which is superb and doesn't suck.
UWP might not get traction among HN crowd, but it is surely getting traction at heavy Windows shops.
there needs to be a delphi for react. I remember starting to learn components in delphi, never got round to it but I think you could composed them like with react and also style them.
We could have something like that if Web Components were actually a thing, but they are only properly supported on Chrome.
It's time we just make wasm render raster and vector graphics directly and throw the DOM away, i'm sick of it already.
I firmly believe that once WebAssembly matures, we will have the renaissance of browser plugins, just wait for it.

There are already people playing with prototyping language runtimes into it.

Vuejs is wonderful, I love it