Does Kotlin have some sort of built-in mechanism t...
# getting-started
s
Does Kotlin have some sort of built-in mechanism to update text files? My task is to read a text file, and parse them line by line. When I match a specific pattern, I want to write a slightly changed line, otherwise the original line. I could implement such a processor myself, but I am wondering if there is already support for that in Kotlin?
d
Writing it using
inputFile.bufferedReader().lineSequence
takes about 5 lines ... 😄
s
haha. unless you start typing your code in intellij, and then your mac freezes, and you have to reboot. seriously. wtf.
v
It does not concern Kotlin, it's a system bug. I had the same on certain versions of Linux and only on specific hardware (laptop)
s
@ValV You are saying that IntelliJ can also crash Linux? I found it crazy enough that it can kill MacOs, but even Linux? Thats crazy.
v
@SomeCat that was some build-specific bug, not only IDEA crashed my Linux, but also Firefox and Chromium. That were some troubles either with memory allocation or disk i/o, but I can't tell exactly -- that was hard-to-track bug that occurred only with 4.17 on laptop. I did not get down to debug kernel itself -- just rolled back kernel to 4.14 on laptop and the bug did not appear any more. On the old Athlon PC it could not be reproduced even with 4.17 (considering that OS was cloned)