Wednesday, November 18, 2009

A Geek Lounge?

After chatting briefly with chrism (who is now back in Perth, w00T!) we lamented the lack of a good place for Geeks to meet up in Perth, and hack on game code, art, music whatever. Perhaps something like the Linux Caffe in Toronto.

Who owns a cafe that we can hijack? :-)

Any other ideas?

Monday, November 16, 2009

Go vs Stackless

Andrew Dalke compares Go and Stackless Python and gets some very interesting results.

I'd like to see answers to some of the questions he raises.

Why does Pike emphasize the performance of Go's goroutine creation and channel communication when it seems to be slower than Stackless and definitely is not an order of magnitude faster?

Why indeed? Please answer us Google Engineers!

Update:
Just for fun, I ran the benchmarks myself, and added a benchmark for Fibra, because I wrote it, and I know that it is pretty slow. :-)

Go...
wdgt:tmp simon$ time ./6.out 
100000

real 0m1.147s
user 0m0.646s
sys 0m0.491s



Stackless...
wdgt:tmp simon$ time python sgo.py 
100000

real 0m0.532s
user 0m0.448s
sys 0m0.080s


Fibra...
wdgt:tmp simon$ time python fgo.py 
100000

real 0m4.054s
user 0m3.883s
sys 0m0.153s



This is the Fibra benchmark code. It's almost the same as the Stackless example, except for the ugly "yield" statements.

import fibra
from optparse import OptionParser

parser = OptionParser()
parser.add_option("-n", type="int", dest="num_tasklets", help="how many", default=100000)

def f(left, right):
x = yield right.pop()
yield left.push(x+1)

def main():
options, args = parser.parse_args()
leftmost = fibra.Tube()
left, right = None, leftmost
for i in xrange(options.num_tasklets):
left, right = right, fibra.Tube()
schedule.install(f(left, right))
yield right.push(0)
x = yield leftmost.pop()
print x

schedule = fibra.schedule()
schedule.install(main())
schedule.run()



The results are: Stackless fast, Go slow, Fibra... forget it.

Thursday, November 12, 2009

Python 3, is it doomed?

Why would I ask that question?

Python 3 has been available for some time now, yet uptake is slow. There aren't a whole lot of packages in the package index shop for Python 3. It seems there just isn't a demand for Python 3 libraries.

Google have released a new language, even though they hired the BDFL, and started the Unladen Swallow project (which coincidentally, does not target Python 3). Why?

Finally, despite my best efforts to move a project across to Python 3 from Python 2.6, I've been sabotaged by undocumented differences in the behaviour of the select module. I've decided to move back to 2.6 for the time being, rather than change code which has worked for a long time. Who knows what else might come out of the woodwork to raise strange exceptions in the middle of the night?

I think Python 3 suffers from attempting to be compatible with Python 2. It should have been a clean break with major repairs and reconstruction, as the original Python 3000 was intended to be. Hang the expense, let's make this language _right_, and Python 2 be damned.

Is it too late to remedy this situation?

How PC games should be played...



Beer + Air Conditioning + High Back Recliner + 42 inches of 1920x1080 LCD.

Awesome.

Wednesday, November 11, 2009

GameRanger - Perth Game Company

I just found out about (via a random google search) GameRanger, a company based in Perth that builds software which seems similar to GameSpy. It appears that they are willing to work with developers too. Cool.