4 ms·
I'm using ruby's rake in almost every project, even when it's not ruby otherwise. It has much of the same functionality, but I already know (and love) ruby, wh
by matt4077 9y ago
I'm using ruby's rake in almost every project, even when it's not ruby otherwise.
It has much of the same functionality, but I already know (and love) ruby, whereas make comes with its own syntax that isn't useful anywhere else.
You can easily create workflows, and get parallelism and caching of intermediate results for free. Even if you're not using ruby and/or rails, it's almost no work to still throw together the data model and use it for data administration as well (although the file-based semantics unfortunately do not extend to the database, something I've been meaning to try to implement).
Lately, I've been using it for machine learning data pipelines: spidering, image resizing, backups, data cleanup etc.
- bjpbakker 9y ago> It has much of the same functionality You could use both to accomplish the same thing, sure. But their concepts are quite different. Rake works on tasks, which you define (or import from some gem). Make works with file targets more than tasks. You define how it can make a certain (type of) file and it does the job. Personally I mostly use Make if I want to generate files from something else. Otherwise I find small scripts easier than Rake or equivalent.
- steinuil 9y agoActually, Rake has both. You can define file targets using "file", but I found that for smaller projects it just becomes a more verbose make.
- bjpbakker 9y agoTrue, Rake also has file tasks. There still are tasks and not much like file targets in Make.
- shoo 9y agoi think Rake is one of the various newer re-implementations of make that more or less miss the point of what is good about make. make is pretty neat if you think about it as a framework to help you compute/derive values from other values. each value happens to be stored in the filesystem as a file. in contrast, many of the newer build-tool make replacements seem to miss the whole value of values and either push or force you in a direction of doing actions with side effects.
- matt4077 9y agoThey are pretty much the same: file 'blogpost.html' # we want to produce blogpost.html # this rule specifies how to build # any .html from the source rule ".html" => ".md" do |t| sh "pandoc -o #{t.name} #{t.source}" end