I'm changing the fdoc notations:

        [entry] --> @glossary(entry)
        {code} -> @{code}

The primary reason is to better support MathJax. Latex uses constructions like

        \begin{array}[c] x & y \\ a & b \end{array}

and these won't format correctly with the fdoc process doing the previous
replacements. I used {code} heavily so I will have to write a batch search
and replace program to fix the bulk of these uses.

Mathjax is using \( inline maths \) and \[ display maths \] by default for
maths. I can change these but might stick with them.

There are two uses for math stuff in Felix. One is just in the documentation.
I want to write an article about distributive categories, and it will look best
with math notation.

The second is in Felix code itself. At present if \Symbol is a TeX, LaTeX or
AMSTeX operator symbol, it is probably also an identifier in Felix, 
and will be typeset by the web server using MathJax. The grammar
fixes the kind of operator: most are infix relations with the same precedence
as < > etc, or binary operator with the same precedence and left associative.

Felix current uses \in (set membership) and \cup and \cap (set union and
intersection) but the others aren't used.

I would like to get some more "math like" stuff into Felix. The basic idea is 
that
\( \) and \[ \] will introduce DSSLs with changes syntax. In particular TeX 
likes

        x^{y+1}_{k}

for superscripts and subscripts. Felix already uses ^ for exponentiation, 
however
we have { } meaning some kind of closure. In math mode this will change.
Be nice to have \{ (?x,?y) | x \in int, y \in int \} as a set comprehension.
(Note the ? in ?x is as in a pattern match).

One thought: Felix has this nasty problem with integral subranges: for loops
currently use inclusive ranges (but strings use Python style exclusive tails .. 
grrr).
The right way is probably:

        for i \in \{ ?x | 0 <= x < n \} do .. done

which uses an ordered set comprehension (i.e. one with an iterator).
There's still some pain sorting out sets and ordered sets, as well as the 
various forms.

An unordered set is just a construction supporting a membership operator.
The union, intersection, difference, universal and empty sets are isomorphic
to the logic operator and, or, true and false distributed over membership,
that is they're implemented by closures:

        x \in (A \cup B) 

is implemented by

        x \in A or x \in B

An example of some use: a regular expression is a set of strings.
Typically an infinite set so there is no issue of iterating over it.

--
john skaller
skal...@users.sourceforge.net
http://felix-lang.org




------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
Felix-language mailing list
Felix-language@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to