3 ms·
Couldn’t you get 4x that much from a $3 usb stick? You could also have self modifying code such that the size of the binary automatically changes as needed. I
by qualudeheart 5y ago
Couldn’t you get 4x that much from a $3 usb stick?
You could also have self modifying code such that the size of the binary automatically changes as needed.
If you ship a lisp interpreter instead of rust, you can have the interpreter recode itself and any lisp files to a smaller size.
You’d just implement a compression algorithm that preserves the functionality of the code compressed.
I think you could do that with rust too with a self compiling binary. It’ll require some real technical skill but if you hire a real hacker you can pull it off.
My cousin his solution for the competitive programming contest had something like that.
- ithkuil 5y agoI doubt a $3 USB stick would perform decently enough to not become a bottleneck in rust compile and link times.
- bbarnett 5y agoThere are no bottlenecks in, or even arbitrarily related to rust.
- wizzwizz4 5y ago> It’ll require some real technical skill but if you hire a real hacker you can pull it off. I do have a project a bit like that, but I'm not using Rust for it. I was trying to make my own language (like Rust, but more powerful and also smaller), but I'm probably just going to use a modified (safer) C. If I were to write it in Rust, I'd have to compile it in the first place… and if I could do that easily, I would simply use Rust.
- qualudeheart 5y agoYou have a project involving self resizing code? That’s awesome! Can you explain it more?
- mlang23 5y agoDo people still know about upx these days? However, I think executable compression is besides the point of OP. Around 18 years ago, I was going through the codebase of a program I maintained as a Debian package, and as a udeb for the installer. Back then, I was trying to make it small enough to fit on the first floppy. I learnt about unnecessarily large datatypes in structs, packing, padding and alignment, and that adding "static" to module-local functions and data can really do things to the binary size. These times are over. Nobody cares about binary sizes anymore, the main argument against doing so is "we cant be bothered, we need to innovate."