February 2005 Archives

February 26

freevo

No luck on getting my "windows" key to work so that's on the back burner for now. I did however decide to try installing this TV card. I shut down the desktop put it in, rebooted and got no errors, then I recompiled my kernel to include the driver for the TV card's chipset which thankfully is included in the 2.6 kernels. Then I had to reinstall the Nvidia driver and rebooted and seemingly all is well. lspci 0000:02:09.0 Multimedia controller: Philips Semiconductors SAA7130 Video Broadcast Decoder (rev 01) I decided to try just watching TV on the card to test it before attempting to install freevo. Both Xawtv and Tvtime gave me bluescreens, so I had to start reading documentation, at the moment though I have so much other stuff going on I am just sort of half heartedly reading and hoping its something obvious I've overlooked.

I have to download XML files of local listings and several scripts are available except I cannot find Canadian listings, scripts are named tv_grab_dk, tv_grab_uk, tv_grab_es, tv_grab_fi, tv_grab_jp and so on. So for now, no tv for me.

The other day I was at my parents and I had in my purse an old cellphone which has an alarm built in. I set the alarm to 4:30am for every day of the week and hid it in my younger brothers room. The nice thing is that the phone doesn't have to be on, it will power up, sound the alarm and then turn off so the battery is good for ages. Before you go thinking how evil this is, you have to know that it is nothing compared to some of the "practical jokes" he has played on me.

æc♥

Posted by æc♥ | Permanent Link

February 25

The windows key

My laptop has a "windows key" in between the left ctrl and alt, which for some reason I cannot get X, Xfce4 nor vim to recognize.

I have tried pretty much all the keyboard related packages in Sid with no success. Xev tells me it is key 115 "Super_L" so I added that key with: xmodmap -e "keycode 115 = Super_L" but that seems to do nothing. It bugs me now because I know gnome and KDE have those keyboard layout apps and are snap to add or enable an unused key.

Today I forced my self to use emacs instead of vim to get a feel for it. I don't mind not having to switch modes. Sometimes in vim it is annoying when you think you in insert and your not. I do wish I could simulate visual mode though, it seems emacs doesn't highlight (at least not by default) a block of text when you do a group selection so I lose track of where my "block" began. Hopefully there's a setting for this.

The other day someone gave me a TV tuner card, its not a very popular brand though. I found the company website but of course no linux drivers. Hopefully google.ca/linux will bail me out again.

æc♥

Posted by æc♥ | Permanent Link

February 24

cgdb

More debugging stuff..

cgdb is a nice colour debugger that I have also tried in my quest for the perfect editor/debugger combination. I am a fan of syntax highlighting as it makes things far more readable for me, so cgdb looks pretty good. All of this started last week when I had to complete an exercise for my book that I found very complex to visualize. I tried regular gdb but no syntax colours, so then I tried ddd which also has no colours, and is rather ugly to look at.

I then decided to diagram my program, partly because I felt drawing it out with arrows showing what points where would surely help me see whats going on. I made a little pdf which really did help, it showed me clearly what I was doing wrong in my code. It wasn't until today that I found out ddd can do the exact same thing, oh well.

The emacs vs vim thing is still up in the air, I think at this point I should just stick with what I know and not get distracted learning another editor, but at the same time, to get the basics down would take only a day or so of regular use. I will vote on it tonight.

Last night I watched Napoleon Dynamite which I thought was really really funny, quirky funny though, like a stoner movie, you can see an iTrailer here.

æc♥

Posted by æc♥ | Permanent Link

February 22

emacs

I have seen a feature of emacs that is really helpful for C and gdb. You can split a window and run the gdb debugger next to your program and a little => prompt will step through your program matching whatever gdb commands you type.

This was much easier for me to see what exactly is happening in a program than with simply running gdb in a stand alone window.

So, of course vim has this right? Well no. There are a couple of scripts but none are exactly like the emacs way. The closest one uses a perl script to control gvim but you have to focus the window your in and type: :Gdb <some command> which is an extra step and I also found it doesn't highlight the file like I expected. Pretty close but would take quite a bit of getting used to.

Another alternative is Vimshell which I have installed and tried before. This is actually something I really wish vim could do natively, a real shell in a separate window. Vimshell has two drawbacks, its not in debian. You have to use the authors debian sources, which is probably because his patch is such a huge departure from standard Vim it would never be accepted. Secondly, it will remove gvim.

