NPM going Beta soon !!!

I’ve spent the last 3 hours or so hashing out changes in NPM’s sources.

I’m not totally satisfied with the look of the settings dialog, I don’t think it looks professional enough for a proper release… Maybe it is just me. This is one reason I’m axious for the Qt4/KDE4 port because I’d like to get my arms around some of the changes in layout but I guess it can wait.

I still need to come up with icons for the menu to replace the text labels (ports, logging, network) but I think this is a good enough settings front end for now. I took a quick screen shot of each of the pages that show the preferences that I’ve setup so far:

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

Free Image Hosting at www.ImageShack.us

Free Image Hosting at www.ImageShack.us

That should take care of the basic user settings for now. I really think it is time I start to focus on the back end slots. Because as much progress as I have made in the last several commits of getting the GUI to work with the settings system I never got around to writing code to get it to make setting changes persistent through the GUI :o)

Once that OptionsInterface and related code is done and interfaced with the code in portactions.py I can work on the next phases I need done before a beta release:

  1. Implement the GUI front ends for running portsnap/cvsup/csup, atm it should run but without user output and a start button lol.
  2. Write the about dialog and integrate access of the Options GUI (the above screen shots show it) into NPM_MainWindow (the main application window).
  3. Alternate NPM_MainWindow forms that can be loaded at user choice 🙂
  4. Tweak code for setting ports build options more

After that, I guess Neo Ports Manager will be ready to have a Beta Release.

The handling the dialog that stands in for make config, I know sooner or later I’m going to have to resort to calculating a full scale depends list of options much like make config-recursive does because doing otherwise would screw up during any operation that tries to do a make config: the display area is read only to the user, no I/O form user to portupgrade and friends. Fixing that will come later… I also need to get my tookus back to the German translation when I’ve got the time to spare.

Oh what fun it will be when NPM hits a 1.1 Release, I can finally have a coffee break of sorts <_< hehe.

I would do more tonight but work is in the morning… Thus time to go to bed when you consider it’s after 0330R [local morning], well at least this is the earliest I’ve gone to bed in awhile LOL.

FreeBSD 7 draws near!

I think the word is euphoria hehe.

FreeBSD 7.0 is nearing it’s release with many many improvements, if I was in the business of having huge SMP servers doing lots of databases and network intensive stuff I’d probably have testing going on for months in advance..

Being a single spider, well I’ve yet to test it xD

So far FreeBSD 7 is looking like it is the best software update to hit my radar since Vim gained spell checking support in it’s own 7.x release 😉

Blessed number seven hehe !

I’ve already nearly blown out the walls and then my ears setting the radio ^_^ Celebration time ! Hooyah !

Hurt, Fear, and Sorrow.

I sit here trying to concentrate on getting stuff done. I can hear the mutterings of my family behind my back, in both in the idiomatic and physical sense since my back is to the wall which is in front of them. Some how I find the song that is playing in Amarok interestingly a stroke of semi-logic.

The muse to my productivity, hell 13 hours today complete the work I started the day before yesterday — it’s like being at the zoo ! Is it a wonder I may be awake till dawn to complete my endeavours?

And of issues they wish… To release me from my chains only so long as to shackle me anew to another post with stronger bindings. An effort I resist, if I’m made to suffer I will not sacrifice my entirety that others may lounge. It’s of my opinion that if you fail to plan a head, you best be prepared to weep the whirlwind that shall follow…

My mother got a torn stuck in her foot that was tracked in, do I hesitate to help? No, instead I do what I can.. Including tracking down the teasers. I’m not a cruel person by the soul, although I have more then a few brutal bones… The only time I aim to hurt others with my words is when I know from [to much] trial and error that it is all they will understand, or worse all that will keep them from striking at my spirit further.

When there’s trouble, I run, whether I think aid is deserved or not. But I will only go so far.. While I might pull a thorn, I’m not about to go as far as mental seppuku over her lack of planning.

I will not have my future bared from me until I am unable to pursue it further, I struggle enough to reach it now. I seek the opposite path then the one they bid me to take. The one that leads me to a chance, a chance to see my hopes realized, myself validated. To some day walk a free man among my peers with my head held high, that only GOD may choose for me and no other without my consent.

There is a poem that I came across in my web travels awhile back. I think it explains things all to well as I feel them.

Without consideration, without pity, without shame
they have built great and high walls around me.

And now I sit here and despair.
I think of nothing else: this fate gnaws at my mind;

for I had many things to do outside.
Ah why did I not pay attention when they were building the walls.

But I never heard any noise or sound of builders.
Imperceptibly they shut me from the outside world.

–Constantine P. Cavafy (1896)

In retrospect those words should be required reading in American Schools much like a few others are already. Hmm, what was it that dear Mr Jefferson helped to pen?


“that all men are created equal, that they are endowed by their Creator with certain unalienable Rights, that among these are Life, Liberty and the pursuit of Happiness.”

About the only right I have freedom to exercise here is my right to life, my right to choose and I will not relinquish it.

My soul belongs to the LORD, to no one else.

days muzings

oy it’s been a hazardous day :

Sick of laying around, sick of jumping around!

Finally finished my effort to convert the new RoE SOP to LaTeX. The main reason is that I can generate us a crap load of formats out of it and keep the source easy enough for most people to update even without my skillset. I packed it up in a ZIP and sent it to En4cer. I think after adding my sig to the SOP it is supposed to be official going by the finalized En4cer sent but until I hear about it. I’m keeping the files under my hat as far as those outside the SNCO project are concerned.

I must admit I am some what disappointed with the SOP Rewrites, don’t get me wrong its great material. It’s just the issue of workload balancing and time, sheesh man this stuff should’ve been done before I was even a Cpl… Let along sitting on my desk when I was made RSM.

LaTeX is a really good format, it’s pretty easy for every one to edit with a minimal understanding of it. And for some one like me it can become a very valuable tool. I’ve long since gave up on word processors, it’s like the worst idea in typesetting history if you ask me. I think half the bloody books I’ve read were probably passed through TeX / PostScript sooner or later in printing any way.

With my great dissatisfaction with word processing at the WYSIWYG level because it is such false advertising when you share files ^_^ and the crappy selection of portable formats. I eventually took to using XHTML/CSS for documents to be printed.. I’m fluent in XHTML but still it adds overhead to editing. LaTeX on the other hand, the learning curve is there for the sake of learning how to do XYZ when it pops up but it makes editing documents much easier.

Using Microsoft Word was harder then LaTeX haha and tables in LaTeX feel a little less pesky then they have always felt to me in XHTML. I think though one of my fundamental problems is that I’m linguistically diverse by nature.

I’m also some one that likes to work with data in comfort without having to worry about layout on other peoples system. That is one reason I tend to include a PDF version of all of my documents, at least that one will look proper lol.

Dancing the crazy monkey

Flooded with IM’s, full of paper work, dashing up and bout servicing requests, birds screaming, dogs yammering for a walk. Shopping [grocery] expeditions to be dragged out on. It’s like I’m dancing back and forth like a crazed monkey,

AND I’M TRYING TO WORK !!!

I could get more work done sleeping :o)

Only one thing I know,

Well you know those times
When you feel like there’s a sign there on your back
Says I don’t mind if ya kick me
Seems like everybody has
Things go from bad to worse
You’d think they can’t get worse than that
And then they do

You step off the straight and narrow
And you don’t know where you are
Use the needle of your compass
To sew up your broken heart
Ask directions from a genie
In a bottle of Jim Beam
And she lies to you
That’s when you learn the truth

If you’re going through hell
Keep on going, don’t slow down
If you’re scared, don’t show it
You might get out
Before the devil even knows you’re there

Well I been deep down in that darkness
I been down to my last match
Felt a hundred different demons
Breathing fire down my back
And I knew that if I stumbled
I’d fall right into the trap that they were laying, yeah

But the good news
Is there’s angels everywhere out on the street
Holding out a hand to pull you back up on your feet
The one’s that you’ve been dragginig for so long
You’re on your knees
You maight as well be praying
Guess what I’m saying

If your going through hell
Keep on going, don’t slow down
If you’re scared don’t show it
You might get out
Before the devil even knows you’re there

Yeah, If you’re going through hell
Keep on moving, face that fire
Walk right through it
You might get out
Before the devil even knows you’re there

If you’re going through hell
Keep on going, don’t slow down
If you’re scared don’t show it
You might get out
Before the devil even knows you’re there

Yeah, If you’re going through hell
Keep on moving, face that fire
Walk right through it
You might get out
Before the devil even knows you’re there
Yeah, you might get out
Before the devil even knows you’re there.

— Rodney Atkins, If You’re Going Through Hell

That and I need a vacation xD

Ravings

Here I sit, the darkness is on the brink

the business of the day gone by

my emotions come to intrude even upon the solace of my coding

I reach out for the things I desire

yet the seem to far off to go

will I ever reach the destination?

Will it even be the destination I seek…

Oh how I long…

the memories of the past haunt me

dreams of the future wound me

yet what else is there for me?

But my memories and my dreams

Of the things lost

of the things sought

the road is narrow as I stumble

all there is here is pain

till I reach the end of the journey

yet I can not tell how long it shall be

only that it be long and hard

what will await at the end?

to truth or to sorrow

to passion or to torment

I reach towards the future yet my arm is blocked, tied, constrained

bound by the past, of wounds still fresh

I can’t help but wonder, what will the future bring…

Be it madness, be it happiness, as long as it comes to a success.

what is life but a tail of joys and sorrows.

the deeds of ones hands and thy toil.

Of loves lost, of loves to be found…

Tis to an end my dear,

for I can bear it no more.

the mind must learn to forget,

as a new day looms.

To a new horizon I set sail

and of the warm waters I dream

in search of that island paradise

once more, forever more.

— The driftings of a spider

EOF

Brushing up with Java

It’s been quite an interest of mine to brush up with Java and Perl for awhile now but time has never really allowed me to do so.

Java for me is a language to which a lot of knowledge is stored away in the ol’brain but little wisdom so to speak. Java was maybe my 3rd language but I’ve also done a pretty good job of writing almost no Java code over the years hehe. I’m used to the syntax though. One day the Library had a sale of old books and one was the Java Sourcebook by Ed Anuff.

This was maybe 2006 and the book was so old that some where in the interface I think it said that JDK 1.0 Beta would be released by the time people were buying the book. Until more recent aspects involving Python and C++ with Qt3 / Qt4 its introduction (unwritten) to Javas Abstract Window Toolkit (AWT) was the closest I ever got to GUI work.

It is a very good book IMHO but of course very dated, I don’t know how much java.lang.applet and whatnot has changed over the years, I never really cared much for Java applets! But I am pretty sure that a lot is different with AWT and the newer Swing toolkit. One thing that I actually find interesting, the Java Sourcebook is maybe the only book I’ve seen that uses the same brace style I tend to use in C. Hmm, maybe it was an influence on my ways of doing things :

Not to long ago I checked out a nice O’Reilly book on Java because I wanted to see how much the language had changed in the past ten years or so. Java indeed changed quite a lot, it is way more fatter then I remember but it is still just as sweet.

One thing I like about C, the syntax is small enough to cram in ones head easy and follow it up with a reference of the standard library for stuff you don’t use often. Java OTOH is probably a few orders of magnitude larger then that for most people. With the things I noted, inner classes, generics, etc I was a little suprised that they were there but the language seems to have grown naturally. As I read though parts of the book I was constantly like “Oh, that works just like I expected” when comparing the detailed explanations of how things work along side the code listings.

C++ was my first language aye but I think I’m more comfortable with Java. Because in the fields where C++ differs from C, I tend to get a little more lost, while with Java most of it is already there.

Perl, my second language but probably the weakest in my skill set. I quickly got board and skipped a lot which gradually filtered through over the years. I respect Perl for its power and flexibility but I think it has gotten a little to big for its own good IMHO, although I wait to see what Perl 6 will bring us.

I remember in the Java Sourcebook there were several examples, such as an implementation for Lamp and LightBulb classes that interacted and various cat related ones that used a speak() method to examine how overloading methods and inheritance worked.

This is a reworking of it from memory, same basic idea though:

Jeez now that I think of it, those examples remind me of stuff from an UnrealScript tutorial I looked at a couple years back too. Who knows with how much UnrealScript feels like a customized Java they probably read the same book hehe.


/**
* Feline.java, abstract representation of felines
*/
abstract class Feline {
abstract void speak();
}


/**
* HouseCat.java, implements a feline that meows
*/
class HouseCat extends Feline {
HouseCat() {
}
HouseCat(String call) {
this.speak(call);
}
void
speak() {
System.out.println("Meeeooowww!!!");
}
private void
speak(String call) {
System.out.println(call);
}
public static void
main(String[] args) {
HouseCat theCat,newCat;
theCat = new HouseCat(); /* use default constructor */
newCat = new HouseCat("I am a cat!");

theCat.speak();
}
}

The HouseCat class implements a Feline (abstract meaning you can subclass it but you can’t create it directly). There is a simple constructor made to behave like a default constructor and one that invokes a private version of the speak() method using a supplied string.

I have the Java Development Kit and Run Time Environment installed from the packages on the FreeBSD Foundation website. Compiles fine with javac and gcj42, that is the GNU Compiler for Java ;-).

What I do like about Java, its fairly portable between systems running the same implementation (e.g. Suns JRE) as far as language features go. It also follows a largely logical behavior for many things from what I have seen.

And to top it all off, GCJ can compile to native machine code rather then Java Bytecode — for me a huge plus. I do have Qt4 bindings for Java installed on my desktop so I am interested to see where that goes, as far as my laptop is concerned I would probably need to use Suns compiler for AWT/Swing apps though. Not sure if Qt Jambi is in FreeBSD ports yet either.

As much as I love C, there are just some things that I don’t really want to have to implement in it. And as productive as I am in Python and Ruby I really need to cuddle up with some thing a bit closer to C’s end of the spectrum. I don’t really care a lot for C++, I can use it fine but don’t see much point for it over C besides templates and exceptions. Java lacks pointers in the same light as C/C++ uses but the references should be fine enough for my general needs.

C++ is multiple inheritance and Java is single, I’m not really partial to either concept as long as nether takes to biting me often. I have long enjoyed the design of Java’s classes and interfaces though, I love the interface thing in Java.

I don’t exactly care much for Suns compiler though but hey, if it works (y).

R&R The Training Way

Having been successfully stress-increased for the day I hit RvS Custom Mission mode for a little time to cool off. I set it to MP Peaks and took a Walter WA-2000 sniper rifle loaded with .30 Magnum FMJ and a MK23 SOCOM .45ACP with JHP ammo for self defense. 3 Flash bangs and 3 Smoke grenades, meaning 5 magazines of 6 rounds + 1 in the pipe for my Walter and another set of 4 12 round magazines for the sidearm plus one chambered.

The first round I maanged to have a turkey shoot, they kept coming to see where I was hiding only to be gunned down. The volume of the Magnum cartridge drawing more X-Rays to there doom… then I got overrun and flanked trying to retreat under fire to the nearest dead ground. I made a quick run but still got shot in the ass as the enemy ignored the smoke screen.

The second round, I got compromised just moving into position and ended up with about 4 or 5 X-Rays on the hill line itching for hairs.

Within about 1-2 minutes I had expanded as good as 3 magazines from my Walther and I was starting to worry about X-Rays coming around from behind. I worked up the hill and started picking off the enemy, working slowly to the winter lodge.

With about 3 rounds left and maybe one full mag left between me I took fire on the way. I knew with a group of X-Rays aware of me and an active shooter after me with a sniper rifle; you stand, you die.

So I decided again to redeploy but this time I did it the *right way*. I downed the nearest threat, pulled back and puffed a smoke between me and the incoming column.

Then ran like hell for the hills behind me, turned around and drew a bead on the incoming X-Rays. A few more down and off running further back to the bridge and another smoke grenade to screen my retreat. One tango gimped me but I managed to leap from cover to cover: taking position, suppressing, smoking, and running like hell to do it all over again until I limped myself back to the dead ground the bridge passes over.

At least two X-Rays close, one bought it from my current magazines last rounds as he tried fragging along with his teammate. Slung the rifle and slide out flash bang for shock value. The .45 sidearm coming out to finish the job… No point running when you’re already at the most secure place in town eh?

Took down the last threat, reloaded my Walther and moved on with the last 2 or 3 rounds loaded. Moved back to the lodge on one leg finding only one enemy left. who took shelter inside unaware of me.

Closing in with rifle ready, threw a bang into the lodge and went in with my MK23, 2 X-Rays down and the lodge was secured shortly. Back outside I checked the corner to see a shooter dashing close.

Slapped back into cover and went ready with the last of my sniper ammo, one miss and two hits as he lobbed a frag and readied to shoot me before it even blew up !

Good thing I was behind the wall and a pile of logs hehe.

A proper way of retreat though, puff the smoke to screen it. Move away, get some ground, fire back, rinse and repeat until contacts broken or you get a spot to fend them off from. With a proper 2 or 4 man Element it would actually work better. Because you could have a fire group suppress the enemy while a maneuver group jogs it to cover; switch positions with the fire group leaping next as they reload. While the maneuver group lays down the cover fire.

This video shows the concept very well in my humble opinion.

I’m used to doing it in pairs… not solo. Because it was impossible to run full out and fire at an enemy to my rear the smoke was really an essential part of trying to break contact alone.

Now having some one next to me with a nice SAW would have been a good combo with it though 😉

Creating Firefox searchplugins for any site – including Qt !

You know, Firefox and friends have a nice search system but there are so many websites that just don’t have a canned search plugin you can install like the Wikipedia and Google ones. Because I use Qt and Python for most work on Neo Ports Manager I tend to RTFM a lot and one of the things I truly love about using KDE’s Konqueror webbrowser is I can go to the address bar and

qt3: someclass

and it will take me there, in fact I have it setup in Flock at the moment to use qt3, qt4 e.t.c as keywords to take me to the index. The thing is, I would like to search, after all there is a bloody search bar !

