Skip to content

Blog

LLVM and GC

In this blog, I will introduce how I integrate a precise, relocation GC with LLVM using its statepoint api. We will also talk about some optimization techniques, debug support and so on.

Setting Up Debugger for Haskell in Vscode

It's not easy as the other languages which owns an IDE so click the button is the only thing need to do. Using Vscode, I installed several plugins and dependencies, then clicked debug button, oops, nothing happened! The debugger bar flashes and disappear, then nothing happened except the confusing people at the front of screen.

To be frank, I gave up several times when I was attacked by such a messy event. However, another afflict when I want to diagnose my program. After plowing in the troublesome problems, I finally set up it successfully. However, it becomes more messy when I changed my Desktop from Intel to M1, which means I need to set it up AGAIN.

This blog records some hints for setting up Haskell Debugger. I hope I will never set it up with so many trouble again.

Go Function Return Values: List, Not Tuple

Recently, I suddenly found that the following code line is weird, how could it pass (int, error) to ...any?

func main
func variadic(a ...any) {
    fmt.Println(a)
    return
}

func array(a []any) {
    fmt.Println(a...)
    return
}

func main() {
    variadic(json.Marshal(""))
    // array(json.Marshal(""))
    // ^ CANNOT PASS COMPILE
}

Symbol Table and Context Value Implementation

After learning briefly about compiler, with the motivation of walker inside astjson, it's a bit compulsory to master some knowledge about symbol table as it helps to understand management of variables/states in a large different scales.

This blog talks first about the symbol table itself, and then check how Go language maintains the values among contexts in src/context. Note that it doesn't talk anything else rather than values in context.