PDA

View Full Version : Don't shoot me, but I got a heretic idea.



kryton9
07-07-2007, 01:17
Guys, I was out doing errands today and decided instead of rushing, to drive the scenic routes, listen to music and think in between tasks. Anyways, this thought just hit me as I thought about programming, thinBasic and what all is out there. It is nothing new, but maybe a new way to look at what we are doing in thinBasic. With the power and speed of thinBasic, it is easy to forget it is interpreted and not compiled and that I think is what might have put us in the wrong frame of mind and direction.

No matter how much thinBasic is developed and all the great tools, it will and can never be as fast as compiled. Another thing is without OOP it does make programming huge tasks hard. So there will always be limits.

But what if we thought about thinBasic like LUA, let it be conductor of an orchestra of compiled code? That is as a true scripting language. Have and make thinBasic so it can talk with all that is out there and handle the user(player) interface with the hardcore project components instead of writing the hardcore project components or converting them. I know this is a heretic idea, but in a way makes sense. Why waste time developing stuff that perhaps should be developed in another language, but use thinBasic as the go between all that is out there and makes life complicated otherwise.

Use thinBasic to quickly assemble ideas, access and convert data, stuff that maybe those systems aren't designed for. thinBasic could be asset manager, option manager reading and writing all the game data to databases in formats that the modules are looking for.

Why spend time and effort converting headers and libraries and writing wrappers. There are great engines, tools out there. thinBasic should be language to tie them all together.

As you know I have been looking at languages like a mad man and I see the same thing in all. If it is not c/c++ it has to have at least headers converted. It can never be up to the latest version that is out there without someone taking the time to do the conversions. Even a company as big and strong as Borland and now CodeGear, is limited in keeping up. I am surprised they just don't automate their language to just use the standard headers and libraries, no conversions, with their talents, then Delphi I think could be the dominant language. But this is off the point.

You see what we are doing in python, ruby, eupohoria and many other languages. Devoted users doing their best converting and trying to make their beloved language do what maybe it is not meant to do.

Anyways my current thinking and I just present this is that thinBasic should concentrate on being the best scripting language it can be. The next version in whatever language can then be designed to be the next language to do all, but I think any do all new language should just be able to use standard c/c++ headers and libraries and do all the work behind the scenes and present the users with an elegant solution to access the power in those libraries and scary syntax.

You guys have done incredible things. I am amazed by the work I see from Eros, Roberto, Petr and Michael. Not to mention the cool code from some of the great new members. But I think besides the challenge and fun of going down the path we are going, it is not the best solution and maybe wasting the talents you all have.

This was long and probably not clear so here is a simple recap:
1. focus on making thinBasic the mighty scripting language, not the be all next alternative language. It should keep adding to its arsenal of powerful tools for manipulating data of all sorts and accessing as many different data sources and file formats as possible

2. maybe start thinking of the next be all easy to use fun language that does something different. It uses standard c++ libraries behind the scenes, always the latest things will work, but the language on top is clean and friendly. OOP is a must, I have read many good points about how oop is not the thing we all think, but then I do see some incredible things that can be done with OOP, so it depends like any tool, who's hands it in.

I think Eros, Robert, Petr and Mike you guys have great minds at making things presentable and useable.

I think spending your times in something could potentially be a good money maker really, a true alternative language. One that compiles, supports all of the c++ libraries and will aways do so, no conversion needed by users. But presents a basic like clean syntax without goofy looking syntax. You might ask well how can we give a nice interface to the user without writing a wrapper, well that is the key. To write a tool that can look at the actual function in c/c++ and automatically generate syntax for the new language that is clean. And then if this grew you could develop the same to read the massive java libraries. I am surprised this sort of thing isn't out there but it coud be what is needed.

Please, don't take this post the wrong way. I am only posting because I really enjoy being a member here and love that we can actually talk to each other without the other side getting offended. Nothing like a healthy dialog of ideas, too hard to carry on in other places without flame wars.

