Oculus No Longer Lets Customers Move Purchased Software To Non-Oculus Hardware Slashdotby BeauHD on drm at January 1, 1970, 1:00 am (cached at May 20, 2016, 11:36 pm)

AmiMoJo quotes a report from Boing Boing: As recently as 5 months ago, Oculus founder Palmer Luckey was promising his customers that they could play the software they bought from the Oculus store on "whatever they want," guaranteeing that the company wouldn't shut down apps that let customers move their purchased software to non-Oculus hardware. But now, Oculus has changed its DRM to exclude Revive, a "proof-of-concept compatibility layer between the Oculus SDK [software development kit] and OpenVR," that let players buy software in the Oculus store and run it on competing hardware. The company billed the update as an anti-piracy measure, but Revive's developer, who call themselves "Libre VR," points out that the DRM only prevents piracy using non-Oculus hardware, and allows for unlimited piracy by Oculus owners.

Read more of this story at Slashdot.

Oculus No Longer Lets Customers Move Purchased Software To Non-Oculus Hardware Slashdotby BeauHD on drm at January 1, 1970, 1:00 am (cached at May 20, 2016, 11:36 pm)

AmiMoJo quotes a report from Boing Boing: As recently as 5 months ago, Oculus founder Palmer Luckey was promising his customers that they could play the software they bought from the Oculus store on "whatever they want," guaranteeing that the company wouldn't shut down apps that let customers move their purchased software to non-Oculus hardware. But now, Oculus has changed its DRM to exclude Revive, a "proof-of-concept compatibility layer between the Oculus SDK [software development kit] and OpenVR," that let players buy software in the Oculus store and run it on competing hardware. The company billed the update as an anti-piracy measure, but Revive's developer, who call themselves "Libre VR," points out that the DRM only prevents piracy using non-Oculus hardware, and allows for unlimited piracy by Oculus owners.

Read more of this story at Slashdot.

Can Taiwan's president maintain stable China relations? AL JAZEERA ENGLISH (AJE)(cached at May 20, 2016, 11:31 pm)

Taiwan's Tsai Ing-wen has called for independence in the past, worrying some in China.
Can Taiwan's president maintain stable China relations? AL JAZEERA ENGLISH (AJE)(cached at May 20, 2016, 11:31 pm)

Taiwan's Tsai Ing-wen has called for independence in the past, worrying some in China.
Judge Orders 'Intentionally Deceptive' DOJ Lawyers To Take Remedial Ethics Class Slashdotby BeauHD on education at January 1, 1970, 1:00 am (cached at May 20, 2016, 11:06 pm)

According to the Daily Caller, "The judge overseeing the challenge by 26 states to President Obama's executive action in immigration has ordered all lawyers 'employed at the Justice Department in Washington, D.C. who appears, or seeks to appear, in a court (state or federal) in any of the 26 Plaintiff States annually attend a legal ethics course.'" An anonymous reader quotes a report from Zero Hedge: In writing the ruling, Hanen quoted from the scene in "Miracle on 34th Street" when the boy is called to testify to Santa's existence and saying that everyone knows not to tell a lie to the court. Hanen went on to say that that the Justice Department lawyers have an even stricter duty: Tell the truth, don't mislead the court, and don't allow it to be mislead by others. "The Government's lawyers failed on all three fronts. The actions of the DHS should have been brought as early as December 19, 2014. The failure of counsel to do that constituted more than mere inadvertent omissions -- it was intentionally deceptive." Judge Hanen wrote in his ruling. Hanen ordered that the classes must be "taught by at least one recognized ethics expert who is unaffiliated with the Justice Department." I wonder if the judge could order the lawyers to jail for contempt of court?

Read more of this story at Slashdot.

Updating Local Objects with Server Objects inessential.comat January 1, 1970, 8:00 am (cached at May 20, 2016, 11:02 pm)

I’ve spent much of my career writing apps that store objects locally that come from the web — and that may change on the web, and then need to be updated locally.

This kind of code can be tedious to write. Given a local object and an objectified version of some JSON or XML or whatever, I’d write something like this (translated to Swift for fun):

