Friday, February 25, 2011

Grounded -- hopefully.

Forgive me in advance for my pathetic grammar, it's early and I'm trying to pass the time by writing a blog post while my kernel compiles.

I have to stop naming my titles ambiguous names. No, I am not grounded. I'm grounded in terms of my distribution-changing madness. It's over. For now. I've settled with Debian, using the GNOME interface. I realize that that's pretty much exactly where I started, but I stuck with Debian instead of Ubuntu because I like to tell myself that I actually got somewhere with this whole thing. Also, I've decided to not go with as much eye candy because it's starting to detract from my need to actually do work.

So Debian it is. And it's very minimal, which I like a lot. The brightness control works (ditched KDE because it didn't support it), and I'm fairly sure that I could get the keyboard backlighting working with some effort. At this precise moment I'm hardening my kernel with grsecurity, a tool that basically fills in a few security holes in the system to prevent intrusions. Lightweight...ness and security are the two things that I'm going for and I intend to achieve them if I can't have anything else. Also, there are a few slight differences between Debian and Ubuntu, and I like a lot of them. My only complaint is that it's not very keen on giving me compositing support, which could be due to the NVIDIA driver that my MacBook Pro uses.

I installed my system as per this guide, and the disk encryption is fantastic. Only hitch is that I deleted the Mac OS X partition that I had installed (oops) for the purpose of installing rEFIt, which is an EFI bootloader designed to not suck as much as Apple's. Thinking that this software would, you know, be written to the bloody EFI partition was apparently too much of an assumption, because it disappeared as soon as I got rid of Leopard. Oh, well. I'm currently just booting off of their handy rEFIt CDROM, which then points the computer to the GRUB partition that I have installed. So that's nice.

Amidst all of this distro panic and exam worries (thankfully I only got one B+, the rest were above!), unfortunately, I wasn't able to work on my PHP project. I'm going to try to explain myself to my teacher tomorrow, hopefully he'll forgive me. I feel pretty guilty about wasting my parents' money for an hour of us sitting around not going over the code that I've written.

On a happier note, if any of you are interested in a screenshot of my new and (hopefully) here to stay system, feast your eyes!!

Saturday, February 19, 2011

iPhone and moving.

No, not that kind of moving. Just moving distributions -- yes, that's right, I'm really having a distribution identity crisis at the moment, but the only reason that it's happening is because I'm frustrated with Ubuntu's slowness and lack of customization options. So instead of Xubuntu, which honestly has served me quite well, I'm moving on to Kubuntu instead, because while Xubuntu was nice and fast, I don't have it quite like I want it, the device support is shaky (couldn't get keyboard backlighting to work and apparently sound recording is a nono on any of their machines), and I absolutely love the KDE desktop widget functionality. So KDE it is! For now. If sound recording doesn't work on that I might go berserk.

Speaking of sound recording, my last post was a video whose audio was made possible by my new trusty iPhone, courtesy of a friend of a friend. And while we're (sort of) still on the subject of customization, he jailbroke it for me so that it would work on my carrier (AT&T) without a data plan, so that I wouldn't have to pay $30/month extra to get it to work (although now, funnily enough, I've purchased their 200MB data plan because a friend got me hooked on Foursquare). Wasting no time, I immediately customized everything customizable on the machine, although sadly enough Jobs isn't releasing the 4.0 update to the iPhone 2G, which is the generation that I have, so I can't download most of the things on the Cydia store like tethering or multitasking. Which I actually don't mind, because I only have a 200MB data plan and the iPhone 2G's CPU definitely isn't the fastest thing in the world. With some Locktool and Fontswap magic I was able to completely change my lock screen:

That's the Ubuntu title font combined with the HTC Clock, with the slide to unlock removed (the gesture still unlocks it, the button's just gone). I'm so proud of myself. Also, I installed a terminal app, so I can ssh into my Mac and make it say dirty things. Hehehehe.

Thursday, February 17, 2011

First Video Post!1!

I seriously gave hours for publishing this single, 8-minute long clip of me rambling about random stuff that could have much more easily been rambled about in a blog post. So I seriously hope that you enjoy the video below. Lucky me, Xubuntu apparently can't record audio, so I was forced to record my audio with my new iPhone (talked about in video), convert the file to a .wav, convert the video to a .avi, join the two together, export it, and upload it to vimeo. By the way, thanks to the conversion process the video quality is horrible. Just thought I'd warn you ahead of time.