I tried looking online on how to make one but didn’t find any thing helpful, I think the stuff was written for Firefox 1.x so to heck with it. I opened profile and looked for where the search scripts were located. My laptop and desktop use Flock as the default web browser but the only difference this should make here is that my profile is stored in ~/.flock instead of ~/.mozila/*

The searchplugins are in your user profile, for me with flock it is:

/home/Terry/.flock/browser/t247gnll.default/searchplugin

On Windows the profile goes in your %UserProfile%Application Data in a folder such as mozillafirefoxprofile-name or flockbrowserprofilename depending on the browser you are using. Don’t have a Mac so dunno where it goes on there but thats why there is a FAQ online 😉

In here are several XML files,

Terry@dixie$ ls                                                            7:25
dictcc.xml gmail.xml qt3.xml youtube.xml
dictionarycom.xml photobucket.xml weathercom.xml
Terry@dixie$ 7:26

Each one is a search plugin in the search bar in the top right of my browser, qt3.xml is a file of my own creation.

If you are like me, when you are surfing the fine web you occasionally look at the URL’s of the web pages you visit, since I spend alot of time looking around at the Qt documentation I know that the documentation for each class is stored as ClassName.html in a specific folder on trolltechs web servers. This means if you can find out how your favorite website stores it’s files you can create a search plugin for nearly any website on the world wide web !!!!

I opened the dictcc.xml file to see how it is done, so simple it is easy as pie. And unlike Operas easy way of doing it in the GUI, we can set an ICON to use in the search bar 🙂

Qt class docs are in http://doc.trolltech.com/major-version.minor-version/classname.html so we want the text we type in the search bar to be replace the classname part of the URL with out search text, we do that with a little string interpolation.



Qt Toolkit
Qt3 - Search all classes
UTF-8
data:image/x-icon;base64,
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABtUlEQVQokY2Rv0sbYRjHv+97d1zu
8gtzwauGGmgjXU+hpaVCMlUMDnZox4IS/AvcCg4Obv4HLZk6dNLFJJ3SQoYkpSTQVUMj8Vf10KaX
O+Jd7u2QkHha0O/4PJ8Pz/PwkE8/XuB+cWwGBv6eNIAri7nuLeG4Yde/WidNGwxqXNBS0uRjod+S
QxQAGa7EXOSz7Uquw9jIJwRP5+V0JkzpoDKakM+2y7sdUSJzS4HEjAiC/Vq3tGNUCyaAxdVwH6PD
TSq5jiiRzKaSfBOIJYSwwkVjfGZT8cn0+xfzcM/2CPVvFmN4uRRQ4wIA49LNruufty7OWr25137G
UC+aHuH0lw0goYlD+qzljKncwyfC9IwI4PTA8QiDE6/Rnuq1DI5W40Lj59VevTs+xetHTmSCo5Sc
HzrZdX161gdAneI9E7SURAhKO0bkAfd2bWxlQ1neUKIxXj/ulXc7hEBLyR5h4pHwbMHftdiH9/p5
yzEu3b8Xvf72AHwBGowMyNHjXBf5j3+qBfPG46QgNdvu87Q/nQl5hH6O9u1a0frdtAGMx3ktKYei
XGnbePUuyPHkP8KdoXcj3vwDRIGtlNEJQYAAAAAASUVORK5CYII=





I saw that icons were encoded in Base64 much like with E-Mail attachments by looking at the dictcc.xml file so I wanted to include an icon for my qt3.xml search plug.

So I went to trolltechs website, downloaded their logo, opened it in kolourpaint and resize/scale’ed it down to 16×16. I then searched for a base64 encoder/decoder that could handle more then plain text, because opening an image file in a text editor to copy/paste is a pain in the neck. I consider this fair-use of the logo, if Trolltech doesn’t they can write me a search plugin ^_^.

I copy and pasted the encoded form of the icon into the file as you can see above and volia we have a search plugin muhauahauha ! Then saved the file, restarted flock, wrote “QLineEdit” in the search bar without qoutes and clicked the ‘Qt Toolkit’ entry and flock opened a new tab with the QLineEdit class documentation for Qt3.3 ;-).

In a few minutes I will make a Qt4 one and change the ShortNames accordingly. With a little attention to detail this means a search plugin can be created by most any user for most any website. In fact with a little work I could probably set it up so I could search the [SAS] or PC-BSD forums this way, either through the search functions ability to look for topics posted or by thread #’s to go straight to a thread (which would not be fun to have to search by!).

I wonder if with a little poking around at the Open Search and XML specifications if I could have the searchTerms passed on to a perl script to do a a few tricks and pass it back in… I should look at that option some day hehe.

I love it when people make it so you can plug into an application without having to compile crap !

so fscking tired…

I’ve spent most of the day hoping and jumping about doing things, a good headache is here to show for it too.

I’ve also got work very early tomorrow for which I’ve been reminded about 5 times in the past half hour and many more over the past 2 or 3 days — my thinking on the matter

If I could get /work/ done during the day rather then running ragged or worse. I wouldn’t be up till 5 in the F’ing morning !!!!