Dabbling Around with Scala

Scala is a legendary language that allows both OO and functional programming. On top of that, it is compatible with Java and compiles to JVM bytecode. Hence, in theory, it could be used anywhere Java is used *cough cough* Android *cough cough*.

For a while, I have been meaning to try out Scala – and today I bit the bullet.

Closures are awesome. Here is a simple example which multiplies a list by 2 and prints the result:

Of course, this is a very trivial example of how closures can be used, but I find the syntax pretty cool nonetheless 😀

Here are some other features that I really like about Scala:

Just for kicks, I decided to build a simple regex matching program with character matching, “multiple”, and “or” functionality.

Switching from Arch to Debian

Last night was a sad night. After 5 years of using Arch Linux, I decided to leave it for Debian. While I learnt a lot while using Arch, it was often disruptive to my work when it required maintenance. I woke up last night to work on a Physics assignment, and sure enough, my kernel panicked. I don’t blame Arch per se. If I retained a legacy kernel, it would have been fine. But that is the reason why I left – it would be nice if my computer worked out of the box with minimal maintenance.

One thing I will really miss about Arch is yaourt – a package manager which connects with the Arch User Repository. Basically any package you could think of would be contained in there. As an alternative, I installed Linuxbrew. It doesn’t seem to have as many packages, but I am really digging how the formulae are easily modifiable in ruby! (expect to see a linuxbrew-formulae repository in my Github soon…).