ktfmt
galoisenne
Our great sponsors
ktfmt | galoisenne | |
---|---|---|
9 | 2 | |
816 | 102 | |
3.7% | - | |
8.4 | 9.7 | |
1 day ago | 6 days ago | |
Kotlin | Kotlin | |
Apache License 2.0 | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
ktfmt
-
Pre-push Hooks
The script below will run ktfmt over a Kotlin codebase and fail the push if any of the files are not well-formatted. It does also use a custom Gradle plugin we built around ktfmt, which accepts a --run-over change set. This script will leave the fixed formatting changes in the tree, awaiting the developer to intervene, commit, and try again.
- Ktfmt – The Kotlin Code Formatter
-
Google's Kotlin Style Guide vs Kotlin Official Code Style
My team uses ktfmt. It is more aggressive and opinionated about formatting than ktlint, which we view as a good thing.
-
What are the good code formatters for Kotlin?
I can recommend ktfmt. It is based on the fast Google Java Formatter and produces deterministic formatting. Plugins for Maven, Gradle and IntelliJ are available.
-
A friend took a look at my code and asked if I needed mental help. Is he right? What are your thoughts?
The only sane formatting tool for Kotlin is ktfmt. https://github.com/facebook/ktfmt
- From zero to 10M lines of Kotlin
-
A few Kotlin questions from a Rustacean
Others have covered most of your questions, but since you asked about linters: if you want a highly opinionated formatter in the spirit of gofmt or google-java-format, you can check out ktfmt.
-
Diktat 1.0.0 released
Facebook's ktfmt (https://github.com/facebookincubator/ktfmt) does that.
galoisenne
-
Show HN: Game of Life on non-square topologies with 2^32 update rules
During a recent programming detour, I discovered that finite elementary cellular automata with circular boundary conditions can be simulated using power iteration using matrix-vector multiplication with a circulant matrix and a strange kind of algebra, which I call a kernel algebra. [1] I wonder if this same idea could be generalized to higher dimensional automata on other topological surfaces.
[1]: https://github.com/breandan/galoisenne/blob/8f0f1e9e4e02062c...
-
From zero to 10M lines of Kotlin
Well, I've been trying for about three years, but to be fair I'm a pretty slow programmer so you may have better luck.
> a language being too obscure to have seen much academic study
Doesn't seem too obscure to me.
https://scholar.google.com/scholar?hl=en&as_sdt=0%2C5&q=kotl...
> T isn't generic in that code, it's just a class.
I think it needs to be a generic type in Kotlin for this to work, because otherwise it will dispatch to a single method. It's tricky to get Kotlin to do much compile time computation. Not saying that it's impossible, but LMK when you've actually tried it. Here's some sample code if you want to try encoding a Boolean logic:
https://github.com/breandan/galoisenne/blob/2e465e7a753f6341...
What are some alternatives?
diktat - Strict coding standard for Kotlin and a custom set of rules for detecting code smells, code style issues and bugs
javalin.github.io - Javalin website source code
KotlinLanguageServer - Kotlin code completion, diagnostics and more for any editor/IDE using the Language Server Protocol
vhs - Your CLI home video recorder 📼
Anki-Android - AnkiDroid: Anki flashcards on Android. Your secret trick to achieve superhuman information retention.
TypeScript - TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
editorconfig-vim - EditorConfig plugin for Vim
kotlinter-gradle - Painless, fast ktlint plugin for Gradle
ktor - Framework for quickly creating connected applications in Kotlin with minimal effort