Recent

Author Topic: Is Lazarus Dying, in part, for Lack of Easy SQL Connectivity?  (Read 28906 times)

dbannon

  • Hero Member
  • *****
  • Posts: 2794
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Is Lazarus Dying, in part, for Lack of Easy SQL Connectivity?
« Reply #45 on: July 05, 2018, 03:55:25 am »

Browse the sources (LCL), when you visit a method in the interface part of a unit it will show you the existing doc and let you edit it.
The actual doc data is in xml files, in the docs/xml/lcl folder.
.....
OK, I'll give that a try.
Quote
Install the package "Cody" (it is part of Lazarus).

OK, maybe thats why they call you a "hero member" - I'll certainly give it a try too. If it solves the problem I mentioned, just how do we get it into the hands of the people who really need it ? 

Thanks Martin, seriously thanks !
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

VTwin

  • Hero Member
  • *****
  • Posts: 1215
  • Former Turbo Pascal 3 user
Re: Is Lazarus Dying, in part, for Lack of Easy SQL Connectivity?
« Reply #46 on: July 05, 2018, 04:14:41 am »
The Subject might seem like I'm trolling or unnecessarily conflating two unrelated topics.
I'm not.

https://www.tiobe.com/tiobe-index/

Per the respected  TIOBE June 2018 index of programming language popularity, "DELPHI/OBJECT PASCAL” HAS PLUMMETED since 2017 from 13th to 19th position; that is a stunning fall.

Plummeted with one year as a reference? Delphi/Object Pascal has remained in the top 20 since 2001. There has been an issue where TIOBE calculated Delphi, Pascal, Free Pascal, Object Pascal separately, thus underestimating the significance of Object Pascal. If you remain in the top 20 for that long it is not a fluke.

Look at the statistics for a language with similar cross platform capabilities, like Xojo. Can't find it? I think they made 99 one year.
« Last Edit: July 05, 2018, 04:30:11 am by VTwin »
“Talk is cheap. Show me the code.” -Linus Torvalds

Free Pascal Compiler 3.2.2
macOS 12.1: Lazarus 2.2.6 (64 bit Cocoa M1)
Ubuntu 18.04.3: Lazarus 2.2.6 (64 bit on VBox)
Windows 7 Pro SP1: Lazarus 2.2.6 (64 bit on VBox)

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: Is Lazarus Dying, in part, for Lack of Easy SQL Connectivity?
« Reply #47 on: July 05, 2018, 05:57:26 am »
Well that's interesting.  That's in alignment with what is being taught, as far as I can tell.

