Thread with 28 posts

jump to expanded post

‪the thing about build scripts is that nobody cares about them. you write your project in c, c++, rust, whatever… some language you know well and enjoy using. but in order to actually configure/compile/link/package it, inevitably you need Some Other Language to help you‬

Open thread at this post

‪you don't care about the beauty of your build system. build systems are hell. you just want it to work. almost always the resulting code is far from beautiful. if it is readable and well-structured, it probably hasn't made contact with multiple platforms or configurations yet‬

Open thread at this post

‪so, build scripts are the kind of unloved, neglected code where bugs too easily hide. but i think we collectively make this worse for ourselves by writing this code in unloved languages we don't or can't fully understand. python is just about acceptable. but bash? that's arcane.‬

Open thread at this post

‪this may be unpopular, but cmake's configuration language is also arcane in my opinion. my experience with reading its documentation trying to figure out what code does and how to do anything vaguely complex with it is only pain. but that's an aside. it's okay for simple projects‬

Open thread at this post
R , @r@glauca.space
(open profile)

@hikari for C projects we used to use hand-written makefiles derived from a blend of devkitPro's makefile system combined with knowledge we had picked up from the O'Reilly gnu make book, and it just worked. nowadays we tend to use either Rust or we get really jaded and use the "fuck it" build system of a "build.sh" containing just build commands without any dependency tracking

Open remote post (opens in a new window)
Jordan , @jrose@belkadan.com
(open profile)

@hikari “but they have! check out nushell or fish! or that other one!” you want me to learn another language and put it in my repository? making it a build dependency? yeah right

(which is why the best answer so far is “make your package manager do it”, but that’s definitely only an 80/20 solution)

Open remote post (opens in a new window)
genders: ♾️, 🟪⬛🟩; Soni L. , @SoniEx2@chaos.social
(open profile)

@jrose @hikari you can make shell unusable with the help of protobuf main,

(protobuf shell was supposed to integrate with protobuf main to make it more usable, but we never made a protobuf shell. we did, however, make exactly one executable that uses the protobuf main calling convention over regular linux spawn, because shoving raw binary data into argv was too exciting to pass up!)

Open remote post (opens in a new window)
genders: ♾️, 🟪⬛🟩; Soni L. , @SoniEx2@chaos.social
(open profile)

@jrose @hikari ah, yeah... protobuf is particularly suited to this due to its strong backwards and forwards compatibility design, further we can embed the schema into the binary so you can compare the one in the binary with the one in the protobuf shell script and whatnot. which should help, we think.

protobuf main still allows you to redirect stdin tho. =^-^=

Open remote post (opens in a new window)