Thursday, April 30, 2009

just one more day until it's possible to net a little bit of R&R....

Wednesday, April 29, 2009

Why do people only learn the hardway?

Monday, April 27, 2009

You know it's time to take a walk when....

if (expr) {
    do this only
} elese {
    do this instead

executes both blocks, and it takes you a minute to realize, that despite using Perls strict and warnings pragmata, you are to tired to notice you wrote 'elese' instead of 'else'

Oy vey, what a life.
Man, I've been workin too hard
Ten hour days and I'm tired
Damn this knuckle busted',
back breakin', no paying job
Know where I'm goin from here
Hot headed women, cold beer
Kick up my heels for a little while
and do it country style

In my dirty 'ole hat
with my crooked little grin
Granny beaded neck
and these calloused hands
And a muddy pair of jeans
with that copenhagen ring
No need to change a thing, hey y'all
I'm going out with my boots on

How I keep catching her eye
Man, I keep wondering why
Ain't nothing special 'bout
an "awe shucks" country boy
Lord, she's sure lookin' good
Like something from Hollywood
She got me thinkin' that I just might
leave here with her tonight


'Cause I am who I am and that's
the man I'm gonna be, yeah
And when the Lord comes callin',
well, he ain't gonna have
to holler, y'all
There'll be no trouble finding me


With my boots on
He's gonna take me home
Lord, with my boots on

-- Boots on

QOTD 2009-04-27

lambda calculus derivate ... a bit of python skin ... a piece of perl ... and some shells ..... there goes our alchemy drink
-- German alchemist in training

Oy, what a night....

Ok, so one of my friends AIMs me, cussing a blue streak and shouting that I've been hitting on his girl friend. I don't even know her, lol. Since I knew it wasn't me messengering her (friends wives/gf are off limits in my brain!), my head went into hazard mode: Counterintelligence time? Began making plans on upgrading all my password interlocks, and standing by to start an audit trail to see if anyones been listening in on my lines of commu. (Down to the hardware level.)

After developing an interesting cipher, and a vague idea of a secure password manager; I took to CO-Phase I, ascertain the truth and recon avenues of compromise -- without tipping my hand to any would be DB&E artist, that I know what's up.

Sure enough: false alarm, and a big sigh of relief at not having to change most of my Tier-3 password interlocks. While the new cipher is interesting (especially when mated to my Tier-system), I'm rather glad to have avoided CO-Phase II, deployment of the cipher and beginning a more traditional pattern of digital counter espionage efforts.

Sorted the whole thing out between the two of them, in so far as I am involved (lol). Which also brings my head up from Defcon II, to Defcon IV, now that I know my AIM account is still secured. My IM accounts only run at Tier-3 to Tier-4 of my personal security policy, so I know better then to rule out any monkey business; but ahem, I know prefer to stay out of trouble and keep my name likewise ^_^. I think I will begin migrating things to Tier-5 via the new cipher though, just to shake things up a bit.

I can't help but think, that he put f(X, B) = name together and figured it wrong, in the direction of AIM name lolololol. Oh well, I am cleared; and didn't even have to hit CO-Phase III :-). All in all, watching my friends raging-bull attitude, I'm rather glad that I don't get jealous very easy!

While a more correct choice of words, would be Counterintelligence (CI), I chose "Counter Operations (CO)" for the initial label, since a little more Direct Action then purely CI-related actions would be warranted, should anyone breach my Networks security rather then just an AIM account, hehe.


Sunday, April 26, 2009

Something that would really be cool....

The ability to take something like most forum packages "New Posts" data, and distribute it over RSS.

Could you imagine, tracking your favorite forums over an RSS Feed reader? Just click the link in your feed reader, and voila: view the whole thread in a web browser :-).

Just looking at the 'Google Reader in Plain English' video, makes me wish I could stuff all the sites I frequent into ONE place; I haven't checked RSS feeds in centuries but forums, every day baby...

My first date with KDE 4.2.2

Being someone who knows a few things, I decided that in order to be fair: I would generally hold off deciding whether KDE 4 is an improvement over KDE 3, until after KDE 4.2 was released. Well, as life has it, I've spent most of two days compiling KDE 4.2.2, and things went very smoothly (not that I liked compiling ocaml among the dependencies :-/). This is on my core workstation, running FreeBSD RELENG_7 (i.e. 7-STABLE).

My very first impression was... is this thing working??? All that first time setup takes a while to do, and without much sign of anything happening in the background. On the second boot up, after logging in through the X Display Manager (XDM), I counted 17 seconds until there was a usable desktop; but user interaction was clean all the way, no doubt about that this system was coming online. If you count the time it takes for korganizer and the other system tray icons to load, about ~45 seconds to get a full desktop -- but it's not far to count background programs like systray icons lol (especially the kind you'll likely remove later).

Although I think the startup time shouldn't be to bad for most people, I've forgotten how long it took to get a full KDE session going up, but I would say 17 sec is pretty good on my hardware hehe. With just a Sempron 3300+, even Blackbox and FVWM2 could start faster for my tastes, so no problem.

I find the new style K-Menu quite useful, takes a little getting used to - learning what adapts a focus follows mouse approach (the nav-icons on the bottom) and what requires a clickly click to work (most everything else). It is beyond me why it defaults to that behaviour (developer preference maybe?), but easy enough to make it a bit more consistent: right clicking the big K and going into the application launcher settings put the desired option right under my noise :-).

Obviously, the first thing I looked for was Konsole, the theme stuff on it is just awesome. Second thing was to dig up the run command dialog to get my urxvt+screen going. Further attempts to use the run dialog, proved that it was mostly a piece of krap. (Eye candy, but shitty to use; guess that is why there are terminal emulators.)

Closing the desktop folder viewer widget-thing was the third major action. Because I'm a person that hates having a desktop cluttered with icons (I prefer terminals :-), I like the idea very much, but since I have no immediate use for it, no need to have it taking screen realestate.

One thing that irked me, bringing up the help and control center entries on the applicaiton launcher (K-Menu?) loaded the ones from KDE 3.5.10, joy 8=). Oh wellk, it's quite easy to remove or change them via the menu editor. In the case of khelpcenter, it seems it just finds the wrong documentation ^_^. Killing off the old thing and setting /usr/local/kde4/bin in PATH at the top of my ~/.xsession file, fixed access to the Control Panel. I must admit, I rather dislike KDE3 cruft in the menu - however you slice it

For years, I have wondered why some systems never turned on the NUMPAD by default, considering that I now do so much off a laptop; I can understand why, it's a pain in the ass if when its unexpectedly on xD.

I generally feel that the whole Plasma and widget crazed stuff is a good element of KDE 4, but in all honestly, FVWM and Blackbox have just spoiled me something terrible.

It would appear, that KDE 4.2.2 is more or less ready for general usage, and unlike 4.0RC*, can actually be customized quite a lot to taste :-). For a little while, I was worried that Gnome might take the lead, and keep it... but I think by the time Gnome 3 hits, KDE 4 will be queen and king of the desktop environments, hehe. For those who desire eye candy, and have a machine capable of it; if you liked AERO, you ain't seen nothing yet laddy. I think anyone who is still holding onto KDE 3 at home, should start migrating while the getting is good; and employ programming talent for bringing along any missing "Must haves" to the new desktop. I am not sure if it is really an improvement beyond the concepts, but hey, at least there is Okular!

The technologies that interest me most, are only Phonon and Kross -- although I'm not likely to use either programming wise, beyond their stake in Qt (Qt has some form of Phonon, and has had a JavaScript'ish thing avail for awhile; and I wonder if kross will make it's way in before Qt5, hehe)

As for me personally, well I've gone back to the Famous Virtual Window Manager version 2.5.27, old habits die hard ;-)

Further testing of KDE 4.2.2 and later, will probably be through the Windows builds, rather then assaulting my poor stable laptop hehe.

Saturday, April 25, 2009

The reasons I hate Firefox

All OSes

Control over JavaScript is pitiful -- NoScript should be stripped down and built into Firefox.

Controls over tabbed browsing is minimalist, in so far as notepad and ed are minimalist text editors; Last year I tried TabMixPlus on one machine and was annoyed that such a thing could be necessary, just for basic tabbing features. (Konqueror and Opera are much better then extensionless Firefox)

The default theme sucks, and good custom themes that have kept up with releases can be hard to find. On my last hunt, I laughingly ended up with a variant of the 'first' theme I ever setup, all the way back in Firefox 1.0.x !!!

Until recently the interface for managing 'Applications' to open stuff with, was usually useless; by until recently, I mean for a user who has been here sine 2004~2005; and old enough to know that the name and 'logo' has changed somewhat ^_^.

For years plugins have been a major pain; a plugin should never be able to crash the ENTIRE web browser, or worse! Render the entire web browser unresponsive -- the ability to restore the users session is an excellent feature, not a band aid for the problem.

The ability to customize things is ridiculessly low, unless you want to get into themeing or add-ons; take a look at Konqueror, for a starting point on keybinding lol. I'm not even going to speak of Firefoxes interactive-scriptability...

On my Windows NT 5.1 machine, tested under Firefox v3.0.3, v3.0.6, and 3.0.9 tested; have never experienced this under BSD or GNU/Linux systems; but under Win32 the following also....

Images are about 3 times the size; if you go by dimensions in terms of window.resizeTo()'ing the browser window to match the on-screen size of the image.

Text is huge; I had to turn fonts down to size 10; SeaMonkey runs at 16 on the same machine, and the FreeBSD box uses the defaults.

Firefox initially refused to remember my home page in the preferences

Firefox blatantly refuses to accept 'Show my home page' on startup, and always 'starts up' with the 'Show my windows and tabs from last time' option. EDIT: seems to be doing it on unix as well; piece of shit web browser!!!

Firefox refuses to remember what size a window was when it closed; unlike previous versions have always done (in so far, as I have ever had to resize anything). In fact, I like Vimperator because *now* I can easily have Firefox resize itself on startup via JavaScript through .vimperatorrc.local, since the Windows version on my machine lacks the abilities of past Win, and all unix versions i've used :-/.

Except for the last three, I'd reckon the problems are because my Windows machine does not use the default DPI setting in Windows -- if that causes a problem, I would consider that to be Mozilla's problem and not Microshaft's ;-).

Note: Over the past 10 years, it has not been uncommon for me to spend that many hours a day, surfing the World Wide Web; so I am not a total moron.

Friday, April 24, 2009

Curoisity may fry the spider

Hmm, I wonder how hard it is to build a Analog to Digital Converter (ADC) and Digital to Analog Converter (DAC), suitable for mucking with a phone signal... not a dial up connection, but quite litterly 'hook in' to the signal as it goes from the phone jack, and into the phone. I.e. for processing and manipulation along the way....

Kind of like a router really, only workin' with POTS rather then the common Ethernet -- and like wise, with all of the fun stuff we can do with modern switching technology.... oh man, this makes me wish one of my friends was an electrician lol.

Why I don't drive

(22:44:17) Friend: drive?
(22:44:29) Spidey01: no license
(22:44:55) Friend: WTF?
(22:44:58) Friend: are you serious?
(22:44:59) Friend: why not?
(22:45:04) Spidey01: can't afford it
(22:45:20) Spidey01: it's like a f****** endless loop !!
(22:45:28) Friend: dude yes you can
(22:45:37) Spidey01: how?
(22:46:01) Friend: go take the test
(22:46:28) Spidey01: cost of maintaining license, cost of insurance, cost of gasoline
(22:46:44) Friend: get more money cumming in
(22:46:53) Spidey01: how?
(22:47:23) Friend: well how do you get to work now?
(22:47:43) Spidey01: Her royal majesty drives
(22:48:34) Friend: dude how can that not bother you?
(22:48:38) Friend: mommy still driving you around
(22:48:43) Spidey01: uh huh
(22:48:59) Spidey01: there are 2 ways in which I can afford to rectify that situation:
(22:50:44) Spidey01: A.) Quit this job, get sufficient income to do it --> SIDE EFFECT: must make up lost earnings due to putting her royal majesty out of work; that means a job with around $1000-$1200 take home pay, plus more for cost of (license, insurance, gasoline), and I'll probably end up her royal majesties taxi driver and even more so, an errand boy
(22:51:54) Spidey01: B.) Talk her royal majesty into paying the bill --> SIDE EFFECT: will surely end up her royal majesties taxi driver, and probably even more of an errand boy; attempts to use the car regularly will eventually result in a *cut off* of gasoline supply -> return to original problem definition....
(22:53:34) Spidey01: hence, either way I lose in the end -> life is a very evil chess game
(22:55:30) Spidey01: Any ideas?

where =~ substitute/her royal majesty/my mother the royal pain/globally
note $range is an off the top of the head estimate; but in the right ball park.

Imperialist or Vimperialist?

I've begun testing the firefox extension "Vimperator". I have become, should we say increasingly disatified with Firefox since the 2.0.0 release; so it has basically been pissing my off for the last 2 or 3 years ^_^.

All web browsers just suck, most are totally lame... Firefox, the 1.x releases were a great step up over IE5/IE6, but by modern standards Firefox 3.0.x is still lacking - it has not really evolved *all that much* past what it was so many years ago. The finaly piss in the bucket, was when Windows Firefox 3 proved to run more effectively on FreeBSD under WINE, then FreeBSD Firefox 3 on FreeBSD or Windows Firefox 3 on Windows NT 5.1. That, just popped the cork... lol. It's my firm believe that a web browser, especially something as big, fat, and ugly as Firefox, Opera, or Internet Explorer -- are seriously fucked in the head, if they require non-standard issue add-ons to make them useful.

Personally at the minimum, I think any browser that supports tabs and javascript; but lacks a _real_ way of managing tabs and security (think NoScript), is just !@%!%^^! retarded. Ok, that kills off the majority of web browsers ever created, doesn't it?

Tonight, I installed Epiphany; and despite the unappealing appearance of the program, I actually found it superior to Firefox 3 after a few minutes of testing. The extensions package offering an interactive Python console, especially so. The standard JavaScript interface was fine I guess, but I would much prefer Python to JavaScript; because I know the language much better.

To give Firefox one last, and final chance... before I take a HEX EDITOR to the SON OF A ****, I've installed the Vimperator extension; in the hopes that the massive changes it makes, might redeem Firefoxes lameness. So far, it seems to be quite an improvement. The ability to navigate documents is much improved; most notably it now has *S* *A* *N* *E* tabbed browsing support, heck I've seen modeless editors with better tab support then standard Firefox, and that's kinda sad. Access to JavaScript is much more readildy available (in a less ubtuse way), and bringing most of the Vi IMproved style stuff along, builds up issues solved by some add-ons, and not dreamed of yet by most "regular users".

What can I say, I am no normal user -- I spend inordinate amounts of time on and around computers. During that time, the programs I use most often include a terminal and command line intreptor (Windows is just moronic here, period), a text editor, various chat programs, and a web browser. Although there are countless people in this world, who use more of the web then I bother to explore: few people use their web browser more then I do, lol.

I chose Vi IMproved as my text editor, because it is quick, effieciant, and rewards the user with a tool that respects the most simple fact of any program solving a common problem: The user has more things in life to do then use this shitty program, so let's make their life easier.

Why can't a web browser do that also?

Thursday, April 23, 2009

Writer's Block: Beautiful Vistas

What is the most beautiful view you've ever seen? Have you been there, or do you plan to visit? If you have one, share a picture.
Live Journals Writer's Block

The most beautiful view that I've ever seen, has got to be Tennessee -- the mountains are so beautiful. One you get far enough into north Georgia, you start to get into mountain country, and the trees start to grow thicker all around. Further into Tennessee, it just gets better. And of course, there's always the great smoky mountains ;-)

I remember when we were in Tennessee for my brothers wedding, it was a royal pain to take the trip up; but the sights were well worth it. We were out in Sevier County (Pigeon Forge, Sevierville, and Gatlinburg), and then we made the trip home through the smoky's. Wish I had a picture like what I see in my minds eye, but if we took any of the mountains, it's probably still in the camera (on 110 film lol). The trees were in a multitude of colours, beautiful reds, oranges, browns, and even some greens; so it must've been during Autumn that we were there. Reese and Gail married about 1999, and divorced last year, I've never actually bothered to remember the date... haha. (Foul memories of that darn suit however, still abide!).

Another great view was the summit of Stone Mountain, I've been there; on a day when it was almost clear enough to actually see as far as the proverbial eye can see ^_^. As far as views that I would love to see, I've always wanted to see Texas and Key West; my mothers always said how beautiful Texas was, and well, being a Floridian: do even you have to ask about the Keys? hehehe. Like wise, parts of Ireland and Italy come to mind. But, all in all, I'm not likely to see any of them within my life time.

