ServerJS/System: Difference between revisions
< ServerJS
Jump to navigation
Jump to search
(Argument against sys.print (which is a logging method, not just print)) |
|||
Line 27: | Line 27: | ||
= Show of Hands = | = Show of Hands = | ||
module or free variable: | module or free variable: | ||
Line 89: | Line 39: | ||
** Aristid Breitkreuz | ** Aristid Breitkreuz | ||
** Ash Berlin | ** Ash Berlin | ||
[[ServerJS/System/ArchivedShowOfHands]] | |||
= Comments = | = Comments = |
Revision as of 16:25, 28 May 2009
System Interface
All platforms must support a module, "system", that may contain the following attributes.
If "system" contains any of the following names, they must have the corresponding meaning:
- stdin: the standard input stream, an object with the same API as a file opened with the mode "r" with no encoding.
- stdout: the standard output stream, an object with the same API as a file opened with the mode "w" with no encoding.
- stderr: the standard error stream, an object with the same API as a file opened with the mode "w" with no encoding.
- env: an Object containing posix-style or CGI environment variables.
- args: an Array containing the command line arguments for the invoking arguments, not including the interpreter/engine but including the path to the program as it was executed.
Any names not mentioned here or amended into this specification later should begin with "x" and a vendor-specific label as a prefix, like system.xCajaDomita. This will permit the future standardization of additional names as needed. Please request additional standard names below.
Additional proposed names
The following names have been proposed but not ratified for inclusion in the System proposal.
- print: The "system" MAY have a "print" function that accepts a "message" and an optional "label" String.
- The label MAY be one of "log", "warn", "error", "pass", "fail".
- Any other, unspecified label MUST be in lower-case and begin with "x" and a vendor-specific label like "x-v8cgi-database".
- Counter-argument This is infact not printing, but logging. 1) there is lots of logging frameworks, 2) it probably doesn't belong on sys, certainl not called print
- platform: the "system" MAY contain a string with its vendor-specific platform name.
- global: the "system" MAY contain a reference to the global object.
Show of Hands
module or free variable:
- Z as a free variable
- Kris Kowal
- Ihab Awad
- Y as a module
- Hannes Wallnoefer
- Peter Michaux
- Chris Zumbrunn
- Robert Thurnher
- Aristid Breitkreuz
- Ash Berlin
ServerJS/System/ArchivedShowOfHands
Comments
Removed variables:
- fs: a file default file system root object conforming to the File System API