Slide 1

Slide 1 text

@Guardiola31337 @Guardiola31337 Manual documentation is dead. Long live automated documentation! Automated documentation with ΛNK Pablo Guardiola

Slide 2

Slide 2 text

@Guardiola31337 ΛNK Compile time docs verification and evaluation for Kotlin and Java

Slide 3

Slide 3 text

@Guardiola31337 ΛRROW Functional companion to Kotlin's Standard Library

Slide 4

Slide 4 text

@Guardiola31337 Option https://arrow-kt.io/docs/datatypes/option/

Slide 5

Slide 5 text

@Guardiola31337 ```kotlin:ank import arrow.* import arrow.core.* val someValue: Option = Some("I am wrapped in something") someValue ``` Option

Slide 6

Slide 6 text

@Guardiola31337 Option output ```kotlin import arrow.* import arrow.core.* val someValue: Option = Some("I am wrapped in something") someValue // Some(I am wrapped in something) ```

Slide 7

Slide 7 text

@Guardiola31337 ```kotlin:ank val emptyValue: Option = None emptyValue ``` Option

Slide 8

Slide 8 text

@Guardiola31337 ```kotlin val emptyValue: Option = None emptyValue // None ``` Option output

Slide 9

Slide 9 text

@Guardiola31337 ```kotlin:ank:silent fun maybeItWillReturnSomething(flag: Boolean): Option = if (flag) Some("Found value") else None val itWillReturn = maybeItWillReturnSomething(true) itWillReturn ``` Option

Slide 10

Slide 10 text

@Guardiola31337 Option output ```kotlin fun maybeItWillReturnSomething(flag: Boolean): Option = if (flag) Some("Found value") else None val itWillReturn = maybeItWillReturnSomething(true) itWillReturn ```

Slide 11

Slide 11 text

@Guardiola31337 Option supported type classes ```kotlin:ank:replace import arrow.reflect.* import arrow.data.* import arrow.core.* DataType(Option::class).tcMarkdownList() ```

Slide 12

Slide 12 text

@Guardiola31337 Output

Slide 13

Slide 13 text

@Guardiola31337 MonadDefer Hierarchy ```kotlin:ank:outFile(diagram.nomnol) import arrow.reflect.* import arrow.effects.typeclasses.* TypeClass(MonadDefer::class).hierarchyGraph() ```

Slide 14

Slide 14 text

@Guardiola31337 Output

Slide 15

Slide 15 text

@Guardiola31337 Java ```java:ank int n = 3 + 3; return n; ```

Slide 16

Slide 16 text

@Guardiola31337 Java output ```java int n = 3 + 3; return n; // 6 ```

Slide 17

Slide 17 text

@Guardiola31337 Errors output

Slide 18

Slide 18 text

@Guardiola31337 ./gradlew :arrow-docs:runAnk cd modules/docs/arrow-docs/build/site jekyll serve Demo

Slide 19

Slide 19 text

@Guardiola31337 Setup buildscript { repositories { // ... maven { url "https://dl.bintray.com/arrow-kt/arrow-kt/" } } dependencies { // ... classpath 'io.arrow-kt:arrow-ank-gradle:' } }

Slide 20

Slide 20 text

@Guardiola31337 Setup apply plugin: 'ank-gradle-plugin' dependencies { implementation 'io.arrow-kt:arrow-ank:' // ... } ank { source = file("src/main/docs") target = file("build/site") classpath = sourceSets.main.runtimeClasspath }

Slide 21

Slide 21 text

@Guardiola31337 Pitfalls Kotlin Script Engine becomes incrementally slower https://youtrack.jetbrains.net/issue/KT-17463

Slide 22

Slide 22 text

@Guardiola31337 Pitfalls Annotations kapt can’t run over Markdown

Slide 23

Slide 23 text

@Guardiola31337 Pitfalls Android JSR implementation lacks some extra classes

Slide 24

Slide 24 text

@Guardiola31337 Pitfalls Slow? imports

Slide 25

Slide 25 text

@Guardiola31337 Run Λnk ./gradlew :module-name:runAnk

Slide 26

Slide 26 text

@Guardiola31337 Publish Docs buildscript { repositories { jcenter() } dependencies { classpath 'org.ajoberstar:gradle-git-publish:' } } apply plugin: 'org.ajoberstar.git-publish'

Slide 27

Slide 27 text

@Guardiola31337 Publish Docs gitPublish { repoUri = '[email protected]:/.git' branch = 'gh-pages' contents { from 'build/site' } commitMessage = '' } ./gradlew :module-name:gitPublishPush

Slide 28

Slide 28 text

@Guardiola31337 What’s cooking? Dokka + Kotlin Playground https://arrow-kt.github.io/arrow-playground/

Slide 29

Slide 29 text

@Guardiola31337 What’s cooking? Android support https://github.com/APISENSE/rhino-android?

Slide 30

Slide 30 text

@Guardiola31337 What’s cooking? New modifiers ```kotlin:ank:compile``` https://github.com/arrow-kt/arrow/pull/491

Slide 31

Slide 31 text

@Guardiola31337 What’s cooking? Clean up resources when run fails

Slide 32

Slide 32 text

@Guardiola31337 What’s cooking? Automate all the things!

Slide 33

Slide 33 text

@Guardiola31337 KEEP-87 https://github.com/Kotlin/KEEP/pull/87

Slide 34

Slide 34 text

@Guardiola31337 Contributions welcome! Gitter gitter.im/arrow-kt Kotlinlang Slack #arrow channel

Slide 35

Slide 35 text

@Guardiola31337 @Guardiola31337 Thanks! Questions?