If nothing else it should be something to read if you wanted to read something :)

Thanks for listening and letting me express my thoughts from today.

ErosOlmi
07-07-2007, 08:50
Ken, Ken, Ken :D

I really like your mind and the way you express the thoughts crossing your brain. I'm not joking here, I really appreciate you are still here telling us what you think! Thanks.

Well, where to start. OK: there is a great difference between what everyone of us can think in terms of ideas and what is really possible to do considering: time, number of people, technical limitations, personal knowledge limitations, ..., and so on. Like you did in your errands I can also think of what could be the best language and what that language should have to be perfect. But, can you imagine? My ideas are different from yours and different from any other. I'm pretty sure about that, we are just humans.

Now, for a moment imagine my ideas about the perfect language is accepted by, let say, 20% of the world programmers. OK, and now? How to build? How much time? What knowledge is needed? On how many systems it has to be able to run on? How many people has to work together to achieve the wanted targets? How can those people work together? What language we need to use to develop it? How to get money to support the project? ... ok, other 100 questions about logistics and startup come to my mind and other 100 regarding technical aspects, and other 100 on supporting infrastructure and money needed.

In principle you idea seems perfect: why struggling here and there looking hundreds of different languages and way of programming while we can use a common easy, elegant powerfull langauge? Simple: that language does not exists. We are all different and every programmer has its own "perfect" system in his/her mind.

Why big development companies didn't think about that?
I think they think something about that but the efforts are so great and the probability to be "the perfect language" is very low. Sun and Microsoft also still think about this and they also developed what they think is the perfect language (or system) but, for example, Java is now so complex, full of classes, full of version compatibility problems that it seems a big pain to me. And Microsoft .Net (with all those languages) seems to me just a way to put a big controlling layer over they OS (this will give 100% control over applications) and a way to kill all other programming environments.

thinBasic?
The initial idea was simple: automation. I didn't want to use system scripting because I had a bad experience with some VBS virus in a previous company were I worked (we deactivate WSH an all company computer) but I wanted an engine able to automate tasks. That idea is now over, as you can see. thinBasic is now much more and much more complex.

What is thinBasic now?
We still have a precise idea on thinBasic: interpreted, stable, fast, easy to be used and mastered, open to 3rd party library, features rich, Core engine as library. On this, we hope to be able to build a development community around thinBasic.

thinBasic is not the perfect language: we will not have OO inside so many OO enthusiasts will never come here
thinBasic is not the faster interpeter: many are much faster, example Euphoria
thinBasic is not for all: not compiled, not standard in many ways

But we have great attention both to language details and to people here. We like to stay together and talk about ideas and get suggestions. We like to release many uopdates, we want also tell people we will be here to go on development for the coming years and not disappear like many other (little or big) languages did.

OK, Ken, I will stop here even if I didn't reply to all of your point but I think you get my points.
We did a choice some years ago to stay with Basic both in the language we develop and with the language we use for developing. Maybe we will change the language we are using for developing and this is another choice we will get.

The key point is CHOICE:

it means having a choice to choose from
it is good for me to have many different languages to choose from
but also the need the make a choice
it is not good for me not to choose a one or two specific languages where to stay for as long as I've mastered them as much as I can


Ciao
Eros

kryton9
07-07-2007, 09:49
Eros, I understood all that you wrote and would not disagree with any of it. About the time and resources to do something like this, no doubt-- to me an incredibly monumental task, but that is what I see with all that you guys have done and are doing at incredible pace.

I think with the talents you guys have you could make so much money you could do what you wanted. And to prove my point, here is one example I will give about your guys talents:

Here is some code from the irrlicht game engine. The guy that made irrlicht is really impressing me so far. He knows his stuff from what I can tell and writes great code.

Here is the same code doing the same thing. I removed all the comments so we can just see the lines of code.

C++ version:

