Hacker News new | past | comments | ask | show | jobs | submit | amirbehzad's comments login

What simple tool would you suggest to address those .PHONY-targets instead of a Makefile?


I recommend using plain shell scripts. Each .PHONY target is a simple shell function, and then the last line of the script is "$@", which means run function $1 with parameters $2 to $n.

So instead of 'make test', I just use './test.sh all', or './test.sh foo'. The test script can invoke make.

The idea is that 'dataflow' parts are done in Make, and the imperative parts are done in shell. This works out fairly well if you're disciplined about it. The only point of Makefiles is to support quick incremental builds. If there's no incrementality, then you might as well use shell. (Note: whenever you use Make, you're using shell by definition. There's no possibility of only using Make. So I take Make out of the picture where it's not necessary.)

For example, all the instructions here are of the form 'foo.sh ACTION':

https://github.com/oilshell/oil/wiki/Contributing

Pretty much every shell script in the repo uses "the argv dispatch pattern"... I've been meaning to write a blog post about that pattern, i.e. using functions with the last line as "$@".

https://github.com/oilshell/oil


Wow, I never knew about "$@" that's a super handy tip. Now I just need an excuse to write a shell script :)


you wrote: >> This comment shows how little people really understand about the business model of credit card companies and their relationships with merchant banks.

thanks for enlightening the world


It is.


It's JavaScript ruining the world


It's not a business transaction to make profit. Nothing is exported to benefit citizens of these countries, rather they're donating their resources.


You don't reply to emails


Hi Amirbehzad, Many apologies, it looks like I missed that one from you. I will reply to you today. I blame a busy inbox :)


JonnyB_Amazon responds on time! I can vouch for that. :)


Oh yeah? Thanks for your only comment after 1,861 days in HN.

This recruiter ignored me last month completely. He only responded until I posted this public comment on HN. He sent me a coding test, which I completed successfully as reported by the online testing platform. Few days passed without any feedback, so I sent him another email to remind him, and he replied with copypasta that I'm rejected.

He treats candidates with some sort of bias, rather than their skills. Don't waste your time.


I don't know, man. I did not have the same experience as you


Germany loves you, too


It doesn't support Unicode. It's too dumb.


Same story here. I got admitted to Georgia Tech MSCS, and now I have to forget about it.


God forbid.


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

Search: