Let's build our own Redis in Kotlin
!
Let's build our own Redis in Kotlin
!
Got a TCP server up and running! 🚀
Dodged a bullet by not having to use Java sockets - Ktor already wraps java.nio in a coroutines-friendly API
Tangentially, it was incredibly easy to set up the project by using @cachix's devenv.
Haven't got the Kotlin toolchain installed on my machine, but with one line of config, I had the JVM, the Kotlin compiler & Gradle fired up and ready to go.
languages.kotlin.enable = true;
The Redis protocol uses CRLF (\r\n) as a terminator.
Using netcat, I can easily send LF (\n) by pressing enter, but how do I send CRLF? Its manual page mentions no such thing 
But thanks for the assist!