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

For other topics related to the FreeBASIC project or its community.
Imortis
Moderator
Posts: 1629
Joined: Jun 02, 2005 15:10
Location: USA
Contact:

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

Postby Imortis » Aug 06, 2017 2:12

coderJeff wrote:... all I have to offer right now is talking about it.


I have been looking from someone to talk to about the compiler internals for a while. I WANT to work on the compiler but have no idea where to start reading to understand the massive amount of code. I have trying picking a few files here and there and just diving, in, but every file relies on at least 2-3 other files.

If I could just get a good starting point where I look around an not have to have 30 bi/bas/c/h files open at once so I can go look up what this function/datatype/define is/does, that would make things a lot easier.

Can you point me in the right direction?
Imortis
Moderator
Posts: 1629
Joined: Jun 02, 2005 15:10
Location: USA
Contact:

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

Postby Imortis » Aug 06, 2017 2:19

stephanbrunker wrote:But unfortunately, there was no response here in the forum to my offer.


I have seen this many times. Both with my self and others. A good example is D.J. Peters fbSound library. It is a wonderful piece of code that D.J. Peters is no longer updating because of what he sees as a lack of response. I have tried to get it to compiler for newer version of FB, but I can't seem to get OGG loading to also work. I asked for any help people would be willing to give, only to have some one else IN THE SAME THREAD do exactly what I did and stop.

The Forums are not as active as they once were, but we still have people using the compiler. Any post will get 2 dozen views before anyone responds. It is frustrating.
BasicCoder2
Posts: 3398
Joined: Jan 01, 2009 7:03

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

Postby BasicCoder2 » Aug 06, 2017 4:26

D.J. Peters has been a major contributor.
FLTK for FreeBasic comes to mind although I don't know how many use it.
If a sound library was integrated like the graphics library I think it would been used more frequently.
viewtopic.php?f=14&t=17740&hilit=fbsound
For some reason Windows 10 still claims the download site has malware.
http://www.alice-dsl.net/d.j.peters/fbs ... nd0.20.zip

Roland Chastain used fbSound in a frogger demo.
viewtopic.php?f=8&t=18005&hilit=frogger

The best promotion for FB is in the programs written using FB. The current compiler with libraries can in theory be used to write interesting or even useful programs but for some of us we need tutorials or very good demos using a library. For example I would like a tutorial on using mySQL or SQLite with FB to make a simple data base program.
.
Last edited by BasicCoder2 on Aug 06, 2017 9:28, edited 7 times in total.
coderJeff
Site Admin
Posts: 3063
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

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

Postby coderJeff » Aug 06, 2017 5:39

Imortis wrote:Can you point me in the right direction?

I think you need to have the right attitude. The desire to keep learning and working at it even when it takes a long time and is difficult. Not trying to be a jerk here, but if you don't know your way around the sources, then yeah, you will have to spend more time looking around the sources. After a while, you learn what things are called and what they do (like functions, data structures, types, #define's). Don't let yourself give up so easily.

To help me find things, I use an editor that lets me open all the sources at once and I use the search function. I also use grep from the command line.

For fbc sources, there is some info on the wiki dev pages. In particular https://www.freebasic.net/wiki/wikka.ph ... FbcModules is a nice overview.

Most efficient way, I think, to get introduced to the compiler is to have a goal in mind (e.g. a bug report) and start tracking it down.

If it is compiler related, then minimally, you should learn how to:
1) build a debug version of fbc
2) use a debugger to trace execution through the compiler as it compiles a source

If it is run time related, then minimally, you should learn how to:
1) build a debug version of rtlib & gfxlib2
2) use a debugger to trace execution through a compiled program and step in to the rtlib & gfxlib2 source

As you work towards your goal, you will learn as you go, tracing through functions and inspecting variables.
MrSwiss
Posts: 3259
Joined: Jun 02, 2013 9:27
Location: Switzerland

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

Postby MrSwiss » Aug 06, 2017 13:39

