Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Make?


Come on, be serious. If I wanted ancient sh-isms and bash-isms I would have learned make to 100% some 15 years ago.

I meant something ergonomic and easy to read and write.


> If I wanted ancient sh-isms and bash-isms

So don't, set make's shell to something else instead. It doesn't understand the recipes, it just dumps them to a file and runs $(SHELL) on them.

For a more extreme example, just to show what's possible:

   SHELL := python3
   
   .ONESHELL:
   
   foo.csv:
    import csv
    with open("$@", "w") as f:
        writer = csv.writer(f)
        writer.writerows([
            ['Test1', 'Test2'],
            ['Test3', 'Test4'],
        ])


I'm this years old when my life was revolutionized.


Not a bad idea, thanks. I did this a few times as well but when I analyzed the ROI I figured that just writing a simple-ish Golang program is just less confusing and more consistent in its totality when you ask yourself "do I really have to use Make and Python and, and, and...?".

So yeah, thanks for bringing visibility to this pretty decent compromising approach. It worked for me for a while but eventually I just went all-in to either use `just`, some _very_ short bash/zsh scripts, or jump all the way to Golang.


They are right, though, aren't they? I mean .. if you want something "modern", go ahead and learn Bazel. Make is quite a bit easier to learn, I'd say, and you don't need much (also no shell/bash) to express your DAG dependencies.


I'll agree on the DAG bit but I'll never use `make` again and I tried for no less than 10 years (on and off, not 24/7, otherwise I would have learned it long ago indeed).

I stay away from `make` almost religiously. Its complications _always_ find a way to creep into your file one day. Always. :(

So while they are technically correct and it's my fault for not saying I don't want `make` in the comment up-thread, I don't think my comment deserved the down arrows but oh well, I'll live through it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: