What to do about a lack of developers for the compiler?

General discussion for topics related to the FreeBASIC project or its community.
Post Reply
BasicCoder2
Posts: 3906
Joined: Jan 01, 2009 7:03
Location: Australia

Re: What to do about a lack of developers for the compiler?

Post by BasicCoder2 »

Tourist Trap wrote:What I can say is that Pygame, a popular game utility library for Python started by promoting really simple stuff (in big quantity) on its website to show that something was possible. Then its popularity could grow, and ourdays I think there is a lot of people knowing about this lib and using it. But at start it simply exhibited stuff, and in my opinion of poor interest (pac man like and other basics).
The thing here is that Python has lots of developers supporting it. We don't have a FBGame version of Pygame built over the SDL library otherwise we could easily write the same kinds of games.

If the FreeBasic compiler was bundled with support libraries which could be used with a simple import statement it would be easy for people with my limited knowledge to write those simple games you write about.
.
BasicCoder2
Posts: 3906
Joined: Jan 01, 2009 7:03
Location: Australia

Re: What to do about a lack of developers for the compiler?

Post by BasicCoder2 »

angros47 wrote:I already built a set of function to implement those commands, and I have those routines on the forum.
Ok. I will have to search for them and try them out.
.
St_W
Posts: 1626
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

Re: What to do about a lack of developers for the compiler?

Post by St_W »

I think that the gfxlib should be extended to fulfill today's requirements. Examples are e.g. support for PNG and other modern graphics formats, resizeable text rendering (TTF/OTF support) and probably also basic sound support. Basic networking support would be nice too, but I don't know whether the gfxlib would be a suitable place to implement that.

So far so good. However, these extensions to the libraries have to be done very carefully. I wouldn't e.g. blow up the rtlib with additional features to keep it pretty small. On the other hand I think that the gfxlib can grow and that size is not that important there. This would allow to keep applications small for users not using the gfxlib.
A very important decision will be how to introduce those new features in the FB language. We currently already have a situation near to a "keyword hell" and I wouldn't make that even worse by adding a lot of keywords. So the extension of the language should be done very carefully and wisely and not by adding a lot of keywords, maybe even with inconsistent naming or usage rules. Additional keywords can easily break existing code if those names are already used there for something else. Personally I'd like to see e.g. all fbgfx keywords in a separate namespace so that they are accessed e.g. via "fbgfx.screen 13", but that would probably be a too big change although one just has to write "using fbgfx" on top to restore the old behaviour.
Additionally to the language I'd be also very careful when introducing new dependencies. For example a dependency on winmm.dll for adding sound support probably wouldn't be problematic because that library is part of every Windows installation. However, whether to add a dependency on some non-standard libraries should be carefully considered.

(Just my 2c.)
angros47
Posts: 2323
Joined: Jun 21, 2005 19:04

Re: What to do about a lack of developers for the compiler?

Post by angros47 »

St_W wrote:I think that the gfxlib should be extended to fulfill today's requirements. Examples are e.g. support for PNG and other modern graphics formats, resizeable text rendering (TTF/OTF support) and probably also basic sound support. Basic networking support would be nice too, but I don't know whether the gfxlib would be a suitable place to implement that.
I think that an improvement would be adding the option to use OpenGL for rendering (basically, rendering the graphic buffer on a texture, and then display a quad with such a texture). In this way, it would be possible to use shaders for post-processing, giving a complete new look to FreeBasic graphic.
So far so good. However, these extensions to the libraries have to be done very carefully. I wouldn't e.g. blow up the rtlib with additional features to keep it pretty small. On the other hand I think that the gfxlib can grow and that size is not that important there. This would allow to keep applications small for users not using the gfxlib.

About sound, my idea was to have another library, working just like the graphic library: it should be statically linked only when the sound commands are used, just as the graphic library is linked only when graphic commands are used. Otherwise, every time a sound command is used, all the graphic functions would be linked, and every time a graphic command is used, all the sound functions would be linked. Last but not least... my sound functions are written in FreeBasic, not in C, so they can't be included in a C library.

Code: Select all

A very important decision will be how to introduce those new features in the FB language. We currently already have a situation near to a "keyword hell" and I wouldn't make that even worse by adding a lot of keywords.
I see, but PLAY and SOUND were already used in other basic dialects that FreeBasic is replacing

Additionally to the language I'd be also very careful when introducing new dependencies. For example a dependency on winmm.dll for adding sound support probably wouldn't be problematic because that library is part of every Windows installation. However, whether to add a dependency on some non-standard libraries should be carefully considered.
In fact, with my subroutines, under Windows the only dependency needed is winmm, and under Linux, first it tries to dynamically load ALSA, and if it fails it uses OSS as fallback.
dafhi
Posts: 1641
Joined: Jun 04, 2005 9:51

