2010-03-31

llvm and .NET or lisp

3.20: addx/llvm and .NET or lisp:

. how did llvm fit in with .net?
the .net was an improvement over bytecode;
it had a binary format of high-level code
-- call it wordcode --
and any language could compile to that wordcode .
. there's security in the wordcode,
since it's easy to verify it's not malware,
then a platform-specific runtime can
translate wordcode into an exec.file .
. llvm presents itself as the universal asm.code
(source code of a machine instruction set)
so one quick way to roll a wordcode compiler
is to compile wordcode to asm.code .
. then the llvm for that platform
will do all the heavy lifting of
jit-compiling and dynamic morphing
that keeps the asm.code mirrored in
the most efficient version of native code
for the current circumstances .
. there need be no practical difference between
word.code and the etrees of lisp
and perhaps that's why Stallman would
downplay .net as a Microsoft false freebee .
. what we really need from .net
is something more lisp-like
where the only constant to the std
is that etrees describe the conventions
of the current package .
. what we really need from lisp
is the same binary std for word.code
that .net calls assemblies .
. at the moment lisp's std is text-based
not binary -- xml is the same thing:
people should be communicating with that
only as a last resort,
when no binary convention has been agreed upon .
3.23:
. Mono from SVN is now able to use LLVM as a backend .

3.22: addx/security/review:
. what was the system that offered better security than
soa's token-based (smart-carded) logged messaging ?
. how did it differ from virtualization ?
. the first wall starts with using source code
rather than binaries:
. a program is an adda binary
that is then compiled to addx code
which is native code but can access only addx
(assured from being compiled by adda),
and then only addx can access actual devices .
. with this separation of power,
the program can tell addx what it needs
and then the user can tell addx
whether those needs sound reasonable .
. an adda binary is an etree (a parse tree)
where half of the compilation is already done:
. after adda text is parsed into etrees,
the etrees are safely translated by adda
to a system lang for compilation into a native binary .
. in essence the adda program has written the program;
if the original author had
programmed in the system lang'
then it could unsafely have
direct access to the machine .
. this is not unlike the .net security strategy;
but, addx is not concerned about supporting
multiple source lang's . [3.31: nevertheless,
adda's etree could be the target of
some other lang's compiler, for piping:
[your lang] -> adda`etree -> [some adda`backend] ]
. both { .net, adda } have a binary format
for sharing code, but .net's assemblies
may be more thoroughly processed than parse trees .
[3.31: and conversely, parse trees are in a
more modifiable, machine-comprehensible state
than .net's assemblies .]
. the ideal situation is to translate adda etrees
directly into llvm code,
but the easiest way to build addx in a portable way
is translating adda etree to the source text
of the language that the target platform prefers;
eg, when on the mac, the target language is
c, obj'c, and the cocoa framework;
while on linux and elsewhere,
it would be c, c++, and the qt framework .

. on the Android OS, the main source of
security is a slow vm
that compounds the speed hit caused by
addx's security not allowing
direct access to anything;
addx is asking every cross-module communication:
"(who are you,
and do you have permissions for that?)
. then if addx is to run dynamically modified code,
it's running a vm within a vm,
and things get even slower!

. the .net idea of security is much faster
than any vm security (even Dalvik)
but perhaps that speed
would come at the cost of space
-- the Android fits within 64mb .
. or,
perhaps because of patents,
any open system that was like .net
would not be easy to defend .
. the primary reason I'm not bothering to check
is that .net's idea is not nearly as simple as mine!
. you can avoid a lot of low-level programming
if you just learn the target's high-level language,
and do a simple lang-to-lang translation .
[3.31:
. actually what .net is essentially doing is
unpacking assemblies into etrees,
checking them the way adda would,
then translating them to
the etrees of some native compiler,
and compiling them dynamically .
. it's that dynamics that gives it the name .net;
that's the basis for dynamically accepting code
from other websites in a safe way .
. it may not need to get low-level,
but translating between etree formats
is definitely more complex than source-to-source .]

soa (service oriented architectures)

3.22: web.addx/soa/openware options:
. I was really impressed by the bright ideas
in the book "(soa for dummies);
is there any openware project that embodies
or further documents those ideas? .

3.22 .. 3.23:
bk.addx/soa/Its Role in Your Connected Systems Strategy 2004:

