zjonsson's comments

zjonsson | 10 years ago | on: Node.js: Cluster vs. Async

If you look more closely at the actual code, this exercise compares the performance of readFileSync (an operation that deliberately blocks) on 1 core vs 2 cores.

zjonsson | 11 years ago | on: Constant Energy Diffusion in D3

Initially they overlap which is one of the main cause of the jitter. Spreading out the initial locations would be a remedy, but then I would have to find a different way to explain "diffusion" to my daughter :)

zjonsson | 12 years ago | on: Show HN: Speedsums

This works as well (using jquery): var a=0,t;setInterval(function(){t=$("#question").text().replace('x','*').replace('÷','/');t=t.slice(0,t.length-2);if(t!=a)$("#answer").val(eval(t)).keyup();a=t;},0);

zjonsson | 12 years ago | on: Want To Know Where BTC Prices Are Going? Watch USD

For continuous known functions we would look at the mathematical derivative (using stochastic calculus). For sparse sample data with an unknown derivative, we resort to calculating differences between consecutive numbers.

zjonsson | 12 years ago | on: Want To Know Where BTC Prices Are Going? Watch USD

This analysis is interesting, however I have to comments on the methodology:

* Same measure

Comparing USD/INDEX with BIT/USD is a little bit like comparing apples and oranges, as the underlying measure for each of the time-series is different.

Multiplying BIT/USD with USD/INDEX gives us a time-series that is BIT/INDEX. Subsequently USD/INDEX can be compared with the new BIT/INDEX to get the correlation between USD and BIT with the INDEX basket as a measure.

* Correlation is only relevant for non-integrated series

It's well known that correlation for any unrelated random walks can easily be very high (positive or negative) in a spurious and random manner. The solution here might be to take the take first-difference (geometrical) of both series (de-integrating) and then check the resulting differences for correlations.

zjonsson | 13 years ago | on: The Future of Excel

Not only that, regular algebraic operations also work with vectors/matrices as inputs, as long as you press CTRL-SHIFT-ENTER after editing. This means that most functions with complex MATCH and OFFSET can be replaced as well (i.e. SUM( (column_vector = cvalue) * (row vector = vvalue) * (matrix))

zjonsson | 13 years ago | on: Show HN: Earthquakes on Leaflet, Crossfilter and D3

D3 is an excellent tool for managing a large array of SVG objects. Connecting it to leaflet is easy, just call function _initPathRoot() on the leaflet map object, followed by d3.select("#map").select("svg"). Then you can use map.latLngToLayerPoint(..) and map.latLngToLayerPoint(...) leaflet functions to calculate the X,Y coordinates in SVG space.

zjonsson | 13 years ago | on: Show HN: Earthquakes on Leaflet, Crossfilter and D3

A great idea, however the web workers would have to be semi-persistent as the initial build of the crossfilter object takes some time (i.e. I wouldn't spawn a new worker on a new request). Here I simply increased the heroku nodes to respond smoothly to Hackernews traffic. I'm pretty happy with the results.
page 1