I'm using emacs, but it has it's drawbacks. When editing this blog I tend to accidentally hit ctr-w. If there is only one open tab in firefox, bam!, firefox quits and I cannot find the text in the history. I Looked around for a fix, looked at firemacs, but decided to wait for a new upcoming plugin that will let you use emacs directly instead, e.g. EmbeddedEditor . Meanwhile I will make sure to have one extra tab open or just paste in the text
Oh well here are some Loopy cranky stuff: Consider,
(for X in (li L) (for Y in .X (sum Y)))Can you see two possible interpretations of sum?
Here is one:
(for X in (li L) (A) (for Y in .X (B) (A sum Y)))E.g. yield the sum of all Y in the list of list. And of cause this will yield the sum of the elements of the last list in the list of list L,
(for X in (li L) (A) (for Y in .X (B) (B sum Y)))(we could have skiped B here) Permutations could be expressed as
(for X in (li L) (A) (for Y in .X (B) (coll ((A X) B coll Y)))This is a complex construct but to dechiffer it we could have used the notation,
(X B coll Y) == (update in B (coll.X Y))E.g, coll.X is multiple collectors parametrized by X and define in X defining scope, A. Each of coll.X is updated in scope B by the value Y.
Lets put in a mental overdrive, lets talk like spook, and walk the talk.
Consider walking in a tree, Personally I'm very found of doing that by recursion, these two models fits so nicely together. When walking and you are at function G, the stack trace could be represented by for example "FHFFHHGGGHG".Do you see where I'm heading with this observation?
(define atom-12 X -> [atom-12 (FromStart Here sum 1) (FromLatestFunction Here :default -1 sum 1)])permutations can also be used by using (Matcher Var) eg, parametrize by Var defined in the scope defined by the Matcher. See, using abstractions makes us trekkers in a larger universe then we set out to explore in the beginning. You can combine any of the current knowledge about how to do matching on sequences and use that as a Matcher, you can use perl regexps or whatever. The simple un optimized implementation is to just use scopes in the stack as objects that you can duck-type in these constructs, define a mechanism to label scopes and then just use pattern matchers and some simplifying notation for the most obvious and common cases.
FromStart = ^* FromLatestFunction = F[^F]*
A matched objects has a start, that start is what you would like to use to define the needed scope and associated variables. Another possibility of matcher definitions is to start at the current scope and move backwards. One should also consider cases with multiple matches of the same pattern and some way to handle this like doing stuff in multiple channels meaning that secondary collectors and accumulators get a distributed just like in matrix algebra
A*(a + b + c) -> A*a + A*b + A*c
Calling Earth / Good Bye / Over and Out