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:
Watch it in action on YouTube:Â http://youtu.be/iee75Dtw83k
Note that in order to use Canvas, you need to select the JavaScript (Canvas) run configuration in the panel on the right.
Sharing your programs
Also, you can now save a program you wrote in and share a public link to it:
- Go to the Web Demo, and log in with you Google, Facebook or Twitter account.
- Write a program, e.g. solve a problem from the Problems section,
Save it in your private space.
- Share your solution with everyone: press the
Public link button next to your saved program and press the
button next to the URL, or share the link any other way.
As an example, here’s a public link to the program from the video above:
http://kotlin-demo.jetbrains.com/?publicLink=104074971561017308771626401859
(It is written by Pavel Talanov.)
P.S. BTW, you can now have local functions in your programs, as well as the new form of when.
guangyu says:
February 13, 2012I viewed and ran the program (
http://kotlin-demo.jetbrains.com/?publicLink=104074971561017308771626401859), and found:
So cool.
1) The code was concise;
2) The appearance is beautiful && fluent.
MuppetGate says:
February 14, 2012That is seriously impressive. 🙂
So you’re writing a Javascript library as well?
Andrey Breslav says:
February 14, 2012Not much of a library, but rather some bindings for existing ones.
Peter says:
February 14, 2012I like the example for ‘when’ in the documentation 😀