Skip to content

Instantly share code, notes, and snippets.

jl777 wrote:

why not have the way you allocate the memory determined how it behaves?

In a garbage collected (GC) language such as JavaScript, you don't actually ever explicitly allocate and deallocate memory. Thus we avoid the bug of crashing when a pointer points to memory that has already been freed, or the memory leaks due to forgetting to deallocate memory. GC languages can still have semantic memory leaks though, such as forgetting to remove an event handler. Automatic reference counting pointers have the flaw that they memory leak where there is a circular reference (pointer points to some structure which contains a pointer which points back to the struct that contains the first pointer).

So GC is much easier for the programmer than manually tracking memory allocation and deallocation. But it has one disadvantage which is that it requires up to 5X the memory to achieve the same performance, and the mark-and-sweep pauses can lockup the machine for many seconds. There are ways to improve the GC. The m

DDoS Defense Employing Public Key Cryptography

A fast rejection signature is an essential ingredient for asymmetric leverage against distributed denial-of-service in many scenarios.

Distributed denial-of-service (DDoS)

At a high level of abstraction, the ontological taxonomy of denial-of-service attacks categorize into either A) network bandwidth flooding; or B) saturated consumption a resource other than bandwidth[1].

In both cases, the attacker gains leverage by exploiting some asymmetry in the consumption or (uncompensated) cost of the attacked resource.

Version Control

Distributed Version Control

Each repository in a distributed version control system (DVCS) such as Git and Mercurial, is a [directed acyclic graph] (DAG). Each DAG node is a [cryptographic] hash that uniquely identifies (i.e. hashes or checksums) a comment, the set of changes (a.k.a. ‘commit’ or ‘changeset’) from, and the cryptographic hash of each of, the directly antecedent ‘parent’ changeset(s). A ‘merge’ changeset has multiple parents, and specifies the changes to each parent such that all those parents result in the same content.


Figure 1. ‘M’ is a merge of parents ‘D’ and ‘E’

The Union Type Quiz
===================
0. Please give your typing approach an intuitive name:
Consistent, Unified Subsumption
1. Please describe the guiding principle of your typing approach in one sentence: