June

Haven’t updated my blog lately. I was mostly busy with a paper submission due a few days ago. Now that paper is submitted, I am ready to prepare for another one.

Time flies, and my happy summer time is less than 1.5 months remaining. I am hoping to finish one paper (expecting to get this done by end of July), and start to work on another, and help my labmates with others.

GCC 4.8.1, C++11 and C++1y

The latest minor update of gcc, the gcc 4.8.1 was released a few days before. This release makes gcc the first compiler to implement all major features of C++11 specification.

See the C++11 support in gcc page for more information.

Incidentally, Clang/LLVM is also busy working towards a full implementation of C++11 in the next revision 3.3, which is due to release in this summer. See the C++11 support in Clang page.

It’s also worth mentioning the C++ standard committee is gearing towards the next C++ standard: the C++14 (or C++1y) and C++17. Both GCC and Clang/LLVM have limited experimental support of C++1y.

Concluding the Upper Half of 2013

Throughout the upper half of 2013, I was mainly working on two things: performance optimization and API.

Performance has been improved by nearly 20 fold since last September. We were able to diagnose the performance bugs in the original Mace code, and also found a better architecture of the fullcontext runtime. Maybe I would write a paper about the optimization some time.

I am recently working on a better fullcontext C++ API. The goal is, without impacting the performance, make the fullcontext API much easier so that writing a fullcontext application in C++ is straightforward and does not require much effort. In particular, previously most of the features were generated from the perl compiler, which translates the Mace syntax into corresponding (simple) C++ constructs. Because C++ is such a feature-rich language, it makes sense to implement most of features in C++ constructs. After several iteration of reimplementation, it is now possible to directly exploit C++ language features: overloading, overriding, inheritance, templates, template metaprogramming to provide an API straightforward to C++ programmers.

My next goal would be porting fullcontext API to Javascript, specifically, the V8 Javascript engine. It would be really awesome if V8 engine can run fullcontext applications!

Follow-up On “Bitter Pill”

brill.pill9.indd

After TIME’s Mar. 4 special issue “Bitter Pill”, the US government published a list of actual medical cost of the most common treatments, compiled from the data submitted from the hospitals for medicaid/medicare reimbursement. Since hospitals in the US are mostly either nonprofit/government-owned, in theory the cost should be equal to the bill. However, the data shows great disparity between the price tag that hospitals bill patients, partly because insurance companies typically negotiate deep discount with hospitals.

The great news is that the report has triggered public awareness, and the medical cost should become more transparent (hopefully).

See also: An End to Medical-Billing Secrecy? and the Wikipedia article

這則新聞應該對很多醫學界朋友來說很有意思。美國醫療費用一直是很大的問題,尤其是醫療費用不透明。時代雜誌3月出版一則針對醫療費用真實成本的報導之後,最近美國政府發布Medicare/Medicaid給付醫院100項最常見的醫療成本 (美國medicare/medicaid是政府社會福利,medicare是給老人,medicaid是給低收入戶者如我)。Medicare/Medicaid根據醫院提供各種醫療成本資料,核算真正給付給醫院的補助。由於美國絕大部份醫院屬於不營利或政府所屬機構,理論上成本要等於收取費用,因為他們不該因此獲利。但公佈的結果顯示真正醫療成本與病患收到的帳單金額差距極大,部份原因是保險公司通常會跟醫院談好價格,所以真正醫院收到的錢遠比帳單上的低。

TIME今年會再針對這個議題做更多追蹤報導。

Backward

Backward is a useful tool for C++ developers for diagnosing bugs.

In a nut shell, when a program terminates abnormally, Backward prints out the line in the source code that causes the trouble. It does this by catching signals and relies on either elfutils or GNU/binutils libraries to print out the debugging symbols in the executable.

To use it is as simple as 1, 2 3:

  1. include backward.hpp in the source file
  2. compile the source code with debugging symbols. i.e. compile with -g flag.
  3. link with elfutils or GNU/binutils library