Recent

Author Topic: Simple programming requirement. Am I in the right place?  (Read 7948 times)

e_james

  • New member
  • *
  • Posts: 7
Simple programming requirement. Am I in the right place?
« on: September 29, 2017, 05:45:40 pm »
I have a simple programming requirement as follows -

I want to code a small database application which will run in Windows and Linux.
I want it to be as self contained as possible so that it can be easily transferred to a new PC with a minimum of installation problems.

For a programming language I am considering Python and Lazarus / Free Pascal.
For the database I am considering SQLite.

I am 69 years old and I don't have the time to spend months learning unnecessary fine details.
I have some previous experience with Turbo Pascal, Delphi, Basic, Visual Basic (Access) and Object Pal (Paradox 7). Currently I write Object Pal code for many personal solutions but it doesn't meet the requirements above.

I am not, at this time, comfortable with Python. I find it confusing and apparently inefficient. The Python tutorials follow a structure which seems to be designed to be confusing.

My experience, so far, with Lazarus / Free Pascal is that the Linux installation is designed for Linux experts and I am not one of them. It appears that the Windows installation is so much more straight forward that I am tempted to use Wine or VirtualBox on my Linux PC.

Before I can even test Lazarus as a possible solution, I need help to install the Linux software.

Comments and suggestions please.

Handoko

  • Hero Member
  • *****
  • Posts: 5131
  • My goal: build my own game engine using Lazarus
Re: Simple programming requirement. Am I in the right place?
« Reply #1 on: September 29, 2017, 06:14:08 pm »
Hello e_james,
Welcome to the forum.

Installing Linux and Linux applications is easier than you thought.

I ever tried Ubuntu, Lubuntu, Ubuntu Mate, Fedora, Slackware, Mandriva and Linux Puppy. All of them are easy to install. I personal think Ubuntu and Ubuntu variants are beginner friendly. And I heard some users have problem installing Lazarus/FPC on Ubuntu Mint.

I recommend you to install Synaptic Software Manager after you installed Linux. It is a very handy tool.

Windsurfer

  • Sr. Member
  • ****
  • Posts: 368
    • Windsurfer
Re: Simple programming requirement. Am I in the right place?
« Reply #2 on: September 29, 2017, 06:14:56 pm »
Download and install fpcupdeluxe to install both linux and windows versions of fpc and lazarus.

First look in the wiki and then see  https://github.com/newpascal/fpcupdeluxe/releases/latest

Windsurfer

  • Sr. Member
  • ****
  • Posts: 368
    • Windsurfer
Re: Simple programming requirement. Am I in the right place?
« Reply #3 on: September 29, 2017, 06:18:56 pm »
I use Linux Mint 18.2, which is Ubuntu based. I tried the Synaptic download. It does not load all of the libraries unless you look for them. fpcupdeluxe loads both fpc and Lazarus into the top folder of your choice. It takes a little longer, but solves all cross compiling problems.

Handoko

  • Hero Member
  • *****
  • Posts: 5131
  • My goal: build my own game engine using Lazarus
Re: Simple programming requirement. Am I in the right place?
« Reply #4 on: September 29, 2017, 06:25:12 pm »
I forgot to mention, Ubuntu and some others may not provide the latest Lazarus/FPC version. You need to manually download from:
http://www.lazarus-ide.org/index.php?page=downloads

For Ubuntu and variants, chose the deb release and you have to install all the 3 deb files. You may need to lock version (feature in Synaptic Package Manager) to prevent Ubuntu to downgrade the Lazarus/FPC you already installed.
« Last Edit: September 29, 2017, 06:27:31 pm by Handoko »

e_james

  • New member
  • *
  • Posts: 7
Re: Simple programming requirement. Am I in the right place?
« Reply #5 on: September 29, 2017, 07:07:37 pm »
My thanks for all the replies so far. Unfortunately I have some more urgent matters to attend to. I will respond in more detail later.

Paul Breneman

  • Sr. Member
  • ****
  • Posts: 290
    • Control Pascal
Re: Simple programming requirement. Am I in the right place?
« Reply #6 on: September 29, 2017, 09:46:09 pm »
I'm nearly your age and have spent a lot of time during the past ten years trying to figure out the most simple ways to do things, so here are several links to check out:
http://www.turbocontrol.com/monitor.htm
http://wiki.freepascal.org/Small_Virtual_Machines

