Quantcast
Channel: eric the fruitbat » code
Browsing all 11 articles
Browse latest View live

Interface Extension

I’ve been programming an alpha-beta AI to play variants of connect-k games. For example, connect-3 on a 3×3 board with gravity off is tic-tac-toe, connect-5 on a 19×19 board with gravity off is the...

View Article



Type-dispatch with Exceptions

I’m one of those Object Oriented programmers that consider type-inspection to be a design flaw. Much to my chagrin, I’ve found myself making occasional use of the Java instanceof keyword. In my most...

View Article

Const-correctness

One of my fellow lab-mates has already posted about const-correctness, because of some similar issues. My work today, takes it a tiny bit further into sheer insanity. If you don’t start your program...

View Article

A language should be focused on writing Internal DSLs

I’ve been reading Martin Fowler’s book, Domain-Specific Languages, this weekend. He covered a number of ways in which you can structure your code to achieve what he terms an Internal DSL. Quite a bit...

View Article

Higher-Order Functions in Java

This Summer I’ve been teaching Intro to Computer Languages. It’s a really awesome class, with alot of good material in it. Last week, my students got back the results of their midterms, and were...

View Article


The Progress Phallus

My friend Ray runs numerical simulations and wanted to have a decent progress bar for his code. A bit of web searching revealed some code, that takes care of this automatically. However, we thought...

View Article

Where’d that null come from?

One of the most annoying things that can happen to a computer programmer is the dreaded NullPointerException, or in C++, the segfault that occurs due to dereferencing a null pointer. The null pointer...

View Article

The Good IR: Reporting Semantic Errors via Type Checking

This post is part of a seres: The Good IR (BasicBlocks and control flow instructions) The Good IR: Other Control Flow Structures The Good IR: Instructions and Values The Good IR: Reporting Semantic...

View Article


Image may be NSFW.
Clik here to view.

The Good IR: Multiple Returns

This post is part of a seres: The Good IR (BasicBlocks and control flow instructions) The Good IR: Other Control Flow Structures The Good IR: Instructions and Values The Good IR: Reporting Semantic...

View Article


C++ casting operators

Today in my research, I came across an interesting challenge. I’m editing an older version of JavaScriptCore (JSC), redefining the most basic typedef in the sytem, EncodedJSValue. Previously it was a...

View Article

Promised Properties

 Three weeks ago I started a new project that uses nodejs and which forced me to learn some asynchronous programming. I couldn’t quite manage to adapt. Because this was server code that ties together...

View Article
Browsing all 11 articles
Browse latest View live




Latest Images