int main()
{
IrrlichtDevice *device =
createDevice( video::EDT_SOFTWARE, dimension2d<s32>(640, 480), 16,
false, false, false, 0);

device->setWindowCaption(L"Hello World! - Irrlicht Engine Demo");

as you can see he write really nice c++ code.

Now here is the same thing in C#, this is the newest language by the gurus at microsoft and of course one of the top guys that made Delphi and was brought to microsoft to design c#. C# is now 7 years old I think... pretty amazing. Anyways here is the C# code, nicer looking, but not as elegant if you ask me, a step backwards.


class Example
{
[STAThread]
static void Main(string&#91;] args)
{
IrrlichtDevice device = new IrrlichtDevice(DriverType.OPENGL);

device.ResizeAble = true;
device.WindowCaption = "Irrlicht.NET C# example 01 - Hello World";

As you can see lots more code and not too intuitive if you ask me.

Now here is the same version in thinBasic. By far the most elegant solution.

pIIP = VARPTR(IIP)

IRR_CreateDevice(pIIP, %IRR_EDT_SOFTWARE, 640, 480, 32, %FALSE, %FALSE, %FALSE, 0)

IRR_SetWindowCaption(pIIP, "Hello World! - Irrlicht Engine Demo from ThinBASIC")

Here you guys are, writing code that outshines in my opinion all those big gurus. So your way of doing things does and will have lots of appeal.
That is dramatic I think to see that comparison between the top languages out there and the amazing things you guys are doing.

Since there is this massive library of c and c++ libraries out there and new ones coming on the scene. Obviously this code is readable by a compiler, in fact many compilers so the syntax might look daunting to me, but from what I read, that syntax is the way it is because it makes the compiler happy. Since that code is easy enough for a compiler to understand, it means it is easy for a computer program to understand. So why don't you guys write the magic code that will auto translate that info to other popular languages. You can be filthy rich with something like that and it would be a lot easier than writing a new language, but then you would have the money to do what you want and maybe be on your way to replace microsoft :)

I don't understand why after all these years that still people have to do what a computer program should be doing that is translating these headers and people having to write wrappers. I think with your guys talents you could write something like this and really change the world and make big bucks you deserve.

Anyways thanks for the opportunity to carry on a nice conversation. I appreciated your response and hope to hear more when you have time.

Again that code comparison above just astonishes me!!! Talent is with you guys, I hope you realize that!!

ErosOlmi
07-07-2007, 10:10
Ken,

I can understand your points but there are big differences here.

What Roberto did (and will continue doing) on Irrlicht was "just" a C wrapper. I say "just" but in reality it is a big job because he had to make a lot of conversions from C++ to C to present at the end a simple and compact thinBasic interface. That's our idea on modules. They have to present to user a simple and coherent set of functions.

But we have not to forget that the Irrlicht author made the hard and original work and that is the real innovation. All others just made wrappers (thinBasic included). Of course there are wrappers and wrappers. When we create wrappers our first priority is user and usage, so, again, we think about: semplicity, elegance, optimization.

So, thanks a lot for you compliments but do not forget I would never been able to create a library like Irrlicht without 2/3 years of study (and just that) :D

In any case do not stop thinking about new ideas and post here anything, really. I will read with pleasure but is my duty (in respect to all thinBasic users) to remain with my feet on the ground.

Ciao
Eros

Michael Hartlef
07-07-2007, 10:15
Hi Kent,


With the power and speed of thinBasic, it is easy to forget it is interpreted and not compiled and that I think is what might have put us in the wrong frame of mind and direction.


Mmmh, depends on what you want in a language. If someone is aware of what it is and uses its power than someone can create everything he/she needs.

In todays coding world you have basically 3 types of coders:

1) The pure fun coder, has all languages he/she can afford, plays with the ones they feel comfortable, but never ever gets a full game/app done. This type croweds the forums of the popular indie languages. I call them wanna bee coders. :)

2) The indie hobbiest coder, has a lot of languages, sticks with one of two but is allways searching for the next new toy which is better, faster, more shinier. They hunt the next gen features like food. Most of them also never get anything done. They spent more time on forums then coding.

3) The professional or indie coder with a professional mind. They choice a language where they feel comfortable. Sometimes they use more then one but the decision gets made by the project. Each language has its strengh, so they take that into the decision. They know what a language can do and what not. They don't wait for a feature to appear, they get the job done. This people produce games and apps.

