Agent is “available to you” but gives no mission

by carlin on January 25th, 2010

So I am grinding standing with the Caldari Navy with my Industry alt to get rid of the refining tax. I got enough standing to move up an agent, the agent appears under the “available to you” list in the station but when I talk to them … nothing. They tell me to get back in line and talk to an underling.

’tis a bug. Log out and log back in and they will happily give you a mission.

OpenSolaris workarounds and useful commands

by carlin on December 21st, 2009

I have a file lying around with instructions for getting around some OpenSolaris issues I’ve ran into lately, they may prove useful to others.

ld: fatal: file /opt/sunstudio12.1/prod/lib/crti.o: section .rela.annotate has invalid type [ SHT_RELA ]
ld is trying to do 64-bit linking on a non-64 bit system, do export LD_NOEXEC_64=1 and retry the compile.

readline warning turning off output flushing
This is a bug triggered by an upgrade from the 2009.06 stable to certain dev versions. Add clone:ptmx 0666 root sys to /etc/minor_perm

Broken keyboard layout, SHIFT+2 produces ” and SHIFT+’ produces @ (among other oddities)
This is most probably Acer Extensa 5620Z specific but pressing Fn+I fixes it. (Left size of Extensa keyboard: [CTRL][Fn][WIN][ALT])

More a tip than a workaround:

Update system
2009.06 has some very outdated packages and some important packages are not available in its /release repo. Complete upgrade:
pfexec pkg set-publisher -O http://pkg.opensolaris.org/dev opensolaris.org
pfexec pkg image-update

Will update if I run into any other issues or think of anything I’ve missed.

Update: 26/12/09:

The snapshot manager service has been placed offline due to a dependency problem

This message is displayed when trying open the Time Slider GUI interface. Look at the processes it lists, they will look something like:

maintenance svc:/system/filesystem/zfs/auto-snapshot:frequent
maintenance svc:/system/filesystem/zfs/auto-snapshot:daily

For each one run pfexec svcadm clear svc:/system/filesystem/zfs/auto-snapshot:TIMEPERIOD

So in my example, run:

pfexec svcadm clear svc:/system/filesystem/zfs/auto-snapshot:frequent
pfexec svcadm clear svc:/system/filesystem/zfs/auto-snapshot:daily

Start, restart, stop apache

Slipped my mind to mention this earlier, this is a bit unintuitive for Debian-people used to /etc/init.d/apache2

pfexec svcadm COMMAND http:apache22

Examples:

pfexec svcadm start http:apache22
pfexec svcadm restart http:apache22
pfexec svcadm stop http:apache22

Useless boot environment images

Another one that slipped my mind. pkg image-update creates new boot environments, assuming you don’t need the old images and want the diskspace back:

pfexec beadm destroy BENAME

Example:

pfexec beadm destroy opensolaris-1

View ZFS snapshots and their disk-usage

I tend to get paranoid as to how much space my ZFS auto-snapshots are using:

zfs list -t snapshot

Update: 11/01/10

Package ‘xrender’, required by ‘cairo’, not found

You get this if you when requesting details of GTK libs via pkg-config, eg. pkg-config --libs gtkmm-2.4. You need xorg-headers; pfexec pkg install SUNWxorg-headers. You will get this error trying to install Gtk2 for Perl.

Update: 07/02/10

Do you have a solution to an OpenSolaris problem you had? Feel free to leave a comment and I’ll edit it into this post.

The lament of an OS nomad

by carlin on November 22nd, 2009

I switched to Ubuntu around about April last year, migrating from Debian (and a little bit of Windows). Too many brain-dead decisions* by Canonical since then mean I am looking for a new OS.

I’ve used a number of different systems while testing Rakudo and while choice is a Good ThingTM it is also making this decision a bit difficult.

The first thing to decide is if I will stick with Linux (change distros) or move to a completely different operating system. The Linux field looks like this:

Debian: Easy to use and is stable. I used to think apt was the one-true package management system but after having Ubuntu demonstrate how terrible it is as if you want a package update you have to rely on a third-party for it (just one example: not upgrading Firefox-3.0 to Firefox-3.5 — instead they had to be installed parallel, 3.5 having no branding and a modified user-agent) I am not going to an apt-based system. And there is still the reasons I left Debian for Ubuntu to begin with (long release cycle, software re-branding, SSH-key vulnerability fail, etcetera, etcetera).

Fedora: Never used it, not sure what to expect other than it uses yum instead of APT.

Gentoo: I think if I stick with Linux I will be going to a distribution that is vastly different from Debian/Ubuntu and Gentoo fits the bill quite nicely; everything is compiled. That said, I’ve done a Gentoo installation three times now; once on VirtualBox, once in a chroot to an external harddrive from Ubuntu and once on a spare machine. The problem is it takes too long; getting all my machines using it will be a chore and when it eventually breaks reinstalling will be another chore. Each time I’ve given up trawling through kernel config menus and used genkernel but that defeats the purpose but I am sure that if I used the config menu I will miss options that I need.

GoboLinux: Gobo is an interesting distro; it doesn’t use the normal directory structure but rather turns it on its head and uses paths like /Users/Username, /Applications/Firefox/3.5/ etc. Their package management philosophy is that the filesystem is the package manger; you install from source using a portage-like program called ‘Compile’ (they really should have given it a different name) and to uninstall you do rm -r /Applications/Foo/. In among their good idea are some bad ideas, one that really stands out is that the root user (which is called ‘gobo’) has their home directory on /Users/Gobo (rather than /root) :-/ And as interesting as it sounds I can’t help but think of Henry Spencer: “Those who don’t understand UNIX are condemned to reinvent it, poorly.”

Arch: Arch is a fun distro. It’s minimalist, pacman is nice, has a ports-like system (abs) which makes it like Gentoo without the painful installation procedure, and a rolling-release system (like Gentoo) which eliminates the apt-problem of being tied to third-party for updates. If I stick with Linux Arch will the be distro I use.

Outside of Linux, there is:

OpenSolaris: OpenSolaris has had a place on my harddrive for a while now. ZFS, TimeSlider, DTrace … it even looks amazing thanks to the Nimbus theme. However, it has its problems. The command differences are a bit of a barrier; pfexec (sudo), prstat (top), vmstat (free) but learning them won’t be too difficult and most of the tools are available with their original commands anyway (to increase/make adoption easier the GNU tools are shipped along with the Sun tools). It’s also slow, not detrimentally slower but still slower than Ubuntu. One of the major barriers is the driver support; neither sound or wireless work for me (although that isn’t a surprise). Wireless is a huge pain with alternative operating systems so I hope to get some rewiring done so I don’t have to use wireless but for now it makes OSOL unusable as a main operating system. That said, the truly great thing about OpenSolaris is Sun Studio. On OSOL, SS becomes a viable compiler set; on a platform where GCC has left its grubby marks, ie. Linux, SS binaries are slower. On an SS-compiled platform, GCC binaries are slower but SS binaries on an SS platform are faster than GCC binaries on a GCC platform. Which is a major win for OSOL to me. Definitely a contender of my new OS. (And no, Oracle are not going to kill it).

Haiku: Haiku is a fantastic BeOS clone. It’s a nice OS but I don’t think its for me full-time.

FreeBSD: The competition is between OpenSolaris and FreeBSD. Thanks to its licensing, FBSD is able to offer ZFS and DTrace (but still needs GCC). A major attraction is the Ports collection which is Gentoo’s system done right in my opinion (well, it was done right and then Gentoo copied it and got it wrong). Want a package fast? pkg_add -vr foobar. Want that package but compiled from source? cd /usr/ports/something/foobar && make. Great system.

So it’s between Arch Linux, OpenSolaris and FreeBSD.

Decisions, decisions.

Upgrading from Karmic to Jaunty

by carlin on November 22nd, 2009

Much the same as one upgraded from Vista to XP, I upgrade from Karmic to Jaunty today. The workarounds and hacks to fix everything that Just WorkedTM on Jaunty was too much — such as the DNS problem — everything I have tried to far resulted in working DNS but very slow internet, while in Jaunty it’s fine.

I need to come to a decision soon about what operating system to migrate to, problem is being stuck with wireless makes moving slightly more challenging.

i maeked u a shell

by carlin on November 10th, 2009

(alternative title: Too Much Time on My Hands, which goes rather nicely with my last Perl 6 post).

So, in the beginning there was lolcats, then there was lolcode, then there was lolsql (jnthn even wrote a parser for it!) and then I took the joke too far and started lolsh, the lol Shell, in Perl 6.

It is very simple; it mimics bash’s UI as closely as possible, waits for input, and if the command entered is known it qqx’s the real-world equivalent.

carlin@cerberus:~$ cd Applications/rakudo
WTF?? I NO KNOE WUT U MEEN
carlin@cerberus:~$ CHANGEDUH Applications/rakudo
carlin@cerberus:~/Applications/rakudo$ perl Configure.pl
WTF?? I NO KNOE WUT U MEEN
carlin@cerberus:~/Applications/rakudo$ PURL Configure.pl
Reading configuration information from parrot_config …
Verifying Parrot installation…

