You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
(4) |
May
(10) |
Jun
(6) |
Jul
(1) |
Aug
(10) |
Sep
(20) |
Oct
(5) |
Nov
(2) |
Dec
(4) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(25) |
Feb
(6) |
Mar
(59) |
Apr
(9) |
May
(3) |
Jun
(13) |
Jul
(6) |
Aug
(16) |
Sep
(14) |
Oct
(12) |
Nov
(4) |
Dec
(10) |
2004 |
Jan
(16) |
Feb
(12) |
Mar
(53) |
Apr
(16) |
May
(43) |
Jun
(40) |
Jul
(48) |
Aug
(20) |
Sep
(23) |
Oct
(27) |
Nov
(33) |
Dec
(8) |
2005 |
Jan
(2) |
Feb
(20) |
Mar
(7) |
Apr
(9) |
May
(2) |
Jun
(6) |
Jul
(5) |
Aug
|
Sep
|
Oct
(3) |
Nov
(3) |
Dec
(6) |
2006 |
Jan
(6) |
Feb
(6) |
Mar
(1) |
Apr
(4) |
May
|
Jun
(1) |
Jul
|
Aug
(2) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
2007 |
Jan
(1) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
(1) |
Sep
(8) |
Oct
|
Nov
|
Dec
|
2008 |
Jan
(5) |
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
(2) |
Jul
(2) |
Aug
|
Sep
(1) |
Oct
(2) |
Nov
|
Dec
(2) |
2009 |
Jan
(2) |
Feb
|
Mar
(1) |
Apr
|
May
(4) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Ken A. <kan...@bb...> - 2004-10-12 20:19:52
|
Tim and i where at the NEPLS conference Friday and we talked about http://www.cs.auc.dk/~normark/schemedoc/ which a scheme version of javadoc. There are actually at least 5 scheme systems to do this. Lets develop a simple version, perhaps called jsdoc, for JScheme. k |
From: Timothy J. H. <ti...@cs...> - 2004-10-11 14:33:02
|
Hi Noel, On Oct 11, 2004, at 8:55 AM, Noel Welsh wrote: > Hi SISCers, > > You may be interested to know that SISC is in use in at > Birmingham University's Introduction to AI course: > > http://www.cs.bham.ac.uk/~mmk/Teaching/AI/index.html > > Unfortunately the code isn't online but I am happy to send > tarballs to anyone who requests them. > > SISC has been a pleasant environment for me to glue > together Java code, but for beginners it could use some > additions. Grief seems to come from the Scheme to Java > interface, particularly: > > - having to import classes and define generic methods > - type conversion > > I imagine both these problems could be overcome with > something built on top of s2j. It might not always do the > Right Thing, but that wouldn't always matter. Depending on your needs you might be interested in using JScheme (jscheme.sourceforge.net) for Java intensive applications. JScheme has a very simple and powerful interface to Java (the javadot notation) which makes it easy to access all of the Java libraries without predeclaring methods, fields, etc. For example, here is some code I wrote recently for restricting access to a servlet ... http://popper.cs-i.brandeis.edu:8088/cs2a04/students/tjhickey/servlets/ compound2.servletV for a lecture in an Intro to Computers Class for non-CS majors http://popper.cs-i.brandeis.edu:8080/cs2a04/index.html symbols containing a "." or a "$" refer to Java members. A "." at the beginning indicates an instance method a "." at the end indicates a constructor > (servlet (pw) > ; compound conditions can be created using > ; the logical connectives ... > ; (or A B C ...) - this is true iff any of A,B,C... are > ; (and A B C ...) - this is true iff all of A,B,C,.. are > ; (not A) - this is true if condition A is false > ; > ; e.g. lets have a page that can be visited from Brandeis > ; with no pw, but away from Brandeis only by pw ... > > (if (or > (.startsWith (.getRemoteAddr request) "129.64") > (equal? "jb007" pw) > (.before (java.util.Date. "13 October 2004 11:00 am") > (java.util.Date.)) > ) ; close or > > #{ ok, you made it ... }# > #{ sorry you can't visit this page }# > > ) > ) ) SISC offers a fully compiant R5RS Scheme which has a general interface to object oriented languages (in this case instantiated to Java, but the same approach would work for C#). JScheme is not fully compliant (and does not have full call/cc), but if you want to use Scheme to interact closely with Java, JScheme has some benefits.... We are looking into adding a javadot interface to SISC for those cases where you want to quickly access some Java code from inside SISC. We might even have SISC code call JScheme to create some Java objects.... ---Tim--- > > Cheers, > Noel > > ===== > Email: noelwelsh <at> yahoo <dot> com > AIM: noelhwelsh > > > > _______________________________ > Do you Yahoo!? > Declare Yourself - Register online to vote today! > http://vote.yahoo.com > > > ------------------------------------------------------- > This SF.net email is sponsored by: IT Product Guide on > ITManagersJournal > Use IT products in your business? Tell us what you think of them. Give > us > Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out > more > http://productguide.itmanagersjournal.com/guidepromo.tmpl > _______________________________________________ > Sisc-users mailing list > Sis...@li... > https://lists.sourceforge.net/lists/listinfo/sisc-users > |
From: Mark M. <mg...@ch...> - 2004-10-09 02:46:53
|
> A more appropriate way might be to use a macro: > > (define-macro (dynamicdefine name procedure) > `(set! ,(string->symbol name) ,procedure)) > > But this requires understanding quasiquote. This macro expands like > this: > >> (macroexpand '(dynamicdefine "bar" (lambda (x) (+ x 3)))) > (set! bar (lambda (x) (+ x 3))) Thanks! This strategy indeed does the job. > Why do you need such a factory? In the application I'm working on, jscheme is used to wrap many useful functions in order to create what is essentially a scripting language on top of the existing java code... however there are some sets of data which are loaded (and named) at run time that I'd like to be available in this scripting language. One of the keys to this scripting language is to hide the actual scheme syntax from the users, so when someone loads one of these data files the factory method will be called the generate a new function within scheme keyed to the name of that file. So yeah, that's the summary of how it will be used. :-) Thanks again! -mark |
From: Ken A. <kan...@bb...> - 2004-10-08 21:54:55
|
http://shivers.com/~shivers/scheme04/tmp/scheme04/index.html |
From: Ken A. <kan...@bb...> - 2004-10-08 21:51:51
|
I'm not exactly sure what you want, but there are several ways to do this. The first is to use a procedure that uses some JScheme internals: (define (dynamicdefine name procedure) (jscheme.JS.setGlobalValue name procedure)) Example: > (dynamicdefine "bar" (lambda (x) (+ x 3))) #null > (describe bar) Closure named ?? (lambda (x) (+ x '3)) #t A more appropriate way might be to use a macro: (define-macro (dynamicdefine name procedure) `(set! ,(string->symbol name) ,procedure)) But this requires understanding quasiquote. This macro expands like this: > (macroexpand '(dynamicdefine "bar" (lambda (x) (+ x 3)))) (set! bar (lambda (x) (+ x 3))) Why do you need such a factory? At 02:03 PM 10/8/2004 -0400, Mark McGettrick wrote: >Hey >I'm new to JScheme however I've quickly discovered my need to do a relatively complex thing... I'd like to be able to pass a string into a function which will then act as a factory to create a new function who's name is equal to the value of the input string. In other words: > >foo is set equal to "bar" >dynamicdefine (my function) with foo as a parameter should return a new function (whatever that may be) assigned to the name "bar" >now there would be a new function called: bar > >I guess this all comes down to: is there a way to cause the value of a string to be used as the name of a new symbol? >Perhaps I'm not even asking the question correctly... >Help? > >Thanks, >-mark > > > >------------------------------------------------------- >This SF.net email is sponsored by: IT Product Guide on ITManagersJournal >Use IT products in your business? Tell us what you think of them. Give us >Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more >http://productguide.itmanagersjournal.com/guidepromo.tmpl >_______________________________________________ >Jscheme-user mailing list >Jsc...@li... >https://lists.sourceforge.net/lists/listinfo/jscheme-user |
From: Mark M. <mg...@ch...> - 2004-10-08 19:07:41
|
Hey I'm new to JScheme however I've quickly discovered my need to do a relatively complex thing... I'd like to be able to pass a string into a function which will then act as a factory to create a new function who's name is equal to the value of the input string. In other words: foo is set equal to "bar" dynamicdefine (my function) with foo as a parameter should return a new function (whatever that may be) assigned to the name "bar" now there would be a new function called: bar I guess this all comes down to: is there a way to cause the value of a string to be used as the name of a new symbol? Perhaps I'm not even asking the question correctly... Help? Thanks, -mark |
From: Ken A. <kan...@bb...> - 2004-10-06 21:34:47
|
Originally, a Java application that used JScheme used one static evaluation environment. We've changed that so that jscheme.JScheme creates a new "evaluation context". This allows a servlet container to have multiple servlets that use JScheme and they are indistinguishable from a "Pure Java application". The jscheme.JS class provides static methods that operate on a JScheme singleton. This is convenient if most of what you do is invoke Java through the Scheme side of JScheme, even if Java code invokes the Scheme side. Here are 2 situations i'm thinking about: S1: You can describe a function foo with (describe foo), and it generates an approximation to the original code by inverting the compiled version of foo. I've been thinking of using this code to make debugging more informative. This means that JScheme .java code must call into Scheme code, and this will require loading the "elf/basic.scm" package, for example. Should this be done through a separate jscheme.JScheme? I'm currently using jscheme.JS. S2: We should open up the REPL so that a user could provide a (read) (eval) and (print). Which JScheme should it use? I presume the one in JS. S3: http://schematics.sourceforge.net/schemeunit-schemeql.ps got me thinking. I have a way of writing JUnit http://www.junit.org/index.htm tests in JScheme. This requires a single Java class, which currently uses JS, and takes a thunk that performs the test. I think we need to extend this so that the class takes a thunk and a specific JScheme. I think we also need to allow a JScheme constructor to take a JScheme as an argument. k |
From: Geoffrey K. <ge...@kn...> - 2004-10-06 17:31:38
|
Mik, I think I would choose your method if I were in your shoes. In my case, I *was* writing a lot of code by hand, sometimes in front of a live audience of non-engineers. Geoffrey -- Geoffrey S. Knauth | http://knauth.org/gsk On Oct 6, 2004, at 10:03, Michael Thome wrote: > I guess I might prefer Geoffrey's if I were writing lots of code by > hand - my use, however, generates lots of xml from a much higher-level > structure, and I was having to do things like (eval > `(geoffs-form...)). bleah! |
From: Michael T. <mt...@bb...> - 2004-10-06 15:44:50
|
Just to be clear, I invented my method because: 1. there is no need to define a function for each tag/attr - it is all data. 2. it factors the formatting from the xml - e.g. the difference between rdf and n3 syntaxes is strictly on the formatting side. 3. there is less that is implied by structure - although Geoffrey's technique results in easier to read structure, the tag vs attr differentiation is not explicit. I suppose this is just a matter of a slightly higher-level representation. I guess I might prefer Geoffrey's if I were writing lots of code by hand - my use, however, generates lots of xml from a much higher-level structure, and I was having to do things like (eval `(geoffs-form...)). bleah! cheers, -mik Ken Anderson wrote: >Mike Thome came up with a way of generating indented HTML. >The basic idea is rather than going form s-expressions to XML >directly, you go from s-expression -> XML equivalent s-expression and >then write a xml pretty printer that outputs the equvalent xml text >from the s-expression. > >Our s-expression XML notatation represents XML as >`(,tag . ,body) > >Where tag is either a symbol or `(,symbol . ,attributes) >where attributes is a list of either a symbol or `(,attribute ,value). >And body is a sequence of XML. > >The changes to the code i sent out the other day are simply: > >(define (xtag tag) > (lambda (as . bs) > (let ((as (if (pair? (car as)) as > (list as)))) > (if (pair? as) (cons (cons tag as) bs) > (cons tag bs))))) > >(define (xatt name) (lambda (x) (list name x))) > >So there are 2 more ways to generate XML. > >W1: Use Geoffrey's technique as before. OK, this isn't new, just a >mod. > >(owl:DatatypeProperty > (rdf:ID name) > (rdfs:comment (rdf:datatype "&xsd:#string") > documentation) > (rdfs:domain (rdf:resource class)) > (rdfs:range (rdf:resource "&xsd;#string"))) > >W2: Use quasiquote to construct the xml s-expression: > >`((owl:DatatypeProperty (rdf:ID ,name)) > ((rdfs:comment (rdf:datatype "&xsd:#string")) > ,documentation) > ((rdfs:domain (rdf:resource ,class))) > ((rdfs:range (rdf:resource "&xsd;#string")))) > > > >------------------------------------------------------- >This SF.net email is sponsored by: IT Product Guide on ITManagersJournal >Use IT products in your business? Tell us what you think of them. Give us >Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more >http://productguide.itmanagersjournal.com/guidepromo.tmpl >_______________________________________________ >Jscheme-user mailing list >Jsc...@li... >https://lists.sourceforge.net/lists/listinfo/jscheme-user > > |
From: Ken A. <kan...@bb...> - 2004-10-05 21:26:43
|
Mike Thome came up with a way of generating indented HTML. The basic idea is rather than going form s-expressions to XML directly, you go from s-expression -> XML equivalent s-expression and then write a xml pretty printer that outputs the equvalent xml text from the s-expression. Our s-expression XML notatation represents XML as `(,tag . ,body) Where tag is either a symbol or `(,symbol . ,attributes) where attributes is a list of either a symbol or `(,attribute ,value). And body is a sequence of XML. The changes to the code i sent out the other day are simply: (define (xtag tag) (lambda (as . bs) (let ((as (if (pair? (car as)) as (list as)))) (if (pair? as) (cons (cons tag as) bs) (cons tag bs))))) (define (xatt name) (lambda (x) (list name x))) So there are 2 more ways to generate XML. W1: Use Geoffrey's technique as before. OK, this isn't new, just a mod. (owl:DatatypeProperty (rdf:ID name) (rdfs:comment (rdf:datatype "&xsd:#string") documentation) (rdfs:domain (rdf:resource class)) (rdfs:range (rdf:resource "&xsd;#string"))) W2: Use quasiquote to construct the xml s-expression: `((owl:DatatypeProperty (rdf:ID ,name)) ((rdfs:comment (rdf:datatype "&xsd:#string")) ,documentation) ((rdfs:domain (rdf:resource ,class))) ((rdfs:range (rdf:resource "&xsd;#string")))) |
From: Ken A. <kan...@bb...> - 2004-10-01 22:06:25
|
There are at least 3 ways to generate XML in JScheme. Way 1 - use quasistring: I'm going to use an example of generating OWL. (define (datatypeProperty name doc class type) {<owl:DatatypeProperty <rdf:ID>="[name]"> [doc] <rdfs:domain rdf:resource="[class]"> <rdfs:range rdf:resource="[(: xsd type)]"> </owl:DatatypeProperty>}) The advantage is you can start with an example of the xml you want and replace with varible parts with [...]. The disadvantage is your still writing XML mixed with Scheme. Way 2 - Use a macro like the <> macro in elf/html-gen.scm (which works for html, not xml): (<> (owl:DatatypeProperty (rdf:ID ,name)) (<> (rdfs:domain (rdf:resource ,class)) (<> (rdfs:range rdf:resource ,(: xsd type))))) The advantage is you just use s-expressions, using ,name to extract the value of the name variable from Scheme. The disadvantage is you have to type <> all the time and understand what "," does. Way 3 - Geoffrey showed me this approach for his html generation: (owl:DatatypeProperty (rdf:ID name) doc (rdfs:domain (rdf:resource class)) (rdfs:range (rdf:resource (: xsd type)))) Basically you define a procedure with arguments (attributes . contents) for each tag, and (value) for each attribute. The advantage is you're completely in Scheme, and evaluating the code will error if you've made a typo like saying rdf:range. Static typing in JScheme - who knew! The disadvantage is you need to write all the functions Or, just write a macro to generate them: (define (xtag tag) (let ((start {<[tag] }) (end {</[tag]>\n})) (lambda (as . bs) (if (null? bs) {[start][as]/>\n} {[start][as]>[bs][end]})))) (define (xatt name) (lambda (x) {[name]="[x]"})) ;;; xml attributes - wrap this around more than one attribute. (define xas string-append) (define-macro (defxtags . tags) `(begin ,@(map (lambda (tag) `(define ,tag (xtag ,(.toString tag)))) tags))) (define-macro (defxatts . tags) `(begin ,@(map (lambda (tag) `(define ,tag (xatt ,(.toString tag)))) tags))) (defxtags owl:Class owl:DatatypeProperty owl:ObjectProperty rdfs:comment rdfs:domain rdfs:range rdfs:subClassOf ) (defxatts rdf:datatype rdf:ID rdf:resource ) |
From: Ken A. <kan...@bb...> - 2004-09-29 14:06:40
|
At 08:54 AM 9/29/2004 -0400, Michael Thome wrote: >I've never used scheme enough to know if these are stupid questions, but: They're not. >1. why does "define" only act in the dynamic context where "set!" works will merely prefer the dynamic context? I would have expected define to always apply to the global context... >> (let ((x 1)) (define blab (lambda () (set! x (+ x 1))))) >(lambda ?? ()...) >> (blab) >(blab ) > ==================================== >SchemeException: ERROR: undefined variable "blab" >> 5.2.2 Internal definitions Definitions may occur at the beginning of a <body> (that is, the body of a lambda, let, let*, letrec. These definitions are local to be body. >2. why can't you use define wherever you want? e.g.: >> (let () (print "who") (define (me) 1)) >SchemeException: Jscheme requires all embedded defines to appear first in procedure bodies >You must move (define (me) 1) up Because the defines at the top of the body are collected and turned into a letrec. I once wrote a (def) macro that let you put defines anywhere. It grouped defines into nested letrec's. While a real Schemer might find this strange, it acts more like java and tends to keep things less nested. I'll see if i can come up with it again. >3. is there a destructuring-bind hiding in there somewhere? No. But i have used a simple macro: (define-macro (dbind var pattern . body) ;; pattern must be valid lambda argument list. `(apply (lambda ,pattern ,@body) ,var)) (dbind '(1 2 3 4 5) (a b . c) (+ a b)) -> 3. For the notam project, look at src/scm/matcher.scm for a simple matcher here's an example: (case-match e (`((xsd:group . ,x))) ; ignore (`((xsd:element (name ,name) (type ,type) . ,notes) (xsd:annotation (xsd:documentation ,doc))) (set! properties (cons (makeProperty name type doc notes) properties))) ...) Keep the questions coming! |
From: Ken A. <kan...@bb...> - 2004-09-24 17:39:06
|
It turned out if you loaded code from the REPL and then called into Java that called back out to Scheme, scheme would be evaluated in a different environment so i wouldn't see the loaded code. I've now fixed it so that the REPL and JS.js use the same evaluator. This evaluator is also pushed on the evaluator stack. This lets JScheme have the same behavior it had before the new Evaluator class. k |
From: Ken A. <kan...@bb...> - 2004-09-23 22:39:59
|
In http://tim.oreilly.com/opensource/paradigmshift_0504.html This struck me as relavent to JScheme. A summary would be that software is becoming a commodity which affects profits, players and other things. "Glue code" is not a commodity and is where dynamic languages shine. Dynamic languages support the process (evolution) of software. We are both inside and outside the internet. We are outside when we search for something on Google, Amazon, or Ebay. We are inside when someone askes for something we've provided to these sites. It is the process of those sites that keep them alive. Dynamic languages help keep the process of software alive. Tim's course could be an example of how a user (not developer) communtity could keep such a process alive. k " Perl has been referred to as "the duct tape of the Internet", and like duct tape, dynamic languages like Perl are important to web sites like Yahoo! and Amazon for the same reason that duct tape is important not just to heating system repairmen but to anyone who wants to hold together a rapidly changing installation. Go to any lecture or stage play, and you'll see microphone cords and other wiring held down by duct tape. We're used to thinking of software as an artifact rather than a process. And to be sure, even in the new paradigm, there are software artifacts, programs and commodity components that must be engineered to exacting specifications because they will be used again and again. But it is in the area of software that is not commoditized, the "glue" that ties together components, the scripts for managing data and machines, and all the areas that need frequent change or rapid prototyping, that dynamic languages shine. Sites like Google, Amazon, or eBay -- especially those reflecting the dynamic of user participation -- are not just products, they are processes. I like to tell people the story of the Mechanical Turk, a 1770 hoax that pretended to be a mechanical chess playing machine. The secret, of course, was that a man was hidden inside. The Turk actually played a small role in the history of computing. When Charles Babbage played against the Turk in 1820 (and lost), he saw through the hoax, but was moved to wonder whether a true computing machine would be possible. Now, in an ironic circle, applications once more have people hidden inside them. Take a copy of Microsoft Word and a compatible computer, and it will still run ten years from now. But without the constant crawls to keep the search engine fresh, the constant product updates at an Amazon or eBay, the administrators who keep it all running, the editors and designers who integrate vendor- and user-supplied content into the interface, and in the case of some sites, even the warehouse staff who deliver the products, the Internet-era application no longer performs its function. " |
From: Ken A. <kan...@bb...> - 2004-09-23 21:35:51
|
Mike Thome (a substantial Common Lisp hacker until he was asked to write in Java) has just started using JScheme to help us do some semantic web stuff. One comment he made is basically "one good thing that Java did was Javadoc". He also mentioned that while the JScheme builtins and modules are documented other cool things like map*, sort, ... are not. We've heard calls for documentation before too. I've tried to put hints in the package.html in each directory but i don't know if anyone has ever looked there. So maybe we should come schemedoc heres a LAML version: http://www.cs.auc.dk/~normark/schemedoc/ I'd the simplest thing that would be useful to a new user. The first step might be to cat all the scheme source code into an .html page (with some reformatting) so the desperate user can search for something that might help. I'd prefer to keep the special notation an ceremony to a minimum. The minimum would be comment block or quasistring at the top of the file to give an overview. and for each define something like (define (f x) ;; f is this really cool function of int x. ...) The comment could be a string or quasistring too so it would be available with apropos and describe in a running JScheme. This is what CL did, but it also makes the system bigger, so it was optional. But it ment you could generate documentation for your application pretty easily. SLIB has picked another documentation style. At a minimum there should be some documentation of the scheme in jscheme.jar. k |
From: Ken A. <kan...@bb...> - 2004-09-22 20:29:11
|
There is a google billboard that encodes a puzzle in a URL: {first 10-digit prime found in consecutive digits of e}.com While you can now solve this puzzle by googling, you learn more by actually solving it. Here i use a spigot algorithm to compute digits of e one at a time: http://openmap.bbn.com/~kanderso/jscheme/google.scm I've been able to confirm 17000 digits in about 3 hours of cpu time. |
From: Ken A. <kan...@bb...> - 2004-09-22 18:27:48
|
Great! What parts of slib are you using? At 02:10 PM 9/22/2004 -0400, Cyrus Neah wrote: >thanks a lot..that did it > >Ken Anderson wrote: >> >>OK, slib/jscheme.init is not in 6.1. Try downloading the latest version from here: >> >><http://jscheme.sourceforge.net/jscheme/doc/userman.html#downloadjar>http://jscheme.sourceforge.net/jscheme/doc/userman.html#downloadjar >> >>Also you should join the jscheme mailling list if you haven't already. >> >>k >>At 12:37 PM 9/22/2004 -0400, Cyrus Neah wrote: >> >>> >>>i invoked it like this: >>> >>>java -classpath "lib/jscheme.jar;lib/slib3a1.zip" jscheme.REPL slib/jscheme.init >>> >>>and this is what i get: >>> >>>** WARNING: (load) can't open "slib/jscheme.init" >>>Jscheme 6.1.0 3/7/2003 <http://jscheme.sourceforge.net>http://jscheme.sourceforge.net >>> >>> >>>...Jscheme loads but can't find slib/jscheme.init >>>(jscheme.init does not exists in the slib3a1.zip file ) >>> >>>Ken Anderson wrote: >>> >>>> >>>>What i'd do is see if you can get slib working inside jscheme first. >>>>You don't need the template.scm file. just load slib/jscheme.init. >>>> >>>>k >>>>At 01:18 AM 9/22/2004 -0400, Cyrus Neah wrote: >>>> >>>> >>>>> >>>>>Thanks for the reply, >>>>> >>>>>I invoke jscheme from my java app this way: >>>>> >>>>>JS.load(new java.io.FileReader("myfile.scm")); >>>>> >>>>>How do I get slib to work when I invoke jscheme from a java class. Also do I have to create >>>>>jscheme.init from the template.scm in <http://swiss.csail.mit.edu/ftpdir/scm/slib3a1.zip>slib3a1.zip? I can not find in the <http://swiss.csail.mit.edu/ftpdir/scm/slib3a1.zip>slib3a1.zip file. >>>>> >>>>>I am using jschem6.1 from 9jschem_6_1.zip). >>>>> >>>>>thanks >>>>> >>>>> >>>>> >>>>>Ken Anderson wrote: >>>>> >>>>> >>>>>> >>>>>>At 08:15 PM 9/18/2004 -0400, Cyrus Neah wrote: >>>>>> >>>>>> >>>>>> >>>>>>> >>>>>>>Hi >>>>>>>I wonder if you could help me. I have been trying to get familiar with jscheme. I can't get SLIB to work. I can't find the jscheme.init and I am having problems customizing the template.scm to work with jscheme. Any suggestions? >>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>>This works for me on windows: >>>>>> >>>>>>java -classpath "lib/jscheme.jar;lib/slib3a1.zip" jscheme.REPL slib/jscheme.init >>>>>> >>>>>>How are you invoking jscheme? >>>>>> >>>>>> >>>>>> >>>>>> >>>>>>> >>>>>>>Also I get : >>>>>>>SchemeException:[[ERROR: undefined variable "use-module"""]] >>>>>>>when I use "use-module". I don't get any errors when I use (environment-import FILENAME) >>>>>>>but documentation says (environment-import FILENAME) is deprecated. >>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>>I don't know why this would happen. Make sure you're using the most recent Jscheme. >>>>>> >>>>>> >>>>>> >>>>>> >>>>>>> >>>>>>>Any pointers would be appreciated. Thanks for your time >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>> >>>> >>>> >>>> >>>> >> >> >> >> |
From: Pixel <pi...@ma...> - 2004-09-21 09:44:04
|
Ken Anderson <kan...@bb...> writes: > >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. yes, i'd prefer this waiting for new version... :) |
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 |
From: Pixel <pi...@ma...> - 2004-09-18 19:23:28
|
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! ********** how does one run hello.scm which contains the following? (display "Hello World\n") ********** (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") ********** 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) ********** 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 :) ********** the grep entry is not allowed to use the grep command ********** that's it, cu -- Pascal Rigaux programming languages addict http://merd.net/pixel/language-study/ |
From: Ken A. <kan...@bb...> - 2004-09-16 18:39:16
|
Yes, i think that's a better approach. I first saw it in a groovy script the other day. The documentation says that env can take multiple arguments, but it doesn't seem to be able to when used with #! At 01:22 PM 9/16/2004 -0400, Alan Donovan wrote: >On Thu, Sep 16, 2004 at 11:41:01AM -0400, Ken Anderson wrote: >> It turns out you can only put one thing after the #! so you need do something like: >> #! bin/run >> >> where run starts JScheme the way you want. So, i've updated this >> example: http://openmap.bbn.com/~kanderso/jscheme/scriptometer/ > > >If you want to exec the interpreter found by a PATH lookup, use the >following trick: > > #!/usr/bin/env runscheme > >This used to be one way to get Perl to run before the path was >"standardised" to /usr/bin/perl. > >HTH >alan > > > >------------------------------------------------------- >This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 >Project Admins to receive an Apple iPod Mini FREE for your judgement on >who ports your project to Linux PPC the best. Sponsored by IBM. >Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php >_______________________________________________ >Jscheme-user mailing list >Jsc...@li... >https://lists.sourceforge.net/lists/listinfo/jscheme-user |
From: Alan D. <ado...@cs...> - 2004-09-16 17:22:45
|
On Thu, Sep 16, 2004 at 11:41:01AM -0400, Ken Anderson wrote: > It turns out you can only put one thing after the #! so you need do something like: > #! bin/run > > where run starts JScheme the way you want. So, i've updated this > example: http://openmap.bbn.com/~kanderso/jscheme/scriptometer/ If you want to exec the interpreter found by a PATH lookup, use the following trick: #!/usr/bin/env runscheme This used to be one way to get Perl to run before the path was "standardised" to /usr/bin/perl. HTH alan |
From: Ken A. <kan...@bb...> - 2004-09-16 15:41:09
|
It turns out you can only put one thing after the #! so you need do something like: #! bin/run where run starts JScheme the way you want. So, i've updated this example: http://openmap.bbn.com/~kanderso/jscheme/scriptometer/ |
From: Ken A. <kan...@bb...> - 2004-09-15 22:01:10
|
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? k |
From: Ken A. <kan...@bb...> - 2004-09-15 15:00:04
|
We'll, you could run jscheme as a server perhaps. Unfortunately, this example does not work for me on Cygwin on Windows 2000. I get: /usr/bin/env: java -jar ~/jschem/lib/jscheme.jar not found. Can you see if this or some variant will work in your unix environment? k At 06:18 PM 9/14/2004 -0400, Geoffrey Knauth wrote: >On Sep 14, 2004, at 17:18, Ken Anderson wrote: >>Here's a way to make JScheme scripts executable from the UNIX command line. >> >>#! /bin/env java -jar ~/jscheme/lib/jscheme.jar >>(load "elf/basic.scm") >>(print (Date.)) > >That's great! Now if only java could remain in memory so that startup would be faster, the way servlets do. You could start a java listener then the command line would invoke a client that sends it messages. > >Geoffrey >-- >Geoffrey S. Knauth | http://knauth.org/gsk |