2010-03-31

high-level uses of pointer and possessive

3.22: adda/dstr/high-level uses of pointer and possessive:
. both pointers (as seen in subdirectory syntax)
and possessives (as seen as component selection by structs)
can be seen as different ways to express the same thing;
but one way they express different things
is that ptr's don't imply ownership
as they often implement sharing .
. shouldn't adda use the {pointer, possessive} symbols
for the model views?
ie, ownerships can be impl'd with pointers,
but if the understood relation is ownership,
then the pointer should be written as a possessive mark .
that idea may be the same as this:
the important thing in design is to follow an interface .
3.31:
. indeed, this was really an empty debate,
since these operators do have different interfaces,
and it's the writer -- not the lang designer --
who has control of which relation to make structures with .

2010-03-30

arrays and structs compared

3.21: adda/dstr/array vs record:

. a remaining problem is how rec's and arrays
are the same yet demand differing syntax?
ie, why not rec#field?
instead of rec`field
or use array`item
instead of array#item ?
. during use, rec's and arrays are
not the same:
refering to them both as functions: domain -> codomain;
only arrays can leave some of their domain undefined
according to limits set by the attributes:
array`length
or array`last .
. also, the arg for #()
is expected to be an expression returning enum
while the x in rec`x
is expected to be a symbol literal .

. if you want an array treated as record
you can define it like one: a.(e1.t, e2, ...)
-- e2 has same type as e1
since the default typing in a list
is the same type as was last defined .

. you could also treat record like an array
by keeping type info in a tag field:
rec#.tagged
where tagged is:
( val.tall --. ptr to any type .
, typeis.symbol --. indicator of val's current type .
) .

degrees of freedom in function typing

3.20: adda/oop/degrees of freedom in function typing:

. a valuable freedom of expression I first saw in Python
is what might be called the anonymous protocols .

. is there some way to minimize syntax declarations?
the most general form is something like
{-, /}
where it can be either unary or binary,
and you know when it's binary because
either it will have an infix position
or it will be a prefix to a binary list .
. then the way you could sort out ambiguities
is to leave it up to the implementation
to be precise about
what arg arrangements it expects .
. just as in lisp,
every syntax in {uniop, biop, multiop}
can be reduced to a single arg
that is a list of various sizes .
. the default function signature is for an operation
(ie, a function where all param's have the same supertype)
then every operation is expected to support
a list of any size .
. this would work for num.type
if /x would mean 1/x
just as -x means 0-x;
and, if any list was greater than 2 args,
it could be recursively evaluated as a
list of binary operations .

. the oop paradigm I've had in mind
has assumed there's some efficiency
in the convention that
supertypes were declared by name,
so that then param's could be typed by name,
and finally there were 2 ways to find
matching function calls:
(1) eg, int+real:
. the operands will all have the same supertype,
so the compiler can search that supertype
for a matching operator .
(2) lib`fn(num); ... fn(int):
. the function may be in a nearby library,
and the call's arg will be compatible with
the function's declared arg .

. but does that work as a contract?
if I'm not mentioning the arg length,
then can't the caller and server
disagree on that ?
. isn't there generally a problem with
parameters sometimes being misplaced?
and don't we solve that by declaring our
parameter structures?
. there should be language for
both cases:
when needing the freedom of genericity,
and when needing help with conforming to
efficient, picky param' formats .

syntax for picky functions in an adt:
. say arg x needs to support an operation f,
where x is not just any place in f's arg list,
but is the 2nd arg,
and the 1st arg is of t.type .
eg, x.< f(first.t, x) > .
3.22: web.adda/cs/generics:
. generic programming is defined as when
all obj's are typed exclusively with
abstract data types .

syntax designed around url

3.20: adda/cstr/syntax:
. if adda is supposed to follow url syntax
how would you explain # as a multiplicity?
. I was concerned that book#2 is confused with
book having a chapter#2 .
. an url is about an address,
and when a file is being adressed,
it usually means enter the files beginning
-- so the file represents one address
rather than a number of them .
. there's no denying that adda's #-sign
has a meaning similar to url's;
the problem is when extending that
to english names:
what english really does with book names
is make the enumeration part of the name .
. books might use a colon to separate the series.name
from the issue.name .

