HNHacker News
TopNewBestAskShowJobs

crazy2be

254 karma · joined September 21, 2013

submissionscomments
crazy2be··on Powerwall 2 and Integrated Solar
The powerwall 1 (are they still selling them?) is at exactly that price point, albeit with half the energy storage capacity.
crazy2be··on Applying the Linus Torvalds “Good Taste” Coding Requirement
Another issue both versions have is that they will not tolerate head being NULL.

Don't be afraid of double pointers, although they may seem overly clever at first glance, they can be really helpful for situations like this. Linus's code is considerably shorter, and not particularly difficult to debug or to understand, assuming you understand double pointers.

Another case where double pointers can be really useful is in the interface for linked lists. I.e.

    remove_list_entry(node** head, node* entry) { [...] }
Defining the interface that way allows properly removing the last entry from the list. Workarounds like making a list struct and passing a pointer to that are just double pointers in disguise. Returning the new head is error prone, since you can easily forget to reassign it.

Double pointers for life!

crazy2be··on Computer Vision Syndrome
This is good advice in general, but seems a bit misapplied here- most eye doctors are likely to make more from selling you unnecessary services now then by subtly lying to you in order to damage your eyes :).
crazy2be··on Bay Area wages soaring but still can’t keep up with housing prices
It's worth noting that much of this risk is due to low property taxes and NIMBY policies legally restricting supply making houses unnecessarily expensive.

If land tax were, say, 10% of land value, then buying a house would be at least an order of magnitude less capital intensive, and the homeowners capital risk would therefore be much less significant.

crazy2be··on In San Francisco, a Sinking Skyscraper and a Deepening Dispute
For those curious, this is a (crappier) map of the whole bay: https://commons.wikimedia.org/wiki/File:SFBALiqufactionMap.j...
crazy2be··on Show HN: G9.js – Automatically Interactive Differentiable Graphics
How does the differentiation part of this work? Is it just gradient descent, or something more clever than that?

It seems like it ought to need to trace the data flows, but there doesn't seem to be the machinery to do so in the code.

Thanks! This is awesome to play with :).

crazy2be··on House Passes Employee Stock Options Bill Aimed at Startups
For reference, the US Federal budget in 2015 was 3.7 trillion dollars. [1]

[1] https://en.wikipedia.org/wiki/United_States_federal_budget

