July 2005 Archives

July 29

Suddenly the Dungeon collapses!! - You die...

I don't usually ever turn off Irssi but for some reason I did a /quit tonight and got a bizarre error message. Suddenly the Dungeon collapses!! - You die... I knew right away it was a Screen error. These are the types of errors the old unix hackers put in their code :-) The irssi developers are mere kids by comparison. Anyway, I happen to have the screen source code in my home directory (what girl doesn't?) and a quick grep of attacher.c confirmed it.

#if defined(DEBUG) || !defined(DO_NOT_POLL_MASTER)
      if (AttacherPanic)
        {
          fcntl(0, F_SETFL, 0);
          SetTTY(0, &attach_Mode);
          printf("\nSuddenly the Dungeon collapses!! - You die...\n");
          eexit(1);
        }
#endif

So it looks like doing a /quit caused an attacher panic. All I have to do is figure out what the hell that is and how not to do it again.

On the subject of code comments, try running: grep -iwr <naughty word> /usr/src/linux *

Posted by æc♥ | Permanent Link

July 28

windows

Windows is another nifty emacs extension that lets you set up a bunch of windows each with a different file, or manpage or irc window, music player or whatever. You set up all your sizes and then simply save this as a session.
typing C-c C-w C-r (or C-cwr) gives you a choice:
A)save-all R)esume-all S)ave-this L)oad-this N)Load# ~)read-~ W)ipe 
So I can easily save all of this to a ~/.windows file and the next time I start emacs I can choose Resume from the menu and everything is restored just like when I left it. Because it doesn't restore it automatically, I can save that session, shut off my computer and the next day do some entirely different things with emacs and restore my session another time. Quite geeky!

I have also experimented with ERC the emacs irc client, there are actually quite a few irc clients for emacs but ERC seems the best of the lot. Hopefully it can do the same sorts of things irssi can and if so might be worth a closer look.

Posted by æc♥ | Permanent Link

July 22

tiles

We have some guests staying with us for a while, they arrive tomorrow so Sarah and I got the bright idea to re-tile the kitchen floor so it doesn't look old and gross anymore.

Our landlord had been clearing out an apartment down the hall and there were two boxes of tiles, one unopened, the other opened but with only a few tiles missing. These are the cheapie vinyl tiles, but they still look pretty good compared to what was on the floor before.

So last night at about 1:30am we decide to start tiling and figured we would do the easy ones. That is the ones that are in the middle of the room and need no cutting. We followed the straight line that the old tiles made and it was quite simple, taking about an hour to get them all done.

This afternoon we open the other box to do the edges and it was a completely different color and style of tile :-)

So, a frantic call to our landlord resulted in him going out to get the right ones and then installing them for us, in exchange for me doing a complete reinstall of Windows XP on his computer.

For once I didn't mind spending my afternoon with Windows XP and now our kitchen looks great!

Posted by æc♥ | Permanent Link

July 18

LFS

I built a Linux From Scratch system on my laptop, I have an empty 10GB partition just for this sort of thing.

LFS is basically obtaining and compiling from source everything you need to get a base level, bare bones linux system up and running. You use the host operating system to compile the very first handful of packages like glibc, binutils, automake, make and gcc. Then you have some basic tools and can then recompile them with your new version of gcc. Then you chroot into the new partition, rebuild the "tool-chain" and then rebuild the base packages, and finally add the kernel and grub and some other fun stuff.

A few of things I noticed;
  • It takes a long time to compile and test Glibc :-)
  • Read the Makefile, many programs have tests you can run before installing
  • Out of the 57 packages needed for a basic linux system, 24 come from gnu.org!
  • just because ./configure works, there is no guarantee make will also work.
  • LFS makes me really appreciate Debian
I managed to even get on the internet and set up dhcp which was cool. LFS also shows you where all these little commands come from and I discovered a few new commands that I never knew about. Here is a taste of some of the more interesting ones:
Glibc:
xtrace          Traces the execution of a program by printing the currently
executed function
ldconfig        Configures the dynamic linker runtime bindings
tzselect        Asks the user about the location of the system and reports
the corresponding
time zone description 


Binutils: readelf Displays information about ELF type binaries size Lists the section sizes and the total size for the given object files strings Outputs, for each given file, the sequences of printable characters that are of at least the specified length strip Discards symbols from object files

Coreutils: expand Converts tabs to spaces env Runs a command in a modified environment fmt Reformats the paragraphs in the given files fold Wraps the lines in the given files join Joins the lines that have identical join fields from two separate files nl Numbers the lines from the given files paste Merges the given files, joining sequentially corresponding lines side by side, separated by tab characters pinky Is a lightweight finger client; it reports some information about the given users unexpand Converts spaces to tabs vdir Is the same as ls -l

