Author: Chris Lattner
- Install IntelliJ + Scala Plugin
- Don’t do the Coursera courses yet.
- Don’t do the “red book” Functional Programming in Scala yet.
- Do: http://underscore.io/books/
- Essential Scala
- Essential Play
- Essential Slick
- Do Scala for the Impatient: https://www.amazon.com/Scala-Impatient-Cay-S-Horstmann/dp/0321774094
- The Neophyte’s Guide to Scala http://danielwestheide.com/scala/neophytes.html
SIP-ZZ - NewType Classes
This is a proposal to introduce syntax for classes in Scala that can get completely inlined, so operations on these classes have zero overhead compared to external methods. Some use cases for inlined classes are:
- Inlined implicit wrappers. Methods on those wrappers would be
tl;dr Generate a GPG key pair (exercising appropriate paranoia). Send it to key servers. Create a Keybase account with the public part of that key. Use your keypair to sign git tags and SBT artifacts.
GPG is probably one of the least understood day-to-day pieces of software in the modern developer's toolshed. It's certainly the least understood of the important pieces of software (literally no one cares that you can't remember grep's regex variant), and this is a testament to the mightily terrible user interface it exposes to its otherwise extremely simple functionality. It's almost like cryptographers think that part of the security comes from the fact that bad guys can't figure it out any more than the good guys can.
Anyway, GPG is important for open source in particular because of one specific feature of public/private key cryptography: signing. Any published software should be signed by the developer (or company) who published it. Ideally, consu
This document sets out how I installed GalliumOS 2.1 on a new Acer Chromebook 14" (CB3-431) 'Edgar' in April 2017. I installed GalliumOS on the internal eMMC storage, but left Chrome OS in place (allowing dual-booting).
It is meant to be an easy-to-follow and particularly thorough (if repetitive) guide, but I make no warranty that it will work correctly for you. It will wipe all data on your Edgar.
I have tried to provide references for each section; see the GalliumOS wiki guide to chrx installation for an overview of the general process.
⚠ Caution: There have been reports of Edgars' speakers overheating, due to a malfunction of the audio hardware, when booted into anything other than Chrome OS. I have not experienced this, and it seems to be believed that this will not now occur under GalliumOS. More information can be found in the comments for the [GalliumOS Braswell Platform Validation
I've been asked by a few colleagues how I manage to read so much, so I thought I'd just write this up once so I can link to it later. :~)
First, here are a few articles that touch on some of the keys to how I read so much and how I make sure I remember the important bits:
- Farnam Street: Finding Time to Read
- Farnam Street: How to Read a Book
- Fogus: Extreme Reading
- Fogus: Reading for the Rushed
I can’t say I follow these exact principles – among other things, I’m definitely less diligent about some of my reading than what they outline. But that’s a conscious choice in many (but not all) cases.
slate.config('orderScreensLeftToRight', true); | |
const SCREENS = { | |
leftScreen: 0, | |
middleScreen: 1, | |
rightScreen: 2, | |
}; | |
const WINDOW_ORIGINS = { | |
leftHalf: { |
// originally by @SethTisue, see http://stackoverflow.com/questions/40622878/how-do-i-tell-sbt-to-use-a-nightly-build-of-scala-2-11-or-2-12/40622879#40622879 | |
resolvers += "nightlies" at "https://scala-ci.typesafe.com/artifactory/scala-release-temp/" | |
scalaVersion := { | |
val propsUrl = new URL("https://scala-ci.typesafe.com/job/scala-2.12.x-integrate-bootstrap/lastSuccessfulBuild/artifact/jenkins.properties/*view*/") | |
val props = new java.util.Properties | |
props.load(propsUrl.openStream) | |
props.getProperty("version") | |
} | |
scalaBinaryVersion := "2.12" |
package demo | |
import scala.tools.nsc.io.AbstractFile | |
import scala.tools.nsc.{Global, Phase} | |
import scala.tools.nsc.plugins.{Plugin, PluginComponent} | |
class DemoPlugin(val global: Global) extends Plugin { | |
import global._ | |
override def init(options: List[String], error: String => Unit): Boolean = true |
object StaticFile { | |
// Various necessary imports. Notes: | |
// | |
// 1. fs2 is necessary. See https://github.com/functional-streams-for-scala/fs2 | |
// 2. streamz is necessary. See https://github.com/krasserm/streamz | |
// 3. Apache Tika is used to infer MIME types from file names, because it's more reliable and | |
// fully-featured than using java.nio.file.Files.probeContentType(). | |
// | |
// If using SBT, you'll want these library dependencies and resolvers: |