qaz@lemmy.world to Programmer Humor@lemmy.mlEnglish · 11 months ago-Wall ain't alllemmy.worldimagemessage-square27fedilinkarrow-up1347arrow-down115
arrow-up1332arrow-down1image-Wall ain't alllemmy.worldqaz@lemmy.world to Programmer Humor@lemmy.mlEnglish · 11 months agomessage-square27fedilink
minus-squareqaz@lemmy.worldOPlinkfedilinkarrow-up10arrow-down2·11 months agoI would love to use golang for this but it’s standard library alone is bigger than the amount of available RAM.
minus-squaregredo@lemmy.worldlinkfedilinkarrow-up2·11 months agoInteresting, since golang only includes the parts of the stdlib that are used in the executable binary.
minus-squareqaz@lemmy.worldOPlinkfedilinkarrow-up4·11 months agoI just tested it and a simple hello world program still produces a 1.7MiB binary, while the device only has 512KiB of RAM. package main import "fmt" func main() { fmt.Println("hello world") }
minus-squarepipe01@lemmy.pipe01.netlinkfedilinkarrow-up3·11 months agoStrip the debug info, should be a lot smaller. Also check out TinyGo, it’s meant for embedded devices
minus-squaregredo@lemmy.worldlinkfedilinkarrow-up1·11 months agoBTW: what are you using instead to get small binaries/scripts?
minus-squaremkwt@lemmy.worldlinkfedilinkarrow-up2·11 months agoLikely your C++ implementation also doesn’t ship the full standard library. And you may even turn off exceptions and RTTI.
laughs in golang
I would love to use golang for this but it’s standard library alone is bigger than the amount of available RAM.
Interesting, since golang only includes the parts of the stdlib that are used in the executable binary.
I just tested it and a simple hello world program still produces a 1.7MiB binary, while the device only has 512KiB of RAM.
package main import "fmt" func main() { fmt.Println("hello world") }
Strip the debug info, should be a lot smaller. Also check out TinyGo, it’s meant for embedded devices
BTW: what are you using instead to get small binaries/scripts?
I’m currently using C++
Likely your C++ implementation also doesn’t ship the full standard library. And you may even turn off exceptions and RTTI.