Archive

Archive for the ‘development’ Category

7-Zip really rocks

December 21st, 2011 No comments

I just noticed this while getting the latest version of Boost from sf.net:

Or as Scott Hanselman put it: “It’s over and 7zip won”.

Comparison of Java Serialisers

October 24th, 2011 No comments

The JVM Serialisers project provides a very extensive comparison of dozens of different JVM serializers out there. Tested tools include several JSON libs, different XML related libs, Scala, protobuf, protostuf, msgpack and many more.
I didn’t know protostuff before – it seems to be really amazing!

(via tutego)

Free, Portable FTP Server for Windows

June 23rd, 2011 No comments

If you are looking for a really simple, free and portable ftp server for Windows, then visit StahlWorks.com and get their excellent Swiss File Knife. It’s a single, small executable with no dependencies that brings a ton of features. If you have it, just run …

sfk ftpserv -rw

… and enjoy your zero-install, ultra-portable ftp server!

Extracting .MSI Files

February 24th, 2011 2 comments

Mercurial is a really nice revision control tool, but unfortunately there are no portable binary packages for Windows. They do offer msi packages, though. But retrieving their content without actually installing the software is a bit tricky.
You can just unpack them using 7-zip, but you are likely to get garbage.
Using your favorite search engine, you will find suggestions to perform an administrative installation using msiexec /a. Well, don’t. That’s just a normal installation, but without the GUI of the installer being shown.

Fortunately, there is lessmsi. It allows to open, inspect and extract Windows Installer packages.
For TortoiseHG, download the binary .msi package from the Mercurial homepage. Run lessmsi, open the .msi package and select “extract”. Mercurial will be extracted to WheretherYouExtracted\SourceDir\PFiles\TortoiseHg, and the original folder layout of Mercurial will be preserved.

Lessmsi is provided under the MIT License and does not require installation. Just download, unzip and run it.

“unbound wildcard type” errors in Scala

February 16th, 2011 No comments

In Scala 2.8.1, I ran into problems while compiling this:

object Test
{
  def log(item: _) : Unit = 
    println("you logged " + item)
 
  def main(args: Array[String]) : Unit =
  {
    log(42)
  }
}

The error message wasn’t not helping that much at the first glance:

/home/niels/tmp/test.scala:3: error: unbound wildcard type
	def log(item: _) : Unit = 
                      ^

To fix it, change the prototype of the log function like this:

	def log(item: Any) : Unit =

There is a pretty good overview of the Scala type hierarchy on the Scala homepage. In short, Scala Objects are subtypes of AnyRef. Primitive types (Int, Boolean, …) are subtypes of “AnyVal”. Both “AnyRef” and “AnyVal” are subtypes of “Any”, and substituting “Any” with “_” in prototypes and templates is not allowed in Scala 2.8.

Tags:
Performance Optimization WordPress Plugins by W3 EDGE