Tim Groeneveld

Random musings from the world of an Open Source geek

St. George really needs to update their webpay client library for Linux

/ | Leave a Comment

My development environment is CentOS 5. Running a library that is two and a half years old really sucks on a new Linux box, especially because I had to install three compat libraries.

The software is called “webpay”, and the actual library itself is distributed as a binary library; which would be alright apart from the fact that this is a library that is meant to financial transactions, and I want to be able to trust that this library is the actual library that I am meant to use. When you go to download the file from St. George, there is no way to validate the file, no signed GPG files – not even an sha1sum.

What was even worse, is that the webpay client refused to work in the Virtuozzo container.

rt_sigaction(SIGPROF, {0x81c0ce0, [PROF], SA_RESTORER|SA_RESTART, 0xf09dc8}, {SIG_DFL}, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [PROF], NULL, 8) = 0
open("test.blue", O_RDONLY)              = 3
fstat64(3, {st_mode=S_IFREG|0777, st_size=4891, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7eb3000
read(3, "", 4096)                       = 0
brk(0x9ae9000)                          = 0x9ae9000

I would like it if it “just worked”, or even better – that libwebpayclient.so came with source, so we could actually compile the library ourselves, and debug the problem further. Even though the library is from a bank, I would have no problem sending back improved code to the bank, especially if it improved the way that my software worked.

Damn banks.

Facebook photos

| Leave a Comment

<Ashley> Kayla came up with something so funny… you know when you take photos from up above you, they’re ‘myspace’ photos? well, she reckons that when you take photos with the camera looking up at you, they’re ‘Facebook’ photos xD

Livin’ the life of a working boy

/ | Leave a Comment

So, I thought I might like to tell you all that I am working the life of the working man now. I recently (on Thursday) started work at my first real full-time job at Digital Pacific.

It seems like a pretty good place, and even though it means moving from my current place in residence, which is Newcastle to Sydney, around two and a half hours away; working there really is worth it. All the people there are great, and my job is lots of fun.

So, I have not really been working on many projects for quiet some time, so today is actually the first day that I started working on some of my new upcomming releases.

Just can’t wait to find a place to live in Sydney 🙂

What Linux needs…

/ | Leave a Comment

Today I was working on MyBanco when the thought came to me of what Linux needs to get a better market share (our ultimate goal, 100%). Then it occured to me! We need a promo, of course, not just any promo, a Li-Li-Li-Li-Linux 2.6.3 🙂 See 2:36 🙂

Women are like…

/ | Leave a Comment

<Beeth> Girls are like internet domain names, the ones I like are already taken.
<honx> well, you can stil get one from a strange country 😛

I laughed.

How MyStocko works

/ | Leave a Comment

A few months ago, when I started working on MyBanco, I wrote a special RPC, or Remote procedure call protocol, a network protocol that allows a computer program running on one host to cause code to be executed on another host. This protocol, which uses HTTP/HTTPS and JSON is called MyInfo.

MyInfo was designed so that it could be used for anything, and be self-documenting. It’s not perfect (yet), but it does work.

Read more »

MyBanco 0.05 bad query patch

/ | Leave a Comment

There is a small typo around line 115 of backend/Plugins/transfer.php, where a line that says:
$SQL = 'INSERT INTO `myinfo`.`temp_data` (
should actually say
$SQL = 'INSERT INTO `temp_data` (

You can either change this typo manually by hand, or download the patch from my patches folder my MyBanco.

[   ] mybanco-0.05-bad-query.patch 15-Oct-2008 07:50 patch
[   ] mybanco-0.05-bad-query.patch.md5 15-Oct-2008 07:52 md5 checksum
[TXT] mybanco-0.05-bad-query.patch.txt 15-Oct-2008 07:51 diffstat

Read more »

Announcing MyStocko

/ | 2 Comments on Announcing MyStocko

With the help of researchers Robert Marks, Blake LeBaron and John Holland, I have been able to start implementing an algorithm for a “self operating” stock exchange. Called MyStocko, it is an application that will be able to operate a simulated stock exchange automatically without any user or operator intervention.

It records all buy/sell transactions, and works out figures such as the high and low sell price of any stocks. It is not yet complete at all, but it is coming there.

There is no user interface for buying or selling shares, but when it is done manually in the MyInfo database (from MyBanco) most of the other figures are worked out automatically. Already it is starting to draw graphs showing the history of buy and sell prices, and I can’t wait for it to be released.


Click on the image to enlarge it.

More about it later 🙂

Feeling small? Try .micro

| Leave a Comment

Ever tried to register a domain name, and realise, there is nothing that identifies something small? I mean, sure, there is .com for commercial enterprises, and there is .net for big network (companies) and even .org for national/international organisations, but what about if you want to do something… small?

Well, your good friend is now here, the .micro. dotMicro is a new top level domain (TLD) that is hosted on OpenNIC that is open for business to anyone that has something micro to share. Wether it be a local economy or a small micronation, even a microuniversity! It can all be given a name thanks to OpenNIC.

How do I get the .micro top level domain? Well, it’s simple, all you have to do is get your computer to use OpenNIC domain name servers (see the client setup guide here). Boom, there it is! What, did you expect to be hard?

But the fun just doesn’t stop there! Any domain that you register on .micro has the best possible price tag on it. Free. That’s right. You pay absolutely nothing for the priveldge of owning your own dotMicro domain! So what are you waiting for? Get out your favorite brower, and go register your .micro domain today.

How the stock exchange works

/ | 3 Comments on How the stock exchange works

I have always wanted to be able to write my own software to run a stock exchange, but I have never been able to get a full grasp on how the whole stock exchange system worked. I always had been left with many questions.

  • How exactly are the prices decided of the buying and selling of shares? Say I own 50,000 shares, and you own 25,000 shares, but you want to buy another 25,000 shares – how is that price determined?
  • How would selling be done? Say I want to sell my 50,000 shares, what if no one wants to buy them straight away? Does the price rise or fall?
  • Do I get to say how much I want to sell my shares for?
  • Are you able to put down an order for 25,000 shares and wait until someone else sells shares? If so, are you able to set the price that you want to buy at?

The market determines arbitrarily the price that shares are sold to the buyer for. Say you’ve got a range of prices that different people are willing to buy shares for. The first guy selling shares will go to the guy paying the highest price. The one coming after will have to sell to someone who’s only willing to pay less.

Say you’ve got a range of prices that different people are willing to buy shares for. The first guy selling shares will go to the guy paying the highest price. The one coming after will have to sell to someone who’s only willing to pay less. Brokers only automate this process.

If you are buying shares, you’ll want to buy cheap first.

Say for example, you have two people. Person one has 1,000 shares for sale for $1.50 /each and person two has 1,000 shares for sale @ $1 /each. If I wanted to buy 1,500 shares, the price I would pay would be:

((500*1.5)+(1000*1))/1500
=1.16666666666666666667
=1.1667

So my buying price per share would not be $1 or $1.50, rather it would be $1.17 each.

How would I go about recording buy prices, so I can make funky graphs like Yahoo Finance / Google Finance does? Basically, I would record all transactions that occur, like the purchage above that I did for $1.17 a share, and then have the computer work out the average price of all transactions done in every say, 1 hour. Once I have all these averages, I just plot those numbers on the graph.

How would I go about automating buying shares if no one is selling anything? Well, there is margin buying, which is buying shares with money that you don’t have. Also, there is short selling, where you are selling for money shares that you don’t have, but there is not really an economic concept for buying shares that don’t exist. There is no real to implement on a small scale anything like margin buying or short selling.

special thanks goto Ari Rahikkala