From: Ken A. <kan...@bb...> - 2003-10-16 17:02:57
|
Sorry to take 4 months to answer this. I think loading from a URL is a great idea. If you're willing to put your code in a jar i think it will work easily. So if you put the jscheme code in a NioGroupTools.jar something like this should work: (load "elf/classpath.scm") (define (addClasspathUrl u) (.addURL# (Import.getClassLoader) (url u))) (addClasspathUrl "http://groupscheme.sourceforge.net/lib/groupscheme/kernel/NioGroupTools.jar") (load "groupscheme/kernel/NioGroupTools.scm")' Would this work for you? k At 07:01 PM 6/21/2003 -0400, Timothy John Hickey wrote: >On Saturday, June 21, 2003, at 06:48 PM, Ken Anderson wrote: > >>At 05:57 PM 6/21/2003 -0400, Timothy John Hickey wrote: >>>Hi Jscheme afficionados, >>> >>> I've started using the ability to load from a URL and its very nice. >>>One problem is >>>occurs when we load a file F from a URL and that file contains >>>non-URL load statements. >>>The natural interpretation would be to look for these embedded loads >>>on that remote URL >>>(just as happens with relative links in webpages), but currently >>>Jscheme looks for those >>>files locally. It should be pretty easy to get around this problem >>>(keep a stack of URLs >>>and always use the top of the stack for loads). >>> >>>What do you think? Am I missing some unintended consequence? >> >>maybe you've found two (or more) features of JScheme that need to be >>combined in a better way, certainly in a way that hasn't been tried >>before. >> >>The normal (load f) tries to open an input port treating f as first a >>file, then a resource, and then a URL.. >> >>This order was chosen because the .scm file would be in a local file >>before it gets moved into a jar file for a delivered application. >> >>I've never thought about the URL case. JScheme has a dynamic class >>path, and perhaps such a URL should be added to that path. >> >>What are you trying to do? > >I was thinking that an easy way of demonstrating some of the groupware >demos would be to >just provide the code for the demo in which the first few lines import >the necessary groupware >libraries, e.g. >> >>(load >>"http://groupscheme.sourceforge.net/lib/groupscheme/kernel/ NioGroupTools.scm") >>....code that uses this library.... > >The problem is that the NioGroupTools.scm library loads in four local >files and two jar files ... >> >>(environment-import "groupscheme/kernel/SendLine.scm") >>(environment-import "groupscheme/util/PrintDebug.scm") >>(environment-import "groupscheme/util/Swing.scm" "sw:") >>(environment-import "groupscheme/util/Queue.scm" "multi-queue:") >> >>(environment-import "jlib/Swing.scm") >>(environment-import "elf/basic.scm") >> >>(define nioclass java.nio.channels.Selector.class) >>.... >The environment-import is implemented as a load into a separate >namespace followed >by a copy into the current namespace (possibly with prefixes added). > >If the load procedure noticed that these loads were in remote file and >then looked remotely for those >files, there would be no problem. > > >> >> >> >>------------------------------------------------------- >>This SF.Net email is sponsored by: INetU >>Attention Web Developers & Consultants: Become An INetU Hosting >>Partner. >>Refer Dedicated Servers. We Manage Them. You Get 10% Monthly >>Commission! >>INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php >>_______________________________________________ >>Jscheme-devel mailing list >>Jsc...@li... >>https://lists.sourceforge.net/lists/listinfo/jscheme-devel |