Readit News logoReadit News
rubber_duck commented on C++20 has been approved   twitter.com/PatriceRoy1/s... · Posted by u/dgellow
Hokusai · 5 years ago
> when you know the codebase

Yes. When I was younger I worked in solo projects. I knew my code almost line by line.

In my last decade, in middle sized companies, nobody knows all the hundreds of micro-services code. And code changes while on vacation, that can be 6 weeks of the team working without you. That is not ideal, but in such a big code base it is difficult to have everyone reviewing all the changes on a single micro-service, impossible to have all 20+ teams reviewing all of each others code.

Different problems need different solutions and code styles, I guess.

rubber_duck · 5 years ago
My point is that in a good code base types should be obvious from context. If you don't know the context then you will be slow (and make a lot of mistakes) no matter what the type say because you'll likely misunderstand the domain logic (context) unless it's something trivial. I would hate to work somewhere where I'm expected to randomly drop into micro services I didn't have anything to do with and debug/support them - sounds stressful.
rubber_duck commented on C++20 has been approved   twitter.com/PatriceRoy1/s... · Posted by u/dgellow
Hokusai · 5 years ago
> local type inference (var) made the language pointlessly verbose for ages

I guess that this is a question of taste.

What for you is "less verbose" for me is more confusing to read. I like to see the types as they complement variable naming. To avoid typing a few letters the code will for ever require me to double check the types with help of the IDE.

I have worked in medium sized corporate companies. The code base is quite big and one of the 20+ development teams may get transferred a project from another team (does not happens super-often, but it happens) or they may create pull-requests for bug fixes (this is more common).

Clear and easy to understand code is life saving. In one of the companies I worked for a Javascript team send a -1 instead of a "-1" the cost ramped up the hundreds of thousands of dollars and our clients were not happy about it. Rollback mechanisms were used as fast as our clients detected revenue problems on their own customers.

And the tests did not got the error as the values is used at the integration layer between our clients and us.

I see safety an increasing value as our programs control more and more money and more and more services. And, I have to admit, I feel more comfortable with more verbose code.

rubber_duck · 5 years ago
Pointless typing and verbose code has nothing to do with writing code - it's all about code being readable.

Java type declarations can be 20+ characers - just scanning through the code and having to skip all that junk makes my eyes more tired reading through. Types are implicitly deducible when you know the codebase 90% of the time (and should be added when they are not), and if you don't know the context you will be slow no matter what.

rubber_duck commented on C++20 has been approved   twitter.com/PatriceRoy1/s... · Posted by u/dgellow
hackingthenews · 5 years ago
But that is not inherently a bad thing.

If we look at programming languages as tools, it makes sense for them to get out of date and new ones taking their place, with all the lessons learned.

So its possible that programming languages like C++ that keeps extending their own life through adding features (while keeping weaknesses), will ultimately cost the community/industry more in the long run.

rubber_duck · 5 years ago
I'm not saying Java should have introduced ground breaking features - I'm saying they made design mistakes that they should have corrected far sooner (var/type inference) and refused to add some basic features (lambdas) that would have made the code a lot better for it.

They did add those features eventually (Java 8) - about 8 years behind C# (since C# 3.0)

rubber_duck commented on C++20 has been approved   twitter.com/PatriceRoy1/s... · Posted by u/dgellow
pjmlp · 5 years ago
Just for the HN crowd.

C# still doesn't deliver on all platforms where there is a JVM available, and has yet to even offer something as portable as Swing across all those platforms.

Kotlin really only matters on Android.

In fact right now we are having issues with .NET RFPs, because everything that comes through the door are Java related RFPs.

rubber_duck · 5 years ago
Not really - Java designers were just plain wrong and it took forever to admit it - things like local type inference (var) made the language pointlessly verbose for ages, and simple features like lambdas made the standard libraries terrible.

There was a 8 year gap where C# users could use stuff like enumerable operators while Java users were stuck in the stone age of writing loops for collection manipulation in a high level language ...

rubber_duck commented on C++20 has been approved   twitter.com/PatriceRoy1/s... · Posted by u/dgellow
rightbyte · 5 years ago
The notion of using C++ like "as C but with namespaces, std::vector, string and map" is way underrated.
rubber_duck · 5 years ago
When you add those to the mix you're dealing with destructors, ownership, etc. so I don't see anything wrong with using stuff like unique_ptr/shared_ptr.

And C tends to reinvent object oriented programming with each library so you might as well use language defined classes.

So I don't really see the point.

You don't need to use stuff like concepts, or "showing off how smart I can be with template libraries" (looking at boost), but C++ has a lot of features that make it much more productive than C.

rubber_duck commented on C++20 has been approved   twitter.com/PatriceRoy1/s... · Posted by u/dgellow
hackingthenews · 5 years ago
Even as a C++ programmer with too much spare time, it has become obvious that learning and using all of C++ is beyond impractical. To the point where I find that my C++ code more than ever before looks like C.

Nowadays I am using C++ mainly for the high-performance libraries, and only if I can't archive the same in jit-ed python, cython or rust.

The Java strategy of being very conservative about what you add to the frontend would have done C++ a lot of good after C++11 (or even before that).

rubber_duck · 5 years ago
>The Java strategy of being very conservative about what you add to the frontend would have done C++ a lot of good after C++11 (or even before that).

Java lost a lot of mindshare to C# and Kotlin due to that "strategy".

rubber_duck commented on SoftBank unmasked as ‘Nasdaq whale’ that stoked tech rally   ft.com/content/75587aa6-1... · Posted by u/xoxoy
MiroF · 5 years ago
Why do institutional investors undermine price discovery? This comment doesn't make sense to me.

> The latest numbers i have seen is that 80% of the market shares is controlled by institutional investors.

Institutional investor != passive investment.

As long as trades are happening, there is some sort pricing mechanism.

rubber_duck · 5 years ago
I'd guess there is there is too much money in it due to the fact that central banks killed interest rates and started buying government bonds as needed - where pension funds would hold those they now need to search positivie returns and there's just not enough good bets there - would explain why the valuations are sky high
rubber_duck commented on Islamic State: Giant library of group's online propaganda discovered   bbc.co.uk/news/technology... · Posted by u/jimmySixDOF
ketzo · 5 years ago
Obviously, HN is a pretty friendly place for decentralized software. But as advocates, how do you defend it to people who don’t understand the benefits?

If I’m pitching Matrix as an alternative to Slack, and someone brings up the fact that ISIS used one of them... what’s the response? Decentralized software is scary to someone fearful of shadowy groups. How do you successfully advocate for software that can be used by anyone, even the worst people out there?

rubber_duck · 5 years ago
> and someone brings up the fact that ISIS used one of them...

They used Facebook, Twitter and YT for propaganda and Gmail for coordination (that thing about saving a mail draft on gmail instead of sending it), it's obvious the other side isn't using logic to make the argument (but beliefs, feelings or simply pushing an agenda) so using logic to argue back is pointless.

rubber_duck commented on Small nuclear reactors: tiny NuScale reactor gets safety approval   popularmechanics.com/scie... · Posted by u/natcombs
nickik · 5 years ago
As a huge fan of nuclear power, I never felt like NuScale style 'SMR' were all that great of an idea.

Yes, it gains you some of the economics of factory construction and that you can start small and scale a location, but on the other side you lose that again because you lose the economics of scale that traditional PWR gets.

I really believe we should be a nuclear society by now, and that regulations both around reactors and fuel availability prevented this from happening. In the 1960 lots and lots of innovative reactors were build, often with relatively low budgets at that. The amount of untapped potential in nuclear energy is incredible. We don't need fusion, fission is plenty energy dense, if we can't figure out how to make fission practical, we want with fusion either.

Yet here we are in the year 2020 and we are still building new PWR reactors. But the reality is, in the US it is essentially impossible to build anything else. Regulations are designed so that the only reactor that can really get approval is a PWR.

If you attempt to build anything new, you have to basically pay the government to study your design and after a unknown amount of time and money, the government might develop a new regulatory framework. By the time that happens of course you have run out of money already, no buissness plan that depends on the government figuring out how to regulate a new type of reactor would ever really happen.

The good thing at least is that the DoE in the last 5 years seem to have realized that their whole approach was a problem and they have done a lot of good things to try to change. Outside of the US the energy sector is government controlled or to small for a nuclear reactor startup to have a large enough market to make a new reactor worth it.

Canada has established itself as basically the only viable place for new reactor development, with Terrestrial Energy and Moltex Energy (moved from Britain to Canada because regulation).

So, good luck to NuScale, I hope they can prove me wrong and deploy many of these in an economical way.

rubber_duck · 5 years ago
>Yes, it gains you some of the economics of factory construction and that you can start small and scale a location, but on the other side you lose that again because you lose the economics of scale that traditional PWR gets.

You mean they lose operational efficiency ? Economies of scale come from the ability to mass produce.

You forgot to mention the largest differentiator - eliminates the possibility of a global catastrophe.

rubber_duck commented on Small nuclear reactors: tiny NuScale reactor gets safety approval   popularmechanics.com/scie... · Posted by u/natcombs
toomuchtodo · 5 years ago
The economics are yet to be borne out. I believe the NuScale cost (feel free to correct me if this information is wrong) is still above the cost of renewables and storage [1] but below that of traditional PWRs (684Mw @ $3 billion [2], ~25 cents/kwh [3]), which is competitive in places like Hawaii (which is still relying heavily on diesel fuel for what solar isn't providing) and geographies with limited land or renewables potential, but not elsewhere (storage aside, you're still competing with renewables around 1-3 cents/kwh at utility scale).

Congrats to NuScale for making it through to the other side of US nuclear regulatory purgatory. Optimism is warranted ("all of the above" to replace fossil fuels), but cautious optimism. It's not real until a commercial reactor is generating. Vogtle is still not done [4]. I hope I get to see a factory churning out prefab reactors ready for shipment.

EDITs (to not pollute thread with replies): A carbon tax in the US is very unlikely, and you cannot count on economies of scale until you have arrived at scale.

[1] https://www.lazard.com/perspective/lcoe2019

[2] https://www.nuscalepower.com/benefits/cost-competitive

[3] https://news.ycombinator.com/item?id=24346808

[4] https://news.ycombinator.com/item?id=24061448

rubber_duck · 5 years ago
Thing is this kind of design benefits massively from economies of scale, same kind of thing that has drawn the price of PV down and other green energy.

u/rubber_duck

KarmaCake day2864March 10, 2016View Original