Mktemp: mktemp Creates temporary files in a secure manner; it is used in scripts tempfile Creates temporary files in a less secure manner than mktemp; it is installed for backwards-compatibility

Ncurses: clear Clears the screen, if possible infocmp Compares or prints out terminfo descriptions infotocap Converts a terminfo description into a termcap description reset Reinitializes a terminal to its default values tack The terminfo action checker; it is mainly used to test the accuracy of an entry in the terminfo database toe Lists all available terminal types, giving the primary name and description for each

Gettext: hostname Displays a network hostname in various forms

Bzip2: bzcat Decompresses to standard output bzdiff Runs diff on bzipped files bzgrep Runs grep on bzipped files bzegrep Runs egrep on bzipped files bzfgrep Runs fgrep on bzipped files bzless Runs less on bzipped files bzmore Runs more on bzipped files

Diffutils: cmp Compares two files and reports whether or in which bytes they differ sdiff Merges two files and interactively outputs the results (sdiff file1 file2 | less)

E2fsprogs: badblocks Searches a device (usually a disk partition) for bad blocks chattr Changes the attributes of files on an ext2 file system; it also changes ext3 file systems findfs Finds a file system by label or Universally Unique Identifier (UUID)

Gzip: gzexe Creates self-decompressing executable files zgrep Runs grep on gzipped files zless Runs less on gzipped files zmore Runs more on gzipped files

Man: man2dvi Converts a man page into dvi format man2html Converts a man page into HTML whatis Searches the whatis database by keyword and displays the short descriptions

Psmisc: fuser Reports the Process IDs (PIDs) of processes that use the given files or file systems killall Kills processes by name pstree Displays running processes as a tree

Shadow: mkpasswd Generates random passwords newusers Is used to create or update an entire series of user accounts pwck Verifies the integrity of the password files /etc/passwd and /etc/shadow chage Used to change the maximum number of days between obligatory password changes chfn Used to change a user's full name and other information

Sysvinit: lastb Shows the failed login attempts, as logged in /var/log/btmp mountpoint Checks if the directory is a mountpoint pidof Reports the PIDs of the given programs

Util-linux: arch Reports the machine's architecture column Formats a given file into multiple columns line Copies a single line namei Shows the symbolic links in the given pathnames write Sends a message to the given user if that user has not disabled receipt of such messages


I won't keep the LFS system, some people go on to running X, Gnome and even have installed package managers and so on, but it takes alot of time and besides that I want to use the partition to try other OS's from time to time. However it has certainly been an eye opener and I'd recommend any linux user try at least once.

Posted by æc♥ | Permanent Link

July 16

plumber

I'm not in the best of moods, our bath/shower drain is backed up, the toilet will not flush and the water is coming up through the laundry room drain. My Dad is out of with my brothers doing the male bonding stuff and I dont know how to turn off the water.

I can't take a shower, cannot do any laundry and have to go downstairs to the restraunt to use the bathroom. Anyway the plumber is on the way, he will save me :-)

A chuckle from #emacs...
13:56  * e1f watches an interview with jack welch at mitworld
13:56 < e1f> "not everyone can be above average"
13:58 < forcer> A factual observation.
13:58 < johnsu01> not really.
13:58 < forcer> johnsu01: It's a mathematical truth.
13:58 < johnsu01> "not everyone can be above average at the same time"
13:58 < forcer> Hehe.

Posted by æc♥ | Permanent Link

July 15

xorg

Last night I upgraded my desktop and my backup-desktop to xorg from xfree86. I tested it on the backup machine first and it seemed fine, nothing broke, a few packages had to be removed but the Nvidia drivers were not affected at all and X restarted with the first try.

My main desktop was a bit more of a hassle. Firstly it wanted to rip out a ton of stuff,
The following packages will be REMOVED:
aalib1-dev billard-gl bittornado-gui foobillard freeglut3 libdevil-dev 
libdevil1 libgimp-perl libgle3 libglut3 libsdl-erlang libwxgtk2.4 
libwxgtk2.4-python libxine-dev libxine1 pdl planetpenguin-racer rss-glx 
scorched3d slang1-dev tuxracer wings3d xfld-desktop xfmedia xine-ui
xlibmesa-glu xlibmesa-glu-dev xscreensaver-gl
So with all that gone, I got my xorg working. But now am missing a few apps that I have grown fond of, Xine for playing dvd's, Tuxracer for my niece and foobillard, the really cool 8 ball game. On top of that, Bzflag would no longer compile. I managed to get that fixed today by adding some more SDL stuff that must of gotten removed somehow and reinstalling the Nvidia driver. So now everything is somewhat back to normal.

