Open Source and Forking

Recently, there are some discussions about shadowsocks and its forks. Unfortunately, most of them are meaningless arguments. So, here I'd like to share some of my thoughts.

First of all, I want to thank every developer that has forked our projects. I appreciate your effort on reading, reviewing and modifying our source code. It's a great honor to have so many forks on GitHub.

One major debate here is: Is it good to have so many forks for one open source project? My answer is yes.

We developed shadowsocks years ago as a very simple (or broken) secured socks5 proxy. It worked so well that we just needed to fix minor bugs in the following years. Now, shadowsocks has attracted more than thousands of developers to join the community. Dozens of popular forks are developed based on our projects. And almost every known platforms and devices are supported now.

As a result, it's obvious that we should welcome every fork of shadowsocks under a correct open source license. Actually, these forks help to improve the whole shadowsocks project.

Then, what about fragmentation? Nope, I don't think it's a real problem for shadowsocks.

If one fork can do its job well, it's great! If not, it's still a valuable try. Actually, it's important to let forks keep evolving. These "fragmentations" make any attack to the shadowsocks protocol is meaningless, as users can always move to any other design among all these forks.

In the end, I want to share my object for shadowsocks again: We keep maintaining shadowsocks to show you that it's possible to solve a big problem with minimal effort. I also believe that's the soul of shadowsocks project.

So, don't hesitate to fork our projects and design your own protocols. Happy Hacking!

Comment this article

High Performance Pedestrian Detection On TEGRA X1

I gave a talk last month on GTC'16, which presents an innovative approach to efficiently mapping a popular pedestrian detection algorithm (HOG) on NVIDIA Tegra X1.

The result shows that it's possible to achieve more than 200 FPS for pedestrian detection on an embedded system. And of course, you need a Tegra X1 board first.

High Performance Pedestrian Detection On TEGRA X1 from Max Lv

Comment this article

What Android is like in Iran

One of my Android apps is so popular in Iran that it had got 100 thousand active users from Iran last month. As I almost know nothing about Iran, it's quite interesting to me what Android is like there.

Until now, the information I got is only based on numbers reported by Google Analytics.



Good news, more than 60% users in Iran are using Android 4.1 or above.

Bad news, most users only have slow internet links like 2G/3G or ADSL.



Then what about mobile devices in Iran? Top popular phone are from Samsung and Huawei. It's not surprising, as Samsung and Huawei are dumping their cheap phones to the third world. The interesting thing is, according to the whole datasheet, there is no device from Nexus or Moto. The only explanation I have is that companies of US are forbidden to sell devices to Iran (Iran Sanctions).

Another finding is that most users from Iran are using really low-end phones, which are ususally shipped with very low-resolution display, like 480x800, 480x854 or 540x960. I cannot tell if they are using second-hand devices smuggled from other countries or low-end devices designed for the local market like what's happening in India and China. As Xiaomi has already been selling their 720p devices below $100 dollars, maybe they should expand their business to Iran?

Comment this article

Virtual Cores and Reconfigurable Pipelines

Before reconfigurable processors, we may have reconfigurable pipelines first.

Here is a new startup called Soft Machines. They are developing a processor with “virtual cores”, or just reconfigurable pipelines, to improve IPC by more than 2x.

According to their published document, a typical VISC (trade mark, something like RISC, CISC) architecuture looks like this:


With reconfigurable pipelines, VISC is able to run multiple threads on virtual cores with different numbers of pipelines:

VISC Example

If only considering IPC, their SPEC 2006 result looks impressive:


As a skeptical guy, it's so hard to convince me that they are able to achieve that good performance in real applications. But I really like the ideas: towards a real reconfigurable processor, reconfigurable pipelines would be a good way to start. Also, if combined with ideas of VLIW and DCO (Dynamic Code Optimization) like Tegra K1, we may achieve both wider pipelines and better power efficiency.

All images above are taken from this slides.

Comment this article

TIL: Avoid using too many MATCH() functions in Excel

Yet another interesting finding in Excel.

Today, I tried INDEX+MATCH to track and filter data from an external spreadsheet. However, after inserting hundreds of these functions, Excel freezed for ever. A quick research shows that it's a known issue of MATCH() which is extremely slow in Excel.

So, the best practice is not to use MATCH(). If you have to, try to store the results of MATCH() functions in hidden cells and reuse them as much as possible.

Comment this article

How to enable OpenCL on Nexus 5

Google added OpenCL drivers in Android 4.2, but then removed them from Android 4.3. As a result, with Android 4.4 we're unable to run OpenCL applications on Nexus 5, even if the GPU (Qualcomm's Adreno 330) supports OpenCL 1.2.

However, Qualcomm still leaves a backdoor to enable OpenCL in their latest Android driver (shipped with Kitkat KOT49H), which is located at /system/vendor/lib/ as an user-mode driver. It means we can still enable OpenCL functions by installing the missing libraries back to the device.

Here is the steps (ROOT only):

  1. Clone this repository to your local machine
  2. Attach your device, and install the missing libraries following these instructions
$ adb push jellybean/system/lib /sdcard/
$ adb shell
$ su
# mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
# cp /sdcard/ /system/lib/
# cp /sdcard/ /system/lib/
# chmod 644 /system/lib/
# chmod 644 /system/lib/

Comment this article