Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
sigsev_251
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
1.
▲
by
sigsev_251
2y ago
> Outdated documentation is pretty normal unfortunely, even .NET suffers from that nowadays. That's really unfortunate. > Not as bad as Apple nowadays though, quite far from Inside Inside Macintosh days. Funny story, I know a guy
2.
▲
by
sigsev_251
2y ago
I think the documentation is outdated given that C11 atomics [1] and threads [2] are available for more than a year now. Same goes for pretty much everything MSVC frontend related stuff (I've yet to try which C++23 features are support
3.
▲
by
sigsev_251
2y ago
Why would you need multiple allocations? edit: Isn't it just: float (*arr)[m][n] = malloc(sizeof(*arr));
4.
▲
by
sigsev_251
2y ago
Yes, but is one allowed to move a pointer inside it as they see fit? On a one-dimensional array, one can iterate through it starting with a pointer pointing to the first element and ending with a pointer pointing one position past the last
5.
▲
by
sigsev_251
2y ago
Are C multidimensional arrays guaranteed to be contiguous in memory? In practice they are, but can one iterate through them just by incrementing a pointer which points to the first element without UB?
6.
▲
TinyCC Memory and Bounds Checks
(bellard.org)
8 points
by
sigsev_251
2y ago
|
1 comments
7.
▲
by
sigsev_251
2y ago
Thank you!
8.
▲
by
sigsev_251
2y ago
Do you happen to have any source/book on why you can't use anything but a conservative gc on C-like languages? I would really like to know why that's the case.
9.
▲
Mitigating Unexpected Arithmetic Overflow
(lore.kernel.org)
10 points
by
sigsev_251
2y ago
|
0 comments
10.
▲
by
sigsev_251
2y ago
There is a compatibilty chart: https://www.graalvm.org/python/compatibility/
11.
▲
by
sigsev_251
3y ago
There is always qbe if you need something simpler
12.
▲
by
sigsev_251
3y ago
> At least it does generics now Not in gccgo
13.
▲
by
sigsev_251
3y ago
Maybe cranelift will help with this. Faster compile times is one of its selling points.
14.
▲
by
sigsev_251
3y ago
> using LLVM backends Wait, there is an LLVM based Go toolchain? I thought the Go crowd was known for their NIH obsession.
15.
▲
A comparison of C compilers targetting STM8
(colecovision.eu)
19 points
by
sigsev_251
3y ago
|
0 comments
16.
▲
by
sigsev_251
3y ago
- Though freeware and not foss, there is also pellesc over at Windows land, with almost full C23 support. - For small 8 bit systems, SDCC is an excellent choice, supporting even C23 features! Also its lead maintainer is a committee member w
17.
▲
by
sigsev_251
3y ago
A possible answer is that one could modify n inside the function body, which means that the length is lost. But honestly, one could just use const to avoid this. Though, pointers to VLAs are really useful and convenient when allocating dyna
18.
▲
by
sigsev_251
3y ago
I get what you mean and I'm not saying that not having extra operators is a dealbreaker that will make spans unusable. I just find it more pleasant/convenient for the following reasons: 1. Helps clarify intent 2. Makes teaching th
19.
▲
by
sigsev_251
3y ago
Very nice comment. This was a blocking point I fell onto too. There is another option, to not allow spans on the return channel, but I don't know how people who handle resources with lifetimes that exceed the function scope will take t
20.
▲
by
sigsev_251
3y ago
(Just to be clear, I am not the author of the draft I posted in the parent comment, but it's the feature I want the most to be added in C2y. I was actually meaning of writting a proposal, but realized that I don't know a thing abo
21.
▲
by
sigsev_251
3y ago
Not a glsl or hlsl compiler, but there is a C compiler that targets spirv and is written in C. Here's the repo: https://github.com/heroseh/hcc
22.
▲
by
sigsev_251
3y ago
With all respect, please don't say nobody cares. There many people in the C community that want this but it's not easy to add a fat pointer to C after all these years. Though, there are people who are planning to work on this exac
23.
▲
by
sigsev_251
3y ago
Michaelforney has also built croc [1], a qbe based C compiler. Really impressive! [1]: https://github.com/michaelforney/cproc
24.
▲
by
sigsev_251
3y ago
Curious, why do you think Rust does not look like a better C++ (in the sense of not making the mistakes of it)? Is there something you find impractical?
25.
▲
by
sigsev_251
3y ago
Aviation would be my personal experience. We have to implement services on the aircraft for structured communication support with the ground tower. Those would really benefit from something like that, since we wouldn't have to implemen
26.
▲
by
sigsev_251
3y ago
Because there are platforms with no, or really buggy C++ support.
27.
▲
by
sigsev_251
3y ago
Isn't the gcc-ia16 more of a cross-compiler for embedded systems?
28.
▲
by
sigsev_251
3y ago
I mean, _Generic is usually hidden behind a macro anyways, so it doesn't really show up in you text file all that much.
29.
▲
by
sigsev_251
3y ago
Generic libraries. There are programming domains in the embedded world where code reuse can shorten the development timeline in a significant way, which gives engineers more time to test and verify.
30.
▲
Polymorphic Types in C [pdf]
(open-std.org)
99 points
by
sigsev_251
3y ago
|
104 comments
More ›