Skip to content

Instantly share code, notes, and snippets.

@pmjones
Created June 27, 2013 20:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pmjones/5880322 to your computer and use it in GitHub Desktop.
Save pmjones/5880322 to your computer and use it in GitHub Desktop.
transform rules comparison
Simensen Rules
--------------
1 MUST immediately return the _file system path base_ if the _source_ is equal
to the _logical path base_.
2 MUST return `false` if the _logical path base_ is not valid.
3 MUST append a directory to the _file system path base_, and
4 MUST replace the _logical path base_ in the _source_ with the _file system
path base_, and
5 MUST replace _logical path separators_ in the _logical path suffix_ of the
_source_ with directory separators, and
6 MUST return the transformed `source`
Braindead Rules
---------------
1 If the logical path prefix is not valid for the logical path, the
implementation MUST abort the transformation and MAY return `false`.
2 The implementation MUST replace the logical path prefix in the logical path
with the file system path prefix.
3 The implementation MUST replace logical path separators in the logical path
suffix with directory separators.
4 The implementation MUST return the transformed string.
Analysis
--------
- simensen 2 and braindead 1 are the same
- simensen 4 and braindead 2 are the same
- simensen 5 and braindead 3 are the same
- simensen 6 and braindead 4 are the same
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment