Recent

Author Topic: two statistical questions  (Read 4821 times)

Witek257

  • Newbie
  • Posts: 3
two statistical questions
« on: May 30, 2016, 10:34:33 am »
Hi. Writing a middle size application in Lazarus, I met with a problem. Solving it, I had to deep into fpc units source code. I found the bug in one of them, but what is more important, I found that rather simple task was coded in very complicated and messy way.
I’ve some experience in programming and found Lazarus+fpc a very interesting project, but before devoting to this project I would like to find answers to two questions:

how wide fpc and Lazarus are used (not exact statistic, but some estimates)

how often applications made with fpc and Lazarus are written for more than one system

Thaddy

  • Hero Member
  • *****
  • Posts: 8182
Re: two statistical questions
« Reply #1 on: May 30, 2016, 12:40:26 pm »
First: show us the very complicated and messy way? Cross-platform code is not necessary messy. We really would appreciate it if you show us where?

Second: the only way to guestimate the use is to look at the number of downloads, but even that is susceptible to wrong interpretation since e.g. the major Linux distributions provide their own FPC/Lazarus packages. And there are secondary outlets, like CodeTyphon. And people like me build everything from SVN (both fixes and trunk) and don't download distro's. There are *a lot of* people who build from source.

My guess is: on a cross-platform basis several 10.000th of users. On a professional basis (also occasional) several high 1000's, may be 10.000's. Installed base is much larger. It is not niche but neither is it main stream. Like the language itself.

The reason behind this is mainly the prohibitive cost of new Delphi licenses and the maturity of both FPC (for a long time) and Lazarus (by now). And a really active community.

Simply put: I do not know of any proficient professional Delphi programmer who is not using FreePascal at some point.

Mark Twain is still right insofar as  https://en.wikipedia.org/wiki/Lies,_damned_lies,_and_statistics
« Last Edit: May 30, 2016, 12:56:39 pm by Thaddy »
Read the manuals and if you are a professional get a proper education in computer science. Makes the forum a lot cleaner.

LacaK

  • Hero Member
  • *****
  • Posts: 577
Re: two statistical questions
« Reply #2 on: May 30, 2016, 02:17:29 pm »
I found the bug in one of them, but what is more important, I found that rather simple task was coded in very complicated and messy way.
No one is perfect! :)
If you find a bug please report (and if you can fix it, provide patch) at http://bugs.freepascal.org

Thaddy

  • Hero Member
  • *****
  • Posts: 8182
Re: two statistical questions
« Reply #3 on: May 30, 2016, 02:31:30 pm »
Some influential people are actually reading this ;), so some off-the record and therefore highly suspicious extra "statistical" information: The amount of current Delphi subscriptions are less than 50.000 (this is my high estimate of the actual mentioned numbers by the source) world wide as per my source. The amount of current Delphi users is much, much higher (at least 2.000.000). Now I'd say my previous suggestion is about spot-on.
Read the manuals and if you are a professional get a proper education in computer science. Makes the forum a lot cleaner.

BeniBela

  • Hero Member
  • *****
  • Posts: 678
    • homepage
Re: two statistical questions
« Reply #4 on: May 30, 2016, 02:37:21 pm »
I found the bug in one of them, but what is more important, I found that rather simple task was coded in very complicated and messy way.

That is so typical for Lazarus

Like every other class that needs to sort something implements its own QuickSort. Half a dozen implementations of the same algorithm. Or perhaps it was a dozen?

Last week I wanted to finally drop the LCL dependency, but I was still using a function to copy a directory. I thought I just copy that function to my unit. After digging through 7 files and thousands of lines, I gave up and just wrote my own function with a tenth of the length.

Thaddy

  • Hero Member
  • *****
  • Posts: 8182
Re: two statistical questions
« Reply #5 on: May 30, 2016, 02:41:22 pm »
I found the bug in one of them, but what is more important, I found that rather simple task was coded in very complicated and messy way.

That is so typical for Lazarus

Like every other class that needs to sort something implements its own QuickSort. Half a dozen implementations of the same algorithm. Or perhaps it was a dozen?

Last week I wanted to finally drop the LCL dependency, but I was still using a function to copy a directory. I thought I just copy that function to my unit. After digging through 7 files and thousands of lines, I gave up and just wrote my own function with a tenth of the length.

Well, that sums it up: capable programmer refuses to contribute to a better state of the standard LCL libraries....that he actually would like to use.
Note that I wonder if you would think the same about the FPC provided libraries: these are in pretty good and consistent shape in the form of both RTL and FLC (by by any norm).

