'Red Mars' by Kim Stanley Robinson

Red Mars (Mars Trilogy, #1)Red Mars by Kim Stanley Robinson
My rating: 4 of 5 stars

Red Mars is a science fiction classic written in 1992. This book is everything I wanted and more, starting with first hundred astronauts and cosmonauts migrating to Mars to build the infrastructure such that more people can migrate. By the middle of the book, thousands of people migrate to Mars. The book explores various dimensions the epic project, not just technological challenges, but psychological effects, personality differences, and political interests by superpowers. The geography of Mars is written in vivid, majestic details.

super shell for sbt

in

I've implemented "super shell" feature for sbt over the weekend. The idea is to take over the bottom n lines of the termnial, and display the current tasks in progress.

the limitation of using log as status report

Logs are useful in many situations, and sometimes it's the only viable tool to find out what's going on. But on a console app like sbt, using logs to tell the build user what's going on doesn't always work.

stricter Scala with -Xlint, -Xfatal-warnings, and Scalafix

in

Compile, or compile not. There's no warning. Two of my favorite Scala compiler flags lately are "-Xlint" and "-Xfatal-warnings".
Here is an example setting that can be used with subprojects:

ThisBuild / organization := "com.example"
ThisBuild / version      := "0.1.0-SNAPSHOT"
ThisBuild / scalaVersion := "2.12.6"
 
lazy val commonSettings = List(
  scalacOptions ++= Seq(
    "-encoding", "utf8",
    "-deprecation",
    "-unchecked",
    "-Xlint",
    "-feature",
    "-language:existentials",

git gone: cleaning stale local branches

git gone is a custom git command that I wrote based on Erik Aybar's Git Tip: Deleting Old Local Branches. I'm not comfortable with Bash scripting, so it took me some Googling and Stackoverflowing, but hopefully it does the job. Save the source at the end of this page as git-gone in ~/bin or wherever you keep your local scripts.

To read how to use it type in git gone:

$ git gone
usage: git gone [-pndD] [<branch>=origin]
OPTIONS
  -p  prune remote branch
  -n  dry run: list the gone branches
  -d  delete the gone branches
  -D  delete the gone branches forcefully
 
EXAMPLES
git gone -pn  prune and dry run
git gone -d delete the gone branches

xenoanthropology (2018.09 mixtape)

Spotify: https://open.spotify.com/user/1235450353/playlist/5US2KVLXPDrsB1C3IikMpT...
YouTube: https://www.youtube.com/playlist?list=PLSUh6oJ5ZotVUgp0rFjOJPKyVoFQMEUzo

  • First Flight - Kaitlyn Aurelia Smith
  • Vind - Christian Löffler, Mohna
  • Heptapod B - Jóhann Jóhannsson
  • Bad Blood - SBTRKT Remix - Nao
  • Glasir - Telefon Tel Aviv Remix - These Hidden Hands
  • A Parallel Life - Ocoeur
  • Object Unknown - Kool Keith
  • Airships Fill the Sky - Morgan Packard
  • Retrograde - James Blake
  • Nowhere - Crazy P's Heatwave Mix - Aquanote, Zoe Ellis

console games in Scala

The foundation of rich console application is based on physical terminal machines like VT100 from the 1970s, and ANSI X3.64 control sequences that standarized the byte sequence to control the cursor, text formats, etc. Modern terminal applications emulate the behaviors of these terminals.

Thus, if we can assume a good terminal app, all we need is an ability to println(...) the control sequences and listen for the standard input to write a rich console app. This should be possible in almost any programming language.

console5

sbt 1.2.0

in

Wrote sbt 1.2.0 on Lightbend Tech Hub blog.

all your JDKs on Travis CI using jabba

in

Whether you want to try using OpenJDK 11-ea, GraalVM, Eclipse OpenJ9, or you are stuck needing to build using OpenJDK 6, jabba has got it all. jabba is a cross-platform Java version manager written by Stanley Shyiko (@shyiko).

Here's how we can use jabba on Travis CI to run a build using Azul Zulu OpenJDK 6:

sudo: false
dist: trusty
group: stable
 
language: scala
 
env:
  global:
    - TRAVIS_JDK=zulu@1.6.107
    - JABBA_HOME=/home/travis/.jabba
  matrix:

2018.06 mixtape

Spotify: https://open.spotify.com/user/1235450353/playlist/4jqNCyUylGh9zCYt0JHqEv...
YouTube: https://www.youtube.com/playlist?list=PLSUh6oJ5ZotVoTIXr6OBeLuUSor-PDN_p

  • The Seed - ANIMA!
  • Looped - Kiasmos
  • Naive - RKCB
  • Making Distractions - Kllo
  • Lights - YOSIE, LO
  • CR-V - Cuco
  • Arisen My Senses - Björk
  • Hush - Tourist
  • You and Me - Shallou
  • Last Day… - Shallou
  • Life, Life (Andy Stott Remodel) - Ryuichi Sakamoto
  • Nix - Dawn of Midi
  • A Meaningful Moment Through a Meaning(less) Process - Stars Of The Lid
  • Obfuse - Floating Points

bringing back power assert with Expecty

in

I wanted give Expecty a try, so I forked the repo to eed3si9n/expecty, added sbt build, patched up the code so it works with 2.10, 2.11, 2.12, and 2.13.0-M4, sent a few pull requests upstream, changed the package name, and published my fork to Maven Central:

libraryDependencies += "com.eed3si9n.expecty" %% "expecty" % "0.11.0" % Test

and for Scala.JS and Scala Native:

libraryDependencies += "com.eed3si9n.expecty" %%% "expecty" % "0.11.0" % Test

Here's how we can use this:

scala> import com.eed3si9n.expecty.Expecty.assert
import com.eed3si9n.expecty.Expecty.assert
 
scala> assert(a * b == 7)
java.lang.AssertionError:
 
assert(a * b == 7)
       | | | |
       1 3 3 false
 
  at com.eed3si9n.expecty.Expecty$ExpectyListener.expressionRecorded(Expecty.scala:25)
  at com.eed3si9n.expecty.RecorderRuntime.recordExpression(RecorderRuntime.scala:34)
  ... 38 elide

As you can see, you get a nicer error message automatically.

Syndicate content