New version?

For other topics related to the FreeBASIC project or its community.
BasicCoder2
Posts: 3589
Joined: Jan 01, 2009 7:03
Location: Australia

Re: Working towards FreeBASIC 1.06 release

Postby BasicCoder2 » Apr 05, 2018 11:13

coderJeff wrote:I saw the Raspberry PI interest in another thread, and thinking someone *should* make a release package for that platform.

Eventually I was able to install FreeBASIC on the Raspberry Pi and use the Geany editor.
The real issue for me and I would say any beginner wanting to do cool stuff with the Raspberry Pi is not the latest version of FreeBASIC it is the issue of being able to use libraries that are used by Python (or FUZE BASIC commands).
With FreeBASIC I was lucky that k8055.bi file existed for the k9055 i/o board and escapi.bi existed for webcam access.
Although the Raspberry Pi can be used as a cheap computer I think a cheap laptop would be better value. I see the value of the Raspberry Pi in the ability to use it in simple hardware projects.
dasyar
Posts: 368
Joined: Dec 04, 2008 15:31

Re: New version?

Postby dasyar » Apr 05, 2018 12:15

Although the Raspberry Pi can be used as a cheap computer I think a cheap laptop would be better value. I see the value of the Raspberry Pi in the ability to use it in simple hardware projects.

What is your dollar value of a cheap laptop? I think that most every where else, you can pick up a Raspberry Pi for $35. Depending on the application, I think a laptop might be just a little to big and awkward to work with.

When I installed Freebasic on my Raspberry pi, I had a fairly easy time of it, but I have done this many times. I do agree that it should be a much easier process to do the installation. Typically, it should be as easy as "sudo apt-get install freebasic".
St_W
Posts: 1507
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

Re: Working towards FreeBASIC 1.06 release

Postby St_W » Apr 05, 2018 15:27

BasicCoder2 wrote:The real issue for me and I would say any beginner wanting to do cool stuff with the Raspberry Pi is not the latest version of FreeBASIC it is the issue of being able to use libraries that are used by Python (or FUZE BASIC commands).

This problem is not related to the Raspberry Pi. Libraries are relatively hard to use in FreeBasic in general - at least for beginners and compared to other programming ecosystems like Python or .NET. But that is due to the design of FB being a low-level C-like implementation of BASIC and thus can't really be changed. If FB would be an interpreter or ran on the CLR/JVM things would be different.
BasicCoder2
Posts: 3589
Joined: Jan 01, 2009 7:03
Location: Australia

Re: New version?

Postby BasicCoder2 » Apr 05, 2018 19:32

@St_W
I assumed FreeBASIC could use C++ libraries with a suitable .bi file?
I also assumed Python libraries may well be written in C++ for speed?
MrSwiss
Posts: 3631
Joined: Jun 02, 2013 9:27
Location: Switzerland

Re: New version?

Postby MrSwiss » Apr 05, 2018 22:14

BasicCoder2 wrote:I assumed FreeBASIC could use C++ libraries with a suitable .bi file?
FreeBASIC can use C libraries since it is ABI compatible, however, by far not
the same, with C++ stuff (very little compatibility, read FB-documentation!).
BasicCoder2
Posts: 3589
Joined: Jan 01, 2009 7:03
Location: Australia

Re: New version?

Postby BasicCoder2 » Apr 05, 2018 23:01

MrSwiss wrote:
BasicCoder2 wrote:I assumed FreeBASIC could use C++ libraries with a suitable .bi file?
FreeBASIC can use C libraries since it is ABI compatible, however, by far not
the same, with C++ stuff (very little compatibility, read FB-documentation!).

Well escapi.bi and k8055.bi access escapi.dll and k8055.dll respectively so I assume here that FreeBASIC can access a .dll even if written in C or C++?
MrSwiss
Posts: 3631
Joined: Jun 02, 2013 9:27
Location: Switzerland

Re: New version?

Postby MrSwiss » Apr 06, 2018 15:45

It is far simpler to access C procedures, than to try the same, with C++ since,
C++ is the one, that's adding many layers of confusion (to use your own syntax,
confusion = all the OOP stuff, that makes it difficult to translate).

The dll's you are referring to, are probably written in plain C or they have a
C interface (aka: C API).
D.J.Peters
Posts: 8188
Joined: May 28, 2005 3:28
Contact:

Re: New version?

Postby D.J.Peters » Apr 06, 2018 16:18

FreeBASIC has support for simple C++ GNU ABI interfaces and namespaces.
see at FreeBASIC/examples/other-languages/C++

Most big C++ lib's like QT, FLTK, OGRE, IRRLICHT ... used something like this (written as FreeBASIC code):

Type ClassC extends ClassB extends ClassA
...
End Type


This is one point why we can't use this kinds of lib's without a C wrapper there are more problems:
If a C++ class exports a method, function or a property with the C++ bool datatype the name mangling will fail also.

I wrote the Tokamak, TrueAxis, Horde3D and the FLTK C wrapper's for FreeBASIC it's a lot of work :-(

Joshy
coderJeff
Site Admin
Posts: 3342
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

Re: New version?

Postby coderJeff » Apr 07, 2018 13:30

D.J.Peters wrote:If a C++ class exports a method, function or a property with the C++ bool datatype the name mangling will fail also.

I think the bool mangling works. Possible that there is a version of fbc or gcc it doesn't. I dunno
TODO.txt wrote:o ABI
- MinGW GCC 4.7 C++ defaults to __thiscall for methods like MSVC,
instead of __cdecl as on Linux, even though GCC doesn't use MSVC's name
mangling [yet].
- FB can probably support __thiscall with C/LLVM backends pretty easily

So, when I was just testing, the sub/function/member names resolve correctly with bool/boolean type, but program crashes because fbc doen't know how to use thiscall calling convention yet (the "this" pointer is passed in ecx register instead of on the stack.)
coderJeff
Site Admin
Posts: 3342
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

Re: New version?

Postby coderJeff » Apr 07, 2018 14:22

Slow to respond, sorry for the long-ish post. A few comments I'd like to expand on. For full context, quotes are all from this topic.

If this is TLDR; then
- the fbc master branch in the repository is the official version of FreeBASIC
- I think there are too many binary packages for one person to build and test and on one day
- enthusiastic members can help FreeBASIC get to the next release!

St_W wrote:
coderJeff wrote:... Instead of releasing all the binary packages on one day, we need to add a concept of source code release date ...[/u]
I agree that this is probably necessary, especially if additional platforms are going to be added. But IMHO there should still be some official maintainers ...
<snip>
I don't know which tests were performend for previous releases, but it would be a good idea to document that and try to automate it.

It's been a long time since I made a release. I remember it being very stressful and much work. fbc has grown since then. Fortunately, dkl has written many scripts to help automate building. The testing of the newly built binary package itself still seems to be a manual step. I have been able to build all the release packages for win32,lin32,win64,lin64,dos32 but I am not confident of the quality yet. They are basically 1.05 + new compiler/rtlib/gfxlib. Only briefly touched on updated bindings using build scripts from dkl's repos. Even with automation, a huge task.

MrSwiss wrote:A new release is currently most needed since, there have been quite a lot of
updates, fixes e.t.c. to the compiler's (FBC 1.06.0 32/64).
They don't necessaryly have to be released at the same date, for all platforms.

I agree. I'd like to make another release and I think it is needed to keep development moving forward. The most disappointment is to make a release and it doesn't work for the user, so they feel forced to use the last older version. I think if the releases were be made by multiple maintainers, on different dates, users could accept that. Would relieve some of the stress and have potential for better quality overall.

BasicCoder2 wrote:
coderJeff wrote:I saw the Raspberry PI interest in another thread, and thinking someone *should* make a release package for that platform.

Eventually I was able to install FreeBASIC on the Raspberry Pi and use the Geany editor.

dasyar wrote:When I installed Freebasic on my Raspberry pi, I had a fairly easy time of it, but I have done this many times. I do agree that it should be a much easier process to do the installation.

Raspberry Pi could be supported if that's what users want most. I point this out because it relates to creating a release for X number of "offical" packages. I think we could find a way to work together to do it. Maybe the FB Dev Team can endorse the release even if they don't specifically create it. Just a thought. Same for other platforms.
ecxjoe
Posts: 83
Joined: Aug 08, 2009 6:01
Contact:

Re: New version?

Postby ecxjoe » Apr 07, 2018 15:01

- enthusiastic members can help FreeBASIC get to the next release!


What steps can I take to help get this to the next release?
coderJeff
Site Admin
Posts: 3342
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

Re: New version?

Postby coderJeff » Apr 07, 2018 16:45

In my mind, to allow more contributors to be involved, I think it could go like this:

First steps are to agree how to move forward, working together:
1) Read DevMakingReleases. Up until now, the releases (binaries+headers+docs+source+tools) have been made by only one developer at any one time. And DevMakingReleases reflects that; that's a procedure for one person.
2) Make changes to that procedure so that multiple maintainers can create release packages from one source version. If we are going to work together, is important to have a reference document that we agree on.
3) Determine minimum requirements for next release - any bugs that *must* be fixed, etc

Next steps:
4) tag the repo with "1.06" version tag and this becomes the official source release
5) maintainers (whoever they are) build 1.06 binary release for each platform and test.
6) Ask users to test; fix reported binary related problems as needed
7) If all working well, the binary package becomes the official binary release
MrSwiss
Posts: 3631
Joined: Jun 02, 2013 9:27
Location: Switzerland

Re: New version?

Postby MrSwiss » Apr 07, 2018 18:39

There is also, the very basic question of Windows32-Installer, to be cleared first (IMHO).

Pro: easy install for beginners, however, causing all sorts of problems later on, such as:
installs by default, to: "Program Files (x86)" which is *protected*, from the user!, by MS,
in all current WIN-Versions: 8 / 8.1 / 10, afaik.
(beginners use customarily, the defaults, offered by the Installer, which is the root cause,
for later problems; e.g. trying out something from: Examples ... , which won't work!)

Con: creates more questions in the forum, than not having one, from the start ...
(IMHO, its more trouble, than its worth anything, may be better, to "drop it" completely)
fxm
Posts: 9981
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: New version?

Postby fxm » Apr 07, 2018 19:16

Around this same problem:
How to run FBIde + FBC, from a personal Windows 10 user directory, but with Windows Defender as the only antivirus software?
(error 23: File not found, C:\Users\fxmam\Documents\Mes Outils Personnels\FBIde0.4.6r4-FreeBASIC1.06.0.win64\FBIDETEMP.bas)

I was able to solve the problem only by installing Avast (for example) as antivirus software (so causing the disabling of the Windows Defender antivirus part).
paul doe
Posts: 1314
Joined: Jul 25, 2017 17:22
Location: Argentina

Re: New version?

Postby paul doe » Apr 07, 2018 20:52

fxm wrote:I was able to solve the problem only by installing Avast (for example) as antivirus software (so causing the disabling of the Windows Defender antivirus part).

I have Avast too, but Windows Defender isn't disabled, Avast takes precedence over it. To get rid of these problems, I simply created a 'Programming' folder in the root folder, and put everything programming-related inside (editors, compilers, et al). So, I can compile, test and run programs (I use FBEdit also) without the continuous intervention of the antivirus. You just need to configure it to ignore the folder you use to compile and run code. Two cents more.

Return to “Community Discussion”

Who is online

Users browsing this forum: No registered users and 7 guests