Wednesday, January 30, 2008

NPM Settings Menu

Photobucket

Work begins on a settings GUI for NPM. I have a QIconView standing in for the list of config topics, I expect in the end it will probably be some form of widget stack or some thing like that. The changes I've committed to the trunk tonight are purely cosmetic, there is no link to the exsisting settings code that revolves around an RC file yet. I'm actually interresting in moving to using QSettings instead, tests will show the direction to be taken.


At the moment it has the majority of important options. I want the logging section to allow the user to set the logging level and files e.t.c. one thing that I think would be cool is to save the result files from portupgrade with a proper time-stamp appended to the file name. Although it would only take a minute to check the script to see if it would truncate the log file if reused.

There also needs to be a small network section whether separate or added to the others that can handle setting the portsnap/sup servers to use. And I would like it to be able to have a list of servers to query set. So that if it can't reach one it tries the next (pardoning the retry options set).

Tuesday, January 29, 2008

Between a Rock and a Hard Case.

Finally a stroke of luck some thing decent on. Got to see most of The Rock on TV. I flipped channels to it just as Hummles men were taking over the island. I was also reminded why I originally gave up on watching TV at all in the first place.


Never nothing good on

and if there is, I usually don't get to see it


At least tonight I actually got to see most of it <_<. And the Money Pit is on next, not quite as good as Mr Blandings Builds His Dream House but the same basic concept. Man and his Wife buy an old house and have the worlds worst time rebuilding it hehe.


One thing I find fun about The Rock, is they make references to Mason being old. Heck after going through what the guys in the Special Air Service go through he could probably be 90 years old and still whip some bodies ass lol.


A few memorable quotes hehe
Stanley Goodspeed: I love pressure. I eat it for breakfast.

Agent Paxton: Now you tell me I'm on a need-to-know basis. And I'm telling you right now, I need to who the fuck John Mason is, right now sir!
Womack: You want to know? Okay. 1962: J. Edgar Hoover is the head of the FBI, some say the country. It's no secret that he kept secret files on prominent Americans and Europeans. De Gaulle, British members of Parliament, even the Prime Minister. I mean, this guy had dirt on everybody in the world.
Agent Paxton: Yeah, I know all of the cloak and dagger stories. Where does Mason fit in?
Womack: Mason was the British operative who stole the files, but our Bureau agents caught him at the Canadian border. Of course, the British claimed that they never heard of him. So we held him without trial until he gave up the microfilm. But he never did.
Agent Paxton: Well, I'm surprised Hoover didn't use his daughter as leverage.
Womack: Hoover was dead in '72, she wasn't born yet. Today... it's a different Bureau.
Agent Paxton: So, you held this guy without trial his whole life. No wonder he's pissed.
Womack: This man knows our most intimate secrets from the last half century! The alien landing at Roswell, the truth behind the J.F.K. assassination. Mason's angry, he's lethal, he's a trained killer... and he is the only hope that we have got.

Kid On Motorcycle: Hey man, you just fucked up your Ferrari.
Stanley Goodspeed: It's not mine.
[steals bike]
Stanley Goodspeed: And neither is this


Stanley Goodspeed: Hi, I'm an agent with the federal... FBI... Well, my, I'm Stanley Goodspeed.
John Mason: But of course you are.
Agent Paxton: Well, at least he got his name right.
Stanley Goodspeed: Of course I am.
John Mason: And you have an emergency.
Stanley Goodspeed: Right.
John Mason: And you need my help.
Stanley Goodspeed: Exactly right.
John Mason: Coffee.
Stanley Goodspeed: No, I'm fine, thank you.
John Mason: Offer me coffee.

John Mason: Are you sure you're ready for this?
Stanley Goodspeed: I'll do my best.
John Mason: Your "best"! Losers always whine about their best. Winners go home and fuck the prom queen.
Stanley Goodspeed: Carla was the prom queen.
John Mason: Really?
Stanley Goodspeed: [cocks his gun] Yeah.


John Mason: I'm sure all this will make a great bed time story to tell your kid.
Stanley Goodspeed: You're insane, Mason. The kid'll have nightmares. I'll spend all my money on shrinks.


John Mason: I'm fed up saving your ass. I'm amazed you made it past puberty.

Monday, January 28, 2008

Kill'n time

Found an interesting time paser, GNU Robots. Quite interesting really you write program in scheme and it uses GNU Guile to run the robot off the scheme program you supply.

It's also a good excuse to learn more about Scheme hehe. I also found an interesting program called gnubg, I want to take a look at it's windows port to see how well behaved it is. I might know some one that might have use for it ;-)

I also need to start writing my todo list for what to do next with NPM and to get NPM_PortConfig operational.

Tired, Angry, and Generally P.T.F.O.

At the wits end and bored as watching shit roll down a snow drift in winter.

The only remaining possibility for the GF8400GS's amazingly crappy performance with RvS and TSS... Drivers or worse the games are just rubbish with that card because of the age difference. I did first run RvS on a GF4200 and SWAT4 on a high end Radeon 9800 after all lol


To top it all off, I could've either gotten a 8600GT online for less after rebates or same care for much less if I could've "just ordered online" but no... who the fook listens to me lol.


I can't roll back drivers to the ones that I know did work smoothly with RvS & TSS on my 6200 though because they are so damn old that those drivers don't support the 8400 even through the unified arch. Grrrrr.... I'm not getting a fucking deskjob out of this and retirement is not an option !!!


How the rat fucking hell you can kick at a games settings until you've gotten average frame rates from every thing between 30 FPS and a 150FPS and still get the lag step feeling of "doing the robot" when moving is ridicules ! FFS I may as well have blown it all on a paper weight instead of an "upgrade" of a replacement.. Sheesh if they had the right port type I'd get the same cheap-ass card I had to replace... Wasn't much but at least it fucking worked right !!!


It can run BF2 all out without even moving a muscle but RvS and TSS kill it. Today we had a rough & tumble assault plan by Rct Hawke, slow down was so bad I practically got hng up on the door. When I got to the stairs it was so damn slow it felt like I was wearing lead army boots. By the time I did get up top of the stairs in what felt like minutes later, I was shot, limping, still in high FPS rates all through it, and hadn't seen a flib'n tango along the way that could've hit me. piece of crap.... I guess I should move Americas Army up on the test list since it's the only other Unreal Engine game I own, who knows maybe it could effect all Unreal 2.x games :\ I don't own any of the UT games to test either.


Now that would suck... if every Unreal Engine game was utter crap on this piece of crap card.


*sigh* why do I even fscking bother...

Oh wait, I forgot I'm in this mess because the card I didn't want in the first place but got stuck with went bad. And the card I had to get to replace it because I couldn't get any other (thank you very much for no online shopping option!!!) doesn't work well with the damn games I play.. I swear, if I ever get the cash for a Personal Computer again.. I'm building it my self and ain't listening to no whining ass family when it comes to how to spend the money !!


Hell, I've been accustomed to a weekly income of $0 my entire life and having to make the absolute most of what I do spend. And I know more about computers then any one in this burg I've met that ain't paid to know more then I do. Let along being capable of assembling my own workstation and buying the parts wisely enough. My desktop has been $1600 + $80 and now + $100 worth of hell and countless headaches over the past two years. And I could build a better system for $1200 ffs !!! Thi sis what happens when you compromise on your freedom.


You become the (en)slave(d).

Stress testing the 8400

click to enlarge
Free Image Hosting at www.ImageShack.us


With how long it probably took for some one to make the demo, it is no wonder they chose such a model hehe.

Sunday, January 27, 2008

days recap

It's been a bit of a busy night, took a little time to work on the NPM_PortConfig class but I'm still not really happy with it. The main thing that concerns me at the moment is dealing with saved config's. Namely how to handle a situation where the Makefile has more options in it then the saved options from last time the system was built. Because other then that, it is really just as simple as check for a saved config,parse it if found and the makefile if not then and move on..

