What have you found for these years?

2010-09-23

2010-09-23

忽然一瞬間覺得,其實自己也早已失去青春的感覺了..?
我不知道緬懷失去的過去到底是會讓自己好點還是不好點

我只知道現在很想趕快把踩地雷 ai 寫好

postgres9 bytea hex format

8.4. Binary Data Types

It seems that postgres 9 always returns hex format for bytea data.
We might want to do this to decode hex back to binary string:
[s[1..-1]].pack('H*')

2010-09-22

Come hunt my head! (estiah)

算了,還是講中文好了.. XD 想想除了程式以外,英文能看很順的人不多 =_=
現在等級是 43, 而在 estiah 中,超過兩級其實就很難打了。
也就是說,對我而言 45 級的玩家就很難贏了。當然,這是考慮在
相同的 PvP rating 的範圍內。要是對方 rating 高很多的話,
就算是低一級也很難打贏。最主要的差別在,有些等級有些很
關鍵的 charm (card), 有些差那一張就有決定性的差異。

還有個 Cruelty skill, 條件是打贏小於自己四級以上的玩家。
也就是說對我而言,要打贏 39 級以下的玩家。這個技能很好練,
不過沒什麼意義,因為打贏等級太低的玩家沒有好處。
要打贏等級接近的玩家才能練 Bounty Hunter, 得到 Soul stones,
增加 PvP rating, 這幾項。而打贏低等級玩家,只能得 Cruelty.

不過早上爬起來登入上去看,居然看到...

You were attacked by Gtxinsane (L.50) and you won.
You now have a bounty of 101720g on your head.

沒玩過的人大概沒有概念,不過這真的是很誇張的數字 XD
首先居然打贏高我 7 級的玩家,再來他的 rating 是 4612,
我只有 3178... 差 500 就叫做差很多,就是我打輸 3600 rating 的
玩家都不會掉 rating, 因為差太多了。更何況是差 1500 的?
基本上他應該是接近頂點的玩家之一了 lol

其次是這 bounty 也未免太多了。平常的 bounty 大概是 1,800 左右,
而這 101,720 都快一百倍高了 @@ 而超過 40 級後,基本上很缺錢,
大概累積到 10,000 我就覺得好有錢了...
打贏一次有 bounty 的人,可以拿五分之一,因此打贏我一次就可以
拿 20,000 這個數字超誘人啊 XDDD 可惜不能打自己,
而且必須是 42~43 級左右的玩家才能領,太低或太高都領不到 :(

立刻在 guild 的 shoutbox 喊說:(時間不是 UTC+8)
Godfat 09-22 04:09: Wow, come hunt my head! I am at Night Tear.
You were attacked by Gtxinsane (L.50) and you won.
You now have a bounty of 101720g on your head.

也立刻收到一場敗績... XD
From Pirthalos at 2010-09-22 04:19:54
Sorry, man. I saw your guild message and couldn't pass up on the gold.
I'll hit you and lose when I see you next.

Pirthalos 的 rating 是 L43 3783, 我打輸了也沒扣 rating, 基本上沒損失,
只是帳面上的勝率下降而已。很普通的 spirit 套牌就能打贏我了 XD
我也不知道他是怎麼回事,67 spirit vs 56 spirit, 先天上就贏我一截,
Pirthalos 只有 59 (也高我 3) 就已經樂勝了說 XDD

重複看了一下 replay, 也確實他運氣很差,我一開始就抽到
Crown of Prestige, 後面也抽到幾次;而他 Dark Heirloom 剛抽到,
下回合就被我 True Sight purge 掉。最後結果則是我險勝:

Gtxinsane collapses of exhaustion.

Godfat : 886/886 HP, 0 Armor, 186 Ward, 0 Willpower, 1/56 Charm(s) left

而且最後一擊是 Mind Blast, 正好是 spirit 傷害最高的!
抽到別張都不能贏 XD

可惜打贏我也只加了 Self Defense 而已...

當時的套牌:
True Sight x5
Power Leak x5
Feet Bind x5
Earth Dragon Crown x5
Voodoo Head x5
Soul Cry x5
Power Corruption x5
Soul Healing x5
Mind Blast x5
Challenger's Pressure x5
Crown of Prestige x5
Curse of Impotence x1

雙方資料:
Gtxinsane the Bard (哇,這 title 來自 21st contest 的 @@)
Wolf Pack Samurai (Veteran)
Class: Berserker (其實這是我最打不贏的之一...)
Last Seen: Night Tear
PvP Rating: 4612
HP: 1140
Spirit: 67
This week: (86.2% win) 94 Wins 15 Losses
Life Time: (69.0% win) 1469 Wins 660 Losses
Collection Collected Charms: 2580
Learned Skills: 255
Items: 177

Godfat of the Blooming Earth
Dragonheart Knights (Veteran)
Class: Slayer
Last Seen: Night Tear
PvP Rating: 3178
HP: 886
Spirit: 56
WANTED! This player has a bounty of 101720 gold!
This week: (62.5% win) 5 Wins 3 Losses
Life Time: (66.6% win) 825 Wins 414 Losses
Collected Charms: 2418
Learned Skills: 213
Items: 200

again, here's the replay.

Godfat 09-22 04:30: I am using spirit with debuff defense deck,
remember to bring cleanse unless you're dealing magic damage.
4 quota remaining :p

2010-09-21

fake_submodule.rb

fake_submodule is a command line tool to emulate the behaviour
of git submodule, which embeds a repository inside a repository.
Why we have done this instead of using git submodule is that it
is not supported at Heroku, but we do need a way to share a
repository among all projects we have.

Before this, we are doing this manually, with plain diff tool
and look and feel... the pain.

Yes this is really a pain, so I've written this command line tool to
help us merging and synchronizing all changes. It works fine for
simple cases, but in reality, if we're doing very agile development
and changing all the time, this is still a pain, there are tons of conflicts
out there, because git format-patch and git am is not so good as the
usual 3-way merge.

The trick behind this is creating branches for each containing project,
and only git am on the matched project, then finally do a normal
3-way merge. In additional, needs tags to specify the ref (commit)
as git submodule.

In theory, this should work correctly. We'll only need to resolve the
conflicts in master branch, in which case happens only on merge,
instead of git am. That would be a lot easier to resolve conflicts.

The bad news is that the process it's super duper crazy complicated.
It's soooo easy to make it wrong. I don't know why, don't ask me.
It's very hard to recover the state from previous failure. It's very easy
to get into a wrong state, and that causes many issues.

I am really tired of this.

But still, if we're deploying to Heroku.
The story continues.

Or we need to change the process we develop.
For example, only make changes in one repository,
but this is not very agile. And still needs some scripts.
There's a thread in ruby-core somehow related to this.
Patch rubygems (and others) in ruby-core or its own repository?
This might be harder, since people are coming from different
groups, and they prefer different source code management tool.
I remember that someone likes perforce...

upgrade postgres from 8 to 9

> pg_ctl -D /usr/local/var/postgres start
> pg_dumpall > backup.sql
> pg_ctl -D /usr/local/var/postgres stop
> mv /usr/local/var/postgres /usr/local/var/postgres.bak

> brew install postgresql
> initdb /usr/local/var/postgres
> pg_ctl -D /usr/local/var/postgres start
> psql -f backup.sql postgres
> rm -r /usr/local/var/postgres.bak

2010-09-19

迷惘與不安 (3)

我在意的點別人不在意;別人在意的點我不在意
這或許才是最累的地方 4:47:14 PM
或許我真的過太久隱士的生活.. 4:48:06 PM



All texts are licensed under CC Attribution 3.0