anonymous and literal adt's

3.19: adda/oop/anonymous types:
. abstract typing means a symbol's useage
is declared in terms of operations;
eg,
( num.type: <+, -,  /, *>;
, x.num .
)
. that example could instead be
written with an anonymous type as:
x.<+, -,  /, *>
. despite that being harder to read,
a benefit is that a simpler syntax
with fewer exceptions;
the alternative is disallowing all type literals;
ie, having to name all types !

3.19: todo.adda/oop/abstract literals:
. adda still needs a way to express
literal abstract types symbolically
rather than as a list of operator literals .
... that gets back to question of
how to express a union of types:
ie, I'm not listing the available operations
I'm listing the names of types
that will list available operations .

3.21: adda/oop/abstract type literals:
. how is adda allowing new types in terms of old
without assuming the old and new are
assignment compatable ?
eg, does it impl' type color with number
yet still warn of type mismatch when
number is used as a color?
--. actually,
that wouldn't be a good example since
the system should support physics' way of
typing numeric obj's with dimensions;
ie, (x color) returns a color defined by
the numeric value of x .

. adda still needs a way to say
a type's interface is the same as a given type
but also say they are not compatable types;
eg,
my.type: another.type`face;
--. here,
a type's face returns an interface literal;
eg,
the literal face of numbers is
<+,-,/,*, abs(), sign(), ...> .
. to merge many faces, use union:
(face u face ...)
--. if a face is a set
are you calling the face literal a set notation ?
a set is any unordered list in which
duplicates can be tossed .

review of aggregate-type`literals:

record var with anonymous type: rec.(v.t, ..)
record type: (v.t, ...)
array var with anonymous type: array#(v.t, ..).t
array type: #(v.t, ...).t .
-- array type literals can also symbolic:
#enum-range-symbol.t,
or enum range literal:
#{e1, e2, ...}.t .

. notice functions are sets {,,,}
but arrays are structs (,,,)
according to the design of their literals;
there were 2 issues to juggle:
have all struct's literals indicate type uniquely,
but also keep things making sense without special rules .

. for types' literals
the combination of enclosure and content syntax
are what identify which type they are:
enum: {symbol, ..}
record: (v.t, ...)
function: (x).t
adt: < symbol, ...>
. in the adt,
symbols are assumed to be any number of args
unless the arg is specified;
an operator listed without a parenthetical
means 1,2, or more args, with infix accepted .
. abs() means one or more args
but as prefix only, not infix .

. for functions with multiple param's
of various types: f(x.T1, y.T2, ...)
when an param's type is not given
that means its the same type as
the adt's name;
eg, G: < f(x, y.t), ...>
-- x is type G like so: f(x.G, y.t) .
. if num.type has this function:
image().#.char
it means:
image(x.num).#.char .

fundamentalist engineering

3.18: adda/fundamentalist engineering:

. seems portable lang's always have a
problem with not really being that portable
due to diff's between platforms
in services or features .
. the worst cases are when most platforms
support a feature
so then the lang binds to it directly:
eg, environment var's (en'vars)
then on a platform like ppc,
that doesn't support en'vars,
the lang's manual must explain
that any code using en'vars will not work!?
. the way to handle cross-platform variation
is to always be using
thick rather than thin bindings .
. the thick binding would make sure that
some reusable set of lang features
could be doing the same job as
a dedicated en'var binding .

. en'vars are differing from other files
how?
. their format is a dictionary(string->sting);
one per user acct .
. if you'd never heard of en'vars before
you could be clued into their existence by
the lang's platform resources file
which dynamically lists
what is currently available
(special files, mounted volumes,
service api's, gui's, etc) .
. in terms of the lang's fundamental features,
en'vars would be globals
shared among all app's
that are acting as implicit param's .
. every platform can have an en'var
because when a platform doesn't natively provide them,
the lang already has the generic tools
that can implement and declare them .
. the key to portability then
is lisp's way of
using symbolics fundamentally:
finding the elements or atoms
from which all molecules can be defined .

mail is high-priority

