Contributing to Kotlin (Kontributing)

As you all know, Kotlin went Open Source two weeks ago. In this post, I give some instructions for prospective contributors and an overview of the contributions we already had.

Kontrbute!

Contributing to an open-source project is easy:

  • Have a look at our issue tracker to select an issue you’d like to fix.
    • We have a special tag for those issues that seem to be easy for newcomers.
    • We also have an assignee in our tracker, named Kontributor, to whom we assign issues that we are hoping to get contributions on.
  • Fork our github repository.
  • Fix your issue.
  • Submit a pull-request.

BTW, we have already accepted the first pull-request from an external kontributor: https://github.com/JetBrains/kotlin/pull/1. Thank you, Sergey! When in SPb, drop by our office to collect a T-Shirt. :)

I would also like to mention James Strachan and Evegny Goldin, who are already Komitters, but not enrolled with JetBrains. Guys are contributing to standard library/KotlinDoc and build tools respectively.

Not really into fixing bugs? Lots of opportunities for you, too!

There are many ways to help Kotlin get better. Here are some examples: Continue reading

Posted in Uncategorized | 14 Comments

Kotlin Goes Open Source!

We are happy to announce that Kotlin, a modern programming language for Java and JavaScript platforms developed by JetBrains since 2010, has just gone Open Source!

In addition to Kotlin Web Demo, a web-based environment for editing, running and sharing Kotlin programs, we’ve opened access to snapshot builds and source code (under the Apache 2 License) of the following:

  • The Kompiler — Kotlin compiler,
  • Enhancements to basic Java libraries — convenient utilities for JDK collections and more,
  • Build tools — Ant and Maven integration, and
  • IntelliJ IDEA plugin — Kotlin’s native IDE.

We invite you to try Kotlin and give us your feedback, ideas and suggestions. Solve problems proposed on Web Demo and share your solutions with the world.

We are also looking for Kontributors, i.e. Kotlin contributors — brave souls eager to make this world a better place together with us. All Kontributions, from compiler to IDE patches to libraries and examples, are welcome and appreciated. You can start by reading our issue tracker or by just picking your favorite library and making it Kotlin-friendly.

Read more on http://jetbrains.com/kotlin
Our issue tracker: http://youtrack.jetbrains.com/issues/KT
The source code is available at http://github.com/JetBrains/Kotlin

Note that Kotlin is still under development. You can download snapshot builds here: https://github.com/JetBrains/Kotlin/downloads.
Attention: Latest builds of IntelliJ IDEA are required for running the plugin.

Posted in Uncategorized | 56 Comments

Let’s Kode Together!

As Kotlin Web Demo is the simplest way to try Kotlin. Today we unveil some new features that make it even more fun.

HTML5 Canvas

We added support for HTML5 Canvas (for the JavaScipt back-end) so that you can now do something like:

Continue reading

Posted in Uncategorized | 4 Comments

The Road Ahead

As you all know, we rolled out our first public release last week: kotlin-demo.jetbrains.com. And while you (7K+ unique visitors) are having fun with it, we keep working on the Kotlin compiler, IDE and standard library. In this post, I’ll give an overview of our plans. Continue reading

Posted in Uncategorized | 45 Comments

Kotlin Web Demo is out!

It’s been a little more than a year since the first commit was pushed to our source control, and we are happy to announce the first public preview of Kotlin.

This preview works as follows:

  • You go to http://kotlin-demo.jetbrains.com and it loads a code editor in your browser:
  • You check out examples, modify them or even solve our sample toy-problems;
  • You run your code on a JVM running on our server, so that you can use familiar JDK classes;
  • Or, alternatively, you compile you code to JavaScript and run it in your browser:

    Note that the JavaScript back-end is a pre-alpha version, so it may refuse to compile some of your programs.

Continue reading

Posted in Uncategorized | 32 Comments

The Great Syntactic Shift

As the first public preview of Kotlin is approaching (it will be announced on Jan 10th, 2012, which is less than a week from now!), we are putting some things in order…

In particular, we have reviewed syntactic forms available in the language, and decided to change a few. These changes are incompatible with the old syntax, and we have migrated all our test data, and will update the publicly available documentation soon.

I would like to point out that this is not the last change of this sort. Kotlin is not released yet, and until it is we are constantly gathering feedback and sometimes find out that something needs to be changed. Consequently, there are no backward-compatibility guarantees before the 1.0. We realize how important backward compatibility is, but we’d better be backward compatible to a really good design created according to the needs of real people.

Here’s an overview of the changes we’ve made.
Continue reading

Posted in Uncategorized | 47 Comments

StrangeLoop Slides+Video

Slides and video from the talk I gave at StrangeLoop this year is available here:

Kotlin @ StrangeLoop 2011

Posted in Uncategorized | 2 Comments

A little lesson learned from Java

A post about good books, language design and JIT compilation, in which one bug turns into another and than back…

Recently I started looking through an excellent book “Java™ Puzzlers”, where Joshua Bloch and Neal Gafter provide a list of Java’s “Traps, Pitfalls, and Corner Cases”, i.e. programs that make you think they do what they really don’t. My idea is to see how many of the puzzlers are ruled out or fixed by Kotlin. I’ve looked through the first 24 items, and 15 of them are fixed in Kotlin, which is over 60%.

Some of the puzzlers can’t be fixed without severe implications on compatibility with the rest of the world. For example, most of the tricky things about IEEE-745 floating-point numbers. But some other ones, though not fixed in Kotlin yet, may be fixed. One particular example is Puzzler 26 “In the Loop”:

/**
 * Bloch, Joshua; Gafter, Neal (2005-06-24).
 * Java™ Puzzlers: Traps, Pitfalls, and Corner Cases (p. 57).
 * Pearson Education (USA). Kindle Edition.
 */
public class InTheLoop {
    public static final int END = Integer.MAX_VALUE;
    public static final int START = END - 100;

    public static void main(String[] args) {
        int count = 0;
        for (int i = START; i <= END; i++)
            count++;
        System.out.println(count);
    }
}

Don’t read further until you figure what this program prints :)

Continue reading

Posted in Uncategorized | 2 Comments

DSLs in Kotlin: Part 1. What’s in the toolbox + Builders

If you have a very nice API, it is the fashion nowadays to call it an internal DSL, because the code that uses such an API reads almost like a language inside your language of choice. Fluent interfaces serve as one of the most popular examples.

Many modern languages provide some advanced means for creating internal DSLs, and Kotlin is no exception here. In this post I will briefly list the features that are useful for this purpose.
Continue reading

Posted in Uncategorized | 25 Comments

Slides and Video: Kotlin@JVMLS 2011

Our slides and video from the JVM Language Summit 2011 is available via Dr. Dobb’s. Enjoy.

Posted in Uncategorized | 13 Comments