if localObject.foo != serverObject.foo {
  localObject.foo = serverObject.foo
  changeDictionary[fooKey] = serverObject.foo
}
if localObject.bar != serverObject.bar {
  localObject.foo = serverObject.bar
  changeDictionary[barKey] = serverObject.bar
}
// multiply above a dozen times and for several different classes
return changeDictionary

Maybe you spotted the bug in the above, and maybe you didn’t — and that’s part of my point. I’d write this code using copy-and-paste, and then go over it visually, line-by-line, to make sure it’s right, and sometimes I’d miss something anyway.

If foo and bar are both strings, for instance, the above would compile and all would be well. Except that I’ve written a bug where localObject.foo = serverObject.bar.

Eventually I found a better way — some code that I can write once, and that can’t have the bug I wrote above. See this gist.

* * *

The solution is pretty simple. You have two objects — which may or may not be the same class but where the properties have the same names — and then loop through an array of mergeable property names. (The two objects don’t have to have the exact same list of property names. They just have to have the mergeable property names and types in common, since those are the ones we care about.)

Then there’s a method that compares the local and server objects. For each property name in the list, it gets the localValue and serverValue using valueForKey:, and then compares them (via isEqual:).

When they’re not equal, then it uses setValue:forKey: on localObject to give it the serverValue. It also adds the property name and new value to a change dictionary. (That dictionary could be useful for efficient database updating, sending notifications, etc.)

There are places this could go wrong, and where the compiler wouldn’t complain. In the gist there’s this line:

static let mergeablePropertyNames = ["dog", "cat", "zebra", "numberOfAnimals", "fedTheTigers", "attendingDoctors"]

Obviously that line has to be maintained, and it has to be true that both local and server objects have those properties and those properties have to be of the same type. Yes.

However, you’re going to notice any error at runtime pretty quickly, since you’ll get an exception — while you may not notice the localObject.foo = serverObject.bar bug from the manual version any time soon.

Best thing: you can reuse that updateLocalObject​WithServerObject method for all the various local/server object updating you need to do in all your apps.

* * *

Even though we’re writing in Swift here, the solution uses the Objective-C runtime and KVC.

KVC is both awesome and to be used sparingly. Most of the time you want to write standard code that the compiler can better check — you want to write foo.bar = true. Absolutely.

But there are those occasional critical cases where KVC creates more reliable code that’s easier to maintain, debug, and reuse. This is one of those.

Mexico's El Chapo to challenge US extradition in court AL JAZEERA ENGLISH (AJE)(cached at May 20, 2016, 10:31 pm)

The Mexican government decided to extradite the drug boss to the US under condition that he is not given death sentence.
NGS-Tools-BAMSurgeon search.cpan.orgby Boutros Lab Software at January 1, 1970, 1:00 am (cached at May 20, 2016, 10:05 pm)

NGS-Tools-BAMSurgeon search.cpan.orgby Boutros Lab Software at January 1, 1970, 1:00 am (cached at May 20, 2016, 10:05 pm)

CPAN-Plugin-Sysdeps-0.09 search.cpan.orgby Slaven Rezić at January 1, 1970, 1:00 am (cached at May 20, 2016, 10:05 pm)

CPAN.pm plugin for installing external dependencies
Image-DS9-0.184 search.cpan.orgby Diab Jerius at January 1, 1970, 1:00 am (cached at May 20, 2016, 10:05 pm)

interface to the DS9 image display and analysis program
Image-DS9-0.184 search.cpan.orgby Diab Jerius at January 1, 1970, 1:00 am (cached at May 20, 2016, 10:05 pm)

interface to the DS9 image display and analysis program
LMDB_File-0.10 search.cpan.orgby Salvador Ortiz at January 1, 1970, 1:00 am (cached at May 20, 2016, 10:05 pm)

Tie to LMDB (OpenLDAP's Lightning Memory-Mapped Database)
Mojolicious-Plugin-AssetPack-1.12 search.cpan.orgby Jan Henning Thorsen at January 1, 1970, 1:00 am (cached at May 20, 2016, 10:05 pm)

Compress and convert css, less, sass, javascript and coffeescript files
Mojolicious-Plugin-AssetPack-1.12 search.cpan.orgby Jan Henning Thorsen at January 1, 1970, 1:00 am (cached at May 20, 2016, 10:05 pm)

Compress and convert css, less, sass, javascript and coffeescript files