Hugo is a static site generator: it takes some plain-text content, marries it to a bunch of HTML templates, and produces a set of complete, static HTML pages that can be served by any generic, stand-alone web server. Simple.
Or maybe not. Hugo does a lot of things automatically, relying on conventions and implicit rules, rather than on explicit configuration. For example, it tries to match each piece of content with the most
/* | |
scalaVersion := "2.12.7" | |
resolvers += Resolver.sonatypeRepo("snapshots") | |
libraryDependencies += "co.fs2" %% "fs2-core" % "1.0.1-SNAPSHOT" | |
*/ | |
import cats._ | |
import cats.implicits._ | |
import cats.effect._ |
I was talking to a coworker recently about general techniques that almost always form the core of any effort to write very fast, down-to-the-metal hot path code on the JVM, and they pointed out that there really isn't a particularly good place to go for this information. It occurred to me that, really, I had more or less picked up all of it by word of mouth and experience, and there just aren't any good reference sources on the topic. So… here's my word of mouth.
This is by no means a comprehensive gist. It's also important to understand that the techniques that I outline in here are not 100% absolute either. Performance on the JVM is an incredibly complicated subject, and while there are rules that almost always hold true, the "almost" remains very salient. Also, for many or even most applications, there will be other techniques that I'm not mentioning which will have a greater impact. JMH, Java Flight Recorder, and a good profiler are your very best friend! Mea
kubectl get pods | grep Evicted | awk '{print $1}' | xargs kubectl delete pod |
Copyright © 2016-2018 Fantasyland Institute of Learning. All rights reserved.
A function is a mapping from one set, called a domain, to another set, called the codomain. A function associates every element in the domain with exactly one element in the codomain. In Scala, both domain and codomain are types.
val square : Int => Int = x => x * x
import shapeless._ | |
import scalaz._ | |
import Scalaz._ | |
object console extends App { | |
trait Foo[A] { | |
type B | |
def value: B |
#include <iostream> | |
#include <stdexcept> | |
#include <vector> | |
#include <string> | |
#include <cstring> | |
#include <locale> | |
#include <boost/property_tree/json_parser.hpp> | |
using namespace std; | |
class CodeCvt |