nights log

So far it has been a fairly uneventful night. I’ve been contemplating taking up another language, I’m interested in both Latin and Spanish, but have started studying neither yet. Mathematically, I would have to favour Spanish… because shall we say, while exposure to Spanish is fairly easy for me, Latin is a bit of a dead language! Really the only languages of value out here, is what *passes* for English, and of course Mexican / Puerto Rican dialects of Spanish. Considering the simpler grammar, studying Spanish in the long run: might also help to improve my German, which is useless at the compositional level, but occasionally handy at the reading level. I think the entire world would agree though, that I should work on improving my English skills, or at least stop the mixture of US/UK elements.

For time passing, I setup sudo on my laptop; had done it some years back, when I was running PC-BSD, but haven’t used it since an updated overwrote my sudoers file, as I had forgotten to backup /usr/local/etc. I knew that PC-BSD was taking ownership of /etc/rc.local and making overwriting changes to sudoers, but didn’t use sudo enough to care lol. That’s one thing that has always pissed me off about PC-BSD, yet I have always respected about the *real* BSD projects: a concept of user edited files. You can play with /etc/rc.local and /etc/rc.conf on FreeBSD without getting biten, on PC-BSD you should use an rc.conf.local file: OpenBSD style. I’m always running the latest FreeBSD STABLE branch on the laptop, in this case RELENG_7, and anxious to see RELENG_8 become a practical reality. Heh, even on the OpenBSD box (which as sudo preinstalled) I don’t bother using sudo that much. What I like about sudo however, is the ability to skip ‘su – root’, and limit access in a more general way—to specific commands. It’s probably one of the best programs of its kind written, since su.

In getting playful, I split up my word lists (:help spellfile) in vim, into smaller organized chunks, and added a few more entries from FreeBSDs system dictionaries. As time goes on, I might expand things further, based on the kinds of texts I end up editing. All of my text editing is basically done in vim, so it also does most of my spell checkin’ by virtue of that. Of course, Vi IMproved has an excellent spell checker, and perhaps the only one I’ve met that could be considered superior to MS Words. While I utterly hate word processors, and find them to be useless paper weights; I generally consider Microsoft Word the best known example of spell checking lol. I’m happy to say though, that I’ve evolved somewhat in the past eleven or twelve years ;). Now if only I could do something about the having-to-type-as-fast-as-i-can-freaking-think-problem, maybe my writing might actually be worth something, someday lol.

The ‘Burbs was on TV, and coming on in a little bit is a good film that I really haven’t seen in a long time. It’s called Throw Momma from the Train, best described as a comedic remake of Strangers on a Train. I plan to log off, lay down, and try to relax for a bit…. hopefully relax. Probably will try to dig up another quick snack, something light but useful.

The internet connection has been offline for the last couple hours, first found out it was up when an instant message popped up on me mid-sentence! Hmm, got about 10 minutes until the movie starts, so it’s time tos tart winding down. I’ll probably be awake early tomorrow, assuming I get any sleep before work….. sigh.

Hilarious session error with rsync/ssh

For the sake of experimenting, I installed Debian Lenny into VirtualBox on the Winsucks machine, being lazy I used the network installation ISO hehe.

One of the things I dislike about Linux distros, is they don’t seem to take kindly to a leading capitol letter in usernames for some reason. Debian’s installer also (logically) set my uid/gid to 1000. Rather then map between uid/gid, I merely use the same values for my account on all machines. Since BSD could care less, I also use ‘Terry’ instead of ‘terry’ when possible ^_^.

While setting up for the test, I also changed my accounts uid/gid; oh boy is the vipw program talkative. In doing that, and then running the test from a shell w/o logging out and back in again first, resulting in this funny error message:

terry@virtuous:~$ rsync -arz --links --safe-links --no-D -tx -e 'ssh -l Terry' --rsync-path='cd /srv/rsync/conf && /usr/local/bin/rsync' -n  --stats Terry@vectra::home /home/Terry
You don't exist, go away!
rsync: connection unexpectedly closed (0 bytes received so far) [receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(635) [receiver=3.0.3]
terry@virtuous:~$

Making sure my sessions uid/gid are correct with the system databases however, fixes that lol.

Currently, I’ve setup VirtualBox to boot Debian into console mode and run it ‘headless’ with ssh+x11 forwarding. Should we say, I’m more then comfortable using a unix shell, ;-).

What a day at crockery design, inc.

Nothing like a late night to remind you that you’re alone, nothing like waking up in the morning for work; to remind you that your more of an asset then a person in your families bottom line.

I managed to survive work without to much damage, even got to be out in the rain for a bit after getting home (which I relish). Most of the afternoon was spent, well honestly I don’t remember much of it.

I did however come up with a possible solution to a small “Problem” I have with getting cwRsync to obey. Basically, I can’t make the S.O.B. contact the server (vectra) from sal1600. The idea is, instead of running rsync on sal1600 (client) over SSH to vectra (server), to do the usual one-shot daemon over encryption trick. Instead, make a script that causes sal1600 to launch a one-shot rsync daemon, and then to “phone home” to the server and cause it to trigger the rsync from server to client. The logic of fixing things under windows, the client doesn’t work, so make the client a server that tells the server to use a client like it was a server… ok, that’s just fucked up. I think however, with a little trickery to make it work that way via SSH; it will probably solve the problem. With much less pain then doing some kind of diff and patch crazyiness in place of rsync.

GCHQ’s also decided to re-elevate the priority on my fixing the mighty page. The basic problem, I’m a WO1 assigned to the “Special Operations Wing”, which belongs between the Commissioned Officers and the Senior Non-Commissioned Officers groups. Instead, I (and now Timbo, since his becoming a fellow WO1) was displaying at the end of the page, under the Vets list. It’s been that way ever since I ‘repaired’ a majority banaided and brain damaged bit of code that is integral to things working smoothly. Since I consider such a matter of ‘personal vanity‘, I’ve never had a problem with it being broken. But I reckon, those on high are right, it doesn’t look good if a high rank is listed below the rankless, lol.

In studying what makes the whole thing tick, I’m not sure whether or not it is just a huge crock of shit or a clever attempt at trying to produce faster code. Either way, if I ever meet the original author, I’ll punch the fuckers lights out. Then I’ll give each of my fellow admins a chance ^_^. While the initial problem was painfully obvious, finding ‘why’ it happens was not quite so simple. When I found the next clue, I got curious and began to concentrate further until the light bulb turned on.

When the light bulb turned on, I decided either the original programmer must’ve tried to tune every ounce of speed out of the algorithm—working under the assumption that every instruction is equal to the sum of their quantity, rather then their cost times their quantity… or it was put together by some asshat who expected it to result in a “Write once, run always, read never” body of code with no concept of software engineering.

Either way, if I ever meet the person, they will loose teeth if we discuses software-stuff.

On the upside, out of all of todays stuff, I did finally get some SWAT action in… with all the work I’ve been doing lately, it was probably 3 days since I got a decent game. Or should we say, around 15GB of encrypted network traffic to shuffle to and frow, ain’t fast and don’t mix well with games.

Right now though, most everything is done; whew.

Thinking and ramlbing out loud

Because of the games box, any solution needs to be efficient on the network; and only maintain an interesting connection on demand. While the laptop could (and has) put up with NFS/CIFS type solutions, I don’t want it clogging up bandwidth, the desktop is a bad enough piece of shit as it is >_>.

The concept that I was thinking of last year, was using a mixture of CVS and RSYNC to branch and version important files on a host specific basis, although important stuff like my $ENV and vimrc files are made highly-portable, not everything else is, hence the value of a VCS/SCMS. Whilist all the mumbo jumbo about the algoritm used by rsync would be used for mirroring file sets between boxen at login/logout.

I reckon now is a great time to abuse it into working.

Since I began initial testing, I have looong since moved to using Git for all my active projects instead of CVS and SVN. However the master source of everything still is Dixie, that is my laptop! While things have gotten fairly cramped on the desktop, mostly due to development files being shoe-horned into Windows XP; my laptop has plenty of free space, despite having A LOT of software and a plethora of development files.

My file server is still holding quiet nicely:

To days date is: Sun Aug 16 21:34:08 UTC 2009
Terry@vectra$ df -h
Filesystem Size Used Avail Capacity Mounted on
/dev/wd0a 147M 41.8M 98.1M 30% /
/dev/wd0h 393M 46.0M 327M 12% /home
/dev/wd0d 98.3M 670K 92.7M 1% /tmp
/dev/wd0g 6.7G 995M 5.4G 15% /usr
/dev/wd0e 148M 40.6M 99.7M 29% /var
/dev/wd1a 11.8G 275M 10.9G 2% /usr/local
/dev/wd1d 44.3G 14.8G 27.3G 35% /srv

wd0 is an old Maxtor 8GB EIDE drive, wd1 is an 80GB EIDE drive. I also have a 40GB disk somewhere with the systems original Windows XP Home install somewhere.

wd1a was used to off load installed software to a second drive; basically a way of moving /usr/local off the original /usr file system. wd1d was created primarily as a sotrage depot for use with NFS/Samba.

In lacking a suitable place to dump crap, and not having a notion to put it under /var; I created a /srv directory to hold data for services. As such, it basically holds my code repositories, backups, and webserver files. It would be easy to rebuild the partitioning on wd1, or just create a new bsd partition:

# disklabel -p g wd1
# Inside MBR partition 3: type A6 start 63 size 156234897
# /dev/rwd1c:
type: ESDI
disk: ESDI/IDE disk
label: IC35L080AVVA07-0
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 16383
total bytes: 74.5G
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0 # microseconds
track-to-track seek: 0 # microseconds
drivedata: 0

16 partitions:
# size offset fstype [fsize bsize cpg]
a: 12.0G 0.0G 4.2BSD 2048 16384 328
c: 74.5G 0.0G unused
d: 45.0G 12.0G 4.2BSD 2048 16384 328
#

‘c’ means the entire disk, meaning there is roughly 17GB held in reserve.

I think I will begin cleaning up stale files in /srv, and moving unimportants to the desktop, which has around 40-50GB of free space for cold-storage.

tbc

Pondering: should I ever go back (regularly)?

I used to spend a lot of time at the PC-BSD tech support forums (forums.pcbsd.org). As some should know, it is not one of my ‘favorite’ projects for numerous reasons.

I haven’t been active there in I guess, nearly a year now. Should we say, shuffling though like 50 threads a day and being one of the few paying attention got quiet old, when I’ve so much else to worry about after work. Ending up as little more then a spam-patrol man wasn’t very interesting either. Although things have been realitively docile since FreeBSD opened their own forum, I hang my hat over at DaemonForums.org – a place that’s worth visiting.

One of the alarming things about forums.pcbsd.org even while I am inactive, I still have several orders of magnitude more posts then everyone else… Man I used to check that forum several times a day. At one point, I may have been the last skilled snook left, I hope that has changed….

Haha, believe it or not but I just upgraded my file server from OpenBSD 4.4 Release to OpenBSD 4.5 Release, lol. Usually I’m pretty good about keeping my systems up to date, but lately life has just been to troublesome to care about it :-/.

In a change, I’ve also elected this time to install the various X related dist sets in the upgrade; I have no need to run GUI tools to manage my file server, but I have been thinking of using the machine to supplement my laptop, by way of running an X-Server on the desktop machine, and employing SSH for an extra layer of encryption.

Although I have never had need of (nor desire to try) the OpenBSD ports system, it does require X if memory serves, so probably good to have it available. Since the box isn’t setup for running an X server it is only filling free diskspace, and that box is well partitioned hehe.

Building vim with support for Python and Perl on Windows

Previously:

install a suitable version of Visual Studio / Visual C++
install a suitable version of Python
install a suitable version of Perl
open a Visual Studio Command Prompt

I have VC Express 9.0, ActivePerl 5.10.0, and Python 2.6.2 installed from Python.org’s installer.

Check out the VIM source code, you can find directions here. I suggest using CVS or SVN to make the patching life easier. Precompiled binaries of CVS and SVN are available for Windows, and it is possible to build them yourself of course ;).

I use CVS and wish to keep the tree along side my regular vim:

> cd /d P:editorsvim
> cvs -z3 -d:pserver:anonymous@vim.cvs.sf.net:/cvsroot/vim checkout -Nd vim7-cvs-src vim7
> cd vim7-cvs-srcsrc

You should know read the Make_mvc.mak makefile to find the options you are interested in using. I’ll leave the viewing the file from the command line to a Windows users intelligence (hints: more, edit, notepad, wordpad, or gvim would be useful). We have to tell nmake.exe to use this file and our options, for asses who use Visual Studio all day but don’t remember nmake: we pass it VAR=value pairs.

> nmake /F Make_mvc.mak CPUNR=i686 FEATURES=HUGE GUI=yes OLE=yes CSCOPE=yes CTAGS=ctags POSTSCRIPT=yes PYTHON=P:DevelLanguagesPython2.6 PYTHON_VER=26 PERL=P:DevelLanguagesPerl PERL_VER=510

Obviously if you want same options, adjust the paths like a good little geek.

At least on my system, MSVCs compiler refuses to build the vimrun.exe, install.exe, uninstal.exe, and xxd/xxd.exe targets (and programs). As such, I build gvim and the gvimext.dll – the targets are in the makefile. if one wants to build a vim execuitable under a diffirent name, I suggest ‘nmake /e VIM=foo /f … OPTS=… foo.exe’ to create foo.exe (default is gvim).

As such we need a place to put vim so we can actually use it.


> MKDIR ....vim-personal
> FOR %F IN (*.dll *.exe) DO XCOPY /Y %F ....vim-personal
> XCOPY /Y P:DevelLanguagesPerlbinperl510.dll ....vim-personal
> XCOPY /I /E /Y ..runtime* ....vim-personal

and one can borrow the lost vimrun and diff files from a working install. If one also juggled the names so that vim-personal became vim72, one could also borrow the install.exe file most likely…

In doing all of this, I’ve written a batch script to use in automating the thing, which is not as good as my vimbuild shell script but still works lol. When I get some time I’ll make my script also update the spell files and what nots (hint: see spellreadme.txt)

This is rich

As a side note, you may be wondering if it is a security risk that applications can add and remove applications from the exceptions list any user intervention, or perhaps you think that the bigger risk is that applications can disable the firewall altogether. To perform these feats, the application must have administrator privledges. If you have malicious code running in administrator mode on your system, the game is already over and the hacker has already won. The hacker’s ability to disable the firewall would merit little more than a footnote.

What it fails to mention is many millions of Windows XP installations are run with administrator privileges on the users regular account, I practically ROFL’d lol.

So far experiments continue with SWAT 4 performance issues. Deeper testing has shown that it is no longer connected to graphical issues, not when running on my current hardware/driver config; nice to be able to max out the graphics online *and* in single player.

What happens is periodically when moving through an area, I get a stutter-lag-warp like motion: as if the whole game stopped spinning and then suddenly unlocked. The only consistency I’ve noticed is it happens when entering a region of the map that I have not been in previously—or have not been in for a while. One thought is that perhaps it occurs when the cache must be updated with stuff that has already been moved out of the games memory cache. My machine has RAM to burn so I have been testing the game with various cache sizes, but don’t honestly expect any positive result. On modern machines, cache size shouldn’t matter to much with the Unreal Engine 2.x lol.

Atm I’m defragging a few disks, maybe that might help a little. I don’t know if it is just the much greater frequency of crashes with Windows XP, or that NTFS really sucks that much worse then FreeBSDs UFS2 system. But for one reason or another, my windows file systems always end up very highly fragmented. Although on the upside, unlike Win32: FreeBSD does kind of encourage you to fsck afterwards hehe.

