2012-09-27

love the cloud but use nothing else?

9.26: cyb/net/love the cloud but use nothing else?
(response to:
co.twitter#GoogleAppsDev:
Tell us what it would take for you to
use "nothing but the web"
-- googleappsdeveloper.blogspot.com/2011
)
. I was one of those palmtop enthusiasts
who everyone else would just shake their head at
until smartphones came along .
. what I loved about my little Palm OS device
was that it let me do my laptop essentials:
type-in, search, and review my daily notes,
along with calender and reminder automation .
. when I moved beyond the Palm OS,
up to a full-featured file system
my palmtop was also an ereader (pdf's, html).
. why would anyone
want these activities to not work
in the event the net was down ?
therefore, I conclude that
using nothing but cloud computing
is just nuts .
. what's even more bizarrely nuts,
is thinking that we can depend on the web
to give us the security we lack from using
a monolithic OS like mac or linux
-- juicy, fruity, nutty nuts .
. your infrastructure needs to start with
a microvisor like okL4,
and then use layers of locality:
. the pim and ereader are onboard,
the animation is in an on-site server
which is being sync'd with internet servers .
. this is the same way layering is seen in
{registers, cache, ram, hard-drive}.
9.27:
... and it saves a lot of energy!

2012-09-23

www.i-programmer.info

7.10: news.cyb/dev/I Programmer:
Programming news, projects,
articles and book reviews:
· www.i-programmer.info;
iProgrammer news is written
for programmers by same .
iProgrammer news also doesn't aim to be
the first or up-to-the-minute.
Our news does cover the latest releases,
intentions and developments
but in depth and with a
commentary that aims to explain
the significance of the event.
It also marks significant anniversaries
with links to relevant articles.
9.6: web:
. it has a table of subject-specific pages;
notable subject-specific lists of articles
include theory
(eg, a better way to program
-- see my article about this cp4e heroism .
and security
(eg, 2012.2 Google's $1 million for Chrome Hack
2012.3: Chrome Hacked Twice at CanSecWest)

adde influenced by Bret Victor, Chris Granger

9.8: 9.23: adde/adde influenced by
Bret Victor and Chris Granger:


. Granger's write-up of Light Table
-- and the Victor video that inspired it --
have me wanting something new for adde:

. as it runs your code,
it opens all the files being called by main,
and also opens a simulation of the code
( some of that idea is already embodied
in the adda feature where all types
have an associated graphical image,
and you just have to start debug mode
in order to see the image of
every variable in main .
)
. once you get some working code,
it is constantly rerunning your test case
with every change to your code .
. so we get not only continuous testing,
but also continuous simulation of the testing;
and, of course,the simulation and the code are linked;
so, selecting one selects the other .

"(In light mode, Light Table lets you
see called functions not just by
highlighting their calls in your code,
but also by showing you their code to the side.
We shouldn't have to constantly
navigate back and forth to see this .
)
. this works for small files,
but for much larger ones
I would like a combination of this and
Apple's idea of being able to
open and close a file simply by
toggling the space bar .
. in my combination,
the main is opened on the left;
then for each file used by main,
it opens that file only partially,
just to show a thumbnail view of say 5 lines
to show the function's header info:
the signature and the summary string .
. when you click on the thumbnail, it opens fully,
when you arrow down, that full view is
filled with the next thumbnail's file .

. the programmability of this is important:
the layout editor should have a language for
describing not only how windows are arranged,
but also how they are behaving .
. the first time I had that idea
was wondering how to tell the editor
that we need 3 windows to be columns,
such that text being added
flows first into the first column,
with overflow going to next column, etc .
. we might have other behaviors,
so, how do we let the user design that,
and create a command for it ?

. in a composite doc' we have the choice of
whether regions overlap or not .
. when I open a thumbnail,
it covers other thumbnails,
but it doesn't cover other subwindows
like that of the simulation or the main text .

. an alternative behavior for a subwindow
is that instead of an open file
being allowed to overlap the thumbnails,
it pushes them aside,
and the region becomes scrollable,
so that I can see a stream of open files
mixed in with a stream of thumbnails .

. there are subwindows with dedicated purposes:
the project's folder system, the simulation,
the main, and the subprograms main calls .
. there are a lot of subprogram subwindows
so we can toggle them as all thumbnails,
all open, or opening only the
currently running subprogram .
. if your center of attention is not main
but something main called,
then you want main's region thumbnailed,
just like a stack of activation records:
closing your currently active file
means seeing the stack of thumbnails
that it jumped out from .

Granger's Code with a little illumination:

"( Here I find a bug where I wasn't passing x correctly.
I type (greetings ["chris"]) and immediately see
all the values filled in
not just for the current function
but all the functions that it uses as well. )
--. this is the same idea I just mentioned,
that of showing the activation stack:
we're showing not just the code,
but wherever there was a
variable name in the code,
now there is a named box with a value in it
-- and of course,
every var in the code is instantiated
so there are values at
every mention of that variable .
. variables should be
toggle-able between the image and code:
an array may represent a picture,
or a list of (rgb) color vectors .

. another dimension of toggling
is the outliner feature:
all code and values are {collapsible, expandable}
and you can do this symbolically too:
there are not only commands like close all,
but such things as:
open only what names match (this pattern) .

. watching the Granger video again,
I see he does automatic filing of functions:
you can start off in one editor window,
and then when we start code for a new function,
it buds into a new editor window too;
and -- my idea here --
when you have nested functions
then you should have nested editor windows,
and of course,
they can be resized with scrolling bars,
or made so control-arrows and page{up,down}
can do the scrolling .
. the outliner menu includes
several massive window controls;
eg, we can say:
recently used windows are 25 lines high,
or say:
all windows are 10 lines long until I
focus on it for a full view .
calltree:
. a primary feature seen from the vid,
is that when the side region is showing the
files that are called by the main region,
they become part of the debugger show:
ie, when you start launching main's test program,
the files to the side turn into instantiations of
the function`bodies that main enters;
so, -- my question here --
what should it do if you have recursions,
and multiple instances of a subprogram?
the 2 obviously possible behaviors are:
# show all instantiations;
# show the current instantiations .
. in the [show current] alternative,
as the new instance is created,
you see the new instance
overwriting the previous instance .
. after the instance is done,
it is re-overwritten by the prior instance .
. in the [show all] alternative,
we need to show a call tree
perhaps expressed as dots for each node,
and then you use [birds eye view]:
drawing a box around the part you want
or using the pinch gesture
on the part of the call tree
that you want to see thumbnails of
(thumbnails are opened in the usual way).
. from the call tree's [nodes as points] view
you can also use arrow keys to
turn nodes into files or thumbnails,
one node at a time:
up= parent node, down= 1st child node;
{right,left}= nearby sibling nodes .
. we can use the finder with opener, eg:
open all the instances of subprogram x .

CP4E hero Bret Victor

9.8: news.adde/light table and bret victor:

. Bret Victor's video has a cp4e mission
and shows off the new tools he's built
that help us develope our creative ideas .

. amazing what he's done;
he has an IDE where you can click on any var,
and it turns into the widget needed to adjust it;
but then it's also
re-running your code after every change;
so, if your program generates a picture,
his scripts are custom GUI's for
painting particular classes of pictures
where you paint by both coding
and by adjusting code parameters
-- all by GUI! (as you do edits,
the page is sprouting widgets to help you).
. when you slide a for-loop var,
the program is re-running for every
value in the for-loop's change range
which is causing an animation effect
-- a new way to experiment with video .

. even more amazing,
this IDE creates a complete mapping
between the subpicture being drawn
and the line of code that drew it;
so clicking in the picture
causes the editor to highlight a line of code,
and conversely, selecting a line of code
highlights the subpictures it drew .

. now, speaking of animation,
the next thing needed for visualization
is to create trails for specific subpictures,
so that as you modify a parameter,
it immediately shows how that is affecting
the path of the trail .
. first he's pausing at the
end of the interesting time interval,
then he's using rewind to get to the
beginning of his time interval of interest;
and finally when he's adjusting parameters now,
for each new parameter change,
it's drawing a new trail specific to the
time interval of interest .

. why are there symbols in a schematic?
because it's the easiest way to pen them,
Victor notices ( and there's the icon effect
-- creating instant recall of the concept );
but now that schematics are in computers,
we should be using their dynamic expression:
so, in an electronics diagram,
we could replace the symbols with
little videos of the analog signals
that are generated at that symbol's node .

. likewise, computers can make coding so easy
that any one can do it;
indeed, it seems that the best coders
are just those who are best at
imagining a computer's working internals,
but we have the computer to do this for us,
so why don't we?!
. for example he shows another IDE,
this one being tuned for coding instead of drawing
in which the editor has 2 areas:
on one side is the code,
and on the other is a simulation of the code;
ie, the simulation has a list of all the locals
that are so far declared in your function,
-- and it does this in real time:
eg, as you write the function's header,
the simulation shows the parameters as undefined;
then you can modify the simulation
by instantiating any undefined variables
(so the assignment happens only in the simulation,
not your code), and then as you have code
assigning a complex expression to a var,
the simulation tries to eval that assignment;
and, this way you are testing as you code
-- every time you hit enter,
it's relaunching the build&run
for per-line-of-code testing (quick!).
. if you add a loop to your code,
then all the var's being affected by the loop
are placed in a matrix
with vars in the columns,
and iterations per row (or vice versa).

. he then gives us a history of people who
had a passion for using computers to
help people with making full use of their brains;
pointing out that this work is important because
people need these dynamic tools
to unleash their full human potential .
. he was especially impressed at
those who made computers child's play;
and reminded the audience's budding techies
that we can choose as our identity
to have a social conscience,
and not just a technical expertise .

pioneers of cp4e:
(computer programming 4 everybody)

# Larry "nomodes.com" Tesler:
. not just the developer of copy&paste
but the one realizing we could do better than
obstructive modal versions of copy&paste:
he recognized a wrong
that was unrecognized by the culture .

# Doug Engelbart -- enabling mankind:
. propent of realtime human-computer interaction
not just the inventor of the mouse:
he wanted to solve mankind's urgent problems with
computer-assisted knowledge workers .

# Alan Kay -- enabling children:
. everything he did for windows, menus, and oop,
was to enable children to be computer literate
to make them more enlightened adults!
. he studied those who studied how children think,
in order to help them use computers .
[. in 2006, Kay's Viewpoints Research Institute
was funded by USA's NSF for the proposal:
Steps Toward the Reinvention of Programming:
A compact and Practical Model of
Personal Computing as a Self-exploratorium [pdf]
(see comments of it:
. they critiqued him for bucking the trend of
taking advantage of cheaper hardware
by filling it with more features and bling;
but ironically, that attitude
still hadn't been able to provide all children
with a computer that would help them learn
-- children's computers need to be
as cheap as calculators;
but instead we insist on continuing to
code above the child's price point .]

# Richard Stallman -- freedomware:
. the king of fighting to change culture
for the good of mankind .

9.8: web: i-programmer.info`
Alex Armstrong 10 March 2012`

A Better Way To Program
This video will change the way
you think about programming.
The argument is clear and impressive
- it suggest that we really are building programs with
one hand tied behind our backs.
After you have watched the video
you will want the tools [that he has] demonstrated.

We often focus on programming languages
and think that we need a
better language to program better.
Bret Victor gave a talk that demonstrated
that this is probably only a
tiny part of the problem.
The key is probably interactivity.
Don't wait for a compile to complete
to see what effect your code has on things
- if you can see it in real time
then programming becomes much easier.
Currently we are programming with
one arm tied behind our backs
because the tools that we use
separate us from what we write and what happens.
Interactivity makes code understandable.
Moving on, the next idea is that
instead of reading code and understanding it,
seeing what the code does is understanding it.
Programmers can only understand their code by
pretending to be computers and running it in their heads.
As this video shows, this is incredibly inefficient
and, as we generally have a computer in front of us,
why not use it to help us understand the code?
...
if you watch just one video this year
make it this one.
Update:
See Light Table - a Realization of a New Way to Code
[ an implementation of Victor's idea .]
[ it was funded by a kickstarter page .]
You can now try Light Table
via the Light Table Playground!

9.8: web: Bret Victor
. Bret Victor's inspiring resume
and his many cool writings .
. Bret Victor`Inventing on Principle [vid]
from CUSEC 2012 (Canadian University
Software Engineering Conference)
-- a three-day event that brings together
undergraduate and post-graduate students
for learning, networking,
and sharing their passion for software.
9.8: web: chris-granger.com`
Light Table --a new IDE concept
Despite the dramatic shift toward
simplification in software interfaces,
the world of development tools
continues to shrink our workspace
with feature after feature
in every release.
Even with all of these things at our disposal,
we're stuck in a world of files
and forced organization
- why are we still looking all over the place
for the things we need when we're coding?
Why is everything just static text?

Bret Victor hinted at the idea that
we can do much better than we are now
- we can provide instant feedback,
we can show you how your changes affect a system.
And I discovered he was right.
...
 all of this culminates in the ability to see
 how values flow through our entire codebase.
 Here I find a bug where I wasn't passing x correctly.
 I type (greetings ["chris"])
 and immediately see all the values filled in
 not just for the current function
 but all the functions that it uses as well.

Light Table is based on a very simple idea:
we need a real work surface to code on,
not just an editor and a project explorer.
We need to be able to
move things around, keep clutter down,
and bring information to the foreground
in the places we need it most.

Light table is based on
a few guiding principles:

You should never have to look for documentation
Files are not the best representation of code,
just a convenient serialization.
Editors can be anywhere
and show you anything - not just text.
Trying is encouraged
- changes produce instantaneous results
We can shine some light on related bits of code

Docs everywhere
When you're looking at new code
it's extremely valuable to be able to
quickly see documentation left behind by the author.
Normally to do so you'd have to
navigate to the definition of the function,
but lightable ghosts this information in to the side.
Want to know what partial does?
Just put your cursor on top of it.
This makes sure you never have to worry about
forgetting things like argument order ever again.

. we should be able to search all our documentation
in place to quickly see what it is.
Don't remember what was in the noir.core namespace?
It's one ctrl-f away.

This is especially handy for finding
functions you may not even know exist
and seeing their docs right there.
No need to look at some other generated documentation.

Instant feedback
.  to try things out, we can do better
than lispers' REPL - we can do it
in place and instantaneously.
For example we can type in (3 + 4)
and immediately we are shown the result
- no ctrl-enter or anything else.

Light Table takes this idea as far as it can
and doesn't just show you variables to the side,
but actually shows you how the code is filled in.
This lets you see how values flow through
arbitrarily complex groups of functions.

This level of real-time evaluation and visualization
basically creates a real-time debugger,
allowing you to quickly try various inputs
and watch it flow through your code.
There's no faster way to catch bugs
than to watch your program work.

We built drafting tables for a reason
. desktop windows aren't a good abstraction
for what we do as software engineers .
Other engineers have large tables
where they can scatter around
drawings, tools, and other information .
A drafting table is a better abstraction:
We shouldn't need to limit ourselves
to a world where the smallest moveable unit
is a file - our code has much more
complex interactions that we can better see
when we can organize things conceptually.
. We saw an example of this with Code Bubbles,
but why can't we embed a running game ?
Then we can interrogate it,
and have our environment answer them for us.
[9.8:
. an image in the article at this point
shows a desktop where a folder full of files
is represented by a box
whose title is named after the folder
with file names inside the box .
. the right side has boxes of code;
so, for each function you inspect,
it also shows you called function`bodies .)
--
. this reminds of composite editing,
where the editor holds the entire desktop;
so, it serves as desktop layouts that can be
suspended and resumed as if a vmware .
. desktops and their windows
can be edited the same as
when an editor embeds images in text .
. the first compound docs I saw
were ms`office embedded objects:
you could mix & match Word's text columns,
Excel's spreadsheet windows, and various images .
. browsers have this feature (the embed tag);
but browsers are short on editing abilities,
and editors need to be integrated with the OS;
such that I can open a file,
and it unleashes a desktop of windows
all arranged in the way they were before .
. also, the layout editor needs to
control the border style of its windows;
eg, embedded graphics in text
should often have no border at all .
. a 1st class composite document
has everything we like about vmware,
but instead of windowing OS's
our compositing app is windowing apps .]
Code with a little illumination
There's no reason our tools can't
help us understand how things are organized .
In light mode, Light Table lets you
see what functions are called by
the one you're currently working on,
not just by highlighting ones in your code,
but by also showing you their code to the side.
We shouldn't have to constantly
navigate back and forth to see this .

Finally, all of this culminates
in the ability to see not just how
things I type into a scratch editor evaluate,
but how values flow through our entire codebase.
Here I find a bug where I wasn't passing x correctly.
I type (greetings ["chris"]) and immediately see
all the values filled in
not just for the current function
but all the functions that it uses as well.

What languages will it support?
. The first two are Javascript and Clojure,
.... we hit $300k! Python will be the
third language supported out of the gate.
. additionally,
new languages can happen through plugins.

Will it be open source?
. a firm believer in open source software
and open source technologies.
we can guarantee you that Light Table will be
built on top of the technologies that are
freely available to us today.
As such, we believe it only fair that
the core of Light Table
be open sourced once it is launched.
At some level, this is an experiment in
how open source and business can mix
- it will be educational for us all.

What's a license then?
. In order to download packaged distributions,
you'll need a license. Preliminarily,
we're thinking, for individuals,
licenses will be based on a model of:
"pay as much as you can of
what you believe it is worth".
. This gives everyone access to the tools
to help shape our future,
but also helps us stick around to
continue making the platform awesome.
We think what we build will be worth at least $50,
and so that's what we've used for our rewards.

Is it a standalone app?
. there's an instance of webkit as the UI layer
-- completely an implementation detail.
It will run locally on virtually any platform
and out of the gate will support
the big three (linux/mac/windows).

Can I script/extend it?
. It will be scriptable in Javascript
(and many other languages can be
translated into Javascript).
Ultimately the goal of the platform
is to be a highly extensible work surface
- even the initial core languages
will be written as plugins.
This allows us to build development interfaces
we haven't even imagined yet.

What about key bindings?
. by using the awesome CodeMirror editor,
this is something that is easily adapted.
If you're looking for a way to contribute,
help improve CodeMirror
and its emacs/vim plugins!
--[
CodeMirror is a JavaScript component
that provides a code editor in the browser.
When a mode is available for your language
[c, python, go, js, ...]
it will color your code,
and optionally help with indentation.
. rich programming API and a CSS theming
for customizing CodeMirror
and extending it with new functionality.
. it's used by Mergely which is a
powerful online diff and merge editor
(Browser-based differencing tool)
that highlights changes in text.
It can be embedded within your own Web application
to compare files, text, C, C++, Java,
HTML, XML, CSS, and javascript.]

How can I help in the meantime?
. The better CodeMirror is,
the better all internet editors can be!
Past that, help us spread the word.
The more money we get
the more people I can involve in the project,
the more languages we can support,
and the more powerful the entire platform.
There's tremendous potential
-- we haven't even scratched the surface yet!

About the Developer:
. helped design the future of Visual Studio,
and released numerous open source
libraries and frameworks.
. for Microsoft was the Program Manager for
the C# and VB IDE
-- countless hours behind a one way mirror
learning how people develop things.
Since then steeped in the world of
startups and OSS.
. worked with the guys at ReadyForZero
to build readyforzero.com,
created the Noir web framework,
built the SQL abstraction layer Korma,
and released a host of ClojureScript libraries
to make client side development a breeze
- many of which are now featured in
the canonical books for Clojure.
Even more recently,
built Bret Victor's live game editor
after watching his inspiring
"Inventing on Principle" presentation .
Light Table at news.ycombinator.com:
One thing Light Table could pick up / learn
is the ability to scale as function set grows,
to gain a kind of fractal navigability.
--[. I think he's refering to the call tree idea
aside from the view's detail modes
(nodes-view vs thumbnails vs fullview)]
stcredzero/"I told you so!"
Smalltalkers have been doing [LightTable]
--[the right thing]-- since the 80's
(If only we could have communicated
about this as well as Mr. Granger).
The first and the last points [under Also:]
were satisfied by lightning-fast searches of
"senders" and "implementers" .
1980's smalltalk:
- Smallest unit of code is the function.
- Able to get instant feedback on code changes.
- Multiple editors with just one function in it.
Show code in an "area of concern" not just in a file.
- The coding environment can show also
results, app windows, graphics, other tools.
- Can save the configuration of the above.
Also:
- You should never have to look for documentation
- Files are not the best representation of code,
 just a convenient serialization.
- Editors can be anywhere
and show you anything - not just text.
- changes produce instaneous results
- We can shine some light on related bits of code .
shykes:
. Dan Ingalls, the father of Smalltalk,
has picked up the baton again,
this time using Javascript.
Check out the MIT-licensed Lively Kernel
-- a new approach to Web programming
. the live demo at JSConf was jaw-dropping;
completely in line with the Smalltalk legacy .
It provides a complete platform for Web applications,
including dynamic graphics, network access,
and development tools.
Field (programming environment)
. embraces most (if not all)
of Light Table's principles.
--
As always, the multi-media programming environments
are miles ahead and nobody knows about them.
Field[by The OpenEnded Group] is amazing.
{Max/MSP, Pd, ...} are a different paradigm altogether,
but have had live editing, documentation a click away, etc
and have been in heavy use for 20+ years.

list of multi-media programming environments?
. the big names are Max/MSP, Pure Data,
vvvv, QuartzComposer, SuperCollider,
ChucK, Processing, openFrameworks,
Cinder, and Field[The OpenEnded Group].
But there are many more smaller projects
such as Lubyk, Overtone, LuaAV,
Faust, Plask, Impromptu and Fluxus.
I also want to plug NoFlo, which is a
'flow-based programming' library for node.js,
which integrates with a visual editor.
the design of design book

gfodor, vdm, nickik:
recommend some reading materials?
Victor's writings
The Design of Design (see part 4)
simplicity’s virtues over easiness’
Alan Kay`Programming and Scaling [vid]
Viewpoints Research Institute
Mindstorms: Children, Computers, And Powerful Ideas
PLATO Learning System [vid]
Mindstorms: Children, Computers, And Powerful Ideas book udacity -- cheap edu
coursera -- cheap edu
khanacadamy -- free videos

