Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
pascal_cuoq
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
10 ms
·
31.
▲
by
pascal_cuoq
6y ago
I do not actually develop in C (other than short examples to feed the C analyzer that I work on, which is not written in C) but our customers do employ plenty of C developers. These customers are developing embedded software that reads inpu
32.
▲
by
pascal_cuoq
6y ago
Both question would get better answers if they were asked to a panel of experts on POSIX (which could including members of the POSIX standardization committee). For the first one, I can attempt a guess: maybe it was feared that making the r
33.
▲
by
pascal_cuoq
6y ago
This service has been designed to try out small self-contained C examples online (in a manner reminiscent of Compiler Explorer): https://taas.trust-in-soft.com/tsnippet/ One advantage is that it identifies a LOT of und
34.
▲
by
pascal_cuoq
6y ago
As a reviewer for Robert's upcoming C book “Effective C”, I thought that this aspect was better covered than in existing manuals for learning C. However, the book only describes the available standard functions, so even doing better th
35.
▲
by
pascal_cuoq
6y ago
This is an entire language extension, as you note. The last time various people interested in this were in the same room (it was in January 2020 in a workgroup called HACS), what emerged was that the Rust people would try to add the “secret
36.
▲
by
pascal_cuoq
6y ago
Yes and no. The thing I am describing is when you link a compilation unit using: struct internal_state { int dummy; } state; with another compilation unit that defined the same state differently: struct internal_state { int
37.
▲
by
pascal_cuoq
6y ago
I am sorry I do not have an answer to your question. It's a very valid one and I would be interested in any pointer to an answer. What I can say while we are on the subject, is that I have seen C code (most often C code that started
38.
▲
by
pascal_cuoq
6y ago
I have been told in this very AMA that I lacked enthusiasm about C (and the gratuitous insecurity of the language when we know that a well-designed type system and a few runtime checks solve the problem entirely is indeed the reason for my
39.
▲
by
pascal_cuoq
6y ago
The last time I needed it, archive.org had a link to a PDF of it. I couldn't find that again in one minutes, but here is the text version: http://web.archive.org/web/20030222051144/http://home.earthl
40.
▲
by
pascal_cuoq
6y ago
Yes, if only so that we (as a category) do not have to discover it exists when already facing C programs that use it.
41.
▲
by
pascal_cuoq
6y ago
Speaking as someone who is not in the committee but has observed trends since 2003 or so, I would say that solving this problem is way beyond the scope of evolutions that will make it in C2a or even the next one. There are plenty of program
42.
▲
by
pascal_cuoq
6y ago
The C standard description does not allow a function that does not have at least one normal argument before the variadic arguments. Conceptually, something must indicate to the function how many arguments it is supposed to request next, and
43.
▲
by
pascal_cuoq
6y ago
I answered a similar question in another thread: https://news.ycombinator.com/item?id=22866242
44.
▲
by
pascal_cuoq
6y ago
It sounds like the __attribute__((cleanup(…))) already offered by GCC is similar to this. I probably won't have time to investigate the differences while the AMA is ongoing though.
45.
▲
by
pascal_cuoq
6y ago
Note that among the C experts participating in this AMA, I am not one who is in the standardization committee. At 14:59 EDT, just before the AMA was posted, we were joking between ourselves about me having to post this disclaimer but I gues
46.
▲
by
pascal_cuoq
6y ago
As a member of the development team for a C static analyzer, I use OCaml, which is also my favorite programming language, but that is because I'm from the generation in which it was the new thing (I learnt it when it had the same level
47.
▲
by
pascal_cuoq
6y ago
Many C compilers offer, as an extension, the very binary constant notation that you miss, as anyone who has worked on the front-end of a C static analyzer would tell you.
48.
▲
by
pascal_cuoq
6y ago
I would recommend musl, although the style is a bit idiosyncratic in places: https://www.musl-libc.org Mbed TLS, since I have it in mind from another thread, is also a pretty clean C library for the problem it tries to solve; it
49.
▲
by
pascal_cuoq
6y ago
It is possible to guarantee that a C program does not have any undefined behavior, which includes all the memory errors that are often also security vulnerabilities. “Static analysis” may be the wrong name to classify the tools that work in
50.
▲
by
pascal_cuoq
6y ago
In my opinion, the two languages are going to co-exist for a long time. C has billions of lines of legacy software written in it… In recent news, COBOL developers were sought after in order to update existing COBOL software, so the same thi
51.
▲
by
pascal_cuoq
6y ago
There are very little formatting options when writing posts, for better or for worse: https://news.ycombinator.com/formatdoc
52.
▲
by
pascal_cuoq
7y ago
It's not one-time pad encryption if you use data from a PSEUDO-random number generator. “One-time pad encryption” only applies when a true random stream is used as key, otherwise it's just a block cipher with a particularly inconv
53.
▲
by
pascal_cuoq
7y ago
The only new information I got out of this is what passes for “Score:5, Insightful” nowadays at Slashdot. It's not pretty. What is supposed to make this interesting, the three links to actual sources of information, or the comments by
54.
▲
by
pascal_cuoq
7y ago
This article lists some real examples that require more than 512 bits: https://res.mdpi.com/d_attachment/mathematics/mathematics-03... Note that digits of precision are expressed in decimal unless explicitly given
55.
▲
by
pascal_cuoq
7y ago
The original article that describes differential fuzzing for compilers is from 1998. In addition, that article is extremely readable: https://pdfs.semanticscholar.org/fc88/1e8d0432ea8e4dd5fda497...
56.
▲
by
pascal_cuoq
7y ago
As the parent already said, the nice thing about hexadecimal floating-point is that the standard MANDATES that you get exactly the float/double you have uniquely described. The assertion “you can uniquely identify all floats by printin
57.
▲
by
pascal_cuoq
7y ago
> In all of recorded history, has a malloc() call for more than 2GB ever actually succeeded anywhere? Yes, on OS X 10.5, and on 32-bit Linux with Glibc until two days ago. The article I linked, written before Glibc 2.30 was released, is
58.
▲
by
pascal_cuoq
7y ago
> * Memory allocation functions malloc, calloc, realloc, reallocarray, valloc, pvalloc, memalign, and posix_memalign fail now with total object size larger than PTRDIFF_MAX. This is to avoid potential undefined behavior with pointer sub
59.
▲
by
pascal_cuoq
7y ago
Using a CORDIC algorithm would mean having many iterations to compute trigonometric functions for each drawn point (well, for each 8 points considering the symmetries). A variant of the Bresenham line algorithm for circles lets you draw a c
60.
▲
by
pascal_cuoq
7y ago
It's automatically constructive. Algorithms can be enumerated. Proofs can be enumerated. For any formalized problem Q in NP, you can always simply enumerate algorithms A and candidate proofs P until you stumble on a pair (A, P) where P
More ›