adda/concurrency/mail is high-priority:
3.16:
. process`mailboxes can be used for impl'ing
the notifications system .
. notice that sched'priorities can change
when the mailbox is updated;
because,
any mailbox could include commands that when run,
will change the mailed agent's priorities .
. so all mail reading should be high priority ?
3.17:
. the mail could work like we have ours,
where the sender can know in some cases
that sent mail has a certain priority;
also,
a service could declare that its priority
could never depend on its mail
due simply to the nature of the service .
. of course,
any of those self-declared priorities
are all relative to priorities known by the system:
eg, the highest priority is always
giving prompt service to the real-time user,
and that induces a high priority in all dependencies .

notifications support

3.16: adda/notifications:

. after reading about dev.mac's notification system
I'm wondering how adda, too,
can provide this service .
. existing parts of adda should be reused
when possible;
eg, all coprograms having mailboxes .
[3.29: coprograms include all concurrent processes:
coroutines, tasks, type-mgt's,
and other background services .]

multi-level interfaces:
. you can see notifications in action
during a debug watch-point command:
that makes execution stop at
any code that modifies a given obj .
. this is economically possible because of
the multiple levels of interface
where all the high-level entries
use just one low level write function;
so, then an obj's write function
can be replaced with a
(call me instead of writing);
likewise, in the same way that
classes can be subclassed,
objects within the same class can be
individually customized
so as to facilitate notifications .

3.17:
. this can be done while still
reusing class functions
by having every object include
along with a tag
a watched bit for impl'ing notifications .
. the way to identify an object
is that every object
-- even when on the stack rather than heap --
is part of a process with an id#
and then part of a call path:
eg, process#2/sub1/sub2
. or,
every object is part of an act'rec ...
(this needs a proof,
but the future looks bright);
anyway,
the run-time exec' is checking the watched.bit
during each object access,
and if it's set,
then it's got that obj's id,
which is used to look up the object
in a notification database
to see what about the object is customized .
. the db can provide
the conditions under which
notifications need to be sent out,
and can also keep the list of
which mailboxes should be notified,
or what actions need to occur
if a certain trigger is set .

3.16: addm/notifications:
. assuming every obj has a watched bit
for impl'ing notifications:
. a problem with letting arbitrary obj's be watched
is it brings down performance across the entire system
regardless of how little
the watching feature is used ?
. for obj watching to be efficient,
have 2 versions of addm:
one will be checking the watch bit,
while the other version will ignore it .
. every process has a pointer indicating
which virtual processor it's being run on .

comment's terminator shouldn't be a period

3.15: adda/comment/terminator shouldn't be a period:
. if using the period to end a comment,
then it's messy to use periods for
segmenting parentheticals;
conversely, it's not user-friendly either to
impose syntax on users' comments,
or make additional arbitrary rules .
. better to have syntax reusing other rules;
eg, use the [this is one lexical unit].enclosure
along with a comment operator:
--[here is a fine comment]
and then not use double dash
for any other operator .

key to concurrency support

3.14: adda/translation/concurrency
. the recently found scripting lang, falcon,
has good support for concurrency
-- very impressive .
. might be good code to reuse for adda;
but c++ code and with multiple authors
might be quite frustrating for a
beginner of the lang .
. it doesn't take a lot of coding
with an elegant design;
the key to concurrency
is the recent idea for coroutine translation:
every sub is converted to a coroutine
and a yield placed in every recurrence
(loops, upward goto's ...).

act'rec as implicit parameter to coroutine

3.11: adda/translation/coroutines/act'rec as implicit parameter:
. after seeing coroutines for c
I saw a way that uses
another implicit parameter:
the param is a record of
all the routine's needed locals,
along with a yield pointer .
. it returns that record,
and then is called with the same record .
. when called again with the same record,
it uses the yield pointer to jump to where it left off .
. this gets a bit messy when
the yield is inside loops:
this is not really a problem with c,
where loops are very primitive:
a for-loop is just a while-loop is just a
combination goto and conditional
-- you can goto anywhere .

complex apply syntax

3.11: adda/complex apply syntax:
. if functions can return functions,
eg f x x = f(x)(x) = g(x) = y,
what about prefix functions returning biops? eg:
x f(x) y = x g y = g(x,y) .
. need to be careful about where to draw the line between
writer's expressiveness,
and reader's sanity .

macro -- compilation needs context

3.9: adda/macro/compilation needs context:

. when defining macro's that are etrees
rather than text substitutions,
a complication is the context needed:
. a macro is modular, yet it assumes
enough context to be compilable .

. but when does it need compilation?
it could instead have delayed compilation?
. for simplicity, for those reading the code,
you want it to be compilable
at least to the point so that
the etrees being formed are like those that
the reader gets when doing a mental parsing .
. back-end compilation and type-checking
can be done dynamically, at run time .

2010-03-29

SOP (subject-oriented prog'ing)

10.3.16: adda/sop (subj'oriented prog'ing)

. exploring falcon's "(mop) (msg'oriented prog'ing),
the mop interface is this:
VMSlot: VM Interface for mop operations.
getSlot: Retreives a MOP Message slot.
subscribe: Registers a callback to a message slot.
unsubscribe(a callback): Unregisters from a slot.
assert(on a msg`slot): Creates assertion .
retract: Removes a previous assertion on a message.
getAssert: an assertion.
consume: use the currently broadcasted signal .
broadcast: to every callable item subscribed to a message.
--. this reminds me of Minsky's frames .

. ibm might have a slightly different meaning for mop;
they talk about mop being the cure for
component-fragility or
component-structure fragility
-- this is referring to the silliness that comes from
implementing oop as structs containing
pointers to function pointers .
. the example they give is:
register_sale(item, store, customer)
which a silly-oop Java call would have to express
as one of these:
item.register_sale(store, customer)
store.register_sale(item, customer)
customer.register_sale(item, store) .
"(. the essence of component-fragility.
is when calls for a service
are dependent on which of the data involved
happen to carry the implementation.
. in mop, the msg broker knows
which object carries the function .)
. that example is similar to the problem I had
with conventional understandings of oop:
for binary operations like addition,
conventional oop was doing this: x.+(y)
when what was really going on
was this:
num's-add( destination.num, x.num, y.num)
where num is a supertype or
class of types sharing an interface:
{real, integer, complex, rational, ...}

. in the example of registering a sale,
there are 2 objects: {store, customer}
--
it doesn't need to involve the item;
because,
an object interface is primarily needed
only for controlling modifications
not mere accesses .
[3.29: or, a good reason in this case is that
none of the operations on an item are binary .
... still no clarity during double-check ... .
]
. after a sale,
the store has more money and less item,
while the customer has the opposite .
. in this transaction,
the item was just a constant id number .
. the abstraction of the transaction
is this:
    [register a sale](store, customer):
(
store`mailbox`+
customer`[ask for sale](payment);
store`agrees?
store`[locates item];
ok`= store`[request transfer](payment);
ok?
customer`pocket`+
store`[receipt and item] .
)
. so, registering a sale is simply
a classic example of the need to
mix oop with procedural programming;
ie, it's actor transaction directing,
where the purpose is to orchestrate objects .

. perhaps ibm's mop is merely saying the same:
that there really is no place
for a system where "(everything is an object) .

ibm's Message Central project
. at ibm's Message Central project
the goal is to enable widespread use of
component-based software,
[3.29: the way hardware is engineered? ]

. ibm`mop tools include:
SAGE (Scalable [inter-component] Adapter GEnerator),
and the
Continuum programming language
[translates oop'ish designs into]
reconnectable components.
. sage is based on tools for
sop (subj-oriented programming),
which is a type of aop (aspect-oriented prog'ing) ...
. ibm`Hyperslices are generalizations of subjects from sop .

sop at ccs.neu.edu:
"(Subject-oriented programming focuses on
operations as join points
(vs statement-level join points)
and functional aspects.
Some examples of functional aspects being
best described in terms of operation join points
are:
Persistence, error detection and handling,
fault tolerance, logging, tracing
and metrics-gathering.)
. sop was first defined here: (pdf)
ibm` Harrison & Ossher`
Subject-oriented programming: a critique of pure objects
Proceedings of the Conference on
oop, Systems, Languages, and Applications, 1993

