News for hackers. Stuff that matters.
Re:The sad state of sysadmin in the age of containers (2015) by megaman22 on Wednesday May 16, 2018 @12:24PM (#17083654)
But I just don't understand why we have to have 47 half-built over-complicated build systems or job runners or whatever the new fad term is for every language, when there's something that does what they all do, is battle-tested, and has been around for decades.

Everyone repeat after me. Makefiles are not scary. I can write a shell script. Do I really need to learn grunt/gulp/webpack/npm/rake/fake/maven/gradle/ant and on and on and on?

Probably somebody has released another one in the time it's taken me to write this comment.

Re:The sad state of sysadmin in the age of containers (2015) by eropple on Wednesday May 16, 2018 @12:27PM (#17083697)
Makefiles aren't scary. But they're also not particularly good.

I use Rake (or Gulp, or whatever) because then I can use Ruby (or JavaScript, or whatever). Shell plumbing is fine for informal and small-scale stuff, and I make my code conform if somebody down the line (who may be me) wants to get out their duct tape, but the world is more complex than what /bin/sh can see. Shell is the lowest common denominator. Expecting everything to at all times be written in and for that lowest common denominator is not reasonable. We're a tool-using species and we refine tools over time to make them better. The profusion of tools happens because they iterate on each other to be better. If old tools were sufficient, people would use them because learning new ones is hard.

So, yes, you do need to learn those tools. Or invent a shell that isn't tooth-pullingly difficult to use with a JSON file (and do not say `jq`, I love `jq` as an inspector but it does not step to `JSON.parse` and a working subscript operator). Or change `make` so that a git checkout won't trigger a full rebuild. Lots of baseline, stump-simple things that `make` is just not going to do for you because it's built for a frankly outmoded method of development.

Re:The sad state of sysadmin in the age of containers (2015) by colanderman on Wednesday May 16, 2018 @01:47PM (#17084605)
> I use Rake (or Gulp, or whatever) because then I can use Ruby (or JavaScript, or whatever).

You can use Ruby in Make. I don't know Ruby but here's some Python:

  SHELL = python
  .SHELLFLAGS = -c
  .ONESHELL:
  .DELETE_ON_ERROR:

  foo.txt: bar.json
      import json
      with open('$<') as input, open('$@', 'w') as output:
        output.write(json.load(input)['the_text'])
(Caveat: I've never actually tried this at scale.)

You can even use different languages for different recipes with per-recipe variable settings.

Re:The sad state of sysadmin in the age of containers (2015) by eropple on Wednesday May 16, 2018 @01:53PM (#17084678)
Ha, that's a neat trick! Trouble is, for either Python or Ruby it becomes tricky due to stuff like dependency management. You'll have to `bundle exec make` to get sane library paths for Ruby or `pipenv run` for Python, etcetera etcetera.

At that point I think you might as well just use a language-native one.

Great pull, though.

Re:The sad state of sysadmin in the age of containers (2015) by avar on Wednesday May 16, 2018 @02:13PM (#17084936)
The GP does this via a neat hack, but you can also do this in a much more understandable fashion by simply having the body of every Makefile rule start out by shelling out to some script in your favorite language.

I think you're (understandably) misinformed about what Makefiles do because you've run into some bad ones. The thing they're doing is managing a N-level deep dependency tree in a declarative way. So if A->B->C you can run something to generate C, then B can run, and finally A, and this can all be done in parallel for hundreds of files.

On the individual rule level this is really simple, e.g. just turning a .c file into a .o file, then finally some rule that depends on all *.o being generated creates a program out of them.

The language-native ones are usually much worse. They're easier to use at the outset because they don't make you create this dependency graph, but that also means that they can't run in parallel on your N cores, and they usually suck at incrementally updating the build.

Re:The sad state of sysadmin in the age of containers (2015) by colanderman on Wednesday May 16, 2018 @02:50PM (#17085296)
> The GP does this via a neat hack, but you can also do this in a much more understandable fashion by simply having the body of every Makefile rule start out by shelling out to some script in your favorite language.

I'm not sure what you mean? How would this allow you to use, say, Python as the language for recipes? Just having Make drop straight into Python kind of defeats the purpose of Make.

Re:The sad state of sysadmin in the age of containers (2015) by avar on Wednesday May 16, 2018 @03:01PM (#17085396)
You'd use Python as the language for the recipe that turns (in this example) a given .c file into a .o file, while leaving the Makefile to do what it's good at, declaring the DAG dependency tree needed to incrementally build it.

The point is that people conflate these two things. They open some random Makefile and see that it's mostly doing stuff with shellscripts, and think "oh I should do this all in Python", and then write some monstrosity that doesn't make a dependency DAG and thus can't run in parallel or be easily understood.

Instead they should have split the actual logic they found in shellscripts in to Python scripts the Makefile invokes.

Re:The sad state of sysadmin in the age of containers (2015) by colanderman on Wednesday May 16, 2018 @03:05PM (#17085439)
Nevermind, I misread you. I missed "rule" where you said "beginning of every Makefile rule". (I thought you were suggesting just having the default rule run some enormous Python script, which I've unfortunately seen before.)
Re:The sad state of sysadmin in the age of containers (2015) by Karrot_Kream on Wednesday May 16, 2018 @02:12PM (#17084907)
> Shell is the lowest common denominator. Expecting everything to at all times be written in and for that lowest common denominator is not reasonable

Is it that hard to learn shell? Why is it so painful? What makes it the "lowest common denominator"? I use it all the time, but I admit at work I am one of the few.

> Expecting everything to at all times be written in and for that lowest common denominator is not reasonable. We're a tool-using species and we refine tools over time to make them better.

This is too vague. What makes a Ruby based build or JS based build a more "refined" tool? It sounds like familiarity is the real issue here.

> If old tools were sufficient, people would use them because learning new ones is hard.

How many people even know Makefiles these days anyway? The "modern" approach seems to be, learn a programming language and then try to do everything inside of it. Some languages are more interested in this cloistered philosophy than others (like JS).

If anything, I think the reason these build tools keep being proliferated is because nobody wants to learn anything more than the bare minimum to "be productive" (which, depending on what you're working on, can be anything from pushing out customer demos for a company that will never sell, to microservices operating at scale). Learning a language and never leaving its paradigms/comforts is easy.

Re:The sad state of sysadmin in the age of containers (2015) by adamc on Wednesday May 16, 2018 @12:44PM (#17083885)
Your second paragraph got to the heart of it. If we want to use some standard build toolchain, it needs to use a nice language and not feel obscure. I was explaining to someone a bash script I wrote, and he said "why not use Python". There were reasons but... he was right, Python would be much easier to use and maintain, and we have a lot more developers who know it.

That said, Maven is incredibly suck-tastic.

Re:The sad state of sysadmin in the age of containers (2015) by eropple on Wednesday May 16, 2018 @12:47PM (#17083924)
Eh. It's not my favorite thing out there, but Maven's fine for what it is. It's designed for and explicitly for well-behaved Java artifacts. If your Java artifacts are not well-behaved, you're going to have a bad time--in my experience, most of those cases are doing things you probably shouldn't be doing.

(You may be a wizard and have a reason to do them, for sure--but that's what writing Maven plugins is for. Or not using Maven. You've got choices.)

Re:The sad state of sysadmin in the age of containers (2015) by clhodapp on Wednesday May 16, 2018 @01:08PM (#17084161)
Given the limitations of the platform, there really isn't a such a thing as a well-behaved JVM library that depends on other libraries, unfortunately. Oracle really dropped the ball by only serving their own needs with the module system.
Re:The sad state of sysadmin in the age of containers (2015) by eropple on Wednesday May 16, 2018 @01:40PM (#17084509)
Can you expand on this? Having done a pretty decent bit of JVM development, I've never really run into issues even doing some not-out-of-the-box stuff.
Re:The sad state of sysadmin in the age of containers (2015) by weaksauce on Wednesday May 16, 2018 @01:00PM (#17084070)
What reasons? I did some ruby shell automation and it’s dead simple to get it working and working correctly. I imagine python has a similar story.
Re:The sad state of sysadmin in the age of containers (2015) by mst on Wednesday May 16, 2018 @01:24PM (#17084341)
> `JSON.parse` and a working subscript operator

https://github.com/ingydotnet/json-bash

    source json.bash
    
    json='{"name":"Jason","friends":["Jimmy","Joe"]}'
    JSON.load "$json"
    joe=$(JSON.get /friends/1)
    JSON.put /friends/2 Jeff
    new_json=$(JSON.dump)
It's still not as trivial as javascript, but "tooth-pullingly difficult" is a little unfair.
Re:The sad state of sysadmin in the age of containers (2015) by eropple on Wednesday May 16, 2018 @01:45PM (#17084585)
Again: sh, not bash. If I have the freedom to specify bash, I can specify something better than bash or sh.
Re:The sad state of sysadmin in the age of containers (2015) by GalacticDomin8r on Wednesday May 16, 2018 @12:38PM (#17083822)
> but the world is more complex than what /bin/sh can see

That is blatantly false, but I get the premise behind it. Writing and maintaining complex stuff in bourne or bash is not fun or easy.

I always use bourne until certain level of complexity or awkwardness is reached. It's pretty easy to write and dead simple to troubleshoot.

Re:The sad state of sysadmin in the age of containers (2015) by eropple on Wednesday May 16, 2018 @12:44PM (#17083881)
Blatantly false? OK, put up. Forget `sh`'s JSON parsing, I'll make it easy on you--show me its arrays. Arrays, plural, you can't use $@ as a bail-out; I need more than one. Show me hashes. Show me sets. Show me the basic building-block primitives of software, because build pipelines are software. It's 2018. If your language can't do this stuff without babysitting, it effectively can't do it because nobody's got the time to babysit your easy-25%-of-Perl language

And yeah, I did say `sh`, because that is what you can practically be expected to have kicking around alongside `make` on a system where I can't just install something worthwhile. If I have them, then there's no reason to write much harder to troubleshoot shell scripts (and, thank you quotebarf, more likely to be incorrect) than to open Pry.

Re:The sad state of sysadmin in the age of containers (2015) by vlowther on Wednesday May 16, 2018 @12:53PM (#17083981)
Bash, but...

> --show me its arrays

  declare -a
> Show me hashes.

  declare -A
> Show me sets.

See above

> Show me the basic building-block primitives of software,

  thing() {
     local localVar
     # Yes, it would be nice to have lexical scope as well as 
     # dynamic scope, but...
  }
Re:The sad state of sysadmin in the age of containers (2015) by eropple on Wednesday May 16, 2018 @12:54PM (#17083994)
Sure. All of which are clunky, opaque, and harder to work with than any other language I have used in the last decade.

And besides: if I can install bash, I can install something specifically better for whatever I'm doing instead.

Re:The sad state of sysadmin in the age of containers (2015) by shortusername on Wednesday May 16, 2018 @01:45PM (#17084588)
Clunky is subjective -- I think we can probably agree that there are clunkier, more opaque, and harder to work with constructs in programming than a slightly different syntax for array declaration.

What are these build systems where you need to install Bash? Bash 4 was released in 2009: it's been in every major Linux distribution for at least two major versions, ditto for FreeBSD... heck, even Solaris ships with it now.

Re:The sad state of sysadmin in the age of containers (2015) by eropple on Wednesday May 16, 2018 @01:49PM (#17084635)
You're right, there are clunkier, more opaque, and harder to work with constructs in programming. Like `sh` arguments. And like `sh` quotebarf.

And Busybox is commonplace. Systems that include Busybox usually do not include `bash`. And so, for my purposes, if I can specify `bash`, I can also specify, say, Ruby, which--while by no means perfect--makes life much, much easier.

Re:The sad state of sysadmin in the age of containers (2015) by mcguire on Wednesday May 16, 2018 @01:37PM (#17084484)
Speaking as an (ex- (sort of)) sysadmin,

"All of which are clunky, opaque, and harder to work with than any other language I have used in the last decade."

Wrong question. A better one: Is it more clunky, opaque, and harder to work with than every other language that's appeared in the last decade? Because no one seems to agree on what is specifically better.

Re:The sad state of sysadmin in the age of containers (2015) by eropple on Wednesday May 16, 2018 @01:43PM (#17084558)
I disagree that it is the wrong question. "Every other language" doesn't matter because I don't value homogeneity and I think that homogeneity of programming language is a fool's errand. I am comfortable shipping production code in most of the languages in current use; in my estimation, none of the major build systems out there are as opaque or difficult to use correctly as make/shell.

(And I am what a current sysadmin would be if we did not call ourselves "devops engineers" now.)

Re:The sad state of sysadmin in the age of containers (2015) by zippitydoodah68 on Wednesday May 16, 2018 @06:06PM (#17086873)
And you are definitely not a sysad or any sort of sysadmin. The core mission of a sysad is to build the best environment possible while restricting that environment.

You seem to be the sort of developer that developers love and the sort of sysadmin that gets fired in the first week Just my .02 after two and a half decades.

Not to say that you are entirely wrong or your approach doesn't have merit in the new world (especially SV). But it doesn't work for sysadmins and production environments anywhere but your bubble. Not yet.

Re:The sad state of sysadmin in the age of containers (2015) by eropple on Thursday May 17, 2018 @10:08AM (#17091312)
Well, you're right, I'm not a sysadmin. I pervasively automate, which often sidelines sysadmins, when it doesn't make them redundant. I write code and I don't touch production machines except in extremity, neither of which apply to most (though by no means all) of the people I know who want to call themselves a sysadmin.

Anyway, the core mission of anybody touching the stack is to enable the business to achieve its goals. Nothing, and I mean nothing, more. "Restricting that environment" is appropriate in some environments, and a number of my clients bring me in to help with that. Facilitating developer velocity--and, yes, developers do tend to like me, because I'm good at this while achieving goals around security and uptime--is appropriate in, probably, more. Pays better, too, even if it shouldn't.

Re:The sad state of sysadmin in the age of containers (2015) by zippitydoodah68 on Thursday May 17, 2018 @10:18AM (#17091390)
It's not that sysadmins cannot do the work you are rightfully proud of. If there are two basic things that differentiates your statements from those of a traditional sysadmin it is these.

1. Design. 2. Discipline.

Where these two values are dispensable long term devops and the new world shine through. I've worked in both worlds and the only mistake is assuming one size fits all.

Re:The sad state of sysadmin in the age of containers (2015) by zippitydoodah68 on Thursday May 17, 2018 @01:25PM (#17093346)
In general you seem like an absurd sort of creature. Neither here nor there. Bragging about your facility and business velocity. Everything you claim to do sysadmins were doing in 98 and with equal velocity and adequate coverage.

There were guys like this that were there before and helped everyone along: https://www.computerhope.com/people/don_libes.htm

Re:The sad state of sysadmin in the age of containers (2015) by mmt on Thursday May 17, 2018 @04:59PM (#17095710)
At the risk of being too "meta", although I agree with what I believe is your point about good sysadmins having been advancing automation (and otherwise keeping business needs in mind), I worry that you're distracting a reader from that point by what reads as an ad-hominem attack in your first sentence.

I'm still not certain what point you were trying to make with "neithere here nor there", however.

Re:The sad state of sysadmin in the age of containers (2015) by nunez on Thursday May 17, 2018 @12:04AM (#17088635)
Have you SEEN how Bash array indexing works? It’s not exactly user friendly. Same with Bash hashtables (which I don’t think are really hashtables).

I love Bash and use it way more often than I should, but Bash is not a friendly language. Mocking and stubbing functions is really hard to do, which makes tests awkward, even with BATS. And you need to watch the file descriptor to which text is sent to avoid things get globes unexpectedly. And you need to properly scope your vars to avoid unexpected collisions. And everything regarding sourcing and importing dependencies. Etc.

Re:The sad state of sysadmin in the age of containers (2015) by Sir_Cmpwn on Wednesday May 16, 2018 @02:09PM (#17084879)
>I use Rake (or Gulp, or whatever) because then I can use Ruby (or JavaScript, or whatever).

This is an anti-feature. When you need this, your build is too complicated.

Re:The sad state of sysadmin in the age of containers (2015) by gaius on Wednesday May 16, 2018 @01:02PM (#17084091)
But they're also not particularly good.

Million+ line codebases got errm made with make. In my experience people most sneering at it have far lesser demands on their tool...

Re:The sad state of sysadmin in the age of containers (2015) by eropple on Wednesday May 16, 2018 @01:06PM (#17084133)
Million+ line codebases were written entirely in COBOL.

The world advances.

Re:The sad state of sysadmin in the age of containers (2015) by gmfawcett on Wednesday May 16, 2018 @01:16PM (#17084255)
Some were, I guess, but hardly all of them. The Linux kernel is built with Make, for example.
Re:The sad state of sysadmin in the age of containers (2015) by digi_owl on Wednesday May 16, 2018 @01:37PM (#17084480)
There are been several attempts at introducing a new build system, but they have been all shot down over introducing dependencies.
Re:The sad state of sysadmin in the age of containers (2015) by gaius on Wednesday May 16, 2018 @01:50PM (#17084648)
If it ain't broke don't fix it!

How many features could people have implemented or bugs fixed or general progress made instead of obsessing over tooling?

Re:The sad state of sysadmin in the age of containers (2015) by pc86 on Wednesday May 16, 2018 @01:17PM (#17084271)
It's weird that you use the word "advances" to refer to JavaScript-based build processes.
Re:The sad state of sysadmin in the age of containers (2015) by ebiester on Wednesday May 16, 2018 @12:39PM (#17083831)
I've written a makefile from scratch.

My challenge to you: I want a makefile that has 20 third party dependencies and can be built on osx, linux, and windows.

I can do this within an hour with gradle, ant, or maven. The ecosystem doesn't exist for this in make, and anything I could come up with to make it possible would end up being a tool that would look like automake and the monstrosity that it entails.

Re:The sad state of sysadmin in the age of containers (2015) by tremon on Wednesday May 16, 2018 @01:16PM (#17084259)
That's a bit unfair, because make relies on the underlying system capabilities much more than Java does, and Windows' just isn't up to snuff. But for the other platforms, autotools definitely can do what you ask.
Re:The sad state of sysadmin in the age of containers (2015) by spookthesunset on Wednesday May 16, 2018 @06:27PM (#17086974)
> But for the other platforms, autotools definitely can do what you ask

Ugg... autotools. Yeah, lets use what feel like build tools created way back in the 60's or something. Sure they "work" for some value of "work" but oh boy are they ugly and nasty. Good luck hiring anybody under the age of 40 who is gonna be willing to work on such a clunky old tool.

There is a reason why the world is moving to build systems that replace the Make toolchain.

Re:The sad state of sysadmin in the age of containers (2015) by mcguire on Wednesday May 16, 2018 @01:39PM (#17084496)
"I can do this within an hour with gradle, ant, or maven."

For something that isn't JVM-based?

Re:The sad state of sysadmin in the age of containers (2015) by ebiester on Wednesday May 16, 2018 @02:20PM (#17084996)
Certainly not for all but the most trivial cases, but I'd use the language's build tools.

The industry has moved to language-specific build tools and ecosystems, and the article and is complaining about this in part, no?

Re:The sad state of sysadmin in the age of containers (2015) by gm-conspiracy on Wednesday May 16, 2018 @01:19PM (#17084301)
"osx, linux, and windows"

and you've already made sure they are running the same JRE version, right?

Re:The sad state of sysadmin in the age of containers (2015) by preordained on Wednesday May 16, 2018 @01:59PM (#17084756)
Come on...bundle your JRE. I don't know why anyone wouldn't in the age of terabyte hard drives and ubiquitous "small" apps with sizes that make a bundled JRE with all the trimmings look lightweight.
Re:The sad state of sysadmin in the age of containers (2015) by w4tson on Wednesday May 16, 2018 @04:16PM (#17086074)
And while you’re at it can you make it idempotent when building sub artifacts which inputs haven’t changed.

And can it do it all incrementally in parallel too please because enterprise shops tend to have a ton of code

Oh and it would be really nice if you could make it so if someone else somewhere in the org has compiled that thing then could we just use their computed binary to save the time compiling locally.

THANKS!

;)

Re:The sad state of sysadmin in the age of containers (2015) by untog on Wednesday May 16, 2018 @12:54PM (#17083990)
> But I just don't understand why we have to have 47 half-built over-complicated build systems

> Everyone repeat after me.

I don't mean to pick on you specifically here because this attitude comes up a lot. In short, a lot of people are doing a thing, a thing that you aren't familiar with, and your gut reaction is to say "everyone: stop doing that, and do what I say!".

Wait a second and consider that maybe there is a reason why this incredibly large number of developers are using these tools. That perhaps they evaluated various different options and decided that what they are using is more suitable than make. Maybe you could find out.

Re:The sad state of sysadmin in the age of containers (2015) by kazen44 on Wednesday May 16, 2018 @12:57PM (#17084021)
> Wait a second and consider that maybe there is a reason why this incredibly large number of developers are using these tools. That perhaps they evaluated various different options and decided that what they are using is more suitable than make. Maybe you could find out.

Here we have another fundemental "problem" between dev and ops.

The inherent friction because of different areas of concern.

Dev's want to build fast and create new features, but sadly (even with the whole devops notion) are usually not thinking about viability in production.

Ops people need to keep thing stable, something which is sadly undervalued a lot of times in companies.

Re:The sad state of sysadmin in the age of containers (2015) by notyourday on Wednesday May 16, 2018 @01:22PM (#17084325)
Put devs on 24x7 escalation above your level-1 ("Is it actually broken?") NOC. Developer attitude would change immediately.
Re:The sad state of sysadmin in the age of containers (2015) by digi_owl on Wednesday May 16, 2018 @01:48PM (#17084626)
Sadly i have seen far too many devs go "you are holding it wrong"...
Re:The sad state of sysadmin in the age of containers (2015) by notyourday on Monday May 21, 2018 @07:20AM (#17117523)
"You are holding your paycheck wrong"
Re:The sad state of sysadmin in the age of containers (2015) by mcguire on Wednesday May 16, 2018 @01:56PM (#17084722)
"It works for me."
Re:The sad state of sysadmin in the age of containers (2015) by untog on Wednesday May 16, 2018 @01:00PM (#17084074)
Not really? A lot of build tools are chosen specifically to make the build process more reliable and understandable. For example, build tools like Maven handle dependency management, which is hugely beneficial in ensuring your builds are consistent and work the same in different environments. Makefiles are shell scripts.
Re:The sad state of sysadmin in the age of containers (2015) by colanderman on Wednesday May 16, 2018 @01:24PM (#17084343)
Makefiles are definitely not shell scripts. Individual recipe lines are executed using Bash by default, but you can change this. (Heck you probably could even get away with Python if you really wanted.)

The rest of Make (which is 95% of what's in a Makefile) is its own language, which is actually not too bad for what it's intended for (munging around filenames), and has the flavor of a functional language.

Re:The sad state of sysadmin in the age of containers (2015) by mcguire on Wednesday May 16, 2018 @01:55PM (#17084706)
"Maven handle dependency management"

https://maven.apache.org/pom.html#Dependency_Version_Require...

Don't forget to go the extra mile with your dependency versioning to ensure you actually get repeatable builds.

Re:The sad state of sysadmin in the age of containers (2015) by mancerayder on Wednesday May 16, 2018 @01:13PM (#17084215)
Not taking sides here but you picked a bad example. Makefiles specifically handle dependency management, but designed from a compiled language perspective. Make sure you build this .so before you build this bin, or that this directory exists, and so forth.
Re:The sad state of sysadmin in the age of containers (2015) by untog on Wednesday May 16, 2018 @01:52PM (#17084669)
That's fair, but it still reinforces the point: Makefiles are great from a compiled language perspective. Other build tools are better from other perspectives. It isn't wrong to choose a tool depending on your needs!
Re:The sad state of sysadmin in the age of containers (2015) by mcguire on Wednesday May 16, 2018 @01:52PM (#17084674)
"Wait a second and consider that maybe there is a reason why this incredibly large number of developers are using these tools. That perhaps they evaluated various different options and decided that what they are using is more suitable than make. Maybe you could find out."

Have you considered that perhaps the previous commentor is familiar with the other tools? Or perhaps that the large number of developers have streamlined their particular workflows for their particular use case and have not considered the flexibility needed for other cases? Or perhaps that there is a cost associated simply with having 47 different build systems?

Re:The sad state of sysadmin in the age of containers (2015) by w4tson on Wednesday May 16, 2018 @04:25PM (#17086137)
If the previous commenter was familiar was familiar with 47 build tools and has discounted a lot of them as extraneous. Is he advocating building an npm module with make? What about a jar? Nuget package? Cargo module?

Its seems more likely that they’re frustrated about the sheer amount to learn and they probably know make quite well.

But there are real advantages to these tools. There’s a lot of vanity libraries out there but not many vanity build tools.

Re:The sad state of sysadmin in the age of containers (2015) by megaman22 on Wednesday May 16, 2018 @05:17PM (#17086576)
My real issue is the constant wheel-making impulse, that leaves us with a shattered landscape of people tripping and falling over busted-ass and abandoned wheels. I have a JavaScript front-end project that uses three different package managers, and four different make-analog tools, plus some batch files sprinkled on top to orchestrate the common use cases of this monstrosity. Nothing that we are doing here is that complicated, except for this sea of shitty half-baked ecosystems around these tools, each of which was considered best-of-breed at one point.

What we want to do is slurp some text files up, apply some transformations to them, glob them together, run them through the minifier, and dump them into a final output. This is exactly what a decent makefile would fit well for. Instead, I got this, because apparently nobody wants to use anything that isn't the hot new way to do things, and so very few people have even had enough exposure to know that there are tested tools for these kinds of things that existed. The last time I was using make beyond trivial uses was a decade ago in college (incidentally, I actually did build jars with make, easier than fighting Eclipse...). But just knowing that something exists is more than half the battle, although the problem then is that it's frustrating as all hell watching the same ideas cycle round and round and round every couple years.

Re:The sad state of sysadmin in the age of containers (2015) by w4tson on Wednesday May 16, 2018 @05:38PM (#17086730)
I’ve wasted enough time tinkering with gulp, grunt and webpack to sympathize
Re:The sad state of sysadmin in the age of containers (2015) by spookthesunset on Wednesday May 16, 2018 @06:29PM (#17086985)
> I’ve wasted enough time tinkering with gulp, grunt and webpack to sympathize

And yet, those tools fill a need that would be very hard to replicate with the toolchains that came before it. Good luck doing half of what gulp / webpack do from, say, a Makefile.

Re:The sad state of sysadmin in the age of containers (2015) by mmt on Thursday May 17, 2018 @04:23AM (#17089691)
I'm not familiar with either of those particular two tools, and what you say may well be absolutely true for both of them.

It's just that this argument keeps getting used for every single new "reinvented wheel" (to borrow from the GP). Sometimes the argument is as strong as "it couldn't be done any other way" and sometimes it's as weak as "this one is just incrementally better," but it feels a little like crying wolf.

Was it really "very hard" to make the old wheel do what you needed, or perhaps somehow extend it or add a library, or was it just far more fun and exciting to build something from scratch?

I generally don't mind a proliferation of tools, except when they start to break or conflict with each other, which is, I believe the GP's main concern, and at least tangentially related to the article.

Re:The sad state of sysadmin in the age of containers (2015) by peterbraden on Friday May 18, 2018 @04:07AM (#17099514)
The value of gulp / webpack et al are the plugins.

I've had success in several JS projects using make in combination with the shell version of a lot of these plugins and npm scripts.

There is value in both approaches.

Re:The sad state of sysadmin in the age of containers (2015) by djsumdog on Wednesday May 16, 2018 @12:52PM (#17083974)
Well you use the right tool for the job. I hope to god you're not using a Makefile for a Java or Scala project. You better be using Gradle, SBT or Maven.

If you're building in Elixir, I hope you're using Mix and not a Makefile. If you're building in Rust, I hope you're using Cargo, or some other Rust specific build tool.

And Makefiles do get stupid complicated when you need things portable and to work on Linux, Mac and FreeBSD; or allow them to have optional dependencies. That's why we have autoconf and all that ./configure && make && make install craziness.

Re:The sad state of sysadmin in the age of containers (2015) by dagss on Wednesday May 16, 2018 @12:29PM (#17083714)
I wish there was something like an updated Make, a tool that works for everything but updated to 2018.

For instance Make works based on timestamps and therefore works very poorly together with git. Switch to another branch and you can get weird effects based on what files were updated and not and often trigger needless rebuilds. And everyone uses git these days.

GNU Make, just using hashes instead of timestamps, would be a huge step forward.

Re:The sad state of sysadmin in the age of containers (2015) by wyldfire on Wednesday May 16, 2018 @12:35PM (#17083794)
> I wish there was something like an updated Make, a tool that works for everything but updated to 2018.

Is ninja that tool?

Re:The sad state of sysadmin in the age of containers (2015) by lbenes on Wednesday May 16, 2018 @12:53PM (#17083983)
> GNU Make, just using hashes instead of timestamps

Sounds like you're describing make on a system with ccashe installed. Hashing incurs a significant performance hit. The first build with ccashe is 20% slower than building without it[1]. Your modern make would likely be slower for people who just build something from source once and aren't doing incremental development.

https://ccache.samba.org/performance.html

Re:The sad state of sysadmin in the age of containers (2015) by dagss on Friday May 18, 2018 @04:54PM (#17104869)
ccache is just for c/c++..

Did you consider that it could be other things with ccache that makes it slow? E.g., the need to fully expand C headers and turn it into a text stream (NOT needed for a build tool).

Everything with git is lightning fast including operations that require a full directory tree diff / hash.

Re:The sad state of sysadmin in the age of containers (2015) by sushisource on Wednesday May 16, 2018 @12:41PM (#17083852)
Gradle does this. There is definitely a few extra seconds of overhead compared to make, but that's hardly intolerable.
Re:The sad state of sysadmin in the age of containers (2015) by repolfx on Wednesday May 16, 2018 @12:34PM (#17083783)
That'd require hashing every file on every run to figure out what changed. Not a good idea.

There are modern tools that work for many things. Gradle supports native compilation these days as well as any JVM language. Bazel supports compiling many kinds of languages, and there's still scons.

Re:The sad state of sysadmin in the age of containers (2015) by dagss on Friday May 18, 2018 @04:53PM (#17104859)
I've tried scons, waf, CMake, etc, always ended up hating them and return to standard Makefiles. SCons is the worst I've tried ever.

As to the cost of hashing: "git status" runs on 0.009s and requires a full diff of my working directory?..

Re:The sad state of sysadmin in the age of containers (2015) by trhway on Wednesday May 16, 2018 @12:53PM (#17083978)
>That'd require hashing every file on every run to figure out what changed. Not a good idea.

it is using time stamp to check whether to hash to check for changes.

Re:The sad state of sysadmin in the age of containers (2015) by snovv_crash on Wednesday May 16, 2018 @01:26PM (#17084367)
CMake?
Re:The sad state of sysadmin in the age of containers (2015) by dagss on Friday May 18, 2018 @04:50PM (#17104842)
CMake generates a standard Makefile for dependency change tracking doesn't it? Just timestamp-based on hash-based?
Re:The sad state of sysadmin in the age of containers (2015) by Tharre on Wednesday May 16, 2018 @12:55PM (#17084004)
We have 47 half-built over-complicated build systems, because writing build systems is hard.

Writing correct Makefiles is also really hard, and good luck debugging them. Make is simple and beautiful for small, self-contained projects without many dependencies, but it does not scale well (and even then it's tricky, see [0][1]).

Having 47 different build tools with their own flaws is certainly bad, but they exist because of Make's shortcomings. Just saying "make is fine, use it" won't fix anything.

[0] https://cr.yp.to/redo/honest-script.html

[1] https://cr.yp.to/redo/honest-nonfile.html

Re:The sad state of sysadmin in the age of containers (2015) by JdeBP on Thursday May 17, 2018 @11:03AM (#17091890)
Re:The sad state of sysadmin in the age of containers (2015) by mmt on Thursday May 17, 2018 @05:01PM (#17095743)
Did you mean to paste two different discussions? Those are identical.
Re:The sad state of sysadmin in the age of containers (2015) by JdeBP on Thursday May 17, 2018 @07:51PM (#17097308)
Re:The sad state of sysadmin in the age of containers (2015) by kingbirdy on Wednesday May 16, 2018 @12:25PM (#17083670)
Systems besides make are used because they offer advantages make doesn't
Re:The sad state of sysadmin in the age of containers (2015) by Kalium on Wednesday May 16, 2018 @12:37PM (#17083817)
For many of those systems, the biggest advantage is often that tasks are written in the language of the application.

A lot of the Rake tasks I've encountered in my career would have been easier to write in bash. Not a majority, but a sizable minority. I suspect that in many cases, the gain was that the authors were more comfortable in Ruby than in bash.

Re:The sad state of sysadmin in the age of containers (2015) by eropple on Wednesday May 16, 2018 @12:53PM (#17083986)
I'm pretty comfortable in both, but I'll pretty regularly use Ruby via Pry for stuff I know I can do in bash. It's easier to write, much much much easier to write correctly, and it presents a unified interface to other developers.
Re:The sad state of sysadmin in the age of containers (2015) by usrusr on Wednesday May 16, 2018 @01:40PM (#17084513)
Language specific build tools will usually behave predictably across all development platforms supported by the language. Once you start building on a third party, developer experience will be bounded by the quality of platform support of that third party. You don't want to send everybody off on a hunt for the right version of Python unless you are Python.

(Just picking Python as an example because of the recent xkcd. The same is true for everything else, e.g. a Windows computer will rarely contain exactly one make.exe, it's usually either none or a whole bunch of them)

Re:The sad state of sysadmin in the age of containers (2015) by zodiac on Wednesday May 16, 2018 @01:04PM (#17084111)
I've uses my fair share of build tools and I think makefiles are horrible. Stringly typed, ad-hoc features, and a really bad language from a PL perspective.

Writing good build systems is genuinely hard, and I think make is not a good build system.

Re:The sad state of sysadmin in the age of containers (2015) by mcguire on Wednesday May 16, 2018 @01:58PM (#17084753)
It is, unfortunately, better than most of its successors, at least in terms of generality.
Re:The sad state of sysadmin in the age of containers (2015) by realharo on Wednesday May 16, 2018 @12:39PM (#17083839)
As a counter-example, this is a few hand-picked sections from a Makefile for OpenSSL.

https://gist.github.com/anonymous/d885c3bb66a319d22f9d60c1ef...

Re:The sad state of sysadmin in the age of containers (2015) by ionforce on Wednesday May 16, 2018 @12:28PM (#17083701)
Maybe you should spend more time learning what value adds they provide.
Re:The sad state of sysadmin in the age of containers (2015) by Joeri on Wednesday May 16, 2018 @12:49PM (#17083945)
Many of these are tools which download code dependencies from package repositories and integrate them into a codebase or build. Make doesn’t do that, even configure doesn’t do that.
Re:The sad state of sysadmin in the age of containers (2015) by mcguire on Wednesday May 16, 2018 @01:59PM (#17084762)
Anyone remember the days when you didn't want to do that?
Re:The sad state of sysadmin in the age of containers (2015) by acheron on Wednesday May 16, 2018 @04:32PM (#17086202)
Days like today? As someone who is often working on machines with no network access, I vastly prefer build and deployment processes that don't need to go download crap.
Re:The sad state of sysadmin in the age of containers (2015) by jiveturkey on Wednesday May 16, 2018 @01:03PM (#17084102)
careful, your dinosaur scales are showing.

make is so bad you need automake to manage it.

there are much better tools. sadly, nothing LCD (least common denominator) so as to gain wide traction.

That said, for anyone distributing software, shame on them for not packaging their custom build so as to be runnable via ‘make all’ (just using make to drive everything else).

Re:The sad state of sysadmin in the age of containers (2015) by kazinator on Wednesday May 16, 2018 @01:21PM (#17084315)
Make is only bad under the Autotools mess. Every build-related struggle in an open-source project that uses Autotools can be traced to Autotools, not to make.

Autotools wasn't invented to overcome deficiencies in make, but deficiencies in C portability across Unix flavors.

Those deficiencies are greatly diminished today, both by POSIX standardization, and there being fewer viable surviving Unix variants that anyone cares to build for.

Re:The sad state of sysadmin in the age of containers (2015) by nickpsecurity on Wednesday May 16, 2018 @01:41PM (#17084534)
Don't tell them: show them. I've found they get quite a reaction to the mess underneath illustrated by the PHK article below.

https://queue.acm.org/detail.cfm?id=2349257

Re:The sad state of sysadmin in the age of containers (2015) by colanderman on Wednesday May 16, 2018 @03:03PM (#17085413)
Exactly. Don't forget `pkg-config` [1], which I've found eliminates most cross-POSIXish-platform linking issues.

[1] https://en.wikipedia.org/wiki/Pkg-config

Re:The sad state of sysadmin in the age of containers (2015) by colanderman on Wednesday May 16, 2018 @01:14PM (#17084236)
I've used make for 15 years and never once needed automake. The company I'm currently at uses straight make without problems for a 500 kLOC code base of multiple languages, 3rd-party code, code generators, and unit tests. Our make code totals 1000 lines.

I've seen plenty of messes using scons and ant, more so than I've seen with make. Make is a solid tool.

Re:The sad state of sysadmin in the age of containers (2015) by bitwize on Wednesday May 16, 2018 @01:43PM (#17084567)
Across multiple operating systems (unix and windows)? Does it fetch and install 3rd party dependencies? Can a noob maintain the makefile without pulling their hair out?