smart-operator.el v1.1
虽是批评,还是很中肯的。。。
http://tech.slashdot.org/comments.pl?sid=1160821&cid=27193253 If anyone here's interested in coding for an embedded operating system, I'd strongly recommend running the hell away from Symbian. It's awful. Let us gloss over the lousy documentation (in which it's impossible to find anything, and where there are no links between chapters --- so, e.g., you can't follow a superclass chain up through the S60 chapter into the Symbian core chapter). Let us also gloss over the lousy build system (a horrible maze of crappy perl scripts, which, apart from being so hideously slow that our project takes the best part of ten minutes to build even if no source files have changed, doesn't allow you to have two source files in the same project with the same name. Even if they're in different directories). Let us also pass quickly over the debugger, trying not to make eye contact, that's unreliable, will only let you debug one task at a time, and which tends to crash if you do the wrong thing. No, let's talk about the language. You program for Symbian in C++. Good, you might think. No. This is C++ with all the good bits taken out and replaced by badly designed bits. Let's take exceptions. There are no C++ exceptions. What there are instead are Leave codes; a macro-and-longjmp framework that replaces exceptions which allows you to throw an integer value and then catch it further up the call stack. Unfortunately because this is implemented without compiler assistance it doesn't unwind the stack frame, so destructors of locals aren't called! All is not lost, though: there's a complicated and easy-to-get-wrong manual cleanup stack on which you can push stuff that you want the system to free for you in such situations. God help you if you forget to push something, or pop something at the wrong point... Let's take strings. There's no standard string class, of course. What there are are an even dozen different classes for storing strings in different ways: on the heap, on the stack, constant strings owned by someone else, etc. There are some superclasses that will allow you to pass references to these things around without having to worry about the implementation. Except... it doesn't actually work. The various different string superclasses are incompatible. You can cast a TDes (mutable abstract string) to a TDesC (immutable abstract string). You can't cast a TPtr (mutable pointer to mutable string data) to a TPtrC (mutable pointer to immutable string data). Some of their system functions require you to pass in a reference to a concrete string type, so god help you if want to use a different implementation. You can't use certain implementations in certain contexts. The result is that for some operations you have to allocate a fixed-size buffer on the stack, call a system function to populate it, then copy the buffer into another buffer on the heap, because the buffer-on-heap object is immutable! Despite being resizeable and assignable! Things get even worse when you want to store multiple strings. There's a labyrinthine maze of string array classes: arrays of fixed sized strings, arrays of descriptors, arrays of pointers to strings, arrays of pointer strings (which are different)... add this to Symbian's bizarre convention where a data storage class allocates memory in its constructor but does not free it in its destructor (which means the user must manually Close() method on all member variables) and simply figuring out who's responsible for freeing a particular object becomes non-trivial. I once spent three days trying to find out how to store an array of strings without leaking them. I kid you not. (To be fair, they have been trying to fix this with OpenC++, a new programming environment based on, like, standards. It doesn't actually work. The interface to Symbian C++ code is patchy and poorly specced which means it's only really useful for running chunks of third-party code in a sandbox --- you still need to write your actual application in Symbian C++.) Now lets move on to the OS proper. Like the language, it shows all the hallmarks of being designed by someone who had a lot of good ideas but didn't know anything about practical implementation. Symbian combines all the worst features of a protected mode microkernel OS. It's dog slow because doing anything involves multiple context switches to other tasks, which are expensive because it's all protected mode. But that's all right, because since it's all in protected mode it should be secure, right? Apart from the unprotected shared kernel memory areas, that is, which allow any application to trivially crash the device. I could go on, but now I think I need to go and breathe deeply for a while. Just go and use Android instead. You won't regret it.Comments [1]
来转载一篇文章:
1、用积极和感恩的心态来面对你遇到的每一个人。
2、梳理你的生活。
3、制定一个每日目标,那些能够刺激你启发你的事情。
4、规划好你的时间,从而让自己在这一天内完成一些比较实际的事情。
5、还记得小时候那些单纯的快乐吗?像个孩子一样去看这个世界。
http://jiaren.org/2009/03/14/five-ways-to-attract-more-positivity/
Comments [0]
http://www.xiami.com/song/389086/lalalala 很清新的声音
拉拉拉拉
作词:娃娃
作曲:entre rios
演唱:魏如萱
魏如萱-拉拉拉拉
歌词从xiami.com下载 制作
请你耳朵借给我
让我在里面
游啊游啊游啊游啊
像条小鱼
请你眼睛也借给我
我会送给你
跳啊跳啊跳啊跳啊跳啊
跳啊的一只舞
手拉着手啦啦啦啦
没有什么比快乐更重要了
你拉着我我拉着你
心就会像星星一样闪不停
Comments [0]
清华校内近春园里有个四通八达的亭子,中间是标志性的螺旋梯。在校的时候没少去过,今天下午去闲逛,才发现它有个好听的名字,曰:零零阁。其中一个冲向游泳池方向的台阶旁还有一段介绍文字,记载着六五级学长们当时在某年校庆新建这所亭子的小史。他们还是在大学学制由六年改为五年后的首届毕业生。如此看来,兴许校内某处是不是还有在学制由五年改为四年后的首届毕业生所建立的纪念性建筑?(当然,建筑系仍是五年)假若我上学那会,也是六年制的话,就又可以在园子里多呆几年了。不过,在我毕业前几两年,我是如此地厌倦了大学生活,很想走出社会,看看外面的世界。"城里的人想出来,城外的人想进去。"大约是不是也可以这样讲:过去的我憧憬未来,现在的我怀念过去。想起周董的歌了:想回到过去,试着让故事继续,至少不再让你离我而去...
Comments [0]
FIXME: Windows XP 下咋搞?直接 (shell-command "cmd.exe") 总是在 emacs 的某个 minibuffer/buffer 中打开,而不是在一个单独的窗口中打开。
;; open current directory in a console/terminal
(define-key dired-mode-map (kbd "c")
'(lambda ()
(interactive)
(let ((d (dired-current-directory)))
(case window-system
((w32)
(message "FIXME"))
((ns)
(do-applescript (format "
tell application \"Terminal\"
activate
do script \"cd '%s'; bash\"
end tell" d)))))))
Comments [1]
Comments [0]