Home      Updates      RSS Feed      About      Code      Contact

  CGI scripts May 11 2011 10:17 PM EST

Holy hell, what a day it has been. So many things to talk about. I can only remember two >_> Well, one really. I started messing with CGI today. I did a bit in D, figured out the binaries are huge (which isn't fun with scp), and tried out C++ a bit. So, I have

Some point an hour or so later, I decided to switch back to D. Wow, you can do some neat things with CGI. Since I'm using XHTML anyway, everything is structured in the same way, so each thing can be a node with attributes and potentially content and more sub-nodes. I hacked together my own thing in D, making the main program roughly 80 lines to parse the query string. The support lib, tag.d, is roughly 160 lines, but can probably be whacked way down by using the XML standard library. That is a project for tomorrow, though!

Oh, what the two scripts can do so far is pretty much just print the way the query string parses. So, append "?stuff=other&more=less" and things like that. The D script uses associative arrays, and looks for the "name" key to print a little welcome message.

 

My name is Jeff Chapman; You can reach me at: [email protected]