Vsevolod Tolstopyatov
qwwdfsad.bsky.social
Vsevolod Tolstopyatov
@qwwdfsad.bsky.social
Doing stuff in Kotlin @ JetBrains. API design, concurrency, performance,
\\Special\acknowledgement\goes\to\Windows\path handling\
August 6, 2025 at 3:35 PM
Such things rarely can happen individually, often they cannot even happen within a single team or a product.

I am eternally grateful to have @stukalov.bsky.social
on my side. Congrats! That's your achievement as much as it's Kotlin's 💜
May 23, 2025 at 7:36 AM
We poured the real effort, broke really thick walls, had heated debates and pitches, stretched IntelliJ limits (sometimes as far as using test infra to make it work in the LSP), and damn we did it! And there is still more to come :)
May 23, 2025 at 7:35 AM
Not only was that a hell of a team effort, pushing the IJ codebase to its limits, but it is also a great step forward for Kotlin and a huge shift within JetBrains that we made happen.
May 23, 2025 at 7:35 AM
gist.github.com/qwwdfsad/eb3...

Something like that can do the trick (for less trivial chains still, similar to streams).

By the way, beware of benchmarks not consuming (returning) the result from the @Benchmark function, maybe it's worth remeasuring the original bench (especially the small one)
Sequences.kt
GitHub Gist: instantly share code, notes, and snippets.
gist.github.com
February 14, 2025 at 10:57 AM
Thinking about it more, we can potentially provide a push-based sequence almost seamlessly, but it will require quite some tweaks.
And for trivial use cases (small collections, trivial transformations) unlikely to be *much* faster
February 13, 2025 at 7:10 PM
Iterator-based protocol (which sequence is) is really unfortunate, the constant field-spilling and hasNext-next pair (which is strict with its contract) absorbs all the CPU :(

Also, a nice showcase of why we picked the push-based Flow model!
February 13, 2025 at 7:02 PM
totally deserved!
February 7, 2025 at 1:02 PM
Is it going to deadlock because of the clinit "deadlock" where lambda body (private static fun) cannot be invoked from another thread ("parallel") unless clinit is completed which in turn awaits parallel operator to complete?
February 5, 2025 at 5:59 PM
Not all notes are that useful though
December 19, 2024 at 10:52 AM
...and today is one of these days. Thank you, Seva from the past, I guess
December 18, 2024 at 7:04 PM
By the way, @volebamor.bsky.social suggested a really beautiful solution -- count all the junctions (i.e. ▢▢ has two junctions: ⊥ and ⊤) and subtract the number from the perimeter. I am still mad that it actually works!
December 12, 2024 at 11:07 PM
Damn these modern business practices! Who on earth counts discounts LIKE THAT?!
December 12, 2024 at 7:18 PM
you can probably guess what the section is about :)
December 12, 2024 at 5:21 PM
Sorry for that, I promise I'll switch back to technical content
December 12, 2024 at 2:08 PM