Wordpress - michid.wordpress.com - Michid's Weblog
General Information:
Latest News:
Json Jerk: a flexible JSON parser 10 Dec 2011 | 01:16 pm
I just pushed Json Jerk to Github. Json Jerk is a flexible and fast JSON parser written in Java. It consists of several composable parts for tokenizing, (un)escaping, parsing, and handling of semantic...
Union types 13 Jun 2011 | 01:55 am
In his recent blog post Miles Sabin came up with an ingenious way of expressing union types in Scala. A union type is the union of some types: its values are the union of the values of each of the ind...
Regular expression matching in <100 lines of code 7 Dec 2010 | 12:23 pm
The recent discussion about the Yacc is dead paper on Lambda the Ultimate sparked my interest in regular expression derivatives. The original idea goes back to the paper Derivatives of Regular Express...
Generic array factory in Java: receipt for disaster 5 Nov 2010 | 10:56 am
Let’s implement a generic factory method for arrays in Java like this: We can use this method to create any array. For example an array of strings: Now let’s add another twist: Running this code wi...
So Scala is too complex? 25 Aug 2010 | 09:04 am
There is currently lots of talk about Scala being to complex. Instead of more arguing I implemented the same bit of functionality in Scala and in Java and let everyone decide for themselves. There is...
Type Level Programming: Equality 19 Jun 2010 | 04:13 am
Apocalisp has a great series on Type Level Programming with Scala. At some point the question came up whether it is possible to determine equality of types at run time by having the compiler generate ...
Working around type erasure ambiguities (Scala) 15 Jun 2010 | 09:33 am
In my previous post I showed a workaround for the type erasure ambiguity problem in Java. The solution uses vararg parameters for disambiguation. As Paul Phillips points out in his comment, this solut...
Working around type erasure ambiguities 31 May 2010 | 03:05 am
In an earlier post I already showed how to work around ambiguous method overloads resulting from type erasure. In a nut shell the following code wont compile since both overloaded methods foo erase to...
[ANN] Talking at Scala Days 2010 in Lausanne next Thursday 12 Apr 2010 | 08:05 am
I’ll be talking at Scala Days 2010 in Lausanne on April 15th about the Scala scripting engine for Apache Sling. While my talk at Jazoon 09 was mainly about using Scala from Sling, this session will be...
Scala type level encoding of the SKI calculus 30 Jan 2010 | 06:58 am
In one of my posts on type level meta programming in Scala the question of Turing completeness came up already. The question is whether Scala’s type system can be used to force the Scala compiler to c...