Follow

libopus's/daala's/any xiph project's codebase doesn't look like source code but low quality decompiled code.
2 char variable names, no spaces whatsoever, no newlines whatsoever, 2-space indents, complete lack of inlined functions, cryptic non-standard names (granulepos is what the rest of the world calls PTS, wtf), using temporary variables so unnecessarily as if modelling how a decompiler might use registers.
The main culprit for this is always high on dr pepper for some reason.

@lynne maybe the reference implementation was in assembly? :P

@Wolf480pl @lynne It actually sounds more reasonable than most C! Granted, I come from APL-land, and most of our C looks like this:
incunabulum.png
@Wolf480pl @lynne I find it a lot more readable than most C, personally (the way it's written is a very pleasing workaround for my dyslexia).

@kick @Wolf480pl Are you a dr pepper person too 😛.
I don't mind the style as much as the lack of optimizations such a style demands.
When I rewrote Daala's CDF EC code it was around twice as fast, and its not like the code was long or did much.
Grated, this is reference code in a reference implementation so it doesn't have to be fast but it should at least be understandable by us non-dr-pepperians.

@lynne @Wolf480pl I mean, Arthur Whitney's C is pretty optimized (the entirety of his language, K, fits into the L2 cache), though I guess the XIPH Foundation's probably is less so.
@lynne @Wolf480pl DJB is another person whose C has been described with stuff like "I'm pretty sure this is just a high-level language compiled to C," and "This is atrocious," but I find it reasonably readable in comparison to normal C.
Sign in to participate in the conversation
Parsee

A Mastodon instance for people interested in multimedia, codecs, assembly, SIMD, and the occasional weeb stuff.