KotlinRsps

I recently started looking into JetBrain’s Kotlin-lang, which is a Statically typed programming language for the JVM, Android and the browser - kotlinlang.org

As I have always wanted to know more about how RSPS’ work, I started implementing one in the Kotlin language.
Java NIO (SocketChannels, Selectors, …) is being used for the server-sided networking (which is also totally new for me).

I know there is no need for more non-completed #317 emulators, especially written in other languages than Java.
However, this emulator is being written to get a better grasp on the protocol, learn some Kotlin and NIO, and to be able to understand the internal workings of an RSPS in general.

Currently only logging in is done - not even properly as sessions are not yet being saved.

I have made a small adaption to the client’s log-in sequence so the log-in itself could also be handled as a packet (I just added an opcode of -1 to it).

Incoming packets are lazily loaded through reflection.
This way I could add a new packet handler without having to recompile or even restart the server - not that this is that useful, but hey.

Future updates will be posted in this topic!

You can find the project on Github: https://github.com/Kattoor/KotlinRsps

Very cool :)!

Instead of doing an RSPS server I suggest something useful like a Bitcoin client :slight_smile: all the same neat.

But Bitcoin clients aren’t my childhood :frowning:

[quote=“Snow_, post:4, topic:555387”][quote author=RuneAgent link=topic=674579.msg4508520#msg4508520 date=1463224479]
Instead of doing an RSPS server I suggest something useful like a Bitcoin client :slight_smile: all the same neat.
[/quote]

But Bitcoin clients aren’t my childhood :([/quote]
Point taken, the RSPS might be more fun but you might learn a bit more with a Bitcoin implementation. Interesting stuff all the same I honestly never even looked at this language prior you making this post.

[quote=“RuneAgent, post:5, topic:555387”][quote author=Snow_ link=topic=674579.msg4508521#msg4508521 date=1463226977]

But Bitcoin clients aren’t my childhood :frowning:
[/quote]
Point taken, the RSPS might be more fun but you might learn a bit more with a Bitcoin implementation. Interesting stuff all the same I honestly never even looked at this language prior you making this post.[/quote]

I’ll be sure to take a look at Bitcoint clients, thanks for advice!
To be honest I haven’t bought / sold Bitcoins or anything remotely similar yet.

About Kotlin, I started using it due to Jetbrains developing the language. I’m kind of a Jetbrains fanboy. Besides this, I actually find it more fun to develop with than Java.

kotlin is nice, cool project

kotlin doesn’t look very appealing. Looks like it’s making things more verbose.

Bit of research shows that it’s slower at compile time and it produces bad java code e.g.

[quote=“my-swagger, post:8, topic:555387”]kotlin doesn’t look very appealing. Looks like it’s making things more verbose.

Bit of research shows that it’s slower at compile time and it produces bad java code e.g.

SCALA MASTER RACE

FUNCTIONAL PROGRAMMING MASTER RACE

[quote=“lare69, post:9, topic:555387”]SCALA MASTER RACE

FUNCTIONAL PROGRAMMING MASTER RACE[/quote]
Scala if you’re still using java 7.

Scala 2.12 is targeting Java 8 :wink:

[quote=“lare69, post:11, topic:555387”][quote author=my-swagger link=topic=674579.msg4509059#msg4509059 date=1464428276]
Scala if you’re still using java 7.
[/quote]
Scala 2.12 is targeting Java 8 ;)[/quote]
Okay but Java IMO has a better syntax and is more readable! :smiley: :smiley:

no surprise there, Java is both imperative and verbose

[quote=“lare69, post:13, topic:555387”][quote author=my-swagger link=topic=674579.msg4509440#msg4509440 date=1465296962]
Okay but Java IMO is more readable! :smiley: :smiley:
[/quote]
no surprise there, Java is both imperative and verbose[/quote]
I don’t think so. Compared to others sure but it’s clear and concise.

go away beta