Archive for April, 2010

Krank, for when Ubuntu’s novelty wears off

Most of the Internet is probably absorbed with Ubuntu 10.04 right now, and that’s a good thing. When you get tired of messing with the location of the buttons, you can check out Krank, which is a rather unusual game.

Krank plays like a simple puzzle game, with the goal being to remove magnets and anchors from the screen by attaching or drifting balls and links toward them. If the connections are held for a sufficiently long time, the magnets or anchors burst and you proceed to the next screen.

That’s all. No zombies, no guns, no bombs. No zombies with guns or bombs. Sorry.

The challenge comes in maneuvering your snake to bounce the links and balls correctly. There are some smooth friction effects and the physics appear both natural and predictable, but that doesn’t make it any easier to get things swinging in the right direction.

And if you can’t get one level completed, the game is rather forgiving and will allow you to skip to the next screen without suffering for hours on end. Nice touch.

One of the strongest points of the game is the visual element; the backdrops are brightly colored and neatly mirrored, which gives a kaleidoscope effect. At the same time, the audio track is enjoyable, and the sound effects change between levels. So some of the more commonplace sounds — like a ball bouncing off the edge of the screen — are rather humorous. All in all, it’s both visually and audibly appealing.

Krank is in the repos for Karmic and Lucid, and in AUR for Arch. When the luster of 10.04 begins to wear off, give it a spin.

Two unusual signs

Either someone is baiting me, or the tide has turned and the command line is regaining some prominence. Of course it probably never lost much prominence to start with, just suffered a little bad-mouthing, which no one ever died from.

But any time I spot two threads in the same day in the Ubuntu Forums — the Ubuntu forums mind you, where you’re more likely to meet complaints about the CLI than a notes of support for it — that poll its popularity or ask about X-less systems, then something is afoot.

There’s not a lot to be gleaned from a terrifically unscientific poll of command-line use, or a random callout for anyone running without X. In fact, had they occurred anywhere else — the Arch Forums, for example, or even the Debian forums — and you could probably safely overlook them altogether.

Arch Linux users, after all, are notorious command-line freaks who boast of their keyboarding prowess with screenshots of bizarre window managers like xmonad and Musca. And the elite of the elite of Debian peer down through the clouds that surround their aeries and wonder why you’re still using a mouse. Is your keyboard broken, perhaps?

I kid. I know it’s unusual to find an Ubuntu user who veers clear of X, since stripping away most of the graphical element of Ubuntu is stripping away most of Ubuntu … meaning that what’s left resembles other distros more than it resembles Ubuntu. You could call that the common denominator between all Linux systems, and it would be a warm, happy moment. :roll:

But … all things being equal, it’s nice to see some recognition of the command line, with a large percentage of that aforementioned terrifically unscientific poll going toward “daily use.” And it’s nice to hear about a few other people, in the midst of so many Ubuntu devotees, voicing a preference for such a large chunk of it omitted.

What it all means in the grand scope of things … I have no idea. ;)

That split-second realization

It happened to me again yesterday. That moment everyone talks about, when a GUI program is suddenly inconvenient and obtrusive, and you realize that the console alternative is just plain faster and easier than clicking buttons and waiting for an interface to accomplish the same task.

This time it was Leafpad, a program I otherwise hold in rather high regard, just for the direct-line simplicity of it and for its ability to avoid over-complication in becoming something it isn’t — like a code editor, or a word processor. Leafpad is just a text editor, and on any other day it would be what I pointed to if you asked me for a GUI editor I liked.

But this time I needed to do a search-and-replace for a series of oddball characters in a text file, and in the half-second it took to open Leafpad, I realized that I would still have to point-and-click to find the file and open it, then open the search-and-replace dialog, and then type in the appropriate strings and click the radio buttons to get the search behavior I wanted, then click to execute the search, then again to finally save it.

And I realized the same thing could be done in vim in about a tenth of the time, with a tenth of the “clicks” involved.

It’s not a particularly good or particularly fair example, since the two programs are bit distant in terms of potential too. Some of the things I mentioned that Leafpad doesn’t do are workaday affairs in vim, so the comparison becomes a kind of patronizing pat on the head for Leafpad.

It’s also a bit backward when the Leafpad package, according to ftp.archlinux.org, takes up 92Kb, while vim is a monstrous 5441Kb. Of course, you could argue in reply that Leafpad won’t run without the software morass called Xorg, which outweighs vim on a proportional scale.

My point here is not size of the binary or available features though. Each program — in this pair and in any other comparison — has pros and cons, and even if I could prove mathematically that one was superior to the other, you’d still be free to use whichever one you liked.

Just be aware that there may come a time — even if it only lasts a split second, like it did for me yesterday — when you’ll realize that you could do the same thing easier, faster and probably without incurring as much in required software, by relying on a console-based program instead of a GUI one. Maybe that split second will pass by without much more thought, or maybe that will trigger some other thoughts as well.

Improving the mocp status screensaver

Wednesdays are my busiest days, and unfortunately I only have time for a short note today. I hope you’ll forgive me for rehashing something I mentioned so recently, but I refined and made a few improvements to the “now playing” script for mocp, figlet and screen from a mere 10 days ago. (Additionally this might not be terrifically interesting at all, but only appeal to me … which is the best reason of all to put it here, because I’ll come looking for it later. ;) )

Originally the “script” really only spat out the title of the song currently playing, whereas this version shows the hostname and kernel version, plus the current date and time, along with the oversize artist and title, as well as the player status and time position. Perhaps a picture is in order.

And here is the script. (Remember, no fair laughing at my programming ability. I did my best work in Commodore BASIC, so bash puts me a little out of my depth.)

#!/bin/bash
while true  
	do 
		LF="\n\n"
		STATE=`mocp -Q %state 2>/dev/null`
		ARTIST=`mocp -Q %artist 2>/dev/null`
		SONG=`mocp -Q %song 2>/dev/null`

		clear 

		echo `uname -r -s` "on" $HOSTNAME > $HOME/.scripts/header.txt
		date +"%F %T %P" >> $HOME/.scripts/header.txt
		sed  -e :a -e 's/^.\{1,133\}$/ &/;ta' -e 's/\( *\)\1/\1/' $HOME/.scripts/header.txt
		
		echo -e $LF

		case "$STATE" in
		"PLAY"
			figlet -tkc -f mini ${STATE}
			
			echo -e $LF$LF	

			figlet -tc ${ARTIST}
			figlet -tc ${SONG}

			echo -e $LF$LF	

			mocp -Q %ct\ \:\:\ %tt 2>/dev/null | figlet -tc
		;;
		*)
			figlet -tkc -f mini.flf ${STATE}
		;;
		esac

		sleep 10s  
	done

I’ll explain what I was doing, because I am sure there is a more expedient way to do these things, and knowing what I was up to might make it easier to do it better.

Basically I want three things from mocp: the title of the song, the name of the artist, and the status of the player. Those are available with the -Q query flag, and go into variables of the same name.

Because the current time can change while the script is running, the kernel and hostname are dumped into a text file, followed by the date in the format I prefer. The sed centering script is a gift from the sed one-liner collection, which is something you should have bookmarked.

I use the state variable to determine if the screensaver displays anything at all, since it looks a little odd to show “Now playing” followed by nothing. So long as the state is “PLAY”, I send the state to the screen with figlet in a small typeface, followed by a few lines of vertical spacing, with the artist and the song titles centered, followed by the current track time and the total time of the song.

That’s about it. In the opposite case, where the state isn’t “PLAY”, it only shows the state, followed by nothing. I set that as a case statement because originally I was going to include a situation where there was no song or artist, but the TITLE output from mocp. I might add that later.

Suggestions are, as always, welcomed … so long, as always, as they’re not prefixed with hysterical laughter or demeaning comments about my programming ability. Or lack thereof. :|

