Category Archives: English Posts

1100th Changeset in Mace-fullcontext

I checked in the 1100th changest in mace-fullcontext this week. Most of the recent changesets were focusing on runtime optimization. The runtime can process nearly 250,000 events per second! This is 10 times faster than 6 month ago. Also, it can process nearly 100,000 network message events per second, which is twice than a month ago. (network message events involves network sockets and serialization, so the throughput is lower than non-network-message events)

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”


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根據醫院提供各種醫療成本資料,核算真正給付給醫院的補助。由於美國絕大部份醫院屬於不營利或政府所屬機構,理論上成本要等於收取費用,因為他們不該因此獲利。但公佈的結果顯示真正醫療成本與病患收到的帳單金額差距極大,部份原因是保險公司通常會跟醫院談好價格,所以真正醫院收到的錢遠比帳單上的低。


GCC 4.8.0

GCC 4.8.0 is released recently and I’ve been testing it against Mace.

Interestingly starting from gcc 4.8.0, g++ uses a new error reporting format similar to LLVM/Clang which shows exactly where the error comes from (see: Expressive Diagnostics in Clang), unlike in the previous versions where the compiler only indicates which line it is. In the case where the error is inside a macro, it also expands the macro and shows where exactly the error resides. (nice feature)

However, gcc 4.8.0 added a new warning: -Werror=unused-local-typedefs for typedefs that are locally defined but not used (which is annoying). This new warning breaks several well known systems, in particular V8 engine and Boost library. Because it emits warning when compiling boost header files and mace regards warnings as errors, gcc 4.8.0 does not compile mace. A temporary workaround is to disable the warning (cmake -D CMAKE_CXX_FLAGS=-Wno-unused-local-typedefs)

The latest boost repo eliminated some of the unused local typedefs, but not all. I made a patch to eliminate the rest of the unused local typedefs and submitted to boost. Hope this patch will appear in the next boost revision!

Summer Plans

End of the semester and end of my fifth year at Purdue!

Time to move forward and plan for the summer. I’ll plan for a road trip, and work on a research paper or two. Other than that, I am planning to learn something more: I want to get started learning OpenStack, node.js, V8 engine. I’ll also spend some time writing a business plan.

Oh, and prepare for my prelim 🙂

Hoping to get out of Purdue by the end of next year. Not that I don’t like Purdue. I love Purdue and I love West Lafayette, but it’s about time to grow up and make changes to this world!

1000th Changeset to Mace-Fullcontext

I pushed up the 1000th changeset to mace-fullcontext yesterday!

This is a huge milestone to this project. Since December 2011 we started this project, it’s been 16 months already.
This is a huge huge project that relies on so many people’s contribution.


In these 1000 changesets, we made 40401 lines of code of change in 351 files.

That contains 5700 lines of perl, 15700 lines of C++, 17900 lines of Mace code and some shell scripts.

Contribution was made by 7 members in 16 months.


ResearchGate is a social network website for researchers. It’s something similar to LinkedIn as to business people/professionals, but RG is geared towards researchers and scientists. ResearchGate lets you connect to other researchers, and let you upload the publication so that other people can download.

I personally find it useful. I host my workshop paper here in my blog for downloading, but I don’t seem to get any traffic. But since I uploaded it to RG, that paper has been downloaded several times. It could enhance my academic impact, I think.

Kernel Bug

Spent a whole night tracing a strange timer bug: Mace timer did not fire off at correct time on some machines. Specifically, on those machines, timer goes off one second earlier than requested. E.g., if you want it to fire off after 2 second, it actually fires off after 1 second. Strangely, it doesn’t happen to every machines.

Initially I thought it was a problem in Mace code, so I spent the night digging into the timer code. Finally, there’s one function to blame: pthread_cond_timedwait(). It does not behave correctly.

According this this StackOverflow post, this bug is triggered by a Linux kernel bug due to leap second. The problem will be gone after rebooting the machine, and indeed that problematic machine hasn’t been rebooted for more than a year. Well, this is so unexpected.