July 2009
8 posts
Jul 31st
Jul 30th
Jul 29th
Motsatsleken
När jag hittade synonymordboken och hade klickat runt där ett tag så fick jag för mig att kolla hur många klick det skulle ta att ta sig från ett ord till dess totala motsats (utan att klicka på länkarna under motsatsord då såklart). Ett exempel: bra → okej → riktig → adekvat → träffande → exakt → punktlig → ordentlig → rejäl → bastant → tjock → kraftig → grov → vulgär → simpel → usel →...
Jul 28th
1 note
Jul 27th
Filter a list by type by using manifests in Scala
Due to the type erasure in Scala I got problems when I tried to create a function filterType<T>(list: List[Any]): List[T] that simply filters out all elements in a list of type T. This is the naive implementation that I first tried out: object TypeFiltering { def typeFilter[T](list: List[Any]): List[T] = list.filter { _ match { case _: T => true case _ =>...
Jul 26th
Jul 23rd
1 tag
Neil Armstrong är en kyckling
In 1972, Armstrong was welcomed into the town of Langholm, Scotland, the traditional seat of Clan Armstrong. The astronaut was made the first freeman of the burgh, and happily declared the town his home. The Justice of the Peace read from an unrepealed 400-year-old law that required him to hang any Armstrong found in the town. - Wikipedia
Jul 21st