Also been playing around with the ol'C++ tonight. So farI've been reminded of why I hate C++ and why I love Qt and the GNU Compiler Collection at the same time lol. It does feel kind of weird to be working on some thing in C++ again, it was my first language but I have not used it in ages.. used C yeah sure but not C++ :\


Lead some Planning & Leading training on TG#1 today. I was a little disapointed that Chester was the only one that showed up... But I think it whent quite good. Chester continues to show he's worth our time in training. And the best part, we got to sneak past a ton of tango's right under their noses hehe xD


Still early here, 0320R (local) but it's hard to keep my mind on the code...

*sighs* women... lol.

Friday, January 25, 2008

Proof of Concept: Randomize a list

Well, the idea was essentially that RvS allows up to 30~32 maps or so all stored as a pair of assicated arrays loaded from the servers configuration file. One array that holds the game types (e.g. tango hunt, hostage rescue, misson et. al.) and the other the actual maps to load, i.e. GameType[0]=first maps gametype and Maps[0]=first map to load.


I took a moment the other day (before my gfx card went fuzzy) to write a small program that would generate a new configuration file with a maplist specified from another file, the prototype works fine but I didn't know how I could archive my real goal: randomly populate the maplist from that file.


Here is a proof-of-concept algorithm that takes a list of items and returns a new list containing the same values but sorted into a 'random' order.


#!/usr/bin/env python

import random

def unsort(list, index):
    "return a copy of list reordered randomly"

    new_list = []
    table = []

    while len(new_list) != index:
        r = random.randint(0, index)
        try:
            if r not in table:
                table.append(r)
                new_list.append(list[r])
            else:
                continue
        except IndexError:
            pass
    return new_list

if __name__ == "__main__":
    li = [1,2,3,4,5]
    print unsort(li, len(li))



This took me about 10 minutes of thinking at work today and about 12 or 14 hours later I've made a test script in Python since that is the language I've been using for stuff latly. Basically the problem is the only way to randomly map items from one list into another is if you access elements in the list at random. But if you access a list at a random index and push it into a new list you can get duplicates. So a table (list) is used to store random numbers we have already generated. If the current number is not referenced in the table we can assume that we have not copied the element at that index in the list into the new list, if it does exist we need to try again. One bad thing is the algorithm is designed to run until completion, which can take an arbitrary amount of time to 'unsort' any given set. In theory, it could loop forever! However it would be trivial to modify it to abort the randomization process after a given time frame (such as >N iterations or seconds, which ever comes first) and just append remaining elements onto the end of the new list.

Here is a few test runs:


Terry@Dixie$ ./unsort.py
[3, 5, 4, 1, 2]
Terry@Dixie$ ./unsort.py
[3, 5, 2, 1, 4]
Terry@Dixie$ ./unsort.py
[4, 1, 2, 3, 5]
Terry@Dixie$ ./unsort.py
[5, 4, 1, 2, 3]
Terry@Dixie$ ./unsort.py
[5, 2, 4, 1, 3]
Terry@Dixie$ ./unsort.py
[3, 2, 1, 4, 5]
Terry@Dixie$ ./unsort.py
[4, 5, 3, 2, 1]
Terry@Dixie$



Odds are the PRNG is being seeded with the system time by default or making use of /dev/random on my FreeBSD laptop and that is good enough for me. And these results are random enough for me because I dunno how to write first class pseudo random number generators hehe.

Thursday, January 24, 2008

RIP nVidia GeForce 6200, PoS@256mb

Well, to make a long story shorter..

Whent to join TG#1 to kill some stress but it was full, supper was soon so I switched to TG#3 instead and went to join Duke for a round.

Before the round started I had to getup and do some thing and ma moved my chair out so she could get to the printer so I had to wait. By the time I got to sit back down my computer had already had the monitor blip and the PC restart -- from running SWAT4:TSS to showing the BIOS start screen... if there was any error message before that I didn't get a chance to see it.


On each restart that followed the monitor was all funky and kept blipping on and off as if the signal wasn't working.

Instantly my brains thinking monitor, monitor cable, graphics card, fans, and motherboard for possible problems. Hooked up the monitor I got from the Library for a few bucks, same effect. Opened the case, blew the crap out of it with a can of air. Yanked all of the PCI family cards out, Audigy 4, TV Tuner, GeForce 6200 e.t.c and gave them a go. Cut my finger trying to get the graphics card out of it's PCI-Ex16 slot, freaking plastic lever was to buried to see which way it angled.

Unscrewed the main (looked 90mm) fan from the case but the power connector was to short to pull it clean for cleaning... Couldn't get that unplugged so I pulled out the (E)IDE cable connecting the DVD-ROM's and one of the 512MB RAM DIMMs and still couldn't get the flib'n thing out.. So I ended up cleaning it with a paper towel half over the PSU, half over the mother board :\ Needless to say I didn't even want to mess with the issue of getting to the CPU.

Managed to get that screwed back in and then I had to pull the main power off the motherboard to get the RAM slot back in (the slots are right under the worst tangle of power cabling!). The inside of the PC was dusty but not that bad, most of it was just on the fan blades and the front side vents (veeerrrryyyy bad) but still cleaner then Ma's Dell and that things been running forever without a cleaning, like once in 7+ years.

Booted her back up and still no luck although the main fan was running a heck of a lot better the temp was still normalD. I noticed though that my motherboard had a port for a monitor on it with a cover. I remember there was a note taped on it when I first set up the computer < 2 years ago.


Interestingly while the monitor was displaying screwy when plugged intot he Geforce 6200, maybe even some kind of pixel array during the computers startup. It was perfectly fine when in the BIOS setup, maybe because it would have to be used at a really low level dunno. Set the BIOS Video configuration from AUTO to Integrated, restarted and changed ports.


Using the onboard 128MB Intel GMA it works... RVS works fine to but RvS will work with just about any thing made after the stone age if it supports the right features.. With how over-optimized RvS is you could probably run it on a Cuisinart without trouble :\ SWAT4:TSS on the other hand is quite sensitive to ATI/nVidia drivers and essentially resulted in an impossible to kill application.

All of the other computers here use AGP so Ic an't even test the card or a different card in the slot, so I hope it's the GeForce 6200 and not part of the Motherboard..


So it looks like I have to either give up on S4 or buy a new Gfx card.. I know I've often thought about upgrading if finances allowed but this does not make me happy. Data failure is cheap, use backups but when the hardware goes nuts what do you do?

Upgrade to GeForce 8400GS and it's fixed... Guess it was the GeForce 6200 going bad :\

randomly sorting lists

Was hashing out a very quick program to take a list of maps from a file and to replace the ones in the config file with those but sorted into a fairly random pattern.


Then I realized that I have no bloody idea how to randomly sort, ehh unsort a list of strings.


My notes scribbled in file:
##################################################
# Randomize the contents of a list -- algorithmic ideas
#
# input; list of N items to be randomized
# storage: table T to hold previously generated random numbers
#
# loop until done where each item in list is sorted into new list
#   generate random number R between 0 and N
#   store N in a table T if not already done so then
#     if N is not in table T
#       new list[R] = current item in loop
#     else if N is in table continue to next iteration
#
# List will probably have to be a temporary to be generated from input list
#
# result expected: loop once per each item in the input list creating
#    


That is the best I can think of when you consider the number of distractions:

birds screeching
mother shouting (at me, dog, and bird)
dozen pans falling
going AFK every X minutes
walking out in the cold to check the car cover
sorting pans back onto shelf
et alii

Is it a wonder I *usually* don't touch an ounce of code until I am THE ONLY MORON AWAKE in this house ? I think not !

Wednesday, January 23, 2008

rf.c revisited

Got bored, so I revisited an old program I wrote like last year. One of the very first ones I set out to write in C in fact. I admit there is no practical need for this program haha. The only reason I wrote it is that I found it some one annoying that the cat program was made to concatenate files and print them to stdout. But is all so often just used to print out a lone file when less -F does the same thing. For the fun of it I basically added the ability to mimic the head and tail commands with an implicit number of lines to print (e.g. like head -n / tail -n ) while still keeping to the basic function of outputing a lone file, later I made it handle multiple files just for fun.