coderJeff wrote:In particular https://www.freebasic.net/wiki/wikka.ph ... FbcModules is a nice overview.
Ha, ha, an overview, I agree, but nice? E.g. how do the modules relate to each other, in a hierarchical way?

But to more to the point questions like:
1) which fork is to be pulled ... (1.05.0 / 1.06.0)
2) where to pull from: Git or SF?
3) is a specific client needed, to do so?
4) required 'logins', as in point 2 (e.g. I've a SF login, but nothing on GIT)
and so on ... (the real basics, to get a start, in the first place)

Some coders here, have never felt 'that important', to use any code repository, to date.
The stuff was simply posted in the Forum here.
(I've once used my SF login, to report a bug on FB #823...)
Imortis
Moderator
Posts: 1629
Joined: Jun 02, 2005 15:10
Location: USA
Contact:

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

Postby Imortis » Aug 06, 2017 14:14

coderJeff wrote:
Imortis wrote:Can you point me in the right direction?

I think you need to have the right attitude. The desire to keep learning and working at it even when it takes a long time and is difficult. Not trying to be a jerk here, but if you don't know your way around the sources, then yeah, you will have to spend more time looking around the sources. After a while, you learn what things are called and what they do (like functions, data structures, types, #define's). Don't let yourself give up so easily.


Who said anything about giving up? I just said I would like a simpler entry point. I have been doing just as you say: editor with multiple files open and the search function. It is just very slow going.

I read other people's code for a living, so this is not my fist rodeo. I was hoping that someone else had found a simpler way. That's all.
St_W
Posts: 1476
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

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

Postby St_W » Aug 06, 2017 16:02

MrSwiss wrote:1) which fork is to be pulled ... (1.05.0 / 1.06.0)
2) where to pull from: Git or SF?
3) is a specific client needed, to do so?
4) required 'logins', as in point 2 (e.g. I've a SF login, but nothing on GIT)
and so on ... (the real basics, to get a start, in the first place)
re 1: your question is a bit misleading. You create a fork of the fbc repository. Version numbers are irrelevant here, as the repo contains all branches and tags. Then you clone your fork and create a new branch where you do your commits (don't do that on the 'master' branch). Ultimately submit a pull request to merge your changes back into the upstream project. I won't explain it here in more detail as there are a dozen of good GIT tutorials out there which explain the basics. Just try out with some local dummy repository - the GitHub software e.g. even has a tutorial built-in.
re 2: I'd suggest to use GitHub
re 3: You need a Git client. The command line client would do but I suggest a GUI like SmartGIT or SourceTree (registration required).
re 4: You need a GitHub account to create a fork and submit pull requests.

Of course you should also know some basics about compilers and general to understand some terms and concepts commonly used (also in the Wiki). Wikipedia is a good start to learn that.

And note that using a VCS is in no way something to "feel important". Every teenie programmer uses GitHub or a similar service nowadays. It simplifies development a lot no matter whether you're alone or working in a team.
Tourist Trap
Posts: 2762
Joined: Jun 02, 2015 16:24

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

Postby Tourist Trap » Aug 06, 2017 16:21

Imortis wrote:My questions are as follows:
  1. How do we move forward?
  2. Has the design philosophy of freeBASIC changed?
  3. Are we willing/able to put in the effort to learn the current code so we can change it and if so, how do we even get started?

Hi there, my 2 cents answers:

How do we move forward?
For me the priorty would be to keep moving on the right tracks rather than fast but uggly.

Has the design philosophy of freeBASIC changed?
There is not enough communication on the future of FB. For me I find that FB should stay at midpath between a fast but well furnished compiled language, and in another hand somthing close to a simple (yet powerful) scripting language in Basic.

How do we even get started?
I don't know. At the point where FB stands today, this must be more complicated than ever. Because the language works rather well, which makes it more reluctant to changes (risk lies in breaking things along the changes).
stephanbrunker
Posts: 62
Joined: Nov 02, 2013 14:57

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

Postby stephanbrunker » Aug 06, 2017 16:59

I fixed the Drag&Drop Tutorial. It was only one minor declaration (iid ptr / REFIID) in the last step. Someone jumped straight ahead to the last example and that did not run. The examples 1-4 worked just fine and included all the scenarios except starting a drag with the FILEDESCRIPTOR, means copying the file via global memory or a stream.

But for contributions: Is it that simple? As mentioned, I have a lot of code ready for the examples section, so just forking it on GitHub and make a pull request?

As said, I cannot contribute to the compiler, but as far as I am affected, 1.05 is working just fine. Back in 0.90 a lot of the windows definitions had to be fixed and var-len arrays weren't possible and so on. So I can only say that FB has evolved quite a bit and I could remove nearly all of my fixes. Yes, it would be nice to have some additional functions, but that can also be achieved with a independent library. Or where in the FB tree you can find for example the Hex() function to add an additional overload?
coderJeff
Site Admin
Posts: 3063
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

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

Postby coderJeff » Aug 06, 2017 17:08

Imortis wrote:Who said anything about giving up? I just said I would like a simpler entry point. I have been doing just as you say: editor with multiple files open and the search function. It is just very slow going.

I read other people's code for a living, so this is not my fist rodeo. I was hoping that someone else had found a simpler way. That's all.


A simpler way for this project? Or any project? For example, if I want to understand how something works in gdb, I am searching through code and tracing execution through a debug version of gdb (yeah, it gets a little hairy). It's slow going to say the least.
coderJeff
Site Admin
Posts: 3063
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

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

Postby coderJeff » Aug 06, 2017 17:14

@MrSwiss, if you are looking at something for the first time, I think you are in a really good position to contribute. You have some questions, and it sounds like you think that the information could be more available. You could be that person, that carefully notes down the questions, the answers, the steps, the information, and the results. Then you can post that knowledge to share with others, or better yet, add it to the wiki in the places where you think it is missing.
MrSwiss
Posts: 3259
Joined: Jun 02, 2013 9:27
Location: Switzerland

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

Postby MrSwiss » Aug 06, 2017 17:18

coderJeff wrote:... add it to the wiki in the places where you think it is missing.
That is unfortunately a NO-GO, because of missing access to the WIKI (not working login!).

Another long standing issue, that hasn't been addressed, in a long time.
coderJeff
Site Admin
Posts: 3063
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

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

Postby coderJeff » Aug 06, 2017 17:38

MrSwiss wrote:
coderJeff wrote:... add it to the wiki in the places where you think it is missing.
That is unfortunately a NO-GO, because of missing access to the WIKI (not working login!).

Another long standing issue, that hasn't been addressed, in a long time.


Hmm. What do you get when you try to log in? Name and password should be same as the these forums.
MrSwiss
Posts: 3259
Joined: Jun 02, 2013 9:27
Location: Switzerland

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

Postby MrSwiss » Aug 06, 2017 17:50

coderJeff wrote: Name and password should be same as the these forums.
Hell, I know that also, since about 4 Years, being on this forum.
It's been discussed with fxm, amongst others (having the same problem).
It seems to be broken, a long time, before my joining ...
(looks like logins created before ~2010, are working, still ...)

This is another way of communication, that's not usable any longer, really bad (but, not exactly news)!
VANYA
Posts: 1323
Joined: Oct 24, 2010 15:16
Location: Ярославль
Contact:

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

Postby VANYA » Aug 06, 2017 17:54

stephanbrunker wrote:I fixed the Drag&Drop Tutorial.


I asked the German forum for a solution to this problem, but St_W kindly informed you of this.Thank you for fixing the tutorial!

stephanbrunker wrote:But for contributions: Is it that simple? As mentioned, I have a lot of code ready for the examples section, so just forking it on GitHub and make a pull request?


It would be nice.

Return to “Community Discussion”

Who is online

Users browsing this forum: No registered users and 22 guests