[Coco] The Coco's first webserver, written in Basic09
aawolfe at gmail.com
Thu Dec 31 03:32:00 EST 2009
Well it wasn't up for long before I found some problems :) However, I
think I really, really fixed it this time. I'm about to get some
sleep, we'll see if she's still running in the morning.
I *think* it's also stable enough that it can support telnet users at
the same time.
The http server now lets you put a regular OS-9 path for the path part
of the URL. It currently won't serve the file unless it's name ends
in .txt or .html, but you can pull up files from any device otherwise.
here's some html in a ram drive:
the same file on a drivewire virtual disk:
If anyone wants to test serving files, there are many ways to get them
onto the coco:
use a line editor
use the command:
wget http://www.someplace.com/somefile.html > /x1/wwwroot/somefile.html
(also works for ftp urls)
(this is an interactive FTP client. be sure to be in the directory
you want to save the file in before starting, there's no was to change
local dir from inside the client yet)
or: just email the file to me
On Thu, Dec 31, 2009 at 1:32 AM, Aaron Wolfe <aawolfe at gmail.com> wrote:
> Updated version of the web server is back online. It can now serve
> files from disk and is (hopefully) a little more robust.
> On Thu, Dec 31, 2009 at 1:16 AM, Christian Lesage <hyperfrog at gmail.com> wrote:
>> Wayne Campbell wrote:
>>> The converter would be easy to write, yes. But Basic09 is not a script
>>> 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
More information about the Coco