Aao examples by Aaron J. Radke Mon, Apr 9, 2012

Examples using Aao with Twitter's Bootstrap. And here is a much longer subsection for an abstract that also does formatting.

As an introduction, a section without any subsections should not produce a dropdown in the topmenu.

{!Note} some {`code} can be marked up as {*strong} with {~emphasis} or {,subtle}, {-small}, {+big} or as {|term} formatting.
comment:
equations {$E=mc^2} are commented out because are computationally expensive to generate
Other features include {^supperscript} and {_subscript}.
Note some code can be marked up as strong with emphasis or subtle small big or as term formatting.Other features include supperscript and subscript.
{!Note} {!p Primary} {!i Info} {!s Success} {!w Warning} {!e Error} {!d Dark}
Note Primary Info Success Warning Error Dark
{#1} {#p 2} {#i 3} {#s 4} {#w 5} {#e 6} {#d 7}
1 2 3 4 5 6 7
drop: mini
LE: http://lifesend.com
DRX: http://drx.cc
-
aradke: http://aradke.com
resume: http://lifesend.com/resume
Drop: normal
LE: http://lifesend.com
DROP: large
LE: http://lifesend.com
Footnotes{^^footnotes are just notes that should have an automatic numbered label in print media.} and {>tooltips:tooltips have a title and content} and more footnotes{^^footnotes have automatic numbering}.
Footnotes1 and tooltips and more footnotes2.
Bibliography references use the @ symbol. This is similar to {@LE}.
Bibliography references use the @ symbol. This is similar to [1].
tb:icns
icn icn! label
icn:envelope icn!envelope envelope
icn:ok icn!ok ok
icn:search icn!search search
icn:heart icn!heart heart
icn icn! label
envelope
ok
search
heart
Inline figures {fig:../src/main/resources/tinyprofile.png} use a lower case {`fig:}.
Inline figures ../src/main/resources/tinyprofile.png use a lower case fig:.
Central figures user an upercase {`Fig:} are simply placed as is
Fig:../src/main/resources/tinyprofile.png
Central figures user an upercase Fig: are simply placed as is
../src/main/resources/tinyprofile.png
Hard coding a width size to a percentage relative to the page width. This will shrink or expand images. For example, the following scale's up the tiny image to 20% of the page width.

Fig20:../src/main/resources/tinyprofile.png

Text flows above and below the figure for some nice padding. Whitespace is important for cleanliness and organization.
Hard coding a width size to a percentage relative to the page width. This will shrink or expand images. For example, the following scale's up the tiny image to 20% of the page width.
../src/main/resources/tinyprofile.png
Text flows above and below the figure for some nice padding. Whitespace is important for cleanliness and organization.
:h2:header level 2
paragraph content
:h3:header level 3
paragraph content
:h4:header level 4
paragraph content
:h5:header level 5
paragraph content
:h6:header level 6

paragraph content

paragraph content

h4 header level 4

paragraph content

h5 header level 5

paragraph content

h6 header level 6

Multiple paragraphs

A single line is a paragraph
A second single line demonstrating a paragraph

Really long lines (paragraphs) can be separated by a space for clearer visibility. Some people think that simple is the opposite of complex, but there is a complexity of detail required to maintain simplicity.

And again another paragraph.
A single line is a paragraphA second single line demonstrating a paragraphReally long lines (paragraphs) can be separated by a space for clearer visibility. Some people think that simple is the opposite of complex, but there is a complexity of detail required to maintain simplicity.And again another paragraph.

Explicit paragraph

p:
an explicit paragraph
with sentences and lines
p:
another explicit paragraph

an explicit paragraph with sentences and lines

another explicit paragraph

well:
Some things can be stored and offset in a well.
Some things can be stored and offset in a well.
ul:
un-ordered lists
and
ol:
ordered lists
can be nested
lists with {*markup} and more
rel:test.jpg
icon: rel:test.jpg
rel:./test.jpg
  • un-ordered lists
  • and
    1. ordered lists
    2. can be nested
  • lists with markup and more
  • test.jpg
  • icon
  • test.jpg
dl:
one
the first number
two
the second number
three
the trinity count
four
points on a square
one
the first number
two
the second number
three
the trinity count
four
points on a square
Quotations can be added easily as
qt:
I have made this letter longer than usual, only because I have not had the time to make it shorter.
-Blaise Pascal
qt:
In faith there is enough light for those who want to believe and enough shadows to blind those who don't.
-Blaise Pascal
Quotations can be added easily as

I have made this letter longer than usual, only because I have not had the time to make it shorter.

Blaise Pascal

In faith there is enough light for those who want to believe and enough shadows to blind those who don't.

Blaise Pascal

p:
Some {`inline} code.

Some inline code.

code:|
#!/bin/sh
# title: highlight this leading key
// author: highlight this leading key
:section: the first section
/*
title: multi line c comment
*/

"multi- line
string"

"""
scala style
multi line string
"""

['a','b']'; % typical matlab
hexU16 = @(x) sprintf('%04X',x); % typical matlab
int i = 0x7FFh; /* typical c */
cout << "test"; // typical c++
echo "test" # typical bash
"\s".r.replaceAllIn(s,Code) // typical scala

//previous line was empty
//previous previous line was empty

//previous line was empty
//previous previous line was empty

--- typical aao
title: code examples
author: Aaron J. Radke
:section1: top level
:section2: sublevel

;typical assembly
mov 10,AX ; move 10 into the register

C typical fortran
CSQUARE = A^2 + B*B !Pythagoreans equation
#!/bin/sh
# title: highlight this leading key
// author: highlight this leading key
:section: the first section
/*
title: multi line c comment
*/

"multi- line
string"

"""
scala style
multi line string
"""

['a','b']'; % typical matlab
hexU16 = @(x) sprintf('%04X',x); % typical matlab
int i = 0x7FFh; /* typical c */
cout << "test"; // typical c++
echo "test" # typical bash
"\s".r.replaceAllIn(s,Code) // typical scala

//previous line was empty
//previous previous line was empty

//previous line was empty
//previous previous line was empty

--- typical aao
title: code examples
author: Aaron J. Radke
:section1: top level
:section2: sublevel

;typical assembly
mov 10,AX ; move 10 into the register

C typical fortran
CSQUARE = A^2 + B*B !Pythagoreans equation
code:|
diff syntax highlighting
+diff inserted content
diff regular content
-diff removed content

"a string quoted
-diff
"

