Live data from Hacker News

The Makefile I use with JavaScript projects

olioapps.com

281–290 of 525 posts

Re: The Makefile I use with JavaScript projects

#281
post #185

Earlier quoted context omitted.

> everything is—symbolically—a file How are you going to make the result of a join in a relational database into a file, symbolically or otherwise?

you could mount the database as a filesystem

With respect to Make, does the database (mounted as a filesystem) retain accurate information that Make needs to operate as designed (primarily the timestamps). To what level of granularity is this data present within the database, and what is the performance of the database accessed in this way? Will it tell you that the table was updated at 08:40:33.7777, or will it tell you only that the whole database was altered at a specific time?

Re: The Makefile I use with JavaScript projects

#282
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…

I'm really glad software development has largely moved away from the terse names and symbols that used to be so common. I mean patsubst? What a terrible function name! At the very least I would have added the 'h' in path.

Re: The Makefile I use with JavaScript projects

#283

I used make heavily in the 80s and 90s, but haven't much since then. Recently I started a project that had source files getting processed into PDF files, for use by humans. Since this is the 21st century, those files have spaces in their names. At a certain point, I realized that I should be managing this processing somehow, so I thought of using a simple Makefile. A little searching reveals that the consensus on usi…

Demanding the support of spaces in filenames significantly complicates code as simple space delimination no longer works and other delimination schemes are much more error prone -- forgetting balancing quotes, any one? While you are allowing spaces, you probabaly are allowing all possible code points or maybe even a null byte? Thinking about it gives me headaches. I hate hearing people using 21st century or modern as…

You solution is a “boil the oceans” one typically proposed by engineers. You can re-program computers. You can’t re-program millions of people. Every natural language uses spaces to separate things.

You can accept that or you can keep tilting at windmills.

In every branch of science, reality wins. If your model can’t accomodate reality it’s either completely wrong or it needs adjustments, at least.

Re: The Makefile I use with JavaScript projects

#284

Earlier quoted context omitted.

What does the merit of spaces in file names matter? You still will need to deal with files with spaces in the real world. If your tooling doesn't support it, it's a non-starter for many.

What about real world is that in real world, it is not context-free. There are real world situations -- such as selling a word processor to general public (especially) including clueless -- you need to deal with files with spaces, period. But there are real world situations -- such as Makefiles -- requires users to learn the tool, to be able to handle certain tricky situations themselves and excludes incompetents. An…

You’re trying to “sell” make. It is lacking a feature many of its competitors have. That’s a tough sell :)

Re: The Makefile I use with JavaScript projects

#285

Earlier quoted context omitted.

Yeah. There is a metric crap-ton of the design of Make that is solely for the purpose of compiling and linking and document processing. That's actually part of what makes it annoying to use it for projects other than C or C++, when you don't need to compile or transform or depend on different formats.

The core of make is really just a control flow model that understands file dependencies as a first class thing, and permits arbitrary user supplied actions to be specified to update those files. All those default rules around how to handle C files are really more like a standard library and can be easily overridden as desired. IMHO what makes it annoying for projects other than C or C++ is that there isn't an equival…

The thing about Java is that it has its own dependency system embedded in the compiler. This design decision made it difficult to integrate with a tool like make.

Re: The Makefile I use with JavaScript projects

#286
post #241

Earlier quoted context omitted.

I'm bemused by this repeated insistence that supporting spaces in file names is somehow difficult.

The word was complicated, not difficult. It is not difficult to handle spaces, it is more complicated.

That's a worthwhile clarification - thank you. While that's certainly true in the strict sense, I remain bemused.

Re: The Makefile I use with JavaScript projects

#287
post #26

Anyone here uses makefiles for anything other than compilation and build? One can use it to add some level of concurrency to shell scripts.

Anything that gets automated, and can also be shortcutted depending on how much of it has been cached already. That really is the beauty of Make to me - it's very easy to express what parts of a job need and need not be done, because the last run produced a state that was good enough to use again.

I once built a World of Warcraft addon downloader & manager (including patching) with Make. My friends thought I was insane. Personally, I wondered how else you'd do it :-)

(actually, looking back at it, I apparently built it on plan9's mk (https://9fans.github.io/plan9port/man/man1/mk.html), but it's close enough)

Re: The Makefile I use with JavaScript projects

#288

Earlier quoted context omitted.

Which is not a problem. The command line was only one, historical UI. Not the be-all end-all of UIs, and there's no reason it should be of any real interest to modern desktop users (non devs). And I cut my teeth as a developer on DOS, Sun OS (pre-Solaris), and HP-UX, and early Linux back in the day.

Almost every CLI program I've ever used in Windows has no problem with spaces in filenames, so I don't exactly why he's fixated on the GUI... But I had forgotten, computers aren't useful as tools to accomplish work, but as mechanisms to assuage intellectual inferiority complexes. He should advocate for punch cards again, since that would certainly stop morons from using computers.

Window and Linux shells have the same ideas about spaces in file names, which is that if they appear they need to be quoted or the space character needs to be escaped.

Outside of Make which has long and boring historical reasons for not supporting spaces well, just about every program is fine with spaces.

Re: The Makefile I use with JavaScript projects

#289
post #128

Earlier quoted context omitted.

> path normalization and bintools selection issues on windows make was never intended to be a cross-platform tool. If you face problems using it on Windows, then that's on you.

That is, unless the folks who maintain and champion make want me to use make. It's on them to court me, the cross-platform developer, not the other way around.

Again, if you're a cross-platform developer, make is not for you. Do you also expect zsh enthusiasts to court Windows devs?

Re: The Makefile I use with JavaScript projects

#290
post #106

Earlier quoted context omitted.

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.

> Else why would there entire families of C-like languages ? C became popular because Unix became popular, and when designing a language that intends to become popular one aims for a ratio of 10% novelty and 90% familiarity. Like, ever wonder why Javascript's date format numbers the months starting from zero and the days starting from one? It's because Eich was told to make JS as much like Java as he could, and java.…

To be fair with myself I was mostly snarking around op comment who dismissed the C language as if it was some ancient relic.

But even without accounting for compiler optimizations and cpu architecture, the C language just straight up lies to its user. You could code something entirely with void*.

PS: what I meant by "real words" is that you're naming functions and calling them by their name. Which in itself is very powerful.

Post reply on HN