Friday, December 29, 2006
Well it approches new years... I don't have any thing I wish to say about the holidays at the moement. SO far, I feel as if I'm ready to spread out but I'm told to wear shoes two sizes to small. I could go so much further given what I need.. yet I'm stuck shoveling $|-|1+. To day at work I thought up an interesting project, one that I could use to teach me a lot more about Object Oriented design and implementations. Some thing I could sit down and attack it till I learned every thing I'd need to finish it, then vim around till it was a master peice some day. The end result? I don't ph|_|{|<1|\|6 have the bloody time to do it. Ether to program it all or to learn what I need and would love to learn to do it. Finnally this weekend I get some time off, four days and I'm spending it on the servers. Get my fat NCO arsch back to duty. Even my studies for a new language have been going slow. I wanted to work on learning a word a day, complete with the words sex, spelling, and pronouciation.
Sunday, December 24, 2006
PBI Backup and Recovery planning
Well to make a long story short. On my desktop every *mozilla program I install on BSD or GNU/Linux has funky issues with text fields, all other GTK+ apps are fine though. The only ones not to be borked are the PBI versions I've used on it and my laptop. So needless to say I was a little apprehensive about updating from Seamonkey 1.0.4 to 1.0.6. I like _stable_ software more then bleeding edge. Now I don't mean to offend any one because I don't but, huh www.pbidir.com 's content is not always 'stable' by the time its approved. So, having no way to reinstall Seamonkey 1.0.4. from PBI I desided I'd do a little test on how to back it up manually so I could reinstall it with the least effort. Now of course the fact that speed and power are to of my favorite reasons to use the command line, I'll include a screen dump of my seassion as well as an explanation of doing it the *GUI* way. Be warned offten there is a /Programs/.sbin/program shell script to be backed up. I think its to do with making sure PBI apps use there /Programs/$1/libs directory, proper GTK/Pango crap and give us that annoying crash handler when they get killed. Any way here we go laddy. The best thing to do would be to open Konqueror as root, you can do that by using the K-Menu to find it, or type kdesu konqueror in konsole or use the run dialog. First lets look in /Programs/ to find are app, in my case SeaMonkey1.0.4. We want to back up this directory. A quick tarball will do the job, in Konqi you can do this with a right click since Ark is installed. I'd suggest ether a gzipped tar file or zip file depending on your needs. I keep my backups on ad0s1 which is a 20GB UFS2 partition. I have my mailbox and roaming profile on my USB stick so I backed that up as well. The "/usr/local/share/applnk/My Applications/Seamonkey" folder has our K-Menu entry so we want to back that up, beats rewritting the .desktop file(s). Plus to be safe and keep all my settings I backed up my ~/.mozilla folder. If this was a multi-user laptop a shell script would be good, I wrote a quick run'n'tosser in vi to back it up. If one wanted a script could be made to backup and restore the thing. After completing my backups I uninstalled the PBI and installed the new one, it had been downloading while I backed up.
Terry@Dixie$ cd /Programs 4:17 Terry@Dixie$ su 4:18 Password: Dixie# mkdir /Backups/Seamonkey1.0.4 Dixie# cd SeaMonkey1.0.4/ Dixie# ls PBI.FirstRun.sh etc pangorc PBI.RemoveScript.sh include seamonkey.png PBI.SetupScript.sh lib share bin libdata Dixie# cd .. Dixie# tar -czf SeaMonkey1.0.4_BACKUP.tar.tgz ./SeaMonkey1.0.4 Dixie# cp -r /usr/local/share/applnk/My\ Programs/SeaMonkey /Backups/Seamonkey1.0.4/SeaMonkey_KMenu_Entry.d Dixie# mv SeaMonkey1.0.4_BACKUP.tar.tgz /Backups/Seamonkey1.0.4/ Dixie# ls /Backups/Seamonkey1.0.4/ SeaMonkey1.0.4_BACKUP.tar.tgz SeaMonkey_KMenu_Entry.d Dixie# PBIdelete -list|grep -i Seamonkey SeaMonkey1.0.4 Dixie# cp -rp /Lexar/Mozilla /Backups/Seamonkey1.0.4/ Dixie# cd /Backups/Seamonkey1.0.4/ Dixie# tar -czf ./SM_Mail.tar.gz /Lexar/Mail tar: Removing leading '/' from member names vi /Backups/Seamonkey1.0.4/profiledump.sh #!/bin/sh export PATH='/bin' for n in `ls /usr/home/` do cp -rp /usr/home/$n/.mozilla /Backups/Seamonkey1.0.4/$n.mozilla done Dixie# chmod 700 .//profiledump.sh Dixie# ./profiledump.sh Dixie# ls -l total 45478 -rw-r--r-- 1 root wheel 19905054 Dec 24 04:26 SM_Mail.tar.gz -rw-r--r-- 1 root wheel 26620953 Dec 24 04:20 SeaMonkey1.0.4_BACKUP.tar.tgz drwxr-xr-x 2 root wheel 512 Dec 24 04:23 SeaMonkey_KMenu_Entry.d drwx------ 3 Terry Terry 512 Dec 21 21:48 Terry.mozilla -rwx------ 1 root wheel 129 Dec 24 04:47 profiledump.sh Dixie# PBIdelete -remove SeaMonkey1.0.4 Removing SeaMonkey1.0.4 Running custom removal script Removing Directory Cleaning PBI List SeaMonkey1.0.4 was removed successfully! Dixie#To restore it I could have put things back as the were. There was no .sbin/seamonkey file to backup that I noticed so I'd hope it would've still worked but. Alas thats PC-BSD...
Friday, December 22, 2006
headaches
Sheesh, between mothers, school, and demos my head hurts !
Installed MOHAA just for fun while I downloaded the ArmA demo. Our DSL got upped to a 2.9MBps down / 322KBps up range just in time to Download from a slow server. The game looks good but I don't know how well I can play it. Needless to say I think my video card is lower spec then older models. Geforce 6200 and a TV Tuner not what I had in mind, I wanted a Geforce 6600 at least but I got a pre-build :@
The game is nice, I hope there will be a way to have focus follows crosshair style movement it would be kinda nice. It also looks like a game where it pays to top off the ammo supply before moving out.
Installed MOHAA just for fun while I downloaded the ArmA demo. Our DSL got upped to a 2.9MBps down / 322KBps up range just in time to Download from a slow server. The game looks good but I don't know how well I can play it. Needless to say I think my video card is lower spec then older models. Geforce 6200 and a TV Tuner not what I had in mind, I wanted a Geforce 6600 at least but I got a pre-build :@
The game is nice, I hope there will be a way to have focus follows crosshair style movement it would be kinda nice. It also looks like a game where it pays to top off the ammo supply before moving out.
Wednesday, December 20, 2006
Memories.
Was reading a few of my old files, dunno if I feel better or worse from the thoughts incured.
I remember when I was transfering files to my desktop, most basically live on my laptop now. I cleaned up a directory of my personal writings. I delted a few and saved a couple. The book I was writing, balls never finished that. A little play'esq script, few old love notes.... closest I ever came to writing poetry.
*sigh* some times life sucks. My mind sure doesn't help me any, I'm supposed to be sleeping but I'm wide awake.
Fuuy, maybe I should try to forget some of the past, good times with the bad and be done. Doesn't help much though does it...
I'm going to bed, s'only work tomorrow. Same old boring labor, nothing new to learn.. I want to grow but I keep hitting the walls. If I could do more in the [SAS] I'd have joy in that but I still got to work. If I had the time to devote to study, I could maybe make a decent programmer or system admin but I've got work and school to do. Bastard of a system, who cares for tests about the 'laws of english' compared to artistry ? To me at least computing from a programming perspective is an art form, not a lot of people under stand that about me. To them its just me wasting time infront of a computer, to me its expression, its art, its design, its apart of me...
The more time I have to spend at it, the more often I enjoy it and the better I grow at it. Frig man, I've got my figers in C, C++, Java, Perl, Python, Ruby, not to mention sh script, and html/css markup. I might not be good at any of them but when your lucky to be able to devote more then a few hours a week. You can't be expected to master a life time of ability over night.
**** it, I'm going to bed, worry about it later.
I remember when I was transfering files to my desktop, most basically live on my laptop now. I cleaned up a directory of my personal writings. I delted a few and saved a couple. The book I was writing, balls never finished that. A little play'esq script, few old love notes.... closest I ever came to writing poetry.
*sigh* some times life sucks. My mind sure doesn't help me any, I'm supposed to be sleeping but I'm wide awake.
Fuuy, maybe I should try to forget some of the past, good times with the bad and be done. Doesn't help much though does it...
I'm going to bed, s'only work tomorrow. Same old boring labor, nothing new to learn.. I want to grow but I keep hitting the walls. If I could do more in the [SAS] I'd have joy in that but I still got to work. If I had the time to devote to study, I could maybe make a decent programmer or system admin but I've got work and school to do. Bastard of a system, who cares for tests about the 'laws of english' compared to artistry ? To me at least computing from a programming perspective is an art form, not a lot of people under stand that about me. To them its just me wasting time infront of a computer, to me its expression, its art, its design, its apart of me...
The more time I have to spend at it, the more often I enjoy it and the better I grow at it. Frig man, I've got my figers in C, C++, Java, Perl, Python, Ruby, not to mention sh script, and html/css markup. I might not be good at any of them but when your lucky to be able to devote more then a few hours a week. You can't be expected to master a life time of ability over night.
**** it, I'm going to bed, worry about it later.
Tuesday, December 19, 2006
Nutz
I'm going crazy... Positively crazy. Its like no matter what day it is, I get a
headache around the 2200-0100 GMT range, maybe its because thats the time ma
gets active again on her days off..
Driving me nuts. Sucks to live with a headache, can't take aspirin
e.t.c. For it all the time because then you kill your stomach.
headache around the 2200-0100 GMT range, maybe its because thats the time ma
gets active again on her days off..
Driving me
e.t.c. For it all the time because then you kill your stomach.
Sunday, December 17, 2006
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
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.
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 !!!!
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 !!!!
Saturday, December 16, 2006
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...
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...
Thursday, December 14, 2006
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.
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.
Wednesday, December 13, 2006
QEMU
How to install PC-BSD using the QEMU Emulator
What is QEMU?
QEMU is software that allows you to emulate another computer in order to
install and use an operating system on your physical machine without actually
installing it. Much like a Famcom emulator uses software to create the
impression to a game ROM that it's really running on a Nintendo 8-Bit console.
It's really running on your PC. It's basically the same thing.
For Windows you can download QEMU as a ZIP archive and unpack it to any working
directory. If your using an older version of windows you may want to install a
program such as 7-Zip or WinZip (I reccomend the former). In order to use the
accelerator module you need to download it as well. You can find a link to it
on the main QEMU web site. Un pack the archive (it's tared and bzipped, try
7Zip or WinRar). Copy the kqemu.inf and kqemnu.sys files to your QEMU
installation.
If you are using a Unix/Linux system it is best to use what ever package
management system you have to install it. One should be able to find an RPM or
Deb for there system. PC-BSD users can install QEMU and KQEMU via PBI which
includes a simple GUI for setting it up.
The KQEMU module will make the installed system faster but it is not open
source software. Qemu is Open Source and Free Software. Installing this will
likey vary from system to system.
Qemu Website
http://fabrice.bellard.free.fr/qemu/
Qemu for Windows
http://www.h7.dion.ne.jp/~qemu-win/
I will deal with using QEMU at the command line since it is the only portable
interface (Win, Lin, BSD, Mac). If your using a Unix/Linux system strip off the
".exe" every where.
Find the location of QEMU on your system once it's installed. Open a terminal
emulator (command prompt window) and change directory to it's location like
this, cd "C:\Program Files\QEMU\" or if using a Uinx/Linux system you can check
it's installed location with the command "which qemu" -> C Shell users may have
to "rehash" after installing qemu before they can run it.
Now since QEMU does not use your actual hard ware (it emulates it's own) you
need to create a file that QEMU can use to store data (acts like a hard drive
or swap file). We can create a harddisk image file in several different
formats. "raw" which should be portable between emulation software. "qcow"
which is probably the best choice for Windows systems. "cow" for Linux systems,
"vmdk" which makes a VMWare image, and cloop which ya don't want to toy with
right now !
Depending on the format used the size of the file should grow till it reaches
the limit we give it. Now PC-BSD should fit on a 6GB hard drive but to get any
real work done 15GB would be more realistic, assuming you like to store a lot
of photos, music, and video files. Then again for getting real work done you
should install an operating system not use an emulator (in my humble opinion).
It is good for testing things though but a few things to remember.
0.) Emulated hardware does not relate to YOUR hardware. So some things may work
or not work after really installing an operating system. Just the same some
things may not work in the Emulator but may work on the real system as the
emulator is simulating hardware.
1.) The system will run much slower then had you really installed it. Not only
is it going to use an alloted amount of memory (RAM) your computer will all
ready be running it's current operating system and other softwares. This is not
suitable for the "faint hearted" machines. The test system I have runs a
Pentium D 930 (2 x 3.0Ghz) CPU and 2048MB (2GB) of fast DDR2 Memory.
3.) With virtual solutions some times odd things about software just "don't"
work but are fixed when installed on the real system. Like wise it can be the
other way around.
4.) A lot of things won't work under emulation or not well, i.e. 3D Games e.t.c.
Ok phase one we will create a disk image to install an operating system on. I
suggest 5GB minimal, for this I will use an 8GB image file. Thanks to having a
500GB hard drive xD
qemu -create -f qcow acd.img 8G
The syntax as you can see is `qemu-img -option -f format filename sizeG. Now we
have to basic options on how to install, we can boot the emulator off a CD/DVD
or an ISO image.It's rather nice if you can use the ISO image and save your
self from burning a CD-R just for testing the system.
If using a Windows system
qemu -L . -cdrom "\\.E:" -hda acd.img -m 512 -boot d
If using a FreeBSD system
qemu -cdrom /dev/acd0 -hda acd.img -m 512 -boot d
The device names vary from Unix to Unix some tiems even Linux Distro to Distro.
It will probably be some thing like /dev/scd0 on a Linux based system.
Now this is very important the number after the -m is how many megabytes of
memory to give the emulated "virtual" PC. In my case I chose to allow 512MB of
Memory to run PC-BSD under emulation.
Now if you want to use the ISO image file it's slightly different.
Windows
qemu -L . -cdrom Imagefile.iso -hda acd0.img -m 512 -boot -d
Unix/Linux
qemu -cdrom Imagefile.iso -hda acd0.img -m 512 -boot -d
After the system is installed you can run it like so
Windows
qemu -L . -hda acd0.img -m 512
Unix/Linux
qemu -hda acd0.img -m 512
To try and enable KQEMU for more speed add a "-kernel-kqemu" option like so
qemu -hda acd0.img -m 512 -kernel-kqemu
The system should now boot and you can see how it works.
I've installed the system but it is very slow, taking about 2 times longer to install then normal and many minutes to boot + without sound or network. I don't have KQEMU so it makes emulated hardware feel faster then our first Pentium PC (with 32MB of memory). If my laptop wasn't so slow I might try it out that way. For running WinVista I'd say go with KQEMU on a system with 4GB of RAM and a lot 3.5 GB for it hehehehahhA !
What is QEMU?
QEMU is software that allows you to emulate another computer in order to
install and use an operating system on your physical machine without actually
installing it. Much like a Famcom emulator uses software to create the
impression to a game ROM that it's really running on a Nintendo 8-Bit console.
It's really running on your PC. It's basically the same thing.
For Windows you can download QEMU as a ZIP archive and unpack it to any working
directory. If your using an older version of windows you may want to install a
program such as 7-Zip or WinZip (I reccomend the former). In order to use the
accelerator module you need to download it as well. You can find a link to it
on the main QEMU web site. Un pack the archive (it's tared and bzipped, try
7Zip or WinRar). Copy the kqemu.inf and kqemnu.sys files to your QEMU
installation.
If you are using a Unix/Linux system it is best to use what ever package
management system you have to install it. One should be able to find an RPM or
Deb for there system. PC-BSD users can install QEMU and KQEMU via PBI which
includes a simple GUI for setting it up.
The KQEMU module will make the installed system faster but it is not open
source software. Qemu is Open Source and Free Software. Installing this will
likey vary from system to system.
Qemu Website
http://fabrice.bellard.free.fr/qemu/
Qemu for Windows
http://www.h7.dion.ne.jp/~qemu-win/
I will deal with using QEMU at the command line since it is the only portable
interface (Win, Lin, BSD, Mac). If your using a Unix/Linux system strip off the
".exe" every where.
Find the location of QEMU on your system once it's installed. Open a terminal
emulator (command prompt window) and change directory to it's location like
this, cd "C:\Program Files\QEMU\" or if using a Uinx/Linux system you can check
it's installed location with the command "which qemu" -> C Shell users may have
to "rehash" after installing qemu before they can run it.
Now since QEMU does not use your actual hard ware (it emulates it's own) you
need to create a file that QEMU can use to store data (acts like a hard drive
or swap file). We can create a harddisk image file in several different
formats. "raw" which should be portable between emulation software. "qcow"
which is probably the best choice for Windows systems. "cow" for Linux systems,
"vmdk" which makes a VMWare image, and cloop which ya don't want to toy with
right now !
Depending on the format used the size of the file should grow till it reaches
the limit we give it. Now PC-BSD should fit on a 6GB hard drive but to get any
real work done 15GB would be more realistic, assuming you like to store a lot
of photos, music, and video files. Then again for getting real work done you
should install an operating system not use an emulator (in my humble opinion).
It is good for testing things though but a few things to remember.
0.) Emulated hardware does not relate to YOUR hardware. So some things may work
or not work after really installing an operating system. Just the same some
things may not work in the Emulator but may work on the real system as the
emulator is simulating hardware.
1.) The system will run much slower then had you really installed it. Not only
is it going to use an alloted amount of memory (RAM) your computer will all
ready be running it's current operating system and other softwares. This is not
suitable for the "faint hearted" machines. The test system I have runs a
Pentium D 930 (2 x 3.0Ghz) CPU and 2048MB (2GB) of fast DDR2 Memory.
3.) With virtual solutions some times odd things about software just "don't"
work but are fixed when installed on the real system. Like wise it can be the
other way around.
4.) A lot of things won't work under emulation or not well, i.e. 3D Games e.t.c.
Ok phase one we will create a disk image to install an operating system on. I
suggest 5GB minimal, for this I will use an 8GB image file. Thanks to having a
500GB hard drive xD
qemu -create -f qcow acd.img 8G
The syntax as you can see is `qemu-img -option -f format filename sizeG. Now we
have to basic options on how to install, we can boot the emulator off a CD/DVD
or an ISO image.It's rather nice if you can use the ISO image and save your
self from burning a CD-R just for testing the system.
If using a Windows system
qemu -L . -cdrom "\\.E:" -hda acd.img -m 512 -boot d
If using a FreeBSD system
qemu -cdrom /dev/acd0 -hda acd.img -m 512 -boot d
The device names vary from Unix to Unix some tiems even Linux Distro to Distro.
It will probably be some thing like /dev/scd0 on a Linux based system.
Now this is very important the number after the -m is how many megabytes of
memory to give the emulated "virtual" PC. In my case I chose to allow 512MB of
Memory to run PC-BSD under emulation.
Now if you want to use the ISO image file it's slightly different.
Windows
qemu -L . -cdrom Imagefile.iso -hda acd0.img -m 512 -boot -d
Unix/Linux
qemu -cdrom Imagefile.iso -hda acd0.img -m 512 -boot -d
After the system is installed you can run it like so
Windows
qemu -L . -hda acd0.img -m 512
Unix/Linux
qemu -hda acd0.img -m 512
To try and enable KQEMU for more speed add a "-kernel-kqemu" option like so
qemu -hda acd0.img -m 512 -kernel-kqemu
The system should now boot and you can see how it works.
I've installed the system but it is very slow, taking about 2 times longer to install then normal and many minutes to boot + without sound or network. I don't have KQEMU so it makes emulated hardware feel faster then our first Pentium PC (with 32MB of memory). If my laptop wasn't so slow I might try it out that way. For running WinVista I'd say go with KQEMU on a system with 4GB of RAM and a lot 3.5 GB for it hehehehahhA !
Monday, December 11, 2006
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...
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...
Sunday, December 10, 2006
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
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
Thursday, December 7, 2006
Late shift
I've tweaked a few things based on my templetfications of the PBI.*.sh scripts, I can't finish the process totally right now because I'm not at my laptop. While I keep the working (i.e. working on) copy of the file on my Lexar the actual project files including the templets are on my laptops HDD.
To do
I don't want ot have to use PBI Creator for this but if I can get by with generating a PBC file and running PBI Creator from the program. Using the PBC file to provide only what my system can't do it it's self. It might make a stop-gap for releasing it early but if it turns out to be the only way. At least it will be ready, not a set back. Considering that PC-BSD is open source under a BSD style license. I could probably poke around and try to find out how to implement some thing my self given enough time but some how I feel that would be redefining the words. Having to "Reverse Engineer" a "Open Source" application which is really an Oxy Moron if I ever heard it. So if the developers can't help me bypass PBI Creator.... I'll have to live with it and scream bloody murder if changes to PBI Creator & the .pbc file format ever phL|{|<$ /\/\3 over.
To do
- Finish pbi installer scripts and option to allow user to hand edit them using kwrite or ee
- Allow user to input the license and save it to a file to make a K-Menu link
- Fool proof icon setup
- Implement GTK+ support to getLibs // Prolly not till later
- Add demaind + support for a readme file and weblink k-menu entry, add associated functions
- Sort out templets to check if pkg is all ready instaleld, if possible also check for PBI.
- Implement "planB" routine(s) to fork out of fkBuild and wrap around PBI Creator, creating a minimalistic PBC file just in case
I don't want ot have to use PBI Creator for this but if I can get by with generating a PBC file and running PBI Creator from the program. Using the PBC file to provide only what my system can't do it it's self. It might make a stop-gap for releasing it early but if it turns out to be the only way. At least it will be ready, not a set back. Considering that PC-BSD is open source under a BSD style license. I could probably poke around and try to find out how to implement some thing my self given enough time but some how I feel that would be redefining the words. Having to "Reverse Engineer" a "Open Source" application which is really an Oxy Moron if I ever heard it. So if the developers can't help me bypass PBI Creator.... I'll have to live with it and scream bloody murder if changes to PBI Creator & the .pbc file format ever phL|{|<$ /\/\3 over.
Wednesday, December 6, 2006
All or nothing
I've gone as far as I can go without being able to generate a PBI file. I've e-mailed Tim for help but I don't know what the response will be at all. I do know I want to avoid using PBI Creator for any thing as much as possible. I've also begun setting the ground work for setting up the PBI.SetupScript.sh & PBI.RemoveScript.sh templets to encourage more advanced users to handle interaction with the user based on whether KDE is running or not. Sigh, oh most time to head back to work for a second supprise shift.
General blah
Starting to hit that busy season, looks like I'll probably be working (lightly) even on Christmas day. My endovers to automate PBI generation are only lacking the ability to create a PBI file. I know I could just use it to create a .pbc file to use PBI Creator in but PBI Creators issues have been my major reason for not submitting many PBI. I want to move from creating custom install scripts during the build process and instead mod a templet to meet the needs of the project. Short of the out right refusual to help in the PBI generation sector this things going to be completed if I have to install PC-BSD via emulation on my desktop. Installed ksh93 on Vectra to day, looking for a replacement for tcsh with vi editing mode. Only to learn that tcsh has a vi editing mode, slightly different then bourne styles after reading the manuals +S Ksh93 looks live a very good shell so far, I basically wanted a version of ash with completion but without the size of bash. Well I think bash is smaller then ksh but oh well I 'm used to zsh now :-) I also set up my .profile to split config into .kshrc if I login using ksh93 instead of (a)sh. I've got to finish my home work and vi how to, rather do the how to then the school work. Been a very stressful day, I never seem to be able to get any rest. Even when I do it's usually crap. After most of a week, I finnally got to read my mail.... My work with this PBI thing should have been finished the day after Thanksgiving but I couldn't get the time to do it all in a stretch. Life doesn't always match up to desire.
Saturday, December 2, 2006
Labor
Ok been working on a Vi user how to, I want ot ge that finished by monday. Note to self disable my word wrapping settings before editing the file.
I tested the *.desktop files a bit and I've tweaked the program accordingly. getInput now asks for a K-Menu name for the program, should it run in a terminal or not (with a function to handle that). The mkXML file now is ready to handle the new data and sets Startup Notifications on for every thing. MIME types, Web links, and Doc links aside I think mkXML is read op.
One thing I have learned is that Regular Expressions are fun things, makes life very easy at times :-)
Really using a mix of unix util in the shell I think one could bypass a text editor all to gether but the slide-sling of file redirection makes me understand how editors like ed and ex became standard programs in UNIX before vi was created.
I tested the *.desktop files a bit and I've tweaked the program accordingly. getInput now asks for a K-Menu name for the program, should it run in a terminal or not (with a function to handle that). The mkXML file now is ready to handle the new data and sets Startup Notifications on for every thing. MIME types, Web links, and Doc links aside I think mkXML is read op.
One thing I have learned is that Regular Expressions are fun things, makes life very easy at times :-)
Really using a mix of unix util in the shell I think one could bypass a text editor all to gether but the slide-sling of file redirection makes me understand how editors like ed and ex became standard programs in UNIX before vi was created.
Vi User How-To
Welcome to an introduction and usage study of one of the worlds most common text editors. It is also my favorite style of editor. We cover several sections each detailing a given aspect of the Vi editor.
Document Version: 0.90.0
This post has the underlying assumption that you want to learn to use the Vi text editor but know jack about it. I won't insult you but I'll try to teach it without being to terse or "hand holding". We all need help but one has to put in a little bit of effort to master a program.
I have always cared more for content and understandable English then for closely following the "laws of the English anguage" so forgive any grammatical errors and ether curse or help improve the content :-P
Short History
In 1976 a man named Bill Joy wrote the Vi text editor for an early BSD release. It took the existing ed and ex line editors and created a visual interface. While ex was a simple line editor vi gave us an interface much more like what we are accustomed to in this era.
Vi is a modal text editor which means that depending on what editing mode one is in at any given time what each key does changes. Vi has thankfully only two editing modes of importance command and insert. Unlike common editors such as Emacs or Kate commands are entered by shifting the entire keyboard into command mode and back into insert mode to continue inserting text. This modal concept is probably the biggest adjustment new users have to make when learning Vi. Some notable influences on the Vi command set was the ADM3A terminal which had the Esc and left Control keys where the Tab and Capslock keys are on modern US_QWERTY keyboards. There was also arrows on the H, J, K, and L keys which intern became the Vi movement keys.
Picture of ADM3A Keyboard
Which Vi is my Vi ?
There have been many vi implementations and clones through the years and on many systems but you can always count on an Unix to have a Vi. By high decree of the POSIX (Portable Operating System Interface for uniX). It would be best that before you try to start learning how to use Vi you learn what type of Vi editor you have. Many GNU/Linux systems will use a Vi clone in place of Vi while BSD Unix's use nvi. This how to should be relivent to every Vi/Vi Clone but most Vi Clones have a lot more to offer then Vi does.
Vi is the classic BSD
implementation now free and open source under a BSD style license.
Nvi is a re-implementation of Vi used for the 4BSD release when the original Vi was considered encumbered code. This is what is like wise used on Free, Net, Open, PC, and Desktop BSD and the focus of this how to.
Elvis is a Vi clone that adds a number of features and commands. Elvis functions on Unix, Dos, NT, and OS/2 systems both as a console and graphical application. It is standard issue on Slackware Linux for the systems vi program.
Vim or Vi IMproved is a Vi clone that implements many additional features and options. It's known to run on many platforms including Amiga, GNU/Linux, Mac OS X, Windows, OpenVMS, OS/2, and Unix like systems. Vim supports several graphical user interfaces including Motif, GTK1, GTK2, and Athena versions. It is also what this post was written with.
Vile was initially derived from an early version of Microemacs in an attempt to bring the "modern" benefits of the Emacs multi-window/multi-buffer editing paradigm to users more comfortable with the vi command-set. Vile functions on DOS, Windows, OS/2, GNU/Linux, Mac OS X, and Unix like systems.
Viper-mode of the popular Emacs editor tries to emulate many common vi commands and may prove interesting to emacs users and humorous.
It does not matter what Editor one uses as long as one is happy, productive, and effective but I would recommend using a Vi Clone with good documentation. So know any good jokes about Vims 25,000,000,000 page manual ? Hehehe.
You may invoke the vi editor from a console window by typing "vi", if your using another type of editor or "vi clone" please consult it's documentation.
Initial Fear
The traditional vi runs in a command window which is enough to scare off many new users. While newer Vi Clones such as Vim and Elvis have graphical user interfaces that can run with such luxurious features as tool bars and menus it is important to know that the editors are still available in the command line environments without loss of functionality.
One of the most confusing things to scare you about learning Vi is the concept of editing modes. Most users are used to an editor that starts with and is always in "insert-mode" that is you type on the keyboard it and writes text to the screen. Vi by default starts in a command mode where the keys are used to issue editing commands such as delete, replace, yank (copy), paste, cut and movement keys and such. When one wants to start writing text they have to enter insert mode. Once you get sed to this idea you will start to grasp Vi much better. When you are working in insert mode Vi will behave in a similar manor to what most users expect a few differences aside (like the Esc key and copy/paste commands). To indirectly quote a man named Jon Lasser about vi editing modes.
When you move your (mouse) pointer out of the screen area, you can't type in text. You have, in effect, moved from insert mode to command mode. "It's the same thing,"
Most implementations of Vi including nvi should be able to make use of ones cursor (arrow) keys and the insert/home/pgup/del/home/pgdwn clusters we take for granted but using the arrow keys are less effective then using command mode & the classic movement keys. I'd say you should try to use the cursor keys for simple movement at first because they work in any mode and are less foreign. When some day you find yourself without working cursor keys you will be bloody
happy you learned to use H,J,K,L instead of LEFT, UP, DOWN, RIGHT. Trust me it can happen, I once had a very bad system boot the kind your usually lucky to be able to fix without a rescue disk kind. I had to edit a file and my choices of editors were rather limited (ed, ex, vi, ee). When I ran vi it could not use my cursor keys forcing me to use the H,J,K,L cluster in it's place. Never before was I so glad to know two ways of doing the same thing in a text editor !
Learning Vi
I will split this section into several groups of commands. When I first tried to learn Vi(m) I didn't like it because I could not figure it out at the time. After a while on the FreeBSD command line I learned how to use it. In the process I also learned the easiest way to learn how to use Vi, aside from using Vim instead (:help) was to learn things in small pieces. It won't do you any good to try and learn Vi all at once but if your able to just sit down and inhale it I'll probably edit in a cheat sheet or a link to one at the end of this how-to.
Required Commands
So named because these are what I feel are the fewest commands one needs to know in order to use Vi. Maybe not use it well but use it as well as Notepad is a good editor. While we are on the subject of Notepad. Just to say it, notepad is a good editor for several reasons:
It is on nearly any Windows system, it's very simple and light weight.
You don't need a Ph.D to use it.
It's also very week and very basic.
Vi like many Vi users prefer Speed, Power, and Efficiency over a small inertial learning curve. Many people say Vi is not intuitive to learn but I must disagree it is only a matter of adopting ones mind to shifting between insert and command modes. The more one learns with Vi the more productive they will be but no one need learn every thing on day one !
These are the core super simple commands you have to know to use Vi like most editors.
To tell the truth compared to using Notepad you only learned 3 commands. Esc, i, and ZZ or enter command mode, enter insert mode, and write file and get me out of this crazy editor!
The h, j, k, l, and x keys are analogous to the arrow keys and the insert and delete keys on your keyboard. The only difference is these keys work when nothing else does. Some terminals don't support luxuries well such as home and end keys so when working on a machine from a remote session or laptop these can be your best friends. You should be able to live with having to press ESC to use commands and go to insert mode to input text.
Helpful Commands
These are more keys and commands that are not necessary to edit a file but do make live a lot easier especially if you often find your self editing text not just creating it. If you have some experience with some thing called regular expressions a few of these might even seem familiar to you.
None of these commands are necessary to know but they sorta make life easier. Personally I find these much easier on the wrists then Emacs which uses key combinations using the Control and Meta keys instead of a command mode.
A few words about the ":" key, it enters a little command line mode. When you press the : key in command mode it gives you a command line to type an ex (extended editor) type of command. After you have typed the command you press enter to run it and should return to normal mode. If you need to force a write or quit you can append the "!" Symbol to it. If you are a ex guru or need to enter many commands in this way you might try the "Q" command to enter Ex mode. For example the ZZ command is the same as :wg. One can mix and match actions and movements very well in Vi, for example if one wanted to delete to the end of the line you could use command mode to enter d$ and delete from the cursor to the end of the line. When one shifts between command and insert modes often in there editing style you soon find the a, A, r, o, and O keys very useful. I've mentioned a few other modes then command and insert but they are of little importance to you unless your into reading good ocumentation. Consult your Vi implementation for details, for users of nvi it's nothing to fart about at this stage of learning. Many commands allow one to specify a location or a movement. This is especially true for using the commands for deletion, joining text, copy/cut/paste, and multiple editing buffers (windows) if your vi supports it.
You might want to get used to using most of these commands or at least the concepts be fore we try to tackle such tasks as more advanced delete or copy/paste commands. A coffee break about now is a very good idea.
A few extra commands
These are other commands useful to users but I broke them off from the above list to ease session based learning.
Table of Contents Short history Which Vi is my Vi ? Initial Fear Learning Vi Required Commands Helpful Functions A few extra commands Making sense of Vi options Deletion Wars Cut, Copy, and Paste the Vi style ! Options and configuration How to make a exrc file
Document Version: 0.90.0
This post has the underlying assumption that you want to learn to use the Vi text editor but know jack about it. I won't insult you but I'll try to teach it without being to terse or "hand holding". We all need help but one has to put in a little bit of effort to master a program.
I have always cared more for content and understandable English then for closely following the "laws of the English anguage" so forgive any grammatical errors and ether curse or help improve the content :-P
Short History
In 1976 a man named Bill Joy wrote the Vi text editor for an early BSD release. It took the existing ed and ex line editors and created a visual interface. While ex was a simple line editor vi gave us an interface much more like what we are accustomed to in this era.
Vi is a modal text editor which means that depending on what editing mode one is in at any given time what each key does changes. Vi has thankfully only two editing modes of importance command and insert. Unlike common editors such as Emacs or Kate commands are entered by shifting the entire keyboard into command mode and back into insert mode to continue inserting text. This modal concept is probably the biggest adjustment new users have to make when learning Vi. Some notable influences on the Vi command set was the ADM3A terminal which had the Esc and left Control keys where the Tab and Capslock keys are on modern US_QWERTY keyboards. There was also arrows on the H, J, K, and L keys which intern became the Vi movement keys.
Picture of ADM3A Keyboard
Which Vi is my Vi ?
There have been many vi implementations and clones through the years and on many systems but you can always count on an Unix to have a Vi. By high decree of the POSIX (Portable Operating System Interface for uniX). It would be best that before you try to start learning how to use Vi you learn what type of Vi editor you have. Many GNU/Linux systems will use a Vi clone in place of Vi while BSD Unix's use nvi. This how to should be relivent to every Vi/Vi Clone but most Vi Clones have a lot more to offer then Vi does.
Vi is the classic BSD
implementation now free and open source under a BSD style license.
Nvi is a re-implementation of Vi used for the 4BSD release when the original Vi was considered encumbered code. This is what is like wise used on Free, Net, Open, PC, and Desktop BSD and the focus of this how to.
Elvis is a Vi clone that adds a number of features and commands. Elvis functions on Unix, Dos, NT, and OS/2 systems both as a console and graphical application. It is standard issue on Slackware Linux for the systems vi program.
Vim or Vi IMproved is a Vi clone that implements many additional features and options. It's known to run on many platforms including Amiga, GNU/Linux, Mac OS X, Windows, OpenVMS, OS/2, and Unix like systems. Vim supports several graphical user interfaces including Motif, GTK1, GTK2, and Athena versions. It is also what this post was written with.
Vile was initially derived from an early version of Microemacs in an attempt to bring the "modern" benefits of the Emacs multi-window/multi-buffer editing paradigm to users more comfortable with the vi command-set. Vile functions on DOS, Windows, OS/2, GNU/Linux, Mac OS X, and Unix like systems.
Viper-mode of the popular Emacs editor tries to emulate many common vi commands and may prove interesting to emacs users and humorous.
It does not matter what Editor one uses as long as one is happy, productive, and effective but I would recommend using a Vi Clone with good documentation. So know any good jokes about Vims 25,000,000,000 page manual ? Hehehe.
You may invoke the vi editor from a console window by typing "vi", if your using another type of editor or "vi clone" please consult it's documentation.
Initial Fear
The traditional vi runs in a command window which is enough to scare off many new users. While newer Vi Clones such as Vim and Elvis have graphical user interfaces that can run with such luxurious features as tool bars and menus it is important to know that the editors are still available in the command line environments without loss of functionality.
One of the most confusing things to scare you about learning Vi is the concept of editing modes. Most users are used to an editor that starts with and is always in "insert-mode" that is you type on the keyboard it and writes text to the screen. Vi by default starts in a command mode where the keys are used to issue editing commands such as delete, replace, yank (copy), paste, cut and movement keys and such. When one wants to start writing text they have to enter insert mode. Once you get sed to this idea you will start to grasp Vi much better. When you are working in insert mode Vi will behave in a similar manor to what most users expect a few differences aside (like the Esc key and copy/paste commands). To indirectly quote a man named Jon Lasser about vi editing modes.
When you move your (mouse) pointer out of the screen area, you can't type in text. You have, in effect, moved from insert mode to command mode. "It's the same thing,"
Most implementations of Vi including nvi should be able to make use of ones cursor (arrow) keys and the insert/home/pgup/del/home/pgdwn clusters we take for granted but using the arrow keys are less effective then using command mode & the classic movement keys. I'd say you should try to use the cursor keys for simple movement at first because they work in any mode and are less foreign. When some day you find yourself without working cursor keys you will be bloody
happy you learned to use H,J,K,L instead of LEFT, UP, DOWN, RIGHT. Trust me it can happen, I once had a very bad system boot the kind your usually lucky to be able to fix without a rescue disk kind. I had to edit a file and my choices of editors were rather limited (ed, ex, vi, ee). When I ran vi it could not use my cursor keys forcing me to use the H,J,K,L cluster in it's place. Never before was I so glad to know two ways of doing the same thing in a text editor !
Learning Vi
I will split this section into several groups of commands. When I first tried to learn Vi(m) I didn't like it because I could not figure it out at the time. After a while on the FreeBSD command line I learned how to use it. In the process I also learned the easiest way to learn how to use Vi, aside from using Vim instead (:help) was to learn things in small pieces. It won't do you any good to try and learn Vi all at once but if your able to just sit down and inhale it I'll probably edit in a cheat sheet or a link to one at the end of this how-to.
Required Commands
So named because these are what I feel are the fewest commands one needs to know in order to use Vi. Maybe not use it well but use it as well as Notepad is a good editor. While we are on the subject of Notepad. Just to say it, notepad is a good editor for several reasons:
It is on nearly any Windows system, it's very simple and light weight.
You don't need a Ph.D to use it.
It's also very week and very basic.
Vi like many Vi users prefer Speed, Power, and Efficiency over a small inertial learning curve. Many people say Vi is not intuitive to learn but I must disagree it is only a matter of adopting ones mind to shifting between insert and command modes. The more one learns with Vi the more productive they will be but no one need learn every thing on day one !
These are the core super simple commands you have to know to use Vi like most editors.
Key Action h Move left one character - the left arrow does this as well j Move down one line - the down arrow does the same thing k Move up one line - the up arrow does this too! l Move right one character - Right arrow yet again. Esc Enter Command Mode /or cancel commands i Enter insert mode - the Insert key will also work x Delete the character under the cursor - just like the Delete key. ZZ Save file and quit Vi
To tell the truth compared to using Notepad you only learned 3 commands. Esc, i, and ZZ or enter command mode, enter insert mode, and write file and get me out of this crazy editor!
The h, j, k, l, and x keys are analogous to the arrow keys and the insert and delete keys on your keyboard. The only difference is these keys work when nothing else does. Some terminals don't support luxuries well such as home and end keys so when working on a machine from a remote session or laptop these can be your best friends. You should be able to live with having to press ESC to use commands and go to insert mode to input text.
Helpful Commands
These are more keys and commands that are not necessary to edit a file but do make live a lot easier especially if you often find your self editing text not just creating it. If you have some experience with some thing called regular expressions a few of these might even seem familiar to you.
Key Action : Enter "ex" like commands in a "command line" mode :w Write changes to file :q Quit Vi :e file Open file for editing /word Find "word" much like Control+F in many other editors n Go to next occurrence of the search term below the current N Go to next occurance of the search term above the current one a Enter insert mode right of the cursor A Enter insert mode at the end of line o Insert line below cursor O Insert line above cursor w Move forward one word b Retreat one word $ Move cursor to the end of the line ^ Move the cursor to the start of the line Control+u Page up half a screen Control+d Page down half a screen u Undo previous command(s) - some Vi clones have unlimited undo/redo Control+r Redo the undone command(s) - same as above ^ r Replace one char and return to command mode R Enter Replace mode - works like pressing insert in most editors c Change, takes an operator like d. example: cw=changes a word dDelete using a following movement command (see below) dd Delete entire line
None of these commands are necessary to know but they sorta make life easier. Personally I find these much easier on the wrists then Emacs which uses key combinations using the Control and Meta keys instead of a command mode.
A few words about the ":" key, it enters a little command line mode. When you press the : key in command mode it gives you a command line to type an ex (extended editor) type of command. After you have typed the command you press enter to run it and should return to normal mode. If you need to force a write or quit you can append the "!" Symbol to it. If you are a ex guru or need to enter many commands in this way you might try the "Q" command to enter Ex mode. For example the ZZ command is the same as :wg. One can mix and match actions and movements very well in Vi, for example if one wanted to delete to the end of the line you could use command mode to enter d$ and delete from the cursor to the end of the line. When one shifts between command and insert modes often in there editing style you soon find the a, A, r, o, and O keys very useful. I've mentioned a few other modes then command and insert but they are of little importance to you unless your into reading good ocumentation. Consult your Vi implementation for details, for users of nvi it's nothing to fart about at this stage of learning. Many commands allow one to specify a location or a movement. This is especially true for using the commands for deletion, joining text, copy/cut/paste, and multiple editing buffers (windows) if your vi supports it.
You might want to get used to using most of these commands or at least the concepts be fore we try to tackle such tasks as more advanced delete or copy/paste commands. A coffee break about now is a very good idea.
A few extra commands
These are other commands useful to users but I broke them off from the above list to ease session based learning.
Key Action :!cmd Execute shell command cmd. :command! Force command to run, such as force write-quit (:wq!) :r!cmd Run cmd in shell and insert it's output in the file G Go to end of buffer (the bottom of the file) 1G Go to line one in the file nG Go to line n. So 10G means go to line 10 >> Shiftwidth text over one indentation level to the right << Shiftwidth text over one indentation level to the leftOne cane execute commands from vi that one would usually run in a shell such as bash or cmd.exe. :!dir \b "C:\Program Files" would be executed just as if one ran the dir command from cmd.exe or command.com. If you want to nab the output of a command into your file use :r!command this is very good if one needs to quickly grab some data thats a fast pipe away. The G command is a go to without any arguments it goes to the bottom of the file. If one was to type a number before it it would go to that line number. The >> and << are useful for shifting text around but have likely little need for users not into programming or scripting e.t.c. So I have nothing to say about these commands. Making sense of Vi options One of the worst things is that by default vi generally does not tell you what mode you are in or where the cursor is this can make life harder. Lucky for us Vi has the ability to set options. Really this belongs in a customizing vi section and I'll probably paste it there but I think knowing some of this now will help you. You can set options thus turning them on, off, or setting a value :set option :set nooption :set option=10 If you want to see all the options available you can type :set all if you have a good Vi clone you should be able to get some documentation on what all of these do, for the sake of making Vi more friendly we will cover some good stuff here. :set showmode :set ruler ;set ignorecase These three options (in order of appearance) will make vi show you the current mode at the bottom of the screen, show you the cursors position as line,character at the bottom of the screen, and turn off case sensitivity when searching in a file. You can make a startup file that vi will read when it starts that will set options for you. Ex/Vi and Nex/Nvi use the /etc/exrc and ~/.exrc files but depending on your implementation it may be different such as Vim or Elvis. I don't have much experience with Elvis but for Vim it reads the .vimrc file(s). You can turn these off pretty easy like so :set noshowmode :set noruler :set noignorecase If you want to make a .exrc file for your self you can store commands in it that are what you would type after hitting : so a .exrc file enabling showmode would look like this: set showmode and saved as ~/.exrc if you want to leave a comment in the file preside it with a single " quote. The " Comment marks that entire line after the " character not to be read when starting up. A few options that may interest you are autoindent, tabstop, shiftwidth, wrapmargin, and warplen. By default when one tries to type past the end of the screen it rolls to the line below on screen but is treated as one long line. One can try and make this more like most editors word wrapping with some play time. I will only discuss the autoindent option since it is some thing you will ether long for or hate if you use vi for editing code, scripts, web sites e.t.c. When one sets autoindent on vi starts a new line with the same indentation as the last. The word indentation is a little odd in my opinion if your not a programmer so I'll give a short example of how it goes.
if i is-greater-then 0 do this code and this code else do this instead endifIf typing that with autoindent on pressing return after typing "do this code" would automatically indent the next line to the same level. You can press Control+D to kill the autoindent such as if you wanted to place the "else" in our pseudo code at the same level as the "if" and "endif". Deletion Wars If you remember awhile ago when we both were still sane. I mumbled about being able to combine a command and a movement. This is pretty much true with most movement, deletion, and "visual" commands (visual as in cut, copy, paste). x deletes the letter under the cursor but what if we want to delete some thing else? We can use the d key along with a movement specifier if you recall the movement keys h, j, k, l, $, ^ we can combine them all with d to make it mean delete this way. So d^ really means delete to-start-of-line. This makes for very versatile work and it's not just limited to deletion. Much like we can use a number and G to go to a line like 275G to go to the 275th line of a file. Nvi users will especially need to know this for dealing with copy/paste as it lacks a Visual mode that makes it more like other editors. A very fast way to delete an entire line is the dd command or deadly delete :-) You can prefix a number of lines to a command as well, so for example 10dd will delete the current line and the next ten for you. Unlike most editors Vi does not really know you have a mouse, although Vi Clones should if they have a GUI. Some like Elvis and Vim have a "visual" mode that can highlight text using movement keys and then delete it or do the cut, copy, and paste antics with it.
Key Action y Yank (copy) - selects text in a similar manner to the d command yy Yank line - selects text in a similar manner to the dd command yyp Duplicate line - copy/paste current line on the line below. p Put (paste) text v Enter visual mode - for some Vi ClonesOne should really know both ways if possible. Personally I prefer visual mode, it's more like what we are all used to. That is you select (aka highlight) text then do with it what you want, such as copy or delete. With classic Vi as included in FreeBSD at least one will get an error. If one wanted to copy the current line and the next tree. You would type 3y in command mode. Go to where you want to paste it and press p key in command mode. This is more or less how it works in traditional Vi. This is how it can also be done in a Vi clone like Vim. You can enter visual mode (v key). Once you do that the editor starts treating the cursor movements just like when you old the left mouse button and start dragging the pointer around. Only it works without a mouse ! Once you've high lighted some text you can act on it.So for example if you pressed "vwwd" you would have just deleted from the current cursor position to the next two words. You can use the "c" command to "cut" in visual mode. I have not tried elvis much but it should be similar to vim. Search and Replace If you are familiar with regular expressions, sed, awk, ed, or ex you should be at home right here. The search & replace takes syntax like this 'n,m s/find expression/change expression/cmd'. So if I wanted to change every occurrence of 'vi' to 'emacs' in this file I could do this. :1,$s/vi/emacs rules/g That is from line 1 to end of lines search for the string vi and replace it with emacs globally. If I only wanted to change it for n through m lines I could have tried some thing like this :260,285s/emacs/vi/g Regular expressions are similar to the wild cards used by the shell but they are different. Same concept (imho) but different syntax. Much like C and C++ maybe. A detailed Analise of regular expressions would be out side the scope of this how-to and totally irregular :-) I suggest the following links for more info about regex (regular expressions) http://en.wikipedia.org/wiki/Regex http://www.regular-expressions.info/ Back in the days before operating systems when software ran on the bare hardware. Stuff like this "regular expression" mumbo-jumbo was a thing just for the uber-nerdy scientist but now it's in the power of your editor. It should also be worth learning how to use regex. As it is a common syntax with many uses. The better you know regular expressions the better you will be able to use tools like sed, grep, awk, find, perl, ex, and many more. Options and Configuration We touched on this back in section 4.4.Making Sense of Vi options but will go over a few things again. Saves your scroll bars eh? :-) Vi has a number of options that adjust the way it behaves, here is screen dump of the default setup of nvi. As used on FreeBSD 6.1-Release.
~ +=+=+=+=+=+=+=+ noaltwerase noextended matchtime=7 report=5 term="xterm" noautoindent filec="" mesg noruler noterse autoprint flash nomodeline scroll=12 notildeop noautowrite nogtagsmode noprint="" nosearchincr timeout backup="" hardtabs=0 nonumber nosecure nottywerase nobeautify noiclower nooctal shiftwidth=8 noverbose cdpath=":" noignorecase open noshowmatch warn cedit="" keytime=6 optimize noshowmode window=24 columns=85 noleftright path="" sidescroll=16 nowindowname nocomment lines=25 print="" noslowopen wraplen=0 noedcompatible nolisp prompt nosourceany wrapmargin=0 escapetime=6 nolist noreadonly tabstop=8 wrapscan noerrorbells lock noredraw taglength=0 nowriteany noexrc magic remap tags="tags" directory="/tmp/" msgcat="/usr/share/vi/catalog/" paragraphs="IPLPPPQPP LIpplpipbp" recdir="/var/tmp/vi.recover" sections="NHSHH HUnhsh" shell="/usr/local/bin/ksh93" shellmeta="~{[*?$`'"\" Press any key to continue [: to enter more ex commands]:You can get a screen like this by using the :set all command. Every option or "variable" can be turned off by appending 'no' to the command. So if we wanted to turn on autoindent we would :set autoindent We could also have used the short form and typed :set ai but that makes it harder to read. Why this matters I'll tell you in a sec :-P To turn it off we would then type this. :set noautoindent Some options take a numeric value and are set like this :set shiftwidth=4 I'll try to quickly document each of these options the best I can ones of value. So you can choose what you prefer. I'd suggest if you want to modify Vi's behavior to test a few options to see how you like the changes. If I have no information about the option, it is not listed. Option: autoindent Short form: ai Value: on/off Default: noautoindent Description: When turned on 'ai' will automatically start the new line to at the same depth as the previous line when breaking lines (i.e. pressing enter). The value of the 'shiftwidth' variable is used when inserting tabs. When your done you can undo the autoindent by pressed the control+d. I've yet to figure out if it is a bug or a configuration error but if tabstop and shiftwidth have different values. Control+d will not un-indent the line correctly if sw and ts are not equal. Line one line two Autoindented Cntrl+D Option: autoprint Short Form: ap Value: on/off Default: noautoprint Description: I don't see any effects but my reference says 'Display changes after each command.' Option: autowrite Short Form: aw Value: on/off Default: off Description: Automatically write changes to file after certain events. Option beautify Short Form: bf Value: on/off Default: off Description: Ignore all control characters during input (except tab, newline, formfeed). Pressing control+letter in insert mode when no command exists will result in text like this by default. How to delete a tpyo No I'm not trying to insult emacs users, I would probably use M-B M-D to fix such a typo when using Evil Macs. Option: columns Shot Form: col Value: numeric Default: varies Description: The number of columns to use for the text area. Example, how to set vi to 85 columns wide. :set columns=85 Option: edcompatible Short Form: ed Value: on/off Default: off Description: Use ed-like features on substitute, probably more useful for Bill Joy then you or me. Option: errorbells Short Form: eb Value: on/off Default: on Description: Sound the system bell when you make a booboo. Option: exrc Short Form: ex Value: on/of Default: off Description: Vi can read an exrc file that will run a set of commands at startup. Basically a configuration file for setting your options (see next chapter). Option: hardtabs= Short Form: ht= Value: numeric Default: 8 Description: Set boundary for hardware tabs, may be useful for a Teletype. Option: ignorecase Short Form: ic Value: on/off Default: off Description: Ignore case in regex expressions. Option: lisp Short Form: ? Value: on/off Default: off Description: Turn on lisp mode, I think it aids the formating of old lisp code. Option: list Short Form: ? Value: on/off Default: off Description: Display all tabs, end of lines. Turn this on for fun :-) Option: magic Short Form: ? Value: on/off Default: on Description: Enable more regex expressions Option: mesg Short Form: ? Value: on/off Default: on Description: Allows mesgs to be sent to terminal, see man mesg(1) Option: number Short Form: nu Value: on/off Default: off Description: Enables line numbering, this can help when debugging files. I usually have a mapping to enable it with the F2 key in my ~/.exrc file. Option: prompt Short Form: ? Value: on/off Default: on Description: Enalbes the ':' prompt, if you disable this you can make ex behave more like ed. You probably don't want this. Option: readonly Short Form: ro Value: on/off Default: off Description: Prevents you from writing the file unless you override it like so. :w! Option: redraw Short Form: ? Value: on/off Default: off Description: Redraw screen when edits are made, probably works like the Control+L command (refreshes screen). Option: report= Short Form: ? Value: numeric Default: =5 Description: Report changes if they effect more lines then report=n. Such as when using the delete/yank/join commands e.t.c. Option: shiftwidth= Short Form: sw= Value: numeric Default: 8 Description: How many characters to use when shifting width with the >> and << commands e.t.c. If you plan to use autoindent, the value of sw and ts should be the same (see below). Option: showmatch Short Form: sm Value: on/off Default: off Description: The cursor will flash and move to the openning {, }, (, ), [, or ] when typing a closing one on screen. Option: showmode Short Form: ? Value: on/off Default: off Description: Shows which mode you are in such as command, insert, append, or replace. This is so useful its a perfect choice for the beginners exrc file. Option: tabstop= Short Form: ts= Value: numeric Default: 8 Description: How many characters to display a 'tab' as, mostly of use for programmers. Common choices are 2, 4, 6, 8, 10, 12. It has been suggested that one should not change this setting but instead adjust the shiftwidth setting. I can only say from personal experience if you change tabstop but forget to change shiftwidth to the same. Auto-indent will be a bit off :-) Option: wrapmargin= Short Form: wm= Value: numeric Default: 0 Description: Set the right margin. Setting a value greater than 0 will word wrap n spaces from the edge of the screen. So :set wm=5 would make the display wrap lines when ever it hit the 5th to last line of the terminal. Option: wrapscan Short Form: ws Value: on/off Default: on Description: Searches wrap around end of file How to make a exrc file The exrc file is very simple. Commands are read from the ~/.exrc file just as they are from the ':' command line in Vi. Placing this line in your exrc file set autoindent Is the same as tying :set autoindent in command mode. You can use the double qoute or " character to comment a line. " This line is not read by Vi set tabstop=6 Here is an example of what my ~/.exrc file might look like with extra comments.
" Tell me what mode I'm in between coffee breaks set showmode " Press F2 to turn on line numbering, make the ^M with ctrl+v ctrl+m mapUNDER CONSTRUCTION:set number " Alias ';' to : map ; :
__ ___ ___ | |\ / /\ / /\ | || / / / /__/ / | || / / / \__\/ | || / / / ___ | || / / / / /\ | || / / / / / / | || / / / / / / | || / / / / / / | || / / / / / / | ||/ / / / / / | |/ / / / / / | / / / / / | / / / / / | / / / / / |__/ / /__/ / \__\/ \__\/
Sunday, November 26, 2006
Need to get out more
Dang it I've just been examining my to do list.... I really need to get out more, chase a few lushious babes across the beach e.t.c. Dang it I can't even remember how many years its been since I've gone to the beach and I grew up in south Florida !
Oh well time to play Spider Solitare and some KDE Games.
Oh well time to play Spider Solitare and some KDE Games.
Saturday, November 25, 2006
XML
Ok so sue me I took a day off :-P
Set up the mkXML function to create our *.desktop files which is a good thing because it shows me I have more testing to do with them. As well as editing the getInput function to make a few changes namely.
Should we run the app in a terminal ?
Do not create link option
Test a few entries in the file
Set MIME type(s?), using a real MIME not a *.ext !
I've added "/usr/ports/packages/All/" and the current directory to where to look for things entered on the CLI so hopefully we could call it as "program packageToAdd.tbz optionalBatchJobFile" and find it. I've set the foot holder code for the fkBuild function which makes the PBI file. Thats going to be a tough thing to do, hopefully Tim will be able to help me there. I've set up our little main loop to breach off into fkBuild + a comment that it should never return to our main loop of events. Because once fkBuild and sub-routines are finished it's supposed to exit the program !
I need to add stuff to the getLibs function for binary hunting. Because what I want is for the user to be able to enter the binaries name as one would to run it. Which is easier on Joe Newbie and faster for a CLI without tab completion. Since getLibs relaies on the information gathered from getInput. We'll then have to test it logically checking to see if it's located in any of the usual spots in the path. Once we find where it is we append that and pass it to the section that actually gets the libs. If it's some thing not in the standard path the user will have to give us full path which we will need to strip off at the start of mkXML.
Line of execution is pretty simple so far, I'll worry about the world of Object Oriented Programming another time - like after this works. Every thing is done in seperated routines rather then a huge main function.
Of course its not done yet so its not all working yet. So far it looks quite promising as long as in the end I can make a working pbi file. I need to add greater error checking, path stripper code for getLibs, strighten up getInput for a few extras and colate with the mkXML routine. I don't know if XML is the right word for the file style but hey its short, discriptive, and bloody close enough! I also need to get the stuff fixed up for creating the PBI.*.sh files.
Set up the mkXML function to create our *.desktop files which is a good thing because it shows me I have more testing to do with them. As well as editing the getInput function to make a few changes namely.
Should we run the app in a terminal ?
Do not create link option
Test a few entries in the file
Set MIME type(s?), using a real MIME not a *.ext !
I've added "/usr/ports/packages/All/" and the current directory to where to look for things entered on the CLI so hopefully we could call it as "program packageToAdd.tbz optionalBatchJobFile" and find it. I've set the foot holder code for the fkBuild function which makes the PBI file. Thats going to be a tough thing to do, hopefully Tim will be able to help me there. I've set up our little main loop to breach off into fkBuild + a comment that it should never return to our main loop of events. Because once fkBuild and sub-routines are finished it's supposed to exit the program !
I need to add stuff to the getLibs function for binary hunting. Because what I want is for the user to be able to enter the binaries name as one would to run it. Which is easier on Joe Newbie and faster for a CLI without tab completion. Since getLibs relaies on the information gathered from getInput. We'll then have to test it logically checking to see if it's located in any of the usual spots in the path. Once we find where it is we append that and pass it to the section that actually gets the libs. If it's some thing not in the standard path the user will have to give us full path which we will need to strip off at the start of mkXML.
Line of execution is pretty simple so far, I'll worry about the world of Object Oriented Programming another time - like after this works. Every thing is done in seperated routines rather then a huge main function.
mkHome - prepair programs projects directory (/usr/local/Projects) if it does not exist. mkProject - make the current projects directory if does not exist. Then copy our pkg over to the project directory. mainLoop - ask how many K-Menu entries we need to make and loop that many times, then call fkBuild. getInput - get all the information needed to write the *.desktop files and any script details getLibs - gather all the libraries required from the program given to us by getInput mkXML - using the data from getInput make our *.desktop file fkBuild - make the *.pbi file
Of course its not done yet so its not all working yet. So far it looks quite promising as long as in the end I can make a working pbi file. I need to add greater error checking, path stripper code for getLibs, strighten up getInput for a few extras and colate with the mkXML routine. I don't know if XML is the right word for the file style but hey its short, discriptive, and bloody close enough! I also need to get the stuff fixed up for creating the PBI.*.sh files.
Friday, November 24, 2006
To day I rest, let the stream roll off. I've mostly kept my self busy as a beaver to get my work done and also not blow up over at www.pcbsd.org
I need to get the code to handle swaping the data out to file thus creating the *.desktop files to day. I'm moving it to a mkXML function for neatnesses sake even though it's likely to need tweaks. The only bad thing is I can't do the multi-language fields of it and I'm sure as heck not writing a translator to use as a filter app!
Also got to get the stuff setup before going back to work. It's nice to be able to rest for a few days, even if I've more or less been in front of the computer tinkering on some thing for 2 or 3 days stright. BF2 is also good for a break.
For some very od reason I'm having an urge to create a GNU/Linux distro... Console based Live CD /w plenty of rescue stuff, optional X startup /w a minimal WM and an install script then setup the system for install.
Working on my German a few words at a time too.
I need to get the code to handle swaping the data out to file thus creating the *.desktop files to day. I'm moving it to a mkXML function for neatnesses sake even though it's likely to need tweaks. The only bad thing is I can't do the multi-language fields of it and I'm sure as heck not writing a translator to use as a filter app!
Also got to get the stuff setup before going back to work. It's nice to be able to rest for a few days, even if I've more or less been in front of the computer tinkering on some thing for 2 or 3 days stright. BF2 is also good for a break.
For some very od reason I'm having an urge to create a GNU/Linux distro... Console based Live CD /w plenty of rescue stuff, optional X startup /w a minimal WM and an install script then setup the system for install.
Working on my German a few words at a time too.
Thursday, November 23, 2006
Well I got most of the interective mode setup, actually swapping the data out to file is next. Not sure where the fkBuild() function will lead but it won't end up back into the mainLoop (hence the ForK prefix). After the thing runs assuming I ever sort out the PBI generation part it self things look good. The final thing to do will be setting it up to tell weather it is in batch or interactive modes. What I'm thinking is simple
appname /usr/ports/packages/All/package.tbz
Runs it in interactive mode, user has to set the data to create a suitable .desktop file.
appname /usr/ports/packages/All/package.tbz ~/datafile
Run as a batch job reading stuff from dtafile in order to process the job.
Thanks to dropping into #kde I found out basically how to manipulate the K-Menu manually. I'm sure it's simular for making Desktop Icons because of the files. I'd just have to figure out how to set it up correctly not concerned with it though.
Once it's complete and if ever fully functional it shouldn't be to hard for a GUI program to work around its batch mode. That infernal QT Designer is still more then I'm up to handling without reading the manual yet.
appname /usr/ports/packages/All/package.tbz
Runs it in interactive mode, user has to set the data to create a suitable .desktop file.
appname /usr/ports/packages/All/package.tbz ~/datafile
Run as a batch job reading stuff from dtafile in order to process the job.
Thanks to dropping into #kde I found out basically how to manipulate the K-Menu manually. I'm sure it's simular for making Desktop Icons because of the files. I'd just have to figure out how to set it up correctly not concerned with it though.
Once it's complete and if ever fully functional it shouldn't be to hard for a GUI program to work around its batch mode. That infernal QT Designer is still more then I'm up to handling without reading the manual yet.
AutoPBI
Well I think it's about 0300 hard to tell since I've been toying with my laptops time systems hehe. I've been working on a little gizmo to try and auto-create a PBI so far it's going well. I need to sort out how to setup the scripts used for installing the PBI. At the most basic level it shouldn't be that hard but I'm faced with a few design desisons.
Should I keep it to a srictly functionally terse or opt for an easier UI. Really I care more for solid implementations then flashy stuff. A few things I need to get done is making short work of the PBI.SetupScript.sh and PBI.RemoveScript.Sh files auto-generation. I'm not sure what to put in it really. I know I want to prepair the pkg_add and the binaries in it before offering a direct edit. A quick way to add "events" per say, i.e. an easy way of setting up dialog/kdialogs for use would be nice but that can wait awhile lol. If Kris Moore can anwser me how to tell in the script is running in text mode or normal (gui) mode. I could setup dialogs for PBI Text installs and kdialogs for normal click-n-run style.
I've got the code working to get basic libraries auto-populated but theres no support for auto-magic setup with GTK+ P.I.T.A. PBI Libbing yet and I need to start the code to quickly run each binary through it. I'm hoping to deside more on the UI before thats totally finished. I may be a newbie but I'm trying to keep each section very self contained and a good managible size as much as I can. I remember reading through some source code files a few K lines of C Code long and getting tired of reading after the first thousand or so lines. So I kinda learned keep it tight when ever I can. I've not figured out how to "create" the PBI yet. If possible I'd rather like to bypass PBI Creator all together and see if theres any way to manually setup stuff on the K-Menu e.t.c. Has to be some way since PBI do it as they are.
I remember there was a thing posted on how to make a PBI file for GNU/Linux so I'll take a look at that when I have it ready to "build" some thing. I'm sure if I worked out how to create a PBC file ether using the Build-A-Function called pipes, filters and redirection or perl/ruby I could make it wrap around PBICreators CLI mode but .. Dunno yet.
What I want this to be, is a simple way to get started building the PBI. I'm not yet desided weather to have the port build from within the program or for a simpler design make one have to do a make package first or not. I also need to test to see how much find, copy, link would be the normal neccessity to setup after the package. Such as prepairing the manpages/configdir stuff. I'm not usre how to work out nabbing the man pages since they could be near any where depending on the app and won't always be limited to the binaries names.
Really I don't think I've had this much fun in a good while.
Should I keep it to a srictly functionally terse or opt for an easier UI. Really I care more for solid implementations then flashy stuff. A few things I need to get done is making short work of the PBI.SetupScript.sh and PBI.RemoveScript.Sh files auto-generation. I'm not sure what to put in it really. I know I want to prepair the pkg_add and the binaries in it before offering a direct edit. A quick way to add "events" per say, i.e. an easy way of setting up dialog/kdialogs for use would be nice but that can wait awhile lol. If Kris Moore can anwser me how to tell in the script is running in text mode or normal (gui) mode. I could setup dialogs for PBI Text installs and kdialogs for normal click-n-run style.
I've got the code working to get basic libraries auto-populated but theres no support for auto-magic setup with GTK+ P.I.T.A. PBI Libbing yet and I need to start the code to quickly run each binary through it. I'm hoping to deside more on the UI before thats totally finished. I may be a newbie but I'm trying to keep each section very self contained and a good managible size as much as I can. I remember reading through some source code files a few K lines of C Code long and getting tired of reading after the first thousand or so lines. So I kinda learned keep it tight when ever I can. I've not figured out how to "create" the PBI yet. If possible I'd rather like to bypass PBI Creator all together and see if theres any way to manually setup stuff on the K-Menu e.t.c. Has to be some way since PBI do it as they are.
I remember there was a thing posted on how to make a PBI file for GNU/Linux so I'll take a look at that when I have it ready to "build" some thing. I'm sure if I worked out how to create a PBC file ether using the Build-A-Function called pipes, filters and redirection or perl/ruby I could make it wrap around PBICreators CLI mode but .. Dunno yet.
What I want this to be, is a simple way to get started building the PBI. I'm not yet desided weather to have the port build from within the program or for a simpler design make one have to do a make package first or not. I also need to test to see how much find, copy, link would be the normal neccessity to setup after the package. Such as prepairing the manpages/configdir stuff. I'm not usre how to work out nabbing the man pages since they could be near any where depending on the app and won't always be limited to the binaries names.
Really I don't think I've had this much fun in a good while.
More PBI
Well I've E-Mailed Kris Moore for some info, wonder what I may find out. Depending on the results it might allow me to make for a more flexible method of dealing with my PBI.*sh files.
I also might have a few ideas for making a "automatic" PBI creation tool that I will need to toy around with later. Not 100% sure how well it would work yet.
I suppose, if ya can't beat them join'em. Then remember if it blows up this wasn't my idea !
I also might have a few ideas for making a "automatic" PBI creation tool that I will need to toy around with later. Not 100% sure how well it would work yet.
I suppose, if ya can't beat them join'em. Then remember if it blows up this wasn't my idea !
PBI Systems
Well tis time to plan for war or for peace. I can only see two roads before me.
In a funky branch of science where psychology and history meet at a decision
point that breaks into two possible futures. At first I didn't know which to to
choose but then it just popp'd in there. A man has great capacity for both good
or evil, it's this choice that splits that destiny apart.
While one could harbor malice towards some thing is normal for a human, I have
none to use. I've long rejected such ideas in favor of ones that work. So, I
see that I must take the option that poses the least threat.
On one road, I see the changes to the PBI system to be used (read abused).
Using both volume and redundant checks of quality control push the PBI system
for all it's worth till it ether busts or grows strong.
To the other, adopt to it and fight for its growth. Well ether way I'm going to
raise all kinds of bloody screaming if quality control standards are not
maintained. If Pkg_add becomes the John Doe of the PBI word proper auditing and
quality management is required. The number of times pkg_add PBI have leaked
through testing even when it was strictly a case for "pkg_add -f pkg.tbz" ==
You will be skinned alive being the accepted Community/Developer standard. Even
PC-BSD Developers would occasionally bend this rule and bypass auditing (or
worse...). SO what the heck, why not go with it.
This is a change I hoped to see come with a much stronger infrastructure and a
larger user base. Hopefully one done after proper documentation was ever
created. To be honest PBI documentation is kinda, uhhh scratched out? Yet how
does this change come to us ? By a loss of principals - it wasn't after people
complained. It wasn't after user after user put up requests on the wish list
only to be mostly ignored. It wasn't after people yelled for a more traditional
approach, it wasn't after die hard FreeBSD people turned there noses at the
idea. It wasn't that a flaw was found in an imperfect system and a fix was
needed. It wasn't that as it is the PBI system couldn't work. It's simply that
they would rather have it done NOW then later. Why work to make some thing work
the way it was supposed to? When you can just change the rules to match your
hand of cards ? I'm sorry but thats the way I feel - I don't mean to accuse any
one and don't.
We can now use pkg_add in PBI creation at a very small level because it's the
easy solution. When a problem of commercial importance chopped up. Well excuse
me and my big fat Johnny Reb ass but I'm starting to agree with a few FreeBSD
sys-admins. A clean, functional, elegant design should be the end result. Not
some thing hacked together with chewing gum and cloths pins. Even after public
debate about the similar issues they didn't care - they get a problem getting a
commercial app to abide by it and they change the rules. When I had "offically"
left working on any PBI I did so seeing a system showing signs of reform, one I
knew would stand. Now I see it caving in on it self.
Ok so we have to live with pkg_add app PBI full of libs not added ok now we need to think here. The pkg_add can only be the main app well if we draw that line very easy at cd /usr/ports/cat/app && make package && cd /usr/local/Projects/PBI && mkdir app && cp /usr/ports/Packages/All/app.tbz ./
Then we need to check this package to make sure it only contains libs unique to
the project or else fool around /w it and the +* files to make a new package to
force or risk breaking some thing. Ok thats good enough but what if we have
some problems loading a Lib out of /Programs/$1/libs at run time ? OK well
since the PC-BSD Devs say it's ok to do a pkg_add of the main app. Why don't we
just move that into it's own PBI and pkg_add that after making the user install
it :-P Heck The lead Developer included a handful of Linux RPMs to make one of
his PBI work since it was a Linux program any way (which was not pkg_add'd IIRC)
Now we have a simple case here - We need to test if the pkg is all ready
installed abort it with an error to the user. When removing it it would be nice
if we could do a fast check to see if any thing depends on the package, such as
user installed ports !!!!!!!!!!!!!!!!!!!!!!!!!! und abort the uninstall
accordingly. I.e. Make sure for totally clean install/removal of pkg's not just
force them in/out with a sledge hammer like a dumb fuku! Trust me I've seen it
a lot of times. It would also be nice if the user updated a PBI using ports if
we could just *remove* things from the PBI Uninstall menu.
Ok so that sorts that now. What about docs on PBI creation ? We got a few how
to make XYZ FAQs on the FAQ. Other wise it's horse dung. For example one of the
best tutorials says to tarball stuff inside the PBI which is basically a
compressed archive all ready. Kris Moore tells me not to do that - any one see
that in documentation ? HELL NOOOO!!! So we see a few PBI using it that
followed that tutorial. I'm oh most afraid to go to the SVN if you see my
train of thought here.
I see a possible return to PBI Development if I'm made to live in this words
new concept of PBI. There was only a few reasons I never jumped off the boat
and swam for FreeBSD shore after learning I could live without PC-BSD. I saw
PC-BSD as the brightest hope for the future, not only for Unix on a Desktop but
as a real operating system, world class. That was one of the reasons I didn't
just drop off the scene. So here I am for better or worse it seems.
I think I may start compiling a list of ports to prepare PBI's for in this "new
order" try to get a mass production thing going once I have time to get every
thing ready op. Then let operation Justice-Rainbow commence, details classified
with only beneficial results for PC-BSD included. I'm not sure yet for this.
Do I really want PC-BSD to succeed in every way possible? Yes but can I support
a project I feel has issues with ethical, moral, and principal concerns I'm not
sure. Well ether way I hope www.pbidir.com will see so many PBI coming in they
won't know what to do with, I only hope they are the right kind. The good kind
made with love and craftsmanship - not shoddy pieces of crap that brings a
Graphical RPM Installer into this new world. Some people know what my feelings
are about RPMs..
Sigh, even though I know I must follow the light course I think they would
deserve it if I took the darker path. I just can't willingly do that....
(censored). I've got a lot on my plate right now. I've got studies in 6
languages + html/css, I want to install lighttpd/mysql/php on my FreeBSD box so
I can study PHP. I still have not set up my printer. I've got to redo a history
test that the USPS lost, least it wasn't my final (upper 90s pass). I gotta do
a Biology course *joy*. I'd love to just set to work on what I want to do. I'd
love to just dive in to things and create the program I know I can do given the
right time... A strong language reference and documentation database and
inhaling a few dozen manuals, learning ether QT or GTK based GUI development.
PBI it and vola oh how I wish I had the time... With a week off if I didn't
have School I could put a nice dent into a few things that really need them
done. C and Ruby are my friends, it's time I get to know them better and have
a go with QT me thinks.
In a funky branch of science where psychology and history meet at a decision
point that breaks into two possible futures. At first I didn't know which to to
choose but then it just popp'd in there. A man has great capacity for both good
or evil, it's this choice that splits that destiny apart.
While one could harbor malice towards some thing is normal for a human, I have
none to use. I've long rejected such ideas in favor of ones that work. So, I
see that I must take the option that poses the least threat.
On one road, I see the changes to the PBI system to be used (read abused).
Using both volume and redundant checks of quality control push the PBI system
for all it's worth till it ether busts or grows strong.
To the other, adopt to it and fight for its growth. Well ether way I'm going to
raise all kinds of bloody screaming if quality control standards are not
maintained. If Pkg_add becomes the John Doe of the PBI word proper auditing and
quality management is required. The number of times pkg_add PBI have leaked
through testing even when it was strictly a case for "pkg_add -f pkg.tbz" ==
You will be skinned alive being the accepted Community/Developer standard. Even
PC-BSD Developers would occasionally bend this rule and bypass auditing (or
worse...). SO what the heck, why not go with it.
This is a change I hoped to see come with a much stronger infrastructure and a
larger user base. Hopefully one done after proper documentation was ever
created. To be honest PBI documentation is kinda, uhhh scratched out? Yet how
does this change come to us ? By a loss of principals - it wasn't after people
complained. It wasn't after user after user put up requests on the wish list
only to be mostly ignored. It wasn't after people yelled for a more traditional
approach, it wasn't after die hard FreeBSD people turned there noses at the
idea. It wasn't that a flaw was found in an imperfect system and a fix was
needed. It wasn't that as it is the PBI system couldn't work. It's simply that
they would rather have it done NOW then later. Why work to make some thing work
the way it was supposed to? When you can just change the rules to match your
hand of cards ? I'm sorry but thats the way I feel - I don't mean to accuse any
one and don't.
We can now use pkg_add in PBI creation at a very small level because it's the
easy solution. When a problem of commercial importance chopped up. Well excuse
me and my big fat Johnny Reb ass but I'm starting to agree with a few FreeBSD
sys-admins. A clean, functional, elegant design should be the end result. Not
some thing hacked together with chewing gum and cloths pins. Even after public
debate about the similar issues they didn't care - they get a problem getting a
commercial app to abide by it and they change the rules. When I had "offically"
left working on any PBI I did so seeing a system showing signs of reform, one I
knew would stand. Now I see it caving in on it self.
Ok so we have to live with pkg_add app PBI full of libs not added ok now we need to think here. The pkg_add can only be the main app well if we draw that line very easy at cd /usr/ports/cat/app && make package && cd /usr/local/Projects/PBI && mkdir app && cp /usr/ports/Packages/All/app.tbz ./
Then we need to check this package to make sure it only contains libs unique to
the project or else fool around /w it and the +* files to make a new package to
force or risk breaking some thing. Ok thats good enough but what if we have
some problems loading a Lib out of /Programs/$1/libs at run time ? OK well
since the PC-BSD Devs say it's ok to do a pkg_add of the main app. Why don't we
just move that into it's own PBI and pkg_add that after making the user install
it :-P Heck The lead Developer included a handful of Linux RPMs to make one of
his PBI work since it was a Linux program any way (which was not pkg_add'd IIRC)
Now we have a simple case here - We need to test if the pkg is all ready
installed abort it with an error to the user. When removing it it would be nice
if we could do a fast check to see if any thing depends on the package, such as
user installed ports !!!!!!!!!!!!!!!!!!!!!!!!!! und abort the uninstall
accordingly. I.e. Make sure for totally clean install/removal of pkg's not just
force them in/out with a sledge hammer like a dumb fuku! Trust me I've seen it
a lot of times. It would also be nice if the user updated a PBI using ports if
we could just *remove* things from the PBI Uninstall menu.
Ok so that sorts that now. What about docs on PBI creation ? We got a few how
to make XYZ FAQs on the FAQ. Other wise it's horse dung. For example one of the
best tutorials says to tarball stuff inside the PBI which is basically a
compressed archive all ready. Kris Moore tells me not to do that - any one see
that in documentation ? HELL NOOOO!!! So we see a few PBI using it that
followed that tutorial. I'm oh most afraid to go to the SVN if you see my
train of thought here.
I see a possible return to PBI Development if I'm made to live in this words
new concept of PBI. There was only a few reasons I never jumped off the boat
and swam for FreeBSD shore after learning I could live without PC-BSD. I saw
PC-BSD as the brightest hope for the future, not only for Unix on a Desktop but
as a real operating system, world class. That was one of the reasons I didn't
just drop off the scene. So here I am for better or worse it seems.
I think I may start compiling a list of ports to prepare PBI's for in this "new
order" try to get a mass production thing going once I have time to get every
thing ready op. Then let operation Justice-Rainbow commence, details classified
with only beneficial results for PC-BSD included. I'm not sure yet for this.
Do I really want PC-BSD to succeed in every way possible? Yes but can I support
a project I feel has issues with ethical, moral, and principal concerns I'm not
sure. Well ether way I hope www.pbidir.com will see so many PBI coming in they
won't know what to do with, I only hope they are the right kind. The good kind
made with love and craftsmanship - not shoddy pieces of crap that brings a
Graphical RPM Installer into this new world. Some people know what my feelings
are about RPMs..
Sigh, even though I know I must follow the light course I think they would
deserve it if I took the darker path. I just can't willingly do that....
(censored). I've got a lot on my plate right now. I've got studies in 6
languages + html/css, I want to install lighttpd/mysql/php on my FreeBSD box so
I can study PHP. I still have not set up my printer. I've got to redo a history
test that the USPS lost, least it wasn't my final (upper 90s pass). I gotta do
a Biology course *joy*. I'd love to just set to work on what I want to do. I'd
love to just dive in to things and create the program I know I can do given the
right time... A strong language reference and documentation database and
inhaling a few dozen manuals, learning ether QT or GTK based GUI development.
PBI it and vola oh how I wish I had the time... With a week off if I didn't
have School I could put a nice dent into a few things that really need them
done. C and Ruby are my friends, it's time I get to know them better and have
a go with QT me thinks.
Wednesday, November 22, 2006
One mad Spider !
For the first time, the PC-BSD project has irk'd the wrong button on my panel. In what appears to be issues with commerical software being able to abide the same quality standards and "short-commings" of the PBI system that joe packager has to deal with. Pkg_add of the main program is now allowed in a PBI. So I guess if I wanted to make a PBI of Xine I could force pkg_add Xine and no one would care weather or not that pkg_add'd the xine lib(s) used in Kaffine and then deleted them when forcing a pkg_delete ! (Still in the hypo-theory field here). Still I find this un acceptible. Such a change should have been made all of 3 weeks after PBI's started installing into /Programs instead of another area prefixed with My :-)
In short they have had a lot of time to deside this but they do it now why ? To me it feels as if it's because compiled Win4BSD can't run that way or because with the PBI system as it is (now was) breaks it. Win4BSD does not look open source to me and I have no other problem with paying for such a program. If the program needs to be changed internally to run on PC-BSD as a PBI *They should do the Frigging work*. If it can't just work right with the way a PBI installed program is supposed to because of the PBI system rather then the program. * PC-BSD is flibbing late about making changs to fix this ! *. In short I'm very annoyed that it looks as if a commercial project can make an Open Source Operating System bow down to cater to it in order to put their product on the offical PBI directory with a stamp of approval. It would seem Win4BSD Distribute the product only in binary form. The Win4BSD people all ready offer the Schweine of a PBI for download on their own mirror. Why should PC-BSD bend over backwards to get a pkg_add frontend PBI of a commerical product on offical mirrors. It makes no sense !!
PBI were ment to be easy to install/uninstall and not touch the system directly. Allowing oen to uss a pkg_add of say konversation but not adding qt/kde pkg's via the PBI is one thing if done right. You also have to remove any lib's from the pkg used in the PBI before using it e.t.c. to make sure which is another level of work on a PBI Developer. * a frigging nightmare for PBI testers as well if they ever forget to read the scripts before installing *. If you want a front end to pkg_add theres no reason to PBI it. Just use a KDialog ina install.sh file...
I've Contemplated removing all of my PBI installs (reinstall via ports) and demanding my XMMS, Megamek, and Blackbox+BBKeys+BBConf+BBPager+Docker PBIs removed from pbidir but what good would any of it do ? I'm only a PC-BSD user, a mighty annoyed one at that. I'm not the kind of person to "jump ship" when stung but this irks me. I've all ready tried to distance my self from PBI Development for my own issues but this is beyond issue. How to wage a war for principals slain by it's founders? I'm not sure yet... Find a way I very well may. All I can say is I learned a very good phrase in German to day for what I have to say to them.
/* retracted */
This is not the last time my voice will speak.
In short they have had a lot of time to deside this but they do it now why ? To me it feels as if it's because compiled Win4BSD can't run that way or because with the PBI system as it is (now was) breaks it. Win4BSD does not look open source to me and I have no other problem with paying for such a program. If the program needs to be changed internally to run on PC-BSD as a PBI *They should do the Frigging work*. If it can't just work right with the way a PBI installed program is supposed to because of the PBI system rather then the program. * PC-BSD is flibbing late about making changs to fix this ! *. In short I'm very annoyed that it looks as if a commercial project can make an Open Source Operating System bow down to cater to it in order to put their product on the offical PBI directory with a stamp of approval. It would seem Win4BSD Distribute the product only in binary form. The Win4BSD people all ready offer the Schweine of a PBI for download on their own mirror. Why should PC-BSD bend over backwards to get a pkg_add frontend PBI of a commerical product on offical mirrors. It makes no sense !!
PBI were ment to be easy to install/uninstall and not touch the system directly. Allowing oen to uss a pkg_add of say konversation but not adding qt/kde pkg's via the PBI is one thing if done right. You also have to remove any lib's from the pkg used in the PBI before using it e.t.c. to make sure which is another level of work on a PBI Developer. * a frigging nightmare for PBI testers as well if they ever forget to read the scripts before installing *. If you want a front end to pkg_add theres no reason to PBI it. Just use a KDialog ina install.sh file...
I've Contemplated removing all of my PBI installs (reinstall via ports) and demanding my XMMS, Megamek, and Blackbox+BBKeys+BBConf+BBPager+Docker PBIs removed from pbidir but what good would any of it do ? I'm only a PC-BSD user, a mighty annoyed one at that. I'm not the kind of person to "jump ship" when stung but this irks me. I've all ready tried to distance my self from PBI Development for my own issues but this is beyond issue. How to wage a war for principals slain by it's founders? I'm not sure yet... Find a way I very well may. All I can say is I learned a very good phrase in German to day for what I have to say to them.
/* retracted */
This is not the last time my voice will speak.
Tuesday, November 21, 2006
BPM
I've been busy doing a few things with my laptops installed PBI's today, got a chance to try out BPM. That is the Bsd Ports Manipulator. It's a development build and warns you as such on start up.
During the install it prompts you if you want to install the ports collection, I think it should only ask if you have not installed ports but it asked me any way. Reminds me I need to cvsup later. One fatal flaw in the BPM PBIs script is that it does not work on the PC-BSD 1.3Beta which changed from cvsup to csup. I posted on the forums about it. If some one needs to install the ports tree they can use the PC-BSD System program to fetch ports (via the "tasks" tab). K-Menu->Settings->System Administration if you care. There is also the portsnap method and CVSUP/CSUP for command line usage.
portsnap fetch extract
OR
cvsup -L 2 /root/ports-supfile
csup seems to be the same as cvsup on basic usuage aside from the name. On regular FreeBSD systems you can use a copy of the supfile in /usr/share/examples/cvsup/ if you set the mirror. PC-BSD prepairs you one for ports and one for system sources but theres more in that ^^ directory. Back to BPM
BPM offers us no configuration that I can find and seems to use a GTK+ interface. I personally think GTK is a nice look & feel but it doesn't intregrate well with KDE which uses QT. All thats pointless to most users, just remember BPM dun't look as pretty as Konqueror for all intents and purposes. It offers a quick check of all ports available, all installed ports, e.t.c. as well as the catagories in a left plane. A top right plane shows the ports in the catagory and the bottom right plane shows discriptions. Works pretty nice and looks sorta like ones E-Mail clients. One can also run a simple search. It's just a standard search afaik no support for regex which also is not of importance to most users !
To install the program just select it and click the instal botton. You can break it into steps if you only want to do parts of it. I.E. fetch, checksum check, build, install, and clean. Just checking install does it all. You can click details to get a embedded console out put and even open a terminal from the app. It also supports uninstalling the thing. It's very nice but lacks in a few areas.
No support for portupgrading/downgrading
No support that I know of yet for packages (maybe a plus actually :P )
No support that I know of yet for searching with Regular expressions
It does however give you a very nice simple interface to make installing software the FreeBSD way very easy. I admit for once I did sorta skip the EULA basically so I don't remember the licensing terms other then it's free to use. If it is open source it might be worth my while to look into this application more.
food time.
During the install it prompts you if you want to install the ports collection, I think it should only ask if you have not installed ports but it asked me any way. Reminds me I need to cvsup later. One fatal flaw in the BPM PBIs script is that it does not work on the PC-BSD 1.3Beta which changed from cvsup to csup. I posted on the forums about it. If some one needs to install the ports tree they can use the PC-BSD System program to fetch ports (via the "tasks" tab). K-Menu->Settings->System Administration if you care. There is also the portsnap method and CVSUP/CSUP for command line usage.
portsnap fetch extract
OR
cvsup -L 2 /root/ports-supfile
csup seems to be the same as cvsup on basic usuage aside from the name. On regular FreeBSD systems you can use a copy of the supfile in /usr/share/examples/cvsup/ if you set the mirror. PC-BSD prepairs you one for ports and one for system sources but theres more in that ^^ directory. Back to BPM
BPM offers us no configuration that I can find and seems to use a GTK+ interface. I personally think GTK is a nice look & feel but it doesn't intregrate well with KDE which uses QT. All thats pointless to most users, just remember BPM dun't look as pretty as Konqueror for all intents and purposes. It offers a quick check of all ports available, all installed ports, e.t.c. as well as the catagories in a left plane. A top right plane shows the ports in the catagory and the bottom right plane shows discriptions. Works pretty nice and looks sorta like ones E-Mail clients. One can also run a simple search. It's just a standard search afaik no support for regex which also is not of importance to most users !
To install the program just select it and click the instal botton. You can break it into steps if you only want to do parts of it. I.E. fetch, checksum check, build, install, and clean. Just checking install does it all. You can click details to get a embedded console out put and even open a terminal from the app. It also supports uninstalling the thing. It's very nice but lacks in a few areas.
No support for portupgrading/downgrading
No support that I know of yet for packages (maybe a plus actually :P )
No support that I know of yet for searching with Regular expressions
It does however give you a very nice simple interface to make installing software the FreeBSD way very easy. I admit for once I did sorta skip the EULA basically so I don't remember the licensing terms other then it's free to use. If it is open source it might be worth my while to look into this application more.
food time.
Well after stints of packet loss and high pings with the ol'ISPs DNS server things seem stable again. Since I made a bit of a booboo when I uninstalled Gaim (pbi) to try to install it via pkg's so I could try installing an X-Fire plugin and OTR didn't go well. Note to self always use ports for any thing big ! I've been learning to live with Kopete. It's got the level of configuration options one would expect from a KDE program. While Gaim feels like a super enhanced version of the old (pre trijon or w/e) AOL client. Kopete feels more like the regular MSNMSGR client. I prefer Gaim really, even the AOL client was alright until they made it bloat ware.
The biggest reason to use applications like Gaim, Kopete, Trillion e.t.c. is they support many protocols ! Gaim is plugin based dunno about Kopete. Generally a Multi-Protocol Instant Messenger (MPIM :P) Client. Should support the basics, AIM, MSN, Yahoo, Google, ICQ, IRC (if not the best clients...), Jabber e.t.c. Kopete is pretty well rounded but I prefer Gaim personally. After customing it to behave more Tabed IM based (ala aim style) instead of multi-window heck (bye bye msn style) it's quite good. It *THANK GOD* lets you change the style of message displays - VERY IMPORTANT change it quick if you IM a lot, trust me ! Default font should be the standard for KDE in my case it was Sans Serif. To me it's a no frills font, changed it to Bitstream Vera Sans for now. Usuually I try to keep logged into AIM do to a few issues with X-Fire on Unix/Linux/BSD/Mac 8=) Most of the [SAS] uses both and formerly AIM was required for member ship and a Live Ops Warning/Deployment system IIRC.
Really I think I prefer IRC which is good for a more casual chat. FRI IRC is more a "Chat Room" thing then One-On-One 111 commu for most usage (afaic). MSN's ok, offical clients emotes were ok when I used it, if they are like what MSN Gaming Zone has now its great. AIM *had* a good client but emotes that sucked. What I like about aim more then msn is you can have an addy people can reach you at but they don't need to be added to a buddy list to contact you. Which is nice since I prefer IMs to phone calls and one can always restrict it. MSN/X-Fire follow what may be a more traditional model. Only buddy list contacts can reach you. I'm tempted to try ICQ some time but I don't know any one who uses it often, most of my friends use ether MSN or AIM but mostly we all settle on X-Fire haha.
Given some recent issues I'm very tempted to try and start learning Germain. At least to read/write it, I know at one point I was getting very good at reading signs in MoH =/. Germany has always interested me, in a number of ways as have a few other countries cultures. Maybe it's because of my studies about WWII and military history. The Germain language I've never learned much of, like many people I pick up a few words here/there in other languages in passing. Needless to say its one of the countries I'd like to vist if I ever had a world trip. I wouldn't want to live outside of the US but it would be nice to travel around the world a little. Any country that has H&K Weapons is worth a vist I'm sure :-)
I know all of 1 or 2 words in Japanse, maybe same in Chinese. 3 or 4 words or more of Italian most of which I can't say in polite convo and wouldn't dare try to spell. Me and my brother are two of the only people I know who can say FU in another language hehe. Not that we do, I don't and he prefers the English version just like our Mother (her favorite 4 letter word 8=) ). A couple of words in Spanish and French (more ladder then former). I know Italian, French, and Spanish are all very simular and learning one would make it easier to learn the others. I don't know how many words I remember in Klingon, dang pronoucing those right are pesky. Most of my exp. With the German language has been from my WWII studies actually, so it's mostly related to military words/terms. Not very good for a conversation really. Need less to say if it's not a computer language I'm not really multi-lingruel. Being an American and a Computer-noid. I mostly encounter people that speak English or Spanish, ocassionally both. When online usually its ether French if they don't speak english, some times Germain but more often German/English then French/English speaking. I've met about 2 or 3 people that are really good with many languages in my net time. While I have nothing aganst France, Germain interests me more <_<
Being able to read the language and understand it would be my first goal, writing it second and being able to speak it properly would have to be done along side the first if I'd ever manage it. One thing I do like about my native language is that it's so screwed up, any native speaker of English will know what your talking about. Sure US/UK is diffrent for a number of things, I remember a funny post Rouge once made about UK English taking over the world or some thing hehe. Yet the language is so nuts at least on this side of the pond. From some of the issues I've seen in translations I'm not sure how two people of the same country can understand one another some times, especially in a language like Italian. I know in the US people talk diffrent from place to place in prounced style and spelling but it's not much till you hit slang.
IMHO proper English makes about as much logical sense as horse dung rotting on the wall. So obiously with my opinions of my own language what harm is there in learning about another for fun and function ? If ones going to try and learn another language may as well be one that one may enjoy. I don't think there is any thing worse then English unless your talking machine code. I'm also a kind of nut, I know C++ is more used but I know more C because I enjoy C better.
I think I should start splitting entries because they tend to get huge and I usually edit them shortly after if I find a reason. Think I'll start trying to learn the basics over the weeki. I've got a Biology test to finish, a history test to do again. The USPS lost it I guess b/c it didn't get to the school. A "tea" trip in the morning s'like a quarter to 0400 here and gotta be out before 1100. Best go to bed before the dog disowns me.
It's funny, for some reason after about 2100 they start staring at ya as if to say whens bed time ! LOL
Sleep, sweet sleep now if the ol'brain would shut the frig up.
The biggest reason to use applications like Gaim, Kopete, Trillion e.t.c. is they support many protocols ! Gaim is plugin based dunno about Kopete. Generally a Multi-Protocol Instant Messenger (MPIM :P) Client. Should support the basics, AIM, MSN, Yahoo, Google, ICQ, IRC (if not the best clients...), Jabber e.t.c. Kopete is pretty well rounded but I prefer Gaim personally. After customing it to behave more Tabed IM based (ala aim style) instead of multi-window heck (bye bye msn style) it's quite good. It *THANK GOD* lets you change the style of message displays - VERY IMPORTANT change it quick if you IM a lot, trust me ! Default font should be the standard for KDE in my case it was Sans Serif. To me it's a no frills font, changed it to Bitstream Vera Sans for now. Usuually I try to keep logged into AIM do to a few issues with X-Fire on Unix/Linux/BSD/Mac 8=) Most of the [SAS] uses both and formerly AIM was required for member ship and a Live Ops Warning/Deployment system IIRC.
Really I think I prefer IRC which is good for a more casual chat. FRI IRC is more a "Chat Room" thing then One-On-One 111 commu for most usage (afaic). MSN's ok, offical clients emotes were ok when I used it, if they are like what MSN Gaming Zone has now its great. AIM *had* a good client but emotes that sucked. What I like about aim more then msn is you can have an addy people can reach you at but they don't need to be added to a buddy list to contact you. Which is nice since I prefer IMs to phone calls and one can always restrict it. MSN/X-Fire follow what may be a more traditional model. Only buddy list contacts can reach you. I'm tempted to try ICQ some time but I don't know any one who uses it often, most of my friends use ether MSN or AIM but mostly we all settle on X-Fire haha.
Given some recent issues I'm very tempted to try and start learning Germain. At least to read/write it, I know at one point I was getting very good at reading signs in MoH =/. Germany has always interested me, in a number of ways as have a few other countries cultures. Maybe it's because of my studies about WWII and military history. The Germain language I've never learned much of, like many people I pick up a few words here/there in other languages in passing. Needless to say its one of the countries I'd like to vist if I ever had a world trip. I wouldn't want to live outside of the US but it would be nice to travel around the world a little. Any country that has H&K Weapons is worth a vist I'm sure :-)
I know all of 1 or 2 words in Japanse, maybe same in Chinese. 3 or 4 words or more of Italian most of which I can't say in polite convo and wouldn't dare try to spell. Me and my brother are two of the only people I know who can say FU in another language hehe. Not that we do, I don't and he prefers the English version just like our Mother (her favorite 4 letter word 8=) ). A couple of words in Spanish and French (more ladder then former). I know Italian, French, and Spanish are all very simular and learning one would make it easier to learn the others. I don't know how many words I remember in Klingon, dang pronoucing those right are pesky. Most of my exp. With the German language has been from my WWII studies actually, so it's mostly related to military words/terms. Not very good for a conversation really. Need less to say if it's not a computer language I'm not really multi-lingruel. Being an American and a Computer-noid. I mostly encounter people that speak English or Spanish, ocassionally both. When online usually its ether French if they don't speak english, some times Germain but more often German/English then French/English speaking. I've met about 2 or 3 people that are really good with many languages in my net time. While I have nothing aganst France, Germain interests me more <_<
Being able to read the language and understand it would be my first goal, writing it second and being able to speak it properly would have to be done along side the first if I'd ever manage it. One thing I do like about my native language is that it's so screwed up, any native speaker of English will know what your talking about. Sure US/UK is diffrent for a number of things, I remember a funny post Rouge once made about UK English taking over the world or some thing hehe. Yet the language is so nuts at least on this side of the pond. From some of the issues I've seen in translations I'm not sure how two people of the same country can understand one another some times, especially in a language like Italian. I know in the US people talk diffrent from place to place in prounced style and spelling but it's not much till you hit slang.
IMHO proper English makes about as much logical sense as horse dung rotting on the wall. So obiously with my opinions of my own language what harm is there in learning about another for fun and function ? If ones going to try and learn another language may as well be one that one may enjoy. I don't think there is any thing worse then English unless your talking machine code. I'm also a kind of nut, I know C++ is more used but I know more C because I enjoy C better.
I think I should start splitting entries because they tend to get huge and I usually edit them shortly after if I find a reason. Think I'll start trying to learn the basics over the weeki. I've got a Biology test to finish, a history test to do again. The USPS lost it I guess b/c it didn't get to the school. A "tea" trip in the morning s'like a quarter to 0400 here and gotta be out before 1100. Best go to bed before the dog disowns me.
It's funny, for some reason after about 2100 they start staring at ya as if to say whens bed time ! LOL
Sleep, sweet sleep now if the ol'brain would shut the frig up.
Sunday, November 19, 2006
rumble
Well, I've had a good day so far. Managed to get in to the server and camp the admin with a few m8s and have a good time. We've really been getting a lot of abuse reports for some reason. Oh wellz I hope it settles down soon. Didn't get to run my Sunday training session b/c I had to walk the dogs but at least we got some Elemental work done.
Been flying 'round Google, Wikipedia, and the OSI site. I love finding good stuff to read ! Spent most of the other day working on my logging app. It's a simple gizmo mentn to read and write entries from the "Captains-LOG" file I keep under /var/log. Yeah I watched a lot of star trek in the day so sue me :-P
I've haven't worked on the thing in awhile not since I started on the C Standard Library. That was a good while back. I've always had problems trying to implement functions analogous to the head, tail, and cat commands but I've made some progress. At first I tred to wrap up a copy of FreeBSDs src/usr.bin/head/head.c to include in the file, was kinda shocked I didn't screw up. Moved every thing into a sub-dir so I wouldn't lose the header for doing it. I managed to get a perfectly working head going if I called my program with the -t option and the file name. Other wise it didn't work. I've tried toying around with the code and only succeeded in breaking it, well thats the joy of being a noob I suppose. Ripped it all out and started from stratch, got a toFP function for trying to readln the top of the file, based on the head program but alais problems getting it to stick it all on stdin. I'll get it strightened out some day I'm learning more and more as we go along. When I first started with trying to convert my shell script to a C program the whole File I/O was bran new to me. I can all ready see how a ruby script would be better then C for this but I want it in C, it helps me develop my mind.
I'mg etting better at reading the code in FreeBSDs userland. I usually like to poke around a few things, FreeBSD, Vim, Nano e.t.c. If ya gotta be a newbie with out a teacher or a professional education. May as well get some good reading material !! I really like it, even if I don't understand every nuounce of it now. I still can follow the jist of how its working. Plus the more I read it and the more I toy with my compiler the more I learn. Man, I'd love some day to try and pick up a language by just using a cheat sheet reference of it and playing around trying to see how it works by exploring it. I study many languages in varing degrees. I started with C++ because it's what I had heard the most about. I don't particulary care for C++ but it was a good start. To be honest I wish I had tried to learn SHell scripting first but I didn't even know the word UNIX back then. Eventually in my bored lazy way of procastination I picked up enough basics of Perl to be able to read stuff better. I had a really old book about learning Java and programming Java Applets that dated back to like, the HotJava web browser. Way back then you needed HotJava or the soon to be finished new version of Netscape to run Java Applets ! SO yeah it's an old old book but its a fun read. Learning about Java from it thought me two things. Java is a good language and I hate writting it. I love to see software written in Java but I can't stand writting it and some pure Java programs are har don me peepers. So I learned to read source code a lot better but have only ever written a few lines of Java and don't plan on writting many more without need !
C always held a bit of a wonder for me, I used to think "Hmm if this is C++ what is C like?" Well one day I found a little tutorial that introduced me to the language. The unusual sense of humor when trying to show the basics of a programming language kept me coming back to it for more data. Eventually I just fell in love with C, it's so dang logical. I make no claims as to being able to code my way out of a paper bag in any language but I love C. It's also fun to read programs sources and learn from it. Python, a language I had always been reccomended to try is one I tried to avoid. One time I tried learning it, when on a very rare for me vacation. The white space thing wasn't as bad as I thought but I don't like the language. Just not my bag, very good language to work with though. For some very odd reason, I don't know why I think I must've been rumaging around Wikipeda and I desided to try learing Ruby. Yeah I was bored at the time so I had the time to start. My first look at Ruby was when trying to find just the right language for me to start in (people said Python or Java). I hated the site of Ruby code so I never tried it. Yet once I started writting it that day I started to like it. I find I can do a lot more a lot faster in Ruby the nother languages but I pay the price of not being familer with it the way I am with C. When I look around section 3 of the FreeBSD manual I know what I'm dealing with, in Ruby its not always the same. I love Ruby very much now and hope to consintrate my studies on C, SH, and Ruby. One day on a whim I popped over to W3 Schools and started reading about the fundimentals of HTML. Starting to get interested in XHTML/CSS now actually.
Not sure what my future holds for any thing but I remeber the simple fact. The better one reads the easier one learns to write. TTFN chores a shore!
Been flying 'round Google, Wikipedia, and the OSI site. I love finding good stuff to read ! Spent most of the other day working on my logging app. It's a simple gizmo mentn to read and write entries from the "Captains-LOG" file I keep under /var/log. Yeah I watched a lot of star trek in the day so sue me :-P
I've haven't worked on the thing in awhile not since I started on the C Standard Library. That was a good while back. I've always had problems trying to implement functions analogous to the head, tail, and cat commands but I've made some progress. At first I tred to wrap up a copy of FreeBSDs src/usr.bin/head/head.c to include in the file, was kinda shocked I didn't screw up. Moved every thing into a sub-dir so I wouldn't lose the header for doing it. I managed to get a perfectly working head going if I called my program with the -t option and the file name. Other wise it didn't work. I've tried toying around with the code and only succeeded in breaking it, well thats the joy of being a noob I suppose. Ripped it all out and started from stratch, got a toFP function for trying to readln the top of the file, based on the head program but alais problems getting it to stick it all on stdin. I'll get it strightened out some day I'm learning more and more as we go along. When I first started with trying to convert my shell script to a C program the whole File I/O was bran new to me. I can all ready see how a ruby script would be better then C for this but I want it in C, it helps me develop my mind.
I'mg etting better at reading the code in FreeBSDs userland. I usually like to poke around a few things, FreeBSD, Vim, Nano e.t.c. If ya gotta be a newbie with out a teacher or a professional education. May as well get some good reading material !! I really like it, even if I don't understand every nuounce of it now. I still can follow the jist of how its working. Plus the more I read it and the more I toy with my compiler the more I learn. Man, I'd love some day to try and pick up a language by just using a cheat sheet reference of it and playing around trying to see how it works by exploring it. I study many languages in varing degrees. I started with C++ because it's what I had heard the most about. I don't particulary care for C++ but it was a good start. To be honest I wish I had tried to learn SHell scripting first but I didn't even know the word UNIX back then. Eventually in my bored lazy way of procastination I picked up enough basics of Perl to be able to read stuff better. I had a really old book about learning Java and programming Java Applets that dated back to like, the HotJava web browser. Way back then you needed HotJava or the soon to be finished new version of Netscape to run Java Applets ! SO yeah it's an old old book but its a fun read. Learning about Java from it thought me two things. Java is a good language and I hate writting it. I love to see software written in Java but I can't stand writting it and some pure Java programs are har don me peepers. So I learned to read source code a lot better but have only ever written a few lines of Java and don't plan on writting many more without need !
C always held a bit of a wonder for me, I used to think "Hmm if this is C++ what is C like?" Well one day I found a little tutorial that introduced me to the language. The unusual sense of humor when trying to show the basics of a programming language kept me coming back to it for more data. Eventually I just fell in love with C, it's so dang logical. I make no claims as to being able to code my way out of a paper bag in any language but I love C. It's also fun to read programs sources and learn from it. Python, a language I had always been reccomended to try is one I tried to avoid. One time I tried learning it, when on a very rare for me vacation. The white space thing wasn't as bad as I thought but I don't like the language. Just not my bag, very good language to work with though. For some very odd reason, I don't know why I think I must've been rumaging around Wikipeda and I desided to try learing Ruby. Yeah I was bored at the time so I had the time to start. My first look at Ruby was when trying to find just the right language for me to start in (people said Python or Java). I hated the site of Ruby code so I never tried it. Yet once I started writting it that day I started to like it. I find I can do a lot more a lot faster in Ruby the nother languages but I pay the price of not being familer with it the way I am with C. When I look around section 3 of the FreeBSD manual I know what I'm dealing with, in Ruby its not always the same. I love Ruby very much now and hope to consintrate my studies on C, SH, and Ruby. One day on a whim I popped over to W3 Schools and started reading about the fundimentals of HTML. Starting to get interested in XHTML/CSS now actually.
Not sure what my future holds for any thing but I remeber the simple fact. The better one reads the easier one learns to write. TTFN chores a shore!
Tuesday, November 14, 2006
vimrc
Post best viewed from here
Ahh what a day. I've spent most of my time ether on the forums or in my beloved editor of choice (vim). I desided for some odd reason to rewrite my vim resource files. I've more or less completed my ~/.vimrc file and will worry about my ~/.gimvrc file later. Really I rarly use the GUI off win32. I basically like using vim in konsole because I can quickly step in and out of editing, ether by forcing vim into the background (control+z, type fg to return to it). Yet because cmd.exe is the worst terminal I have ever used, poor if any support for cut, copy, and paste. Ignores the mouse for the most part and Windows has the tab completion of a fart in the wind. I'm kinda getting used to zsh's after using tcsh so much hehe.
Heres my vimrc file so far, edited for a few things. The syntax is about as simple as a shell script or "vim script" but the " double quote works like the # and // comments in most languages. White space it doesn't care for but it does care about line endings. Since I share most things between Windows XP, PC/Free BSD, and GNU/Linux + several computers I have to be portable in many ways. I started the file on Windows with my file format set for Win/DOS end of lines (:set ffs=dos), vim detects it and uses whats there. I usually set mine as "ffs=dos,unix,mac" so I don't have to convert my files End of Lines (EoL) when I send some one a text file. If I use UNIX eols theres no carriage returns in Notepad, it's too dumb to figure it out unlike many many other editors. Sad through is you can always count on some one to have notepad or a simular editor. Gnomes editor and KDE's KWrite are actually rather nice though. When I tried to run my now complete vimrc on PC-BSD I got a zillion errors and I new I didn't screw it up that bad, infact only one entry was wrong. I quickly figured out it must have been the line feeds, the fact that I had just setup a keybind to strip off the pesky ^M's you get in some files helped hehe. I couldn't find any quick ways to convert the EOLs so I looked them up in Wikipeda and found a way to do it with pearl, I now have a pdos2unix and punix2dos script to do the job when given an input file name and an output file name.
I've been told customizing Vim can be bad b/c of having to work with standard vim/vi but I'm a fruit -> If I want Vim I call vim and if I want Vi I call vi. FreeBSD uses nvi for vi, not vim like some GNU/Linuxes do. If some Linux Distro doesn't make vim start as vi compatible without special changes it's not my problem. I learned to use vim with just the example vimrc file. After that using Vi was easy after an hour or two. I also remember which I'm using by the fact that I call vi as vi and vim as vim + the status line I keep around.
Lines that start with two "'s are comments just for this post
Some changes I plan, if it's starting with the GUI I'll have it set it so I can right click on miss spelled words and correct them. you can move the cursor to the word and press z= for a list of corrections, and use ]s and [s to search forward/back. Some times I just scroll with the mouse when proof reading so this helps. You can do a :set "mousemodel=popup_setpos" to get it after you turn on spell checking. I want to set it up so I can quickly convert a files format between DOS and UNIX via F11 and F12, should be possible.
I've downloaded a few things from http://www.vim.org/scripts/ that I want to toy with. One was a pack of 140 themes for gvim gotta sort that hehee. Another was a Matrix screen saver. It's pretty nice if you speed it up but on my system it makes me use like 50~60% CPU judging by GKrellm2 my favorite GTK Krell system monitoring app.
One of the reasons I love vim very much is it's very relaxing to us. Since I play games often as I can get a good tactical one /w my team mates. I do plenty of running. Once the tangos know your there you gotta get moving quickly (Dynamic). So in the intertests of moving as fast as is safe and doing proper B and CB entries (Bang & Breach Bang clear). I have my pinky jutted out to hold shift many times. B/C Usually I don't run all the time, I try to sneak about unless I plan on being Dynamic. So that and using my pinky to make capital letters puts alot of strain on my, now couple that with Escape Meta Alt Control Shift (EMACS) style editing. When I use my pinky to deal with capslock (hate that key), shift, control, z, and Windows. It's nice not to have to strain my fingers or wrists. I find using vim very comfortable for long edits. It's also so dang effective that I can't stand many other editors. Its like the speed and power of Vi/Vim ruins you for other editors once you learn it. I don't claim to be no Vim Master or any thing but to me its gotta be the worlds greatest editor. Vi is in the top 10 in my book but Vim >= #1 xD
The only bad thinkg is some times I press # instead of $. The $ key moves to end of line in normal/visual modes. While the * and # keys searches forward and backwards for the word under the cursor. One thing I'm looking at is a C Refernce that can be ran in Vim, might help me write files on Win32 again. Usually I prefer BSD for doing C work because I can quickly look up a routine via the system manual. After all Unix was written in C and so is largly FreeBSD and I'd reckon most of GNU/Linux which is infact made up of many languages afaik.
Ahh what a day. I've spent most of my time ether on the forums or in my beloved editor of choice (vim). I desided for some odd reason to rewrite my vim resource files. I've more or less completed my ~/.vimrc file and will worry about my ~/.gimvrc file later. Really I rarly use the GUI off win32. I basically like using vim in konsole because I can quickly step in and out of editing, ether by forcing vim into the background (control+z, type fg to return to it). Yet because cmd.exe is the worst terminal I have ever used, poor if any support for cut, copy, and paste. Ignores the mouse for the most part and Windows has the tab completion of a fart in the wind. I'm kinda getting used to zsh's after using tcsh so much hehe.
Heres my vimrc file so far, edited for a few things. The syntax is about as simple as a shell script or "vim script" but the " double quote works like the # and // comments in most languages. White space it doesn't care for but it does care about line endings. Since I share most things between Windows XP, PC/Free BSD, and GNU/Linux + several computers I have to be portable in many ways. I started the file on Windows with my file format set for Win/DOS end of lines (:set ffs=dos), vim detects it and uses whats there. I usually set mine as "ffs=dos,unix,mac" so I don't have to convert my files End of Lines (EoL) when I send some one a text file. If I use UNIX eols theres no carriage returns in Notepad, it's too dumb to figure it out unlike many many other editors. Sad through is you can always count on some one to have notepad or a simular editor. Gnomes editor and KDE's KWrite are actually rather nice though. When I tried to run my now complete vimrc on PC-BSD I got a zillion errors and I new I didn't screw it up that bad, infact only one entry was wrong. I quickly figured out it must have been the line feeds, the fact that I had just setup a keybind to strip off the pesky ^M's you get in some files helped hehe. I couldn't find any quick ways to convert the EOLs so I looked them up in Wikipeda and found a way to do it with pearl, I now have a pdos2unix and punix2dos script to do the job when given an input file name and an output file name.
I've been told customizing Vim can be bad b/c of having to work with standard vim/vi but I'm a fruit -> If I want Vim I call vim and if I want Vi I call vi. FreeBSD uses nvi for vi, not vim like some GNU/Linuxes do. If some Linux Distro doesn't make vim start as vi compatible without special changes it's not my problem. I learned to use vim with just the example vimrc file. After that using Vi was easy after an hour or two. I also remember which I'm using by the fact that I call vi as vi and vim as vim + the status line I keep around.
Lines that start with two "'s are comments just for this post
"Terry M. P***** personal vimrc file """"""""""""""""""""""""""""""" "Editing Options """"""""""""""""""""""""""""""" "Don't be VI compatible - Keep this at top of file ! set nocompatible ""Setting vim to be vi compatible makes changes to make it more pure Vi, I don't care for ""this as this is VIM not VI, if I wanted a pure Vi clone I'd use one. " allow backspacing over everything in insert mode set backspace=indent,eol,start ""This makes life a lot easier, just trust me. " Wrap text at n chars with a line break set textwidth=80 set wrap set lbr "" To keep console portability I used to break my lines around 76~78 char "" I'm trying this to make Vim more like other editors. Out of the box when you write "" a line two long for the screen it continues on the line below and is numbered as one "" line. With these settings it breaks them like most other editors at my specified "" 80 chars. Not sure if I will keep it but worth a test. -> Prolly good for Vim newbies " Use spaces instead of tabs set expandtab set tabstop=6 ""I generally like spaces and monospace fonts more for indentation and coding. ""I do like using tabs for manually aligning data in a table in ASCII. "set min # of spaces for numberwidth. It grows as needed set numberwidth=2 ""This keeps down the size used for the thing /w the line numbers. Defualt is 4. """""""""""""""""""""""""""""" "Tabbed Editing """"""""""""""""""""""""""""""" set showtabline=1 ""Only show the list of tabs when theres more then one. 2=always, 0=never "set prefered line enders set ffs=unix,dos,mac ""Type :help ffs for more info, can be set in GVIM via options menu. "enable filetype detection filetype on "turn off ft plugin and indent filetype plugin off filetype indent off "Enable syntax highlighting syntax on "" Syntax highlighting is very good, does stuff like making comments blue, keywords green "" strings red e.t.c. Very nice for markup, scripting, config files, and programming. """"""""""""""""""""""""""""""" " Keybindings """"""""""""""""""""""""""""""" "Use the ";" as a duplicate of ":" makes life so much easier "for some odd reason it cannot be followed with a comment on it's line! :nma ; : "" I personally think typing ; instead of pressing shift + : is the way it should be "F1 turns on spellchecking in current buffer map__________________________________________________:setlocal spell spelllang=en_us "" I only want spell checking for certain files so this lets us turn it on when we want it "" and just in the current buffer (like file) "F2 turn on line numbering map :set number ""I don't want line numbering unless it's a source file or a big document. Pressing this "" key we turn it on when wanted. "F10 rids us of ^M after carriage returns map :%s/^M/ /g ""You have to make the ^M by pressing control+v control+m for this to work. "" Some times you'll get pesky ^M at all the EOLs and it annoys me - strip them """"""""""""""""""""""""""""""" "User Interface Options """"""""""""""""""""""""""""""" "Always show the status bar with file name e.t.c. set laststatus=2 "" 0=never, 1=only if more then one file/buffer/tab "Show %of file remaining in statusbar set ruler "" I use thse two this b/c I like knowing what line/column I'm on un obtusivly + file name "" and how far into the file overall I am. """"""""""""""""""""""""""" " MOUSE """"""""""""""""""""""""""" "Start with mouse support set mouse=a "Make pointer an I-Beam in insert mode set mouseshape=i:beam "Hide the mouse when typing text (GUI only) set mousehide "" I'm used to being able to scroll around with my mouse wheel :) "" Try :help mouseshape to look at what you can do with the mouse pointer. X11 supports "" more options then Windows. """"""""""""""""""""""""""""""" "General Preferences """"""""""""""""""""""""""""""" "Command history set history=50 "" Remebers the last 50 commands entered via :command "automatic re-reading of changed open files "set autoread "" Gotta test this, basically if you edit in vim and edit with another app. It will try "" to re-read the file. " Switch on search highlighting - use :noh to turn it off after a search set hlsearch ""highlights all matches to a /search "ingore case when searching set ignorecase "" just like grep -i "I guess" "set cmd line size set cmdheight=2 ""This makes the command line at the bottom, where you see the ":" when entering commands "" be 2 lines high. Not really important IMHO
Some changes I plan, if it's starting with the GUI I'll have it set it so I can right click on miss spelled words and correct them. you can move the cursor to the word and press z= for a list of corrections, and use ]s and [s to search forward/back. Some times I just scroll with the mouse when proof reading so this helps. You can do a :set "mousemodel=popup_setpos" to get it after you turn on spell checking. I want to set it up so I can quickly convert a files format between DOS and UNIX via F11 and F12, should be possible.
I've downloaded a few things from http://www.vim.org/scripts/ that I want to toy with. One was a pack of 140 themes for gvim gotta sort that hehee. Another was a Matrix screen saver. It's pretty nice if you speed it up but on my system it makes me use like 50~60% CPU judging by GKrellm2 my favorite GTK Krell system monitoring app.
One of the reasons I love vim very much is it's very relaxing to us. Since I play games often as I can get a good tactical one /w my team mates. I do plenty of running. Once the tangos know your there you gotta get moving quickly (Dynamic). So in the intertests of moving as fast as is safe and doing proper B and CB entries (Bang & Breach Bang clear). I have my pinky jutted out to hold shift many times. B/C Usually I don't run all the time, I try to sneak about unless I plan on being Dynamic. So that and using my pinky to make capital letters puts alot of strain on my, now couple that with Escape Meta Alt Control Shift (EMACS) style editing. When I use my pinky to deal with capslock (hate that key), shift, control, z, and Windows. It's nice not to have to strain my fingers or wrists. I find using vim very comfortable for long edits. It's also so dang effective that I can't stand many other editors. Its like the speed and power of Vi/Vim ruins you for other editors once you learn it. I don't claim to be no Vim Master or any thing but to me its gotta be the worlds greatest editor. Vi is in the top 10 in my book but Vim >= #1 xD
The only bad thinkg is some times I press # instead of $. The $ key moves to end of line in normal/visual modes. While the * and # keys searches forward and backwards for the word under the cursor. One thing I'm looking at is a C Refernce that can be ran in Vim, might help me write files on Win32 again. Usually I prefer BSD for doing C work because I can quickly look up a routine via the system manual. After all Unix was written in C and so is largly FreeBSD and I'd reckon most of GNU/Linux which is infact made up of many languages afaik.
Subscribe to:
Posts (Atom)