Lessism over minimalism

I got a link in an e-mail the other day to digitizd.com, specifically to a post that talked about minimalism and lessism. I don’t read pop tech blogs — actually, come to think of it I don’t read blogs at all — mostly because they’re just big advertisements, and because the people who write them are somehow annoying to me. Actually, most bloggers are annoying to me, myself included.

It was odd, however, to hear someone preach about tech minimalism, and at the same time coach me on how to buy a cell phone, or explain why I should buy an iPad, or endorse a blogging service as a way to become an Internet hero. :shock: Maybe that alone explains my point about pop tech blogs being big advertisements. :roll:

Looking over the essay about minimalism though, what shocked me most was how different my own perspective on technology is from (what I guess is) the mainstream. I chide myself for dropping US$20 on a piece-of-junk 10-year-old Celeron laptop just so I can seed ISOs 24/7, and Mr. Pierce is explaining the 21 items in his dock (is that a Mac thing?) of which only nine are open. Maybe that’s minimalism to the average technophile, circa 2010. Maybe not.

Maybe I unwittingly fall into that “lessism” bracket that Mr. Pierce seems to dislike, where things are pared down so sharply that function becomes questionable. Or it may be that shift in perspective that I mentioned myself, a few months ago, where I’m pointing to the usefulness of contemporary software on technology that is a full decade behind the wave. Heck I even caught myself making a pitch for using floppies the other day. :roll:

To be honest, if either is true, I really don’t care. I am not on a crusade to convert anyone into using a computer in any way or fashion outside of whatever they like best. If 21 dock things and nine open at a time is “minimal” to you, then I am with you, brothers and sisters. Your campaign against the proliferation of unnecessary junk in western lifestyles is one step closer to realization. And you got there bravely clutching your $500 iPad.

Nope. I have no goal here. I have no motive, no hidden agendas, no desire to recruit, amass, educate or proselytize. Ninety-nine percent of the time I make notes here because I need to be able to find them for myself later. The other one percent of the time, I want to mark an event or a link that I might want to look at later. If you find this stuff useful as well … well, that’s great. I am cheered that you enjoyed it.

On the other hand, if you’re reading this site from your iPhone, listening to the latest DRM-laden music from your favorite big-name pop music band on your iPod, lugging around your iPad, wondering in the back of your mind how you’re going to make your paycheck stretch to cover the installment on your six-month-old octuple-core gaming laptop, and still have enough money for instant noodles and the monthly subscription to your favorite, newest, coolest on-line game. …

Well, you can still be a minimalist, if it sounds good to you. Personally, I would suggest dumping all that iP* on eBay, and letting someone else lug it around for a while. Find yourself a nice, clean middle-market cellphone, a music player that will play ogg tunes and is no bigger than a pack of gum, a secondhand Pentium 4 laptop and an Ubuntu ISO. You’ll be surprised and how much more simple — and minimal — your life can really be. :D

Speak to us, oh great and wise computer

In the category of “silly tricks that you can do at the console that don’t really make any progress but are kind of fun anyway,” here are two things you might not normally combine: the fortune package inherited from the Unix of Long Ago, and the espeak tool.

You can probably see where I’m going with this. Technically this is the bare minimum of what’s needed. Type:

fortune | espeak

Chant “Speak to us, oh great and mighty computer,” press return, and your computer will sing to you with the wisdom of the ancients — or the perversity of a stand-up comic, if you enable the off-color fortunes. Remember if you don’t like the default voice you can change that as well, and espeak supports a lot of different language types.

Now you can’t say your computer never talks to you any more. :)

Either it’s free or it’s not

I used to get a lot of hate mail — a lot. I know, it’s hard to believe. I’m such a nice person. The high point in the wave of defamation was about a year ago, and I made a point of not mentioning it publicly because mean-spirited rejoinders don’t solve any problems. They just create more ill will.

