Hacker News new | past | comments | ask | show | jobs | submit | hamandcheese's comments login

Its a good thing the GPL stopped google from taking it and running with it!

"Hey we had a security breach!"

"Ah that means we must remove all security protections, instead of you know further strengthening security."

If older GPL failed, this means we needed a stronger license...such as AGPL, or in future something even better, instead of giving up and saying we should have just given them shit on a platter.


what do you propose they do instead to reduce bugs?

By mandating that people can access their data so less incompetent organizations can create less buggy systems with it.

I remember being surprised at how hard it was to read the source code for grpc Java. There's an incredible amount of indirection at every turn.

This made it extremely hard to get answers to questions that were undocumented.

It's a shame because I know Google can put out easy to read code (see: the go standard library).


> It's a shame because I know Google can put out easy to read code (see: the go standard library).

My guess is that the difference is that go is managed by a small group of engineers that have strong opinions, really care about it, and they have reached "fuck you level", so they can prioritize what they think is important instead of what would look good on a promo packet.


Sass was the first code generator I ever met that produced decent output. I’d been coding for 15 years at that point. Less is the second one.

That’s the end of this story. There are basically two people in the world who have demonstrated that they can be trusted to generate code that isn’t an impenetrable quagmire of pain and confusion.

I doubt it’s an accident that both emitted declarative output rather than imperative, but I would be happy to be proven wrong.


Some of the details inside protobuf in Java can be very convoluted, but they are also the result of intense benchmarking, years of experiences and a long tail with deep legacy support for old java.

Honestly I found the Java bindings to be way better designed and thought out than Golang. On a consumer level, the immutable message builders are fantastic, the one-ofs are decent compared to what Java can offer, and the service bindings actually provide a beautiful abstraction with their 0-1-many model. In Golang, if you only have to deal with Unary rpc they are OK I guess, but I really miss the immutable messages.


To be clear, I'm not talking about generated code or anything touching protobuf serde. Just grpc-the-library. Interceptors, retry policies, channels, etc.

The generated C++ interfaces to gRPC are also filled with an incredible amount of indirection and unnecessary concepts. I'd say it's a "bad at writing complex things simply" culture rather than being Java-specific.

Autogenerated code in general tends to be unreadable. It's not easy and/or not a priority.

I think it's partly a culture thing. Java developers love indirection, and they're used to an ecosystem that doesn't want to be understood. An ecosystem that wants you to google whatever obtuse error message it decides to spit out, and paste whatever half thought out annotation some blog post spits back, into your code to make it work.

I've worked with people who considered anything that wasn't programmed with annotations to be "too advanced" for their use-case.


Java is on life support as a language, but the ecosystem is strong, that's why it has all these weird features via annotations. And people who use Java are just trying to get stuff done like everyone else.

How is it on life support, when it’s by far the biggest server-side language, running basically every top companies’ business critical infrastructure?

Also, annotations are just metaprogramming, which can be tastefully applied.


Like I said, the ecosystem is strong. The language's design hasn't aged well, so nowadays any Java code I see in prod has 1-4 annotations above every class and method to get around the limitations of the language. Similar to how some C code will rely heavily on macros.

That’s not due to the language, but due to the business domain (I assume web development). In this domain almost every framework, regardless of language, will heavily use metaprogramming, see django, etc.

Java is doing quite well.
kaba0 6 days ago [flagged] | | | | [–]

What an idiotic comment.

I'm not sure if this is considered animation or not, but I've demonstrated code refactors between slides by adding a colored border around the code in question (both in the before and in the after slide).

I'd probably do something similar for stepping through code. But at that point it's a quasi-animation (albeit, one that can still be understood by pdf slides).


> Reddit aggressively tags random posts as NSFW and then offers "anonymous" browsing if only I install the app. What? That's silly.

"Request desktop site" setting in mobile Safari also works for me to bypass this.


Old Reddit Redirect and Reddit Enhancement Suite on Firefox cut out all of their BS.

Only for as long as they allow old.reddit.com to exist. The rug can get pulled at anytime.

once that rug is gone, so am I. I suspect several other folks in this discussion chain are of similar disposition

You don't need negative prices for storage to be profitable, you just need to be able to sell your stored electricity for more than you paid for it.


Where do you plan to place it while staying at a hotel?


How close to real time are you talking?

As a generality, you either need something done Now, in which case don't put it in a queue, just do it immediately.

Or you need it done Not Right Now, in which case you stick it in a queue.

Or maybe you need something done Now, but on a different computer, in which case you need RPC of some sort. I would not recommend reinventing RPC using listen/notify.


Durability is more important to this use case than performance. I want the option of picking up a jobs within, say, a minute, but I am willing to accept a much worse worst case so long as I never lose track of a job.

Another scenario to consider; a job fails, because of a transient error local to the worker (for instance, it may have exceeded an IP based rate limit on an API it consumes). If we drew another worker, it would succeed without a hitch. I want to put the job back into the queue and pick it up again quickly. But I can't just keep going on the worker I have.


> within, say, a minute

With this definition of real-time, you can get pretty far just polling for pending jobs.


Autoscaling workers polling in a tight loop seems like a way to bring down production to me. Database is getting too many queries, causing the job queue to grow, causing more workers to spin up, causing a higher load of queries, ....


Set a reasonable maximum for your auto-scaler to avoid this issue.


> in a tight loop

Here's the bug. If there are no tasks pending at the moment — you sleep, for example for 10 seconds. The code in the presentation had this handled correctly.


I expressed myself in a confusing way, I just meant "in a loop" and understood that to be a 60s sleep.


Then the database load from transactions that didn't match a job won't be noticeable until there are thousands of workers. And when (and if!) there are, I don't have experience with that kind of scale but I suspect that all the bottlenecks will still be in the other branch — transactions that modify the database.


In general I agree. But every efficiency gained will translate to less land used for solar, or a longer period of energy surplus every day (which means less deficit that has to be made up in other ways during the non-peak hours). Either of those things make me happy.


A manufacturing efficency would, this won't. The cheapest panel wins.


Not necessarily the cheapest, but the one with the best combination of efficiency, cost, durability, and possibly other properties I'm overlooking.


I meant in the marketplace as bought by actual consumers. So, the cheapest.


Isn’t GP effectively saying $/W? I assume that’s how most people evaluate price… “I want to install a system that will pay itself back in the smallest amount of time while staying below my max budget.”


That would be the prosumer. A consumer buys the thing with the lowest sticker price. See for example triple pane vs single pane windows.


I guess be careful how you use prosumer in this kind of thread, since it often might refer to a producer-consumer (ie someone who can get paid $$ to export energy back into the grid, as opposed to just saving $$ from avoided grid import).

I assume you meant professional consumer.

> See for example triple pane vs single pane windows.

Bad example but I understand your point. Bad example because it takes significantly more expertise to model the savings from triple paned window with low-e coating and vacuum sealing vs double paned vs single paned (ie it requires a proper building energy model in eg EnergyPlus). Also bad because the triple paned window might be immediately disqualified by the budget constraint above. In any case, I think you are just saying people are likely to pick the thing which has the least friction, whether that friction comes from cost, installation challenges, etc etc.

And yes, sometimes upfront cost is the most significant thing which affects people’s willingness to adopt a certain home energy retrofit but payback period does play a big role in people’s decision making, as well as their ability to get funding for it (government rebates), or they may simply be going with an installer who pays them to install it and they certainly care about payback period!


> Bad example because it takes significantly more expertise to model the savings from triple paned window with low-e coating and vacuum sealing vs double paned vs single paned (ie it requires a proper building energy model in eg EnergyPlus). Also bad because the triple paned window might be immediately disqualified by the budget constraint above.

I'm confused by this as that is exactly the point made. :)

I was watching a NASA iTech talk if memory serves about vacuum windows. He opened with an overview of the market and adoption trends and was quite flustered. Small market, little in the way of R&D and many challenges in manufacturing them in the US.

One of the things that flustered him is being told by sales reps that those types of windows are "pointless and not worth it" and so on. Digging deeper the reason he was steered away from them is simply because they were up not as lucrative to sell in that moment at time for that provider. I can try and dig that up if you want as I recall this anecdote vividly and my thinking diverged from yours in that moment.

Turns out most people have no idea what any of it means you see? So indeed friction, perverse incentives, financing, lack of consumer education and so on. Some terribly sad amount of people still opt for single pane instead of double which shouldn't make any kind of sense.

