Earlier quoted context omitted.
> A row in a relational database, for example, is not a file, even in unix. Says who? Nothing stops you from creating an interface that maps that row to a file. That's the whole point of Unix. Heck, look at the /proc filesystem tree. Even cpu sensor data is available as a file.
Ha, even eth0 is a file! You can open a network connection by opening this file! Erm... no, that doesn't work. Then a process! You spawn a process by opening a file! Erm... again, no. You want me to continue?
The Makefile I use with JavaScript projects
481–490 of 525 posts
Re: The Makefile I use with JavaScript projects
#482Earlier quoted context omitted.
> Meanwhile over in Windows land, all tools have been expected to deal with spaces in them for what is approaching 20 years. That is an excellent example that deserves a second look from a different aspect. ... it has trained a crop of computer users that are afraid of command lines and with an attitude of anything beneath the GUI interface is owned by and of someone else's problem. They are scared of computers more…
> it has trained a crop of computer users that are afraid of command lines and with an attitude of anything beneath the GUI interface is owned by and of someone else's problem. There is nothing beneath the Windows UI interface. The GUI is the primary subsystem of Windows, the command line is a separate subsystem. Windows has traditionally been built up around the Win32 API, which is GUI first. It is of course possibl…
Yes there is .. Microsoft! For instance if you have a dir named "user" it will show up in your GUI as "User". In fact User, USER, user are all the same for you because MS transliterate on the fly. Did you know that you cannot access some directory because MS prevent it .. event with the 'dir' command from the DOS prompt .. only an 'ls' non-MS command can do that.
Re: The Makefile I use with JavaScript projects
#483Earlier quoted context omitted.
Spaces in filenames create troubles with almost every command line tool. cut(1), awk(1), find(1), xargs(1), what not. How do you quote them, do you need to use \0 as a separator instead, do other commands on the pipeline support \0 separators? What happens after a couple expansions, passing stuff from one script to another? And what the heck happened on 31 dec 1999 that the world became a different place where sudden…
> Spaces in filenames create troubles with almost every command line tool Then that's a shortcoming which should be addressed with the tools, because humans everywhere use spaces in filenames. For every command-line tool I make (Windows & Linux), I ensure it handles such trivial use-cases. I can't see why such a simple task is seemingly impossible to get done in GNU coreutils.
Re: The Makefile I use with JavaScript projects
#484Earlier quoted context omitted.
In that case, it doesn't help much. For Plan 9 mk, there's a way to use a custom condition to decide if the action should be executed: rule:P check_query.rc: prereq rules doaction Where check_query may be a small shell script: #!/bin/rc # redirect stdin/stdout to /mnt/sql/ctl /mnt/sql/ctl { # send the query to the DB echo query # print the response, check it for # your condition. cat `{sed 1q} | awk '$2 != "condition…
> You'd have to do something like: That's exactly right, but notice that you are not actually using make at all any more at this point, except as a vehicle to run check_query.sh && doaction which is doing all work.
Re: The Makefile I use with JavaScript projects
#485Earlier quoted context omitted.
> You'd have to do something like: That's exactly right, but notice that you are not actually using make at all any more at this point, except as a vehicle to run check_query.sh && doaction which is doing all work.
It's being used to manage the ordering of that with other rules, and to run independent steps in parallel.
1. An email gets sent to a user
2. If there is no reply within a certain time frame, the email gets sent again
3. The above is repeated 3 times. If there is still no reply, a separate notification is sent to an admin account.
That is a common scenario, and trivial to implement as code. Show me how make would help here.
Re: The Makefile I use with JavaScript projects
#486Earlier quoted context omitted.
I don't run into those too often. When I do, there are two cases: 1) All dependencies are on only one output file (e.g. link stages that generate .map files, compile phases that generate separate .o and debug files). I just treat these as normal 2) I may need to depend on each of the files (I don't use yacc/bison, but it sounds like this would qualify). I select one file to be the main output and have the .do file fo…
If the h output changes but the c doesn’t, this rule will miss it. I once solved it by making a tar file or all the outputs and extracting it to both .c and .h but that’s incredibly kludgy, still looking for a better solution
Re: The Makefile I use with JavaScript projects
#487Earlier quoted context omitted.
It's being used to manage the ordering of that with other rules, and to run independent steps in parallel.
OK. So here's a scenario: I have a DB table that keeps track of email notifications sent out. There is a column for the address that the email was sent to, and another for the time at which the email was sent. A second table keeps track of replies (e.g. clicks on an embedded link in the email). Feel free to assume additional columns (e.g. unique ids) as needed. When some particular event occurs, I want the following…
You have no DAG, and no actions that can be considered fresh/stale, so there's nothing for make to help with. SQL doesn't have much to do with that.
Re: The Makefile I use with JavaScript projects
#488Re: The Makefile I use with JavaScript projects
#489I searched and didn't find a single soul using Makefile to orchestrate a set of build steps. I have been doing that for a long time: `make test`, `make build_docker`, `make push_docker`, `make deploy`. Now suddenly everyone shows up in one place here. Long live HN.
Re: The Makefile I use with JavaScript projects
#490Earlier quoted context omitted.
What is the runtime? Always the same. More than C? Ha! The platform where your js is running is probably written in C!
Pffffft. Nobody wants to touch C these days. That's why many, many, many, many, many more people are writing server, browser, desktop and mobile apps with JS and not C.