Opinions are like assholes, every one has got one.
This one is mine.
Punctuation is a bikeshed. Put your semicolons, whitespace, and commas where you like them.
UPDATE working on this here!
so… I've had this weird idea recently...
In git (and in other secure + distributed systems) you have a tree of hashes where each object is identified by it's hash and objects contain pointers to other objects. They just have the hash of other objects stored inside them.
Verifying that "dominictarr.id" is my Blockstack ID. https://onename.com/dominictarr |
/** | |
* Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> | |
* Build: `lodash modularize modern exports="npm" -o ./npm/` | |
* Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> | |
* Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> | |
* Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors | |
* Available under MIT license <http://lodash.com/license> | |
*/ | |
/** |
function create (path) | |
var db = require('levelup')(path, {createIfMissing: true}) | |
var Replicator = require('level-replicator') | |
var replicator = Replicator(db, { | |
prefix:'replicateable', | |
merge: function (oldVal, newVal) { | |
if(!oldVal) return newVal | |
//handle the differences between old and new, | |
//the user is expected to implement some version system, | |
//and store that data in the object... |
Hey everyone - this is not just a one off thing, there are likely to be many other modules in your dependency trees that are now a burden to their authors. I didn't create this code for altruistic motivations, I created it for fun. I was learning, and learning is fun. I gave it away because it was easy to do so, and because sharing helps learning too. I think most of the small modules on npm were created for reasons like this. However, that was a long time ago. I've since moved on from this module and moved on from that thing too and in the process of moving on from that as well. I've written way better modules than this, the internet just hasn't fully caught up.
@broros
otherwise why would he hand over a popular package to a stranger?
If it's not fun anymore, you get literally nothing from maintaining a popular package.
One time, I was working as a dishwasher in a restu
//test-uncaught-errors | |
var sys = require('sys') | |
, EventEmitter = require('events').EventEmitter; | |
function error1 (err){ | |
sys.puts("Handle: " + err); | |
} | |
function error2 (err){ | |
sys.puts("JANDAL: " + err); | |
} | |
function exit (){ |
(dominic: this list of papers was originally recommended to me by Brain Noguchi @bnoguchi, and was a great start to understanding distributed systems)
Here's a selection of papers that I think you would find helpful and interesting:
The seminal paper about event ordering and concurrency. The important result is that events in a distributed system define a partially ordered set. The connection to what we're working on is fundamental, as this defines how to detect concurrent updates. Moreover, the chosen algorithm to turn the partially ordered set into a totally ordered set defines the conflict resolution algorithm.
http://research.microsoft.com/en-us/um/people/lamport/pubs/time-clocks.pdf
const fs = require('fs'); | |
const source = fs.readFileSync("./await2.wasm"); | |
const typedArray = new Uint8Array(source); | |
;(async function () { | |
var callback, frame | |
var buffer = Buffer.from("hello world!!!\n") | |
var result = await WebAssembly.instantiate(typedArray, { | |
env: { | |
print: function (ptr, len) { |
var pull = require('pull-stream') | |
require('ssb-client')(null, { | |
remote: 'net:wx.larpa.net:8008~shs:DTNmX+4SjsgZ7xyDh5xxmNtFqa6pWi5Qtw7cE8aR9TQ=' | |
}, function (err, sbot) { | |
var start = Date.now(), n = 0; | |
var ts = Date.now() | |
var _n = 0, l = 0, K = 0 |