Yearly Archives: 2013

ModernMUD Source Now on Github

As dumb as the name might be, I decided to go with “ModernMUD”.

The source code is available on Github under the BSD license:

There’s a lot more to be done with documentation, but the XML comments are decent enough to make IntelliSense useful. I’ll probably be posting more about invidiual sections of the source, particularly the clients (all four of them!), in the near future.

If you’d like to chip in, or use the code to build your own MUD, you are more than welcome to do so.

Goodbye Sociable Plugin

I disabled the “Sociable” plugin because it was littering every post with a ton of buttons that just advertised social media sites. You don’t need to see that crap and neither do I. Time has proven that social media is almost entirely valueless anyhow. In ten years nobody will even remember that there was a Google plus.

Overclocking The HP Touchpad For Cryptocurrency

I mention in my September 9th post that I was able to get a Bitcoin/Litecoin mining daemon (cpuminer) running scrypt calculations on the HP Touchpad.

Because a device like that is one of the worst possible things you could use to generate cryptocurrency, I’ve left it running as a dedicated Litecoin mining machine since then. It’s generated nearly a quarter of a cent worth of imaginary money in the past week.

This is a Touchpad with the stock kernel at 1.2 GHz:

[2013-09-09 01:37:27] thread 0: 43849 hashes, 0.74 khash/s
[2013-09-09 01:37:46] thread 1: 46406 hashes, 0.77 khash/s
[2013-09-09 01:38:28] thread 0: 44242 hashes, 0.74 khash/s
[2013-09-09 01:38:46] thread 1: 46395 hashes, 0.77 khash/s
[2013-09-09 01:41:33] thread 1: 23011 hashes, 0.38 khash/s
[2013-09-09 01:41:39] thread 0: 25365 hashes, 0.38 khash/s

The drop to half rate is because the CPU is throttled to half speed when the device goes idle. I’ve heard that you can overclock a Touchpad, but have never looked into it because it’s been fast enough for me.

Here’s a blog post that details how to tweak your Touchpad for performance:

This is the Touchpad with the stock webOS Internals “uberkernel” (no settings changed):

[2013-09-09 03:23:58] thread 0: 13388 hashes, 0.30 khash/s
[2013-09-09 03:23:58] thread 1: 13363 hashes, 0.30 khash/s
[2013-09-09 03:25:27] thread 1: 18193 hashes, 0.20 khash/s
[2013-09-09 03:25:27] thread 0: 18232 hashes, 0.20 khash/s
[2013-09-09 03:26:00] thread 1: 12187 hashes, 0.37 khash/s
[2013-09-09 03:26:00] thread 0: 12208 hashes, 0.37 khash/s

That’s worrisome, shouldn’t it be faster? It seems that the stock install optimizes for power savings rather than speed.

With the UberKernel set to OnDemandTcl 1512 (1.512 GHz):

[2013-09-09 03:31:22] thread 1: 57473 hashes, 0.95 khash/s
[2013-09-09 03:31:23] thread 0: 50465 hashes, 0.87 khash/s
[2013-09-09 03:32:20] thread 1: 56374 hashes, 0.98 khash/s
[2013-09-09 03:32:20] thread 0: 51996 hashes, 0.91 khash/s

That’s right, 1.8 khash per second! Blazing fast! You may also notice that it’s bursting as high as 0.98 khash per core…

OK, here goes. I’m probably going to melt my pad, but 1 khash per CPU is within my reach. Could you imagine a 2 khash tablet? Dang, that’d be nosebleed-worthy.

[2013-09-09 03:45:44] thread 1: 67142 hashes, 1.11 khash/s
[2013-09-09 03:46:42] thread 0: 62675 hashes, 1.06 khash/s
[2013-09-09 03:46:43] thread 1: 66417 hashes, 1.11 khash/s
[2013-09-09 03:47:17] thread 0: 37319 hashes, 1.06 khash/s
[2013-09-09 03:47:17] accepted: 2/2 (100.00%), 2.17 khash/s (yay!!!)

Yay indeed. I did it! A kilohash per core per second! 2150 hashes! Victory!

I also tried mining Bitcoin with cpuminer on the HP Touchpad using SHA256 calculations, and the power was considerable there, too:

[2013-09-10 01:20:15] thread 0: 40506764 hashes, 762.24 khash/s
[2013-09-10 01:20:16] thread 1: 47714636 hashes, 789.13 khash/s
[2013-09-10 01:20:58] thread 1: 33848421 hashes, 800.30 khash/s
[2013-09-10 01:20:58] thread 0: 32404380 hashes, 759.41 khash/s

That’s right, more than a three quarters of a megahash! That’s a BTC generating /machine/.

I don’t think this is something I should try to sustain, though. The CPU made it as high as 32 degrees C, in a room that was 24 degrees C at the time.

I’m going to be rich! Wait, you mean I only earned a thousandth of a cent during this experiment? Oh well, there goes my dream of a Touchpad mining farm…. creating a penny worth of imaginary money for each dollar of electricity is something you probably can’t make up on volume.

New Editor Builds

For this build, version 0.59, the name has been changed from “Basternae Editor” to “ModernMUD Editor”. This is because I’m in the process of open-sourcing the codebase, and the editor will work not only for Basternae, but any MUD based on the same codebase.

Other than the name change, there are a few stability fixes, and probably some new bugs. Download links for Windows and OSX/Linux are on the right side of the blog. Enjoy!

Parallel Programming and Cryptocurrencies

Lately I’ve been spending a lot of brain cycles learning parallel programming tools and APIs. These are tools that let you write code to run on your video card (GPU) and/or multiple CPU cores at once. I’ve learned the basics of NVIDIA CUDA, OpenCL, OpenMP, and C++ AMP over the past few weeks. They’re neat things to know, but I’m not really sure what I’d use them for since most of the applications are scientific computing and math-intensive things and that’s not something I’ve ever really focused on.

One of the most useless things that GPUs are used for is mining bitcoins and litecoins. They’re a virtual currency that is created by using math to turn lots of electricity into coins that are worth anywhere from slightly less to a lot less than you paid for the electricity. This imaginary currency will gradually disappear as governments obliterate the exchanges that you can trade them on. They’re doing that because alternative currencies are a threat to them – they’re hard to tax, easy to launder, and undermine the authority of a central bank. These are all generally good things unless you’re a government. Bitcoins and litecoin wallets and exchanges are also frequently hacked/robbed, but nobody knows yet whether those thieving hackers are government-sponsored.

Now that I’ve made it clear that cryptocurrencies are dumb, one thing they are great for is exploring and learning about the capabilities of different hardware and parallel computing APIs. There are plenty of open source mining programs that use CUDA, OpenCL, or CPU-based hash calculations, and you can run a miner on almost anything. If you want to waste electricity, you’ve got options.

I have a wide range of hardware at home and have benchmarked quite a few things. Here are the speeds of various bits of hardware in Litecoin kilohashes per second:

460 hashes/sec – Asus EEE 701 PC with 630 MHz single-core Celeron processor.
1500 hashes/sec – HP Touchpad Tablet with 1.2 GHz dual-core ARM processor.
6200 hashes/sec – Compaq laptop with Core 2 Duo T8100 processor.
13650 hashes/sec – NVIDIA Geforce GT 610 512MB PCI video card.
27400 hashes/sec – NVIDIA Geforce GT 650M 2GB laptop video card.
37000 hashes/sec – AMD Phenom II 1100T six-core processor.
41000 hashes/sec – MSI laptop with i7-3920XM quad-core processor.
52000 hashes/sec – NVIDIA Geforce 640 1GB PCI-E video card.
NULL hashes/sec – ATI Radeon HD 6870 1GB PCI-E video card.

I don’t have much ATI graphics hardware, and for good reason, because one thing is still true – there is *ALWAYS* something broken in their drivers, and in the case of my 6870, OpenCL doesn’t work right on it, so it’s pretty much a brick for this experiment.

The most interesting bit was getting a litecoin miner running on my HP Touchpad. There is a miner daemon called “Pooler’s CPUMiner” that can be compiled for ARM. It almost compiled with the TouchPad SDK, but it required some adjustments to library settings and compile flags to get it to work. After a bit of tinkering I got it to run on the device at a blistering 1510 hashes per second. When the device’s screen is off the CPU runs at half speed, so with the screen off it gets 760 hashes per second. Because I know the masses will be clamoring for a TouchPad binary, I’ve posted it on Github:

This was an interesting experiment and I’ve managed to generate nearly 10 cents in imaginary money. It only took just over $1 of electricity to get there.

The Magma Codebase Is Worth Millions!

I love how Ohloh estimates the value of open source projects. For instance, here’s their take on the Magma MUD codebase:

I believe Envy is just over 100k lines of code. At the average developer salary of $91,000/year, about $1 million in “value” was created by the Basternae II rebuild team. Value that, due to the DikuMUD license, could never actually be “claimed” through any means.

Just a curiosity, really, but still fun.

Sniktiorg’s Zones

Sniktiorg, one of the most creative and prolific zone creators in the world of MUDs, has granted Basternae 3 permission to use his areas. Woohoo!

I’ll attach them as I get them converted to the new format and figure out where in the world they should go.

Preserving Newlines in XML Serialization

With .NET’s XML serialization, it kills newlines when you serialize XML to disk. More specifically, it converts a CR+LF into just an LF (\r\n becomes just \n).

This was causing annoyances with the spell editor, since you can edit source code for spells with it, but the code would appear all on one line after saving and reloading.

The fix was to declare XmlWriterSettings with a newline preference.

The code was this:

         public void Save()
             XmlSerializer serializer = new XmlSerializer(GetType());
             Stream stream = new FileStream(FileLocation.SpellDirectory + FileName,
                 FileMode.Create, FileAccess.Write, FileShare.None);
             serializer.Serialize(stream, this);

And now it’s this:

        public void Save()
            XmlWriterSettings ws = new XmlWriterSettings();
            ws.NewLineHandling = NewLineHandling.Entitize;
            XmlSerializer serializer = new XmlSerializer(GetType());
            Stream stream = new FileStream(FileLocation.SpellDirectory + FileName,
                FileMode.Create, FileAccess.Write, FileShare.None);
            XmlWriter writer = XmlWriter.Create(stream, ws);
            serializer.Serialize(writer, this);

I can have my newlines and eat them too. Oh joy!

I Am Addicted To Github

Until recently, the only code I’ve released as open source has been the Magma MUD codebase.

In the process of posting the Magma source on Github, I kind of got hooked on posting code online. Since then I’ve posted the source for a handful of applications, a mix of Linux and Windows desktop apps. A 12-day commit streak so far, yay!

I’m also considering open-sourcing the Basternae 3 codebase. The main things that make it easier to work with than old-timey C-based MUDs are the use of C#, which has amazing exception handling and debugging capabilities (no more attaching gdb to a core dump), and speaks XML natively, so data files are Human-readable, portable, fairly robust, and extensible. The editor is also getting to be pretty good.

To open source Bast3, I’d need to write a lot more documentation, and I’d need to “genericize” a lot of things that are specific to Basternae. It’d be a lot of work, but I think it’d be a fun project. The source is already in a private repository on Github, but that’s the easy part.

Magma MUD Codebase Now on Github

The Magma MUD codebase, last updated in 2008, is now on Github:

I’ve cleaned up the build a little bit, but it’s still the same old Magma that was used to start Basternae 2, warts and all.

If you feel like cleaning up any bugs (there are plenty) or adding any improvements, go ahead.  If you want to send a pull request I’m Xangis on Github (as you can probably tell from the URL).

Using MonoDevelop

I’ve almost always used both Windows and Linux, but I stopped using Windows a few months ago.  One of the things that only runs on a Windows machine is Visual Studio.  The Basternae code was compiled on a Windows machine and then uploaded to the Linux host.

Without access to that, it was time to try using MonoDevelop.

It was able to load the Visual Studio solution, with some exceptions:  The client WPF project didn’t load, nor did the abandoned Silverlight project.  I could probably install more packages to make WPF work, I’m not sure yet.

I noticed that the compiler works differently for some things, like terminal characters.  The ECHO_ON and ECHO_OFF sequences broke logging in, but some weird prompt formatting that’s been around for a while just fixed itself.  It will be interesting to see what other diffferences turn up.  Even though C# is supposed to work the same on all platforms, I suspect that it might work better when both the build and run machines have the same operating system.

What of the MUD?

That is a good question.  I haven’t touched it in a long time, around a year.

Basternae is still important, but it’s been pretty severely deprioritized in favor of the startup work I’ve been doing here in the Portland area.  As soon as I get a win big enough to retire on it’ll be my first priority, I promise.

Can you think of a way I can make a living writing a MUD?  I’ve been trying for 10 years, but haven’t come up with anything.  That’s a shame because it’s far more fun than doing almost any kind of real work.

Mint Mark Guide

From my website The meanings of mint marks on coins from different countries.


A – Berlin
D – Munich
E – Muldenhutten
F – Stuttgart
G – Karlsruhe
J – Hamburg


A – Alamos
AS – Alamos
C – Culiacan
CA – Chihuahua
CE – Real de Catorce
CH – Chihuahua
Cn – Culiacan
D – Durango
Do – Durango
G – Guanajuato
Ga – Guadalajara
GC – Guadeloupe y Calvo
Go – Guanajuato
H – Hermosillo
Ho – Hermosillo
M – Mexico City
Mo – Mexico City
O – Oaxaca
OA – Oaxaca
P – San Luis Potosi
PI – San Luis Potosi
SLP – San Luis Potosi
Z – Zacatecas
Zs – Zacatecas

United Kingdom

H – Heaton
KN – King’s Norton

United States

C – Charlotte
CC – Carson City
D – Denver
O – New Orleans
P – Philadelphia
S – San Francisco
W – West Point

Country Identifier

From my website This may help in identifying stamps or currency.

Afghanes – Afghanistan
Al-Maghrib – Morocco
Batavia – Netherlands Indies
Bon Towarowy – Poland
Cabo Verde – Cape Verde
CCCP – Russia (Soviet era)
Ceskoslovensko – Czech Republic
CPBNJA – Serbia
CRVENI KRST – Yugoslavia
Deutsche Bundepost – Germany
D.P.R. Korea – North Korea
Eire – Ireland
Foroyar – Faroe Islands
Haute Volta – Upper Volta
Helvetia – Switzerland
HP BbArAPNR – Bulgaria
Hrvatska – Croatia
Island – Iceland
JYROCNABHJA – Yugoslavia
Kampuchea – Cambodia
Kibris – Cyprus
Letzeburg – Luxembourg
Lietuva – Lithuania
Magyar – Hungary
MAKEDOHNJA – Macedonia
Malgache – Madagascar
Muntbiljet – Suriname
Nippon – Japan
Noreg – Norway
Noyta – Russia
Osterreich – Austria
Persane – Iran
Poccir – Russia
Republica Dominicana – Dominican Republic
Santral Sesel – Seychelles
Shqiperia – Albania
Srpske Krajine – Serbian Krajina
Suomen – Finland
Sverige – Sweden
Togolaise – Togo
TOYNKNCTOH – Tajikistan
UAPCTBO – Bulgaria
UPHETOPE – Montenegro
Zhongguo – China
Aitutaki – New Zealand
AZERBAYCAN – Azerbaijan
Belgique – Belgium
Bundeskassenschein – Germany
Cambodge – Cambodia
Ceska – Czech Republic
Comores – Comoros
CPNCKA – Serbia
DDR – German Democratic Republic
Deutsche Demokratische Republik – German Democratic Republic
Eesti – Estonia
Espana – Spain
Gronland – Greenland
Heireann – Ireland
Helvetica – Switzerland
HP GbNraPNR – Bulgaria
Inrikes – Sweden
Jugoslavija – Yugoslavia
KA3AKCTAK – Kazakhstan
KbIPTbI3CTAH – Kyrgyzstan
Kyrgyz – Kyrgyzstan
Liban – Lebanon
Lietuvos Respublika – Lithuania
MAKEAOHCKN – Macedonia
Malagasy – Madagascar
Maroc – Morocco
Moldovei – Moldova
Nederland – Netherlands
Nistriana – Transnistria
Norge – Norway
Noytobar Mapka – Russia
PCCP – Russia
Pilipinas – Philippines
Polski – Poland
RSA – South Africa
Sedlabanki Islands – Iceland
Shqiptar – Albania
Suid-Afrika – South Africa
Suomi – Finland
Tchad – Chad
TOrPOr – Mongolia
Turkiye – Turkey
UPHA rOPA – Montenegro
YKPAIHN – Ukraine

Number Identifier

From my old website, numbers in different languages.

Language 0 1 2 3 4 5 6 7 8 9
Arabic ٠ ١ ٢ ٣ ٤ ٥ ٦ ٧ ٨ ٩
Burmese (Myanmar)
Devanagari (Hindi/Nepali)
Hebrew א ב ג ד ה ו ז ח ט
Japanese (Chinese/Vietnamese)
Punjabi (Gurmukhi)
Urdu (Persian/Farsi) ۰ ۱ ۲ ۳ ۴ ۵ ۶ ۷ ۸ ۹