▲ 333 ▼ -Wall ain't all (lemmy.world) submitted 3 years ago by qaz@lemmy.world to c/programmerhumor@lemmy.ml 25 comments fedilink hide all child comments
[–] gredo@lemmy.world 9 points 3 years ago (7 children) laughs in golang permalink fedilink source hideshow 7 child comments replies: [–] qaz@lemmy.world [S] 8 points 3 years ago (6 children) I would love to use golang for this but it’s standard library alone is bigger than the amount of available RAM. permalink fedilink source parent hideshow 6 child comments replies: [–] gredo@lemmy.world 2 points 3 years ago (2 children) Interesting, since golang only includes the parts of the stdlib that are used in the executable binary. permalink fedilink source parent hideshow 2 child comments replies: [–] qaz@lemmy.world [S] 4 points 3 years ago (1 child) 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") } permalink fedilink source parent hideshow 1 child comment replies: [–] pipe01@lemmy.pipe01.net 3 points 3 years ago Strip the debug info, should be a lot smaller. Also check out TinyGo, it's meant for embedded devices permalink fedilink source parent [–] gredo@lemmy.world 1 point 3 years ago (2 children) BTW: what are you using instead to get small binaries/scripts? permalink fedilink source parent hideshow 2 child comments replies: [–] qaz@lemmy.world [S] 3 points 3 years ago (1 child) I'm currently using C++ permalink fedilink source parent hideshow 1 child comment replies: [–] mkwt@lemmy.world 2 points 2 years ago Likely your C++ implementation also doesn't ship the full standard library. And you may even turn off exceptions and RTTI. permalink fedilink source parent
[–] qaz@lemmy.world [S] 8 points 3 years ago (6 children) I would love to use golang for this but it’s standard library alone is bigger than the amount of available RAM. permalink fedilink source parent hideshow 6 child comments replies: [–] gredo@lemmy.world 2 points 3 years ago (2 children) Interesting, since golang only includes the parts of the stdlib that are used in the executable binary. permalink fedilink source parent hideshow 2 child comments replies: [–] qaz@lemmy.world [S] 4 points 3 years ago (1 child) 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") } permalink fedilink source parent hideshow 1 child comment replies: [–] pipe01@lemmy.pipe01.net 3 points 3 years ago Strip the debug info, should be a lot smaller. Also check out TinyGo, it's meant for embedded devices permalink fedilink source parent [–] gredo@lemmy.world 1 point 3 years ago (2 children) BTW: what are you using instead to get small binaries/scripts? permalink fedilink source parent hideshow 2 child comments replies: [–] qaz@lemmy.world [S] 3 points 3 years ago (1 child) I'm currently using C++ permalink fedilink source parent hideshow 1 child comment replies: [–] mkwt@lemmy.world 2 points 2 years ago Likely your C++ implementation also doesn't ship the full standard library. And you may even turn off exceptions and RTTI. permalink fedilink source parent
[–] gredo@lemmy.world 2 points 3 years ago (2 children) Interesting, since golang only includes the parts of the stdlib that are used in the executable binary. permalink fedilink source parent hideshow 2 child comments replies: [–] qaz@lemmy.world [S] 4 points 3 years ago (1 child) 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") } permalink fedilink source parent hideshow 1 child comment replies: [–] pipe01@lemmy.pipe01.net 3 points 3 years ago Strip the debug info, should be a lot smaller. Also check out TinyGo, it's meant for embedded devices permalink fedilink source parent
[–] qaz@lemmy.world [S] 4 points 3 years ago (1 child) 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") } permalink fedilink source parent hideshow 1 child comment replies: [–] pipe01@lemmy.pipe01.net 3 points 3 years ago Strip the debug info, should be a lot smaller. Also check out TinyGo, it's meant for embedded devices permalink fedilink source parent
[–] pipe01@lemmy.pipe01.net 3 points 3 years ago Strip the debug info, should be a lot smaller. Also check out TinyGo, it's meant for embedded devices permalink fedilink source parent
[–] gredo@lemmy.world 1 point 3 years ago (2 children) BTW: what are you using instead to get small binaries/scripts? permalink fedilink source parent hideshow 2 child comments replies: [–] qaz@lemmy.world [S] 3 points 3 years ago (1 child) I'm currently using C++ permalink fedilink source parent hideshow 1 child comment replies: [–] mkwt@lemmy.world 2 points 2 years ago Likely your C++ implementation also doesn't ship the full standard library. And you may even turn off exceptions and RTTI. permalink fedilink source parent
[–] qaz@lemmy.world [S] 3 points 3 years ago (1 child) I'm currently using C++ permalink fedilink source parent hideshow 1 child comment replies: [–] mkwt@lemmy.world 2 points 2 years ago Likely your C++ implementation also doesn't ship the full standard library. And you may even turn off exceptions and RTTI. permalink fedilink source parent
[–] mkwt@lemmy.world 2 points 2 years ago Likely your C++ implementation also doesn't ship the full standard library. And you may even turn off exceptions and RTTI. permalink fedilink source parent