Please share your feedback when you can.  Thanks!
Regards,
Paul Breneman
www.ControlPascal.com

e_james

  • New member
  • *
  • Posts: 7
Re: Simple programming requirement. Am I in the right place?
« Reply #7 on: September 30, 2017, 05:21:10 am »
First, I need to clarify my current situation.At this moment I have 7 working PCs in my home network. Six of them are running various versions of Lubuntu  and the seventh is a Toshiba Satellite Pro L300 laptop running Linux Mint 18 Sarah. The laptop is my main general purpose workhorse PC and is the centre of my network. It can also boot into Lubuntu 16.04 or Windows XP Pro SP2 if required. I do not reboot lightly: it takes about 15 minutes to build up my desktop to its normal working layout. I have been experimenting with Linux since about 2006 but, until about a year ago, I couldn't get away from XP for some of my main activities. I now use Linux for about 99% of my work. Lubuntu is my default distro but I am running Mint on a long term trial because Lubuntu has a few annoying quirks. I routinely run Paradox 7 with Wine.

It is my personal understanding that a good operating system is mostly invisible. Its main function is to run the application software. I suggest that XP did that job very well and that is why it was so successful. It is my deliberate choice not to get involved in the fine details of the OS if at all possible. I don't need to understand the chemistry and mechanics of the internal combustion engine in order to drive my car to the supermarket for the groceries. The strategy worked well with Windows but not so well with Linux. It is still my default position.

Handoko

My apologies if I misled you. It's the Linux version of Lazarus which is causing my headache, not Linux itself. My starting point for new software is almost always Synaptic. Failing that I will use deb files or ppa. I once compiled a custom version of ffmpeg.

Windsurfer

I found the Synaptic situation exactly as you describe it. I used synaptic to install everything that seemed relevant, but it still left me with some directory issues. Some guidance about the choice of directories / folders would be helpful.

When I run fpcupdeluxe it asks many questions to which I do not know the best answers.

My Mint installation is 64bit. I probably want a 32bit application for portability. Which versions should I install?

I do not seek out the latest versions of software. I often deliberately choose older versions (Paradox 7, XP) but sometimes they lack one or more features I need. Sometimes it's the latest version that lacks a feature that I want (Avidemux, PCManFM).


Paul Breneman

I followed the links you suggested and the ideas look very promising. My first impression is that it would take a fair bit of work to try out any one of them. The only virtual machine experience I have so far is VirtualBox and there are significant parts of that which I don't understand.

I have an idea for an interactive wiki based instruction manual but, even for that, there is a steep learning curve. At least 95% of all modern instruction manuals (especially Linux) assume knowledge I do not have.

Handoko

  • Hero Member
  • *****
  • Posts: 5131
  • My goal: build my own game engine using Lazarus
Re: Simple programming requirement. Am I in the right place?
« Reply #8 on: September 30, 2017, 05:45:05 am »
Don't use Synaptic to install Lazarus/FPC, the version provided by Ubuntu's repository is outdated. And as far as I know, there is no good ppa for Lazarus/FPC. Use the link I provided to download the deb files.

One annoying thing is Ubuntu will frequently suggest me to update my Lazarus/FPC, but actually it is a downgrade. Luckily I found that we can lock version using Synaptic Package Manager.

You mentioned Paradox, I ever use Lazarus to connect Paradox dbf. It is easy no need to install third party driver/library, you just need to enable Paradox package in your Lazarus installation.
« Last Edit: September 30, 2017, 08:55:19 am by Handoko »

e_james

  • New member
  • *
  • Posts: 7
Re: Simple programming requirement. Am I in the right place?
« Reply #9 on: September 30, 2017, 07:06:09 am »
Please be careful not to recommend the latest software just because it is the latest. Currently one of my versions of ffmpeg is from 2014. It works fine. Most of my Lubuntu installations are 14.04. I want LTS and 16.04 has some minor disdavantages. I'm an engineer and I understand the idea "If it ain't broke, don't fix it". That said, when I look at something which is new to me, I usually start with the latest version.

You didn't answer my question 64bit or 32bit, nor did you say anything about directory choices.

I notice that fpcupdeluxe offers Lazarus 1.9. What does stable mean?

That's an interesting comment about Paradox. Paradox tables are .db, .dbf is dBase. It would be very useful if Free Pascal can read and write Paradox tables without installing the BDE. Even Delphi needs the BDE.

