Live data from Hacker News

Tup – A file-based build system for Linux, OS X, and Windows

gittup.org

11–20 of 110 posts

Re: Tup – A file-based build system for Linux, OS X, and Windows

#11
post #8
post #5

We use Tup to build Flynn [1], it's a pretty neat build system. The only real drawback is that it's hard to get to work on some operating systems because of dependency on FUSE. That said it still beats the crap out GNU Make or CMake etc. [1] https://github.com/flynn/flynn

> That said it still beats the crap out GNU Make How? Their description was useless in describing why it's "obviously" so much better.

The very last part of this page explains it quite well:

http://gittup.org/tup/ex_a_first_tupfile.html

Re: Tup – A file-based build system for Linux, OS X, and Windows

#12
While I can believe the claim it's better than make, it would be way more interesting to see how it compares to Bazel. After using it (or rather Blaze) at Google and now Bazel at Improbable, I consider it the gold standard in build tools.

If anything, I wish Google would open source the rest of the build "ecosystem" that together with Blaze let you build the whole codebase in seconds. It was pretty amazing.

Re: Tup – A file-based build system for Linux, OS X, and Windows

#13
post #8
post #5

We use Tup to build Flynn [1], it's a pretty neat build system. The only real drawback is that it's hard to get to work on some operating systems because of dependency on FUSE. That said it still beats the crap out GNU Make or CMake etc. [1] https://github.com/flynn/flynn

> That said it still beats the crap out GNU Make How? Their description was useless in describing why it's "obviously" so much better.

GNU make starts of with targets, and then talks the build graph (target -> source) to find source files which will re-build the targets. And GNU Make has to scan the files.

Tup starts off with the list of sources which have changed, and then walks the build graph (source -> target) to find out which targets need to be rebuilt. And Tup gets notified of file changes.

So where Make scans all targets and all source files, Tup gets told which source file has changed, and then rebuilds only the necessary targets.

That being said, the following comparison is a bit odd:

http://gittup.org/tup/make_vs_tup.html

I don't think it's a requirement of GNU Make that building a project with N source files takes exponential time. I think its just that the GNU Make code is terrible.

Re: Tup – A file-based build system for Linux, OS X, and Windows

#14

The FUSE dependancy is pretty unfortunate. Is there any way to get rid of it? Other than that, it's pretty cool. And the creator clearly has a sense of humor, something which is far rarer than it should be.

The same functionality should be available in various inotify / dnotify implementations.

Re: Tup – A file-based build system for Linux, OS X, and Windows

#15
post #14

The FUSE dependancy is pretty unfortunate. Is there any way to get rid of it? Other than that, it's pretty cool. And the creator clearly has a sense of humor, something which is far rarer than it should be.

The same functionality should be available in various inotify / dnotify implementations.

Not really. inotify requires you to set up a watch on every single file or directory that you want to watch. To see how this escalates, install the inotify-tools and do

  inotifywatch -d /path/to/directory/with/a/lot/of/files

Re: Tup – A file-based build system for Linux, OS X, and Windows

#16
Tup's main problem is it's unusual, and it doesn't have a library of build rules. But it's fast!

On a related note, I've always wondered if it was possible to have a build system based on dynamic library injection / strace.

The idea would be that you just write your build rules in shell script. Then, you run it with a special shell that catches open(), etc. in child processes (via library injection, etc). These system calls get tracked, and stored in a special build table. One that you don't have to edit.

Then, when you want to run the build again, you just re-run the magic shell. It catches the various commands, and checks their inputs / outputs, and then skips running the command if the targets are up to date.

e.g.

  $(CC) -c foo.c -o foo.o
Hmm... "foo.o" is up to date with "foo.c", so I don't need to run the compiler. I just return "success!"

That would get rid of all magic build systems. All build syntax. All dependency ordering. The build system would just take care of it itself.

I've played with this before, enough to note that it's likely possible. But I haven't got far enough to publish it.

Re: Tup – A file-based build system for Linux, OS X, and Windows

#17
post #9
post #8

Earlier quoted context omitted.

> That said it still beats the crap out GNU Make How? Their description was useless in describing why it's "obviously" so much better.

> See the difference? The arrows go up. This makes it very fast. I don't think I've seen a more intelligence-insulting description of a product.

it's a joke...

Re: Tup – A file-based build system for Linux, OS X, and Windows

#20
post #9
post #8

Earlier quoted context omitted.

> That said it still beats the crap out GNU Make How? Their description was useless in describing why it's "obviously" so much better.

> See the difference? The arrows go up. This makes it very fast. I don't think I've seen a more intelligence-insulting description of a product.

Oh, you didn't read far enough; the description is written with a sense of humor, essentially parodying the very "intelligence-insulting descriptions" that one sees frequently on the internet.
Post reply on HN