HNHacker News
TopNewBestAskShowJobs

obastani

802 karma · joined September 16, 2013

submissionscomments
obastani··on Things Rust shipped without
I imagine that if you have more instructions (a few hundred) the overhead of the switch starts to become significant. At 256 opcodes you need 8 jumps, and hence 8 CPU cycles. That's non-trivial, especially if most of the opcodes can be implemented more quickly than this. For example, a quick Google search says that for an Intel CPU, addition is 1 cycle and multiplication is 3 cycles.
obastani··on Why Google Employees Quit (2009)
From reading the posts in the article, it seems like the long hiring process raised expectations: people were willing to put up with it because they thought working at Google would be great, and were all the more disappointed when they found out they didn't like it there.
obastani··on No more dieting and other things we do differently after reporting on healthcare
Actually, if the insuree is rational, it especially makes sense for the insurance company to pay for the annual checkup. If the insurance company only covers me when I get really sick, I lose money by going for the annual checkup -- I'm "better off" waiting to get really sick, and then having them cover all of my expenses.
obastani··on The tensor renaissance in data science
I see a lot of answers describing what tensors are, but none really describe why they're important. To understand this, let's go back to some first-year Calculus. If we have a function f, we can approximate f as

f(x+dx) = f(x) + f'(x)dx + O(dx^2)

This should look familiar: taking a = f(x) and b = f'(x), this is just the line a + b.dx! In other words, Calculus is just a way transforming questions about (differentiable) functions into questions about lines.

So this is all well and good, but what if x is a vector? Or f(x) is a vector? Or both? Well, now we can approximate

f(x+dx) = f(x) + Df(x).dx + O(|dx|^2)

Here, Df(x) is nothing other than the matrix [(df_i/dx_j)(x)]. In other words, we still get a linear approximation. But now suppose we get greedy and want to take higher order derivatives: what is the derivative of Df(x)? It's a tensor!

There are a few ways to think about this (which gives rise to the different interpretations of a tensor):

1. It's just df_i/(dx_jdx_k). This is a multi-dimensional array.

2. In 1D, we have

f(x+dx) = f(x) + f'(x)dx + (1/2)f''(x)dx^2 + O(dx^3)

In higher dimensions, we get

f(x+dx) = f(x) + Df(x)*dx + dx'.D^2f(x).dx + O(|dx|^3)

Here, D^2f(x) is a multi-linear map: it takes in two copies of the vector dx, and returns a new vector.

More generalizations exist for various reasons, but I think this intuition captures why tensors show up so often.

obastani··on 'Silicon Valley Is Coming' Warns JP Morgan CEO
The laws put in place are not stupid -- they are put in place to protect both riders and drivers against well-known market failures such as information asymmetry and market-for-lemons [1,2]. They may be outdated and in need of revision, but I think it's premature to conclude that Uber has all the right answers.

[1] http://en.wikipedia.org/wiki/The_Market_for_Lemons [2] http://time.com/3592035/uber-taxi-history/

obastani··on 'Silicon Valley Is Coming' Warns JP Morgan CEO
Sure there is -- they can make alternatives illegal. Then big companies must accept the government sponsored digital currency, which would make it the only currency viable for mass market (alternatively, no digital currency will be widely adopted).
obastani··on What I'd tell myself about startups if I could go back 5 years
I didn't really understand this one -- what does it mean to be a brilliant developer who doesn't ship?
obastani··on Parents with annual family incomes below $125,000 will pay no tuition
I'm sure Stanford offers partial aid as well -- this is just the threshold for zero contributions.
obastani··on We Need a Manhattan Project for Cybersecurity
I see this sentiment a lot ("security is a matter of best practices"), but I'm an outsider, and I've never seen a description of what this entails (at a high level). What are the kinds of best practices that you think would help solve the problem? Thanks!
obastani··on Curry On Prague 2015: Academia and industry need to have a talk
Is this related to what you have in mind?

http://adam.chlipala.net/papers/UrWebPOPL15/

obastani··on Using the Quick Raise of Matrices to a Power to Write a Fast Interpreter
Regarding the caveat, computing ϕ^N is really equivalent to computing a matrix power M^N. Recall that ϕ=(1+√5) (I dropped the 1/2 for convenience.) Suppose we represent numbers like x+y√5 as [x y]. Then multiplication by ϕ corresponds to multiplication by the matrix

ϕ_mult = [[1 5] [1 1]]

This is because ϕ(x+y√5)=(x+5y)+(x+y)√5, and

[[1 5] [1 1]] [x y] = [x+5y x+y]

Now, to compute ϕ^N, we just have to compute [x y] = ϕ_mult^N[1 0] (since [1 0] is the representation of 1=1+0√5). Then ϕ^N=x+y√5. This is all exact, no floating point arithmetic!

It's actually just an example of an algebraic number field [1] -- the idea is that "algebraic numbers" (i.e., roots of polynomials) can be equivalently thought of as vectors and matrices. The simplest example, which everyone is familiar with, is the complex numbers, where i=√(-1). In this case, [x y] represents x+y*i, and multiplication by i corresponds to the matrix i_mult=[[0 1] [-1 0]]. Then i_mult^2= -[[1 0] [0 1]], in other words, multiplication by -1!

[1] http://en.wikipedia.org/wiki/Algebraic_number_field

obastani··on Wave-particle duality is the uncertainty principle in disguise
This seems to be a key reference (article titled "Complementarity and uncertainty"):

http://www.nature.com/nature/journal/v375/n6530/pdf/375367b0...

In particular, they have a description of why they find the traditional connection between uncertainty and wave-particle duality to be unsatisfactory. Unfortunately the technical details are beyond me, but hopefully someone else can sort them out?

Edit: Okay, some more digging suggests the following story: (i) We have wave-particle duality => Heisenberg uncertainty, but not the other way around (ii) With entropic uncertainty [1] (stronger than Heisenberg uncertainty), the authors show that we can obtain wave-particle duality

Again, can somebody more knowledgeable can clarify? :)

[1] http://en.wikipedia.org/wiki/Entropic_uncertainty

obastani··on Markov Chains vs. Simulation: Flipping a Million Little Coins
Yes, but you can get other quantities with this approach as well (though not in nearly as nice a form). To do this, consider the random matrix

t = Bernoulli(T) (i.e., T = E[t])

The distribution is

m_n = M_1 t_1 ... t_n,

which has expected value

M_n = E[m_n] = E[M_1 t_1 ... t_n] = M_1 T^n

Here, each of the t_i is an i.i.d. sample of t. You can similarly compute the variance:

Var[m_n] = Var[M_1 t_1 ... t_n]

I don't know a closed form for this off the top of my head, but at this point simulations are probably the best way to go.

obastani··on Kale, cauliflower, cabbage, broccoli, Brussels sprouts are all the same species
Did you read that article fully? It's a satire (see the last section)...
obastani··on The Curse of Smart People
Godel constructed statements S that are neither true nor false (more precisely, you could add an axiom saying "S is true", or you could add an axiom saying "S is false", and you'd get a consistent logical system either way).

It turns out that if you can prove something is both true and false, then EVERYTHING is both true and false. For example, let's say you want to prove X. Note that Y is true. But then you obtain a contradiction (since Y is false)! Hence X is true.

obastani··on Bill Gates: I assume my phone's not being tapped
Am I the only one who interpreted him as saying he ought to be able to assume that his phone calls/emails are private? He clarifies:

"So there is a basic sense that whoever is providing that technology has to make sure it's secure."

I think he's just saying it's the job of the mail service to provide security, not something the end user should need to worry about.

← PreviousPage 7 of 7