- Like C, but with garbage collection, memory safety, and special mechanisms for concurrency
- Pointers but no pointer arithmetic
- No header files
- Simple, clean syntax
- Very fast native compilation (about as quick to edit code and restart as a dynamic language)
- Easy-to-distribute executables
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
################################################################################ | |
### OpenCV2 Installation Script ### | |
################################################################################ | |
# Source code at https://github.com/arthurbeggs/scripts # | |
################################################################################ | |
# # | |
# Feel free to copy and modify this file. Giving me credit for it is your # | |
# choice, but please keep references to other people's work, which I don't # |
(previous Yoneda blog) (reddit) (twitter)
Let's explore the Yoneda lemma. You don't need to be an advanced Haskeller to understand this. In fact I claim you will understand the first section fine if you're comfortable with map
/fmap
and id
.
I am not out to motivate it, but we will explore Yoneda at the level of terms and at the level of types.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Summon the naturals */ | |
type Zero = 0; | |
type Succ<T extends Succ<any> | Zero> = { | |
next: T; | |
} | |
// Construct a few naturals. | |
type n0 = Zero; | |
type n1 = Succ<n0>; | |
type n2 = Succ<n1>; |