Skip to content

Instantly share code, notes, and snippets.

View zerosign's full-sized avatar
🏠
Working from home

zerosign zerosign

🏠
Working from home
View GitHub Profile
@zerosign
zerosign / rulesets.plan
Created January 14, 2020 10:25
dsl kinda language for rulesets
sets Admin {
use global.Admin;
extend role.infra.Admin;
user babel;
}
user babel {
email "tower_babel@gmail.com";
email "babel@gmail.com";
- https://www.cs.kent.ac.uk/people/staff/mjb211/docs/toc.pdf
- https://fzn.fr/readings/c11comp.pdf
- http://demsky.eecs.uci.edu/publications/c11modelcheck.pdf
- https://arxiv.org/pdf/1503.07073.pdf
- https://link.springer.com/chapter/10.1007/978-3-030-25540-4_22
- https://people.mpi-sws.org/~viktor/papers/popl2017-promising.pdf
- https://plv.mpi-sws.org/fsl/ARC/paper.pdf
- https://sf.snu.ac.kr/publications/promising.pdf
- https://robbertkrebbers.nl/research/articles/aliasing.pdf
import java.util.Optional;
import java.util.function.Supplier;
import java.util.concurrent.atomic.AtomicReference;
public final class SupplyOnce<T> implements Supplier<Optional<T>> {
private final AtomicReference<T> inner;
private final Supplier<T> closure;
public SupplyOnce(final Supplier<T> closure) {
this.inner = new AtomicReference<T>(null);
Competitive Strategy
The Mind of the Strategist
Business Model Generation
The Art of Profitability
Competitive Analysis
#![feature(prelude_import)]
#[prelude_import]
use std::prelude::v1::*;
#[macro_use]
extern crate std;
extern crate serde;
extern crate serde_json;
use std::sync::atomic::{AtomicUsize, Ordering};
static INDEX: AtomicUsize = AtomicUsize::new(0);
use serde::{Deserialize, Serialize};
why using `*` selection for mutating states in running system may breaks the symmetry in computation ?
- the updates only reflects to value of `*` on that specified time which is implicitly dependent
to the states before the action is running
- since #1 is true, the operations itself are unsafe to be done out of order and might resolved to
ambiguity.
~ better API will resolve batches computation by defining states queries specificly rather than exposing
queries into end user
`Lattice Theory : Special Topics and Applications Volume 1`
@zerosign
zerosign / Main.kt
Last active September 18, 2019 15:32
StringConcatFactory optimization :'(
fun main(args: Array<String>) {
val hello = "Hello"
println("$hello world")
}
> client.connectionManager.pool
Pool {
_events: [Object: null prototype] {},
_eventsCount: 0,
_maxListeners: undefined,
_config: PoolOptions {
fifo: true,
priorityRange: 1,
testOnBorrow: true,
testOnReturn: false,