Saturday, March 29, 2014

Trying HHVM

So I was trying HHVM on a VPS when I encountered the error "list sub-command REMOVE_AT requires list to be present". Having no idea of what it is, I tried a Google search and ended up with a page of results (5 or something with half of them in Chinese) and no pointer at all...

The full stack is like this

CMake Error at CMake/EXTFunctions.cmake:8 (list):
  list sub-command REMOVE_AT requires list to be present.
Call Stack (most recent call first):
  hphp/runtime/ext/imagick/config.cmake:12 (HHVM_LINK_LIBRARIES)
  hphp/runtime/ext/CMakeLists.txt:24 (include)

So I went in...

vi CMake/EXTFunctions.cmake

Found some macro definitions and some function declarations. The two things that caused error are both macro so I change them to function and it works! See the edited file here.

At least CMAKE worked and now I'm running MAKE. I will update this post when I got HHVM running.

So HHVM has been compiled and ran smoothly on my box. I submitted a pull request on github, you guys should check it out.

Wednesday, March 26, 2014


I read two articles today:

One: We’re F****D, It’s Over: Coming Back from the Brink
Two: How I Fired Myself.

These paragraphs stood out:

I remember Hotmail’s CEO Sabeer calling us all in a room. “Hey, Rex (the COO), how long will it take to restore the email from the tape backups?” And I’ll never forget his answer: “Um, those got really expensive, so we stopped doing them about a month ago.” Gulp. Long … painful … silence.

I found myself on the phone to Rackspace, leaning on a desk for support, listening to their engineer patiently explain that backups for this MySQL instance had been cancelled over 2 months ago. Ah.

God, that's painful to read. It gave me chills... Note to self: Backup all the thing. Never cancel backup services. And test backups to make sure they work!

Tuesday, March 11, 2014

XenForo WordPress bridge (again)

A long long time ago, I started working on WordPress 3 Bridge for XenForo. I think it was one of the first work that I have done, the idea back then was pretty simple: find XenForo directory, load the session then find the connected WordPress user... It worked for awhile but because loading XenForo bootstrap code is slow and the two system architectures are different from each other (XenForo is MVC while WordPress is still procedure), there was a lot of bugs. It took hours to make it work nicely with other WordPress plugins. When XenForo moved to Resource Manager for add-ons, the plugin thread is locked at 37 pages. I haven't work on it since then. In the meantime, a few other solutions popped up but for some reason they died relatively quick...

Enter [bd] API, it exposes XenForo data in a systematic way and uses OAuth 2 to authenticate users. Quite powerful. I have developed a bridge solution to connect two XenForo installation and it worked well so this time I went to develop a new WordPress bridge. The result is WordPress Plugin: XenForo API Consumer with complete two way user, post and comment sync! So far, it works with other WordPress plugin without issues.

At first it only uses XenForo as the Master system but after hearing people suggestions, I expanded its scope and now it can use WordPress as Master for some tasks. I see the future is bright with this one...

The option page is freaking long though!