Coder Social home page Coder Social logo

lomirus / bad-apple-rs Goto Github PK

View Code? Open in Web Editor NEW
8.0 8.0 2.0 2.99 MB

๐ŸŽ Play Bad Apple!! in Terminal [Rust Version] Cross-Term, Binary-Compress, 128*48 & 24 FPS.

License: MIT License

Rust 57.57% TypeScript 42.43%
bad-apple rust terminal

bad-apple-rs's Introduction

bad-apple-rs's People

Contributors

lomirus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

bad-apple-rs's Issues

(Not an issue) Decreasing binary size even more

Hello !

I recently forked your project to try to decrease the size of generated binaries. I went for a naive compression method consisting on counting how many characters to print before toggling to the other character. Due to the format having sometimes tens of thousands of the same character, I went of a stream of u32. The resulting integer stream would end up reducing the binary to about 3/4 of its current size.
I noticed the majority of the numbers could still fit in a u8 stream. So I decided to split overflowing numbers with a zero value between each chunk, creating more entries to the stream, but those entries took a quarter of their original size.
With this, I managed to reduce the binary size to 909 Ko (windows exe) so a bit less than 1/4 of the current binary size.

You can have a look at my fork here. If you want to integrate it to your repository I'll be happy to make a PR ๐Ÿ˜„
Note : Since I don't have Deno installed and also don't know well TypeScript I wrote my preloading script using PHP instead (tiny.php) to run it just type php -d memory_limit=-1 tiny.php.
Ideally we should write a build script for this.

Have a great day !

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.