Kernel Fun – nvidia Driver

October 21st, 2008

So, I decided to update the kernel on my laptop today to the latest and greatest (2.6.27.2 at the time of this posting).  Unfortunately, it has a nvidia card on it, and the nvidia drivers you can get off the repositories don’t work.

So, what did I do?  Of course, I did what every programmer does best.  I dived into linux header files and the nvidia source and changed a few things around.  My result was a working nvidia for 2.6.27.x

Here’s the link to the source.  Should work on all 2.6.27.x
http://www.redgalaxy.net/src/nv.tar.bz2

Happy compiling

Project Updates

October 19th, 2008

PeerNet
Well, I had some free time today I began implementing the server portion of the p2p networking system.  It’s still all API and has no functionality yet.  Once I get the API written up, I can hopefully write subsystems to connect to it.

Twitter Analysis
The twitter project has advanced a little bit, but not too much because of recent school work and working on my original project of the p2p system (PeerNet).  The other issue is the LCD monitor to my desktop computer died, and I’m working to get that replaced.  The twitter project was on my desktop.

Web Design & Development:
I also have a webpage under production, but that has come to a crawl because it is a project in which many people are working on, and we’re all busy.  It can’t advance much further until I have time to sit down with my team and get some things discussed.

ANOTHER ONE?
Believe it or not, I have another project up in the air as well.  I’m debating on improving my ray tracer.  My original ray tracer was of poor design (I made it a good 5 years ago).  The original concept was to trace point by point to a terminating ray.. so not really a ray at all but rather a line where points in the line a queried.  It worked, but was slow.  The new tracer I’d like to make would be a volume-ray tracer.  Basically, like my old ray tracer, everything would be represented as a volume, however the volumes would be surrounded by a bounding object of sorts, so it would be extremely optimized.  Because, then the bounding objects could be placed in a quad tree.  I’d still get the adventure of ease to represent objects.  Because everything is volumes, it’s really easy to get effects such as sub-surface scattering or layering of fogs/liquids.

THE PLAN

Right now, I think I’m going to try to focus on finishing up PeerNet – At least to the point where other people could start developing it.  Intermediately, I’d like to work on the twitter analysis program.. once I get it off my desktop.  After those two are finished to satisfaction, I’ll begin work on the ray tracer.  Hopefully once an extended break from school comes, I can get the team together again and resume work on the website.

Analyzing Twitter

October 6th, 2008

For those of you who don’t know, twitter is a web application that allows people to tell any other “followers” what they are doing.  You can update it online, through many client applications, and by cell phone.

I’ve recently started a project (C++) that I hope will analyze twitter’s “tweets” (as they call them), and look for common positive and negative terms.  Through these terms, I want to try to make some sort of graphical display which presents the world’s current mood as a whole (and by the “world”, I mean twitter users of course).

Another goal of mine to be implemented eventually is to add support to learn new words and associate them with positive or negative statements.

I won’t pretend to be perfect in the algorithms I use to analyze the statements received from Twitter’s RSS feed.  Right now, the “analyzer” is fundamentally just a word search (with some fancy stuff added on that looks for derivatives of the words as well, i.e. past-present-future).

I should hopefully complete the project this week (if my school schedule doesn’t dramatically change).

Panorama

October 4th, 2008

I went camping two summer’s ago, but I just realized I never shared the panorama I made with the world.  Me and a few friends spent a weekend in Crawford Notch, NH.  We had some fun, but unfortunately it rained most of the time we were there.

The pano isn’t perfect.. there are some very visible flaws, i.e., one of the clouds moved while I was taking the picture.  The flaws are only visible if you look for them, so don’t look too hard! :)

The Curse of Boredom

September 26th, 2008

Well, late one recent night I was sitting around (at about 11 PM or so), and didn’t want to go to bed quite yet.  I’m a late-nighter.  So I decided I would test something.  Many (if not all) routers out there block incoming UDP packets unless the router has been “hole punched”, that is, if UDP packets are being sent both ways as if two computers are trying to send information between one another.

So, what did this result in?  If you know about nc (if you don’t, it’s a little linux/unix app to send data across the network), I started that up and started sending back and forth between my desktop here at school, and one of my servers.  So, this is fine.. I’m testing to see if routers actually allow hole-punching, right?

My Results:

(Click to see large version).
As you can see… I may have been a little too bored that night.

The good news is I discovered how hole punching works!

My Fault

September 12th, 2008

Turns out that the “downgrade” was my own foolishness.  Somehow I had accidently deleted the htaccess file in my home directory that controls the PHP versiosn.  Oh well, at least I figured it out.

