Hacker Newsnew | past | comments | ask | show | jobs | submit | rhdjebejdbd's commentslogin

That's a lot of words, but how is that even possible?

Pointers and arrays are basically interchangeable in C, and you have to do that constantly in any large program. Even the blog post has a malloc in it.

Once you start passing around a pointer to the middle of the array all size info is lost.

Are you talking about -fsanitize=address? It's too slow to be used in production


I believe GP is talking about -fbounds-safety [0, 1]. From my understanding this will cause the compiler to emit an error if it can't figure out how to bounds check a pointer access at either compile time or run time. You then need to either add appropriate annotations to provide the missing information or otherwise restructure the code to satisfy the compiler.

[0]: https://clang.llvm.org/docs/BoundsSafety.html

[1]: https://clang.llvm.org/docs/BoundsSafetyAdoptionGuide.html


Indeed, this is the option used for compiling the Dolby decoder on the unaffected systems.


As implemented in the most popular compilers "-fsanitize=address" is indeed slow.

However, for the majority of the code of a program, enabling this and all the other sanitize options will have a negligible effect on the useful performance.

Like I have said, sanitize options should be disabled in performance-critical sections, which have been identified as such by profiling, not by guessing, but only after examining those sections thoroughly, to be certain that the undefined behavior cannot be triggered.

Currently, the sanitize options are significantly slower than they should be in an optimized implementation, because there is a vicious circle. The application developers do not enable such options for production because they believe that they are slow and the compiler developers do not make the effort to improve their speed, because they believe that the application developers will not enable them in production code anyway.

However, these problems are not inherent to the language or compiler, they are caused by a bad historical tradition of neglecting the correctness of a program whenever cheating can improve the performance in the best case (which will be the only one demonstrated to potential customers), even if that makes the worst case catastrophic.

Even Rust is not immune to bad traditions, e.g. by disabling overflow checking in release builds, as opposed to debug builds.


It doesn't depend on the application unless the application shares the same pointers between x86 and arm which doesn't make any sense to me.

Otherwise they're right, it's not the intersection that matters but just the total bits available


Eh? The values you can store in the tags are absolutely dependent on the number of available bits. That’s a simple type safety problem. This requirement is architecture independent.

You can’t cram 8 bits of tag in 7 bits if the latter is all the architecture has available. Hence why you have to design for the smallest reliable target.


You are agreeing with each other whilst still arguing


Fusion360 doesn't work on Linux. Or at least I tried multiple times and couldn't get it to work


Really? I recall installing it 3 years ago, and aside from some oddities with popups, it worked just fine. I think it was this script [0]. I don't know if they broke it, I switched to OpenSCAD, which meets my needs.

[0] https://github.com/cryinkfly/Autodesk-Fusion-360-for-Linux


Toll-wires


Exactly what I was thinking. We need a great firewall of EU that is charging for packets crossing the Atlantic


Of course, what is needed to preserve democracy and freedom is *checks notes* ideas from totalitarian dictatorships.


Maybe a generous interpretation of the comment and a realisation that common language isn't always 100% precise would be better than pointless arguments about semantics.

There is only a single printf written in the source code.


That I can agree with!


I don't think it's an unreasonable criticism, otherwise the challenge is trivial:

``` function printg(arg) { printf(arg); } ```


That, of course, isn't what they did.


They did put it in a while loop though, which, if my programming isn't completely out of date, is capable of calling the function more than once.


Do you have a source on that?

Source?

A source. I need a source.

Sorry, I mean I need a source that explicitly states your argument. This is just tangential to the discussion.

No, you can't make inferences and observations from the sources you've gathered. Any additional comments from you MUST be a subset of the information from the sources you've gathered.

You can't make normative statements from empirical evidence.

Do you have a degree in that field?

A college degree? In that field?

Then your arguments are invalid.

No, it doesn't matter how close those data points are correlated. Correlation does not equal causation.

Correlation does not equal causation.

CORRELATION. DOES. NOT. EQUAL. CAUSATION.

You still haven't provided me a valid source yet.

Nope, still haven't.


best slam poetry contender I've seen on HN yet!


Average western person emits more co2 than the average Chinese person. Not sure why we would go after them unless you just don't like to see your 'team' look bad


While true, US per-capita greenhouse gas emissions peaked 20+ years ago and are now down almost 20% [1]. China's per-capita greenhouse emissions are lower but on a steep upward trajectory due to the rapid industrialization of hundreds of millions more people. China's outlook is particularly concerning if you factor in land-use [2].

At the same time, China is by far the biggest creator of renewable energy [3].

[1]: https://www.wri.org/insights/charts-explain-per-capita-green...

[2]: https://www.climate.gov/media/15559

[3]: https://e360.yale.edu/features/china-renewable-energy


Put some wd-40 on your bike's brakes and see if you think it's not a lubricant.

Maybe you think it's not a _good_ lubricant? But a lot of its use is to extract stuck things which requires a thin lubricant


> Maybe you think it's not a _good_ lubricant? But a lot of its use is to extract stuck things which requires a thin lubricant

The word you are looking for is “penetrating oil”. The problem with a too broad definition of “lubricant” is that I wouldn’t use Coca Cola to lube my engine or KY Jelly to lube my bike chain. WD-40 is a shitty lubricant for metal-on-metal moving parts, so it’s helpful in that context to say that it isn’t a lubricant.


Over 1/3 of WD-40 is made of a lubricant. My salad dressing is over 1/3 oil. Does that make it lubricant, or is it actually still salad dressing?


Not sure who's arguing what and on what side here but when making a sandwich, adding dressing or oil to the sandwich is often referred to as "adding a lubricant" to the sandwich.


Third option: It's possible for salad dressings to be lubricants.


It may temporarily act like a lubricant, but we typically expect lubricants to last longer than a month or so, and WD-40 does not. It's meant as a solvent, and can be followed up with an actual lubricant.


> we typically expect lubricants to last longer than a month or so, and WD-40 does not

Neither does KY and yet here we are.

While WD40 wasn't designed as a lubricant it does function as one.

People using heavy equipment often grease their machines daily but no one claims grease isn't a lubricant.

I have to put bar oil in my chain saw every time I use it, and often have to refill it during the day. Is that not a lubricant?


But you are aware and know that you have to reapply KY every time you want to deal with some ... em... tight situations. And after you're done, you intentionally wash it off, because you don't want those places to be lubricated during non-active times.

But a bike chain is a thing that you want lubricated for a long time, and not have to think about lube every time you want to use it (well.. in a normal, bike-driving way). Is it still lubed? Did it rain the last time you drove a bike? When was the last time you lubed it? Some other lubricant would last much longer and lubricate much better, and with a bike chain, lasting many months is good thing.

That's why we have and use different kind of lubricants for different things, and WD40 is not a "good choice" for most of the stuff some people use it for (like bike chains... or anal).


The point is, different lubricants have a different effective time.

As I said: a chainsaw is constantly adding lubricant to the bar. Meanwhile the swing I built for my son had white lithium sprayed on it and still doesn't make a sound, after full exposure to 3 monsoonal wet seasons.


People use WD-40 for anal?



What else are you going to use to penetrate the joint and loosen up seized nuts?

I'll see myself out.


What’s a good lubricant for metal on metal (aluminum in specific)?


Tri-flow. Also good as a penetrating oil, and smells like bananas.


It also has a lot of teflon.


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

Search: