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.

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.

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.

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.