April 27th, 2008 by knorby
Maybe it’s just me, but I don’t quite get the point of “big deal” versioning and upgrading with something like Ubuntu. I use Ubuntu on my laptop and one of my desktops. I like it on my laptop, because I rarely have to spend time configuring anything. I use it on my desktop, because it is an AMD-64 machine, I like Debian, and Ubuntu has better support for AMD-64. There are some things that Ubuntu does pretty well. For core packages, Ubuntu’s packages tend to be more up to date, and there is less stupidity. As far as the actual distribution, it is pretty nice.
What I find annoying about Ubuntu is the community around it. Mostly as a result of StumbleUpon, I come across all sorts of blog posts that show you how to make your Ubuntu totally awesome by installing a few standard and obvious packages. Worse are the Ubuntu forums, which always seem like a clusterfuck of stupidity from the linux world. Maybe I am being harsh; I remember posting some fairly obvious questions to Linux Questions when I was first using Linux in high school. Still, it is just the feel I get whenever I come across a post.
As I mentioned, one of the features of Ubuntu that really annoys me is the emphasis on versioning. Each one has some clever name, and each one is made into a big deal on the internets. There was an upgrade made available recently, which I have installed. I could see that it was putting aptitude through a gauntlet, but I don’t quite see what was changed. Some packages were made standard, and some were taken out. You are always given an “option” if you want to remove all the packages that are no longer supported or not, but aptitude never stops giving you crap afterwords until you do. Last time I upgraded, I discovered that I no longer want to use xmms. Actually, I started using audacious, and I have been happy with it. Anyway, it seems like they just reinstall most packages for some reason. I know Ubuntu does some stuff to a few packages to get them to work better together. There were also some new utilities, but still, it all seemed like something that could be done by aptitude normally. I just don’t get the big deal made over it…
Posted in Linux, personal, rants | No Comments
April 10th, 2008 by knorby
I had some good old fashion fun today on the shell today. I stumbled across this “gem” of an expression:
yes xargs | xargs yes
This expression can be repeated infinitely (mostly) many times without changing the output and without loosing symmetry when joining on the yes’s. In other words, the last expression is equivalent (in regards to output and symmetry):
yes xargs | xargs yes xargs | xargs yes xargs | xargs yes xargs | xargs yes xargs | xargs yes xargs | xargs yes xargs | xargs yes xargs | xargs yes xargs | xargs yes xargs | xargs yes xargs | xargs yes xargs | xargs yes
You can throw some rot13s (with care), cats, and a few other commands in there with the same effect. I am not sure exactly how it functions; it seems to work different on different OSes. I have tried in on Linux, Mac OS X, Solaris, and OpenBSD, and all seem to be a bit different. They seem to run a bit differently, and the output is different. It’s all very fun.
Update: I thought I should clarify that last little bit. The way pipes are treated seems to vary some; the actual functionality is trivial.
Posted in Apple, Linux, OpenBSD, Solaris, humor, shell scripting | No Comments
January 10th, 2008 by knorby
What follows is probably the most perverse shell script I have ever written. I decided to write a script that somehow implemented Hello World for a bunch of languages. I didn’t include Java, because the installation of java on the machine I wrote this script on was somehow messed up. Plus, Java sucks hard. I didn’t do any javascript either as Rhino was messed up (see last sentence), and spidermonkey wasn’t installed. I included far too many, but I will gladly add more if someone bothers to write some. You can also download the file. Wordpress messed a few things up, which I tried to correct, so download the file copy if you actually want to try thing thing out. Also, you might need to install some stuff unless you are in the UofC CS department Linux clusters. I apologize to the world for what my boredom can cause…
#!/usr/bin/env bash
#====================================
echo "Bash:"
bash << EOF
echo "Hello World!"
EOF
#====================================
echo "Python:"
python << EOF
print "Hello World!"
EOF
#====================================
echo "C:"
TMPFILE="/tmp/stupidgcc.c"
TMPOUTPUT="/tmp/stupidgcc"
touch $TMPFILE
cat > $TMPFILE << EOF
#include <stdio.h>
int main(){
printf("Hello World!\n");
return 0;
};
EOF
gcc -o $TMPOUTPUT $TMPFILE
$TMPOUTPUT
rm $TMPFILE $TMPOUTPUT
#====================================
echo "Ruby:"
ruby << EOF
puts "Hello World!\n"
EOF
#====================================
echo "Perl:"
perl << EOF
print "Hello World!\n"
EOF
#====================================
echo "C++:"
TMPFILE="/tmp/stupidg++.cpp"
TMPOUTPUT="/tmp/stupidg++"
touch $TMPFILE
cat > $TMPFILE << EOF
#include <iostream>
using namespace std;
int main()
{
cout << "Hello World!" << endl;
return 0;
}
EOF
g++ -o $TMPOUTPUT $TMPFILE
$TMPOUTPUT
rm $TMPFILE $TMPOUTPUT
#================================
echo "Haskell:"
ghci -e 'print "Hello World!"'
#================================
echo "Awk:"
echo '' |awk '{ print "Hello World!" }'
#================================
echo "Fortran77:"
TMPFILE="/tmp/stupidFortran.f"
TMPOUTPUT="/tmp/stupidFortran"
touch $TMPFILE
#http://www.roesler-ac.de/wolfram/hello.htm#Fortran77
cat > $TMPFILE << EOF
C Hello World in Fortran 77
PROGRAM HELLO
PRINT*, 'Hello World!'
END
EOF
f77 -o $TMPOUTPUT $TMPFILE
$TMPOUTPUT
rm $TMPFILE $TMPOUTPUT
#=======================================
echo "Tcl:"
tclsh << EOF
puts "Hello World!"
EOF
#=======================================
echo "Octave:"
octave -q << EOF
printf("Hello World!\n");
EOF
Posted in Linux, Python, coding, humor, javascript | 6 Comments
November 14th, 2007 by knorby
To further my addiction to gadgets, I have purchased the Archos PMA430. Every mp3 player I have owned (that is, things I got as mp3 players) has been an Archos thus far. To put it quite simply, Archos does what I want; I don’t have to use any particular media player or operating system to transfer data (has always worked as a USB mass storage device), I can record stuff, and there are usually a few more features. I got this one because my archos gmini 200 is starting to show it physical and technological age (because 3-4 years is somehow old). Anyways, I saw this thing for sale for $200 off something on dealhack and decided to go for it. Enough with the brutal details.
What I find curious about it is the price I got. Obviously, I did some reading first. cNet called it the “holy grail” of whatever the hell you call this class of devices. The main problem they raised was price. When it came out in 2005, this thing cost something like $800. I wouldn’t pay $800, but I would pay a decent amount for a Linux-based mp3/video player/recorder, with wi-fi, and a slue of other crap from a brand I trust. I just don’t get how they make money. They don’t have a page on their site anymore for this thing; they have pawned it off to second-sellers at this point. Every time I have gotten something from them, I have been amazed out how far ahead of Apple they always are. Perhaps Archos moves too fast for the general public, but I tend to think that they just market badly and don’t have the best hardware designers out there (that is, design of appearance). I just don’t get it.
Anyways, this thing has been added to my daily device set. Currently, this set is my cellphone, this thing now, and my nokia n800. As of one day of use, it looks like I should have some fun with this thing. One thing I will miss is that I got to a point with my gmini where I could operate it almost fully without looking at it. I can’t do that with this thing, so I am going to have to start using things like playlists. I also have an Archos something 700, which has a huge screen and many of the same features, but it not at all portable. I think I am going to start using the DVR functions on these things a lot more. Transfer is easy as those two can act as hosts to other USB things. The main problems I read about involved the wi-fi, and battery life. I haven’t had troubles with the wi-fi, but I don’t think I will really ever use it since I have the n800, which already serves the purpose better than thing could so it is not really a problem. I haven’t really been able to test battery too much, but I it needs a lot of juice for video, so music time benefits a lot. We will see how it works out….
Posted in Linux, archos, gadgets, media, mp3, personal | No Comments