From: Ken A. <kan...@bb...> - 2004-09-20 15:57:52
|
At 09:23 PM 9/18/2004 +0200, Pixel wrote: >Ken Anderson <kan...@bb...> writes: > >> I think we tried to write some JScheme scripts for your Scriptometer page >> http://merd.sourceforge.net/pixel/language-study/scripting-language/ >> a while back. >> >> Here are JScheme versions of the scripts: >> http://openmap.bbn.com/~kanderso/jscheme/scriptometer/ >> >> Can you add them to your website? > >hum, well some comments first: > >********** >> This file contains JScheme examples of Scriptometer scripts. I have >> not found a satisfactory way of getting shebang (#!) to work on >> windows under cygwin. So, this code assumes a bin/run command that >> takes a jscheme script and arguments (see also src/run.scm"): > >hum, i can't accept this, otherwise every language can be "shebang" >aware! > >when it is included in the default jscheme install, i will accept it! I've worked out how to do #!, but it does require a script to be called. I'll make it part of jscheme. >********** >how does one run hello.scm which contains the following? > >(display "Hello World\n") I would do something like this: java -jar lib/jscheme.jar hello.scm >********** > (print (if (= (out (run (cmd false))) 1) "false failed" "done")) > >can you make it more alike the other versions. eg in python: > > if os.system("false"): > sys.stderr.write("false failed\n") > os.system("echo done") Yes. I'll do something like: (if (system "false") (System.out.println "false failed") (system "echo" "done")) >********** >for "remove #-comments from a file (modifying the file, i.e. in place)" > >one must replace line "foo#bar" with line "foo" >(eg in sed: sed -i -e "s/#.*//" $1) OK. >********** >i don't understand the "compile .c files ..." entry. >i'd say something is broken? > > (let* ((dir (java.io.File. ".")) > (s->o (s->o dir dir ".c" ".o")) > (update? (needsUpdate? s->o))) > ...) > >or this really working? is "needsUpdate?" a builtin ? please >correct/explain me :) s->o and needsUpdate? is provided by (load "using/run.scm") s->o returns a procedure that takes a source file and produces the current . I can include their code if you think thats fairer. >********** >the grep entry is not allowed to use the grep command OK. >********** > >that's it, OK, i'll let you know when i've got a new version. k |