carlin@cerberus:~/Applications/rakudo$ sudo make install
WTF?? I NO KNOE WUT U MEEN
carlin@cerberus:~/Applications/rakudo$ ICANHAZROOT MAEK install
[sudo] password for carlin:
/usr/bin/bin/parrot /usr/bin/lib/parrot/1.7.0-devel/library/PGE/Perl6Grammar.pbc \

Hopefully someone has a “so that’s how you do …” moment while looking at this so that writing it was justified :-)

Karmic chaos

by carlin on November 9th, 2009

So a company that routinely removes functionality from their operating system, to avoid confusing their poor, helpless users with too many checkboxes and features, ships a release with broken DNS resolving?

I think, from an end-user point-of-view, “not breaking the internet” should be a lot higher up in the scale than helping out people that “don’t get files and folders”.

Or does Canonical hope that the same people that zapped themselves with ALT+CTRL+Backspace, failed to install important security updates (without an obnoxious prompt popping up every other day to remind them) and would be confused if the Firefox-3.5 package replaced the Firefox-3.0 package, will be comfortable and technically capable of manually editing their grub config to turn off IPv6. Assuming they can even get as far as to identify the problem. Or do they assume that the majority of Ubuntu users will be in the minority of people with routers that don’t splutter and die when they receive an IPv6 request?

Rant over. And in fact, I think this issue has helped me identify a problem that I was having with OpenSolaris, go figure :-)

Mu bot

by carlin on November 6th, 2009

(Sorry for the bad pun).

One of the limitations of Mubot is that if karma is altered multiple times in a message, only the first alteration is actually made. For example, if someone says: John++ Cameron++ Cromartie-- Mubot only alters John’s karma (lambdabot would alter all three).

So after I had made the change to fix it, but before I restarted the bot, I demonstrated the current problem:

< carlin> mubot: karma mubot
< mubot> mubot is of an unknown quantity
< carlin> mubot++ mubot++
< carlin> mubot: karma mubot
< mubot> mubot has a karma of 1

Restarted the bot and proceeded to demonstrate the fix:

-!- mubot [n=zaslon@phoenix.theintersect.org] has joined #perl6
< carlin> mubot: karma mubot
< mubot> mubot has a karma of 1
< carlin> mubot++ mubot++
< carlin> mubot: karma mubot
-!- mubot [n=zaslon@phoenix.theintersect.org] has quit [Read error: 54
(Connection reset by peer)]

This is what the terminal said:

:sendak.freenode.net 366 mubot #perl6book :End of /NAMES list.
:carlin!n=carlin@phoenix.theintersect.org PRIVMSG #perl6 :mubot: karma mubot
:carlin!n=carlin@phoenix.theintersect.org PRIVMSG #perl6 :mubot++ mubot++
Segmentation fault

Worked fine after I restarted it:

< carlin> mubot++ mubot++
< carlin> mubot: karma mubot
< mubot> mubot has a karma of 3
< carlin> \o/

I believe the segfault was caused due to the size of the karma.log file (and subsequently the %.karma hash) as I imported every karma entry from lambdabot — About 1700 entries.

I might have to trim out some of the fluff, for example I don’t think we need to keep track of +++++[>+++++<-]>[>++<-]>'s 1 karma point …

Domo arigato, Mr. Roboto

by carlin on November 5th, 2009

I have always liked bots, I have written a few MediaWiki bots in other languages and the first non-trivial Perl 6 I wrote was my own Perl 6 MediaWiki bot framework (still not ready for any live-wiki editing yet). There just seems to be something about writing a program that imitates human behaviour (such as editing a wiki, or chatting on IRC) that interests me. So, given that it had been suggested a few times that #perl6 should have a bot written in Perl 6, about a month ago I looked into writing one and soon gave up. The problem was Rakudo’s IO::Socket.rev() method which would only ever return once the connection closed. This worked fine for a MediaWiki bot operating over HTTP (which can connect, disconnect, receive with no problems) but was no good for an IRC bot (which needs a constant connection). It was, however, possible to have ‘blind’ “bot” that could send messages to the channel, but as fun as that was, the bot wouldn’t be able to see PINGs from the server.

Being so close to having a Perl 6 IRC bot, I eventually come up with this hack and a non-visually challenged quux was born. That hack evolved into this patch and IRC bots were suddenly possible on Rakudo.

Just over one week later and #perl6 now has three IRC bots written in Perl 6:

Zaslon: Polls RSS feeds and announces in the channel whenever a blog it follows is updated. Zaslon also takes commands to add new blogs to follow, remove blogs or post a link to a blog. If anyone is wondering, Zaslon is named after the Zaslon radar.

pointme: Pointme is a very simple bot that posts links to projects tracked by proto. If anything it is an example of how simple an IRC bot can be. Named after hugme, the idea being that hugme embraces people (adds them to the project) while pointme points them in the right direction.

Mubot: Mubot is a karma-tracking bot, written because everyone is sick of lambdabot responding to any message that begins with an “@” or “>” (and there might be a few other trigger characters). Mubot properly supports (Multiple word)++ identifiers (lambdabot would give “word)” karma) and aliases. It is named ‘Mu’ since Mu is the letter after ‘lambda’ in the Greek alphabet.

Of course, there are some issues with Perl 6 IRC bots at the moment.

The first issue is the lack of non-blocking IO, Zaslon is the bot that suffers mainly from this problem; it can’t poll the RSS feeds while it’s receiving messages from the IRC server. This isn’t so much of a problem for bots like Mubot that only need to quickly analyse each message as it comes in, but Zaslon takes a significant amount of time to poll the feeds which means if it was checking the RSS feeds when a command was given it could take ~1 minute for it to respond. This would also be a problem if it missed a PING from the server. So the work around was to split up the IRC and RSS parts into two processes. This and the memory problem I explain below forced me into using what was probably a better solution anyway; to have the RSS part run on a crontab. rakudobug++

The second issue is memory. This was really an accidental discovery on my part. Zaslon’s proof of concept was quuxx (look at the code at your own risk…), I had it running the Rakudo revision in which my recv patch was applied. When I wrote pointme I updated the rakudo, and set both quuxx and pointme going. After a while Parrot ran out of memory on my VPS, figuring it was because I had both running on a VPS where, between Apache, MySQL et al., memory is tight, I started quuxx again and left pointme turned off. After a bit Parrot ran out of memory again. After some experimenting I filed RT #70183. As a workaround I rolled my Rakudo back to 657d55cce1f1ded33fd1f731344bd31b33099cb8 and it has been working fine.

The bots themselves also have (coding) problems, Zaslon starts spouting nonsense if the RSS feed is unavailable when it tries to access it and things break if you try to add an RSS feed that Zaslon’s very limited RSS “parser” can’t grok (or a URL that isn’t an RSS feed).

I haven’t, however, had any of the segfaults I seen with quuxx but perhaps I haven’t had any of the bots running long enough to allow any to happen.

My todo list at the moment looks something like this:

* Make HTTP::Client handle errors better
* Make Zaslon handle RSS feeds it doesn’t understand better
* Make IRC::Client bots able to read/respond to private messages
* Make IRC::Client’s highlight method able to return the nick of the person who triggered it

So that’s that. I think I might start work on an IRC::Server now ;-) (although that is blocked by RT #70045)

Intel 82801 DB PRO/100 VM on OpenSolaris

by carlin on October 18th, 2009

A while back I bought quite an old box (a Compaq Evo) to use as a test system. This weekend I took a shot at getting OpenSolaris running on it, as the first step in my plan to move to OSOL from Ubuntu. Everything worked fine except networking. Fortunately, OSOL has one of the best pieces of software ever written installed on it by default; Sun’s Device Driver Utility.

It can be opened via the command ddu or, for the terminally-challenged, Applications -> System Tools -> Device Driver Utility.

This clever program informed me that this box used an “Intel 82801 DB PRO/100 VM” and that a third-party driver was required. Right-clicking on the Network card and selecting “Show details” brings up a dialogue which includes a URL pointing to the driver you need. In this case it can be found here. You want the latest “ife driver for intel”, it lists 8255x cards but rest assured that it works with the 82801.

Luckily OSOL detected my USB drive by default, as needing network connectivity to get network connectivity is one of the more frustrating computer paradoxes. It would be nice if it shipped with the driver needed but I assume there are copyright restrictions on it.

Installing it is easy; extract the archive, open a terminal in the directory and run pfexec make install. Restart and voila, network access. Now if I could just get domain names to resolve …

Update: To get domain names resolving I added OpenDNS’ address(es) to my /etc/resolv.conf. The default was what every other machine on my network uses and they work fine, so I’m not sure if it’s an OSOL problem, a hardware problem or a PEBCAR problem (Problem exists between computer and router).

Lament: No NoScript?

by carlin on October 13th, 2009

Six months after the drama there is still no viable alternative to NoScript.

Back in May, there was commotion after the Firefox Addon NoScript changed AdBlock Plus to display ads on the NoScript website. The code which accomplished this was obfuscated and the user was not warned that this would happen. At the same time people began questioning whether NoScript’s constant updates (sometimes more than once a day!) where necessary or if it was just because the author wanted a reason to display his ad-laden website (the website is displayed by default after every update). After this I uninstalled NoScript and have been browsing the web NoScript free ever since. However, after some nasty browser hangs because of JavaScript heavy websites (looking at you, Slashdot) I decided to get back in the JavaScript-blocking game only to discover that NoScript is still the only viable choice.