A Serious Article Debating the Pros and Cons of FreeBASIC

For other topics related to the FreeBASIC project or its community.
technoweasel
Posts: 70
Joined: Aug 06, 2008 22:47

Postby technoweasel » Sep 11, 2009 19:39

Try to stay on topic everyone.

I'm glad members are still discussing this. Is this the longest ever FB forum thread?
cha0s
Site Admin
Posts: 5317
Joined: May 27, 2005 6:42
Location: Illinois
Contact:

Postby cha0s » Sep 11, 2009 21:18

If anyone's interested in what I've done so far, you can check out http://tinyurl.com/ynupj4
phishguy
Posts: 1201
Joined: May 05, 2006 16:12
Location: West Richland, Wa

Postby phishguy » Sep 11, 2009 21:20

I can't believe it. You rock!
vdecampo
Posts: 2982
Joined: Aug 07, 2007 23:20
Location: Maryland, USA
Contact:

Postby vdecampo » Sep 11, 2009 21:37

This is almost a complete replacement for the old FB!

You are the coolest cha0s!
Ryan
Posts: 695
Joined: Jun 10, 2005 2:13
Location: Louisville, KY
Contact:

Postby Ryan » Sep 11, 2009 22:43

Ok, so phishguy and vdecampo just became not-my-friends. : P
Eponasoft
Posts: 264
Joined: Jul 26, 2007 2:40

Postby Eponasoft » Sep 12, 2009 0:02

stylin wrote:Eponasoft, sorry, clearly you missed it; I was being facetious. :)

Yeah I probably missed it...I'm just not used to people on this forum actually having a sense of humor. :D
John Spikowski
Posts: 453
Joined: Dec 24, 2005 2:32
Location: WA - USA
Contact:

Postby John Spikowski » Sep 12, 2009 3:17

cha0s wrote:Well, writing ANSI C++ isn't hard, and I personally would never approve a commit that used any vendor-specific extension unless 1) it only applied to that specieic vendor's environment, or 2) there were analogs implemented in other compilers.

Me personally, any project I write with g++ always uses the following flags:

-pedantic -ansi -Wall -Wextra

Though, I'll admit the current mingw is horribly outdated, so I've written logic for configure.in to determine if the compiler supports -ansi, but where possible, I use it. I think this kind of thing will help us write code that's the most portable possible.

As stylin mentioned, these are important questions, but they aren't deal breakers...

P.S. Arguing against Java's portability? I think you're grasping for straws there ;)


I'm glad the author of ScriptBasic decided from the start to go the strict ANSI C / POSIX route. Even after 10 years, the code still compiles on just about everything.

I can't see any reason you couldn't use ScriptBasic to build your new compiler. It keeps the tradition of the compiler being built in Basic and would almost be self documenting.

ScriptBasic has external (Basic or C) cascading preprocessor support and you can extend the Basic with extension modules that are tightly coupled with the language API. The internal preprocessor support would allow for a built in debugger.
marcov
Posts: 3012
Joined: Jun 16, 2005 9:45
Location: Eindhoven, NL
Contact:

Postby marcov » Sep 12, 2009 9:11

stylin wrote:
If you add inheritance, you start to exchange records for objects, symbol by symbol. The code than cleans up a bit, and only then you can think about refactoring.

Well, with the OOP FB currently supports, the easiest things to refactor into classes would probably be the utility containers (I have not delved too deeply into the emitter code, but perhaps this is also an easy area to "fix"). This would lessen the number of lines devoted to memory management at the least. I am not sure how to go about decoupling the lexer, tokens, parser and symbol table from each other (the preprocessor is in the mix, too, difficult to extract that functionality).


(oh, and don't OOP what aren't already objects)

You only need inheritance, and a form of procedure pointers. FB is not that far from that.

FB currently supports procedure pointers;


(maybe also the method kind, which adds an instance reference)

I like the way you casually throw out "You only need inheritance". Gee, if it was that quick and easy.. :)


Compared to suggesting rewriting everything TWICE ? Gee, and I thought I was bold :-)


A visitor pattern is a name for what has been used to walk trees for ages.

Absolutely, but it seems better to me to make use of a design in a language that easily and clearly supports it. Why replicate C++/Java/xxx functionality in C when you can just use C++/Java/xxx ?


To my best knowledge, none of these languages have support for this. Some of their libraries do, but it is not a language feature.

