Scalaz | |||
Symbol | Code | Ascii | Example |
---|---|---|---|
η | 951 | pure | 1.η[List] |
μ | 03BC | join | List(List(1,2,3), nil, List(5,6,7)) μ |
∅ | 2205 | zero | ∅[Int] |
<∅> | empty | <∅>[Option, Int] |
|
∙ | 2219 | contramap | ((_:String).length ∙ (_:Int).toString ∙ ((_:Int) + 6))(5) |
∘ | 2218 | map | (((_:Int) + 6) ∘ (_:Int).toString ∘ (_:String).length)(5) |
∘∘ |
/ This takes forever and seems to use a lot more memory than expected | |
Array.ofDim[Double](2048, 2048, 2048) | |
// This seems to work faster and uses less memory. | |
def get1d(d1 : Int, init : Double) = Stream.continually(init) take d1 toArray | |
def get2d(d1 : Int, d2 : Int, init : Double) = Stream.continually( get1d(d2, init) ) take d1 toArray | |
def get3d(d1 : Int, d2 : Int, d3 : Int, init : Double) = Stream.continually( get2d(d2, d3, init) ) take d1 toArray | |
// More testing is needed. |
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
# Install Java. | |
sudo echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | debconf-set-selections | |
sudo add-apt-repository -y ppa:webupd8team/java | |
sudo apt-get update -y | |
sudo apt-get install -y oracle-java8-installer | |
sudo rm -rf /var/lib/apt/lists/* | |
sudo rm -rf /var/cache/oracle-jdk8-installer | |
# Define commonly used JAVA_HOME variable and update PATH | |
echo 'export JAVA_HOME=/usr/lib/jvm/java-8-oracle' >> ~/.bashrc |
For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.
After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft
Partly updated June 2023
General caution: Chrome OS is a secure OS by design, but this has at least one key consequence. If you change your Google account password, you will still be required to enter the old password the next time you access each Chrome OS device. Devices are encrypted with that password, so the OS needs to decrypt using the old password then re-encrypt using the new one. If you forget your old password you will lose access to your Chrome OS device data. As always, make sure you keep backups up to date.
If you have multiple Chrome OS accounts (Say, work and play), you can quickly sitch between them without logging out:
{ | |
"conceal.substitutions": [ | |
{ | |
"language": [ | |
"tla+", | |
{ | |
"pattern": "**/*.tla" | |
} | |
], | |
"substitutions": [ |