Getting playful

I’ve been experimenting with extracting PC-BSD PBI on FreeBSD; mainly because I would like to do a little postmortem analysis on a couple of PBI’s, to see if the “Officially sanctioned” PBI Developers are still following the rules.

The process is actually a lot simpler then I thought it would be, the only problem is doing it in a chroot lol. Already more then 200MB in files in /tmp/chroot, and I’ve found that PBI must “assume” the presence of a lot of shit, because it will segfault if even simple things like awk or whoami are missing, let along bigger things 8=), what ever happened to error checking? But anyway, it’s a fairly easy thing to sort out, even with having to take a fair number of libraries and programs into the chroot, in order to fool the thing into -extract’ing. So far, I’ve only hit one snag:

/home/0/.PBItmp/.pbistart: ./PBI: not found

which I have not figured out yet.

I think I’ve also found the origin of one of the more stupid elements of the PBC Sh API, and it seems to reflect the PBI sub systems source, judging by what I see in PC-BSDs Subversion >_>. It also reminds me, that some people seem to have never heard of a symbolic constant in their entire lives…. which also explains a few other things about the PBI Creation process and PC-BSD in general. Since PC-BSD, unlike a *real* BSD system, does not believe in documenting anything. I’ve had to go straight to the (also undocumented) source for answers, it also temps me to write a detailed review and commentary – but I’ll keep my mouth shut for now. The number of people they will probably buttfuck in the long run is their own concern, I’ve already left. I’m not really interested in shifting through several thousand lines of intermixed Bourne, Bourne Again, and C++ code just to audit a few PBI; let some other poor schlep, eh Good Samaritan deal with this schlockware.

If my post doesn’t make it obvious by now, the reasons why I was conducting the tests within a chroot environment, rather then sparing myself the trouble -> I wouldn’t let the PC-BSD developers, or most peoples PBI touch one of my systems with a ten-thousand foot cattle prod, and I don’t have time for setting up a jail. That is the kind of feelings I’ve got for the project, after using PC-BSD for years; now OpenBSD, FreeBSD, and NetBSD on the other hand, them I trust… and have seen the resulting work to warrant it lol.

– A strict son of a bitch.

Oh wonderful day….

Spend my afternoon trying to out lag suspects on SWAT 4, with a ratio of 5:1 rounds per kill them:me. Managed to sit down with the laptop, start compiling a list of libraries to standardize on, and at long last – there’s actually good stuff on TV. Fast foreward a few hours, now Ma is using my DVD player to watch her new movie; being hard of hearing like everyone else in my fscking family, I’m gonna be deaf from how high she has the volume lol. Even worse, between her and the dogs, I’m getting crowded off my bed… laptop and all.

And I’ve still got a few dozen libraries to sort through before dinner…. why do I even bother? Doing anything in this place, is like trying to put a hole in ones head -> not good for ones survival, unless ones name is Egon Spengler!

to do: finish research on text, cgi, html, http, gtk, tk, and x11 relateds.

*sigh*

Why I love Perl…..

For a little project, I basically need a quick but simple way of translating things from one format to one of another; the catch? How to do it! I figured, a hash would be a great way to do it, since each of the translations can be quickly processed as translate_from => translate_to. The problem? There’s a fair # of keys and values, most hashes I encounter in Perl are written like this:

# modern
my %hash = ( foo => 1, bar => 'string', );
# classic
my %hash = ( 'foo', 1, 'bar', 'string', );

the main value of the arrow operator => is that we get to skip quoting the hashes key… but wtf good is it, if we have to quote each value, because they are all strings in our hash? So I sat and thunk for about 45 seconds and wondered…. wouldn’t it be so wonderful, if I could say something like qw/key1 value1 key2 value2 …/ and format it much like the classic style for legibility, but not have to write *any* quotes for the strings?

Attempting it 2 minutes later:

my %hash = qw/foo  1
bar string
... ...
/;

It never actually occurred to me before, b/c almost every time I care about hash keys, is w hen I can use a hash as a form of quick dynamically created storage for data, that I will probably want to walk across both the keys and values on later. But since qw/foo bar/ is equivalent to (‘foo’, ‘bar’), it works just perfectly here!

Perl is not the most beautiful language, it’s a language for *getting the job done*, and in that spirit, has 1000s of little things that help make things less painful -> like not having to quote every dang gum key value in a hash lol. One thing I also like abut Perl, I can always read my scripts 6++ months later 😉

I love this tool, lol.