IOW if you really want this, start designing FB template support (you'll need it anyway for when you come back from C++) ( :-) :-))

But anyway, I wouldn't use features that won't be easy to add to the initial in basic compiler. It will only make that already horrible hard decision harder.

I still think there will be a horrible problem with motivation in the long run.

Assuming that one of the goals wouldn't be to eventually port the result to FB (and continue in FB), I might agree. But, there seems to be motivational problems now (I am guilty just like anyone else).


I don't even think you'll make it till then. It will have forked into oblivion, by the people that want to stick/port to C++/Java/C# and maybe a bit more over compiler versions, OSes etc.

C++ ian sich will be pretty similar, but build systems, approaches, library use, use of newer C++ standards (Boost etc), way to interface assembler etc won't.

And of course battles over the C++ compiler. (MSVC, BCB or mingw on Windows?)

C++ is fully 100% portable; I foresee no problems in that area.. seriously, these are important questions to ask, but I do not think the challenges they imply are insurmountable.



Unfortunately make systems and other project files are not. And keep in mind that this is all work for a temporary measure that only indirectly contributes to the FB codebase.

However I'm starting to realize how lucky FPC was that the dialect we were copying (TP) was fairly usable (286+ usable to 16MB), and the fact that other free compilers were hardly available.
Last edited by marcov on Sep 12, 2009 10:04, edited 1 time in total.
marcov
Posts: 3012
Joined: Jun 16, 2005 9:45
Location: Eindhoven, NL
Contact:

Postby marcov » Sep 12, 2009 9:27

cha0s wrote:
P.S. Arguing against Java's portability? I think you're grasping for straws there ;)


Ever used GCJ? How many non-SUN java's do you use?
John Spikowski
Posts: 453
Joined: Dec 24, 2005 2:32
Location: WA - USA
Contact:

Postby John Spikowski » Sep 13, 2009 18:08

FreeBASIC Dev Team,

The All Basic site has a FreeBASIC presence and managed by CountingPine. Using the All Basic site FB board to kick off the the new compiler and attract members to the dev team could be a option. It could be a great way to test the waters to see if there is real interest in doing this or is all talk.

I would hate to see the excitement about a new compiler kill off on going efforts with classic FB.


John
cha0s
Site Admin
Posts: 5317
Joined: May 27, 2005 6:42
Location: Illinois
Contact:

Postby cha0s » Sep 13, 2009 18:35

Thanks for the offer, John.

I can't speak for anyone who might help, but I think a new site just for that project would be the best approach. I wouldn't want to try to share this forum. I just posted about it here because I thought it should be said. ^^
John Spikowski
Posts: 453
Joined: Dec 24, 2005 2:32
Location: WA - USA
Contact:

Postby John Spikowski » Sep 13, 2009 23:20

I have registered and setup hosting for www.freebasic-compiler.org and installed the SMF forum software to get the project rolling.

This is the extent of my involvement in this project. My contribution is free hosting and facilities management. The FreeBASIC developers would need to elect a primary site admin for the site. I will give this person Plesk 9 control panel and ftp access to the site to take it where it needs to go. I will only answer to the FreeBASIC site admin for site support.

Forum: http://www.freebasic-compiler.org/forum

Note: Registration to the forum has been disabled till a site admin is selected.

John
Sisophon2001
Posts: 1704
Joined: May 27, 2005 6:34
Location: Cambodia, Thailand, Lao, Ireland etc.
Contact:

Postby Sisophon2001 » Sep 14, 2009 12:18

cha0s wrote:If anyone's interested in what I've done so far, you can check out http://tinyurl.com/ynupj4


This link points to a web site that plays a song and refuses to stop. An interesting example - now where is Ctrl-Alt-Del in Linux?

garvan
John Spikowski
Posts: 453
Joined: Dec 24, 2005 2:32
Location: WA - USA
Contact:

Postby John Spikowski » Sep 14, 2009 17:03

I thought the site was hacked or I picked up a virus. If this was the intent, then I think it was a bit childish and doesn't do anything to make me believe the developer is serious about this effort.

Just my 2 cents.
McLovin
Posts: 82
Joined: Oct 21, 2008 1:15
Contact:

Postby McLovin » Sep 14, 2009 17:57

It was just a common "You got RickRolled". I always seem to fall for them and I always laugh when I do. It helps lighten the mood sometimes.

http://en.wikipedia.org/wiki/Rickrolling

Return to “Community Discussion”

Who is online

Users browsing this forum: No registered users and 3 guests