I would love to someday see the mountains out in Tennessee again... I guess, even though I've always been around a 'city' style environment, I just prefer being a little further from contemporary civilization. I don't think I will ever forget the sight of the mountains.
"Sometimes," said he, "in my voyages, when I was a man and commanded
other men, I have seen the heavens overcast, the sea rage and foam, the
storm arise, and, like a monstrous bird, beating the two horizons with
its wings. Then I felt that my vessel was a vain refuge, that trembled
and shook before the tempest. Soon the fury of the waves and the sight
of the sharp rocks announced the approach of death, and death then
terrified me, and I used all my skill and intelligence as a man and a
sailor to struggle against the wrath of God. But I did so because I was
happy, because I had not courted death, because to be cast upon a bed
of rocks and seaweed seemed terrible, because I was unwilling that I, a
creature made for the service of God, should serve for food to the gulls
and ravens. But now it is different; I have lost all that bound me to
life, death smiles and invites me to repose; I die after my own manner,
I die exhausted and broken-spirited, as I fall asleep when I have paced
three thousand times round my cell."
-- Edmond Dant├Ęs
Le Comte de Monte-Cristo (The Count of Monte Cristo), Alexandre Dumas

Wednesday, April 22, 2009

Geeze, last night was nuts, and tonight not so much better. When bed time came around, I was wide awake with plenty of stuff to do; so I didn't bother with rest.

I nearly forgot to sleep!!!!

Next thing I knew, 4 hours had passed since the last time check, and light was pouring in through the blinds :-( :-( :-(.

At least tomorrow, I don't have to be up and out for work until noon lol.

Most people who knows me well, know there's only two reasons I can see for being awake so early... One would be to watch the sunrise with that special girl, and as anyone who knows me at all -> then start wondering why we didn't pack a picnic-breakfast xD. The only other logical reason, is to setup an amphibious ambush, and go fishin' ;-). Hmm, I wonder how many years it's been ... I've always enjoyed fishing, just get out in nature, and forget the rest of the world exists for a while. But unfortunately, you've eventually got to go to work lol.


Tuesday, April 21, 2009

Man I had some crazy dreams, like a cross between WWII and Resident Evil :-/

Best way to describe it, a squad was nearly captured by the Japanese Army, enacted a rescue, neutralized threats and went barricaded in a building.... managed to convince those green horns that a room is *only* clear when it's been cleared, not stick your head in and move on... and did it the hard way (going in with a M1911A1 in each hand, and trying to keep your head attached lol) Next thing you know, we're knee deep in Zombie Vile and the freshbrass is starting to run thin!

Monday, April 20, 2009

Interesting article

Bjarne Stroustrup on Educating Software Developers

A very good read; it also reminds me why most of the pe

One thing that especially stuck a cord with me:

Education should prepare people to face new challenges; that’s what makes education different from training. In computing, that means knowing your basic algorithms, data structures, system issues, etc., and the languages needed to apply that knowledge. It also means having the high-level skills to analyze a system and to experiment with alternative solutions to problems. Going beyond the simple library-user level of programming is especially important when we consider the need to build new industries, rather than just improving older ones.

For the love of Pete's sister, the education system in America hasn't been preparing the vast majority of people for jack shit, for at least the last 40 years, if not the last 120 years.... and with the way things are these days, I wonder how long until someone will write a song for Coneheads II, where s/high school/college/gi is applied ^_^.

I still meet people that struggle with literacy and logic, let along engineering. When it comes to CS majors that I've met, I usually see two major varieties: those that went through a decent course, and actually paid attention. And those that probably got the turn your head and cough treatment, or spent more time playing Counter Strike.


Chuckle of the day: 2009-04-20

Thanks Spawn, you've given me the most shit eating grin I've had in many years!!!

customers everyone hates

Haha, my mother is both an anchor and a ticking time bomb >_>

Tech Support?

That's why I only call Tech Support(tm) for HCFs, and not the stupid PEBKACs so many lusers call in, and screw things up for the rest of the world >>.

And this has got to be the best pic of a tech-support call result that I have ever laughed at xD

Sunday, April 19, 2009


Just finished watching the movie Hitman. I missed the first ~15 minutes :-(, but hey... I just woke up lol. Quite interesting, and the ending.... bloody brilliant! I've never gotten a chance to play any of the games, but have always been interested in the series - stealth over shoot'em up.

A copy of Hitman Trilogy would be sweet, lol.

Saturday, April 18, 2009

left or right brain?,21598,22492511-5005375,00.html

To my crazy brain: clockwise, all the way and only way lol.

She appears to be spinning from right to left, and to my head that equates as clockwise. Also given the angle of her foot, and the momentum, I would be inclined to believe that the model "spun out" with the left leg, rather then spun in with it; i.e. she started to spin with the leg moving away from the right leg, rather then towards it; thus starting the loop anti-clockwise, but appearing to be turning clockwise at first glance, in so far as my brain works.

Because who would have noticed her leg in the first frame lol?

Descriptions there and else where relating to the right cerebral hemisphere seem to connect well enough with how I think :-/

Friday, April 17, 2009

Ahh finally....

Got home from the vet a little bit ago, and off work an hour before that lol. Had to take Coco for her checkup, and bring Willow along for the ride so she wouldn't destroy the house in jealousy! As soon as she found out we were going to the Victor Echo Tangos, her mind changed xD.

Coco's doing good for an 11 year old, down to 5 lbs / 11 oz (~2.6kg). Maybe I should stop teezing her about being a fat belly with chicken legs? Haha! Now the two tweedle-heads are snoozing the day way.

I'm just glad to have my *corner* of the bed, lol.

It's finally Fryday, get a little time off... been working almost the entire week straight, and same thing next week. I haven't gotten much of anything done lately, just to fricken tired. These days, the stuff going on around the computer is about the only positive part of my life left...

Random ideas: an ed in perl?

command line processor ->
 [addr1 [,addr2] ] [ [ command ] [ flag ] ]

 extract the address start / end range, look up the codref for command
 and extract the flag if any.

 Use defaults from the table if addresses are omitted / command omitted /
 flags omitted / etc.

apply linear commands ->

 $cmds{subsitute}->($line, $flag);

 each command is applied to a string, $line, and passed any extracted
 flag is passed as an option argument to the subref. (e.g. p,n,l, or g)

text marshal/serialize routines ->

 if using tempfile: 
  extract line range into an array of lines

 else using memory:
  suck file into an array of lines

 that array of lines is the text to apply the linear commands to.
 the result is then used to update the buffer (array/tempfile)

I/O ->
 truncate user file and copy buffer to user file

Bang escape ->
 ! can be implemented with the gx or `` syntax in perl


 pped / ed:  if invoked as ed, turn on BRE support.
 opts: -s, suppress diagnostics for scripts
       -p, set prompt string to 'string'
       --regex={basic,perl} set traditional or perl re's
              -P set perl re's
       -B set basic re's
       -S, --map edit file in memory
       -n, novice mode: same as 'H' command

 doing files in memory sucks the file into an array of lines; basically
 a pseudo-mmap. This simplifies the marshal/serialize code, and removes
 the need for a temporary file, but causes memory usage to balloon in 
 proportion to the file size.

 S[flag] [value]

 set option flag to value; omit flag and value to print all options
  P, ps prompt string (str)
  B, re use basic regular expressions (int)
  N, nl set '\n' marker for writing out lines (int)
         H, he same as 'H' command

An odd find



Thursday, April 16, 2009

Something I wish I had time to do

Write a conversational IRC bot, lol.

I Figure, load two processes, a communications layer and an automation layer; in this case the communications layer would be a simple relay between an IRC channel and the automatas standard I/O streams; messages on the channel would get written to the automatas standard input, and messages to send to the channel would be read from the automatas standard output.

I would want the thing to have some concept of learning, maybe build a dictionary of language; perhaps start off with a limited knowledge of words; storing words it doesn't know into a database for later analysis. And then once a number of words have been manually entered into it with attached meta data, program it to perform the analysis itself; trying to figure out what kind of words it sees but doesn't know about yet, and then write out plugin code with the bots "best guess", and if it gets it wrong, I could manually change it, and it would have to study the differences between my correction and it's choice, and modify it's guessing based on experience. (Implementing that would be fun in it's own right, lol.).

That would logically be easy enough to design and study, the question is how to make it educating enough that you can actually have people chatter with it.

Haha, I always laugh when people mistake bots for humans on IRC xD

Tuesday, April 14, 2009

Man, I had a strange dream

It was like a cross between Metal Gear Solid and a bad action flick; last man standing of a recon team, trying to exfiltrate the mission area with news of a renegade officer (Gene Hackman) building a mechanical army...

I remember creeping though jungle, feeling the plant life on me; and very paranoid of trip wires and punji'fied traps (I hate punji sticks!); ended up rolling into a body of water in order to bypass a patrol. Only to sink like a stone when I realized I never finished learning to swim! Having realized I was dreaming quite awhile ago, I decided "this ain't no dream about drownin'" and thought back to Tomb Raider and pushed off. Breaking the surface for air got the enemies attention.

Compromised greatly, made it into a building connected to a hanger like one: 1 vs 20 odds, but sufficiently close quarters that survival was possible: CQB tactics, solid use of cover, MK23 in hand, and Fragmentation grenades evening the odds ^_^. Blew the ever loving crap out of the place and ended up cappin' a number of techs, hopefully before they could call in reinforcements via the computers... (also destroyed for good measure)

Gathered some supplies and climbed up to the exposed upper level, maybe find a way ontop to get my barrings: but no such luck. A tank rolled (or hovered?) into the hanger area and started deploying robot troops. Leapt off the overhang onto an L-shaped cage like door on the opposing side, cut the rope and rode it down with a crash -- then made like a gust of wind, beading it out of there before the robots could catch up lol.

Forded a river and scurried up hill, looking for concealment -- plan, wait for the enemy to pass by on a wild goose chase, an d make up the rest from there. Found a weapons cache stashed near by, that would even the odds quiet a bit, but something interesting was also there, a hatch leading down a short climb into a bunker of some sort.

That's when all hell officially broke loose, security systems came online: gun equipped cameras with laser sights popping out of the sealing, robots coming on line armed to the teeth, and even worse... turning invisible! Got out of there quickly, just ahead of a grenade launched my way lol. Ran faster then I've IRL done in many a year, like a mad spider, following the rivers path: now being pursued by droid-patrol boats and shock troops moving for a better shot; the boats were also fitted with cloaking devices :-(. Comendeered a fishing boat in the name of "national security" and went about sinking those things... imagine an aerial dog fight, but in 2D and below 30knots lol.

I really have some crazy ass dreams, but the only time I worry is when I have a 'sane' dream instead of an adventure or nightmare like one +S.
Miracally off work today, but the working schedule is a shambles :-/

14 months from purchase to setup?

Not so long ago a thread came up on DF, dealing with printing. That reminded me.... I baught my printer in what, February of 2007 and it's just been gathering dust?

That's gotta be a new record: for either laziness or being to fsckin' busy lol.

The reason I bought it, I knew this model was usable with most OSes. Honestly, I _hate_ ink jet printers (and printers in general, but yeah... especially ink jets). Sadly, a decent PostScript printer is harder to find in this place then an affordable laser printer; having to use an inkjet makes me very happy that I rarely print anything.

Around OpenBSD 4.3 or so, I stripped off all printing related packages off my server: the shitmark hasn't worked in years. So I had to setup the format filtering magic anew: ghostscript (no_x11 flavour), hpijs, foomatic-filters, and foomatic-db-hpijs. Several years ago it was my intention to run a networked printer off the box, but the printer I had at the time more or less stopped functioning under FreeBSD+CUPS, so I haven't paid much attention since then. Most distributions use the Common Unix Print System (CUPS) these days; but I'm just old at heart, I like the Berkeley Line Printer Daemon (lpd). CUPS, only way I ever know wth is going on is going cross eyed with log files; with lpd, at least you know it's brainlessly simple to sort out.

My only complaint about the printer, 'lptest | lpr' resulted in 2 pages of ~60 lines before I decided to dequeue the 200 line job: and the some-bitch isn't smart enough to eject the darn 3rd sheet of paper ^_^. (whether this has to do with my PPD file or hpijs support for my printer is not interesting to me, lol). On top of that, the thing prints about as slow as I can write text by hand. I could just imagine if I fed tpsh's ~3000 lines of text though it, probably take a week and 50 sheets of paper.

Monday, April 13, 2009

Chuckle of the day, 2009-04-13 in #vim

   viking | "Viper, an emacs package providing Vi
                emulation on top of Emacs."  i don't know what
                to say
     jamessan | Vimacs : Vim-Improved eMACS: Emacs emulation
                for Vim
 SAS_Spidey01 | HAHAHA
 SAS_Spidey01 | thank you jamessan, I haven't laughed like
                that in a while xD

Worthless router

Ended up woken up around 0930 (yippee, 3 hours sleep) due to a power outage; then dragged out shopping :-(

When I got home and finally on the computer, I noticed for the first time in a LONG time my laptop couldn't get a wireless connection: usually my BSD system is queen of the WLAN. A quick bit of investigation showed that during the power outage, the router reset itself totally. It's a good thing my laptops Ethernet port has been supported since ~FreeBSD 6.4. Dug up an old Ethernet cable and plugged into the router. Sure enough the piece of crap got reset to factory defaults during the power outage stuff this morning.

Reconfigured the router and upgraded the encryption: only to find out my mothers PC couldn't handle it, despite having the same hardware as my desktop. A quick search of Google turned up what I suspected, menu option added in an update; and her box was running XP Home SP2 / IE6 / .NET 1.1 lol. Updates are almost finished, and now every machines back on the network

My mothers been badgering me to try charters atypical power cycle suggestion: which I know could be done for years and years and wouldn't change jack shit; she's got no logical concept of networks. Some how, I think understanding helps troubleshoot stuff then trying the Microsoft Ritual Solution (MSRS). In my experience it works fine for Win32, but UNIX and networking equipment in general seems to follow a more sane pattern ;-)

Tom Knight and the Lisp Machine; The Jargon File, version 4.4.7

A novice was trying to fix a broken Lisp machine by turning the power off and on.

Knight, seeing what the student was doing, spoke sternly: “You cannot fix a machine by just power-cycling it with no understanding of what is going wrong.”

Knight turned the machine off and on.

The machine worked.

I always think about that old koan when having such trouble lol.

Sunday, April 12, 2009

What I hate about programming

Some months ago when it reached Kris Moore's attention (late as usual) that I had brought up security issues with his Firefox3 PBI, he changed it to something almost as bad. A couple weeks ago, I heard back from Kris that he had [naively] changed the code for making Fx3 the users default browser would no longer run as "root". After a little more conversation he split it off to something better.

Originally it was a part of the script that runs during PBI installation (and worse then the below script), probably tired of my replies he made an extra wrapper around the Firefox3, that asks the user if they want Firefox3 set default or not, rather then workin' the user database at install time. (I refuse comment on the following scripts predecessors: if you want to know more, read his SVN). The solution he came up for that wrapper, was to invokes the following code as the user when necessary:

# Helper script to make FF the default browser for a user

# Get the users homedir
HOMEDIR="`cat /etc/passwd | grep ^${USER}: | cut -d ":" -f 6`"

if [ -e "${HOMEDIR}/.kde4" ]

if [ ! -e "${HOMEDIR}/${KDEDIR}/share/config/kdeglobals" ]
  echo "ERROR: No kdeglobals file for $USER"
  exit 1

rm ${TMPKFILE} >/dev/null 2>/dev/null

cat ${HOMEDIR}/${KDEDIR}/share/config/kdeglobals | grep -v '^BrowserApplication' > ${TMPKFILE}

rm ${TMPKFILE2} >/dev/null 2>/dev/null
touch ${TMPKFILE2}
while read line
  if [ "$line" = "[General]" ]
    echo "$line" >> ${TMPKFILE2}
    if [ "${KDEDIR}" = ".kde4" ]
      echo "BrowserApplication[$e]=!/Programs/bin/firefox3" >> ${TMPKFILE2}
      echo "BrowserApplication=!/Programs/bin/firefox3" >> ${TMPKFILE2}
    echo "$line" >> ${TMPKFILE2}
done < ${TMPKFILE}

# all finished, now move it back over kdeglobals
mv ${TMPKFILE2} ${HOME}/${KDEDIR}/share/config/kdeglobals

exit 0
which is more secure then the original implementation, and more efficient also. Tonight I sent Kris a casual (read: adapt to need, don't take as is) suggestion from yours truly:
# Helper script to make FF the default browser for a user
# Should work for KDE3 and KDE4.


for D in "${HOME}/.kde" "${HOME}/.kde4"
   cd $D 2>/dev/null || break;

   if [ ! -e "$FILE" ]
       echo "ERROR: No kdeglobals file, unable to set $PROG as default"
       exit 1

   ed -s "$FILE" <<EOF
   # write your own error handlers

exit 0
which should work as far as I can test; since I lack a working KDE install (compiling KDE4.2+ is on my todo list). It's not perfect, but it sure is nicer then what he had a few months back. I included the a diff of the two scripts in my last message, which may very well go against my decision to "never" send these people patches. But I really don't care if he accepts it or not, because while I believe in being helpful, I also I do not like doing peoples jobs for them.

I'm a lazy good for nothing creep, but I am lazy of muscle - not lazy of mind. The most productive code I have ever written, is the code I was smart enough /not/ to write in the first place.

most Term::ReadLine::backends deserve C4

Term::ReadLine::all can kiss my rebel dick

I came here to live

I grew up in a town where tough was a cigarette
And a souped up car on a county road
Nothin' much to do back then
So we'd make bets
On how much drink a guy could hold
And I held my own
Learn to hold my own

Daddy works some dead-end job at the concrete plant
Mama taught the Sunday bible class
For eighteen years I remember thinkin'
There was more to life than that
So I ran the streets to beat the Devil
Goin' just as fast as I could fly
'Cause I came here to live
I didn't come here to die

Mama used to wait for me with the porch light on
Worried about her little boy 'til I got home
Daddy he'd say listen son
But back then there wasn't much
That I didn't already know

I reckon I was doing close to 80
When I felt the tire slip out from under me
And I never set out lookin' for Jesus
So I guess Jesus come lookin' for me
And He found me upside down in a ditch
Smokin' gas in my eyes
And He said son you came here to live
You didn't come here to die

Sunday morning I got up and I went to church
That summer I got a job and I went to work
Met a girl in town put some money down
On a little house with a yard

Our little boy was due in September
But he came early in July
For eighteen days all I remember
Was settin' there at his side
Sayin' son open up your eyes
Just open up your eyes
'Cause you came here to live
You didn't come here to die
Son you came here to live

-- I can Here to Live, Trace Adkins

Saturday, April 11, 2009

Friday, April 10, 2009

Clear with a vengeance!

Ok, I can take the lag, I can almost stand a 9x19mm P228 compact pistol packing a harder punch then a 7.62x67mm (.300 Cal) Winchester Magnum WA 2000 sniper rifle with half the stopping power of the 9mm.... but this is just to much.

Teammate trew a frag into the room I'm in, stampedes the tangos and flushes me right into them.

I can stand the tangos, but if y'all want to start frag-flushing me into a 4 on 1 dance off... I ain't getting on my dancin' shoes, I'm gettin' a bigger freakin' gun.

H&K 23, 5.56x45mm NATO Light Machine Gun ---> room cleared with a vengeance like no other baby!

(and no, I didn't shoot the idiots on my team, I shot that tangos lol)
Darn it, I had my mail down to under a 100 messages in the queue.... few months of busyness and it's over 700 lol. Oh well, weekends are good for something :-)

one way to pass the time

what can I say, I love studying the past lol.

Thursday, April 9, 2009

Wednesday, April 8, 2009

merging the new code into master

After 3~4 days of coding, I've just merged the parserlexer branch back into master; I love coding :-)

 commit 9857e5e9556f31543075fb4a74350dbda97a42e5
 Merge: c9a8ae4... bb425eb...
 Author: Terry ....snip...
 Date:   Wed Apr 8 07:23:19 2009 +0000
     Merge branch 'parserlexer'
     The new parser, lexer, and quote expansion code (+ a few bugfixes) has
     finally been merged into the mainline of development (branch 'master').
     This marks the new sh_eval(), tpsh_parse(), expand_quotes, tpsh_lex()
     functions in such a way that they should be considered 'stable' for
     general usage.

some nice things that come with this:

a sane way of quoting stuff; but not sh compatible ('\'' = ', not an error), more then one set of quotes on the line; and things like `cd /foo; vi bar` finally work xD. In the course of the necessary bug smashin' for the merge, I've also cleaned out a few pains in the todo file, that have been there since last month++ lol.

things that remain to be done: pluggable completion; make completion play nicer with perl/gnu readline backends; restore support for pipes (critical); handling of keybinding (likely painful across perl/gnu/zoid Term::ReadLine backends; but at least zoid is nice...). In the more long term: control flow, (subshells), better `handling`, {anonymous macro/grouping}, more advanced I/O redirections (i.e. only >, >>, and < currently work lol); making `fc -l` and `history list` use a format for display rather then print(); make &do_getopt able to be configured by callers (so fc can accept negative indexes, etc); give a way to turn off shell options (set - and set + currently turn on, only lol); and who knows what else that I can't remember atm.

and to abuse {erls idea of objects and verbs: eval { $spidey sleep $now };

Tuesday, April 7, 2009

Star Trek? Hehe
I wonder if a programmer goes to heaven, does GOD let him study HIS assembly language?

tpsh: test of expand_quotes()

$ echo 'hi bye' foo "$USER" and "~" or ~
expand_quotes ': echo  | hi bye |  foo "$USER" and "~" or ~
expand_quotes ":  foo  | $USER |  and "~" or ~
expand_quotes ":  and  | ~ |  or ~
hi  bye foo $USER and ~ or /usr/home/Terry

# note: 
#       the 2 spaces /displayed/ between hi and bye are a bug in
#       tpsh; echo'ing things to file via I/O redirection works
#       properly. "$USER" is not expanded because expand_parameters()
#       still needs adjustments.

tpsh_parse invokes expand_quotes() to break up its input line based on the shells quoting rules; and proceeds to go about it's business. tpsh_lex() then accepts the token buffer and begins building a new data structure from it. The tokens from tpsh_parse get analyzed and reassembled "on the quotes", i.e. it will do it's check on 'hi\ ' and 'bye' and the rest as separate elements; then reassemble the argument vectors as an array reference: becoming 'hi bye' again. (id est quote expansions add escapes to tell the lex phase where to rejoin things) After everything is said and done between parse and lex, the queue like data structure is ready, the argument vectors contained there in are ready to be mapped onto resolve_cmd() calls for execution.

To hunt down any other booboos in the expand_quotes() subroutine, I've made it display it's work, so I can see how it detects what when testing the shell. basically as "expand_quotes QUOTE: unquoted | quoted | remainder".

As one can guess from what the above shell snippet implies: quoting is handled recursively. Because I'm used to languages with finite stack space and no reliable tail call optimizations; I almost never write recursive functions of any kind, whether they are tco'able or not. Algorithmically, expand_quotes() is a very simple procedure.

It expects to be called with an input line; and treats multiple arguments accordingly (for now). Internally a dispatch table and token stack are maintained; the table contains references to anonymous subroutines, to which the scanned elements are delegated to for the proper expansions.

If no quotes are detected on the line, return the result of expanding it with the default delegate (for unquoted text).

Otherwise break the line on the first set of (matching) quotes.

Any text defined before the beginning quote must be unquoted; apply the default expansion from from the table.

The text between the matching quotes is quoted, apply the appropriate expansion form the table (i.e. ', ", or `).

Any text remaining after the matching quotes may or may not be quoted; invoke expand_quotes() on the remainder to find out, and apply the result.

Each expansion applied is pushed onto the token stack in the escaped form it expanded to (i.e. "'hi bye'" becomes "hi\ bye"), and the stack is returned to the caller once processing is completed.

With refactoring, the procedure could likely be made tail recursive but I don't think perl does TCO. Either way, the users fingers or (likely) the machine generating the inputs should run out of stack space before tpsh could pop a cork at the number of quotes lol. An earlier design for expand_quotes() had more in common with finite state machines (in so far as I've seen them implemented), but was a lot more contorted then expand_quotes()' present shape :-/.

Current bugs are handling nested escaped quotes or multiple empty quotes (the spliter) and removing unquoted quotes (addition to delegate sub for unquoted text).

# bugs in expand_quotes
$ echo 'foo \"bar'
expand_quotes ': echo  | foo \"bar |
foo  "bar
$ echo "foo \"bar"
expand_quotes ": echo  | foo \ | bar"
foo   bar"
# correct result would have been equal to the previous command
$ echo '' "" '' "" '""' '' "" '"' "'"
expand_quotes ': echo  |  |  "" '' "" '""' '' "" '"' "'"
expand_quotes ":  " |  ''  | " '""' '' "" '"' "'"
expand_quotes ': "  | "" |  '' "" '"' "'"
expand_quotes ':  ' |  ""  | "' "'"
expand_quotes ": "'  | ' |
"  ''  " "" '  ""  "' '
# correct result would have been:     ""   " '
# at least, that's how all bourne based shells I 
# know about treat it; I would prefer: "" " '
# i.e. without leading whitespace.

For some reason this makes me curious, has anyone ever explained why shell syntax allows "\"" but not '\'' ? (the results being " and unclosed quote /or syntax error respectively)

When trying to solve a programming problem, generally I try the most simple solution before I try something more complex: and then evaluate a neater method. I consider the implications solutions have on efficiency, but that is trying to avoid shooting myself in the foot later, rather then trying to optimize the code for a machine.

Some how, I think expanding quotes is just naturally recursive in my crazy brain :-D.

commit aeac14bd177a93b84c138a0c62e2cda49e5fe15c
Author: Terry <***snip***> 
Date:   Tue Apr 7 22:24:35 2009 +0000

     bugfix: parameters now expand within quotes via expand_quotes and may be escaped

commit 089fda7cca0049dcabdc8b9659f94dcae417074b
Author: Terry <***snip***> 

     bugfix: escaped quotes witihn quotes and multiple quotes handled correctly

     previous behaviour:

     $ echo 'foo \"bar'
     expand_quotes ': echo  | foo \"bar |
     foo  "bar
     $ echo "foo \"bar"
     expand_quotes ": echo  | foo \ | bar"
     foo   bar"
     $ echo '' "" '' "" '""' '' "" '"' "'"
     expand_quotes ': echo  |  |  "" '' "" '""' '' "" '"' "'"
     expand_quotes ":  " |  ''  | " '""' '' "" '"' "'"
     expand_quotes ': "  | "" |  '' "" '"' "'"
     expand_quotes ':  ' |  ""  | "' "'"
     expand_quotes ": "'  | ' |
     "  ''  " "" '  ""  "' '

     new behaviour:

     $ echo 'foo \"bar'
     expand_quotes ': echo  | foo \"bar |
     foo  "bar
     $ echo "foo \"bar"
     expand_quotes ": echo  | foo \"bar |
     foo  "bar
     $ echo '' "" '' "" '""' '' "" '"' "'"
     expand_quotes ': echo  |  |  "" '' "" '""' '' "" '"' "'"
     expand_quotes ":   |  |  '' "" '""' '' "" '"' "'"
     expand_quotes ':   |  |  "" '""' '' "" '"' "'"
     expand_quotes ":   |  |  '""' '' "" '"' "'"
     expand_quotes ':   | "" |  '' "" '"' "'"
     expand_quotes ':   |  |  "" '"' "'"
     expand_quotes ":   |  |  '"' "'"
     expand_quotes ':   | " |  "'"
     expand_quotes ":   | ' |
     "" " '

Awhile back I stumbled over a macro program for Win32, but lost track of it; found it again today:

I've been missing such abilities under Win32, and ain't about to swap my old PS/2 keyboard for one of them fancy G15s lol.

recent activity

Terry@dixie$ cat
*Finally* started work on updating my laptop today; got world/kernel done. Set to work on the third party software, this tiem out employing portmaster for the task. To conserve CPU cycles, since that's my laptops principal bellyache (along with the shitty graphics card); I'm currently running from a screen session on a vtty (i.e. Text Mode only).

For me, that's actually not a big loss: only programs I'm missing out on are pidgin and firefox; and I _hate_ firefox these days. Most of the /good/ stuff I use all the time just happens to be console user friendly ;-)

great surprise this morning, I'm off today and working tomorrow instead (glad I didn't make plans lol). Since I had portmaster fetch distfiles a head of time, that also means I can continue my laptops software updates without lagging my game play to much hehe.

Right now I've got Dixie perched on my stand, and a SSH connection to her - with GNU Screen running, so I can always detach the session and reconnect to things from another box, or straight from Dixie's console. I don't think portmaster can be left unobserved as long as the portupgrade utility, but I think it is doing quite a good job of things: the need for a little hand holding aside. (I'm not interested in braving the "unattended mode" warning on our first date ^_^). I've also noted that perl modules can make upgrading perl a pain in the rear end; probably will have to take a manifest manually, then setup the automata to handle the unautomated part of the update procedure. All in all though, it's been very painless.

Because of the way Vim implements Perl/Python/Ruby/probably the Tcl support; and my chose to build a 'threaded perl', I need to rebuild vim before it can be used. Never the less, I managed to fix the show-stopping bug in tpsh's new expand_quotes() function -- one darn question mark '?' was missing; the difference making the regex non greedy. Although I rarely use any of the "extensions" in nvi's command set, their chose of making :Next open in a separate display window sometimes comes in handy.

I've also been contemplating the sam text editor, as a possible replacement for ed/ex; the Q is does it offer suitable history support. My only complaint about ed and ex, is you can't do thinks like ^NCR to repeat the last command (I wonder if GNU ed might've stuck that in, mm). Using vims "special" ex mode via gQ rather then vim -e or 'Q' gains all of the niceties of vim's :ex command line, but if ones gonna run a visual editor that big; why go line mode without a pure TTY? lol.

FreeBSD 7.2-PRERELEASE FreeBSD 7.2-PRERELEASE #3: Mon Apr 6 22:19:37 UTC 2009 i386

Monday, April 6, 2009

Flitations with /bin/ed

lately, I've been developing a strange affection for the old ed(1) text editor. Because tpsh defaults the value of EDITOR to ed on unix, and edit on windows; I've had to deal with ed quite a lot whilst working on my shells 'fc' built-in (fc is the command for listing and editing/re-executing commands through the shells history).

Of course once support for ENV was worked out, I changed it to ex >_>

atm I'm reading the ed tutorial in ed, via ssh to my OpenBSD machine; it actually makes a nice pager :-/. All in all, I don't think I would take ed over vi for coding but it's a rather interesting program; after starting vim it's also possible to drop into extended ex mode with gQ, effectively giving a modernized line editor.

My interest in ed atm is for short editing tasks, the kind where vi and other screen editors are not often necessary for the task. Some times, I can't help but wonder if I'm secretly older then my birth date suggests lol.



on man, this ones got me rolling on the floor laughing my butt off - what a great way to make a buck

The Apocalypse Must Have Occured!!.aspx

Now that one made me laugh xD


I don't know what is more funny, reporting potential security errors to a project or looking at the even worse 'solutions' they cook up.

Sunday, April 5, 2009

Really, I've gotten virtually nothing done all day... but hey, I've had a chance to relax a bit; well compared to normal :-/

Two schools of thought: random thinkings from a spider.

DRAFT todo: fix footnote indexes and further proof reading / copy editing.

Two schools of thought

random thinkings from a spider.

There is certainly more then one way to solve most problems, it's just a matter of their merits. This paper serves to compare and contrast two common methods of solving a simple problem.

In our example, let us say we have a large and complex E-Mail message. We began editing it on one computer, then copied the draft to a USB stick0 and took it home. We then begin making some further adjustments. Later, we return to the first machine to finish the draft, but realize we didn't copy the file back to the USB stick! We continue to edit the draft, and take it home again. We now have two different but related forms of our message. The message is quite big, and we don't want to rewrite any of the good parts, so what do we do? We have to compare and merge the two different messages into a single final draft.

How might we solve this problem?

Most people I know1, would open each version in a mail client (e.g. Outlook, Thunderbird) or an editor (e.g. notepad.exe, gedit) and place the windows side by side; and then go about visually comparing the files; either merging one into the other, or using a third window. This is slow, error prone, and rather clumsy.

Since I'm not willing to take that much time, I would apply software to fix this problem2. This means we would need software to compare, merge, and edit the files. How might these programs work?

Common software that comes to mind: diff, patch, diff3, kdiff3, kompare, meld, windiff, winmerge, and most decent (programmers) editors support the task as well (vim, emacs, jedit, etc), along with decent Version Control Systems (VCSs) and Integrated Development Environments (IDEs). Some programs are textual, some are graphical, some are an amalgamation of parts, while others are heavy lifters3 in their own right.

We'll take a look at how two different styles might result in software to complete these simple tasks:

  1. Compare two or more files.4
  2. Merge two files into a third.
  3. Allow the editing of changes to be done.

I'll call them styles A and B.

Let's start off easy, how can we compare the files? It's rather easy for a program to do a byte by byte or character by character5 comparison of a files contents, but it would be nice to be able to see what actually changed - in some format we can understand.

In Style A, we write a simple program that can pretty print the differences to a text file (or better yet, an output stream6). If we want a more interactive interface, we can view the output file in an editor or pager; or write such a program of our own. One that understands our pretty printed format, and can display it to the user. So let's say we now have a simple 'compare' program that outputs text, and a simple 'viewer' program that accepts the result of the compare, and allows the user to browse it on their display.

In Style B, we write a program 'compview' that generates a format suitable for it's own internal use; perhaps a list of change-nodes with data on where to display it and how to display it. Then set out and write a viewer program to display this to the users display - in essence creating a pager like program, whether it is textual or graphical in nature. For ease of viewing the differences over time, someday we may add an "Export to file" feature that dumps the data to a suitable format.

Now let's take a step back, and look at what we can do with these kinds of solution. Since style A developed 'compare' to output a very simple textual stream, we can view the file in any program that we like, without having to use the supplied 'view' program. We might even develop a program (or change compare) to [re]generate the output in HTML, so that we can view the comparison in a web browser instead.

In short, the design choice makes the view program almost superficial, not to
mention that it can be kept quite simple; for people without better
tools7 rather then the whole kit and kabootle. The 'compview'
program built in style B, will likely have a close relationship between the
file compassion and viewing operations; perhaps to the point of excluding the
ability to do the view in an external program without exporting to a suitable format8,
which may or may not be easy to use with other tools. In style B, even if the
internal format was XML or HTML, compview would still likely contain half a web

Now that our software can compare two files in a way we like, let's move on to the process of merging the two files.

Style A might create a program, 'merge' that understands the output of compare or a filter that can convert the output into instructions for another program (edit) to complete the changes itself. Some operating systems (i.e. UNIX and DOS) provide suitable editors for this task: some people might be inclined to implement their own hbatch or stream editor (I would suggest installing 'ex' and 'sed', or make it a *really* expressive line editor). The up side of the latter approach, the compare format and the file merging can be more readily separated; the user could even find other 'edit' programs or intersperse the chain of commands with other compatible tools.

Style B would likely take it upon itself to conduct the merge operation directly. One down side of this would be the means of which we save or 'Export' the comparisons from compview. If an format based on compview's internal data structures was used, different versions of compview might not even be able to understand it; oh joy, now we have to remember what versions of our compare & merge app knew what! But all in all, the program will probably develop some good interactive comparison and merging features, if the programmer doesn't go postal first.

What about editing the file or adjusting the file comparisons to create a more complex merge? If style A provided an 'edit' back end, we don't even need another text editor to work with compare's output: but we could use our own11 and feed the result back into the tool chain. Style B might provide support for an external editor or build one into compview's interface. Since an external editor would mean 'compview' would have to translate it's data to text for the editor, then back into the internal data, it would be a major pain. Building in an editor might be a fairly simple task or a problem; most GUI toolkits provide an editable text area, some TUI toolkits may not. Depending on the libraries being used, the programmer might have to hash out a HTML WYSIWYW12 text editor component built into compview13; assuming compview isn't half a web browser in it's own right yet.

Bonus: change of interface

Let's say we want to convert from a graphical to a textual or from a textual to a graphical interface.

The compare and related utilities developed in style A, could have been done largely in a display agnostic view; what does a file comparator need to know about user interfaces? In this case, the 'view' program would only need replacement with a tool that supports the other interface style. Another benefit, because of the separation between tools, even the changed interface may be change yet again in some strange new way21. The possibilities are virtually endless and shared libraries may be utilized to ease related tasks.

While compview on the other hand, developed with style B is likely chained to its interface. If the code monkey was smart, as much of the code base as possible would be abstracted20 away from the interface, and kept simple enough to be used as a library. If the library didn't exist previously, or was not user interface agnostic: it will be much more labour intensive to make it so (or create it) after the fact, then to have done it in the first place22. The ever increasing bloat and complexity of compview, may be its untimely my downfall; because it must either adapt to the changing world, or be replaced. If it can not do so easily, it will either fall by the way side or restrict its users through its own (lame) limitations.

Discourse on the Results

Either of these programs, the compare, view, merge, and edit suite or the compview jack of trades would be suitable for completing the task at hand, but what comes of these two courses or styles of solving it?

Style A may have a tendency to fragment things, or depending on the programmers mind, fall into more 'odds and ends'grouping then a useful tool set. A great advantage, because each element is a separate program, they have a very minimal knowledge of one another's internal workings. Because all communication is accomplished through simple streams of input and output; you can even replace parts of the suite with other tools14. Small or big changes could be done with a change of program, and have very little impact on how the operation is performed by the tool set overall. The only major issues being the comparison format and editor instructions15. Properly documenting the protocols and relationships between the programs would make things all the more easier; both for maintainers and other monkey's who may need to replace or tweak parts of it. Adding features can be done fairly easy, but making big changes may break compatibility with the last decades version.

Style B takes a swiss army knife point of view: whatever needs to be accomplished should be done by 'compview' whenever possible. Depending on the competency of the programmer16, compview can fall into many subtle traps17. In most probability, compview will either be troublesome to inter-operate with other such tools, or require irksome filters or worse; building the filters into compview in a way that may or may not be user serviceable. How closely entwined the various elements are, would likely depend on the attentiveness and skill of the programmer; some people create maintainable tools, others create balls of horse dung that they may end up hating years later. Adding new features may also require massive restructuring of the program, dpeneding on how it was implemented.

In my opinion, compview would likely be capable of becoming more efficient at what it does then the compare/view/merge/edit suite, but is more likely to become inefficient and more difficult to maintain in the long run; because it is more difficult to engineer such a complex program correctly. In a way, you could say it just has to many moving parts.... Why cram the engine, transmission, and power steering into one huge moving part, when you can have 3 smaller moving parts?18. One interesting side effect, the software created by style A may be fairly easy to script, but the program from style B would have to embed it's own scripting language23.

I generally opt for pieces that work together on simple protocol; because it helps keep me from shooting off my own foot later19.


0. Rather then using an USB Stick, I actually would use Webmail or some other network solution - and avoid this kind of problem altogether.

1. Most people that I know, would first have to figure out how to get the e-mail message shuffled between computers, let along view it side by side

2. I would probably use Vi IMproved's 'diff' mode to interactively compare, edit, and merge the files.

3. I believe the modern GNU diffutils and friends have grown horns of their own.

4. We might want to compare our final draft against the two old drafts!

5. These may or may not be the samething, depending on who, what, where, and when.

6. I.e. allow feeding the programs output into another program, without the need for shared memory or (insecure) temporary files.

7. I like less, but using vi as a readonly 'view' is sometimes fun.

8. XML, CSV, Binary dump of internal data; etc.

9. And just like 'compare' would without a 'compare2html' filter, bloat out with having to escape various character data into the format, or risk breaking interoperability with other programs (e.g. Internet Explorer, if compatibility is possibility with it in the first place)

10. In point of fact, because of the flexibility that pipes and redirection offered the UNIX system, it was possible to use the early 'diff' program and 'ed' editor to carry out this kind of solution. To deal with the early systems simplicity, as more useful 'diff' output formats became the normal, Larry Walls 'patch' program was created to heuristically apply the changes to the file set more effectively then was previously possible. Replacing the ed program and simple 'ed diffs' for once and for all (actually, patch could feed ed diffs into ed if that format was used). Since the take over of non-scriptable screen editors had become more common by then, I can't help but wonder if a more expressive program then 'ed' had been available, what shape Larry Walls patch may have taken.

11. I use Vi IMproved (vim); Emacs, KATE, jEdit, and TextMate are also good choices. I have little love for tools like Notepad, Edit, or feature-packed clones.

12. I say What You See Is What You Want because What You See Is Not Always What You Get.

13. A particularly poor programmer, or poor engineer might make this editor component very tightly integrated with compview, rather then something that could be reused on other projects and plugged into our current one. Given the nature of compview, I think the former is a more likely psychological trap then the latter.

14. Much like patch has superseded ed for batch processing of diffs.

15. A smarter programmer will make it easy to retool 'merge' to feed instructions into a new editor; a brillant programmer might anticipate the need, and choose to do see this ahead of time, and choose to supply an instruction set telling merge how to generate said instructions for the associated 'edit' tool; rather then designing it for any specific editor component.

16. And the stress to get it done 'on time'

17. Subtle traps to most, but obvious to me. I've had to deal with to much software that just 'sucks' over the years, not to notice ;-}.

18. I'm scared to think about the auto-industry.

19. That, and I've found many more powerful and flexible tools that can be used that way, then I have ever found swiss army knives that can match such flexibility.

20. Note that I do not mean a group of abstract base classes.

21. Such as from Tcl/Tk to C/Gtk+ or Java/Swing.

22. This is one of the traps new or casual programmers seem to fall into.

23. I would suggest a language like JavaScript or Python if possible for such a task. Unless it resembles a common language or is suitably domain specific, I dislike programs that create their own scripting or extension languages just for a specific applications plugin/automata. The last thing a user needs to do is learn YOUR apps language, that is also highly specific to your specific program that it is also highly useless everywhere else. A customized dialect of LISP or a class library mated with a known language is much better.

recent shell efforts

well, the foundation has been laid down for the next phase of tpsh development. Branch 'parserlexer' is basically setup to deal with the changes in tpsh_parse, tpsh_lex, and the switch from singular command line execution to enqueued command execution.

The new quote handling is actually quite a bit better, if buggy for now. The sh_eval() functions mostly become dead weight; coupled with the behaviour changes in tpsh_{parse,lex} behaviour the source, ., and eval built-ins (and anything relaying on them) are temporarily broken; as is tpsh -c 'cmdstr' until things are further integrated. Pipes also no longer work, since the command resolution doesn't know how to deal with the command queue yet lol. Fixing 1 subroutine should will fix most breakages.

The idea is more or less that a command like

$EDITOR -o f1 f2 f3; cat f1 f2 f3 | sort -args | sed 's/x/y/g' > /tmp/q

becomes this:

     ( ['vim', '-o', 'f1', 'f2', 'f3'],
       ['cat', 'f1', 'f2', 'f3, '|'], 
       ['sort', ',-args', '|'], 
       ['sed', 's/x/y/g', '>', '/tmp/q'] )

and the trailing '|' symbols would be used to indicate that the current element should be joined with the next (in a non technical sense that is) until the end of pipes is reached; recreating the pipeline (in so far as what happens).

The line is parsed into tokens, then analyzed and formed into a more interesting set of elements like the above array of array references; where the array refs are the argument vector (argv) of the commands to be passed onto pexec() or other suitable function. Previously the line was just parsed and dropped onto resolve_cmd() to figure out if it's a pipe based, i/o redirection based, built-in, or external command; based on the scalar line or argument vector resulting from expansions.

the master branch remains the stable line for now until this topic branch is finished with.

Saturday, April 4, 2009

QOTD 2009-04-05

Courage is just being brave for a minute longer then it would have taken to be a coward.
I really have to take breaks more often.... usually a decent coding session lasts at least 6-8 hours or more. When you can't remember the ficken function is reentrent and called multiple times, ya know it's time to take a walk.
hmm, writing parsers is interesting stuff

Friday, April 3, 2009

Just finished watching a movie called The Bucket List, about to dying men (Jack Nicholson & Morgan Freeman) who set out to complete a list of the things they want to do, before they "kick the bucket" in six months.

Hmm, I remember composing such a list myself, about 10 or 12 years ago :-/
It's been a pretty good day so far. Got stuck getting up early for a shopping trip, but hey at least I got some doughnuts out of the deal lol. Oy, I'm going to end up doing press ups more often 8=). Two bags of powdered doughntus my absolute favorite xD.

Ducked into Proving Grounds #1, and joined Spawn, Ez, Hostile, and a few pubs for some games. Man, it's been insane today in the servers. Those I don't give a crap if I hit anything, it's time to empty the magazine kind of moments - like a bad zombie flick, swarms of tangos out for blood. After a bit of a break to work on tpsh, I ended up in Proving Grounds #3 with Duke and a couple others joined: but still groups 3-5 tangos haunting the halls. Well actually that's not to bad, in RvS it was more like 4-7 tangos at a time... hehe. One odd thing, this time out in SWAT 4, I got stuck in the heavy plates. Normally I hate body armour that restricts movement, especially in games like SWAT where heavy armour slows you down, and doesn't stop a patato gun, let along bullets. I think the suspects must've gotten scared -- last man standing, and feeling like a land battleship, but surviving without injury ;-).

tpsh gained the sh derived `tpsh -c "commands"` behaviour today. Command completion and history features have evolved quite nicely. Really what needs working on is the shells lexical analysis. I figure for setting it up as my login shell, I'll compile a small C program that sets up PERL_RL to load a suitable Term::ReadLine backend before exec'ing tpsh.

All in all, not a bad day; but not very furfilling either :-/

A few bytes of sentimentality

Found some information on my first computer today, and laughably a few Tandy 1000SX systems on eBay for chump change. I think mine was a SL; according to my current info, that would mean an Intel 8086 CPU. The best records I ever found on the Tandy family were 8088 based with various configurations of memory and floppy drives.

I was a little kid at the time, no one really used the Tandy for much; when I was older, I would spend afternoons loading games off the 5 1/2" floppy disks. Ha, I still remember doing math material from the upper grades on that box, back in Kindergarten / first grade. Most of the software we got came from a local school supplies store, so it was largly educational lol.

Because of how much her son had improved in school using one, our aunt talked ma into getting my brother a computer. So ma went down to Radio Shack and voila: a 15 pound paper weight! My brother never really used it, so I used to tinker with it as a child, heh MS-DOS and I couldn't even read yet :-/. Ok, so I'm was a strange kid ^_^. That Tandy 1000 had a single foppy drive, couple of empty expansion slots; colour monitor, joystick, (a) keyboard (to dream about), and a dot matrix printer. Oh man, I haven't seen that computer-printout paper in years and years! it had this binder friendly stuff on the sides you could yank off, and the pages were attached in a continuous stream, so you had to tear off the page later. When I was older, i tried to read the things user manual and threw it up in the air: may as well had been written in binary of ancient greek.

When WebTV came out, I got my first exposure to the internet but the Tandy was still 'it' for computers here. By the time we upgraded to a Pentium around '99 or 2000, I already knew my way around the world wide web thanks to WebTV. I didn't really start getting into computers until around then, in the mid 2000s I finally started to geek out. I think if I ever found a Tandy or TRS-80 at a garage sale, I'd probably buy one: just to see if I could make it do anything useful.

I don't know if I'll always be into computers, but I think that I will always be a programmer in some form.

QOTD 2009-03-03

They couldn't hit an elephant at this dist...
-- Civil War General John Sedgwick, his last words,
Battle of Spotsylvania Court House, 1864
Yippee-Kai-Yay !!! I'm off work Friday xD

Just errands to run... bah! Oh well, at least I don't have to get up early lol.

Thursday, April 2, 2009

GR Oh man, that is just so wrong...

I've had this theory for awhile, but I think this proves it well enough for me... I was playing Ghost Recon with the CENTCOM mod loaded, got to a map that the objective is to clear out insurgents from a [very very small] city without waxing the civis in the area...

Loaded up with a G36 rifle and AG36 launcher, one perk of video games over real life - much nicer kit selection >_>. Mission went well, aside from the "support" assets doing little more then sit on their rear ends. Made it to one building and was just floored... I see an enemy shadow through a wall, AK in hand. In another building I found a stair case heading up and 2 shadows above.

Sure enough, where ever I went, the shadow of an enemy tracked my position with his rifle - through the floor. Even worse then that lol, moved up stairs.... shot him in the face and took out his cronie behind the landing without a scratch, the AI can't even CHEAT correctly lol.
Finally home from work, just one more day to go until I'm off for a bit...

Been raining so heavy, Burt the hunting dog had to be brought in from outside; boss warned he might bark and bear his teeth since he doesn't know us, but all he did was look at me as if to say, "pet me, I hate this weather" lol. I usually get along well with animals (y).

Most people don't care much for this weather, but I like the rain, I don't feel so depressed.. I'd rather go for a nice stroll lol. Rain doesn't really bother me, just another side of nature; it's lightning that concerns me! Lighting is however beyond my control, so I don't worry to much about it. I was standing in the kitchen today , a string of windows at my back from my 3 to my 9 o'clock not even a metre away. The whole room turned blue and I listened intently for the clap of thunder. Sounded almost like an air strike in the distance, shaking the room. I fear for others more then I fear about my fate; if GOD wants me dead, it don't matter if I'm standing near a window or in a vault, if my times up the 'where' would be the least of anyone's worries 8=).

mm, when's lunch

Wednesday, April 1, 2009

Lately I feel like, I spend all of my time either working or working on something :-/.

Writer's Block: No Foolin'

What's the best April Fool's joke you've seen today?
Live Journals Writer's Block

Watching Noer's evil mind fool a few youngin's about things shutting down; we're not closing our doors at [SAS], but he April Fooled at least one or two troopers xD. BSDFan tried a similar trick on me earlier about DaemonForums but without that awesome punch to it lol. Medic had me grinning ear to ear with his Ghost Recon fools, but I think Noer took the cake hehe.

So far, I'vce only been fooled once (Thanks BSDFan, lol) but haven't pulled any; the only person I had a mind to trick, is also one I would've considered it mean to fool in the planned way lol. (I'd also hate to see what he'd do to me next year haha). Well, I did try playing a joke on Valroes joke but I don't think I got a rise out of him :-(