. here we've seen that sop's gist is basically
the same as ibm's mop?
[3.29: or at least ibm`mop's motivation
is the same as sop's .]

Subject-oriented design: towards improved
alignment of requirements, design, and code
Conference on
oop Systems Languages and Applications
Proceedings of the 14th ACM SIGPLAN conference on
oop, systems, languages, and applications 1999

go! prog'lang is not google's go!

10.3.27: news.adda/lang/go!

[3.29: . Go is google's exciting new systems lang;
and, by following the go forums,
I learned of yet another exciting lang,
for higher level programming .
. go! is a multi-paradigm lang that's concerned with
agents, concurrency, and ontology-oriented programming .
(. fans of [go!].lang were complaining about
google's "(go) ripping off their [go!] name .) ]

. since go! borrows from L&O (logic and objects).
the name might come from G being
the icon of a flipping L .

. Go! for multi-threaded deliberative agents:
"( Go! is a multi-paradigm programming language
that is oriented to the needs of programming
secure, production quality, agent based applications.
It is multi-threaded, strongly typed
and higher order (in the functional programming sense).
It has relation, function and action procedure definitions.
Threads execute action procedures,
calling functions and querying relations as need be.
Threads in different agents communicate and coordinate
using asynchronous messages.
An agent's reactive and deliberative components
are concurrently executing threads
which communicate and coordinate using
belief, desire and intention memory stores.)
. go! is included in networkagent @ sourceforge
"(. networkagent is a group of systems for
building network-oriented intelligent agents,
consisting of
an agent communications infrastructure,
April - an agent construction programming language,
Go! - a logic programming language
and DialoX - an XML-based user interface engine) .

Falcon prog'lang features support concurrency

3.11: adda/lang/falcon:


choice of Falcon-ada over Python-c:

Falcon supports many programming paradigms,
including those supported by Python,
but additionally message oriented and tabular.
Finally, it seems to have builtin in concurrency support,
rather than supporting it as an after-thought
like Python
- and concurrency was one of AuroraUX's stated goals.
[3.29: AuroraUX Operating system:
AuroraUX operating system is robust via
Ada-coded Unix Shell Interpreter,
and OpenGL library toolkit .
. user can access software from
DragonFly BSD, Solaris, GNU/Linux 2.6
via ABI system call emulation .
. scripting with FalconPL, Perl and Lua
. user space coding with Clang/LLVM tool chain .]

Falcon's creator Giancarlo Niccolai 2009:
. went open source in 2009;
falcon is based on C++, whose Virtual Calls
are actually more efficient than
the switches [needed by objectified c coding] .
[3.29: supported by Kross?
Kross is the scripting framework for KDE 4;
a scripting framework allows binding of
arbitrary scripting languages
to the object system .
. kde's currently available scripting engines
include Python, Ruby, JavaScript and Falcon PL .]
BlastWave's Dennis Clarke is Falcon-coding the
BlastWave open source package repository Web interface
and is helping in porting all the Falcon codebase
to Sun platforms – the AuroraUX SunOS distro
has adopted Falcon as its official scripting language .

. many no-way-back points in the design,
[and at least one reversal:]
. dropped support for stateful functions,
(for building stateful machines)
because every function's {enter, exit}
was spending time checking whether
its instance was stateful .
a brief tutorial:
. comprehensive overview .

Falcon applauds AuroraUX:
. try out AuroraUX, an emerging Open Solaris
distribution that comes with Falcon .

falcon vs python, lua, ...:
. like php it supports [Document Templates]:
ie, embeds scripts into text document.
(basis for server-side dynamic page generation) .
. like lua it has coroutines,
and prototype-orientation .
. uniquely provides "compile-time metaprogramming",
full multi-threading,
native internationalization,
{functional, tabular, message} programming
--[ . they wouldn't call python even partially functional?
. the facts page calls coroutines
lightweight parallelism -- where the vm provides
time slicing and context switches;
I thought that was what threads were .
. according to lua, coroutines are
cooperative multitasking featuring yields,
where it yields control to a particular sub:
instead of calling that sub,
it is resuming where that sub last yielded .]

3.16: bk,web:
. wikipedia.org's Falcon concurrency .

explore falcon's groups:
. includes interfaces supporting various orientations:
. the mop ( message-oriented programming) interface
is this:
VMSlot: VM Interface for mop operations.
getSlot: Retreives a MOP Message slot.
subscribe: Registers a callback to a message slot.
unsubscribe(a callback): Unregisters from a slot.
assert(on a msg`slot): Creates assertion .
retract: Removes a previous assertion on a message.
getAssert: an assertion.
consume: use the currently broadcasted signal .
broadcast: to every callable item subscribed to a message.

