2009-12-27

audio.editor

8.9: adde/audio.editor:
. there must be a way to visualize sounds;
instead of seeing them as frequencies;
you'd take the way the freq' changed,
and then give that as a graph or colored graph,
where colors would represent dimensions of
sounds that were special to humans .
. neural nets could help tag the frequencies changes
that convey certain feelings .

adde's journaling

todo.unreadable: 8.7: adde/journaling/assuring privacy:
. how to assure logging without key logger vulnerabilities?
3 types of log:
( sw config
, user cmd input
, user data input (content and pass )
) . the system must insure (verify)
that outcome doesn't depend on user content .
. the exception is when content includes scripts .
. if script affects only content
then the only thing to report is the allowed cpu and mem access .
. general scripts are part of software,
and become part of system config'
-- or need log of subset of system accessed .
log of pass and content is replaced with
cmd of get these from user .
--. inputs assumed to filter checking type and string`length .
. log also includes a ptr of use only locally
describing where the content is stored .
. the pass needs an id too (which pass did I use ?),
you have an id made like file names (creation date, owner) .

coordination lang's

8.8: bk.adda/concurrency/replace c`threads with c`coordination co.lang:



Another approach that puts more emphasis on the avoidance of deadlock
is promises, as realized for example by Mark Miller
in the E programming language .
These are also called futures,
and are originally attributable to Baker and Hewitt
Here, instead of blocking to access shared data,
programs proceed with a proxy of the data that they expect to eventually get,
using the proxy as if it were the data itself.

All of the above techniques prune away some of the nondeterminacy of threads.
However, they all still result in highly nondeterministic programs.
For applications with intrinsic nondeterminacy, such as servers,
concurrent database accesses, or competition for resources,
this is appropriate.
But achieving deterministic aims through nondeterministic means remains difÞcult.
To achieve deterministic concurrent computation
requires approaching the problem differently.
Instead of starting with a highly nondeterministic mechanism like threads,
and relying on the programmer to prune that nondeterminacy,
we should start with deterministic, composable mechanisms,
and introduce nondeterminism only where needed.

The message is clear. We should not replace established languages.
We should instead build on them.
However, building on them using only libraries is not satisfactory.
Libraries offer little structure, no enforcement of patterns,
and few composable properties.

I believe that the right answer is coordination languages.
Coordination languages do introduce new syntax,
but that syntax serves purposes that are orthogonal
to those of established programming languages.

8.11: Multiagent System Engineering: the Coordination Viewpoint

. from the perspective if this paper,
c.lang would be for describing the agent's individual tasks,
whereas the coordination.lang is describing the agents' social tasks .


datatype syntax

8.30: adda/syntax/types:

. isn't typing for struct and type similar?
literals are
rect: a.(a, b, c), -- use as a`a,
type: a.{op1, op2} -- use as ?
. rect is like array not type?
. need to be orthogonal about naming and typing;
eg, worry about this: a#(dom).rng
. what if need to type array or function?
with current syntax it can't be but part of the name .
. array.type = #(dom).rng ?
. biop.type = (t,t)-> t .

. 1st class typing is confusion?
. you must first see what all types are in terms of adt
eg,
array, rec, vector are lists,
rec is list of object named by set
array is list of object named by scalar
vector is list of obj named by scalar
.
function is set of object named by set
enum is set of ordered symbol of type integer

. then type def according to that system
. for syntax that is more consistent than convenient:
eg, may need to use names in typedefs such as rec, enum, array, etc,
rather than id these types implicit by struct .

. the fundamental of every type is
(
head:
set of symbols used as literals
set of symbols for operations on literals
body:
how literals are coded ,
how operations are implemented .
)
another dimension:
. struct typing can be either by having types match
or also names match,
like param assignment vs record assignment .
ie,
ordered list of symbols
vs ordered list of values (literals)
vs ordered list of objects (literal encodings) .


hierarchical modules

8.30: adda/ada`module architecture:
. instead of private part in head
they mean the head is a public contract
and part of the body can include a contract also .

. if types aren't defined in head,
compiler expects them def'd in body`root

8.30: adda/syntax/hierarchical modules:
t.type/newlib`=(..),
t.type/newlib`body`=(..),
unlike ada,
using the type t auto'ly makes all of lib available .


9.4: adda/import/as folder structure:
. the primary way to do implicit import
is to declare a var to be a type,
and then that type's module is imported .
. but what about other modules?
. the most intuitive way of importing
is to put the pkg's or their links into the program's enclosing folder,
. instead of putting the pkg itself there,
there would be an interface file .
that way, if the program is moved to a new user,
instead of just importing the name of a package,
you have the package's complete socket description;
making it harder for mix-up's to happen .
. this could still be done using ada's style:
"(import pkg) would make sure there was such a pkg header,
and copy it to the program's enviro.folder .
. the project folder contains a subfolder for each library unit;
. a subprogram has a separate folder that contains
separate parts of the program:
file for code
files or links for pkg heads,
subfolders for each local subprogram .
. here is the intuitive import:
"(../`+ my.pkg)
. it reminds you there is correspondence between the program structure
and some of your folder structure .
. you can do this by hand,
then go into the header and weed-out all the entries
that your program won't be using .
95:
. the includes go in a jacks.folder ? .

ada's concurrency

8.30: bk.adda/ada`concurrency:

. ada`partition has a separate enviro task for elaborating type mgts;
each partition has its own instance of each type mgt process .

. rpc (remote proc call) between partitions is done by
having some unit being declared with the rp.interface pragma .
. rci units can belong to only one partition;
ie, the unit should be named after the partition it's working for .
. rpc can be async when declared with an optional pragma .
. ipc can be done via passive partition sharing rather than rpc;
that means a unit containing only non-var's (pure)
or only passive vars (atomic or passive protected)
. passive protected var's are those that don't have entries like task,
just primitives that insure mutually exclusive access .

. pointers that are passed across partitions
must be url's;
think of pointer as being a type.class .

funarg problem resolution

8.29: adda/1st-class functions/funarg problem resolution:
. the 1st-class function is said to involve the funarg problem;
for example,
the lisp`closure handles externals for the funarg problem
by replacing references to externals
with var's initilized with the external's current value .
. but, I'm thinking of 1st-class as meaning
that the function considers its value
to be the algorithm it was assigned .
. a function's type includes its permutation of inout types;
where this permutation includes more than its signature (input, output),
but also its expected externals .
. externals would work like file accesses:
when it came time to instantiate the funtion,
the caller would be expected to have a local whose name
matched the name of external being expected .
[12.19: in summary:
. the main issue was how to share code that is
dependent on the source context .
. the typical half-hearted way is to initialize the dependencies
with the current values;
whereas the 1st-class way is to just consider the dependencies to
like generics parameters .
]
. a separate issue is desiring to change algorithm values
by partially instantiating them;
(eg, f(x)`= g(x, x2=c)) .

9.27: adda/syntax/1st-class functions:
. what was the confusion about functions ?
if not declared using arg may need f`body or f`map;
otherwise, it works like ptr:
f(x)`=
f`=
.