Remember also that people often move houses. Anyway the upfront cost ended up dominating rather than the payback period. Folks aren't that rational or liquid.

Out of curiosity try modeling it out and pitching it as a choice if you know anybody looking;

Chinese panels <20% efficiency, cost X, payback period Y vs Unobtanium panels 25% efficient, Cost X+, Y++.

But don't try to steer them or mention the payback period unless asked. It isn't as straightforward as we would hope.


> I'm confused by this as that is exactly the point made. :)

Sorry, I was trying to indicate that it is significantly simpler for a random uninterested or mildly-interested consumer to evaluate the cost-effectiveness of solar than it is windows. Most people have a good sense of how much their energy bill costs, and there are plenty of cheap and free tools which let you accurately estimate how much energy you will save from a PV system, but even basic mental math is enough. As opposed to windows, which are significantly more complicated because they involve thermodynamic modeling of your home.

You should read recent work by Zachary Berzolla, who is now working in Maryland’s department of energy on their commercial buildings decarbonization program. His MIT PhD dissertation is specifically about willigness-to-pay for home energy retrofits (but especially heat pumps). Not sure if it has been posted to DSpace yet but I believe some various conference/journal papers are online already.


Unfortunately, I think a lot of people don’t really know how much their power costs. They just pay the bill they are sent, maybe even on autopay and they don’t even look at the statements when they come in.

So, they don’t know how much their power costs, and they don’t have a clue how much solar would cost to buy, install, run, etc… and how that compares to the payback period over time, etc….

These are the people that I think we need to reach.


> They just pay the bill they are sent, maybe even on autopay and they don’t even look at the statements when they come in.

On the other hand there are a significant number of people who are energy-burdened, and they often have the most inefficient homes (leaky or non-existent sealing, little insulation, old appliances, etc). These homes often have the least ability to take advantage of government rebates since they may only be tax rebates while the retrofit still requires up the upfront cost to be paid. At the same time, high-income homes, though often much more efficient, also often use the most energy (since floor area tends to grow with home owner income, and space conditioning/electric requirements tend to grow with floor area). It’s easy to design incentive programs which have a big carbon impact but a bad equity impact in that they just end up giving money to people who would already be upgrading their homes without the rebates.

The person who knows just how much money they are spending on their bill every month will likely value the savings much more (ie the utility value of the savings are much higher), but they may also have far less awareness of the kinds of programs available to them for retrofitting their home or installing PV.

It’s a complicated problem, figuring out who to reach and how to drive adoption while balancing decarbonization and equity!


Who is talking about consumer panels?


no, more efficient solar panels at a given price mean cheaper energy, which means it becomes economical to use more energy, until you run out of ways to use energy usefully. usually the increase in energy demand is more than enough to increase the use of inputs, a fact known as the 'jevons paradox'


> a fact

Jevons Paradox is conjecture, not immutable law. Consumption based energy usage has been on the trend downwards in western countries for some time. Much of this is explained by efficiency gains (e.g., LED lighting, OLED screens, smaller chips, heat pumps, etc.)

https://ourworldindata.org/grapher/consumption-based-energy-...


it's just an observation that has held true for two centuries. pointing at consumption-based energy usage in a cherry-picked group of countries is special pleading; neither worldwide consumption-based energy usage, nor overall energy usage even in that cherry-picked group of countries, is falling. furthermore, the link doesn't show that even that cherry-picked measure is falling

the jevons paradox certainly isn't an immutable law


> cherry-picked group of countries is special pleading

It's hard to disentangle the rise of wealth in the world from increased consumption caused by cheaper energy. Certainly in the west capacity has become larger and...

> the link doesn't show that even that cherry-picked measure is falling

If you look again, they absolutely are.

Peak vs now in Mwh: US: 105 (2005) vs 97 Norway: 93 (2008) vs 78 Sweden: 69 (2001) vs 57 Australia: 80 (2011) vs 55 Germany: 63 (2006) vs 59 France: 61 (2005) vs 54

