函数式编程的两种路线

Posted on: Sun, 08/26/2018 - 07:30 By: Huahai

可能很多人没有意识到,函数式编程(FP)有两种非常不同的路线。

一条路线,为类型疯狂。这条路线的语言以Haskell为代表。这种FP,一切以类型为
中心,编程的主要任务,是要把类型搞对了,让编译器高兴,号称是“如果程序编译通
过了,程序就是对的”。这条线来自学术界,有很长的历史,是FP的主流路线,有很多
其他FP语言以此为模版。科班出身的同学们说到FP,说的就是这条路线的FP。可能他们
上学的时候学过Haskell,甚至可能还给Haskell课当过助教,但是他们恨死了Haskell
。所以这些同学们,是打死不信FP能实用的。

Data-Oriented Programming (DOP)

Posted on: Sat, 12/03/2016 - 23:33 By: Huahai

JSON is arguably the world's most popular human readable data format today.  It has largely replaced XML as the data exchange format on the Internet. One of the key reasons for the proliferation of JSON is its simplicity.  The data structure are very limited: only arrays, enclosed with []; and objects, enclosed with {}. That's it. It cannot be simpler.

Apparently, this dead simple data format is enough to represent the vast landscape of data that JSON becomes the de-facto data format for Web services. Most Web APIs we use today speaks JSON. However, JSON is not native for most programming languages. It becomes a pain to convert to and back from JSON in programming languages.

Free Airport Wi-Fi? ---- Don't Count on It in Europe (Update on 08/25/2013)

Posted on: Fri, 10/26/2012 - 19:28 By: yunyao

I was traveling in Europe last week. While I enjoyed the history, culture and food very much, I was not a big fan of the airports. Like many people, I would like to stay connected most of the time, at least be able to access my emails and the Web from time to time (say every 2-3 hours). Unfortunately, passing through the following three airports in Europe is almost like returning back to stone age, in  terms of connectivities.

Fixing Problems after Upgrading from Snow Leopard to Mountain Lion

Posted on: Mon, 09/24/2012 - 01:28 By: Huahai

The IT department of my company has been urging us Mac users to upgrade OSX to Lion a long time ago. After getting a few papers submitted last week, I finally got around to upgrade the Snow Leopard for my Macbook Pro work machine. Since I couldn't find Lion on Apple Store any more, I decided to go straight to Mountain Lion. The download and installation went smoothly, and most things seemed to work after the upgrade. Here are a few things that broke and the fixes I found.

SSH with public key

Mountain Lion changed a few things that broke password-free SSH access to and from OSX using public/private key pairs.

SSH from Mountain Lion to older SSH severs:

Machine Learning That Matters

Posted on: Thu, 07/26/2012 - 22:20 By: yunyao

I happen to come across this excellent article from this year's ICML on Machine Learning that Matters. I encourage everyone, especially computer science Ph.D students, to read it.

As an industrial researcher who draws a lot of job satisfaction by making both scientific and practical impact, I completely agree with the author on that we need to work on research "that matters",  not just for machine learning. Many of the challenges outlined by the author are applicable to many other areas in computer science as well. 

Cat Photography with iPhone 4s

Posted on: Sat, 05/19/2012 - 02:19 By: yunyao

It has been a while since Yunyao got her iPhone 4s, which is known for its "superb" camera --- "8MP camera with all-new optics also shoots 1080p HD video". 8MP on a cell phone sounds really impressive, does it? Maybe she finally can leave her big heavy Pentax for a while?

So she tested its performance with her favoriate model: Mayori.

First, let's test it under natural light setting:

"What's up?"

Mayori

"I am sad ..."

"I am really really sad"

Review for "Virtual Cat Toys HD Catnip Collection"

Posted on: Sun, 11/06/2011 - 19:46 By: yunyao

As many of friends, I recently acquired a HP Touchpad largely due to its low price. I don't really need a tablet, as I am sitting in front of computes almost all the time. My original plan was to turn it into an interactive cat toy, at least sometimes, so I can keep the two cats entertained while I am working.

Unfortunately, I could only find one game designed for the cats "The Catnip Collection". According to its website, it "is a variety of toys that will amuse and challenge your cat and its human".

The reviews seem pretty decent (4 out 5).

https://developer.palm.com/appredirect/?packageid=com.wtflolomgbbq.haxe…

NetFlix Is Splitting Into Two!?

Posted on: Tue, 09/20/2011 - 00:20 By: yunyao

It has turned out that Netflix has abandoned the plan, finally.


-------------------------------------------------------------------------------------------


When Huahai told me the news late last night that NetFlix is splitting into two, my first reaction was that he must be reading from Onion! After all, based all what have learned from the business school classes and information economics classes, it makes perfect sense to provide bundled services, especially when it comes to information product.


However, the news is definitely true, as further confirmed by the following letter that I received this morning.


netflix letter

中国的技术引爆文艺复兴?

Posted on: Wed, 02/02/2011 - 06:33 By: Huahai

《1434》是一个英国退役的潜艇舰长Gavin Menzies写的书,是他的《1421》的后续。《1421》主要是说是中国
人,具体的说,就是郑和舰队的一支,发现了美洲。自然,有很多人质疑。其中一个观点就是如果中国人发现了美洲,咋没到更近的欧洲?《1434》就主要讲郑和的舰队的一支,在最后一次出航的时候的确到了意大利,并且带去了技术引爆了文艺复兴。 这本书也花很大篇幅介绍了中国舰队使用的星相航行技术的细节,弥补了上一本书的一些缺陷。

Subscribe to Technology