Are pointers and arrays equivalent in C? (2009)
Longer answer: it depends on what you mean by "equivalent". Pointer arithmetic and array indexing are equivalent. In other aspects, pointers and arrays are different.
Posts that commenters keep linking to, ranked by how many different people have cited them in Hacker News comments. 2,232 posts.
Longer answer: it depends on what you mean by "equivalent". Pointer arithmetic and array indexing are equivalent. In other aspects, pointers and arrays are different.
About two weeks ago I entered a discussion with the docs.rs team about, basically, why we have to look at this: When we could be looking at this: And of course, as always, there are reasons why thi...
The halting problem asks whether the execution of a specific program for a given input will terminate.
Lately, I’ve been reading articles about best practices for code reviews. I notice that these articles focus on finding bugs to the exclusion of almost every…
I learned a neat tip from my co-worker, Craig Silverstein ( more on Craig joining Khan Academy ), recently and I thought others might find it to be useful.
"Why do you jackasses use these inferior linguistic vehicles when we have something here that’s so precious, so elegant, which gives me so ...
tl;dr: I have created a test suite for comparing the transaction isolation levels in different databases. I did this as background research for my book . This post explains why.
Packing ternary numbers with efficient SIMD-friendly unpacking on binary computers
A common perspective is that types are restrictions . Static types restrict the set of values a variable may contain, capturing some subset of the space of “all possible values.” Under this worldview, a typechecker is sort of like an oracle, predicting which values will end up where when the program runs and making…
Analysis and examples of the popular high-level pattern of making all the things in your system conform to a common interface.
Compiler Design in C Download a copy! My book Compiler Design in C is now, unfortunately, out of print. You can download a complete copy, with the above button (pdf 19.1Mb OCR/Searchable—thanks to Marvin Hernández for adding the OCR). If you don’t want to print it out (the book is 984 pages long), you can…
I have come to appreciate coding agents to be valuable tools for working with computer program code in any capacity, such as learning about any program’s architecture, diagnosing bugs or developing proofs of concept. Depending on the use-case, reviewing each command the agent wants to run can get tedious and…
Rust doesn’t have namespaces in its package management system. It’s often viewed as a bug. But it’s not a bug, it’s a feature! While there are negative aspects of a flat package registry, there are also real benefits. Stability, continuity, and unity (discourages forks and fragmented identity)…
In this post we'll discuss the second argument on why the epoll() is broken. The problem is best described in an LWN comment by Foom :
Branimir Karadžić's Home Page
I occasionally do talks about curl. In these talks I often include a few slides that say something abut curl's coverage and presence on different platforms. Mostly to boast of course, but also to help explain to the audience how curl has manged to reach its ten billion installations. This is current incarnation of…
It's not about technology for its own sake. It's about being able to implement your ideas.
I have recently published a blog post that, as I had expected (actually, hoped for, as that would attract people to contribute to the “study”), generated quite some polemic on the Internet!
Backpressure is something nearly every software engineer will have to deal with at some point, and for some it’s a frequent problem. But…
Three years ago, I downloaded the nascent Scala.js compiler and tried to use it on a toy project.
The .NET Framework was good. Really good. Until it wasn’t. Why did I leave .NET? In short, it constrained our ability to choose (which is a huge deal for
I’m pleased to introduce the third generation of my attoparsec parsing library. With a major change to its internals, it is both faster and more powerful than previous versions, while remaining backwards compatible. Comparing to C Let’s start with a speed comparison between the hand-written C code that powers…
Perf is probably the most widely used general purpose performance debugging tool on Linux. There are multiple contenders for the #2 spot, and, like perf, they're sampling profilers. Sampling profilers are great. They tend to be easy-to-use and low-overhead compared to most alternatives. However, there are large…
On Monday, I was pleased to be an uninvited speaker at <a href="http://devwaterloo.pbworks.com/">Waterloo Devhouse</a>, hosted in <a href="http://postrank.com">Postrank's</a> magnificent office. After making some surreptitious alterations to their agile development wall, I gave a tongue-in-cheek talk on how C++ can…
Update 2018-07. The branching model described here is called trunk based development. I and other people who I collaborated with did not know about the articles that used this name. Nowadays there are excellent web resources about the subject, like trunkbaseddevelopment.com. They have a lot of...