art's abode

art.csoft.net

Archive for December, 2007

Video – The Ultimate Predators

without comments

Watched this (lengthy!) series of documentaries on predators last night. Pretty tasty indeed. Some of the documentary, the last episode in particular, talks about animal learning and the passing on of information–pretty arousing interesting, if you ask me.

Don’t miss the narrator’s play-by-play commentary either, pure welcome to the animal Olympics 2k8.

Written by art

December 23rd, 2007 at 2:44 am

Posted in science,video

Power Up!

without comments

DSC02561

… I’d best be saving this bad boy for emergencies.

Written by art

December 20th, 2007 at 4:20 pm

Posted in lulz,woe-is-me

MAngband-Vista out for testing

without comments

Today I ran the Windows binary package of MAngband 0.7.2a. Apart from missing walls and other things, it would consistently crash when I typed ‘:’ to chat. Pretty annoying.

As a result, I’ve compiled a Vista-compatible version of MAngband. You will need at least the Cygwin base set installed, as MAngband requires terminfo definitions. You can check out the project page with all the relevant downloads and information at MAngband-Vista. I hope to release updated versions of MAngband-Vista as new versions of MAngband are made available, and until these issues with Vista are resolved in the official distribution.

Written by art

December 14th, 2007 at 1:48 am

Inspiring words from the Ultimate Warrior

without comments

DrGuildo sent me this gem yesterday. Watched it again (and again) today, it’s still good–still fresh:

(http://www.youtube.com/watch?v=laiZgrIpbcA)

L U L Z M 4 T I Q.

/me puts neon streamers around his biceps and paints his face.

Written by art

December 9th, 2007 at 5:27 am

Posted in lulz,video,woe-is-me

Getting BSD, Home, End, Putty, and screen to play nice

without comments

… you can try putting shit into your /etc/inputrc (or ~/.inputrc):

"\e[1~": beginning-of-line
"\e[4~": end-of-line
"\e[5~": beginning-of-history
"\e[6~": end-of-history
"\e[3~": delete-char
"\e[2~": quoted-insert
"\e[5C": forward-word
"\e[5D": backward-word

You will have to re-login to your terminal session for these changes to take effect. But that may not fix anything in screen, until you change the $TERM in your screen session:

bash-3.2$ cat ~/.screenrc
term linux

… which means you have to restart your screen session for the changes to take effect. "term vt220" is also a good choice, but if you tend to use syntax highlighting with vim, for instance, or any other high-tech features of your system, it may look ugly-underliney.

Written by art

December 7th, 2007 at 12:26 am

Trapping signals in Ruby

without comments

It’s pretty easy to handle signals in Ruby, which is sometimes necessary when you want your code to interact with the system running it.

Signalz Ahoy!

If you want to know which kill signals you have:

bash-3.2$ kill -l
1) SIGHUP       2) SIGINT       3) SIGQUIT      4) SIGILL
5) SIGTRAP      6) SIGABRT      7) SIGEMT       8) SIGFPE
9) SIGKILL     10) SIGBUS      11) SIGSEGV     12) SIGSYS
13) SIGPIPE     14) SIGALRM     15) SIGTERM     16) SIGURG
17) SIGSTOP     18) SIGTSTP     19) SIGCONT     20) SIGCHLD
21) SIGTTIN     22) SIGTTOU     23) SIGIO       24) SIGXCPU
25) SIGXFSZ     26) SIGVTALRM   27) SIGPROF     28) SIGWINCH
29) SIGINFO     30) SIGUSR1     31) SIGUSR2

If you want to know which kill signals Ruby recognises:

irb(main):002:0> Signal.list.keys.join ", "
=> "USR1, BUS, USR2, TERM, SEGV, KILL, EMT, EXIT, STOP, SYS, TRAP, INFO, IOT, HUP, INT, WINCH, XCPU, TTIN, CLD, TSTP, FPE, IO, TTOU, PROF, CHLD, CONT, PIPE, ABRT, VTALRM, QUIT, ILL, XFSZ, URG, ALRM"
irb(main):003:0>

Some quick-n-dirty source code:

There’s probably better ways of doing this, but here’s a stupid little example demonstrating how it could work:

