Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
DougGwyn
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
1.
▲
by
DougGwyn
6y ago
I thought it was strictly one character per 32-bit code. Anyway, whatever it is called it is what wchar_t should be.
2.
▲
by
DougGwyn
6y ago
The argument "0" is not automatically converted to the right type unless there is a prototype in scope. It isn't as important in this case because it is highly likely that the appropriate prototype has been #included, but it
3.
▲
by
DougGwyn
6y ago
There are several multibyte character manipulations that are easier if there is a uniform-sized encoding (wchar_t).
4.
▲
by
DougGwyn
6y ago
Why would the utilities not handle unicode searching? Unicode characters match properly, the null terminator works the same, and non-ANSI codes are just one or more random 8-bit values which can be compared, copied, etc.
5.
▲
by
DougGwyn
6y ago
In fact I proposed strdup on a few occasions, but it wasn't adopted. It seems that they didn't like for standard library functions to use malloc. POSIX.1 specifies strdup.
6.
▲
by
DougGwyn
6y ago
If you changed UTF-16 to UTF-32 or UCS-4 I'd support it. I think there are already implementations that use the replacement character for all "impossible" codes.
7.
▲
by
DougGwyn
6y ago
Why is there a second argument which is not used?
8.
▲
by
DougGwyn
6y ago
There is a Web page I saw a few days ago that does that, probably findable by grepping Wikipedia. Unfortunately I forget its URL.
9.
▲
by
DougGwyn
6y ago
I don't think most users of C want things changing underfoot. Keeping track of all the version combinations is infeasible, especially when you consider that an app and its library packages are likely to have been developed and tested f
10.
▲
by
DougGwyn
6y ago
Code can be non-portable for various reasons, not all of them bad. I just grepped a recent release of DWB and found about 100 uses of isdigit, most of which were not input from random text but rather were used internally, such as "reg
11.
▲
by
DougGwyn
6y ago
Many antique computers are simulated by SIMH. If you have the corresponding software, you can operate on your desktop a simulated computer's software development system. For example, DEC VAX (VMS or Unix) has a relatively simple and
12.
▲
by
DougGwyn
6y ago
(1) There are several implementations; most are based on Knuth's "boundary tag" algorithms. As to "heap", a stack has one accessible end, a heap is essentially random-accessible. Nothing to do with the heap data s
13.
▲
by
DougGwyn
6y ago
Note that the ABIs cover endianness as well as value range and/or object widths. In general, one needs to have explicit marshaling and unmarshaling functions to map from network octet array and C internal data representation. Failure
14.
▲
by
DougGwyn
6y ago
If you're using parentheses, as has been recommended for decades, there is no problem. Otherwise, it is likely that such a change would adversely impact previously working code. There just isn't a pressing need to change it.
15.
▲
by
DougGwyn
6y ago
Let's assume the types have been corrected. malloc((size_t)0) behavior is defined by the implementation; there are two choices: (a) always returns a null pointer; or (b) acts like malloc((size_t)1) which can allocate or fail, and if it
16.
▲
by
DougGwyn
6y ago
I thought we had fixed the BSD socket aliasing a long time ago?
17.
▲
by
DougGwyn
6y ago
"Implementation-defined" is a nuisance, because then you need to add code for all the variations, which also requires a set of standard macros, etc. It is easier and less trouble-prone to just avoid using the currently undefined
18.
▲
by
DougGwyn
6y ago
You can easily create your own stdc.h include file. Something similar was done on Plan 9. Note that by including the content of all the headers, you're increasing the chance for collisions with application identifiers. You might cons
19.
▲
by
DougGwyn
6y ago
Yes, I have found it helpful. One nice feature is that it uses a character-terminal interface, not a platform-specific GUI.
20.
▲
by
DougGwyn
6y ago
There are a lot of arithmetic conditions for which C could generate special code. There are div_t-related functions for the other direction. I for one would like a good way to obtain, using some Standard C coding pattern, fast "carry
21.
▲
by
DougGwyn
6y ago
isdigit is likely to remain, because much existing code does use it (perhaps in different contexts from the one you cited). If you need a different function specification to do something different, it could be added in a future release, bu
22.
▲
by
DougGwyn
6y ago
Original standard feature specifications were not meant to obtain a 1-to-1 map from C onto hardware, but we used practical experience to judge what overhead was acceptable for the kinds of processors we had seen or thought were reasonable c
23.
▲
by
DougGwyn
6y ago
I think that's right. These days, much of the discussion occurs through study subgroups (like the floating-point guys) and the committee e-mailing list.
24.
▲
by
DougGwyn
6y ago
In general, the committee accepts what we used to call "defect reports" (now something like "requests for improvement"), assigns them "WG14 series" sequence numbers, and upon requests for "floor time"
25.
▲
by
DougGwyn
6y ago
The rule is: If you want your program to conform to the C Standard, then (among other things) your program must not cause any case of undefined behavior. Thus, if you can arrange so that instances of UB will not occur, it doesn't matt
26.
▲
by
DougGwyn
6y ago
The main editing needed to bring "old C" source code up to snuff using a "modern C" compiler is to make sure that the standard header-defined types are used. No more assuming that a lot of things are, by default, int ty
27.
▲
by
DougGwyn
6y ago
There is little that the C Standards group can do about it. One idea is to write a C Standards conformance into contracts. When I was in the government we often did that, but it still wasn't enough clout.
28.
▲
by
DougGwyn
6y ago
Back from lunch. Any West Coasters?
29.
▲
by
DougGwyn
6y ago
I thought it would be best to standardize just a single thread, which should be the basic unit to be embedded in a good parallel-processing model. However, others prevailed.
30.
▲
by
DougGwyn
6y ago
Yes, I meant the 31-bit code point value (more than 16, anyway). It is the most useful width for doing things with wide characters.
More ›