Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
_kst_
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
29 ms
·
301.
▲
by
_kst_
7y ago
No, uintptr_t is an integer type to which any object pointer type can be converted without loss of information. (Strictly speaking, the guarantee is for conversion to and from void*.) And if an implementation doesn't have a sufficien
302.
▲
by
_kst_
7y ago
"based on pointer providence" I think you meant "provenance" (mentioning it for the sake of anyone who wants to search for it).
303.
▲
by
_kst_
7y ago
You could write a script called, say, "," that does this. ", sc" could invoke the second "sc" command in your $PATH, and ",, sc" could invoke the third. (What to do if there's only one "sc&q
304.
▲
by
_kst_
7y ago
Rockchain.
305.
▲
by
_kst_
7y ago
https://unix.stackexchange.com/a/29620/10454
306.
▲
by
_kst_
7y ago
env hasn't always been in /usr/bin. I've worked on systems (probably SunOS 4.something) that had /bin/env but not /usr/bin/env. But you're unlikely to run into any reasonably modern Unix-lik
307.
▲
by
_kst_
7y ago
C11 does have a special case rule for infinite loops. Section 6.8.5 paragraph 6: "An iteration statement whose controlling expression is not a constant expression, that performs no input/output operations, does not access volatile
308.
▲
by
_kst_
7y ago
The author claims that: > In C89, undefined behavior is interpreted as, “The C standard doesn’t have requirements for the behavior, so you must define what the behavior is in your implementation, and there are a few permissible options”.
309.
▲
by
_kst_
7y ago
A file name with an embedded NUL character couldn't be passed to fopen(), or to any other function that takes a pointer to a C-style string. (Not directly relevant here.)
310.
▲
by
_kst_
7y ago
> It's aligned to true north within 3/60 of one degree (making it, I believe, the most accurately aligned structure on the planet) 3/60 of a degree is mildly impressive (Wikipedia says 4 minutes of arc rather than 3), but
311.
▲
by
_kst_
7y ago
I'm surprised I had to scroll down this far to see this. Usenet is still very much alive. It's not what it once was, but I regularly participate on several technical newsgroups that are still fairly active. The signal-to-noise rat
312.
▲
by
_kst_
7y ago
https://news.ycombinator.com/formatdoc Blank lines separate paragraphs. Text surrounded by asterisks is italicized, if the character after the first asterisk isn't whitespace. Text after a blank line that is indented b
313.
▲
by
_kst_
7y ago
I've run into that. There was a problem with the OSF/1 /bin/sh that caused "$@" to expand to a single empty argument if there are no arguments, rather than to an empty list as it should. I just now removed a wo
314.
▲
by
_kst_
7y ago
I always remap caps-lock to act like the control key. I posted an article on how to do this on various systems (some of the information might be outdated): https://the-flat-trantor-society.blogspot.com/2013/12/wher
315.
▲
by
_kst_
7y ago
And "ANSI" is also a misnomer. It's typically used to refer to certain Microsoft 8-bit code pages, like Windows-1252, that extend 7-bit ASCII to 8 bits. My understanding is that these code pages were proposed as an ANSI stand
316.
▲
by
_kst_
7y ago
I wouldn't call it a mistake. That's how the language was defined at the time. If it was a mistake, it was a mistake in the language, not in the compiler. (Admittedly, given the lack of a standard at the time, the line between the
317.
▲
by
_kst_
7y ago
> I was including stdlib.h just to get the definition for size_t. size_t is also defined in stddef.h, and including that likely won't cause the same issues.
318.
▲
by
_kst_
7y ago
In vim, Ctrl-K < - ":help digraphs" for more information. (Personally I think that's still too much typing for a common operator.)
319.
▲
by
_kst_
7y ago
I wouldn't describe this as "no-one knows" the type of char + char. I know what the type of char + char is. I know that it's either int or unsigned int, depending on the ranges of values supported by types char and int.
320.
▲
by
_kst_
7y ago
That relationship is valid for ASCII, and for character sets derived from ASCII, but it's not guaranteed by the language. In particular, in EBCDIC the alphabet is non-contiguous.
321.
▲
by
_kst_
7y ago
I disagree, mostly. char is an arithmetic type, but it rarely makes sense to treat it as one, because its signedness is implementation-defined. If you want a very narrow integer type, both signed char and unsigned char are arithmetic types,
322.
▲
by
_kst_
7y ago
I have no doubt that multiple people will publish such scripts, and that they'll be subtly incompatible. (Cynical? Moi?)
323.
▲
by
_kst_
7y ago
Sure, but those symlinks have to be consistently created and maintained, possibly on multiple new and existing systems. If you already have infrastructure that does similar things, it's probably not much of an issue, but I can see miss
324.
▲
by
_kst_
7y ago
So 1729 is the 42 of 4-digit numbers.
325.
▲
by
_kst_
7y ago
libc includes string functions because C requires string manipulation functions. Other languages may or may not make use of C's string functions.
326.
▲
by
_kst_
7y ago
Yes, a black hole with the mass of the Earth would be much smaller. There's an actual size illustration of one in the article. The gravitational attraction from a given distance from the center would be the same as for Earth. For exa
327.
▲
by
_kst_
7y ago
I vaguely remember using CTRL-7 to get the ASCII BEL character (0x07). This was a long time ago, and I don't see it on any current systems. Another special case: On most keyboards (I suppose it's the terminal emulator that impleme
328.
▲
by
_kst_
7y ago
Any chance you could release the patches?
329.
▲
by
_kst_
7y ago
An interstellar object cannot be captured into a stable orbit unless some other force (such as Jupiter's gravity) acts on it. Orbits are time-symmetric, so an interstellar object being captured into a stable elliptical orbit would be
330.
▲
by
_kst_
7y ago
It's not particularly surprising, but this is (probably) only the second such object we've actually seen, which makes it very interesting. The first such object, ʻOumuamua, was both interesting (because it was the first one we saw
More ›