crazy2be··on New Record Low Solar Price in Abu Dhabi – Costs Plunging Faster Than Expected
There's no way that's true, the benefits of the grid will ensure it always exists in cities. It guarantees 24/7 power for all citizens, smooths out regional hiccups (i.e. if it's cloudy in one region), and allows better allocation of excess resources (i.e. to smelt aluminium).

It might, however, go away for cottages/cabins, or other rural buildings. Many people I know have generators at their cottages because the power is unreliable enough, and given the unreliability, the grid must be pretty expensive to maintain.

crazy2be··on A statement on online course content and accessibility
While your comparison to wheelchair ramps seems analogous, it in fact has a significant flaw. Wheelchair ramps cost the business almost nothing to build relative to the cost of operating the business. The tax for these sort of physical accommodations is almost certainly less than 1%, which nearly everyone would consider acceptable.

In the case of captioning the videos, the captioning costs several times more than putting up the videos in the first place. Probably on the order of 100x more. A lot of these lecture videos are just someone with a camera recording the lecture live, someone who would be there, watching the lecture, regardless. They do some trivial editing / splicing, and upload to YouTube. This is essentially free, other than having the professor/school sign off on them doing it.

Once the ADA gets involved, you now have to caption the video while watching, or after the fact, something you likely would not have done otherwise. You probably also have to submit it to some authority in the university now (don't want to get sued!), who will have to rewatch the video and verify the captions.

In the old system, it took you less than 5 minutes of inconvenience per lecture to upload them. In the new system, it takes you 2 x len(lecture) => 120 minutes or so, per lecture. This is a huge tax in relative terms.

crazy2be··on A statement on online course content and accessibility
That's not a good comparison, not complying with health regulations substantially devalues the food given away, because of the significantly increased risk of illness resulting from consumption of said food.

Your second statement is irrelevant, we are not talking about what the law does, but what the law should do. And I absolutely think that gifts (and good samaritan acts in general) should be held to a much lower standard than commercial enterprises.

This is not at all unprecedented in US law (or in many places in the world), every state has some form of good samaritan law[1], which protects (to some extent) individuals who act in good faith to aid strangers in need of immediate medical assistance. There is also a federal law indemnifying donors of properly labeled foods, except in the case of gross negligence or intentional misconduct.

These laws are important, because donations result in no benefit for the bearer, so making them cost money is a significant deterrence to charity.

[1] https://en.wikipedia.org/wiki/Good_Samaritan_law#United_Stat...

crazy2be··on V8 JavaScript Engine: V8 Release 5.4
Yes, exactly, this is targeting peak memory consumption, but doesn't mention anything about average memory consumption (which is probably what you would care about for your electron app).
crazy2be··on Amazon is piloting teams with a 30-hour workweek
Well, you are both right. Compensation is set by the market, but the ceiling for compensation to perform a task is (roughly) the amount of value that a employee can generate, in a rational market.

Of course, our market is far from rational, etc, etc.

FWIW, I don't think that software developers are overpaid, at all. It's a difficult career, requiring years of intense study to do well. Sure, maybe not as much as Doctors, at least not formally, but a lot of that has to do with the structure of medical education in the United States (in particular, the requirement to complete an undergrad degree prior to admission to medical school). The job of a surgeon is certainly more difficult than the average software developer, but compared to a SRE at Google, say, who is working with real, "living" distributed systems that interact in complex ways, I would say they are comparable. If anything, I'd expect, in a rational market, for the SRE to be paid more, because their services are providing for millions or billions of customers, while the surgeon is only providing for one at a time (and maybe a few thousand over their carrer).

crazy2be··on Editing Wikipedia as self-care activism
What would you prefer that they relied on? In my experience, it tends to be the least biased of available sources; books are usually sold to promote a particular agenda, news articles are devoid of content and without citations.

At least on Wikipedia, I can check the citations easily...

crazy2be··on As Japan's population shrinks, bears and boars roam among schools and shrines
I'm not convinced that "study" says much of anything, since they almost certainly edited the video to show the responses they wanted, and besides, they didn't calibrate their scale properly. If you gave a bunch of random people at a food tasting event some pretty crappy food, a bunch of them would probably say that it tasted good just out of courtesy.

A better comparison would be to have a double-blind study with McDonalds and "Artisan" hamburgers, and ask participants which they prefer.

crazy2be··on Linux debugging tools I love
The performance is way better. Callgrind/cachegrind operates as a cpu-level emulator (i.e. software emulating individual CPU instructions), while perf is a sampling profiler. This means you lose ~0 performance using perf, but at least ~10x performance using callgrind/cachegrind.

There is also the advantage that perf is really testing the actual code on the real hardware. This can get important if you are trying to design code that is cache-aware. Although, with cachegrind, you can set what kind of emulated cache parameters you want, I'm not sure how well this emulates the real hardware, especially if you have multiple threads with cache conflicts.

crazy2be··on Final features of C++17
Thanks for a terrifying read! I shudder to think what sort of (now essentially solved) problems the engineers on those teams must have to deal with. I mean, if their code page doesn't even support [, {, }, or ], then imagine what must happen when someone tries to enter a non-english name into their system!

It's remarkable that such systems still exist (and are apparently being updated, without their foundational cracks fixed) still today!

crazy2be··on The problem with reinforced concrete
From "Dirk Gently's Holistic Detective Agency" by Douglas Adams, for anyone curious to read the whole story: http://theelectricmonk.com/ElectricMonk.html
crazy2be··on Warmest March in Global Recordkeeping
Donald Trump is a problem, yes, although arguably for bigger reasons than just his stance on climate change. Ted Cruz is from Texas, so... :).

I'm not sure where you get the impression that Hillary Clinton thinks climate change is "not a problem". Her website certainly states otherwise: https://www.hillaryclinton.com/issues/climate/

crazy2be··on San Francisco's Fog Over Growth
2%/year is pretty inconsequential.

Consider that the average inflation rate is 3-4%/year[1][2], and houses generally tend to increase in value at roughly the same rate as inflation[3]. Thus, your property taxes are expected to get cheaper in real cost every year, assuming the housing market is relatively stable.

Of course, in SV, the situation is much much worse than this, because housing prices have grown much faster than inflation due to the booming economy.

[1] https://en.wikipedia.org/wiki/Inflation#Measures [2] http://inflationdata.com/Inflation/Inflation_Rate/Long_Term_... [3] http://observationsandnotes.blogspot.ca/2011/07/housing-pric...

crazy2be··on The Dangers of Super Smart Compilers
What? These are overloads for smart pointers, not regular pointers, and thus require special code to get the semantics of regular pointers that are usually expected and desired by developers. Even the standard library unique_ptr overloads these operators (http://en.cppreference.com/w/cpp/memory/unique_ptr/operator_...).

Of course, you could argue that smart pointers shouldn't be a thing, but I think most C++ developers would disagree given the significant advantage of essentially automatic ownership management, at least for tree-like structures (cycles are more complicated, as always).

What would you propose as a simpler solution? Many languages have GC, which is arguably the simpler solution you speak of, but would be unacceptable in C++, since the large majority of applications it is used for require predictable low-latency responses. Manually managing pointers is how you do things in C, but has it's own sets of problems, since it can't be checked in any way by the compiler, so things like forgetting to free, double free, use after free, etc, are common, while with smart pointers these errors are impossible.

crazy2be··on Super Resolution from a Single Image (2009)
There is some discussion of this from 2012, when this was last posted. It looks to be guessing the letters (sometimes incorrectly) based on the larger ones present in the image: https://news.ycombinator.com/item?id=4241978
crazy2be··on Humans should think of sizeof() as a function, says Linus Torvalds
Well, in this (simple) case you can just do

    int *foo;
    foo = malloc(sizeof(*foo));
And avoid the brittleness mentioned.
crazy2be··on Why TCP Over TCP Is a Bad Idea (2001)
Perhaps I'm missing something obvious, but isn't this trivial to solve by just having a deduping filter at the lower level? When the higher level starts keeps sending duplicate packets, just ignore them. Duplicate packets at this layer will always be useless, because your lower layer is already implementing reliability semantics. Then, when you get ACKs from the other side, translate those packets to match the sequence numbers that the higher level is expecting (i.e. the most recent sequence number that was sent out corresponding to a packet with those contents).
crazy2be··on Speed is hard [pdf]
That's an interesting perspective. I mean, today, it seems impossible to imagine any use case for > 100Mb/s. After all, it can stream 4k HD video!

But I think the very way we use computers is restricted by what is possible on commodity infrastructure. The fact that 100Mb/s is overkill for many customers is simply because the average speed is much lower, so nobody has bothered to develop applications that make use of that additional bandwidth. If 100Mb/s became something everyone had, I'm sure we would start to see applications that require such speeds to be useable. I don't know what those applications would be, but I'm sure they would come to exist.

A 56k modem is overkill if you're browsing a text-only internet, but it would be pretty hard to use the internet of today with one :).

crazy2be··on Bitbucket: 2014 in review
What is your business plan if you are allowed unlimited private repositories? (on GitLab.com) Are you only allowed to use them for non-commercial uses?
crazy2be··on Dreamweaver CS3 crashes with files that are exactly 8KB in size
This was posted on the daily wtf about a month ago: http://thedailywtf.com/articles/the-8k-bug Some discussion there: http://thedailywtf.com/articles/comments/the-8k-bug

Another reminder to always test the edge cases (as though we needed another :) ).

crazy2be··on Show HN: We built an open source tool for journalists to inspect Wikipedia edits
This is awesome! I've wanted to build something like this for a while, but never gotten the chance :). Better tools like this are essential for helping users accept and reject the correct edits, and making it easier to investigate when reversions might be unjustified.

The only problem I noticed is that clicking the footnotes does not work, which makes it harder to evaluate the legitimacy of an edit (well, it just means I have to have the current article open as well).

crazy2be··on Brotli Compressed Data Format
Presentation announcing the format, and discussing advantages/disadvantages compared to existing formats:

https://docs.google.com/presentation/d/1aigINmRR7fw_ml8rz0rJ...

← PreviousPage 2 of 2