Things have subsided and now it’s rare that anyone writes to me to exercise their vocabulary of epithets. Ninety-nine percent of the malice revolved around a tiny change in one particular package in one particular distro. One default flag could be reversed, and it would provide a tiny measure of safety for inexperienced users.

It wasn’t a patch or a code change or even a feature removal. The flag existed, it could be reversed, the documentation allowed for it, and even encouraged using it. And any number of more “advanced” distributions applied the flag by default, mostly because it was a rather sane point to follow.

Eventually the change was adopted, the package was updated, and as a result now, if you try to delete your root directory in Ubuntu, it will ask you if you’re really sure that’s what you want to do.

That was over two years ago.

So you can imagine my relative surprise when a rather acerbic blog (with a considerable following) aimed at lampooning a particular segment of Linux users took offense at the reversal … more than a year after it had already been done and forgotten. That’s where all the meanness came from, as irate readers arrived on my doorstep, vented profanities, and then wandered off to sour someone else’s day. Late to the party, but no less angry for it.

I won’t pretend to speak for the people who opposed that change, but I can guess that the rationale was, “You are new and inexperienced, and therefore unable to contribute. This is the way things have always been, and your idea isn’t helping anything or anyone. Don’t interfere in things you obviously don’t understand or respect.”

No one told me I couldn’t use Linux, only that I couldn’t change it to suit my beliefs. I was free to try it and use it and endorse it, but if my own perspective differed from the originators, I should keep my mouth shut and learn to live with things as they had been created, decades ago.

The funny thing is, most of the people who wrote to me — or left comments, or attacked me personally — would have exploded in an aneurysm of fury if I had suggested the freedom attached to using Linux be restricted. Or if I had suggested the licensure be rewritten. Or if I wanted a particular demographic to be denied access to Linux. They couldn’t see that they were doing just that, to me.

You cannot release something into the wild, allow people to adjust or use it as they see fit, then chastise them if they decide they prefer things arranged differently from how they were originally drawn up. It’s either free, or it’s not, and you don’t get to decide for someone else how they run things. If you need to control the way other people use their computers, then you need to start from scratch and license your work appropriately. Microsoft and Apple might be able to give you tips on how to get started.

Even small clauses, like those famous no-military-use restrictions, grate me like sand in my mouth. Extending your restriction downstream through other users and developers is an attempt to control the people who might otherwise find it useful.

Either it’s free or it’s not, and that includes differences of philosophy. That might make me sound like Stallman, but I’ve been on the receiving end of a torrent of acrimony, and all because I happened to think things should be slightly different.

DoomRL: Hurt me plenty, in textmode

Shame on you. Shame on you for not telling me there was a whole string of rogue-ish games over at chaosforge.org, most with Linux versions and a couple with (gasp!) sound as well as color.

  

Doom, the Roguelike? Well darn. This could take up hours of my life, and dethrone Neverwinter Nights as my game of choice these days. Jokes aside, this is quite impressive. Cool soundtrack, reasonably fast action for a text-based game, plenty of in-game help and a cool dripping blood fade effect between levels. Just like the good old days.

I don’t know what luck I’ll have getting this one on the Pentium or even what performance will be like, so I might just skip it and stick with crawl at 120Mhz. On the other hand, nothing could be cooler than running a text-based Doom on a Pentium’s framebuffer, with the metal soundtrack, the growling and snarling, and. … :twisted:

P.S.: Yes, I am aware of the whole Quake-aalib phenomenon. ;)

Something old, something new: Console file managers

I should know better than to mention console programs any more, because as soon as I do, someone tosses out another one and I have to try it. Curiosity gets the better of me and I can’t help myself.

Such was the case with ranger, an unusual file manager mentioned for its similarities to vifm. Take a look and you’ll see why I used the word “unusual” to describe it.

 

The directory tree shifts to the left as you explore in ranger. Moving up or down the list and then stepping to a new directory shifts the panes left or right accordingly. Right now there don’t appear to be much in the way of lines or boxes as visual guides, but this is still a work in progress from what I can see, so maybe they’ll appear later.

