<i>^Z appended to sourced VFS files</i> status still Open with 4 other changes
by
.
D 2017-08-09T21:45:13.504
J icomment Yes\saku,\syou\shave\sit\sright,\sthis\sis\sa\sconfluence\sof\sissues,\sa\sproblem\sthat\sdoesn't\sexist\sin\sany\sone\ssubsystem\sbut\srather\sin\sthe\stheir\sintegration.\r\n\r\nThe\smode\soriginates\swith\sthe\suser\sscript,\seither\sas\san\sargument\sto\s[open]\sor\simplied\s"r"\sfor\s[source].\s\sIt\sis\ssent\sto\sthe\sVFS,\swhich\sthen\ssends\sit\sto\sthe\schannel\scode.\r\n\r\nWe've\sgotten\sso\sflexible\sthat\sseveral\sstages\sof\sthis\sprocess\sare\sallowed\sto\sreflect\sback\sinto\sthe\suser\sscript.\s\sBoth\sthe\sVFS\sand\sthe\schannel\scan\sbe\scustomized.\s\sWhile\sI'm\sthrilled\sTcl\shas\sgrown\sin\sthis\sdirection,\sthere's\sa\slot\sthat\scan\sgo\swrong.\r\n\r\nWe\sare\strusting\sthe\suser-supplied\sVFS\sto\scorrectly\srelay\sthe\smode\sfrom\sthe\sVFS\ssubsystem\sto\sthe\sI/O\ssubsystem,\swhich\sare\stwo\sdifferent\srealms.\s\sThe\sboundary\sis\squite\sblurred\ssince\suser\sVFSes\soften\sdon't\scall\s[chan\screate]\sdirectly\sbut\sinstead\suse\sa\swrapper\ssupplied\sby\sthe\scustom\srefchan\spackage,\syet\sdespite\sthis\scode\sbeing\sostensibly\spart\sof\sthe\srefchan,\sit\sis\seffectively\spart\sof\sthe\sVFS.\s\sThus\sthe\sVFS\shas\sresponsibility\swithout\sauthority,\swhich\sis\salways\sa\sbad\scombination.\r\n\r\nWhen\sI\ssay\s"two\sdifferent\srealms"\sI\shave\sin\smind\sthe\stotally\sdifferent\sways\sVFS\sand\srefchan\srepresent\smodes.\s\sVFS\shas\snumeric\s(typically\soctal)\spermissions\sused\sin\scase\sa\snew\sfile\sis\screated,\sbut\sthat\shas\sno\sbearing\shere\sexcept\sto\ssew\sconfusion.\s\sIt\salso\shas\sa\smode\sstring\swhich\sis\seither\s"",\s"w",\s"a",\s"w+",\sor\s"a+".\s\sContrast\sthat\swith\srefchan\swhich\shas\sa\smode\sof\s"read",\s"write",\sor\s"read\swrite".\s\sThe\scustom\sVFS\sis\sresponsible\sfor\stranslating\sthe\sformer\sto\sthe\slatter,\sand\sit's\sso\smuch\seasier\sto\sjust\ssay\s"read\swrite"\salways.\s\sWouldn't\sit\smake\smore\ssense\sto\sunify\sthe\srepresentation\sof\smodes,\sto\sreplace\smode\sstrings\swith\srefchan-style\slists?\r\n\r\nVFS\smodes\ssay\snot\sonly\swhich\soperations\sare\spermitted,\sbut\salso\swhether\sthe\sinitial\sfile\spointer\sshould\sbe\sat\sthe\send\sor\sthe\sbeginning.\s\sThis\scould\sbe\srepresented\sby\shaving\s(or\snot\shaving)\s"append"\sbe\sin\sthe\smode\slist.\s\sThen\smake\srefchan\signore\s"append"\sso\sthe\smode\slist\scan\sbe\spassed\salong\sdirectly,\seliminating\sany\sneed\sfor\stranslation.\s\sThe\sgoal\sis\sfor\sthe\sright\sthing\sto\salso\sbe\sthe\seasy\sthing\sso\susers\sare\sless\slikely\sto\stake\sshortcuts\sor\smake\smistakes.\r\n\r\nFurther\scomplicating\sthe\sissue,\sthe\s[open]\scommand\shas\stwo\smore\ssimilar\sbut\sincompatible\sways\sof\sdescribing\smodes.\s\sIt\shas\smode\sstrings,\sbut\sthey're\snot\sthe\ssame\sas\sVFS\smode\sstrings.\s\sIn\sparticular,\s[open]\ssupports\s"r"\sand\s"r+"\swhich\sVFS\sencodes\sas\s""\sand\s"a+".\s\sIt\salso\ssupports\sa\s"b"\squalifier.\s\sIn\saddition\sto\smode\sstrings,\s[open]\sallows\slists\sof\sRDONLY,\sWRONLY,\sor\sRDWR\splus\sany\snumber\sof\sextra\sflags\ssuch\sas\sAPPEND\sand\sBINARY.\r\n\r\nOne\smore\sissue\sto\stop\sit\sall\soff.\s\sThe\sVFS\sman\spage,\swhich\sI\sfound\sat\shttp://jsish.org/man/mann/vfs.html,\ssays\sthe\sread-only\sopen\smode\sis\s"r"\swhereas\sin\sreality\sit's\sempty\sstring.\r\n\r\nSo\syeah,\swe\scan\simprove\sTcllib\sto\srespect\smodes,\sbut\sI\sthink\sthat\sjust\slike\smy\s[source]\schange,\sthat\swould\salso\sbe\smissing\sthe\sunderlying\sissue,\swhich\sis\sthat\sit's\smuch\sharder\sthan\sit\sshould\sbe\sto\scorrectly\stransmit\sthe\smode\sfrom\sthe\sVFS\ssubsystem\sto\sthe\sI/O\schannel\ssubsystem.\s\sUntil\sthat's\saddressed,\sthis\sbug\swill\scontinue\sto\scrop\sup\sin\suser\sprograms.
J login andy
J mimetype text/plain
J username Andy\sGoth
K 5bfe3de008e6f7b5863619a4f9c801d040ff5ab8
U andy
Z a83daeab7153f5628f5f7cae7836de16