跳转至

programming

Unix nice

I just saw this interesting tweet:

Unix系统的每个进程,都有一个nice值。这个值越大,优先级越低。然后,还有一个nice命令,每运行一次,指定进程的nice值+10。它的意思就是做人要nice,把更多的CPU时间留给别人。nice值越高,你留给自己的份额就越少。

From hereby @ruanyf.

And i didn't known that until now. Cool! The name 'nice' is nice, too.

Don't worry if you can't read Chinese. See also here and here.

Building emacs git version with xwidgets and modules in archlinux

First you need to install these packages:

sudo pacman -S git autoconf automake gtk3 webkitgtk
git clone --depth 1 https://github.com/emacs-mirror/emacs.git (or git protocol if you like)
cd emacs
./autogen.sh all
./configure --with-xwidgets --with-x --with-x-toolkit=gtk3 --with-modules
make
cd lisp
make autoloads
make
make
make

Until you got everything ok.

Then you can just:

cd src
./emacs

And then, M-x webkit-browse-url RET: xwidget-webkit

Also, test the modules feature using syohex/emacs-qrencode: qrencode

I'm using ssh and X11 Forward to show Emacs in Mac OS X! Cool!

News

Oh StartSSL places its PKI in 360's server. You know, i hate 360. SO please beware if the website is using StartSSL. Here is the link.

And here comes the vim-tips:

You probably know that 'u' is undo. Do you know that Ctrl-R is redo?
It comes from here.

Good software engineering rules

I saw a great saying:

No code runs faster than no code.

No code has fewer bugs than no code.

No code uses less memory than no code.

No code is easier to understand than no code.

It comes from here.

And i strongly recommends this article for a better understanding of monads.