ProductPromotion
Logo

Kotlin

made by https://0x3d.site

GitHub - dkandalov/rosettacode-kotlin: Repository with source code from http://rosettacode.org/wiki/Category:Kotlin
Repository with source code from http://rosettacode.org/wiki/Category:Kotlin - dkandalov/rosettacode-kotlin
Visit Site

GitHub - dkandalov/rosettacode-kotlin: Repository with source code from http://rosettacode.org/wiki/Category:Kotlin

GitHub - dkandalov/rosettacode-kotlin: Repository with source code from http://rosettacode.org/wiki/Category:Kotlin

Build Status Gitter chat

Rosetta Code Kotlin

This is a repository with the Kotlin source code from RosettaCode wiki.

The main motivation for extracting all the code into a repository is to make sure it actually compiles and to make it more maintainable (e.g. by applying static analysis and migrating code as the Kotlin language evolves).

This project is intended to be like a wiki. You are, therefore, more than welcome to contribute. All pull requests will be considered.

How to contribute?

In general, the following things can be improved:

  • clean up code (e.g. using IDE suggestions)
  • add unit tests for existing tasks
  • update all tasks to the latest version of Kotlin

Step 1: Fork, clone and compile

You will need to fork the repository on GitHub and then clone that repository to your working computer – the usual GitHub workflow. Once you have your local clone, make sure the project compiles (it's good to check you can compile the project yourself even if it's green in CI server).

If you want to use Gradle, then ./gradlew classes.

Step 2: Pull code from Rosetta Code website

You will need to run a script which checks that Kotlin code in repository is still the same as Kotlin code on Rosetta Code website. There are several ways to do it:

  • in Gradle run ./gradlew pull.
  • in IDE run scripts/PullFromRosettaCode.kt.

Note that the script caches data downloaded from web into .cache directory. You can run the script without clearing cache using ./gradlew pullDirty or scripts/PullFromRosettaCodeDirty.kt. This will make script execution faster but changes from RosettaCode website might be missed.

Possible outputs from the script:

  • all source code files match perfectly. You can move to the next step :)
  • source code exists on Rosetta Code website but doesn't exist in git repository. The script will automatically download source code. But you will need to compile it, add to git, commit and send a pull request.
  • source code exists in git repository but doesn't exist on Rosetta Code website.
  • source code exists in both git repository and the website, but has different content. In this case you will need to manually find what the difference is, and modify repository or website to keep code in sync. You can set system property to automatically pull code from website for files with difference, e.g. ./gradlew -DoverwriteLocalFiles=true pull.

Files downloaded by the script will have additional package task_name line which might not exist on Rosetta Code website. This is to avoid name clashes between different tasks. This line won't be considered when diffing repository and website code. If you use IDE to edit Kotlin code, it might report that package name doesn't match file directory. It's suggested to disable this inspection for this project.

Step 3: Add/modify tasks

  • Make changes and check that project still compiles (and tests pass).
  • Commit, push and send pull request on GitHub.
  • Update Rosetta Code website:
    • in Gradle run ./gradlew push.
    • in IDE run scripts/PushToRosettaCode.kt.
    You need to have an account on Rosetta Code website to make modifications.
    Adding new tasks is currently a manual step, i.e. you can only do it from browser. (It might be a good idea to use <lang scala> tag because Kotlin doesn't have syntax highlighting on Rosetta Code website at the moment.)

Step 4: Profit

Congratulations! You have just contributed to the World Wide Web!! :octocat:

More Resources
to explore the angular.

mail [email protected] to add your project or resources here 🔥.

Related Articles
to learn about angular.

FAQ's
to learn more about Angular JS.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory