Since the M1 Macs were released, there have been numerous benchmarks comparing them with the Intel Macs. Most of the results heavily favor the M1 in both performance and power efficiency. When I received my new M1 MacBook Air, I was interested in testing one of the theories that explain why the M1 is so performant.
In computer engineering, a technique called dynamic execution (a.k.a. out-of-order execution) is used to parallelize different stages of instruction processing (fetch, decode, dispatch, execution, etc.), so that a single CPU core can process as many instructions at the same time as possible in the…
When Trump’s interview was trending on social media, I was doing some reading on neural networks, so I thought it would be fun to write a small app to identify woman, man, camera, TV. It could serve as a minimal example of an end-to-end deep learning application. The finished app is at https://trump-sim.netlify.app.
This article describes the steps in making this app: train a model with some pictures, create an API to classify pictures using the model, and a frontend for users to upload images and see results.
Jupyter notebook is a popular interactive environment for data analysis and machine…
Recently I was doing some experiments on deep learning. I created a simple site where users can upload images and it would identify a few types of objects in them. The site is here, in case you’re wondering.
The first version was really slow and times out sometimes when a user uploads a high-resolution image. Since image recognition doesn’t really need high resolution, a natural optimization is to resize the image in-browser and send a smaller version to the server. After a bit of searching, I found out that the process is quite involved. I needed to do the following:
The availability of various cloud services makes developing apps ever easier. Now it’s possible to develop sophisticated apps without writing any backend code. Instead of becoming a “full-stack” engineer, you can focus on the frontend — what the user sees and interacts with.
This article introduces how to build a diary web app without any backend code. A user can create an account and write diary entries only she can view. There is a demo deployed at Netlify in case you want to play with it first. The complete project is at GitHub.
The UI paradigm of macOS is quite different from the desktop environment for which Emacs was originally designed, so even though many, if not most, software developers use Macs as their primary OS, Emacs users still have to deal with some quirks. This article describes a setup that achieves the following:
With the recent news about Foxconn struggling to reopen factories after the Chinese New Year due to the nCoV-2019 virus, and the supply chains of companies like Apple being adversely affected, there is another surge of critical comments about tech companies using sweatshop labour in China. This is one of the most-heard views about the industry often stated with passion and righteousness but not based on facts and clear thinking.
Being a Chinese who had studied and worked in the U.S. for many years and then stayed in China for nearly a decade, I am aware that many manufacturers in…
People use many different criteria to classify programming languages. I want to talk about a few here. They are often considered different axes in the space where languages resides. However, it is important to realize that those axes are not orthogonal to each other. For example, a lazy language is probably also a functional language. And many languages do not occupy a particular dot in the space. I’d like to think of them as features of programming languages. Most modern languages have multiple (even opposing) features and are sometimes called multi-paradigm languages.
Most people think of imperative and functional when…
Rust is a relatively new system programming language. It competes with C and C++ in performance and efficiency, and at the same time it guarantees memory-safety and thread-safety through a rich type system and ownership model. Rust is also known for its active community and excellent toolchain.
The official way to install the Rust tool chain is through the Rustup tool. Use the following shell command to install Rustup and Rust:
curl https://sh.rustup.rs -sSf | sh
The package management tool in the toolchain is called Cargo. Running
cargo new demo will create a new project in the
This post has been merged to a longer one: The spectra of programming languages
Almost every practical programming language has a type system that specifies how to assign types to various constructs in the language and how constructs of those types interact with each other. Most programmers characterize type systems with two sets of properties. One has to do with when rules of the type system are enforced (aka type checking): dynamic or static; The other has to do with how much safety guarantee the type system provides: strong or week.
This is a confusing topic. I’ve run into articles…
LeanCloud CEO and Co-founder