QTechnic

I’ve been working around in assistant and designer (qt3). Docuementation is pretty good and the system looks neat. TO be honest, I started on it because I was bored =/

When it comes to graphical toolkits I’m some what familer with Javas AWT (abstract window toolkit) as it was in the pre JDK1.0 days. I’ve never writen a AWT app. Dang gum it, get up for five minutes and the dogs all ready bamboozled me out of my spot ! So far I think I like QT, good solid documentation. Good GUI for making a GUI, and seems a pretty smart system for building graphical applications. I prefer ANSI C to C++ but C++ does have its virtues.

I once started a GTK+ C tutorial but I couldn’t stand the examples… To much of the GNU coding style in it. Just seeing a function ( like, this ); makes me cringe !

Personally I like functions like this:

type
name(parm1, etc); {
/* code */
}

and thats generally how I write C. When I first started learning programming in C++ I wrote out in the style the tutorial dictated, namely.

int main()
{
// Code
}

As various coding styles have always interested me and I like the idea of beauty meets readibility. I some how developed an attraction to keeping the opening sqiggy brace on the same line rather then the next line. I don’t know why but I find it more astectic.

sighs und curses

Been thinking a bit about a friends remark… A good mixture of delight and desiaseter in such thoughts but oh well. A spider can always dream. The odds of a girl friend as nutty about computers as I, is sadly slim. I’m the most “geeky” person I know in town. Aside from professionals with comute I’m also probably the only person in town who knows *nix.

Any way, I’ve been learning a new library. I’m some what able with the standard C library if a tad un-skilled. Not like I have many excuses for using every routine in my spare time xD So I’ve started on ncurses, much more interesting then GUI development IMHO because in a console level of usage. A good UI is a must, at least to be powerful yet eligent the way that Vi or Emacs are.

So far I’ve learned how to create a little window box and move it around with my arror keys. Not really useful but the concept it thought me was.

Mainly that we can loop threw calling getch() or simular routine till we get to our desired escape method. And use a switch/case setup to implement what we want to do on a given input. Like

/* from the file */
while((ch = getch()) != KEY_F(1)) {
switch(ch) {

case KEY_LEFT:
destroywin(my_win);
my_win = create_newwin(height, width, starty,--startx);
break;
case KEY_RIGHT:
destroy_win(my_win);
my_win = create_newwin(height, width, starty,++startx);
break;
case KEY_UP:
destroy_win(my_win);
my_win = create_newwin(height, width, --starty,startx);
break;
case KEY_DOWN:
destroy_win(my_win);
my_win = create_newwin(height, width, ++starty,startx);
break;
}
}

This and the ideas that come to me with this concept. Blow my mind away, I never thought that much about it. Really the most I thought about such things were based on Javas AWT. Although I’ve writen very little Java and I like it that way. I probably am most familer with Java then any other high-level language but I really do prefer C.

Hopefully in time, I’ll learn a lot more and maybe can work on some thing I’ve always wanted to do. You see, one part of my studies has been to try and take what I’ve learned and implement some thing. In the paste I’ve used an integer calculator to redesign to test my understanding of various ideas. I remember the first one I worked on, maybe 2 years ago was testing my abilities with Functions when I first started to learn C++

One of my hearts secret desires has been to design a niffty text editor, dang I’d love it. I could learn so much and working on it would give me some thing to do. If I could, I’d even like to try and implement a ‘vile’ style that merges vi/vim/emacs commands into a single modal editor. Plus give me a chance to make GUI front ends, good excuses to learn more OO and GTK/QT, maybe add wordstar key setups as an excuse to learn them. Not really necessary but still it’d be a fun project for my young mind to toy with.

dang it, my minds starting to wonder off to the first paragraph of this post, time to hit Vi and play with gcc.

Overload it !

Well, one thing I wanted to do with the little script I tossed together to rip out left over & broken symlinks from the Amarok.pbi. Was to make it possible to use it on any broken symlink. I redid it real nice and simple

blgrep.sh pattern options

i.e. grep for this and pass options to rm in case its needed. The only problem is that the type of file to track down was hard coded, i.e. ‘@’ or symbolic link. (man 1 ls). So I’ve made it much more compucated then it had to be to make it usable for just about any thing ls -F and file gives me. Usage is pretty simple and the path defaults to the current directory.

