Cursed line of Kotlin code 

Yeah, I wrote this thing today.

For debugging purposes, but still.

Thread.getAllStackTraces()[Thread.currentThread()]!![4].apply(::println)

Follow

Cursed line of Kotlin code 

@loke
Why the fourth stack trace?

re: Cursed line of Kotlin code 

@mur2501 I needed to track from where a certain function was called, and it just so happened that the fourth one was the one I was interested in.

As mentioned, it was just for debugging purposes.

re: Cursed line of Kotlin code 

@loke
Don't be ashamed, I work in C-C++ and there are much darker secrets we hide :blobfoxterrified:

re: Cursed line of Kotlin code 

@mur2501 And here is the fix that was implemented thanks to this debugging. codeberg.org/loke/array/commit

re: Cursed line of Kotlin code 

@loke
:cate: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA :scremcat:

WTF is this non-ASCII programming language :blobcatsadlife:

re: Cursed line of Kotlin code 

@mur2501 Don't you like the advent of code solutions?

For day 1:

{⌈/ (+/⍎¨)¨ ⍵ ⊂⍨ (⍬≢)¨⍵} io:read "part01.txt"

re: Cursed line of Kotlin code 

@loke
NOOOOOOOO!!!!!! :blobcatchristmastreeeee:

This is unholy :blobcatsadlife:

re: Cursed line of Kotlin code 

@mur2501 Do you want me to help you learn it? It's quite nice to use as an interactive tool when you'd otherwise have to open an editor and write a large program to solve some problem.

re: Cursed line of Kotlin code 

@loke
yeah looks interesting, though my first question is how the hell to type so many non-ascii characters on an English keyboard?

re: Cursed line of Kotlin code 

@mur2501 That's easy. The GUI implements support for it. And the web version uses backquote as a prefix, so backqoute-i will result in ⍳ for example.

Sign in to participate in the conversation
CleverLibre Social

CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.