Tag Archives: perl

Mercurial choosing Rust over Python

According to this article in Mercurial wiki, its core is being re-written in Rust. Mercurial is one of the largest open-source Python projects in existence.

This does not however mean everything will be rewritten in Rust. (Yes, this post’s heading’s not entirely accurate.)

* hg is a Rust binary that embeds and uses a Python interpreter when appropriate (hg is a Python script today)

* Python code seemlessly calls out to functionality implemented in Rust

The obvious reason for the decision is startup performance concerns, but the article also (interestingly) states:

In addition to performance concerns, Python is also hindering us because it is a dynamic programming language. Mercurial is a large project by Python standards. Large projects are harder to maintain. Using a statically typed programming language that finds bugs at compile time will enable us to make wide-sweeping changes more fearlessly. This will improve Mercurial’s development velocity.

Git was also designed with a core written in C and a host of shell scripts that call the core for additional functionality. For example, rebase is actually a shell script.

However, usage of shell scripts has made porting Git to Windows a pain. See the Lessons Learned section in this AOSA article.

New ttytter extension: Add to Pocket

You can download my second ttytter extension now from the github page. This lets you add the links in tweets to your Pocket (formerly Read-It-Later) account.

To use, you first need to create a file named .pocket in the extension’s directory and add your Pocket username and password in two separate lines. In ttytter, just type /pocket <tweet id> and the link in the tweet will be added to Pocket. If no links were found in the tweet, the link to the tweet itself will be added.