bash-3.2$ cat signal.rb

$hups = 0

def quit_on_int
  puts "Quitting on interrupt signal."
  exit
end

def quit_on_quit
  puts "U sure killed me guud!"
  exit
end

def handle_hup
  $hups=$hups+1
  puts "HUP! (count: #{$hups})"
end

while true
  trap("INT") {quit_on_int}
  trap("HUP") {handle_hup}
  trap("QUIT") {quit_on_quit}
end

Example in use:

bash-3.2$ ruby signal.rb
HUP! (count: 1)
HUP! (count: 2)
HUP! (count: 3)
^CQuitting on interrupt signal.
bash-3.2$

We run the program as above, then send it three SIGHUPs (i.e., using "kill -HUP pid"). We break out the program using ^C (ctrl-c), sending an Interrupt. Note this may not work in windows.

bash-3.2$ ruby signal.rb
U sure killed me guud!
bash-3.2$

Here we run the program again, and send it a SIGQUIT ("kill -QUIT pid").

Written by art

December 7th, 2007 at 12:21 am

VMWare Server 2.0 Beta…kinda

without comments

The new VMWare Server 2.0 is out on public beta, you can register at VMWare for a free serial for any platform it supports. One of the supposed great new features is exactly my gripe with Microsoft Virtual Server 2005 R2: it is only accessible via a web interface.

Yes that’s right gentlefolks, it actually installs an Apache Tomcat server. The interface is pretty sleek, but there was a noticeable lag in loading compared with VMWare Server 1.x.

Vista host seems OK, and it does support network bridging (finally!). I couldn’t get it to power on VMs on bootup using an XP host. Kinda annoying. It also uses a new format to store VM configuration settings and disk storage, but still supports all the other VMWare formats.

Apart from the improved 64bit support for host and guests, and improved Vista host support, having to load up a web browser to access a web server that’s purely dedicated to hosting web pages configuring your LAN virtual machines is a total harpoon up the arse. I think I’ll stay with 1.x for now.

Written by art

December 5th, 2007 at 11:38 pm

MAngband revisited

without comments

image

 

… and it looks like MAngband’s site has been completely redone, and the new development team has taken oven. Nice one, as they say. After a few years, I think we’ve all had enough of the good ol’ blackie-reddie theme.

Nothing like a CSS makeover!

Written by art

December 5th, 2007 at 10:58 pm

/etc/network/interfaces

with 3 comments

I’m tired of constantly forgetting this ultra-advanced syntax:

iface eth0 inet static
  address 192.168.1.77
  netmask 255.255.255.0
  gateway 192.168.1.1

or, via DHCP:

iface eth0 inet dhcp

Written by art

December 3rd, 2007 at 3:32 am

Posted in network,unix

Crimson stepping down from maintaining MAngband!

without comments

image Well, after years and years of slow and patient progress from Crimson, he’s made an official post on the official MAngband website stating that he intends to step down from maintaining MAngband, in lieu of the the current developers working hard at pushing out 1.0!

11/27/2007         Moving Day.    

On Tuesday, December 5th, 2007, MAngband begins a new era.

Finally admitting both to myself and the community that I simply no longer have the time to properly support the game,
I have delegated control and stewardship of it to a much more dedicated team of people, who have already started
making massive advances towards getting us up and running on 1.0 stable, as well as a much more structured development cycle.

I have been honored to have sat in stewardship of the game for these many years, and I
deeply appreciate both the trust, patience, and support I have received from the community at large during this time.

I will, of course, continue to participate in the game, and look forward to talking, and playing with the group.

Sincerely,

Robert L. Seifer

–Crimson

I can’t say I disagree with Crimson’s decision. Out with the mold, in with the new. I had a chat with someone on #mangband@irc.mangband.org earlier, and we had a pleasant discussion about some of the things MAngband 1.0 needs most–a code enema and some UI enhancements. While MAngband has always been the multiplayer roguelike, I’m sure few can say it’s been a pleasant multiplayer experience these past years. The interface is truly roguelike, to the extent that multiplayer interactions (like chatting) become awkward.

Written by art

December 2nd, 2007 at 3:19 am