View Full Version : FantomGL = ThinBasic Compiler?
Michael Hartlef
11-09-2007, 12:01
Hi Eros,
now that you get your head into FreePascal, I can voice my idea I have about FantomGL for quite some time.
The idea is: TBCompiler(or whatever you name it) could be a thinBASIC -> FreePascal compiler/translater. If the modules could be extended (or second versions could be made) that would make them useable as DLL's, then TBCompiler could link the exe dynamically to the DLL's. TBCompiler would not make thinBASIC obsolete as I see us still developing in TB and at the end, soneone could create a compiled executable via this TBCompiler. Is this idea to far off? Is it a bad idea?
Michael
ErosOlmi
11-09-2007, 12:23
Mike,
ideas are never bad, they are always interesting.
So, if I get it correctly:
have module with double version functions: thinBasic bind and exported one
have a thinBasic --> Free Pascal converter
compile converted source into executable using modules functions as standard external functions
Personal feeling is that your idea is very very interesting but as you have already seen many times, I try to be concrete.
So in my opinion this is something doable from a technical point of view but I just put my first foot into Free Pascal so I'm not sure I can help you and follow you in this on a short time basis. I first need to learn how to make DLL in FP, which data types are directly compatible with thinBasic, if strings are 100% compatible or some changes are needed. For what I've seen from documentation, WideString and AnsiString data type seems OLE32 compatible but on OLE32 strings len is 4 bytes before string data while in FreePascal (from old documentation) 4 bytes before string data is placed the string reference counter while the len of the string is 8 byte offset. So a lot to check and at the same time continue thinBasic development.
If this is not a problem for you, you can start with making some tests.
For example to test if a simple module can be used in both way and also how to manage strings.
If those tests go fine, I'm pretty sure possibility to make this project happen are very very high.
What do you think?
Ciao
Eros
Michael Hartlef
11-09-2007, 12:26
Good, I will make some tests once I have variable managment fully done.
You all know how I feel about this, GREAT!! Mike that is a wonderful idea and it will be so great to know that we could use our favorite language on many platforms in the future. I am glad you will be experimenting, it sure sounds very positive and possible!!
Michael Hartlef
11-09-2007, 16:38
Cross platform would mean having similar modules available on these platforms. This sounds like a huge task to me. But anyway, I will test my idea and see what I can come up with.
Petr Schreiber
11-09-2007, 18:45
Wow,
what a nice cake is baking in progress here :D
Kent, going fully multiplatform would mean to write Linux version of all modules for example.
This could be hard in many cases, on other side tB modules are quite highlevel, so nothing is impossible.
Bye,
Petr
This is all very very exciting stuff, I know it is still a mountain of work to do, but at least now there is a chance and hope, so that is very exciting.
Google is rumored to be coming out with a cell phone, linux based, runs java and is unlocked to take advantage of what is on the web, just a rumor but the tech web casts said they have heard these from credible sources and believe definitely somthing is in the works.
In addition low cost linux based notebooks are coming, how nice it will be to use thinBasic and freePascal on these!!
http://arstechnica.com/news.ars/post/20070906-asus-sets-ambitious-goals-for-eee-laptop.html
http://jepoyeng.blogspot.com/2007/08/cheapest-laptop-in-world.html
The Madison could be a scam as I have seen written on some sites, but we know the Asus one isn't, and OLPC is supposed to go on sale before Christmas at a pretty low price too, not the original $100 laptop, but definitley something portable and fun. I am sure once these come out we will see many many more.