Skip to content

Instantly share code, notes, and snippets.

View ukstv's full-sized avatar

Sergey Ukustov ukstv

View GitHub Profile

Resilience — RES with built-in dividend pathways and swarm redistribution, for decentralized basic income

The idea to use the global financial network of daily transactions, and to link these transactions together into a web, is a bit similar to Tim Berners-Lee's idea to link all documents on the internet together with the Hypertext Transfer Protocol (HTTP), which gave us the world wide web.

When Tim Berners-Lee had the idea for the world wide web in the 80s, there were already documents on the internet. He did not have to invent the internet, and his contribution was instead that he saw a way to harness the information on the internet in a new way.

The same goes for the Resilience protocol. The world is electrified with millions, or billions, of financial transactions happening every single day. The global financial network is part of our infrastructure already. What Resilience aims to do is to re-purpose these transaction networks, into a we

2006 - Agreeing to Agree - Conflict Resolution for Optimistically Replicated Data
2007 - Designing a Commutative Replicated Data Type
2009 - CRDTs - Consistency without Concurrency Control
2011 - A Comprehensive Study of Convergent and Commutative Replicated Data Types
2011 - Conflict-free Replicated Data Types
2011 - Optimistic Concurrency Control by Melding Trees
2012 - A Lattice-Theoretical Approach to Deterministic Parallelism with Shared State
2012 - An Optimized Conflict-free Replicated Set
2012 - Brief Announcement: Semantics of Eventually Consistent Replicated Sets
2012 - Key-CRDT Stores
@ukstv
ukstv / a.rb
Created October 4, 2016 15:13
Results of a splat call benchmark
require "benchmark"
iterations = 10_000_000
def splat(*args)
args.first
end
def nosplat(args)
args.first

Ох, и презабавная штука – эти защитные инструкции. Можно создать и спустить с цепи такого юридического монстра, что потом с ним десятилетиями не сладишь.

Например, дело о долларе деда Купера длится уже пятьдесят лет, и похоже, юристы будут биться с этим до конца сто-летия, когда его доллар станет дороже всей планеты.

Вот вкратце его история.

Дед Купер считал себя большим умником. Он приобрел траст стоимостью в один доллар, доходы от которого завещал первому ребенку своей единственной дочери по достижении им двадцати одного года. Кстати, тогда его дочери было четыре годика. Потом дед умер, оставив электронную инструкцию (ее быстренько обозвали «крестной феей» ), оперирующую трастом без помощи человека. Программа сначала вложила доллар в китайские трудовые соглашения, а потом в оптическую промышленность – за три недели до Пакистанского договора. После этого приобрела фьючерсные акции микробиотехнологической «Эппл» фирмы за восемнадцать дней до реализации проекта «Пепин», и так далее. За пятнадцать лет электр

var = {
'A': {
'average_angle': (1447907856.570218,),
'angles': (1447907856.979867,)
},
'pairs': {
'average_angle': {'A': None, 'v': None},
'angles': {
'A': {
'21b635f8-4f5b-4ac0-ab82-21978a95575b': (1447907856.979862,)
require 'socket'
address = Addrinfo.tcp('224.0.0.1', 5670)
socket = UDPSocket.open
socket.setsockopt(:IPPROTO_IP, :IP_MULTICAST_TTL, 1)
socket.send("From Sergey with love: " + Time.now.to_s, 0, address.ip_address, address.ip_port)
socket.close
import java.io.{DataOutputStream, ByteArrayOutputStream}
import java.nio.ByteBuffer
import java.security.{KeyPairGenerator, SecureRandom}
import javax.crypto.{KeyGenerator, Cipher}
import javax.crypto.spec.IvParameterSpec
import akka.actor.{ ActorRef, ActorSystem, Props, Actor }
sealed trait Message
case class Start(visavis: ActorRef)
object Trampolines {
def odd[A](as: List[A]): TailRec[Boolean] =
as match {
case Nil => Return(false)
case _ :: xs => Suspend(() => even(xs))
}
def even[A](as: List[A]) = as match {
case Nil => Return(true)
case _ :: xs => Suspend(() => odd(xs))
@ukstv
ukstv / .gitignore_global
Created November 28, 2013 03:24
Global Gitignore file
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
class EnumType < DelegateClass(Symbol)
# ...
end
Symbol.instance_eval do
def ===(other)
if other.kind_of?(EnumType)
true
else
super(other)