blgrep [path (optional)] [grep pattern] [rm options (optional)] [type, i.e. /*@%=|]

Still toying with it on how to improve its workings. Not really necessary to do any of this but I did enjoy the chance to get to know getopts/OPTARG/OPTIND, case and break/continue as they apply to BourneShell a bit more then I did. Doesn’t seem much different then what I’m used to really.

#!/bin/sh
# broken link grep
#
# This was writen to track down broken symbolic links. With some modifications
# it has been made to grep other things to kill.
#
# Probably should rename this file rmgrep or some thing.
#

export PATH='/bin:/usr/bin'

D_FLAG="./" # Directory to list
G_FLAG="" # Pattern to grep files output for
R_FLAG="" # Options to pass to rm
T_FLAG="" # For sed in ls|grep|sed pipeline
OPT_FLAGS="" # Storage

usage() {
echo ""
echo "Usage: blgrep [ -d PATH -g PATTERN -r RMOPTIONS -t TYPE]"
echo ""
echo "PATH is passed to ls, PATTERN passed to grep, RMOPTIONS"
echo -n "is passed to rm. See ls(1) for the -F option for more"
echo " info on TYPE"
echo ""
}

hunt() {
for BL in `ls -F "$D_FLAG" | grep "$T_FLAG" | sed "s/$T_FLAG//g" 2> /dev/null`
do
DEL=$(file $BL | grep "$G_FLAG" | sed 's/:.*//g' 2> /dev/null)
echo Removing: $DEL
rm $R_FLAG $DEL
# Havn't tested R_FLAG since before the getopts conversion.
done
}

################
# START #
################

if [ ! $1 ]
then
usage
fi

while getopts d:g:r:t:h OPT_FLAGS
do
case $OPT_FLAGS in
d) D_FLAG=$OPTARG;;
g) G_FLAG=$OPTARG;;
r) R_FLAG=$OPTARG;;
t) T_FLAG=$OPTARG;;
h) usage;; # Help
?) usage;;
esac

hunt # remove all matches
done

QNote

I want to rewrite the mkXML function and merge it withmuch of the code from fkBranch_AutoPB.sh. That way I can turn it into a flexible routine that will generate a PBC file accordingly iiregardless if it’s run from interactive or batch modes.

Mergemaster

Started merging files today, after a fit of the screamming heeby jeebies. Phone ringing off the hook, getting A.F.K.’d every 2 minutes and playing 20 Questions with ma. My brain could sync back to work…

mkProject has become a mondo sized function but is now fairly complete and handles the split between interactive and batch modes it self. The batchJob function will be most of fkBranch_AutoPB.sh.

Rather then line of execution being

Interactive or batch test
run mkHome, mkProject, mainLoop e.t.c.
or run batchJob
fkBuild

It is now more like this
mkhome
mkproject
Interactive or batch test
run batchJob if batch
run mainLoop if interactive
fkBuild

Where mainLoop is the interactive root function that all the interactive I/O and configuration methods lay. The batchJob call just starts processing the information from the data. I’m also adding a usage function.

scrap

Well, I’m a bit leery about it but I’ve done it. I’ve posted fkBranch_AutoPB.sh on PC-BSDs forums. I had hoped to have a proof-of-concept out of this scraptest file before I delete it but I doubt that will happen without help. I also wanted to merge it into pbshell.sh and complete the last stuff so I’d have both interactive and batch modes covered plus the planB method of PBI Creation.

The scripts not pretty but its just garbage for testing work, glad I don’t really write finished shell scripts like that..

Been busy attacking an old Java source book. it dates back to before JDK1.0 but its a fun read. Maybe I’ll take up Java I dunno. Recently I’ve been rather bored with most languages. Perl and Java study have kept me busy but the more I look into perl the more it looks like a great tool you don’t want to have to read what some one else wrote some day just to quickly fix a problem and never rewrote it. Java I’ve never cared for the extra OOTyping needed but its more C/C++ like then Ruby or Python and still a nice language. AWT looks like a simple to learn setup but I’ve yet to see many Java apps that look nice. I don’t know what is the most often used these days though, AWT, SWT, Swing, or other standard issue.

Being idle recently has been annoying, without any thing to work on what fun is there having some of the greatest tools ever made?

You know as long as no one changed the hier for home directories I could interate through each one setting up the icon files. If I could use PBC to just pack the project directory and do the rest with my script. It could work but that would mean for batch mode to work a special but very simple for joe blow to write project file would have to be created. HmmmmmM !!!!

