New
The latest blog posts to take off on Hacker News. 679 posts.
What Every C Programmer Should Know About Undefined Behavior #2/3
In Part 1 of our series, we discussed what undefined behavior is, and how it allows C and C++ compilers to produce higher performance applications than "safe" languages. This post talks about how "
What Every C Programmer Should Know About Undefined Behavior #1/3
People occasionally ask why LLVM-compiled code sometimes generates SIGTRAP signals when the optimizer is turned on. After digging in, they find that Clang generated a "ud2" instruction (assuming X86 code) - the same as is generated by __builtin_trap().
"The worst algorithm in the world?"
You know the Fibonacci numbers: 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, … Each number is the sum of the previous two. Let’s say the zeroth Fibonacci number is zero, so: $latex \begin{array}{r@{\…
Kill Math
The power to understand and predict the quantities of the world should not be restricted to those with a freakish knack for manipulating abstract symbols.
MySQL Text vs. Varchar Performance
Starting with MySQL 5.0.3, the maximum field length for VARCHAR fields was increased from 255 characters to 65,535 characters. This is good news, as VARCHAR fields, as opposed to TEXT fields, are stored in-row for the MyISAM storage engine (InnoDB has different characteristics). TEXT and BLOB fields are not stored…
Understanding the code inside Tornado, the asynchronous web server
If you see this page, the nginx web server is successfully installed and working. Further configuration is required.
Tor project decides to fork Firefox
In a random bar about two years ago, a Google Chrome developer asked me why Torbutton didn't...
The 10 commandments of good source control management
Ah source control, if there’s a more essential tool which indiscriminately spans programming languages without favour, I’m yet to see it. It’s an essential component of how so many of us work; the lifeblood of many development teams, if you like. So why do we often get
The context sensitivity of C's grammar
Context free grammars (CFGs) are a valuable theoretical tool on which the modern compilation theory relies for parsing the code of programming languages. For example, the most popular tool used for parsing – YACC , generates parsers for CFGs. What most people don’t know 1 is that the vast majority of programming…
Objective-C's niche: why it survives in a world of alternatives
Objective-C remains an impediment for many programmers coming to the Mac or iPhone platforms — few programmers have ever experienced it before learning Cocoa, forcing two learning curves at once for new Cocoa developers. How did Apple end up with such a weird language? And for a company known to replace CPU…
PyPy 1.5 Released: Catching Up
We're pleased to announce the 1.5 release of PyPy. This release updates PyPy with the features of CPython 2.7.1, including the standard libr...
The Linux perf command rocks
A summary of Linux profiling/monitoring tools
IOS games using JavaScriptCore without WebKit
Less talk, more action – Apple just approved two of my JavaScript games for the AppStore: Biolab Disaster and Drop . Both are free; go check them out. You can also play them in your browser here and here .
The myth of the Lisp genius
I'm fascinated by the myth of the Lisp genius, the eccentric programmer who accomplishes super-human feats writing Lisp. I'm not saying that such geniuses don't exist; they do. Here I'm using "myth" in the sense of a story with archetypical characters that fuels the imagination. I'm thinking myth in the sense of…
Joel Spolsky: Can your programming language do this?
One day, you’re browsing through your code, and you notice two big blocks that look almost exactly the same. In fact, they’re exactly the same, except that one block refers to “Sp…