Live data from Hacker News

I come here not to bury Delphi, but to praise it (2019)

accu.org

51–60 of 113 posts

Re: I come here not to bury Delphi, but to praise it (2019)

#51
post #44
post #37

Earlier quoted context omitted.

I get a bit of nostalgia when coding in Typescript, Kotlin, Swift. It is a sweet revenge that most modern languages, have decided to go with the Pascal influenced approach (yes some ML as well), even most of the C++ wannabe replacements (with exception of Circle).

Yeah go is basically Pascal with C/Java syntax and first class coroutines. What could have been.

Go has a different path, though, but Niklaus Wirth presence is still there, thanks to Oberon-2 influence, coupled with Limbo.

Re: I come here not to bury Delphi, but to praise it (2019)

#52
post #27
post #22

Earlier quoted context omitted.

> I started with Turbo Pascal 3, Moved to 4, 4.5, 5, 6 then Delphi. Somewhere in there moved to "C" and then "C++". I never understand why people use "C" as opposed to C. Does anyone use "Pascal" as opposed to Pascal?

If it was Borland's compiler suite it may or may not have been perfectly standards-compliant, hence the quotation marks. The Borland suite from the early 90s seemed to be pretty relaxed/forgiving about what was valid C/C++. My school utilized Turbo C++ 3.0 for instruction (and later 4.5), which implemented some weird subset that was pre-C++98. Plenty of things that I was doing when targeting the Borland compiler barf…

Borland C++ was released before 1993. No wonder it didn't support C++98 at that time.

Re: I come here not to bury Delphi, but to praise it (2019)

#53
post #19
post #17

I started with Turbo Pascal 3, Moved to 4, 4.5, 5, 6 then Delphi. Somewhere in there moved to "C" and then "C++". Couple of observations: - Using C (Borland or Microsoft) required two floppy disks - one for the compiler, one for the linker. With most of the Pascal versions you end up just needing one floppy disk, later it didn't matter as we moved to HDD. - First "terrible" experience (by a friend) - he moved from Pa…

Most of the demo coders that I followed (I wanted to become one, but never did anything significant there), and demo docs were done using Pascal. Eastern europeans (like myself) seemed to prefer it more for some reasons. TSR applications while a bit large than pure .asm were possible!

When working on demo effects, I found it extremely important to have lightning fast edit-compile-run cycles. Before interactive demo editing tools became a thing, we had to modify code and recompile it to see anything. With Turbo Pascal (or TASM for that matter) you'd have results in under a second. Every now and then your demo would crash, but having set up AUTOEXEC.BAT to start Turbo Pascal, you'd be back in your editor in a few seconds.

I just don't understand how people can put up with waiting for compilers, Docker image downloads, and "continuous integration" builds that take upwards of whole minutes. Granted, it takes some effort to get things fast, but it is perfectly possible on modern hardware to have lightning fast compilation, and runtime replacement of modules. For some reason most people just don't care, and it sometimes makes one feel terribly lonely.

Also, inline assembly was really nice!

  asm
    mov ax, 13h
    int 10h
  end;

Re: I come here not to bury Delphi, but to praise it (2019)

#54
post #36

Earlier quoted context omitted.

> The no-circular-dependencies rule was a huge pain though. It allowed the compiler to be very fast (along with it basically not optimizing), but no other language has copied this C++20 Modules, .NET Assemblies, D modules, Ada packages, and plenty of other othes. Also, Turbo Pascal did indeed allow for circular dependencies between units, as long as the related uses statements were written in the implementation secti…

Modules and assemblies are different. Lots of languages ban circular dependencies between modules (most!). Delphi units were single source files though, and that's a much more painful proposition because it forcibly links source file size and program architecture. I saw a lot of big unit files in Delphi code bases.

Apparently no one read the part about dependencies being allowed between implementations section, and I imagine also never looked into Delphi packages, in regards to code size and organising units.

Re: I come here not to bury Delphi, but to praise it (2019)

#57
post #42

I know he's talking about Delphi here, but FreePascal+Lazarus is still one of my secret weapons. It has some sort of supernatural force field which causes people to ignore it and unfairly denigrate it; meanwhile I whip up desktop applications in hours that would normally take days.

Last time I looked at this I couldn't really find an easy standard way to make HTTPS API calls and parse JSON, but only spent an hour or two playing with it. Can you point me at the canonical way to do this? What's the Requests of FreePascal?

Free Pascal has fcl-web which should provide a HTTP/HTTPS client (among other things, it can be used to make web apps), though it comes with libcurl bindings out of the box so you could also use that too. fcl-json provides a JSON parser. FWIW "fcl" means "Free Component Library" which contains various tools (mainly exposed as classes).

The packages[0] directory of FPC contains a lot of stuff that come out of the box with the compiler and they often have an "examples" and/or "tests" directory with code you can check. There is some documentation[1] but sadly FCL is really not that well documented - you just have to check the sources for most things.

Note that this is for Free Pascal itself. Lazarus builds on it (LCL, the "Lazarus Component Library", is built on top of FCL) and adds a bunch of additional components of its own. Though usually for non-GUI stuff you just use the Free Pascal classes, Lazarus has some of its own "wrappers" that integrate with the IDE and the form/object designer. The "weblaz" package (it comes with Lazarus but you need to install it manually from Package -> Install/Uninstall Packages) provides a bunch of components for working with the web (mainly for making web apps), including the "TFPHttpClient" component which can be used to make HTTP requests. As a simple example, if you throw a TMemo (multiline text editor) control in a form, throw a TFPHttpClient component and then doubleclick on the form to edit the code to execute during the form's creation you can type "Memo1.Text:=FPHTTPClient1.Get('https://news.ycombinator.com/');" and it will put the HTML code for this forum in the memo (note that you may also need to add the opensslsockets unit in the uses section at the top of the code). Of course that is a very simple example but if you browse the properties and events of the component in the object inspector as well as the available methods by typing "FPHTTPClient1." and pressing ctrl+space in the code editor you can find most of the other functionality the component provides.

[0] https://gitlab.com/freepascal.org/fpc/source/-/tree/main/pac...

[1] https://www.freepascal.org/docs-html/current/fcl/index.html

Re: I come here not to bury Delphi, but to praise it (2019)

#58
post #52
post #27

Earlier quoted context omitted.

If it was Borland's compiler suite it may or may not have been perfectly standards-compliant, hence the quotation marks. The Borland suite from the early 90s seemed to be pretty relaxed/forgiving about what was valid C/C++. My school utilized Turbo C++ 3.0 for instruction (and later 4.5), which implemented some weird subset that was pre-C++98. Plenty of things that I was doing when targeting the Borland compiler barf…

Borland C++ was released before 1993. No wonder it didn't support C++98 at that time.

Not only that, but Borland also had extensions in their C++ compiler to simplify the development of GUI code (similar but different to the tricks Microsoft also used in their compilers).

Re: I come here not to bury Delphi, but to praise it (2019)

#59

I know he's talking about Delphi here, but FreePascal+Lazarus is still one of my secret weapons. It has some sort of supernatural force field which causes people to ignore it and unfairly denigrate it; meanwhile I whip up desktop applications in hours that would normally take days.

The best part is that Lazarus is write once, compile anywhere. It works on all major desktop OSes and even some less mainstream ones.

Yeah though in practice it is more "write once, compile anywhere, debug everywhere" :-P as there are often minor (and sometimes major) inconsistencies between the underlying widget libraries (not Lazarus' fault though, if anything there is a lot of effort put into providing as much consistency as it can).

Re: I come here not to bury Delphi, but to praise it (2019)

#60
post #55

How is it possible that one man was responsible for the creation of Turbo Pascal, Delphi, C#, and TypeScript? [1] I don't look up to many people, but here's one. [1] https://en.wikipedia.org/wiki/Anders_Hejlsberg

He didn't spend all his time shitposting BBS/Newsgroups/Slashdot/HN while pretending he knew the one simple trick to obviate global political and economic turmoils?
Post reply on HN