News for hackers. Stuff that matters.
Re:The xz attack shell script by echoangle on Tuesday April 02, 2024 @07:00PM (#39911778)
What if your application is written in Rust or C? Would you write your build scripts in these languages, too? I would much prefer a simpler scripting language for this. If you’re already using a scripting language as the main language, you don’t necessarily need to pull in another language just for scripts, of course.
Re:The xz attack shell script by ycombinatrix on Tuesday April 02, 2024 @10:18PM (#39912968)
build.rs is a thing FYI
Re:The xz attack shell script by dgsb on Wednesday April 03, 2024 @05:12AM (#39915058)
or make.go, for some project it makes sense to not add another language for scripting and building tasks. It way easier for every one to have to master multiple language.
Re:The xz attack shell script by eru on Tuesday April 02, 2024 @11:31PM (#39913343)
Writing a build script in Rust is fine-ish.

Writing anything in C is a bad idea these days, and requires active justification that only applies in some situations. Essentially, almost no new projects should be done in C.

Re-doing your build system, or writing a build system for a new project, counts as something new, so should probably not be done in C.

In general, I don't think your build (or build system) should necessarily be specified in the same language as most of the rest of your system.

However I can see that if most of your system is written in language X, then you are pretty much guaranteed to have people who are good at X amongst your developers, so there's some natural incentive to use X for the tooling, too.

In any case, I would mostly just advice against coding anything complicated in shell scripts, and to stay away from Make and autotools, too.

There are lots of modern build systems like Shake, Ninja, Bazel, etc that you can pick from. They are all have their pros and cons, just like the different distributed version control systems have their pros and cons; but they are better than autotools and bash and Make, just like almost any distributed version control is better than CVS and SVN etc.

Re:The xz attack shell script by northzen on Wednesday April 03, 2024 @01:38PM (#39920503)
Also zig is a good example of not a scripting language which does this job.
Re:The xz attack shell script by freedomben on Wednesday April 03, 2024 @03:00PM (#39921541)
C is probably the best example where I would be fine with scripts in Python (for utility scripts, not build scripts). Though, if it were me I'd use Ruby instead as I like that language a lot better, and it has Rake (a ruby-ish version of Make), but that's a "flavor of ice cream" kind of choice.