2012-09-22

hello to founder of diotavelli.net's PyQt wiki

7.11: web.co.cyb/dev/who does diotavelli.net?:
. the supporter of the pyqt wiki
also has a page on gpgpu .
. other details of his coding career:
studying Computational Linguistics
    2003‒2006: T├╝bingen (BA)
    2007‒2009: Saarbr├╝cken (M.Sc.)
. here's his papers .

at Google ZRH:
"( Computational Linguistics means
the theoretical foundations
and wonderful world of algorithms .
eg, writing small toolkits for finite state automata. )
what does his toolkit do?
"(    Determinization of NFSAs to DFSAs
    Creation of DFAs from simple regular expressions
    Application of FSTs
    dot graph output for *FSAs
-- if you like PyParsing
and generator-expression-prone Python code,
you might want to have look at
the TinyFST code.)
salsa project page @ coli.uni-saarland.de:
"( One of the most urgent problems in language technology
is the lexical semantics bottleneck,
the unavailability of domain-independent lexica
with rich semantic information on lexical items.
Such lexica could greatly improve
the quality of current applications.
At the same time, providing
large-scale lexical semantic information
is an enormous challenge,
due to the size of the vocabulary
and the inherent vagueness of lexical meaning.
Our aims are:
    Providing a large lexical semantic lexicon
    providing semantic and syntactic properties for
    German lexical items,
    to serve as a rich static database.
    Developing techniques for the wide-coverage statistics-based
    semantic annotation of texts.
    Investigating the use of contiguous frame annotations
    for dynamic semantic analysis
    in practical natural language processing applications).
