Mike: at present scoop is using some older tech that needs to be replaced. I had a quick look, but might be better if you re-engineer it.
1. invoking flx. The host flx process can be invoke by: include "std/felix/flx/flx"; var result : int = Flx::runflx args; where "args" is a list of strings. The head argument is arg0 and is just for diagnostics and compatbility with ordinary shell calls, so you can set it to "[flx]" or something. This uses the pkgconfig db in the install point. With this method there are NO shell calls. However the whole of "flx" will be compiled into scoop (so expect the compile time to get just a tad slower :) One downside: when flx is invoked this way, there's no "command line string" to put in your log, so you just have to make one from the argument list. Major upside: it will work on Windows. And for testing the --expect switch can be used to actually test things. Another upside: at present I do not have Felix installed. I deliberately deleted it and just run off build/release. The current scoop DOES NOT WORK in this situation because it uses a shell call to the installed flx. I need scoop to work, because I need ncurses to write a useful interactive configuration program. This will eventually contain "search for installed llbraries" subtool to allow users to create flx_pkgcong *.fpc files so Felix can use their externally installed libs. In turn this will remove the need for scoop to search for these libraries. I expect part of this tool will be to create a libsearch.fpc file which contains the paths to search, removing the need for hard coded search paths. This process will go one more step eventually allowing people to execute programs right off the Internet. This is one of THE MAJOR ADVANTAGES of Javascript. In a web page you can just source JQuery and use it. One line package loader. Fantastic. The modern web couldn't exist without this facility. 2. Copying files. include "std/felix/flx/flx_cp"; CopyFiles::copyfiles(dname, regexp, tpat, live,verbose); There's currently no error return (needs fixing). dname: the root directory for searching regex: a Perl (actually Google) regular expression Note: must match exactly the whole filename, starting from the root dname. tpat: a string containing ${0} ${1} etc denoting the full pathname of the copy target. The $ codes are replaced by the corresponding submatches of the regexp. live: a bool, if false the copy won't be done, it will just check. unfortunately an error is just reported, no flag returned. verbose: a bool, if set, reports to stdio, each file copied. 3. Invoking scoop Scoop SHOULD BE like flx: the code should all be in the library, except for a wrapper in src/tools. This means scoop can be called anywhere in Felix programs as a subroutine. This will enable an interesting feature down the track: exec "package/tool"; Using "flx" we can "exec" anything right now. I.e. Felix programs can run Felix SOURCE CODE directly. However, this only works if the sources are self contained, meaning they only use the standard library and perhaps some local includes. Tools which require packages won't work. So if we want to build say a tool which needs "ncurses" or "console" (ncurses on Unix, but works on Windows console as well), this execution will actually install the required packages automatically. -- john skaller skal...@users.sourceforge.net http://felix-lang.org ------------------------------------------------------------------------------ Get 100% visibility into Java/.NET code with AppDynamics Lite It's a free troubleshooting tool designed for production Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://p.sf.net/sfu/appdyn_d2d_ap2 _______________________________________________ Felix-language mailing list Felix-language@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/felix-language