There should be a #printf format `%ꙮ` that just shits an unfeasible number of zeroes all over the place.
`printf("%ꙮ\n", 32)`
000000000032.0000000000
There should be a #printf format `%ꙮ` that just shits an unfeasible number of zeroes all over the place.
`printf("%ꙮ\n", 32)`
000000000032.0000000000
I've found the perfect way to make #rstats programmers scream in existential terror. Behold zero-indexed R!
Redefining reality with <15 lines of code is so hot right now.
Now watch as I calmly refer to v[0] while maintaining direct eye contact.
So I was looking at the recently released C'n'C source code and… oh boy.
Now I understand why that game was so crashy and slow. The code is full of cargo cult programming idioms, numerically unstable in other places, often merely truncates double to int, and (my personal favorite so far) implements 3D coordinate equality comparison by testing for bitwise equality of their constituent floating point values.
In today's instance of cursed JS: abusing await.
When Top-Level Await is available in ES modules, you can do this.
When the module is first evaluated, the key is evaluated. Note that this only works with keys, not with the values, even in a static block.
PHP in JSX. Without React (https://nakedjsx.org)
There must be something wrong with me. Even when I try to write #CursedCode, I find myself trying to make it readable.
the Swift code is every bit as cursed as the C version:
// find the default sink
// yes this is vaguely cursed, blame Frost for the initial implementation in vubar
let paInfoCmd = Process()
paInfoCmd.executableURL = URL(fileURLWithPath: "/bin/sh")
paInfoCmd.arguments = ["-c", "pactl info | grep \"Default Sink:\" | perl -pe \"s/.*?: (.*)/\\1.monitor/\" | tr -d '\n'"]
let paInfoStdout = Pipe()
paInfoCmd.standardOutput = paInfoStdout
paInfoCmd.standardError = paInfoStdout
try paInfoCmd.run()
paInfoCmd.waitUntilExit()
let output = paInfoStdout.fileHandleForReading.readDataToEndOfFile()
sink = String(data: output, encoding: .utf8)
in C we don't say "i hate you" instead we say "const" and i think that's beautiful #CursedCode
cleaned up the syntax for my C coroutines using computed gotos, and i think this is pretty much done. very nice :ameowhappypaws:
#programming #CursedCode
OH NO