The TreeAligner Project
"( The TreeAligner is a tool for annotating and browsing
correspondences between elements of syntactical trees.
It can be used for creating paralell treebanks.
It also includes a powerful search function.)
. his latest blog entry for dev is
2009/py for gnome
-- I don't see any interest in pyqt at all
except for knowing about his wiki .

Scrollable Widgets with PyGTK 2009:
. the code for that project is online at
www.cl.uzh.ch/kitt ... gtktreeview.py#l199 .
-- © 2007-2009 The TreeAligner Team, at ifi.uzh.ch,
GNU GPLv2 . import gobject, gtk, cairo ...

iOS app restriction motivations

7.22: todo.cyb/dev.iOS/
menu-driven prog'lang learning:

. I thought of an addx app for iOS:
let users try programming by menu .
. even if iOS users can't run the programs
that they create by menu,
it's a way to learn to program
by exploring menu's;
but in that case, it would need to be
for a way of learning a popular lang, not adda;
adda is interesting only if it's
a way to do something popular;
eg, you could make your iOS do things
by running the code you just built .
. this could be done via the use of javascript
by somehow sending it to the browser ?
[9.9:
. I should be keeping in mind that for $99/yr,
such an app should be designed to make money;
if I just want to be helpful,
I can do that for free with a web app .]

7.29: news.cyb/dev.iOS/
co.dev.mac#buck has book for dev.iOS?:

