Live data from Hacker News

The Makefile I use with JavaScript projects

olioapps.com

61–70 of 525 posts

Re: The Makefile I use with JavaScript projects

#61
post #6

After going through a few build systems for Javascript, I realized they were all reinventing the wheel in one way or the other, and pulled out venerable Make from the closet. It turned out to be way more expressive and easy to read. One target to build (prod), another to run with fsevents doing auto-rebuild when a file is saved (instant gratification during dev), then a few targets for cleaup & housekeeping. All said…

Wow if you consider Makefiles easy to read...

Re: The Makefile I use with JavaScript projects

#62

Tangential, but I cringe everytime I see the word "transpiler". A compiler is a compiler is a compiler. Previous discussion on this: https://news.ycombinator.com/item?id=15154994

Do you also disapprove of the word "assembler"? (Honest question.)

Re: The Makefile I use with JavaScript projects

#64
post #23

Make's interface is horrible. Significant tabs. Syntax which relies on bizarre punctuation... If only whoever authored Make 40 years ago had had the design acumen of a Ken Thompson or a Dennis Ritchie! We're stuck with Make because of network effects. I wish that it could just become "lost" forever and a different dependency-based-programming build tool could replace it... but that's just wishful thinking. The pace o…

Make is such a horrifically awful thing to work with that I just end up using a regular scripting language for building. Why learn another language with all its eccentricities and footguns when I already know several others?

This is why I like redo; it handles all of the dependency stuff for you, but your build scripts are written in pure sh

Re: The Makefile I use with JavaScript projects

#65
post #6

After going through a few build systems for Javascript, I realized they were all reinventing the wheel in one way or the other, and pulled out venerable Make from the closet. It turned out to be way more expressive and easy to read. One target to build (prod), another to run with fsevents doing auto-rebuild when a file is saved (instant gratification during dev), then a few targets for cleaup & housekeeping. All said…

Wow if you consider Makefiles easy to read...

I’ve written about Makefiles for the web before, you can’t say they can’t be readable: http://blog.gnclmorais.com/makefiles-are-for-the-web

Re: The Makefile I use with JavaScript projects

#66
post #6

After going through a few build systems for Javascript, I realized they were all reinventing the wheel in one way or the other, and pulled out venerable Make from the closet. It turned out to be way more expressive and easy to read. One target to build (prod), another to run with fsevents doing auto-rebuild when a file is saved (instant gratification during dev), then a few targets for cleaup & housekeeping. All said…

Wow if you consider Makefiles easy to read...

Simple makefiles couldn't be more simple.

    task: dependency
        list of
        commands

That's about as easy as it gets.

Re: The Makefile I use with JavaScript projects

#67

Earlier quoted context omitted.

Personally, I think of transpilation as a subset of compilation. So a transpiler is also a compiler, and a compiler that has a readable language backend can do transpilation, which is a type of compilation.

u/masklinn still asks a good question though: there are tools that act on the source code for both "compilation" and "transpilation" (eg Kotlin), depending on the target platform. They do not distinguish, why should we?

For the same reasons you might ever want a more specific term?

What about assemblers or disassemblers? Given a suitably broad definition of compiler that includes transpilers, are they not also included? Wouldn't the same arguments apply?

Re: The Makefile I use with JavaScript projects

#68
post #23

Make's interface is horrible. Significant tabs. Syntax which relies on bizarre punctuation... If only whoever authored Make 40 years ago had had the design acumen of a Ken Thompson or a Dennis Ritchie! We're stuck with Make because of network effects. I wish that it could just become "lost" forever and a different dependency-based-programming build tool could replace it... but that's just wishful thinking. The pace o…

[deleted]

Re: The Makefile I use with JavaScript projects

#69
post #64

Earlier quoted context omitted.

Make is such a horrifically awful thing to work with that I just end up using a regular scripting language for building. Why learn another language with all its eccentricities and footguns when I already know several others?

This is why I like redo; it handles all of the dependency stuff for you, but your build scripts are written in pure sh

always been curious about redo. which variant do you use, and what do you use it for?

Re: The Makefile I use with JavaScript projects

#70

Earlier quoted context omitted.

It's not like C is famous for having particularly good syntax. If anything, it's the worst thing about it.

They must have got something good though. Else why would there entire families of C-like languages ? Plus, to me C syntax is particularly good. You're writing real words and the computers does the things you tell it to. To the letter.

The nice thing about C is that it's a great cross-platform assembly language. I wouldn't call its syntax good or bad.
Post reply on HN