This post is introducing yet another way to run OCaml codes in the browser. It’s about compiling OCaml codes into bytecode and run it with the virtual machine in WASM.

Why

Currently, js_of_ocaml is the most popular method to run OCaml in the browser. Js_of_caml have a great ecosystem. But it has its limitations.

Because it emulates OCaml with JavaScript, some implementations are inconsistent with the original ones. In most scenarios, it’s OK. But sometimes, you want consistency. You don’t want the result running in the browser is different from native.

Another disadvantage of js_of_ocaml is that it’s hard for…


Today I am going to introduce a new database named PoloDB. It’s a lightweight database which can be loaded in everywhere. It has similar APIs with MongoDB, which means it’s easy to lean and use.

Github: https://github.com/vincentdchan/PoloDB

Lightweight. PoloDB doesn’t have separate processes such as MySQL. It’s just a library can be embedded in your application, just like SQLite. It cost less memory to initialize and run. So it’s suitable for personal devices. The performance of your clients’ devices isn’t usually as good as your powerful servers. It isn’t easy to embed a massive database in your applications. …


Here’s my project in GSoC 2018: Improve tree-shaking for webpack, a widely used JS code bundler.

Introduction

Tree-shaking, a supporting feature for DCE(dead code elimination) to help DCE on cross-module usage, is a crucial feature for a bundler. It's especially true for JS. Reducing the bundle size means reducing the network cost each time a bundle is delivered for web application.

Project on Github

中文版

Without this plugin

Before the implementation of this plugin, webpack uses a very simple solution for DCE. For example:

In the above example, webpack finds the references of the imported variables. Obviously, isNumber is completely not referenced in the…


There must be a photo here, it’s canton tower.

This is the first part of my stories with GSoC 2018. I will share my personal experiences and all the things happened with GSoC 2018 in the series.

About Me

I am from China, Guangzhou. I major in Computer Science and I am serving my 3rd year at South China Agricultural University. This year before Google Summer of Code (GSoC), I served my internship in a Chinese Company named Bytedance. My job is front-end development. I am really interested in the technologies behind front-end development. During the internship, I was required to use Redux + React for developing new features. …

Vincent Chan

C++/Rust/TypeScript, Engineer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store