News for hackers. Stuff that matters.
Re:Show HN: Cr – Runs your tasks at maximum concurrency by znpy on Monday December 18, 2017 @09:53AM (#15951976)
That's what make has been doing for the last like 40 years.
Re:Show HN: Cr – Runs your tasks at maximum concurrency by pweissbrod on Monday December 18, 2017 @11:47AM (#15952972)
Make is possibly the most popular thing people re-invent for specific platforms.

Touch of irony in this project, with that Makefile sitting in the root directory.

EDIT: My apologies if the above comment was cynical. There's a salient need for workflow systems which provide features above/beyond the basics of make. Built-in things like a central broker, adjustable worker processes, scheduling and history. Python/Luigi is an example of such a workflow system, yet it keeps the workflow definitions very similar to Make for conciseness

Re:Show HN: Cr – Runs your tasks at maximum concurrency by haldean on Monday December 18, 2017 @02:38PM (#15954710)
And tup for the last 10. Lots of people in this thread complaining about Make's syntax might want to check it out; it has a nice, simple "inputs |> command |> outputs" syntax, a similar "output the DAG" mode to Cr, and defaults to parallelism.

http://gittup.org/tup/

Re:Show HN: Cr – Runs your tasks at maximum concurrency by aidenn0 on Monday December 18, 2017 @03:47PM (#15955349)
That's funny because I would list tup's syntax as a negative for an otherwise very useful tool.

Also, Tup is much more single-purpose than Make or (from a quick readthrough) Cr. It is very strongly focused on the "N files in, 1 file out" for compilation, and specializes at that to the point of not doing other things.

As far as a minimal "better make" I find redo to be the best. Make is a weird combination of the shell and makefile languages, but redo boils it down to just a single language and manages to handle dependency of build rules in an elegant manner.

Re:Show HN: Cr – Runs your tasks at maximum concurrency by dilap on Wednesday December 27, 2017 @08:22PM (#16019575)
curious, which variant of redo do you actually use?
Re:Show HN: Cr – Runs your tasks at maximum concurrency by CJefferson on Monday December 18, 2017 @04:30PM (#15955693)
I love tup, but I find too many places where it doesn't work to use it for things I distribute (sometimes fuse fails, doesn't work on Linux subsystem for Windows, flakey on full windows).
Re:Show HN: Cr – Runs your tasks at maximum concurrency by blablabla123 on Monday December 18, 2017 @10:40AM (#15952313)
I wish the make documentation was better though. I've also read oftentimes that people say that turning on make concurrency with `-j` is on your own risk.
Re:Show HN: Cr – Runs your tasks at maximum concurrency by xyzzy_plugh on Monday December 18, 2017 @10:53AM (#15952431)
That's because people write shitty makefiles. Most makefiles I see are full of improperly used double colon rules, phony targets not marked .PHONY and implicit ordering assumptions.

If `-j' was enabled by default, then it would be much harder for writers to develop these issues. But I suspect most of these authors, who are already unwilling to learn make properly would simply give up and use a different tool.

Re:Show HN: Cr – Runs your tasks at maximum concurrency by f1notformula1 on Monday December 18, 2017 @12:40PM (#15953470)
> That's because people write shitty makefiles.

Which, coincidentally, is my main complaint with Make: It's way too easy to write shitty Makefiles. There are way too many wrong ways to do things. Arguably this is a community problem and not a tool problem, but it doesn't change the fact that most Makefiles are written badly.

I used Make professionally for 5 years and have since moved to other tech stacks that don't require Make but have tools that are far worse in every other way (cough Ant cough). But IMO the reason they win out is they are far less flexible, so there are fewer ways to do things, so they work better in aggregate.

Build tooling is something that most devs look at very rarely, so they never build expertise. Ergo, build tooling shouldn't require expertise.

If my theory holds out, I feel Gradle will become the new Make in a few years or a decade - very powerful but too many wrong ways to do things.

Re:Show HN: Cr – Runs your tasks at maximum concurrency by xyzzy_plugh on Monday December 18, 2017 @05:49PM (#15956201)
Make is more than 40 years old -- 40 fucking years! And we still use it. It's everywhere. It's not going anywhere. Gradle will not replace it.

Why? Because make works. Because it's actually easy to understand if you've read the manual. It's simple. People try to make it do really complicated things, which you are better off putting in a script or another program. At it's core, make works and does its job very, very well.

Here is a very beautiful, readable, portable makefile: https://github.com/git/git/blob/master/Makefile

It's hard to write portable anything without details leaking out. Go is the best implementation I've ever seen here. It works identically everywhere I've tried it. The approach the Go team has taken is extreme. I think that says a lot.

Both these tools are very simple, and limit what you can do. When you try to go outside the box, you hurt yourself. Don't hurt yourself.

Tools like Gradle make it real easy to hurt yourself without realizing it.

Re:Show HN: Cr – Runs your tasks at maximum concurrency by kazinator on Monday December 18, 2017 @05:53PM (#15956229)
We don't literally use make, exactly as it was forty years ago.

> Here is a very beautiful, readable, portable makefile: https://github.com/git/git/blob/master/Makefile

That's a GNU Make Makefile. It's portable to installations where you have GNU Make ported already.

Re:Show HN: Cr – Runs your tasks at maximum concurrency by Spivak on Monday December 18, 2017 @07:51PM (#15956888)
Look, this battle has been lost for ages. People only seem to write portable Makefiles by accident and usually just target the implementation of make on the platform they're developing on.
Re:Show HN: Cr – Runs your tasks at maximum concurrency by vorg on Wednesday December 20, 2017 @11:42AM (#15971142)
Unfortunately, when you learn Gradle, you also have to learn its procedural description language, Apache Groovy, with its many quirks, such as when to use

    something "abc"
and when to use

    something = "defg"
Re:Show HN: Cr – Runs your tasks at maximum concurrency by vvanders on Monday December 18, 2017 @11:58AM (#15953068)
The problem is that most people don't set out to be masters of make. They just want to get their shit built so they can make forward progress on the thing they want to create.

Having to learn all of these subtleties is what gets you into these problems in the first place. I'll happily take a more opinionated build tool with proper escape hatches over something that expects you to know it in detail for even the most basic tasks.

Re:Show HN: Cr – Runs your tasks at maximum concurrency by Sir_Cmpwn on Monday December 18, 2017 @04:34PM (#15955721)
I really hate this attitude. The same people who don't grok Make also don't grok git or bourne shell or who knows what else. Don't take shortcuts in understanding the fundamental tools of your stack. Your build system is just as important to your project as the code it's building!
Re:Show HN: Cr – Runs your tasks at maximum concurrency by vvanders on Monday December 18, 2017 @04:52PM (#15955851)
Make is only a fundamental tool if that's what your library/binary uses. You may have a mix of CMake, MSVC and language specific build tools like Cargo and others. By your logic I should be an expert in all of them.

Make's support outside of the posix world isn't that great(as opposed to CMake) so calling it fundamental seems that you are making assumptions about the environments that development happens in.

Re:Show HN: Cr – Runs your tasks at maximum concurrency by Sir_Cmpwn on Monday December 18, 2017 @05:13PM (#15955996)
>You may have a mix of CMake, MSVC and language specific build tools like Cargo and others. By your logic I should be an expert in all of them.

Correct.

>Make's support outside of the posix world

The world outside of posix doesn't really matter.

Re:Show HN: Cr – Runs your tasks at maximum concurrency by vvanders on Monday December 18, 2017 @09:02PM (#15957178)
That's a pretty narrow world view you have then.
Re:Show HN: Cr – Runs your tasks at maximum concurrency by Grollicus on Monday December 18, 2017 @01:03PM (#15953683)
I think people write bad makefiles because the documentation is bad. Its "taking the user by the hand and pushing him into the right direction"-level is just not up to date anymore.

Make is a good tool because it allows a lot of flexibility, but it doesn't protect its users from the pitfalls this flexibility unavoidably creates.

Re:Show HN: Cr – Runs your tasks at maximum concurrency by dilap on Monday December 18, 2017 @12:17PM (#15953244)
Yes, but also it's make's fault -- it is possible to notice and complain if you write something that's not || safe, rather than just giving you a flaky build. (Cf. tup.)
Re:Show HN: Cr – Runs your tasks at maximum concurrency by willejs on Monday December 18, 2017 @11:20AM (#15952693)
Here here.
Re:Show HN: Cr – Runs your tasks at maximum concurrency by IgorPartola on Monday December 18, 2017 @05:25PM (#15956069)
It’s hear hear.
Re:Show HN: Cr – Runs your tasks at maximum concurrency by Coding_Cat on Monday December 18, 2017 @10:50AM (#15952408)
Make's concurrency is pretty good, as long as your dependency graph is correct.

Problems arise when one of your build steps creates temporary files for each invocation and they end up overwritting each other (race condition).

This would have the same issue

Re:Show HN: Cr – Runs your tasks at maximum concurrency by jschwartzi on Monday December 18, 2017 @03:33PM (#15955210)
Or when people create phony targets instead of actually declaring an intermediate file and its prerequisites.
Re:Show HN: Cr – Runs your tasks at maximum concurrency by AFNobody on Monday December 18, 2017 @04:48PM (#15955805)
Documentation of open source projects is a great example of the tragedy of the commons.
[dead]
Re:Show HN: Cr – Runs your tasks at maximum concurrency by sctb on Monday December 18, 2017 @11:58AM (#15953064)