Wave is awesome, hope more people will get in soon. I've migrated a lot of stuff down there which I don't regret one bit. It's mostly stable, but still lacks features.
I was asked for it earlier on, since I had to use it elsewhere recently here's the snippet I use to slugify strings.
strin = """ '".,?!:;%*#&+=()[]<>/"""
strout = "---------------------/"
def slugify(txt):
... trans = maketrans(strin, strout)
... txt = unicode(txt)
... txt = normalize("NFKD", txt).encode("ascii", "ignore").strip().lower()
... txt = txt.replace("'s", "s").translate(trans)
... txt = "-".join(seg for seg in txt.split("-") if seg)[:50].rstrip("-")
... return txt
October 26, 2009
I'm taking this loop off.
September 26, 2009
The way from 2.0
Sigrie 2.0 is up and running since a few days.
Version numbers are usually of little importance. I like the way Chrome handles them.
What's to come? Well, high on priority list are heirlooms. Similarly to the new linkstrings, heirlooms will have support for tooltips of any level.
Loot tables are coming as well. I'm still trying to think of the sanest way to store them.
Maps/locations are on the short-term todo list. I'm working on them every day and should come just after heirlooms.
On a longer time frame, a WebGL modelviewer prototype is planned. It should make for a very strong testcase for both Gecko's and Webkit's WebGL engine.
Looking forward, now.
August 26, 2009
I don't think anyone has seen this before, we actually beat them to the punch!
BlizzCon was amazing. Nothing unexpected there. I had lots of fun; visiting the US was an unique experience (although a bit short). The journey from Athens was... long, to say the least -- 14 hours wait in Heathrow, sleeping on chairs with aircon on.
"Expect something... Cataclysmic!"
The leak was a pretty big spoiler. I'm not going into Blizzard politics and whatever was behind it, but either way that didn't stop anyone from having fun. Cataclysm going to be amazing. I played it a bit, got some data and all... it's really gonna be great.
"Now you can panic."
The concert was slightly disappointing. Comparing it to the WWI, the ambiance wasn't the same. Twenty-seven thousand people doing less noise than a group of 6000. You could really feel it in Sam's presentation, too.
The panels were all great. There is so much I want to say, but not until september.
I'm going to work on Sigrie again. Tabs are still not pushed, and there's a bunch of fixes that need doing before the expansion. Got a pretty good area of work going on. Sigrie 2.0 will be out hopefully this week.
PS: Blogger Editor is awful.
August 11, 2009
BlizzCon 2009
I've been getting prepared for BlizzCon. Most of everything is ready; I'll just have a 14 hour wait at Heathrow. Other than that, I'm pretty excited!
Sigrie 1.2.1 and 1.2.2 released. I've been working for a while on complete support for custom WDB structures. That, itself, wasn't hard. However, some refactoring is still necessary. Well okay, lots of cleaning up to do, but still!
Been getting some Webkit testcases done. I'll publish a dozen or so when I get some time (read: after BlizzCon).
I'll see you all there.
July 20, 2009
Don't trust QuerySets
I messed up pretty bad on this one. I should've seen it coming, too; which is why I'm sharing it today.
>>> next = self.__class__.objects.filter(id__gt=self.id).order_by("id")
>>> prev = self.__class__.objects.filter(id__lt=self.id).order_by("-id")
>>> return prev and prev[0], next and next[0]
Apart from duplicate logic, this looks harmless, right?
QuerySets evaluate on list(), repr() and str()/unicode(). What's expected here is a LIMIT 1 when the query gets sliced.
What actually happens: The entire table gets queried in two lines.
Needless to say, this crashed pretty bad.
Problem is, bool() evaluates the query. Is it a bug? I don't know, I think bool() should use COUNT. Django devs think 10 different things.
COUNT or not, this query wouldn't be efficient either way. Best have a slice ([:1]) on it. The query will still get evaluated on bool(), but it'll be harmless.
Bottom line: Don't trust QuerySets. They're amazing but very sneaky.
July 18, 2009
Sigrie 1.1
New release! Bigger one this time with the addition of latest additions and json serialization.
- Added a Latest Additions page! Works with almost everything stored in the database, including items, spells, achievements,
quests, item sets, creatures, titles, zones and instances. - Added ability to lookup a model by its name (case-insensitive). Example.
- JSON serialization for single models is available. Example.
- Added __matches and __imatches lookup filters, which matches words rather than full strings. Example.
- Added __in lookup filter, iterating through a comma-separated list of values. Example.
- The URL backend has been rewritten and is more responsive and reliable.
- Django master sync with 11268.
- Completed forward-compatibility with Postgres 8.4.
- Lots of bugfixes.
July 12, 2009
Sigrie 1.0.6
Sigrie 1.0.6 released, with a few new end-features:
- Spellstring conditionals are now supported. Examples here and here.
- Tags are live and usable! See for yourself: twin-valkyrs-25-alliance
- New "heroic" flag, filterable.
- Screenshot thumbnails have been moved and are now a lot bigger.
- Some graphical tweaks, mostly on IE.
July 5, 2009
Remote closed the connection
Devcub has closed down after an uptime of 462 days (out of 554 full uptime, totalling 1 reboot).
Irrelevant, I know. But it's been quite an experience!
Oh, and Debian is ahead for once. Postgres 8.4 has been released and is already in sid!