I was remembering today the sfalloc() macro I had defined early on. Some thing like

#define sfalloc( _type, _ptr ) \
        (_type *)malloc( sizeof(_ptr) )

The main point of it was to ensure I wrote sizeof(foo) instead of sizeof(int) or some thing. And to get it to compile with a C++ compiler. I was thinking about making a new version of it for one of my header files that would use the cast only if __cplusplus was defined or better yet the new operator instead for use in code I would want to be compatible with both C and C++ but why bother for such a small program? Althouhg it would be a good spot to test it out in if I did hehe. Besides MSVC++ is a pain in the ass any way for compiling C99 code (imho).


My favorite non standard extensions to the C standard library on BSD and GNU systems is deffo err(), errx(), warn(), warnx(), and related routines in err.h namely because they are major time savers imho. Since a unix like system is assumed unistd is included and getopt(3) used for parsing argv rather then doing it manually.


I didn't use the various linked list macros provided by BSD boxes because I wanted to avoid them, in case I ever decided to build the app on Windows or DOS. It also was the first time I ever used a linked list in a C program so I wanted to give it a go hehe. I'm really glad I did to because it was a really good excuse to learn how to use the GNU Debugger at the time ;-)


One of the changes I made today was ensuring it would compile fine without assuming a C99 environment, I also ran it by gcc42 with -std=c89 -ansi and -pedantic-errors in the hopes of catching any thing I might've visually missed.


the 'final' version of the old program
/*-
 * Copyright (C) 2007
 * [my name ]. All rights reserved.
 *
 * permission to use, copy, modify, and distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 */


#if __STDC_VERSION__ >= 199901L
/* inline functions were added in C99  */
#else
#define inline  /* protect me */
#endif

#define MALLOC_FAILED "Unable to initialize memory at __LINE__ \n"

/* magic number for debugging read_bottom() and clean_up() */
#define NOMEM  ((struct lnpos *)0xDEADBEEF)

#include <err.h>
#include <errno.h>
#include <limits.h>
#include <locale.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

/* For storing end of line characters */
typedef struct lnpos {
 long          eol;
 struct lnpos  *next;
 struct lnpos  *prev;
} LNPOS;


static inline FILE      *open_file( char * );
static inline void  read_all( FILE *, int );
static void         read_top( FILE *, int );
static void         read_bottom( FILE *, int );
static inline void  clean_up( LNPOS * );
static inline void  be_verbose( char * );
static inline void  usage( void );


static const char   *this_progname;


/*
 *   rf - read file to standard out v2.0 -- see changes.log for details
 */    
int
main( int argc, char *argv[] ) {

 char  *errp;
 int  b_flag = 0, s_flag = 0, t_flag = 0, v_flag = 0;
 int  ch, f, lncnt = 0;
 FILE  *fp;
 

 setlocale( LC_ALL, "" );
 this_progname = argv[0];

 while ( (ch = getopt( argc, argv, "b:st:v" )) != -1 ) {
  switch ( ch ) {
  case 'b':
   /* Mimic tail(1) -n */
   b_flag++; 
   lncnt = strtol( optarg, &errp, 10 );
   if ( *errp || lncnt <= 0 ) {
    errx( EXIT_FAILURE, 
          "Improper line count -- %s\n", optarg );
   }
   break;
  case 's': 
   /* Suppress -v when given multiple files. */
   s_flag++;
   v_flag = 0;
   break;
  case 't':
   /* Mimic head(1) -n */
   t_flag++;
   lncnt = strtol( optarg, &errp, 10 );
   if ( *errp || lncnt <= 0 ) {
    errx( EXIT_FAILURE, 
          "Improper line count -- %s\n", optarg );
   }
   break;
  case 'v':
   /* Append file names --  be_verbose()  */
   v_flag++;
   break;
  case '?':
  default:
   usage();
   /* NOTREACHED */
  }
 }
 argc -= optind;
 argv += optind;

 if ( argc < 1 ) {
  usage();
 }

 /* Handle multiple files */
 for ( f = 0; f < argc; f++ ) {
  fp = open_file( argv[f] );

  if ( (!t_flag) && (!b_flag) )  {
   read_all( fp, lncnt );
  } else if ( t_flag ) {
   read_top( fp, lncnt );
  } else if ( b_flag ) {
   read_bottom( fp, lncnt );
  } else {
   usage();
   /* NOTREACHED */
  }

  if ( (v_flag != 0) || (argc > 1) ) {
   /* Don't suppress if not set */
   if ( s_flag == 0 ) {
    be_verbose( argv[f] );
    v_flag++;
   } else {
    v_flag = 0;
   }
  }

  fclose( fp );
 }

 return EXIT_SUCCESS;
}


/* Simple fopen wrapper to keep the if...else if...else blockage from getting
 * ugly. Since doing other wise would defeat the purpose of it in this program.
 * open_file() halts the program if fopen failed.
 */
static inline FILE *
open_file( char *arg ) {

 FILE  *fto;

 fto = fopen( arg, "r" );
 if ( fto == NULL ) {
  errx( EXIT_FAILURE, "File can not be opened or"
        " does not exist -- %s\n", arg );
 }
 
 return fto;
}


/*
 * print out an open file to standard output
 */
static inline void
read_all( FILE *fp, int lncnt ) {

 while ( (lncnt = fgetc( fp )) != EOF ) {
  printf( "%c", lncnt );
 }
}

/* 
 * Read n lines from the top of the file.
 */
static void
read_top( FILE *fp, int lncnt ) {

 int  c = 0;
 int  f = 0;

 while ( (c < lncnt) && (f != EOF ) ) {
  f = fgetc( fp );
  printf( "%c", f );
  if ( f == '\n') {
   c++;
  }
 }
}


/* 
 * Read n lines from the bottom of the file
 */
static void
read_bottom( FILE *fp, int lncnt ) {

 int           fin = 0, i;
 long int      eolnum = 0;
 long int      where;
 struct lnpos  *cur  = NULL;
 struct lnpos  *root = NULL;
 struct lnpos  *last = NULL;

 /* initiate the linked list */

 root = malloc( sizeof(root) );
 root->eol=0;
 if ( root == NULL ) {
  err( EXIT_FAILURE, MALLOC_FAILED );
 }
 root->next = NOMEM;
 root->prev = NOMEM;
 cur = root;

 cur->next = malloc( sizeof(cur->next) );
 cur->next->eol = 0;
 if ( cur->next == NULL ) {
  err( EXIT_FAILURE, MALLOC_FAILED );
 }
 cur->next->prev = cur;
 cur->next->next = NOMEM;
 cur = cur->next;


 /*
  * read the file, count every end of line and store them in a new
  * member of our linked list.
  */
 while ( (fin = fgetc( fp )) != EOF ) {
  if ( fin == '\n' ) {
   eolnum++;
   cur->eol = ftell( fp );
   cur->next = malloc( sizeof(cur->next) );
   cur->next->eol = 0;
   if ( cur->next == NULL ) {
    err( EXIT_FAILURE, MALLOC_FAILED );
   }
   cur->next->prev = cur;
   cur->next->next = NOMEM;
   cur = cur->next;
  }
 }

 /* double check last nodes prev is up to date before marking the end */

 cur->next = malloc( sizeof(cur->next) );
 cur->next->eol = 0;
 if ( cur->next == NULL ) {
  err( EXIT_FAILURE, MALLOC_FAILED );
 }
 cur->next->prev = cur;
 cur->next->next = NOMEM;
 cur = cur->next;
 last = cur;

 /* print out the rest of file from the given offset. */
 for ( i = 0; i < lncnt; ) {
  if ( cur->prev != NOMEM ) {
   if ( cur->eol ) {
    i++;
   }
   cur = cur->prev;
  }
 }


 where = fseek( fp, cur->eol, SEEK_SET );
 if ( where != 0 ) {
  err( EXIT_FAILURE, "Could not seek through the file\n" );
 }
 read_all( fp, lncnt );
 clean_up( root );

}