. it's one thing to say that
every program has to be inspected,
but why does every user
have to be inspected?!
ie, why can't the user write scripts ?
a user should be able to automate
anything a programmer is allowed to do .
. but it's a slippery slope;
if you let users do scripting
then they are trading scripts,
then they are failing to notice
what "they" are doing .
. can javascript come close to doing
everything a user can do ?
. another problem is user spoofing user:
many services like google
can't be used by automation because
then a human wouldn't be
influenced by the ad's,
so there would be no use serving ad's,
and no way to fund the product ...
(not sure that's a problem on the iOS;
Android users get served a lot of ads).

Pyglet for multi-media Python

7.16: news.cyb/dev.py/pyglet for cross-platform gui:
. during rapd's 2009 python promo,
pyglet was listed along with scipy
as some examples of how python leads ruby
in everything but web programming?
that makes pyglet interesting!
(a cross-platform, BSD-licensed
windowing and multimedia Python library ):
. provides an oop interface for developing
games and other visually-rich applications
for Windows, Mac OS X and Linux.
The major 1.2alpha1 release
brings pyglet to Python 3.
Pyglet now also runs on 64-bit
Linux, Windows and OS X.
The OS X layer switched to using Cocoa.
There's also a load of bug fixes,
updates to the OpenGL wrappers
and other minor new improvements.

