5 ms·
I'm not sure why the contents of rounds.txt isn't just provided as some kind of argument instead of read in from a file. Given all the other boilerplate involv
by Twirrim 10mo ago
I'm not sure why the contents of rounds.txt isn't just provided as some kind of argument instead of read in from a file. Given all the other boilerplate involved, I would have expected it to be trivial to add relevant templating.
- cgh 10mo agoZig could include the file at compile-time with @embedFile.
- AndyKelley 10mo agothis would provide the optimizer the unfair chance to replace the entire application with a compile time constant
- Twirrim 10mo agoSo could Go (https://pkg.go.dev/embed https://pkg.go.dev/embed), Rust (https://doc.rust-lang.org/std/macro.include_str.html https://doc.rust-lang.org/std/macro.include_str.html) and a number of other languages in the set.
- gus_massa 10mo agoThe idea of using a file is to force the program to use that number as an unknown value at compile time.
- igouy 10mo agocommand line arguments would be unknown at compile time.