News for hackers. Stuff that matters.

jaws-

Re:Side-by-side Nim and Go on Friday April 10, 2015 @12:59PM (#9355610)
http://rosetta.alhur.es/compare/nim/go/#Matrix_arithmetic

Nim:

    proc det[M,N](a: Matrix[M,N]): float =
      let n = toSeq 0..a.high
      for sigma, sign in n.permutations:
        var x = sign.float
        for i in n: x *= a[i][sigma[i]]
        result += x
Go:

    func determinant(m [][]float64) (d float64) {
        p := make([]int, len(m))
        for i := range p {
            p[i] = i
        }
        it := permute.Iter(p)
        for s := it(); s != 0; s = it() {
            pr := 1.
            for i, σ := range p {
                pr *= m[i][σ]
            }
            d += float64(s) * pr
        }
        return
    }
I don't know anything about Go or Nim, but the Nim version looks infinitely more readable to me.
Re:Lightning Network: “Bitcoin Doesn’t Scale” [pdf] on Friday February 27, 2015 @10:54AM (#9119486)
Is your point that Bitcoin is an anarchist currency for buying drugs, and nothing else? That it can't possibly have value outside of online payments?

"BTC" is just the unit of account powering the blockchain. You can use a blockchain to make almost any form of digitized information into a public good. Case in point: https://www.blockscan.com/asset

The blockchain is the ultimate distributed database. No other distributed database works without a third party controlling and administering it. This is critically important for all kinds of financial markets, because otherwise the entity in control of the DB is able to manipulate outcomes, hide data, and play games with insider information, and yes this is really happening: http://deepcapture.com

And why does a purely online-only, digital content provider need your home address to send you a video file, anyway? What about a server host? Gaming platform? The credit card paradigm is obsolete for a huge amount of premium digital content. This isn't to say the US dollar is obsolete, because you can represent dollars, or euros, or gold, whatever, as auxiliary currency units on top of the Bitcoin blockchain, although you'd still need to own BTC to send it around, for many this is BTC's primary form of inherent value.

Finally, it's impossible for many people in developing nations to engage in online commerce at all, because their banking system is utter crap. Billions of people the world over are underserved by the banking system, or don't have access to a bank account.