. this 2004 article assumes soa starts with
a common language that we agree on in advance .
. we've seen businesses on the internet
agree on xml,
but that language should be used
only for the handshake,
which asks:
"(what binary language do you speak;
something more efficient than wordy xml? ) .

. reviewing what I learned in "(soa for dummies),
you design an soa sytem by arbitrarily choosing
a common binary language for your messaging system .
. then you provide a converter for each of your programs
that will translate between their command language
and your system messages language .
. a fundamental requirement of soa
is token-based (smart-carded) logged messaging,
where every interaction leaves a paper trail
so that while maleware can happen
it is always discovered, and the source known .


3.24: bk.addx/soa/token-based security

. make web services secure:
"(. use token-based security:
an STS [Security Token Service] that emits
SAML tokens that can be cached on the client
(like kerberos token but with open standards).
Your webservices can be secured with
the wsFederationBinding
and you can do access checks based on
saml assertions that contain claims.
. here's a post that shows a web client
but it applies to smart clients as well .)
. wiki`Security_token .

Web Services Trust Language:
"(Web Services Trust Language (or WS-Trust)
defines extensions that build on Web Services Security
to provide a framework for
requesting and issuing security tokens,
and to broker trust relationships.
WS-Trust describes:
1. Methods for issuing, renewing, and validating security tokens.
2. Ways to establish, access the presence of, and broker
trust relationships.
CICS supports the February 2005 version of the specification )

WS-Trust specification:
CICS can interoperate with
a Security Token Service (STS),
to provide more advanced authentication:
An STS is a Web service that acts as a
trusted third party
to broker trust relationships between
a Web service requester and provider.
In a similar manner to a
certificate authority in an SSL handshake,
the STS guarantees that the requester and provider
can "trust" the credentials
that are provided in the message.
This trust is represented through the
exchange of security tokens.
CICS acts as a Trust client
and can send two types of requests to an STS.
* validate the security token
in the WS-Security message header;
* exchange the security token for a different type,
enabling CICS to send and receive
from a wide variety of trust domains,
such as SAML assertions and Kerberos tokens.
. use SSL to secure the connection
between CICS and the STS.
. the meat: an open soa security std .


3.24: addx/soa/efficiency and accountability:

. security is slow because it involves
carding for permissions and logging uses;
therefore, the os applies security only to
accesses of obj's it deems are
critically in need of protection .
. the dev' too, can be asking for protection
of particular obj's, types, or type classes .
[3.26:
. the os`security is protecting the user,
while the dev`security is asking the os
for help with organizing large projects;
security helps find where the bugs originate .]
. logging interactions and param's
can determine a crash's cause
amidst multiple authors or products .

. copying is minimized to make logging cheap:
msg's from task queues are
requeued on the log's queue,
so then only a ptr is copied per instruction .

logging timestamps:
. in a strictly modular system,
a concurrent system may not need
to log a msg's {creation, executed} timestamps
in order to assign blame during a system problem;
[3.26: but,
it might be helpful, so it should be optional .]

3.25: sci.addx/soa/saas (sw as a service):
. may be keyword for soa token:
security done at the local level
rather than the web (where each process
also has its own processor) .

3.26: lib.addx/soa:
docs.oasis-open.org/ws-sx/
www.oasis-open.org/committees/tc_cat.php?cat=soa
www.oasis-open.org/committees/tc_cat.php?cat=security
. SCA Client and Implementation Model for C language.
. Service Component Architecture (SCA)
defines a biz model using a soa,
based on the concept of Service Components .

3.27: addx/gemini kernels:
look at this viral load:
> I just received a notification
> that I have used over 10GB of data this billing cycle,
> which is unusual (as I haven't been doing anything ...)
--. there should be
even in a monolithic system like linux
a gemini system, where a supervisor system would be
untouchable even by root
and this sup' would give you an honest reading
of things like the traffic you're generating .

GPL high-priority list

3.30: news.adds/openware/priority list:
fsf.org campaigns priority:
. FSF high-priority projects list
serves to foster the development of
projects that are important for
increasing the adoption and use
of free software and
free software operating systems .

software patents

pos.adds/software patents:
3.28: [my position pro-patents]
. I've heard Richard Stallman be
reasonable about patents,
explaining that the real problem with them
is an underfunded patent system
that doesn't bother to sort out
what's a complex of prior art works
from what is truly worthy of a patent .
. work that took so long to develop
surely would be more worthwhile to simply license
rather than trying to reinvent it!
. good patents, licensed fairly, could increase
the nation's productivity dramatically .

3.29: patent protections for the masses:
Open Invention Network®:
. an intellectual property company
that was formed to promote Linux
Patents are available royalty-free
to any company, institution or individual
that agrees not to assert its patents
against the Linux System.
. USPTO (US Patent and Trademark Office)
now features a “Peer to Patent” process
that lets the public submit advice
for issuing or invalidating patents .
Linux Defenders
. eliminates bogus software patents
by implementing the work of the
Open Invention Network® .
. contributors to open-sourced patents
may freely use Linux Defenders'
defensive publication processor
and the Defensive Publications database
which contains patented openware searchable by
patent and trademark office examiners
around the world .

. the Linux Defenders program enables anyone
to efficiently contribute to:
“Defensive Publications”
where you can enter your openware inventions
into a db that will be searched by the patent office
so if there are no prior patents,
there will be no future patents on similar inventions .
“Peer to Patent”:
supplying the USPTO with evidence of
prior art invalidating the claims of
pending patent applications.
Post-Issue Peer to Patent”:
supplying prior art to support the invalidation
of previously issued patents .

meeting Android OS and Dalvik VM

3.26: summary:

. android as a subtopic of addx
is concerned with how androids ideas
could contribute to or be reused by addx .
. of immediate interest is their vm,
which is significantly more efficient than the java vm .

. some are upset by the changes it made to linux
while others call it a refreshingly clean architecture;
the body language of the google staff who were
defending the changes indicates that a lot of
compromises had to be made in order to appease
the various business-related needs
of the other oha (Open Handset Alliance) members .
. it's still an open platform,
but users can only modify their system as root users
-- a line crossed that can void their contract .
. unlike the Apple app'store model,
there is nothing in the Android model
that would conflict with addx`goals .

3.19: web.addx/android:
. wiki's android .
. some app dev's call android a gutted linux .

thoughts of an android system engineer:

Matt Porter was heavily involved in the MIPS and PPC ports of Android:
"(Android is not Linux in the strict sense of the word
because important userspace components are missing,
thereby making Android comparatively inaccessible and inflexible.
Android uses, for example, its own mount system
that works with MMC subsystems out-of-box
rather than with USB devices.
Support is missing for udev, glibc, and
SysV process communication,
but are replaced by a somewhat hard to change,
hard-coded implementation from the Open Handset Alliance.
. Android makes no use of tslib for touchscreen support
and lacks effective Ethernet support.
[More arguments are included in his set of slides.]
Second, the Android community is
lagging behind other Linux and open source communities,
partly because the platform is commonly developed
outside the Android Open Source Project (AOSP) tree
and given less priority in the open repository.) .
Harald Welte summarizes Matt Porter's critique:
"(. google has simply thrown 5-10 years
of Linux userspace evolution into the trashcan
and re-implemented it partially for no reason.
Things like hard-coded device lists/permissions in object code
rather than config files,
the lack of support for hot-plugging devices (udev),
the lack of kernel headers.
A libc that throws away System V IPC
that every unix/Linux software developer takes for granted.
The lack of complete POSIX threads.
Just one more practical example:
You cannot even plug a USB drive to an android system,
since /dev/sd* is not an expected device name in their
hardcoded hotplug management.)
. Android's design is defended:
"(Android's specialized and inflexible character
was a result of performance and resource reasons.)
. the android userspace sounds pretty tight;
what's it like for the dev'ers? [3.20:
. those concerns were by app dev's, not users!
they are crying about not being able to use
the usual linux tool chains to dev' for linux .
. it's likely that dev'ers are not accustomed to
having big brother defending the consumer
by creating so much burden for the sake of efficiency
and security -- the sad fact is
that linux is a malware magnet just like windows
exactly because
those platforms let dev's have their way .]

. Android is now owned by the Open Handset Alliance
where google is just one of many members;
the oha has an interesting page showing
all the roles in the communications industry,
and all the players in controlling Android .

lecture of why Android is based on a new vm:

. libraries written in C and other languages
can be compiled to ARM native code and installed
by using the Android Native Development Kit (NDK) .
The NDK converts c to bytecode not the cpu's native code
Simply re-coding a method to run in C
usually does not result in a large performance increase
but does always increase application complexity.
The NDK can, however, be an effective way to
reuse a large corpus of existing C/C++ code.
--[. if c is not your favorite lang,
it would apparently be best to adapt your
translator: adda -> android's java
rather than: adda -> c for android's ndk .
3.20:
. but how much "(complexity) are we talking about here?
creating an adda compiler for a completely new language
is itself a significantly complex problem .
]
. as per the usual security measures
android distinguishes the app dev'
from the platform (system) dev' .
. only the system dev's can make good use of
Java Native Interface (JNI),
a programming framework that allows
byte code running in a Java VM
to call and to be called by cpu's native code .
--[. this is the same trade-off
that the iphone os had to make:
you could allow app' dev'ers to write native code
but then require them to
submit their code to human inspection
and risk having it rejected by hooded judges;
or,
you could do it the android way:
let anyone come without inspection
but then keep them tied up in a rather slow vm .]

Native classes can be called from Java code
running under the Dalvik VM
using java's System.loadLibrary call .
Unlike most Java VMs that are
stack-based, running Sun`java bytecode,
and having problems with concurrency,
the Dalvik VM, with a new byte code set,
is register-based, and is designed to
efficiently support concurrency .

. the new vm is optimized for platforms having
small ram, no hard drive, and a slow cpu .
. total ram on many platforms
is projected to be limited to 64mb;
and, app's typically have only 20 mb to play in .
. the system lib is 10mb --[ steep learning curve
but allows reuse of a lot of code .]
. by having a large library of native code
there's reduced need for jit,
because each bytecode instruction
represents many lines of highly-optimized native code .

. java's jar.files arrange all info within
the class it belongs to;
whereas [Dalvik EXecutable] files (dex.files)
contain the same info but arranged for
maximal sharing, with segments for vari'data,
and sharing of constant's in these segments:
string, type, proto[function signature], field, method .
. using that organization,
dex.files, even when uncompressed, take up
less space than jar files, even when compressed .

. cpu speeds in phones are expected to be
250 .. 500 mhz, bus speed is 100 mhz;
with a 16..32k cache .
types of mem:
( clean: unmodified
. dirty: modified -- app's structs and heaps
. private: accessed by only one process
. shared: accessed by multiple proceses .
)
. {clean vs dirty} mark bits are kept separate
instead of being embedded with each obj .
advantages: reduces cache misses,
avoids unsharing and padding needs;

. an android app's install-time work
is the same as ada's compile-time work:
time for a lot of verifications and optimizations .
[3.26:
. this is done with the desktop dev'tools,
not on the mobile unit itself .
. the toolchain converts java lang'
to java vm byte code (.jar)
and then converts .jar's to android vm bytecode .]

. being register-based avoids instruction dispatch:
30% fewer instructions and code units,
35% more bytes per instruction
but it can fetch 2 bytes at a time;
eg, compare jar's vs dex's for this code:
sumarray(arr#.int).long:
( sum.long=0
; for (i.int in arr) sum`+ i
; return sum
)
. java bytecode does this in
(25 bytes 14 dispatches 45 reads, 16 writes)
. android bytecode does it in
(18 bytes 6 dispatches 19 reads, 6 writes) .

. humans can interact at 10..30 reactions/s
and expect video at 25..30 frames/s,
audio sync'd at 10 times/s .
. calling those times the human scale,
contrast that with computer scale:
just handling human interaction takes
far less than 1% of cpu's capacity .
. mobile devices run on tiny batteries;
so, your app should be going back to sleep
rather than staying in a loop,
and when it does loop,
some loop`heads are more efficient than others;
they show you a list of loop head coding styles
and their impact on cpu time (battery life).

. why base app dev'ing on the java lang?
much of openware work is done in that;
and, there are compilers for many other lang's
that will translate to java classes (jar.files);
android has a tool that can convert these jar's
to android's bytecode (dex's)
-- but they don't do that dynamically on the handheld,
so the jython idea is out .
[3.26:
. a twist of the language question would be
why use the java lang but then toss the java vm idea ?
. the really progressive idea is llvm:
a tool that converts llvm code to your vm's bytecode .
--. Apple's clang project translates obj'c to llvm;
the llvm community is then translating llvm to
a variety of cpu's, including mac's x86 .]

[3.26: llvm`backend for android`Dalvik
Patrick Walton
Date: Fri, 09 Jan 2009 22:04:16 -0800
Subject: Type safety of the Dalvik VM?
. I'm interested in writing an LLVM backend for Dalvik
(allowing C code to be compiled to Dalvik),
Certainly, the apparent lack of type safety
makes it easy to write a C-to-Dalvik compiler,
but I want to make sure that my methods won't depend on
exploiting bugs that are going to be fixed.
"Andrew Stadler (Google)"
Date: Fri, 9 Jan 2009 22:11:09 -0800
. make yourself very familiar with the bytecode verifier,
which runs over all java bytecode
before it gets to the actual Dalvik VM,
and provides expected the safety checks .
fadden
Date: Sun, 11 Jan 2009 10:34:41 -0800 (PST)
. type safety is a goal, and in some cases
Dalvik is safe to a greater extent than other VMs
(e.g. it's more picky about the width of sub-32-bit integers).
Some details are available in dalvik/docs/verifier.html.
Identifying type-safety issues during verification
allows us to avoid making those checks at runtime,
improving performance. Because DEX files are read-only
to everything but a couple of system processes,
we can (usually) do the verification
at app`install-time, and not have to repeat it
at app`startup-time.

--. it sounds like the best bet is to find llvm ->java vm .

David Roberts 2009
JVM Backend
I've written a backend for LLVM
that allows LLVM IR to be transformed to a Java/JVM class file

2008: only “foreign” language to run on Android is Scala .
Invoke JNI based methods (Bridging C/C++ -> Java)

Developing using C++
StephC
Date: Tue, 13 Nov 2007 03:53:17 -0000
Local: Mon, Nov 12 2007 8:53 pm
J2ME is a real nightmare for mobile games developers,
it's even considered by many as the reason why
mobile games aren't really suceeding so far.
John Carmack, a game developer:
"(It turns out that I'm a lot less fond of Java
for resource-constrained work.
I remember all the little gripes with Java's language,
like no unsigned bytes,
and the consequences of strong typing, like no memset,
and the inability to read resources into
anything but a char array,
...
Even when compiled to completely native code,
performance is hobbled by Java semantic requirements
like range checking on every array access .)
]

the whole truth

3.19: adds/the whole truth:
. the whole truth, nothing but the truth,
and easy to access:
. contrasting given info with
any popular myths it contradicts
(making sure intended overwrites
are not merely appended in reader's mind).
. pointing out how the given info
when known by you
will add value for us .
(the free capitalist principle) .

moore's law riding concurrency

3.15: news.adds/turing award for gui's inventor:
. he's been working on modern interfaces
from the alta, to the apple`tablet .
. looking for better handwriting and vocal parsing:
it has good chance of being improved with parallelism .
2009 Charles P. Thacker
For his pioneering design and realization of the Alto,
the first modern personal computer, and in addition
for his contributions to the Ethernet,
and the Tablet PC.

ladyada.net`openware

3.15: web.adds/ladyada.net`openware:
. I heard of ladyada in a makezine;
she also sells kits for the designs she gives:
. one of her mit eng'ing projects
was a cell-phone jammer (not available as a kit!)
. she has an [ask an engineer].page
"(Our weekly LIVE video chat. Every Saturday 10PM ET )

3.15: web.adds/dangerousprototypes.com`openware:
. her saturday vid chat was spammed with this:
dangerousprototypes.com
-- A new open source hardware project every month
eg, a web platform kit for $35, assembled for $5 more.
The Dangerous Prototypes web platform is a tiny server
designed for networked hacks where a full PC is inconvenient.
for projects that bridge the internet to microcontrollers,
but most of them have a PC in the middle to handle network stuff.
This business card-sized internet appliance
can connect to web services,
control physical objects from a browser interface,
or email sensor status reports;
no PC intermediary required!
. owner ian also has:
http://www.diylife.com/bloggers/ian-lesnet/
eg, computer-mouse-salvage

3.15: co.adds/forums.adafruit.com/ergonomic keyboard kit:
. posted in kitbiz / ergonomic keyboard kit:
. thinking about questions to ask,
I'd like to buy an open source kit for
ergonomic keyboard kit:
. I was hoping someone would open-source
an ergonomic keyboard kit
with one or more of these features:
it comes in 2 parts that communicate with each other
as if one keyboard .
. it has a set of macro keys that are programmable by
reading an sd card's text file .
. the sd card can hold your passwords securely,
so macro keys could send long passwords .
. some cable that converts a laptop into a keyboard;
so that another computer thinks it's just a keyboard,
when really it's a set of programmable macro keys as well .

openware lego cad

3.14: web.adds/openware lego cad:

LDraw is a file format and parts library
. for modeling Lego creations in 3D on a computer.
LDraw models are created with a CAD tool
and displaying can also be done with
POV-Ray, a free 3D ray tracer.
. ldraw.org is a community supporting LDraw;
. they have a getting-started page for mac,
and a list of available tools .
. the LDraw library can be downloaded from ldraw.org
but some of the LDraw editors include it too .

* Bricksmith is an openware LDraw editor for Mac OS X .
* Ldglite is another Mac openware LDraw editor;
but it uses an OpenGL rendering engine,
making it portable to other operating systems.
* LeoCAD, is an openware LDraw editor for {Windows, Linux}
with a perspective camera.
. only the downloads are at g'code;
the source is at gerf.org .

adde's security

3.23: adde/security:
. how does user data remain private
when that privacy depends on not having net access,
but then it can still access another program
that does have net access ?
3.31:
. app's are not communicating directly;
rather, they message each other and the internet
only through the os, addx,
and this arrangement offers several tools:
. only isolated app's connect with the net .
. app's that contact both the net and the user
can raise an alert to check that app's
trust settings .
2313:
. all user input goes through the user`agent,
which can assist in protecting user privacy .

3.25: adde/security/networking controls:
. after reading about flash being
a complete programming language
I wondered how adde can protect the user
without bugging them ?
. does the current design already take care of this?
the only time it matters that a program
communicates with its home site
is when it also has access to local personal data .
. for an app like an editor that also has
a pane that needs web access,
the program could come as a package of 2 modules:
the edit.module wouldn't have web access,
and the web.module wouldn't have files access .
. the editor pkg would provide suggestions for
how to arrange the panes for each module,
but adde and the user would have final say over that .
3.31:
. adde is checking the module capabilities
so as to enforce trust settings .

3.27: adde/multi-casting:
. from a dev.android thread:
"(I'm pretty sure that's not possible to
generate a broadcast event when the alt key is pressed,
instead of letting the current application consume it.) .
. part of special permissions should include
app's or services explaining that they are sniffing input
from what you would think is going to the app in focus .

debug feedback mgt

3.9: adde/debug feedback mgt:
. code gives warnings by writing to a debug file;
if the debug file is modified,
then the user is warned that the app authors
may be misusing some of their subsystems;
and users are then given the ability to
send a debug report .
. what should not happen,
is having unhelpful subsystem warnings
written on the user's screen .

user-mapped gesturing

3.23: adde/multitouch and gestures:
. most of those 2-finger gestures of multitouch
could also be done with one finger;
you just need a convention like up-swipe is zoom-in,
and down is out .
. with single-finger swipes
we could avoid most of those annoying little control boxes .
. there are cheap track pads for most platforms,
and they offer the same thing as a touch screen .
. gesture controls should also have the mvc architecture,
where the users can customize the mapping
from gestures to actions,
so they can do what makes sense to them .
. with the ability to see the strokes they draw,
then even if the app' they're on is hesitating to respond,
the gesture's visual overlay is always quick to
give them graphic feed back .

3.23: adde/themes that are user-controled and snappy too:
. one reason mac doesn't like to change its themes
is to keep things snappy,
implying all rendering needs to be in the kernel;
but you can customize and have snap too
by keeping the feedback lightweight .

key to portability is sourcecode binding

3.30: adda/key to portability is sourcecode binding:
. dalvik-vs-mono:
"( J2ME was always crippled by the phone vendors
who never wanted to get important APIs into the stack
so that they can bind the developers to
their implementation.)
. what they are calling an implementation
is simply all that boring translation work;
the first thing you have to do on a new platform
is make a backend for your translator
that will map your preferred language
to their version of library calls .
. this is why having a source-to-source translator
is the most efficient way to portability .
3.31:
. it requires a lisp-like infrastructure
that makes it easy to automate all the rules
that one usually applies to programming;
ie, translating from pseudocode to the target code .

function type's literal

3.30: mis.adda/dstr/function type's literal as @:
. just as #.t is the array type's literal,
the function should have something besides ()
because then how do you say function's type
symbolically rather than literally ?
isn't it tacky having manditory useless paren's?
. the @ is english's symbol for function application,
so then @.t could be function type's literal .
then to define the arg type symbolically,
say rec.type: (v.t, ...),
you have @rec.t or #rec.t .
. but then you'd expect
f@x
whereas the english expectation from email syntax is
x@f .

the number-mark as subscript