11.12: adda/referring to caller:
. in a reflective system with first-class functions
the anon'code may want to know who called it;
is there always such a symbolic path?
yes:
because it cannot be evoked without referring to that path .
[you could have a request to call
all proc's in a random tree,
so the path could involve a lot of trivia .
. or it could look like
a lot of code was coming from the same symbol
if it was a pointer traversing a tree of code . ]
. what if wanting generic :
if (path)`type is fun`type
then the (path) @ (arg);
[12.24: the conventional use for @ is key@set
so then for calls, arg@function
]
. a function's type includes
not only arg and return type,
but also inout modes and expected externals .

control.struct's

8.28: adda/syntax/subroutines:
. should there be syntax to make it clear
that a subroutine is a local symbol?
. should the syntax be the same as for record members ?
. from the object view,
program instantiations are activation records,
and subprogram instantians are extensions
(components) of that act'rec .
[8.29:
. it had prev'ly been decided that algorithm internals
could be accessed with record field notation .
. the question now is how internals can refer to themselves:
it would be useful during collisions among imported names .
. the explicit names could borrow from unix:
just as [./] is the current file directory,
[.`] would be the current activation record,
and [..`] would be the enclosing activation record
(ie, the subroutine's parent scope) .
] .

9.2: adda/syntax/algorithms recur:
. "(self) as a reference to recursion may not be the best choice .
. what about when a type wants a pronoun for its own type?
self might be a good term for that .
. and to use self to refer to algorithms might strike some as not object-oriented,
[9.2: or not even very accurate:
when you do a task, is your task self? no:
the self is either a type`mgt, or a processor .
. instead of "(self) for recursion, use recur .

9.6: adda/syntax/if:
. if b: s;
if ( b: s -- then
, b: s -- elsif/then
, s -- else .
);
. this for those who don't want to use
b ? s;
no? b? s;
no? s .
. nor want to use:
b? (yes: s
, no: b? (yes: s
, no: s
)) .


9.6: adda/type"to/goto`tag`decl':
. there needs to be a way to distinguish between
various uses of colon: (goto tags, case stmt's)
. the goto tag is declaring a new symbol
that names the address of the place it is declared at .
. other uses of colon's are expecting pre-existing symbols .
. one brief way to type-tag a goto tag is "(to)
since that reminds one of an address .



9.6: adda/exceptions/routine-oriented:
. part of a sub's signature needs to be the exceptions it won't catch .
. but this could chg with impl,
since the exceptions it could generate depend on
who it decides to get its services from;
so then need a sub`exception detector:
.(sub; -- run the sub,
exception?
( sub`ex1: s
, sub`ex2: s
, sub`other: [type-specific ex's]
-- for exceptions from sub's servers unspecified .
)
) .


9.6: adda/exceptions/agent-oriented:
. the dialog model of exceptions would be like this:
resume if caller handled exception and requested a resume
no:
that would be a dialog not an exception .
. there are 2 styles of interactions:
. the exception is like the mac`alert .
. the other call-backs are dialogs .
. remember that the user is going through an agent;
eg, the agent typically builds a function call by
presenting an additional param dialog,
and then combining that param with any selected objects
for use as arg's to make a call .
. the agent can also help by turning exceptions into dialogs;
eg, if the app' can't find a file,
the agent can remember the request,
and restart it after asking the user to find it on another volume .

9.9: adda/interface/spec's include stack usage:
. another part of proc signature would be stack useage
as a function of input size .
. this would be a useful option when reusable with other components,
so that you could see if the sum of your components and job size
might put a strain on your memory .


9.11: adda/syntax/loops:
for .. while .. : body
. body can contain for, while without the colon,
and it has the same effect as conditional exit .
. if it has a label with type"loop, then it indicates start of loop,
and the stmt may contain conditional exits that apply to that label .
mis:
. having {while, until} in the loop will be confusing
by looking like a nested loop with a null body .
. better to just have the {exit, enter} stmt's with conditionals
for any controls not in the head of the loop .

9.11: adda/syntax/loop/{for-step-except}:

. the head of a for-loop can have these modifiers:
{step, except}:
. step works like in basic .
. for i.nat except i is odd : ... .

. real step real except eg,asymptotes .
. (step -1) goes in reverse .


9.11: adda/syntax/loop/for-loop with multiple var's:
. for-loops can have multiple var's,
and they sequence all vars in parallel until the one var ends .
eg, for (i= 1, j= 1..2) -- does 1 loop usign param'(i=1, j=1) .

9.22: adda/syntax/loop/mixing for and while:
. to solve that problem where using for and while in the same loop head
was confused with be 2 nested loops,
treat the for() like a bool,
and use it in conjunction with other bools;
eg,
for(control var) .. and (bool) : body
while () and () : body

10.5: adda/syntax/goto:
. labels that are expected to be entered from below
should be declared as loop.type,
eg, (jmp.loop: ... enter jmp) .

10.7: adda/syntax/goto labeling:
. if a label is not expected to be entred from below,
then it's type is entry else loop.type .


10.16: adda/for.loop and code.literals:

. the for() part implicitely creates a subscope,
and the loop`body -- while usually a code literal --
can also be a symbol of
type expecting an external with the same name as
that created in the for()-part .
. the explicit meaning of this:
(
for(i) and b ?? body
)
would then mean this:
body.!`= '(.<<i>>.<<b>>:  body`method(i,b) );
.(
i.t`= i`first,
b ??
( body;
i=i`last ? exit;
i`++
)-loop
)-block .
) .
10.25: adda/syntax/minimalist loops:
. if wanting to minimalize reserved symbols,
could rquire all loops to be formed by heading a stmt in a loop.type label,
eg, '(x.loop: body)
and then some sub.stmt in the body
has to be using the enter.stmt .


11.5: adda/syntax/block stmt:
. the block.stmt allows externals undecl'd;
then no way to tell local's decl'd .
.(decl list: code),
(.(params): code),
'(code) .
. use of colon conflicts with use a label,
also, we don't need a decl'section if using
the rule of
we mention type only when intending a declare .
(eg, doing an .( ... i.int ...) declares a new i.int )) .


11.10: adda/sytax/loop/reloop like recur:

. an enter.stmt from within a for-loop
is the same as a goto targeting the bottom of the for-loop;
additionally,
reloop from withing a for-loop re-initializes the for-loop
-- the same as a goto targeting
the line above the for-loop .
. at any given point in a loop
you can either exit loop,
enter loop for next iteration
or continue with current iteration .

. reloop is to loops
what recur is to anonymous functions .
[11.14:
. if it's like that,
then it should be used for nested loops, right?
could also have both: reloop and loop`recur .
]

while-loop with optional control scope:

. the model of a while-loop is
while(truth x) f x,
-- this is one place where externals
are use freq'ly in a block
f has access to an external
that controls its number of loops .

. the while-loop is another place like for-loop
where one should be able to declare
a var in a while`param that is visible to body .
. it might be simpler to keep that in for-part,
but some like to see a for-loop's control var
as not being modifiable by the loop`body .

.( x.truth`= true; for () and x ) ??
body(x);
-- this gives an option to use as control vars
either existing externals or loop-locals .
. in etree (the lisp view of the code)
( .(...)?? b )
--. that is known as a decl-loop.stmt:
decl-loop (head, body),
vs loop(head, body ) .

. it would be simpler to wrap block around loop
instead of integrating it into head;
but, that would be noisy with nested loops
-- this way gives it that c`for-loop compactness .

. what is the syntax of a for-loop that is
using current value of external
and stepping it?
for(x in {x .. limit, step}, ... ) ??
body
for (x.t) declares local x
and steps through all values of its type .
. for (x, y), steps x and y concurrrently .


11.15: adda/syntax/multi-case:
. as in loop,
enter and exit can be used in a case.stmt:
(enter) drops to the next case;
(enter ) goes to a given case;
exit has the same effect as null stmt .

adda/syntax/case:

. case as a reserved word could be a dummy symbol for the case result;
so:
x? (case <= c:...)
the use of case allows relating to arbitrary expr
so if wanting to use vars instead of literals,
use case = var .

. the way to impl adda case could get complicated:
. if the case allows variable goto targets goto x
that actually means having an array of ptr to fun,
exec'ing f#(x),
and generating a function for each case .
. mixing (enter) with (case ranges) could be confusing work .
. in vari-case,
what if multiple cases apply ?
do both in the given order ? .

11.22: adda/syntax/labels:
. to have goto labels be alarming the way ada does,
have a goto.type;
ie, the type's name is an empty dbl-angle.bracket .
. when a 1st-class function
points at a quoted goto symbol,
then the effect of eval
is to jump to the symbol's current value .
. a function that can be assigned a goto.type
must be declared goto.type .
. the way to impl' this in c
requires rolling your own variable goto:
. take all the jump.labels in the block,
and give them an enum value .
. then in the c code,
a variable goto is really a case stmt:
if( var = enum#1 ) goto label#1
else if ....
--
one way to avoid is this:
. divide the code into blocks that are between goto labels;
then jumping to a label has the same effect as
calling all the blocks below that label;
but, it also implies exiting the current routine .

12.9: adda/syntax/exceptions:
. mac-style exceptions are using this model:
. a type'mgt declares exceptions as callback functions;
meaning, they are either undefined or have a default literal,
and can be redefined by the current scope .
. ie, instead of having an ada-style exception section,
you'll see
t`exception#i`= myhandler;

12.14: adda/syntax/case:
. in a case stmt, "(is) can refer to the case:
eg, (is >= x : ...) .

continuations

8.28: adda/continuations:

. how is adda, while coding in c,
controling the stack itself?
. the ultimate goal is to support continuations;
the implementation ultimately involves
making your own stack from heap space,
the design of which can be recalled from assembly programming .

. a key to visualizing the design
is first making a stack system to support native types;
[8.29:
ie, to deal with allignment needs,
an activation record sorts the members according to size,
so that padding can be minimized .
. an array of record of members of varying size
can be restructured as a record of arrays .
] .

compiler optimizations:
. adda has 2 compilers:
. one is straight c for trusted subsystems
then safe c for arbitrary code;
eg, continuations allow monitoring code
and protecting the system from stack overuse;
whereas trusted modules use c's stack .
. generally the trusted code looks more like normal c code
and is allowing the c comiler to do its usual optimizations .
. both adda compilers use the same adda-> etree front end,
then there are various back-end etree transforms
depending on {efficiency, safety} needs;
the final etree is then converted to c code (text)
and given to the C compiler .

10.22: addm/continuations:
motivation:
. how are continuations impl'd?
when is that needed ?
wouldn't it be more efficient for the concerned designers
to break their algor' into smaller chunks
and if one chunk fails,
then start from the output of prev'chunk?
no:
in a mutually recursive algor'
that sort of sequential decomposition
seems to be a daunting, complicated challenge .
. besides,
the mechanisms needed for continuations
are also good for debugging by showing stacked calls .
. conversly,
you should also have modes available,
so that continuations are an option
-- perhaps that mode is low priority ?

addm-based:
. continuations are a perfect match for addm
itself being a lower-priority project than adda .
. continuations really require working at the assembly code level,
exactly where addm is working at .
. they involve implementing your own stack
and computing all the return addresses of your calls
just like the assembler does .

pointer-based vs open inheritance

8.27: adda/oop/efficiency:
. how much efficiency would be lost by
referring to all obj's by pointer?
. doing this would allow there to be
separate address spaces for diff'nt native types,
avoiding the wasted space due to allignment constraints;
. the pointer could be small
because there are only a few places it could point to:
{which heap in {main, sub, subsub}};
and, which type in {float, int, ?} .
. depending on how small the pointer was,
it might be possible to use the spare space
to hold the obj's type.tag;
ie, one 32-bit word could hold
both the pointer and the tag .
[12.19:
. in the typical oop impl',
all obj's are pointers to some heap-based obj'
so then the type'mgt can fully control
not only the organization of the obj'
but also how much size it takes up
per instantiation or time point .
. given that the typical pointer is 32-bits,
this freedom is not cheap .
. but the typical oop system is interested in
not just polymorphic types but also inheritance .
. this is in contrast to the case I'm most interested in
called type clustering:
an example is the type.class Number,
which includes the subclasses:
Reals, Quotients, Integers, Complex, Irrationals .
. Number is an abstract class that has complete control over
what it's list of subclasses are .
. this can keep the type.tag size managable,
and it means Number can decide
whether the use of pointers would be space-efficient .
]

protected var's


8.24: adda/concurrency/protected var's:

. how do protected var's work?
it is an obj' shared by multiple processes
enforcing mutex (mutual exclusion) by a service request queue
(conceptually if not practically);
one process doesn't get to start a job until
any other processes have had their job finished .

. there is a serialization factor:
. after an access has been made,
the accessing process expects the change to be recognized;
ie, after being allowed to make the access,
any other transactions it makes with other processes or external var's
are assumed to be under the influence of that change .

. if the protected var' can't finish the job,
then it needs to raise an exception
(replying to service request with a reason for failure
instead of the expected result);
and if that process doesn't have a handler (for that exception),
then the exception propagates up to that process`parent.process; etc,
and possibly up to the user,
explaining what sort of bug there is:
the entire program is allowing a component failure
(by not catching these exceptions)
which may compromise the output quality .
. it needs to have a time-out in case it freezes:
if there is a long wait (eg, 1/10 sec),
then the run.time mgt would check to see if it's waiting on resources;
if not, then it may be frozen .

. there should be a way for the programmer
to communicate that a freeze has not occured .
. this would be similar to the way a user-friendly program
will use a progress meter to show the amount of work to be done .
. if it doesn't know the workload size,
it should give a pointer to the place where it is getting the work .
(assuming the users may know more about the potential size of a source
if they know source's full pathname) .

. in addition to accessor operators,
protected var's can have [/]entries .
. while accessors are alway synchronous,
entries can be done either sync'ly or async'ly .
[this departs from ada's definition of protected var] .

. synchronous messages are like subroutine calls:
the calling process waits for the call to finish
before going on with the rest of its routine .

. asynchronous messages are like message machines:
letting the caller drop off a service request
and then continue without waiting for a response .
. the requested service either has nothing to return,
or has the return assigned to another protected var':
one that doesn't allow access until the assignment is done .

[12.19: todo:
full implications of this aren't clear;
very important that async' is carefully proofed;
since this is what can make concurrency tricky .
]
. {out, inout}.mode parameters are also returns;
so then, if a process is blocked,
it could be trying to access variables that are
waiting for an async'entry's return .
(if the lang allows streaming out.mode param's,
then a stream must be able to receive an [end of stream].signal ) .

. the run-time mgt, perhaps through the scheduler,
should be keeping track of a process's pending async'service returns .
. the {service provider, protected var} has a lock on
all the var's being targeted for the returns,
so the scheduler is urged to prioritize the
{message, process owning the service request}
in order to avoid causing the caller to block .
. when a block does occur,
the scheduler must know that unblocking
depends on that job finishing,
or returning an exception instead (indicating the job failed) .

. designers using async' messaging
should keep in mind that if any of the caller's future processing
depends on the job being processed,
then the entry should be designed with some output param';
and then that output will tell the caller
when the job was processed .

. the accessor operators of the protected var'
are expected to be brief;
but, assuming they are not,
the protected var's become bottlenecks for the concurrency:
. any process using an accessor has to be suspended
until that accessor job is finished .
. the scheduler's time-slicing tree is being rearranged
so that protected var's that are becoming
bottlenecks to concurrency
must be given priority equal to that of its caller`process .

mem'mgt

7.6: adda/implementing act'rec`subheaps:

. reviewing this:
"(
. consider rules for mem allignment and unions .
. malloc gives a block alligned along widest type .
. how does heap mgt create a mem space that type mgt's can use ?
. should type-mgt use sets of arrays as records
and use separate arrays for each function call?
. instead let mem mgt --not type mgt --
worry about how rec's are impl'd .
. does this mean having all types inherit from supertype mem?
)
response:

. one of the first test programs to try in c,
is to impl' your own malloc
from a file.block you get from c's malloc .

. provide a foundation within the block's sub.heap
for a version of malloc that is type-specific:

. the block`subheap is extensible by being build of file.blocks,
so then a pointer is 2 parts: (the block, offset from start of block) .
. the type-specific subheaps can be extensible this way too .

. being ready for all these various sub.heaps
need not entail much overhead since
c`unions could hold pointers of every type,
and then you build a tree dynamically as needed
the same way a file system is built from just one root pointer .
. the root of a file system is merely a folder.ptr (4bytes?)
. a folder.type is an extensible array or list of
union{file.ptr, folder.ptr} .
. then file.ptr is a list of blocks .


8.21: adda/auto.space recycled efficiently:
. one way to control the location of an obj'
is to declare the obj in one scope,
then use a sub to make assignment,
so if it involves extensible mem,
it will be based in the subheap local to the obj's scope,
( if it were based in a sub,
then any passing of it would require a copy;
whereas, can share when at a root scope .
) .

8.26: adda/mem'mgt/type.tag`efficiency:
. it might be best to not worry about
how much memory is used by the live data;
data not currently in use can be packed,
so that only live data is unpacked along proper size-dependent boundaries .
. another mem'saver is that some machines
aren't concerned about allignment .
. yet another way may be how structs are managed:
the only reason allignment becomes an issue
is when the struct`component needs to be operated on in-place,
without extracting it from the struct;
so, adda could be translating packed adda struct's
into unpacked virtual registers .
. adda creates these packed struct's by declaring an array of byte,
and then moving other sizes of var's as being array of byte .

8.31: adda/mem'mgt:
. size of type has 2 parts:
the act'rec and the heap (rootsize, bodysize) .
. whether or not it grows dynamically,
this gives typemgt options as to where to get mem from:
if client-side, then problem is trivial;
but if init is keeping some of obj in server space
then runtime has to ask type`mgt for help with closing:
calling type`close(obj) .
. given an obj', type`mgt has to find links to server-side alloc's,
and then use those links to recycle the link's target obj' .
. a type`mgt is more than an ada package,
in that it needs a chance to start a process
rather than just run some mgt`init routine .
. the type`mgt`body has locals that can be accessed by
the type's member`operations .
. it needs the option of being a routine
(eg, for occassions when it doesn't do it's own mem'mgt)
but if it decides to be process,
it needs to define some way for the run-time to tell it
when its clients are done, and should terminate .
(eg, for giving it a chance to
free the mem being used by it's own server-side mem'mgt) .
. if it intends on being a process,
it would use process control stmt's,
which would include responding to
the pre-defined entry"(sys``terminate) .

8.31: adda/mem'mgt/efficiency concerns:
. how is interaction between {sys, type`mgt},
when type`mgt needs client space?
. on the client`side what are the op's that change size?
init's and other out-mode op's
that pass mgt a ptr to local space .
. an obj' is expanded either by
being an array given extended length
or being a node-struct'd subheap given a new node .
. the mgt is writing in a subheap within the client heap
and all ptrs are safely relative to that subheap
except for external tagged ptrs (url's, external obj's, ...);
ie, the tag indicates what subheap or volume is meant .
. when would type`mgt want to base an obj' in a type`mgt heapspace?
. if the obj' is partially in {client`space, type`mgt`space}
then when client exits,
runtime has to chase down entire subheap for things to recycle
instead of one clean flush .
. there could be obj's from diffn't act'rec's (local vs main);
so, part of tag must be
{actrec
, ptr to obj's subheap within act'rec's subheap,
} .

9.7: adda/mem'mgt/limited subheaping:
. does there need to be a limit on sub nesting as in c ?
that does increase the possible number of heaps;
how about heap level peaks at 3 -- main, sub, sub^2 ?
. after that, heaps are shared;
ie, sub^{3..n} all use the same heap:
all these deep scopes have their locals tagged with scope#3;
so that, their obj's don't get flushed until scope#3 exits .

9.7: adda/mem'mgt/subheaping for efficiency:
. not only do scopes get heaps,
large structs like arrays get their own heap,
so that a mov can be done by relinking a ptr from one scope`heap to another .
. how are heaps arranged such that
it's easy for assignment to recycle over-writes for the new val?
[9.10:
. in traditional oop, the object system is bolted onto c,
so when you assign one obj' to another,
you are overwriting a pointer .
. in a real oop system, the type'mgt is in control of the assignment operator .
. it's using that assignment's destination.ptr
to access the ptr's target;
. it copies the source`body to the destination`body .
. how does it extend the destination's body
when the source`body is larger?
. also, since the source is a copy
wouldn't it be more efficient to just copy the source pointer
and recycle the destination ?
that will be more efficient only if
the obj is large eno' to warrant it's own subheap .
]

9.7: adda/mem'mgt/heap.tags:
. does an obj' need a heap.tag?
or can it be like the type.cluster tag,
where due to compiler or runtime typechecking,
the tag can be implicit because the supertype is invariant ?
. in these implicit cases,
the function that tells an obj's supertype is impl'd virtually:
. if the code calls that function,
the compiler replaces that call with a
ptr to the supertype`name in the code's symbol table .
. besides a symbol having a supertype,
it also has a scope depth .
...
. another strategy is to start by including the heap tag,
and then during maturity of the compiler design,
you can see when it can be safely optimized away .
...

adda/mem'mgt/subheap not per act'recs:

. the mem design first states its goals:
make it easy to grow and delete obj's dynamically
by making their allocation not part of a scope's alloc,
so it is heaps that are freed, not obj's .

. notice in traditional stack,
todo: maybe that's discussed elsewhere ?
anyway, there can be some large sys-wide ptr's
for doing things by heap;

. maybe instead of a fixed number of scope levels,
compiler could decide amt of heap sharing
by having it depend on how mem-intensive scopes were .
. having too many heaps is inefficient
when act'rec's are small and fixed-size .
. the stack itself is on an extensible heap
which makes it have pages
where the first pages can be disked when mem gets low .

9.9: sci.adda/mem'mgt/seg'd stack:
. how to make stack segmented?
use arrays to make rec's ?
9.12:
. but that idea only works when all the records are the same ...
or did I mean:
. use array of pointer to arrays;
makes it all look contiguous by dividing addresses into
(segment, offset) .

9.9: adda/mem'mgt/stack with trailer and tagged pointers:
. the pages for stack size should be large
while pages for act'rec's should be small
since there could be many of them due to recursion .
. fixed-sized act'rec's should go on the stack
(this includes also those in which
size varies over calls but are fixed-sized at time of call) .
. with most types that are oop'y
(where a member of that typeclass can keep private
whether or not it can grow after the call's arg is laid on the stack)
the only way to do that is to have the act'rec be rom:
ie, when a sub' modifies its arg, it's really declaring a local;
[9.9:
conversely, if the formal param's are known to be fixed-sized,
then oop'y actual params can be converted to the efficient type requested .
9.12:
. I was thinking of simple cases like int range fixed,
where you could assume the type'mgt would alloc' as much needed
for any value in that type;
however, do you really want to complicate things
by requiring the type'mgt to communicate privates to the mem'mgt ?
. better to fall back on idea of using tagged pointers
such that you can have stack-based obj's able to spill into the trailer .
]
or oop'y types must have 2modes:
. the record's fields can all have sizes that vary across calls
because they are dope vectors that point to a place further down the stack .
. at the end of the act'rec is a trailer pointer
which points to a dynamically growable subheap .
. you can tell when the dope vectors are pointing into trailer space
-- instead of into stack space where the initial value was put --
because the dope pointer is negative instead of positive,
(you would reverse the negation
before using it as an offset into trailer space)
. if extending obj'size by node additions
then the polar-ptr idea will let node-base structures
flow seamlessly from the stack to the trailer .
. if array is typed as being growable dynamically
and since they are expected to be contiguous,
these arrays should always be initialized on the trailer .
[9.9:
. it might be possible to routinely have arrays in seg's;
but then for a possibly growing one,
the init on the stack has to be a complete seg,
even if it's very small .
9.12:
. if mem'mgt profiling expects an array to grow much
it will be not only on the trailer's subheap,
but in its own subheap that is a child of the trailer .
. that way, growth of the array will not require
copying the array to a new location . ]

9.10: adda/mem'mgt/unpacking for allignment:
. after reviewing intel performance needing size-alligned data,
http://stackoverflow.com/questions/1054657/memory-alignment-on-a-32-bit-intel-processor
I wondered how to use an un/pack record solution on the stack .
. the stack would keep things packed,
but then the currently displayed scopes
(the act'rec's not deep under the stack due to recursion)
would be moved to an unpacked stack .


9.10: adda/mem'mgt/sub.heaps:

. (9.9.7/ adda/mem'mgt/heap.tags) might be a confused idea;
this thread of ideas started with scopes having heaps,
and then heaps needing scope.tags .
. it's still not clear to me how subheaps work;
so, review:

. the type'mgt is getting ref's to obj's on the stack;
normally this is:
stack`scope#i + [offset where local is] .
. the traditional worry about which scope an obj' is in
occurs when passing a ptr from scope#n to scope#(n-m)
so that when the scope closes, the ptr is dangling .

. if a function returns type"t, then mem'mgt
needs to consider the return.obj's heapspace to be that of it's caller;
ie, the obj'being returned (call that self?)
is going to be addressed as
stack`scope#[caller's level] + [offset of temp'var taking the return] .

. the case where the object is huge, and gets it's own subheap?
. how are subheaps organized ?

. the purpose is to make an act'rec extensible:
it appears to be an array, but it's actually a string of arrays,
and any time mem'mgt wants to make the array longer,
it allocates another segment to the string .

. after that, it's using the array just like it was a slice of the stack .
. unlike recently conjectured,
mem'mgt doesn't have to search the subheap for pointers to more subheaps;
instead, it can keep at it's head, a list of the subheaps it contains;
so then, dealloc just goes down 2 strings instead of one .
. another thing it can do is dynamically decide
whether an obj's base.mem will be { an act'rec`trailer, subheap } .

. mem'mgt is deciding what will be a subheap,
and therefore won't have any surprises;
it's decided on during compilation or run-time profiling .
. how is type'mgt requesting additional space?
. any obj' that can vary in size will have, in addition to its type.tag,
a size.tag that is telling mem'mgt how large the obj' is .
. if the mem'mgt decided to give the obj' its own subheap,
then the size.tag will be some value that flags this is a subheap.ptr .

. when type'mgt accesses one of its obj's components,
the compiler will have translated this into
something that mem'mgt does with its subheap .
. when type'mgt extends an array by concat',
this involves mem'mgt extending the array`subheap if needed
and copying the data .
. when type'mgt extends a tree
by assigning to a subtree.ptr a subtree,
this involves a unique opportunity for mem'mgt:
todo:
. how is subtree copying work efficienty
if you weren't using the src anyway,
couldn't you just link it into the destination?
. the pointers, if they are to be reduced in size,
are relative to the src's subheap .
. if speed were needed over space savings,
then tree.ptr's should not be relative .

9.12: todo.adda/mem'mgt/subheap structure:
. the root string can use itself as space when small
then when out-grows self,
becomes string of ptr's, one of which points to old self .
. 256 pointers with in 8bit ptrs ,
then can have 3story tree with 24bits, etc,
. the only way to insur efficient malloc is to malloc huge chunks
and impl your own?
didn't plauger warn against that ?


9.13: adda/mem'mgt/stack`structure:
. if going the stackless route,
where only trusted code uses the c`stack,
it would be simpler to have 2 stack parts: (control, data)
. the stack#control has (rtn`addr.ptr, act'rec.ptr ).
. the act'rec.ptr may seem like a waste for sub's having no arg,
but the act'rec also holds the locals,
and nearly all sub's have some local state
(rarely all the domain will be externals) .

9.13: adda/mem'mgt/impl'ing subheaps and chunks:
. what plauger said applies only to hoarding:
. if you alloc only large chunks to impl your own malloc,
then the c`malloc can adjust because
even though they are out of order,
all the chunks are the same size,
so there are no large holes in the heap that can't be recycled .
. make the main subheap mgt by
allocating chunk mgt as an array of chunk.ptr;
then alloc chunks as needed .
. chunk'mgt sees a chunk as an array of subheap seg's,
and has ptr's to each or otherwise arranges self to know
what seg's of what chunks are free .


9.21: adda/mem`mgt/cost of segmenting array:
. array access is root + index;
seg aray is divide bits to (upper, lower ):
(upper selects seg
,lower is offset from seg selected
) . seg(upper)+lower .

9.21: adda/mem`mgt/modular act'rec's:
. instead of actual params,
have all params be a pointer to record
so watching stack depth doesnt depend on param .
. should include locals too? yes (top ones),
. those work the same way but separately:
auto's are translated into malloc/free pairs .
. it doesn't have to free what it returns,
any param getting a ptr from a call knows it has to free that pointer .
(again, this is what adda is doing for the programmer
translating adda into safe and possibly efficient c code )
. other ptr assignments involve
overwrites that are done by function, not c assignment;
and, this function frees previous ptr's before overwriting them .

9.21: adda/mem`mgt/operation-rich types done by stack
. instead of calling numeric functions the usual way,
use the calc rpn model .
(num`enter x; num`enter y; num`+; return x) .
. traverse left to right using tree recursion:
use circular array as stack (mod array`size,
pop just moves x.ptr to previous cell) .
. visit left;
data isa?
(value:
push
, biop:
op result replaces args on stack
, uniop:
op result replace one arg
);
cell has 2nd arg?
visit 2nd child .

9.24: adda/mem`mgt/efficient stack watch:
. when using malloc for every arg
then you should also tally what is used
so your system can tell you how much heap the prog is using
. it's just a ballpark figure as some of the actual mem
is heap mgt overhead whose size is depending on c'system
but at least having a big-O idea of the size
along with malloc's telling when mem is out
and having pre-saved mem for activating the heap-empty.handler,
will keep you in control during a mem-out
rather than being core dumped when you overflow the stack .
. alt'ly,
it's more efficient to let args and locals stay on stack
as long as your compiler determines big-O size
and includes that in the number that is tracking your stack depth .
padding:
. the c`compiler's use of padding for efficient allignment
may cause an underestimation of the act'rec's actual size .

10.9: adda/efficient pointer sizing:
. Cerf said [@] news.tech/KurzweilAI.net, Oct. 7, 2009
it was inefficient to have vari-sized internet addresses,
but the way to do it is like phones have an area code:
you first have a fixed-sized area code to match up,
and once you get matching area codes,
you set a sign bit that says
start looking for the right sub.area code (the leaf number) .

10.23: adda/mem'mgt/implicit return address imported:
. there's no worry about whether c can return structs
or can only return arrays as pointers;
because, all functions are translated into
c`functions that also input the return address
(ie, the caller supplies return space) .

11.14: adda/mem'mgt/fundamental trade-offs:
. fundamental trade-offs to the 2 ways to be modular
. if every nodular[pointer-growable] type
has its heap zoned
then easy to find a mem leak by it .
but any moves of sub.obj's must be impl'd as copies
instead of marking node as belonging to new obj .
. how much mem does it cost to obj-id every node
vs how much time does it take to copy ?
. in zoned system,
some copy can be avoided if src is const (in rom)
because there could be a node-variant that is
ptr to node of other obj .
space-savings
. part of space-savings of zoned
is that many nodular type systems have similar-sized nodes
or small size of zone makes compaction easy .
. the tall tree has many variants:
only the internal nodes will be same-size:
the leaf nodes are type-tagged ptr's or immed's .

2009-12-26

exploring xcode

6.26: proj.addn/dev.mac/find tutorial:
. organize downloads, find the tutorial that shows xcode .
review recent downloads .

proj.addn/dev.mac/access to projects with .xcodeproj file:
. I was surprised to see xcode understanding
what seemed to be a linux project;
. it had all the files being devoid of
type-specifying name ext's,
but it had a folder named xcode,
and inside was a .xcodeproj file;
then when I opened that, xcode was reading
all files in the surrounding project.folder .
[12.26:
. xcode is basically a gui for the
same gnu`dev.tools used by linux .]

dev.mac/xcode/company name selection for xcode

6.7: proj.addn/dev.mac/xcode/company name selection:
. each developer needs a name,
and uniqueness depends on a co using their co`url;
what should I use as a company name ?
. is addx reserved at g'code? yes: http://code.google.com/p/addx/
so, when I actually get some code in a repository,
it will be at https://addx.googlecode.com/
and the name for mac will be com.googlecode.addx .

ada at youtube

6.17: co.net.youtube.com/AdaCore05:
Your subscription to 'AdaCore05' has been added.
your request to add as friend has been sent .
AdaCore05
Joined: April 06, 2009
Last Sign In: 41 minutes ago
This channel is dedicated to presenting videos produced by AdaCore,
the leading provider of commercial, open software solutions for Ada,
a modern programming language designed for large, long-lived applications
where reliability, efficiency and safety are absolutely critical.

punctuation

6.14: engl/{punctuation, punctual}:
. punct-: to a point,
. punctual: occurring precisely at the expected point in time .
. punctuation:
a word condensed to a single point or character;
an extension to the alphabet that represents a word rather than a word component
as in the oriental character sets,
where there are thousands of punctuations .
. punctuation in english, however, reserves such punctual words
for expressing the non-verbal elements of speech .


math-, cyber-, auto-, -netics, -matics

6.12: engl/{math-, cyber-, auto-, -netics, -matics}:
greek:
auto.matos: self.acting --. matter (actions of the material) .
manthanein: learn
mathemat-: science --. math.mat: learn.actions .
kubernetes: steersman; kubernan: to steer.
--. kubern: controling .

12pm, 12am


6.8: engl/1200am:
. 12:00 has really got 2names: {0pm, 1200am}, ...
but they are calling noon 12pm .
[11.29:
. the sequences for 2 versions are
am-pm: 11:59am, 12pm, 1pm ... 11:59pm, 12am, ...
24-hr: 11:59, 12, 13, ... 23:59, 0, ...
. it should start at 0,
so that when transitioning from am to pm, at noon,
the noon should either stay AM until the amount down-cycles;
ie, 11:59am, 12:59am, 1:00 pm;
or, if wanting to call noon pm,
then don't start the clock with 12, use 0 instead: 11:59am, 0:00pm
11.30:
. there is a confusion of sequence,
because am is preceded by pm,
but for each of those intervals,
they start with a high number, 12;
and then bump down to 1, before starting upward again .
. the way it makes sense for clock`high to have both {0, 12} values
is noticing that an hour after 11 is a 12th hour;
ie, you might want to have a 1, 2,.. number of hours gone by,
rather than know the time point in reals: 0, 0.01, ... .
web"how biz makes sense of time:
A.M.a.m. Ante Meridiem Latin = "before midday" before noon
PM p.m. Post Meridiem Latin = "after midday" after noon
* Terms 12 a.m. and 12 p.m. cause confusion
as neither the "12 am" nor the "12 pm" designation is technically correct.
* It advisable to use 12 noon and 12 midnight where clarity is required.
* To avoid ambiguity, airlines, railroads, and insurance companies use
12:01am for an event beginning the day,
11:59pm for ending it.
]

