Recent

Author Topic: Why isn't Lazarus / Free Pascal more popular?  (Read 13036 times)

JD

  • Hero Member
  • *****
  • Posts: 1890
Re: Why isn't Lazarus / Free Pascal more popular?
« Reply #15 on: April 26, 2025, 07:57:46 pm »
On web/mobile applications, I use something else that can give the modern look and feel of such applications.
Just curiosity... if you don't mind sharing, what do you use to develop web/mobile apps ?

Thanks.

Mostly Java and some HTML/CSS and Javascript (via the Chartjs library and node.js). With Java, I can use frameworks like Vaadin or Eclipse Scout to build a web application that will be mobile ready since I don't do Android development. I consider Javascript to be a massive pain in the behind but looks are everything for modern web apps so I bite the bullet and use it. The good thing is the aforementioned frameworks can limit direct usage of Javascript to a degree.

Cheers,

JD
 
Linux Mint - Lazarus 4.0/FPC 3.2.2,
Windows - Lazarus 4.0/FPC 3.2.2

mORMot 2, PostgreSQL & MariaDB.

440bx

  • Hero Member
  • *****
  • Posts: 5264
Re: Why isn't Lazarus / Free Pascal more popular?
« Reply #16 on: April 26, 2025, 09:41:18 pm »
Thank you @JD, I appreciate the thorough reply.
(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v4.0rc3) on Windows 7 SP1 64bit.

Seenkao

  • Hero Member
  • *****
  • Posts: 702
    • New ZenGL.
Re: Why isn't Lazarus / Free Pascal more popular?
« Reply #17 on: April 26, 2025, 10:35:20 pm »
nor outstanding speed of execution (as programs in C++).
Quote
The only thing in which Delphi and Lazarus compilers are seriously inferior to C++ is the speed of the final code.
Test applications compiled in VC++ run up 2 times faster than the same algorithms in Delphi or Lazarus.
Я не думаю что стоит подобное писать.

Если вы сравниваете просто компиляторы, куда программист отправляет всё что захочет, не заботясь о том как оптимизирован код и просто "набросав" код как попало (что в последнее время и происходит по большей части), то тут понятно дело что победит компилятор, которому больше внимания уделяли и в который вложили больше средств и сил.

Но я бы хотел напомнить, что не компиляторы пишут код. И человек пишущий на Python, может написать более быстродействующую программу, чем другой человек пишущий подобную программу на C/C++.

Я сам лично убеждался, что многие люди не хотят заморачиваться оптимизацией, им нужен результат. И побыстрее.
Я давал задачку людям, по оптимизации кода. Ни кто не думал. Все просто скормили код компилятору и получили конечный результат, в 37 строчек кода ассемблера. Один человек который до этого писал на Pascal, оптимизировал и получил примерно то же самое количество строчек ассемблерного кода (чуть меньше).
Я показал конечный результат сделанный на Pascal, где компилятор FPC выдавал 20 строчек ассемблерного кода. При этом, если бы люди подумали, позадавали наводящие вопросы и в самом деле хотели решить подобную задачку на C/C++, то их конечный код мог получиться 16 строчек ассемблерного кода.

Не важен ЯП. Важен человек использующий этот ЯП.
------------------------------------------------------------------------------------------------------

Google translate:
I don't think it's worth writing something like that.

If you're just comparing compilers, where a programmer sends whatever he wants, not caring about how the code is optimized and just "scribbling" the code down anyhow (which is what's been happening lately for the most part), then it's clear that the compiler that was given more attention and invested more resources and effort will win.

But I'd like to remind you that compilers don't write code. And a person writing in Python can write a faster program than another person writing a similar program in C/C++.

I've personally seen that many people don't want to bother with optimization, they want results. And faster.
I gave people a task about code optimization. No one thought. Everyone just fed the code to the compiler and got the final result, 37 lines of assembler code. One person who had previously written in Pascal optimized and got about the same number of lines of assembler code (a little less).
I showed the final result made in Pascal, where the FPC compiler produced 20 lines of assembler code. At the same time, if people thought, asked leading questions and really wanted to solve a similar problem in C/C++, then their final code could have been 16 lines of assembler code.

The PL is not important. The person using this PL is important.
 ;)
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.

Eng: I strive to create applications that are minimal and reasonably fast.
Working on ZenGL

Lenny33

  • New Member
  • *
  • Posts: 22
Re: Why isn't Lazarus / Free Pascal more popular?
« Reply #18 on: April 27, 2025, 01:32:23 pm »
If you're just comparing compilers, where a programmer sends whatever he wants, not caring about how the code is optimized ...
We compared the quality of the final code on exactly the same algorithms.
But the result of the final assembly code in Delphi and Lazarus is not very good.
There are a lot of unnecessary movements between registers even at maximum optimization and floating point calculations are not optimal either.
I have already said that in our case of signal processing the speed of calculations is very important.
And for example the same Butterworth filter or Chebyshev filter or Eleptic filter algorithms or matrix calculations compiled with C++ give a 2 or more times increase.
Are you suggesting that we write it every time in assembly language like Delphi and Lazarus programmers sometimes have to do?
Thank you, but we don't want to suffer like that. It is much easier for us to write these parts of the application as C++ libraries.
But the funny thing is that the same algorithms even in non-native Java work much faster.

Search the Internet for sources of simple tests for different compilers. For example scimark2.
There is a version translated for C, C# and Pascal.
The speed of the final code in Lazarus can be compared only with C# and in some algorithms it is several times slower than C++ and even Java.

