Sunday, March 25, 2007

Vs

Hmm, what a day.

Ironed out a few more things with my work in the SNCO Project.

Fire & Movement -> Submited
Rules of Engagment -> Submited
Breaching -> Fixing (post submited)
Stacking -> Converted (post submited)
Tactical Aids -> Working
Reloading Drill -> Submited + Tweaked & Resubmited
Equippment Loadouts -> Completed, not submited

Made changes to En4cers changes on basic training, submitted it back to him but no word yet. Maybe I should send it to Rouge since its technically supposed to go through the RSM then to GCHQ. No idea what En4cer is doing these days.... Feeling is mutal I'm sure.

Can't really complete every thing on Room Clearing at the moment (En4cer) and I have little interest in the Planning & Leading one. Although that one might be able to stand as is hehe (y).


Spent most of the day on holiday after finishing some work on it. Joined Lazko & Ranger for some 2 on 1 on a super small map. Abiliterated them using the 40mm and mixing my kit around. Never really they knew what I was going to do, other then strike.

After wards joined Random/Lazko for a game, Random I soon found. Was much to seasoned a cat to fall prey to a Spider. Just as I was a bit to expirenced for Lazko & Ranger to have to much a head start. Since they were very fair and didn't spawn rape much.

Eventually got into a baton war hehe. That blighters the fastest reloading weapon in the game I bet.

Friday, March 23, 2007

I could swear... trying to do any thing in this freaking place. Is harder then trying to have sex with a woman a football fields length away !

I'm sick and tire dof having to do things in the dead of night just to be able to fucking hear my self think.

Monday, March 19, 2007

Evil to do lists

Front burner...

  • Do my home work (ARRGGH)
  • Shift threw the admin to do list
  • Do some home work on the admin matter I'm all ready 'dealing with'
  • Do my moms data entry work (oh joy)
  • Work on my (software) backup plans

Back burner...

  • Finish work in the SNCO project
  • Set up Samba
  • Set up PF, the OpenBSD Packet Filter firewall
  • Finish my private reading (I love books... never get to read'em any more)


edit later as needed.

Diff and Patch

Tests have shown, that using diff to create a patch file and using the patch file to patch the origenal. Have been largly successful so long as the origenal has not been edited since the diff was made.

TDL

Remember to put DD_Snip on the TS list.
Notes

archive: pax -wf archive /what
append to archive: pax -waf archive /more
unpack: pax -rf archive # unpacks in current directory
list: pax -f archive | $PAGER

the -z option adds gzip compression as with tar.

Also the -i and -v options work as per convention.

exclude file with the -c 'file' command or only file with -n 'file'. Like:

pax -rf archive -c 'ignoreme' && pax -rf archive -n 'onlyme'

gzip -# works well for the archives, where # is 0-9 low-high compression.

Quotes

Hehe I think these rock

    * "Unix is simple. It just takes a genius to understand its simplicity." – Dennis Ritchie
    * "UNIX was not designed to stop its users from doing stupid things, as that would also stop them from doing clever things." – Doug Gwyn
    * "Unix never says 'please'." – Rob Pike
    * "Unix is user-friendly. It just isn't promiscuous about which users it's friendly with." – Steven King
    * "Those who don't understand UNIX are condemned to reinvent it, poorly." – Henry Spencer

The funny thing, is th last one is true in a way lol.

Sunday, March 18, 2007

back up war

http://www.phenix.bnl.gov/~purschke/RescueCD/
http://www.cpqlinux.com/ddbackup.html

Some good links for later :-)

*wink*

Friday, March 16, 2007

$MYVIMRC

My current ~/.vimrc file. The {{{ & }}} mark the locations of folds, I elected to ues folding marks for my rc file. And when I have time to read how, I probably will set it to allow sectional jumping.

In short form, the file ensures that Vim does not read my .exrc file, does not try to be strictly vi compatible. Auto reads changes to files, keeps files at 80 char width (see tw), make for a more comfortable movement pattern near EOL. Yank into the clipboard, enable syntax folding on new files (my preference for sources), DOS EOL for new .txt files. Set somes sizes, enable my 'HUD' ^_^, turn on a nice colour scheme, and syntax highlighting. Set fonts, and a few useful keymaps. :help <option> generally works for looking things up in the manual (help can be shortened to he. with no sexist intent.)

"Terry M. P***** personal vimrc file

" vim: set ts=6 sw=6 expandtab foldmethod=marker foldcolumn=1 foldlevelstart=99:
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"    WARNING !!! 
" This file must have UNIX end of lines to avoid errors when starting
" under unix. Use the pdos2unix and punix2dos sh scripts to convert or
"
" perl -p -e 's/\n/\r\n/' inputfile > outputfile  # UNIX to DOS
" perl -p -e 's/\r\n/\n/' inputfile > outputfile  # DOS to UNIX
"
" on the command line
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Abstract
"
" Editing Preferences - set options related to editing tasks
" User Interface Preferences - set options related to appearance
" Keybinds & Commands - mappings / created 


"""""""""""""""""""""""""""""""
"Editing Options {{{
"""""""""""""""""""""""""""""""

"Don't be VI compatible - Keep this at top of file !
set nocompatible
set noexrc

"automatic re-reading of changed open files
set autoread


"ingore case when searching
set ignorecase

" Use the system clipboard as the default register
set clipboard=unnamed

"Buffer related {{{
"Allow backspacing over everything in insert mode
set backspace=indent,eol,start
"Allow to go one space past EOL
set virtualedit=onemore
"Allow left/right movement at EOL to move to start of next line
set whichwrap=hl<>
"Wrap text at n chars with a line break
set textwidth=80
"set wrap
set linebreak

"Folding
if has("gui_running")
      set foldmethod=manual
      set foldcolumn=0
else
      "Use sytanx folding in console mode
      autocmd BufNewFile,BufRead *set foldmethod=syntax foldcolumn=1
endif

"}}}

"Size stuff {{{
"Tab length and shift lengths
set tabstop=8
set shiftwidth=4

"Set min # of spaces for numberwidth. It grows as needed
set numberwidth=2

"Set tab menu 0=never, 1=when more then one, 2=always
set showtabline=1

" Start with folds open
set foldlevelstart=99

"}}}

"File related {{{

"Set prefered line file formats
set ffs=unix,dos,mac
"Enable filetype detection
filetype on
"Turn off ft plugin and indent
filetype plugin off
filetype indent off

" Create new.txt files notepad ready
autocmd BufNewFile *.txt set ff=dos

"Enable syntax highlighting
if &t_Co > 2 || has("gui_running")
      syntax on
endif

" Highlight strings inside C comments
"let c_comment_strings=1


"}}}

" }}}
"""""""""""""""""""""""""""""""
" Keybindings {{{
"""""""""""""""""""""""""""""""

"Maps {{{

"Use the ";" as a duplicate of ":" makes life so much easier
"for some odd reason it cannot be followed with a comment on it's line!
:nma ; :

"F1 turns on spellchecking in current buffer
map  :setlocal spell spelllang=en_us

"F2 turn on line numbering
map  :set number

"F3 turn on self indenting magic
map  :set smartindent autoindent

"F10 rids us of ^M after carriage returns
map  :%s// /g

"}}}

"}}} 
"""""""""""""""""""""""""""""""
"User Interface Options {{{
"""""""""""""""""""""""""""""""

"Always show the status bar with file name e.t.c.
set laststatus=2
"Show %of file in statusbar
set ruler 

"Command line completion lists possible matches
set wildmode=list:full

"Start with mouse support
set mouse=a
"Hide the mouse when typing text
set mousehide 

" Dependant on GUI on/off {{{
if has ("gui_running") 
      "Set colo and options
      colorscheme denim
      " Set 'go' to:
      "autoselect, console dialogs, tabpages, icon, menubar, show grey menu
      "items, tearoff menu items, Toolbar, always right scrollbar.
      set guioptions=aceimgtTr

      "Make pointer an I-Beam in insert mode
      set mouseshape=i:beam
      "for spellchecking
      set mousemodel=popup_setpos
      "set cmd line size
      set cmdheight=2

      "Set windows specifics
      if has("win32")
            "Windows font
            set guifont=Fixedsys:h7:cANSI
      "Set x11 specifics
      elseif has("x11")
            set guifont=Fixed\ Semi-Condensed\ 13 
            set columns=80
            set lines=35
      endif
else
      "set colors for terminal
      colo advantage
      "set cmd line size
      set cmdheight=1
endif

"}}}

" }}}

Thursday, March 15, 2007

Memo 2 Self

Ask Wiz what happened with those icons.

OpenBSD

The day before yesterday I backed up Vectra, /kolab, /etc, /usr/local/etc. And reformatted the computer and installed OpenBSD 4.0.

http://www.openbsd.org/

The worlds most secure OS, with only two remote holes in the default install found in over 10 years. And a heck of a lot of looking !!!

With out a doubt, this is the easiest to install OS I have ever worked with. I downloaded floppy40.fs from one of the FTP Mirrors. There are 40, 40A, and 40B. For most 'Desktop', 'Server', and 'Laptop' hardware sets respectfully.

I put one of my 3.5" Stiffies in floppy disk drive #1 (/dev/fd0). Formated the disk and did a byte exact copy with the dd command.

Vectra# fdformat /dev/fd0
  Format 1440K floppy `/dev/fd0'? (y/n): y
  Processing VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV done.
Vectra# dd if=floppy40.fs of=/dev/rfd0c bs=32k
Vectra# cmp /dev/fd0 floppy40.fs
Vectra#

As per the OpenBSD documentation I used the compare utility to make sure I had a clean disk. Gotta remember about ol'cmp(1) hehe.

I ejected the disk and labeled it, 'OpenBSD 4.0 Floppy40.fs'. Reinserted it and rebooted my computer. (After swapping monitors and keyboards).

The PC booted off the stiff disk, giving me a boot> prompt. Very sweetly I could use 'ls' to see what was on the disk, boot and bsd. Knowing that bsd was the kernel (from reading tfm) I booted it.

boot> boot bsd

Of course it will auto loaded the kernel into memory if you let it sit for a few seconds. Afterwards it asked for an install, upgrade, or shell prompt. I could have used a CD-ROM, but for just making a boot disk with an installer I felt it was kind of wasteful. Especially when Vectra is the only _personal_ computer I have /w a floppy drive. Ma's has one but she'd freak if her PC booted to a getty prompt !

The installer reminds me some what of Slackware GNU/Linux's way of asking which kernel to boot. But for the whole installer xD. I'm sorry to say that OpenBSD, while being the easiest to install OS I have _ever_ seen. Is not for the faint of heart to install !

The installer asked me for a terminal type, defaulting to vt220. I'm not really very smart about the old terminals having never used one. But the internet helps. The vt220 came with a LK201 keyboard with a layout close enough to the modern US Standard keyboard layout for my tastes. The only sad thing is that one cannot press scroll lock and page back to read stuff that flew by. At least on my system so, I'd recommend having the manual handy during partitioning.



The installer prompted for a kbd map, I took the default 'us' layout.

Welcome to the OpenBSD/i386 4.0 install program.

  This program will help you install OpenBSD in a simple and rational way. At
  any prompt except password prompts you can run a shell command by typing
  '!foo', or escape to a shell by typing '!'. Default answers are shown in []'s
  and are selected by pressing RETURN. At any time you can exit this program by
  pressing Control-C and then RETURN, but quitting during an install can leave
  your system in an inconsistent state.

  Specify terminal type: [vt220] 
  kbd(8) mapping? ('L' for list) [none]

OpenBSD even supports using a serial console with a little hanky panky. One of the things, that in my opinion was very professional and a great change. It asked me _if_ I had a backup of my data. Normally (in my exp) you only get a warning about how dangerous it can be to any data on disk (which of course OpenBSD did). We then proceeded into the partitioning phase.

It listed the available disks (wd0) and asked for the root disk. I was prompted to use all of the disk or (default) not to use the whole disk for BSD. Being a dedicated machine, I wanted the whole disk used. If you want to multi-boot or make multiple slices (primary partitions) you'll need to elect for a fdisking nightmare. Generally OpenBSD supports disks up to one Terrabyte, thats about 1,000,000 MB. Wwell, not really but close enough and easier to remember :-P. I chose to use the whole disk, so I was allowed to skip fdisk and go on to disklabel maker 9.0 pro.

I must warn ya, the fdisk/disklabel software has not advanced much in terms of interface. Since the ex(1) line editor was mans best friend. FYI, vi is a 'visual' interface to the 'extended' editor :-)

I created a group of bsd partitions in my slice, following the suggestions most of the time.

From my installed system:
Terry@vectra-$ df -h
Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/wd0a      147M   28.0M    112M    20%    /
/dev/wd0h      393M    628K    372M     0%    /home
/dev/wd0d     98.3M    2.0K   93.4M     0%    /tmp
/dev/wd0g      6.7G    426M    5.9G     7%    /usr
/dev/wd0e      148M    5.8M    135M     4%    /var

One can set the offset, size, FS Type, and mount point when adding a new partition. Very lucky for me, it was smart enough to find the offset itself. I don't really like working in cylinders so I was pleased to be able to specify the size in a more friendly manor. Such as 150M for 150 Megabytes :-)

The file system type is '4.2BSD" or swap. wd0a and wd0b default to the root / partition and swap partitions respectfully. Also the wd0c refers to the _entire_ slice (primary partition). When done, I wrote the label and exited. It prompted me to confirm the mount points, kind of handy. After confirming my 5 mount points I issued a 'done'.

Yet again, it wanted me to confirm that I wanted to continue with the formating. It auto formated each partition in the label and took me to the configuration phase.


I have never seen such a simple configuration phase, all it really amounts to is setting up enough data for the machine to attach to the network, or at least use the 'hostname' command. I set the short hostname when prompted to 'vectra'. I then had a boolean problem, do I configure the network or not? Since I don't see any point in waiting till first boot or chrooting after install and doing it before first boot. I decided to set up the network settings. Be warned, the only text editor you have to work with is ed(1). I really hate ed, but its a good little editor when you think about how tight the space is on a 1.44MB boot disk.

I set up my 3Com ethernet NIC (xl0) using DHCP, when prompted and worked the following.

  DNS domain name? (e.g. 'bar.com') [my.domain] my.domain
  DNS nameserver? (IP address or 'none') [my name servers] Enter
  Use the nameserver now? [yes] yeskbd>
  Default route? (IP address, 'dhcp' or 'none') [dhcp] dhcp
  Edit hosts with ed? [no] Enter
  Do you want to do any manual network configuration? [no] yes

A very nice set up, I then used the shell and ed to take a look at my network configuration, all was right. After exiting the shell, I was ordered to set roots password. That completed the configuration phase ! Yeah thats it, all you really have to set up is enough to get a network connection and a password for root.

Not having been able to afford a disk set, when prompted for the install media (i386 supports cd, disk, ftp, and http). I took up an ftp install, electing _not_ to setup ftp/http proxy connection details. As I do not have one to worry about when doing this stuff ^_^

I installed using the ftp.openbsd.org mirror with the default package sets. Be warned it does take a little while for it to connect to the server and let you choose packages. The required are:

  • bsd - The Kernel
  • base40.tgz - The base system (think /bin:/sbin:/usr/bin:/usr/sbin e.t.c)
  • * bsd.mp - Multi-processor (SMP) kernel (only some platforms) * bsd.rd - RAM disk kernel
  • etc40.tgz - System Configuration files (/etc)

The other packages are: comp40, development tools (gcc, headers, libs e.t.c.), man40 (man pages), misc40 (extra docs), games40 (simple games), and a slew of x* packages required for using the X Windows System. Being intended for a SMB/NTP/Print server, I don't need an X Server eating my 8GB disk.


The system fetched and installed each package I selected from the ftp mirror and took me to the 'startup' phase. Where I could adjust settings related to what would turn on automatically at boot. Namely.

Do I want SSHD (default yes), my LAN requires this since I can't get a KVM switch.

Do I want NTPD (default no), I want vectra to be a time server for my lan.

Do I expect to run X (default no), which if yes would tune a few things to make the XxX life easier.

Should the default console be com0, *nix starts numbers at 0, so BSDs com0 is DOS/Winsucks com1 !

And a would've been nicer to ask during configuration: Time Zone setup. I elected for 'Zulu' time. I don't use local time for much, and try to use UTC when ever I can.

A little BSD Magic and vola

CONGRATULATIONS! Your OpenBSD install has been successfully completed!
  To boot the new system, enter halt at the command prompt. Once the
  system has halted, reset the machine and boot from the disk.

The manual did mention chroot'ing and doing configuration before reboot, but I found that it was unnecessary for my needs.

On reboot I had a very good working system, checked the afterboot man page, confirmed I had a solid network connection, added a regular user(s), and could SSH in from it/them.

All was well and good, but after like 10-15 mintues the system would drop off the LAN. I couldn't figure it out, but putting a KB or monitor back on it fixed it. After a poke in the BIOS the next morning. I found a very interesting option :-)

The system was set to stand by after n minutes, I tested with both standby and suspend set to 15 minutes. And sure enough after 15 minutes my SSH session would time out. And I'd have to physically type a key on the keyboard, or insert one into the port. After I cleared this, all was well ! FreeBSD never cared a rats behind but FreeBSD is not OpenBSD :-)

I had thought maybe the kernel thought there was a problem /w the default console, but I figured that'd leave some viable info or a crash. Apparently the BIOS was the problem hehe.

PC-BSD, an easy to install FreeBSD based desktop has a great GUI installer. Very easy and simple, but I think OpenBSDs was easier. Since I elect to do 'advanced' installs with PC-BSD rather then the short basics. Never the less, the effect was the same.

PC-BSD, a fully working KDE Desktop on the first boot.

OpenBSD, a fully working Console System on the first boot.

I didn't really have to configure a bloody thing after running adduser on the OpenBSD box ;-) Of course theres more work to do, but not as a case of getting a _working_ system. I find OpenBSD so far to be a great system.

Monday, March 12, 2007

Yippers

You know... a mixture of tired/bored is very dangerous when you start:

Reading about sockets programming
and learning how to get a dump of pages html via telnet

and sockets start sounding like a very bloody good idea....

Sunday, March 11, 2007

rf.c

Well I've done some correcting to my little back scratcher, including two bug fixes and changes to the man page.

/*-
 * Copyright (C) 2007
 * Terry *. P*****. 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.
 */


// vim: set noexpandtab ts=8 sw=4 ai :
// vi: set ai nu ts=8 sw=4 :

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

struct lnpos {
 long nl;
 struct lnpos *next;
};

static void readall( FILE *, int );
static void readtop( FILE *, int );
static void readbottom( FILE *, int );
static void usage( void );

/*
 * rf - read file to standard out v1.1
 */

int
main( int argc, char *argv[] ) {
 
 char *erptr;
 int t_flag = 0, b_flag = 0;
 int ch, lncnt;
 FILE *fp;

 extern char *optarg;
 extern int optind;
 extern int optopt;
 extern int opterr;
 extern int optreset;

 while ( (ch = getopt(argc, argv, "b:t:")) != -1 ) {
  switch (ch) {
  case 'b':
   b_flag++;
   lncnt = strtol(optarg, &erptr, 10);
   if ( *erptr || lncnt <= 0 )
    errx( 1, "Improper line count -- %s", optarg );
   break;
  case 't':
   t_flag++;
   lncnt = strtol(optarg, &erptr, 10);
   if ( *erptr || lncnt <= 0 )
    errx( 1, "Improper line count -- %s", optarg );
   break;
  case '?':
  default:
   usage();
   return 1;
  }
 }

 if ( (t_flag < 1) && (b_flag < 1) )  {
  fp = fopen( argv[1], "r" );
  if ( fp == NULL ) 
   errx( 1, "File can not be opened or"
         " does not exist -- %s\n", argv[1] );
  readall( fp, lncnt );
 } else if ( t_flag > 0 ) {
  fp = fopen( argv[3], "r" );
  if ( fp == NULL )
   errx( 1, "File can not be opened or"
         " does not exist -- %s\n", argv[3] );
  readtop( fp, lncnt );
 } else if ( b_flag > 0 ) {
  fp = fopen( argv[3], "r" );
  if ( fp == NULL )
   errx( 1, "File can not be opened or"
         " does not exist -- %s\n", argv[3] );
      readbottom( fp, lncnt );
 } else {
  usage();
  /* NOTREACHED */
 }

 fclose( fp );
 return 0;
}

/*
 * print out an open file to standard output
 */

static void 
readall( FILE *fp, int lncnt ) {

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

/* Read n lines from the top of the file.
 * note that it was very inspired by the head(1) implementation of BSD
 */
static void
readtop( FILE *fp, int lncnt ) {

 char *cp;
 size_t error, rlen;
 while ( lncnt && (cp = fgetln( fp, &rlen )) != NULL ) {
  error = fwrite( cp, sizeof(char), rlen, stdout );
  if ( error != rlen )
   err( 1, "stdout" );
  lncnt--;
 }
}


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

 int hmany = lncnt;
 long nlnum = 0;
 long where;

 struct lnpos *root;
 struct lnpos *cur;

 root = malloc( sizeof(struct lnpos) );
 if ( root == NULL )
  err( 1, "can't init the list" );
 root->next = 0;
 cur = root;

 cur->next = malloc( sizeof(struct lnpos) );
 if ( cur->next == NULL )
  err( 1, "can't add nodes" );
 cur = cur->next;

 /* read the file, count every '\n' and store them in a new member of
  * our linked list.
  */
 while ( (lncnt = fgetc( fp )) != EOF ) {
  if ( lncnt == '\n' ) {
   nlnum++;
   cur->nl = ftell( fp );
   if ( cur->next != NULL ) 
    cur = cur->next;
   cur->next = malloc( sizeof(struct lnpos) );
   if ( cur->next == NULL )
    err( 1, "can't add nodes" );
   cur = cur->next;
  }
 }

 /* rewind our linked-list and seek to b_flag + 1 segments short of the
  * end of the list _before_ calling readall. So readall _starts_ from
  * the correct fseek offset to print till EOF.
  */
 cur = root->next;
 hmany++;
 while ( hmany < nlnum ) {
  cur = cur->next;
  nlnum--;
  
 }

 where = fseek( fp, cur->nl, SEEK_SET );
 if ( where != 0 )
  err( 1, "could not seek through the file\n" );

 readall( fp, lncnt );
}

static void
usage( void ) {
 fprintf( stderr, "usage:\n rf file\n "
         "rf [-t number lines from the top] file\n "
  "rf [ -b number of lines from the bottom ] [ file ]\n" );
}


And the manual which writing got me interested in roff, I'll post when I have time to learn more about it. Basically the problem I had was caused by working on it. Originally under the conditions when 2 + 2 = 5 which is not good, because 2 + 2 is really == 4 !!!! I should never do stuff when I'm like that, but if I don't try nothing gets done.

Saturday, March 10, 2007

Go, what?

Well, to day I was working on some file. And for the first time I asked my self if I should use a 'Goto'. The goto statement is probably one of the most controversial things I've ever read of in computing history.

The problem was, I had the option of repeating several lines of code at several conditionals in a if-elif-else construct. I thought about using a goto to walkk on over to that. So as to only right it once. When I asked my self, Do I even remember the syntax for a Goto ! LMAO !!! I can't even ever remember using a Go to in any language. The only time I recall learning about using was breifly in an historical C tutorial by by Brian W. Kernighan. Then I thought, since I didn't want to clutter things by getting repetitive - Why not get off my lazy arse and wrap it in a function?

Really the only purpose of using goto often I could see would be to avoid using functions at all. The best usage of it I can see, which could still be wrapped in a function if wanted. Although I'm sure thats not always best. I don't see any thing wrong with goto, but I don't see it as an excuse not to use functions, if-elif-else, switch/case, for/while/do-while e.t.c. what ever constructs the language provides.

I think, in my opinion this would be a good clause to use the 'infernal goto'

for condintion
  do
      code
      if true
            goto handle
      else
            skip
 A number of things like this and eventually 

      handle:
            code to handle false
  done

As a method of keeping some exception handling at the end of a loop rather then packing it some where with a nice interface or some thing. I dunno, personally I like doing things in a manor that I know is crystal clear.

For example, column stacking on a door for a bang & clear. It should be clear as can be who is banging, who is openning, and which one enters first, e.t.c.

TDFTN

  • Finish fixing rf.c
  • Work on implementing more realistic CS Gas in S4:TSS
  • Finish that letter
  • Do my home work *snore

Wednesday, March 7, 2007

Post it for the future.

http://www.ibiblio.org/gferg/ldp/GCC-Inline-Assembly-HOWTO.html

Big, uh, Fun Gun !

Minigun


Download a Minigun video. Footage from Knob Creek.

Ok... now thats a lot of hot lead.

Rest

My idea of R&R ??

Find me a pair of palm trees. String a hammock between'em and relax in the shade with a nice cold drink.

Mm, maybe some day hehehehe.
Some times I dislike being the only one in this burg I know. With a passion for computers and coding in my age group...

Sheesh man, I was in diapers with a Tandy 1000 and TRS-80 Colour Computer for toys. WebTV introduced me to the World Wide Web. A Computer donated from our Church showed me Windows 98 and got me doing like 8+ hour a day learning stuff via Earthlink Dialup.

Look at me now? I'll be 19 this June. 3 Computers, desktop, desktop turned server, and laptop. Plus Ma's desktop. Stuck living with Windows often. Yet I breath naturally on my FreeBSD / PC-BSD systems. Feels good to long into FreeBSD even if its through PuTTY at times.

No clue wtfrig I started learning programming, I don't even care much for C++ in retrospect. Yet I love C !!! GO figure. When I get to a working vacation in July. I plan on boning up on Pythons standard library. I'm only very familer at that level with C and some of the BSD / POSIX extensions on my system. Most of which, I rather like...

Learning to do stuff at CLI levels, learning, understanding, and mastering complexity == heaven. Flib it, man I don't even _use_ an _IDE_ as most call it. I started with Dev-C++ now? My little bag of tricks. Vi, Vim, Ex, I can use Emacsen but prefer Visen ;-). GCC, the only compiler I've ever used but I like it so far. Although I wish it'd be better at reminding me that I transposed a , /or . although thats a font and many lines later issue. I've found using GCC from the command line much more flexible. GDB for debugging, skip the GUI ! Lint for simplistic code checking, ctags for larger stuff. A bloody fine manual for system calls, the standard library, and ncurses. A very good Bourne Shell implementation for scripting and many choices. BSD & GNU make, and a number of other things I've yet to learn like groff and automake.

Most people my age? Ask'em what C Programming is and they'd probably say forging report cards ! Most probably wouldn't even know what the HTML in index.html stands for.. A lot of my friends are not even the most computer literate.

I've been told in my youth that my mind was like some one older then my years... But I've always valued my uniqueness. How many lusers do you know. Who'd manufacture their own fscking mother board & write device drivers as necessary for if they only knew how !!!!!!!!!!!!! Ok , so I'm a crazy lune... can't help that. But, GOD, I Love to learn about stuff that gets my interest. He's blessed me so much with being able to learn as much as I have. Odds are, if it wasn't for that one computer Robert gave me. When he heard ma wouldn't let me repartion & dual boot ma's computer. I probably never would have gotten into *nix systems as much as I have. If my sister didn't get me my laptop. I'd probably never been able to learn this much for programming. Its been a great blessing, one that I'm very thankful for. To me, its a joy to learn some thing new and interesting every day. I'd be happy some day, to know as much about computers as Mel Kaye did lol.

Yet still... who do I have to share this passion with? Mm, no one.......

Thats what pains me lately.

Spider Stance

You know, its probably the first time in my life. At least that I've noticed it. That I've ever sat, in that 'distinctive' pose of the amazing Spider man.



straighter then that, back erect and arms straight. I was perched on a couch-ledge, so had to fit feet and hands in the same spot. After a minute, I realized who made it famous ^_^

You know some thing, it felt darn good for my back !! I wonder if a generation of Comic Book artists ever thought about that =/


Pictures not exactly what I wanted but its as close to it as I can find without putting one of my comics in the scanner.

Monday, March 5, 2007

How Evil are you?

You Are 14% Evil

You are good. So good, that you make evil people squirm.
Just remember, you may need to turn to the dark side to get what you want!


Wow....
Well I've solved one problem, now to tackle another problem.

Solved:

KMail would crash when ever moving or deleting a message in my SMB mounted mailboxes.

Solution? I backed every thing up by moving them to /tmp. Replaced my .kde/share/config/kmail* and .kde/share/apps/kmail files with roots which was never configured. Then I set up kmail and imported my messages from backup.

That fixed it all but now I have a new problem:

How to access mail from any where on my network.

THe Soultion I'd like, kolab- > KDE Group Ware xD

Man, I don't look forward to source installing that monster on a 500Mhz Pentium III !!! Maybe I can run it in a FreeBSD Jail for security as well.

Sunday, March 4, 2007

I look, at how much there is to be done.. and see how much I still have to go in my learning. Before I could be worth a damn to help.

Mmm.. supper time

Saturday, March 3, 2007

the poseidon adventure

Well, tonight we taped the movie Poseidon. A remake of the Poseidon adventure.

I remember when I was a kid, maybe 5-6 years old. I had officially sworn off the original movie for keeps. I had gotten a tad ill in the stomach watching it. The whole sinking / drowning thing kind of got to me. And really I've never cared much for disaster flicks.

I'm happy to say, like 12-15 years later I'm perfectly fine and the remake was actually pretty good :-)

At least it wasn't as boring as the Titanic remake was...

Friday, March 2, 2007

S4 HiJinks

I don't know if its a curse for living in the RvS Dept to long instead of my beloved SWAT or what.

But some times I have the distinctive feeling that I speak, and oh most no one listens to a word of it!

Both on and off line...... Well there was once upon an off line time.