Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I wish that embedding resources in programs as const byte arrays were more common. I think that approach leads to a tightly integrated, low-overhead app, especially on platforms (not iOS) where users and third-party programs are free to do stupid things with the file system; the app either works completely or isn't there at all.


You mean like: https://github.com/liuliu/mopack? But unable to inspect the embedded resource at programming time is a big show-stopper for me.


    $ xxd -i some_file


last time I checked, Microsoft has a weird restriction on their c++ compiler (they don't have a c compiler) that only allows 4k length const chars, you have to concatenate consts to get arbitrary length.


I agree bundles are a pain in the ass. This is a bit overboard for some libraries and can have unforeseen memory issues


What memory issues? const data can be mapped and unmapped on demand.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: