## Sunday, December 20, 2015

### Test in LaTeX

This is a sample post for testing the $\LaTeX$ support of this blog. Let's write down the Hodge decomposition:

If $\phi \in \Omega^*(M)$, then

$$\phi = \mathcal{H}\phi + \Delta G\phi.$$

## Wednesday, June 15, 2011

### Maximum Segment Sum

This is something I always forget. During the summer, I should be learning and practicing how to deduce this linear-time algorithm in a formal way.

The programming languages course has ended today. I've learned something, but didn't practice enough. Those tools for reasoning imperative programs look well in some trivial examples, but I wonder how they can be useful in some larger ones. What I want to know the most is whether these methods can help me figure out an efficient algorithm for certain program. Anyway, I feel more comfortable in programming languages class than algorithms class. The former class is of course a lot easier, but the stuff in it really helps me to understand something, not just memorizing some details in an hard-to-reason-with imperative algorithm.

Computer programming, to me, is not a tool for shipping some valuable things to customers. Developing software is not what I'd be doing well. Programming is rather a thinking aid to me. The better the language interact with your thoughts, the better picture you can get. Monads, for example, exist (in programming) not for some abstract beauty, but really for capturing and shaping some realistic things and processes. After taking so many engineering classes, no single one other than programming languages class really shed some light on the context of discovery. All we see are just results. They are great, significant and beautiful. So what? How can we discover or create something like them, not something that is lame and trivial?

Maybe it's too hard to answer. Too philosophical. Also, asking questions like these just made myself look like a lazy and careless student. Well, I surely won't stop questioning, but I'll make a promise. I promise that I will try harder, harder and harder.

## Saturday, May 28, 2011

### Some Emacs Stuff

DarkRoom模式感覺非常酷，也非常好用。

## Tuesday, April 26, 2011

### Strict function

Operationally, a strict function is one which always evaluates its argument, a non-strict function is one which may not evaluate some of its arguments. Functions having more than one parameter may be strict or non-strict in each parameter independently, as well as jointly strict in several parameters simultaneously.
http://en.wikipedia.org/wiki/Strict_function

"f x = f 42" seems to be strict!

## Friday, August 20, 2010

### Perl的__DATA__

#!/usr/bin/perluse 5.010;while (my $name = <data>) { chomp$name; say "Hello, $name!";}__DATA__PeterJackObama 問題來了，如果DATA的內容需要讀取不只一遍的時候，你沒辦法直接用seek回到DATA的最前端。這是因為DATA其實是整個script檔案的filehandle，當你第一次使用它的時候，其offset其實設在__DATA__這列之後。所以若需要讀取DATA兩遍以上，需要先以 my$pos = tell DATA;

seek DATA, \$pos, 0;