Dear Santa, thank you for the dolls and pencils and the fish. It's Easter now, so I hope I didn't wake you but... honest, it is an emergency. There's a crack in my wall. Aunt Sharon says it's just an ordinary crack, but I know its not cause at night there's voices so... please please can you send someone to fix it? Or a policeman, or...
Back in a moment.
Thank you Santa.

Thursday, February 17

Geek

Cobra: Like Python, But With Teef

I've just spent the last hour tinkering with Cobra, a .Net/Mono-based application programming language.

I quite like it.  It's not perfect, but having dabbled in language design myself, I understand that there is no perfect language.  It's not just the limitations of human designers, or bad decisions that you end up stuck with; there are simply trade-offs that have to be made.  Making X elegant makes Y less so.

Occasionally there are clever and robust new ideas that allow us to make both X and Y elegant, but given the progress (hah!) in languge design since Algol 60 which appeared before I was born, I don't hold out a huge amount of hope that things will change significantly before I retire.

Anyway...

It's Python-like, though it's not Python.  (They also have a handy Ruby comparison page.)

It's fast - though Mono has a longer setup time than Python (~100ms vs <20ms, from my cursory testing), once it's up and running it's about as fast as Psyco, the sadly abandoned Python JIT compiler.  Which means, significantly faster than native Python.

And it has real threads.  One of the big problems I have with Python at my day job is that Python doesn't really do threads as a means of increasing performance.  The Global Interpreter Lock (the GIL) ensures that only one thread is executing Python code at any time.  Which means that if you spawn 50 threads, they'll all wait for each other and run little faster than one thread - and possibly quite a lot slower.

The reasons for this are support for non-thread-safe libraries and more efficient single-threaded execution (less locking is required if you're the only thread active at any given time).

The downside is that to get any scaling at all you have to go to multiple processes, and that requires a lot more code refactoring (and potentially a lot more memory) than multiple threads.

Anyway, .Net/Mono is fully multi-threaded; no such limitations apply.

What I don't like about Cobra: 4-space indenting.  I used to use 4 spaces, but lately I've been using 2, and I'd have to change back!!

That, and the Mono thing.  I haven't looked at Mono all that closely; Python has been my main programming language for most the past 4 years (with a brief but horrible excursion into PHP in 2008).  I know Python.  It just works.  Mono I'm not sure about.

Tomorrow, I think I'll venture into Boo-land.

Posted by: Pixy Misa at 04:52 AM | Comments (8) | Add Comment | Trackbacks (Suck)
Post contains 411 words, total size 3 kb.

Geek

Go Go Gadget Gnu Compiler Team!

I was just trying to confirm some confusing benchmark results, when I discovered something:

Python compiled with GCC 4.4.5 runs up to 50% faster than Python compiled with GCC 4.1.2.

Eineus runs CentOS 5 with the older version of GCC; Futaba runs Fedora 13 with the newer version.  Both are 32-bit and have Python 2.6.6 compiled from source.  (And they're OpenVZ VMs on the same host, so no hardware differences at all.)

[andrew@eineus ~]$ python test.py
Native
Loop: 0.943
String: 1.490
Scan: 0.547
Total: 2.980

[andrew@futaba ~]$ python test.py
Native
Loop: 0.600
String: 1.070
Scan: 0.537
Total: 2.207

That's good to know.

Psyco results don't vary much, since that has its own compiler.  But for some reason, the string scanning benchmark, which ran measurably slower under Psyco before, is now pretty much equal in speed to native Python.

It's a shame that Psyco has been pretty much abandoned; I understand that the code is unlovely cruft, but it's an incredibly useful tool.

Update: You can see how things have evolved over time with respect to CPU and compiler speeds:

All My Servers Are No Longer The Same Speed (2010)
All My Servers Are The Same Speed (2006)

Update: Did some more testing.  Python 2.6.6 compiled with GCC 4.4 on x64 averages 50% faster than the same version compiled with GCC 4.1 on x86.  It's pretty consistent across the board, too.

Posted by: Pixy Misa at 04:05 AM | No Comments | Add Comment | Trackbacks (Suck)
Post contains 234 words, total size 2 kb.

Tuesday, February 15

Geek

Firefox 4 Review

Put the goddam status back, you idiots.

Each new release of Firefox seems to avoid fixing the one thing that has to get fixed (tabs need to run in separate processes, like Chrome) in favour of breaking something that worked fine before (URL bar, now status bar) and requiring a new plugin to get back almost the functionality we had previously.

Posted by: Pixy Misa at 07:07 PM | Comments (2) | Add Comment | Trackbacks (Suck)
Post contains 64 words, total size 1 kb.

Geek

Argumentum Ad Puppulum

Or as Gir would put it, "Your head smells like a puppy."

We're all familiar with the common logical fallacies like the argument from popularity, argument from authority, ad hominem, and so on.  Even if we don't know their technical names, anyone who's spent more than half an hour online has seen most of them.

There are a few I've named myself; they're just special cases of existing fallacies, but they're common enough to warrant their own entries in the Bumper Book of Stupid Arguments:

Black Knight Fallacy

A special form of the argument ad nauseam: Consists of presenting an unending sequence of false and illogical statements, being rigourously taken apart by the opposing side in the debate every time, and then declaring victory when they get bored and leave.

Invisible Bigfoot Fallacy

This is what you get when you grasp Ockam's Razor by the wrong end.  The name comes from the classic example, explaining that the reason no-one has seen or photographed bigfoot is because it is invisible.

Argument from Dead Philosophers

A form of the argument from authority, but rather than presenting an actual statement from someone, the author just names a bunch of dead philosophers.  "blah blah blah Kant, Hegel, Descartes, Plato blah blah blah".  Extra points may be awarded for misspelling their names.

Posted by: Pixy Misa at 03:31 PM | Comments (4) | Add Comment | Trackbacks (Suck)
Post contains 220 words, total size 2 kb.

Geek

Death By Success

Anyone looked at the quality of questions on Stack Overflow lately?

Gah.

Posted by: Pixy Misa at 02:59 PM | No Comments | Add Comment | Trackbacks (Suck)
Post contains 15 words, total size 1 kb.

Sunday, February 13

Rant

Ugh, Script Kiddies

Just go play in the traffic, will ya?

Posted by: Pixy Misa at 09:46 PM | No Comments | Add Comment | Trackbacks (Suck)
Post contains 11 words, total size 1 kb.

Saturday, February 12

Cool

Guess I Gotta Buy It

Sony have launched a new Y series notebook based on AMD's Bobcat processor.  The Bobcat is AMD's answer to Intel's Atom, but with superior processing power and dramatically superior graphics.

The new model looks very much like my Sae, which is last year's model:

Sae:
/images/sae-vaio.jpg?size=500x&q=95

New:
/images/chika-vaio.jpg?size=500x&q=95

Though as you can see, last year's version came with a limited edition dramatic lighting kit.

The main difference is that the new models are about 20% smaller and lighter than last year's - they have an 11.6" screen instead of the previous 13.3" panel, though still with the same 1366x768 resolution.  Everything else has shrunk slightly to fit, including the price, about 30% lower than before.

Oh, and it doesn't come bundled with Adobe software any more.

So the new one looks just like Sae, but is smaller and has no artistic talent.

It's Chika-chan!!!

Posted by: Pixy Misa at 02:43 PM | Comments (4) | Add Comment | Trackbacks (Suck)
Post contains 147 words, total size 1 kb.

Anime

Kimi Ni Todoke, Season 2 Episode 5

Sometimes you wonder why we crawled up out of the ocean, climbed up into the trees, climbed back down out of the trees, discovered fire, invented the wheel, the lever and the other one I always forget, fought wars, went to school, and work forty* hours each week for most of our lives.

Kimi ni Todoke is why.

The reason the Mayan calender stops next year is because Kimi ni Todoke is going to end, and then, the Universe, weary but satisfied, will fold back in on itself.  The world ends not with a bang but with a sigh of happiness.

In the go go beta couple category: Doesn't Chizu clean up nice?

In the war dispatches category: Die, blondie, die!

* For varying values of forty.

Posted by: Pixy Misa at 12:30 AM | Comments (7) | Add Comment | Trackbacks (Suck)
Post contains 134 words, total size 1 kb.

Friday, February 11

Cool

Sony (Nee Sonic Foundry) Stuff

Just though I'd note that if you have any of the the Sony Home Studio audiovisual apps (Acid Music Studio, Sound Forge Studio, Vegas Movie Studio), you can upgrade to the professional equivalent during February at half the usual price.

That brings the upgrade to Acid Pro down to about $100, which is an amazing bargain.  I already have Acid Pro because I was able to upgrade a copy I bought back around 2001, skipping three full releases.

The question is whether the average hobbyist needs the power of the full apps any more.  The Studio line is really powerful these days; with a few exceptions like Vegas Movie Studio's limit of 10 video tracks, they offer everything you're likely to need.  (How many people need Sound Forge 10's support for 64-bit audio?) 

I personally find Acid Pro 7 somewhat overwhelming; even Acid Music Studio 8 has a lot more features than the copy of Acid Pro 3 I bought way back when.

But if you want it and have a few dollars to spend, now's a great time.  Even if you need to buy Acid Music Studio first and then upgrade it's still about 40% off.

P.S. Sony didn't pay me anything for this publicity.  Given the size of my Acid loop library, rather the reverse...

Posted by: Pixy Misa at 11:11 PM | No Comments | Add Comment | Trackbacks (Suck)
Post contains 222 words, total size 1 kb.

Geek

I Need A New Router

I'm getting 2% packet loss on the local interface.  That's not good.

Posted by: Pixy Misa at 07:21 PM | No Comments | Add Comment | Trackbacks (Suck)
Post contains 17 words, total size 1 kb.

<< Page 2 of 3 >>
73kb generated in CPU 0.0206, elapsed 0.1899 seconds.
55 queries taking 0.1762 seconds, 381 records returned.
Powered by Minx 1.1.6c-pink.
Using http / http://ai.mee.nu / 379