Running LaTeX inside Docker

This docker image has LaTeX installed. To use it, you can run:

  • docker run -v `pwd`:/work -w /work -i -t --rm wtanaka/ubuntu-1604-latex latex myfile.latex
  • docker run -v `pwd`:/work -w /work -i -t --rm wtanaka/ubuntu-1604-latex dvips myfile.dvi

Installing PHP Composer with Docker

PHP 5.6 FPM

Installing

What is slf4j?

There are several commonly used logging frameworks in Java: log4j, java.util.logging, logback.  Because different projects may have dependencies on one or another of these frameworks, linking more than one project together can cause more than one logging framework to be linked.  SLF4J is an abstraction layer for these different logging frameworks.

Logging in Flink with Apache Beam

Logging in Flink is implemented using the slf4j logging interface on top of log4j. This means that the most flexible approach you can take in your user pipeline code is to depend on slf4j instead of depending on log4j directly.

Cutie Fish and Bear

We got two guppies as a gift. The kids named them "Cutie Fish" and "Bear".

Deleting/Disabling iTunes

iTunes on Mac OSX started playing a random U2 song for no obvious reason.  I would kill it, and it would launch again after 10 seconds.

I tried deleting iTunes.app by opening the Applications directory in Finder and dragging it to the trash, but got the message that

"iTunes" can't be modified or deleted because it's required by macOS.

So I opened a terminal and did: sudo chmod ugo-rwx /Applications/iTunes.app which seems to have stopped it for now. We'll see how long that lasts.

What is MapReduce?

MapReduce is a programming model for parallel programming, and a proprietary execution engine (open source engines like Hadoop and open source successors like Beam also exist). It is loosely based on map() and reduce() higher order functions from functional programming, but refers to a very specific algorithm that uses those two higher order functions exactly once each.

What are higher order functions?

A higher order function is one that either takes functions as parameters or returns functions as return values. They are often used in place of loops in functional programming languages since a pure function cannot have a mutable loop iteration variable.

Some commonly used higher order functions are:

What is lazy evaluation?

Most programming languages use a process called strict evaluation when calling a function. For example, if we multiply the result of 1+2 with the result of 3+4 (to get 7):

multiply(plus(1, 2), plus(3, 4))

most programming languages will first add 1 + 2 and determine the result is 3, then add 3 + 4 to determine that result is 7, and then finally pass 3 and 7 to multiply()function to get 21.

What is functional programming?

Many computer programs today are written in a style called imperative programming. The programmer writes a list of steps that the computer's CPU will do one after another in order. A common analogy for imperative programs are recipes for cooking or baking food. Imperative programming came from a mathematical model called a Turing Machine, which is like a very long street with sequentially numbered mailboxes.

Pages

Subscribe to Wesley Tanaka RSS