Skip to content

Instantly share code, notes, and snippets.

Working from home

Cons Bulaqueña consbulaquena

Working from home
View GitHub Profile

Getting Started in Scala

This is my attempt to give Scala newcomers a quick-and-easy rundown to the prerequisite steps they need to a) try Scala, and b) get a standard project up and running on their machine. I'm not going to talk about the language at all; there are plenty of better resources a google search away. This is just focused on the prerequisite tooling and machine setup. I will not be assuming you have any background in JVM languages. So if you're coming from Python, Ruby, JavaScript, Haskell, or anywhere…  I hope to present the information you need without assuming anything.

Disclaimer It has been over a decade since I was new to Scala, and when I was new to Scala, I was coming from a Java and Ruby background. This has probably caused me to unknowingly make some assumptions. Please feel free to call me out in comments/tweets!

One assumption I'm knowingly making is that you're on a Unix-like platform. Sorry, Windows users.

Getting the JVM


Go vs. Scala (Akka) Concurrency

A comparison from 2 weeks using Go.

Actors vs. Functions

Akka's central principle is that there you have an ActorSystem which runs Actors. An Actor is defined as a class and it has a method to receive messages.

View tree-to-list.clj
(defn tree-to-list [tree root-id root-key]
(flatten (cons
(get tree root-id)
(fn [filter-result]
(first filter-result)
(filter-by-parent tree root-key root-id)))))
keith /
Last active Dec 22, 2016
Build to iOS 10 from Xcode 7.3.1
asciimike / AppDelegate.swift
Last active Nov 16, 2018
Zero to App: Develop with Firebase (for iOS - Google I/O 2016)
View AppDelegate.swift
// AppDelegate.swift
// ZeroToApp
import UIKit
import Firebase
import FBSDKCoreKit
View openbsd-hyperv.dmesg
OpenBSD 5.9 (GENERIC.MP) #163: Wed Feb 17 22:48:13 CET 2016
real mem = 520028160 (495MB)
avail mem = 500105216 (476MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.3 @ 0xf8ec0 (216 entries)
bios0: vendor American Megatrends Inc. version "090006" date 05/23/2012
bios0: Microsoft Corporation Virtual Machine
View Valentine.swift
import UIKit
import XCPlayground
let a = 10
let layer = CAShapeLayer()
layer.strokeColor = UIColor.redColor().CGColor
layer.fillColor = UIColor(red: 1, green: 0.33, blue: 0.33, alpha: 1).CGColor
layer.lineWidth = 12
kharrison / String.swift
Last active Oct 19, 2020
Swift String Playground Examples
View String.swift
// Swift Standard Librray - String
// Keith Harrison
// Import Foundation if you want to bridge to NSString
import Foundation
// ====
// Initializing a String
// ====
bitemyapp / gist:8739525
Last active May 7, 2021
Learning Haskell
View gist:8739525