bored

Without being able to make any progess with getting an automated PBI creAted. And about as much info about whats wrong with the PBC file I ran through PBC.

I basically have nothing better to do then toy with typing tests and ancient computer history. It would be so nice if some one could help figure out why PBC does not work with the PBC files.

sigh…

Trash, FUnk, and Crapola.

Some times I feel, as if I speak and no one cares. Maybe I should just learn to keep my mouth shut and my business to my self. I don’t know any more.

Perhapes I should halt my work, let it rot and be done with it. Just go home and head out to the CQC Range with team mates. Life can be a load of bollocks some times… So far I’ve been wanting very much to start re-learning emacs but I can’t stand the infernal editor ! I remember when I started I couldn’t handle Vim so I tried XEmacs and learned it all right. While I don’t remember the keybinds well I remember them enough, I’m just to “Vi minded” to use emacsen. Also my Vi User how to post is nearly finished, I’ve but a few more things to add to it.

Untill I can find out what is wrong with the PBC file created by my proof-of-concept scraptest or get necessary data on how to bypass PBC all together. Most of my work is for naught. Dang it, I remember I started the day before thanksgiving and practicly sat at my laptop for three days. I’m not really a shell scripter by nature, although I’ve vastly improved. I worked like a dog to get as much done while having to learn and prototype several things on the go +work ITRW. Took a few days off then hit at it again and again and again. As time would allow, now it’s in pretty good shape (near alpha imho) and with a proper rewrite my scraptest files could be fused into the main implementation.

Yet with out some fscking help to deal with PBI Creator or by pass it there is little more I can do, execpt maybe refine my icon configuration and finish the PBI.*.sh generator. My plans have been for it set up the PBI file to automatically do detection if the PBI is preinstalled or optionally a conficting/old version when ran. Maybe I should just change the files to bear the GPL (barf) and post them on the forums for some one else to deal with, I ‘m getting sick of this $]-[|+. I started work in November, it’s nearing January now and I can’t continue very much alone.

Funky Monkey

OK – We have progess and we have bugs.

To night I have completed most of what I would like to call scraptest code or testscrap code. Basically it’s my feelings for the kinda stuff ya just write to test it as you work on it with out meddling up your main source file/routines e.t.c. You could say it’s about as close to spagetti as I’m willing to get. I know what it does because I just wrote it ! And have time to comment it before re-writting it.

So far we are able to generate a PBI file pretty easy, the only problem is dealing with the PBI Files creation. I think I need to supply more info to the program before I can get a PBI that ‘works’ out of it, although aside from not even being able to pass www.pbidir.com standards. It’s a functional process – well it is essentially a throw away implementation but if I can gear it up. I’ll merge it into the main script file(s). It’s only a days work but it’s pretty good for the amature (me) and my wanting a proof-of-concept ironed out.

I’m not there 100% yet but I know there is a way to auto-mate the creation of PBI’s and I’m going to find it, some how, some way, some day !

Since nvi (afaik) only uses tabs and I have vim set to use spaces I think I’m going to be switched to using tabs instead of spaces for indentation. It beats having to toggle expandtab based on what editor I wrote the file in. When vim.orgs vim scripts section is up I’ll look for a fixer upper hehe.

I wish my mom would understand, I have got to be able to work. I need my freedom to pour into a problem till I solve it, with breaks of course but still long, through concintration. I know I’m not the best about getting things done (nor quickly) but I know I can solve this, aside from one really funky win-like feeling things have gone well. Sigh, I wish I could do more, learn more, be more…

Bubble brain

Well I’ve been working on a forked/branched off type thing of the origenal script. Geared for the purpose of auto-generating a PBI both as a proof of concept and development field. After its finished I’ll try to merge it into the main file (now interactive-branch). The only problem I see atm is icons. I’m going to try and get this version done so I can use it to show proof of concept that a script can be used to create a PBI file, with some measure of success.

It’s been going pretty well, some stretch converting stuff so getLibs can handle being run on a list instead as a part of a loop but all is good. Been doing most of the work in a ssh session on Vectra. So I’ve basically been using nvi instead of vim, good editor really. Well alls been good un till 20 minutes ago. My head feels like it’s in a bubble – total computational thought crash.

This is what happens when I have to play “hopping monkey” after dinner, my brain crashes and it don’t leave no coredump file for me to pick over what the frig I was analizing.

Ugh