2010-03-28

iConsume confused with iDevour

3.23: pol/openware/
iConsume gear won't endanger iProduce gear:

. Cory Doctorow, makezine 2006.11 p16
says that because pc's are potential hdtv tuners,
the drm requirements placed on receiver parts
would spread to all pc parts .
. that wouldn't make sense because
drm is esp'ly for iConsume gear;
whereas, there will also be a market for
computers used as iProduce gear
-- to produce what is being consumed;
and, design of computer parts will be
most efficient when confining tuner req's to
tuner modules,
so there will always be cheap parts for
building pc's that are useful to open source
and the sampling of open content .
. the same hysteria is being applied to
Apple's iConsume line (ipad, iphone, etc)
which are seen as a dangerous precident
having even open content
controlled by the unit's drm
-- why would ipad ever mean the end of iProducers
like the imac and macbook?

3.22: news.addn`gear/mac/ipad is drm happy:
. DRM is used by Apple to control
installation of software
and to regulate every use of movies
downloaded from iTunes.
Apple furthermore claims that
circumventing these restrictions
is a criminal offense, even for purposes
that are permitted by copyright law.
. critics of DRM have asserted that
publishers are insisting on the restrictions.
However, on the iPhone, iPad, ...
Apple does not provide open content publishers
with any way to opt out of the restrictions

2010-03-07

robotics (cyber-physical systems) gets gov funding

news.adds/robotics (cyber-physical systems) gets gov funding

When Robots Invaded the Senate
At the heart of “Robots” are resilient mixed-criticality systems
called cyber-physical systems (CPSs) .
. the National Science Foundation
discusses the basics of these systems
and details a recent luncheon briefing and open house
on CPSs for members of the U.S. Senate.

. Cyber-Physical Systems (CPS) Solicitation Frequently Asked Questions .
. CPS Summit site .

CPS Summit Report (pdf):
Despite the 70-year history of computing
and the 200+- year history of engineering physical control systems
the fields of computer science and control theory
have remained largely separate, both technically and culturally.
This separation extends to virtually all domains where
computers interact with the physical world.
Methods for designing computer systems and physical systems
are based on simplifying assumptions about each other
that limit the range of systems that we can build.
On the one hand, computer engineering cannot translate
requirements for physical systems, such as stability,
into computational requirements on performance, power consumption, etc.
On the other hand,
control and signal processing theory
has abstracted computers largely as
infallible numerical devices.
This simplification ignores many important aspects of computing,
such as increasingly larger timing variance
due to caches and energy management
and increasingly higher software error rates caused by complexity.
The viability of future CPS must also address
noise in measurements,
inaccuracies in actuation,
disturbances from the environment,
and faults and failures in the computational process
in a coherent, unified framework.

2010-02-28

mac dev news

10.2.1: addn/dev.mac

2.2:

news.addn/dev.mac#iphone/acceptance science:
. I read the following site to remind me of
things to watch out for when submitting:
Avoiding iPhone App Rejection From Apple
http://www.mobileorchard.com/avoiding-iphone-app-rejection-from-apple/
And I read to remind me that many developers are frustrated with apple:
http://apprejections.com/

2.7:

bk.addn/dev.mac/Cocoa Programming Developer's Handbook(free chapter):
http://www.informit.com/articles/article.aspx?p=1436920
David Chisnall goes through the most important aspects
of the OpenStep Foundation framework.,
which covers the core functionality of the Cocoa development environment.

2.9:

proj.addn/dev.mac/obj'c/text errata:
. must be for the old version of the book I have;
all these corrections have been made in my edition .

2.10:

proj.addn/dev.c/vc++ code editor: has code folding (yum) .


2.12:

web.addn/dev/GNUwin32

http://www.askstudent.com/tips/how-to-use-unixlinux-commands-at-the-windows-command-prompt/
"(
While Cygwin would be an obvious choice for
many Unix/Linux power users,
there is an excellent and a much simpler
alternative to using Cygwin
is using GNUWin32's coreutils .
http://sourceforge.net/projects/gnuwin32/files/coreutils/
)
. looking into that huge gnu collection
I notice he has indeed vastly simplified things
by getting just one of among dozens of packages .
. getting the entire gnuwin32 collection
would be as complicated as cygwin
and for that case, they use cygwin's approach:
an installer app that gets the latest version of each package .
. reviewing the code,
I see it's nicely commented,
but some can seem overly complicated by the use of
conditional compilation directives .


news.addn/dev.mac/pylons:
. Chapter 1: Introducing Pylons — Pylons Book v1.1 documentation
http://pylonsbook.com/en/1.1/introducing-pylons.html#the-pylons-way

2.13:

sci.addn/dev.mac/accessability example:
. their example comes as a before&after version of the same project,
and I'm using winmerge to see the diff's side-by-side .




2.15: web.addn/dev.mac/cocoadesignpatterns.com:

Cocoa Design Patterns By Erik Buck and Don Yacktman
http://www.cocoadesignpatterns.com/

Sample Code
http://www.cocoadesignpatterns.com/sample-code/
Voices that Matter
Materials from Erik's talk at the Voices that Matter - iPhone Developers Conference
CocoaDesignPatternsSampleCode.zip (1.3M)
Sample Code for Cocoa Design Patterns.

http://www.cocoadesignpatterns.com/errata/
CocoaDesignPatternsSampleCode.zip
http://www.cocoadesignpatterns.com/sample-code/CocoaDesignPatternsSampleCode.zip

Sample Code > Voices that Matter
http://www.cocoadesignpatterns.com/sample-code/voices-that-matter/
Cocoa Design Patterns.pdf (2.7M)
GLGravityToyPlane.zip (6M)
OpenGL ES for iPhone Games.pdf (1.6M)
Transparis.zip (239K)
Transparis3D.zip (243K)
Transparis3DCoreData.zip (289K)

2.16:
http://www.cocoadesignpatterns.com
http://en.wikipedia.org/wiki/Design_pattern_(computer_science)
http://developer.apple.com/iphone/library/documentation/Cocoa/Conceptual/CocoaFundamentals/CocoaDesignPatterns/CocoaDesignPatterns.html
http://c2.com/cgi/wiki?DesignPatternsBook
http://www.asp.net/mvc/



2.17: web.addn/dev.mac/cocoa patterns ref's to stepwise:


see cocoa page 111 for todo.web.
stepwise.com/Articles/Technical/memorymanagement.html
http://web.archive.org/web/*hh_/graphics.stepwise.com/Articles/Technical/
http://web.archive.org/web/20030224042213/http://graphics.stepwise.com/Articles/Technical/
http://web.archive.org/web/20021227023849/http://graphics.stepwise.com/Articles/Technical/

2.19:

http://74.125.155.132/search?q=cache:XQeBGtnj7skJ:www.omnigroup.com/mailman/archive/macosx-dev/1999-October.txt+stepwise.com/Articles/Technical/memorymanagement.html&cd=9&hl=en&ct=clnk&gl=us&client=mozilla
I just read the new article on Stepwise about Cocoa
memory management by Manu Iyengar

(which is very well done, by the way). In it, he presents the
following code as a useful idiom for writing set accessor methods.

> - (void) setTheory: (Theory *)newTheory
> {
> Theory *oldTheory = nil;
>
> if ( theory != newTheory ) // If they're the same,
do nothing
> {
> [self willChange]; // For Enterprise
Objects only
> oldTheory = theory; // Copy the reference
> theory = [newTheory retain];// First retain the new object
> [oldTheory release]; // Then release the old object
> }
>
> return;
> }


I'm new to Cocoa and I'd like to adopt as many useful idioms as I
can find. There seem to be many with regard to writing set accessor
functions...;-) What are the pros and cons of the code above
compared to other set accessor idioms I've seen, like this:
- (void) setTheory: (Theory*)newTheory
{
if ( theory != newTheory )
{
[theory release];
theory = [newTheory retain];
}
}
William Garrison wrote:
> (snip)
>In particular, why would I want to create a temporary pointer to the
>existing ivar value before setting it to the new value? Manu's
>example uses a basic swap pattern, but I don't know why that would be
>useful. Why can't I just release the existing ivar object and then
>retain the new value, as the second code example does?

Multithreading. There's a very small but still very real chance that
the current thread might be switched between the release and the new
assignment, so another thread might try to access the just released
(and maybe deallocated!) object and go boom
Alternatively you could use a simple lock but that's overkill for
the 99% percent when you don't need it.

>Would using autorelease instead of release be another way to protect against
>this? After all, the old object wouldn't be up for a real release until
>after the new object is retained.

Sure, but then you'd have to pay for the autorelease each time, which
is much more expensive than a second reference (memory and cycles-wise).
There ain't no free lunch. :)




2.23:

lib.addn/dev.mac/www.stepwise.com articles archived:
. site:www.stepwise.com/Articles was not easy to find before,
but did ok this time:
http://web.archive.org/web/*/www.stepwise.com/Articles
. HoldMe.html is the mem'mgt tutorial recommended by buck`patterns .
http://web.archive.org/web/20060418151507/www.stepwise.com/Articles/Technical/HoldMe.html



