Live data from Hacker News

Make for hipsters

mattandre.ws

91–100 of 200 posts

Re: Make for hipsters

#91
post #75

Meanwhile, there’s a perfectly good introduction in the GNU Make manual: https://www.gnu.org/software/make/manual/make.html#Introduct... Also available in print: https://shop.fsf.org/books-docs/gnu-make-version-381

Unless your distro excludes the Texinfo docs, the same manual is probably also available locally:

    info make
GNU tools often use man pages for a quick reference of the options, return codes, etc. Unfortunately, as info(1) isn't as well known as man(1), it's easy to miss that many GNU tools have detailed manuals.

Re: Make for hipsters

#92
post #58
post #10

Do so many people who go on this site not know how to make makefiles? Also why is it for hipsters? Or is the article for hipsters? Why does the author call his own published notes factually inaccurate? Why is it hacky to use a makefile? Is this all a big ruse?

Unfortunately, many developers have a mortal fear of anything from before the year 2000. They've grown up with this tribal wisdom of unix and it's various tools being a beardy wilderness of byzantine hacks and toxic waste dumps. Meanwhile they'll merrily pile up a thousand node modules into a towering pillar of bad, just to run the equivalent of a shell one-liner, and call it a job well done.

I think Make is also broadly associated with autotools, which surely can't help its public image.

Re: Make for hipsters

#93

The single biggest piece of advice I can give for Make is to make sure your text editor uses real tabs in Makefiles. My personal preference for everything is spaces (mostly a habit learned from Python's PEP 8), but Make doesn't honour spaces for indentation - only tabs. Despite being an obvious usability hole, this has never been fixed. Exacerbating the issue is the poor error message given upon encountering a space-…

> Despite being an obvious usability hole, this has never been fixed. Well, which implementation of make should be fixed? The thing about these truly ubiquitous nix tools is that eventually people discover that there are unixes other than Linux. …that said, a quick google found that this is* fixed in GNU make; check the docs for .RECIPEPREFIX here: https://www.gnu.org/software/make/manual/html_node/Special-V...

[deleted]

Re: Make for hipsters

#94
post #34

Earlier quoted context omitted.

That was Java all over again. - you've got dependencies on some basic Unix commands (cp, rm etc.) in your tasks, so better rewrite that all to use your cross-platform language's facilities. - XML, erm, no, JSON, shall be your only file format.

> dependencies on coreutils Or just install that Ubuntu on Windows thingy and be done with it.

As soon as that becomes available outside the fast ring I will be spending a lot more time on Windows!

Re: Make for hipsters

#95
post #16

Earlier quoted context omitted.

I dunno. Maybe it's a reaction to the myriad build tools developed for Javascript recently. Could they have been done with makefiles instead?

I suppose so. But there are always many tools for everything. And everyone can select his favorite.

On Stackoverflow, I scan down the list of questions on the first page and all I see is a myriad of questions about tools I have no idea about and, therefore, cannot help with. Most of these questions have no, or one, answer; most of which aren't helpful.

So the problem with choice is the number of people who also know that tool who can help you.

Re: Make for hipsters

#96
In case anyone's curious, I've been using Makefiles for web development for a long time. The src files of a webpage are un-minified javascript, less/sass files, and thumbnails. The dst files are the minified/built/thumbnailed output. This suits Make particularly well.

https://gist.github.com/zx2c4/11de49b2780c787b3ed5e1ee394857...

That's the Makefile I use on https://www.edgesecurity.com/ if you're interested. It also has in it some very simple ssh/rsync deployment mechanism. Since the deployment relies on the built files, I can simply run:

    $ make deploy
And the entire webpage is built and deployed in one step.

Every webpage I manage has a variant of this, with all sorts of rules for building and managing things. It turns out to be much easier than grunt or ant or random bash scripts or vagrant or whatever else kids use these days.

Re: Make for hipsters

#97
post #77
post #58

Earlier quoted context omitted.

Unfortunately, many developers have a mortal fear of anything from before the year 2000. They've grown up with this tribal wisdom of unix and it's various tools being a beardy wilderness of byzantine hacks and toxic waste dumps. Meanwhile they'll merrily pile up a thousand node modules into a towering pillar of bad, just to run the equivalent of a shell one-liner, and call it a job well done.

There are far more developers who will jump on the latest new shiny with no good reason.

Which is why I don't pity them when they scream "Javascript fatigue!". Put down the shiny new tool and back away slowly: you might hurt yourself and others.

Re: Make for hipsters

#98

Answer me this, does anyone have a good cross-platform method of writing Make files? I guess with Windows now having bash, I can actually just target bash scripts?

CMake? Something about having to write a build system for my build system always makes me feel like I'm doing something wrong, though ;-)

Re: Make for hipsters

#99
post #34

Earlier quoted context omitted.

I dunno. Maybe it's a reaction to the myriad build tools developed for Javascript recently. Could they have been done with makefiles instead?

That was Java all over again. - you've got dependencies on some basic Unix commands (cp, rm etc.) in your tasks, so better rewrite that all to use your cross-platform language's facilities. - XML, erm, no, JSON, shall be your only file format.

Well in fairness Java does have the excuse that the cloud, and virtual images didn't exist and it was basically a Windows world. Linux/Unix was barely known to most developers.

Java also pretty much brought the idea of dependency management (Maven) to mainstream programming languages (although I guess you could argue some of the early Linux did as well (RPM)). It is sort of interesting how Make is sort of like local dependency management.

Re: Make for hipsters

#100
post #58
post #10

Do so many people who go on this site not know how to make makefiles? Also why is it for hipsters? Or is the article for hipsters? Why does the author call his own published notes factually inaccurate? Why is it hacky to use a makefile? Is this all a big ruse?

Unfortunately, many developers have a mortal fear of anything from before the year 2000. They've grown up with this tribal wisdom of unix and it's various tools being a beardy wilderness of byzantine hacks and toxic waste dumps. Meanwhile they'll merrily pile up a thousand node modules into a towering pillar of bad, just to run the equivalent of a shell one-liner, and call it a job well done.

> Unfortunately, many developers have a mortal fear of anything from before the year 2000. They've grown up with this tribal wisdom of unix and it's various tools being a beardy wilderness of byzantine hacks and toxic waste dumps.

Some stuff is genuinely awful.

- Sendmail was ubiquitous, but it was, according to anyone who'd had either fleeting or deep experience with it, a beardy wilderness of byzantine hacks and toxic waste dumps.

- All the WU apps had major exploits every few months.

- SysVinit sucked too, regardless of which replacement you prefer.

- RPM's macro-based .spec file format? Awful.

> pile up a thousand node modules to run the equivalent of a shell one-liner

If you don't like putting small modules together to achieve a task, I have some news for you about shell and Unix...

Post reply on HN