New
The latest blog posts to take off on Hacker News. 1,013 posts.
Hidden Costs of Memory Allocation
It’s important to understand the cost of memory allocations, but this cost can be surprisingly tricky to measure. It seems reasonable to measure this cost by wrapping calls to new[] and delet…
OCaml 4.01 for iOS 8
The current OCamlXARM compiles by default for iOS 7.1, but using it for iOS 8 is not too difficult. The only thing that changes is the name of the SDK, which can be specified with the -ccopt option of ocamlopt.
The Infamous Windows “Hello World” Program
A recent blog post by consultant John Cook reminded everybody about the infamous “Hello World” programs in the early chapters of the first five editions of Programming Windows:
Popular Myths about C++, Part 1
[For your winter reading pleasure, we're pleased to present this three-part series of new material by Bjarne Stroustrup. This is part one; parts two and three will be posted on the following two Mondays, which will complete the series just in time for Christmas. Enjoy. -- Ed.]
Android Studio 1.0
News and insights on the Android platform, developer tools, and events.
Interface Upgrades in Go
Much has been written about Go’s interfaces . They’re one of the language features I like best, providing a very pragmatic trade-off between the complexity of more powerful type systems and the anarchy of duck typing. If you’re not already familiar with Go or Go’s interfaces, I’d encourage you to read an introduction…
Reimplementing “git clone” in Haskell from the bottom up (2013)
In order to give some structure to my ongoing investigation of git’s data structures, protocols and implementation I decided to re-implement git clone without using any of git’s plumbing commands or any of the existing git libraries. Along the way I tried to keep some implementation notes that should help to…
ImageMagick, four point perspective distortion in a video
Step 1) Download the video from Youtube using JDownloader . The best one was the original Japanese upload, The Game Awards 2014 å‡ºå±•æ˜ åƒ ã‚¼ãƒ«ãƒ€ã®ä¼èª¬ 最新作 , which is 720p. I saved this file as zelda_720p.mp4.
Icdiff: side-by-side command line diffs
Your terminal can display color, but most diff tools don't make good use of it. By highlighting changes, icdiff can show you the differences between similar files without getting in the way. This is especially helpful for identifying and understanding small changes within existing lines.
Make your program slower with threads
Years ago, while taking a numerical methods course, I wrote some code to calculate the expected number of shared birthdays in a group. The code is very simple: each attempt constructs a vector of N birthdays, then counts the duplicates. The outer loop runs millions of attempts, and calculates the mean number of shared…
XSLT is a failure wrapped in pain
“ The essence of XML is this: the problem it solves is not hard, and it does not solve the problem well.” – Phil Wadler, POPL 2003
A quick tutorial on implementing C memory management functions
This is basically an expanded explanation of what I did after reading this tutorial by Marwan Burelle and then sitting down and trying to write my own implementation, so the steps are going to be fairly similar. The main implementation differences are that my version is simpler and more vulnerable to memory…
A Formula for the Number of Days in Each Month
Recently, after being awake for longer than I should have, I started thinking about methods of remembering the number of days in each month of the year. There is a rhyme for it, and a way to count on your knuckles, but these didn’t satisfy me. I wondered if there was a mathematical formula for the problem, and upon…
Why I like XSLT
I first fell in love with XSL in 1999, when Microsoft rolled an XSLT processor into MSXML. I got my hands on the works of Shakespeare marked up in XML
A farewell note to a programming language
Do you remember how we first met, back in 2012? I thought your functional approach was fresh, and different. For a while I believed we were made for each other. A first project was a success; on my own I was comfortable with the good parts of you. But as soon as I started working in teams writing Scala, your immense…
Java Doesn’t Suck
I've been building enterprise Java web apps since servlets were created. In that time the Java ecosystem has changed a lot but sadly many enterprise Java…
Programming Modern Systems Like It Was 1984
It's not about technology for its own sake. It's about being able to implement your ideas.
PostgreSQL’s New LATERAL Join Type
This post walks through a conversion funnel analysis that wouldn’t be possible in PostgreSQL 9.2