It's far from perfect, so replacing old file/path/component cases might hit speedbumps. But those should be studied and then the code and tests adapted to show what it should do.
This moves the MAKE-FILE experimental code that has been used for
bootstrap into the main executable. It uses generic PATH! and TUPLE!
as a template for composing filenames:
THE HISTORICAL ABILITY TO PATH PICK A FILE! TO CREATE A FILE! IS GONE.
rebol2>> dir: %/home/test
rebol2>> dir/subdir/foo
== %/home/test/subdir/foo ; this now fails
MAKE-FILE is not finalized in its abilities, so if using it to replace
instances of these calls doesn't seem like it works how it should,
it's time to address that.
MAKE-FILE is entirely user code (all extremely draft-level) so it can
be worked on. Long term, it will be rethought and rewritten as native
code, or at least broken into some support natives that might be more
generally useful in PATH! and TUPLE! manipulation.
This commit also includes the beginnings of a SHELL dialect, which
needs significant design discussion to decide how it should work:
>> dirs: [%/usr/local %/home]
>> shell [ls -alF (first dirs)]
; acts as `call/shell "ls -alF /usr/local"`
>> $ ls -alF (first dirs)
; variadic operator shorthand for the above
I've mentioned that it's time to start putting NewPath through its paces. This needs to be discussed, tested, and improved.
It's far from perfect, so replacing old file/path/component cases might hit speedbumps. But those should be studied and then the code and tests adapted to show what it should do.
This moves the MAKE-FILE experimental code that has been used for bootstrap into the main executable. It uses generic PATH! and TUPLE! as a template for composing filenames:
There is a shorthand quoting operator tied to the new
%%
WORD!THE HISTORICAL ABILITY TO PATH PICK A FILE! TO CREATE A FILE! IS GONE.
MAKE-FILE is not finalized in its abilities, so if using it to replace instances of these calls doesn't seem like it works how it should, it's time to address that.
MAKE-FILE is entirely user code (all extremely draft-level) so it can be worked on. Long term, it will be rethought and rewritten as native code, or at least broken into some support natives that might be more generally useful in PATH! and TUPLE! manipulation.
This commit also includes the beginnings of a SHELL dialect, which needs significant design discussion to decide how it should work: