Acer Swift 1
I decided to upgrade my laptop, and chose to get the Acer Swift 1 SF113-31-P6XP (the rose gold color). The Acer website indicated that this model would have a keyboard backlight, but it does not. It has 3 stuck pixels…
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 other web services and my…
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 simple void*, but I need to gift it with…
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 Errors via Type Checking The Good IR:…
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 Errors via Type Checking The Good IR:…
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 error has this ‘feature’ which makes it…
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 that an ordinary progress bar is…
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 disappointed in their scores. Immediately, I…
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 is focused on the discussion of…
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 off using a const-correctness discipline, it’s very…