Downgrading

September 8th, 2008

In the case of Microsoft Windows machines, sometimes downgrading is better.  Even in the case of some games, down grading can help the player.  But my host downgrading my PHP version from 5.x to 4.x is simply outrageous.

I first noticed this today when I go to log on to my Question-Answer website to see if there are any questions posted that need answering.  Right when I jump on the home page I see PHP spewing out all sorts of errors about how I’m using str_replace incorrectly.. which is a relatively common function and rather difficult to break.  My first instinct is to check if I was hacked [again], so I look into all the databases and files, and everything is perfectly fine and unchanged.

I then check the php manual to see if they discovered any recent bugs.  It’s there that I saw that the str_replace I use only supported in 5.x, so something clicks.  I print out phpversion(), and what do you know, I’m running 4.x! I’ve been downgraded!

So, please, have some patience with me and my host.  if this isn’t corrected soon, they will find an angry email in their inbox tomorrow morning.

Time Well

August 28th, 2008

As you may have noticed, I haven’t posted much of anything.  This reason, simply put, is that I have returned to RPI, and am busy with work, class, and organizing my life.  As time goes on and I get settled back into the rhythm of school again I’ll try to start writing AOTD’s again, as well as get back to work on my programs.

I haven’t had much free time to even program!  I haven’t written a single line of code since returning here (well.. I have written code for class, but not on my own free time).

Hopefully it will all return to normal soon.

Adventures in XDMCP Land

August 18th, 2008

So, I’ve been trying to persuade some of my friends over to linux lately.  There are different technologies that give people a try of linux before using it.  One of the more popular ones at the moment is the live CD.

Over the past few days I’ve been researching and experimenting with XDMCP.  I installed debian on a Virtual Machine (VM), and then installed a base system with gdm, XOrg, and xfce4.  After that, I enabled gdm for XDMCP (just under the [XDMCP] section in /etc/gdm/gdm.conf, i added Enabled=true).

Then I connected, and what do you know? It worked!  Right away I can see problems with the potential technology.  Security concerns for XDMCP are high, but using it under a LAN condition should be fine.  The protocol is unencrypted, but if no one has access to the information, it shouldn’t be an issue.  The second issue is under slow networks, the OS might feel slow, giving the wrong impression of Linux as a whole.  The third issue – No sound.  Now, it’s not technically X’s job to provide sound with a session.. it’s the job of something else (i.e. ESD, OSS, or ALSA).  I may do a little research into sound forwarding later, but it isn’t a priority.

So, what’s the good part? Ease of use.  Keep using it like a real system! It keeps all your files and settings (unlike the live CD). It’s also supported natively by many linux OS’s (XDMCP is generally a native component of most X managers these days, including XDM, GDM, and KDM).  It’s also possible to connect to it on windows via XMing or Cygwin.

Personally, this has also given me some exercise in securing an operating system.  It taught me a few things, as well.  I implemented limits to prevent fork bombs and certain types of DOS attacks.  I also implemented user hard drive quota’s so one single user can’t use up a whole HD.  I also put a inbound/outbound firewall in place using iptables.  I edited /etc/profile and /etc/adduser to make each user’s home directory private (changing umasks and default folder mods). I believe it’s a pretty secure system.  When I actually give it out to other geeks, I guess I’ll find out whether that’s true or not.

I think XDMCP is worth my time, if only for learning purposes.  It also gave me a deeper understand on X forwarding and X in general.

AOTD – Miro

August 12th, 2008

Miro is an video feed aggregator.  It’s main function is to take many RSS feeds, parse then, and extract any videos they might link to.  This provides sort of a pseudo internet “TV”.

When I first downloaded it, I noticed it had hundreds of built in RSS feeds ready to use.  It also had the ability to search for videos in all the feeds.  So, I set it up to downloaded new movie trailers, some AdultSwim stuff (cartoons, such as Robot Chicken), and Linux.com video feeds.

So far I’m impressed with its design and its ease of use.  There really is no downside to the program itself, I’m just not sure how useful it would be to me.  I like the whole idea of automatically downloading new videos from the sources I specify, though, I’m not sure if this is a program I would use on a day to day basis.

The other downside, from a programming aspect, is I’ve found it has a tendency to crash from time to time, though it isn’t enough to convince me to stop using it for that single reason.  It also gets clogged up during a massive video search sucking up CPU time to do the search.

So, if you are into a program to take all the videos in RSS feeds, download them, and then view them, then this program is for you.  If you just watch some youtube videos from time to time, then check out the program, you may like it, or you may find that just hopping on youtube in firefox is easier than starting up this program.