Hopefully my experiments will yield some fruit, and I can stop warping all over the place lol.

bored…

src: http://www.heuse.com/cphumor.htm

Interviewer: “Is studying computer science the best way to prepare to be a programmer?”

Bill Gates: “No, the best way to prepare is to write programs, and to study great
programs that other people have written. In my case, I went to
the garbage cans at the Computer Science Center and I fished
out listings of their operating system.”

There are 10 types of people in this world.
Those who understand binary, and those who don’t.

DEBUGGING : Removing the needles from the haystack.

Endless Loop: n., see Loop, Endless.
Loop, Endless: n., see Endless Loop.
– Random Shack Data Processing Dictionary

“It is practically impossible to teach good programming style to students that have had prior exposure
to BASIC; as potential programmers they are mentally mutilated beyond hope of regeneration.”
-Dijkstra

“The three most dangerous things in the world are a programmer with a
soldering iron, a hardware type with a program patch and a user with an idea.”
– _The Wizardry Compiled_ by Rick Cook

“The primary purpose of the DATA statement is to give names to constants; instead of
referring to pi as 3.141592653589793 at every appearance, the variable PI can be given
that value with a DATA statement and used instead of the longer form of the constant.
This also simplifies modifying the program, should the value of pi change.”
– FORTRAN manual for Xerox computers

“C makes it easy to shoot yourself in the foot. C++ makes it
harder, but when you do, it blows away your whole leg.”
– Bjarne Stroustrup

“Programming graphics in X is like finding sqrt(pi) using Roman numerals.”
– Henry Spencer

“Never put off until run time what you can do at compile time.”
– David Gries, in “Compiler Construction for Digital Computers”, circa 1969.

BASIC programmers never die, they GOSUB and don’t RETURN.

Real programmers are surprised when the odometers in their cars don’t turn from 99,999 to 99,99A.

FORTRAN is not a language. It’s a way of turning a multi-million
dollar mainframe into a $50 programmable scientific calculator.

C is almost a real language. Even the name sounds like it’s gone through
an optimizing compiler. Get rid of all of those stupid brackets and we’ll talk.

Any sufficiently advanced bug is indistinguishable from a feature.

Programming is 10% science, 25% ingenuity and 65% getting the ingenuity to work with the science.

Science is to computer science as hydrodynamics is to plumbing.

We don’t really understand it, so we’ll give it to the programmers.

COBOL programmers understand why women hate periods.

Computer interfaces and user interfaces are as different as night and 1.

The human mind ordinarily operates at only ten 10% of its
capacity, the rest is overhead for the operating system.

A computer scientist is someone who fixes things that aren’t broken.

The computer is mightier than the pen, the sword, and usually the programmer.

Programming is an art form that fights back.

After a number of decimal places, who cares?

“Virtual” means never knowing where your next byte is coming from.

If at first you don’t succeed, you must be a programmer.

“It’s 5:50 a.m., Do you know where your stack pointer is?”

If God had intended humans to program, we would be born with serial I/O ports.

There are two ways to write error-free programs; only the third one works.

You never finish a program, you just stop working on it.

Deliver yesterday, code today, think tomorrow.

PL/1, “the fatal disease”, belongs more to the problem set than to the solution set.

Yea, though I walk through the valley of the shadow of APL, I shall fear
no evil, for I can string six primitive monadic and dyadic operators together.

Programming is a lot like sex. One mistake and you could have to support it the rest of your life.

Another Glitch in the Call
(Sung to the tune of a Pink Floyd song)

We don’t need no indirection
We don’t need no flow control
No data typing or declarations
Did you leave the lists alone?

Hey! Hacker! Leave those lists alone!

Chorus:
All in all, it was, just a pure-LISP function call.
All in all, it was, just a pure-LISP function call.

You can’t make a program without broken egos.