Open rdebath opened 8 years ago
Thanks. But :
command is not usable in Windows...
I'm planning to use GNU Make's Makefile-remaking function (c.f. https://www.gnu.org/software/make/manual/html_node/Remaking-Makefiles.html ) because eval
'ing macro calls infinitely consumes memory too much. But it's not clear whether it can be done.
Okay ... how about this ?
-:;@ #
To tell the truth, I don't have windows machines. Is it work in Windows?
I just downloaded and installed the native compile from here onto a machine I can RDP to. Interestingly enough the code with the colon ie: -:;@:
works nicely. I suspect it's interpreted as a label line in a batch file. The hash does NOT work; it's treated as a DOS command not a Makefile comment.
Actually, that make a lot of sense, as the :
command in the Bourne shell and the DOS command processor both come from the old "Thompson Shell".
As for remaking makefiles ... it looks like it might work. I guess you'd have to define a state transition rule that reads a current makefile and creates a new one with one BF instruction executed (Maybe just one line that's "include"d). There is that $(file) command so you're not forced to use an external command to write to a file.
Thank you!
That also make a sense in that ksh and csh/tcsh also treat :
as a comment (✿╹◡╹)ノ. So I'll add the line to the Makefile.
Yes! I knew that GNU Make has $(file)
macro. I'll test it.
It's too be late but I found that the remaking rule completely exec
s the next Make. In this case, variables are not reserved. So we must save variables to files. This is not so efficient.
$(eval)
This Makefile
infinitely loops if TIME
≧ 1, but it doesn't loop if TIME
< 1. It may be due to filesystems's time resolution...
$(info ** Remaking **)
TIME = 1
Makefile: FORCE
touch $@
sleep $(TIME)
.PHONY: FORCE
FORCE:
Treating the same timestamp as "not out of date" is actually mandated by POSIX. It's also generally regarded as a good idea because on a modern system with sub-second timestamps they will only be the same if someone has explicitly set them or broken them by using a tool that has seconds only resolution. (eg: tar)
But, I seem to remember that it's actually a lot more complex than that, with some systems (even some versions of Linux) having weird timewarps below second resolution. So I don't see a brainfuck interpreter getting any changes in this area :grin:
I suggest you add a line like below somewhere to get rid of the error message
Otherwise, wow. I though
eval
looked like a good candidate but you beat be to it.