[Gambas-user] Maybe a weird question

Rob sourceforge-raindog2 at ...94...
Mon Jun 27 17:13:01 CEST 2005


On Monday 27 June 2005 02:43, PaquitoSoft wrote:
> The only thing that I don't like about gambas is that it needs the
> runtime to work. It would be great to be able to compile your
> program no native code so it would be faster and independent.

I would love to see this happen, but I don't have the know-how to make 
it so.  Maybe a GCC front-end that took Gambas bytecode would be 
helpful, but I wouldn't even know where to begin.  As an alternative, 
making the interpreter a library that could be dynamically linked 
(like the VB runtime) or statically linked (like RealBasic) would 
make programs appear to be stand-alone, though that doesn't address 
the issue of all the components (go ahead, statically link Qt, I dare 
you ;) )

Here are the reasons I don't think it's necessary, even though I hope 
the option becomes available eventually:

1. When VB went from pseudo-code to "native code" (albeit with most of 
the functionality still in the runtime DLL) there was hardly any 
performance gain, and often a performance loss.  Don't forget, when 
you're writing in an interpreted language, your code isn't doing the 
heavy lifting... the interpreter is.

2. The way Linux package management is, it makes a lot more sense to 
package your interpreted program in such a way as to require the 
interpreter and any needed components.  Under Windows, you're stuck 
including all the dependencies in the installation package "just in 
case".... under Linux, it's not so.

This is why, even though Perl, Python, Tcl, PHP and other languages 
have compilers available, almost no one uses them to distribute their 
applications.  From the number of people who play Frozen Bubble 
(written in Perl) and use BitTorrent (written in Python) it's clear 
this is a viable way of distributing programs.  As long as the 
interpreter and components have been packaged for the user's 
distribution, he's all set.

I would actually rather see a way to write an entire Gambas program in 
one text-only script and distribute it that way, to encourage users 
to make their own tweaks and subsequently become programmers.  That's 
how I really got into coding, as a 12 year old kid.  Anyway, I 
started working on a hack to do this (called "gbs") and I posted 
about it to gambas-devel last year, but I'm sure it doesn't work 
anymore with current versions of Gambas.

Rob






More information about the User mailing list