Programming tools

I’m trying to come up with the ultimate simple programming environment. I’d like to be able to support most any type of user interface, such as CLI (command line), ncurses (maybe via dialog), zenity, tk (I think it’s ugly, but might make a good fallback) and wxwidgets. And I’d like to be able to daemonize it simply and use it as a web server, or to be able to called by one.

I’ve been debating TCL vs. Python. Python is very nice, but it seems that I would have trouble making small executables with it. One of my main goals is for the deliverables to remain small as possible. A program call freewrap is advertised as making small executables, for which I could make TCL programs, and (optionally) a TK interface. Unfortunately, it seems freewrap doesn’t appear to work with the newest 8.5 Tcl/Tk, so therefore ugly GUI without Tk’s new theming. But maybe it’s still possible, or will be by the time I need it.

Since I want to make a generic view (from the Model, View, Controller pattern), I might still be able to use wxwidgets (and probably Python) if I want to deliver a beautiful interface — at the expense of deliverables size. How I’d wrap this into an installable deliverable I don’t know yet. That’s later, anyway, as well.

Sqlite and Tcl seem to be a very nice fit for what I want. D. Richard Hipp has some wonderful ideas about using Sqlite for a generic storage backend that would replace use of arrays; becoming part of the code itself. This goes along with my philosophy for a super-generalized computer program.

The program itself would know very little, not even its own name. It’s function is to run a loop: What’s the best thing to do, then do it. It would provide error messages if it couldn’t initialize. And that’s about it. The database would load code as needed.

I spent a good part of this morning reviewing Expect, as it has a signal handling functionality. It’s important that anything I write (and should be anything I do) maintain its cleanliness. So if there’s something dirty that should be cleaned up before exiting, Expect can trap SIGTERM (hopefully on Windows too) and run a cleanup function. It looks now as if there’s nothing dirty about opening the database, even with a table that’s only in memory. If so, I could load the cleanup functionality from the database, and keep it very simple.

Data would be stored as either a unique ID or as a value. From the past research I’ve done (which I seem to have misplaced at the moment), I came up with a scheme using 32 numbers and letters, which I called ZILO encoding. I named it that, since those would be the letters I would omit, since they look like other letters or numbers. Using 128 bits plus a few more, I’d end up with (if I remember right) 30 digits that could be handwritten and reread without error. This would store a GUID, a big integer, or just raw data.

Part of the ZILO encoding is the ability to sort data, which the default GUID format doesn’t lend itself to. Important data that’s part of the GUID should be available: where the ID came from, and what time it was when formed. Note I don’t subscribe to random GUID’s as MS devs do, as they are not truly unique.

The basic table format I described came in three parts: an ID, a subject, and an object. A representation of any unique or commodity object would get a GUID. Values stored in big integers would play a big part. Every object would be a class, an individual being a class with one object.

Subsequent entries would compound upon another, and a freeform database (within a database) would emerge. Every assumption made would be linked to a basis, which can be revised. Revisions would stay within the database, and bogus assumptions would be culled by a garbage collection routine. So there are no Updates or Deletes involved, just Inserts and Selects. The most valid truth would just come from the relationship which has the most recent good basis.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: