Project name Title name, hidden files = confusing

Post your Gambas programming questions here.
Post Reply
Rudy2
Posts: 4
Joined: Wednesday 27th February 2019 9:18am

Project name Title name, hidden files = confusing

Post by Rudy2 »

Hello,
I 'm a new Gambas user.
After testing a lot of 'basic' like languages working in Linux a began programming with Gambas.
Till to day, Gambas is the only language who did not give memory errors in the sense as "segment fault... " (unsafe compilation with c of c++ compilers???).

Gambas IDE works fine and with a very good help-function.
I did a few test with goniometric functions (calculations with gps coordinates...) with very good results as good accuracy, quick execution and so on.

Only the system with "Project names" and "Title names" + hidden files in hidden maps is confusing.
Why not using one simple filename, p.e. "program.gb" (as in Quicbasic "program.bas")?

Rudy
User avatar
Cedron
Posts: 156
Joined: Thursday 21st February 2019 5:02pm
Location: The Mitten State
Contact:

Re: Project name Title name, hidden files = confusing

Post by Cedron »

Hi Rudy,

I'm fairly new as well. Let me address your points one at a time.

"I 'm a new Gambas user." Yep, me too.

"After testing a lot of 'basic' like languages working in Linux a began programming with Gambas." What I have found in other basics in Linux pales in comparison. I do consider Python a dialect of BASIC, but none of its IDE's (that I am aware of) come close to Gambas.

"Till to day, Gambas is the only language who did not give memory errors in the sense as "segment fault... " (unsafe compilation with c of c++ compilers???)." I've gotten a few Pop ups of the ilk, but never a segmentation fault, and they have only occurred while experimenting with shared libraries so I haven't pressed the "Report a bug" option.

"Gambas IDE works fine and with a very good help-function." Agreed.

"I did a few test with goniometric functions (calculations with gps coordinates...) with very good results as good accuracy, quick execution and so on." Remember, Gambas is a byte code interpreter, so it will be slower than a C++ program. However, a recently added feature is a Just in Time (JIT) compiler, so it has the potential to be just as fast. I haven't tested that yet myself. The ease of being able to call shared libraries is also a big plus in this regard.

"Only the system with "Project names" and "Title names" + hidden files in hidden maps is confusing." I don't care for the use of the hidden directories either. I don't really see a purpose in them, especially when I have to turn on the "Show Hidden Files" option in the file explorer to see them. You should also be aware that there is a "~/.config/gambas3" directory as well where you will find the Gambas configuration files for your usage. If you use gb.Settings the files end up in there as well.

If you use install a Gambas package, those files end up "~/.local/share/gambas3". So the hidden directories looks like it is a Linux thing they are following.

"Why not using one simple filename, p.e. 'program.gb' (as in Quicbasic 'program.bas')?" I think using ".class" for the extension for Gambas source code was a big mistake. The closest thing to a program that you a describing is having a simple one source file console application. Most projects will involve a form and maybe some custom classes, thus keeping them in one directory per project I think is a good decision. Structuring that directory with a firm set of subdirectories is also good practice, even if many of them remain empty.

"Rudy" Pleased to meet you.

Ced
.... and carry a big stick!
Rudy2
Posts: 4
Joined: Wednesday 27th February 2019 9:18am

Re: Project name Title name, hidden files = confusing

Post by Rudy2 »

Hi Ced,

thanks for Your reply, and welcome too.
Following weeks, I'm going to learn/test all concerning the Gambas syntax.
Thereafter I begin with the GUI.

In the past I did a lot of programming with Quickbasic PDS + assembler Library's for multi-user DBF access.
(Fabrication of paints, adding and mixing of colorants in water and solvent based paints...).
So I love programming in the "basic dialect" + the force of good library's.
I hope the JIT compiler gives Gambas extra execution velocity above the old basic-interpreters.

