4 ms·
Ah, build tools... I dream of a day when they are not needed anymore... they are supposed to be the "dynamic part" of statically typed language, but even dynami
by aikah 12y ago
Ah, build tools... I dream of a day when they are not needed anymore... they are supposed to be the "dynamic part" of statically typed language, but even dynamically typed ones somehow manage to need them (nodejs...)
If there is a problem to solve in development it's definitely that one...
- kentonv 12y agoBuild tools and programming languages are a trap. Many (most?) good developers at some point decide that they're fed up with their tools and want to build their own. If you prefix `make` with any letter of the alphabet and Google it, you'll find someone's toy (or, occasionally, deployed) build tool project. But most of this effort is a huge waste. I personally have now designed two languages (including three separate iterations of one of them) and three build tools. I say that with shame, not pride. In my defense, Ekam was at the time I wrote it just a fun weekend project. I wouldn't have done it while on the clock for anything important. :) And then having written it, it turned out to be useful enough that I kept using it. ::shrug::
- jb55 12y agonix is starting to replace all my build tools, building c code is as easy as putting together a small nix file like this: https://github.com/jb55/polyadvent/blob/master/default.nix https://github.com/jb55/polyadvent/blob/master/default.nix The nixpkgs community is then responsible for making sure that the build compiles on all platforms. It's not just for C code either, nix files can be used to declare any kind of dependency. It's a full blown declarative, functional, domain specific programming language for packages. So your project can depend on haskell or python code and everything just works. There's a heavy linux focus right now but there's a whole group of people making the packages work nicely on osx and cygwin. Check it out: http://nixos.org/nix/ http://nixos.org/nix/
- kentonv 12y agoNix is neat, but doesn't that nix file depend on a Makefile being present? This doesn't seem to replace make...
- jb55 12y agoI don't think we need another build system, what we really want is a package manager that knows how to fetch and build dependencies and gets out of your way. This is why people like npm. This is why nix is awesome.
- lmz 12y agoBut it still looks like you have a Makefile (although a rather simple one). Are you relying on nix to install the "build-depends" for your app?
- jb55 12y agoYup, it works in conjunction with other build tools. nix knows how to build make projects, cmake projects, cabal, etc. This is what allows you to depend on pretty much anything. Then I just use nix-build and it will build all the dependencies in a virtual environment and symlink the result when its finished.