static inline void 
clean_up( LNPOS *root ) {

 /* Free linked lists memory */
 struct lnpos  *cur  = root;
 while ( cur->next != NOMEM ) {
  cur = cur->next;
  if ( cur->prev != NOMEM ) {
   free( cur->prev );
   cur->prev = NOMEM;
  }
 }
 free( cur ); /* free the end node */
}

static inline void
be_verbose( char *fname ) {

 printf( "\n==> %s <==\n", fname );
}

static inline void
usage( void ) {

 fprintf( stderr, "usage: %s [-t count | -b count] " 
                  "[-v] [file ...]\n", this_progname ); 
 exit( EXIT_FAILURE );
}



The simple makefile compiles it:

gcc -Wall -Wpointer-arith -Wcast-qual -Wcast-align -Wconversion \
-Waggregate-return -Wstrict-prototypes -Wmissing-prototypes \
-Wmissing-declarations -Wredundant-decls -Winline -Wnested-externs\
-std=c99 -march=i686

and Makefile.optimize adds the -fforce-mem -fforce-addr -finline-functions -fstrength-reduce -floop-optimize -O3 options for when testing is done, program works fine. FreeBSD's lint implementation also doesn't spew any serious messages.

GCC42

I was installing a program last night on my laptop that needed several GNUStep stuff, so I found out the hardway that it needed GCC v4.2.x's Objective C compiler...


It took maybe 3 1/2 to 4++ hours to build lang/gcc42 but I suppose it's a good thing. I always wanted to give it a test drive and it seems to have included the Fortran and Java (gcj) compilers with it.


The only good things I can say is one of my C programs built fine with the C Compiler (/usr/local/bin/gcc42) and I got to thumb through the source code in /usr/ports/lang/work/gcc-*/ while I waited. The parts I saw were quite well documented to and a pleasure to read.


One nice thing I suppose, a successful build of a compiler collection is probably a good stress-test for my laptops hardware :\

Tuesday, January 22, 2008

Never trust the cable guy

I can understand wanting to get done in a hurry especially in the morning as much as the next worker but come on man.


Finally found reason to fire up the ol'VCR tonight after we had the cable set up in here like last week.


The mook only unplugged my cable from the VCR<->TV connection and put in the one from the setup box. Without even being so kind as to route the cabling properly so all systems would work.


Geeze, I ain't no Telecom Engineer or nothing but I know how to hook up a bloody TV system with cable and video systems !!!

Sunday, January 20, 2008

Mxing a code squishy

Well, last night I got an alpha grade (imho) release set up on source forge and today I got it posted on forums.pcbsd.org.

It is some what ahead and behind schedule in the same regard, I originally planned to release a mock-up (non functional but 'looks') around the new year. Instead I've taken a few weeks to push on a head to some thing that actually works.


I had also road mapped a beta with a few more features then are currently ready to be released between Jan 2008 and June 2008 but it's more likely that I'll hit a 1.0 by June... hehe. So I'm both behind and ahead of my time goals. Software Schedules are not really some thing I believe in setting in stone, so much as setting a point on the calendar some where between when I expect to be done by and when I think it should be done by.


Since making use of SVN was not in my original plans I do have a bit to consider now.


I want to continue coding so I can keep the pace of development going. But I need to consider the chances of bugs being found in any one that actually tries the snapshot I released. And I do not want to muck with merging branches later if that happens... The stuff I released is not complete but it should be fairly stable, or I wouldn't have let it hit SVN >_>.


What I am thinking is to limit my self to continuing things in the trunk that need to be done without effecting the released code much. Which is copied to the tags directory so it's saved in SVN. Then after about a weak or so, go back to un-restrained work. So I can deal with things like redoing the NPM_DisplayDialog the way I would like to redo it.


Before I am willing to bump status to Beta, I want to have NPM able to update the ports tree (portsnap/cvsup/csup) and configure ports. I tested the config gui awhile back before taking the code to sourceforge but I never got it fully working. I need to figure out just how I am going to get a connection between checkboxes and options that I can parse back out of the GUI.


I should also make it look for stored configurations rather then just in the makefile.[0]. Those two things are really what I am interested in coding feature wise. I also want to remove the dependancy on psearch because it really is a simple app and we might get a slight performance boost.


I also want to fix the translation systems up a bit, work on another prototype of the NPM_MainWindow user interface style and do some concept art for NPM's configuration dialog. I don't expect a GUI way of changing NPM's settings to be released until RC status though.

Friday, January 18, 2008

NPM test 1, phase 1 results

