How do they view the use of libraries in this competition? Do the libraries count toward your 4K?
Writing a winning 4K intro in Rust
21–30 of 94 posts
Re: Writing a winning 4K intro in Rust
#22TIL: about the Demoscene[1], "an international computer art subculture focused on producing demos: self-contained, sometimes extremely small, computer programs that produce audio-visual presentations. The purpose of a demo is to show off programming, visual art, and musical skills. Demos and other demoscene productions are shared at festivals known as demoparties, voted on by those who attend, and released online." […
I'm surprised someone on HN since 2012 would learn about the demoscene today! Then again, it's true that the demoscene "keeps to itself", it's always been quite the bubble. I'm not sure how that community could do some outreach, but I believe a lot more people would find it interesting.
Re: Writing a winning 4K intro in Rust
#23How do they view the use of libraries in this competition? Do the libraries count toward your 4K?
Re: Writing a winning 4K intro in Rust
#24Kinda surprised about iterators not getting optimized so well. Even in higher-level languages, this is a commonly utilized optimization opportunity - e.g. the C# compiler will replace a foreach-loop over an array with an identical (but faster) for-loop.
Compiler optimizers are full of surprises going both ways: good and bad. And details like this can probably change from version to version and get affected by compiling options. I would also expect that performance is higher priority than code size, generally, so missed opportunities like this might go unnoticed and unaddressed a long time if they don't show up on performance benchmarks.
At some point in history, when you wrote the straightforward, primitive three-nested-loops version of matrix multiplication your code ran much faster than when you tried to implement one of the more sophisticated algorithms.
That was because the Fortran compiler recognised the primitive version and replaced it with a special purpose highly optimized matrix multiplication. The compiler couldn't do that with the more sophisticated approaches.
Re: Writing a winning 4K intro in Rust
#25Re: Writing a winning 4K intro in Rust
#26I learned programming on the TRS80, and didn’t know about the demo scene until I was already too busy with other parts of my life; I think I first saw a demo on the Amiga. I always feel like I missed out on something transcendental. I think I would have leaned a huge amount. Instead I had to settle with hacking NewDOS/80 binaries. I have a huge amount of technical respect for the people who do this stuff.
Re: Writing a winning 4K intro in Rust
#27How do they view the use of libraries in this competition? Do the libraries count toward your 4K?
For some languages where this is really hard to achieve, they'll carve out a separate category for a language if they think there will be enough entries. e.g. a Java category where the entry fits with the space limit, but can use any other library in the default Java classpath, even though that's very very big. Likewise for different operating systems (Linux, MacOS competitions).
There's been a fantastic resurgence in retrohardware and a category called "old school/skool" for entries that have to run in MS-DOS -- which can be ultra hard as you have to code up a lot more of the runtime libraries like music, graphics rendering pipelines, etc.
Re: Writing a winning 4K intro in Rust
#28I've actually played around a bit with rust [1] (I understand it probably isn't ideal for demoscence), but I haven't really done any graphics programming before. I get the feeling it is a pretty deep rabbit hole.
Re: Writing a winning 4K intro in Rust
#29Looks nifty. Seems to only compile on Win though: $ xargo run For more information about this error, try `rustc --explain E0463`. error: could not compile `winapi`. Still, probably good for interest/learning from. :)
Re: Writing a winning 4K intro in Rust
#30Looks nifty. Seems to only compile on Win though: $ xargo run For more information about this error, try `rustc --explain E0463`. error: could not compile `winapi`. Still, probably good for interest/learning from. :)
Hm so it's leveraging the Windows API. I thought demos were supposed to be bare-metal.