Earlier quoted context omitted.
> newspeak you seem to imply we should all be applying to our lives. http://foldoc.org/transpiler ^ no match. transpiler is the newspeak.
The original C++ is probably the most famous 'transpiler' https://en.wikipedia.org/wiki/Cfront http://www.softwarepreservation.org/projects/c_plus_plus/cfr... ohey, noone calls it a 'transpiler'. I'm not so angry about the word transpiler; perhaps it might improve things.. but to imply that using compiler as a common term for all things here is a regression/neologism is patently wrong - transpiler is the newcomer.
The Makefile I use with JavaScript projects
151–160 of 525 posts
Re: The Makefile I use with JavaScript projects
#152Earlier 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.
To cut to the chase:
* syntax = structure
* semantics = meaning
C syntax would include things like curly braces and semicolons, whereas C semantics would include things like the functionality of the reserved keywords.
This SO answer gives a more detailed explanation:
Re: The Makefile I use with JavaScript projects
#153Earlier quoted context omitted.
Every popular text editor handles this already. People manage make, python and other whitespace-specified languages just fine.
They don't though. Vanilla Vim/Vi doesn't for instance. Regardless of whether the editor can or not, I just don't see how insisting on tab and not space is remotely defensible.
> remotely defensible
Feel free to write your own make superset that supports spaces. It's an irrelevant factor to the usability of make as a whole.
Re: The Makefile I use with JavaScript projects
#154Make'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?
Re: The Makefile I use with JavaScript projects
#155Earlier quoted context omitted.
That doesn't work for me. Tried with empty Makefile, no Makefile, with make (PMake) and gmake (GNU Make).
Don't know why that would be. I'm using GNU Make 4.1, but this has worked for years and years as far as I knew. Not a particularly useful feature, so I it doesn't really matter, but you messed up my fun fact. dima@fatty:/tmp$ mkdir dir dima@fatty:/tmp$ cd dir dima@fatty:/tmp/dir$ touch foo.c dima@fatty:/tmp/dir$ make -n foo cc foo.c -o foo dima@fatty:/tmp/dir$ make --version GNU Make 4.1 Built for x86_64-pc-linux-gnu…
Re: The Makefile I use with JavaScript projects
#156Tangential, 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
Meh: Compiler: collects sources from various places, assembles the result into machine code. Transpiler: collects sources from various places, converts the source to another language. Personally I cringe at the newspeak you seem to imply we should all be applying to our lives. These words mean things - quite different things, it turns out. There's a difference between human-readable source code language, and machine-…
Re: The Makefile I use with JavaScript projects
#157Earlier quoted context omitted.
Every popular text editor handles this already. People manage make, python and other whitespace-specified languages just fine.
They don't though. Vanilla Vim/Vi doesn't for instance. Regardless of whether the editor can or not, I just don't see how insisting on tab and not space is remotely defensible.
Vim does handle this. Here is Vim (and I've removed my .vimrc file, so this is not a setting I have set personally), on a Makefile where the third line erroneously uses spaces:
https://i.imgur.com/xMHXeL4.png
> I just don't see how insisting on tab and not space is remotely defensible.
This is like insisting that people haven't been having religious wars over this sort topic for years. You can see the Wiki[1] page on it (which starts "This is one of the eternal Holy Wars") for arguments as to why someone might prefer tabs. I personally like them because they allow the reader of the code to choose the visual layout of the indentation.
Now, while I love tabs, I work in Python all day. But good editors, like Vim, allow you to customize the indentation settings sufficiently to handle both cases like Python (spaces for indent) and Makefile (tabs) gracefully. So "Indent" and "Dedent" just do The Right Thing™ and it mostly never matters.
Re: The Makefile I use with JavaScript projects
#158I think the reason make is both so controversial and also long-lived is that despite how everyone thinks of it, it isn't really a build tool. It actually doesn't know anything at all about how to build C, C++, or any other kind of code. (I know this is obvious to those of us that know make, but I often get the impression that a lot of people think of make as gradle or maven for C, which it really isn't.) It's really…
That's true.
> and the UX for that is actually pretty close to what you would want.
That is so not true. Make has deeply woven into it the assumption that the product of workflows are files, and that the way you can tell the state of a file is by its last modification date. That's often true for builds (which is why make works reasonably well for builds), but often not true for other kinds of workflows.
But regardless of that, a tool that makes a semantic distinction between tabs and spaces is NEVER the UX you want unless you're a masochist.
Re: The Makefile I use with JavaScript projects
#159Earlier quoted context omitted.
Fun fact: your Makefile above is redundant. You can delete it entirely, and the implicit rules you're using here continue to work just fine.
That doesn't work for me. Tried with empty Makefile, no Makefile, with make (PMake) and gmake (GNU Make).
Re: The Makefile I use with JavaScript projects
#160One thing I've found useful about gulp and webpack is the fact that it's multiplatform. What is the best approach to make sure your Makefile will work as expected on every platform, meaning, windows included? For example: Can we write file paths using forward-slashes, or is it still an issue? I imagine running it via git bash (bash provided by the git installer on windows).