Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×

Comment Re:Ugh. (Score 2) 159

I'm not too sure about the realloc example. The man page on my Mac says

If size is zero and ptr is not NULL, a new, minimum sized object is allocated and the original object is freed.

That says to me its behaviour is already aligned with the new standard and I'm not sure if it ever wasn't.

Furthermore, I don't think I've ever seen C code that uses the behaviour described by the article. The example of grep doesn't use it, it only uses the "passing in a null pointer is the same as malloc" behaviour. Also, the example stack is a bit bogus. A real implementation would never bother to realloc with less memory because you're almost certainly going to need to grow the stack again at some future time.

Comment Re:Comparing unrelated pointers (Score 1) 159

That's just a subset of undefined behaviour and it limits what an implementation can do. For example, the designers of a C compiler for a segmented architecture may want to trap if you try to compare two pointers in different segments but give a sane answer if you compare two pointers in the same segment.

"Undefined behaviour" means "the implementor can do whatever is convenient" and for implementors targeting a flat address space, it's convenient to return a sane value no matter where the two pointers came from. It means, for example, they can implement memmove() without copying the source block into a temporary array (to avoid corruption id the source and destination overlap).

Comment Re:Why does anyone buy Apple watches? (Score 1) 36

I don't care how far it is to the next golf hole. I do, however, care about tide times, map directions, notifications from things other than text messages, alarm clocks, Sound Hour etc etc etc. The Apple Watch has significantly more flexibility and functionality than most other smart watches. You get what you pay for.

Comment Re:So what? (Score 2) 108

Point 2 is obviously nonsense because computers aren't going to get slower.

Point 1 is less obviously nonsense, but is, anyway. The Tiobe index is calculated by counting search hits for each programming language on twenty five search engines. Python seems to be the language of choice for amateur programmers. I classify "amateurs" as hobbyists and people who need to do a bit of programming in a job that isn't programming. As an example, most of the people on Youtube with maths channels will use Python for their scripting needs.

The Tiobe index doesn't not distinguish between the hits generated by these people and by professional programmers.

Comment Re:Yeah yeah (Score 3, Interesting) 134

One of those "rich bastards" was a teachers' pension fund in Canada.

I know you want the World to be simple, but it's not. These things are never black and white and it's never just the rich bastards that suffer in these kinds of fraud.

Probably a lot of ordinary people have lost their life savings in this, just for the crime of being a bit stupid. People will die because not having money can be a killer, especially in the USA. So I would say, five years would be a mockery. Elizabeth Holmes got eleven and her partner thirteen. That's the ball park Bankman Fried should be looking at.

Comment Re:Newly-bankrupt BlockFi -cookie keeps crumbling (Score 1) 42

Dominos are falling. People want their $$$ and NOTHING is there. NEVER was

The dollars were there once. The clients would have put the dollars in, it's just that the dollars have been taken away without anybody except the thief knowing about it.

the ponzai scheme.

Is that some sort of miniature fraud?

Comment Re:"I didn't want to kill him officer, (Score 1) 68

Admittedly it is two years since I last flew on a plane, but I've never been on one in which the use of mobile phones not in flight mode was allowed. I have been on planes that had phones but the charges were so extortionate that nobody used them.

I have, on the other hand, been on trains where nearby passengers insisted on using their phones constantly and seen a couple of cases that almost came to violence. It would be worse on a plane because you are all that much closer together and the ambient noise is quite high so people will talk louder.

Slashdot Top Deals

Money cannot buy love, nor even friendship.

Working...