Benedikt Meurer JavaScript Engine Hacker and Programming Language Enthusiast.

SSH via SSH Tunnel

Imagine you want to connect via SSH to remote systems hostB and hostC on an intranet behind hostA. This could be achieved easily using port forwarding via hostA, just pick two arbitrary ports on the local machine and forward them to ports 22 of hostB and hostC. This works very well for a small amount of intranet hosts, but it get's quite messy as the list of hosts grows. After some time you'll have a rather huge amount of local ports to remember (or to lookup in your port forwarding script several times a day). It'd certainly be easier to just type ssh hostB and have the tunnel setup automatically.

Continue reading

Linear Scan Register Allocator for the OCaml Native Code Compiler

I recently imported the first working version of the Linear Scan Register Allocator for the OCaml Native Code Compiler ocamlopt into the linear-scan-register-allocator branch of my ocaml-experimental repository. The register allocator was implemented for ocamlopt by Marcell Fischbach as part of his diploma thesis. It presents a first step towards a (better) native OCaml toplevel ocamlnat. Use the following command to checkout the source code:

Continue reading

OCaml GitHub Mirror

During the last two days I managed to setup a GitHub mirror of OCaml. It works by importing the changes from the official OCaml Subversion Repository using git-svn and pushing them to the GitHub mirror. This is done automatically every hour by one of my servers. It works by setting up a Git branch for every version Subversion branch and a Git branch with a tags/ prefix for every tags Subversion branch. Also note that the master branch is called trunk.

Continue reading

Demon Cam Promo Video

Wow that Promotion Video for the Demon Cam is just awesome! I wonder if they will be able to actually make money with the app.

Continue reading

CocoaHeads Siegen September Meeting

Next monthly meeting of the CocoaHeads Siegen scheduled for September, 13th 2011 at 19:00, feat: "iOS 5 - New and Noteworthy" (Benjamin Mies). Third meeting already and this time we also have a nice flyer!

Continue reading

Random crashes with iOS 4.2.1

I received several complaints about random crashes lately. The complaints of course did not mention any specific version of iOS nor any other useful details. So I had to digg into it myself. As it turned out the crashes were due to the use of DISPATCH_QUEUE_PRIORITY_BACKGROUND, which is not only unavailable with iOS 4.2.1 (and earlier), but also causes dispatch_async to crash - which is rather bad IMHO, a fallback to DISPATCH_QUEUE_PRIORITY_LOW would be better from both the user's and the developer's POV.

Continue reading

Blocks and Grand Central Dispatch

Yesterday I held a talk about Blocks and Grand Central Dispatch at the second monthly CocoaHeads Siegen meeting. My slides are available for download from the CocoaHeads Siegen website. The presentation gave rise to some interesting discussion about networking performance with and without GCD, so today I'm digging into that GCDAsyncSocket thing again.

Continue reading

How to uncrush pngcrushed images from an iOS App Bundle

I recently had to restore some PNG files from an iOS App Bundle, which apparently did not work very well, since they have been compressed automatically using Apple's version of pngcrush when they were copied to the App Bundle folder during archiving. Fortunately it's quite easy to revert the optimizations using the following command (assuming you have installed the Apple Developer Tools and the iOS SDK):

Continue reading

Using Git tags to manage the version of Xcode projects

Inspired by a recent post of Joachim Bondo I decided to rework my versioning scheme for Xcode projects as well. One of the major drawbacks of traditional versioning is that the so-called marketing version (Apple slang) is kept twice, once in the project's Info.plist file and once in the Git tag that is created after release. This redundancy is not only inconvenient, but can also lead to mistakes, i.e. forgetting to bump the CFBundleShortVersionString prior to tagging the new release.

Continue reading

Disabling the local snapshots feature of Time Machine in Lion

Local snapshots for Time Machine is one of the new features in OS X Lion that looks really good on paper. But once you have used your new Lion installation for a few days, you will notice that you are running out of disk space. After some digging around I noticed that the /.MobileBackups folder that is used by Time Machine for local snapshots was at nearly 50GiB, even though the external Time Machine backup disk was connected most of the time. I guess this is done to speedup Time Machine in the common case, and make backups available when not connected to the external Time Machine disk.

Continue reading