Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
DougGwyn
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
31.
▲
by
DougGwyn
6y ago
It has been many years since a C++-to-C preprocessor has been commonplace. There's just too much new stuff in recent C++ to map it all easily into straight C.
32.
▲
by
DougGwyn
6y ago
Since I do almost all my software development in a Unix environment, usually I check the toolbox to see if there is already a program that has nearly the functionality I want, and if so then I cobble together a shell script. Sometimes (as
33.
▲
by
DougGwyn
6y ago
I'm not sure what your requirement is. Usually things work out if you're careful not to assume any specific value for alignment etc. It may mean a few unused bytes here and there, but keeping things simple and portable often pay
34.
▲
by
DougGwyn
6y ago
Okay, check my About text. I'll soon remove it, to avoid getting a lot of spam.
35.
▲
by
DougGwyn
6y ago
You should be commended for the fast customer service!
36.
▲
by
DougGwyn
6y ago
There is no grand goal that I know of. I wish more importance were being placed on keeping existing well-written code working, which includes continued support for what might be considered near-obsolete. If one wanted to design a new (not
37.
▲
by
DougGwyn
6y ago
Try explaining the concept of "scope", starting with nested blocks. It does require some practice. I suggest not unnecessarily reusing identifiers associated with different objects.
38.
▲
by
DougGwyn
6y ago
The problem is that if the checks are always performed, the object code is significantly slowed down. If all computers supported the checking in hardware, then we could do it. You don't really want the current C approach (signal) to
39.
▲
by
DougGwyn
6y ago
I tried, but two spaces yielded what you saw.
40.
▲
by
DougGwyn
6y ago
Try using "lint" or other code checkers.
41.
▲
by
DougGwyn
6y ago
Everybody seems to draw pictures of the raw memory (word-oriented) data.
42.
▲
by
DougGwyn
6y ago
UTF-8 encoding works "as is" based on byte strings (char[]). The latest versions of the draft standard provide somewhat more support. I recommend heading toward a future where only UTF-8 encoding is used for multibyte characters
43.
▲
by
DougGwyn
6y ago
One possibility is to modify some existing program to include an additional new feature. You should soon develop a sense for what works well versus what causes problems.
44.
▲
by
DougGwyn
6y ago
Many uses of strchr do write via a pointer derived from a non-const declaration. When we introduced const qualifier it was noted that they were actually declaring read-only access, not unchangeability. The alternative was tried experiment
45.
▲
by
DougGwyn
6y ago
Actually there was no need to disenfranchise non-twos-complement architectures. Now that SIMH has a CDC-1700 emulation, I had planned on producing a C system for it as an example for students who have never seen such a model.
46.
▲
by
DougGwyn
6y ago
We would need a specific proposal and assurance that nearly all computers can efficiently provide that service. It is more likely in the POSIX standard.
47.
▲
by
DougGwyn
6y ago
How about a Sudoku solver? Send me a request via e-mail.
48.
▲
by
DougGwyn
6y ago
There are deficiencies in almost all proposals. Two new functions which avoid the problems are supposed to be published in C202x: strcasecmp and strncasecmp, added in header strings.h (note: not string.h).
49.
▲
by
DougGwyn
6y ago
What removal? C11 section 6.7.6.2 specifies the semantics.
50.
▲
by
DougGwyn
6y ago
In BRL's MUVES project, we used a 2-character prefix indicating category. E.g., all the external identifiers for our fancy memory allocator began with "Mm", where Mm.h documented the interface for the Mm package only. To min
51.
▲
by
DougGwyn
6y ago
It all depends on how organized previous workers were, and what your goal is for a modification of the source text. Often, headers (dot-h files) document the data structures and interfaces.
52.
▲
by
DougGwyn
6y ago
Okay, is there a starting thread for today's C Experts panel? I miss the old net newsgroups.
53.
▲
by
DougGwyn
6y ago
Some simple instructions about how to use a thread for conversation would be appreciated. Thanks!
54.
▲
by
DougGwyn
6y ago
If you find SIMH, look for a "software" folder nearby, which contains several operating systems. Some of them, like Unix, may be tricky to install unless you have an installer's guide. BitSavers.org is a good site for docum