addx/multi-lang like .net:
10.2: 12.11:
. the addx system needs to be like
Microsoft's ".NET" such that it lets us
command addx with a variety of languages
-- adda would just be the default language .
. a new language being ported to addx
would provide a compiler that emits
addm's high-level code (HLC)
that is similar to .NET's assemblies .
Showing posts with label ABI. Show all posts
Showing posts with label ABI. Show all posts
2013-12-11
2012-11-16
model-view and composite tech
[thought I blogged this 9.2, but found as draft;
then found a note that the reason it was draft
was a concern that the body was still too buggy;
nevertheless, the first part is still interesting .]
7.17: web.adda/architecture/MVC vs MVVM:
8.31: summary:
. in trying to find an explanation of
the essential differences between
all the variants of the MVC architecture,
it was most helpful to see Alexy Shelest's
2009`MVC vs MVP and MVVM:
first he reminds us of MVC's original definition:
"( the “Gang of Four” book
doesn't refer to MVC as a design pattern
but as a “set of classes to build a user interface”
that uses design patterns such as
Observer, Strategy, and Composite.
It also uses Factory Method and Decorator,
but the main MVC relationship is defined by
the Observer and Strategy patterns. ).
[8.31:
. then, Shelest had an interesting summary of
the historical evolution of MV-architectures, eg:
then found a note that the reason it was draft
was a concern that the body was still too buggy;
nevertheless, the first part is still interesting .]
7.17: web.adda/architecture/MVC vs MVVM:
8.31: summary:
. in trying to find an explanation of
the essential differences between
all the variants of the MVC architecture,
it was most helpful to see Alexy Shelest's
2009`MVC vs MVP and MVVM:
first he reminds us of MVC's original definition:
"( the “Gang of Four” book
doesn't refer to MVC as a design pattern
but as a “set of classes to build a user interface”
that uses design patterns such as
Observer, Strategy, and Composite.
It also uses Factory Method and Decorator,
but the main MVC relationship is defined by
the Observer and Strategy patterns. ).
[8.31:
. then, Shelest had an interesting summary of
the historical evolution of MV-architectures, eg:
"( Potel questioned the need for the MVC's Controller;. after reading that, I wrote this:
He noticed that modern user interfaces
already provide most of the Controller functionality
within the View class,
and therefore the Controller seems a bit redundant.).
. I didn't get mvc either, and promptly redefined it:
subrograms should not be controlling a gui interface,
rather they should be designed primarily for
use by other subprograms,
just as unix tools are meant to be .
(well, unix takes a shortcuts by
making its tool language a character string
that could also be readable by humans
but that was a security blunder because of parsing errors
that confuse critical datatypes like
{filenames, command names}).
. so, anyway, back to how humans fit in:
in order for a human to interact with
a subprogram that speaks type-tagged binary,
the human needs an agent who will
convert this robot speak into a gui .
. this agent is the Controller of the Model subprogram,
and it creates a View the human can interact with .]
2012-11-10
signaling in gui systems
8.12: adda/cstr/signals/signaling in gui systems:
how is the gui related to the signal?
. as a summary of 2012/07/gui-notification-systems
I was thinking gui's should be impl'd with
gui-optimized signals,
rather than the general signal system,
but then I wondered if that idea was
keeping mvc in mind,
so that generally all IPC (interprocess communications)
would be seeing the same windows that a
human can see with the help of a gui agent .
how is the gui related to the signal?
. as a summary of 2012/07/gui-notification-systems
I was thinking gui's should be impl'd with
gui-optimized signals,
rather than the general signal system,
but then I wondered if that idea was
keeping mvc in mind,
so that generally all IPC (interprocess communications)
would be seeing the same windows that a
human can see with the help of a gui agent .
2011-12-31
abi - c's definition of abi differs
12.22: mis.adda/abi/c's definition of abi differs:
. in c culture, the abi(app binary interface)
has meant an interface between apps and
binary library units vs source libraries .
. my definition of ABI has been a system of
cross-app communication using a binary language
rather than a exchanging text like unix .
. for instance, see standard ABIs motivation:
"( the editor and every command processor
will all speak the system language:
the system's language describes
a mathematical function
as either a set of points or a formula
along with a type specification that includes
a domain and codomain;
with an optional subdomain and inverse operator ).
. in c culture, the abi(app binary interface)
has meant an interface between apps and
binary library units vs source libraries .
. my definition of ABI has been a system of
cross-app communication using a binary language
rather than a exchanging text like unix .
. for instance, see standard ABIs motivation:
"( the editor and every command processor
will all speak the system language:
the system's language describes
a mathematical function
as either a set of points or a formula
along with a type specification that includes
a domain and codomain;
with an optional subdomain and inverse operator ).
2011-08-28
function graph editing
8.4: adde/function graph editing:
. how is audio graphing done?
how is the gui separated from the command processor?
. each unit of mouse movement
practically represents a pixel unit
which then represents a range of data points;
the first of those points can be chosen;
or if there is a sharp spike
then find the high and low
to include every point inclusive;
ie, graph a vertical line instead of a point .
. audio graphing is like strings of words,
but instead of the words differing in length,
they are all on their side for differing height .
. range selections result in a pair of numbers:
the {begin, end} of range,
which are then sent to the processor .
. if the range was possibly modified,
the editor then has to regraph that range .
8.28:
. the editor can handle this without knowing
the particulars of the audio graphing,
because it will have an interface for
generic function editing;
or rather,
the editor and every command processor
will all speak the system language:
the system's language describes
a mathematical function
as either a set of points or a formula
along with a type specification that includes
a domain and codomain;
with an optional subdomain and inverse operator .
. how is audio graphing done?
how is the gui separated from the command processor?
. each unit of mouse movement
practically represents a pixel unit
which then represents a range of data points;
the first of those points can be chosen;
or if there is a sharp spike
then find the high and low
to include every point inclusive;
ie, graph a vertical line instead of a point .
. audio graphing is like strings of words,
but instead of the words differing in length,
they are all on their side for differing height .
. range selections result in a pair of numbers:
the {begin, end} of range,
which are then sent to the processor .
. if the range was possibly modified,
the editor then has to regraph that range .
8.28:
. the editor can handle this without knowing
the particulars of the audio graphing,
because it will have an interface for
generic function editing;
or rather,
the editor and every command processor
will all speak the system language:
the system's language describes
a mathematical function
as either a set of points or a formula
along with a type specification that includes
a domain and codomain;
with an optional subdomain and inverse operator .
2011-06-30
preventing insecure inputs
6.11: adda/abi/insuring security:
[6.13: intro:
. many app's are a security threat because
they are trusted not to smash the stack or heap,
yet will do so if given mal-formed input;
the primary security defense provided by adda
is that all interactions with the stack or heap
are handled by robust system app's .]
. an app may be expecting ascii
and get unicode instead,
but adda typetags would document what was there,
and then the app could take steps to
convert to the prefered type .
[6.24:
. non-native types can have novel structures;
but they are always compositions of
native elemental type;
and, the addx system is helping app's
to read and write the data they exchange .]
[6.13: intro:
. many app's are a security threat because
they are trusted not to smash the stack or heap,
yet will do so if given mal-formed input;
the primary security defense provided by adda
is that all interactions with the stack or heap
are handled by robust system app's .]
. an app may be expecting ascii
and get unicode instead,
but adda typetags would document what was there,
and then the app could take steps to
convert to the prefered type .
[6.24:
. non-native types can have novel structures;
but they are always compositions of
native elemental type;
and, the addx system is helping app's
to read and write the data they exchange .]
2011-06-28
a brief history of compound documents
5.7: web.adde/compound doc/problems:
. the compound doc is a really simple idea;
it works just like the way that your mac's gui
displays a window of various apps,
except that window arrangments can be
saved as documents, and windows can be borderless
as if they are part of the same document .
. but from reading opendoc's history
you'd think it was a plague .
"(. compound documents are said to be
an oversold concept:
there just aren't that many examples
beyond mixing graphics with text .)
--
. tell that to the html`object tag:
we routinely see combinations of
movies, photo's, text, script images,
and anything you have an app for .
. something about the plague again:
other compound doc specifications
had the same problem!
. the specification should have included
a manifest that listed what app's you need
in order to open a given document .
more compound doc' technology is history:
OLE, OLE Automation, ActiveX, COM+ and DCOM .
[ com is oop++ ]
COM's architect"Anthony Williams:
so, COM must additionally specify:
. the compound doc is a really simple idea;
it works just like the way that your mac's gui
displays a window of various apps,
except that window arrangments can be
saved as documents, and windows can be borderless
as if they are part of the same document .
. but from reading opendoc's history
you'd think it was a plague .
"(. compound documents are said to be
an oversold concept:
there just aren't that many examples
beyond mixing graphics with text .)
--
. tell that to the html`object tag:
we routinely see combinations of
movies, photo's, text, script images,
and anything you have an app for .
. an amazingly bad specification or implementation--
was opendoc's biggest problem:
it was very common to find
apps that could not even
open a document created by another app .
. OpenDoc attempted to solve this problem by
allowing developers to store multiple formats
to represent the same document object.
For instance, it was both possible and encouraged
to store a common format like JPEG
along with an editable binary format,
but in practice few developers
followed this recommendation.
. something about the plague again:
other compound doc specifications
had the same problem!
. the specification should have included
a manifest that listed what app's you need
in order to open a given document .
more compound doc' technology is history:
Dynamic Data Exchange (DDE, 1987),. ms`COM is often an umbrella term for
allowed "conversations" between applications.
OLE(1991, (Object Linking and Embedding).)
was Microsoft's first object-based framework,
and MS`Office's first compound doc' technology;
it was built on top of DDE .
. While OLE 1 was focused on compound documents,
COM and OLE 2 (1992-93) were designed to address
software components (oop++) in general.
. OLE custom controls (OCXs, 1994)
. Internet is a new use for
OLE Custom Controls (ActiveX, 1996),
-- gradually renamed all OLE technologies to ActiveX,
except the compound document technology
that was used in Microsoft Office.
DCOM (Distributed COM, 1996)
competed with CORBA as the model for
code and service-reuse over the Internet.
difficulties getting either of these
over Internet firewalls .
MTS run-time increased scalability, robustness,
and simplified system management.
OLE, OLE Automation, ActiveX, COM+ and DCOM .
[ com is oop++ ]
COM's architect"Anthony Williams:
Object ArchitectureCharlie Kindel 1997:
is concerned with Dealing With the Unknown
and ensuring Type Safety in a
Dynamically Extensible Class Library;
also significant to com
was clarifying what oop`Inheritance is,
and knowing How To Use It .
(popular) oop =C++ supports only oop not cop
Polymorphism + (Some) Late Binding
+ (Some) Encapsulation
+ Inheritance
Component Oriented Programming (cop) =
Polymorphism + (Really) Late Binding
+ (Real, Enforced) Encapsulation
+ Interface Inheritance
+ Binary Reuse” .
so, COM must additionally specify:
* Execution environment options
(so-called Apartments)
* Inter-process Marshalling
* Remote Object Activation mechanism and protocols
* Threading models
. the C++ linkage model impedescom provides what c++ is missing:
binary distribution and reuse .
. by using shared object linking,
the lack of binary standardisation
means there is an interoperability problem .
C++ lacks binary encapsulation:
ie, while it supports separation of
interface and implementation,
it's only at the syntax level
– not at the binary level.
implementation changes are “seen” by clients.
A “substrate” for building re-usable components.
. Interfaces are defined in COM IDL
(IDL + COM extensions for inheritance and polymorphism)
OS Neutral and (nearly) Language neutral:
. can be used from any language that can
generate/grok vtbl’s and vptrs.
. a packed bit field is returned
with every COM access .
categories define
an implementation of a given interface
that meets some set of constraints .
Labels:
ABI,
adde,
compound doc's
2011-05-30
standard abi's motivation
5.18: addx/standard abi/motivation:
background:
. the typical example of mistaken expectation
is when an url acts like a script .
. many apps have input limitations
such as when a browser treats certain url's like scripts .
. a commandline could be given what you think is a filename
but because of expectations about filename limitations
a filename can be interpreted as a series of commands .
. this wouldn't happen if unix had
a common abi (app'binary interface);
because, instead of passing the file's name as text
(a form of screen scraping)
it could be passing an obj type-tagged as a filename
and then filename limitations become irrelevant .
4.15?: news.cyb/sec/qubes/Qlipper:
Larry McCay April 15, 2011 2:52 AM`
comment on [The Invisible Things Lab's blog]/
. this is another example of why an abi
is needed:
. what qubes has to do to get vm's communicating
is for each os to support a clipboard
that qubes can translate to a file
that is then sent over the intranet .
. an os's clipboard is understood as
supporting certain data types
with a certain type-tagging convention .
. if qubes has to understand all this anyway
it already does sanitizing by matching types [5.18:
(though it could help by checking for
malformed html and illegal unicodes); ]
but, because os's don't provide a common abi,
they are reduced to supporting only
some common text-based standards
like ascii, unicode, or html [5.18:
whereas, a common abi would also support
a binary version of a complete programming lang',
meaning that instead of just being text,
the code was parsed into a syntax tree;
and native functions were represented by codes
that are read more quickly than text .
. and,
when copying abi code from the pasteboard,
dom0 would be able to read and understand
the implicit capabilities of that code .]
. without an abi, qubes must have
apps communicating via a screen scraper;
but that's ok, because,
the whole point of security by isolation
is that we can never expect to
completely protect app's from being
hung by their own naivety;
what we can do is protect good apps
from being hung by bad ones .
background:
. the typical example of mistaken expectation
is when an url acts like a script .
. many apps have input limitations
such as when a browser treats certain url's like scripts .
. a commandline could be given what you think is a filename
but because of expectations about filename limitations
a filename can be interpreted as a series of commands .
. this wouldn't happen if unix had
a common abi (app'binary interface);
because, instead of passing the file's name as text
(a form of screen scraping)
it could be passing an obj type-tagged as a filename
and then filename limitations become irrelevant .
4.15?: news.cyb/sec/qubes/Qlipper:
Larry McCay April 15, 2011 2:52 AM`
comment on [The Invisible Things Lab's blog]/
A Qlipper app could be introducedJoanna @Larry:
to sanitize and add the appropriate context.
Sanitizing makes sure
what you copied is what you expected
and the context is used to
direct within the target Qubes domains.
. a "sanitizer" must know the limitations of the destination app... .--
. this is another example of why an abi
is needed:
. what qubes has to do to get vm's communicating
is for each os to support a clipboard
that qubes can translate to a file
that is then sent over the intranet .
. an os's clipboard is understood as
supporting certain data types
with a certain type-tagging convention .
. if qubes has to understand all this anyway
it already does sanitizing by matching types [5.18:
(though it could help by checking for
malformed html and illegal unicodes); ]
but, because os's don't provide a common abi,
they are reduced to supporting only
some common text-based standards
like ascii, unicode, or html [5.18:
whereas, a common abi would also support
a binary version of a complete programming lang',
meaning that instead of just being text,
the code was parsed into a syntax tree;
and native functions were represented by codes
that are read more quickly than text .
. and,
when copying abi code from the pasteboard,
dom0 would be able to read and understand
the implicit capabilities of that code .]
. without an abi, qubes must have
apps communicating via a screen scraper;
but that's ok, because,
the whole point of security by isolation
is that we can never expect to
completely protect app's from being
hung by their own naivety;
what we can do is protect good apps
from being hung by bad ones .
2011-02-28
unary operators not always taking precedence over binary
2.7: news.adda/math/unary not always taking precedence:
. negation has the same precedence as
multiplication and division;
because, negation means mult by -1.
So -a^b should be -1*a^b = -(a^b).
details:
. programmers were accustomed to the C language,
in which unary operators such as negation
have higher precedence than any binary operator;
(and there was no exponent operator in C
to cause them to think twice about the matter).
so, when programmers use an exponent operator,
they may have wished to remain consistent with C;
however, for centuries,
the polynomial -x^2
has meant -1*x^2 = -(x^2)
not (-x)^2 = x^2 .
. look at the HP48G User Guide/order of operations:
priority#1:
Prefix functions (such as sin, ln, ...)
and Postfix functions (such as ! (factorial)).
--[. many could say negation is a prefix -();
2.16: nevertheless,
notice the way math has superscripted powers
(rather than using an operator);
as if it was an extension of the symbol's name
like the way subscripts actually are,
and thus intuitively having higher precedence
than any operation applied to the name .]
priority#2: Power (^) and square root.
priority#3: Negation (-), multiplication, and division.
--[. here is the 2nd place -() fits;
but, only because of its equvalence to -1*();
many think it's obvious that the negative
is part of the number's value .]
priority#4: Addition and subtraction.
. clarity should take precedence over correctness;
so, the system needs to ask new users
-- at least those who use the form (-x^n):
or allowing copies to text
always write it unambiguously { -(2^2), (-2)^2 }.
. negation has the same precedence as
multiplication and division;
because, negation means mult by -1.
So -a^b should be -1*a^b = -(a^b).
details:
. programmers were accustomed to the C language,
in which unary operators such as negation
have higher precedence than any binary operator;
(and there was no exponent operator in C
to cause them to think twice about the matter).
so, when programmers use an exponent operator,
they may have wished to remain consistent with C;
however, for centuries,
the polynomial -x^2
has meant -1*x^2 = -(x^2)
not (-x)^2 = x^2 .
. look at the HP48G User Guide/order of operations:
priority#1:
Prefix functions (such as sin, ln, ...)
and Postfix functions (such as ! (factorial)).
--[. many could say negation is a prefix -();
2.16: nevertheless,
notice the way math has superscripted powers
(rather than using an operator);
as if it was an extension of the symbol's name
like the way subscripts actually are,
and thus intuitively having higher precedence
than any operation applied to the name .]
priority#2: Power (^) and square root.
priority#3: Negation (-), multiplication, and division.
--[. here is the 2nd place -() fits;
but, only because of its equvalence to -1*();
many think it's obvious that the negative
is part of the number's value .]
priority#4: Addition and subtraction.
. clarity should take precedence over correctness;
so, the system needs to ask new users
-- at least those who use the form (-x^n):
"( how would you eval -2^2 ?. furthermore, when exporting adda`binary,
{ 4, -4 } ??
. -1*2^2 is definitely = -1(2^2) = -4 .
whereas (-2)^2 = (-2)(-2) = 4 . )
or allowing copies to text
always write it unambiguously { -(2^2), (-2)^2 }.
Labels:
ABI,
adda,
lexeme,
math,
precedence,
superscript
2010-08-31
the MathLink ABI
2019.10.9: summary:
. how I was introduced to the term
ABI (application binary interface)
in which programs and processes
communicate with each other;
I give it the meaning within addx
of a communication that involves
etrees (expression trees) rather than ascii text.
. how I was introduced to the term
ABI (application binary interface)
in which programs and processes
communicate with each other;
I give it the meaning within addx
of a communication that involves
etrees (expression trees) rather than ascii text.
Labels:
ABI,
adda,
cloud computing,
Mathematica,
supercomputing
Subscribe to:
Posts (Atom)