svn on g'code

6.18: g'code/how to add code:
your source repository:

1. For instructions on how to check out a project's repository
from the command line, go to the Source tab.
Any user, regardless of whether they have a Google account,
can check out and browse the repository anonymously,
while project owners and members are granted full read and write permissions.
You can add project owners and members at the Administer tab.

2. If you plan on synching from an existing repository,
you must click the Reset This Repository link
at the bottom of the Source tab page
before making any other changes to your project's repository.
This includes creating any new wiki pages
because resetting the repository results in the loss of wiki content.
Do not start a wiki page in your project before you complete this step.

. on the source tab`page it says this:

New project? You can reset this repository
so that svnsync can be used to upload existing code history.
Command-Line Access
If you plan to make changes,
use this command to check out the code as yourself

svn checkout https://addm.googlecode.com/svn/trunk/ addm --username dr.addn

When prompted, enter your generated[*] googlecode.com password.
generated?
. Your googlecode.com password: random
This password is used by project owners and members when
checking out or committing source code changes,
or when using command-line tools to upload files to the project "Downloads" tab.

After you've been working with your project for a while,
the following subtabs on the Source tab will come in handy:
* Browse subtab
-- Allows you to browse the files and directories in your project
as they existed at a point in time.
* Changes subtab
-- Lists changes made to the repository.
You can also use this subtab to start a code review of any change.

Documenting your Project on the Wiki Tab

You can use the functionality under the Wiki tab
to create wiki pages for your project. Our wiki syntax is inspired by the
MoinMoin wiki syntax, and is more or less a subset of it.
We've found that MoinMoin is one of the most popular open source wikis
and provides a clean syntax for users.

Perform the following to create a wiki page:

1. In your project, click the Wiki tab.
2. Click the New page subtab.
3. Type the Page Name. This value must be alphanumeric with no spaces.
You won't be able to change this name later,
so be careful.
4. Enter the text and syntax for the page in the Content field.
Learn more about the wiki syntax.
5. Click a link in one of the Labels fields to see the available list of labels.
Labels help the user determine how relevant the wiki page is to them.
6. Click Preview, Save page, or Discard.

Subversion -- do you use?

We currently use Subversion 1.5.4, made available via WebDAV.
developers must use authenticated https:// to commit changes.

new to open source... how do I run an open source project?
If you are new, you should plan to
participate in existing open source projects to learn how they work.
You might also want to check out Karl Fogel's book,
Producing Open Source Software.

blogging for addx project

6.12: proj"g'code connected to an active blogger:
todo: [done]
. update the source tabs of g'code
to indicate planning is being shown at blogger .
pos:
. be brave and blogger any addx notes that have been proof read,
and that are you're own ideas;
( corollary: rethink how personal notes are copying others' works )
. it's just a blog, if you have something reusable to say,
put that on knowl's .

6.18: proj"update g'code:
. added a blog to each project {addm, adda, addx, adde}
and ended the summary with:
"(
. there is no code at this time; just a blog .
) .
6.18: proj.addn/net.g'blog/layout changed:
summary:
. found color variations that were more subtle,
and had to stop using the adsense between each entry
because on those ad's, it wouldn't let me change the colors
(loud green titles) .
proc:
. tough finding colors, here is a dark blue: 0606BB ...
then, no: I can't just take the palate they're giving;
except these grey's:
808080 dark grey
e6e6e6 grey
. here is a list of colors
. they taught me to get a feel for the numbers:
the colors go like
ffffff: white(full color),
00000: black(absent color)
when all 3 bytes are the same, that is colorless shade of grey;
then differences in the bytes have this ordering:
red,green,blue
choices for the 2 sites:
e6e6e6 grey background
555555 dark grey text .
. for links, take the text color and
885555 -- redish it for seen-links
555599 -- bluish it for new-links
. for black background (at doc's) things were inverted like so:
aaaaaa -- text
baaaaa -- redish
aaaabc -- bluish

6.23: mis.addn/net.g'blog/importing html:
. the copy from seamonkey code to blog messed up, adding newlines,
try saving the page and then opening with firefox,
then copying the page normally (not by view-copying code)
and see if it saves the links and other html .
[11.29: I didn't say whether it worked?!]

proj.addn/g'blog/tags are not space-delimited keyword lists:
. after finding gadgets and seeing how they would index your tags
I noticed that [atleast without commas in the list]
all the tag.words were treated as one giant tag;
so, instead of treating it like a keywords list,
I renamed all the tags as I would subj names:
{pol, gear mobi trike, gear security, etc} .

6.24: proj.addn/net.g'blogs/layout and color selection:
. change layout and colors on blogs,
figure how to change text colors
. I was at this page and it had some nice blue in it,
so I looked in the code, and found the numbers for a blue .
. but then -- after I decided the background was too dark
because it made even greys too glaring --
I got a light blue from the pallet
and then to see it better,
I zeroed the lower nibble of each byte: C0D0F0 .

news.addn/net.g'blogs/picassa-powered graphics:
. my picts uploaded for blogger were put into a picassa site here:


svn in xcode

6.5: proj.addn/net.stackoverflow.com/questions/511913/svn-and-xcode-woes:
. while doing a search [@] web.addn/dev.mac/subversion with xcode?
I noticed another asking the same question,
[@] http://stackoverflow.com/questions/511913/svn-and-xcode-woes
so, I pointed them to my find:
"(
apple's 2005 advice:
) .
6.18: proj.addn/mac/svn clients:
. where are svn gui app's for mac?
. here is some mac code;
Note carefully the Subversion version included in this installer
(from the installer package name). 0.7.3q - svn.1.6.2
If you have been using an earlier version of Subversion from the command line,
or with some other client,
you should upgrade all other such versions before installing this.
Otherwise, any working copy that has been touched by SCPlugin
will no longer be usable by your other clients.
Conversely, if you have other Subversion clients that use Subversion 1.5.x,
be sure to use a 1.5.x version of SCPlugin.
) .
my mac's svn version is 1.4.4
. I'm betting that I have not used mac's svn for anything
except to bring src down from other's svn's .

booking"svn (svnbook.red-bean)
"(
Subversion, CVS, and many other version control systems
use a copy-modify-merge model as an alternative to locking.
In this model, each user's client contacts the project repository
and creates a personal working copy
-- a local reflection of the repository's files and directories.
Users then work simultaneously and independently,
modifying their private copies.
Finally, the private copies are merged together into a new, final version.
The version control system often assists with the merging,
but ultimately, a human being is responsible for making it happen correctly.
eg,
When Harry attempts to save his changes to a file updated by sally,
the repository informs him that his file A is out of date.
So Harry asks his client to merge any new changes from the repository
into his working copy of file A.
Chances are that Sally's changes don't overlap with his own;
once he has both sets of changes integrated,
he saves his working copy back to the repository.
) --
[. from here I'm getting the impression
that the reason svn is sufficient
is that it's meant for collaborations
only by teams that are lead by
mgt, or concensus,
so that concurrent efforts are well orchestrated .
. the only time there would be a need for a merge
is when one person is doing the coding
while the other persons are doing only
review and corrections,
or additions to documentation sections;
ie, being meant as additions,
the merging should be a snap . ]


internet library

6.4: proj.addn/net.twitter/librarianchick.com:
co.edu/best of the Internet's free educational resources:

use of git to download a project

6.28: proj.addn/mac.git/use of git to download a project:

imac:~ addn$ man git

[1]+ Stopped man git
imac:~ addn$ git git://github.com/timburks/cocoa-programming-with-nu.git
git: 'git://github.com/timburks/cocoa-programming-with-nu.git' is not a git-command. See 'git --help'.
imac:~ addn$ git --help
usage: git [--version] [--exec-path[=GIT_EXEC_PATH]] [-p|--paginate|--no-pager]
[--bare] [--git-dir=GIT_DIR] [--work-tree=GIT_WORK_TREE] [--help] COMMAND [ARGS]

The most commonly used git commands are:
add Add file contents to the index
bisect Find the change that introduced a bug by binary search
branch List, create, or delete branches
checkout Checkout a branch or paths to the working tree
clone Clone a repository into a new directory
commit Record changes to the repository
diff Show changes between commits, commit and working tree, etc
fetch Download objects and refs from another repository
grep Print lines matching a pattern
init Create an empty git repository or reinitialize an existing one
log Show commit logs
merge Join two or more development histories together
mv Move or rename a file, a directory, or a symlink
pull Fetch from and merge with another repository or a local branch
push Update remote refs along with associated objects
rebase Forward-port local commits to the updated upstream head
reset Reset current HEAD to the specified state
rm Remove files from the working tree and from the index
show Show various types of objects
status Show the working tree status
tag Create, list, delete or verify a tag object signed with GPG

See 'git help COMMAND' for more information on a specific command.
imac:~ addn$ git clone git://github.com/timburks/cocoa-programming-with-nu.git
Initialized empty Git repository in /Users/addn/cocoa-programming-with-nu/.git/
remote: Counting objects: 404, done.
remote: Compressing objects: 100% (182/182), done.
remote: Total 404 (delta 150), reused 404 (delta 150)
Receiving objects: 100% (404/404), 661.32 KiB | 197 KiB/s, done.
Resolving deltas: 100% (150/150), done.
imac:~ addn$

Richard Stallman's vision of the next lang


6.21:


bk.adda/Stallman`Why you should not use Tcl:
[@] co.net: gnu`way vs Tcl 1994

Why you should not use Tcl
As interest builds in extensible application programs and tools,
and some programmers are tempted to use Tcl,
we should not forget the lessons learned from the first widely used
extensible text editor --Emacs:
a language for extensions should not be a mere "extension language".
It should be a real programming language,
designed for writing and maintaining substantial programs
. Because people will want to do that!
[and his vision for the tcl replacement,
was a full-featured interactive system like lisp,
but which included an an algebraic syntax
(what I would call mathy-english friendly language) ]

and comments to his remark:

important in a modern programming language,
with a comparison of some of the options:

Threads:
. for interactive programs -- especially distributed applications
which are now the rule more than the exception
-- thread support in the language/runtime greatly simplifies development

Modules or packages:
some mechanism to help maintain the namespace is a must.

. the all-powerful construct from which anything can be derived
. Makes foreign-function interfaces a mess, though.
[7.6: you just need a transaction-based system:
if a continuation is requested during a call to a foreign function,
then the continuation would be rolled back to before that call . ]

Good FFI: Foreign Function Interface
. A way to bind C functions. "Good" in the sense that
lots of folks have used it to build useful applications.

Exceptions:
You can't rely on a style of checking return codes (the way c does it)
for building large, reliable programs.
[7.6: the high-security language Spark, based on Ada,
consider Ada`exceptions to be a burden to security ]

RPC Support: [remote procedure call]
Support for making calls across address spaces easily.

...:
Rather than define specific features for the core language,
it should focus on inter-operability
. For example, the core language should use something like the OMG's
version of 'IDL' to define interface specifications
. Automated tools could then generate stubs and interface code
. This simplies the process of 'importing' functionality into the interpreter.

tcl`creator (John Ousterhout (ouster@tcl.eng.sun.com) 26 Sep 1994)
points out that Stallman's choice of Lisp
is ironic since people have already voted that out .
[. I'd qualify that by pointing out that Lisp, like tcl,
has a glaring lack:
it has a syntax only for its symbolic expr'trees
-- it has no mathy-english language to cover those etrees!
. I believe Stallman agreed with this, and was refering to it when he said
that gnu's other lang, besides lisp, should be an "(algebraic) one . ]

[. one great reason for mentioning lisp during talk about replacing tcl,
is that a glue language should be using etrees, not strings, for messaging .
. assuming tcl looks easy like Basic,
a great language should be putting a real skin like tcl
on a real language like lisp .
. the reason it uses strings is to "(make it really easy to drop down into C)
-- C has a convention of passing strings to main;
however, C also allows access to binary files,
and these could be used for messaging . ]

Wayne Throop (throopw%sheol.uucp@dg-rtp.dg.com) 27 Sep 1994:
I think that expressing things primitively in text
leads to simpler and more fluent notational innovation
than does expressing things in s-expressions.

[the 2-lang system:
. there is significant agreement that there should be a 2-lang solution,
where one is used for scripting, and another for mature or low-level code .
. the primary assumption here though,
is that the best low-level code is c,
and obviously c is not a good scripting lang .
. lisp has a single-lang solution:
your scripting lang is compiled or translated into c .
. some caveats here include:
the scripting lang is easy because it doesn't include details
but you need those details to code efficiently .
. most of the diff's between scripts and c,
are like the diff's between c and assembler:
asm had a very simple lang primarily so the compiler could
fit into very tight amounts of memory .
. c was created to fit into just double that tight space,
so while it could afford a nice syntax,
it was still lacking a lot of bug-catching support .
. bottom line is that c solved the fundamental problem:
the portable algorithm language .
... well almost:
people are still having to create add-on lib's for some
very fundamental features: the gui events, dynamic linking, and multi-threading .]

9.7: bk.adda/next big lang?:
. needs concurrency and reliability better than c++ .
. reliability means if the compiler ok's then program will work .
. in a concurrent world, imperative is the wrong default,
it should be functional .
"(imperative) is a synonym for side-affects
(traditional signature can't indicate all outputs) .
. composable memory transactions
. a transactional memory model
allows concurrency constructs to be composable .
. exceptions impose sequencing constraints on concurrent execution .
. concurrency needs dependent typing to avoid many exceptions;
eg, int less than n where n is known at runtime .
. dynamic typechecking .
. haskell has better unions than c or java .

2009-12-19

metalang (language for defining language)

8.21: adda/syntax kept simple:
. make it easy to define control structures
for letting users decide what a good language is .
12.19:
. this could make life more complicated for {maintainers, readers}
as each subprogram may potentially involve
having to learn yet another a new sublang';
but, this could also be fixed by other tools:
smart search&replace, and macro expansion,
which would translate all the source's user-defined language
into the std lang' .

comments via label
8.27: adda/syntax/simplified conditional:
. while it simplifies the lang to have only one way to do a conditional,
some find it a distraction not to have (if ) at the front;
since a conditional is a big deal
and is easily overlooked with the ?-operator being at the end of a line .
. for those who like (if),
they can make it part of a label,
which is one way to have a comment come before a stmt:
eg,
[if my condition]: b ? s; no? s2 .