I can live with using separate sources for vim, but I must have gvim for other kinds of editing. Its too bad because Vimshell is possibly a perfect pair programming app. You can run it with 3 windows, open screen in one, have someone ssh in and help, or watch you edit, have irssi running in a second window so the two of you can chat, and gdb in the third. Pretty kinky..

So my last option is to learn emacs and use it as my editor. This might seem drastic, but you have to understand how much easier it is for me to "see" the => prompt jump word by word around my file as I debug it. This was so helpful and now im hooked. The downside of course is re-learning all the things I know in vim. I'm no vim expert but I do ok with it.

æc♥

Posted by æc♥ | Permanent Link

February 21

regex

Regexlib.com is quite a useful site if your like me and still unsure of all but the most trivial regexes. Here you can find a regex ranging from the useful to the downright scary like this one:
^((\"[^\"\f\n\r\t\v\b]+\")|([\w\!\#\$\%\&\'\*\+\-\~\/\^\`\|\
{\}]+(\.[\w\!\#\$\%\&\'\*\+\-\~\/\^\`\|\{\}]+)*))@((\[(((25[
0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4]
[0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]
?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])
))\])|(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0
-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][
0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?
[0-9]?[0-9])))|((([A-Za-z0-9\-])+\.)+[A-Za-z\-]+))$

"Email address validator. Should cover most of RFC 822, including unusual (but still valid) addresses.
Does not restrict the top level domain size, but you're better off doing an nslookup or similar
if you absolutely must have a valid domain..
Accepts IP Addresses instead of the domain, with or without brackets"
 
I noticed an article on harassment in computer gaming at misbehaving.net and it made me think back to when I first started playing Bzflag, it was a lot different 3 years ago for me at least, I used to play under the nick "bzgirl" and if I played anywhere other than the league server there was a very good chance of drawing comments from some other players. I shortened the name to "bzg" partly to have a gender neutral name an partly because the lazy league players would type it that way anyway. :)

I can happily say that girls in bzflag at least are not subjected to that sort of crap anywhere near as much as in other online games, it is a pretty good community in that regard, and most servers have admins that take care of abusive players quite promptly. There is one league player who still makes comments and is obviously uncomfortable getting beat by a girl but i just put him on /ignore and set my tank to hunt him.

The name Richard Stallman draws a very varied response depending on who you talk to, I notice many linux users groan when he complains or insists on calling linux GNU/Linux. I see his point though, I use tools like grep, less, bash gzip and now gcc everyday and it wasnt that long ago that I thought they magically appeared out of nowhere.

I really think what Gnu has achieved is truly remarkable and shouldn't be discounted because Stallman sometimes appears to be bitter that his lifes work has in the eyes of many Linux users been overshadowed by Linus's kernel. Imagine the Linux kernel had sprung onto the scene and GNU tools were not available, a wonderful working kernel to run on your x86 computer at home, but no shell or compiler or C library......

I think Stallman has to realize that the word "gnu" when hitched onto the word "linux" is simply awkward and unwieldy to pronounce. Maybe the logo could use a facelift too. If they had simply gone with "G" it might have been different. Glinux has a nicer ring to it no?



æc♥

Posted by æc♥ | Permanent Link

February 17

gtk

You might recall that little bug in xfce-notes I mentioned a while ago. Well with help and encouragement from my mentor I did actually download the source code and fix it so that special characters are now parsed before the note is saved. I had problems however after then rebuilding the .deb file with my changes.

After installing the the package, the notes plugin totally disappeared from my system, not in the panel menu list and no binary to speak of. I am not sure what I did wrong but my changes apparently nuke the notes plugin :-\

I have left it at that, partly because of laziness and partly because of wanting to concentrate on C more than playing with GTK. GTK is nice though I must admit, the functions have nice long descriptive names like "gtk_get_current_event_time ()" so it looks like it would not be too hard to fiddle with on the side.

Yesterday due to stupidity with my rsync script not checking to see what it backs up, I lost about 500 photos. The ~/ partition on my desktop had somehow gotten corrupted after a bad shutdown due to the power going out yesterday morning. Rsync dutifully copied the corrupted data into my backup partition and left me with nothing but the cdroms I had since last time I burnt them to disc :(

So, this week I have spent some time reading about backups and will likely use a dedicated software package and a dedicated backup/log computer...more than likely my windows computer will get reformatted for this job.

æc♥

Posted by æc♥ | Permanent Link

February 15

utf-8

All I want is to see when someone types a euro (€) or a pound (£) in irc. I hate seeing a bunch of garbled text. So with that in mind I set off to make myself utf-8 compliant.

Luckily I found a pretty good tutorial on how to set up my computer to be utf8 savvy. I followed all the instructions. I set my locale to en_US.UTF-8, exported the locale, I run screen with -U for utf8 support, in irssi /set term_type = utf8 is enabled and I ssh into the computer with the rxvt-unicode terminal. But no, apparently I am still missing something.

I will fiddle with it some more, its not a life and death thing I guess, just a minor annoyance.

One other side effect of all this is now mutt got all messed up. I cannot print the little lines denoting threads in mailing lists, so further reading suggests removing mutt and installing mutt-utf8 which I did but that seems to read the colour definitions in my .muttrc differently. For now I am back to the default mutt colours until I get time to figure it out.

Valentines was nice and my boyfriend took me to a nice Italian restaurant. On Sunday my dad took me to brunch also so I have nothing to complain about in the valentine department.

æc♥

Posted by æc♥ | Permanent Link

February 13

books

This morning pages 1 to 143 of my C book fell out of the binding and onto the floor. They are still glued together at least, but now I have 2 books instead of one.

The reason they fell out can be traced to the fundamental design flaw of a book. You have to have at least one hand on the book to read it, otherwise they flop closed, or the pages turn on their own. This is a problem if you need to type and occasionally glance at the book. Yes, I bought one of those book-holders but it is too small I guess, the little arms that pin the pages back are too short and pages just seem to turn when ever they feel like it.

What I have been doing is folding the book over backwards to sort of reverse the natural curl and then laying it flat on my desk, this gives me about 3 minutes of time before the page starts to turn on its own and I have to slam my fist down in a rage on the face of the book.

Anyway, I don't think this book will be around much longer so I better renew my efforts to finish it.

æc♥

Posted by æc♥ | Permanent Link

February 10

absolut crappy flash, plus raspberrys

I have installed a couple of apps to help me along my way recently. Xfce4-notes is a little todo list that has a serious bug but is still useful. Like most todo lists you type in an entry and it saves them, stick note style, but if you use special characters like an ampersand it wont load the next time you login, the file format is in XML and I am not sure if this is part of the reason. More serious is that if you have the notes application as part of your panel, this hiccup will prevent the panel form loading. Not good.



The second app is Devhelp, a really nice browesable book covering all kinds of programming topics. (apt-get install devhelp-book). It is gnomecentric but also covers the GNU C library, make, CVS and gdb. Pretty cool but also with a major (at least for me) oversight, no keyboard bindings :( I have to use my mouse to navigate which I hate.

Perhaps one day I will know enough to add fix 'notes' XML parsing and add keybindings for devhelp to my TODO list.

Absolut is not a "top of the line" vodka but its pretty good and the new Raspberry flavour is awesome :emb: Its too bad they have a horrible horrible website where you have to enter your age to get in, and then are subjected to yet another macromedia abomination. Something has to be done about flash, people should go to jail. Evidently you must be of age to drink vodka yet have the mind of an imbecile who will gleeflully play flash games all day on a vodka site.

æc♥

Posted by æc♥ | Permanent Link

February 08


Posted by æc♥ | Permanent Link

February 07

ssh

I am a little worried about some recent ssh attempts on my server. Usually the account the attacker tries is root, admin, test and so on. Root is not allowed to login with ssh, there are no test and admin, adm accounts so they wont have any luck there, but 5 times now a real account on the system has been tried with the user 'emily'
Feb  2 06:01:01 lemonjelly sshd[9622]: Failed password for emily from 130.79.162.190 port 42095 ssh2
Feb  6 19:07:44 lemonjelly sshd[8599]: Failed password for emily from 61.194.24.186 port 43520 ssh2 
Jan 26 15:06:16 lemonjelly sshd[27957]: Failed password for emily from 195.140.140.83 port 50240 ssh2
Jan 22 08:45:25 lemonjelly sshd[6741]: Failed password for emily from 69.36.252.126 port 45030 ssh2
Jan 22 10:52:49 lemonjelly sshd[7231]: Failed password for emily from 212.38.97.26 port 35245 ssh2
I suppose its a script that could try common names? But why no attempts for users like 'bob' 'bill' 'sue'? I am worried someone out there knows I have that username and is periodically checking. The ip's don't reveal much to me, except the second and last are running webservers. I couch check where these hosts are but more than likely the owner of that host is not the attacker.

I will set up hosts.allow for known ip addresses and deny anything else, and remove emily from the AllowedUsers list. Apart from that I'm not sure what else to do :-\

The half time show last night was really good despite no scandal this year. I wished McCartney had dropped "Hey Jude" and instead went with the smokin' "Band On The Run" but hey, who am I to complain. Sir Paul was great whatever he played.

Linked lists in C have opened my eyes to the usefulness of pointers. Now I have to learn how to write them. I keep thinking this stuff will get easier as I go along but its not :)

æc♥

Posted by æc♥ | Permanent Link

February 06

needy?

My boyfriend does not watch American Football, not a single game all year, but because today is the Supergame he has suddenly become the worlds biggest fan. I had mentioned earlier in the week that perhaps we could go see a movie this weekend and was hoping I guess he'd rather do that.

When I mentioned this to a friend (male) in irc he immediately replied "Heh, off all the days to be needy" to which I fiercely denied being needy, just wanted to go out thats all.

He then implied its a "girl thing to want attention" on this, the greatest of all Football days. This made me wonder if perhaps subconsciously I did want to see if he'd choose me over Football. I told him to go and have fun. It bothers me a little that I'd behave like that if indeed I was.

Sarah and I will hang out tonight, maybe tune in for the half time show and see if Paul McCartney will flash his penis.

I think finally pointers are starting to sink in, at least at their most elementary level. I have written 5 little example programs so far and although they clearly show me how pointers work, I have not seen a situation where I'd need one.

This of course will come with time but it would be nice for my book to say "consider this problem....you need to access this data....blah blah ..." and then show how a pointer solves the problem where regular variables wont.

æc♥

Posted by æc♥ | Permanent Link

February 04

hehe

Seeing as its friday, perhaps a moment of web zen is in order.. another classic in the making I suspect. Out with the badgers in with numanumaye's....

æc♥

Posted by æc♥ | Permanent Link

February 03

#c

So far pointers own me and I haven't yet grasped where the magic lies. My gut feeling is that I am not trying hard enough, its better to feel this I think, than worry that one's simply not capable of learning this kind of stuff.

I am also easy to distract and last night, despite having the time to study, I instead worked on a patch for bzflag. This one added something to the /countdown command and for the first time I got to actually commit it to cvs and watch the CIA bot announce it in the channel.

So no more patches until my C book is done. I am going to have to resist the intoxicating lure of CIA.

I have lurked for some time now in #c on freenode and am disappointed generally that the channel is very unfriendly to newbies. I used to think #debian was as bad, and in many ways it was, but it has improved as of late and ops are much more active in stopping this sort of thing.

Ok so its frustrating to be asked the same thing over and over again and people should at least read the topic and FAQ's and use google, but thats no reason to call them morons.

#c is dominated by a guy who constantly calls people names, laughs at code they paste and never shuts up in the channel. His latest proposal was because #c has several hundred users but many are idle, that the channel bot should be configured to kick anyone who doesn't actively participate in the channel!

I don't even bother to ask anything there now but still lurk as the rest of the channel regulars are very helpful and well informed and you do tend to pick up a few tips here and there.

Enough about irc.

My roomate Sarah is now hooked on CSI and is trying her best to get me addicted. I dont find the show that good actually and have so far resisted her efforts :)

I do find myself watching Jon Stewarts Daily Show with semi regularity.

æc♥

Posted by æc♥ | Permanent Link

February 01

google suggests..

Google has yet another beta offering called "Google Suggest" which attempts to guess your search as you type it. I must admit this is pretty good feature. I use google/linux, regular googlei, local.google.ca plus gmail all the time, and now might have to add Google Suggests to my list. It seems google is taking over my life!

æc♥

Posted by æc♥ | Permanent Link