Wednesday, February 16, 2011

Exams are over. Any good games?

So exams are officially over for me, as of the 4.5 hour AP Chem exam. Not enjoyable, and I really don't think I did well at all, but we'll just have to wait and see. In the meantime, I tried out Minecraft, and the concept looks all right.... the only problem is that it makes my computer go insane. My CPU maxes out at 100% and my memory is 75% occupied. A bit much for just a bunch of cubes, no!? It could be just because I'm trying it out on Linux, but thanks to its intense memory usage it rendered itself and my computer unusable within just a few minutes of playing. So I guess I'll just stick to programming.

Speaking of which, I've decided to rewrite most of my code because it's turned into a bit of a mess already, mostly because we're constantly introducing all of these new ideas and libraries and I'm trying to update it to allow support for the old stuff. So rewriting so far looks like a good idea, and it's going smoothly.

Tuesday, February 15, 2011

Xubuntu > OSX

Ok I realize that a lot of you probably aren't going to do this, but here goes: I've replaced my OSX with Xubuntu altogether as an experiment. So far I'm not suffering, although midway through the install I realized that syncing my iPod should be rather interesting. All I really use my Macbook Pro for are web development, word processing, email, music... nothing like gaming that would really require a Windows system (all the better... less distraction!!). So I'm pretty much okay there.

I absolutely love Exaile, the media player that comes with Xubuntu. It's light, fast, and best of all includes a file browser, which means that playing a music file doesn't add it to the music library. Why is this a good thing? Well, when you've downloaded an audio file and simply want to listen to it and not deal with the hassle that is managing a heavyweight audio player like Rhythmbox or Amarok, which I do rather often, Exaile is the perfect solution. Mind you, it still has the option for libraries, and still allows playlists and live audio streams, which you can easily download from many of your favorite radio sites like NPR (for my STL readers, visit kwmu.org and click on the Listen Now button -- click on the Streaming MP3 option).

I'll admit that this post was a distraction from the massive studying that I'm doing right now as a result of the AP Chem final that's looming over my head (tomorrow at 12h00... wish me luck), but hey. This is just a study break. I had my English final today, and it wasn't half bad. The best part was when I tried to submit, which I can only guess involves some kind of FTP or SMB connection to some server somewhere on campus, and the submit operation failed. I got to go to the helpdesk and they resolved everything, but they quickly found out that everyone was having this issue and that the school's own firewall was blocking the submission process. Funnier still was the karma: the software admin was against this firewall addition, and the hardware admins were for it. The software admin pushed this "Electronic Bluebook" software to everyone's computer, and the hardware people then had to deal with the huge mess that they had caused as a result of their firewall blocking the exam submission process.

I had a talk with the software admin later on, and joked with her about the firewall and how pointless it was to install it in the first place, saying that I could get around it easily and that I frequently did. "Exactly," she said. "We're constantly spending money on firewall systems just to get you guys to find a new way to get around them!" I suggested to her after that that we should try installing Linux on the school computers. Here began my sales pitch: It's totally free, it's completely scripted so it's 100% customizable, it's incompatible with 99.9% of the viruses on the Internet, and it isn't Windows-compatible, so students can't waste their time playing games and pirating Windows software, potentially getting my school into legal trouble. She said that she'd see if she could get it installed on a machine so that she could play around with it a bit, so we'll see. But how cool would that be!? I also told her that she should talk with the sysadmin at Whitfield, who runs a one to one laptop program and uses Ubuntu instead of Windows on all of the systems. Should be interesting to see how that unfolds!

Still saving up for that Das Keyboard... I'm also thinking about upgrading this compy's RAM and HDD to 4GB and a 120GB SSD. Speed should be amazing considering it's running Xubuntu, has all of that RAM and blazing fast read/write speeds! This thing is becoming by dream machine. After extensive amounts of typing, I've realized how much I've missed this keyboard. I have my awesome bumper sticker stamped on the back of it too, thanks to Randall Munroe's wonderful xkcd store. It's big, blue, and has OPINIONS! on it in bold white letters. I was at the Boston Logan airport and this lady pulled out her white MacBook with all of these "Go Wildcats!" and "Stop Abortion" bumper stickers plastered on it, and I gleefully pulled out my laptop... she glared at me for a few seconds and then put her laptop away. It was awesome. This baby hasn't let me down yet... I'll tell you guys how the Linux-only testing goes!

Monday, February 14, 2011

I love Conky

Okay, I realise that this is probably the millionth post on the Internet about Conky, but I just want to shout it out there: I love Conky. Conky is an incredibly customisable system monitor that allows you to display pretty much any value on your system, let it be the current track playing on your xmms2, audacious, or mpd media player, the temperature of various thermal sensors in your computer, the disk i/o, graphs, rings, or bars of your cpu, memory, disk, or network consumption... if they don't provide an option for it natively, you can always devise a method of your own by ways of the ${exec} variable coupled with a custom script. Let me just show you my desktop as of this moment:


In case you're wondering what the font was, I'm a huge fan of the Inconsolata fixed-width font. The weather data comes from a script that I made myself, mostly because I didn't know about the ${weather} option until it was too late... Oops. In any case, what it does is parse out a specific web page on the data from a weather site every 10 minutes. Overkill? Probably. Anyway, here's my .conkyrc:



Also, user chorny has provided me with a bit of help on the Pastebin API. Apparently uploading to pastebin is as simple as installing the App::Nopaste library from CPAN, something that I didn't know anything about. You can also install it as a cli command by running
sudo apt-get install nopaste
on Ubuntu.

I'm also on the market for a new keyboard because I'm really not a very big fan of the one on my Thinkpad, it's a bit cramped. I realise that Thinkpad keyboards are some of the best on the market, but I'm fairly sure that this one was not famed for its keyboard. All kinds of gunk keeps getting stuck between the keys, thankfully whenever I want to do some serious typing I switch over to my MacBook Pro, whose concave keys I find marvelous. I don't think I'd ever want to move to a Unibody model because I love this keyboard so much. Anyway, I'm thinking of buying a Das Keyboard Ultimate Silent for several reasons:
  1. A regular Das Keyboard is too loud, I wouldn't be able to do any typing during the wee hours
  2. I like the idea of having actual key-switches instead of plastic domes, plastic domes are mushy and feel like pudding
  3. It's unmarked, so I get serious geek cred for being able to type on an unmarked keyboard, and I don't have to deal with the OCD stress of using a Dvorak layout with a QWERTY layout marked on my keys.
Alright, back to studying! English exam tomorrow at 8h, AP Chem the day after that at 12h. Wish me luck!

Friday, February 11, 2011

Exams

Soo linux is looking pretty good. My .tar.bz2 archive of my partition is a grand total of 978MB, something that I'm incredibly proud of. I would have gone with Slax and have a 200MB install, but the problem with Slax is that it doesn't save you radata; it has to be manually saved into a module file. Otherwise, all data is reset upon reboot.

So should end my ranting about linux. It's time for me to panic about exams. The only exam I'm really worried about is AP Chem, other than that all should go well. All the same, I have a lot of catching up to do with Chem. As of late I have a solid B in the class, which I hear is fantastic given my circumstances. A lot of my classmates can barely pull off a B-, so given that I've managed to score a B in Chem just from flying in abroad mid-term (and mid-year) is considered a feat in and of itself. Now to bring it up to an A!! :)

I'm annoyed about the pastebin code that I published. It worked at first, but then pastebin got wise and started asking for a captcha code, which my perl script could (obviously) not decipher. So now I'm off to try and figure out a way of using curl to publish my stuff, which I'm not entralled about. At least I found out about cpan, which allows me to install perl libraries from the command line. I couldn't find a way of installing the curl libraries before, but now that I have cpan it should be a bit easier.

In case you're wondering how to install libraries using cpan, go into your terminal and type:

That code was not published using my script. I've had to go in manually and install it. I'll see if I can find the time to rework it using curl later on.

Happy studying to all! And jealousy to mes amis en France qui ont finis leurs compos. Extreme jealously.

Thursday, February 10, 2011

Perl and Pastebin.com

Yes, this is me posting at midnight. Yes, my postcount has been skyrocketing, probably because I've been trying to distract myself from the huge stress that is exams. Yes, it's working. Yes, that is bad.

Anyways, I googled around trying to look for a good perl pastebin uploader and couldn't find one, so I adapted one that I found to actually work well. It's about as simple as it gets, fellow perl readers should be able to look through the code that I'm about to paste in (thanks to my shiny new perl script). My code is far from perfect, I'm planning on perfecting it by allowing me to not have to run any commands at all, which would be great considering the fact that I'm having to generate the filename (which is currently in the format of date +%m-%d-%y.title), pipe the command to the perl script (which chops off newlines and transforms my code tags into pastebins) and upload it from GoogleCL (which, by the way, is another amazing command line tool.)

