News for hackers. Stuff that matters.
Re:Make for hipsters by s_kilk on Monday June 20, 2016 @05:18AM (#11936965)
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.

Re:Make for hipsters by gerbilly on Monday June 20, 2016 @09:19AM (#11937784)
I think it also has to do with the stackoverflow effect.

Tools that gain traction today are those that can be learned incrementally by doing a google search and copy pasting a solution, one problem at a time.

Out are all those systems that have an underlying theory to them that has to be mastered first. As pointed out elsewhere, there is a perfectly good manual for make[1] that you can read.

My theory is that it has to do with shortened attention spans, and impatience perhaps bred by constant use of technologies with short stimulus response cycles [2].

[1] https://www.gnu.org/software/make/manual/make.html#Introduct... [2] Cellphones.

Re:Make for hipsters by spinlock on Monday June 20, 2016 @01:06PM (#11939358)
this is an interesting thought. the Linux Documentation Project was full of full length books on every aspect of administering a Linux system. I printed out many of them, put them in a spiral binder and they lived on my bookshelf next to my O'Riely collection.

Now, I've only got one book on my desk and it's more of a coffee-table thing about html and css

Re:Make for hipsters by nailer on Monday June 20, 2016 @08:42AM (#11937564)
> 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...

Re:Make for hipsters by coldtea on Monday June 20, 2016 @09:33AM (#11937890)
>If you don't like putting small modules together to achieve a task, I have some news for you about shell and Unix...

No, really. The "UNIX way" is not just "Use tons of small things to do a simple task, complexity of managing them be damned".

It is indeed "do one thing and do it well", but that "thing" is usually high level enough and ready to go -- not something you need a whole stack of dependencies, configuration, and lots of extra glue to use.

And of course those unix tools should be standard and evergreen -- not like npm module du jour that gets abandoned 2-3 years later or completely rewritten.

Re:Make for hipsters by nailer on Monday June 20, 2016 @01:18PM (#11939453)
Totally agreed, that's why most npm modules are focused on specific tasks, and we use github and npm to track how active projects are before installing them.

It really seems like you don't do a lot of node - which is fine obviously, but you seem to have very strong opinions about it.

Re:Make for hipsters by coldtea on Monday June 20, 2016 @01:58PM (#11939797)
>It really seems like you don't do a lot of node - which is fine obviously, but you seem to have very strong opinions about it.

The first part of this is a guess -- and it's wrong.

I can't speak for "most npm modules" (there are 200.000 or so -- i've only used around 1000, transitive dependencies included) but even those focused on specific high level tasks tend to depend on tons of lower level modules of varying utility and quality -- living them open to things like the "leftpad" fiasco.

And using "github and npm to track how active projects are before installing them" is not really an answer to the UNIX way described.

First because with UNIX you don't even need to check. You know all the basic tools, from grep and unique, to watch and make, are there for the long term (and have been for 3, 4 decades).

Second, because with npm, even checking for popularity doesn't tell you much. Even the most popular modules can be dropped by their authors, rewritten in just 1-2 years to behave differently, fall out of favor and languish etc. Heck that's true even for npm itself (e.g. the changes for version 3, like the flat sub-packages), gulp (see the way the new gulp handles dependent tasks and the new syntax required) and everything else.

Heck, 6 years ago Backbone was merely just released. And from then on we already went from it being most used and "hot", to Angular, React, React+Redux and who knows what's next.

Re:Make for hipsters by nailer on Monday June 20, 2016 @02:24PM (#11940034)
> and it's wrong.

Fair enough. Just saying that's the impression I get.

> even those focused on specific high level tasks tend to depend on tons of lower level modules

Yes. Good libraries do that. Smaller bits are made from bigger bits.

> living them open to things like the "leftpad" fiasco

I don't think you understand what the "leftpad fiasco" was. Small modules doesn't have anything to do with it - people who unpublish their modules on a whim does. And that's not been prevented.

> And using "github and npm to track how active projects are before installing them" is not really an answer to the UNIX way described.

Indeed. It's an answer to your concern about "npm module du jour that gets abandoned 2-3 years later or completely rewritten".

I'm not sure that npm, gulp changing significantly is a bad thing. Good software evolves over times. As long as the changes are clearly communicated I'm 100% down with that. Look how much better express got!

Re:Make for hipsters by coldtea on Monday June 20, 2016 @02:57PM (#11940367)
>Yes. Good libraries do that. Smaller bits are made from bigger bits.

I think there's a marginal returns (or worse negative returns) border with this approach, where the overhead, over-generalization, and, finally, bloat, maintenance and management issues stemming from having too many small parts from disparate sources justify writing a specialized solution.

Leftpad would be an extreme case in point -- I'd put the bar even higher than that.

>Small modules doesn't have anything to do with it - people who unpublish their modules on a whim does. And that's not been prevented.

The "unpublish" thing just made the issue instantly apparent, but the core issue would still be there even if nobody could ever unpublish anything.

E.g. such small modules could get abandoned and neglected with bugs or security issues, could have extra bloat the parent library doesn't need (this might not hold with leftpad but would be true for anything a little larger that covers 10 things when you only need 2 and could code them yourself and be done with it), is now a dependency that has to be tracked and updated, it's not optimized for the particular use case it is used in, etc.

Re:Make for hipsters by nailer on Monday June 20, 2016 @03:09PM (#11940479)
> E.g. such small modules could get abandoned and neglected with bugs or security issues

How well do you think a module with 1000 users is likely to be maintained, vs a create-your-own-wheel equivalent?

Do you think writing the latter is an adequate use of your time?

Do you think you'll discover all the edge cases?

How does writing your own wheel module rank when compared to working on features your customers want?

Re:Make for hipsters by irishcoffee on Monday June 20, 2016 @10:02AM (#11938064)
Respectfully:

> - SysVinit sucked too, regardless of which replacement you prefer. > - RPM's macro-based .spec file format? Awful.

These are opinions, which is valid.

If you want to have some fun. install centos7 in a vm. Run yum update systemd. Reboot. Your vm is now bricked.

Rpm spec files can be annoying, but what is more annoying to me is the spec behavior changing between rhel/centos 5, 6 and 7.

Re:Make for hipsters by digi_owl on Monday June 20, 2016 @12:33PM (#11939114)
> If you want to have some fun. install centos7 in a vm. Run yum update systemd. Reboot. Your vm is now bricked.

Yeiks.

Re:Make for hipsters by khedoros on Monday June 20, 2016 @12:45PM (#11939206)
I like SysV-style init systems. I also don't mind RPM .spec files. They've always let me get the job done.
Re:Make for hipsters by snuxoll on Monday June 20, 2016 @02:05PM (#11939857)
I hated SysV init, because writing init scripts is a chore - especially since you have little to no choice but to implement the detach/fork strategy to get a daemon to work properly without resorting to things like supervisord, etc. As much flak as systemd gets for trying to do too many tasks, I really find it a much better solution to `init`.

With that said, I agree about rpmspec's. They're simple to read and easy to maintain, it's part of the reason I chose CentOS and Fedora as our standard at work instead of Debian or Ubuntu.

Re:Make for hipsters by khedoros on Monday June 20, 2016 @02:50PM (#11940292)
I certainly can't disagree about the SysV boilerplate, but I also haven't written more than 5 or 6 of those init scripts in the last decade, so it's never seemed bad enough to me to ditch it for something completely different.

In my current day-to-day, between work machines and my personal machines at home, I've only got to deal with init stuff occasionally, so picking up the Systemd way of doing things will take me a while.

Re:Make for hipsters by WayneBro on Monday June 20, 2016 @11:40AM (#11938706)
Please show me the makefile for your Javascript project that will run perfectly on Linux, Windows and Mac with little to no setup.

I doubt it exists. Until then, I'll stick with my Node.js build tools, thank you very much.

Honestly, if anyone has an example of a makefile that can bundle my scripts, insert bundle links into my HTML which is compiled from jade and nunjucks templates, minify the JS, CSS and HTML and optimize my images...I'd love to see that.

Re:Make for hipsters by spinlock on Monday June 20, 2016 @01:02PM (#11939335)
I can't even get `npm install` to run perfectly on my mac. It _always_ fails and needs to be re-run a few times to get everything installed.

Anyway, the point is, everyone likes the smell of their own farts. But, they still stink.

Re:Make for hipsters by Someone on Monday June 20, 2016 @01:42PM (#11939659)
"Please show me the makefile for your Javascript project that will run perfectly on Linux, Windows and Mac with little to no setup."

One can argue that it would be better to solve that problem, rather than requiring everybody to sort-of solve it well enough to run one's own build.

Having said that, minimizing .js, .css, .html or .png files conceptually is the same as turning a .c into a .o, and bundling is conceptually the same as tarring or zipping a set of files, so I don't see why it wouldn't be possible to write a makefile that does that.

Re:Make for hipsters by ori_b on Monday June 20, 2016 @01:28PM (#11939529)
I tend not to do much with Javascript, but if you have a project that I can take a shot at converting, I'd be curious to see what trouble you're running into.

Windows is the only real challenge there, but with mingw, I can't imagine that it's a serious one.

Re:Make for hipsters by nwmcsween on Monday June 20, 2016 @04:01PM (#11940983)
Sure github.com/nwmcsween/asm.css/Makefile
Re:Make for hipsters by WayneBro on Wednesday June 22, 2016 @11:13AM (#11954553)
"that will run perfectly on Linux, Windows and Mac with little to no setup"? No.

I see no reason at all to use a Makefile in that project other than it being your personal preference. It's completely non-standard for web projects and it will only serve to confuse and annoy the next developer who wants to work on your code.

Node.js, NPM, Gulp and Grunt are all orders of magnitude easier to get running on a wide variety of operating systems than your typical C/C++ build tools. Furthermore, you don't have to learn some cryptic syntax to use them. It's all Javascript and JSON.

Re:Make for hipsters by nwmcsween on Wednesday June 22, 2016 @01:31PM (#11955575)
Because gulp, grunt are not real build systems, they are glorified scripts that do whatever, there is no tracking of dependencies, nothing. Make isn't a cryptic syntax it's a quite simple language that took me about a day to understand fully.
Re:Make for hipsters by WayneBro on Tuesday June 28, 2016 @10:46AM (#11994176)
Incorrect. Gulp and grunt can track dependencies the same way you do anything else with it...just add the right plugin.

Saying that gulp/grunt aren't real build systems because of one feature that you actually missed anyway is like saying that Javascript isn't a real programming language because it doesn't compile to assembly.

Practically nobody uses Make for JS outside of a few misguided folks. There are good reasons for that. One of them is that Make's craptic language is useless outside of that one single task. Another one is that Make sucks at cross-platform. It forces you to use OS tools that don't exist on every OS. Meanwhile, Node.js tools work everywhere.

Re:Make for hipsters by collyw on Monday June 20, 2016 @06:37AM (#11937172)
There are far more developers who will jump on the latest new shiny with no good reason.
Re:Make for hipsters by sangnoir on Monday June 20, 2016 @08:27AM (#11937506)
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 by nemild on Monday June 20, 2016 @10:09AM (#11938109)
I think they don't know better - as any relatively new web-ish dev has grown up in a server-side javascript ecosystem that's maturing rapidly in the last 6-7 years, and so has led to a lot of churn (frontend frameworks, js build systems).

Separately, on the information side, there just aren't as many articles on old, but stable technology - and so if you open up HN, all they're seeing is the latest; if your team doesn't have good experienced devs on it and if you haven't learnt it in college/bootcamp then you'll pick what is publicized.

Re:Make for hipsters by JdeBP on Monday June 20, 2016 @05:18PM (#11941663)
In counterpoint, remember that there was a time when some of the things mentioned on this page, such as autotools, were themselves the "latest new shiny".
Re:Make for hipsters by philh on Monday June 20, 2016 @07:41AM (#11937361)
I think Make is also broadly associated with autotools, which surely can't help its public image.
Re:Make for hipsters by gkya on Monday June 20, 2016 @09:20AM (#11937796)
Autotools is smoking shit, but the make man page is a few pages and very comprehensive. Also the includable make libs that come with bmake allows many makefiles to be a few or one lines. Also, the best makefile I've ever seen is that of Linux, if someone considers to use make, must see that to convince himself, yes, it is possible to write a comprehensible, cross-platform and editable makefile for a big, deep project with configurables w/o the atrocious madness that is gnu autotools.
Re:Make for hipsters by snuxoll on Monday June 20, 2016 @02:07PM (#11939872)
The concept of autotools is fine for the most part, it's just M4 that has a really bad rap (and rightfully so, it's a huge pain in the butt!). I have a couple toy vala and C++ projects I've written and autotools "just works" without much effort, but when I've needed to do something outside of the standard functionality the need to write M4 macros makes me quickly switch it out for CMake instead.
Re:Make for hipsters by gkya on Monday June 20, 2016 @04:20PM (#11941194)
The problem with autotools is that it is an abstraction over a thing that's already simple and easy at it's heart, resulting in ultimately something more complex than it should've (and would've) been.

M4 is nice for processing text, I do use it and like it for that, but for defining dependencies among files and processes to go from source to compiled files, make itself is second to none. Autotools is basically one of the biggest exaggerations in the computers' history.

Furthermore, bmake exists and its include files are simply better.

Re:Make for hipsters by draw_down on Monday June 20, 2016 @11:34AM (#11938663)
By the same token, old shit isn't good by dint of its age.