Some of the features of pyglet are:
# No external dependencies
or installation requirements.
# For most application and game requirements,
# pyglet needs nothing else besides Python,
# simplifying distribution and installation.
# Takes advantage of multiple windows
and multi-monitor desktops.
# Load images, sound, music and video
# in almost any format:
# pyglet can optionally use AVbin to playback
audio formats such as MP3, OGG/Vorbis and WMA,
and video formats such as
DivX, MPEG-2, H.264, WMV and Xvid.
compared to pygame 2010:
. if you want it done quickly, use pygame.
but in a serious project, go for Pyglet,
which is nicely designed and implemented.
daniweb 2009:
Pyglet is not a full GUI toolkit,
[ it's a kit for making gui kits ]
but has its strength in audio and video presentations.
using GL and FFmpeg .
sparkyb 2008`not a traditional gui kit:
a graphics/game library like Pygame or Pyglet
is not the right kind of thing for a [ desktop app ].
You're better off with a GUI toolkit that already has
things like text fields, buttons, lists, task tray icons, etc
than trying to build your own with a graphics library.
(the question for a desktop app then
is pyqt vs wxPython).
wikibooks python gui kits 2011:
(no mention of pyglet)
7.17: ironically,
there's a book by "(wikibooks contributers)
that recognizes Pyglet on Page 144:
2D Game Programming
... Pyglet is avaible[sic] under a BSD-Style license ...
[ also listed under 2D Game are Pygame (wraps SDL)
and Rabbyt (a fast Sprite library) ]
. indeed, here it is at wikibooks.org,
under 2D Game Programming:
    # Pyglet is a cross-platform windowing and multimedia library for Python
    with no external dependencies or installation requirements.
    # Pyglet provides an object-oriented programming interface
    for developing games and other visually-rich
    applications for Windows, Mac OS X and Linux.
    # Pyglet allows programs to open multiple windows on multiple screens,
    draw in those windows with OpenGL,
    and play back audio and video in most formats.
    # Unlike similar libraries available,
    pyglet has no external dependencies (such as SDL)
    and is written entirely in Python.
    Pyglet is available under a BSD-Style license.
    also mentioned are Pygame, Phil's Pygame Utilities (PGU)
    Kivy, and Rabbyt .
--
. of these entries, only Pygame is
noteworthy enough for wikipedia;
other links go to their respective sites instead .

. even more weird is this:
Pyglet [Paperback] by Ronald Cohn Jesse Russell
Publisher: VSD (January 1, 2012)
-- described as
    "( High Quality Content by WIKIPEDIA articles!
    Pyglet is an OpenGL-based software library
    used in developing games
    and other visually rich applications
    using the object-oriented language Python.
    This book was created using
    print-on-demand technology.
) but at wikipedia,
it's been deleted as not noteworthy !
. and as you might expect, amazon says
"(Currently unavailable.
We don't know when or if this item will be back in stock.)
. the same author did a wikipedia reprint of
wiki's Crystal_Meth_Anonymous page;
and, that is also listed as unavailable,
but wiki still has that article (one very short page).

wikipedia (Pyglet deleted):
. non-notable, yet one very notable thing about it,
advocates were pointing out,
is that it's used as the base for Cocos2d:
a framework for building 2D games, demos,
and other graphical/interactive applications.
main features of cocos2d:
# Pyglet Based: No external dependencies
# OpenGL Based: Hardware Acceleration
. but wiki says Cocos2d is notable essentially
for being no longer dependent on Pyglet;
rather, they've been very busy with
porting to java, c++, and obj'c .
. and, as a result of such porting
it was featured in the book:
More IPhone Cool Projects
(see section "Cocos2D for iPhone and iPad;
                    It Is Easier Than You Think")

-- easy iOS programming is very noteworthy,
because, Python isn't even allowed on iOS!

9.6: web: Pyglet's newsgroup:
On Saturday, 28 July 2012 12:30:04 UTC+2, Scott Porter wrote:
> I've just upgraded to OSX 10.8
  and installed Pyglet 1.2alpha. 
> Pyglet is now unable to create any windows. 
Adam Griffiths Sep 5, 11:55 pm
I've been using Python 2.7 with PyObjc 2.2
with Pyglet from head (or 1.2 alpha).
It's the only combination that's ever worked for me.
I'm able to run Pyglet on 10.7 and 10.8 without any problems.
I wrote about this here:
I installed pythonbrew, virtualenv
into the system python.
Then install 2.7 with pythonbrew
and install Pyglet from the repository.
If I remember correctly,
the problem people are having with 10.8
is the system python uses certain libs.
Avoid using it and you shouldn't have any problems.
02/21 installing-pyglet-in-mac-os-x/
. Pyglet 1.1 uses the Carbon framework,
but this is not compatible with 64-bit Python installs.
The Pyglet 1.2 branch has been modified to use Quartz, ...
We must instead install Pyglet from the Mercurial repository.
The Quartz bindings require the use of PyObjc ...
Travis Griggs Aug 28, 4:23 pm:
1) Download mercurial and install it.
2) Clone the pyglet repository by opening up a terminal and running:
    hg clone https://pyglet.googlecode.com/hg/ pyglet
3) Go into the pyglet directory and install it
(type in your password when  prompted and press enter):
    cd pyglet && sudo python setup.py install   
Tristam MacDonald's pyglet blogging .
. he wrote this pyglet openware:
simplui -- Lightweight GUI toolkit for pyglet.
simplui provides a lightweight and flexible GUI toolkit
for Python/OpenGL applications using pyglet.
Primarily intended as an aid in debugging and development,
simplui is generally overkill for in-game GUIs.
other openwares by same author:
pyeuclid and cocoa-python .

=== other pyglet-related projects
on code.google.com ===

== pyglet shouldn't depend on PyObjC ==
cocoa-python -- Port of Objective-C runtime
to Python using ctypes
"( Port of the Objective-C runtime to Python using ctypes
with the goal of being able to
use the Cocoa API on Mac OS X without PyObjC.
... so that pyglet could run without depending on PyObjC.)
== pyglet should interface xcb not just xlib ==
samurai-x -- a pure python window manager for X
"( samurai-x is written entirely in python using ctypes.
The xlib module is from http://pyglet.org
but project was halted to write an
xcb-based window manager.
. XCB (X protocol C-language Binding)
is a C language binding for the X Window System.
It is implemented as free software
and aims to replace Xlib.
Xlib/XCB provides application binary interface
compatibility with both Xlib and XCB,
providing an incremental porting path.
Xlib/XCB uses the protocol layer of Xlib,
but replaces the Xlib transport layer with XCB,
and provides access to the underlying XCB connection
for direct use of XCB.)
== Pyglet wasn't flexible and pyopengl too slow ==
pocketwatch -- An opengl graphics library for python.
"( Pocket watch is an OpenGL graphics library for python,
write simple 3d programs.
why!? what about pyglet?
Pyglet is awesome, and pocketwatch uses pyglet
to do some specific things
like window management, rendering text,
and opening images.
Pyglet now supports some features that
may have been useful to solving the problems
I had when I started writing pocketwatch.
But even then,
said features didn't seem flexible enough
to do what I wanted.
Maybe this is different now, maybe not. )
py-open-gl ?
"( using ctypes to do lots of opengl calls
is actually very SLOW.
So instead, I took all of the code that I could,
and wrote a simple C++ library
to do all the nitty gritty stuff,
and wrote a python state-sorter which could
render all of the objects with a single ctypes call.
. uses Python Imaging Library (PIL)
. PIL adds image processing capabilities
to your Python interpreter.
This library supports many file formats,
and provides powerful image processing
and graphics capabilities.)
== libraries that help you use Pyglet ==
pyglons -- rapid application framework for pyglet
"( No more boilerplate coding!
pyglons takes the ideas from Pylons
( a lightweight web framework emphasizing
flexibility and rapid development )
and uses them to create a framework for Pyglet
( a cross-platform windowing and
multimedia library for Python) .... )
pyglons, the module:
"( a module containing an application base class,
a state class and some predefined states
that you may or may not require depending on your needs.)
pyglons, the templates:
"( templates for the paster command
that creates your application directory and initial layout.
The default templates create a small working application
with splash screen, menu, help and
very basic application state
ready for you to add your code.
The templates also create all the required files
to use your application with distutils/setuptools.
The default pyglons app depends on pyglet and pyglons.)
layer
"( Layer is a set of somewhat disjoint modules
on top of pyglet, YAML, and other Python libraries
designed to smooth over strangeness
and allow for rapid iteration in game design and development.)
pgedraw -- Simple library that
make[s] it easy to draw in 2d with pyglet
"( the goal of this very simple library
is to cover up the lack of a decent
drawing system in pyglet.
. pgedraw helps to draw 2d
geometrical shapes with pyglet.
A simple way to clear the screen
and to enable alpha channel is provided, too.
Drawing are made using pyglet's OpenGl api,
but knowledge of OpenGl is not required to use pgedraw.
Pgedraw offers also a collision detection system
that can be used to check if the user is
clicking inside a drawn shape.)
python-pyknic -- A boilerplate library for
the rapid creation of 2D games in Python.
pyglet-shaders
-- Feed GLSL shaders into OpenGL from Python
(uses pyglet bindings)
los-cocos -- cocos2d: A framework for building 2D games
"( cocos2d is a framework for building 2D games, demos,
and other graphical/interactive applications.
It is built over pyglet.
. helps you structure a "scene based application".
Cocos simplifies the game development in these areas:
Flow control: Manage the flow control
between different scenes in an easy way .
Sprites: Fast and easy sprites .
Actions: Just tell sprites what you want them to do.
Composable actions like move, rotate, scale, etc .
Effects: Effects like waves, twirl, lens and much more .
Tiled Maps:
Support for rectangular and hexagonal tiled maps .
Collision: Basic pure python support for collisions .
Transitions: Move from scene to scene with style .
Menus: Built in classes to create menus .
Text Rendering:
Label and HTMLLabel with action support .
Built-in Python Interpreter: For debugging purposes .
Access to OpenGL functionality .)
== libraries that use Pyglet ==
bruce-tpt -- Bruce, the Presentation Tool
"( It uses pyglet to display via OpenGL
and handle multi-head
(the most common presentation setup)
so you can have the presentation displayed on a projector
while your laptop displays the original presentation source .)
pyglet-twisted -- Twisted reactor for Pyglet
"( . develops a Twisted reactor for Pyglet.
The aim is to enable Twisted's networking capabilities
to be fully integrated within the Pyglet event loop,
introduced in version 1.1.)
skyseam -- Utilities for 2.5D graphics in python
"( . a utility to orient a spherical projection
to suit a list of camera views.
pyglet based ui for visualization and testing.)
pyevocomm -- a simple open Framework for Accesibility
"( Designed with the MVC pattern,
adds to the view beyond,
the voice properties suitable for
people with low vision .)
py-lepton -- High-performance, pluggable particle engine
and API for Python
"( make complex and beautiful particle effects;
Two pluggable OpenGL renderers,
and two pygame renderers
Modular architecture:
easily configure and customize the engine .)
roller-ball -- A Python/OpenGL Game
"( PyODE engine with OpenGL calls
using Pyglet framework .)
flashy-screen
"( Flashes / strobes your screen with random solid colors.
Intended to try and fix stuck pixels on LCD TVs and monitors.
All you need to run this is python and pyglet ).
pynewt -- Pure python rigid body dynamics library
"( Uses  pyglet for rendering,
needs pyeuclid for all vector/quaternion maths.)
news.cyb/dev.py/ui frameworks:
PyGame  -- graphics and sound by SDL
pyglet -- minimalistic;
tends to be basis of game engines .

Panda3D -- game engine
PyOpenGL -- graphics library
OGRE -- scene-oriented, flexible 3D
   rendering engine (as opposed to a game engine)
TurboGears, Django -- web apps
urwid -- console user interface library for Python.
PyQT -- cross-platform GUI toolkit
wxPython -- a widget toolkit and tools library for gui's;
. for more see list of game engines (python):
blender -- listed under ray tracers too .
cocos2d
Ignifuga Game Engine
Panda3D
-- for lesser game engines and media kits
see wikibooks .

wikipedia`game engine:
. a system designed for the creation and
development of video games.
The leading game engines provide a software framework
that developers use to create games for
video game consoles and personal computers.
The core functionality typically provided by a game engine
includes a rendering engine (“renderer”) for 2D or 3D graphics,
a physics engine or collision detection (and collision response),
sound, scripting, animation, artificial intelligence,
networking, streaming, memory management, threading,
localization support, and a scene graph.
The process of game development is often economized,
in large part, by reusing/adapting the same game engine
to create different games,
or to make it easier to "port" games to multiple platforms.
Recent Trends
. As game engine technology matures and becomes more user-friendly,
the application of game engines has broadened in scope.
They are now being used for serious games:
visualization, training, medical, and military simulation applications.
To facilitate this accessibility,
new hardware platforms are now being targeted,
including mobile phones (e.g. Android phones, iPhone)
and web browsers (e.g. WebGL, Shockwave, Flash, Trinigy's WebVision,
Silverlight, Unity Web Player, O3D and pure dhtml).
Additionally, more game engines are being built upon
higher level languages such as Python (Panda3D).
As most 3D rich games are now mostly GPU-limited
(i.e. limited by the power of the graphics card),
the language's impact on speed becomes negligible,
while the productivity gains offered by these languages
work to the game engine developers' benefit .
Game Middleware
. In the broader sense of the term,
game engines themselves can be described as middleware.
In the context of video games, however,
the term "middleware" is often used to refer to
subsystems of functionality within a game engine.
Some game middleware does only one thing
but does it more convincingly or more efficiently
than general purpose middleware.
For example, SpeedTree renders the realistic vegetation
and, Fork Particle simulate real time Particle Systems .

python faqts, "style" surprises, testing sw

7.15: news.cyb/dev.py/help at faqts.com:
Python Knowledge Base
[defunct]: www.faqts.com has a lot of
example code using dictionaries.
http://www.faqts.com/knowledge-base/index.phtml/fid/541
http://www.faqts.com/knowledge_base/index.phtml/fid/199
. here is the archive of the defunct site:
(FAQTS : Computers : Programming : Languages : Python)
and both of the defunct url's work appended to that archive url
(http://web.archive.org/web/20010616225136/)
also, the example code was part of
a snippets library:
here is the help on operating on files;
eg,
# the directory of the currently executing program:
import sys, os
if __name__ == '__main__':
    _thisDir = sys.argv[0]
else:
    _thisDir = sys.modules[__name__].__file__
_thisDir = os.path.split(_thisDir)[0]
print _thisDir
7.21: news.cyb/dev.py/style guide has some pragma too:

. the python style guide is more than just formatting;
it has some pragmas and gotcha warnings too;
eg,  Programming Recommendations:
Code should be written in a way that does not disadvantage
other implementations of Python
(PyPy, Jython, IronPython, Cython, Psyco, and such).
For example,
do not rely on CPython's efficient implementation of
in-place string concatenation for
statements in the form a += b or a = a + b.
Those statements run more slowly in Jython.
In performance sensitive parts of the library,
the ''.join() form should be used instead.
This will ensure that concatenation occurs in
linear time across various implementations.

Comparisons to singletons like None
should always be done with is or is not,
never the equality operators.
Also,
beware of writing if x
when you really mean if x is not None
-- e.g. when testing whether a variable or
argument that defaults to None
was set to some other value.
The other value might have a type (such as a container)
that could be false in a boolean context!
7.14: bk.cyb/dev.py/lists:
. index starting at 0(zero) means an insert(i, obj)
is the same as putting an obj after the ith item .
. list + list2
= list`extend(list2)
= list`append(list2[:])
= list`insert(-1, list2) .
7.14: 9.6:
. notice how stack is related to list:
pop = un(right-most element)
pop = un push;
push = append .
. which is the opposite of append:
is pop removing the right-most ?
9.6: yes, list.pop() is un-append;
pop() takes the right-most .
. list.remove(elem) finds an item equal to the given elem;
contrast that to L.pop(i), removes the ith element .
-- remove() searches for the first instance
(throws ValueError if not present).

7.24: web,news:
. see the usage of __all__ (a list)
in the __init__.py for packages .
If __all__ is defined in __init__.py,
and you use "from my_package import *"
then only the modules/variables defined in __all__
will be loaded.

>>> import os
>>> os.getcwd()
'/home/user'
>>> os.chdir("/tmp/")
>>> os.getcwd()
'/tmp'

# Linux:
export PYTHONPATH=/path/to/my/library:$PYTHONPATH
# Windows:
set PYTHONPATH=%PYTHONPATH%;C:\My_python_lib
7.16: news.cyb/dev.py/testing/windmill:

mikeal 2009`intro to windmill:
. Windmill is a Selenium competitor
written entirely in Python & JavaScript
with test-writing support for both.
Windmill`intro:
. Windmill is a web testing tool
designed to let you painlessly automate
and debug your web application.
Originating at the Open Source Applications Foundation
Windmill was built to help QA
keep up with the rapid release cycles
of the Chandler Server Web UI (Cosmo) project.
As the Cosmo client is heavy in
JavaScript and AJAX functionality,
Windmill makes the communication
between the service and the client code
a priority.
Windmill Test Framework:
. Cross-browser test recorder
Record, edit, playback and interact with your tests
from one simple interface.
. Also check out the DOM Explorer, Assertion Explorer
and fully integrated Firebug-Lite.
Interact from a python shell with the
browser and the windmill service .
. install ipython and automatically get
an even more usable shell.
. more encouragement 2011:
"( Selenium 2 and Python
- ok so Windmill is my new favorite:
This looks interesting!:
http://readthedocs.org/docs/selenium-python/en/latest/
Update: Windmill is more fun now .)

exploring resources at diotavelli.net's PyQt Wiki

7.10: web.cyb/dev.pyqt/wiki:
. exploring the wiki at diotavelli.net.
news:
PyQt und PySide book has some example code:
-- the book is written in german:
PyQt und PySide: GUI- und Anwendungsentwicklung mit Python und Qt
Published: 2012 ISBN 978-3-941841-50-5
9.9:
. the .zip doesn't have a lot of example code,
but it's mostly English despite the text being German .
. the localization coverage looked interesting
but it used some strange resource files
that need explaining by the book .

great tutorials collection:

. tutorial for text editor (the code is here).

Test PyQt GUIs with QTest and unittest
by John McGehee on July 31, 2011
"( PyQt is the Python binding of the popular Qt
cross-platform UI and application framework.
For unit testing, PyQt clients are expected to use
the standard Python unittest module,
with just a little help from the PyQt QtTest module.
It is not immediately apparent how to blend these two frameworks
into a unified unit testing strategy.
In this article, I show you how to unit test a PyQt GUI dialog
using only modules included in PyQt and Python. )
Boudewijn Rempt & David Mertz @ ibm's comparison to tkinter.
. see his Charming Python series:
# dom (XML Python)
# concurrency
# Easy Web data collection with mechanize and Beautiful Soup
# ide's .

IPython has Powerful Python shells (terminal and Qt-based).
IPython 0.13: a major release (June 30, 2012)
"( This release, closed 1115 issues Github
and comes with major improvements to the
notebook and parallel computing APIs,
a new cell magic system,
unified interactive and parallel kernels ).
pyqt-based browser:
. installation instructions .
. code base at code.google.com .

other pyqt projects on g'code:
Lector
"( A graphical ocr solution for GNU/Linux
based on Python, Qt4 and tessaract OCR.
Lector can help you to scan your tons of paper
and create text document!
Lector lets you select areas on which you want to
do OCR (Optical Character Recognition).
Then you can run tesseract-ocr
simply clicking a button.
The resulting text can be proofread, formatted and edited
directly in Lector.
. see the OCRopus project,
for which Tesseract is one of the pluggable OCR engines;
OCRopus also provides layout analysis
and statistical language modeling.)
text editor:
"( Marave doesn't just have minimalism and simplicity,
it has that combined with beauty
and a palpable design ethic. Marave has soul.
Inspired by ommwriter and other similar projects,
aims to be a simple, clean text editor
that doesn't distract you from your writing.)
PyQt:creating GUIs with Python’s QT bindings

Boudewijn Rempt`GUI Programming
with Python: QT Edition
. this is a complete book online !
(somewhat obsolete though?).

7.16: news.cyb/dev.pyqt/zetcode book:
http://zetcode.com/tutorials/pyqt4/

7.17: news.cyb/dev.pyqt/wiki pages:
. Comparison_of_programming_languages;
python typing -- strong and safe but implicit
(by contrast Pascal -- explicit yet not completely safe)
. list of wiki's python books:
the people's pyqt book
-- they point to techbase.kde.org
"( to develop KDE applications using Python,
you need both PyQt and PyKDE.
. PyQt provides Python support for the Qt library
which KDE is built on.)
###
pyqt's relation to PyKDE:
"(. Riverbank Computing has a lot of good documentation
about how to use PyQt to create pure Qt applications.
If you are new to KDE / Python development,
then learning how to use PyQt is the best first step.
PyKDE builds on top of PyQt and adds
Python support for KDE's libraries and technologies.
PyKDE is distributed as part of the kdebindings module.
Stable releases can be downloaded from
the normal KDE download page,
although it is usually easier to
install pre-built packages from your
operating system distribution.
You can also obtain PyKDE from
KDE's subversion repository .
Or from KDE's git repository:
git clone git://anongit.kde.org/pykde4 ).

2012-09-21

editing trees

7.22: adde/gui/editing trees:
. how do we sync a tree with the editor's
textual representation of the tree?
as lines are added to the text,
the line numbers change
but the tree nodes never change
without needing to rebuild the text too.
. there are 3 objects at work here:
the tree, the array of strings,
and an intermediate that's like wordcode,
in that it's a string of ptrs to tree nodes
that are in turn printable as words or symbols .
. at each line we have a ptr to the tree
but a line serves several nodes .
9.5:
. the ptr heading each line of text
is pointing to the root of the subtree
that is on that line .
. if we change that line or insert lines below it,
those changes are happening to that subtree
indicated by the root node;
therefore, to reflect any changes to the text,
we need reparse only that subtree ... ?!
actually,
there are 2 cases of tree:
# prefix:
. in the presentation of a folder system,
all the child nodes are below the parent's .
. that is a very simple and easy case,
as was expected above .
# infix:
. in the presentation of math formulae,
and programming code, such as adda,
we have expressions like (a+b),
where if all these expression tree nodes
are on separate lines,
then you see the root in the middle of the page,
not at the top . a further complication is that
the same text line can be representing
2 different subtrees: eg,
line#1: a*
line#2: b + c*d;
. in that example, line#1 and #2
share pieces of subtree#(a*b),
and line#2 represents parts of 2 subtrees,
so if line#2 is edited,
then there are possibly 2 subtrees to reparse .

9.5: the real-time complication:
. the text editing has to be very responsive;
therefore, we can't map each word
to a subwindow corresponding to a subtree;
instead, we have to let the user edit plain text,
and then have some way of mapping
text changes back to tree changes .
. to minimize reparsing,
we have to map character positions to tree nodes,
and then track how character modifications
have effected our text-to-tree map .

9.5: typical conditions simplifying:
. one simplifier provided by typical conditions
is tree size limits:
the expression trees that are complicated,
are usually only a few lines long;
they are separated by sequence operators,
or list delimiters .
. in the case of programming,
the effect of one tree change
can effect the parsing of another;
because, a symbol's meaning can change
either by deleting or creating a declaration
which will have a scope beyond the current tree
extending throughout the enclosing declare block .
. if there's a decl'deletion,
then we have to notice what type was being declared;
because, sometimes the type is determining
how we parsed the expression trees
that were surrounding that symbol;
eg, a declaration tells us whether or not
a symbol can be used as an infix operator,
or whether it was an atom or a function .
. much of syntax is only allowed for
certain types of symbols and not for others;
so, can we find a symbol of the same name
in an enclosing scope, and of the same type,
or a type change that won't matter ?
we may have to reparse the entire enclosing scope .
. if there's a decl'creation,
we must ensure that this scope
doesn't already declare this symbol .
. if there's a decl'modification,
we must ensure that type change doesn't matter,
else we have to reparse the entire enclosing scope .