Some random GAWK code.

Here is some gawk code that I want to post just because I don't have a place to store them right now.

The first is an implementation of the blowfish encryption/decryption algorithm. It requires a bash shell and gawk. Why do blowfish in gawk? I dunno. It does have the neat feature of being very unix-ish (it encrypts to a plain text file that can be fed back into itself for decryption).

The second attachment is a handy utility (I use it at work) for converting between binary and decimal numbers. It uses a fairly interesting algorithm (not my own!) to do the conversion without every resorting to actual integers. The result: Arbitrary precision. You can make the numbers as big as you like.



1174329455-79121-blowfish.sh | 1174329455-79121-b2d.awk

- Submitted by Todd Coram

Permalink | Mon Mar 19 14:37:35 2007


Crazy ideas

In my last posting I talked about making network processes out of BLOGnBOX scripts. Of course, upon closer inspection of how I laid out the master blog.sh script, I am already creating processes that last across "content entities" (email) via piping. I don't know if making these processes persistent across "sessions" makes any more sense.

This brings me back to some crazy ideas I've been mulling around for the past year: Unix as a full blown application environment. Twenty years ago this wasn't so crazy. This was the way things were (supposed) to be done. Lots of little tools would compose applications. Now we have the monolith. I've written about this extensively here.

I believe that we are at the point (processor-wise) where writing your "system" as a collection of small Unix programs makes sense again. I believe it can scale.

BLOGnBOX isn't quite there yet...

/todd



- Submitted by Todd Coram

Permalink | Fri Mar 2 14:04:42 2007


Ideas, ideas, ideas

I frustrate myself. I've got a ton of ideas; some related to this blog's software. But, I don't have a ton of time.

I doubt anyone cares about (g)awk anymore. At least, not as a programming language. I guess I am holding on to the original Unix idea of composing solutions with lots of little tools. Each awk script is a tool in a tool chain that composes this blog.

In my world, tiny tools still rule. You see, you take the big ideas, but then you break them down to their fundamental pieces and implement them as small-ish tools.

But, what about things that don't follow the venerable unix pipeline? With gawk, you turn the little tool into a small process that listens and responds over sockets. Each process has a mailbox (rather than a pipe end). It *should* be that simple.

Right now, BLOGnBoX is a pipeline of gawk scripts. I should be able to turn certain pieces into processes. I should be able to have a POP3 process that wakes up every 5 minutes to download new content from a POP3 server. After it downloads the email, it sends a message to the BLOGnBOX mailpiece parser process which parses and validates the content contribution. It passes the result to a BLOGnBOX builder process which then finally sends a message to the BLOGnBOX publisher which uploads the new blog site.

Why not do this as a monolithic pipeline (as it is now) scheduled by cron for every 5 minutes?

Well, I have a similiar setup for my EFX driven website. The problem is how do I subvert the process? What if I don't want to download POP3 messages, but just re-generate the site by hand? I have to stop the background pipeline so I don't step on its toes and re-run it. I could send it messages regarding what to do. But, that seems to cumbersome. With little BLOGnBOX processes, I pick which point of the pipeline I want to invoke and just send it a message. Simple. Sweet.

So, now I have to implement: bnb_pop3_fetcher, bnb_mail_parser, bnb_builder, bnb_publisher as little TCP processes.



- Submitted by Todd Coram

Permalink | Thu Mar 1 11:56:17 2007


I need to resurrect this system!

It's been quite a while. I've even started to use Google's blogger for my CFT projects. But, I have a soft spot for my home grown system. Maybe now is a good time to pick it up again.

It still works, right?



- Submitted by Todd Coram

Permalink | Mon Feb 19 12:29:04 2007


Some minor details..

When I say that this software is about 1000 lines of gawk, I mean just about everything is coded in gawk. The pop3 fetcher, the SMTP mailer, the FTP client... everything. The only other software used is bash, mv, find, date, and maybe sed -- all GNU.

This was an abuse of gawk. But it was fun.



- Submitted by Todd Coram

Permalink | Sat Jul 22 22:00:41 2006


What is BLOGnBOX?

BLOGnBOX is purely pre-Beta right now. It is approximately about 1000 lines of GNU Awk code and it handles blogging soup to nuts. Soup to nuts? Huh?

Well, this 1000 lines of GNU Awk code handles downloading content from a POP3 email account, extracting the content, formatting the pages and even FTP the pages to a webserver.

It even does pictures!

So, yes. Soup to nuts! Brought to you by your neighborhood pirate...





- Submitted by Todd Coram

Permalink | Fri Jul 21 23:04:42 2006


Welcome to a new blog...

Welcome!

This is the home of a new blog. It documents the development of a new blogging software system called BLOGnBOX. Its a dead simple blogging system inspired by EFX.

Stay tuned for more info!



- Submitted by Todd Coram

Permalink | Fri Jul 21 22:06:30 2006


Powered by BLOGnBOX