Re: What to do about a lack of developers for the compiler?

Post by dafhi »

I think that sound support is an excellent idea. I made a low latency softsynth using windows source by D.J. Peters

One key concept of my synth is that timing between notes is independent of buffer size
angros47
Posts: 2323
Joined: Jun 21, 2005 19:04

Re: What to do about a lack of developers for the compiler?

Post by angros47 »

And I ported a soft synth using FM synthesis: http://freebasic.net/forum/viewtopic.php?f=8&t=22001 ... that can be part of the sound library (a falback solution when MIDI is not supported)
MrSwiss
Posts: 3910
Joined: Jun 02, 2013 9:27
Location: Switzerland

Re: What to do about a lack of developers for the compiler?

Post by MrSwiss »

BasicCoder2 wrote:We don't have a FBGame version of Pygame built over the SDL library otherwise we could easily write the same kinds of games.
Above statement is simply: "false" in it's entirety.
There is "Aura Flow Lib III", from: Adigun A. Polack (which is based on SDL).
(which has recently (2016?) even been updated to FBC x64)

Sound -- IMHO, should be kept "outside" of the FB-core. E.g. I want to use: fbGFX but,
without any overhead (like sound etc.).
There are plenty ext. lib's for that (if some interested people, would make one of those
"static", which would eliminate "dll-hell", for noobs, that'll be enough. I'm not at all in.).
Just as D.J.Peters has solved the PNG issue: with FBImage ... (static). my 2 cent's.
Tourist Trap
Posts: 2958
Joined: Jun 02, 2015 16:24

Re: What to do about a lack of developers for the compiler?

Post by Tourist Trap »

BasicCoder2 wrote: If the FreeBasic compiler was bundled with support libraries which could be used with a simple import statement it would be easy for people with my limited knowledge to write those simple games you write about.
That's call for a question then. Why the extended library project finally collapsed. It was a great first step towards the kind of extended packages which would add functionalities targeted at specialized production. It's not too late however, but I think that this failure (temporary?) has to be analysed.
Imortis
Moderator
Posts: 1924
Joined: Jun 02, 2005 15:10
Location: USA
Contact:

Re: What to do about a lack of developers for the compiler?

Post by Imortis »

Imortis wrote:
By the way: I took you advice, and choose a bug I was pretty sure I could fix: QB type suffixes allowed on any keywords

I have found the problem. The lexer does not care what dialect you are in when checking for the suffixes. It is disallowed on variables, so I am going to see where the error is thrown for variables, and use that code to fix other keywords. I hope to have a fix before too long.
I think I have a fix. I am running the unit tests now to make sure I didn't break anything, then I will test to see if suffixes are no longer allowed on keywords.
BasicCoder2
Posts: 3906
Joined: Jan 01, 2009 7:03
Location: Australia

Re: What to do about a lack of developers for the compiler?

Post by BasicCoder2 »

MrSwiss wrote:
BasicCoder2 wrote:We don't have a FBGame version of Pygame built over the SDL library otherwise we could easily write the same kinds of games.
Above statement is simply: "false" in it's entirety.
There is "Aura Flow Lib III", from: Adigun A. Polack (which is based on SDL).
Then I stand corrected. I had seen the thread but it seemed to be about making retro looking images. Anyway I have downloaded the library. Have many games been written using it?
I tried to run some of the demo code but kept getting, error 80: Invalid command-line option,
Will have to find and read the manual.
.
sancho2
Posts: 547
Joined: May 17, 2015 6:41

Re: What to do about a lack of developers for the compiler?

Post by sancho2 »

Imortis wrote:I think I have a fix. I am running the unit tests now to make sure I didn't break anything, then I will test to see if suffixes are no longer allowed on keywords.
This is very cool Imortis. Thanks for stepping up to the plate.
Imortis
Moderator
Posts: 1924
Joined: Jun 02, 2005 15:10
Location: USA
Contact:

Re: What to do about a lack of developers for the compiler?

Post by Imortis »

Imortis wrote:
Imortis wrote:
By the way: I took you advice, and choose a bug I was pretty sure I could fix: QB type suffixes allowed on any keywords

I have found the problem. The lexer does not care what dialect you are in when checking for the suffixes. It is disallowed on variables, so I am going to see where the error is thrown for variables, and use that code to fix other keywords. I hope to have a fix before too long.
I think I have a fix. I am running the unit tests now to make sure I didn't break anything, then I will test to see if suffixes are no longer allowed on keywords.
Feh. I thought I had a SIMPLE fix. I did not. I will have to add the check for suffixes to EVERY SINGLE keyword manually. I thought I could nip it in the bud at the lexer level. I was wrong. I can still fix this, it will just take a lot more time.

