honorable mention

All the leaves are brown and the sky is gray
I went for a walk on a winter`s day
I`d be so safe and warm if I was in L.A.
California dreamin` on such a winter`s day

I stopped into a church (yes I did) and I passed along the way
And I got down on my knees (down on my knees) and I pretend to pray
You know the preacher, he likes it cold
Cause he knows I`m gonna stay (cause he knows I`m gonna stay)
California dreamin` (California dreamin`) on such a winter`s day

All the of leaves are brown and the sky is so gray
I went for a walk on a cool winter`s day, yeah
I`d be so safe and warm if I was in L.A.
California dreamin` (California dreamin`) on such a winter`s day (California dreamin`)
On such a winter`s day (California dreamin`)
On such a winter`s day
California, California dreamin`
California dreamin`

Play that for me

You know it`s just a dream

Dream on

California dreamin`

There must be some kind of way out of here
Said the joker to the thief
Theres too much confusion
I cant get no relief
Businessman they drink my wine
Plow men dig my earth
None will level on the line
Nobody of it is worth
Hey hey

No reason to get excited
The thief he kindly spoke
There are many here among us
Who feel that life is but a joke but uh
But you and I weve been through that
And this is not our fate
So let us not talk falsely now
The hours getting late
Hey

Hey

All along the watchtower
Princes kept the view
While all the women came and went
Bare-foot servants to, but huh
Outside in the cold distance
A wild cat did growl
Two riders were approachin
And the wind began to howl
Hey
Oh
All along the watchtower
Hear you sing around the watch
Gotta beware gotta beware I will
Yeah
Ooh baby

All along the watchtower (Jimi Hendrix)

A few classics

Some folks are born made to wave the flag,
Ooh, they’re red, white and blue.
And when the band plays “Hail to the chief”,
Ooh, they point the cannon at you, Lord,
It ain’t me, it ain’t me, I ain’t no senator’s son, son.
It ain’t me, it ain’t me; I ain’t no fortunate one, no,
Yeah!

Some folks are born silver spoon in hand,
Lord, don’t they help themselves, oh.
But when the taxman comes to the door,
Lord, the house looks like a rummage sale, yes,
It ain’t me, it ain’t me, I ain’t no millionaire’s son, no.
It ain’t me, it ain’t me; I ain’t no fortunate one, no.

Some folks inherit star spangled eyes,
Ooh, they send you down to war, Lord,
And when you ask them, “How much should we give?”
Ooh, they only answer More! more! more! yoh,
It ain’t me, it ain’t me, I ain’t no military son, son.
It ain’t me, it ain’t me; I ain’t no fortunate one, one.
It ain’t me, it ain’t me, I ain’t no fortunate one, no no no,
It ain’t me, it ain’t me, I ain’t no fortunate son, no no no,

Fortunate Son, Credence Clearwater Revival

Gonna tell Aunt Mary ’bout Uncle John
He says he has the blues but he has a lotta fun
Oh baby
Ye-e-e-eh baby
Woo-o-o-oh baby
Havin’ me some fun tonight

Well, long tall Sally has a lot on the balland
Nobody cares if she’s long and tall
Oh baby
Ye-e-e-eh baby
Woo-o-o-oh baby
Havin’ me some fun tonight

Well, I saw Uncle John with long tall Sally
He saw Aunt mary cummin’
And he ducked back in the alley
Oh baby
Ye-e-e-eh baby
Woo-o-o-oh baby
Havin’ me some fun tonight

We’re gonna have some fun tonight
Gonna have some fun tonight
We’re gonna have some fun tonight
Everything will be alright
We’re gonna have some fun
Gonna have some fun tonight
We’re gonna have some fun tonight
Gonna have some fun tonight
We’re gonna have some fun tonight
Everything will be alright
We’re gonna have some fun
Gonna have some fun tonight

Long Tall Sally, Little Richard

Year of the Monkey

Been playing a Vietnam themed Ghost Recon mod that was mentioned on our forums, Year of the Monkey; so far this is an awesome mod lol. Being stuck in the middle of a jungle, well is a terrain type that feels more natural then desert missions ^_^. Moment I got to the intro and heard the mods music taste, I was hooked. YOTM does music and sounds more “in period”, some of which are songs that are more my style then oft’ found today. GR already has awesome sound effects, and YOTM don’t do a bad job there either hehe.

Launched the first map on elite, ordered the sniper to an overwatch position and the next thing I know, I’m laying flat with helmet to the grindstone as bullets are whizzing by our insertion! Ordered all teams to surpress and I put down a bit of frag cover in order to peel alpha & bravo out under sniper fire. Oh man, what a map. Tried circling around the flanks in groups (leaving our sniper as bait lol), only for Bravo to get pinned down; I’m moving, can’t see crap, bullet zips over my ear and I dived straight to the ground; Bravo opened fire on their positions. Looking over my shoulder confirmed my ears summery, the poor slept behind me had lost his head; crawling back to safer ground and moving across the stream, so I could regroup on Bravo for a tactical withdrawal (they had just moved out of cover when we took fire). Lo’ and behold, 3 bodies moving in the water about 35m to Bravos 4 o’clock.

“I don’t give a f*** what that is, let’s rock”

and Alpha went weapons free, next thing I know we’re picking shrapnel out of our asses from behind lol. Swithced to bravo team, to find 2 men down and one stuck in a tree, being shot at by an enemy 3 metres away….. little M60 fire and problem solved. Maybe the AI isn’t totally used to the terrain?

Eventually ended up with just the Sniper left, when I found a small area dug into the earth and covered over with camo — leading into a tunnel system going all over the map. Now that’s what I call attention to detail!!!!! managed to eventually find my way out, only to see the end of tunnel come up practically behind our insertion point! Stuck my head out, and lost it without even seeing a thing.

Loaded it on Multilayer again, sent re spawns to infinite, then kitted out for action. M60 General Purpose Machine Gun plus Frags. That was a crazy map. I went to search around the spawn point, next thing I know there are two X-Rays behind me: little bastards had a small encampment buried into the ground where I couldn’t see, came out and shot me lol. In attempts to attack the village position, met with heavy fire and got blown up by grenades several times; ended up using frags and M60 fire just to pepper then enough I could circle around between flanking positions.

A few lives later, managed to creep into the village undetected, passing up a kill – then lit up their world. Main problem was the tunnels and having to frag both sides of a T-Junction; killing the enemy or forcing them to take cover, then trying to engage before getting shot in the back lol. At least though, GR doesn’t seem to be capable of simulating booby traps… lol.

Played through several of the missions and it was just awesome; cook a few goons (I love setting ambushes), check your six, then move out, and next thing you know Charlie’s fried your ass.

One thing I love about Ghost Recon, is it has that feel to it, that feel that behind any rock or tree could be lurking a nasty surprise. That’s something that is sorely missing from war games set in urban environments, where you generally know where threats can come from, where they probably will be, and good cover is scarce.

tpsh, recent commit

 commit 6eda7f33de6bb7505fc64986a5bd31211d68acc5
Author: Terry ... ... <...@,,,>
Date: Fri Mar 13 05:36:45 2009 +0000

initial implementation of the function and macro built-ins

'function name() definition' creates an alias named 'name' with evaluation
'definition'

'macro name( definition )' creates an alias named 'name' with evaluation
'definition'

Eventually macro will probably define the alias wrapped in a (grouping),
once (command groupings) are implemented. function will allow {
groupings } when that is also implemented; but will not make the
implicit.

Currently variables and quotes are pre-expanded by the line processing
code, before function/macro receive the text to store in a macro. While
this is the desired behavour for the alias built in, it is not desired
for other methods of defining a command macro! It is however possible to
escape variables and things, e.g.$ macro e( echo hi '$USER' ); so that
the expansion occurs when 'e' is executed, as opposed to when 'e' is
recorded. This will hopefully be fixed in the future.

The manual page is in continual development, and will reflect the
desired "end state" for macro behavour.

Basically tpsh has no real concept of an alias or function per say; only a simple macro recording facility.

  # bourne style alias
alias x=y
# csh style alias
alias x y

# bourne again style named function
function x() y

# tpsh specific syntax
macro x( y )

# each make x expand to y (with appropriate context grouping to be added later)

Generally where things differ enough between sh and csh, to warrant a check of the fine manual, like alias and the export/setenv thing; tpsh endeavors to be more permissive about muscle memory.

Internally there is no real difference between an alias and a function, it’s just a macro with a name. sh doesn’t use the function keyword, but bash does (which zsh also permits, hehe). It’s much less bugger to implement functions with the keyword then not at the moment, and it’s really the macro keyword I’m interested in. The macro built in is meant for simple commands, where as the bash function syntax is meant for compatibility and to make using a complex command as the definition readable. The sub shell and same shell command grouping syntax used in sh, of ( commands ) and { commands } I am expecting will be treated like an anonymous macro.

Eventually I’ll probably alter sh_eval() to “relax” its evaluations of a function definition so that environment variables and quotes (etc) are expanded when used, instead of stored. Atm the only “don’t screw with this” case in sh_eval, is not performing alias expansion when one executes the unalias built-in, since you can’t specify the macro to delete if it gets expanded first ^_^.

Personally, I like ‘macro foo( bar )’ more then ‘alias foo=bar’ or ‘alias foo bar’, feels more natural. tpsh after all is meant to reflect MY preferences rather then being purely sh compatible, lol. Even though there is little difference in tpsh (yet) between ‘alias la=ls -a’ and “alias la=”ls -a”‘, the implicit grouping inside the () is just more to taste:

$ macro la( ls -a )
$ macro ll( la -l )
$ alias
'la' => 'ls -a'
'll' => 'ls -a -l'
$

most Bourne inspired shells that support alias display them as `la=’ls -a'”, but the alias command is fairly new in sh, and I prefer ‘la’ => ‘ls -a’, thus that is what tpsh uses.

Hmm, what pipe was I smoking when I thought it would be possible to get a measure of consistency between 3 different readline implementations?

Was playing a bit of Ghost Recons PlayStation 2 editiion, after so many years of CQ in [SAS], I really hate the AI more then I used to lol. One nice thing though, despite that it seems micro-management (barf!) or leaving by the wayside the Squad AI isn’t much use tactically beyond (very) simple fire and maneuver. One nice thing though, was scouting 20~40m ahead of the assault group when I spotted a sentry in a ditch; amazingly he didn’t notice me laying some 25 meters to his side, even with a tweedle dee and tweedle dumb giving away my snipers position 8=)

swapped fire teams and moved Alpha up, plugged a M203 into the ditch and then switched back to the sniper on Bravo to pick off anything fleeing from Alphas SAW.

Now if only the dipsticks didn’t cross my line of fire so often, lol. In terms of friendly AI, for what they are capable of GR has good squad AI, but sadly still needs baby sitting for anything beyond rules of engagement. I have no exposure to the AI community, but most video games have the “Artificial” part right, they just lack “Intelligence” to go with it.

A little DooM II: HR

Spawned in the middle of a field like area, heard of imps at the 12, and a wolf pack of Mancubus to the 9. Crazy critters flying about with big guns and arachno-things snipin’, pure madness. Took a couple of lives just to get into the “grove” of evading the shots lol. I forget what difficulty I have the game set to, but just looking at the things section in the wiki, goes to show the mixture of nasties on the map. So many baddies crawling around it was a dance between hit-and-run super shotgun, paint the plasma gun blue, and rocket frenzy lol, The hard part was the rocket launching critter around the one key.

By the time I got to MAP15: Gates to Hell (Hell Revealed), and managed to fight it down to just the imps on the wall… it got almost a chore to clear out survivors lol. DooM makes a great way to relax some brain cells though -> don’t care what the fuck that huge mother ****ing thing is called, but it’s getting a quartet of rockets shoved up it’s ass kind of moments lol.

Terry’s Portable SHell

Hmm, my recent pet project (tpsh) is actually shaping up quite nicely. It is almost to what I would consider a usable interactive state, the only big irk left I guess is the pipe handling and a few odds and ends. Development started like last month (first commit in my master branch is dated 2009-02-28), and has been a very on/off thing in my spare time; a lot remains to be done, but progress is quite nice.

I rather like the korn shells, but I find it annoying to see what implementation of korn from who behaves in what way. OpenBSDs customized pdksh being the best of the lot in my opinion, the only problem with the korn *family* being consistency in the wild… cmd.exe just barely counts as a command shell, better for scripting then for interactive use. I can’t help but think, cmd.exe’s filename completion was either written by a 5th grader or a hold over from command.com (I haven’t used command.com in years). Currently I use zsh most of the day on FreeBSD, ksh on OpenBSD, and cmd.exe on Windows XP. So it is really important to me to have a single and SANE shell.

I used to use tcsh a lot, but after getting into Bourne-style shell scripting (Nota bene: I know nothing about csh scripting) I got pissed and sought out a shell that would allow me to test sh snippets at the prompt. To be honest, I do not have any issues with the GNU Bourne Again SHell (bash); some distros default init files aside. Yet just like tcsh/zsh — I have no big desire to cart bash around with me everywhere (and I do not like cygwin).

The solution? Create a shell that behaves more or less consistently across platforms, does what I want, and is not a pain in the ass to port along for the ride.

Line editing is completely delegated to Term::ReadLine. Someday writing something like readline or curses on an alien OS for terminal XYZ would be one thing, having to implement shell line editing and be portable between the UNIX and Windows NT environments: I wouldn’t do it if you paid me. (and even if drunk, I would still likely use normal libraries!)

On the interactive level, line editing for me is an absolute must. Command completion I can live without for awhile. Unix names are usually short and I like fairly terse and structured ones myself, winsucks is a bit of a different story. The child like way cmd.exe does command completion, it’s almost better to do without completion on windows haha!

Right now basic expansions work, ${VAR} and $VAR, line editing and history is via Term::ReadLine (I’ve been using Term::ReadLine:: Zoid and Perl implementations). There’s only rudimentary handling of quoting for the time being, something that needs labouring with in order to handle nested quotes (e.g. echo “`ls ‘C:/Program Files’`”) but currently does the job well enough for right now. The ‘single’ and “double” quotes mostly work as expected, The `backticks` work as expected in simple cases, but since there is no proper support for shell script or -c “command” yet, things like `find /some/where -name foo -print` will work as expected, but `find /some/where -name foo -print | xargs whatever` will not work. Once things are more evolved on the scripting side, it should be trivial to implement backticks correctly (nested quotes aside). The idea being to pass the backticks onto a child shell. Right now the only big catch 22 with quotes is only one set can be used and they do not nest yet; fixing that will be fun.

I/O Redirection and pipes also work for starters, but not completely. The >, >>, and < operators do work, but don't accept an optional file descriptor number yet (e.g. foobitz 2>/dev/null) or other tricks of the trade. Basically just the I/O redirection I use a lot is implemented for right now; since the focus is on interactive use by yours truly, it will probably stay that way for a while. Command1 | command2 also works well enough right now, but I’ve yet to implement pipe lines properly (e.g. cat f1 f2 f3 | sort | uniq | less; doesn’t work yet); just wasn’t enough time to shift from prototype to finish without sleep lol. Only one use of pipes currently is supported, until I have the time for coding unlimited segments in a pipe line.

Aliases even work ok at the moment, but no (damn!) addictive runtime parameter expansions have been added yet (e.g. alias qux=”xuq -f $1 -x $2″). That will have to be done someday, hehe. In point of fact, $*, $@, and the things related to positional parameters are not even implemented yet.

One benefit of my development environment, is I can use I/O redirection to run a simple test suite. I created a ‘test-sh’ script that strips the environment of all but the interesting stuffs before invoking tpsh. Then I have a test file with commands written out.

 $ ./test-sh < file

and I can watch the results of the test file fly across my screen, as if typed interactively (I freaking love unix shells). It is not quite a unit test, but it is enough to be able to run the test file and monitor the results for unexpected regressions or fuck ups, before pushing the code to vectra. Currently shell globbing is limited to Perls glob(), probably to be implemented directly with File::Glob::bsd_glob() in the future, and someway of letting an environment variable specify the desired GLOB_* flags. (perl 5.8s glob() seems to do what I want). I have yet to decide how to handle tab completion across the Gnu, Perl, and Zoid ReadLine modules but coding the completion functionality itself should be fairly easy; the issue is just how to plug it in properly. Exactly what the globbing behaviour will be like, I dunno yet: because to be honest I have never noticed any big difference between (t)csh, perl, and zsh when it comes to using globs (but I also admit that I rarely do more then abuse * and {x,y,z} on a daily basis). If at all possible, I would like to use File::Glob rather then roll my own (and modern perl glob() does use File::Glob in the background afaik). I believe that as soon as a full pipe line implementation is done, I’ll be ready to start coding it from a tpsh session lol. Goal wise, where am I trying to go? It is implemented in Perl, because perl is fun, perl is less pain to port then C/C++, and I’m not going to use Java or C# period lol (my zsh setup starts up slow enough as is). Python, Ruby, or PHP would also have been good choices, except I’m trying to avoid rubber banding between languages. (Also note: I _hate_ writing C code on Win32.) It should generally behave like a traditional Bourne shell most of the time, but not be a true sh knock off. Whenever in doubt, mimic ash / sh behaviour. It’s not meant to be POSIX compliant, anymore then it is meant to be a real sh: based on, not clone of. It is supposed to behave as close to identical under unix and winnt as possible, with “pains of installing” meant to be a working ReadLine module. A good example is perl -e ‘code’ should work on Windows without having to adapt cmd.exe quoting rules. (really I think cmd.exe has shitty documentation for such an essential program). One reason I like languages like Perl and Python, they mostly behave the same on whatever OS, with a minimal of pain involved (especially Python) It should be easy to use, providing all the expected features — without massive bloat. It behaves like _I_ expect, not what someone else expects (good example: unix style shell, not dos style shell) It is not an interface to Perl. There’s at least 2 different perl shells out there that I know of, but I do not want a shell script that behaves like perl or even does configuration in perl; I want a shell written in perl that behaves like a regular shell lol. It’s also an easy project to take my mind else other matters in life right now… tpsh’s builtin eval command will work more or less like sh, not CORE::eval !!! Maybe I will implement a peval or pleval builtin that works like shells eval, but instead executes it as perl code rather then shell commands. (basically type `peval perl` code instead of `perl -e ‘perl code’`). Accessing perl code through tpsh just is not a priority, when I want to talk to a perl interpretor, I’ll invoke one. Eventually I want it to be able to execute shell script in some form, the goal of which (obviously) will be handling my shells initialization files (~/.${USER}_shrc and ~/.site_shrc) without going belly up. To pull that off, a Bourne-style shell, a which program or built in, and support for functions / aliases is required. (My init files handle sh, bash, zsh, and several flavours of korn; plus several OSes from one main file + a site local settings file). My init file is rather elaborate in design compared to most others I’ve seen, yet very conservative in what it demands of the shell: the most advanced sh features required being function support lol. Basic idea of feature/priorities for tpsh:

 a usable shell for daily use (basically done)
tab completion (filenames, then command; then pluggable, then 'smart' completion)
code the remaining builtins and allow a coloured prompt ;-) (etc)
expand the expression syntax into a more usable (read normal) form
do shell functions
handle job control (basic (i.e. bg, fg, &), then rest)
allow shell scripting in a conventional way, rather then tpsh < cmdfile
grow the control flow and things for shell script (if, while, for, ...)
take POSIX into closer consideration for the minor details

the only part that worries me, is implementing the [ builtin lol. (mm, maybe feed [ stuff ] into a syntax tree that we can build a corresponding perl statement to eval())