2.14: adda/cstr/obj'c`categories vs ada`child pkg's:
. obj'c`categories like ada`child pkg's ?
categories are more modifiable:
you can override old def's
even without a recompile of old clients,
because classes are linked at run time, not compile time .
. pkg's are hardwired
but the compiler keeps a record of how
compilation units are org'd,
and this record can be modified,
so a parent pkg body
stays uncompiled and un-overridden
while a parent pkg head
can have child pkg's appended to it .
2010-02-28
compressing names
2.12: mis.adda/compressing names:
. not sure where I'm going with this;
may want get through a book of algorithms first .
...
. a sha1 converts a file into a practically unique number
wondering what the conditions of that are
and how it could be of use for creating name id's
. if any user name could be mapped to something like an 8byte number,
then that would make storage of names much more efficient .
. the lookup would not be as quick as a hash;
it would use a binary search ?
2.13:
. compilers use hashing to help them place a found string into a symbol table;
hash converts the string into an byte,
and then instead of putting it in a bucket,
it can add on some more bits to make it unique .
. when that string is found again,
the hash quickly finds the approximate location .
. hashing would also be used for huge symbol tables
like the one converting all words to wordcodes .
. hashing is a much less expensive version of sha1
(sha = Secure Hash Algorithm)
http://en.wikipedia.org/wiki/SHA_hash_functions
. not sure where I'm going with this;
may want get through a book of algorithms first .
...
. a sha1 converts a file into a practically unique number
wondering what the conditions of that are
and how it could be of use for creating name id's
. if any user name could be mapped to something like an 8byte number,
then that would make storage of names much more efficient .
. the lookup would not be as quick as a hash;
it would use a binary search ?
2.13:
. compilers use hashing to help them place a found string into a symbol table;
hash converts the string into an byte,
and then instead of putting it in a bucket,
it can add on some more bits to make it unique .
. when that string is found again,
the hash quickly finds the approximate location .
. hashing would also be used for huge symbol tables
like the one converting all words to wordcodes .
. hashing is a much less expensive version of sha1
(sha = Secure Hash Algorithm)
http://en.wikipedia.org/wiki/SHA_hash_functions
oop'ish return param's
adda/translate/oop'ish return param's:
2.6:
. to promote a system that includes both exceptions
and that simplifies garbage collection for functions,
all adda functions should be impl'd as procedures
in which one of the param's is expecting a pointer to
where the return should go .
. any function f:x->y
is translated in c, then,
to f: (x, rtn.ptr.out) -> exception code .
2.13:
. a common problem found in oop lang's,
is keeping track of who's responsible for
deallocating an object;
the primary reason for this is an efficiency trick:
. every oop value is, for the sake of modularity,
represented by a dynamically allocated obj'
(a pointer out to some place on the heap) .
. when wanting to send a value,
the modular way is to copy the value,
and send that copy's pointer;
but the efficient way is to minimize copying of values,
by copying and sending pointers
so there are multiple pointers
sharing the same obj' representing a value .
. however,
now there has to be a system for knowing
whether an obj' is being shared or not;
because if it's not, and you have the only pointer to an obj'
then you should deallocate the obj'
before you dealocate your pointer to it .
. conversely, if the obj' is being shared,
then it's important that you not dealocate the obj'
because that would leave its other pointers dangling .
. another source of sharing is not efficiency
but just because the routine way to operate
is to have a function accept 1 or more arg's
and then return a value to some other obj' .
. to avoid this case of unnecessary sharing
a function that is not sharing
should indicate so requesting one of the parameters be
a pointer to an obj' owned by the caller,
so then the caller knows in this case
that it owns the obj',
and will be the one to deallocated it .
. yet another cause of uncontroled dealloc's
is when the function is returning the value to an assignment,
which in many bolt-on versions of oop,
means the function is wiping out a pointer
that the assignment's destination.obj was already holding .
. the way around this is to not use the usual
assignment.stmt(dstination.out, src.in)
and instead have each type`mgt
define its own assignment dstination.INout, src.in)
which asks that the param' for the destination obj'
be of mode inout so that
not only can the destination be written to,
but it can also be read, and with that reading,
the destination's current pointer can be deallocated by
the assignment operator .
2.14:
. it would be a lot easier to get more out a c compiler
if adda functions did translate to
similar functions in c .
. there does need to be a param
for caller to say where to put the return;
but, the retun should be passed by return vs out.mode param .
. a recent note thought exceptions could be done through the return,
but prior notes had ways that used globals .
2.6:
. to promote a system that includes both exceptions
and that simplifies garbage collection for functions,
all adda functions should be impl'd as procedures
in which one of the param's is expecting a pointer to
where the return should go .
. any function f:x->y
is translated in c, then,
to f: (x, rtn.ptr.out) -> exception code .
2.13:
. a common problem found in oop lang's,
is keeping track of who's responsible for
deallocating an object;
the primary reason for this is an efficiency trick:
. every oop value is, for the sake of modularity,
represented by a dynamically allocated obj'
(a pointer out to some place on the heap) .
. when wanting to send a value,
the modular way is to copy the value,
and send that copy's pointer;
but the efficient way is to minimize copying of values,
by copying and sending pointers
so there are multiple pointers
sharing the same obj' representing a value .
. however,
now there has to be a system for knowing
whether an obj' is being shared or not;
because if it's not, and you have the only pointer to an obj'
then you should deallocate the obj'
before you dealocate your pointer to it .
. conversely, if the obj' is being shared,
then it's important that you not dealocate the obj'
because that would leave its other pointers dangling .
. another source of sharing is not efficiency
but just because the routine way to operate
is to have a function accept 1 or more arg's
and then return a value to some other obj' .
. to avoid this case of unnecessary sharing
a function that is not sharing
should indicate so requesting one of the parameters be
a pointer to an obj' owned by the caller,
so then the caller knows in this case
that it owns the obj',
and will be the one to deallocated it .
. yet another cause of uncontroled dealloc's
is when the function is returning the value to an assignment,
which in many bolt-on versions of oop,
means the function is wiping out a pointer
that the assignment's destination.obj was already holding .
. the way around this is to not use the usual
assignment.stmt(dstination.out, src.in)
and instead have each type`mgt
define its own assignment dstination.INout, src.in)
which asks that the param' for the destination obj'
be of mode inout so that
not only can the destination be written to,
but it can also be read, and with that reading,
the destination's current pointer can be deallocated by
the assignment operator .
2.14:
. it would be a lot easier to get more out a c compiler
if adda functions did translate to
similar functions in c .
. there does need to be a param
for caller to say where to put the return;
but, the retun should be passed by return vs out.mode param .
. a recent note thought exceptions could be done through the return,
but prior notes had ways that used globals .
Labels:
adda,
oop,
translation
nested subprograms
2.4: adda/nested subprograms:
. nested sub's have 2 special properties
(2 reasons why they should be nested):
the nestedSub' may be so specialized
as to be of use only to its ownerSub';
in this case,
nesting restricts the nestedSub's name
to the ownerSub's namespace,
so as to not clutter up the global namespace .
. another special property of nesting
is that a nestedSub has access to the locals of ownerSub,
which practically means that a call to nestedSub
needs a pointer to the caller's act'rec .
. this involves a form of generics:
it's being owned by a function class whose members are
sharing the same function definition
but are distinguished by having separate act'rec's .
. assuming a nestedSub does access some ownerSub`locals,
then each ownerSub instance needs to set up a record
containing pointers to the needed locals,
and then pass that record with each call to nestedSub(x) .
. say the record would be called [shared with nestedSub],
then each call would be:
nestedSub([shared with nestedSub], x),
[2.6:
. a nested generic is requiring 2 layers of instantiation:
being nested requires a partial instantiation
that defines who the current owner is,
and then the owner can set up
numerous instantiations of this owned generic:
nestedGenericSub([shared with nestedSub], [genericInstanceSub`args], x) .
]
. nested sub's have 2 special properties
(2 reasons why they should be nested):
the nestedSub' may be so specialized
as to be of use only to its ownerSub';
in this case,
nesting restricts the nestedSub's name
to the ownerSub's namespace,
so as to not clutter up the global namespace .
. another special property of nesting
is that a nestedSub has access to the locals of ownerSub,
which practically means that a call to nestedSub
needs a pointer to the caller's act'rec .
. this involves a form of generics:
it's being owned by a function class whose members are
sharing the same function definition
but are distinguished by having separate act'rec's .
. assuming a nestedSub does access some ownerSub`locals,
then each ownerSub instance needs to set up a record
containing pointers to the needed locals,
and then pass that record with each call to nestedSub(x) .
. say the record would be called [shared with nestedSub],
then each call would be:
nestedSub([shared with nestedSub], x),
[2.6:
. a nested generic is requiring 2 layers of instantiation:
being nested requires a partial instantiation
that defines who the current owner is,
and then the owner can set up
numerous instantiations of this owned generic:
nestedGenericSub([shared with nestedSub], [genericInstanceSub`args], x) .
]
Labels:
adda,
translation
generics
adda/generics:
2.2:
. what does ada's generic look like as c code?
it's typically a function call that returns a subprogram:
. subGenericInstance`= genericSub(instantiation param's)
. it's setting parameters that will be used by
every subsequent call to subGenericInstance .
. when the generic's param is of type "(type),
that is translated using the fact that
types can be expressed as a collection of pointers to
the operations that impl' that type .
eg, if there exists genericSub(number.type)
then the actual param can be any type that
supports the bi'ops {+, -, *, /}
and the uni'ops {-, /} .
caveat:
. ada generics, due to efficiency concerns,
likely involve some additional semantics .
2.4: translation to c:
. generics can be instantiated numerous times;
each instantiation means setting up a record
containing pointers to generic's instantiation arg's,
and then passing that record with each call to genericInstanceSub(x) .
. say the record would be called [generic instantiation#n's arg's],
then each call would be:
genericInstanceSub([generic instantiation#n's arg's], x) .
2.6:
. if the generic is a package instead of a sub',
then it practically means
the package includes both its own components
plus its generic instantiation record .
2.6:
. a generic instantiation is considered to be first-class,
when it can be treated like any other subprogram;
for this to occur,
a sub', which is usually represented by a pointer,
must include along with that pointer,
a tag indicating whether it's nested,
and whether it's generic
(each means 1bit of the tag) .
--. if c has some restrictions about function typing,
then all dynamic functions can be impl'd as
unary or binary operations over etree .
2.4:
. one of the struct's fields is a pointer to a callable generic .
. this is not really needed because it's statically known
but part of supporting reflection is that
instead of there being just function pointers,
there is an id bundled with the pointer
so that the program has access to the name of a function
along with details known statically about the function
like its signature (req'd param`types, and provided output`types) .
. along with a function'id is the environ.ptr,
for cases where the function is declared nested .
. the generics.ptr
-- for cases where the function is generic --
is pointing at the generic's instantiation record .
how does adda define a generic?
they are functions returning some cstr,
typically a function .
their param's can include types (sets of function ptrs) .
eg,
G(T).(X).Y; -- G is a generic returning a sub' of type (X).Y
f(x).y: G(t) . -- f is a constant function
defined as an instantiation of G .
neat.type: (x).y; -- "(neat) is a constant type name for (x).y .
G(T).neat; -- G returns a function of type neat .
f.neat: G(t) -- f is a constant function
defined as an instantiation of G .
. to become familiar with subtleties of generics,
need to see examples of them in c++ and ada .
2.2:
. what does ada's generic look like as c code?
it's typically a function call that returns a subprogram:
. subGenericInstance`= genericSub(instantiation param's)
. it's setting parameters that will be used by
every subsequent call to subGenericInstance .
. when the generic's param is of type "(type),
that is translated using the fact that
types can be expressed as a collection of pointers to
the operations that impl' that type .
eg, if there exists genericSub(number.type)
then the actual param can be any type that
supports the bi'ops {+, -, *, /}
and the uni'ops {-, /} .
caveat:
. ada generics, due to efficiency concerns,
likely involve some additional semantics .
2.4: translation to c:
. generics can be instantiated numerous times;
each instantiation means setting up a record
containing pointers to generic's instantiation arg's,
and then passing that record with each call to genericInstanceSub(x) .
. say the record would be called [generic instantiation#n's arg's],
then each call would be:
genericInstanceSub([generic instantiation#n's arg's], x) .
2.6:
. if the generic is a package instead of a sub',
then it practically means
the package includes both its own components
plus its generic instantiation record .
2.6:
. a generic instantiation is considered to be first-class,
when it can be treated like any other subprogram;
for this to occur,
a sub', which is usually represented by a pointer,
must include along with that pointer,
a tag indicating whether it's nested,
and whether it's generic
(each means 1bit of the tag) .
--. if c has some restrictions about function typing,
then all dynamic functions can be impl'd as
unary or binary operations over etree .
2.4:
. one of the struct's fields is a pointer to a callable generic .
. this is not really needed because it's statically known
but part of supporting reflection is that
instead of there being just function pointers,
there is an id bundled with the pointer
so that the program has access to the name of a function
along with details known statically about the function
like its signature (req'd param`types, and provided output`types) .
. along with a function'id is the environ.ptr,
for cases where the function is declared nested .
. the generics.ptr
-- for cases where the function is generic --
is pointing at the generic's instantiation record .
how does adda define a generic?
they are functions returning some cstr,
typically a function .
their param's can include types (sets of function ptrs) .
eg,
G(T).(X).Y; -- G is a generic returning a sub' of type (X).Y
f(x).y: G(t) . -- f is a constant function
defined as an instantiation of G .
neat.type: (x).y; -- "(neat) is a constant type name for (x).y .
G(T).neat; -- G returns a function of type neat .
f.neat: G(t) -- f is a constant function
defined as an instantiation of G .
. to become familiar with subtleties of generics,
need to see examples of them in c++ and ada .
adde accessability
2.11: web,sci.adde/blind assist/what jaws can work with:
sci.adde/blind assist,
web.adde/blind assist/mac's accessability framework
founder of Technologies for the Visually Impaired
talks about switching to mac
says (not exactly fun) but mac is unfairly condemned by
September 2005 issue of Access World
. the store he found includes brail displays,
so in this case, a simple gui or tui could be useful .
Introduction to Accessibility Overview
Don’t override built-in keyboard shortcuts. (listed in the Apple Human Interface Guidelines
appendix “Keyboard Shortcuts Quick Reference”)
and to the accessibility-related keyboard shortcuts
(listed in “Accessibility Keyboard Shortcuts”).
http://devworld.apple.com/mac/library/documentation/UserExperience/Conceptual/AppleHIGuidelines/index.html#//apple_ref/doc/uid/20000957
This chapter introduces the accessibility protocol. It describes:
The model that represents accessible applications to assistive technologies
The accessibility object that represents user interface objects
Some of the ways an assistive application interacts with an accessible application
If you’re an application developer, you should read this chapter
to learn about the Mac OS X accessibility protocol.
Then, if you’re ready to access-enable your application,
you should read Accessibility Programming Guidelines for Cocoa
or Accessibility Programming Guidelines for Carbon.
http://devworld.apple.com/mac/library/documentation/Cocoa/Conceptual/Accessibility/cocoaAXIntro/cocoaAXintro.htmlhttp://devworld.apple.com/mac/library/documentation/Cocoa/Reference/ApplicationKit/Protocols/NSAccessibility_Protocol/Reference/Reference.html#//apple_ref/doc/uid/20000945http://devworld.apple.com/mac/library/samplecode/ZipBrowser/index.html#//apple_ref/doc/uid/DTS40007830
. for those using JAWS for Windows,
GTK/Tkinter impl's are incompatable;
need to use windows forms
as provided by WXPython (or any other WX equivalent),
or standard Windows controls,
. after looking at the output from hg's cli,
I got the idea that for the audio version
one annoyance to be avoided
is having the reader read everything on the screen .
. the pattern with tool outputs,
is that it's a record with named fields;
and you should be given a chance to customize the reading .
. it may already have things like tabbing .
. checking the mac options, they are the built-in voiceover,
so the first path is just making sure you stay voiceover-friendly .
. the next path is to have app's that are meant to be displayed in audio .
. addx uses the mvc pattern,
separating the model from the presentation,
but to make it easier on the programmer,
there had been the idea of implicit inout
where the program just had to present the data as an interface,
and then the user would choose between tui or gui .
. both of those are visual,
so I had implicit assumptions about mapping data to visuals;
ie, the standard datastructures and types
would all have visual representations .
. the primary need from an audio representation
is that all components have brief descriptive names
and then the main mode would use fieldname traversal
along with arrows, tabs, and enter to get in or out of content .
. the user's agent then has to either create or have available
the trees of fieldnames separate from the content
and must be able to serve thses names to voiceover,
or whatever reader is on the system .
. there are more options if the user can touchtype:
getting through a list, and hearing an r-word,
pressing r would stop it at the last r-word .
. otherwise, the arrow keys can still do what's needed .
sci.adde/blind assist,
web.adde/blind assist/mac's accessability framework
founder of Technologies for the Visually Impaired
talks about switching to mac
says (not exactly fun) but mac is unfairly condemned by
September 2005 issue of Access World
. the store he found includes brail displays,
so in this case, a simple gui or tui could be useful .
Introduction to Accessibility Overview
Don’t override built-in keyboard shortcuts. (listed in the Apple Human Interface Guidelines
appendix “Keyboard Shortcuts Quick Reference”)
and to the accessibility-related keyboard shortcuts
(listed in “Accessibility Keyboard Shortcuts”).
http://devworld.apple.com/mac/library/documentation/UserExperience/Conceptual/AppleHIGuidelines/index.html#//apple_ref/doc/uid/20000957
This chapter introduces the accessibility protocol. It describes:
The model that represents accessible applications to assistive technologies
The accessibility object that represents user interface objects
Some of the ways an assistive application interacts with an accessible application
If you’re an application developer, you should read this chapter
to learn about the Mac OS X accessibility protocol.
Then, if you’re ready to access-enable your application,
you should read Accessibility Programming Guidelines for Cocoa
or Accessibility Programming Guidelines for Carbon.
http://devworld.apple.com/mac/library/documentation/Cocoa/Conceptual/Accessibility/cocoaAXIntro/cocoaAXintro.htmlhttp://devworld.apple.com/mac/library/documentation/Cocoa/Reference/ApplicationKit/Protocols/NSAccessibility_Protocol/Reference/Reference.html#//apple_ref/doc/uid/20000945http://devworld.apple.com/mac/library/samplecode/ZipBrowser/index.html#//apple_ref/doc/uid/DTS40007830
. for those using JAWS for Windows,
GTK/Tkinter impl's are incompatable;
need to use windows forms
as provided by WXPython (or any other WX equivalent),
or standard Windows controls,
. after looking at the output from hg's cli,
I got the idea that for the audio version
one annoyance to be avoided
is having the reader read everything on the screen .
. the pattern with tool outputs,
is that it's a record with named fields;
and you should be given a chance to customize the reading .
. it may already have things like tabbing .
. checking the mac options, they are the built-in voiceover,
so the first path is just making sure you stay voiceover-friendly .
. the next path is to have app's that are meant to be displayed in audio .
. addx uses the mvc pattern,
separating the model from the presentation,
but to make it easier on the programmer,
there had been the idea of implicit inout
where the program just had to present the data as an interface,
and then the user would choose between tui or gui .
. both of those are visual,
so I had implicit assumptions about mapping data to visuals;
ie, the standard datastructures and types
would all have visual representations .
. the primary need from an audio representation
is that all components have brief descriptive names
and then the main mode would use fieldname traversal
along with arrows, tabs, and enter to get in or out of content .
. the user's agent then has to either create or have available
the trees of fieldnames separate from the content
and must be able to serve thses names to voiceover,
or whatever reader is on the system .
. there are more options if the user can touchtype:
getting through a list, and hearing an r-word,
pressing r would stop it at the last r-word .
. otherwise, the arrow keys can still do what's needed .
Labels:
accessibility,
adde
journaling with efficient versioning
2.11: adde/journaling/efficient versioning:
. notice reverse diff can't be done by journaling,
needs exact replace commands:
eg, suppose block has x's
and I use command to replace all x's with y's,
but there are already y's .
then a reverse journal changing y's back to x's
is going to change too many y's
and therefore won't represent the previous version .
. reversing must keep track of either whole block versions
or use address of changes
-- in some cases the instruction for reverse
would be heavier than just keeping both versions .
. notice reverse diff can't be done by journaling,
needs exact replace commands:
eg, suppose block has x's
and I use command to replace all x's with y's,
but there are already y's .
then a reverse journal changing y's back to x's
is going to change too many y's
and therefore won't represent the previous version .
. reversing must keep track of either whole block versions
or use address of changes
-- in some cases the instruction for reverse
would be heavier than just keeping both versions .
Labels:
adde,
journaled fs,
journaling
sup' and subfile editor
2.5: adde/{sup, sub}file editor:
{sup, sub}file editor:
superfiles are a collection of files selected by user,
search , etc
and then in addition to a list view,
there's an edit view that lets
see contents of all filesat once
. file inclusion is determined by label:
if you delete a label,
it asks if you meant to kill a file a file
and append it's content to the file above .
. if choosing to exclude label from deletion
that allows your {cut, delete} to affect multiple files at once
without affecting fs structure .
. adde's folder view allows opening all files of any subfolder .
{sup, sub}file editor:
superfiles are a collection of files selected by user,
search , etc
and then in addition to a list view,
there's an edit view that lets
see contents of all filesat once
. file inclusion is determined by label:
if you delete a label,
it asks if you meant to kill a file a file
and append it's content to the file above .
. if choosing to exclude label from deletion
that allows your {cut, delete} to affect multiple files at once
without affecting fs structure .
. adde's folder view allows opening all files of any subfolder .
Labels:
adde
menu backspacing
2.2: adde/gui/menu backspacing:
while in menu mode
. instead of having enter after char
one line is confiriming what you just picked ,
and the new menu appears if filling a record .
then backspace does reverse
pulling line and going back to prev' menu .
for see to be effective
be sure to know your apoptosis rules
diet should not urinate
thyroid and burnrate increasers
will make poison felt by more .
cancers are most active during acidics
(body feels burning with acid from being out of shape may be a good time? )
need to know more about how apoptosis works
and how antiapop's work .
while in menu mode
. instead of having enter after char
one line is confiriming what you just picked ,
and the new menu appears if filling a record .
then backspace does reverse
pulling line and going back to prev' menu .
for see to be effective
be sure to know your apoptosis rules
diet should not urinate
thyroid and burnrate increasers
will make poison felt by more .
cancers are most active during acidics
(body feels burning with acid from being out of shape may be a good time? )
need to know more about how apoptosis works
and how antiapop's work .
dvcs with gui on mac for securing data
2.28: summary:
. notes of my journey deciding on Mercurial .
2.1: news.addn/dev/scm/internals of git:
. the popular $9 [Git internals] book from Peepcode.
conceptuals:
http://www.eecs.harvard.edu/~cduan/technical/git/
man page everyone should read:
http://www.kernel.org/pub/software/scm/git/docs/gitworkflows.html
...
http://www.stevestreeting.com/2009/08/06/getting-more-structured-with-my-dvcs-tests/
2.1: proj.addn/dev/scm:
. how is svn on {tortoise, mac} knowing where to check;
is there something integrated on mac?
. how do you limit growth of the time mach aspect?
be careful with your updates (don't commit a bunch
you'll only be deleting later);
export and reimport .
. make sure backup is obvious when transfering things to git .
. consider project size;
is svn smarter replacement of mac timemach?
web:
scripts instead of gui
http://svn-finder.sourceforge.net/
http://en.wikipedia.org/wiki/Comparison_of_Subversion_clients
SmartSVN 79.00
xMerge add-on (Merging renamed/moved files) 399.00 USD
http://www.syntevo.com/smartsvn/index.html
. after that, I'm wondering if that lack of xmerge
was the reason git's inventor calls svn braindead .
http://versioncontrolblog.com/comparison/Bazaar/CVS/Git/Mercurial/Subversion/index.html
. hg might have better doc's?
and it's already installed on mac x.6 .
http://mercurial.berkwood.com/
The hg executable is now placed in /usr/local/bin for all versions of the installer.
For OS X 10.5 & 10.6
The package uses the default Python installation that comes installed.
darcs might fit my use case well
http://wiki.bazaar.canonical.com/MacOSXBundle/SnowLeopard
http://bazaar-vcs.org/WindowsDownloads
http://stackoverflow.com/questions/2105278/is-there-a-way-for-bazaar-to-automatically-detect-and-apply-changes-made-in-a-wor
Is there a way for Bazaar to be able to automatically detect changes (adds, removes, renames, etc.) made to part of the working directory and automatically apply them?
It looks like the automv plug-in will automatically detect renames and moves. This, along with bzr add * should do the trick.
http://www.stevestreeting.com/2009/09/28/early-stage-gitmercurialbazaar-evaluation-thoughts/
bzr copy doesn't work as expected
https://bugs.launchpad.net/bzr/+bug/269095
there is a rebase plugin available for Bazaar ( bazaar-vcs.org/Rebase)
and a queues one (launchpad.net/bzr-loom).
Bazaar does line-ending conversion already, since 1.14:
through a plugin (bzr-eol)..
http://doc.bazaar-vcs.org/explorer/en/visual-tour-windows.html
http://wiki.bazaar.canonical.com/BzrUsingBoundBranches
Bound branches are a way to make sure that both a local branch
and a remote branch have the same revisions.
This is particularly useful if one likes to work on two machines .
online plugins guide
pos.addn/dev/scm/for mac and pc:
. maybe I can use svn on pc side,
then use timemach on mac side?
Using Git With OS X: 6 Tools to Get You Up and Running
2.2: proj.addn/dev/scm/installs not going as expected:
. explore downloads meant for installing,
didn't I miss something about scm?
I looked at several things yesterday,
and I don't have anything in a context menu .
http://en.wikipedia.org/wiki/Comparison_of_Subversion_clients
http://better-scm.berlios.de/comparison/comparison.html
http://en.wikipedia.org/wiki/Comparison_of_revision_control_software#User_interfaces
bzr-explorer for mac looks great
but the installers are only for pc:
https://launchpad.net/bzr-explorer/+download
download icon bzr-explorer-setup-0.11.2.exe (md5, sig)
Windows universal installer 198
download icon bzr-explorer-0.11.2.tar.gz (md5, sig)
Source code
. the visual tour of that .
however:
Standalone Installer page says it includes several gui's:
This is typically the best choice for most users and includes:
* the core Bazaar distribution
GUI clients - Bazaar Explorer, QBzr and optionally TortoiseBzr
numerous bundled plugins including BzrTools, bzr-svn, bzr-upload and bzr-xmloutput
* bundled Python (currently 2.5) interpreter with most (but not all) libraries.
for mac, there is a set of tools, no gui :
http://wiki.bazaar.canonical.com/MacOSXBundle/SnowLeopard
mac.mercurial.gui
http://www.jwwalker.com/pages/macmerc.html
mac.mercurial.gui#tortoisehg
http://tortoisehg.bitbucket.org/
http://bitbucket.org/tortoisehg/stable/wiki/ReleaseNotes
mac has tools update here
http://mercurial.selenic.com/wiki/mercurial-1.4.3_20100201-py2.6-macosx10.6
and great doc's;
http://hgbook.red-bean.com/
it also has a pkg that includes hg with tortoise for pc .
. it's the same one I got here: http://tortoisehg.bitbucket.org
textmate has scm support,
group collects why textmate is great;
http://stackoverflow.com/questions/33813/what-are-some-useful-textmate-features
note there is a clone for pc too:
http://www.e-texteditor.com/
co.dev:
http://e-texteditor.com/blog/category/tutorial
http://stackoverflow.com/questions/1598759/git-and-mercurial-compare-and-contrast
2.7:
[@] proj.addn/backup/log under hg control
2.8: bk.addn/dev/scm/patches:
. patches are files that show how 2 versions of a file differ .
. they're an alternative to journaling files
describing all changes in terms of
whole-line deletions and insertions .
. each contiguous pair of deletions and insertions
is refered to as one hunk of the patch .
. unix makes a patch with diff(txt,txt).patch,
and applies a patch with patch(patch).txt
. patch() doesn't represent folder systems exactly:
file creation doesn't show up if no lines were added;
and, file deletions don't show if the file was empty .
. patches are still being used as an alt' to
scm or version control systems
since the effect of each patch is the same as
one changeset -- the changes produced from
moving from one version to a child version .
. patches are typically used for customizing a codebase;
esp'ly when you aren't influential with that project
and can't get them to add your patches
as conditional compilation stmt's .
. in some large projects like the Linux kernel,
replacing patches with conditionals
would make the code unreadably complicated .
. combining scm with patching,
changes can be saved as a patch:
at any point where you could hg`commit,
you could instead diff() .
2.8: tips from trinitycore.org:
A tip about merging tool.
kdiff3.args=-L1 base --L2 local --L3 other $base $local $other -o $output
kdiff3.args=-L1 base --L2 local --L3 other $base $local $other -o $output --auto
sometimes you have hundreds of files to merge
but kdiff3 can solve conflicts automatically.
If you do not add "--auto"
you have to manually close the spammed kdiff3 windows.
hg serve
. the webserver option allows us to create
a great looking repo page for your local repo
on any port of your choosing.
proj.addn/dev/scm/eoln:
2.7:
. for getting eoln's done right,
-- where files checked out to a pc have pc eoln's --
my plan is to use yet another clone
on the main hard.drive,
after affecting some setting,
is this right?:
[configure repo'].window/diff/[Patch EOL]
-- default is no normalization,
so it's set to: platform?
( pc: crlf
, mac: lf
) .
you can tell when you've done this right
because agent-ransack or notepad will act right
and not ball-up the whole file on one line .
. instead of doing another clone,
I'll just add a working dir' to backup's clone
with backup`menu/tortoiseHg/update .
2.8: correction didn't take:
. after changing the hgrc file,
I cloned that to my xp's shared.folder;
but this did not work either .
. maybe I should clone without update,
then modify the new clone's hgrc,
then update .
. in any case I should do more booking:
file:///C:/Program Files/TortoiseHg/docs/hgrc.5.html
Filters for transforming files on checkout/checkin.
The most common usage is for
LF <-> CRLF translation on Windows.
For this, use the "smart" converters
which check for binary files:
Win32TextExtension short-comings:
biggest problem:
* The settings are not part of the repository
so all users must configure it for each clone.
[2.9:
. they would rather replace universal eoln's
with metadata which tells all cloners
that a given file or file`type
is supposed to use a particular eoln;
meaning that there must unversally be
tools that support a file's current eoln type .
Mark Hammond Dec 1, 2009:
. server-side hooks that force the line endings?
(ie: project/.hg/hgrc#[hooks]
pretxncommit.crlf = python:hgext.win32text.forbidcrlf
)
. this would only apply at *push* time,
not commit time. [ie, this may help the central repo,
but the lower-level repo's will have
already had their repo' histories destroyed .]
Given the distributed nature of hg
it seems that by the time a server-side hook kicks in,
the damage has already been done .
]
tips from trinitycore.org:
some bugs related to eol:
1. your patch modifies the whole file instead of only a few lines
2. you cannot apply patches (hunk failed)
3. your whole file is modified even if you did not change it
4. you cannot open .sln files using vc++
how to solve the problem:
1: apply hgext.win32text to [user's] global config file
[... and other steps if you're applying patches]
2: re-clone your local repo (must re-clone)
3: dos2unix and unix2dos are also handy:
. a patch is usually made with Unix`eoln's
but the patch needs dos`eoln's (with unix2dos)
in order to be applied to a source
that is cloned under the win32text extension .
another mod having a similar effect:
I was having a problem with
differences in whitespace
showing up into my patch files.
This added to my .hgrc helped that:
[diff]
ignorews=True
-- also, I no longer need to run this after updates:
dos2unix `find ./ -name '*.cpp' -o -name '*.h'`
2.9: here is the eoln ext's man'l!
. the reason for the change not sticking
was that the encode or decode filter settings
should not be changed while you have files checked out
- use hg update null
to remove any working files first.
[from the gui, tortoiseHg,
it might be easier to delete and reclone]
the filters come in two variants:
A "dumb" filter which modifies
anything looking like line endings
in all files it is applied to,
and a "clever" filter which only works on
files NOT containing zero bytes.
[what does "(not work) mean ?]
The simple heuristics used by the "clever" filter
will fail in some cases,
but it often works so well
that it can just be applied to all files.
a warning about the eoln extension:
. win32text is user-specific, not repo-specific.
This was not what we wanted;
svn's svn:eol setting is really handy
and has turned out to be great to have around.
. the hgeol extension currently under development
tries to mimic svn's eol function .
http://bitbucket.org/mg/hg-eol/overview/
. the plan is to have the .hgeol file
http://mercurial.selenic.com/wiki/EOLTranslationPlan
under version control
It would specify how files should be checked out
(e.g. native for the OS, \n, \r\n, or binary)
and make sure that no checkins
are going to lead to bad line endings.
[... but for now]
seems the encoder doesn't work
during conversion as the 'crlf'
commit hook fails.
Is it currently possible to correct the EOL
style of files during repository conversion?
. I used the win32 eoln extension
without the patch option, restarted,
2.10: sci.addn/dev/scm/hg`mov:
. after adding and moving,
I did commit/add (all);
then I tried the commit/mov.button,
and got this msg:
no movables; only clean files files can be moved .
2.12:
web.addn/dev/scm/hg/TortoiseMerge:
. TortoiseMerge is the merge tool that comes with TortoiseSVN;
here is a note on using it from TortoiseHG:
http://sundae.se/2008/06/10/using-tortoisemerge-in-tortoisehg/
. there were some conflicts from commenters,
and some known caveats weren't mentioned,
so I need to check this against the doc's, and some testing .
. add the following to your mercurial.ini file:
. My TortoiseSvn installation has a space character in the path,
so I need to add quotes around the file locaters:
To use this, I have to set Global setting or repository settings
to use myTortoiseMerge as
“Visual diff command” and “3-way Merge Tool”.
merge = filemerge
[extensions]
hgext.extdiff =
[extdiff]
cmd.vdiff = "C:\Program Files\TortoiseSVN\bin\TortoiseMerge.exe"
myTortoiseMerge = "C:\Program Files\TortoiseSVN\bin\TortoiseMerge.exe"
[merge-tools]
filemerge.executable = "C:\Program Files\TortoiseSVN\bin\TortoiseMerge.exe"
filemerge.args = /base:$base /theirs:$other /mine:$local /merged:$output
[tortoisehg]
vdiff = myTortoiseMerge
2.28: mis.addn/dev/scm/xpw.tortoisehg is getting complicated:
major pim change:
. log current year is part of pim.folder
. past log years are in log.folder .
. perhaps the reason for the access denial
is there is a file with nearly the same long name?
rename the other one .
. that error was a mystery as it wasn't reproducable .
. notes of my journey deciding on Mercurial .
2.1: news.addn/dev/scm/internals of git:
. the popular $9 [Git internals] book from Peepcode.
conceptuals:
http://www.eecs.harvard.edu/~cduan/technical/git/
man page everyone should read:
http://www.kernel.org/pub/software/scm/git/docs/gitworkflows.html
...
http://www.stevestreeting.com/2009/08/06/getting-more-structured-with-my-dvcs-tests/
2.1: proj.addn/dev/scm:
. how is svn on {tortoise, mac} knowing where to check;
is there something integrated on mac?
. how do you limit growth of the time mach aspect?
be careful with your updates (don't commit a bunch
you'll only be deleting later);
export and reimport .
. make sure backup is obvious when transfering things to git .
. consider project size;
is svn smarter replacement of mac timemach?
web:
scripts instead of gui
http://svn-finder.sourceforge.net/
http://en.wikipedia.org/wiki/Comparison_of_Subversion_clients
SmartSVN 79.00
xMerge add-on (Merging renamed/moved files) 399.00 USD
http://www.syntevo.com/smartsvn/index.html
. after that, I'm wondering if that lack of xmerge
was the reason git's inventor calls svn braindead .
http://versioncontrolblog.com/comparison/Bazaar/CVS/Git/Mercurial/Subversion/index.html
. hg might have better doc's?
and it's already installed on mac x.6 .
http://mercurial.berkwood.com/
The hg executable is now placed in /usr/local/bin for all versions of the installer.
For OS X 10.5 & 10.6
The package uses the default Python installation that comes installed.
darcs might fit my use case well
http://wiki.bazaar.canonical.com/MacOSXBundle/SnowLeopard
http://bazaar-vcs.org/WindowsDownloads
http://stackoverflow.com/questions/2105278/is-there-a-way-for-bazaar-to-automatically-detect-and-apply-changes-made-in-a-wor
Is there a way for Bazaar to be able to automatically detect changes (adds, removes, renames, etc.) made to part of the working directory and automatically apply them?
It looks like the automv plug-in will automatically detect renames and moves. This, along with bzr add * should do the trick.
http://www.stevestreeting.com/2009/09/28/early-stage-gitmercurialbazaar-evaluation-thoughts/
bzr copy doesn't work as expected
https://bugs.launchpad.net/bzr/+bug/269095
there is a rebase plugin available for Bazaar ( bazaar-vcs.org/Rebase)
and a queues one (launchpad.net/bzr-loom).
Bazaar does line-ending conversion already, since 1.14:
through a plugin (bzr-eol)..
http://doc.bazaar-vcs.org/explorer/en/visual-tour-windows.html
http://wiki.bazaar.canonical.com/BzrUsingBoundBranches
Bound branches are a way to make sure that both a local branch
and a remote branch have the same revisions.
This is particularly useful if one likes to work on two machines .
online plugins guide
pos.addn/dev/scm/for mac and pc:
. maybe I can use svn on pc side,
then use timemach on mac side?
Using Git With OS X: 6 Tools to Get You Up and Running
2.2: proj.addn/dev/scm/installs not going as expected:
. explore downloads meant for installing,
didn't I miss something about scm?
I looked at several things yesterday,
and I don't have anything in a context menu .
http://en.wikipedia.org/wiki/Comparison_of_Subversion_clients
http://better-scm.berlios.de/comparison/comparison.html
http://en.wikipedia.org/wiki/Comparison_of_revision_control_software#User_interfaces
bzr-explorer for mac looks great
but the installers are only for pc:
https://launchpad.net/bzr-explorer/+download
download icon bzr-explorer-setup-0.11.2.exe (md5, sig)
Windows universal installer 198
download icon bzr-explorer-0.11.2.tar.gz (md5, sig)
Source code
. the visual tour of that .
however:
Standalone Installer page says it includes several gui's:
This is typically the best choice for most users and includes:
* the core Bazaar distribution
GUI clients - Bazaar Explorer, QBzr and optionally TortoiseBzr
numerous bundled plugins including BzrTools, bzr-svn, bzr-upload and bzr-xmloutput
* bundled Python (currently 2.5) interpreter with most (but not all) libraries.
for mac, there is a set of tools, no gui :
http://wiki.bazaar.canonical.com/MacOSXBundle/SnowLeopard
mac.mercurial.gui
http://www.jwwalker.com/pages/macmerc.html
mac.mercurial.gui#tortoisehg
http://tortoisehg.bitbucket.org/
http://bitbucket.org/tortoisehg/stable/wiki/ReleaseNotes
mac has tools update here
http://mercurial.selenic.com/wiki/mercurial-1.4.3_20100201-py2.6-macosx10.6
and great doc's;
http://hgbook.red-bean.com/
it also has a pkg that includes hg with tortoise for pc .
. it's the same one I got here: http://tortoisehg.bitbucket.org
textmate has scm support,
group collects why textmate is great;
http://stackoverflow.com/questions/33813/what-are-some-useful-textmate-features
note there is a clone for pc too:
http://www.e-texteditor.com/
co.dev:
http://e-texteditor.com/blog/category/tutorial
http://stackoverflow.com/questions/1598759/git-and-mercurial-compare-and-contrast
2.7:
[@] proj.addn/backup/log under hg control
2.8: bk.addn/dev/scm/patches:
. patches are files that show how 2 versions of a file differ .
. they're an alternative to journaling files
describing all changes in terms of
whole-line deletions and insertions .
. each contiguous pair of deletions and insertions
is refered to as one hunk of the patch .
. unix makes a patch with diff(txt,txt).patch,
and applies a patch with patch(patch).txt
. patch() doesn't represent folder systems exactly:
file creation doesn't show up if no lines were added;
and, file deletions don't show if the file was empty .
. patches are still being used as an alt' to
scm or version control systems
since the effect of each patch is the same as
one changeset -- the changes produced from
moving from one version to a child version .
. patches are typically used for customizing a codebase;
esp'ly when you aren't influential with that project
and can't get them to add your patches
as conditional compilation stmt's .
. in some large projects like the Linux kernel,
replacing patches with conditionals
would make the code unreadably complicated .
. combining scm with patching,
changes can be saved as a patch:
at any point where you could hg`commit,
you could instead diff() .
2.8: tips from trinitycore.org:
A tip about merging tool.
kdiff3.args=-L1 base --L2 local --L3 other $base $local $other -o $output
kdiff3.args=-L1 base --L2 local --L3 other $base $local $other -o $output --auto
sometimes you have hundreds of files to merge
but kdiff3 can solve conflicts automatically.
If you do not add "--auto"
you have to manually close the spammed kdiff3 windows.
hg serve
. the webserver option allows us to create
a great looking repo page for your local repo
on any port of your choosing.
proj.addn/dev/scm/eoln:
2.7:
. for getting eoln's done right,
-- where files checked out to a pc have pc eoln's --
my plan is to use yet another clone
on the main hard.drive,
after affecting some setting,
is this right?:
[configure repo'].window/diff/[Patch EOL]
-- default is no normalization,
so it's set to: platform?
( pc: crlf
, mac: lf
) .
you can tell when you've done this right
because agent-ransack or notepad will act right
and not ball-up the whole file on one line .
. instead of doing another clone,
I'll just add a working dir' to backup's clone
with backup`menu/tortoiseHg/update .
2.8: correction didn't take:
. after changing the hgrc file,
I cloned that to my xp's shared.folder;
but this did not work either .
. maybe I should clone without update,
then modify the new clone's hgrc,
then update .
. in any case I should do more booking:
file:///C:/Program Files/TortoiseHg/docs/hgrc.5.html
Filters for transforming files on checkout/checkin.
The most common usage is for
LF <-> CRLF translation on Windows.
For this, use the "smart" converters
which check for binary files:
[extensions]
hgext.win32text =
[encode]
** = cleverencode:
[decode]
** = cleverdecode:
Win32TextExtension short-comings:
biggest problem:
* The settings are not part of the repository
so all users must configure it for each clone.
[2.9:
. they would rather replace universal eoln's
with metadata which tells all cloners
that a given file or file`type
is supposed to use a particular eoln;
meaning that there must unversally be
tools that support a file's current eoln type .
Mark Hammond Dec 1, 2009:
. server-side hooks that force the line endings?
(ie: project/.hg/hgrc#[hooks]
pretxncommit.crlf = python:hgext.win32text.forbidcrlf
)
. this would only apply at *push* time,
not commit time. [ie, this may help the central repo,
but the lower-level repo's will have
already had their repo' histories destroyed .]
Given the distributed nature of hg
it seems that by the time a server-side hook kicks in,
the damage has already been done .
]
tips from trinitycore.org:
some bugs related to eol:
1. your patch modifies the whole file instead of only a few lines
2. you cannot apply patches (hunk failed)
3. your whole file is modified even if you did not change it
4. you cannot open .sln files using vc++
how to solve the problem:
1: apply hgext.win32text to [user's] global config file
[... and other steps if you're applying patches]
2: re-clone your local repo (must re-clone)
3: dos2unix and unix2dos are also handy:
. a patch is usually made with Unix`eoln's
but the patch needs dos`eoln's (with unix2dos)
in order to be applied to a source
that is cloned under the win32text extension .
another mod having a similar effect:
I was having a problem with
differences in whitespace
showing up into my patch files.
This added to my .hgrc helped that:
[diff]
ignorews=True
-- also, I no longer need to run this after updates:
dos2unix `find ./ -name '*.cpp' -o -name '*.h'`
2.9: here is the eoln ext's man'l!
. the reason for the change not sticking
was that the encode or decode filter settings
should not be changed while you have files checked out
- use hg update null
to remove any working files first.
[from the gui, tortoiseHg,
it might be easier to delete and reclone]
the filters come in two variants:
A "dumb" filter which modifies
anything looking like line endings
in all files it is applied to,
and a "clever" filter which only works on
files NOT containing zero bytes.
[what does "(not work) mean ?]
The simple heuristics used by the "clever" filter
will fail in some cases,
but it often works so well
that it can just be applied to all files.
a warning about the eoln extension:
. win32text is user-specific, not repo-specific.
This was not what we wanted;
svn's svn:eol setting is really handy
and has turned out to be great to have around.
. the hgeol extension currently under development
tries to mimic svn's eol function .
http://bitbucket.org/mg/hg-eol/overview/
. the plan is to have the .hgeol file
http://mercurial.selenic.com/wiki/EOLTranslationPlan
under version control
It would specify how files should be checked out
(e.g. native for the OS, \n, \r\n, or binary)
and make sure that no checkins
are going to lead to bad line endings.
[... but for now]
seems the encoder doesn't work
during conversion as the 'crlf'
commit hook fails.
Is it currently possible to correct the EOL
style of files during repository conversion?
. I used the win32 eoln extension
without the patch option, restarted,
2.10: sci.addn/dev/scm/hg`mov:
. after adding and moving,
I did commit/add (all);
then I tried the commit/mov.button,
and got this msg:
no movables; only clean files files can be moved .
2.12:
web.addn/dev/scm/hg/TortoiseMerge:
. TortoiseMerge is the merge tool that comes with TortoiseSVN;
here is a note on using it from TortoiseHG:
http://sundae.se/2008/06/10/using-tortoisemerge-in-tortoisehg/
. there were some conflicts from commenters,
and some known caveats weren't mentioned,
so I need to check this against the doc's, and some testing .
. add the following to your mercurial.ini file:
. My TortoiseSvn installation has a space character in the path,
so I need to add quotes around the file locaters:
To use this, I have to set Global setting or repository settings
to use myTortoiseMerge as
“Visual diff command” and “3-way Merge Tool”.
merge = filemerge
[extensions]
hgext.extdiff =
[extdiff]
cmd.vdiff = "C:\Program Files\TortoiseSVN\bin\TortoiseMerge.exe"
myTortoiseMerge = "C:\Program Files\TortoiseSVN\bin\TortoiseMerge.exe"
[merge-tools]
filemerge.executable = "C:\Program Files\TortoiseSVN\bin\TortoiseMerge.exe"
filemerge.args = /base:$base /theirs:$other /mine:$local /merged:$output
[tortoisehg]
vdiff = myTortoiseMerge
2.28: mis.addn/dev/scm/xpw.tortoisehg is getting complicated:
major pim change:
. log current year is part of pim.folder
. past log years are in log.folder .
trouble committing (2008 tucs)`L/2008/06 jun/System Scan - PLEASE WAIT - Scan in progress.html!
transaction abort!
rollback completed
[Errno 13] E:\pim\(2008 tucs)`L/2008/06 jun/System Scan - PLEASE WAIT - Scan in progress.html: Access is denied
[command interrupted]
. perhaps the reason for the access denial
is there is a file with nearly the same long name?
rename the other one .
(2008 tucs)`L/2008/01 jan/00.txt~: The system cannot find the path specified
. that error was a mystery as it wasn't reproducable .
software engineering officially defined
2.16: web.adds/sw.eng/official definitions:
. ABET (Accreditation Board for Engineering and Technology)
is the recognized U.S. accreditor of college and university programs
in applied science, computing, engineering, and technology.
. it is owned an operated by several pro' soc's;
most are amer'eng'ing, but some are internat':
INCOSE (internat' council on sys' eng')
started out as an amer'group:
National Council on Systems Engineering (NCOSE)
. The purpose of a Systems Engineering society
was to "(address the apparent shortage of
qualified engineers who could think in terms of
a total system — rather than just a specific discipline.)
. sys'eng'ing includes Software engineering
"(the application of computer sciences, project management,
and other techniques to create computer software.
While it started out as a mathematical discipline,
software engineering now has the characteristics of
an engineering discipline.)
Additionally, many online advanced degrees in SE have appeared
such as the MS in SE at California State University, Fullerton.
Software Engineering 2004 (SE2004) Curriculum std
"( The Software Engineering 2004 (SE2004)
is a document that provides recommendations for
undergraduate education in software engineering.
Its development was sponsored by the acm
and the IEEE Computer Society.
Important components of SE2004 include:
the SE Education Knowledge,
a list of topics that all graduates should know,
as well as a set of guidelines for implementing curricula
and a set of proposed courses.
SWEBOK (the SE BOdy of Knowledge)
. SWEBOK, which has become an ISO standard
describes the body of knowledge covered by a software engineer
The SWEBOK also defines disciplines related to software engineering
* Computer engineering
* Computer science
* Management
* Mathematics
* Quality management
* Software ergonomics (Cognitive ergonomics)
* Systems engineering
The difference from (SE2004, CCSE) is that
whereas SWEBOK defines
the software engineering knowledge that practitioners should have
after four years of practice,
the SE2004 (pdf) defines the knowledge that
an undergraduate SE grad should have
(including knowledge of mathematics, general engineering principles,
and other related areas).
swebok def of sw.eng:
The IEEE Computer Society defines SE as:
(1)
The application of a systematic, disciplined, quantifiable approach
to the development, operation, and maintenance of software;
that is, the application of engineering to software.
(2)
"The legitimization of professional authority
involves three distinctive claims:
first,
that the knowledge and competence of the professional
have been validated by a community of his or her peers;
second,
that this consensually validated knowledge rests on
rational, scientific grounds;
and third,
that the professional's judgment and advice
are oriented toward a set of substantive values,
such as [linguistically programmed automation]
These aspects of legitimacy correspond to the kinds of attributes
— collegial, cognitive, and moral —
usually embodied in the term "profession."
CHARACTERISTICS OF A PROFESSION?
Gary Ford and Norman Gibbs studied several recognized professions,
including medicine, law, engineering, and accounting.
They concluded that an engineering profession is characterized by
several components:
. an educational curriculum accreditation
. Registration of fitness to practice
via voluntary certification or mandatory licensing
. continuing education
things outside the swebok scope:
Communal support via a society [or union]
codes of ethics
Without such a consensus on a Body of Knowledge
no licensing examination can be validated,
no curriculum can prepare an individual for an examination,
and no criteria can be formulated for accrediting a curriculum.
OBJECTIVES OF THE SWEBOK PROJECT?
1. To promote a consistent view of software engineering worldwide
2. define how it differs from other disciplines
such as computer science, project management,
computer engineering, and mathematics
3. To characterize the contents of the discipline
4. To provide a topical access to it
5. To provide a foundation for curriculum development
and for individual certification and licensing material
. ABET (Accreditation Board for Engineering and Technology)
is the recognized U.S. accreditor of college and university programs
in applied science, computing, engineering, and technology.
. it is owned an operated by several pro' soc's;
most are amer'eng'ing, but some are internat':
INCOSE (internat' council on sys' eng')
started out as an amer'group:
National Council on Systems Engineering (NCOSE)
. The purpose of a Systems Engineering society
was to "(address the apparent shortage of
qualified engineers who could think in terms of
a total system — rather than just a specific discipline.)
. sys'eng'ing includes Software engineering
"(the application of computer sciences, project management,
and other techniques to create computer software.
While it started out as a mathematical discipline,
software engineering now has the characteristics of
an engineering discipline.)
Additionally, many online advanced degrees in SE have appeared
such as the MS in SE at California State University, Fullerton.
Software Engineering 2004 (SE2004) Curriculum std
"( The Software Engineering 2004 (SE2004)
is a document that provides recommendations for
undergraduate education in software engineering.
Its development was sponsored by the acm
and the IEEE Computer Society.
Important components of SE2004 include:
the SE Education Knowledge,
a list of topics that all graduates should know,
as well as a set of guidelines for implementing curricula
and a set of proposed courses.
SWEBOK (the SE BOdy of Knowledge)
. SWEBOK, which has become an ISO standard
describes the body of knowledge covered by a software engineer
The SWEBOK also defines disciplines related to software engineering
* Computer engineering
* Computer science
* Management
* Mathematics
* Quality management
* Software ergonomics (Cognitive ergonomics)
* Systems engineering
The difference from (SE2004, CCSE) is that
whereas SWEBOK defines
the software engineering knowledge that practitioners should have
after four years of practice,
the SE2004 (pdf) defines the knowledge that
an undergraduate SE grad should have
(including knowledge of mathematics, general engineering principles,
and other related areas).
swebok def of sw.eng:
The IEEE Computer Society defines SE as:
(1)
The application of a systematic, disciplined, quantifiable approach
to the development, operation, and maintenance of software;
that is, the application of engineering to software.
(2)
"The legitimization of professional authority
involves three distinctive claims:
first,
that the knowledge and competence of the professional
have been validated by a community of his or her peers;
second,
that this consensually validated knowledge rests on
rational, scientific grounds;
and third,
that the professional's judgment and advice
are oriented toward a set of substantive values,
such as [linguistically programmed automation]
These aspects of legitimacy correspond to the kinds of attributes
— collegial, cognitive, and moral —
usually embodied in the term "profession."
CHARACTERISTICS OF A PROFESSION?
Gary Ford and Norman Gibbs studied several recognized professions,
including medicine, law, engineering, and accounting.
They concluded that an engineering profession is characterized by
several components:
. an educational curriculum accreditation
. Registration of fitness to practice
via voluntary certification or mandatory licensing
. continuing education
things outside the swebok scope:
Communal support via a society [or union]
codes of ethics
Without such a consensus on a Body of Knowledge
no licensing examination can be validated,
no curriculum can prepare an individual for an examination,
and no criteria can be formulated for accrediting a curriculum.
OBJECTIVES OF THE SWEBOK PROJECT?
1. To promote a consistent view of software engineering worldwide
2. define how it differs from other disciplines
such as computer science, project management,
computer engineering, and mathematics
3. To characterize the contents of the discipline
4. To provide a topical access to it
5. To provide a foundation for curriculum development
and for individual certification and licensing material
google'code fully supporting mercurial repositories
2.7: proj.addn/net.g'code/getting started with hg repository:
booking
. before figuring out that I could use hg instead of svn,
I did try the [Reset This Repository] for the addx project:
"(
. Mercurial an option for all yet? yes:
"(
. all projects were converted to hg repo's:
for add* in {addx, adda, adde, addm}:
https://code.google.com/p/add*/adminSource
default: https://add*.googlecode.com/hg/
wiki: https://wiki.add*.googlecode.com/hg/
. now the source page confirms I'm with hg:
get a local copy of the add* repository with this command:
hg clone https://add*.googlecode.com/hg/ add*
easy downloads
. use the Downloads tab to upload compressed files.
(eg, mine is https://code.google.com/p/addx/downloads/entry)
. choose the file names carefully
as you cannot change it later. [except by deletion]
[. the downloads could be
the easiest way for everything:
. doing doc's by wiki is ok on a netbook,
but if you have a prefered html editor,
the best way by far to distribute doc's
is to simply zip the folder structure into
one downloadable book .
. if working alone, then this is the way to
keep your source code in any repo system you want
(eg, you could migrate from hg to git);
however, the problem with monolithic downloads
is not being able to update them incrementally:
it gets expensive on bandwidth
to re-upload the entire thing for each revision .]
todo:
. predefined download labels useage
was a mystery to me for now ...
https://code.google.com/p/addx/adminDownloads
[2.28: perhaps becomes obvious during an upload .]
todo: [2.28: done] uploading to g'code with a gui
. there is a how-to for using TortoiseSVN,
it needs to be adapted for use with Tortoisehg ....
[2.28: done with the help of tortoiseHg tutorial]
"(
. find your google'code ID in your project's home page,
eg, for project addx, home is:
https://code.google.com/p/addx/
at the bottom it tells the owner's name:
-- mine's dr.addn, as seen here:
https://code.google.com/u/dr.addn/
. to find your assigned g'code password
see g'code's "Settings" tab .
. In Windows explorer, [on the mac? try vmware]
right click in your repo' directory's context menu,
and choose TortoiseHg/Repository Settings/Sync.tab/add.button
and then the dialog is obvious about filling in
your g'code hg repo contact details:
( URL: https://addx.googlecode.com/hg/ (for the addx project)
, user: dr.addn
, password: (see http://code.google.com/hosting/settings)
)
. now to do the uploading to your hg repo' at g'code,
right click n your local repo' directory's context menu,
to get TortoiseHg/Synchronize .
. the dialog will have a line that says:
[repo:][bundle:][(repo' pull-down menu)] post pull:[(pull-down menu)]
. when you pull down the [(repo' pull-down menu)]
you will see the contact details you filled in during
context`menu/TortoiseHg/Repository Settings/Sync.tab/add.button
mine looks like this:
https://dr.addn:***@addx.googlecode.com/hg/
(the *** represents the password you entered) .
. select it to make it show in the menu .
. now at the top of the dialog is the push.button;
ie, a button that launches the Push command;
pushing your local repo's state into your g'code repo .
tortoiseSVN is still there
. here's a google-authored page for
using g'code with tortoise svn instead of hg .
. it recommends an svn client for mac too .
(zigversion.com)
[2.28: I'm using tortoiseHg on the mac via vmware
which allows windows to run in a mac window .]
booking
. before figuring out that I could use hg instead of svn,
I did try the [Reset This Repository] for the addx project:
"(
Did you just start this project)
and do you want to 'svnsync' content
from an existing repository into this project? yes:
Warning:
Resetting the repository will delete
everything in the repository and its history.
This includes project wiki files.
Reset this project's Subversion repository
from revision 1 to revision 0.
A project owner can then use the svnsync tool to upload existing code history.
. Mercurial an option for all yet? yes:
"(
Convert your project from Subversion to Mercurial)
http://code.google.com/p/support/wiki/ConvertingSvnToHg
1. Go to project/Administer tab/Source tab
[eg, mine is https://code.google.com/p/addx/adminSource]
2. Change the repository type to Mercurial
parameters:
* Root directory: /
* Trunk directory: /trunk
--[ change this to empty because my current repo
is empty so /trunk doesn't exist .]
. all projects were converted to hg repo's:
for add* in {addx, adda, adde, addm}:
https://code.google.com/p/add*/adminSource
default: https://add*.googlecode.com/hg/
wiki: https://wiki.add*.googlecode.com/hg/
. now the source page confirms I'm with hg:
get a local copy of the add* repository with this command:
hg clone https://add*.googlecode.com/hg/ add*
easy downloads
. use the Downloads tab to upload compressed files.
(eg, mine is https://code.google.com/p/addx/downloads/entry)
. choose the file names carefully
as you cannot change it later. [except by deletion]
[. the downloads could be
the easiest way for everything:
. doing doc's by wiki is ok on a netbook,
but if you have a prefered html editor,
the best way by far to distribute doc's
is to simply zip the folder structure into
one downloadable book .
. if working alone, then this is the way to
keep your source code in any repo system you want
(eg, you could migrate from hg to git);
however, the problem with monolithic downloads
is not being able to update them incrementally:
it gets expensive on bandwidth
to re-upload the entire thing for each revision .]
todo:
. predefined download labels useage
was a mystery to me for now ...
https://code.google.com/p/addx/adminDownloads
[2.28: perhaps becomes obvious during an upload .]
todo: [2.28: done] uploading to g'code with a gui
. there is a how-to for using TortoiseSVN,
it needs to be adapted for use with Tortoisehg ....
[2.28: done with the help of tortoiseHg tutorial]
"(
. find your google'code ID in your project's home page,
eg, for project addx, home is:
https://code.google.com/p/addx/
at the bottom it tells the owner's name:
-- mine's dr.addn, as seen here:
https://code.google.com/u/dr.addn/
. to find your assigned g'code password
see g'code's "Settings" tab .
. In Windows explorer, [on the mac? try vmware]
right click in your repo' directory's context menu,
and choose TortoiseHg/Repository Settings/Sync.tab/add.button
and then the dialog is obvious about filling in
your g'code hg repo contact details:
( URL: https://addx.googlecode.com/hg/ (for the addx project)
, user: dr.addn
, password: (see http://code.google.com/hosting/settings)
)
. now to do the uploading to your hg repo' at g'code,
right click n your local repo' directory's context menu,
to get TortoiseHg/Synchronize .
. the dialog will have a line that says:
[repo:][bundle:][(repo' pull-down menu)] post pull:[(pull-down menu)]
. when you pull down the [(repo' pull-down menu)]
you will see the contact details you filled in during
context`menu/TortoiseHg/Repository Settings/Sync.tab/add.button
mine looks like this:
https://dr.addn:***@addx.googlecode.com/hg/
(the *** represents the password you entered) .
. select it to make it show in the menu .
. now at the top of the dialog is the push.button;
ie, a button that launches the Push command;
pushing your local repo's state into your g'code repo .
tortoiseSVN is still there
. here's a google-authored page for
using g'code with tortoise svn instead of hg .
. it recommends an svn client for mac too .
(zigversion.com)
[2.28: I'm using tortoiseHg on the mac via vmware
which allows windows to run in a mac window .]
2010-01-31
cocoa dev'ing
1.13: web.addn/dev.mac/singh`os x internals:
explore more:
1.23: pos.addn/dev.mac/cocoa:
. with example code being available,
the best bet is to find examples of
{web browser, text and graphics editor}
then find doc's of all classes used by them .
A number of Applications have beenremoved from the App Storeon the basis that they allegedlyinfringed a pre-existing trademark.
1.31: mis:
. I'm just glad I haven't come to that bridge yet;
the worry associated with hooded judges at App store
seems daunting .
An iPhone application for sending accelerometer datafrom your iPhone/iPod touch to your development computerfor using accelerometer inside the iPhone simulator.Let's you develop and debug applications that require accelerometerwithout running the application on the device.Can also be used to create desktop applicationsutilizing the iPhone accelerometer as control.Uses UDP broadcast/unicast for sending data,so you can even have multiple senders/receivers at the same time.
todo.addn/dev.mac#iphone/automation onboard:
. did I really hear right that iphone disallows
scripting engines?
does it already have something like automator?
maybe if it had an applescript engine
they could use an adda->applescript compiler
web:
. iphone does have automator .
1.31: web.addn/dev.mac#iphone.scratch:
Scratch Forums / Scratch on iPhone? yes:
booking obj'c
1.10: web.addn/dev.c/ms'visual c++:
(even though my primary goal right now is dev.mac,
I often use a pc tablet/laptop (xpw)
and am interested in a c sdk for that platform)
. vcsetup (in downloads) is for ms`visual c++
see tutorial .
. it has an optional game api;
but I doubted this would help sci c on xpw .
. here is a vid showing the ide;
it needs silverlight in firefox (not chrome) .
(opens into win'media player and then is dead )
lib.addn/dev.c/blog.kowalczyk.info:
co.dev.c
co.dev.obj'c
co.dev.mac.
1.15: lib.addn/dev.mac/obj'c:
1.17: the secret life of globals:
. I was wondering if there was some
sure way of knowing how c globals worked:
. did the value remain persistent across
all platform time,
or just the main program's execution time ?
. the [code complete].book reminds me,
to not even use globals .
. atleast you don't have to depend on
their being persistent: use files .
1.19: co.dev.c:
mem mgt tips:
> According to the memory management rules,you're only responsible for objects you create viaan "alloc", "new", or "copy" method,All other objects are autoreleased....Unless your PerformXMLXPathQuery returns an object that you own.But if it does that,it should have been given a better name-- one that has the word alloc, new or copy in it..... the method in question "PerformXMLXPathQuery"is a wrapper that was obtained from cocoawithlove.com .
sci.addn/dev.c/organizing large programs:
. what's the diff'tween separate files,
and when exactly are we including header files?
(I'm getting confused between what's communicated to
the compiler vs the linker)
. the headers are typically just holding the decl's
which are like the import stmt:
the decl' says
a given function type (the signature of it) will be
found among one of your other files .
. just as there are separate {decl's, def's} for functions,
there can also be separate {decl's, def's} for variables .
. shared var's are just like a pascal global,
except that you get the chance to separately compile .
. if you didn't use separate compilation
then you
could simply use the includes for
could simply use the includes formerging all the separately filed def's
and then you wouldn't need the header files .
news"decl's, def's, and perfectly legal C code, oh my!
stumped by c decl's?
cdecl.org converts them to english .
much about loader activity at tenouk.com
--. interesting details like that found in the
[van der linden]`[expert c].book .
Labels:
adda,
dev.c,
dev.obj'c,
translation
computer programming for all (children) is here!
10.1.31: news.addx/scratch.mit.edu
. filling out the form to get updates about Scratch:
School or Organization: Americium Dream Documents
Role: Researcher
Where did you hear about Scratch?
suggestions-for-an-embeddable-scripting-language-for-iphone:
Can you build a visual (touch based)What interests you about Scratch?
programming environment like Scratch?
http://scratch.mit.edu/
cp4e (computer programming for everyone)
Anything else you want to share about your background or related experience?
addx -- a secure and friendly system
that promotes computing as a universal 2nd language
free {pc, mac} downloads with tons of support
Scratch Installer For Mac OS X (MacScratch1.4.dmg)
Scratch Installer for Windows (ScratchInstaller1.4.exe)
. user doc's include the support page's links:
getting started page
release notes
Getting Started Guide (pdf)
faq
new user forum
other forum pages (28,400 pages)
learnscratch.org (115 pages)
Scratch Reference Guide
Scratch Cards
Videos about Scratch
Scratch 1.4: Beginner's Guide ($32 book)
Scratch Programming for Teens ($20 book)
evangelism
[. if you are redistributing an official copy,
or pointing at where to get it, then ]
you can include a description of Scratch
and the Scratch logo:

"Scratch, a project of MIT Media Lab's
Lifelong Kindergarten group,
makes it easy to program your own
interactive stories, games, and animations
-- and share your creations on the web.
As you create and share projects with Scratch,
you learn to think creatively,
reason systematically,
and work collaboratively .
It is available for free download
from scratch.mit.edu .
scratch reviews in the news
Research Papers and Presentations
Scratch: Programming for All. Communications of the ACM, November 2009 (pdf)
What video game making can teach us about learning and literacy:
Alternative pathways into participatory cultures. (pdf)
Alternative pathways into participatory cultures. (pdf)
All I Really Need to Know (About Creative Thinking)
I Learned (By Studying How Children Learn) in Kindergarten. (pdf)
I Learned (By Studying How Children Learn) in Kindergarten. (pdf)
Creative coding: The role of art and programming
in the K-12 educational context. (pdf)
in the K-12 educational context. (pdf)
2005 Some Reflections on Designing Construction Kits for Kids. (pdf)
some confusion about linux sources
. no need to recompile if are using
a recent version of Ubuntu (7.x or 8.x).
However, if you do need to rebuild the binaries,
they have source code for the Squeak virtual machine
and
source code for the special Scratch plugins is available
at "(mks://localhost/Source_Code) ?
mks ? perhaps refers to this:
MKS Toolkit Vs. Cygwin: You Get What You Pay For - New
browser and other tools
inside the Squeak programming environment.
To get started,
first copy the Scratch application
( pc: "Scratch.exe"
, mac: "Scratch.app"
) from your normal Scratch folder
into the Scratch source code folder.
(The Scratch application is actually just a
Squeak virtual machine,
so any recent Squeak virtual machine should also work.)
Also, put a copy of the Squeak source code file
in that folder if needed
(this file is included in the zip file
starting with the 1.4 source release).
Finally,
drop the file "ScratchSourceCode1.4.image"
onto the Scratch application.
The Squeak programming environment will start up,
allowing you to view and modify the Scratch source code.
Scratch is built on a modified Squeak 2.8 image .
That version of Squeak is documented at
the squeak.org site, and two books:
Mark Guzdial` "Squeak: Object-Oriented Design with Multimedia Applications"
and {Mark Guzdial, Kimberly Rose}`
"Squeak: Open Personal Computing and Multimedia"
Both the source code and pre-compiled binaries
for the Squeak virtual machine are available at www.squeakvm.org .
. classes that appear in the original Squeak 2.8 image
are covered by the Squeak license
while all code in the remaining classes is covered by the Scratch license.
The Scratch classes are easy to find in practice:
nearly all of them appear in the class categories starting with "Scratch-".
doc's for developers
. comments are embedded in the code
and see the Scratch project file format .
. both developers and users are finding personalized help
at the advanced forum;
eg, the great list of tips
-- many of these will someday make their way
into the official user doc's .
. researchers might also get help by contact form .
license
. the source code license includes certain restrictions
intended to avoid confusion between the Scratch product
and research projects built on the Scratch source code.
If members of the Scratch user community
stumble on a research project based on the Scratch code,
they should be able to tell at a glance
that it is not the Scratch product.
The Scratch Source Code License
[. it's like the GPL plus...]
. for non-commercial uses
. you cannot use the word "Scratch"
to refer to derivative works
(except in the phrase
"Based on Scratch from the MIT Media Laboratory"),
. you cannot use the Scratch logo
nor the official (copyrighted) Scratch cat;
you cannot implement the ability to upload projects
to any MIT Scratch website
. and see the full license in "license.txt"
included in the source code download package.
2003 NSF grant Proposal:
A Networked, Media-Rich Programming Environment
to Enhance Technological Fluency
at After-School Centers in Economically-Disadvantaged Communities. (pdf)
educator doc's
getting started for educators
1-page overviews:
Creating with Scratch (pdf)
Learning with Scratch (pdf)
and Programming with Scratch (pdf) .
educator resources
educator forum
map of interested educators
Programming Concepts in Scratch (pdf)
. the computational concepts and skills
young people can develop .
Scratch and 21st Century Learning Skills (pdf)
. the learning skills young people can develop .
Learning by Designing (pdf)
. design-based approaches to learning .
find doc's in your language
--. some have their own websites:
( portuguese (6800 pages)
arabic.edu (400 pages)
hungarian (310 pages)
estonian (100 pages)
israeli.org (40 pages)
spanish.{org, educa}(25 pages)
dutch.{edu, org} (6 pages),
italian.com (1 page)
scratch openware
This source code release (4.8mb)
is based on the source code of Scratch 1.4
with a few changes [to conform to the license]
To view the source code,
just drop the .image file onto a Squeak virtual machine
(e.g. Scratch.exe or Scratch.app,
which come bundled with Scratch).
. source code for the Squeak virtual machine .
Scratch UI "Skin" resource:
The Scratch User Interface is a
ScratchFrameMorph.class`ScratchSkin.Dictionary .
. readSkinFrom(folder) can load the skin
from this skin folder download. (zip)
ScratchPlugin and UnicodePlugin source code (zip)
(for Windows, Mac OS X, and Linux) .
ScratchPlugin for Squeak
is a shared C library that extends the Squeak VM
to support image filters, presentation mode, the help button, ... .
. UnicodePlugin lets Squeak support text rendering .
A Networked, Media-Rich Programming Environment
to Enhance Technological Fluency
at After-School Centers in Economically-Disadvantaged Communities. (pdf)
educator doc's
getting started for educators
1-page overviews:
Creating with Scratch (pdf)
Learning with Scratch (pdf)
and Programming with Scratch (pdf) .
educator resources
educator forum
map of interested educators
Programming Concepts in Scratch (pdf)
. the computational concepts and skills
young people can develop .
Scratch and 21st Century Learning Skills (pdf)
. the learning skills young people can develop .
Learning by Designing (pdf)
. design-based approaches to learning .
find doc's in your language
--. some have their own websites:
( portuguese (6800 pages)
arabic.edu (400 pages)
hungarian (310 pages)
estonian (100 pages)
israeli.org (40 pages)
spanish.{org, educa}(25 pages)
dutch.{edu, org} (6 pages),
italian.com (1 page)
scratch openware
This source code release (4.8mb)
is based on the source code of Scratch 1.4
with a few changes [to conform to the license]
To view the source code,
just drop the .image file onto a Squeak virtual machine
(e.g. Scratch.exe or Scratch.app,
which come bundled with Scratch).
. source code for the Squeak virtual machine .
Scratch UI "Skin" resource:
The Scratch User Interface is a
ScratchFrameMorph.class`ScratchSkin.Dictionary .
. readSkinFrom(folder) can load the skin
from this skin folder download. (zip)
ScratchPlugin and UnicodePlugin source code (zip)
(for Windows, Mac OS X, and Linux) .
ScratchPlugin for Squeak
is a shared C library that extends the Squeak VM
to support image filters, presentation mode, the help button, ... .
. UnicodePlugin lets Squeak support text rendering .
some confusion about linux sources
. no need to recompile if are using
a recent version of Ubuntu (7.x or 8.x).
However, if you do need to rebuild the binaries,
they have source code for the Squeak virtual machine
and
source code for the special Scratch plugins is available
at "(mks://localhost/Source_Code) ?
mks ? perhaps refers to this:
MKS Toolkit Vs. Cygwin: You Get What You Pay For - New
. source code is best explored using the$479 MKS Toolkit for Developers is a Windows development product
for software, script, and Web developers,
who can choose from command-line
or graphical Visual Studio® build environments.
It is ideal for developing common, cross-platform scripts
for UNIX, Linux, and Windows,
from a single Windows desktop.
Using the power of more than 300
command-line utilities, and CGI scripts.
browser and other tools
inside the Squeak programming environment.
To get started,
first copy the Scratch application
( pc: "Scratch.exe"
, mac: "Scratch.app"
) from your normal Scratch folder
into the Scratch source code folder.
(The Scratch application is actually just a
Squeak virtual machine,
so any recent Squeak virtual machine should also work.)
Also, put a copy of the Squeak source code file
in that folder if needed
(this file is included in the zip file
starting with the 1.4 source release).
Finally,
drop the file "ScratchSourceCode1.4.image"
onto the Scratch application.
The Squeak programming environment will start up,
allowing you to view and modify the Scratch source code.
Scratch is built on a modified Squeak 2.8 image .
That version of Squeak is documented at
the squeak.org site, and two books:
Mark Guzdial` "Squeak: Object-Oriented Design with Multimedia Applications"
and {Mark Guzdial, Kimberly Rose}`
"Squeak: Open Personal Computing and Multimedia"
Both the source code and pre-compiled binaries
for the Squeak virtual machine are available at www.squeakvm.org .
. classes that appear in the original Squeak 2.8 image
are covered by the Squeak license
while all code in the remaining classes is covered by the Scratch license.
The Scratch classes are easy to find in practice:
nearly all of them appear in the class categories starting with "Scratch-".
doc's for developers
. comments are embedded in the code
and see the Scratch project file format .
. both developers and users are finding personalized help
at the advanced forum;
eg, the great list of tips
-- many of these will someday make their way
into the official user doc's .
. researchers might also get help by contact form .
license
. the source code license includes certain restrictions
intended to avoid confusion between the Scratch product
and research projects built on the Scratch source code.
If members of the Scratch user community
stumble on a research project based on the Scratch code,
they should be able to tell at a glance
that it is not the Scratch product.
The Scratch Source Code License
[. it's like the GPL plus...]
. for non-commercial uses
. you cannot use the word "Scratch"
to refer to derivative works
(except in the phrase
"Based on Scratch from the MIT Media Laboratory"),
. you cannot use the Scratch logo
nor the official (copyrighted) Scratch cat;
you cannot implement the ability to upload projects
to any MIT Scratch website
. and see the full license in "license.txt"
included in the source code download package.
compare databases, filesystems
1.24: adda/oop/db:
5.4(2009): adda/oop/db:
what operations exist for db vs fs ?
. the unit of a fs is the file
which is a db restricted to a few components:
(name, owner, type, creation.date, mod.date, etc)
. the unit of a db is a record
whose components are specific to attributes of
what the record is a symbol of .
5.4(2009): adda/oop/db:
. how is a fs different than a db,. the oop'ish question to ask is
eg, how to impl' db with fs?
. the db controls how it stores its data as files;
but one way is
a record gets a folder named with a serial #,
then each file is named after a field in the record;
if that field is structured
then it would be a folder named like a file with a d'type name
. another subfolder system holds oop'ish meta data .
. so, instead of using db mgt to access records,
it sends msg's to a record`s type mgt
so data formats can change without reprogramming db mgt
or normalizing db .
what operations exist for db vs fs ?
. the unit of a fs is the file
which is a db restricted to a few components:
(name, owner, type, creation.date, mod.date, etc)
. the unit of a db is a record
whose components are specific to attributes of
what the record is a symbol of .
Labels:
adda,
db,
oop,
vfs(virtual file system)
2010-01-30
Collaboration-Based Design
1.12: web.adda/Collaboration-Based Designs:
Collaboration-based design (role modeling)
Advances in systems, computing sciences and software engineering
collaboration-based design (a.k.a. role modeling)web:
is a modeling technique that reduces complexity of
oop design and imple men ta tion.
In this paper we first show how to use aop
to imple ment collaboration-based designs.
We then compare the effectiveness of std lang
vs using one enhanced with aop .
Collaboration-based design (role modeling)
Advances in systems, computing sciences and software engineering
versioning
1.27: adde/versioning:
. another way to handle conflicts in versioning
is to treat them like c`pre-processor conditionals:
you would give the conditions under which
one version or the other would be selected for viewing .
. another way to handle conflicts in versioning
is to treat them like c`pre-processor conditionals:
you would give the conditions under which
one version or the other would be selected for viewing .
Labels:
adde,
journaling
generics
1.22: adda/generics:
. generics are actually functions;
ie, the syntax is
f(what makes it generic).[what's instantiated]
eg, given the declaration f(type).pkg
the function return for f(x)
is a usable pkg .
[1.30:
f().().y is a generic function . ]
. generics are actually functions;
ie, the syntax is
f(what makes it generic).[what's instantiated]
eg, given the declaration f(type).pkg
the function return for f(x)
is a usable pkg .
[1.30:
f().().y is a generic function . ]
parameter blocks
1.20: adda/dstr/param'blocks:
. back when I was studying inside mac
-- before mac os X --
they had param'blocks:
huge records that would hold lots of options
so that when using services like window mgt
you didn't have long param' lists with every call .
. it would be even more convenient if
merely importing a subprogram would also
declare and implicitly apply a param'block for you .
. the translated code would have to include
a parameter -- the pointer to the param'block --
but user's code would not have to include that .
. param'blocks can be viewed as
caller-defined defaults
-- that's in contrast to the usual
subprogram-defined defaults
where if you don't specify an arg'
then the sub' provides one for you .
. param'blocks could also work like packages
in that name clashes could be avoided by
using the sub's name as owner of the global:
sub`global .
. another way to do this is ada`packaging:
have the sub' be a component of it's struct
where you can have
sub`[caller-defined default]`= [your pref's],
and then also do a call that uses that preference:
sub`fun(args) .
. back when I was studying inside mac
-- before mac os X --
they had param'blocks:
huge records that would hold lots of options
so that when using services like window mgt
you didn't have long param' lists with every call .
. it would be even more convenient if
merely importing a subprogram would also
declare and implicitly apply a param'block for you .
. the translated code would have to include
a parameter -- the pointer to the param'block --
but user's code would not have to include that .
. param'blocks can be viewed as
caller-defined defaults
-- that's in contrast to the usual
subprogram-defined defaults
where if you don't specify an arg'
then the sub' provides one for you .
. param'blocks could also work like packages
in that name clashes could be avoided by
using the sub's name as owner of the global:
sub`global .
. another way to do this is ada`packaging:
have the sub' be a component of it's struct
where you can have
sub`[caller-defined default]`= [your pref's],
and then also do a call that uses that preference:
sub`fun(args) .
comparing array, record, function, and assoc'array
1.3: adda/dstr/comparing array, record, function, and assoc'array:
array vs function is storage:
. array is always stored as array
while a function can be
either associative array or formula .
. assoc'array is really a variable function .
. when taking a slice of each,
fun' keeps keys, while array re-keys;
eg,
doing an array slice from middle of an array
to replace an entire other array,
starts keys at destination's first key .
[. the diff is array's keys are address-oriented,
while fun is value oriented .]
. arrays have no formulae, and no param' modes
. {array, rec} literals look the same
but rec is associative:
a subslice retains associations .
. like arrays,
rec's can have slices:
r`{keys,,,} -> {r`compon's,,,}
r`(var) -> r's component whose key is a symbol returned by var
r`(,,,vars) -> r's component named by path returned keys
ie, the vars return a list of symbols that are
a pathname to a component in nested subrec's) .
. obj's in rec are ordered,
and a rec assignment is compatable if
their component types are compatable
(the rec'components may not be
stored as listed in rec,
but component assignments still work as if
that's the case ) .
. recs have fixed domain,
while arrays can vary in size (#first ...#last)
and functions are fully definable;
eg, a varying function (vs a const function)
allows slices which are lists of pairs;
. part of a varing function's attributes
includes the [currently defined domain];
you can traverse the [entire potential domain];
and, an undefined domain.point returns nil;
or, you can traverse the [currently defined domain],
which assures there will be no nil returns
(eg,
f(x) for x in f`dom ) .
. f`dom is a set that can be ordered with a pipe:
f`dom @ sort (-1) .
1.21: adda/dstr/function vs array:
. a function should be able to assign to subsets of domain
f(sA)`= '(formula);
array vs fun has no formula, and is not sparse;
Python`dictionaries are sparse, so they are functions
... -- this confuses impl vs concept:
array represents an obj' with multiple components
like a rec' or tuple except that
all but all components have the same type .
. functions are a set of tuples .
array vs function is storage:
. array is always stored as array
while a function can be
either associative array or formula .
. assoc'array is really a variable function .
. when taking a slice of each,
fun' keeps keys, while array re-keys;
eg,
doing an array slice from middle of an array
to replace an entire other array,
starts keys at destination's first key .
[. the diff is array's keys are address-oriented,
while fun is value oriented .]
. arrays have no formulae, and no param' modes
. {array, rec} literals look the same
but rec is associative:
a subslice retains associations .
. like arrays,
rec's can have slices:
r`{keys,,,} -> {r`compon's,,,}
r`(var) -> r's component whose key is a symbol returned by var
r`(,,,vars) -> r's component named by path returned keys
ie, the vars return a list of symbols that are
a pathname to a component in nested subrec's) .
. obj's in rec are ordered,
and a rec assignment is compatable if
their component types are compatable
(the rec'components may not be
stored as listed in rec,
but component assignments still work as if
that's the case ) .
. recs have fixed domain,
while arrays can vary in size (#first ...#last)
and functions are fully definable;
eg, a varying function (vs a const function)
allows slices which are lists of pairs;
. part of a varing function's attributes
includes the [currently defined domain];
you can traverse the [entire potential domain];
and, an undefined domain.point returns nil;
or, you can traverse the [currently defined domain],
which assures there will be no nil returns
(eg,
f(x) for x in f`dom ) .
. f`dom is a set that can be ordered with a pipe:
f`dom @ sort (-1) .
1.21: adda/dstr/function vs array:
. a function should be able to assign to subsets of domain
f(sA)`= '(formula);
array vs fun has no formula, and is not sparse;
Python`dictionaries are sparse, so they are functions
... -- this confuses impl vs concept:
array represents an obj' with multiple components
like a rec' or tuple except that
all but all components have the same type .
. functions are a set of tuples .
label-based syntax
1.22: adda/cstr/label-based syntax:
. use label syntax whenever possible:
if b: s else: s;
loop: s until b;
while b: s;
for x and b .
. use label syntax whenever possible:
if b: s else: s;
loop: s until b;
while b: s;
for x and b .
adda translation
1.4: adda/translate/c param' limitations:
. c param's don't support all of c's datatypes,
but they do function records
and then there's malloc .
1.8: adda/translate/exceptions:
what is the ada exception
doing in terms of c code?
. according to expert c,
c++ orig'ly avoided exceptions
apparently because they couldn't be impl'd without
slowing down even code that
wouldn't be using the feature .
. non-tricky code for a failure exception
seems to require that every call be
wrapped in an if-stmt:
was the return normal ? ok;
else which exception?
is there a handler? ok;
else raise again and exit .
. if there's no handler
that means needing to check for exceptions
even when the called has not declared any;
since to be modular,
the called should be able to change its body
including variations of
the exceptions it gets exposed to
and doesn't handle .
[1.9:
. the subunit doesn't have to declare these exceptions
and could be imported from another system,
so that the library being shared between
this subunit and its users,
need not support the subunit's exception
meaning that it's recognized only generically
as a [component fail].exception .
. another view is that when a binary is exported,
it implicitly brings along
binary versions of all its dependencies
into the importing lib .
. name clashes would be avoided by
keeping the import's dependencies local to
the subunit's package .
. in essence then,
the subunit's package is a sort of interface
and that interface would include
all exceptions possible during exec of the subunit .
. even when subunits are allowed to change their body
and in a way that changes their exceptions
all that means is that a user who
thought ...
[ a user is not going to think that without a
contract that asserts that;
]
. one interface that would not interfere with modularity
is having a subunit describe what exceptions it will handle
[ with each compile of its body,
the compiler can see what exceptions it decided to catch]
[1.9:
. the exception interface needs something more,
since one way that a sub' can fail
is by not handling the unexpected .
. so then when the contract includes
exception identification,
there should implicitly be the Unknown;
ie, if the sub' is caught by surprise,
and doesn't get to raise an exception from it's list,
then the default is the Unknown .
. if that is the case,
the caller can then test for system exceptions .
. but what if only a sub.block catches an exception?
getting back to c-code that does this efficiently:
. if all code could raise exceptions by
affecting a global
then catchers could check as often as they like
while the default would be to
only check the failure.global when the
system was giving more resources;
eg, during a call there is an act'rec malloc
... but that could cause an infinite loop
if the call was exit loop on success?
...
lost sight of what can actually happen .
. perhaps no efficient, simple way
to translate exceptions
unless not translating to c simply
but letting addm control the stack .
. just get used to the inefficiency of
having a number of well-placed checkpoints
eg, at the top of every loop and block
assertions are asking:
"(is the failure.exception raised? );
if yes then exit or return .
. it gets less inefficient when adda knows
the smart balance between checking too often
and doing too much work on a flat tire .
. another place where adda needs to be smart
is knowing how to divide routines into
pieces that allow wise time-slicing .
. these could be the same checkpoint blocks that
exceptions are built with .
. each thread needs its own fail.exception
then the root of each thread
either handles its failure
or propagates it to the fail.exception of parent thread .
1.15: adda/translate/private headers:
re 5.19(2009):
"(
. to make c more modular
use separate headers for public and private use .
. private can be done by
preceeding the header filename with an underscore .
. you're creating headers per file
even if not sharing
to declare what's in the file
and as forward referencing for mutual recursion .
)
. what would the point of this be?
there is no reuse in the privates
. there are 2 cases of privates:
#: declarations of functions
should be placed at the top of the file
of the top of the function that needs them .
#: definitions of nested functions
and aggregate init's can be bulky
so these can be separately filed and #include'd
. these private include's don't need
matching header files;
also, their names are limited only by the filesystem
not by what the linker will tolerate,
so name them fully; eg:
the first part should be the parent file
(the file that will be including it)
and the name's 2nd part should indicate what's inside .
. the grave.char "(`) can separate the 2 names
(sci:
. can a system's pre-processor choke on that?
I'm sure it should tolerate anything the os`fs will .
)
1.15: mis.adda/translate/use std c:
. never use defines to change the C language;
the point of adda is to avoid using std c;
the adda translater should assume
either the readers have no trouble with std c
or they will use the adda translation instead .
. that position obviated these 2009 ideas:
"(
1.21: adda/translate/c modularity mechanisms:
bk"c by dissection/modularity,
bk.dev.c" steele/sto class specifiers,
bk.dev.c`lib/hints on good lib design,
bk.dev.c{c`lib, steele},
bk.dev.c"k&r/modular design .
hierarchical {project, scope} headers:
. each file is a scope:
private sub's are typed static,
a program using sub's from other files
will use an enviro header
to be included by itself and its child files
to share vars, types, functions, and decl's .
. libunit headers are for sharing one unit with another .
bk" steele` sto class specifiers:
. at top level, "(static) is used on both
var's and fun's to localize .
[... although fun's are usually localized by file,
static will be good for adda's plan to impl'
{exceptions, multi-tasking} by
breaking functions up into sequenced blocks .]
. c param's don't support all of c's datatypes,
but they do function records
and then there's malloc .
1.8: adda/translate/exceptions:
what is the ada exception
doing in terms of c code?
. according to expert c,
c++ orig'ly avoided exceptions
apparently because they couldn't be impl'd without
slowing down even code that
wouldn't be using the feature .
. non-tricky code for a failure exception
seems to require that every call be
wrapped in an if-stmt:
was the return normal ? ok;
else which exception?
is there a handler? ok;
else raise again and exit .
. if there's no handler
that means needing to check for exceptions
even when the called has not declared any;
since to be modular,
the called should be able to change its body
including variations of
the exceptions it gets exposed to
and doesn't handle .
[1.9:
. the subunit doesn't have to declare these exceptions
and could be imported from another system,
so that the library being shared between
this subunit and its users,
need not support the subunit's exception
meaning that it's recognized only generically
as a [component fail].exception .
. another view is that when a binary is exported,
it implicitly brings along
binary versions of all its dependencies
into the importing lib .
. name clashes would be avoided by
keeping the import's dependencies local to
the subunit's package .
. in essence then,
the subunit's package is a sort of interface
and that interface would include
all exceptions possible during exec of the subunit .
. even when subunits are allowed to change their body
and in a way that changes their exceptions
all that means is that a user who
thought ...
[ a user is not going to think that without a
contract that asserts that;
]
. one interface that would not interfere with modularity
is having a subunit describe what exceptions it will handle
[ with each compile of its body,
the compiler can see what exceptions it decided to catch]
[1.9:
. the exception interface needs something more,
since one way that a sub' can fail
is by not handling the unexpected .
. so then when the contract includes
exception identification,
there should implicitly be the Unknown;
ie, if the sub' is caught by surprise,
and doesn't get to raise an exception from it's list,
then the default is the Unknown .
. if that is the case,
the caller can then test for system exceptions .
. but what if only a sub.block catches an exception?
getting back to c-code that does this efficiently:
. if all code could raise exceptions by
affecting a global
then catchers could check as often as they like
while the default would be to
only check the failure.global when the
system was giving more resources;
eg, during a call there is an act'rec malloc
... but that could cause an infinite loop
if the call was exit loop on success?
...
lost sight of what can actually happen .
. perhaps no efficient, simple way
to translate exceptions
unless not translating to c simply
but letting addm control the stack .
. just get used to the inefficiency of
having a number of well-placed checkpoints
eg, at the top of every loop and block
assertions are asking:
"(is the failure.exception raised? );
if yes then exit or return .
. it gets less inefficient when adda knows
the smart balance between checking too often
and doing too much work on a flat tire .
. another place where adda needs to be smart
is knowing how to divide routines into
pieces that allow wise time-slicing .
. these could be the same checkpoint blocks that
exceptions are built with .
. each thread needs its own fail.exception
then the root of each thread
either handles its failure
or propagates it to the fail.exception of parent thread .
1.15: adda/translate/private headers:
re 5.19(2009):
"(
. to make c more modular
use separate headers for public and private use .
. private can be done by
preceeding the header filename with an underscore .
. you're creating headers per file
even if not sharing
to declare what's in the file
and as forward referencing for mutual recursion .
)
. what would the point of this be?
there is no reuse in the privates
. there are 2 cases of privates:
#: declarations of functions
should be placed at the top of the file
of the top of the function that needs them .
#: definitions of nested functions
and aggregate init's can be bulky
so these can be separately filed and #include'd
. these private include's don't need
matching header files;
also, their names are limited only by the filesystem
not by what the linker will tolerate,
so name them fully; eg:
the first part should be the parent file
(the file that will be including it)
and the name's 2nd part should indicate what's inside .
. the grave.char "(`) can separate the 2 names
(sci:
. can a system's pre-processor choke on that?
I'm sure it should tolerate anything the os`fs will .
)
1.15: mis.adda/translate/use std c:
. never use defines to change the C language;
the point of adda is to avoid using std c;
the adda translater should assume
either the readers have no trouble with std c
or they will use the adda translation instead .
. that position obviated these 2009 ideas:
"(
5.19:) .
. to make c more understandable use #defines
to replace static with private .
5.22:
. instead of using & and * directly,
use macro's that give intent:
* = {IN, OUT, INOUT}
& = {RO, RW, WO}
5.25:
. to emulate an ada loop with exit in the middle
use a macro:
#define LOOP while(1)
then use break and continue as usual .
1.21: adda/translate/c modularity mechanisms:
bk"c by dissection/modularity,
bk.dev.c" steele/sto class specifiers,
bk.dev.c`lib/hints on good lib design,
bk.dev.c{c`lib, steele},
bk.dev.c"k&r/modular design .
hierarchical {project, scope} headers:
. each file is a scope:
private sub's are typed static,
a program using sub's from other files
will use an enviro header
to be included by itself and its child files
to share vars, types, functions, and decl's .
. libunit headers are for sharing one unit with another .
bk" steele` sto class specifiers:
. at top level, "(static) is used on both
var's and fun's to localize .
[... although fun's are usually localized by file,
static will be good for adda's plan to impl'
{exceptions, multi-tasking} by
breaking functions up into sequenced blocks .]
Labels:
adda,
translation
adda`exceptions
1.8: adda/exceptions
[1.9: review of exceptions:
. there are 2 types:
# dialog-acceptions
are accepting a callback to resume,
(similar to the mac dialog) .
# failure-exceptions
are like the ada'exception,
which is simply canceling the job,
and asking the caller what it wanted to do
in the event a call had failed .
. failure-exceptions are part of the contract
between client(caller) and service(subroutine) :
the subroutine's list of exceptions
are telling the caller that if the call fails
then the reason for the failure will be given;
eg:
f`exception?
( [file not found]: handler#1
, [user unresponsive]: handler#2
) .
. if subprogram f didn't declare any exceptions?
or if you were not concerned with
the reason for the failure?
then you could simply use f's name
as an exception case:
eg,
exception?
( f: handler#1 .
, others: ... )
.
there are 2 ways for declaring exceptions:
. the ada way has symbols declared to be
an exception.type,
eg, (e.exception; raise e);
and then the caller can ask:
(was e raised?) .
. the other common way
is using the name of a datatype or class;
ie, you can ask:
"(was the failure from any operation owned by
number.type ?)
. along the same lines, you can be more specific
by asking which subprogram or operation
was in effect when the exception was raised .
eg,
asking "(did f cause the exception?)
would be the same as asking
"(was it any exception raised by f
or by employees of f ?
).
. exceptions should be part of the subprogram interface;
this is in contrast to ada's idea
which requires exceptions to be
packaged with a subprogram:
ie, instead of submitting just a sub' to the library,
the sub' and it's exceptions must be
components of a package;
then importing the package from the library
brings you both the sub' and its exceptions .
. when using subprogram names as exception cases,
there can be some confusion due to
overloading of sub' names,
so the syntax must allow for use of the full name
including the parameter types,
which may preclude the use of declarations
within an exception-casing.stmt
(atleast not at the top level);
[1.19: or,
overloaded operators can be viewed as
belonging to a particular datatype or package,
so then for function f belonging to t.type,
there would be the exception case: t`f .
. then using an overloaded name without qualification
would mean every member of the overload class . ]
. raising an exception means
asking whether any in command chain
is catching this exception,
if no,
then the system knows to hang up the whole process,
else
having an exception handler in the employer chain
gives the system a place to roll back to .
. this is all the info needed by the system
by runtime
the sub decides on exceptions to propagate;
if the sup happens to catch, ok .
todo:
. the details of this rollback require a review
of how nested and recursive subunits
complicate where on the stack an instance is .
todo:
. what does either say about
contracts and exceptions?
. even if a sub' doesn't declare an exception
then there are still certain system exceptions
that are implicitely declared for every sub' .
. it is very common for sub's to fail because of
misusing sytem resources, eg:
exception?
( [out of mem]: handler#1
, [access violation]: handler#2
, others: handler#3 ...
) .
1.20: exception/translation:
. anything you do with {setjump, signal}
can bring out bugs in compiler
and make your app less robust;
so, it's best to first check your sdk
for platform-specific ways to
make your app responsive to user interupts .
. while setjump is good at
quickly unwinding the stack,
can it really be the case
that a rarely occuring situation
is the right place to worry about being quick
at the expense of program stability ?
. signals may still be useful,
but platform-specific frameworks
usually provide you with full-featured
event-loop programming that includes
all the signals you'll need .
declaring dialog-exceptions:
. dialog-exceptions are just call-backs,
so a subprogram can declare them as globals
(see adda/dstr/param'blocks)
[1.9: review of exceptions:
. there are 2 types:
# dialog-acceptions
are accepting a callback to resume,
(similar to the mac dialog) .
# failure-exceptions
are like the ada'exception,
which is simply canceling the job,
and asking the caller what it wanted to do
in the event a call had failed .
. failure-exceptions are part of the contract
between client(caller) and service(subroutine) :
the subroutine's list of exceptions
are telling the caller that if the call fails
then the reason for the failure will be given;
eg:
f`exception?
( [file not found]: handler#1
, [user unresponsive]: handler#2
) .
. if subprogram f didn't declare any exceptions?
or if you were not concerned with
the reason for the failure?
then you could simply use f's name
as an exception case:
eg,
exception?
( f: handler#1 .
, others: ... )
.
there are 2 ways for declaring exceptions:
. the ada way has symbols declared to be
an exception.type,
eg, (e.exception; raise e);
and then the caller can ask:
(was e raised?) .
. the other common way
is using the name of a datatype or class;
ie, you can ask:
"(was the failure from any operation owned by
number.type ?)
. along the same lines, you can be more specific
by asking which subprogram or operation
was in effect when the exception was raised .
eg,
asking "(did f cause the exception?)
would be the same as asking
"(was it any exception raised by f
or by employees of f ?
).
. exceptions should be part of the subprogram interface;
this is in contrast to ada's idea
which requires exceptions to be
packaged with a subprogram:
ie, instead of submitting just a sub' to the library,
the sub' and it's exceptions must be
components of a package;
then importing the package from the library
brings you both the sub' and its exceptions .
. when using subprogram names as exception cases,
there can be some confusion due to
overloading of sub' names,
so the syntax must allow for use of the full name
including the parameter types,
which may preclude the use of declarations
within an exception-casing.stmt
(atleast not at the top level);
[1.19: or,
overloaded operators can be viewed as
belonging to a particular datatype or package,
so then for function f belonging to t.type,
there would be the exception case: t`f .
. then using an overloaded name without qualification
would mean every member of the overload class . ]
. raising an exception means
asking whether any in command chain
is catching this exception,
if no,
then the system knows to hang up the whole process,
else
having an exception handler in the employer chain
gives the system a place to roll back to .
. this is all the info needed by the system
by runtime
the sub decides on exceptions to propagate;
if the sup happens to catch, ok .
todo:
. the details of this rollback require a review
of how nested and recursive subunits
complicate where on the stack an instance is .
todo:
. what does either say about
contracts and exceptions?
. even if a sub' doesn't declare an exception
then there are still certain system exceptions
that are implicitely declared for every sub' .
. it is very common for sub's to fail because of
misusing sytem resources, eg:
exception?
( [out of mem]: handler#1
, [access violation]: handler#2
, others: handler#3 ...
) .
1.20: exception/translation:
. anything you do with {setjump, signal}
can bring out bugs in compiler
and make your app less robust;
so, it's best to first check your sdk
for platform-specific ways to
make your app responsive to user interupts .
. while setjump is good at
quickly unwinding the stack,
can it really be the case
that a rarely occuring situation
is the right place to worry about being quick
at the expense of program stability ?
. signals may still be useful,
but platform-specific frameworks
usually provide you with full-featured
event-loop programming that includes
all the signals you'll need .
declaring dialog-exceptions:
. dialog-exceptions are just call-backs,
so a subprogram can declare them as globals
(see adda/dstr/param'blocks)
Labels:
adda,
exceptions
addm`exceptions
1.20: addm/exceptions:
. I first had the idea of stacking
more than the usual return address,
for the 2 cases of whether or not
the system was in an exception-raised mode .
. however, in recursive situations
that would use a lot more memory;
ie, an extra pointer per call,
when the alternative is to have a
conditional at the call's return point
which could be shared by all those recursive calls .
. then I found a way in which
it wouldn't even need the conditional.stmt:
. for a call.stmt that may involve an exception,
place a goto.stmt after it;
then make the call's return address
to land beyond the goto.stmt .
. in an exception.mode, the system would
treat the return address differently,
decrementing it before using it,
which would then cause the return to
land on the goto that would jump to the
exception-casing stmt,
or if letting a super.routine handle it,
the goto could just land at the
[cleanup and exit].section .
. I first had the idea of stacking
more than the usual return address,
for the 2 cases of whether or not
the system was in an exception-raised mode .
. however, in recursive situations
that would use a lot more memory;
ie, an extra pointer per call,
when the alternative is to have a
conditional at the call's return point
which could be shared by all those recursive calls .
. then I found a way in which
it wouldn't even need the conditional.stmt:
. for a call.stmt that may involve an exception,
place a goto.stmt after it;
then make the call's return address
to land beyond the goto.stmt .
. in an exception.mode, the system would
treat the return address differently,
decrementing it before using it,
which would then cause the return to
land on the goto that would jump to the
exception-casing stmt,
or if letting a super.routine handle it,
the goto could just land at the
[cleanup and exit].section .
Labels:
addm,
exceptions
Subscribe to:
Posts (Atom)