Also: FB's test suite has some tests that fail on the latest version of the compiler. Is there a set that are expected to fail?
St_W
Posts: 1626
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

Re: What to do about a lack of developers for the compiler?

Post by St_W »

Imortis wrote:Also: FB's test suite has some tests that fail on the latest version of the compiler. Is there a set that are expected to fail?
in the last test run a few days ago this the only test that was failing and only on windows x64:
fbc_tests.string.format.number format test (since more than a year)
All the other platforms (windows x86, linux x86/x64) ran through without failures.
Which tests fail for you?
Imortis
Moderator
Posts: 1924
Joined: Jun 02, 2005 15:10
Location: USA
Contact:

Re: What to do about a lack of developers for the compiler?

Post by Imortis »

FAILED LOG - for log-tests -lang fb
./compound/select.log:compound/select.bas : RESULT=FAILED
./compound/select_const.log:compound/select_const.bas : RESULT=FAILED
./compound/with.log:compound/with.bas : RESULT=FAILED
./dim/byref.log:dim/byref.bas : RESULT=FAILED
./dim/common-shared-1.log:dim/common-shared-1.bas : RESULT=FAILED
./dim/dynamic-dimensionsonly-2.log:dim/dynamic-dimensionsonly-2.bas : RESULT=FAILED
./dim/extern-array-1.log:dim/extern-array-1.bas : RESULT=FAILED
./dim/extern-array-2.log:dim/extern-array-2.bas : RESULT=FAILED
./dim/extern-not-allocated-by-local-1.log:dim/extern-not-allocated-by-local-1.bas : RESULT=FAILED
./dim/global-init.log:dim/global-init.bas : RESULT=FAILED
./expressions/div-by-zero.log:expressions/div-by-zero.bas : RESULT=FAILED
./file/input.log:file/input.bas : RESULT=FAILED
./file/large_int.log:file/large_int.bas : RESULT=FAILED
./file/line-input.log:file/line-input.bas : RESULT=FAILED
./file/lof.log:file/lof.bas : RESULT=FAILED
./functions/fwdref-in-signature.log:functions/fwdref-in-signature.bas : RESULT=FAILED
./functions/module-ctor-staticmemberproc.log:functions/module-ctor-staticmemberproc.bas : RESULT=FAILED
./functions/naked-ctor.log:functions/naked-ctor.bas : RESULT=FAILED
./gfx/image-expr.log:gfx/image-expr.bas : RESULT=FAILED
./interactive/input.log:interactive/input.bas : RESULT=FAILED
./namespace/redim-2.log:namespace/redim-2.bas : RESULT=FAILED
./optimizations/consteval.log:optimizations/consteval.bas : RESULT=FAILED
./optimizations/inline-ops.log:optimizations/inline-ops.bas : RESULT=FAILED
./optimizations/self_compare.log:optimizations/self_compare.bas : RESULT=FAILED
./overload/pointers.log:overload/pointers.bas : RESULT=FAILED
./pointers/new-delete.log:pointers/new-delete.bas : RESULT=FAILED
./pp/if.log:pp/if.bas : RESULT=FAILED
./quirk/global-ns.log:quirk/global-ns.bas : RESULT=FAILED
./quirk/on-goto.log:quirk/on-goto.bas : RESULT=FAILED
./quirk/zwstr-deref.log:quirk/zwstr-deref.bas : RESULT=FAILED
./string/cvi_mki.log:string/cvi_mki.bas : RESULT=FAILED
./string/val.log:string/val.bas : RESULT=FAILED
./structs/base-init.log:structs/base-init.bas : RESULT=FAILED
./structs/derived-cast.log:structs/derived-cast.bas : RESULT=FAILED
./structs/extern-class-test.log:structs/extern-class-test.bas : RESULT=FAILED
./structs/func_backpatching.log:structs/func_backpatching.bas : RESULT=FAILED
./structs/temp-var-dtors.log:structs/temp-var-dtors.bas : RESULT=FAILED
./threads/racecondition.log:threads/racecondition.bas : RESULT=FAILED
./typedef/backpatch.log:typedef/backpatch.bas : RESULT=FAILED
./wstring/utf_conv.log:wstring/utf_conv.bas : RESULT=FAILED
Version 1.06.0 (10-25-2016)
I just realized it is an older version from from the current build. I will try again with one of your on-demand builds.
Post Reply