There is no such thing as the holy grail of a programming language. And Kent, if you like it or not. You are allways facinated by new stuff. You said it yourself, you are allways looking into other languages. Judging you by the projects you showed here, you have a big talent for apps/games. But imho you are waisting big time in your searches.

If you allways wanna get access to the news libraries, then you have to stay and master c++. Then you basically wasting your time with other languages. C++ has OOP and you have access to every 3rd party lib that is on this planet. There is allways a cross compiling tool like the GCC compilers so you are not bound to an OS.

I'm fully aware that thinBasic has its limitations. By my own experiences of creating a compiler, I know how damn hard it would be to write a compiler for thinbasic, because of its features. If I would have the time, I would probably write a thinbasic->C or C++ converter. This way you could compile the code and be also probably be able to run it on over platforms as well. The difficult part here would be to find the right libs that can mimik its features but I see nothing extraordinary.

Anyway I kinda feel bad for Kent because he has these visions and kinda nobody is willing or able to do something about it. I understand why but I can see that his motivation in using thinBasic will fade.

Michael


Adding after I read your post:

I think you are comparing apple and oranges. What Eros/Roberto and Petr does is they sum up several library functions into one thinBasic function. That is what it makes coding in a BASIC language so much easier. No tool could do this automatically, they is no such thing as it allways depends on the context.

kryton9
07-07-2007, 10:20
Thanks Eros for the nice conversation. But when I look at those samples, they are all doing the same thing... presenting the coder in their language a call to the same routines underneath in the end.

Anyways I appreciate all that is here and you guys, thanks again!

kryton9
07-07-2007, 10:27
Mike, you are right in what you wrote. I am a little of all of the above in your coder types. Just depends on the week I guess. Does that mean I am a split personality programmer :) I guess so.

You are right to stay focused is the only way to get things done. But I love exploring and pushing myself, can't and won't change, enjoy it too much.

But yeagh you are right, c++ is what I have to face and am, but as I do, inside I say, wow there has got to be a better solution. How can C++ be what it is? So I keep looking.

But I love thinBasic, I see what it already is, and also the great people it has here in the forums and the fantastic spirit here lead by Eros. I will be here for a long time.
Maybe someday soon adding modules written in c++, oh wow now I am dreaming :)

Thanks for writing and reading!

Michael Hartlef
07-07-2007, 10:29
How about a c++/thinbasic source converter? This way you can push your C++ skills and create something that can be used with thinBasic.

kryton9
07-07-2007, 10:34
If I could do something like that I would work on that make you one of the richest guys in the world type module that I wrote about earlier.
You are into writing compilers, maybe you can take it on and then we could build real spaceships with the money you would make with such a tool :)

Michael Hartlef
07-07-2007, 10:35
:D

I probably could, but to many projects and not enough time.

ErosOlmi
07-07-2007, 10:38
Maybe someday soon adding modules written in c++, oh wow now I am dreaming :)


Here I can tell you a secret: START SIMPLE.
Roberto has made a C/C++ SDK for MS C. He can help you a lot if you do not push too him much hard asking many things (he has real job to conduct) :D

But again start simple. Do not start thinking: I want to make a module that does DirectX or OpenGL or a 3D engine.
Start thinking: I want to create a module that export a function to thinBasic. Stop. Done that, tell to yourself again: I will add a new function making this. "Oh damn there are some problems! ". Stay there till problems are solved!

That's the secret: little but realistic short-time targets, than move next step. Along the road you will discover you targets will be switched into projects but at the same time you will have mastered your "hard to master" language.
Bealive me!

Ciao
Eros

kryton9
07-07-2007, 11:42
Thanks guys, I am taking the baby steps with c++, in fact I am walking backwards it feels like :)