January 24, 2010

Score One for Science.

(Happy new year, ha ha.)

Sigrie 2.2.0 released. 3.0 is on the way, as soon as I finish integrating some of the user data. What's still to come?
- Modelviewer. Thanks to Vjeux, I have the necessary javascript to get working on my implementation. Plan is still to use WebGL, so far looks great.
- More userdata. Locations for example. Once a couple of bugs are ironed out, I'll push a bunch of them.
- More useless things. Flight paths for example.

Recently got a bunch of improvements done on the parser, too. Thanks to Andrei, logging and attributes are handled a lot better. I also reimplemented bitmasks after the changes. You can now do item[12345].required_classes.mage == true, stuff like that.
"But wait, there's more!".. preloading and maybe (haha) parsing in C++. What's still keeping me off is the linking hell it's going to be to have Python and C++ living together like I'd like it to. I should also use pySide for the gui, it's likely going to be without changes.

Oh I think my PSU is dead. Which really sucks. I'm still trying to figure it out though. New year means new hardware (no it doesn't!?), so I got myself a nice p55 and an i7 860. Will try them out tomorrow if I get the chance.

October 26, 2009

I'm taking this loop off.

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


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.

BlizzCon obviously slowed me down with updates on Sigrie, which is why I ended up not releasing 1.2 and skipping to 2.0.

The changelog is up, many changes are backend. A lot of necessary cleanup. Slowly paving the way to a better tooltip engine; tooltips should be the best they possibly can.

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.

>>> def get_prev_next_by_id(self):
>>> 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.
See you next release.