I was a little disatisified with the phase 0 results. What I had done was checkout a copy of the sources onto the test machine end removed the diagnostic messages of echoing the command and arguments to be run in the background. A few oversites later namely a missing equals sign and the lack of --verbose switches (as can be seen in the video's uninstall segment) I basically got it working but not quite happy with it.

Sat down tonight after watching a movie and set to work on getting her working smoothly out of the source tree. After that was done and with a little poking at portupgrade later.... I ran a group of live tests to check for the 'it actually works' factor with the core things and got no show stoppers. The only bad things I can say is I don't care much for the port{upgrade,install} output dots and the occasional lag in updating the QTextEdit widget but it's probably no slower then doing it from my shell.

here is a copy of the last commit message from editing source code:

CODE PASSES FOLLOWING TEST CASES:

update package listing (right listview)
view pkg_info for selected package (xevil)
remove selected package (xevil)
search ports tree (for xevil)
install port (xevil)

xevil was selected because it is one of the ports I have installed that is a suitable test case (small, fast/easy to install/deinstall) and one of the time wasters I have setup that I can live without if I frag it on there install.


I'm going to upgrade the development status on source forge to Alpha shortly and tomorrow I hope to have a file release ready op, Most of what remains is logistics really, before the Alpha Release the following needs to be compelete:


0/ make demo video (I would write the script now if it was a quarter after 4am'ish) -- couldn't get mic working, just as well with my house...

1/ mini faq thingy uploaded to website and update the sites download page

2/ readme file generated with basic testing instructions blah blah -- also included a template for a desktop icon.

3/ update trunk/src/const.py NPM_VERSION - probably will get bumped to "0.48.Xa" ore "0.48.Xpre" and clean up some of the comments

4/ read SVN handbook on tagging and branching and put it to work - I want the alpha release split off the trunk.

5/ get file release prepared -- done and done!

6/ forum post typed up for forums.pcbsd.org - done

7/ get my ass back to coding -- what I should be doing lots of hehe.



Hooooooaaaaahhhhhhhhhhhhh !!! Now if I can get audio working in XVidCap and enough silence to do it with my crappy mic, this gonna be a nice start.

Sadly most of this is gonna have to wait until after dark...


fucking family already has given me a headache and it's only 1617 local..

Rush Hour

Today we got cable hooked back up on the bed room sets. Caught Rush Hour on, so finally some thing good on but it was also about the only dang thing on TV !!! A few months without cable and I ain't been missing much haha!

War, huh, yeah
What is it good for
Absolutely nothing
Uh-huh
War, huh, yeah
What is it good for
Absolutely nothing
Say it again, y'all

War, huh, good God
What is it good for
Absolutely nothing
Listen to me

Ohhh, war, I despise
Because it means destruction
Of innocent lives

War means tears
To thousands of mothers eyes
When their sons go to fight
And lose their lives

I said, war, huh
Good God, y'all
What is it good for
Absolutely nothing
Say it again

War, whoa, Lord
What is it good for
Absolutely nothing
Listen to me

War, it ain't nothing
But a heartbreaker
War, friend only to the undertaker
Ooooh, war
It's an enemy to all mankind
The point of war blows my mind
War has caused unrest
Within the younger generation
Induction then destruction
Who wants to die
Aaaaah, war-huh
Good God y'all
What is it good for
Absolutely nothing
Say it, say it, say it
War, huh
What is it good for
Absolutely nothing
Listen to me

War, huh, yeah
What is it good for
Absolutely nothing
Uh-huh
War, huh, yeah
What is it good for
Absolutely nothing
Say it again y'all
War, huh, good God
What is it good for
Absolutely nothing
Listen to me

War, it ain't nothing but a heartbreaker
War, it's got one friend
That's the undertaker
Ooooh, war, has shattered
Many a young mans dreams
Made him disabled, bitter and mean
Life is much to short and precious
To spend fighting wars these days
War can't give life
It can only take it away

Ooooh, war, huh
Good God y'all
What is it good for
Absolutely nothing
Say it again

War, whoa, Lord
What is it good for
Absolutely nothing
Listen to me

War, it ain't nothing but a heartbreaker
War, friend only to the undertaker
Peace, love and understanding
Tell me, is there no place for them today
They say we must fight to keep our freedom
But Lord knows there's got to be a better way

Ooooooh, war, huh
Good God y'all
What is it good for
You tell me
Say it, say it, say it, say it

War, huh
Good God y'all
What is it good for
Stand up and shout it
Nothing

-- Edwin Starr, War

Test 1, Phase 0

booted my test machine

set up for video taping

svn'd a copy of npm source

edited source to prepare for test

began test.


Not 100% what I wanted but this is the first live test of install and deinstall operations.


Video Sample

I tested doing a portinstall of xgalaga, confirmed it ran, and then removed it. The pkg_delete operations output left a little bit to be desired! But hey, it did work...

I want to prep a script and get the code ready for a small battery of live tests under real world conditions. Once the code is suitably able to pass an acceptible amount of the tests... Alpha release.


Before I video the next one through I want to have a properly written out and planned script to follow for the video. I also really would like to try and get my Mic working (not tested yet) so I could use voice over and some background music wouldn't hurt if it didn't add more then a few megabytes to the out file.


Currently tests will take the first priority and continuing feature implementation will take secondary until the Alpha release is ready op.


I want to triple check but I think I'll be able to host the video on the website for download and I can probably upload it to YouTube. Using rapidshare for this one was just to make it available (temporarily). The final one made for the alpha release will be much better.


My main concern though is getting NPM ready hehe.

Origins and Development of TOPS-20

Origins and Development of TOPS-20 by Dan Murphy -- the days reading and quite interesting.

Social Civics returns

I can't believe it, I forgot to do part of the test :-(


Got back 2 of the 6 or so tests I sent out, one with a score of 100% and the other with a 98% because I forgot to answer one of the questions lool.


*sighs* Oh well, I guess it's ok for how fast I tried to do them.

Thursday, January 17, 2008

...

Another night spent working on NPM...

Some of the stuff done to night

begin of internal docs

prepping files for translation (wrapping more strings, now using QKeySequence e.t.c.)

trying to get set up for translations (including the beginning of the German one).

rewriting the display dialog to remove usage of Qt Designer / pyuic generated code.

To be honest, I think I could run a live fire test tomorrow with a 2 minutes worth of changes.

How to bake Apple CPU's

http://www.cpushack.net/CookingAppleCPUs.html


Now that got my cracking up for the day xD

AMD Knocking me off the chair

The other day I bumped into an AMD K6 family processor and looked it up when I got home, when I read some thing about trasnlating to a RISC like instruction set I nearly fell off my chair... Today I looked up a little more. I would guess the K6 is probably up this ally as well.

RISC86 Microarchitecture

The Nx586 processor fully implements the industry standard x86 instruction set to be able to run the more than 50,000 applications now available. This implementation is accomplished through the use of NexGen's patented RISC86 microarchitecture. The innovative RISC86 approach dynamically translates x86 instructions into RISC86 instructions. These RISC86 instructions were specifically designed with direct support for the x86 architecture while obeying RISC performance principles. They are thus simpler and easier to execute than the complex x86 instructions. Note that this approach is fundamentally different than RISC processors, which have no support whatsoever for the x86 instruction set architecture. The RISC86 microarchitecture also contains many state-of-the-art computer science techniques to achieve very high performance, including register renaming, data forwarding, speculative execution, and out-of-order execution.

The benefits of this approach are several. First, the performance advantages of RISC design are applied to the x86 instruction set. Second, the execution unit can be smaller and more compact. Third, the execution units can be more specialized to give specific performance enhancements. Finally, it will be easier to add additional execution units in future designs. The RISC86 microarchitecture not only gives the Nx586 processor high performance today, but also allows for significantly higher performance in the future.

AMD Website, Nx586

cpu-info.com, Nx586
Spent most of yesterday being driven out of my fscking mind... Would have a better chance of surviving walking in front of an on coming 18-Wheeler then getting work done :\


Hopefully with an early start today, I mihgt be able to get stuff done before hell breaks lose again.

Tuesday, January 15, 2008

Neolious coding

Oh baby has tonight been a full head of steam. I've been slugging through the options systems and the subroutines for actually doing the installations. A mock up of the style #2 GUI which is one of the ones I posted back in december when I did three different concept drawings. She is almost ready for a live test, I think as soon as I correct the item selection code to work properly (not tied to mouse position) it will finally be time for that Alpha Release, two weeks later then originally planned but hey it's still is more feature complete on the inside then previously planned for it xD


Here is a screen shot of Neo running during a test run of the mock up from the trunk.

Free Image Hosting at www.ImageShack.us


I solved most of the layout issues and I think it will probably be playing with the spacers and splitters to finish the rest of getting it to 'look nice'. The main window is hand written but the display dialog is an extended sub-class of a prototype made in QT Designer.


What I am thinking is to have 3 drop-in modules each implementing the NPM_MainWindow class. Where each module implements one of the user interface styles and the programs init code loads the appropriate module. The advantage being the freedom to do any thing desired with the main window, while preserving the rest of things that have been done. Technically user created UI could be allowed to be loaded. I really want to play with the dock window stuff in Qt4... lol.


I need to start setting up the documentation (internal first, then the manual), ironing out the key commands, and setting up for the german translation in addition to my remaining to do's but all of that is non-critical as far as getting an experimental release out there. I think goal for Beta time would be getting the portsnap/csup/cvsup stuff sorted out and a settings + about + help dialog in the run. A better website design would be nice too... hahaha


I know what I can't figure out today, I can figure out in the days to come.


Hooah !

Monday, January 14, 2008

Nights labour

Spent most of the night working on the port searching code and options module. I think the options module is now almost like what I originally envisioned of it. Aside from being integrated into the not yet written settings dialog and no read/write accessor methods wrapping around the configuration dictionary keys.


So far across the various prototypes, tests, and mock ups I've written over 3,000 lines of code (wc -l *.py for each directory gives sums adding to >3700L). The way I work I guess is a bit heavy on files but it tests the hell out of things :-)

So far the current working system is almost 700 lines of Python code. Aside from not being very feature complete yet (for my tastes) I think it is coming along quite nicely and maybe should be marked higher then the pre-alpha status I set on sourceforge... But I guess I have higher expectations of my own work then I do others lol. The > 700 lines of code in the SVN now represents the work done in R&D by the previous coding. One thing I like about SVN and CVS as opposed to manually backing things up with cp/tar is there is no fear about 'accidentally' deleting files permanently before they serve their use hehe.


I'm hoping to soon have enough files for a quick snapshot that can handle the basic pkg_* commands and searching the local ports tree. I have tried to keep both the quality of the code and the programs design as high as possible at every phase but I don't really consider myself a good programmer. Just someone that knows what he wants and can wrap his head around it piece by piece until it all falls into place.


Hmm, why do I feel more like a Japanese Beaver then a Spider right now? Haha/

NPM Code List

A quick list of standing to do's so I can be sure I don't miss things, I really should look at using the tracker service on Source Forge for this hehe. But I'd rather spend my time writing the solutions ;-)


In no particular order:

  • extend QLineEdit -- done a different way (for now)
  • do concept drawings of settings dialog
  • integrate logger and options module
  • remove dependency on psearch -- it really is that simple a program!
  • fill in stubs for various port actions; install/upgrade/delete and prepair for various capabilities that need further development *wink* -- mostly done and evolving
  • ability to select items by means not tied to the mouse pointer location
  • consider a better name then port_viewer.py -- renamed pkgviwer.py
  • begin work on the ground work to begin the German translation
  • performance tests of our background process handling
  • mock up of NPM_MainWindow in style number 2 -- done, minor changes to go (mostly educational advancements
  • gui for cvsup/csup/portsnap operations
  • replace search box and refresh button with tool bar in mock up layout
  • tabbed about dialog, kde-style


S'all I can think of right now. I know I really need to look deeper into Qt's layout handling and widget geometry related facilities not to mention the coordinate system.

Sunday, January 13, 2008

Open Formats

After a little bit of research into the idea of recording my desktop to video for some tutorials I got to thinking. I expect this post will probably take a draft of an essay like feeling to it lol.


Some people are down right insane when it comes to the issue of open or closed in the software world, rightly so in some cases. The idea of which is ethically better MP3 or OGG is irrelevant to most people, they just want to listen to music.


When it comes to selecting or using a given file format for media I am generally indifferent to what it is in so far as it works without giving me headaches. I don't care if it is a .wmv or a .gnu as long as it does what I need it to do. And often the user-perspective is what prevails when people look at file formats, just as it should be.


However the world is not so nice. One thing I like about the Open Source side of the software world is often things are developer centric, users second. Although a great deal of software is done with users in mind - developers should come first in my humble opinion. Because without developers there is no software.


Open Formats are by definition open, you can do what ever you like with them. One reason that OGG has gotten to be as common as it is with Game Developers is because it is essentially free. Need to read OGG Vorbis files and play them as audio? BINGO You can code it, want to create them? BINGO You can code it. Want to create an MP3 Encoder and all hell breaks lose !!!


Because the creators of proprietary formats generally own the format they can do any thing they want. With the proper patent, copyright, and intellectual property protection... Company Foo could create the BAR format for handling audio or video files. What if Company Foo says "Gee, every one seems to be listing to music on .bar files." And decides you have to pay them $1 for every .bar file? Absurd but sadly it is not so far fetched in this wonderful age. Of course most people want their stuff to actually get used - that is one thing I tip my hat to the creator of the RAR Archive format. Any one can create a tool to extract .rar archive files and give it away for free, code included. But no one is basically allowed to do that with programs to create .rar files. Which I think is a fair compromise personally, any Joe can extract the .rar file but the programmer that owns the format gets to make some money off people wanting to create the files.


From the user perspective, who cares what the format is? You want to have the ability to read (listen/watch/extract) and write (create, encode, compress e.t.c.) files in a given format and without having to pay for software and bend to licensing terms just 'because' some one wants to control the format.


From a developer point of view put into users perspective... Developer Ham wants to create some thing to write .bar files out for a program he is using and wants to give away for free along with the code to do it. But Company Foo puts an end to it because they own the BAR format.


If all users were developers, they could create their own open formats -- heck already done ;-). Developers write the programs that end users use. Without users who don't code owning a format is useless because the customers being developers themselves could create their own open formats to share.


From a developer perspective, do you want to have to pay licensing fees to Company Foo to encode support for .bar files in your program whether or not you will be making money off your program? Using a different (free) format versus paying any thing they want to use .bar sounds like a good idea to me.



If there was 1 developer in the world and all the others were users, you could be a millionaire overnight or go flat broke selling closed software ;-)


(mutters enough rambling)


Generally for multi-media formats all I care is that it does it's job. Acceptable file size to content quality ratio - 200MB for life like quality of Audio and Video or 20MB for a pile of junk, gotta balance it for the task.

The one thing I do expect, is to be able to use the files fairly and without headaches. I don't have problems with .WMV files because they are very easy to play with the right codecs. Now trying to create and edit WMV files can some times be a different story :o)

Saturday, January 12, 2008

NPM_DisplayDialog

Spent most of the night watching Simpsons but I started work after awhile.


Worked on a compromise between the pkg_info/pkg_delete display needing to pass on the software packages name to be operated on to the appropriate slot and my own code minded need to place the actual implementations of those slots in its own file along side other port-related actions. I also removed the hidden column since I realized I already had a method to cram the spitted name and version back together and store it in an instance variable for passing on.


The internal QAction object for each entry in the context menu has it's connect() signal connected to a python slot. Since we need to know what was activated (and I am not a genius with context menus in QT3) when the action is activated the slot calls an external function (the real slot if you like) with the name of the selected package.

So right clicking the package in the list brings up the context menu, which saves a reference to the item selected; suitable for running the pkg_delete/info commands on directly. When selecting the action to perform from the context menu, it causes the activated() signal to be sent to the wrapper slots for that action. Which intern call the implementations from another file with the item/package name that was set by displaying the context menu.


There might be a better way of doing it but I ain't found it yet. And personally I am one that prefers to try the simplest solutions to a problem first and see if they work before complicating things. And this way of doing it is quite simple, at least to my brain cells.


I also skipped using the poor looking mockup of a display area I wrote to pack the output of running a command, such as make into a window for display. The mockup was based on a translation to Python I did of a C++ Example from QT3. It worked but did not look very nice and although I prefer to hand-code things when it's not to major because it normally ends with me knowing WTF is going on. I fired up QT Designer and used it to create a simple Dialog with buttons I can edit into what I want and spend time getting it to do what I want rather then look nice.


Generated the python version of an ui.h file from it and wrote a subclass of it that modifies it (for testing at this point) and extends it with the extra functionality we want, being able to run the requested process and display it's output. So far I am enjoying this and because the .ui files created by QT Designer is just a custom XML format, it is easy to edit by hand as well as through Designer (A GUI for making a GUI the easy way). Later on the subclass from the ui.py file might get replaced with a handwritten equivalent but I'll worry about that later.


Some standing issues are:

0/ Define usage style for the Display Dialog while it 'runs' including changes to the options sub-system as needed.

1/ Set up the pkg_delete / pkg_info handlers to use it for displaying their output.

2/ (later) figure out how we can get the Dialog to display properly when resized, namely having the buttons and display widget resize with the window !


The above 3 items are what I would be doing tonight, if tonight was not really this morning because it is after 0500 in the local morning !!!!!!!!!!!!!!!!


The sad thing is I am hungry and wide awake but not sleepy in the least. I guess programming for a couple hours has that effect =/


Man, I love to code...

Anniversary

Today, well really yesterday since it is now 0438 local... Was my parents wedding anniversary, number 20 I think. It's also the day my Father died... guess that would be 1989-01-12 for a date: I was born 1988-06-20.


So needless to say, it is not a very happy day in my family...
Well, after quite some deliberation, I made my decision last night: I will not resign from the [SAS]. Irregardless of what comes next, I can't walk away from [SAS] so easily; any more then I could walk away from the love of my life (It's often been my point of view, that if I could put up with this much shit from SAS, if I got married, my wife would never have to worry about me leaving her -- hence the reference lol). By all the probabilities that can be weighed, I'm more or less expecting to be let down by my commanders this time around, but hoping GCHQ still proves me right in the long run. That issue resolved, I guess I can [digitally] burn my prelude to resignation letter (unsent) and move onto the other sectors of my life; which do need some dedicated thought. If I can invoke such methodically precise thoughts on tactical matters, and in programming issues, why not put the brain towards improving life?

Camera film

The family camera is old, well at least 15++ years I would say since we had it when I was little and my memory goes back till when I was about 4 years old! The Camera I got some years in between is essentially a cheaper version of the same; Finally found out that it uses 110 Film. I remember the rolls well, this is actually reminds me of the Beta C-Mags in shape.

110 Film rolls


As 135 Film became more common we gradually took less pictures as the probability of the films extinction happening before we could afford a new camera. Personally I would like a Digital Camera.. Some thing of fair price to performance but I'm not sure if any of my machines card readers are supported by FreeBSD 0.o

svn commit vs straight jackets

Made a bombing run across the code for wrapping pkg_info, the stuff to right click a program and delete it is still mock-up. But I've fixed the display of programs. Before when I had initially written it back in December I used a mish-mash of operations on links and arrays to rip off the version # and description from pkg_info's output because I didn't have time to learn Pythons Regular Expressions. Which of course I had to learn the regular expressions module like 2 weeks later but I never had time to revisit that.


I converted it to use regular expressions so it can solve the known issue that some of the entries displayed in the names and versions columns would be 'cut' wrongly. An exception handler was there to report any ones that failed the operation (and would display wrong). Because of the change to regular expressions that's fixed and the exception handlers are mostly there to catch any errors I might make before the file grows more mature.

