Runtime

  • arrange named parameters into proper order (XML-RPC); convert ordered parameters into named ones (FORM POST) (bug 4997)
  • add ERROR type (bug 4998)
  • add BLOB type (bug 4999)
    • consider Erlang notation: << 1, 2, 3 >>
    • operations
      • access: << 1, 2, 3 >> [ 2 ] -> 2
      • concat: << 1, 3 >> .. << 3 >>
      • splice: blob.splice(<< 1, 2, 3 >>, 0, 1, _) -> << 1, 3 >>
  • throw an exception from inside an extension?!? (use case thinkfree extension)
  • concurrent execution of independent page scripts
  • caching of idempotent script function calls
  • binary encoding of XML extensions for faster execution
  • use another body for dekiscript errors: <body target="error" conflict="append">
  • functions to add
    • str.isNum(str)
    • str.isBool(str)
    • str.isUri(str)

Syntax

  • Quick access
    • *doc
      ->
      xml.text(doc)
    • *url
      ->
      web.xml(url) ?? web.text(url)
  • discard statement (to evaluate an expression but not keep its output... do we really need this?)
  • function definitions
  • web expression language (the "on" attribute)
    • on ::= clauses
    • clauses ::= clause ( "or" clauses )?
    • clause ::= condition "then" actions ( "else" actions )?
    • condition ::= event ( "[" test "]" )?
    • event ::= message-event | element-event | mouse-event | key-event
    • message-event ::= message ( "[" test "]" )?
    • test ::= ...
    • element-event ::= "blur" | "change" | "focus"
    • mouse-event ::= "click" | "contextmenu" | "dblclick" | "mousedown" | "mousemove" | "mouseout" | "mouseover" | "mousewheel"
    • key-event ::= ( "keyup" | "keypress" | "keydown" ) ( "[" key-code "]" )?
    • key-code ::= ...
    • actions ::= action ( "after" time ) ( "if" ... )? ( "and" actions )?
    • time ::= ...
    • action ::= message-action | value-action | bind-action | set-action | css-action | layout-action | misc-action | script-action
    • message-action ::= ...
    • value-action ::= "value" "[" ... "]"
    • bind-action ::= "bind" "[" ... "]"
    • set-action ::= "set" "[" ... "]"
    • css-action ::= ( "add" | "remove" ) "[" ... "]"
    • layout-action ::= "effect" "[" ... "]" | "hidden" | "hide" | "show" | "visible" | "toggle" "[" ... "]"
    • misc-action ::= "blur" | "click" "[" ... "]" | "focus" | "clear" | "clearform" | "disable" | "enable" | "reset" | "select" | "submit" | "unselect"
    • script-action ::= "script" "[" ... "]"

Misc

  • need shorthand syntax for template invocation {{ template.foo( .. .) }} is too long
  • need a way to define variables without keeping the xml element around
  • global variables
  • samples
    • example how to create a page with automatically substituted parmateres
    • blog post on how to use JSON in dekiscript
    • create sample how to process XML (e.g. rss reader)
    • TRICK: use __env to pass in local variables
      var username = user.name; var format = 'Hi $username' % __env;
    • wiki.directory("path:" .. page.path .. "/*")
  • definition of standard javascript library for in-page mashups
  • online directory of available extensions
  • allow constants in extensions (e.g. num.e)

New Features with Missing Documentation

  • 1.9
    • dynamic page composition schema and mechanics
  • 8.05.1
    • <foreach>
      work on xml documents too (e.g. <foreach in="xml['bar/foo']">)
    • multiple statements inside a single block
    • functions with <access>internal</access> should not be listed in GET for script manifest
    • foreach on maps, DON'T return key:value!!!
    • $ is now set to 'args'
      • $10 => $[10]
      • $foo => $.foo
    • uri.foo(1, 2, 3) -> uri("foo", [1, 2, 3])
    • add support for SAVE:/EDIT: in attributes (e.g. <a href="http://wiki.developer.mindtouch.com/...eki/DekiScript">)
    • allow substition on save or edit (i.e.{{ save: ... }} or {{ edit: ... }}))
    • __request.args to access request query arguments
    • <any init="var x = web.xml(foobar)" if="#x > 0" foreach="var k in x" where="k['bar']" block="var y = k['bar/foo']">inner</any>
      -->
      <eval:block value="var x = web.xml(foobar)">
          <eval:if test="#x > 0">
              <eval:foreach var="k" in="x" where="k['bar']">
                  <eval:block value="var y = k['bar/foo']">
                      <any class="script" function="syntax.xpp">inner</any>
                  </block>
              </eval:foreach>
          </eval:if>
      </eval:block>
    • Scoping dekiscript to page of vars
  • 8.05.2
    • string.format("$p", { p: v })
    • Yahoo.GeoLocation
      Yahoo.GeoCode
  • Wik.is updates
    • flowplayer
    • twitter
    • linkedin
    • gravatar
    • spoiler
    • skype
  • 8.05.2b
    • json.parse
    • string.substr: allow negative offset & length
    • date.calendar
    • string.ishighsurrogate
    • string.islowsurrogate
    • string.issurrogate
    • num.cast
    • string.cast
  • 8.08
    • uri.* 
      • uri.build: encode segments
      • uri.isvalid
    • date.*
      • date.isoweek
      • date.parseisoweek
    • list.*
      • list.sort: added 'compare' parameter
    • web.*
      • web.toggle: show/hide html content
    • page.*
      • page.parents: returns a list of all parents, from nearest to furthest
    • extensions
      • graphviz: added format parameter accepting "png", "png+map", "svg", and "xdot"
      • implicit environment for extension requests
  • 8.08.1
    • if/else support for single statements without { }
      • requires ; for statements, e.g. if(true) 1; else 2;
    • switch/case statement
    • multi var and nil var declaration support
    • break/continue for foreach
    • break for switch/case
  • 9.02
    • dekiscript
      • native xml syntax (with anonymous closing tags)
        • <ul> foreach(var x in [1, 2, 3]) { <li> x </li>; } </ul>;
        • <strong> x .. 'foo'; ' '; </>;
        • <div style="float: _fckstyle="float: _fckstyle="float: _fckstyle="float: _fckstyle="float: _fckstyle="float: _fckstyle="float: _fckstyle="float: _fckstyle="float: _fckstyle="float: _fckstyle="float: _fckstyle="float: _fckstyle="float: _fckstyle="float: right;" class=($class)> expr; </>;
      • statement expressions
        • var x = (var y = 1; var z = y * 2; z + 3);
          ->
          x == 5
      • uri append operator
        •  url & "path" & { option : value }
          ->
          uri.build(url, path, { option : value })
      • generators: var x, y in collection where x > y, var z = x + y
      • map/list construction
        • [ x, y, z foreach var x, y in collection where x > y, var z = x + y ]
        • { (x) : x + 1 foreach var x in num.series(1, 10) }
      • the is not operator: x is not list
      • the in and not in operators:
        • x in [ 1, 2, 3 ]
        • y not in [ 1, 2, 3 ]
      • <param> elements can now have a "default" attribute, which implies optional="true"; the contents of the default attribute are evaluated when the parameter is not explicitly provided.
      • lists accept negative indices: values[-1]
    • DekiScript service
      • detected @src attributes that start with self: and replace them with the URI of the service location
  • Minneopa
    • site.id (i.e. wiki-id); also present in implicit environment
    • new config keys for native extensions
      • uri.deki: uri for deki service
      • apikey.deki: apikey for accessing privileged features in deki

 

Tag page
You must login to post a comment.