I think now Debian Unstable users are finding out why they call it unstable. For so long it truly has been a stable OS but with the release of Sarge all that has changed and I suspect if Debian holds true to its promise of more timely releases we will much more of these kinds of changes in the unstable branch. No complaints though really, wheres the fun in an OS that never breaks?

Posted by æc♥ | Permanent Link

July 12

windows



   So I am happily irc'ing, and reading my email on the server when I notice things slowing down, I see Samba taking alot of my CPU and ram. I figure Sarah is up to something and it turns out she is copying some music off the server onto her computer. This really shouldn't bog down the computer that much so I went in her room to investigate.

She had opened two windows and was dragging folders from the server to her computer. But the copy dialog in windows is stupid enough to pop up in the same position all the time, so you only ever see the top dialog. This dialog box was in Windows 95, its been 10 years for god sakes. Do they not have anyone in Redmond that study how people interact with their software?

Anyway, part of the problem was Sarah had no idea how many copies were simultaneously going on. The other problem was of course she wasn't actually looking at the size of the folders she was copying. The Classical Music folder for example is over 10GB :-)

Posted by æc♥ | Permanent Link

July 10

gnus

I really like Gnus as my email client however what a pain to set up. To be fair it is a newsreader thats been hacked to deal with email but still, I found it really hard to get it to do all the things that mutt did for me.

Anyway its done now and I am happy with it and must say it is much nicer to have all the emacs commands, especially the search tools inside my email client. Oh thank you Johan Bockgård in #gnus for your patience :-)

You might notice that I hardly write in this blog anymore, I guess I do not get out of it as much as I used to and it should be a two way thing you know? Its not like theres a huge pressure to write something everyday, but sometimes I don't really feel like it and then that seems to carry over into the next day and the next.

Xorg will soon be in Debian unstable, I have already upgraded to gcc4 this week. Bzflag, emacs-cvs, emms-cvs and screen all build and run fine with gcc4 so Xorg shall be one of thelast biggies to upgrade to. I just know this will break my video card modelinesonce again :(

Posted by æc♥ | Permanent Link

July 04

dude check this out!

   City of God is a very violent and very sad movie in many ways, but the narrative and presentation is captivating, five minutes in to the movie you realize you are hooked. The movie deservedly won many awards and even if your not a fan of subtitles, the cost of a rental is a bargain for an unforgettable movie like this.

I have attempted to use Gnus as my email client just to see what all the raving in #emacs is all about :-) Mutt makes me switch to emacs anyway to compose mail so I might as well stay within emacs and reap the benefits of not jumping between applications. A 3% boost in efficency by my estimation :)

So far I have got the part where is connects to usenet and reads groups down pat, but the part where it actually reads my email I am struggling with.

In my hunt for documentation I did find a very interesting book called The Craft of Text Editing. I don't know why I like reading books like these. maybe its less technical in nature and a break from learning C or the shell or how to install foo. Anyway what jumped out at me though was something which I was never able to articulate even in my mind, one of the major differences between Emacs and Vim....
Fourth, the basic paradigm behind the Emacs command set is "move to desired position, make desired change." This paradigm applies even in the case where I made a mistake, as I simply add the mistake to the list of changes to be made and continue to apply the pardigm. I never have to change mental gears. The penalty for making a mistake is thus minimized.
Fianlly..... From the Department of Horribly Named Applications I give you Dude Check This Out!"

Posted by æc♥ | Permanent Link

July 01

mp3's

I have been adding some more mp3's to my collection, and have finally put all the groups into their own folders so there are no stragglers laying around.

Some of the files were still in .wav format so on the server I had to convert them to mp3's without X windows. I also had the problem of the files names having spaces. I have a function in my ~/.bashrc file that finds files.
#find a file with a string in its name: ff
function ff() { find . -type f -iname '*'$*'*' -ls ; }
So typing ff *.wav will recursively find any wav files under my current directory. Then I simply cd into the directory with the .wav files and with my nifty one line command, remove the spaces in the names, convert them from file.wav to file.wav.mp3 and finally rename them to file.mp3.
rename 's/ /_/g' *.wav ; for i in *.wav; do /usr/bin/lame $i $i.mp3; done \
&& rm -rf *.wav && rename 's/wav.//g' *.mp3 ;
Of course if I was really smart I would merge my ff function to construct an unmitigated seek and convert mega .wav conversion command. I would have called her The Wave of Freedom I tried but was unsure how....

Several people have emailed me about my mp3 server, I no longer have a static IP so I would have to set up one of those dyndns things, so maybe when I get the rest of them sorted out, which won't be long I will set up a server again.

Posted by æc♥ | Permanent Link