Twostep compiler?

Geoff Canyon gcanyon at inspiredlogic.com
Mon Mar 22 03:51:22 EST 2004


Warning -- I speak here only as someone who thinks he knows something, 
not as someone who actually knows anything!

Revolution does not run your code in an interpreted fashion. Neither 
does it pre-compile. The reason for this has nothing to do with 
proprietary byte-codes, but is a simple technical requirement. The 
engine translates Transcript into a table, with chunks of code 
referencing each other by pointer. This means that code runs very fast, 
as there is no lookup each time something needs to be called. It also 
means that the code _must_ be set up at runtime, in order to configure 
the pointers.

So your code is compiled at runtime, but only the first time it is 
loaded. As others have mentioned, you can encrypt your stacks to add a 
level of security. If security is paramount, it would be easy to write 
checksum-checking code into your app.

As far as the size of the Transcript code goes, talk to me again after 
you've written an app with a megabyte or more of Transcript in it ;-)

Oh, and self-modifying code isn't evil, just misunderstood.

regards,

Geoff Canyon
gcanyon at inspiredlogic.com

On Mar 21, 2004, at 7:32 AM, A.C.T. wrote:

> Hi,
>
> please just ignore me if I am getting on your nerves - I have found a 
> couple of hourse time to spend on Revolution so I am busy 
> understanding the concepts behind it :-)
>
> I read that many of you encode the plain text of their scripts to hide 
> them from customer's eyes. Why is the plain text included at all? Even 
> ancient interpreter languages (like old VC20 basic) don't write the 
> PLAIN TEXT into a file, they use TOKEN. A "print" would be a one-byte 
> token. This also speeds up reading the file in (less data to read).
>
> The question I would like to ask is, since I HOPE Revolution isn't a 
> "runtime-interpreter" but a modern "two-step" compiler that creates a 
> bytecode from the "human readable code", which again is executed 
> internally: Why isn't the bytecode saved as the executable code for 
> standalone-applications? It's very likely that this bytecode is 
> platform  independant (it would be funny if it wasn't since you would 
> have to compile a new runtime-executor for every platform then)...
>
> Anyway: Saving the "original source code" inside a runtime application 
> does not make much sense: It needs a lot of space (all function names, 
> variables etc don't have to be stored with their "human readable" 
> fully qualified names, their code references would do nicely), the 
> application has to compile the code every time it is run (what for? If 
> it has to compile it anyway, the pre-executable code would do nicely 
> for the application and it would be less "spyable") instead of 
> directly using the bytecode - and it makes the application "hackable".
> I tried changing the "Transcript" code inside a "standalone 
> application" to see if this is a security issue (meaning: I use a 
> normal text editor that is binary safe - I am NOT using Revolution). 
> IT IS. Changing the clear text code inside the application leads to 
> the CHANGED CODE being executed - so it would be easy for an evil 
> minded to put some nasty stuff into the application, the code to be 
> executed is not checksum-protected. This would at least be a BIT more 
> difficult if only the bytecode was stored in the standalone app, not 
> the original source code.
>
> Again: Please excuse my potentially "offending" questions. I am trying 
> to understand the technical implications of using Revolution and to 
> find out why some issues seem ... somewhat "complicated", where they 
> do not have to be complicated :-)
>
> Marc Albrecht
> A.C.T. / Level-2
> Glinder Str. 2
> 27432 Ebersdorf
> Deutschland
> Tel. (+49) (0)4765-830060
> Fax. (+49) (0)4765-830064
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>



More information about the use-livecode mailing list