Steinway Wu Ph.D. Student Home on the internet.

Vermont Roadtrip

周末去了趟Vermont,看看红叶,晒晒太阳,放松一下心情。Trapp Family Lodge据说是音乐之声的原型,Owl’s Head Overlook可以俯瞰整个Groton Lake。这些景点都值得推荐。附路线和照片。

Fix Duplicated Icons in Plank/Docky

I ran into duplicated Chrome icons with Plank on Ubuntu, and here's the solution I found: http://kb.openstudioproject.com/content/fix-double-google-chrome-icon-docky-and-plank

WikiWand

Just to spread the word. WikiWand is a fancier-looking and eaiser-to-use Wikipedia theme.

Sorts, Statics, and Dynamics in ATS

This is an interesting talk given by my adviser Prof. Xi. And I will try my best to put the ideas here in a proper way.

The Y Combinator

Currently, I am learning Lambda Calculus, and the Y combinator. And I am going to talk about why people need such kind of combinators, but how it is derived will not be covered since there are a lot of great articles explaining it. Great thanks to the explanation given by my senior, Zhiqiang (Alex) Ren!

CALL, LEA, MOV, and Link Edit

When writing your own real mode boot strap, you have to deal with addresses correctly. My friends Zhuoqun and I have cleared some problems encountered, and I will note them here. Note that this is my understanding, which seems correct. But if you think that something is wrong, please leave a comment. I appreciate your help.

Repeat a SQL Multiple Times with db2batch

Just enclose the SQL statements within --#BGBLK and --#EOBLK and feed it with a repeat-count as shown in input.sql.

Then run

db2batch -d DATABASE_NAME -f input.sql

One-liner to Find Out Available Ports in /etc/services

Just follow the Gist

Operator Precedence Climbing Parsing with User-defined Operators

ATS supports user defined symbols with custom fixity and precedence. The patopt compiler will do a dedicated pass to resolve fixity before all other passes.

Quick Tips: SublimeText Auto-line-wrap in Distraction Mode

To enable automatic line wrap (instead of fixed line wrap) in SublimeText distraction mode:

  1. Preference -> Settings - More -> Distraction Free - User
  2. Add the following line

    "wrap_width" : 0

The resulting config may look like this:

{
    "wrap_width" : 0
}

OpenGrok + Docker = Code Reading Expert

When sitting down in front of a new project, I alwasy find it hard to start because code reading is not easy at all. Sublimetext + ctags does help, but not perfect. OpenGrok is good but needs configure. So here's the solution: put OpenGrok in Docker, and use a one-liner to xref your code.

Code Reading Notes - MySQL Cluster

The partitioning code in MySQL Cluster is a totally different story from the MySQL Server partition plugin. The partitioning is handled natively by the Network DataBase storage engine.

Code Reading Notes - MySQL Server Partitioning II

Please read Part I first

Code Reading Notes - MySQL Server Partitioning

MySQL provides a general interface of storage engine handlers. A variety of implementations are built into MySQL, including MyISAM, InnoDB and Partitioning. Most of storage engines do not support partitioning natively [ref]. Therefore Mikael Ronström implemented a partitioning storage engine on top of existing engines since MySQL 5.1. Since there isn't too much info about the implementation, I would like to share some observations with you.

Socket.IO Client Forcing New Connection

As indicated here on Github, socket.io-client is mutiplexing Managers. If you want to force new connections every time you fire io.connect(), you should pass in {forceNew: true} as one of the options.

Update: BTW, I recommend using Primus.io, "the creator god of the transformers & an abstraction layer for real-time to prevent module lock-in." It manages real-time libraries (including socket.io) for you so you don't need to.

Using Boston University VPN on Ubuntu

  • Installing Cisco VPN protocal

    sudo apt-get install network-manager-vpnc
  • Setup VPN parameters in the network manager
    • Open Network Connections
    • Add new VPN connection and select Cisco VPN
    • Type in parameters
Field Value
User Name your username
User Password your password
Group Name BostonU
Group Password BostonU

Enigma Machine

Enigma Machine is a family of enciphering and deciphering machines invented and used in WWI and WWII, and later hacked by scientiests including Alan Turing.

A Docker Image for Quick-starting ATS

I've tried docker today, and it's pretty useful for sharing a development environment.

SublimeText Syntax Highlight for ATS

The first stable version of ATS syntax highlight for SublimeText has been released here. I have already submitted it to the official package control channel. Hopefully you can get it from your commond line soon.

For now, please download the ats.tmLanguage file into your local .../Sublime Text 3/Packages folder and that's it.

Update: Now you can download it from Package Control, just search "ATS".

Using the New RTD Theme

<readthedocs.org> has a new theme that looks much better than before. A description could be found here. All you need to do is to add

RTD_NEW_THEME = True

to your conf.py.

Check out a live demo here.

A Summary of SMT-LIB Logic 2.0

I was working on integrating two SMT solvers with Wenxin Feng, therefore it is necessary to understand the SMT-LIB 2.0 logic, which can be used as an input language for both solvers (AltErgo, CVC4). Part of the project is to classify formulas which can be solved by one solver, while not by the others. Therefore knowing how theories and logics are defined in SMT-LIB is also important.

Install ATS in Cygwin

It is easy to install and use ATS on Windows via Cygwin.

  • Download ATS source code from offcial website.
  • Unzip it into your home directory in Cygwin, e.g. ~/ats2
  • Setup environment variabls in Cygwin ~/.bashrc
    export PATSHOME=~/ats2
    export PATH=$PATSHOME/bin:$PATH
  • Under ~/ats2, configure and make:
    ./configure
    ./make all -f Makefile_dist

Note: If there are errors regarding config.h, try modify the content of src/CBOOT/config.h to #include "../../config.h".

And you are ready to go.