- VSCode or IntelliJ?
- Literals
- Expressions have types and produce values
- Compound expressions
- All values are objects
- Method call syntax
minikube : I0202 12:40:59.542903 6584 out.go:229] Setting OutFile to fd 84 ... | |
At line:1 char:1 | |
+ minikube start --alsologtostderr -v=5 2>minikube-err.txt | |
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
+ CategoryInfo : NotSpecified: (I0202 12:40:59....le to fd 84 ...:String) [], RemoteException | |
+ FullyQualifiedErrorId : NativeCommandError | |
I0202 12:40:59.543906 6584 out.go:242] Setting ErrFile to fd 3752... | |
I0202 12:40:59.556903 6584 out.go:236] Setting JSON to false | |
I0202 12:40:59.565255 6584 start.go:106] hostinfo: |
The original poster said they wanted to construct a curriculum to become a "web artist and/or use code or electronics to create art". | |
In well established fields there are reasonably well established expectations as to what a curriculum involves. E.g. for computing there is an accreditation body (https://dev.csab.org/info-for/programs/) and widely agreed upon curriculum guidelines (e.g. https://www.acm.org/education/curricula-recommendations). So there is reasonably widely shared understanding of what someone undertaking, say, a computer science degree should learn. Computing is interesting because there are so many new alternate routes such as bootcamps but even here I think they are informed by the above (e.g. https://github.com/Ada-Developers-Academy/textbook-curriculum has elements that would be found in almost all university curriculums) | |
I believe "creative computing", or whatever we want to call OP's goal, is different. It's defined by the output (e.g. "creative application of computing") more than by |
> java -version 1397ms Thu 7 May 10:38:16 2020 | |
openjdk version "14.0.1" 2020-04-14 | |
OpenJDK Runtime Environment AdoptOpenJDK (build 14.0.1+7) | |
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 14.0.1+7, mixed mode, sharing) | |
> java -jar ping-server.jar -XX:+UnlockExperimentalVMOptions -XX:+UseZGC -XX:+UseJVMCICompiler | |
[ioapp-compute-0] INFO o.h.b.c.n.NIO1SocketServerGroup - Service bound to address /[0:0:0:0:0:0:0:0]:8080 | |
[ioapp-compute-0] INFO o.h.s.b.BlazeServerBuilder - | |
_ _ _ _ _ | |
| |_| |_| |_ _ __| | | ___ | |
| ' \ _| _| '_ \_ _(_-< |
import scala.compiletime._ | |
import scala.compiletime.ops.any | |
// This is a standard HList plus data is keyed by a type K | |
sealed trait HList { | |
def :::[K <: AnyVal, V](data: V): HCons[K, V, this.type] = HCons(data, this) | |
inline def contains[K <: AnyVal]: Boolean = | |
inline this match { | |
case HNil => false |
import scala.compiletime._ | |
import scala.compiletime.ops.any | |
final case class Col[Key, Value](data: Array[Value]) | |
object Frame { | |
object Types { | |
type Get[F <: Tuple, Key] = | |
F match { | |
case Col[Key, v] *: cols => v |
final case class Id(value: String) extends AnyVal | |
sealed trait Question[A] { | |
def id: Id | |
def prompt: String | |
} | |
object Question { | |
final case class IntQuestion(id: Id, prompt: String) extends Question[Int] | |
final case class StringQuestion(id: Id, prompt: String) extends Question[String] | |
final case class MultipleChoiceQuestion(id: Id, prompt: String, choices: List[String]) extends Question[String] |
The reader monad is one solution to "dependency injection". This document shows how we might discover the reader monad when we attempt to solve this problem.
Our working definition of the dependency injection problem will be this: we have a method or function that takes certain parameters that we don't want to specify every time we call it. For example, we might have a function that gets a user given an ID and also requires a database connection.
def getUser(db: DbConnection, id: Id): User =
import java.util.Date | |
sealed trait DataFrame[A] { | |
import DataFrame._ | |
def size: Int = | |
this.foldLeft(0)( (s, _) => s + 1 ) | |
def foldLeft[B](z: B)(f: (B, A) => B): B = | |
this match { |
object Website { | |
import cats.free.Free | |
import cats.Comonad | |
import scala.io._ | |
final case class User(username: String) | |
sealed trait Page | |
final case object Welcome extends Page | |
final case object TryAgain extends Page |