And now, the moment you've all been waiting for, my code:

Blogging from the Terminal

So I guess this would count as my second post for today, but I just found something so incredibly cool that it'll knock all of your socks off. Okay, probably not. In any case, here goes:

So I was blogging from nano today (this involved my last post in the car) when I realized (after having posted) that nano does this really annoying thing where it adds in these line breaks at certain intervals in the text when word-wrap is turned off to allow for the word-wrap to appear to work. Why use word wrap? Mainly because it bugs me to continually type all on the same line and not be able to see what I was typing a bit further up on the page. But now it's adding line breaks. What do? Well, you see, I had actually developed a perl script to get rid of these pesky line breaks and retain the double-line breaks, and thankfully because of my packrat nature I was able to recover it. Helps to be a packrat, you know?

Later on, I actually started getting into pastebin, although I can't say I'm an avid fan of using it. I mainly just realized that I could use pastebin to embed source code on my blog. Why is that cool? Well, you see, I figured that eventually I'd get into posting code on my blog, and instead of creating my own blog and developping all of those features, I can just upload the code to pastebin and use an iframe to display it. Huzzah!! So just to show it off, here's the code I used to get rid of all of those extra newlines that were in the post that I just typed:



EDIT: Unfortunately, the API doesn't like the way I code (apparently I'm supposed to use curl, but I really don't want to...), so my code is actually currently being impeded by a captcha field.

Hardly Workin'

Hey all,

So I've decided to try and make this a daily thing again. I'm typing this up on the car ride home (don't worry, I'm not driving), and I'm pretty much just trying to hang on. All of this excitement about colleges has been making me relax, for some strange reason, and now more than ever I really need to get my head in the game. My college counselor, my parents, and I all met today on where to go, and now that she's tailored my list a bit I have a bit of a better idea on what I'm going to do. Here's my new list of colleges:

- Boston College, Boston University
- Brown
- UC Berkely, UCLA
- Carnegie Mellon University
- U Chicago
- Harvard University
- Haverford College
- Macalester College
- MIT
- McGill University
- Northwestern University
- Pomona College
- Reed College
- University of Rochester
- Swarthmore College
- Trinity College
- Union College
- Washington University in STL
- Wesleyan University

...so yeah. Exhaustingly long list, I know.

Another contributing factor is this freaking Linux obsession that I've been having. I've successfully installed Xubuntu and have compositing working (Gnome-Do and Docky can actually work, huzzah), and yet it's still just not perfect for me. I tried OpenBox but I'm clearly too much of a noob to manage anything remotely non-GUI oriented, although I'm really loving XFCE. The boot and shutdown times are absolutely outstanding, and I got Conky to work with weather services and a Gmail checker. Mutt's installed, and I'm actually writing this post from Nano because I love the Inconsolata fixed-width font so much.

Finals are only in a few days... I'm kind of freaking out, even though I only have 2 exams. The funny part is that only one absolutely terrifies me, and it's AP Chem: everyone (except me, becuase I was in France at the time) got their labs back, and were subsequently moping the entire rest of the day. Apparently it was one of those assignments where getting a good grade is out of the question and you have to just hope that it doesn't hurt your GPA too badly.

Really haven't been able to get developing on PHP lately, I should start working on that again. My teacher's going to be pretty frustrated when we meet on Saturday and all I'll have done is re-written my code to have it be object-oriented. I have ban functionality working (with an awesome image, thanks Vijay!), although it really doesn't look pretty, which bugs me. I wish I didn't specialize in PHP and Perl so that I could actually design a nice frontend for this thing. That said, it didn't stop Zuckerberg... who am I to underperform Zuckerberg!?

Hope finals are going well for everybody. :)

Wednesday, February 9, 2011

Totally gave up.

Ok, so Gentoo kind of failed miserably. I'm not going to try and save face by hiding the fact that I couldn't get Gentoo to work at all, something about the X server not seeing my displays even though they were in xorg.conf and I had properly run X --configure. I'm irritated that it didn't work, but there really is no way that I'm going to try starting over with that mess all over again, so I'm going to try a different flavor that's actually at least somewhat forgiving. I've been using Zenwalk Openbox for about a day, and while I really think that it's great, it's definitely not my favorite choice. I don't know if it's the Zenwalk or the Openbox, but quite frankly it looks hideous. Despite attempts to fix this with themes and countless .conf files, it's still ugly, and I want to get rid of it. So as I'm typing this post, I just want to let you all know that I'm downloading xubuntu. Hopefully it should be light enough to not run as slowly as normal ubuntu, but it'll also have all of the commands that I'm familiar with. XFCE is annoying, so I'll be trying out Openbox for a little while before giving up completely.