3.29: adda/dstr/syntax/# as subscript:
. noticing #().t -- the array type's literal --
may not sit well with the idea that
the #-symbol would be interchangeable with
the subscripting of what comes after the # .
. to be consistent with math,
array typing would have to be described
the same way that functions are:
A: i`type -> return`type .
3.31:
. arrays differ from functions in that
a function includes as part of its value
the domain set that is addressing its codomain .
. arrays by contrast, are a list of values,
and the addressing scheme is associated
like so:
. I could have A and B both assigned
to the same value: (1,2,3);
and A could be type #{a,b,c}.n,
while B could be type #{x,y,z}.n;
ie, their values are the same type;
whereas, 2 such functions would not
have the same value: one is { a:1, b:2, c:3},
while the other's value is { x:1, y:2, z:3} .

mem'mgt's array range checking

3.26: adda/mem'mgt/array range checking:
Java requires range checking on
every array access
. that must be a misunderstanding,
one reason you would set limits on
for-loop var manipulation
is so you could check the array access just once
during the first entry instead of every re-loop ?
. I was worried about how to
efficiently do range checking
but my segmented memory idea is not efficient anyway!
. it's an array of 256 ptrs to
data arrays of some small size like 4k,
the bits are divided so that the high 8bits
will address the ptr,
then the lower bits will address into the data array .
. perhaps this is a bit too low level to commit to;
instead,
you program to a higher interface,
and then let a mem module of the translator
try out various strategies for mixing ideas about
segmented mem with other ideas like
copy to allow array growth .
. either way, the lang' I'm mapping to is c,
and that requires me to explain
just how I avoid alloc'block bounds errors .
. modular arithmetic does seem the way to go;
eg, if the platform allows
unsigned rollovers of only certain ranges,
then that range is the size my
alloc'd blocks need to be .
023:
. another cool way is to give every process a 16bit range
from which all its blocks come from,
and then that process can
completely scramble its own space
but at least there will be interprocess modularity .

portable translation the pypy way