I would suggest it has more to do with the decline in desktop app development (Windows) and the shift to cloud-based development (Linux, AWS). AWS represents more than 3 times the cloud business of the next 3 competitors (MS, IBM, Google). (Source: https://www.economist.com/special-report/2018/06/28/how-to-fix-what-has-gone-wrong-with-the-internet)

Although Amazon is agnostic about what you run on your AWS instances, pricing considerations mean that in practice people tend to run Linux. See the differences yourself, particularly as you get up in the multi-core range:

https://calculator.s3.amazonaws.com/index.html

The shift away from MS/desktop dominance should be good for language diversity, since that means a shift away from MS's languages (C#, VB.NET, C++). Towards what is probably still being worked out.

Are 20 languages viable? Don't see why not.

See this discussion about Google's TensorFlow language evaluation:

https://github.com/tensorflow/swift/blob/master/docs/WhySwiftForTensorFlow.md


white_zombie

  • New Member
  • *
  • Posts: 18
Re: Is Lazarus Dying, in part, for Lack of Easy SQL Connectivity?
« Reply #48 on: July 05, 2018, 08:13:32 am »
Hi,

Tan mentioned precisely the only two database I work on (Postgresql and Sqlite) and my main OS for development (Linux), despite I am not a full time programmer, my field it is engineering, data acquisition and PLC programming, and that I only work with databases from time to time, I can say my experience with database and Lazarus+Freepascal is that it is very easy to do anything.

I think that working with databases are precisely one of the strongest aspects where these tools shine, but maybe my opinion is biased because I am a long time pascal lover and not a new user as I know Lazarus since years.

Best Regards.


mangakissa

  • Hero Member
  • *****
  • Posts: 1131
Re: Is Lazarus Dying, in part, for Lack of Easy SQL Connectivity?
« Reply #49 on: July 05, 2018, 08:51:04 am »
There's a lot of documentation on working with databases on FPC. I also know a beginner who doesn't understand any of the language are 'drowning in the flow *'. That's why I'm creating a document 'How to work with SQLdb and SQLlite step by step'. Unforunally I'll try to find the time to finished it. It's for an article in Blaize Pascal Magaine.

But your problem is not only on SQL. For all new things you have to make time to find out how it works. I still want to find out how TIOPF and Mormot works on my way to understand. For these tools there's a lot of examples or documentation. But trying it self in an own application is very tuff as beginner.

For all these things there is one special word for it: TIME!!!!
Lazarus 2.06 (64b) / FPC 3.0.4 / Windows 10
stucked on Delphi 10.3.1

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9867
  • Debugger - SynEdit - and more
    • wiki
Re: Is Lazarus Dying, in part, for Lack of Easy SQL Connectivity?
« Reply #50 on: July 05, 2018, 12:05:33 pm »
Install the package "Cody" (it is part of Lazarus).
OK, maybe thats why they call you a "hero member"
That is bound to the amount of posts a person has. (500 or more). Be here long enough and you get there...

Quote
I'll certainly give it a try too. If it solves the problem I mentioned, just how do we get it into the hands of the people who really need it ? 

I added it to the wiki: http://wiki.lazarus.freepascal.org/Lazarus_IDE_Tools#Unit_.2F_Identifier_Dictionary_.28Cody.29
The entire page is a must read. I bet you find even more features that you didn't know.
The other page for finding out features is http://wiki.lazarus.freepascal.org/New_IDE_features_since


dbannon

  • Hero Member
  • *****
  • Posts: 2794
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Is Lazarus Dying, in part, for Lack of Easy SQL Connectivity?
« Reply #51 on: July 05, 2018, 01:30:55 pm »
Thanks Martin_fr, I have tried, to some extent both tips and they look like good ones indeed.

Quote
Cody
For those watching from home, this adds a menu item under Source, "show unit / identifier dictionary" and it does indeed look very useful. But installing it does highlight the problem I mentioned. This quite valuable package is described, in the Package Install/Uninstall tool as -
Quote
IDE extensions using Codetools.
Now, thats really going to sell it !

And the DocEditor looks pretty cool too. But clearly going to take a bit of experimenting to understand. But yep, you have answered my question for sure.

And, finally, I get to be a Hero Member for posting 500 requests for help ? Thats sad ....

 :D

Davo

Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

zogtrog

  • New Member
  • *
  • Posts: 20
Re: Is Lazarus Dying, in part, for Lack of Easy SQL Connectivity?
« Reply #52 on: July 05, 2018, 02:14:50 pm »
Lazarus is excellent. What it lacks is marketing. I keep trying to tell everyone learn this one language and cross compile to any platform!
If you are a company boss this means you do not need lots of people specialising in a platform or a language.
I would like very much to be able to contribute more to this excellent community project, but my free time is a very limited resource, and I am not in a position where I can volunteer to do stuff for nothing.


bee

  • Sr. Member
  • ****
  • Posts: 393
Re: Is Lazarus Dying, in part, for Lack of Easy SQL Connectivity?
« Reply #53 on: July 05, 2018, 04:19:06 pm »
Just tried asking gogole for "free pascal lazarus sqlite", it gave me this link: https://www.tweaking4all.com/software-development/lazarus-development/lazarus-pascal-getting-started-with-sqlite/ as the third result. The first two are Lazarus tutorial from the wiki. HTH.
-Bee-

A long time pascal lover.

tan

  • New Member
  • *
  • Posts: 33
Re: Is Lazarus Dying, in part, for Lack of Easy SQL Connectivity?
« Reply #54 on: July 05, 2018, 05:25:30 pm »
Perhaps an SQL datapoint from today's Reddit programming news: https://winand.at/newsletter/2018-07/sql-over-the-cloud-fsyncgate

"SQL’s Rise Continues

Google’s shift towards SQL was already mentioned in my previous newsletter. This time a new article by Google further forwards an argument that Google initiated years ago: in the original Spanner paper (2012) Google said that strong consistency—like that offered by SQL databases—causes fewer problems than the eventual consistency model that is often employed by NoSQL systems. ...... Why you should pick strong consistency, whenever possible.

Moreover Amazon is not afraid to point out a few advantages when it comes to using SQL and the relational model. They tweeted this from their latest AWS re:Invent conference: SQL on the relational schema is orders of magnitude faster than JSON processing.

The marketing term NoSQL, which was the hippest buzzword just a few years back, is slowly becoming a synonym for a defect. ..."
---
I don't know for a fact that SQL importance is surging, as the TIOBE index implied from my first reading.   The indecision over whether  SQL as a "programming language" or not (absolutely is, IMO) adds to the difficulty in answering this definitively.  But that doesn't change SQL's importance.

Personally, I suspect SQLite3 and Postgresql, being free, rigorous, and well supported (vs other choices and commercial alternatives) very much encourages more SQL adoption as a long term trend.  Why go with ad-hoc storage when you can just turn to SQLite3?  Why delay exploration of a complete and top notch multiuser SQL server when you can transition from SQLite3 to Postgres for free, instead of going through an intermediary (MySQL) or a super expensive commercial base (Oracle in particular)?

This is -- or should be -- a major sell for Lazarus, especially once we get the data-connectivity easier for new users. 

Anyway, I posit we focus more on making SQLite3 and then Postgres "1st class citizens" first -- and perhaps reduce the clutter for so many marginal databases?   Do we have any internal measurement of which databases are getting the most use in Lazarus and the most requests for help?  Triage is probably suggested here.

BTW I also agree with the prior posts suggesting we need more marketing (not paid marketing, just more coherent strategy in keeping Lazarus in the eyes of the public). But it would be good to first tidy the house a bit more, IMO of course.

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: Is Lazarus Dying, in part, for Lack of Easy SQL Connectivity?
« Reply #55 on: July 06, 2018, 12:24:14 am »
Just tried asking gogole for "free pascal lazarus sqlite", it gave me this link: https://www.tweaking4all.com/software-development/lazarus-development/lazarus-pascal-getting-started-with-sqlite/ as the third result. The first two are Lazarus tutorial from the wiki. HTH.

This is quite a nice, easy to read tutorial on getting SQLite up and running with Lazarus. The tip about using Valentina to not only create the initial database but use Valentina to generate the SQL for doing is a good one.

There are several errors in the article though:

- Location given for libsqlite3.dylib on macOS is wrong.
- Discussion of Linux is confusing. Installing the "dev" package will create the libsqlite3.so symlink, so no need to do that manually. Doing so will fail.
- Location for sqlite3.dll on Windows is not correct for modern versions of Windows. No discussion of bitness and how confusing that is on Windows.
- Location of database (Documents and Settings) is really not correct for modern Windows, even though there's a hidden link with that name that points to Users on Win7 and later.
- Location of database on macOS is really not correct (~/.config). Only ancient Unix programs use that.

These are not Lazarus problems per se, just a matter of getting all the confusing details of these systems correct. These kinds of step-by-step articles really need to be proofed by a third party with a careful eye, but who can do that? Certainly I never have any of my articles proofed and I'm sure they are filled with errors too.

In any case, setting up something as straightforward as SQLite shows the trickiness of using components based on external libraries with Lazarus. Again, not really a Lazarus problem.

Finally, this site's names has always struck me as a bit off-putting. In U.S. English, "tweaking" is drug slang. Certainly there's still the older meaning of the word, but when you say "tweaking 4 all" that sounds to my ear like drug lingo. Probably wasn't intended, but, well, there you are.

chrnobel

  • Sr. Member
  • ****
  • Posts: 283
Re: Is Lazarus Dying, in part, for Lack of Easy SQL Connectivity?
« Reply #56 on: July 06, 2018, 01:45:28 pm »
Imo TIOBE makes no sense, what so ever, as they compare apples with bananas, where, from my point of view, a programming language is capable of producing a more or less self-contained result, that can either be compiled into a binary, or run under an interpreter.

But TIOBE list SQL as a language, which is utterly nonsense, as SQL only is the "connection" between the language, and the database (yes, yes, one can use stored procedures, but still).

Also JavaScript is number 8, but JavaScript is so definitely not at that position because people like it, but out of sheer need, as this is more og less the only way to include some functionality in a browser.

JavaScript is the most horrible "language", as it is like trying to program a rubber band, counter intuitive casing, lose typing, impossible to debug, etc, etc.
 
But still JavaScript is claimed as oh-so-popular, and the most mentioned language on StackExchange - but hey, of course it is so "popular" on StackExchange as people after spending hours trying to figure out how to do a banality which could be done easily in 2 minutes in Lazarus/FPC, gives up, and turns to StackExchange crying for help.

I see Lazarus/FPC (and in old Windows days Delphi) as the most productive language, logically designed, easy to understand, and easy to read, which ends up in that it is much faster programming in Lazarus/FPC than nearly all other languages - and one do not need to end in a pointer hell.

With regards to databases, my recommendation is to use ZeosLib, it makes life a lot more easy, and makes it much simpler to switch database.

BUT there is allways a snake in the paradise, and one of the things that occasionally gives me (more)gray hairs, is the lack of consistancy.
As I have mentioned in this tread:

http://forum.lazarus-ide.org/index.php/topic,41763.0.html

the behaviour of TDataset (I guess, as it is difficult exactly to pinpoint the problem) have changed from an older 32bit version of Lazarus to a never, meaning I can not trust the results any more.

I have taken the consequence of that, and simply stopped using TDataset, and instead use parameterised SQL sentences instead - but there is a lot of code I have to alter, to avoid this behaviour. 

So a very, very important thing to bear in mind is, that backward compatibility to the users sourcecode may never be broken.

However this does not change my opinion, that Lazarus/FPC (and partly Delphi, but only partly, as it is Windows only) is the most versatile and productive programming environment/language what so ever, and even though I occasionally experiences mishaps as mentioned above, I feel no need for spoiling my life with C'ish pointer hell, or strange indents as in Python - it is more than enough that my life have to be poisoned with JavaScript i cannot avoid in my webprograms.

Maybe there ought to be another list than TIOBE's, namely a list stating (usable, stand alone) programs made by this or that programming language - I am quite sure that Pascal/Delphi then would be in top five.
« Last Edit: July 06, 2018, 02:30:15 pm by chrnobel »

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11452
  • FPC developer.
Re: Is Lazarus Dying, in part, for Lack of Easy SQL Connectivity?
« Reply #57 on: July 06, 2018, 03:54:10 pm »
Finally, this site's names has always struck me as a bit off-putting. In U.S. English, "tweaking" is drug slang. Certainly there's still the older meaning of the word, but when you say "tweaking 4 all" that sounds to my ear like drug lingo. Probably wasn't intended, but, well, there you are.

The site seems Dutch, and one of the larger IT news sites in the Netherlands is called "Tweakers.net", the lingo spread to other sites.  4all might come from former hacker ISP  XS4ALL.

Thaddy

  • Hero Member
  • *****
  • Posts: 14373
  • Sensorship about opinions does not belong here.
Re: Is Lazarus Dying, in part, for Lack of Easy SQL Connectivity?
« Reply #58 on: July 06, 2018, 04:08:50 pm »
Finally, this site's names has always struck me as a bit off-putting. In U.S. English, "tweaking" is drug slang. Certainly there's still the older meaning of the word, but when you say "tweaking 4 all" that sounds to my ear like drug lingo. Probably wasn't intended, but, well, there you are.

The site seems Dutch, and one of the larger IT news sites in the Netherlands is called "Tweakers.net", the lingo spread to other sites.  4all might come from former hacker ISP  XS4ALL.
Indeed. Even owned by a bigger conglomerate they still  provide service as Internet was intended. Hard to find these days.
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

tan

  • New Member
  • *
  • Posts: 33
Re: Is Lazarus Dying, in part, for Lack of Easy SQL Connectivity?
« Reply #59 on: July 06, 2018, 05:27:20 pm »
https://www.tweaking4all.com/software-development/lazarus-development/lazarus-pascal-getting-started-with-sqlite/#GettingstartedwithSQLiteunderWindows  does look more step by step than most of what I've found.  Perhaps we can use it as a template or encourage the author to update it?

Alternatively: How about dealing with the idiosyncrasies of installing by making sure we are well represented by homebrew, https://chocolatey.org/, and the equivalent for linux ?

I know Lazarus itself installs like magic under Win7.  I also know Lazarus installation under Mac is a nightmare and, to this date, I can get it to install ... but not compile ... (Before High Sierra I couldn't get it to install.  Under High Sierra I can now get the IDE to come up and appear to run -- but then choke when I try to compile.)

Anyway, what do you guys think about recommending working THROUGH leading software managers (brew, chocolatey, etc)?  Wouldn't that be easier on both the forum support and the install experience of new users?

Under Mac, I've got to say, brew is almost always the easiest way to handle anything beyond a trivial install...and even then it helps keep the versions syncopated with the various "gotchas".

 

Laz + SQLite3 (and eventually postgres) on differn

 

TinyPortal © 2005-2018