Spyke

Replies

linux

Comment on

Thought I'd Died & Linux Was the Messenger

Reply in thread

Lemmy is not GPLv2, but AGPLv3.

So, the game would have to be (A)GPLv3. (The licenses are fairly interoperable. IIRC you can use AGPL components in GPL software if you abide by the terms of the AGPL.)

Viral licenses are nice and all, but they're not without their drawbacks. I caught GPL recently (the slightly rarer Affero v3 strain) and now no DNA testing companies want me as a customer. I can no longer write MIT or BSD licensed code. Whenever I open a project, a LICENSE file appears within ~15 minutes of contact. I hope to recover soon.

Comment on

More code = more better

The compiler should be able to optimize all of them to the same machine code.

  1. This is already good.
  2. Easily optimized by constant folding.
  3. This one depends on the semantics of signed underflow, so it may not do what you want.
  4. The loop can only exit if x==10, so as long as the nextInt() method doesn't have side effects, the loop should be eliminated. But, again, language semantics can affect this.

Edit: Very wrong for 3 & 4, see replies.