Martin @ Blog

software development and life.


Archive for December, 2009

Encoding in Scala interpreter

One of the nice things of Scala is the availability of a command line interpreter based on the REPL principle (Read-evaluate-print loop). Last week, for a particular project, I wanted to generate a string containing a part of the UTF-8 character table.
Thanks to Scala’s concise syntax, this would not be very difficult:

(0x20AC until 0x20B6).foreach { x => print(x.toChar + " ") }

This example will print characters 0x20AC (euro symbol) up to 0x20B6 (an unknown symbol to me 🙂 ).

However, the result I got on my system (Mac OS X 10.6.2 using Scala 2.8 nightly) was not really what I expected:

? ? ? ? ? ? ? ? ? ?


Update of Weblog

My weblog was not very active lately. Mostly, this is because I’m posting a lot on Twitter (in Dutch however) and post some articles on the weblog of the company I’m working for. Especially the post on Devoxx is an interesting read in my opinion.

However, I’m planning to change this. It is not that I don’t like writing, and in my experience, when I write an article on a specific subject, I have the habit of do some research on it which increase my knowledge on the subject on the go. I have some articles in draft and some others planned to write. With the new year approaching, increased writing sounds like a good intention for the upcoming year.

In order to mark this change, I’ve decided to change the look of my site a bit and add some additional features on it (especially a Mobypicture widget). The new look is not yet finished, but that will come over time.

You are currently browsing the Martin @ Blog blog archives for December, 2009.