Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
change Application to Systemic and Universal roles
The word Application is entirely misleading for describing the
various systems that form the execution context of your program, so
instead we'll have the role Systemic to express the notion of some
local system that we're running in the context of (operating system,
kernel, architecture, physical machine, virtual machine, virtual OS,
maybe even windowing system).

We also split out the role Universal to be done by any object that
needs a cosmically unique name.  The version must be well formed in
order to be suitable for naming.  Other version-like info can go into
a description instead (or, if it must be part of the name somehow,
into the auth attribute).  The crypto signature may or may not end
up being optional for various kinds of entities.  A physical architecture
is not distributed over the network, so is unlikely to have a checksum.
  • Loading branch information
TimToady committed May 13, 2014
1 parent ffad552 commit 0090f83
Showing 1 changed file with 26 additions and 19 deletions.
45 changes: 26 additions & 19 deletions S28-special-names.pod
Expand Up @@ -83,8 +83,8 @@ be fleshed out in S26.
$*CWD S16 IO::Path # current working directory
$=data (S26) IO # data block handle (=begin data ... =end)
%?DEEPMAGIC S13 Hash of XXX # Controls the mappings of magical names to sub definitions
$?DISTRO S02 Application # Which OS distribution am I compiling under
$*DISTRO S02 Application # Which OS distribution am I running under
$?DISTRO S02 Systemic # Which OS distribution am I compiling under
$*DISTRO S02 Systemic # Which OS distribution am I running under
$*EGID Int # effective group id
%*ENV S02 Hash of Str # system environment variables
$*ERR S16 IO::Handle # Standard error handle
Expand All @@ -103,12 +103,12 @@ be fleshed out in S26.
$?MODULE S02 Module # current module
%*OPTS S19 Hash of XXX # Options from command line
%*OPT... S19 Hash of XXX # Options from command line to be passed down
$?KERNEL Application # operating system compiled for
$*KERNEL Application # operating system running under
$?KERNEL Systemic # operating system compiled for
$*KERNEL Systemic # operating system running under
$*OUT S16 IO::Handle # Standard output handle
$?PACKAGE S02 Package # current package
$?PERL S02 Application # Which Perl am I compiled for?
$*PERL S02 Application # perl version running under
$?PERL S02 Systemic # Which Perl am I compiled for?
$*PERL S02 Systemic # perl version running under
$*PID Int # system process id
%=pod S02 # (or some such)
$*PROGRAM S19 IO::Path # location of the Perl program being executed
Expand All @@ -121,8 +121,8 @@ be fleshed out in S26.
$*TZ S32 # Local time zone
$*UID Int # system user id
$?USAGE S06 Str # Default usage message generated at compile time
$?VM S02 Application # Which virtual machine am I compiling under
$?XVM S02 Application # Which virtual machine am I cross-compiling for
$?VM S02 Systemic # Which virtual machine am I compiling under
$?XVM S02 Systemic # Which virtual machine am I cross-compiling for

Note that dynamic variables such as C<$*OUT> may have more than
one current definition in the outer dynamic context, in which case
Expand All @@ -134,14 +134,21 @@ scope may also declare a local meaning of C<$*OUT> that applies only
to called code. Likewise each thread could log its own errors
to its own C<$*ERR>, since a thread is a dynamic scope.

The C<Application> role collects a few common features of some of the special
variables such as C<$*PERL>, C<$?VM>, C<$*KERNEL>, etc.

role Application {
has Str $.name;
has Str $.auth;
has $.version;
}
The C<Systemic> role collects a few common features of some of the special
variables such as C<$*PERL>, C<$?VM>, C<$*KERNEL>, etc. It in turn relies
on the C<Universal> role that all cosmically unique entities must support
in order to have a unique name.

role Universal {
has Str $.name;
has Str $.auth;
has Version $.version;
has Blob $.signature; # optional?
}
role Systemic does Universal {
has $.desc; # uname-ish version-like information goes here
...
}

=head3 Perl5 to Perl6 special variable translation

Expand Down Expand Up @@ -224,7 +231,7 @@ If a column has a "-" in it, it means that item is unavailable in that version o

=head3 $?KERNEL / $*KERNEL

Contain a C<Kernel> class instance that does C<Application>. It further
Contain a C<Kernel> class instance that does C<Systemic>. It further
provides the following methods:

=over
Expand All @@ -250,7 +257,7 @@ ordinal number matches the lower level signal value.

=head3 $?DISTRO / $*DISTRO

Contain a C<Distro> class instance that does C<Application>. It further
Contain a C<Distro> class instance that does C<Systemic>. It further
provides the following methods:

=over
Expand All @@ -267,7 +274,7 @@ The release information of this distribution.

=head3 $?VM / $*VM

Contain a C<VM> class instance that does C<Application>. It further
Contain a C<VM> class instance that does C<Systemic>. It further
provides the following methods:

=over
Expand Down

0 comments on commit 0090f83

Please sign in to comment.