Live data from Hacker News

Monospace: A JavaScript demo in 1021 bytes, winner of the demo competition

p01.org

101–110 of 131 posts

Re: Monospace: A JavaScript demo in 1021 bytes, winner of the demo competition

#101
post #76

Earlier quoted context omitted.

Thanks for the expansion and comments! On your project, I noticed the comments were about 5 times longer than the source code :) - so that makes sense how to work with it.

Hi there. I do not use any minifier. I minify the code by hand, and typically prototype ideas and performance tests in normal non-minified code. Once the main idea and approach are settled, I minify the code by hand and keep an eye on the heatmap of the DEFLATE stream to match the 1024 bytes limit. MONOSPACE took ~4months on an off to create, tallying ~60h of work. You know 2020 + trying to balance work & family, and…

> tallying ~60h of work

This is far less than I expected, which usually means I am hopelessly out of my league in the topic. Great job :)

Re: Monospace: A JavaScript demo in 1021 bytes, winner of the demo competition

#102
1021 bytes of JS, and 6 million lines of browser code.

FTFY

These modern demos, using OpenGL and now the whole web browser that are mimicking the rules and sentiment of old 8-bit machines demos, or even later DOS demos, are not the same thing.

Oh, this demo has text being spoken ... how was it done ... checks source code ... SpeechSynthesisUtterance . Yeah right, 1021 bytes. :)

Re: Monospace: A JavaScript demo in 1021 bytes, winner of the demo competition

#103
post #31

For people not able (or willing) to run the demo themselves, it can also be seen on YouTube in a 3 minute clip [0]. It keeps amazing me how much people can accomplish with less than a KB of code. [0] https://www.youtube.com/watch?v=2HN139WkcCY

Not being willfully obtuse, but there's a lot more than a KB of code on that YouTube page. To me it feels like the difference between watching a movie on 35mm vs DVD.

I expected the comment to go on about how much code in the support libraries is needed to support this. It's not a 512 byte boot sector intro, far from it.

Re: Monospace: A JavaScript demo in 1021 bytes, winner of the demo competition

#104

This is similar (but much much better) to a demo I was making for JS1K a bunch of years back: http://mrspeaker.github.io/js1k16/ My "big idea" was to use the speech synthesis API (I still liked how I used it)... but I thought it was funny, because it felt like cheating to say "1K" when it relied on so many megabytes of APIs!

This is some next-level rap music, nice.

Re: Monospace: A JavaScript demo in 1021 bytes, winner of the demo competition

#105
post #7

I was so happy not to see another cheap dismissal here. Too often you have to read how a sizecoded demo uses a ton of system libraries or whatever, completely dismissing the technical achievement.

That's a nonsense statement. There is no technical achievement, it's no breakthrough in any relevant technical sense. Sorry to get technical, but you called it.

I'm not dismissing the demo, mind. It's a great feat of engineering and its main achievement, that is creative, surely thrives from a technical esthetic.

Using system libraries has to be put into perspective, for sure. The common wisdom (in sizecoding at least) is that creativity thrives from constraints. Necessarily then, one has to be aware of the constraints.

One might say having to write in .js is extreme masochism, so the criticizm about .dlls is just one side of the equation. Browser bugs and all that. no, thanks.

Re: Monospace: A JavaScript demo in 1021 bytes, winner of the demo competition

#108

OK, this is really weird, but I closed the browser tab with the demo ca. 1 minute ago and can still hear the music. I'm on FF/Big Sur.

With FF mobile on Android I still had ongoing sound after closing FF completely (at least as far as I know) and I had to reboot my phone. It's quite concerning that websites are able to do this. While it is the browsers fault to support all that javascript crap I think this is also a bug in Android.

Did you try "Force Stop" newbie rebooting? I'd think that should work

Re: Monospace: A JavaScript demo in 1021 bytes, winner of the demo competition

#109

This is similar (but much much better) to a demo I was making for JS1K a bunch of years back: http://mrspeaker.github.io/js1k16/ My "big idea" was to use the speech synthesis API (I still liked how I used it)... but I thought it was funny, because it felt like cheating to say "1K" when it relied on so many megabytes of APIs!

TIL of the speech synthesis API. It's been around since 2013/2014 https://caniuse.com/mdn-api_speechsynthesis

Re: Monospace: A JavaScript demo in 1021 bytes, winner of the demo competition

#110
post #76

Earlier quoted context omitted.

Thanks for the expansion and comments! On your project, I noticed the comments were about 5 times longer than the source code :) - so that makes sense how to work with it.

Hi there. I do not use any minifier. I minify the code by hand, and typically prototype ideas and performance tests in normal non-minified code. Once the main idea and approach are settled, I minify the code by hand and keep an eye on the heatmap of the DEFLATE stream to match the 1024 bytes limit. MONOSPACE took ~4months on an off to create, tallying ~60h of work. You know 2020 + trying to balance work & family, and…

Hi P01, thank for your great work. Can you explain what this means?

> keep an eye on the heatmap of the DEFLATE stream

How is the heatmap generated?

Post reply on HN