Open in app

Sign In

Write

Sign In

Lothar Schulz
Lothar Schulz

59 Followers

Home

About

Published in lotharschulz

·Dec 2, 2022

Kotlin Fibonacci Script

A kotlin custom script producing a fibunacci range inspired by clovisai’s contribution to kotlin discussion: Project Loom will make coroutines obsolete. run script val fibonacci = sequence { yield(1) var cur = 1 var next = 1 while (true) { yield(next) val tmp = cur + next cur = next next = tmp } } println(fibonacci.take(15).joinToString()) kotlinc kotlin-script-fibonacci.kts -script \ -language-version 1.8 -include-runtime

Kotlin

1 min read

Kotlin Fibonacci Script
Kotlin Fibonacci Script
Kotlin

1 min read

Kotlin Fibonacci Script

A kotlin custom script producing a fibunacci range inspired by clovisai’s contribution to kotlin discussion: Project Loom will make coroutines obsolete.

run script

val fibonacci = sequence {
yield(1)
var cur = 1
var next = 1
while (true) {
yield(next)
val tmp = cur + next
cur = next
next = tmp
}
}

println(fibonacci.take(15).joinToString())
kotlinc kotlin-script-fibonacci.kts -script \ -language-version 1.8 -include-runtime

Caution: kotlin custom scripting is experimental as of Kotlin 1.7.20 (20221023).

See also: https://gist.github.com/lotharschulz/79d3641c73f7b28120d1205ceef877fe

Originally published at https://www.lotharschulz.info.

--

--


Dec 2, 2022

There’s a new operator in Kotlin!
250
2

Nishant Aanjaney Jalan

the range until operator is a preview feature on 1.7.20.

the range until operator is a preview feature on 1.7.20. With that version ' languageVersion = "1.8" ' enables that. See also: https://github.com/lotharschulz/Kotlin-Ranges-New-Until/blob/main/app/build.gradle.kts#L6-L10 https://www.lotharschulz.info/2022/10/03/setup-new-kotlin-range-operator-rangeuntil/

1 min read

1 min read

the range until operator is a preview feature on 1.7.20. With that version ' languageVersion = "1.8" ' enables that. See also:

https://github.com/lotharschulz/Kotlin-Ranges-New-Until/blob/main/app/build.gradle.kts#L6-L10

https://www.lotharschulz.info/2022/10/03/setup-new-kotlin-range-operator-rangeuntil/

--

--


Published in lotharschulz

·Oct 23, 2022

Setup — New Kotlin Range Operator: rangeUntil

Kotlin 1.7.20 comes with a new Kotlin rangeUntil operator (preview): ..< In order to use the new operator, you need to enable the -language-version 1.8 flag. You can set the language-version 1.8 in build.gradle.kts: An experimental annotation must be added, e.g.: @OptIn(ExperimentalStdlibApi::class) and the new rangeUntil operator has the same functionality that the until operator: Source Code gb.com/ls/Kotlin-Ranges-New-Until

Kotlin

1 min read

Setup — New Kotlin Range Operator: rangeUntil
Setup — New Kotlin Range Operator: rangeUntil
Kotlin

1 min read

Setup — New Kotlin Range Operator: rangeUntil

Kotlin 1.7.20 comes with a new Kotlin rangeUntil operator (preview):

..<

In order to use the new operator, you need to enable the -language-version 1.8 flag.

You can set the language-version 1.8 in build.gradle.kts:

An experimental annotation must be added, e.g.: @OptIn(ExperimentalStdlibApi::class) and the new rangeUntil operator has the same functionality that the until operator:

Source Code

  • gb.com/ls/Kotlin-Ranges-New-Until
  • cb.org/ls/Kotlin-Ranges-New-Until

Originally published at https://www.lotharschulz.info.

--

--


Published in lotharschulz

·Oct 15, 2022

Introducing Software Delivery Life Cycle Delegation Levels

What would you delegate in a Software Delivery Life Cycle? To whom would you delegate? How to find out? Crazy huh — not so much as you think? No time, jump straight to the conclusion Software Development Life Cycle (SDLC) The purpose of the software delivery life cycle is to…

Delegation Poker

6 min read

Introducing Software Delivery Life Cycle Delegation Levels
Introducing Software Delivery Life Cycle Delegation Levels
Delegation Poker

6 min read


Published in lotharschulz

·Oct 3, 2022

Replace null with amazing Kotlin and Java sealed classes & interfaces

Imagine a situation when you use in Kotlin or Java code a library that can throw exceptions. The calling function or method may return null if an exception is caught. I use the java api for github to fetch repositories of a github organisation. …

Sealed Classes

3 min read

Replace null with amazing Kotlin and Java sealed classes & interfaces
Replace null with amazing Kotlin and Java sealed classes & interfaces
Sealed Classes

3 min read


Published in lotharschulz

·Sep 8, 2022

How to set Java Pattern Matching for switch in IntelliJ & Gradle

Pattern Matching for switch is a preview feature in Java 17. This post explains how to enable Pattern Matching for switch in IntelliJ IDE and Gradle build tool. Code public static List<GHRepository> listRepositories(GHOrganization gitHubOrganization){ GitHubRepository gitHubRepository = listGitHubRepositories(gitHubOrganization); switch (gitHubRepository) {…

Switch

2 min read

How to set Java Pattern Matching for switch in IntelliJ & Gradle
How to set Java Pattern Matching for switch in IntelliJ & Gradle
Switch

2 min read


Published in Life at Miro

·Aug 19, 2022

“Stay curious”: How to manage 3 teams in 2 time zones

This week we’re joined by Lothar Schulz, our Head of Board Server Engineering, who tells us what it’s like to cultivate a sense of belonging amongst teams that are culturally — and literally — worlds apart. Interested in joining a team like Lothar’s? Click here to see Miro’s openings! Hello…

People At Miro

5 min read

“Stay curious”: How to manage 3 teams in 2 time zones
“Stay curious”: How to manage 3 teams in 2 time zones
People At Miro

5 min read


Published in lotharschulz

·Jul 30, 2022

Gradle 7 Warning: Execution optimizations have been disabled

Upgrading to Gradle 7 may offer you some new warnings. One of the warnings I experienced was about disabled execution optimizations. This is how to fix it. My initital state was the following gradle dsl snippet: val fatJar = task("customFatJar", type = Jar::class) { duplicatesStrategy = DuplicatesStrategy.EXCLUDE manifest {…

Gradle

3 min read

Gradle 7 Warning: Execution optimizations have been disabled
Gradle 7 Warning: Execution optimizations have been disabled
Gradle

3 min read


Published in lotharschulz

·Apr 6, 2022

Why a genuine 40% bug fix rule worked

A couple of months ago I faced a situation with way more created bugs than resolved ones. Several attempts to reduce the number of created vs resolved bugs have been tried: being vocal about the situation introducing metrics created vs. resolved bugs making the metrics part of every review In…

Bugs

2 min read

Why a genuine 40% bug fix rule worked
Why a genuine 40% bug fix rule worked
Bugs

2 min read


Published in lotharschulz

·Mar 19, 2022

Challenge — We Need To Lint Protos Easily

Proto linting with buf findings can be surprising. This write up describes options on how to reduce your buf linting failures to zero. What is gRPC? gRPC is a RPC framework. It is a popular framework and available for many languages including Kotlin. …

Grpc

2 min read

Challenge — We Need To Lint Protos Easily
Challenge — We Need To Lint Protos Easily
Grpc

2 min read

Lothar Schulz

Lothar Schulz

59 Followers

www.lotharschulz.info

Following
  • Darius Foroux

    Darius Foroux

  • Samantha Lisik

    Samantha Lisik

  • Uzi Landsmann

    Uzi Landsmann

  • Camille Fournier

    Camille Fournier

  • Sarah Cordivano

    Sarah Cordivano

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech