Monthly Archives: June 2014

Elixir on CircleCI

Note: Related newer post is at Elixir on CircleCI – Updated

Just made small trial on CircleCI and elixir combination, and taking some notes here.

Though the CircleCI doesn’t have latest erlang/elixir installed, it can be installed as the custom configuration through circle.yml. It takes some time initially, but applying cache makes it pretty much fast for normal code deployments.

Comparing with TravisCI, detection of updates in GitHub and build processing seems pretty much fast, though there’s no free version on CircleCI. It may be a good option for private repositories.

The configuration is messy, but the following is the working example with very simple elixir codes (tested on erlang 17.0 and elixir v0.14.2-dev).

https://github.com/parroty/circle_sample

Scala and Monad Tutorial

Scala Monads: Declutter Your Code With Monadic Design

I had been staying out of the keyword “monad” as it’s often described as difficult. But, this tutorial video nicely explains it with concise and clean examples.

It’s interesting to explain monad as “design pattern” in the functional programming world. Also, the example compares normal Java-way of handling null and exceptions with monadic-way ones in Scala.

[Java]

if (foo != null) {
  Bar bar = foo.getBar();
  if (bar != null) {
    Baz baz = bar.getBaz();
    if (baz != null)
      return baz.computer();
    else
      return null;
  }
  else
    return null;
}
else
  return null;

[Scala]

for {
  foo <- maybeFoo
  bar <- foo.bar
  baz <- bar.baz
} yield baz.compute

Pretty much concise. When I was learning Scala at coursera course, I could understand the basics (for statements, Option with Some/None and map/flatmap concepts), but I wasn’t thinking about its underlying concepts like monad. It would be worthwhile to dig-deep a little more.

Docker and Container

The Revolution Will Be Containerized: (Docker)

There’s a lot of buzz around docker and related virtualization technologies. Many computing components are getting granularly composed and connected each other lately. Along with the maturity of automation and DevOps technologies, managements of hosts and computing resources have largely changed, and will be changing for a while.

Also, it’s interesting that Docker is written using Go (go-lang). I can see that growing number of production systems are written in go-lang, and platform development languages may be changing too.

Around 50:00 talks around OpenStack. It seems a driver is being developed for OpenStack integration. OpenStack sounds well starting up for a unified console for major virtual environments. Once it gets stabilized, it would become a key component.

https://wiki.openstack.org/wiki/Docker