Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
to3m
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
87 ms
·
781.
▲
by
to3m
11y ago
It only needs to do it when first handing out a particular bit of memory to a particular process. The vast majority of the time, a process will be receiving memory it's had before (and no clearing is required). When not, it will be ini
782.
▲
by
to3m
11y ago
I am playing the language lawyer game - there is nothing to call out. Is what I say justified by the standard? Yes, or no? There are no other issues involved ;) I have no idea if C99 runs on any 1's complement systems. I don't kno
783.
▲
by
to3m
11y ago
The standard provides for implementation-defined integer types. See my other comment: https://news.ycombinator.com/item?id=10868435 See also this suggestion that the gcc people, true to form, considered making uint8_t somet
784.
▲
by
to3m
11y ago
A typedef to a character type is a character type. See http://port70.net/~nsz/c/c11/n1570.html#6.7.8p3 . http://port70.net/~nsz/c/c11/n1570.html#6.2.5p4 leaves open the option f
785.
▲
by
to3m
11y ago
I found a web version of the draft standard, so here are some links: 6.2.5.15 - http://port70.net/~nsz/c/c11/n1570.html#6.2.5p15 6.3.2.3.7 - http://port70.net/~nsz/c/c11/n1570.h
786.
▲
by
to3m
11y ago
The sized types are optional, since they are more restrictive than the ordinary types - see section 7.20.1.1 in the standard ( http://port70.net/~nsz/c/c11/n1570.html#7.20.1.1 ). To summarize: intN_t is exactly
787.
▲
by
to3m
11y ago
But it doesn't have to be - the 8-bit integer types could map to 8-bit implementation-defined integer types instead. Such types would not necessarily to have the same aliasing behaviour as their equivalently sized and equivalently sign
788.
▲
by
to3m
11y ago
When you replace the initialiser with 1, it should only initialse the first element to 1. Objects initialized in this way have unmentioned elements set to 0 or NULL (recursing into aggregates, initialising the first named union member). (Se
789.
▲
by
to3m
11y ago
One point about char is that a pointer to a character type (character types are char, unsigned char, signed char - see 6.2.5.15) may alias non-char objects in a standard-compliant fashion (see 6.3.2.3.7). But uint8_t and int8_t may not nece
790.
▲
by
to3m
11y ago
I'm using Firefox 43.0.3 on Mac OS X. I've got "Check my spelling as I type" enabled, and I don't appear to have changed any spelling-related about:config stuff. I wonder if it's something else affecting Firefo
791.
▲
by
to3m
11y ago
The HN text box defeats at least Firefox's spell checking. Saf Farsisco. Falaffel. Hemmoridge. Antidisistablishmintirinismisms. Firifofxofox doesn't appear to caer! This whole comment passes with flying colours.
792.
▲
by
to3m
11y ago
Are these offers where you start next week if you sign the contact, or are they expecting to meet you first? If it's the former you should have no difficulty answering your question ;)
793.
▲
by
to3m
11y ago
Implication is not commutative.
794.
▲
by
to3m
11y ago
Suppose you have the if-then case. You might end up with the file on disk anyway: maybe os.path.exists says false, and it skips the remove, and so some other process sneaks in and creates the file behind your back. By the time you go to do
795.
▲
by
to3m
11y ago
Well-formedness doesn't appear to have a definition in C11. In the C++11 standard, the wording rather implies to me that it is a static property, suggesting that a well-formed program could therefore still induce undefined behaviour at
796.
▲
by
to3m
11y ago
Because you can more easily look at it by pressing M-v/C-v a couple of times. Anyway, in this case, it isn't earlier versions: it's one specific earlier version. From the way people carry on when they see commented-out code l
797.
▲
by
to3m
11y ago
This still doesn't solve the problem, though, because you still have the race condition that the exception case is supposed to be fixing. There's probably no good solution to this in this case.
798.
▲
by
to3m
11y ago
Yes. The standard leaves a lot of things undefined precisely so that they can be legal, or do something meaningful - or, indeed, not - without causing the implementation to become non-standard because of it. This is what "undefined&quo
799.
▲
by
to3m
11y ago
The US doesn't use Imperial units though! They use the US customary system (if that's quite the right term): https://en.wikipedia.org/wiki/United_States_customary_units Though either way, you are quite right
800.
▲
by
to3m
11y ago
I used CodeWarrior for PowerPC a few years ago and this did something similar. You did have to declare register variables with `register', though. (Being RISC, all instructions took register operands exclusively, so the distinction bet
801.
▲
by
to3m
11y ago
Yes. If they had used something like Python, it would probably be heaps better. (Though to be honest I'm not really sure I trust the cmake developers' collective judgment. I'm sure they could manage to make it awful.) But, ev
802.
▲
by
to3m
11y ago
Which cmake generator was used? The links seem to be dead, so it isn't clear. I mention this because I'm using cmake for a current project, and backend choice seems to be somewhat important. I found a noticeable improvement when I
803.
▲
by
to3m
11y ago
Possibly relevant - but in any event, interesting throughout - is Sophie Wilson's Computer History Museum interview: http://www.computerhistory.org/collections/catalog/102746190
804.
▲
by
to3m
11y ago
I went to see Event Horizon in the cinema when it first came out, with a couple of schoolfriends. There was an oldish couple in front of us, maybe in their 50s, possibly expecting a repeat of 2001. Eventually the film finished, and we all g
805.
▲
by
to3m
11y ago
It represents the axes of a space. Suppose you have a 3d space. It has 3 axes (traditionally referred to as X, Y and Z), usually all pointing in orthogonal directions, in some other space. The matrix holds the directions of these axes, one
806.
▲
by
to3m
11y ago
Doesn't work with comments that float to the right of the code (such as the ones you get with M-; in emacs). Along these lines: fred /* Fred */ fred(fred) { /* Fred */ fred /* F
807.
▲
by
to3m
11y ago
Well I submit that as a simple question of quality of implementation, implementers should try their hardest to go for the something that behaves "in a documented manner characteristic of the platform"! But instead, they seem to pi
808.
▲
by
to3m
11y ago
But the standard already permits this. I'm just suggesting that rather than have compiler writers use these liberties to allow their compiler to remove code or make it do something peculiar, they could just allow it to do the natural t
809.
▲
by
to3m
11y ago
I am almost LOLing at the segmentation fault. Where the fuck does a segmentation fault come from? It's shifting a value . Utterly mystifying.
810.
▲
by
to3m
11y ago
Undefined behaviour has meant undefined behaviour. That doesn't mean nasal demons. That means this: Possible undefined behavior ranges from ignoring the situation completely with unpredictable results, to behaving during tra
More ›