[Swift-devel] [Bug 98] New: Allow external scripts to be written inline within swiftscript functions

bugzilla-daemon at mcs.anl.gov bugzilla-daemon at mcs.anl.gov
Sun Sep 30 15:05:10 CDT 2007


http://bugzilla.mcs.anl.gov/swift/show_bug.cgi?id=98

           Summary: Allow external scripts to be written inline within
                    swiftscript functions
           Product: Swift
           Version: unspecified
          Platform: All
        OS/Version: Mac OS
            Status: NEW
          Severity: enhancement
          Priority: P3
         Component: SwiftScript language
        AssignedTo: benc at hawaga.org.uk
        ReportedBy: wilde at mcs.anl.gov


Permit scripting language code to be specified "in line" in a swift function
declaration.

This would be handy in that external-language wrapper code can be written right
in the swift program, to make it easier to see whats being  done, and in fact
to code many simple processing scripts without needing any tc.data entries.

One way to specify this would be to allow a declaration of the form:


script(bash) {
  echo $IN $OUT $THRESH
}

where:

- bash is a name built-in to the supplied tc.data file, possibly with a
default, that can be overridden on a per-site basis. A set of such permissible
scripting options would be defined.

- IN, OUT and THRESH are arguments to the enclosing swift function (or some
similar way of mapping swift arguments - both file and scalar - into the
scripting languages name space.

Also, this mechanism will need a way for the script code to call an app that is
declared in tc.data, so that it can serve as a wrapper.

Further note: these conventions need to be done on a
scripting-language-specific basis.  One could envision such interfaces for: sh,
perl, python, R, MatLab, and a other languages.  It should be possible for new
user groups to readily add suhc adapters.

This was an idea that Yong and I were discussing over the years.  It seems like
at least the sh version would be both feasible and very useful.


-- 
Configure bugmail: http://bugzilla.mcs.anl.gov/swift/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You reported the bug, or are watching the reporter.



More information about the Swift-devel mailing list