See what the other hackers are working on.
If you like an hack, play with it.
If not, remove it.
_ = require 'underscore' # documentcloud/underscore
const db = { | |
usersBySessionToken: { | |
'1': { | |
id: 1, | |
name: 'Dan', | |
}, | |
}, | |
postsById: { | |
'2': { |
function requestUserOwnsPost(requestUser, post) { | |
return requestUser.id === post.owner; | |
} | |
const db = { | |
postsById: { | |
'2': { | |
id: 2, | |
owner: 1, | |
body: 'hey', |
precision mediump float; | |
varying vec2 position; | |
uniform float time; | |
const float waves = 19.; | |
// triangle wave from 0 to 1 | |
float wrap(float n) { | |
return abs(mod(n, 2.)-1.)*-3. + 1.; |
I hereby claim:
To claim this, I am signing this object:
import Observation | |
@Observable class StatefulService<State, API> { | |
typealias Stream = StateStream<State> | |
typealias StateStreamTask = Task<Void, Never> | |
typealias OnStateChange = (State) -> Void | |
/// The API of the service | |
let api: API | |
/// The state of the service |