I concur LCL is a mess in places, but the developrs seem open to genuine improvements.
Read the manuals and if you are a professional get a proper education in computer science. Makes the forum a lot cleaner.

Witek257

  • Newbie
  • Posts: 3
Re: two statistical questions
« Reply #6 on: May 30, 2016, 04:51:05 pm »
Thanks for everybody. I apologize, if somebody feel piqued by my post. Some code is better, and some is worse, as all in life. I ask my question to find how much efforts it's worth to put into improvement of Pascal project, and if it's a good idea to separate versions.

Reading posts in the thread "The future of Free Pascal" I wonder why Lazarus, couldn’t be better than Delphi and more popular? One of the steps to achieve that goal is to put source code into a database. This would give innumerable possibilities: for example new ways of commenting the code. By the way, “comments” may be the key value of Lazarus (year ago a got a piece of code written in machine language where the ratio: comment to code was about 10:1 (!))

Thaddy

  • Hero Member
  • *****
  • Posts: 8182
Re: two statistical questions
« Reply #7 on: May 30, 2016, 05:44:25 pm »
We would still like to know where to find the over-complicated code and the place you found a bug ?
The nice thing is: if it is really over-complicated or really a bug, it usually gets fixed very, very quickly!
Read the manuals and if you are a professional get a proper education in computer science. Makes the forum a lot cleaner.

Witek257

  • Newbie
  • Posts: 3
Re: two statistical questions
« Reply #8 on: May 30, 2016, 06:17:42 pm »
unit FmtBCD,  function FormatBCD raise exeption when BCDToStrF use coma as decimal point

Thaddy

  • Hero Member
  • *****
  • Posts: 8182
Re: two statistical questions
« Reply #9 on: May 30, 2016, 06:31:09 pm »
unit FmtBCD,  function FormatBCD raise exeption when BCDToStrF use coma as decimal point

Then you are using a very old version. This was already fixed in 2.6.4 (or even way before as I recall) which is over 4 years old. Which version of FPC are you using? Support starts from version 3.0.0. The older versions are unsupported.

The other option is that your locale settings are not right: since FPC 3 (maybe 2.6.4?)  these are, like Delphi, governed by a global record and settings can be changed.
[edit]
To be sure I tested with FPC trunk from today and this issue is no longer present.
From memory I know it was fixed a long time ago, so install a proper, free and recent version of FPC and Lazarus ;)
« Last Edit: May 30, 2016, 06:37:45 pm by Thaddy »
Read the manuals and if you are a professional get a proper education in computer science. Makes the forum a lot cleaner.

jwdietrich

  • Hero Member
  • *****
  • Posts: 1021
    • formatio reticularis
Re: two statistical questions
« Reply #10 on: May 30, 2016, 10:39:12 pm »
Over the previous 16 years Free Pascal was downloaded 4.3 million times and Lazarus 5.7 million times from SourceForge (effective May 2016, with growing tendency superposing a peak in 2012).

However, these numbers shouldn't be overrated, since, as @Thaddy pointed out, some people install from Linux repositories or alternative Lazarus distributions or compile from source, and, on the other hand, most users download and install multiple Lazarus and FPC versions over the time. The numbers are still impressing, however.
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 2.0.2 | FPC 3.0.4 | PPC, Intel, ARM | macOS, Windows, Linux

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 5465
    • wiki
Re: two statistical questions
« Reply #11 on: May 31, 2016, 12:37:05 am »
Over the previous 16 years Free Pascal was downloaded 4.3 million times and Lazarus 5.7 million times from SourceForge

Which doesnt tell anything about the amount of people behind it, because the same person would over time download each version.

But looking at just the latest version 1.6.0 + 3.0.0, and just one OS (Windows)

over 53.000 win 32 Lazarus+fpc downloads on sourceforge
over 81.000 win 64 Lazarus+fpc downloads on sourceforge (may have duplicates with the above)
and another 72.000 Fpc only downloads on sourceforge (may have duplicates with the above)

Add to that downloads from mirrors, 3rd party [1] and svn.

For linux there are about 20.000 downloads (only counting lazarus), but then most linux distros have Lazarus in there repository and people may be using those.

[1]
getlazarus, codetyphon, download providers like heise.de/download, ...


I havent compared individual releases right now, but from memory I think numbers are growing.

LacaK

  • Hero Member
  • *****
  • Posts: 577
Re: two statistical questions
« Reply #12 on: May 31, 2016, 07:45:24 am »
unit FmtBCD,  function FormatBCD raise exeption when BCDToStrF use coma as decimal point
If you have case (source code), which shows error please share it here