If I ever have the time, I'll try moving back to Gentoo and installing Openbox. I like Openbox a lot, I just don't like not being familiar with any of the commands. I'm not a big fan of Slackware, which is what Zenwalk was based upon, so that settles that. I'll probably check out Gentoo and Openbox next weekend, after I'm done studying for exams and all that jazz. I'm definitely not doing myself any good by putting off studying for all of this Linux crap, and I'm probably wasting time now anyways by installing xubuntu and writing this blog post. But I guess it'll be a little something to do before the studying commences, which I suppose is what I've been telling myself for the past week. Mais bon, whatever. The important part is that I get studying soon, which is exactly what I'm planning on doing. Planning.

I'm also really annoyed because Gentoo took ages to compile, although I happily played along. I then complied GNOME, which took an entire evening, and then, after compiling GNOME, I realized that I hadn't compiled an X server. So I compiled an X server. The amount of time that this consumes is staggering, I never really grasped why installing programs on Gentoo took forever while installing on Ubuntu usually didn't take over a minute for most files. Does Gentoo do some funky compiling thing that I don't know about? Whatever it is, it took freaking forever, and all the time spent on it went to waste because I've erased the disk and installed Zenwalk for the time being. Pretty annoyed.

Anyways, exams are coming up and I'm getting kind of freaked out now that I realize how close they are. I really have to get studying for chem, I guess I can just use the review packet that she gave out. Thankfully I only have 3 exams, though, because I'm taking 4 classes and one of them is a project. Taking English the first day, Chem the next, and French last. Study time!!

Tuesday, February 8, 2011

Gentoo

Insistent upon ignoring Randall Munroe's cautionary tale, I've decided to go ahead and move on from Ubuntu. Ubuntu was great until I had used it for too long, which meant that I would have installed some programs without removing them, or I would muck with the system a bit and end up breaking something or other. I'm moving on to Gentoo. Or should I say, I've moved on to Gentoo. I've successfully compiled the kernel and now have a basic CLI (command line interface) upon booting up. Not too shabby. Hopefully at the end of today I'll have enough time to compile GNOME and have a full X environment up and running. So far I really like the customization options. The USE flag is basically a dream come true for me: upon the installation of a program, you choose what programs you want it to have support for. On Ubuntu, it installed support for everything, hence the speed issues.

Another beneficial factor of having to compile everything by myself is the fact that I'll be lazy about installing programs and hopefully I shouldn't install one unless I find it absolutely necessary. Of course, I'm installing a GNOME environment because I have no idea what I'd do without one. I'm still not entirely Ubuntu free, mostly because I've been spoiled rotten by GNOME-Do and Docky. I realize that not choosing XFCE probably leads to a bit of a slowdown, but I'm giving it a try anyways and seeing what it's like. One thing that I'm somewhat concerned about is the boot time, I've looked at it and it hasn't been as stellar as I would have hoped. Ubuntu was really fast. Like, really fast. Clean installations booted in less than 15 seconds. Gentoo seems to be a bit slower, mostly because the dhcpcd client keeps looking for dhcp servers on the network, of which it finds none because eth0 isn't and probably never will be connected when I start up.

Which brings me to the other issue. Wireless. I'm going to emerge wicd when I get back home today, but for now the OS doesn't allow for WPA or WPA2 wireless authentication. That said, it could have been a lot worse seeing as iwconfig actually sees my wireless card. Only time will tell, I'm still in the early stages of building it and hopefully I should have a running GUI by the end of tonight. Another concern is the fact that I'm actually doing this during the week before finals. I always seem to have these huge projects that pop up during high-stress times. Probably for distraction purposes, and I have to say it's working a little too well. Ah, well.

I really, really want a website of my own. Having a wiki would be awesome, and not dealing with Blogger would be awesome...er. And yes, in case any of you are wondering, I haven't posted to my French blog in ages. How exactly am I supposed to explain compiling a kernel in French? My vocabulary doesn't really go that far.