News for hackers. Stuff that matters.

vrfcodf

Re:Why volatile is hard to specify and implement on Monday April 11, 2016 @07:17AM (#11470768)
I agree, I think this part makes it clear: except as modified by the unknown factors mentioned previously.

Although this is quite contradicting:

5.1.2.3. p4: In the abstract machine, all expressions are evaluated as specified by the semantics. An actual implementation need not evaluate part of an expression if it can deduce that its value is not used and that no needed side effects are produced (including any caused by calling a function or accessing a volatile object)

What both ends? :-) This is a rocket, not a plastic tube.

And who plugs them, and where. In space, before landing?

That is not correct. The type used to write to the memory is int, not void or char. If the object, whose address is passed to the function is not compatible with int, the behavior is undefined.

You should read about strict aliasing, you will be surprised.

I guess one could still be evil and pass a pointer to a non-int type to the function. That example is really bad, you don't need a void pointer to show this ub 'optimization'.
That code is well defined.
Re:Never ever write software for Oculus on Monday April 04, 2016 @01:10PM (#11423523)
I think you're trolling but here goes:

Oculus terms of service require (among other things) of the user this: By submitting User Content through the Services, you grant Oculus a worldwide, irrevocable, perpetual (i.e. lasting forever), non-exclusive, transferable, royalty-free and fully sublicensable (i.e. we can grant this right to others) right to use, copy, display, store, adapt, publicly perform and distribute such User Content in connection with the Services... and so on

This is absolutely not the case with the MIT license, which only requires the licensee to do this: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. and nothing else. Oculus license (terms of service) requires the licensee give to Oculus right to his/her User content if he/she agrees to the Oculus license (terms of service).

Re:Tesla Intrigue Deepens with Musk's Twitter Barrage on Monday April 04, 2016 @10:52AM (#11422292)
This is what I'm thinking too. The lack of dashboard is not because the car will be autonomous, it will be but only on the freeway, but because there will be a HUD.
Re:Tesla Intrigue Deepens with Musk's Twitter Barrage on Monday April 04, 2016 @10:42AM (#11422218)
How could it be? The regulations don't allow it. I don't see it happening sooner than 10 years. If so, what is their plan?
Re:Never ever write software for Oculus on Monday April 04, 2016 @08:31AM (#11421329)
As a future dev it makes me sick. I have to choose either to support a business like that or never make any money.
Re:Never ever write software for Oculus on Monday April 04, 2016 @08:01AM (#11421166)
Am I not saying in effect that I grant anyone that comes along a...

With the MIT license you grant those permissions for your own work, not for their work back to you.

Re:Never ever write software for Oculus on Monday April 04, 2016 @07:53AM (#11421125)
I have no problem with that if it is an opt-in. Otherwise I expect privacy in my home.

No mobile app is tracking me. The only information stored by the use of my phone is the cell tower location, the use of that information requires a court order in my country (although it is possible that even that isn't stored anymore, I would have to check).

Re:Never ever write software for Oculus on Monday April 04, 2016 @07:51AM (#11421116)
Read it again. Author is concerned about how Oculus threats their users, therefore as a developer he/she decided to not contribute to that system.
Re:Never ever write software for Oculus on Monday April 04, 2016 @07:49AM (#11421099)
And from their privacy policy https://www.oculus.com/en-us/legal/privacy-policy/:

Information Automatically Collected About You When You Use Our Services: -Information about your physical movements and dimensions when you use a virtual reality headset.

So even if I play single player games in my home I have no expectation of privacy anymore.

Good point. You would get different sequences by choosing different constants for the generator though, but you couldn't cover all of them by a longshot.
Re:The Secret Tesla Motors Master Plan (2006) on Monday April 04, 2016 @06:39AM (#11420757)
Limiting resources are a limiting factor, kinda a tautology.
Re:The Secret Tesla Motors Master Plan (2006) on Monday April 04, 2016 @04:32AM (#11420251)
I agree with you, although it is incorrect to assume that batteries will be always lithium based.
MLCG is sequential. No value will be repeated within the period.
This only matters in calculations where randomness is important, i.e. Monte Carlo method.

Nevertheless, if you don't use the least significant bits, and if the constants are carefully chosen, MLCG passes most of the hardest statistical tests. For example it passes all DIEHARD tests, and most of TESTU01.

Here is an alternative:

Use a multiplicative linear congruential generator with a period 2^n , where n is ceil(log2(m)), where m is the size of the list.

Seed the generator, start generating values and drop all values that are larger than m. In the worst case you will have to drop half of the values, in the best case you will drop none. This depends on how close to a power of 2 m is.

The generator is very short, one line of code, and very fast: one multiplication, one addition, and one bitshift. Space complexity is O(1).

If your tweets are generated out from an integer value, then you can use this value to generate them. The tweets will be unique (assuming the tweet generator will generate unique tweets from unique values), and you will have m of them.

Re:Police Body Cameras: What Do You See? on Saturday April 02, 2016 @08:32AM (#11411292)
That sounds very helpful and frightening at the same time.

In the future where everything is recorded the records should be sealed unless a warrant for those recordings is presented. The warrants should be made public.

Recording everything is alredy happening in some cities, like London, but the control is on the side of law enforcement.

From the Facebook shareholder conference call after the Oculus acquisition 2 years ago https://soundcloud.com/highway62/internal-facebook-conferenc... (Note that this is an public call, those are their official statements.)

At time stamp 29:19: There might be advertising in the world, but we need to figure that down the line. That is probably where the business will come from...

And at time stamp 29:50: If we are successful in building the kind of platform that we think we can build here, there should be lots of different monetization opportunities, it is too early to make any concrete plans in terms of exactly what virtual will be.

Facebook is building the first virtual world. Think about that.