Project Ceylon, Successor for Java?

14. April, 2011

A lot of languages compete for the king’s seat taken by Java. Most of them solve a lot of problem with Java but none of them really takes the win. As I say: “Why is there more than one database? Because they all suck.”

Now Ceylon enters the stage (slides from the presentation). The main goal is to clean up the SDK while keeping an eye on what was good and what was bad with Java.

I’ve had my share with programming languages. On a scale between 1 and 10 (best), Python gets 9 from me. Java gets 6. Scala gets 5.

So how does Ceylon fare? At first glance, I’d give it a 7.

Pros:

  • Compact syntax. No packages, no classes.
  • I like to idea of the recursive block scope which gets rid of the very limited public/private and the ill fated package public. My only concern is how you can declare friends to something at a nested scope (for example for tests).
  • Short syntax to avoid NPEs. The approach allows to catch null pointers when they are assigned instead of when they are used. This means: If you find a bug, you’ll actually know what to do about it.
  • No new keyword! I really never understood why they added that.
  • No checked exceptions. No one got them right, anyway.
  • Just one constructor per class. I never use them anyway, and the new named argument syntax solves many of the existing problems.
  • Method references

Cons:

  • = vs. :=. Come on. In 2011, I still need to tell the compiler something it already knows? Also, looking at my code, I’ll probably use := a lot. So that means extra effort for me. Bad. Not everyone’s brain is wired for immutables.
  • “if (exists foo)” to check for null values. If I already have to use a special syntax to mark something as “can be null”, why do I need to mention that again in a condition? What’s wrong with “if(name)”?

Things that leave me puzzled:

  • local vs shared. I understand that the compiler can’t infer types for shared references in a single pass but who cares? The compiler is a tool that has to make me more productive. If the compiler needs two or three passes to resolve dangling type reference, so what?
  • How is the module system working? How do you bundle types in a container to keep the namespace clean?

Sony vs. The World 1:0 …?

13. April, 2011

So Georg Hotz “caved in” and accepted to sign a settlement agreement (good article). Those quotes aren’t accidental; being accused in a law-suit does odd things to your life and most of them are unpleasant. Being famous isn’t as great as MTV wants you to believe. Ever wondered why all those famous persons are either weird, drug addicts or die early? There might be a connection.

As for Georg, one hell is over and now he gets raped by all his supporters. It’ll wash over, trust me.

So did Sony win? No. Win would mean to prove in court that it’s illegal to decrypt and modify the firmware of the PS3. Which they avoided. If you’re a multi-billion dollar company and someone/something is a threat to one of your most valuable products (my impression after reading what SCEA said during the lawsuit), wouldn’t you want to make sure this issue is fixed once and for all? For some reason, Sony didn’t.

It’s probably because they didn’t want to harm poor Georg.

*hilarious laughter*

Oh man, I’m killing myself. So. Sony caved, Georg won: He’s not going to jail, he isn’t fined, he isn’t prosecuted. He’s a free man. Well, mostly.

He isn’t allowed to do illegal things with “any SONY PRODUCT” (their yelling). Oookaaayy… what exactly is illegal? Wasn’t that one important point that the lawsuit should have settled?

I mean in Europe, it’s legal to reverse engineer any software if you need that knowledge to make it cooperate with some other software (“make it interoperable”) and if you can’t get that knowledge some other way (competitor wants to keep you out of the market, producer is no longer around, etc.). You must not spread the reverse engineered code but you could, for example, write a patch or an installer with it.

And Georg isn’t allowed to talk about the settlement which is confidential. I don’t need to understand this, I guess, but I’m sure he would rather forget this sad story and move on.

So. One guy fixed. I’m sure no other smart person on the planet is going to try this again. Ever.

And one prediction: It seems that Georg has some money left. Instead of wasting it on his own case (which Sony might have dragged out for a decade, for example) he might have invested it in the other lawsuit where chances to win might be much higher – especially with all the notes he got from his case.


Maven Tools for Eclipse: Patching POMs

11. April, 2011

I’ve added a new feature to my Maven tools for Eclipse: Applying patches to POMs.

This is a first step towards solving issues like this one: Bug 342046 – Invalid third party dependencies in Mavenized BIRT plugins

I’m not 100% happy with the result, though. Currently, the patch overwrites the original code. I think it would be much better if it created a profile instead. This way, you could see the original code and it would be simple to switch between different solutions for a problem in a POM.

The two standard problems are:

  • Bad version (no version, version range or wrong version)
  • Dependency name

The latter is introduced by the fact that Eclipse projects need to pull dependencies via Project Orbit. Orbit often renames dependencies so there is a naming conflict if you pull your dependencies from Maven Central. So we need a way to say “I’m using Orbit” and “I want Maven Central”.


Glorious Sunrise in Minecraft

7. April, 2011

I’m working on my crystal tower. While roaming the country, I stumbled over this cliff (Minecraft Beta 1.4):


Aspiring Writer

6. April, 2011

Old but still great:

There was once a young man who, in his youth, professed his desire to become a great writer. When asked to define “great” he said, “I want to write stuff that the whole world will read, stuff that people will react to on a truly emotional level. Stuff that will make them scream, cry, and howl in pain and anger!”He now works for Microsoft, writing error messages.

Source: Microsoft jokes

 


Sound Problems on Linux

5. April, 2011

Sound on Linux was pretty stable but then came PulseAudio sigh. One of the major problems is that some programs don’t try to look for the PulseAudio server. Instead, they try to lock the sound devices under /dev. Flash is one of them.

But there is a solution: Create a file “$HOME/.asoundrc” with this content:

pcm.!default {
    type pulse
}
ctl.!default {
    type pulse
}

That redirects all clients which use ALSA to the PulseAudio server and everyone is happy.