12.22: adda/type/short pointer:
pos: kiss:
. build the obvious system first;
don't worry about having to
rebuild from scratch in order to merge an optimization;
it's important for testing that there are
simple, trustworthy substitutes .
summary:
. shorter pointers could save a lot of space;
in c, pointers may be 4-bytes long
in order to address any place on the machine .
. addresses can be byte-sized only if needing
less than 256 addresses; for instance,
an array(1..256)of word can hold 256 tree nodes;
and, each node has 2 bytes,
each of which can point to any place in that array .
. a larger tree would use word-sized pointers,
which means the nodes are 4bytes long
(2pointers * 2bytes).
. the byte- and word-sized addresses
use an array index to do the pointing;
and, are collectively called short pointers;
any use of a short pointer implies a reference to
some particular array;
eg, the root of a tree would be a descriptor
which identifies the tree as using short pointers
and then provides a link to the array being referred to .
. a tree descriptor would also include
a separate array for data;
because, arrays need to contain just one type
(unless its items all have bulky type tags);
and, while all internal tree nodes
are of type (ptr, ptr),
the leaf nodes contain data of varying sizes and types;
so, the data array might contain system pointers;
or, it could use a heap system,
where the pointer refers to several items:
the first item contains a size field
which indicates how many subsequent items
belong to this datum .
. large trees (uses word-pointers)
may contain small trees (uses byte-pointers);
any subtree of a large tree containing less than 256 nodes
could be repacked as a pointer to small tree .
. as the list processor goes into a tree,
it is always keeping the current base addresses
for both the large tree and any small tree .
. a large tree is chosen over a small tree type
not only when it will always be large,
but also when it is likely to grow .
. often it will never approach its max size;
therefore the array being used for the
internal nodes of a large tree
should have a growable size to conserve space .
. one way of being growable is to be
an array of pointers to segments:
eg, suppose the segment is 10 units;
then for item# 78,
follow the 7th pointer to a segment,
and use the 8th item on that segment .
. in practice,
the segments likely should be the size of small trees
( 256 nodes * 2pointers * 1 byte).
. while the large tree is indexing the seg'd array,
a small subtree could index a segment therein .
[12.23:
. since the short pointers of a large tree are
pointing at a seg' pointer,
seg's could vary in type, and be type-tagged,
that way the large tree can point directly at a small tree
without having to redirect to a data array .
. the large tree is an array of
( pointer to seg
, enum"seg nodes are {word, long}
)].
. both the large tree (word-pointers)
and the small tree (byte-pointers)
can have a bit per word to indicate
whether they point to tree or data .
. word-sized pointers use their sign bit for indicating
whether they point to tree or data;
byte-sized pointers exist in pairs on word-sized nodes,
and a byte is too small to sacrifice a bit,
so we'll divide the segment in half;*
if the positive side is used (a byte in 0..127)
that item is an internal node;
else (a byte in 128..255) the item is a leaf node .
*(conveniently, no matter what the shape of a tree,
the number of internal and leaf nodes is nearly the same:
#leaf = #internal + 1 )
A binary tree with N internal nodes has exactly N+1 external (leaf) nodes
Proof: by induction
Base case:
a binary tree with 0 internal nodes has exactly 1 external (leaf) node (root)
Induction step:
. assume a binary tree with m internal nodes
has exactly m+1 external (leaf) nodes
A binary tree with N internal nodes is made up of:
A root (internal node)
A left binary trees with k internal nodes
A right binary trees with (N - 1 - k) internal nodes
According to the induction assumption:
The left binary trees with k internal nodes has exactly
k+1 external nodes
The right binary trees with (N - 1 - k) internal nodes
has exactly (N - k) external nodes
So the total number of external nodes
in a binary tree with N internal nodes is:
k+1 + (N - k) = (N + 1 ) external nodes .
notes:
binary operation polymorphism:
. tree polymorphism works the same way numbers do:
if a biop has to deal with (byte, word),
it converts byte to word for the (word, word) vm;
ie, it makes a copy of the tree but with new pointer types .
. by making small arrays part of larger ones
you would be doing more of your own mem mgt
instead of using c mem mgt
which expects you to de/allocate in stack order;
use c mem mgt for arrays whenever possible;
but use small arrays for tree nodes
to keep tree-pointer size down .
. the segs of a seg'd array
can either come from malloc,
or be pointers into a reserve array
where you're doing your own mem mgt .
. the small tree needs arrays of size = word*256
-- that may be the right size for units used by seg'd arrays .
. of the pointer and its target,
which should contain needed subtype tags?
if the target contains the id,
then there is efficient aliasing;
but in some targets there would be bloat
because targets like system pointers need the whole obj,
and can't spare a few bits for type tagging,
so then an additional array of byte for tagging is needed .
2011-12-31
abi - c's definition of abi differs
12.22: mis.adda/abi/c's definition of abi differs:
. in c culture, the abi(app binary interface)
has meant an interface between apps and
binary library units vs source libraries .
. my definition of ABI has been a system of
cross-app communication using a binary language
rather than a exchanging text like unix .
. for instance, see standard ABIs motivation:
"( the editor and every command processor
will all speak the system language:
the system's language describes
a mathematical function
as either a set of points or a formula
along with a type specification that includes
a domain and codomain;
with an optional subdomain and inverse operator ).
. in c culture, the abi(app binary interface)
has meant an interface between apps and
binary library units vs source libraries .
. my definition of ABI has been a system of
cross-app communication using a binary language
rather than a exchanging text like unix .
. for instance, see standard ABIs motivation:
"( the editor and every command processor
will all speak the system language:
the system's language describes
a mathematical function
as either a set of points or a formula
along with a type specification that includes
a domain and codomain;
with an optional subdomain and inverse operator ).
capitalization rules are out
12.14: pos.adda/capitalization rules are out:
. did you notice the capitalization on colors?
blue is not capitalized is it?,
but certain shades of blue might be?
. I confused because I'm sure
days of the week are capitalized,
and I see no difference between
energy bands for colors,
and time bands across each week .
. well, anyway, don't bother expecting
types in adda to be capitalized;
that would just be more confusing, not less .
web.engl/capitalization rules:
concerning colors:
. are colors supposed to be capitalized ?
yes, no, no, and no .
colors vs days of week:
. most are named after roman or greek gods
eg, Friday--Freyas Day,
so they kept the capital letter.
. time sections start with a capital letter
in English, and German, but not in French or Spanish .
. wiki has a list of international capitalization variations;
eg, the english seem to have retained the rules of Latin .
. did you notice the capitalization on colors?
blue is not capitalized is it?,
but certain shades of blue might be?
. I confused because I'm sure
days of the week are capitalized,
and I see no difference between
energy bands for colors,
and time bands across each week .
. well, anyway, don't bother expecting
types in adda to be capitalized;
that would just be more confusing, not less .
web.engl/capitalization rules:
concerning colors:
. are colors supposed to be capitalized ?
yes, no, no, and no .
colors vs days of week:
. most are named after roman or greek gods
eg, Friday--Freyas Day,
so they kept the capital letter.
. time sections start with a capital letter
in English, and German, but not in French or Spanish .
. wiki has a list of international capitalization variations;
eg, the english seem to have retained the rules of Latin .
(is) vs (=)
12.14: adda/(is) vs (=):
. math is a lang centered around var's,
whereas english's (is) would have to be explicit about
a var being involved;
so, for math's x=c, where c is some constant,
english might say "( x's current value is c ).
. math is a lang centered around var's,
whereas english's (is) would have to be explicit about
a var being involved;
so, for math's x=c, where c is some constant,
english might say "( x's current value is c ).
librarians that do Make
12.14: co.self/dream/adda/librarians that do Make:
. in a compiler system, the info managed by the Make file,
can instead by generated by the library;
the info to be gathered by the linker
includes the hashes of everything that is linked
(so it knows when anything has been modified)
and a database of which wares are required each other;
it is builing a requires-list for
each piece that got linked to anything ...
[. upon waking,
I started looking around for how usable that was;
actually, a hash of each module is not the only thing you want;
because, if an impl' has changed but its interface has not,
then the libary should not need to recompile it .
because it's still promising to serve the same interface as before .
1118:
. however, you would want to do re-apply
any unit testing scripts,
and then passing that would also trigger
any related integration testing scripts .]
12.14: adda/librarians that do Make:
. as the compiler is generating binaries from text,
the Make file is the place for describing dependencies;
so then, if a dependency can be checked for freshness:
if the source text in newer than the binary,
then it needs to be recompiled .
. if the inteface is newer than the binary,
then all clients need to be recompiled .
. we routinely reuse binaries from others;
(most people are users, not developers)
and, so, for a compiler to be doing
Make file duties,
it needs to be exchanging Make info
with other compilers .
. to know if an import is serving a particular interface
it actually needs a text or symbolic version of that interface
which needs to resove to the same typenames,
or optionally to any similar datatype,
depending on whether the given type describes itself as
new
where it simply uses other types for implementing its model,
it doesn't expect to be seen as a synonym for the type it used .
. the ada lang allows both new types and reuse of types;
ie, a new type means you have an impl reusing an old type
but you don't want to be seen as being compatable with the old type,
you want to be compat only to your name
or at least only to the interface your name represents .
. eg,
a character string may be impl'd as a c string, or a safe string,
but both are serving the same model, type"string;
whereas, gasoline tank may be an integer modeling volume,
but it doesn't want to be confused with other integers,
nor operated on by just anything that can modify integers .
. we have ideas for features addx should have,
make sure to separate that from how features should be impl'd .
. if there's a new version with a fix from an exporter,
your librarian needs to accept it
but if it's accepting c or python code,
then user needs to be informed that the system is less secure
if they go ahead with reuse by non-adda coders .
(the reason you're safe with adda code,
is that it's compiled by adda, a trusted app
-- unless your machine's os has been
compromised by malware --
adda code has been translated into python or c,
which can be trusted as much python's core library,
and your own os (that depends on
your own security policy:
do you run your browser in a vm?
keep your os updated?
know where your usb drives have been? ...)
sync's:
. the model that the librarian needs to have in order to
accept imports,
is to accept sync's with other librarians
and then synchs download interfaces of sharables
so your librarian can list them when you've asked what's available .
. if you do use an external,
it downloads the associated body,
the list shows too where your names conflict .
. it doesn't require you to rename conflicts because
all listings are qualified by the exporting librarian's name,
except for the entries of the local librarian .
. the user's rename can make an export appear to be local,
while yet being maintained by an exporter .
. local librarian is thus a language translator,
having a separate set of names for {user, other librarians}.
12.14: todo.adda/unify sync'd librarians with version control systems:
. the need to unify sync'd librarians
has to do with version control systems .
. in a compiler system, the info managed by the Make file,
can instead by generated by the library;
the info to be gathered by the linker
includes the hashes of everything that is linked
(so it knows when anything has been modified)
and a database of which wares are required each other;
it is builing a requires-list for
each piece that got linked to anything ...
[. upon waking,
I started looking around for how usable that was;
actually, a hash of each module is not the only thing you want;
because, if an impl' has changed but its interface has not,
then the libary should not need to recompile it .
because it's still promising to serve the same interface as before .
1118:
. however, you would want to do re-apply
any unit testing scripts,
and then passing that would also trigger
any related integration testing scripts .]
12.14: adda/librarians that do Make:
. as the compiler is generating binaries from text,
the Make file is the place for describing dependencies;
so then, if a dependency can be checked for freshness:
if the source text in newer than the binary,
then it needs to be recompiled .
. if the inteface is newer than the binary,
then all clients need to be recompiled .
. we routinely reuse binaries from others;
(most people are users, not developers)
and, so, for a compiler to be doing
Make file duties,
it needs to be exchanging Make info
with other compilers .
. to know if an import is serving a particular interface
it actually needs a text or symbolic version of that interface
which needs to resove to the same typenames,
or optionally to any similar datatype,
depending on whether the given type describes itself as
new
where it simply uses other types for implementing its model,
it doesn't expect to be seen as a synonym for the type it used .
. the ada lang allows both new types and reuse of types;
ie, a new type means you have an impl reusing an old type
but you don't want to be seen as being compatable with the old type,
you want to be compat only to your name
or at least only to the interface your name represents .
. eg,
a character string may be impl'd as a c string, or a safe string,
but both are serving the same model, type"string;
whereas, gasoline tank may be an integer modeling volume,
but it doesn't want to be confused with other integers,
nor operated on by just anything that can modify integers .
. we have ideas for features addx should have,
make sure to separate that from how features should be impl'd .
. if there's a new version with a fix from an exporter,
your librarian needs to accept it
but if it's accepting c or python code,
then user needs to be informed that the system is less secure
if they go ahead with reuse by non-adda coders .
(the reason you're safe with adda code,
is that it's compiled by adda, a trusted app
-- unless your machine's os has been
compromised by malware --
adda code has been translated into python or c,
which can be trusted as much python's core library,
and your own os (that depends on
your own security policy:
do you run your browser in a vm?
keep your os updated?
know where your usb drives have been? ...)
sync's:
. the model that the librarian needs to have in order to
accept imports,
is to accept sync's with other librarians
and then synchs download interfaces of sharables
so your librarian can list them when you've asked what's available .
. if you do use an external,
it downloads the associated body,
the list shows too where your names conflict .
. it doesn't require you to rename conflicts because
all listings are qualified by the exporting librarian's name,
except for the entries of the local librarian .
. the user's rename can make an export appear to be local,
while yet being maintained by an exporter .
. local librarian is thus a language translator,
having a separate set of names for {user, other librarians}.
12.14: todo.adda/unify sync'd librarians with version control systems:
. the need to unify sync'd librarians
has to do with version control systems .
Labels:
adda
passing destination references implicitely
12.9: adda/translate/passing destination references implicitely:
. by passing destination locations as references
instead of having functions return objects,
we can avoid a lot of garbage generation,
but the reason oop doesn't do this is it complicates the job of
application programmers .
. the reason addx does do this, is it has a translator
that does this automatically for programmers:
the compiler is looking for their y`= f(x)
and converting it for them into f-proc(&y, x).
. I think I had a contradictory example somewhere,
but it only applies to when the library programmer is
wanting to do systems programming (when it extends the compiler).
. by passing destination locations as references
instead of having functions return objects,
we can avoid a lot of garbage generation,
but the reason oop doesn't do this is it complicates the job of
application programmers .
. the reason addx does do this, is it has a translator
that does this automatically for programmers:
the compiler is looking for their y`= f(x)
and converting it for them into f-proc(&y, x).
. I think I had a contradictory example somewhere,
but it only applies to when the library programmer is
wanting to do systems programming (when it extends the compiler).
Labels:
adda,
translation
else-if statement's syntax
12.10: adda/cstr/else-if:
. here is the if-else syntax:
t?
( c1: s1
, c2: s2
, else: s3
) .
if I add an elsif to the structure, how does that fit in ?;
actually, with the use of (?) instead of (if)
there's maximum brevity without using a
contraction of [else if] .
. using that case-style syntax, it'd look like this:
t1 ? ( s1
, else: t2 ? (s3
, else: t4 ? (s5
, else: s6 ))).
. using truth-style syntax, it looks normal:
t1 ? s1
else t2 ? s3
else t4 ? s5
else s6 .
-- neat, but since (if) doesn't have a terminator
(like ada's endif,
any nested if-else's have to be parenthesized
as do any statement sequences:
t1 ?
s1
else t2 ?
(t1 ? s1 else t2 ? s3 else t4 ? s5 else s6 )
else t4 ?
(s1; s2)
else
s6 .
[if vs ?]:
. if you'd rather use if's, then (t?) is generally
replaceable with (if t:); ie,
the (:) is acting as a terminator like the (?) does .
mis:
. at first I was seeing it as a case stmt
with more than one case possible
the thing need to be ordered
reminds of using (;) instead of (,)
as is structuring arrays into matrices .
even if I could make the matrix pattern fit,
I'm not sure a tired or new programmer could
keep a working knowledge of it .
sci:
. notice that since both of (if)'s args are required,
then you could also separate them with a space
like lisp does; in that case,
you'd be detecting the condition where
the next token in the 2nd arg has to be an infix
but instead you found a non-infix;
however, that wouldn't work in my current syntax,
because infix's can also serve as prefix's;
so the (if)'s arg's do need a separator,
and a natural for that situation is the colon .
then again:
. you could also tell that the (if)'s 2nd arg began
because the next infix you were expecting
would have to be a truth-operator, ie:
{ or, and; nor, nand,
<=>, -- x is/not equivalent to y ( is also called xor, exclusive-or),
=>, =/> -- x does/not imply y,
<=, }
another prequisite:
. the other problem with not using the colon,
is that you can no longer have overloading;
you'd have to reserve the logical operators;
and while it does add unnecessarily to bureaucracy,
it would aid considerably to readability .
nevertheless:
. speaking of readability, use of the separator would
make it easy for humans to quickly parse;
and while adda should let writers skip the separator,
it should provide the readers the option of viewing it;
ie, it would be part of the
full vs minimized punctuation theme .
the deal breaker:
. finally, an insurmountable problem is one of
users adding more binary logic operators,
or similar functions of the form:
(truth, other-type)->truth .
. they should be able to do that,
so, you'd also have to make a general rule about
no overloading of such,
and that would be too much bureacracy
for the sake of merely simplifying (if)'s .
list of truth-operators:
. here is a table of possible combinations on 2 variables, x,y;
and the operations that can detect those combinations .
(~x&~y, ~x&y, x&~y, x&y) -- operation:
------------------------------------------
0000 -- false (regardless of inputs)
0001 -- x&y -- x and y
0010 -- x&~y -- not( ~x or y) -- x =/> y
0011 -- x (regardless of y)
0100 -- ~x&y -- not (x <= y)
0101 -- y (regardless of x)
0110 -- ~x&y or x&~y -- xor --
0111 -- x or y
1000 -- ~x&~y -- not(x or y) -- nor
1001 -- ~x&~y or x&y -- <=>
1010 -- ~y (regardless of x)
1011 -- not (~x&y) -- x or ~y -- x <= y
1100 -- ~x (regardless of y)
1101 -- not(x&~y) -- ~x or y -- x => y
1110 -- not(x&y) -- ~x or ~y -- nand,
1111 -- true (regardless of inputs)
the same rearranged by category:
non-binary logic:
truth values:
0000 -- false (regardless of inputs)
1111 -- true (regardless of inputs)
variable values:
0011 -- x (regardless of y)
1100 -- ~x (regardless of y)
0101 -- y (regardless of x)
1010 -- ~y (regardless of x)
classic binary logic:
0001 -- x and y
0111 -- x or y
1101 -- not(x&~y) -- ~x or y -- x => y
0010 -- x&~y -- not( ~x or y) -- x =/> y
1001 -- ~x&~y or x&y -- <=>
0110 -- ~x&y or x&~y -- xor --
modern binary logic:
1110 -- not(x&y) -- ~x or ~y -- nand,
1000 -- ~x&~y -- not(x or y) -- nor
english binary logic:
1011 -- not (~x&y) -- x or ~y -- x <= y -- implied by
0100 -- ~x&y -- not (x <= y) -- not implied by
. here is the if-else syntax:
t?
( c1: s1
, c2: s2
, else: s3
) .
if I add an elsif to the structure, how does that fit in ?;
actually, with the use of (?) instead of (if)
there's maximum brevity without using a
contraction of [else if] .
. using that case-style syntax, it'd look like this:
t1 ? ( s1
, else: t2 ? (s3
, else: t4 ? (s5
, else: s6 ))).
. using truth-style syntax, it looks normal:
t1 ? s1
else t2 ? s3
else t4 ? s5
else s6 .
-- neat, but since (if) doesn't have a terminator
(like ada's endif,
any nested if-else's have to be parenthesized
as do any statement sequences:
t1 ?
s1
else t2 ?
(t1 ? s1 else t2 ? s3 else t4 ? s5 else s6 )
else t4 ?
(s1; s2)
else
s6 .
[if vs ?]:
. if you'd rather use if's, then (t?) is generally
replaceable with (if t:); ie,
the (:) is acting as a terminator like the (?) does .
mis:
. at first I was seeing it as a case stmt
with more than one case possible
the thing need to be ordered
reminds of using (;) instead of (,)
as is structuring arrays into matrices .
even if I could make the matrix pattern fit,
I'm not sure a tired or new programmer could
keep a working knowledge of it .
sci:
. notice that since both of (if)'s args are required,
then you could also separate them with a space
like lisp does; in that case,
you'd be detecting the condition where
the next token in the 2nd arg has to be an infix
but instead you found a non-infix;
however, that wouldn't work in my current syntax,
because infix's can also serve as prefix's;
so the (if)'s arg's do need a separator,
and a natural for that situation is the colon .
then again:
. you could also tell that the (if)'s 2nd arg began
because the next infix you were expecting
would have to be a truth-operator, ie:
{ or, and; nor, nand,
<=>, -- x is/not equivalent to y ( is also called xor, exclusive-or),
=>, =/> -- x does/not imply y,
<=, }
another prequisite:
. the other problem with not using the colon,
is that you can no longer have overloading;
you'd have to reserve the logical operators;
and while it does add unnecessarily to bureaucracy,
it would aid considerably to readability .
nevertheless:
. speaking of readability, use of the separator would
make it easy for humans to quickly parse;
and while adda should let writers skip the separator,
it should provide the readers the option of viewing it;
ie, it would be part of the
full vs minimized punctuation theme .
the deal breaker:
. finally, an insurmountable problem is one of
users adding more binary logic operators,
or similar functions of the form:
(truth, other-type)->truth .
. they should be able to do that,
so, you'd also have to make a general rule about
no overloading of such,
and that would be too much bureacracy
for the sake of merely simplifying (if)'s .
list of truth-operators:
. here is a table of possible combinations on 2 variables, x,y;
and the operations that can detect those combinations .
(~x&~y, ~x&y, x&~y, x&y) -- operation:
------------------------------------------
0000 -- false (regardless of inputs)
0001 -- x&y -- x and y
0010 -- x&~y -- not( ~x or y) -- x =/> y
0011 -- x (regardless of y)
0100 -- ~x&y -- not (x <= y)
0101 -- y (regardless of x)
0110 -- ~x&y or x&~y -- xor --
0111 -- x or y
1000 -- ~x&~y -- not(x or y) -- nor
1001 -- ~x&~y or x&y -- <=>
1010 -- ~y (regardless of x)
1011 -- not (~x&y) -- x or ~y -- x <= y
1100 -- ~x (regardless of y)
1101 -- not(x&~y) -- ~x or y -- x => y
1110 -- not(x&y) -- ~x or ~y -- nand,
1111 -- true (regardless of inputs)
the same rearranged by category:
non-binary logic:
truth values:
0000 -- false (regardless of inputs)
1111 -- true (regardless of inputs)
variable values:
0011 -- x (regardless of y)
1100 -- ~x (regardless of y)
0101 -- y (regardless of x)
1010 -- ~y (regardless of x)
classic binary logic:
0001 -- x and y
0111 -- x or y
1101 -- not(x&~y) -- ~x or y -- x => y
0010 -- x&~y -- not( ~x or y) -- x =/> y
1001 -- ~x&~y or x&y -- <=>
0110 -- ~x&y or x&~y -- xor --
modern binary logic:
1110 -- not(x&y) -- ~x or ~y -- nand,
1000 -- ~x&~y -- not(x or y) -- nor
english binary logic:
1011 -- not (~x&y) -- x or ~y -- x <= y -- implied by
0100 -- ~x&y -- not (x <= y) -- not implied by
exceptions - events declared in the interface
adda/type/exceptions/events declared in the interface:
. the singleton pattern in the cocoa text has an example
where some device mgt needs to know when the app is closing
(ie, the app class provides a notification service,
and it needs to be registered with this service).
. generally,
if there is an event that type mgt needs,
declaring it in its interface should register it
to receive notifcations of any such events .
. notifications are interrupting the control flow
but unlike during ada exceptions,
the flow can return back to its routine .
. the singleton pattern in the cocoa text has an example
where some device mgt needs to know when the app is closing
(ie, the app class provides a notification service,
and it needs to be registered with this service).
. generally,
if there is an event that type mgt needs,
declaring it in its interface should register it
to receive notifcations of any such events .
. notifications are interrupting the control flow
but unlike during ada exceptions,
the flow can return back to its routine .
Labels:
adda,
exceptions,
type
exceptions - when to use error logging instead
adda/cstr/exceptions/when to use error logging instead:
. if the misuse of an interface will be caught during compilation
then a logged warning is appropriate;
otherwise, the bug catch will be depending on
how much testing the client coder does,
so if the bug gets to the user,
there should be an exception to get some runtime backup;
ie, the code will be responding to exceptions with
certain fixes or apologies;
conversely, if the coder isn't catching exceptions
then that is some half-baked, dangerous code,
and the user should be made aware it
so then the denial of service implied by an uncaught exception
is warranted .
. if the misuse of an interface will be caught during compilation
then a logged warning is appropriate;
otherwise, the bug catch will be depending on
how much testing the client coder does,
so if the bug gets to the user,
there should be an exception to get some runtime backup;
ie, the code will be responding to exceptions with
certain fixes or apologies;
conversely, if the coder isn't catching exceptions
then that is some half-baked, dangerous code,
and the user should be made aware it
so then the denial of service implied by an uncaught exception
is warranted .
Labels:
adda,
cstr,
exceptions
ada`separate addressing the overloaded
adda/syntax/ada`separate/addressing the overloaded:
. how is adda saying the full name of a nested subroutine,
like ada says separate is ... ? use keyword body func`body,
. functions can be overloaded (ie,
different functions with the same name
but distinguished by unique signatures),
so then the full path name may need to include the signature:
eg, func(t1,t2)`body/subroutine .
. how is adda saying the full name of a nested subroutine,
like ada says separate is ... ? use keyword body func`body,
. functions can be overloaded (ie,
different functions with the same name
but distinguished by unique signatures),
so then the full path name may need to include the signature:
eg, func(t1,t2)`body/subroutine .
possessive right for component selection?
12.3: proj.adda/syntax/possessive right for component selection?:
. I've been overloading the possessive for use as
both an obj`call and an obj`component,
any complications?
. wasn't there some new idea for record syntax,
like obj.component? yes:
http://amerdreamdocs.blogspot.com/2011/04/rethinking-aggregates.html
. the consequence was,
if a name already stands for a type,
it can't be used as the name for any component .
. that would be easy if there was a rule like
(type`names must be capitalized),
but most would rather write .int than .Z .
. adde can help out by auto-formatting types in a bold font .
. I've been overloading the possessive for use as
both an obj`call and an obj`component,
any complications?
. wasn't there some new idea for record syntax,
like obj.component? yes:
http://amerdreamdocs.blogspot.com/2011/04/rethinking-aggregates.html
. the consequence was,
if a name already stands for a type,
it can't be used as the name for any component .
. that would be easy if there was a rule like
(type`names must be capitalized),
but most would rather write .int than .Z .
. adde can help out by auto-formatting types in a bold font .
rom vs const
12.2: adda/cstr/rom vs const:
what did rom vs const mean?
. the use of a "rom" designation only makes sense when sharing;
because, const means it's rom even to self
(ie, no writes after init) .
. the rom and const could reuse the same symbol
since when a param says const
that's the same as promise to the caller that it'll be
treated as read-only: ie, const.
. const is like in-mode and that is the default mode;
12.3:
. there is still the issue of what happens to a param later;
eg, when my formal param uses the constant specifier,
it assures not only that it won't do any modifications
but also that it won't pass the obj to a modifying function .
. another issue is compatability:
{mutable, contst} can be assigned to const;
only mutable can assigned to mutable
(a param is mutable when declared as inout-mode ).
. due to obj's having access to themselves,
whether an operation of theirs is really read-only
is totally up to them their private implementations
unless the system can detect when they write .
. if the system can't detect that,
there will have to be more copying to assure modularity .
12.2:
. one efficiency trick for reducing the amount of copying,
is to wait for an attempted write
before doing the copy .
12.3:
. once the run-time mgt can detect writes to a rom,
it needs to raise an exception,
so, to avoid such messes,
param providers and their compilers
need to know what operations are modifiers .
. the way operations are described in an interface,
(`f) is assumed to be self-modifying
unless it states otherwise;
for f to be seen as non-modifying
it should be defined as a function
(ie, not out-mode params or side-affects)
or be tagged as non-modifying:
( !`f ).
what did rom vs const mean?
. the use of a "rom" designation only makes sense when sharing;
because, const means it's rom even to self
(ie, no writes after init) .
. the rom and const could reuse the same symbol
since when a param says const
that's the same as promise to the caller that it'll be
treated as read-only: ie, const.
. const is like in-mode and that is the default mode;
12.3:
. there is still the issue of what happens to a param later;
eg, when my formal param uses the constant specifier,
it assures not only that it won't do any modifications
but also that it won't pass the obj to a modifying function .
. another issue is compatability:
{mutable, contst} can be assigned to const;
only mutable can assigned to mutable
(a param is mutable when declared as inout-mode ).
. due to obj's having access to themselves,
whether an operation of theirs is really read-only
is totally up to them their private implementations
unless the system can detect when they write .
. if the system can't detect that,
there will have to be more copying to assure modularity .
12.2:
. one efficiency trick for reducing the amount of copying,
is to wait for an attempted write
before doing the copy .
12.3:
. once the run-time mgt can detect writes to a rom,
it needs to raise an exception,
so, to avoid such messes,
param providers and their compilers
need to know what operations are modifiers .
. the way operations are described in an interface,
(`f) is assumed to be self-modifying
unless it states otherwise;
for f to be seen as non-modifying
it should be defined as a function
(ie, not out-mode params or side-affects)
or be tagged as non-modifying:
( !`f ).
syntax for readonly, const, out, inout, persistent
12.2: adda/type/syntax for readonly, const, out, inout, persistent:
todo:
. need to review or finish the type syntax .
.#./.txt
.#./!.txt! -- array of const pointer to const text,
A ^#.txt -- persistent array of text,
[12.3:
. this would be a lot more readable if the (!) was simply replacing the (.)
#!/!txt -- the (!) would then be translated as "(return const ...)
-- that says type is array return const pointer to return constant text .
...
however, it doesn't address all needs:
for operations over self ( declared as x`f().t )
how do you say `f is readonly? ]
12.5: read-only operations:
. in places where !`f might say
(operation over obj is readonly)
[1039: adde's english mode should apply to commands too;
it would display footnotes of what a command does
in a twitter sized message . the footnotes would be at each step;
so also below any complete algebraic expression .]
the problem with consistency is that you're not using the same syntax
where dot is showing the obj type being returned .
. there were 2 situations for rom or const:
# rom for params ie sharing ,
# const for your own obj's .
. in the case of x`f(), you're looking to express rom on a param
but the param is implicit, so then you need to make it explicit:
(o!T)`f -- a read-only operation;
(o.T)`f, `g -- mutating operations .
todo:
. need to review or finish the type syntax .
.#./.txt
.#./!.txt! -- array of const pointer to const text,
A ^#.txt -- persistent array of text,
[12.3:
. this would be a lot more readable if the (!) was simply replacing the (.)
#!/!txt -- the (!) would then be translated as "(return const ...)
-- that says type is array return const pointer to return constant text .
...
however, it doesn't address all needs:
for operations over self ( declared as x`f().t )
how do you say `f is readonly? ]
12.5: read-only operations:
. in places where !`f might say
(operation over obj is readonly)
[1039: adde's english mode should apply to commands too;
it would display footnotes of what a command does
in a twitter sized message . the footnotes would be at each step;
so also below any complete algebraic expression .]
the problem with consistency is that you're not using the same syntax
where dot is showing the obj type being returned .
. there were 2 situations for rom or const:
# rom for params ie sharing ,
# const for your own obj's .
. in the case of x`f(), you're looking to express rom on a param
but the param is implicit, so then you need to make it explicit:
(o!T)`f -- a read-only operation;
(o.T)`f, `g -- mutating operations .
c's static internal vars
12.2: adda/cstr/c's static internal vars:
. c's static internal vars are can applied in obj'c
to both {class, instance} methods and functions .
. persistence is the essence of c's static internal vars:
they are locally scoped within a function,
yet retain their value between calls to the function .
. it's as if the modules that contain these functions
are keeping these "(locals) at their top level;
so for T.type/f.proc/x.txt
you might see the var is actually at
T`body/f.proc'space/x.txt .
. for a progam, it's actually structured as a package:
(main, subroutine, globals), so local static looks like:
program/Subroutine'space/x.txt .
. what does that look like in adda?
. my first idea was asserting that
part of simplicity is naming things after
the way they are actually structured;
but after seeing how verbose that was,
I'm looking at a functional keyword:
persistent (with brief symbol = (^)
-- an amusing reference to christian's one-way ).
. c's static internal vars are can applied in obj'c
to both {class, instance} methods and functions .
. persistence is the essence of c's static internal vars:
they are locally scoped within a function,
yet retain their value between calls to the function .
. it's as if the modules that contain these functions
are keeping these "(locals) at their top level;
so for T.type/f.proc/x.txt
you might see the var is actually at
T`body/f.proc'space/x.txt .
. for a progam, it's actually structured as a package:
(main, subroutine, globals), so local static looks like:
program/Subroutine'space/x.txt .
. what does that look like in adda?
. my first idea was asserting that
part of simplicity is naming things after
the way they are actually structured;
but after seeing how verbose that was,
I'm looking at a functional keyword:
persistent (with brief symbol = (^)
-- an amusing reference to christian's one-way ).
subclassing without sideaffects
12.22: todo.adda/oop/subclassing without sideaffects:
. how does the oop remain secure, and yet reusable?
they are having a lot of fun with subclassing,
so, is there any way to do that safely ?
the general idea is that it creates sideaffects,
so not only do you want to enforce capability limits on apps,
you also want to warn users when an app uses side-affecting features .
. you want to bar cap'grabbing features
like the obj'c categories which allow adding slots to library classes;
however, need to get more aquainted with
why they feel that is needed,
and find some alternative .
. how does the oop remain secure, and yet reusable?
they are having a lot of fun with subclassing,
so, is there any way to do that safely ?
the general idea is that it creates sideaffects,
so not only do you want to enforce capability limits on apps,
you also want to warn users when an app uses side-affecting features .
. you want to bar cap'grabbing features
like the obj'c categories which allow adding slots to library classes;
however, need to get more aquainted with
why they feel that is needed,
and find some alternative .
class methods
12.2: adda/oop/class methods:
. how does adda do an objc class method?
. there are notes already but here's review:
t.type: ((instance methods declared here));
t`classmethod().proc -- a class method
. you could also have everything in the interface,
distingishing {class, instance} with the usual keywords:
# self`f(x), `f(x) -- instance method (the default)
# class`g(x) -- class method .
[12.3:
. this basically mirrors the way obj'c does it .]
. how does adda do an objc class method?
. there are notes already but here's review:
t.type: ((instance methods declared here));
t`classmethod().proc -- a class method
. you could also have everything in the interface,
distingishing {class, instance} with the usual keywords:
# self`f(x), `f(x) -- instance method (the default)
# class`g(x) -- class method .
[12.3:
. this basically mirrors the way obj'c does it .]
2011-11-30
link expansion options
11.7: adde/outliner/links whose default is
[target replaces current link instead of current page]:
. outlines are like a tree of links except that
instead of the destination replacing the current view
it becomes added to it .
. notice that this is a generalizable link option:
a link would have a default activity,
but by using the context menu, you could select either
{ target replaces current link instead of current page
, target replaces current page
, target lauches in new {window, tab, todo list}
}.
[target replaces current link instead of current page]:
. outlines are like a tree of links except that
instead of the destination replacing the current view
it becomes added to it .
. notice that this is a generalizable link option:
a link would have a default activity,
but by using the context menu, you could select either
{ target replaces current link instead of current page
, target replaces current page
, target lauches in new {window, tab, todo list}
}.
Labels:
adde,
architecture,
gui,
outliner
inferred typing
11.12: adda/types/inferred typing:
(reviewing evlan's type system draft)
[@] 11.10.31/news.adda/lang"evlan/
evlan.org describes many addx features
. the reason you want to infer types
is so that you can have an efficient run-time;
if you don't care about that, as when prototyping,
then oop can be checking everything at run-time,
and both the coding and the compile times can be very fast .
. perhaps another reason to infer types
is so that you can warn users when oop might not help?
-- see the obj'c text's explanation of
why you don't want to type everything weakly
(as a pointer to anything);
basically it's because obj'c offers
so much freedom with deferred linking
that the compiler can make only the most general
inference:
if you don't mention a constraint
then the compiler has to assume you need
an unconstrained type for the purpose of
linking to future objects of unknown type .
. prototype developers and even production coders
like oop especially because it lends itself well
to such typeless programming,
ie, specifically avoiding type constraints by
letting the objects themselves decide whether
they understand a certain command .
. when you get into binary operations though,
(ie, pairs of objects -- and pairing is where
the dancing gets interesting )
then typeless programming is not so useful,
so typing is the only way to do what I call oop
(the classic example of oop
is the polymorphic type"number,
a class of subtypes including integers and floats;
ie, integer and floats can be playing well together
only because they are declared as subtypes of
the same type supertype, Numbers ).
(reviewing evlan's type system draft)
[@] 11.10.31/news.adda/lang"evlan/
evlan.org describes many addx features
. the reason you want to infer types
is so that you can have an efficient run-time;
if you don't care about that, as when prototyping,
then oop can be checking everything at run-time,
and both the coding and the compile times can be very fast .
. perhaps another reason to infer types
is so that you can warn users when oop might not help?
-- see the obj'c text's explanation of
why you don't want to type everything weakly
(as a pointer to anything);
basically it's because obj'c offers
so much freedom with deferred linking
that the compiler can make only the most general
inference:
if you don't mention a constraint
then the compiler has to assume you need
an unconstrained type for the purpose of
linking to future objects of unknown type .
. prototype developers and even production coders
like oop especially because it lends itself well
to such typeless programming,
ie, specifically avoiding type constraints by
letting the objects themselves decide whether
they understand a certain command .
. when you get into binary operations though,
(ie, pairs of objects -- and pairing is where
the dancing gets interesting )
then typeless programming is not so useful,
so typing is the only way to do what I call oop
(the classic example of oop
is the polymorphic type"number,
a class of subtypes including integers and floats;
ie, integer and floats can be playing well together
only because they are declared as subtypes of
the same type supertype, Numbers ).
Labels:
adda,
deferred linking,
late binding,
oop,
type,
type cluster,
type inferencing
evlan.org describes many #addx features
10.31: news.adda/lang"evlan/
evlan.org describes many addx features:
. Kenton Varda's Evlan has many addx features;
but, it "(currently has no type system);
and, it died in 2007.10.1, when the author "(got a real job)!
. what first caught my was cap-based security:
is its being a virtual operating system
which runs on top of any other operating system;
via a virtual machine that is the sole access
to the underlying platform's OS .
. by a complete platform,
he means it is not specialized to be
efficiently accessing all of bloated unix,
but to define what it needs,
and then have the vm access what it needs
for impl'ing the Evlan virtual platform .
adda's secure by language idea:
also implementing security at the hardware level;
this is the level where modularity can be enforced;
otherwise, malware could just jump to
what ever code there is with the permissions it needs .
(see qubes doc's) .]
-- that means esp'ly your browser --
are all written in this provable language ? ]
see: Capability-based Security is used in the
EROS operating system and the E programming language.
Also, Marc Stiegler et al.
addx's idea that concurrency is the key
to secure speed:
meant for a single CPU; eg, [written in adda:]
having only 19 keywords;
one of which is "(where)
which could have been said with a reused "(:) .]
Because Evlan is purely functional,
no function call is allowed to have "side effects".
. see www.acmqueue.com/modules.php?name=Content&pa=showpage&pid=225
(dead link, is this right: queue.acm.org/detail.cfm?id=864034)?
-- ask google where else that link can be found:
Natural programming languages and environments
Communications of the ACM September 2004/Vol. 47, No. 9 by Brad A. Myers, John F. Pane, Andy Ko
. another contrast to assembly-like imperative instructions
is addm's idea for a high-level interpreter:
instead of translating from an abstract syntax tree (AST)
into a sequence of assembly instructions;
addm, the vm, would try to evaluate an AST . ]
evlan.org describes many addx features:
. Kenton Varda's Evlan has many addx features;
but, it "(currently has no type system);
and, it died in 2007.10.1, when the author "(got a real job)!
. what first caught my was cap-based security:
Most of today's computer platforms operate under. the other main idea like addx
a fundamental assumption that has proven utterly false:
that if a user executes a program,
the user completely trusts the program.
This assumption has been made by just about
every operating system since Unix
and is made by all popular operating systems used today.
This one assumption is arguably responsible for
the majority of end-user security problems.
It is the reason malware -- adware, spyware, and viruses --
are even possible to write,
and it is the reason even big-name software
like certain web browsers
are so hard to keep secure.
Under the classical security model,
when a user runs a piece of software,
the user is granting that software the capability
to do anything that the user can do.
Under capability-based security,
when a user runs a piece of software,
the software starts out with no capabilities whatsoever.
The user may then grant specific capabilities to the program.
For example, the user might grant the program
permission to read its data files.
The user could also control whether or not
the program may access the network, play sounds, etc.
Most importantly,
all of these abilities can be controlled
independently on a per-program basis.
is its being a virtual operating system
which runs on top of any other operating system;
via a virtual machine that is the sole access
to the underlying platform's OS .
. by a complete platform,
he means it is not specialized to be
efficiently accessing all of bloated unix,
but to define what it needs,
and then have the vm access what it needs
for impl'ing the Evlan virtual platform .
adda's secure by language idea:
Even better than implementing security in an operating system,--[. keep in mind that this won't work without
is implementing it in a programming language:
developers are able to control the capabilities available
to each piece of code independently.
Good practice, then, would be to only give each component
the bare minimum capabilities that it needs to
perform its desired operation.
And, in fact, it is easier to give fewer capabilities,
so this is what programmers will usually do.
The result is that if a security hole exists in some part of your program,
the worst an attacker can do is
gain access to the capabilities that were given to that component.
also implementing security at the hardware level;
this is the level where modularity can be enforced;
otherwise, malware could just jump to
what ever code there is with the permissions it needs .
(see qubes doc's) .]
It is often possible to restrict all "dangerous" capabilities[. great to know if your os and every other app
to one very small piece of code within your program.
Then, all you have to do is make sure that
that one piece of code is secure.
When you are only dealing with a small amount of code,
it is often possible to prove that this is the case.
It is, in fact, quite possible to prove
that a program written in a capability-based language
is secure.
-- that means esp'ly your browser --
are all written in this provable language ? ]
see: Capability-based Security is used in the
EROS operating system and the E programming language.
Also, Marc Stiegler et al.
addx's idea that concurrency is the key
to secure speed:
Evlan has strong support for highly concurrent programmingMost of today's systems use imperative languages
being a purely functional language,
Where automatic parallelization is not possible,
there are very lightweight threads (without stacks).
meant for a single CPU; eg, [written in adda:]
processAll(results#t.type).proc:
for(i.int = results`domain):
results#i`= processItem results#i
).. in c, it would process each item in order,adda aspires to be simple:
from first to last.
It does not give the system any room to
process two items in parallel
or in some arbitrary (most-efficient) order .
It is far easier to remember--[. however he has ada-itis and braggs about
multiple uses for a single construct
than to remember multiple constructs.
having only 19 keywords;
one of which is "(where)
which could have been said with a reused "(:) .]
interoperability done via compatibility layers:functional:
If and when the legacy software is no longer in use,
the compatibility layers can be removed,
leaving only the ultra-efficient Evlan core behind.
Because Evlan is purely functional,
no function call is allowed to have "side effects".
. see www.acmqueue.com/modules.php?name=Content&pa=showpage&pid=225
(dead link, is this right: queue.acm.org/detail.cfm?id=864034)?
-- ask google where else that link can be found:
Natural programming languages and environments
Communications of the ACM September 2004/Vol. 47, No. 9 by Brad A. Myers, John F. Pane, Andy Ko
This article presents findings on natural programming languages.natural programming:
(i.e. natural as in intuitive in the UserCentric way)
It advocates features for programming languages,
that are justified by these findings.
Areas include:
SyntacticSugar, that causes fewer errors
(it more intuitive/natural).
Better integrated debugging-support,
esp. for hypotheses about bug-causes.
which suggests that humans like to write rules of the form
"When condition X is true, do Y".
I am not yet sure to what extent this will
change the current system, however.
By "natural programming" we are aiming forFunctional Bytecode
the language and environment to work the way that
nonprogrammers expect.
We argue that if the computer language were to
enable people to express algorithms and data
more like their natural expressions,
the transformation effort would be reduced.
Thus, the Natural Programming approach
is an application of the standard user-centered design process
to the specific domain of programming languages and environments.
[at that link is a] good short summary of the
Natural Programming project here at CMU.
We're affiliated with the EUSES consortium,
which is a group of universities working on
end-user software engineering.
google's 2007 Update on the Natural Programming Project
Bytecode for the Evlan virtual machine--[11.30:
uses a functional representation of the code.
In contrast, the VMs of Java and .NET
use assembly-like imperative instructions.
. the GNU C Compiler's "Static Single Assignment" phase
is actually very close to being equivalent to
a purely functional language. [no overwrites]
If GCC does this internally just to make optimization easier,
then it doesn't take a huge stretch to imagine a system which
compiles imperative code to functional bytecode .
. another contrast to assembly-like imperative instructions
is addm's idea for a high-level interpreter:
instead of translating from an abstract syntax tree (AST)
into a sequence of assembly instructions;
addm, the vm, would try to evaluate an AST . ]
The purpose of constraining variables to types
is to get the compiler to check your work for bugs
and optimize code as well .
. if you could specify that an index to an array
must be less than the size of the array
-- and if the compiler could then check for that --
then buffer overruns (one of the most common bugs
leading to security holes in modern software)
would be completely eliminated.
(run-time bounds checking can prevent buffer overruns,
but then users see your app shutting down unexpectedly).
Labels:
adda,
addm,
addx,
cap'based,
capabilities,
concurrency,
e-lang,
functional,
microkernel,
security
2011-11-01
bundles obviate folders-first policy option
10.21: adde/fs/mac's bundle idea obviates folders-first policy option:
. instead of having a folders-first policy option,
the file system should be more like
mac's bundle system
where each folder has the option of
declaring itself to be either
a folder or a bundle .
. so then, in a file system window,
folders can be listed before files,
but the bundles are treated like files .
. instead of having a folders-first policy option,
the file system should be more like
mac's bundle system
where each folder has the option of
declaring itself to be either
a folder or a bundle .
. so then, in a file system window,
folders can be listed before files,
but the bundles are treated like files .
user changes can help with localization
10.23: adde/gui/user changes help with localization:
. there should be a wrench icon
by every command
that leads to this message:
"(if you figured out what this does,
and you can think of a better word in your language,
please do tell by emailing here ...)
even better,
the gui should be editable so that when you figure something
you can give it your own words or icons .
. the program keeps a config file of this,
and every time they change it,
you can remind them that when they
feel satisfied with their gui
they can share it with others
(at this email ...).
. make sure they confirm that their understood language
is in fact what they think they're targeting;
and allow comments that include dialects or locations
that they think it's special to ?
-- source of that idea's inspiration:
news: Software Localization Paradox:
Translatewiki.net
. a localisation platform for translation communities,
language communities, and free and open source projects.
-- found by gui translator who refered to
wikimedia's localizion paradox .
from an Interview with Wikimedia’s Amir Aharoni .
. there should be a wrench icon
by every command
that leads to this message:
"(if you figured out what this does,
and you can think of a better word in your language,
please do tell by emailing here ...)
even better,
the gui should be editable so that when you figure something
you can give it your own words or icons .
. the program keeps a config file of this,
and every time they change it,
you can remind them that when they
feel satisfied with their gui
they can share it with others
(at this email ...).
. make sure they confirm that their understood language
is in fact what they think they're targeting;
and allow comments that include dialects or locations
that they think it's special to ?
-- source of that idea's inspiration:
news: Software Localization Paradox:
Like any other translation,
software localization is best done by people who know well
both the original language in which
the software interface was written – usually English,
and the target language.
People who don’t know English strongly
prefer to use software in a language they know.
If the software is not available in their language,
they will either not use it at all
or will have to memorize lots of
otherwise meaningless English strings
and locations of buttons.
People who do know English often prefer to
use software in English
even if it is available in their native language.
The two most frequent explanations for that is
that the translation is bad
and that people who want to use computers
should learn English anyway.
The problem is that for various reasons
lots of people will never learn English
even if it would be mandatory in schools
and useful for business.
They will have to suffer the bad translations
and will have no way to fix it.
So this is the paradox
– to fix localization bugs,
someone must notice them,
and to notice them, more people who know English
must use localized software,
but people who know English
rarely use localized software.
That’s why lately i’ve been evangelizing about it.
Even people who know English well
should use software in their language
– not to boost their national pride,
but to help the people who
speak that language and don’t know English.
They should use the software especially if it’s translated badly,
because they are the only ones who can
report bugs in the translation
or fix the bugs themselves.
(A side note: Needless to say,
Free Software
is much more convenient for localization,
because proprietary software companies are usually
too hard to even approach about this matter;
they only pay translators if they have a reason to believe
that it will increase sales.
This is another often overlooked advantage
of Free Software.)
I am glad to say that i convinced most people to whom i spoke
about it at Wikimania
to at least try to use Firefox in their native language
and taught them where to report bugs about it.
I also challenged them to write at least
one article in the Wikipedia
in their own language,
such as Hindi, Telugu or Kannada
– as useful as the English Wikipedia is
to the world,
Telugu Wikipedia is much more useful
for people who speak Telugu, but no English.
I already saw some results.
I am now looking for ideas and verifiable data
to develop this concept further.
What are the best strategies to convince people
that they should use localized software?
For example:
How economically viable is software localization?
What is cheaper for an education department of a country
– to translate software for schools
or to teach all the students English?
Or: How does the absence of localized software
affect different geographical areas
in Africa, India, the Middle East?
Translatewiki.net
. a localisation platform for translation communities,
language communities, and free and open source projects.
-- found by gui translator who refered to
wikimedia's localizion paradox .
from an Interview with Wikimedia’s Amir Aharoni .
Labels:
adde,
gui,
localisation
2011-10-31
adda markup's conflicts with ini format
10.25: news.adda/markup/conflicts with ini format:
. bzr (the ubuntu team's distrib'd cvs)
uses an ini folder with the catgories of
[/] and [groups] .
. generally the ini format can
conflict with the adda markup lang's syntax
because it uses brackets as category headers,
and the category name may consist of a single symbol character .
. bzr (the ubuntu team's distrib'd cvs)
uses an ini folder with the catgories of
[/] and [groups] .
. generally the ini format can
conflict with the adda markup lang's syntax
because it uses brackets as category headers,
and the category name may consist of a single symbol character .
double-equal to mean prolonged equality
10.12: adda/lexicon/==:
. the == could be like the japanese way of
2-trees representing many trees: a forest .
. 2 equals would say the values are
equal for many moments,
ie, they are pointers to the same obj; [10.13:
or they are part of a notify&update pattern .
it could also be used as a special form of
assignment stmt:
whatever you're getting access to,
you have some way of maintaining synchronization,
as would occur if using aliases .]
. the == could be like the japanese way of
2-trees representing many trees: a forest .
. 2 equals would say the values are
equal for many moments,
ie, they are pointers to the same obj; [10.13:
or they are part of a notify&update pattern .
it could also be used as a special form of
assignment stmt:
whatever you're getting access to,
you have some way of maintaining synchronization,
as would occur if using aliases .]
meta.compiler
10.10: adda/meta.compiler:
. there should be a meta.compiler
that lets you write a list of
transforms from adda to target lang
and then the meta compiler is
generating the compiler from this list .
. to get started, just make the usual compiler;
and, along the way,
be looking for how to generalize the process;
--
. the first step is to finalize the adda lang,
then write a translation map from general adda
to the simple adda that maps directly to c
(eg, procedures can't be nested ).
. there should be a meta.compiler
that lets you write a list of
transforms from adda to target lang
and then the meta compiler is
generating the compiler from this list .
. to get started, just make the usual compiler;
and, along the way,
be looking for how to generalize the process;
--
. the first step is to finalize the adda lang,
then write a translation map from general adda
to the simple adda that maps directly to c
(eg, procedures can't be nested ).
types of access constraints
10.5: todo.adda/types of access constraints:
. {rom, wom, xom, xwm} could be the keywords for the
various types of access constraint for
read-, write-, execute-, and write&execute- only-memory .
. instead of having any combo of rwx,
consider that an execute priv'
implies a read priv' .
. the original unix way had in mind
-- in addition to the self, group, world groups --
a sort of 4th group: executives
those whose activities depended upon
what file they opened .
other ideas:
. when does the system need an exe'able permission?
. if that app is an executive,
then it can execute any type it recognizes as exe'able .
todo:
. review previous ideas of
how an obj's name can include access types;
(just as it includes its datatype);
eg, f.txt mean obj"f is type"txt,
so then how does its name explain
access constraints such as (rom vs rwm)
and (in vs out) param types ?
10.21: adda/types of access constraints/intro:
. the fundamental operation of unix
revolves around this:
a user with privilege status of
{owner, member of owner's group}
is applying an app to a file,
if the app and file permissions permit it .
. a file may be located in
either a private or public space:
a private space is usable by
whoever has the owner's key .
. the key holder claims self belongs to a group;
and other users can belong to the same group .
. files can grant separate permissions for
{ owner (what the keyholder can do)
, in-group (what the owner's group can do)
, in-others (what anyone can do)
}.
. an executive is a special type of app
that uses its input data
as the source of instructions it will follow
including the decision of
what it will affect on the computer;
whereas non-exec's will decide their behavior
only from their constant program code,
along with their memory of their previous behavior,
and changes in the machine's state .
. most of these non-exec's are just editors,
affecting at most the files they are given,
some private mem, and the screen buffer .
. files should be tagged executable {xom, xwm}
only if their data is suitable for
instructing some executive .
. a user can be thought of as being
a sort of executive app .
. the user's actual executive power
is determined by which group of app's
the user is allowed to execute
which in turn is determined by
the executive apps' file permissions
and whether the file considers the user
to be {owner, in-group, others}.
. executives can be calling other executives,
just as the user calls them,
so, suppose a called executive
is considered to have the same priviledge
as the {executive, user} that called it;
then, a human user could run a public app,
and when that app tries to access
the user's private files,
this would be allowed .
. the exe'able permission is saying
that if you are an executive
you can read this even if
your caller doesn't have read permission;
likewise,
having a read permission is saying:
you can read this regardless of
whether you're an executive or not .
. so, all of that was the typical
unix permissions scheme;
an alternative is capability based security:
. an app can only access
the files that are within the folders that are
listed in the app's capability descriptor .
. file's and folders, too,
can have a capability descriptor
that can override any app's capabilities .
. {rom, wom, xom, xwm} could be the keywords for the
various types of access constraint for
read-, write-, execute-, and write&execute- only-memory .
. instead of having any combo of rwx,
consider that an execute priv'
implies a read priv' .
. the original unix way had in mind
-- in addition to the self, group, world groups --
a sort of 4th group: executives
those whose activities depended upon
what file they opened .
other ideas:
. when does the system need an exe'able permission?
. if that app is an executive,
then it can execute any type it recognizes as exe'able .
todo:
. review previous ideas of
how an obj's name can include access types;
(just as it includes its datatype);
eg, f.txt mean obj"f is type"txt,
so then how does its name explain
access constraints such as (rom vs rwm)
and (in vs out) param types ?
10.21: adda/types of access constraints/intro:
. the fundamental operation of unix
revolves around this:
a user with privilege status of
{owner, member of owner's group}
is applying an app to a file,
if the app and file permissions permit it .
. a file may be located in
either a private or public space:
a private space is usable by
whoever has the owner's key .
. the key holder claims self belongs to a group;
and other users can belong to the same group .
. files can grant separate permissions for
{ owner (what the keyholder can do)
, in-group (what the owner's group can do)
, in-others (what anyone can do)
}.
. an executive is a special type of app
that uses its input data
as the source of instructions it will follow
including the decision of
what it will affect on the computer;
whereas non-exec's will decide their behavior
only from their constant program code,
along with their memory of their previous behavior,
and changes in the machine's state .
. most of these non-exec's are just editors,
affecting at most the files they are given,
some private mem, and the screen buffer .
. files should be tagged executable {xom, xwm}
only if their data is suitable for
instructing some executive .
. a user can be thought of as being
a sort of executive app .
. the user's actual executive power
is determined by which group of app's
the user is allowed to execute
which in turn is determined by
the executive apps' file permissions
and whether the file considers the user
to be {owner, in-group, others}.
. executives can be calling other executives,
just as the user calls them,
so, suppose a called executive
is considered to have the same priviledge
as the {executive, user} that called it;
then, a human user could run a public app,
and when that app tries to access
the user's private files,
this would be allowed .
. the exe'able permission is saying
that if you are an executive
you can read this even if
your caller doesn't have read permission;
likewise,
having a read permission is saying:
you can read this regardless of
whether you're an executive or not .
. so, all of that was the typical
unix permissions scheme;
an alternative is capability based security:
. an app can only access
the files that are within the folders that are
listed in the app's capability descriptor .
. file's and folders, too,
can have a capability descriptor
that can override any app's capabilities .
Labels:
adda,
capabilities,
type
Subscribe to:
Posts (Atom)
