HNHacker News
TopNewBestAskShowJobs

balefrost

292 karma · joined September 4, 2015

submissionscomments
balefrost··on Matrix multiplication inches closer to mythic goal
That doesn't seem to be what they are saying. Here's the first sentence of the paragraph that I had originally quoted:

As matrices grow larger, the number of multiplications needed to find their product increases much faster than the number of additions.

The whole paragraph is talking about the multiplications and additions needed to find the product of two matrices.

balefrost··on Matrix multiplication inches closer to mythic goal
However, the number of additions required to add those sets of matrices is much closer together. Generally, the number of additions is equal to the number of entries in the matrix, so four for the two-by-two matrices and 16 for the four-by-four matrices.

Maybe my linear algebra is REALLY rusty, but I that doesn't seem right to me.

For two 4x4 matrices, each element in the output matrix will be the sum of four products. So each of the 16 output elements will require 3 additions, and you'll need a total of 48 additions.

I'm not sure where they're getting "16 additions" from.

To multiply two nxn matrices according to the textbook method, I think you'll need n^3 multiplications and n^3-n^2 additions.

I don't doubt that the multiplication time dominates the algorithm. Maybe this is just a nitpick.

balefrost··on Pandemic speeds largest test yet of universal basic income
Unless we decide to print money, not everybody will end up with an extra $1000 / month. The money that would be paid out in UBI will either come from taxes or from efficiencies gained by dropping the patchwork of benefits programs.

My expectation is that if I receive $12k / year in UBI, my tax burden will likely also increase by about $12k / year - maybe less, probably more. I don't think UBI would have any significant effect on me unless I lose by job (or decide to quit, which is an advantage of UBI).

I think the scenario you describe might affect poorer people, though. It really depends on how much the other social programs are walked back under UBI. If a poor family gains $1k in UBI but also loses $1k in other welfare programs, then landlords will likely not be able to raise rent without also losing tenants.

balefrost··on Pandemic speeds largest test yet of universal basic income
I think part of the goal too is to remove the stigma associated with those programs. I know some people look down on those who use food stamps, or suspect that people use food stamps to buy lobster and filet mignon, or barter their food stamp purchases for things that you can't buy with food stamps.

With UBI, everybody's using cash.