I've also tried to adjusted it so that a non displayed column is used to hold a complete reference to the programs name-version suitable to use plg_delete on. For the sake of those that don't know what prog-foo installed does I should add a column between it and the versions that will display the short descriptions given by pkg_info; minor change.


I imported about 1/3 to 2/4 of my most stable files into the SVN Repository. And I think I can import most of the others in the testing/alpha2 directory. Before starting t his move to SVN. What I did was create stubs in my ~/code/Python/src/neo directory. And make a testing directory there for scratch tests and things because I still had many modules in Pythons standard library to learn and knew zilch about Qt programming.

The Alpha1 directory was made as a place to start compiling code that could begin to form the basis of an Alpha release. The Alpha2 directory was forked off from the Alpha1 directory to build more quality to it and iron out more ideas. I still personally consider NPM as pre-alpha because it has yet to be made a full program beyond the near complete mockup in the Alpha1 directory.


For the SVN Repository, code is being taken from the Alpha2 directory on the laptop and imported into the trunk. My intention is to make use of the branching/tagging features to prepare an alpha release from the current code when it is ready. So there is no need to use the directory structure I was using before SVN, because this is Subversion versioning system ;-)

Ma kindly reminded me that it was after 0500 in tbe morning so I didn't take time to finish work on the file before commit, it is still improving though. The only thing that pisses me off is I spent about 10 hours yesterday working on NPM after getting home from work. Between the website and the program code the first 5 hours were almost a washout, the 2nd 5 hours were like 20 * more productive then the first -- Oh what difference there is between starting at 1500 and starting at 2400 here...

Friday, January 11, 2008

Neonic adventure

NPM now has a website set up. It is pretty basic and 2 files plus a stylesheet but gets the job done for now.

I want to see what I can do with the server side scripting so I could move the links menu, header, and footer into their own files to be inserted into the target page. I considered setting up a bare-bones install of a content management system since there is a MySQL database and 100mb storage allowed.


I ruled it out throuhg because the majority of it would just sit unused and that is at least 50MB of files for most CMS's I've bumped into. While I do have experience with the software we use on [SAS] that does not mena I like it, I don't think there is a CMS that I would want to use unless there was going to be enough volume of work to warrent it. I tried several demos of various PHP based CMS systems online, Drupal, Typo, Joomla, Xaraya, eZ Publish, e.t.c. I didn't partictually like any of them but Xarya and Ez Publish looked quite nice but still overkill for this.


I also began checking in some of the more complete modules from NPM into the code repository on source forge.


As far as the web site goes, the only major additions I have planned for the near future is a planned features page, contact form, adding a link to my blog from page 2, and a note on fetching the sources from the svn. I also would like to get a mailing list setup.


My only complanit so far, it took me 6 hours to create the website -- most of it done when my family was finally 'out of the house' for awhile, and all in all the job should have taken less then 45 minutes for me... That is how much damage constant interuptions, dogs barking, birds screaming like hell, fetch this and thats, phones ringing, peoples TV's blasting my ear drums away, and the other general commotion going on in this rat-hole causes... Trying to work here is like pulling a fat man through the eye of a needle unless everyone here but me is sound asleep...

*sighs* is it any wonder I'm awake until I pass out from lack of sleep when I've got 'work' todo?

KDE4 goes gold !

http://www.kde.org/announcements/4.0/

This is awesome !!! I can't wait to give it a go without LiveCD :-)


The new Okular document viewer and Phonon multimedia framework are big interests for me. Oh baby is it gonna be a sweet road to KDE5 ;-)

Thursday, January 10, 2008

Todays live ops and my history

Todays live op went s'ok, a bit sticky at first getting every thing organized. Every thing went quite well other then Chester getting killed on the first floor.... We cleared room by room and it was ok until Duke and Lake went down on the fourth floor.. I was the last smoe still in one piece and that only lasted until about 2 stair wells down.

I saw the tango make as if to flee, so instead of using my last stinger I leaned out to fire... BUt instead of kicking out the door and running away as Tangos usually do in S4 when they flee. He shot me through the metal railing with an MP5, you could hear the bullets blink off it haha. Second time I've gotten 'stung' for being so stupid lately... Next time I just call up the tac aids.


I think this is about the dozen'th live op I've set up, I know there are 2 Live Ops on the site I've yet to do. Went through and compiled a summery of my own live op history. Kind of nice to be able to review my record... Usually if I look into live op history it's because of compiling peoples service records.


live op name (position if noted/remembered). All the ones I created include (TOC) in the position notes. The rest I only participated in. The creators of the various live ops vary between James, Myself, En4cer, Wiz, Noer, Rasa, Sniper, Lake, and Yuke I think.

My live op history:

747 Hostage Rescue (Sniper+Blue 2)
CP Peaks
Operation Black Gold (EL)
Codename Deep Water (Red 2)
Arctic Recon (TOC)
Fallen Angel (EL)
Mogadishu Mile (EL)
Hostage Rescue (Red 2)
Save the Prince (Independant Tech+TOC)
IRA Sting (TOC+Sniper)
Codename: Legal Eagle (Red 1)
Operation Drug Lab (Red 1)
Operation Nightlance (EL)
Dockside Dragons (TOC)
Bavarian Bandits (TOC+Spotter)
Operation Amazon Assault (Sniper)
Operation Blizzard Assault
Street Sweep (Red 2)
Highland Prison (EL+TOC)
Hunting Klaus: Island Fury (Red 2+TOC)
Hunting Klaus: Safe House (Sniper+TOC)
Hunting Klaus: Trial by Fire (TOC)
Operation: Avenue Sweep
Creeping Death Part I (Blue 2)
Hacks and Daggers (TOC+Blue 2)
Operation Worst X-Mas (EL)
London Library Under Seige (Blue 1+TOC)


