[Coco] The Coco's first webserver, written in Basic09

Wayne Campbell asa.rand at gmail.com
Thu Dec 31 02:07:18 EST 2009


If I am understanding you correctly, the idea is you are generating this 
code, then converting it to Basic09. I assume the content could be different 
with each run, so you would be repacking this continually. However, if this 
is a compile once-run many times thing, then why not just write the Basic09 
procedure as a procedure and pack it?

There's no reason it can't be written to produce HTML as output. 
Dynamically, however, I don't think it would work as you might expect.

Wayne

----- Original Message ----- 
From: "Christian Lesage" <hyperfrog at gmail.com>
To: "CoCoList for Color Computer Enthusiasts" <coco at maltedmedia.com>
Sent: Wednesday, December 30, 2009 10:16 PM
Subject: Re: [Coco] The Coco's first webserver, written in Basic09


> Wayne Campbell wrote:
>>
>> The converter would be easy to write, yes. But Basic09 is not a script 
>> language like javascript. That code would have to be loaded into Basic09 
>> to be run, and that is a waste of memory, and is slower than running 
>> packed procedures from the command line with RunB. It would be the same 
>> as running Visual Studio every time you created a c++ source file.
>
> This is why I wrote "you compile the resulting PROCEDURE into bytecode, 
> and it becomes the active page that the server RUNs whenever it needs to 
> display it". What's wrong with that? I admit I haven't programmed in 
> BASIC09 for the last 20 years, so you certainly know a lot more than I do 
> about how it uses memory. But the manual says RUN "can also be used to 
> call a previously compiled (by the PACK command) procedure", so it seems 
> like a logical choice to me.
>
> Besides, you can't make an omelet without breaking eggs. I think the 
> question is: "What would waste the most resources?" Writing an interpreter 
> within the interpreter, or using the one you already have?
>
>
>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco 




More information about the Coco mailing list