balefrost··on 16-inch MacBook Pro
Heck, I wonder why they don't have BOTH function keys AND a touch bar. It looks like they could shrink the oversized touchpad slightly to recover enough space. Is it because the cost would be too high? Is it because it would ruin their design? Or is there some other reason?
balefrost··on Why are tech companies making custom typefaces?
San Francisco (Apple's font) is also mentioned.
balefrost··on The future of Java and OpenJDK updates without Oracle support
To be fair, the relevant quote from that article (and from the terms) is:

> You may not: use the Programs for any data processing or any commercial, production, or internal business purposes other than developing, testing, prototyping, and demonstrating your Application;

Which seems to suggest that you can use the Oracle JDK to develop, test, prototype, and demonstrate your application, even in a commercial setting. You just can't run Oracle JDK in production without a license. But IANAL.

As for the JRE, I haven't really kept up. I'm not sure if there will be a separate Oracle JRE11 and what its license terms will be. Right now, only JDK11 is posted for download.

balefrost··on Go West
Can you elaborate more on "make more than 50% of that in stocks"?

It looks like GOOG is up about 120 points compared to this time last year. Is that $200k / year just from projected stock growth / dividends / etc? Do employees in this situation get issued $200k worth of stock every year? Or is it done via options? Is it a case of stocks vesting over time?

I find all this fascinating because it's so different from my experience. I work for a software company in the Philadelphia suburbs, and I have about 15 years of experience (all over the place - C#, Java, some C++, JS, etc.). When I compare myself to my local peers, I feel like I'm a pretty decent developer.

$200k+ / year total compensation seems absolutely massive to me, even factoring cost-of-living adjustments. Like in the realm of "too good to be true" or "results may vary". But now I'm wondering...

balefrost··on Go West
"If you’re good, it’s not uncommon to see software engineers with 5-6 years of experience make $300k-$400k per year in total compensation (which includes your base salary, yearly bonus and stocks)."

So I've heard this before, but it never matches up with data that sites like Glassdoor provide. Like, right now, the listings for "senior software engineer" with 10-14 years of experience in SF seem to top out around $200k in salary + bonuses, and that's the extreme upper end. The average is under $160k

Is the Glassdoor data bad, or is this a case of the author's information merely being anecdotal? Or are we comparing apples to oranges - do such people get 1/3 to 1/2 of their total compensation in stock?

balefrost··on GitTorrent: A Decentralized GitHub (2015)
When I wanted to read the SQLite source code, I was surprised to learn that the authoritative copy isn't stored in a Git repo, but rather in something called Fossil SCM (https://fossil-scm.org/). It turns out that it's a SCM built on SQLite and created specifically to store the SQLite source code. Interestingly, it has built-in issue tracking and a wiki.

I wouldn't necessarily expect people to switch from Git to Fossil. I certainly haven't. But I found it fascinating and figured others might as well.

balefrost··on How to Use Go Interfaces
I'd argue that there's no way to understand monads as a whole except by understanding the monadic laws. That is to say, I don't think there's some grand theory that unifies all monadic types. Rather, I think that certain types just happen to be monadic and, as a result, we can reason about and do certain things with those types that we can't do with other types.

What's the similarity between List, State, and IO? I'd argue that there is little similarity apart from the fact that we can define the monadic operations for all three. And, having defined those operations, we can then use more complex operations like `sequence`.

Monadic types sometimes represent data structures, sometimes represent contexts or, in the case of IO, sometimes represent nothing really at all. IO is arguably just a marker that imposes a linear sequence on what would otherwise be unsequenced computation.

In short: don't spend too much time trying to understand monads as a whole. Rather, try to understand why specific types, like List and State, happen to be monadic.

balefrost··on How to Use Go Interfaces
To take your point and run with it: in the face of evolving code, returning an interface from a function is actually more conservative than returning a struct. If you return a concrete type of some sort, then as you evolve your code, you are obligated to continue to return that specific concrete type. As your implementation of the function changes, you might want to return a different concrete type, but you are prevented from doing so. You either have to change the signature, which would break callers, or else you would need to grow that concrete type to handle all the possible ways in which it would want to represent its data.

I realize that this goes against the Go ethos of "don't think about the future; think about the now". Having said that, I don't understand why returning interfaces is seen as premature design while accepting interfaces is seen as reasonable and expected. Surely both can be examples of premature abstraction.

I'm certainly not saying that you should always return interfaces, or that returning interfaces will prevent all future refactoring pain. But working with interfaces instead of concrete types is more likely to allow your API to remain stable even as the implementation evolves.

balefrost··on How to Use Go Interfaces
To be fair, that Zed Shaw essay isn't particularly good.

1. He uses lay (i.e. non-technical) definitions of "indirect" and "abstract" to argue that the technical definitions are somehow flawed. Words have different meanings in different contexts, but he rejects those different contexts.

2. He argues that abstract classes in Java are actually a form of indirection because the abstract modifier "creates an indirect path to the real implementation". This is after he covers that "abstract" can mean "a concept or idea not associated with any specific instance".

3. He claims that no lay definition of abstraction permits the idea of "swapping out the implementation". He fails to understand that, from the client code's point of view, "swapping out the implementation" is a direct consequence of coding to the abstraction.

4. In the words of Rich Hickey, I think Zed is conflating Simple and Easy.

I don't doubt that Zed saw something legitimately objectionable and that drove him to write the essay. But in trying to formulate his point, I think he ended up conflating ideas, relying on false premises, and built an argument that didn't have much of a logical progression.

He's essentially saying "I'm right and everybody else is wrong because I looked it up in a dictionary."

balefrost··on How GDPR Will Change The Way You Develop
That deals with your interactions with the government, not your interactions with other citizens.
balefrost··on Bitcoin.org removes “fast” and “low fees” from Bitcoin description page
Sure, but you don't need proof-of-work for that. All you need is for every participant to ratify the bylaws-as-code, which you can do with simple public/private signing. The only reason that proof-of-work is needed for a currency is that the ledger is changing constantly. For something that changes infrequently, the double-spend problem (or the contractual equivalent) isn't nearly as big of a deal.

Like I said, it depends on how you define "the blockchain". Many problems don't involve an open set of untrusted peers, and many problems don't require proof-of-work. So if you include those in the definition, then the blockchain isn't appropriate for a lot of those problems. And if you exclude those aspects, then what do you have left? A chain of cryptographically signed nodes that each point to their predecessor? That's been an underpinning of x.509 for, what, over 20 years? It's nothing new.

balefrost··on Bitcoin.org removes “fast” and “low fees” from Bitcoin description page
I guess it depends on how you define "blockchain". If it's a system that involves distributed, untrusted participants and the need for proof-of-work, then I too wonder how useful that ends up being in the general case.
balefrost··on Enabling the F4 key in macOS
Depends how old your keyboard is:

https://www.macstories.net/news/apple-keyboards-receive-very...

balefrost··on VS Code Roadmap 2018
Do you use ReSharper? Keep in mind that it adds a good chunk of overhead.
balefrost··on VS Code Roadmap 2018
One very specific performance metric is startup time, and Sublime beats the pants off VSCode in that department. Creating new top-level windows in VSCode is also annoyingly slow compared to Sublime (presumably because it's spinning up a new browser context). Other than that, it seems snappy enough.
balefrost··on Google and the Resurgence of Italian Design
I'm a man whose hands are about 1/8" shorter than the average, and with your 5" phone, you're able to hit more with your tight grip than I can hit with my loose grip. With my loose grip, I can only comfortably hit about 1/4 of the screen. Maybe it has to do with the relative size of the palm to the fingers. It's actually one of the reasons that I'm a fan of big bezels on the top and bottom - it gives me something to grip if I need to use the top or bottom of the screen.
balefrost··on Google and the Resurgence of Italian Design
Your hands are not that small. My hands are not that small, and they're smaller than yours.
balefrost··on Google and the Resurgence of Italian Design
I similarly am using a charger right now that's maybe 8 years old and has no fraying. The first models were notoriously bad, but they got better over time.
balefrost··on A Tricky JavaScript Interview Question Asked by Google and Amazon
Debugging is a skill that will definitely be used on the job, and this is a stripped-down example of something that you'll definitely encounter while working in JavaScript (or any language with mutable closures).

How would you ask about this issue in interviews?

balefrost··on Microsoft ASP.Net Core 2.0.0 released
From the NuGet page, it looks like it actually runs on anything that implements .NET Standard 2.0, including .NET Core 2.0 and (hopefully in the future) the full framework.
balefrost··on Pseudo-public space in London
So that's what the tree logo means. I saw it all over the place, but I never realized what it meant.
balefrost··on JavaScript (and Node.js) Continues to Eat the World
The simpler ATmega-based Arduino boards don't have the chops to run a JavaScript runtime. The 328P used in the Uno only has 32KB of program storage and only 2KB of RAM! The Zero, which is ARM-based, has 256KB of storage and 32KB of RAM. That's still probably too little to run a full JS implementation, but it might work if the JS is precompiled before being sent to the device.

Compare with the NetDuino, which runs the .NET micro framework. It has 1.4MB of program storage and 164KB of RAM. And even that is dealing with a binary program representation.

balefrost··on Voxel.css
Imagine doing the other sides of the cubes. Now orthogonal layers will be intersecting. There's no correct order in which to draw intersecting polygons. You either need to split them (and then you're back to where you started), or you need Z-buffering.
balefrost··on MSBuild is going cross-platform with .NET Core
Maven love is far from universal:

http://kent.spillner.org/blog/work/2009/11/14/java-build-too...

← PreviousPage 3 of 3