But we are more than satisfied with the speed of creating the final interface for the two platforms using Lazarus (because it's a very convenient cross-platform desktop RAD tool)
Although this is only because the beauty of the interface is not so important in our case and we don't need WEB-interface yet.
« Last Edit: April 27, 2025, 07:37:42 pm by Lenny33 »

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 11130
  • Debugger - SynEdit - and more
    • wiki
Re: Why isn't Lazarus / Free Pascal more popular?
« Reply #19 on: April 27, 2025, 02:05:29 pm »
About the speed.

There are a lot of "half true" or biased statements out there (and mine likely will be too, since a complete answer would likely be rather very long...).

Also this is not a critic @Lenny33, whose answer is accurate.

IMHO, there should be added:

A lot of applications will sit idle most of the time. Code for those apps really doesn't care about the extra speed.

And within apps that are running long stretches of CPU bound work (like the examples by Lenny33) the code that does the work, is but a small part of the app (in lines of code). An app running filters like that, will have plenty of code surrounding it, like reading options, checking params, ... before they do the work.

Of course - for those parts of code - that a highly CPU bound, there is indeed a noticeable difference between compilers (NOT languages / even if potentially the faster compilers only exist for other languages).



So for many programmers - based on the tasks they will have to conquer - that speed diff will be a minor factor. It may still be there, but be theoretical at most.

That is not to say that it isn't important. But in perspective, its importance is the importance of one feature in a great many.



As for assembler...

A lot of those issues can be solved by still using Pascal. But they require knowledge of "how to help the compiler". And that should definitely not be needed.

Also that may still not get the same as some of the faster asm, or pure asm. But a good deal closer.


CM630

  • Hero Member
  • *****
  • Posts: 1321
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: Why isn't Lazarus / Free Pascal more popular?
« Reply #20 on: April 27, 2025, 05:01:32 pm »
Pascal might have never been considered a serious language in the world of 8bit computers, but after Win95 was released, there were 3 options: Delphi, Visual Basic and Visual C.
Visual C was not visual, MS hindered their own Visual Basic, before killing it.
Java was promising some multiplatform features (many of us were expecting Linux to become user friendly and become popular,  sadly it did not), but to this day I have not seen a decent desktop app written in Java.
 Delphi was really popular before .Net.
Then MS hired Hejsberg, Sun kept on developing Java.
Delphi became expensive, Lazarus did not grow up in a day and was late.
2,5 % in Tiobex does not sound bad, but job platforms know nothing about Pascal.
Лазар 4,0RC2 32 bit (sometimes 64 bit); FPC3,2,2

Handoko

  • Hero Member
  • *****
  • Posts: 5417
  • My goal: build my own game engine using Lazarus
Re: Why isn't Lazarus / Free Pascal more popular?
« Reply #21 on: April 27, 2025, 06:01:10 pm »
Glad to see everyone is providing their opinions. Maybe we should start talking about what can we do to make Lazarus/Free Pascal/Pascal better and more popular.

Lets start from me. I am just a self-taught hobbyist, I have very limited knowledge in programming.  I cannot use C and I know very little about programming paradigm. I ever tried but I could not help in bug fixing and the developing. So if I have time, I will hangout here welcoming new users and help newbies. I like coding, you probably will see many short demos I wrote in the forum.

LV

  • Sr. Member
  • ****
  • Posts: 263
Re: Why isn't Lazarus / Free Pascal more popular?
« Reply #22 on: April 27, 2025, 07:32:46 pm »
Search the Internet for sources of simple tests for different compilers. For example scimark2.
There is a version translated for C, C# and Pascal.
The speed of the final code in Lazarus can be compared only with C# and in some algorithms it is several times slower than C++ and even Java.

I’m not trying to criticize or argue with anyone; I just want to make remarks.

1. Free libraries that offer low-level vector optimization are available for standard algebraic operations, such as matrix multiplication. These libraries can be easily integrated into Free Pascal code.

2. The decision to use FPC-Lazarus for high-performance applications that rely on original algorithms is a topic of debate. One participant in this forum reported on the efficiency of FPC in comparison to C++: https://forum.lazarus.freepascal.org/index.php/topic,68370

Seenkao

  • Hero Member
  • *****
  • Posts: 702
    • New ZenGL.
Re: Why isn't Lazarus / Free Pascal more popular?
« Reply #23 on: April 27, 2025, 07:59:10 pm »
Lenny33, своим ответом, вы лишь подтвердили то что я написал.


Google translate:
Lenny33, with your answer, you only confirmed what I wrote.
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.

Eng: I strive to create applications that are minimal and reasonably fast.
Working on ZenGL

CM630

  • Hero Member
  • *****
  • Posts: 1321
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: Why isn't Lazarus / Free Pascal more popular?
« Reply #24 on: April 27, 2025, 11:08:21 pm »
Glad to see everyone is providing their opinions. Maybe we should start talking about what can we do to make Lazarus/Free Pascal/Pascal better and more popular.
...
I would like to place a nice „Made with Lazarus“ logo on my (the splash screen of) my apps.
On the other hand, my most popular app has 1 user besides myself, so that will probably not help.
Лазар 4,0RC2 32 bit (sometimes 64 bit); FPC3,2,2

silvercoder70

  • Full Member
  • ***
  • Posts: 179
    • Tim Coates
Re: Why isn't Lazarus / Free Pascal more popular?
« Reply #25 on: April 27, 2025, 11:28:40 pm »
A couple of comments torecent videos I made -
  • wait what? how did you et idea to teach Pascal in 2025? is it still relevant?
  • Wait, people still use pascel  and there is a whole yt channel that teach new people pascel?
For the moment forget Delphi and Free Pascal are different beasts...  This is what you/we are have to deal with. It can be worse on Reddit.

There was a similar discussion about Free Pascal mailing list last (?) year that I think went nowhere - except people got to air their grievances.

I am with Handoko here... what can be done?

And from my perspective, it is marketing,the modernization (what people see on the web site), not the language itself. Give something a new coat of paint and people love it. I say that tongue in cheek, but in a commercial world that is also true. :(

I am also very aware there is prolly no budget for either.

/* I am now going back to making another video */

edit: fixed typos
« Last Edit: April 27, 2025, 11:32:29 pm by silvercoder70 »
Explore the beauty of modern Pascal programming with Delphi & Free Pascal - https://www.youtube.com/@silvercoder70

JD

  • Hero Member
  • *****
  • Posts: 1890
Re: Why isn't Lazarus / Free Pascal more popular?
« Reply #26 on: April 28, 2025, 12:21:02 am »
@silvercoder70

You are already doing something very useful with your YouTube channel. I'm very happy to see your work. I believe that is a massive part of what needs to be done - a large community on YouTube. More people learn from those videos than we can imagine. If people see what can be done with it, they might be bothered to try it out.

Another thing is lots of example programs to showcase what can be done with Lazarus/FreePascal. I went through the listed example programs in the wiki and some of them do not exist anymore. We'll also need more contemporary examples - multiplatform programming, data structures and algorithms, generics, networking, web, mobile etc. I was happy to see @silvercoder70's weather app example on his channel. That was interesting.

I'm really grateful for the existence of this forum and all our exchanges and efforts over the years to keep this language alive. My C/C++ days are behind me, so Lazarus/FPC is the only tool I rely on to write applications that have similar performance benchmarks to C/C++ so I have a vested interest in it. The assistance we give and receive on this forum helps to keep Lazarus/FPC alive.

Will using DeepWiki indexing be beneficial to Lazarus/FPC?

https://dev.to/fallon_jimmy/deepwiki-an-ai-guide-to-github-codebase-mastery-3p5m

https://deepwiki.org/

Cheers,

JD
« Last Edit: April 28, 2025, 09:50:50 am by JD »
Linux Mint - Lazarus 4.0/FPC 3.2.2,
Windows - Lazarus 4.0/FPC 3.2.2

mORMot 2, PostgreSQL & MariaDB.

Lenny33

  • New Member
  • *
  • Posts: 22
Re: Why isn't Lazarus / Free Pascal more popular?
« Reply #27 on: April 28, 2025, 12:26:48 am »
Lenny33, with your answer, you only confirmed what I wrote.
Fanatics of some platform are usually hard to change their minds.
But it usually doesn't solve the problem of the platform itself.
I already gave you a tip on scimark2, if you are not lazy you can check it yourself. VC++ generates code that is at least 2 times faster than Lazarus or Delphi.
But I hope that the problems of slow code will be solved by switching to LLVM.
Although I am afraid that the problem of language popularity will remain.
F.ex. already now we have been looking for an employee for more than half a year for one of our projects. And finally we found only a person of pre-retirement age.
« Last Edit: April 28, 2025, 12:40:49 am by Lenny33 »

JD

  • Hero Member
  • *****
  • Posts: 1890
Re: Why isn't Lazarus / Free Pascal more popular?
« Reply #28 on: April 28, 2025, 12:33:42 am »
Java was promising some multiplatform features (many of us were expecting Linux to become user friendly and become popular,  sadly it did not), but to this day I have not seen a decent desktop app written in Java.

There are many decent desktop apps written in Java (with Swing or JavaFX). Most of them are proprietary, though. The OpenRocket simulator in an example of a Java Swing application used as a teaching tool in schools in the US.

https://openrocket.info/

Cheers,

JD
Linux Mint - Lazarus 4.0/FPC 3.2.2,
Windows - Lazarus 4.0/FPC 3.2.2

mORMot 2, PostgreSQL & MariaDB.

JD

  • Hero Member
  • *****
  • Posts: 1890
Re: Why isn't Lazarus / Free Pascal more popular?
« Reply #29 on: April 28, 2025, 12:36:07 am »
Although I am afraid that the problem of language popularity will remain.
F.ex. already now we have been looking for an employee for more than half a year for one of our projects. And finally we found only a person of pre-retirement age.

It is the same thing when searching for COBOL programmers. Often people have to come out of retirement to maintain old code.

JD
Linux Mint - Lazarus 4.0/FPC 3.2.2,
Windows - Lazarus 4.0/FPC 3.2.2

mORMot 2, PostgreSQL & MariaDB.

 

TinyPortal © 2005-2018