.mixin (...) { // matches 0-N arguments
.mixin () { // matches exactly 0 arguments
.mixin (@a: 1) { // matches 0-1 arguments
.mixin (@a: 1, ...) { // matches 0-N arguments
.mixin (@a, ...) { // matches 1-N arguments
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
use std::io; | |
use std::net; | |
use std::os::unix::io::AsRawFd; | |
use std::os::unix::io::RawFd; | |
use std::time; | |
#[repr(C, packed)] | |
pub struct Descriptor { | |
fd: RawFd, | |
events: libc::c_short, |
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
### Keybase proof | |
I hereby claim: | |
* I am cloudhead on github. | |
* I am cloudhead (https://keybase.io/cloudhead) on keybase. | |
* I have a public key whose fingerprint is 9453 A236 6051 325A 9983 4A19 0F08 5776 FC21 7A78 | |
To claim this, I am signing this object: |
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
package main | |
type Error struct { | |
Err error | |
} | |
func (e *Error) Error() string { | |
return e.Err.Error() | |
} |
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
newtype Inventory = Inventory (IntMap (Maybe Item)) | |
nextFreeSlot :: Inventory -> Maybe IntMap.Key | |
nextFreeSlot (Inventory inv) = | |
go $ IntMap.toAscList inv | |
where | |
go ((k, Nothing) : _) = Just k | |
go [] = Nothing | |
go (_ : xs) = go xs |
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
package queue | |
import "sync" | |
type Message string | |
type Queue struct { | |
wmu sync.Mutex | |
cmu sync.Mutex | |
slice []*Message |
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
# cloudhead's ASCII Emoticon reference | |
T,T Q,Q T_T # Crying face | |
^,^ ^_^ # Happy face | |
<,< <_< # Uncertain or hesitant face | |
V,V V_V # Tired uncertain face, also "Sighing" face | |
*,* *_* # Exhausted face/Too much computer face | |
@,@ @_@ # Hangover face | |
o,o O,O # Surprised face | |
^.^ # Happy dog face |
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/sh | |
set -xeo pipefail | |
eval $1 | eval $2 |
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
package main | |
func main() { | |
println("starting..") | |
go func() { | |
println("hello") // This never prints | |
}() | |
for {} |
NewerOlder