proj.addn/dev.mac/doc's copied to xpw:
2.23:
. explore mac's dev/doc's ...
can't find as expected?
because, they seem to be in a special archive format:
/Developer/Documentation/DocSets/<>.docset
use downloads instead:
. zip cocoa doc's to xpw (the downloaded pdf's) .
2.25:
. by context menu this is seen as a type of folder;
everything is html .



2.25: aq.addn/dev.mac#iPhone/app review/CrazyMikesapps.com

oop

2.23: adda/oop/child pkg's similarity to subclasses:
. child pkg's are like subclasses
so how does ada handle choice of visible to public,
subclasses, self-only?

adda/oop/freedom with security:
. encapsulation means not having the freedom to
poke into privates .
. one way to have freedom too,
is using the unix idea of root user:
encapsulation can be broken in root.user mode .

mem mgt

2.18: adda/mem mgt:
. one way to handle dangling ptr's is
have pointer be to a ptr var that
holds the ptr to target value (ie, sharers are handles)?
if there's a chance that var will be dealloc'd
then must have a global place for sharables .


2.21:

adda/mem'mgt/cyclic structures:
. one way to handle cyclic graphs
is have each node carry an [has been copied].bit
and copy recursively whenever that bit's not set .

goto variables

2.14: adda/translate/cstr/goto variables:
. labels targeted by {enter, exit, goto}
are constant versions of the goto variables;
ie, label.to: here
is the same as label.to`= here
except that the colon syntax gives it a value it must keep .
. a goto label is assigned the place it's declared at:
here.to: v.to`= here;
-- the variable v is assigned the constant here .
. when translating to c,
which supports only goto /constants/
-- not goto /variable/ --
the .to var must be impl'd as an enum
whose values include all of a scope's
constant .to labels,
so then a ( goto /var/ ).stmt
would be translated as casing the enum,
and mapping each enum to a constant goto label;
eg,
enum places {toplace1, toplace2, ...};
places mygoto;
mygoto = toplace1;
switch mygoto
{case toplace1: goto place1;
case toplace2: goto place2;
... } .

vector syntax with dot for clarity

2.14: adda/dstr/vector syntax with dot for clarity:
. could this:
.<,,,>
work like this?
.(,,,)
. it may conflict with other (misplaced) ideas,
but would make it easier for the compiler
to tell when (<) was starting a <,,,>
and not a [less than] operator .

c's case fall-through

2.14: adda/cstr/c's case fall-through:
. if the case src is a set the case should do
multiple things (concurrently?) .
. to provide c's case fall-through,
it should use the (enter [/]case).stmt .
. will case labels conflict?
the users know what literals they're casing,
and they can choose goto labels that don't conflict;
but what about nested cases?
to jump from one case stmt to an enclosing one,
use a goto label
or use ../case ?

selection stmt minimalized

2.14: adda/cstr/selection stmt minimalized:
. can terminator of selection.stmt be (;)?
yes:
you can explain that
? ,,, ;
is an enclosure similar to
(,,,);
.. the problem with that is a very unexpected
piling up of ;; when things get nested .
. notice too that commas could be replaced with
the case key:
e ? case1: e case2: e;
.