Path: csiph.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Paul Rubin Newsgroups: comp.lang.forth Subject: Re: CGI Scripting in Forth Date: Fri, 16 Oct 2015 13:03:47 -0700 Organization: A noiseless patient Spider Lines: 24 Message-ID: <87egguzil8.fsf@jester.gateway.sonic.net> References: <0b37bb20-361f-4555-a468-62d70f6f46f3@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="1a9f5856d25720e42c135b990c70bebb"; logging-data="6503"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19ANSbis7w1iKA2qN6yA/FX" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:rDhvOAtbAnRXiMX2mjymy3P7tos= sha1:gHSx+BtC41z8AGpdMp1B0Tf8MUk= Xref: csiph.com comp.lang.forth:42663 Jason Damisch writes: > I put this into my notes. I will give it a look over. > I assume at the moment that I could put 8th, SwiftForth Linux or > MPE Linux on this and do something. Again I would like to be able > to use CGI which would be HTTP, wouldn't it? Linode is good but rather expensive and there are lots of similar services that cost lots less (ramnode.com's $15/year, 128 meg SSD plan is plenty for what you're doing). Linode's $20/month plan has 2GB of ram which is massive overkill for a small web site or Forth CGI. CGI scripts don't run HTTP per se--they just generate HTML text. The http server launches the CGI script when a request for it comes in, and the CGI can access the query and http parameters through environment variables. The script can read the query's POST data from its standard input and write HTML to its standard output. If you really want to run a concurrent HTTP server in Forth, they probably exist. Polyforth multitasking (as I understand it) uses a CPU busy loop which is completely unsuitable for shared hosting (cpu hogging) or modern server hardware in general (vastly increased power consumption compared to idling). But I think Swift and VFX multitaskers know how to idle. I think it's more practical to stay with a more standard httpd like nginx or apache, and just run cgi's under it.