Tag Archives: 42nd str

Fold. Not the end.

Really lazy weekend. Barely touched a keyboard, maybe just to chat for some time.

Still. I have rewritten `fold` in PHP, which is complete cheating, but at least i know how it should work now. Next step – implement it in C. And this is not because I am learning C, but because of this:

$ time php fold.php 10 syntax.text
real 0m0.179s
user 0m0.151s
sys 0m0.017s

$ time fold -w 10 syntax.text
real 0m0.041s
user 0m0.010s
sys 0m0.010s


PHP is not fast at all. But i have spent 20 minutes hacking that piece of code together and it totally works. That’s why dynamic languages rule. I still want to learn C, so have to rewrite that again.

Also, here is the picture of a guy stealing electricity on 42nd-Bryant Park:
He is just charging his iPhone.