bee

  • Sr. Member
  • ****
  • Posts: 393
Re: Simple programming requirement. Am I in the right place?
« Reply #10 on: September 30, 2017, 07:47:23 am »
Lazarus IDE (with Free Pascal Compiler) runs very well both on Windows XP and Linux. The executable it produces is mostly self-contained and independent, except if your app itself needs external libraries. AFAIK, there's no other development tools to write desktop apps on Linux that is as good and easy to use as LazIDE. So, I think LazIDE is the perfect tool for your need.

Your requirement doesn't seem too complex that you may use a bit older version of LazIDE just fine. LazIDE has LCL which is very similar to VCL in Delphi, including database components. So, if you're already familiar with TDataset, you'll be like at home with LazIDE. LazIDE's database component supports many kinds of database, including Paradox (detail explanation is here), dBase, sqlite, or even CSV, etc. Of course, LazIDE doesn't need BDE as it's a proprietary technology. However, your app still needs the native database driver, if required.

So… welcome aboard and happy coding! :)
-Bee-

A long time pascal lover.

Handoko

  • Hero Member
  • *****
  • Posts: 5131
  • My goal: build my own game engine using Lazarus
Re: Simple programming requirement. Am I in the right place?
« Reply #11 on: September 30, 2017, 08:40:10 am »
Please be careful not to recommend the latest software just because it is the latest.

Yes, I agree. Latest does not always mean good. In my previous post, I should said "latest stable version". Lazarus has development and stable releases. Development versions/releases usually contain major bugs, which make them not suitable for production use. Stable releases may still contain bugs, but only minor bugs. Ubuntu default repository always takes too long to update their Lazarus/FPC stable version.

Learn more about Lazarus version numbering:
http://wiki.freepascal.org/Version_Numbering

You didn't answer my question 64bit or 32bit, nor did you say anything about directory choices.

I use 64-bit version OS and Lazarus 64-bit. My computer has 6 GB RAM, 32-bit OS cannot fully support memory 4 GB and above. You can produce 32-bit binaries using 64-bit compiler. Learn more here:
http://wiki.lazarus.freepascal.org/Cross_compiling#From_Linux_x64_to_Linux_i386

That's an interesting comment about Paradox. Paradox tables are .db, .dbf is dBase. It would be very useful if Free Pascal can read and write Paradox tables without installing the BDE. Even Delphi needs the BDE.

Yes, it is true. I'm sure because I ever wrote a small stock control program using Lazarus + Paradox database, it runs on WinXP without need to install BDE nor Paradox driver.

Learn more about database support in Lazarus/FPC:
http://wiki.freepascal.org/Databases

My experience, so far, with Lazarus / Free Pascal is that the Linux installation is designed for Linux experts and I am not one of them.

One of the common problem when upgrading/downgrading or uninstalling/reinstalling Lazarus/FPC I know is it doesn't properly remove the previous installed files. So I often need to manually delete the leftovers:

01. Uninstall lazarus, fpc, fpc-src
02. Delete ~/.lazarus, except: editoroptions, environmentoptions
03. Delete /etc/fp.*
04. Delete /usr/share/fpcsrc
05. Delete /usr/lib/fpc
06. Delete /usr/bin/ppc*

Note:
I keep editoroptions and environmentoptions (step 02) because I want to keep settings I have made on Lazarus.
« Last Edit: September 30, 2017, 09:22:59 am by Handoko »

e_james

  • New member
  • *
  • Posts: 7
Re: Simple programming requirement. Am I in the right place?
« Reply #12 on: September 30, 2017, 05:49:02 pm »
I did everything I could think of to clear out any previous installations and then

fpc_3.0.2-170225_amd64.deb reports an error - see attached .jpg

Handoko

  • Hero Member
  • *****
  • Posts: 5131
  • My goal: build my own game engine using Lazarus
Re: Simple programming requirement. Am I in the right place?
« Reply #13 on: September 30, 2017, 05:51:41 pm »
You got it too. I have reported this bug but still have not fixed.
Simply ignore the warning, believe me nothing bad will happen.

e_james

  • New member
  • *
  • Posts: 7
Re: Simple programming requirement. Am I in the right place?
« Reply #14 on: September 30, 2017, 09:19:45 pm »
Next problem

 

TinyPortal © 2005-2018