5 ms·
I hate developers like this. This is the attitude of every weirdo developer I've had to work with who thought they were brilliant instead of just using the stup
by andrewmcwatters 4y ago
I hate developers like this. This is the attitude of every weirdo developer I've had to work with who thought they were brilliant instead of just using the stupid tool as it was intended.
- dataflow 4y agoHonestly his takes (mostly) aren't wrong or niche (at least not all of them; a few like the tabs thing are debatable). Some of these you only realize once you've wrestled with Make for a while and spent time thinking about the underlying problem, which many don't do. Knowing some of these ahead of time can save quite a bit of a headache. They're worth considering even if you don't follow all of them.
- jart 4y agoIt would have been classier if they'd replaced the tab character with an emoji. That's what someone on Lobsters recommended, once I told them about .RECIPEPREFIX.
- cpuguy83 4y agoThat's a strange take on the post. The post only uses built-in functionality. Options exist for a reason, and defaults are _really_ difficult to change in software used by millions of people.
- blueflow 4y agoThe effect is that the Makefile now has a dependency on bash and GNU make. What happens to the *BSD or non-GNU linux users?
- formerly_proven 4y agoThey usually don't matter (and unseen-untested portability is simply wishful thinking), but particularly don't matter for projects you're responsible for and decided they don't matter. That doesn't mean you must randomly preempt portability, of course.
- deleted 4y ago[deleted]
- blueflow 4y agoI'm Alpine Linux user.... How would you feel if i said, GNU/Linux users don't matter? Why should i bother to support your platforms?
- eropple 4y agoWhat about them? I don't use Python or Golang, but I install the requested versions of each if I need to do something that uses them. Folks who don't use GNU Make can do likewise. It's not a big deal. For me, every Mac I touch gets a GNU userland by default (and Homebrew comes with shell helpers to switch to GNU userland aliases temporarily, it isn't a hard switch unless, like me, you lock it on all the time) because it's really not worth the time and effort to remember what bits are GNU and what bits are BSD. So I picked the one that has the most stuff that makes my life easier. There's also just the more basic thing of "the author doesn't care about portability to environments they consider out of scope," and that's totally fine, too. In 2022, the barriers to entry to installing the necessary bits of one flavor or another are very low, and if you choose to make them harder for yourself that's mostly on you.
- bee_rider 4y agoIt is of course up to the coder, what platforms they want to support. But it isn't always easy to install new software. GNU make is so widespread that it probably doesn't matter. But for example, if you are on a shared machine where you might not necessarily have root. Or, if somebody requires some obscure build system that isn't available in your distro repos (of course you can build from source, but the need to check the source of the build system is going to increase the barrier to entry).
- bee_rider 4y ago"Don't use tabs" just seems wrong. "Use a recent bash" seems like a matter of preference. "Make is all about files (paraphrasing)" seems a little obvious hopefully, but definitely the way Make is intended to be used. "Magic variables" eh... I dunno, I guess sometimes they can get obscure but it isn't super hard to look this sort of thing up. The omission of % seems weird.
- jart 4y agoIf you want to read something good, check out the docs for this Landlock Make project I've been working on the past week. https://github.com/jart/landlock-make https://github.com/jart/landlock-make It has many more features since it was announced on August 7th.
- bee_rider 4y agoMake, but protective. Ambitious, but pretty neat! > .CPU = SECONDS > .MEMORY = SIZE I wish the cluster I use sometimes had this built into their make system, to prevent people from make-ing on the headnode, haha.
- dataflow 4y ago> "Use a recent bash" seems like a matter of preference. Unfortunately it's not merely a preference; old Bash versions (in particular the one that shipped on macOS for a long time) have had at least one nasty behavior (I think multiple, but I recall at least definitely one) that have been fixed since then, but which cause grief in Makefiles. I don't recall what it was or have a link handy, but if anybody knows, please leave it here; it's a well-known issue.
- omginternets 4y agoTone aside, I agree. The net result is an unreadable mess of niche configuration that could probably be avoided by having the Makefile simply do less.
- jrockway 4y agoI don't know, I can't really argue with .SHELLFLAGS = -euo pipefail. If you want someone to really hate, pick me. I see a Makefile and think "welp, strap in for a wild ride that isn't going to get me a working binary". If someone has ever made a good Makefile, I certainly haven't seen it.
- shepherdjerred 4y agoReally? I love cloning a project and seeing a Makefile. The install instructions are usually something like 'run make install'. mosh is a good example: https://mosh.org/#build-instructions https://mosh.org/#build-instructions
- CamperBob2 4y agoMore typically, the install instructions read like the bomb-defusal instructions in the classic MASH episode. "Cut red wire, then unscrew detonator subassembly. But first..."
- romanows 4y agoI don't know if it's a well-written makefile, but Python builds are straightforward, even with stuff like LTO enabled. Also sqlite.
- agumonkey 4y agoI felt the opposite, I (among many) was winging my makefiles due to unfinished learning. I always appreciate high precision posts like these (even if some of the points are above the top).
- spicybright 4y agoIt's high precision of a flawed view (in my opinion, of course) that should only be taken for what they are, an opinion. For any readers that want to learn make, look at the makefiles of big projects and see how they set things up. There's a huge difference of one person's opinions vs. a working system for a real world project.
- agumonkey 4y agoHmm in a way it's difficult because either Makefiles are small or suddenly part of very large projects with 1000+ lines nested Makefiles :)
- falcolas 4y agoOr RTFM. Make is ridiculously well documented. https://www.gnu.org/software/make/manual/make.html https://www.gnu.org/software/make/manual/make.html It's a peeve of mine that folks refuse to read the actual documentation for tools these days, preferring to wing it by copying other people's code.
- agumonkey 4y agoPeople should be a little more forgiving. Even after reading emacs Manual thoroughly 3 times, I still managed to miss a ton of nuances and information. Same goes for make or other large old tools I guess.
- falcolas 4y agoMake is not emacs. Its nowhere in the same stratosphere as emacs other than being under the GNU umbrella. And being forgiving of not understanding the docs requires someone to read the docs in the first place.
- protastus 4y agoThe attitude reminds me of the Nick Burns character from SNL.