Comments for static pages? - Part 2

Looking back… I need a bit of DIY GitHub API for Rust. Still step 2: Create a branch and PR automatically Thankfully, the V3 API is really simple. Using our tRusty language, we can define some structs to be serialized to JSON for requests: #[derive(Serialize)] struct CreateRef { r#ref: String, // The name to be used sha: String, // The commit SHA to point to } #[derive(Serialize)] struct CreateFile { message: String, content: String, branch: String, committer: UserRef, } #[derive(Serialize)] struct UserRef { name: String, email: String, } #[derive(Serialize)] struct CreatePR { title: String, head: String, // The branch to be merged base: String, // The target branch for the merge (ie. master) } The basic steps we want to do are described by these: ...

January 25, 2020

Comments for static pages? - Part 1

This is actually a static page hosted by GitHub, powered by Jekyll. But how to get a comment section? Give Me Comments Weeeelll…. You could use a service like Disqus. Or, you use the idea from damieng. Jekyll has a neat feature: you can place data files under _data and access in Liquid templates. And that’s more or less the starting point. Add comments as data and render them via Jekyll (utilizing Liquid). ...

January 21, 2020

Slow bots on Basil

If you haven’t yet, check out BASIL. It’s a 24/7 Starcraft league, but for bots! It usually runs fine nowadays. But sometimes an external hiccup occurs. One of those is the problem of detecting who to blame if a game times out. It works fine if the game ends with the in-game timeout of 60min, since the Tournament Module BASIL uses will make both bots leave and select the winner based on the score (That might be unfair, but that’s a topic for another post). ...