"something" (=+inline diff insert+=) regular (=-inline diff deleted-=)
Try (=+4 or 5 "complex" Diff edits +=) regular (=-This one contains "broken elements-=)
// diff in a (=+comment+=)
diff in a "(=+string+=)"
diff around a (=+"string"+=)
diff across a ending (=+"str+=)ing"
diff across a starting "str(=+ing"+=)
diff (=-
spanned content-=)// (=-with modified with comment
// -=)
diff syntax highlighting
+diff inserted content
diff regular content
-diff removed content

"a string quoted
-diff
"

"something" (=+inline diff insert+=) regular (=-inline diff deleted-=)
Try (=+4 or 5 "complex" Diff edits +=) regular (=-This one contains "broken elements-=)
// diff in a (=+comment+=)
diff in a "(=+string+=)"
diff around a (=+"string"+=)
diff across a ending (=+"str+=)ing"
diff across a starting "str(=+ing"+=)
diff (=-
spanned content-=)// (=-with modified with comment
// -=)
diff:
Aaron and Shelah
Aaron, Shelah and Sebastian
Aaron and Shelah, Shelah and Sebastian
code:|
case Nstr(str) :: _ if str startsWith "#" => "\n<!--" + str + "-->"
case Nstr(str) :: _ if str startsWith "--" => "\n<!--" + str + "-->"
code:|
case Nstr(str) :: _ if str startsWith "#" => "\n<!--" + str + "-->"
case Nstr(str) :: _ if str startsWith "--" => "\n<!--" + str + "-->"
code:|
import cc.drx.aao
case class Name(first,last)
override def toString = first+" "+last

code:|
int main(char* args)
print("%f",5 / 5);
case Nstr(str) :: _  if str startsWith "#"  => "\n<!--" + str + "-->"
case Nstr(str) :: _ if str startsWith "--" => "\n<!--" + str + "-->"
case Nstr(str) :: _  if str startsWith "#"  => "\n<!--" + str + "-->"
case Nstr(str) :: _ if str startsWith "--" => "\n<!--" + str + "-->"
import cc.drx.aao
case class Name(first,last){
override def toString = first+" "+last
}
int main(char* args){
print("%f",5 / 5);
}

Code file fragments by bootstrap

convey:|
"simple.txt" template . ; "complex.txt" template . ; ""
code:simple.txt
code:complex.txt
simple file contents
complex contents includes tags {that would cause convey to break}
along with tags that <strong>would cause html to break</strong>
and still preserve things like \n new line escapes

Code file fragments by aao

code:
include|simple.txt
simple file contents
code:
include|complex.txt
complex contents includes tags {that would cause convey to break}
along with tags that <strong>would cause html to break</strong>
and still preserve things like \n new line escapes
diff:
include|simple.txt
include|complex.txt
sicomple file contentx contents includes tags {that would cause convey to break}
along with tags that <strong>would cause html to break</strong>
and still preserve things like \n new line escape
s

All of the column sizes are based on a percent of the full width of the page.

column 1: 20%here is a bunch of text that flows here is a bunch of text that flows here is a bunch of text that flows here is a bunch of text that flows here is a bunch of text that flows here is a bunch of text that flows
column 2: 80%here is a bunch of text that flows here is a bunch of text that flows here is a bunch of text that flows here is a bunch of text that flows here is a bunch of text that flows here is a bunch of text that flows here is a bunch of text that flows here is a bunch of text that flows here is a bunch of text that flows here is a bunch of text that flows here is a bunch of text that flows here is a bunch of text that flows here is a bunch of text that flows here is a bunch of text that flows here is a bunch of text that flows here is a bunch of text that flows
full column: 100%here is a bunch of text that flows here is a bunch of text that flows here is a bunch of text that flows here is a bunch of text that flows here is a bunch of text that flows here is a bunch of text that flows
C: 33%
printf("Hello World");
Cpp:33%
cout << "Hello World";
Aao: 33%
"Hello World" >> out

left fifty percent 50%

This gets a little half width header

left twenty five : 25%A quarter section that is within an already divided 50% section.
right twenty five : 25%These sections will be powerfully used to pack information a tighter neater form.

right fifty percent 50%

Just normal text that prints across the page.

Simple

tb:simple
digit english spanish
1 one uno
2 two dos
3 three tres
digit english spanish
1 one uno
2 two dos
3 three tres

Spans

tb:span
digit english spanish
*Odds
1 one uno
3 three tres
*Evens
2 two dos
4 four quatro
digit english spanish
Odds
1 one uno
3 three tres
Evens
2 two dos
4 four quatro

Complex

tb:complex
*Adjective *Noun *Verb phrase *Example
table elements are separated with 2 or more spaces
each element is parsed as an aao document LE: http://lifesend.com
each element is parsed as an aao document ! E = m c^2
each element is parsed as an aao document @2011-09-27
each element is parsed as an aao document ft/s
Adjective Noun Verb phrase Example
table elements are separated with 2 or more spaces
each element is parsed as an aao document LE
each element is parsed as an aao document E = m c^2
each element is parsed as an aao document [2]
each element is parsed as an aao document ft/s
tb:convey
lang 1 2 3
*en one two three
*sp uno dos tres
math =1 =1+1 =9/3
npaths =n.path =n.children =n.root
parents =n parent 1 =n parent 2 =n parent 1 child 1 as string
rel c 1 2 =(parent 1 child _ as int) -> col ; (n col 2) + (n col 3)
lang 1 2 3
en one two three
sp uno dos tres
math 1 2 3.0
npaths /tb:convey/aaobunch/=n.path List() Node(/, & 1kids)
parents Node(/tb:convey/aaobunch, & 4kids) Node(/tb:convey, & 7kids) parents
rel c 1 2 3

Excel

Excel files can be imported directly

tb:../src/test/resources/test.xls
Or they can be composed with convey. Here all columns are loaded into a vector called col and each child is a convey evaluation that should result in a vector representing that column. The desired column can be indexed by an integer or a A-Z as all vectors in convey.

TODO:?? broke excel tables reformatting

tb:../src/test/resources/test.xls
col#A
col#3 @ .upper

Filter

Tables with more than 10 rows automatically have a dynamic filter. All elements are sortable by clicking on the header column.
tb:filter
Name Sex Age
Bob Male 70
Tom Male 60
Pete Male 23
Mark Male 45
Matt Male 40
Julia Female 30
Frank Male 50
Alice Female 80
Shelah Female 31
Aaron Male 30
Sebastian Male 1
Anthony Male 23
Karyn Female 3
Name Sex Age
Bob Male 70
Tom Male 60
Pete Male 23
Mark Male 45
Matt Male 40
Julia Female 30
Frank Male 50
Alice Female 80
Shelah Female 31
Aaron Male 30
Sebastian Male 1
Anthony Male 23
Karyn Female 3
grid:
link:../src/main/resources/tinyprofile.png
fig10:../src/main/resources/tinyprofile.png
link:#
fig10:../src/main/resources/tinyprofile.png
link:#
fig10:../src/main/resources/tinyprofile.png
link:#
fig10:../src/main/resources/tinyprofile.png
link:#
fig20:../src/main/resources/tinyprofile.png
  • ../src/main/resources/tinyprofile.png
  • ../src/main/resources/tinyprofile.png
  • ../src/main/resources/tinyprofile.png
  • ../src/main/resources/tinyprofile.png
  • ../src/main/resources/tinyprofile.png
form:Signup
First name
txt:firstname
Last name
txt:lastname
Email
txt:email
This will be the key identifier..
Snack preference 1
sel:snack1
Cheese
Transistors
Snack preference 3
sel:snack3
Cheese
Transistors
Interests
opt:interests
Computers
Art
Engineering
Writing
!Politics
Snack preference 2
rad:snack2
Pizza
Parabolic dish
!Wood
If you are a robot you have to at least pretend you like human food.
State
typeahead:state
Ohio
California
Colorado
Hawai
Maine
This will be the key identifier..
If you are a robot you have to at least pretend you like human food.
 

TODO issue with bootexample???

printf("Hello World");
cout << "Hello World";
"Hello World" >> out
printf("Hello World");
cout << "Hello World";
"Hello World" >> out
modal:1
one
modal:2
one
modal:3
one
1 2 3
modal:Example Modal
Some modal content
can even get complex
code:
E = m*c^2
Example Modal
alert:warn
{*Warning} this is just a warning.
× Warning this is just a warning.
alert:stop
{*Error} this is an error.
× Error this is an error.
slide:
Face 1: Aaron
fig20:../src/main/resources/tinyprofile.png
Face 2: Aaron again
fig20:../src/main/resources/tinyprofile.png
Text: Just plain text algorithms
fig20:../src/main/resources/tinyprofile.png
Here is some {*markup} text
Here is some more {*markup} text
Again Here is some more {*markup} text
toc: and Toc: are used to generate table of contents. The first inserts one using the current section (parent) and the second creates a section header.
:h1:header level 1
toc:
:h2:header level 2
:h3:header level 3
:h2

toc:

h3 header level 3

ul:
cite:Alle03gtd
cite:Radk06diss
  • Allen, David. Getting Things Done: The Art of Stress-Free Productivity, Penguin Books, January 2003 [Online] http://davidco.com/.
  • Radke, Aaron J.. “On Disturbance Estimation and Its Applications in Health Monitoring”, Ph.D. Dissertation, Cleveland State University December 2006.
bib:
aao
T:Aao examples
A:Aaron J. Radke
W:test.html
icon
T:Icon of aaron
A:Aaron J. Radke
D:2011-10-26
F:../src/main/resources/tinyprofile.png
W:http://about.me/radke
LE
J:Life's End
A:Aaron J. Radke
D:2011
W:http://lifesend.com
worship
T:Science and Worship
A:Aaron J. Radke
D:2010-08-21
scala
B:Programming in Scala
A:Martin Ordersky
D:2009-08-21
W:http://scala-lang.org
  1. Radke, Aaron J.. \“Aao examples\” [Online] <test.html>.
  2. Radke, Aaron J.. \“Icon of aaron\”, Wed, Oct 26, 2011 tinyprofile.png [Online] <http://about.me/radke>.
  3. Radke, Aaron J.. Life's End, 2011 [Online] <http://lifesend.com>.
  4. Radke, Aaron J.. \“Science and Worship\”, Sat, Aug 21, 2010.
  5. Ordersky, Martin. Programming in Scala, Fri, Aug 21, 2009 [Online] <http://scala-lang.org>.
Convey can be called with the = prefix or convey: parent node

Explicit

=1+2
3
=now . niceDate
Mon, Apr 9, 2012
convey:|
1+2
3+3
6

Implicit local routes

@2011-09-27
[4]
~@2011-09-27
195 days ago
due:2011-09-27
Tue, Sep 27, 2011 (195 days ago)

Working with Aao nodes

convey:|
"*aaron" . node . transform
aaron
Route based transformation with aao is useful the other way around too when using convey.
convey:|
LE <- @"_: http://lifesend.com/_"
drop <- (-> a ; _ -> dropname ; a @ .node node ("drop:" + dropname) . transform)
aaron,shelah,sebastian @ .LE drop Family
Frink can be called with the == prefix or frink: parent node
today's date is {==now[]}
today's date is AD 2012-04-09 AM 08:35:53.668 (Mon) Eastern Daylight Time
Einstein would be {==now[] - #1879-03-14# -> ["months","days",0]} old
Einstein would be 1596 months, 27 days old

Direct lookup

Using convey, to look up data, shows places include home and work.

Nasty symbols in lookup

Here are all the nasty symbols in on place: html havoc: < > convey havoc: -> { ( ) } -> aao havoc: \{ { } \} regex havoc: \1 $ $0 $1

Local grammar

Combined with local aao grammer, we live in Brecksville and work in Akron.
Dynamic javascript properties are available through coffee: (coffeescript) or js: (javascript)
chk:show-key
Show key
sel:radkes
Aaron 3.14
Shelah 7
Sebastian 0.5
???
coffee:|
key = (dom) -> $(dom).children().filter(":selected").text()
$('#sel-radkes').change((e) -> alert("Selected Radke: "+key(this)+" is "+this.value))
$('#chk-show-key').change((e) -> alert("show key: " + this.checked))
coffee:coffee

Actions & Elements:

js:|
$('#btn-jQuery').click(function(event){alert("jQuery btn event click")});
btn:jQuery

Simple Example

coffee:|
$('#btn-coffee').click((e) -> alert("coffee btn event click"));
btn:coffee
coffee:coffee

Complex Actions

CoffeScript makes a nice combination with aao since both make use of indentation.

Embedded coffescript code can also be used to define functions

Note Remember to use a trailing pipe | after this element.

coffee:|
alerts = ["First alert","Second alert","Third alert"]
clickCount = 0
coffeeAlert = () ->
clickCount += 1
if clickCount <= 3
msg = alerts[clickCount - 1]
else
msg = "Alert clicked " + clickCount + " times"
clickCount += 1
alert "#{msg}: a simple alert defined within coffeescript"
$('#btn-Coffee-alert').click((e) -> coffeeAlert())
btn:Coffee alert
coffee:coffee

Text fields and alerts

coffee:|
scale16 = (d,fs) ->
Math.round(d/fs*32767)
unscale16 = (h,fs) ->
h*fs/32767
decimalToHexString = (number,padding) ->
if number < 0
number = 0xFFFFFFFF + number + 1
hex = number.toString(16).toUpperCase()
while(hex.length < padding)
hex = "0" + hex
hex.substr(hex.length-padding,hex.length)
convertHexToInt = () ->
hex = $('#num-hex16').val().toUpperCase()
int = parseInt(hex,16)
if int > 32767
int = -(0xFFFF - int)-1
if Math.abs(int) > 32767
$('#alert-scale').removeClass("info")
$('#alert-scale').addClass("error")
else
$('#alert-scale').removeClass("error")
$('#alert-scale').addClass("info")
$('#res-int16').html(int.toFixed(0))
$('#num-hex16').keyup((e) -> convertHexToInt())
convertIntToHex = () ->
#int = parseInt( $('#num-int16').val(), 10)
int = Math.round( eval($('#num-int16').val()))
if Math.abs(int) > 32767
$('#alert-scale').removeClass("info")
$('#alert-scale').addClass("error")
else
$('#alert-scale').removeClass("error")
$('#alert-scale').addClass("info")
hex = decimalToHexString(int,4)
$('#res-hex16').html(hex)
$('#num-int16').keyup((e) -> convertIntToHex())
tb:dec-hex
Decimal Hex
res:int16 num:hex16
num:int16 res:hex16
alert:scale
coffee:coffee
Decimal Hex
int16
hex16
×
Raphael coffescript code can be included directly and uses the value R as the paper.

Circle click

raphael:circle2|
R.setSize(200,200)
c = R.circle(100, 100, 80)
c.attr({fill: "green", stroke: "#020", "stroke-width": 20, "stroke-opacity": 0.5});
c.mouseup () -> c.attr("fill","green")
c.mousedown () -> c.attr("fill","red")
raphael:circle2R.setSize(200,200) c = R.circle(100, 100, 80) c.attr({fill: "green", stroke: "#020", "stroke-width": 20, "stroke-opacity": 0.5}); c.mouseup () -> c.attr("fill","green") c.mousedown () -> c.attr("fill","red")

Circle toggle

raphael:circle1|
R.setSize(200,200)
c = R.circle(100, 100, 60)
c.attr({"fill": "#F3F"})
toggle = on
c.click( () ->
if toggle
c.animate({"fill": "#3FF"},2000)
toggle = off
else
c.animate({"fill": "#F3F"},2000)
toggle = on
)
raphael:circle1R.setSize(200,200) c = R.circle(100, 100, 60) c.attr({"fill": "#F3F"}) toggle = on c.click( () -> if toggle c.animate({"fill": "#3FF"},2000) toggle = off else c.animate({"fill": "#F3F"},2000) toggle = on )

Tetris

raphael:tetris|
R.setSize(250,200)
tetronimo = R.path "M 200 150 l 0 -50 l -50 0 l 0 -50 l -50 0 l 0 50 l -50 0 l 0 50 z"
angle = 0
tetronimo.attr
fill: "green"
stroke: '#3b4449'
"stroke-width": 10
"stroke-linejoin": 'round'
rotation: -90
tetronimo.click () ->
angle += 90
tetronimo.stop().animate(
transform: "r" + angle
,1000)
tetronimo.mouseover () -> tetronimo.attr("fill","green")
tetronimo.mouseout () -> tetronimo.attr("fill","red")
raphael:tetrisR.setSize(250,200) tetronimo = R.path "M 200 150 l 0 -50 l -50 0 l 0 -50 l -50 0 l 0 50 l -50 0 l 0 50 z" angle = 0 tetronimo.attr fill: "green" stroke: '#3b4449' "stroke-width": 10 "stroke-linejoin": 'round' rotation: -90 tetronimo.click () -> angle += 90 tetronimo.stop().animate( transform: "r" + angle ,1000) tetronimo.mouseover () -> tetronimo.attr("fill","green") tetronimo.mouseout () -> tetronimo.attr("fill","red")

Indent style node

dl:
One
These are things like unicycle's and pogo sticks.
Two
These are things like bicycles or stilts
One
These are things like unicycle's and pogo sticks.
Two
These are things like bicycles or stilts

Block style node

dl:
-----
One
These are things like unicycle's and pogo sticks.
Two
These are things like bicycles or stilts
One
These are things like unicycle's and pogo sticks.
Two
These are things like bicycles or stilts

Comment style node

--- dl:
One
These are things like unicycle's and pogo sticks.
Two
These are things like bicycles or stilts
One
These are things like unicycle's and pogo sticks.
Two
These are things like bicycles or stilts
The language explosion has not only happened but the universe continues to expand. New languages enter the scene rapidly and often interact within the same systems. Aao embraces this polyglot universe by providing routes as a language abstraction to encapsulate new ideas and features from other languages.Aao offers a clean code/data syntax and a unique route based dispatch to recursively transform the code/data to a form described by the routes. The common use case is a tool to rapidly generate Domain Specific Languages or Symbiotic languages. Some examples include: From a language perspective, the unique ideas from Aao are routes and the concise syntax of the embedded concatenating functional computation engine: Convey.Aao can be used from both a language developer and a language user level. A language developer can quickly create a route specification and a user can make use of it without knowing aao or routes.

An exploration in data transformation through "route" based programming language

An exploration in expressiveness, clarity, simplicity, elegance

data * format => result

Data Processor Format Result
Fixed format
.java javac java-lang java bytecode
.scala scalac scala-lang java bytecode
.html firefox w3c-html5 gui
.coffe cofeescript coffescript js
Variable data and results
ruby defined ruby .erb ruby defined
Variable format
.html firefox .css gui
Variable data and format and results
.xml xlst xslt xslt defined
.aao aao aao route aao route defined
Aao is a "route" based language that can change based on supplying a route definition.Aao is a unique "route" based language that can change based on supplying are route definition.Aao is a structured tree based format similar to yaml. When a route file is applied it transforms the meaning of the Aao document.

Like, xslt the uses fit into templeting, domain specific languages, code generation, stylesheets, transformations.

There are numerous concepts that fit together.

*bold
.*\*(\Y+)
<strong>{m#1}</strong>{b}
<strong>bold</strong>
bold
Something {*completely} {~new}
.*\*(\Y+)
<strong>{m#1}</strong>{b}
.*(\Y+)
{m#1}{b}
.*\~(\Y+)
<em>{m#1}</em>{b}
.*/aaobunch
{b}
Something <strong>completely</strong> <em>new</em>
Something completely new
{!Note} some {`code} can be marked up as {*strong} with {~emphasis} or {,subtle}, {-small}, {+big} or as {|term} formatting.
.*\!\s*(\Y+)
<span class="label">{m#1}</span>{b}
.*/aaobunch
{b}
.*\,(\Y+)
<span class="subtle">{m#1}</span>{b}
.*\~(\Y+)
<em>{m#1}</em>{b}
.*\`(\Y+)
<code>{m#1 for html}</code>{b}
.*\-(\Y+)
<span class="smallfont">{m#1}</span>{b}
.*(\Y+)
{m#1}{b}
.*\+(\Y+)
<big>{m#1}</big>{b}
.*\|(\Y+)
<dfn>{m#1}</dfn>{b}
.*\*(\Y+)
<strong>{m#1}</strong>{b}
<span class="label">Note</span> some <code>code</code> can be marked up as <strong>strong</strong> with <em>emphasis</em> or <span class="subtle">subtle</span><span class="subtle"> </span><span class="smallfont">small</span><span class="subtle"> </span><big>big</big> or as <dfn>term</dfn> formatting.
Note some code can be marked up as strong with emphasis or subtle small big or as term formatting.
regex proposed?? type
\Y+ :name not separator at least once
\Y* ?name not separator or none
\Y+? :?name not separator non greedy
.* *name any or none
/ / separator
.*? *?name any or none non greedy
.+ +name any at least once
(a|b) (a|b):name or
\d+ \d:name digit
\d* \d*:name digit
\w+ \w:name character
Route:
interpolate: String with Convey
Routes:
findAndTransform: Convey (includes body and node)
transformKids: Nodes, Convey
transformNode: Node, Convey
code:
n :: rest => n.findAndTransform + rest.transformKids
Node:
Convey:
compact functional representation, using method chaining to provide a fluent interface.

Boolean

true or false

true,yes,on,T
Vector(true, true, true, true)
false,no,off,F
Vector(false, false, false, false)

operators

tb:
A B A&B A|B A^B
=F =F =F&F =F|F =F^F
=F =T =F&T =F|T =F^T
=T =F =T&F =T|F =T^F
=T =T =T&T =T|T =T^T
A B A&B A|B A^B
false false false false false
false true false true true
true false false true true
true true true true false

Numbers

integer

1
1

float

1.0
1.0

negative

-1
-1
-1.0
-1.0

Strings

id form string of a-z, A-Z and underscore

id
id

punctuation form any string of non id characters

<=
<=

string literal form

"string literal"
string literal

Functions an even number of literals

post fix operator

+ 2
(+ 2)
+ 2 + 4
(+ 2 + 4)

binary operator contains an underscore as the second parameter

+ _
(+ _)

Evaluations an odd number of literals

binary operators

1 plus 2
1.plus(2)
1   +_   2
3
+_  -> plus
(+ _)
1 plus 2
3

post fix operator application

1   .  +2
3
saving
+2   -> addTwo
(+ 2)
addTwo  <-   +2
(+ 2)
dot form
1 . addTwo
3
at form
1 @ addTwo
1.@((+ 2))
un defining
_ -> addTwo
addTwo

Grouping

Characters,and punctuation:sequences of characters, numbers, and punctuation are grouped together

abcd+&+efgh+3.1415plus34^^ijkl
abcd.+&+(efgh).+(3.1415).+(34).^^(ijkl)

Parenthesis Precedence is always left to right unless grouped in a parenthesis

a (+ 2 + _) 3
Vector(aaron: http://lifesend.com/aaron, shelah: http://lifesend.com/shelah, sebastian: http://lifesend.com/sebastian).+(2).+(3)

Implicit Parenthesis when more than 1 literals are grouped together without spaces

this allows for concise readable function literals, however dangling punctuation can be a source of error

a  +2+_  3
Vector(aaron: http://lifesend.com/aaron, shelah: http://lifesend.com/shelah, sebastian: http://lifesend.com/sebastian).+(2).+(3)

New lines

new lines are grouped like the ; operator
coney
programs
return
the
last_value
last_value

newline groups can be saved in parenthesis

(1
2)+(3
4)
6

Vector Ordered collections

Construction

1,a,3,yes
Vector(1, Vector(aaron: http://lifesend.com/aaron, shelah: http://lifesend.com/shelah, sebastian: http://lifesend.com/sebastian), 3, true)

Map

1,2,3,4,5 @ *2
Vector(2, 4, 6, 8, 10)
ab,ra,cad,ab,ra @ .size
Vector(2, 2, 3, 2, 2)

Join

ab,ra,cad,ab,ra > ""
abracadabra

Sorting

string sorting

sebastian,shelah,aaron ssort .toString
Vector(aaron, sebastian, shelah)

numeric sorting

sebastian,shelah,aaron nsort .size
Vector(aaron, shelah, sebastian)

general sorting (via a boolean)

sebastian,shelah,aaron sort (-> ab ; ab#1.size < ab#2.size)
Vector(aaron, shelah, sebastian)

Map

Construction

sun:happy,cloud:sad,rain:silly,snow:excited
Map(sun -> happy, cloud -> sad, rain -> silly, snow -> excited)
one,two,three mkmap 1,2,3
Map(1 -> one, 2 -> two, 3 -> three)
one,two,three,four mkmap .size
Map(3 -> two, 5 -> three, 4 -> four)
"a470n","561ah","sebast14n","se14stian",sebastian mkmap match"\d+"#0or"nonum" -> leetNum
Map(470 -> a470n, 561 -> 561ah, 14 -> se14stian, nonum -> sebastian)

Retriving

leetNum # "470" or none
a470n
leetNum get "470" or none
a470n

Information

Creating

Reading

Globing

conveyexample"src/main/resources" glob ".aao$"

src rglob ".aao$"
WrappedArray()
1+2
3
2^2
4

Generic java styled attribute

aaron.toString
aaron

Generic java styled single parameter method

aaron take 2
aa

Generic method listings

aaron . methods take 5 > "\n\n"
public boolean scala.collection.immutable.WrappedString.equals(java.lang.Object)

public java.lang.String scala.collection.immutable.WrappedString.toString()

public int scala.collection.immutable.WrappedString.hashCode()

public java.lang.Object scala.collection.immutable.WrappedString.min(scala.math.Ordering)

public java.lang.Object scala.collection.immutable.WrappedString.max(scala.math.Ordering)

Latex Equations

box  <-  pre"{"+"}"
= <- (.box + "=" + _.box)
^ <- (.box + "^" + _.box)
+ <- (.box + "+" + _.box)
# <- (.box + "_" + _.box)
* <- +" "_

E = (m * c^2)

μ = Σ#(x # i=0)^∞

\ <- (-> x ; "\" + _ + "{" + x + "}")

x\dot = A*x + B*u

mat <- (-> m ; "\" + _#1 + (m@((@ .box > " &, "))>"\\") + "\" + _#2)

A = (0,1,0 , 0,0,1 , 0,0,0) mat [] ^ 2

Libraries, push pop, scoped stores, scoped variables

indentation
indentation is there for clarity use of for clarity and expresivity, data centric
spaces
many language guidlines suggest whitespace and indenting guidlines so you might as well use them
data centric
abstraction form data
functional collections
most loop operations can be simplified into a single functional word
clarity
??
polyglot
easy mechanism to mix languages
no build system
removes dependencies of compilers and expertise
extensible markup language
simplified markup language, routes
data flow
??
dsl
code generation, clarity
syntax
simple yet versatile highlighting
code is documentation
therefore documentation is code, markup documentation should have good code integration
odd eval
evaluations are an odd number of symbols
even def
function literals and definitions are an even number of symbols
yaml
indentation, data centric
scala
methods are applied dot-less, dsl's on top uniform syntax/language tools
ioke
expressiveness with clarity
coffeescript
identation, clarity
scala
functional collections
ruby
clarity, no build system
oz
data flow
sinatra
route patterns for clear customization
python
indentation has meaning
mobl
polyglot mixing dsl for compiling to target
lisp
code is data, new underlying constructs easily created
frink
physical units as datatypes, date parsing, space multiplication, brackets for function argumentsa string literal does not require quotes
mathematica
functional operations and expressive operators as filters
Rewrite Engine is another name for the form of url resolving into a specific form

Rails

Rails uses a default :name parameter that can be specified with a constraint clause.readable
match "/services/:id/add_to_package/:package_id"
match "/packages/:id/remove_service/:service_id", :id => /\d+/, :service_id => /\d+/
match "books/*section/:title"

Sinatra

Sinatra is similar to rails but includes splats and regex.
get %r{/hello/([\w]+)} do |c|
"Hello, #{c}!"
end
get '/download/*.*' do |path, ext|
[path, ext] # => ["path/to/file", "xml"]
end

Play 1.0

Play 1.0 used name default and <regex>name for regex.
/clients/{id}/accounts/{accountId}
/clients/{<[0-9]+>id}

Play 2.0

Play 2.0 adopted the rails routing form but with a uniq regex param.
GET   /clients/:id          controllers.Clients.show(id: Long) 
GET /files/*name controllers.Application.download(name)
GET /clients/$id<[0-9]+> controllers.Clients.show(id: Long)

Django/Drupal

Django uses regex with named regex groups in the form of (?P<name>regex).
urlpatterns = patterns('',
(r'^articles/2003/$', 'news.views.special_case_2003'),
(r'^articles/(?P<year>\d{4})/$', 'news.views.year_archive'),
(r'^articles/(?P<year>\d{4})/(?P<month>\d{2})/$', 'news.views.month_archive'),
(r'^articles/(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d{2})/$', 'news.views.article_detail'),
)

Unfiltered

Unfiltered uses a wide range of scala extractor patterns.
case GET(Path("/record/1")) => ...
case GET(Path(Seg("record" :: id :: Nil))) => ...

Symphony

Symphony uses a config form similar to play1.0. but maintains simplicity by packing all attributes into the requirements.
blog_show:
pattern: /blog/{slug}
defaults: { _controller: AcmeBlogBundle:Blog:show }
blog:
pattern: /blog/{page}
defaults: { _controller: AcmeBlogBundle:Blog:index, page: 1 }
requirements:
page: \d+
homepage:
pattern: /{culture}
defaults: { _controller: AcmeDemoBundle:Main:homepage, culture: en }
requirements:
culture: en|fr
article_show:
pattern: /articles/{culture}/{year}/{title}.{_format}
defaults: { _controller: AcmeDemoBundle:Article:show, _format: html }
requirements:
culture: en|fr
_format: html|rss
year: \d+

Furl

Furl uses a <name:regex> formlocalized
department/<department:\w+>
# maps any controller name/id/action to any controller/action:
pattern: <controller:\w+>/<id:\d+>/<action:\w+>

Conclusion

need

  1. literal regex
  2. conditional logic

have not found

  1. type level routing, i.e. integers, floats, strings
AsciiDoc
spaces have meaning and === headers provide hiearchy
BBCode
??
Creole
??
Crossmark
marks
deplate
??
Epytext
wrapped for inline markup
EtText
??
Haml
clear minimal whitespace relevant indented markup, beautiful, dry,indented
JsonML
??
MakeDoc
??
Markdown
Single symbol readable form ex. * for bold
Org-mode
??
POD
??
restructuredText
spaces have meaning and headers provide
Ruby Document format
??
Setext
іtalic uses ~subheading marks
SiSU
multi output
DocBook
mutli export
SPIP
??
Struxt
simple inline version of non indented
Texy!
??
Textile
??
txt2tags
??
UDO
Many output formats
Wikitext
human readable
Simple Outline XML
outlines to reduce messy markup
JSON
??
OGDL
??
Simple Declarative Language
human readable and clear
YAML
beautiful, simple, indent delimited
Protocol Buffers
data oriented
lisp
data and code are mixed
Curl
programming language homoiconic, but also reads JSON; every object serializes)
ioke
??
  • Allen, David. Getting Things Done: The Art of Stress-Free Productivity, Penguin Books, January 2003 [Online] http://davidco.com/.
  • Radke, Aaron J.. “On Disturbance Estimation and Its Applications in Health Monitoring”, Ph.D. Dissertation, Cleveland State University December 2006.
  1. Radke, Aaron J.. \“Aao examples\” [Online] <test.html>.
  2. Radke, Aaron J.. \“Icon of aaron\”, Wed, Oct 26, 2011 tinyprofile.png [Online] <http://about.me/radke>.
  3. Radke, Aaron J.. Life's End, 2011 [Online] <http://lifesend.com>.
  4. Radke, Aaron J.. \“Science and Worship\”, Sat, Aug 21, 2010.
  5. Ordersky, Martin. Programming in Scala, Fri, Aug 21, 2009 [Online] <http://scala-lang.org>.