pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/devel/omake

Module Name:    pkgsrc
Committed By:   wiz
Date:           Fri Dec 17 09:40:14 UTC 2010

Modified Files:
        pkgsrc/devel/omake: Makefile PLIST distinfo
        pkgsrc/devel/omake/patches: patch-aa
Added Files:
        pkgsrc/devel/omake/patches: patch-ac patch-ad patch-ae patch-af
            patch-ag patch-ah patch-ai patch-aj patch-ak patch-al patch-am
            patch-an patch-ao patch-ap patch-aq patch-ar patch-as patch-at
            patch-au patch-av patch-aw patch-ax

Log Message:
Update to and add lots of upstream SVN patches to make
it build again.

This is a major feature enhancement and bugfix release

    * Added keyword and optional function arguments.

      The syntax of a keyword parameter/argument is "identifier = expr".

         Function     Application
         f(a)         f(1)
         f(~a, b)     f(~a = 10, 11)     Required keyword argument
         f(?a, b)     f(~a = 10, 12)     Optional keyword argument
                      f(12)              -- defaults to empty
         f(?a = 1, b) f(~a = 10, 11)     Optional keyword argument with default 
         f(~a = 1, b) f(11)              -- ~a is same as ?a if there is a 
default value
                      f(?a = 10, 11)     -- Arguments can use ?, but it means 
the same thing

      Keyword arguments and normal arguments are processed
      independently. Normal arguments have to appear in the same
      order as in the parameter list, but keyword arguments can go

      This also adds the function notation.

          fun(x, y) =>
             add($x, $y)

          foreach(x => ..., a b c)

      where the "..." essentially means "parse as if the indented
      block below was actually an expression in here"

      Old-style foreach generate a warning.
    * Added "program" syntax. This provides a more standard
    programming language, where strings must be explicit, and
    variables represent applications.

      The outer syntax is normal; the program syntax is an ast to
      ast translation. The translation is turned on with the command
      ".LANGUAGE: program", which is scoped like "export". Here is
      an example:

         #!/usr/bin/env osh
         .LANGUAGE: program

         f(x) =
            return x + 1


      The normal $-style expressions are always allowed, but in
      program-syntax mode, identifiers stand for variables, function
      application is the f(e1, ..., e2) form, and there are the
      standard infix operators. To switch back to the default
      syntax, use .LANGUAGE: make

      Note, shell commands and rules never use program syntax,
      except within function arguments.

      This is not heavily tested.
    * Added support for partial and curried function applications.
    Normal funcation application still require using the correct
    number of arguments (as relaxed by the introduction of optional
    arguments), but apply function can be used to create curried
    and partial applications.

         f(x,y) =
            return $(add $x, $y)

         g = $(apply $f, 2)      # Partial applications must use apply
         println($(g 3))         # 5

         ff(x) =
            gg(y) =
               return $(add $x, $y)

         println($(apply $(ff), 3, 5)) # Prints 8, also need to use apply here

      apply can also take keyword arguments.
    * A high-quality C parser was added to OMake â see lib/parse/C/
    * Added a LaTeX parser and spellchecker - see lib/parse/LaTeX/README.txt
    * New functions added: localtime, gmtime, mktime, normalize-tm,
    utimes, digest-string, url-escaped, find-all, addprefixes
    * New object added: Tm
    * About 10 Bugs fixed
    * [Experimental] Object methods can now export their fields
    back into the parent object. For example,

         Z. =
             x = 1
             f() =
                 x = 2
         echo $(Z.x)
         # Prints "2"

      This works with arbitrary levels of nesting.

To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 pkgsrc/devel/omake/Makefile \
    pkgsrc/devel/omake/PLIST pkgsrc/devel/omake/distinfo
cvs rdiff -u -r1.1.1.1 -r1.2 pkgsrc/devel/omake/patches/patch-aa
cvs rdiff -u -r0 -r1.1 pkgsrc/devel/omake/patches/patch-ac \
    pkgsrc/devel/omake/patches/patch-ad pkgsrc/devel/omake/patches/patch-ae \
    pkgsrc/devel/omake/patches/patch-af pkgsrc/devel/omake/patches/patch-ag \
    pkgsrc/devel/omake/patches/patch-ah pkgsrc/devel/omake/patches/patch-ai \
    pkgsrc/devel/omake/patches/patch-aj pkgsrc/devel/omake/patches/patch-ak \
    pkgsrc/devel/omake/patches/patch-al pkgsrc/devel/omake/patches/patch-am \
    pkgsrc/devel/omake/patches/patch-an pkgsrc/devel/omake/patches/patch-ao \
    pkgsrc/devel/omake/patches/patch-ap pkgsrc/devel/omake/patches/patch-aq \
    pkgsrc/devel/omake/patches/patch-ar pkgsrc/devel/omake/patches/patch-as \
    pkgsrc/devel/omake/patches/patch-at pkgsrc/devel/omake/patches/patch-au \
    pkgsrc/devel/omake/patches/patch-av pkgsrc/devel/omake/patches/patch-aw \

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Home | Main Index | Thread Index | Old Index