Melvin's digital garden

FB posts 2015

Dec 29: Great talk on using tools to increase iteration speed of a small team.

The part that made me smile was the use of a bot to record the solution of puzzle and replaying it to recheck every puzzle in less than an hour. This enables the team to edit the level design and physics while ensuring that the game can still be completed.

In Magarena, we use AI vs AI in a similar fashion, to check that various card interactions do not result in an exception.

Dec 19: Richard Karp, Leslie Valiant, and Tan Geok Leng on “Prospects for Intelligent Machines and Augmented Intelligence”, Friday 22nd January 2016, 6:00-7:45pm at SMU.

Dec 12: Team Singapore advances to World Magic Cup Day 2! Placing 12 out of the top 32 teams.

Nov 17: Recording of László Babai’s talk “Graph Isomorphism in Quasipolynomial Time I: The `Local Certificates’ algorithm” is now up on his website.

Nov 17: Talks from Clojure/conj 2015 are coming online!

Nov 03: Signal solves the TextSecure registration problem I was having. Now available for iOS and Android!

Oct 25: Guy Steele interviews John McCarthy at OOPSLA 2008

Oct 16:

Oct 15: schema is an awesome library for working with structured data in Clojure. Using it to parse query params and validate JSON response from an API I’m working on.

Bonus: perhaps someone on the team has a cat named melvin? At the bottom of

(s/validate Cat {:type :cat :name “melvin” :claws? true}) (s/validate Animal {:type :cat :name “melvin” :claws? true})

Oct 11: My talk on Magarena’s AI at GeekCamp.SG is now online. The organizers did a great job recording and publishing the talks. Normally I’d avoid watching recordings, but in this case I thought I’d better look through it before posting. Just noticed I tend to overuse the word “so”.

Oct 08: BBC documentary on how algorithms shape our daily lives. The visual presentation of Euclid’s algorithm is a nice touch. Tag: @[678566238:2048:Hon Wai Leong]

Oct 03: Contribute to open source projects on Github in the month of October and get a free limited edition T-shirt from DigitalOcean.

Oct 03: “Racket’s Universe library is the foundation of the long-running Bootstrap and ProgramByDesign K-12 outreach projects. The library’s exports make algebra come alive. With big-bang, a middle-school student’s “hello world” program simulates a rocket lift-off. More generally, middle school students can formulate interactive, graphical programs—animations, video games, or simple editors—with algebra. Even evaluating these programs uses nothing but algebraic calculations.” Tag: @[678566238:2048:Hon Wai Leong] @[771589622:2048:Jason Yeo]

Sep 27: Proofs as puzzles, solved by adding and connecting blocks. @[745512587:2048:Aaron Tan] @[818609669:2048:Terence Sim] perhaps a more fun way to introduce the concept of proofs?

Sep 25: “Sessions will show how to leverage the power of functional programming languages such as Scala, Haskell, Clojure, Erlang, F#…” – LambdaCon 2015

Sep 18: Many thanks to everyone who helped my talk on Game AI make it to the conference. See you at GeekCamp.SG!

Sep 13: On using the right language (mouse trap) to express solutions/programs (mice). At 45:20, Ian demos a Smalltalk DSL embedded in a Lisp that runs the Fast Fourier Transform algorithm and visualizes the result with ASCII art.

Unfortunately it only works with the Lisp interpreter written in C and not the one written in itself. Made further progress in extending the self-interpreter to run the demo @

Sep 07: Recordings of talks given at ICFP 2015

Sep 06: TIL what is double-entry bookkeeping by implementing a POSB csv to ledger journal converter. It is a simple way to ensure the law of conservation of money.

Best part of the docs: shows how to track your virtual online items and transactions

Sep 03: Register your attendance for Geekcamp.SG 2015 on 26th September.

Aug 30: August release of Magarena is out! Work on the new mechanics (devoid, ingest, awaken) was done during the Coffee Shop Game Dev @ Holland Village

Geekcamp.SG is held on September 26. I hope to present a talk there on the AI of Magarena. Help to get it selected by voting at

Aug 30: Live preview of the upcoming “Battle for Zendikar” set at Pax Prime in 5 minutes.

Aug 14: Geekcamp.SG is back! 26th September 2015 @ NUS School of Computing.

I’ve proposed a talk to share some of the lessons learnt in chipping away at the tough problem of building a smart AI in Magarena, an open source implementation of Magic: the Gathering.

Vote for it @ Thanks in advance for the support!

Aug 11: “Quantum Computing and the Limits of the Efficiently Computable” by Scott Aaronson @ Science Centre Singapore, Aug 19, 7-8:30pm

Aug 05: Debianception: debian sid host with container running debian jessie that chroots into debian wheezy

Jul 24: Terraria comes to Mac & Linux on Steam Open Beta!

Jun 28: Best part of GP Singapore: Getting three basic land cards signed by the approachable Rob Alexander. It was impossible to tell that he had already signed a huge amount of cards prior to this, as he handles each request with finesse.

Jun 28: Free, public event. “Alan Turing, Computing, Bletchley, and Mathematics” by Rod Downey. July 1st, 6:30-7:30pm @ National Library Building. Thanks to @[689540214:2048:Davin Choo] for the heads up.

Jun 25: “… the plan is that Mac/Linux will launch shortly after 1.3 - aiming for a launch within the month of July. This is being done to ensure the most stable Mac/Linux builds possible so that everyone has the best experience that we can provide.”

Sign of a great developer: they continue to support and update their games long after the initial release.

Jun 13:

Jun 12: If a Recurrent Neural Network became a Magic: the Gathering card designer…

Original thread: (this one made me literally laugh out loud)

Jun 06: Creating the computer and writing the software to bring man to the moon. Part 3 of the mini series “Moon Machines”.

The programs are stored in core rope memory. “One program could take several months to weave.”

Jun 01: Release 1.62 of Magarena is out with more than 200 cards added. The first release under my care was release 1.14 (May 2011), in the last four years we have consistently put up one release every month. The number of supported cards have grown significantly since then, from 901 cards in 1.14 to the current 9,497. We manage to avoid a corresponding increase in the code base by aggressively refactoring card code and supporting common templates in our card script system.

May 24: TIL that Turing never uses the word “halting” in his 1936 paper. He preferred his machines to run forever printing the binary digits of a computable real. The halting problem was coined by Martin Davis. Turing uses the phrase “circular” (prints only a finite number of digits) and “circle-free” (prints an infinite number of digits).

May 20: I’ll be presenting a talk/demo on functional programming at next Friday’s Hackers & Painters lunch time sharing session.

Trivia: why do we use the λ symbol to denote functions?

May 18: First professional (done as part of company work) open source contribution merged :)

May 16: One of the few regrets I have of Uni is not taking a course in computability/complexity theory. While doing a search for books on this topic, I came across this gem by Neil D. Jones.

“Unfortunately, the field is well-known for impenetrable fundamental definitions, proofs of theorems, and even statements of theorems and definitions of problems. In my opinion this owes to some extent to the history of the field, and that a shift away from the Turing machine- and Godel number-oriented classical approaches toward a greater use of concepts familiar from programming languages will render classical computability and complexity results more accessible to the average computer scientist, and can make its very strong theorems more visible and applicable to practical problems.” – preface of Computability and Complexity from a Programming Perspective.

The book is available as a pdf download from the author’s website.

May 14: TIL that the “recursion” in recursion theory actually means computability.

May 01: Magarena 1.61 is out. We’ve started to work on in-game card rendering, good chance it will be ready for the next release.

Apr 30: TIL finding sets of integers with small max where every subset is distinct is an open problem first articulated by Erdős.

Apr 29: If Planeswalkers were Cats

Apr 22: Excerpts from PM’s speech: “I take a personal interest in this. 40 years ago, after doing a math degree, I went on to study computer science, on my father’s advice. He said there is a future in that, and he was right.”

“The last program I wrote was a Sudoku solver in C++ several years ago, so I’m out of date. My children are in IT, two of them – both graduated from MIT. One of them browsed a book and said, “Here, read this”. It said “Haskell – learn you a Haskell for great good”, and one day that will be my retirement reading.”

Apr 18: Me pointing at the identify function in Lambda Calculus, part of my presentation titled “Functional Programming from First Principles” at Friday Hacks #93 - Teleport, an Intelligent Routing Service & Functional Programming from First Principles. Thanks to Jeremy Chen for the photo.

Apr 03: Feel the pain of AI developers. Warning: strong language

Apr 01: GDC 2015 talks are online @

“The best AI agents do not need to be brilliant, they need to be believable. As AI developers, our goal is only for players to believe behavior is intelligent, rather than filling in all the blanks: “less is more”. I will provide concrete techniques for designing effective AI systems. I’ll talk about my process for creating Stanley, the AI in ROCKETSROCKETROCKETS, and how that can be applied to other games, as well as look at other AI examples from my own work and other games to help illustrate the techniques.”

Mar 30: Slightly later than our usual last weekend of the month schedule, but Magarena 1.60 is out with 318 more cards, mostly from Dragons of Tarkir. Main feature from me for 1.61 is to release the MTD(f) AI, need to start scheduling AI matches on

If you’d like to help the AI in Magarena become better at mulligan, please participate in

Mar 16: Inspired by last year’s Hour of Code at the Science Center, we’re back with a public exhibit at the Science Center (Wed, 18th March, 1-5pm) to explain computing concepts and to debunk the myth that computing is only about computers.

Fun fact: before the invention of electronic computers, a computer is “one who computes”, a person performing calculations according to a set of fixed rules.

Mar 07: Inspired by, I asked Mike, the developer of, if we can do something similar for Magarena which would allow us to test AI code by evaluating its win rate on many games.

First working prototype of the feature is now on firemind! Excited to begin testing different hypothesis I have on improving the AI.

Feb 20: 16 minute mini-documentary on Grace Hopper. “When I first saw Mark 1, I thought, gee, that’s the prettiest gadget I ever saw.” - Grace Hopper

Feb 19: X-Men: Magneto Cat (via @[7270241753:274:YouTube])

Feb 02: Must catch that hand! via

Jan 27: “In the same way that composition and comprehension are not tied to paper, modeling is not tied to computers. It can be both physical and mental. It takes place on paper and in Excel or with Legos and balsa wood airplanes. It is an incredibly powerful skill which we can make even greater use of by transposing our models to computers. To understand how we do that, we have to look more deeply at what it means to model.”

Links to this note