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.

What I have leanred today

Some programs really have no bloody idea what the hell they are doing when it comes to paths.

Applying the oft’ used idea that once a disk is mounted, you can NOT unmount it without explicitly saying so, would actually be a nice option in Windows.

That The “Internet Options” in control centre (I got bored, so I took a look in CP lol), actually has *nothing* to do with the Internet what so ever, unless you believe that the entire Internet is Microsoft Internet Explorer ^_^.

Really, I don’t know what annoys me more, how often Microsoft’s attempts to “Integrate” shit seems to demonstrate pure stupidity, or just all the comedic prerequisite for a god complex!

Some times, I really wonder who thinks of all this crap: and what they were smoking at the time.

My first date with KDE 4.2.2

Being someone who knows a few things, I decided that in order to be fair: I would generally hold off deciding whether KDE 4 is an improvement over KDE 3, until after KDE 4.2 was released. Well, as life has it, I’ve spent most of two days compiling KDE 4.2.2, and things went very smoothly (not that I liked compiling ocaml among the dependencies :-/). This is on my core workstation, running FreeBSD RELENG_7 (i.e. 7-STABLE).

My very first impression was… is this thing working??? All that first time setup takes a while to do, and without much sign of anything happening in the background. On the second boot up, after logging in through the X Display Manager (XDM), I counted 17 seconds until there was a usable desktop; but user interaction was clean all the way, no doubt about that this system was coming online. If you count the time it takes for korganizer and the other system tray icons to load, about ~45 seconds to get a full desktop — but it’s not far to count background programs like systray icons lol (especially the kind you’ll likely remove later).

Although I think the startup time shouldn’t be to bad for most people, I’ve forgotten how long it took to get a full KDE session going up, but I would say 17 sec is pretty good on my hardware hehe. With just a Sempron 3300+, even Blackbox and FVWM2 could start faster for my tastes, so no problem.

I find the new style K-Menu quite useful, takes a little getting used to – learning what adapts a focus follows mouse approach (the nav-icons on the bottom) and what requires a clickly click to work (most everything else). It is beyond me why it defaults to that behaviour (developer preference maybe?), but easy enough to make it a bit more consistent: right clicking the big K and going into the application launcher settings put the desired option right under my noise :-).

Obviously, the first thing I looked for was Konsole, the theme stuff on it is just awesome. Second thing was to dig up the run command dialog to get my urxvt+screen going. Further attempts to use the run dialog, proved that it was mostly a piece of krap. (Eye candy, but shitty to use; guess that is why there are terminal emulators.)

Closing the desktop folder viewer widget-thing was the third major action. Because I’m a person that hates having a desktop cluttered with icons (I prefer terminals :-), I like the idea very much, but since I have no immediate use for it, no need to have it taking screen realestate.

One thing that irked me, bringing up the help and control center entries on the applicaiton launcher (K-Menu?) loaded the ones from KDE 3.5.10, joy 8=). Oh wellk, it’s quite easy to remove or change them via the menu editor. In the case of khelpcenter, it seems it just finds the wrong documentation ^_^. Killing off the old thing and setting /usr/local/kde4/bin in PATH at the top of my ~/.xsession file, fixed access to the Control Panel. I must admit, I rather dislike KDE3 cruft in the menu – however you slice it

For years, I have wondered why some systems never turned on the NUMPAD by default, considering that I now do so much off a laptop; I can understand why, it’s a pain in the ass if when its unexpectedly on xD.

I generally feel that the whole Plasma and widget crazed stuff is a good element of KDE 4, but in all honestly, FVWM and Blackbox have just spoiled me something terrible.

It would appear, that KDE 4.2.2 is more or less ready for general usage, and unlike 4.0RC*, can actually be customized quite a lot to taste :-). For a little while, I was worried that Gnome might take the lead, and keep it… but I think by the time Gnome 3 hits, KDE 4 will be queen and king of the desktop environments, hehe. For those who desire eye candy, and have a machine capable of it; if you liked AERO, you ain’t seen nothing yet laddy. I think anyone who is still holding onto KDE 3 at home, should start migrating while the getting is good; and employ programming talent for bringing along any missing “Must haves” to the new desktop. I am not sure if it is really an improvement beyond the concepts, but hey, at least there is Okular!

The technologies that interest me most, are only Phonon and Kross — although I’m not likely to use either programming wise, beyond their stake in Qt (Qt has some form of Phonon, and has had a JavaScript’ish thing avail for awhile; and I wonder if kross will make it’s way in before Qt5, hehe)

As for me personally, well I’ve gone back to the Famous Virtual Window Manager version 2.5.27, old habits die hard 😉

Further testing of KDE 4.2.2 and later, will probably be through the Windows builds, rather then assaulting my poor stable laptop hehe.