I could manually do this for the rest, but I shouldn't need to. You can see it for yourself. Here's the chart as line graphs (this option isn't obvious in the UI)

https://ourworldindata.org/grapher/consumption-based-energy-...

The only outlier I see here, in terms of developed countries, is South Korea, but that's perhaps as the country is still unevenly developed. In terms of developing countries, we of course see the uptake of HVAC, refrigeration, vehicles and other automation appliances to match the living standards of the developing world. But crucially, developed countries are showing that at the highest living standards, energy consumption is coming down.


> Peak vs now in Mwh: US: 105 (2005) vs 97

that's the chart i was looking at. you're cherry-picking years as well to get that answer. looking at all the years instead, the usa starts out at 94, peaks at 104, dips down to 87, and then rises back up to 97, with lots of wiggles in between. that isn't a picture of a secular decline in energy use, it's a picture of random fluctuation around an average. the others are largely similar. the main outlier among 'developed' countries is not south korea but the people's republic of china, though slovenia deserves a mention for falling 40%

why? what holds the usa line so steady? probably partly the usa has lost the ability to build not only high-speed trains, subway tunnels, highways, and leading semiconductor fabs, but also electrical infrastructure, but two thirds of energy use is non-electric, and other countries are succeeding in building trains and whatnot

the price of energy has not been holding steady during this time but rather going up, although in the last decade that is starting to reverse. perhaps the reason consumption-oriented energy use has gone slightly up rather than way down is the efficiency improvements you mention

[the following paragraph is completely wrong, and i appreciate the correction from h0l0cube. therefore so is my claim that the measure itself is cherry-picked. i had just misunderstood it]

this measure, incidentally, doesn't count energy used for exports at all. so if the us and japan are producing an energy-intensive good independently at the beginning of the chart, and then in the middle the us starts importing it from japan, the usa's line will go down while japan's remains steady, because japan's added energy use is for export rather than for consumption. that's what i mean about it being a cherry-picked measure even for those cherry-picked countries


> this measure, incidentally, doesn't count energy used for exports at all

Literally, it does. It's consumption-based energy usage. It's trade adjusted

> the usa starts out at 94, peaks at 104, dips down to 87, and then rises back up to 97, with lots of wiggles in between. that isn't a picture of a secular decline in energy use, it's a picture of random fluctuation around an average

The trend line is at best a flat line. Here's a picture of energy usage per capita over a longer timespan (inc. prior to the 80s when offshoring of manufacturing and cheap shipping came into play)

https://ourworldindata.org/grapher/per-capita-energy-use?tab...

> the main outlier among 'developed' countries is not south korea but the people's republic of china

As I mentioned this is due to it's growing wealth, not the greater economy of power. Even though China has been growing phenomenally in GDP, it's GDP per capita vs consumption-based energy usage is going down (or yet to exceed 2011 levels):

https://ourworldindata.org/grapher/change-energy-gdp-per-cap...


> Literally, it does. It's consumption-based energy usage. It's trade adjusted

thank you for the correction; i had misunderstood what the trade adjustment was

> The trend line is at best a flat line

i think that is an excellent description of it, as well as of the expanded and less debatable chart you link here, at least over the last 50 years, since the energy crisis began. before that we were seeing a much different trend

i agree about wealth being the primary driver of energy use. but that's precisely the story jevons tells: you improve your steam engine to use less coal, so now you can build a railroad, which is a form of wealth. previously a tonne of coal cost £100, say, and produced 30 megajoules of work, which had a value of £200 in pumping out a mine or £50 hauling goods on the railroad. with your new engine you improve efficiency to 0.3,% and get 100 megajoules, so pumping out the mine now costs £30 per £200 produced, but now the railroad is viable because it produces £50 - £30 = £20 net. the railroad consumes much more coal than the mine did, so you're using more energy more efficiently at the level of the machine, raising your gdp, but producing less value per tonne of coal

well, i got the numbers a bit wrong, but hopefully you can see what i mean


> i agree about wealth being the primary driver of energy use

That's not what I meant. I was referring to the development of populations. Populations that didn't have what the global north would call 'the basics', electricity, household water/sanitation, lighting, adequate heating/cooling, refrigeration, as well as 'basic luxuries' like television/computing/internet and personal transport, increasingly now have access to these technologies (even in 'underdeveloped' countries). This is going to increase energy (not just electricity) usage. But once 'the basics' have been met, they will already be in line with the efficiency standards adopted by the west (maybe even moreso because energy is more expensive in the global south)

So, a counterargument might be that AI will become part of our 'basic' lifestyle, and that we will see a resurgence of demand again, but we're seeing that cloud based compute is acceptable for the vast majority. So even though, say, internet search was energy intensive at its inception, it has largely been amortized and itself energy optimized to not really raise the bar of energy usage. Custom silicon, tighter semiconductor nodes, newer algorithms, photonics, and eventually yet-to-be-discovered technologies like room temperature super conductors can again bring the energy usage down for compute, increasing efficiency not just for AI, but across the board.


that's what i'm talking about too, but yeah, i don't agree that there's a finite set of 'basics'; i think it's dependent on how much you can afford. for 50 years that's changed only very slowly in rich countries, and now it's about to change faster than it did 200 years ago, not because of the kinds of slow efficiency improvement at the point of energy consumption, but because of photovoltaic panels

things that already exist but could get much cheaper due to cheaper energy might include ai, as you suggest, but also personal computers, oocyte cryopreservation, ecm machining, space travel, weekly air travel, personal helicopters, atmospheric carbon capture, caribbean cruises, making things out of aluminum or titanium instead of plastic, cnc machining rather than casting or stamping, cars, buildings, photovoltaic panels themselves, etc. and presumably there are other things that haven't been invented yet because they'd be uneconomic


Energy use goes down because Cost of energy keeps climbing.


Not so much cost of energy, but the price of energy charged to consumers. As ever, the cost + margin sets the minimum for the price, but the price maxes out at what the consumer is willing to bear. Though to be fair, in the last 5 or so years, the cost of energy has risen due to the need for a dynamic network, entailing more and bigger transmission lines, but that doesn't explain the reductions entirely.

Anyone who remembers how pervasive CRTs (later rear projection, and plasma TVs) and incandescent bulbs were, can sense that things are far more efficient around the home. Better standards for HVAC (using heat pumps vs heating elements) are a big deal. A big driver of this has been large buildings where the cost reductions from efficiency can mean millions saved. Business errs towards efficiency. Another driver is that the more efficient stuff also seems to just be better too (like OLED screens)

We also have chips that run on about the same energy (or even less) and provide far more compute than 2 decades ago. Looking further back the ENIAC used 174kw of power for 0.005 MIPS (5000 additions). By comparison an M1 has 2.6 TFLOPS (2.6 trilling floating point operations) for 40-100 watts. My cores are mostly idling. In fact most of my computer usage happens on my phone which runs on far less energy still.

Then consider energy for transport. In the last 5 years, telecommuting has become so normal that fewer people are commuting to work, particularly cities.


note that most energy sold isn't electric. jevons made his observation when none was

not all consumer energy prices are rising, and the situation you describe where the producer captures the whole consumer surplus only happens in the absence of competition

jevons says people will compensate for more efficient tvs by buying more and bigger tvs, and for more efficient hvac by building bigger houses, living in hotter areas, and installing air conditioning in more spaces. this has been a major trend of the last 25 years you're talking about, in fact

similarly, it's true that the amount of energy per flop is going down, though not nearly as much as you might think; on the cpu it was about 2000 picojoules 30 years ago, and closer to 500 picojoules today. (the numbers you give for the m1 would work out to 16 picojoules, but the real numbers are even better. 2.6 teraflops is the graphics card, which uses 11.5 watts, which is 4 picojoules per flop. most computers lag far, far behind that in efficiency.) but the amount of energy spent on computers keeps going up and up


> producer captures the whole consumer surplus only happens in the absence of competition

Collusion is the norm. Especially with electricity suppliers where they jack up the rates because most people won't be bothered to check for better deals and switch.

> jevons says people will compensate for more efficient tvs by buying more and bigger tvs

Doesn't matter if the efficiency gains outcompete the consumption increase (which is my whole point):

> As shown in the graph below, between 2006 and 2012 the average energy consumption of televisions dropped by 57%, while at the same time average screen size increased by 30% and average price decreased by almost two-thirds.

https://appliance-standards.org/blog/why-recent-progress-tel...

> for more efficient hvac by building bigger houses, living in hotter areas, and installing air conditioning in more spaces. this has been a major trend of the last 25 years you're talking about, in fact

McMansions became a thing leading up to the 2008 financial crisis, and was a feature of cheap finance, not energy cost. Most people want a house that's affordable, close to amenities and doesn't take an army of servants to clean – so a house in the suburbs and within distance of the city. The factors here are land price and construction costs.

> but the amount of energy spent on computers keeps going up and up

Might be true, but it would be nice to see some data to back that claim.


collusion fortunately doesn't allow exxon to bar the importation of chinese solar panels (except in the usa) or their sale to consumers, and in most of the world, electric utility regulators force utilities to pass on some of the savings from utility-scale solar to customers. even where they don't, heavy industry can negotiate contracts, because electric utilities in paris don't collude adequately with those in bavaria, kansai, and virginia

a 130% increase in tvs per person would cancel out the 57% reduction you cite in power per tv, and presumably if you measure over any other period of time, the energy consumption drop won't be that large, because that was the crt–lcd transition, but screens had been steadily getting bigger for decades and have continued to do so. if you include computer monitors with tvs, it seems likely that the increase over the last 25 years is a lot more than 130%. certainly it is in public places (dentists' offices, intercity buses, airports, restaurants)

