HN user

PEJOE

249 karma
Posts0
Comments80
View on HN
No posts found.

That you can do functional or OOP in C does not make C either kind of language, it just means that C is flexible enough that you can make the computer do things the way you want it to, no matter what that means, and other languages purposefully prevent you from doing what you might want to do.

C++ is object oriented not because it has compile time support for polymorphism or any of that other bad programming practice, but because classes have code sections that live with them, whether on the stack or in the heap, that can operate only on memory belonging to that instance of the class.

Object oriented programming is a coding style and choice. Some languages make it a first class part of the language design. It is purposefully not part of C.

However you can do OOP like things in C: a popular paradigm is to pass around pointers to structs that (should) live in the heap, and to have a number of functions which work on these structs. This is very similar in practice and mental modelling to OOP as users of C++ might know it, but is distinct in that no code ever lives in the stack or heap, and no code is restricted from operating on any of the program memory.

I agree, but to fair to the author I do not think the vast majority of people are implementing thread pools in python.

I also think there were good reasons the author's linters were left as optional, and its probably not because everyone thought they were great ideas.

Obama's TPP was a much better counter to China than anything the Trump administration accomplished. Too bad your "tarred and feathered," President didn't have the vision to take effective steps, and instead took loud, boisterous, and largely ineffective measures instead.

Once his advisors realized the reality in , they begged to get back into the TPP at the original terms, but that ship had sailed. [https://www.ft.com/content/bc65dd72-3f2d-11e8-b7e0-52972418f...]

Nothing trump did China wise ever made up for this disastrous failure, and all of his tariffs hurt Americans even more than they bothered China.

worse heavily discriminates against the older folks

The ACA is actually a wealth transfer from the young to the old, like social security, because the young pay much more than their portion of healthcare costs, while the old have a ceiling on their healthcare costs.

Whether this is good policy is for the think tanks and politicians, but after the ACA it is not true that health insurance discriminates against older Americans.

I discovered a really exciting program today: checkinstall

Running sudo checkinstall after building with make does several things: 1. “Installs,” the compilation product 2. Packages it into a .deb that makes it easy to install anywhere 3. Allows you to use dpkg to uninstall a compiled project, e.g. “sudo apt-get uninstall ffmpeg-v4.5-source-aarch64-github” assuming the latter is what you named your package

Obviously this isn’t an end all be all, but is already saving me a lot of time

Carrier landings are often heavily automated in planes like the f-18.

I worked with someone who had been the navigator in a growler, and he complained that they would always get lower scores for their landings while the f-18 pilots would auto land and get full marks

My father was one of the inventors of the undersea fiber optic cable, and joined many of the cable laying missions, including the original Australia mission and several japan missions. (I forget the cable names)

Our house growing up was full of cable segments, superconductors, lasers, and microscopes. I remember one day he brought home a $100,000 microscope that had been thrown away, which I proceeded to use to look at banal things like leaves and insects, but was designed to look at the ends of cut fibers.

Anyway, its incredible to me how much these cables have transformed the world, and how invisible it is to all of us. Imagine if trans-continental communication relied on satellites? The global internet we have today would be much more isolated, with fiefdoms based on proximity.

For those interested in a fiber science story:

He once was asked to calculate the rate of seawater diffusion into glass, which he and the team found ridiculous, but I suppose it was unknown if water could soak into glass in an appreciable way over long periods of time. (Water is an important impurity to try and control)

How would you measure such a thing? There's no good way to increase the rate of diffusion of water into glass, but what you can do is make fiber with excess water in the core, and heat the fiber while measuring the diffusion of water out of the core into the outer portions of the fiber.

Then simple rate relations imply the rate of diffusion at sea floor conditions.

I believe the result was that you would see a 1% increase in the water concentration in the fiber over a period of 10,000 years. So his instinct, that it does not matter, was incredibly correct.

I hope nobody else has ever had to repeat such a measurement!

I had the exact same thought. And why make it easy for an adversary? The game is about staying ahead, and part of that is making sure they don’t know exactly what you’re working on.

I think you are missing one of the key ingredients to anti-stealth radar, and why we have shifted to a strong focus on RAM. That would help answer your own questions. I won’t say it here, but separately it certainly is possible to train against targets which would produce returns analogous to an F-22 or F-35 type aircraft to various radars.

On another note, US anti-air capabilities are already far behind the S-400. I understand we don’t have an immediate use case ourselves, but the lack of a credible AA system pushes potential partners like India and Turkey to fight with us for the right to buy the S-400.

Yes, if prices relax, then we will see the deflation reflected in the numbers.

A shift of both demand and supply, resulting in increased prices, is one way inflation can happen.

What is important in CPI inflation are the prices consumers pay.

How that fits into bigger picture money supply * money velocity is a different conversation

That doesn’t explain C++’s poor tail performance, unless it’s just poorly optimized like the top comment suggested

Looking at the 99% times and memory usage, it looks to me like rust came out on top if you’re looking at best worst-case performance. Any idea why the tail latency was so much better for rust vs Java or c++? E.g. specific work that went into it or language optimizations?

If you know the structure of the file so that you are comfortable reading it a bit at a time, and you’re confident the structure won’t change, C has several ways to control how much of the file you read in. You could just write a python module to handle this situation.

The problem is that the use case for tracking stolen items and the use case for tracking a person without their consent are identical, except for which side of the transaction the bad actor is on.

I cannot think of a resolution to this, but think the 3 day compromise is a fair start.

There are many, many more thieves than stalkers, but stalkers can do arguably much more harm per incident.

C is still a widely used and beautiful language. It is "safe," in the sense that the machine does more or less exactly what you ask it to. Allocate memory when you need it, and free it when you consume it / are done with it.

You do not have to use these features if you do not want to.

C++ is very powerful, and has an amazing world of libraries available, but sometimes I feel like it is at least two languages at the same time.

For example, one benefit of using C++ over C is writing C style programs with modern libraries and convenient containers in the STL, but you quickly learn that C style programming isn't supported across the board, and hitting that wall can be jarring and unexpected (Looking at you openCV - just try to allocate space for a struct containing a cv::Mat)