不能忍

由于这两天改动比较多,就主动 developer reject 了待审版本,重新上传了个新版。

不太符合 agile 的规范,什么 release early, release often。

算了,又不差这几天。

晚上吃面时候看旁边一人拿着《独唱团》,就问在哪儿买,被告知中关村图书大厦。失望,心想如果是报摊上至少会去弄一本。

这两天写 Objective-C 写得有点恶心,需要调理一下。感觉上,还是 FP refractor 起来舒服阿。OO 的模式调来调去 bug 就出来了,而且编程效率真的不太一样,server code 用 haskell 就写了2天,一次写成,之后改了一次,还是因为要添加功能,不是程序错误。

客户端这个就不一样了,改来改去,没完没了 :)

不过毕竟是 UI 嘛,没有服务写起来直接。其实 Objective-C 已经很不错了,至少编译器在 compile time type checking 上已经在能做的范围内做到几乎最好了,至少比 python ruby 给的提示多吧,虽然会 core dump ><

所以,还是语言的局限吧,如果希望能优化每一条指令,所要付出的代价也是相当大的。如果 ghc 的 toolchain 不是那么乱,runtime 不是那么臃肿的话,真想在 client 上也这么踏踏实实用,唉。

Objective-C and Haskell

I'm so happy, just submitted a new app yesterday.

The client side that runs on the iPhone is written completely in Objective-C. Binary size is 200k after compression, and the app is multithreading / multicore ready. I used grand central dispatch (GCD) whenever possible, so the UI thread is never blocked and the background tasks can work like crazy.

Server side is in Haskell, which gives me extremely rapid development cycle and robust design. I spent only 2 days on the server code, yeah, 2 days...

From my own usage, this solution is so fast that I don't even believe it.

Core technology used:

I like how all the pieces are tuned to work together seamlessly to provide a complete solution. Will talk more about this when the app is online.

BTW, I'm learning Boo! This is going to be fun!!!

Dive into Unity
  • 1-normal.jpg

I did some crazy research in the Unity game engine, particularly the sound engine of the iphone port.

My result so far is that there is about 0 - 80 milliseconds unpredictable delay for the sound engine, which makes it less suitable for real time audio applications.

However, I did find the engine extremely polished in every other aspect, the component approach (similar to mix-ins in Ruby) is so powerful. When I was using the engine, I kept thinking what if this is done in Haskell, and so far most of my answers are that there has to be a break through in Haskell tool chain in order to do what Unity can possibly do now.

Some background of Unity:

  • scriptable part of the engine runs on top of Mono's runtime
  • multiple languages (C#, Javascript, Boo)
  • static typing, with optional dynamic typing
  • type inference !!!!
  • component based OO approach
  • very very powerful runtime manipulation
  • very high performance
  • ahead of time compilation for iPhone, extra speed
  • unbelievably polished workflow
  • extremely friendly community

The Unity developers really know what they are doing!

Wish Haskell can compile to CLR ... :p

小音乐软件

虽然完全没创意 ><

当初上 CS 的时候就是冲着做游戏去的,不过后来课太杂居然把这个正经事给忘了。

虽然第一版奇破无比,不过毕竟是第一个娱乐啊,开心的说。

  • 1.png