people have been building continuously bigger houses for centuries; it's not a phenomenon limited to zero interest rate mcmansions. suburban sprawl is one well-known manifestation of it as for computers, unfortunately i don't have the data here at the moment. you see handwringing about it from time to time. i'd like to see it too


> 130% increase in tvs per person

Is each person watching all these TVs at once Matrix style?

Even if you've got your laptop, iPhone and iPad all unlocked and playing videos while watching your TV, it's not really adding 30% of energy use compared to the 50 inch TV.

> certainly it is in public places (dentists' offices, intercity buses, airports, restaurants)

TVs in airports, bars, diners, buses, and dentists offices have been around since the 80s. The difference now is that all their CRTs are replaced — a clear energy drop. (Source: own experience, also you can watch movies from the time)

Lit billboards have been around for a long time, but instead of massive lamps, they are just LED screens. Tokyo used to be all fluorescent bulbs, now LED screens again. It might not be like for like, could maybe be an energy increase, but public-space advertising is the best argument you've got here, but I don't buy that it's a huge driver of energy growth.

> you see handwringing about it from time to time. i'd like to see it too

I've provided plenty of data to back myself, and to suggest otherwise is disingenuous. Given the amount of claims you're making without any supporting evidence, I can only think your argument is based on conviction, not fact. I'll let you have the last word here.


oh, it's quite common for different people to have different tvs on at the same time in different rooms of the same house, when previously they would have watched the same one. or for a tv to be left on displaying a screen saver. a backlit lcd uses the same amount of power whether it's showing black, blue, a static desktop, random noise, or video

i've seen many more tvs in public places in recent decades, often replacing things like flip-dot displays or printed menuboards. mcdonalds now displays their menus on a wall of tvs instead of printed on plastic, for example

it's disappointing that you've chosen to attack my integrity, but it seems to be based on a misunderstanding. i have not claimed that you have not provided data. on the contrary, i have found your data highly informative and educational. i only meant that neither of us has convincing data about total computer power consumption, and that i would like to


you'd think, but energy use is going up, not down. see https://news.ycombinator.com/item?id=40700537

the price of energy has started to fall again in the last ten years


It's not about that they are made of, it's about how people use them and what their market penetration is.


> it's about how people use them

Lol. "How people use them" is entirely a question of "how the manufacturer lets people use them".

Somehow it is ok that Sony and Nintendo have defined their consoles as "not a general purpose computer", while it is not ok for Apple to define their device as "not a general purpose computer".

What you are actually asking for is that companies should impose more restrictions on what people can do, lest they be targeted as gatekeepers.

> market penetration is.

Yet "hometown" companies like Spotify are mysteriously absent from the list of gatekeepers. And iPad OS, despite not meeting the thresholds defined for gatekeepers has been added "because we felt like it".


Can you explain why Spotify must be a gatekeeper?

Spotify has a smaller share than Android, there 2 similar companys offering similar service and you can export your data, playlist.

Deezer offers a service to transfer all data.


All I'm saying is people don't pay their taxes using an Xbox.

I'm all for opening up consoles too. But Apple is a much more important target in the fight for consumer rights.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: