Tuesday, October 30, 2007

KSP-Modular : User buffer system

I wanted to create a way to store data for user use.  The goal was to create memory space which:

  • Acted like an array (basically just a list that could be manipulated easily)
  • Was able to store session data in memory without doing hard drive storage.
  • Had nameable lists, so you didn't have to remember just a computer assigned address

After thinking about it on and off for about 3 days, I believe I have a solution.  My method is to use an array of arrays.  Now, everyone knows that arrays are managed through indexes, which doesn't fit my last goal.  So, my method for that was a name-to-index hash.  When creating a new data set, the system pushes a blank array into the main array, figures out it's index, and maps that in the hash to your specified name.

The really cool thing is that this method appears to work.  I really would not have been surprised if it didn't.  I am still working on some of the methods for it, and then I need to integrate it into the code.  It is currently in it's own program for demo purposes.

I'm pretty psyched that this idea works though.  It should be a great way of doing what I had wanted.

Monday, October 29, 2007

KSP-Modular - Over 500 lines

Yep, I just noticed that it is currently 511 lines long.  There is still a great deal to be done though, I won't be shocked if it crosses 1,500 lines, maybe by a lot.

Just a quick note

The version of KSP-Modular found on the site it NOT the latest version.  As a general rule, I will post on here when new software is uploaded to the site.

KSP-Modular - web.link.extract

The web link extractor is working great.  Here is an example link dump from the Kain Research homepage

---------- Link list start ----------
http:www.kainresearch.com/images_gen/Kain_Research_Banner.jpg
http:www.kainresearch.com/services.html
http://kainresearch.blogspot.com/
http:www.kainresearch.com/services.html
http:www.kainresearch.com/software.html
http:www.kainresearch.com/chemistry.html
http:www.kainresearch.com/research.html
http:www.kainresearch.com/projects.html
http:www.kainresearch.com/service_que.html
http:www.kainresearch.com/personal_pages.html
http:www.kainresearch.com/php/CMD_Journal/Viewer.cgi
http:www.kainresearch.com/poe_index.html
http:www.kainresearch.com/links.html
---------- Link list end ----------

The extractor module I am using extracts just the relative paths present in the html code, so I wrote a subroutine that maps them out fully.

I still have some testing to do in the regex inclusion/exclusion subroutines, but I am very happy with how it is coming along.

Thursday, October 25, 2007

KSP-Modular

The web site has been updated to show this project now. 

Additionally, I have redone the better part of it to use locally scoped variables as per the last post.  It is working well.

Monday, October 22, 2007

KSP-Modular variable naming conventions

I have been working (as stated in the last post) on some web tools.  My original intention was to name variables after the subroutine they were in.  This is not going to work.  You see, with the easier sorting of subroutines, you end up getting subroutines with names such as:

handler_web_link_extractor_fix

Which means I was ending up with variables in there named incredibly long names such as:

handler_web_link_extractor_fix_base_url_array

Which is bad enough, but even worse when concatenating 2 or 3 of those on a line.  Then we have stuff way, way, way past the 80th column.  I don't like that, I generally will try as hard as possible to stay within 80 columns.  At the very least I try very hard to stay on the screen.  I use a 1680x1050 wide screen display, so if it isn't fitting on there, I figure some changes need to be made.

After looking around a bit, it looks like I will simply start making gratuitous use of the "my" command to just make stuff local.  I feel this should work way better, and I will start fixing my variables soon.

Sunday, October 21, 2007

Shell program

All development on all shell overlays has been paused for full development on KSP-Modular.  KSP-Modular is now the official development console.

If you actually follow this blog, you may be thinking "Wait, wasn't a shell program announced a page back?"  Yes, indeed it was.  KShell was a design to build a shell overlay in C.  The reasoning behind development in C was first and foremost because I could produce a binary.  Second, it was for it's small size and speed.  I have since found libzip for Perl though.  It allows binaries to be constructed fairly minimally.  That takes care of the first two reasons.  It is not of course as fast as C (by a pretty good amount actually).  Not bad though.  It runs fairly well.

So, given the chance to use Perl instead, it is a nicer choice.  It is easy to develop it, and incredibly powerful and flexible.

The "-Modular" part of the name is actually because I had started work on a KSP script, until I noticed that it would end up being very tough to maintain.  The redesign has a much better layout already.

It will include nice ways to extend it as well.  Including built in abilities to install packages of add-on scripts and their documentation.

I have the path manager pretty much ready, and am working on some link extraction tools.