Moving your selection bar over a directory shows you a preview of what’s in that folder, and jumping to the right shifts the entire display to the left. And as you can see, file types are displayed in different colors, with a breadcrumb path along the top and file information at the bottom, along with a disk space count.

It takes a little while to get used to ranger, because the principle at work here is quite innovative. This is the only file manager I know of that scrolls horizontally, in columns, as you browse a file tree.

Like vifm, ranger uses vi-style keystrokes and commands to handle most chores. F1 shows you all the important commands, as well as how to get out of ranger … but saying it follows vi’s style might be enough for you to figure that out. ;)

I’m going to keep an eye on ranger, mostly because it’s innovative, but also because it might turn into something very unique in the field of console file managers. At a time when it seems like everything has been done, and most efforts are actually rehashes of tried-and-true techniques, something new is worth watching.

Shifting gears only slightly, here’s something that has a history going back all the way to 1995: fdclone.

I know of fdclone obliquely, admitting only that I found it on a hand-me-down computer a year or two ago, and wondered what it was. If I understand it correctly, fdclone is an effort to mimic an ancient file tool called “fd,” which was popular in Japan as far back as 1989. So when we talk about software with a long lifespan, fdclone is a contender.

The layout here is very Norton Commander-ish, which appeals to some of us and is a turnoff for others. If you don’t have support for Japanese character sets you might see some oddball fonts at work, as you can see in my screenshots. As far as I can tell there’s no color at work here, and the keystroke labels you see on the screen might take a little time to get used to.

This is certainly no worse than most other console file managers, even if it seems rather bland by comparison. As you can see the tree mode is intuitive and easy to manage, and there is documentation in English as well as instructions on how to configure and build it.

And when you consider it reached version 3.00e in February 2010, this is not something that is going to expire any time soon. Fifteen years is a tremendous lifespan for any project. (P.S.: Ubuntu users have it in their repos; Arch/Crux users must build this one by hand.)

There you have it: Two file managers for the console, separated by about 15 years in the histories of their inceptions. As always, if you know of any others that I should explore, I would be happy to try.

Easy on the eyes: rtorrent-extended

The color bands you see in the recent screenshots of rtorrent are not screen artifacts, they’re intentional.

Just as an experiment I tinkered with the rtorrent-extended package in AUR, which applies a lot of patches to the 0.8.6 versions of libtorrent and rtorrent — including colored title lines. This allows you to paint both the foreground and background in any standard console color variation, with highlighting applied when the torrent is actively uploading or downloading.

On the whole there’s not a lot I would add to or subtract from rtorrent, which isn’t to say it’s the perfect program, only that it does what I need it to do without being scant. On the other hand, those colored bars really do make things much easier to read when you’re sifting up and down through pages of torrents.

The rtorrent-extended package also includes the ability to snub peers, ban slow peers, magnet links, ipv6, tracker info and a bunch of other things. Whether or not these tweaks eventually become part of the rtorrent mainline is something to be seen. There are a lot of variations on rtorrent that are worth investigating — desktop frontends, web interfaces, and so forth. But this one I can endorse simply on the grounds of visibility. ;)

Next Page »


Welcome!



Visit the Wiki!

Some recent desktops


May 6, 2011
Musca 0.9.24 on Crux Linux
150Mhz Pentium 96Mb 8Gb CF
 


May 14, 2011
IceWM 1.2.37 and Arch Linux
L2300 core duo 3Gb 320Gb

Some recent games


Apr. 21, 2011
Oolite on Xubuntu 11.04
L2300 core duo 3Gb 320Gb

Enter your email address to subscribe to this blog and receive notifications of new posts.

Join 144 other followers

License

This work is licensed under the GNU Free Documentation License. Please see the About page for details.

Blog Stats

  • 3,164,314 hits

Archives


Follow

Get every new post delivered to your Inbox.

Join 144 other followers