Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
uecker
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
28 ms
·
601.
▲
by
uecker
10mo ago
Interesting! Can you tell me about your experience? How does it compare to the versions in N3654? (where this idea comes from) https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3654.pdf
602.
▲
by
uecker
10mo ago
Ah no, sorry, my mistake. And it is still a storage classifier, but now (in C23) it is mentioned that it will become a type specifier.
603.
▲
by
uecker
10mo ago
Indeed. C implementation could just use fat pointers, but it is unrealistic that they now break their ABI. Also the cost of fat pointers is higher when not needed. So the plan is to give them a new wide pointer type.
604.
▲
by
uecker
10mo ago
C17 is indeed a bug fix release. C23 finally removed some features that were deprecated a long time ago already in the first standardized version (auto as storage classifier, K&R function definitions, empty parenthesis as "arbitrar
605.
▲
by
uecker
10mo ago
See my other comment in this thread with my preliminary benchmarking results. I have a patched GCC with two new builtins __builtin_static_chain and __builtin_nested_code (needs a better name), that give you the static chain pointer and the
606.
▲
by
uecker
10mo ago
I used to write expression template libraries, so I know what C++ can do. I just figured out I am a lot more productive in C than in C++ and that in the time I waste on C++ I can do a lot more in C. I also do rarely use macros in C, so wha
607.
▲
by
uecker
10mo ago
So here are my preliminary benchmarks with my own implementation on an AMD EPYC 9334 32-Core processo. I need to double checks things - so take this with a grain of salt for now. Time is in seconds for 100000 iterations of manorboy(10). So
608.
▲
by
uecker
10mo ago
Since it mentions my paper again: "It also brings into question whether a “lean” approach that grabs the “environment pointer” or the “stack frame” pointer directly, as in n3654 is a good idea to start with." which is annoying sin
609.
▲
by
uecker
10mo ago
Only answering the "side effect" part as the rest was answered already. What a side effect is, is explained in "5.1.2.3". Calling function is only a side effect when the function contains a side effect, such as modifyin
610.
▲
by
uecker
10mo ago
Is it painful? Why? You need a build environment that has the old libraries. It does not have to be ancient, just exactly what you need.
611.
▲
by
uecker
10mo ago
Hm right, sorry. Somehow this does not happen to me (maybe because of ublock)
612.
▲
by
uecker
10mo ago
You should read "7.1.4 1 Use of library functions". Also "calling a function" is not a side effect.
613.
▲
by
uecker
10mo ago
There is no ABI problem. The problem is a lack of standardization for important APIs and infrastructure. There once was a serious effort to solve this: the Linux Standard Base: https://en.wikipedia.org/wiki/Linux_Stand
614.
▲
by
uecker
10mo ago
It should not be necessary to freeze it. glibc is already extremely backwards compatible. The problem is people distributing programs that request the newest version even though they do not really require it, and this then fails on system
615.
▲
by
uecker
10mo ago
This is scary, the issue in safe-critical code is not leaks (which Rust also does not necessarily prevent), but accidental resource exhaustion. This is also why JPL forbids recursion.
616.
▲
by
uecker
10mo ago
Since it has UB it is easy for the compiler to guarantee that the resulting code is semantics-preserving: Anything the code does is OK.
617.
▲
by
uecker
10mo ago
I agree that compilers were too aggressive in exploiting UB, but this is not the topic of this thread which has nothing to do with UB. But also the situation with UB is in practice not too bad. While compilers broke some old code which ca
618.
▲
by
uecker
10mo ago
A modern compiler may also completely remove malloc / free pairs and move the computation to the stack. And I do not see what this has to do with C, it should be the same for most languages. C gives you tools to express low-level int
619.
▲
by
uecker
10mo ago
Because it is a dead store. Removing dead stores does not sound ridiculous to me and neither is it to anybody using an optimizing compiler in the last decades.
620.
▲
by
uecker
10mo ago
Your problem is not the C committee but your lack of understanding how optimizing compilers work. WG14 could, of course, specify that a compiler has do exactly what you tell it to do. And in fact, every compiler supports this already: Im m
621.
▲
by
uecker
10mo ago
I don't see why? The C committee gave you memset_explicit. But note that there is still no guarantee that information can not leak. This is generally a very hard problem as information can leak in many different ways as it may have be
622.
▲
by
uecker
10mo ago
The charter is not set by ISO. It also has security on it since C11 and was rewritten for C2Y with security also mentioned explicitly. Compiler vendors are active as part of ISO, but the reality is simply that the open-source compilers are
623.
▲
by
uecker
10mo ago
As I said before, insulting volunteers and also misrepresenting what is in the power of an ISO group of experts is bad style IMHO, but I also think you are misguided in thinking that moving away from C towards more complexity is good. My ow
624.
▲
by
uecker
10mo ago
These do not seem to be the safety improvements for C that you requested.
625.
▲
by
uecker
10mo ago
I am looking forward to your contributions.
626.
▲
by
uecker
10mo ago
Yes, it is a bit of mess. We started to make this more precise in the C standard when those expression have to be evaluated, but there are still issues. And when this is involved extensions there are more issues. I think in this example, s
627.
▲
by
uecker
10mo ago
Maybe I fill find the time to clean it up and make it public. But did not find VM-types difficult to implement, the type just depends on some run-time value, so at the point in time where the size expression is evaluated, one stores the re
628.
▲
by
uecker
10mo ago
I know, and there are chibicc, kefir, etc. .. and I have my own experimental C compiler.
629.
▲
by
uecker
10mo ago
Cool! And I do think the world needs more C compilers. There is so much you could do with this language, but it needs to be disentangled from the C++ compiler behemoths. (yes, I now that there are other small C compilers)
630.
▲
by
uecker
10mo ago
I think this is nonsense.
More ›