HNHacker News
TopNewBestAskShowJobs

rwinn

722 karma · joined June 8, 2012

johan-nordberg.com
submissionscomments
rwinn··on Raft: Understandable Distributed Consensus
Ah, ok so all nodes needs to be known beforehand
rwinn··on Raft: Understandable Distributed Consensus
So what happens if a network partition occurs where both sides can elect a new leader?
rwinn··on ZeroTier: Network Virtualization Everywhere
The uninstaller is awesome! The service detects when you trash the app and uninstalls itself. Well done
rwinn··on Show HN: Stochastic – JavaScript library for simulating stochastic processes
I want to see some demos using this!
rwinn··on Xapo – Bitcoin debit card
They charge a 3% fee for currency conversion, and that's every transaction since you are paying with bitcoin.
rwinn··on Stellar
Good to hear, I'm looking forward to the other claim methods now after reading your mandate
rwinn··on Stellar
Seems off that they give you 5000 "stellars" to access your Facebook friends list and photos...
rwinn··on Source code for the Apollo 11 Guidance Computer
Project Apollo features a near-full implementation of the control panels in the Command Module and Lunar Module, and an increasingly accurate simulation of the internal systems (e.g. electrical distribution, fuel cells). Also the Virtual AGC software is supported, which allows you to run precisely the same on-board guidance software as used by the real Apollo Guidance Computer

http://nassp.sourceforge.net/wiki/Main_Page

rwinn··on Pay for GitHub with PayPal
WikiLeaks... never forget
rwinn··on True Color support in various terminals and applications
iTerm 2 is supposed to have support but I'm not having any luck (https://www.dropbox.com/s/xvl46l7ti9sqv9o/Screenshot%202014-...)
rwinn··on Nutrition: Vitamins on trial
Interactive version: http://www.informationisbeautiful.net/play/snake-oil-supplem...
rwinn··on Show HN: Richard Dawkins’ Biomorphs Implemented in JavaScript
Love it!

I wrote a small script that evolves them based on a scoring function, paste in your console and run evolve(1000, score)

    function evolve(numGenerations, scoringFn, stepInterval) {
      var children = document.querySelectorAll('[id*=child]'), generation = 0
      if (stepInterval == null) stepInterval = 10

      function run() {
        var i, child, ctx, data, score, winner, winningScore = -Infinity
        for (i = children.length - 1; i >= 0; i--) {
          child = children[i]
          ctx = child.getContext('2d')
          data = ctx.getImageData(0, 0, 318, 148)
          score = scoringFn(data)
          if (score > winningScore) {
            winningScore = score
            winner = i
          }
        }
        children[winner].click()
        if (++generation < numGenerations) setTimeout(run, stepInterval)
        // console.log(winner, winningScore)
      }

      run()
    }

    function score(imageData) {
      var i, r, g, b, rv = 0,
          data = imageData.data, l = data.length
      for (i = 0; i < l; i += 4) {
        r = 255 - data[i]
        g = 255 - data[i+1]
        b = 255 - data[i+2]
        a = data[i+3] / 255
        rv += (r + g + b) * a
      }
      return rv
    }
rwinn··on New algorithm shakes up cryptography
So what does this mean exactly?

> it is likely to have repercussions especially on the cryptographic applications of smart cards, RFID chips (2), etc.

It will be easier to bruteforce RSA/DSA?

rwinn··on Show HN: 2048 in 2048 bytes
Updated it to follow the original better. You try the updated version here:

http://johan-nordberg.com/2048/

(or if you're in the future the js1k crew might have updated my submission already, in that case, forget you read this, it was perfect from the start, whoa i need a break, my brain is trying to find ways to write this comment using fewer characters, commas are nice, sleep)

rwinn··on Show HN: 2048 in 2048 bytes
Haha that's awesome!
rwinn··on JS1k demo details: 2048
Something like that. I think it had more comments than votes all the way up, it was when it hit 40 comments it got dropped.

Crappy algo, I would think that lots of comments indicates that people find it interesting... Next time I won't reply to peoples comments :/

rwinn··on Show HN: 2048 in 2048 bytes
I'm using JSCrush (http://www.iteral.com/jscrush/) so it actually pays to write stuff out repeatedly instead of assigning short variables.

  (Math.random()*2+1)<<1
  Math.random()>.25?2:4
But still too much, I only have 2 bytes to spare :)
rwinn··on JS1k demo details: 2048
My original submission is here: https://news.ycombinator.com/item?id=7406605

Got nuked for some reason by HN's algorithm dropping it from nr 4 to the second page :(

rwinn··on Show HN: 2048 in 2048 bytes
Thanks! No not really, I just picked some colours i liked and tried to keep them easily distinguishable
rwinn··on Show HN: 2048 in 2048 bytes
> Once you reach 2048, the game continues.

That's a bug, it should pop up a dialog with your score. Rest is intentional.

  newtile = 2 vs. newtile = Math.random() > 0.25 ? 2 : 4
rwinn··on Show HN: 2048 in 2048 bytes
Heh, i'll accept a patch for swipe support. You have to keep it below 2 bytes though :D
rwinn··on Show HN: 2048 in 2048 bytes
Intentional side-effect :) I had to leave it out to keep to the 2048 byte limit.
rwinn··on Show HN: 2048 in 2048 bytes
I've been seeing that as well. Does not happen when outside of the js1k frame (http://johan-nordberg.com/2048/).

I think it is some hisenbug related to that js1k loads all entries by injecting the script in a iframes src attribute.

EDIT: clicking anywhere to focus the iframe makes it stop

rwinn··on Show HN: 2048 in 2048 bytes
Should have pressed down ;)
rwinn··on Show HN: 2048 in 2048 bytes
If you fill up the screen and make a move that does not make a new space for the next tile it is GG!
rwinn··on Show HN: 2048 in 2048 bytes
Hehe, yeah.. I had to rip that out to make it fit in 2048 bytes. It takes a (relatively) big chunk of code to know if a move is possible.
rwinn··on Bitcoin Mining Uses $15 Million's Worth Of Electricity Every Day?
On http://realtimebitcoin.info i'm assuming that running 19mh/s is consuming 1 joule. That number is a few months old now and reading on the bitcoin wiki i see that the average is probably closer to 120mhash/j. Updating it now...

https://en.bitcoin.it/wiki/Mining_hardware_comparison

rwinn··on Shaft passer
Someone with a 3D printer should try printing that model, looks like it could work.
rwinn··on Bitcoin approaching $1000
http://realtimebitcoin.info shows a weighted average from the 3 largest exchanges
rwinn··on Show HN: Theremin I/O
I can see that now as well. The screens i uploaded was PNGs, Apple must have replaced them with pretty low quality jpeg versions :/
← PreviousPage 2 of 3Next →