For the future I hope there comes also a compiler to compile Gambas for windows (https://sourceforge.net/projects/mingw-w64/ ???) The purpose is tho share programs with friends working in Windows.

Greetings from Belgium,
Rudy
User avatar
jornmo
Site Admin
Posts: 224
Joined: Wednesday 21st September 2016 1:19pm
Location: Norway

Re: Project name Title name, hidden files = confusing

Post by jornmo »

For Windows, one can use Cygwin. It is a bit cumbersome, but it is better than VirtualBox/VMWare. If the app is non-gui, one can also use the Ubuntu from the Windows Store.
User avatar
cogier
Site Admin
Posts: 1118
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Re: Project name Title name, hidden files = confusing

Post by cogier »

Hi Rudy and Ced. Welcome

The Project Name will become the folder you want your program to use.
The Project Title is the name of your project.

If you use a Project Name of 'FunTest' and a Project Title of "TestingThings' then you will find your program in the ../FunTest folder. Press [Ctrl]+P in the IDE to see the Properties.

Image

When you create a Desktop icon it will be labeled as 'Testing things'.

Image

Hope that helps.
User avatar
Cedron
Posts: 156
Joined: Thursday 21st February 2019 5:02pm
Location: The Mitten State
Contact:

Re: Project name Title name, hidden files = confusing

Post by Cedron »

Rudy2 wrote: Tuesday 19th March 2019 8:50am Following weeks, I'm going to learn/test all concerning the Gambas syntax.
Actually, that is an ambitious goal. I've been at it for a bit over a month, heavily, and still learning new stuff. It is a very rich environment. The only thing I have found missing (is that an oxymoron?) so far that some previous BASICs had is type declaration characters. You should also be aware that it is a common practice to use a leading dollar sign to indicate a private class level variable. It has nothing to do with the String type.

You will find the Wiki pages extremely helpful.

http://gambaswiki.org/wiki

I find myself using these links quite often:

Language Index
Native Classes
Components

They are all in the left column of the "Language Reference" section.

My experience with BASICs goes like this:

VSBASIC on IBM 360

basic
basica
bascom compiler
gwbasic

QuickBasic 3.0, 4.5

vb 3.0, 4.0, 5.0, 6.0

Asp pages

Python?? (Very BASIC like to me)

I got off the MS bus at VB.NET and aspx, had to use Java (Servlets, Applets, and a few Applications). Always got a kick out of how the same people who said that VB3.0 and VB4.0 (optional) were byte code interpreters and thus were too slow for production embraced Java whole-heartedly.

I'm finding Gambas a very comfortable and familiar environment.

Along along, I have also called hand coded machine code, MASM, and C/C++ external subroutines.

You can also code your external libraries in FORTRAN! See my post "Calling FORTRAN Shared Libraries from Gambas" for detail. (Big Grin)

https://forum.gambas.one/viewtopic.php?f=4&t=683
.... and carry a big stick!
Rudy2
Posts: 4
Joined: Wednesday 27th February 2019 9:18am

Re: Project name Title name, hidden files = confusing

Post by Rudy2 »

Cogier:
Thanks,
I did a few test and I saw that there is only one Titlename for each Project.
The Gambas Projectname = the real mapname.
I thought I could store Title_version1 Title_version2 and so on, in one Projectmap.
I have already cleaned my projects and titles, now it looks good.

Rudy
Rudy2
Posts: 4
Joined: Wednesday 27th February 2019 9:18am

Re: Project name Title name, hidden files = confusing

Post by Rudy2 »

Ced:
Thank you for sharing your library knowledge on the forum.
For me in Gambas it's now to early to begin "calling routines from library's".
First I 'm going to test/learn the Gambas syntax and Graphics system.

Because I'm very curious :D : ... Do you think it's possible to invoke routines from MS ASM library's?
In that case I think at my old AJS library's (I have the very old 16 bit one and the 32 bit Visual basic one).
They contain routines for multi-user indexed DBF access with very stable index-files.
The execution is extremely quick (sometimes its necessary to build in a little for-next to slow down reading on the hard-disk (In the beginning I destroyed a hard disk with it...).

Rudy
User avatar
Cedron
Posts: 156
Joined: Thursday 21st February 2019 5:02pm
Location: The Mitten State
Contact:

Re: Project name Title name, hidden files = confusing

Post by Cedron »

I don't want to say too much about it, because I've only dabbled in it a few times.

Here is a search suggestion: "linux assembly language programming gas intel syntax"

https://en.wikipedia.org/wiki/X86_assembly_language

You should be able to port your code without too many modifications. Gambas passes by value rather than reference, so the Gambas end will need to look like my FORTRAN example. Gambas/C handle the stack/variable passing details for you, so I am not sure about the exact stack frame details. If you have to modify that part of your ASM code, you might as well convert it to pass-by-value unless you have to return values. Gambas source code is available, so you can go look to see how it is done.

Almost all my assembly was on 8088s. I did a little protected mode on 286s, just to do it. Most my use was for TSRs and BASIC screen buffer helper routines.

Once windows came along, I used C (QuickC), for any low level stuff, though not that much. When VB4 (compiled) came along, which used the same back end compiler/optimizer as C++, there was no speed advantage to C.

When processor pipelines and queueing came along, the optimizers could beat most assembly code anyway.

If you have algorithms coded in ASM, you are probably better off spending your effort converting to C libraries rather than adapting them to Linux. Two main considerations:

* Platform independence

* Other programmer comprehension

I'm pretty sure gcc allows inline assembly, but I have never messed with it.

My first recommendation would be to try to do it in pure Gamba, followed by putting critical routines under the JIT directive. I've not messed with this yet, nor ironically any of the database capability which used to be what I did most.

Ced
.... and carry a big stick!
Post Reply