3.26: bk.adda/Self-Sustaining Systems:
Self-Sustaining Systems: First Workshop, S3 2008 By Robert Hirschfeld, Kim Rose
. pypy offers a model-driven approach
to language implementation:
unlike jython, which diverges from cpython,
pypy is providing a pil (pythonic intermediate lang')
which can then have a backend to every other lang;
ie, the compiler is translating as if
that lang were a cpu intstruction set .
. pypy doesn't try be the intermed'lang for all back ends .
. it has versions for
high level (oop'ish) langs -- eg, {cli, jvm, js} --
and low level langs: eg, {llvm, c} .
. by coding your translator in pypy (Rpython)
you can debug it on the batteries-included cPython system
and then have all these back ends it will run on
-- including c .
. great, now if I could only love python!
3.31:
. this presentation assumes jython diverges
simply because it's rendered in a
different code base;
but jython differs for a deliberate reason:
it didn't want to just be another python
that happened to be runnable on a jvm,
it wanted a lang customized to complement the jvm;
whereas, cpython wants a lang that is
basically customized to complement ms`windows .

xml modeling

3.26: adda/xml modeling:
. the basics of xml started with
putting "(br) -- line break -- in angle-brackets;
because, angle brackets classically mean
a formal parameter,
as seen in language syntax diagrams .
. this formalism was required because
-- despite their being a standard for text --
there was no unambiguous representation for
line structure: { cr, lf, cr-lf, line's char count } .
. another (incidental) property was that
angle brackets were separating text that was
not meant to be taken literally;
and, this was the basis for
extending the use of angle brackets
for any text that was not to be taken literally .
. the basic structure of {sgml, html, xml}
is to have a pair of angle brackets for
each opening and closing element .
. using that way, there's a restriction on
literal text containing angle brackets;
whereas,
with a parenthetical method (described next)
there's a restriction only on
un-paired parentheses, and the use of the
code-starting symbol: [!]
which can be chosen to be both
very rare in literal text
and easy to write, read, and find .
. the math-english way would have made use
of parenthetical symbols:
{literal text ...}
[!]
block-name( parameters,,, ):
(
{literal text ...}
)-block-name
[!]
non-block ( parameters,,,)
{literal text ...}
3.31:
. the lisp way is slightly more compact:
{literal text ...}
[!]
(block-name parameters,,, :
{literal text ...}
)-block-name
[!]
(non-block-name parameters,,,)
{literal text ...} .

syntax for sets, powersets, bags, lists, hypermatrix

3.25: adda/dstr/literals:
. when a var is of type set,
it really means its values are a
powerset of some given enum type.
. another approach is using {a | b | c | ...}
to mean a value space,
while {,,,} means a set that involves multiple values .
. let dots do hyper-matrix structuring:
( ,,,; ,,,; . ,,,; . ...)
while in set braces, dots delimit items in a bag:
items in a bag are not ordered but duplicates are allowed;
eg, { 2 . 2 . 3 } is the bag of primes for 12 .
vs list { ;;; } which has duplicates but is ordered .

an interface's value literals

3.25: adda/type literals:
. a full adt description needs both a
set of operations
and a set of value literals .
. definitions of type enum are listing
just the values
because the set of operations are from
the scalar.class,
which by definition include certain operations:
relationals (equality, inequality),
assignment, and functions for expressing values as
an integer or string:
ord is the value's place in scalar order;
val is the numeric encoding of the state;
image is the graphic view of state
-- typically a character string
but can also be an icon:
. every graphic icon has a title (a filename),
and many images have nothing but a title;
eg, to describe the state of color,
you'd use the name of the color without necessarily
mapping it also to a colored block image .
[3.31:
. perhaps the most natural way to show in an interface
that a set of symbols are the type's value literals,
is to express them as the return values of the function:
image()
-- understood to return the type's value literals:
`image.{ v1, v2, ...} .
`val.{ n1, n2, ... } could then show
by correspondence with image,
the mapping of images to codes (assuming val was
contracted to be part of the interface) .]

typedef syntax vs terminology trade-offs

3.25: adda/oop/classes vs types:

. if using 2 keywords for defining class vs type,
the class could mean a type that is an
adt (abstract data type),
so then one could replace the type`def's
angle brackets (used for an interface literal)
with a simple enclosure
since a class`def would always be an interface,
and would therefore no longer need a variety
of enclosures; eg, t.class: (,,,) .
3.30: adda/dstr/nominally typed structs:
. another way to avoid various enclosure types,
is to use typing of parentheses:
(.braces ,,,), (.set ,,,) .

. any reason to reserve the terms"{class, classwide}
for the way ada uses the concept of class-wide ?
[3.31: adda uses class-wide semantics universally ]
. notice the english meanings of
"(what type) vs "(what class),
or "(typical) vs "(classical) .
...
. a good reserved meaning for "(class) vs "(type),
is when dealing with generics,
eg, the class of scalars
includes many enum.types .
3.27:
. generally, the meaning of "(class) within the
field of logic -- the origins of oop nomenclature --
is a set defined by a predicate .
. a class can include many types,
and for many reasons .
. the type.classes of interest to oop and generics
are those where membership is defined by
shared interfaces .

multi-interfaces

3.24: adda/multi-interfaces:
. just as oop classes have different interfaces for
clients vs subclassers,
adda needs a sublanguage for describing
multiple interfaces
and the various actors that can access them .
. dimensions for having separate faces include:
roles, security levels, priorities,
business arrangements (eg, cripple.ware vs full-service),
and partner name (where the degree of allowed reuse
depends on which partner is doing the reusing ).

high-level uses of pointer and possessive

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

2010-03-30

arrays and structs compared

3.21: adda/dstr/array vs record:

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

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

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

degrees of freedom in function typing

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

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

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

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

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

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

syntax designed around url

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

anonymous and literal adt's

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

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

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

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

review of aggregate-type`literals:

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

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

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

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

fundamentalist engineering

3.18: adda/fundamentalist engineering:

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

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

mail is high-priority

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

notifications support

3.16: adda/notifications:

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

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

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

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

comment's terminator shouldn't be a period

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

key to concurrency support

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

act'rec as implicit parameter to coroutine

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

complex apply syntax

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

macro -- compilation needs context

3.9: adda/macro/compilation needs context:

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

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

2010-03-29

SOP (subject-oriented prog'ing)

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

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

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

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

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

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

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

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

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

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

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

10.3.27: news.adda/lang/go!

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

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

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

Falcon prog'lang features support concurrency

3.11: adda/lang/falcon:


choice of Falcon-ada over Python-c:

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

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

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

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

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

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

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

2010-03-28

iConsume confused with iDevour

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

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

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

2010-03-07

robotics (cyber-physical systems) gets gov funding

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

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

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

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