I think Iw as downed in about 12 of them :-( As I usally remember after a successful live op, "At least this time I didn't get shot in the tookus" lool. The 747 op was actually my very first. Cobra was EL and James was conducting, we had two assault teams. One would be blasting in from the main hatch; the other from the lower access way. Cobra and I with PSG-1 rifle and P228 pistol in hand paved the way to the jet and secured the cargo hold before taking up the 3rd aslt position from the lower-access ladders.

Recon was the only one to survive the assault, while most of us lived a fair way through it. The graphics card intense siege and tangos sliding between chairs eventually caused a lot of causties. He managed to get the pilot out and hunt down the Co-Pilot in the next building saving the day.


Most of the other Live Ops I was in gave me a good chance to enjoy live ops, although I don't consider most of my participations successful because in most, win or fail, survival or KiA, I usually got shot up one way or the other... I remember Noer's Mogadishu Mile live op, I was EL and we lost 2 people very quickly. It ended with Me and Lazko as the last men standing, bleeding to death if you noted our health bars, and a handful of bullets left between us! Think he had an M4 and I had a Sniper Rifle + Glock about to go dry. A lot of guys have made live ops over 30 since I joined [SAS], more then I've been able to participate in lol.


Arctic Recon, Save the Prince, IRA Sting, Dockside Dragons, Bavarian Bandits, Highland Prison, and the three Hunting Klaus live ops: Island Fury, Safe House, Trial by Fire were all apart of my live campaign and have inter connected stories. I conducted them and tried to avoid being in the Element. That reminds me Operation Vengeance, the 3-part finally still needs to be launched !! The only thing holding it up is finding a sound-clip to mix in for an Air Strike.


Hacks and Daggers and London Library Under Siege were two live ops I just had an itch to do one and went out and made them. The others were mostly planned... I always try to be helpful to my fellow members when they are doing a LO because I've done enough on both ends of the pond to know a fair bit lol.


Live Ops are one of the things I love about [SAS], you get a map, a mission, and one chance to save the day -- which will it be?


Most of the live ops I created were successful and when they were not, usually a grade A disaster!


I think some thing most of my peers don't know is that in real life, big special forces operations can and probably often fail just as often as they succeed. I never have really paid attention to our track-record as a team because the records only go back so far into our history, [SAS] was founded in ~2001 after all. I do have fairly detailed records for the live ops I've done for the live campaign though.

Engel Aus Kristall

Very good performance.

Video

Lyrics

Wednesday, January 9, 2008

NPM ? SVN : SF

Registored for an account on Source Forge today and set up a project there for NPM.

My primary goal at the moment is the website because managing the source code on my laptop is no real problem, you could say I'm my own revision control system.


I'm planning on putting Source Forges project SVN Repository to work soon though. I am some what familiar with CVS, I've used it in the past but I'm not fond of it. Like emacs my relationship with CVS is a case of being able to live with it but not partial to it.


So in accordance with how much I have had to learn in getting this project a moving, I've elected to study a bit about using SVN. Heck, I havn't used C++ in ages, I even hated the Python tutorials and never found the time to learn GUI toolkits besides (old version of) Java's AWT. I also had to do a fair bit of hide and seek throughout the ports system internals. So I may as well learn a new versioning control system while I'm at it.

Hmm, busy busy busy time ! I'd love to get a micro-website and an alpha release sorted out this month.


NOTE TO SELF: Upload map for tomorrows live op tonight!

Tuesday, January 8, 2008

Jurassic Unix ?

Ahh finally a little bit of rest. Been watching Jurassic Park one of my favorite movies you could say. Man it's been a long time since I have gotten to see it. I still remember when it came out like it was yesterday, my GOD Mother said I shouldn't see it because of the violence and gore or some thing (I didn't notice any). I couldn't have been older then 5 or 6 at the time. I don't really consider JP violent or any thing but then again movies like Jurassic Park, Terminator 2, and Aliens were all movies I grew up with. Yeah so what if I was a weird kid :-P


I've always loved Dinosaurs so I guess it's no wonder I love the Jurassic Park films, especially part one. It's a shame really, they took every possible precaution and I'm sure their must have been multiply redundant power supplies... But they only thing they failed to consider was betrayal from the inside.. Fat stooge couldn't even drive would a darn and brought down the parks systems with a command hidden within a system of over 2 million lines of code (that's big).

What shocked me, is I wondered when watching it tonight what kind of computers they were using, couldn't tell from the camera shots of the monitors. But towards the end when the girl Lex is trying to enable the door-locks while Grant and Ellie hold off the Raptor. When she sits at the computer:

"It's a UNIX system, I know this.."


So I guess it is probable that Jurassic Park was supposed to have been powered by Unix workstations, interestingly for some thing that started life in the 1970's Unix lives on in a number of incarnations today, including FreeBSD :-)


I remember thinking too, that the graphical file browser Lex uses in the movie is actually similar to a program I've seen before in the real world. The difference is, the real one looks a lot better graphically then the one in Jurassic Park but I doubt it has as many features as the movies FX hehe. But hey, the movie was made in the early 90's for a largely Computer unaware audience :\


Ahh, now to slither up some code for the night.

Saturday, January 5, 2008

Holy glockomoly.... LaTeX makes XHTML look hard and that was a cake walk.

for the software,


pkg_add -r latex2e

Which of course fetches tex. Then I installed print/dvips via ports since there was no package on the mirror. Then I did a pkg_add -r of dvips2ascii because I'd like to setup my vimrc file for viewing files, since it already can handle pdf's hehe.


So far the only bad thing that seems to come in mind about working directly in LaTeX is having to define \label{} on elements that we want to \ref{} later


latex handles the *.tex files written and makes the *.dvi, which dvips can turn into *.ps (PostScript), I think dvipdf requires dvips to work right not sure.

So essentially from LaTeX sources a lot of formats can be generated, while allowing a very easy writing experience in the comfort of ones favorite editing application.

ToDo: LaTeX

LaTeX: from quick and dirty to style and finesse

Small LaTeX Tutorial



Learning TeX was on my to do list many moons ago but more or less fail off the chopping block because when I 'need' printed files that go beyond pure text I'll usually use Vim to write up a quick doc using (X)HTML and CSS. Because I'd rather write a web page for printing then use a word processor.... MS Word, SWriter, KWord, Abiword, bah humbug -- piles of crap.


LaTeX shouldn't be to bad a starting point, I'm not sure if there is much documentation left for plain ol'TeX yet (also on the todo list).


I did try Lyx in the last and even TeXmacs (which does not use TeX but can export to TeX/LaTeX)... But like WYSIWYG HTML Editors (Nvu, Dreamweaver e.t.c.) I ruled them out as paper weights.


When I tried to learn Vim, I refused to use the GUI (gvim) and used it in console mode only... Couldn't even figure out how to save a file at first and I dumped it for XEmacs. Sure enough some day I went back and learned Vim, *my way* in console mode and it's like my arm or a foot... not a crutche but a tool.


The difference between a tool and a crutch, is a tool helps you get work done. A crutch is an excuse not to learn how to do the work. Whether WYSIWYG programs become tools or crutches are a matter of the end users future.


So it is much the same that I would prefer to learn Tex / LaTeX through code not through 'easy' interfaces. I learned XHTML and CSS because I was bored one day and decided I'm sitting down and learning to write a web page, I just hit W3C and the road laid before me.

Thursday, January 3, 2008

Console makeover



A little play testing hehehe I think I like my laptop :-)

Tactical Gloves

http://minhasgloves.trustpass.alibaba.com/product/11927433/Combat_Assault_Glove_Military_OPS_Gloves/showimg.html


recommended by radical ghost for use with sas skin

Wednesday, January 2, 2008

Ambushed

So freaking tired...


A thousand and one interuptions, annoyances, and aggrivations later...


3 of my exams are 'almost' ready to be mailed, one Q left to answer on the last one.

And a prototype of the new searchlet module grows a menu bar and context menu; I'm testing to see how to set it up that one can select a given port from the list and choose to install/e.t.c. from the menu. Progress is only limited by time constraints (e.g. the till I pass out limit and people driving my batty all day problem).

Great progress but so freaking tired... family should help getting school done not hinder it and every thing else if you ask me...


The battle continues even if they make it an uphill one.
Some how it figures... I try to work during the afternoon and I end up with a splitin headache... that is my family for ya !

Tuesday, January 1, 2008

Blitzkrieg on homework.

In the past hour I've almost completed 3 exams in my 'home work' stack. Tomorrow I need to finish them, I just need to dig into my text books to look up a reference.


Yesterday I had 2 finished and sent them out this morning.


I might not make it to a Diploma, but hell I am not going out without a fight ;-)

The charge

The fire is lit,

like a bull seeing red,

it's feet ready to charge,

the obstacles that lay ahead,

will give way to,

the horn of my desire,

crash the gates, let the

fires burn as I charge,

the fire is lit,

oh how hot it burns.


The fire is lit,

nothing to stand in the way,

like a bull seeing red,

it's feet ready to charge,

the gates begin to fall,

my desire knows no relent,

as the obstacles disappear,

the fires burn,

oh so hot do they burn,

one by one, the objectives

shall be complete.

-- Me, on the course to completing my education