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...> - 2002-07-23 01:53:36
|
Sorry, Did this ever get answered? I seem to get the same problems when i try it. Tim should be able to figure this out. k At 10:55 PM 4/11/2002, Glyn Thomas Gowing wrote: >Hello everyone, > >I just bought a new laptop and I am having problems getting JLIB to work >properly. >I downloaded and installed the newest version of jscheme from >sourceforge this >evening. After adding it to my classpath it works just fine as long as >I do not >use any of the JLIB macros. > >No matter what I have tried, I cannot get JLIB to work. > >I am running Linux Mandrake 8.2 (kernel 2.4.18) and java 1.4.0. > >Below is the source code for the sample programme (directly from the web >site) >with a few extra includes that I needed to get it to compile. > >(import "java.lang.*") >(import "java.awt.*") >(import "java.awt.event.*") >(import "jlib.*") >(import "jlib.JLIB") >(import "jsint.*") >(import "java.lang.Math") > >(define win (window "Hello") > (border > (north (label "Hello")) > (center (button "Goodbye" (action (lambda (e) (.hide win) >(System.exit 0))))) > (south (label (string-append "sin(PI) = " (Math.sin Math.PI$)))))) >(.pack win) >(.show win) > >The runtime complains as follows: > >$java Hello2 >Exception in thread "main" SchemeException:[[ERROR: undefined variable >"window",#null]] > at jsint.E.error(E.java:14) > at jsint.E.error(E.java:19) > at jsint.Symbol.getGlobalValue(Symbol.java:74) > at Hello2.init(Hello2.java:114) > at Hello2.load(Hello2.java:60) > at Hello2.load(Hello2.java:65) > at Hello2.main(Hello2.java:70) > >Any assistance will be greatly appreciated. > >Thanks, >-glyn > > > >_______________________________________________ >Jscheme-user mailing list >Jsc...@li... >https://lists.sourceforge.net/lists/listinfo/jscheme-user |
From: Hoehle, Joerg-C. <Joe...@t-...> - 2002-06-19 09:03:17
|
Hi, >>(define list* (lambda R (if (null? (rest R)) (first R) (cons (first = R)=20 >>(apply list* (rest R))))))) >>BTW, Tim, your definition of list* relies on (null? (rest '()) -> #t >>which it is in Jscheme, but it is an error in Scheme in general. >I think the only time you will get (null? (rest R)) throwing=20 >an error is if >you call this as (list*) which maybe should throw an error??? I feel it would be The Right Thing when adding list* is to implement = the Common Lisp behaviour: http://www.xanalys.com/software_tools/reference/HyperSpec/Body/f_list_.h= tm#listST o list* takes at least one argument. o The last one need not be a list, i.e. (list* x y) =3D=3D (cons x y) That means, null? is not the correct end-iteration test for list*. = pair? is the correct test to continue iteration (there doesn't seem to = be the equivalent of the ATOM predicate in Scheme, which would be = needed here). I therefore propose: (define (list* elt . more) (if (pair? more) (cons elt (apply list* more)) elt)) {jsint.Closure list*[1,n] (elt . more)} : documents it needs at least = one element. > (list* 1 2 '(3 4 5)) (1 2 3 4 5) > (list* 1 3) (1 . 3) > (list* 1) 1 >But, I wonder if we should make (rest '()) and (first '()) throw = errors >instead of returning ()???? I wouldn't object. I thought the Scheme standard mandated this ("it is = an error in R5RS"). I was surprised to discover that it works in = Jscheme (I believe some of the elf/ code uses this). Regards, J=F6rg H=F6hle. BTW, I didn't check whether list* is in some SRFI on list = manipulations. |
From: Ken A. <kan...@bb...> - 2002-06-18 18:01:59
|
I've found this version of apply annoying myself. I've just checked in changes so that apply now takes 1 or more arguments,= =20 the last of which must be a list. I have not changed the documentation. BTW, Tim, your definition of list* relies on (null? (rest '()) -> #t which it is in Jscheme, but it is an error in Scheme in general. k At 01:14 PM 6/18/2002, Timothy Hickey wrote: >On Tuesday, June 18, 2002, at 03:57 AM, Hoehle, Joerg-Cyril wrote: > >>Hi, >> >>apply in Jscheme takes exactly 2 arguments. >>>apply >>{jsint.Primitive apply[2]} >> >>In R4RS terms: >> essential procedure: apply proc args >> procedure: apply proc arg1 ... args >>, this means that only the essential part if implemented in Jscheme. >> >>R5RS' apply takes n arguments and doesn't make a distinction anymore.=20 >>Having only apply/2 is a nightmare for recursive procedures with variab= le=20 >>number of arguments. >> >>BTW, the documentation at >>http://jscheme.sourceforge.net/jscheme/doc/R4RSprimitives.html >>is inconsistent. It says >>(apply f arguments ) ... >>(map F L) ... >>Yet map takes n arguments (in both R4RS and R5RS and) in Jscheme. >> >> >>While it is a trivial exercise to write an apply/n based on the apply/2= , > >You can load in a file newapply.scm that redefines apply: > >(set! apply > (let ((ap apply)) > (letrec ((list*(lambda (R) (if (null? (rest R)) (first R) (cons=20 > (first R) (list* (rest R))))))) > (lambda (f . R) > (ap f (list* R)))))) > > >> it is not so w.r.t. compiler optimization and inlining. >For the future this may be an issue. For the moment, the Jscheme compile= r=20 >does not >make use of much optimization or inlining. > >>Will the home-grown apply/n compile to as efficient code/bytecode as ap= ply/2? >For now yes, but in the future no. >> >>BTW, Common Lisp has list* which is quite useful for a straightforward=20 >>apply/n->apply/2. > >You have a point, perhaps we should add list* and apply/n to Jscheme... >---Tim--- > >> >>Regards, >> J=F6rg H=F6hle. >>Using Jscheme 5.0 04/05/2002 on MS-Woes-2000 >> >>-----------------------------------------------------------------------= ----- >> Bringing you mounds of caffeinated joy >>>>> http://thinkgeek.com/sf <<< >> >>_______________________________________________ >>Jscheme-user mailing list >>Jsc...@li... >>https://lists.sourceforge.net/lists/listinfo/jscheme-user > > >------------------------------------------------------------------------= ---- > Bringing you mounds of caffeinated joy > >>> http://thinkgeek.com/sf <<< > >_______________________________________________ >Jscheme-user mailing list >Jsc...@li... >https://lists.sourceforge.net/lists/listinfo/jscheme-user > |
From: Timothy H. <tim...@ma...> - 2002-06-18 17:14:26
|
On Tuesday, June 18, 2002, at 03:57 AM, Hoehle, Joerg-Cyril wrote: > Hi, > > apply in Jscheme takes exactly 2 arguments. >> apply > {jsint.Primitive apply[2]} > > In R4RS terms: > essential procedure: apply proc args > procedure: apply proc arg1 ... args > , this means that only the essential part if implemented in Jscheme. > > R5RS' apply takes n arguments and doesn't make a distinction anymore.=20= > Having only apply/2 is a nightmare for recursive procedures with=20 > variable number of arguments. > > BTW, the documentation at > http://jscheme.sourceforge.net/jscheme/doc/R4RSprimitives.html > is inconsistent. It says > (apply f arguments ) ... > (map F L) ... > Yet map takes n arguments (in both R4RS and R5RS and) in Jscheme. > > > While it is a trivial exercise to write an apply/n based on the = apply/2, You can load in a file newapply.scm that redefines apply: (set! apply (let ((ap apply)) (letrec ((list*(lambda (R) (if (null? (rest R)) (first R) (cons=20 (first R) (list* (rest R))))))) (lambda (f . R) (ap f (list* R)))))) > it is not so w.r.t. compiler optimization and inlining. For the future this may be an issue. For the moment, the Jscheme=20 compiler does not make use of much optimization or inlining. > Will the home-grown apply/n compile to as efficient code/bytecode as=20= > apply/2? For now yes, but in the future no. > > BTW, Common Lisp has list* which is quite useful for a straightforward=20= > apply/n->apply/2. You have a point, perhaps we should add list* and apply/n to Jscheme... ---Tim--- > > Regards, > J=F6rg H=F6hle. > Using Jscheme 5.0 04/05/2002 on MS-Woes-2000 > > = --------------------------------------------------------------------------= -- > Bringing you mounds of caffeinated joy >>>> http://thinkgeek.com/sf <<< > > _______________________________________________ > Jscheme-user mailing list > Jsc...@li... > https://lists.sourceforge.net/lists/listinfo/jscheme-user > |
From: Timothy H. <tim...@ma...> - 2002-06-18 16:52:33
|
On Tuesday, June 18, 2002, at 10:03 AM, tleek wrote: > > Hi, > > I'm using JScheme from java but having some difficulties. Is there > javadoc out there? I've created a javadoc for jscheme: http://www.cs.brandeis.edu/~tim/jscheme/doc/javadoc/ > I don't even know, e.g., if > > foo = JS.eval(schemeCommand); > > throw an exception that needs catching. Jscheme wraps all of its exceptions as subclasses of RuntimeException so you are not forced to catch them. It is a good idea to have the Scheme code catch the exception: try foo= JS.eval("(tryCatch ..SchemeCode.. (lambda(e) e))"); catch(Exception e) { .... }; If the exception is thrown inside SchemeCode during a reflection call to Java, then the tryCatch will For example, here is a test program which wraps Scheme expressions in a tryCatch: > import jscheme.JS; > > public class Test { > public static void main (String[] args) { > Object foo = JS.eval("(tryCatch "+ args[0] + "(lambda(e) e))"); > System.out.println("foo= "+foo); > System.out.println("foo class is "+foo.getClass()); > } > } > and here are some examples of its use: > % java -cp lib/jscheme.jar:. Test "(java.io.Socket. {129.64.3.193} > 14232)" > Javadot WARNING: Can't find classjava.io.Socket > foo= SchemeException:[[ERROR: undefined variable "java.io.Socket."]] > foo class is class jscheme.SchemeException > A Scheme error (e.g. making a mistake in the javadot notation, will return as a SchemeException object. This kind of error can be caught during debugging hopefully. > % java -cp lib/jscheme.jar:. Test "(java.net.Socket. {129.64.3.193} > 14232)" > foo= java.net.ConnectException: Connection refused > foo class is class java.net.ConnectException Otherwise, if the error is thrown by a Java method or constructor, then the error itself will be returned and one can test for the type of error. Here we tried to open a Socket unsuccessfully. > > > % java -cp lib/jscheme.jar:. Test "(/ 1 0)" > foo= java.lang.ArithmeticException: / by zero > foo class is class java.lang.ArithmeticException > Here we divide by zero and get an ArithmeticException > > Help! Does this help? > > p.s. Can you respond to this email address with any assistance. I'm not > on these lists. > > -- > > ================================================ > Tim Leek, S1-480 > BMD Systems and Analysis > > __o MIT Lincoln Laboratory > _ \<,_ 244 Wood Street > (_)/ (_) Lexington, MA 02420-9108 > > email: tl...@ll... > phone: (781) 981-2975 > > Machine Learning Reading Group > http://rezrov (Lab internal) > ================================================ > > > > > ---------------------------------------------------------------------------- > Bringing you mounds of caffeinated joy >>>> http://thinkgeek.com/sf <<< > > _______________________________________________ > Jscheme-user mailing list > Jsc...@li... > https://lists.sourceforge.net/lists/listinfo/jscheme-user > |
From: tleek <tl...@ll...> - 2002-06-18 14:04:31
|
Hi, I'm using JScheme from java but having some difficulties. Is there javadoc out there? I don't even know, e.g., if foo = JS.eval(schemeCommand); throw an exception that needs catching. Help! p.s. Can you respond to this email address with any assistance. I'm not on these lists. -- ================================================ Tim Leek, S1-480 BMD Systems and Analysis __o MIT Lincoln Laboratory _ \<,_ 244 Wood Street (_)/ (_) Lexington, MA 02420-9108 email: tl...@ll... phone: (781) 981-2975 Machine Learning Reading Group http://rezrov (Lab internal) ================================================ |
From: Hoehle, Joerg-C. <Joe...@t-...> - 2002-06-18 07:58:07
|
Hi, apply in Jscheme takes exactly 2 arguments. > apply {jsint.Primitive apply[2]} In R4RS terms: essential procedure: apply proc args procedure: apply proc arg1 ... args , this means that only the essential part if implemented in Jscheme. R5RS' apply takes n arguments and doesn't make a distinction anymore. = Having only apply/2 is a nightmare for recursive procedures with = variable number of arguments. BTW, the documentation at http://jscheme.sourceforge.net/jscheme/doc/R4RSprimitives.html is inconsistent. It says (apply f arguments ) ... (map F L) ... Yet map takes n arguments (in both R4RS and R5RS and) in Jscheme. While it is a trivial exercise to write an apply/n based on the = apply/2, it is not so w.r.t. compiler optimization and inlining. Will the home-grown apply/n compile to as efficient code/bytecode as = apply/2? BTW, Common Lisp has list* which is quite useful for a straightforward = apply/n->apply/2. Regards, J=F6rg H=F6hle. Using Jscheme 5.0 04/05/2002 on MS-Woes-2000 |
From: Ken A. <kan...@bb...> - 2002-05-31 17:23:51
|
Follow the link to a clever way to embed Scheme in Java. >To: Anton van Straaten <an...@ap...> >Subject: RE: accumulator generator (Java) >Date: Sat, 25 May 2002 15:21:56 -0600 (MDT) >From: Jeffrey Palm <Jef...@co...> >Cc: ll1...@ai... >User-Agent: IMP/PHP IMAP webmail program 2.2.4 >Sender: own...@ai... > >Quoting Anton van Straaten <an...@ap...>: > > > You realize that you have now opened the door to someone embedding a > > tiny > > Scheme interpreter in a Java program in bytecode form (implemented as > > a > > single class for simplicity of embedding/loading), and simply > > executing > > "(define (foo n) (lambda (i) (set! n (+ n i)) n))". > > > > Anton > > > >That would be valid, too... > > http://ucsu.colorado.edu/~jdp/Scheme.java > >Enjoy. >Jeff > >--- >Jeffrey Palm --> http://www.cs.colorado.edu/~jdp |
From: Timothy H. <tim...@ma...> - 2002-05-31 08:41:50
|
Hi Nate, I would agree with Ken's assessment here. If you want to provide your users with a full R5RS implementation as an applet and if you can assume they have Java 1.2 enabled browsers, then you can use the recently released SISC applet http://sisc.sourceforge.net/sisc-online.html The advantage of Jscheme over SISC is the tighter integration with Java and hence the ability to easily write Scheme libraries that provide access to the corresponding Java libraries. This can be done is SISC, but the interface is less natural as you need to manually convert between Scheme types and Java types at every Java call. If you have a new student working on the project, you might be able to have them connect Darrel's editor with the SISC applet, getting the best of both worlds.... Nate, you might also be interested in some of the open source groupware tools we are developing for use in teaching intro Scheme and Java classes. An early prototype is available under the TATool link from my page (http://www.cs.brandeis.edu/~tim) or you can get it directly at http://frege.cs-i.brandeis.edu:8090/user/tatool/tatoolv1a.sxml but this assumes you have java web start installed http://java.sun.com/products/javawebstart Hmmmm. <snip comment="cut here to remove developer musings....."> Ken, We ought to be able to write a Jscheme interface to the SISC interpreter! The Jscheme applet would provide the GUI, paren matching, window management, network interface, groupware access, etc. and it could call the SISC interpreter to evaluate the R5RS Scheme expressions.... Perhaps we can provide a simple interface between Jscheme and SISC..... to make this painless.... </snip> Anyway, if there is anything I can do to help, don't hesitate to ask. ---Tim--- On Thursday, May 30, 2002, at 08:57 PM, Ken Anderson wrote: > When we started in 1998, our implementation of scheme in Java was > pretty close to Scheme. We steadily moved closer to Java. This has > given us easy access to Java API's, to the extent that Jscheme is > really a Scheme alternative syntax to Java. We get deep access to Java > with a relatively small amount of code. For example, (define now > (Date.)) > > The disadvantage is, as you pointed out, that if you want a full bignum > number tower, to verify some serious computation, for example, you have > to look elsewhere. Jscheme, don't provide anything more than Java > does, so (/ 1 2) is 0. More generally, Scheme people, who might be > attracted to us at first, might feel discouraged by the Java focus. > This is certainly an issue we're concerned about and would like to hear > people's views. > > > In PLT Scheme, (/ 1 2) is 0.5, as you expect. > > Java does have bignum packages, and we've talked them on this list. An > extension to Jscheme that provides such support should not be hard to > write. > If you're interested, i'd be willing to help. > > The http://sisc.sourceforge.net scheme is a full rsr5 scheme > implementation in java. At this point, it is harder to interface to > Java than Jscheme is. It is also faster on some benchmarks, though > Jscheme does suprisingly well. > > k > > At 07:42 PM 5/30/2002, Ken Anderson wrote: >> At 06:40 PM 5/30/2002, Nathaniel Titterton wrote: >> >>> (I've posted this on the open discussion on the sourceforge site, but >>> read >>> that I should try here as well). >>> >>> I was playing with a random number generator, and was surpised to find >>> that in JScheme >>> >>> (/ 1 2) >>> >>> was returning 0. If jscheme doesn't have exact rational numbers (I'm >>> assuming it doesn't), wouldn't it make more sense to return 0.5 >>> instead? >>> An implemenation is free to silently do this, it says in R4RS. >> >> We did this in an earlier version of Jscheme, then called Silk. >> We now adapt Java's arithmetic model so (/ 1 2) is 0 >> and (/ 1 2.0) is 0.5. >> >> Section 6.5.3 of R4RS gives some leeway in how numbers are implemented. >> >>> -nate >>> >>> >>> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= >>> Nathaniel Titterton >>> na...@so... >>> CITRIS PostDoc 341 Soda Hall, U.C. Berkeley, Berkeley, CA >>> 94720 >>> >>> >>> _______________________________________________________________ >>> >>> Don't miss the 2002 Sprint PCS Application Developer's Conference >>> August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm >>> >>> _______________________________________________ >>> Jscheme-user mailing list >>> Jsc...@li... >>> https://lists.sourceforge.net/lists/listinfo/jscheme-user >> >> >> _______________________________________________________________ >> >> Don't miss the 2002 Sprint PCS Application Developer's Conference >> August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm >> >> _______________________________________________ >> Jscheme-user mailing list >> Jsc...@li... >> https://lists.sourceforge.net/lists/listinfo/jscheme-user >> > > > _______________________________________________________________ > > Don't miss the 2002 Sprint PCS Application Developer's Conference > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > _______________________________________________ > Jscheme-user mailing list > Jsc...@li... > https://lists.sourceforge.net/lists/listinfo/jscheme-user > |
From: Ken A. <kan...@bb...> - 2002-05-31 01:02:24
|
At 08:07 PM 5/30/2002, Nathaniel Titterton wrote: >Thanks Ken. I don't know if I will ever get used to (/ 5 2) equaling 2, >though. Thats what quotient is for! It may be one of those areas where >java and lisp/scheme are at cultural odds... Yes, it is. I just tried the two common lisps on may machine and (/ 1 2) returned 1/2 in both. In fact, (/ 1 2) might be the simplest test to see if you are programming in a green pasture, or in the big city. >-nate > > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= > Nathaniel Titterton na...@so... > CITRIS PostDoc 341 Soda Hall, U.C. Berkeley, Berkeley, CA 94720 > >On Thu, 30 May 2002, Ken Anderson wrote: > > > At 06:40 PM 5/30/2002, Nathaniel Titterton wrote: > > > > >(I've posted this on the open discussion on the sourceforge site, but read > > >that I should try here as well). > > > > > >I was playing with a random number generator, and was surpised to find > > >that in JScheme > > > > > >(/ 1 2) > > > > > >was returning 0. If jscheme doesn't have exact rational numbers (I'm > > >assuming it doesn't), wouldn't it make more sense to return 0.5 instead? > > >An implemenation is free to silently do this, it says in R4RS. > > > > We did this in an earlier version of Jscheme, then called Silk. > > We now adapt Java's arithmetic model so (/ 1 2) is 0 > > and (/ 1 2.0) is 0.5. > > > > Section 6.5.3 of R4RS gives some leeway in how numbers are implemented. > > > > >-nate > > > > > > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= > > > Nathaniel Titterton na...@so... > > > CITRIS PostDoc 341 Soda Hall, U.C. Berkeley, Berkeley, CA 94720 > > > > > > > > >_______________________________________________________________ > > > > > >Don't miss the 2002 Sprint PCS Application Developer's Conference > > >August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > > > > >_______________________________________________ > > >Jscheme-user mailing list > > >Jsc...@li... > > >https://lists.sourceforge.net/lists/listinfo/jscheme-user > > > > > > _______________________________________________________________ > > > > Don't miss the 2002 Sprint PCS Application Developer's Conference > > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > > > _______________________________________________ > > Jscheme-user mailing list > > Jsc...@li... > > https://lists.sourceforge.net/lists/listinfo/jscheme-user > > |
From: Ken A. <kan...@bb...> - 2002-05-31 00:58:55
|
When we started in 1998, our implementation of scheme in Java was pretty close to Scheme. We steadily moved closer to Java. This has given us easy access to Java API's, to the extent that Jscheme is really a Scheme alternative syntax to Java. We get deep access to Java with a relatively small amount of code. For example, (define now (Date.)) The disadvantage is, as you pointed out, that if you want a full bignum number tower, to verify some serious computation, for example, you have to look elsewhere. Jscheme, don't provide anything more than Java does, so (/ 1 2) is 0. More generally, Scheme people, who might be attracted to us at first, might feel discouraged by the Java focus. This is certainly an issue we're concerned about and would like to hear people's views. In PLT Scheme, (/ 1 2) is 0.5, as you expect. Java does have bignum packages, and we've talked them on this list. An extension to Jscheme that provides such support should not be hard to write. If you're interested, i'd be willing to help. The http://sisc.sourceforge.net scheme is a full rsr5 scheme implementation in java. At this point, it is harder to interface to Java than Jscheme is. It is also faster on some benchmarks, though Jscheme does suprisingly well. k At 07:42 PM 5/30/2002, Ken Anderson wrote: >At 06:40 PM 5/30/2002, Nathaniel Titterton wrote: > >>(I've posted this on the open discussion on the sourceforge site, but read >>that I should try here as well). >> >>I was playing with a random number generator, and was surpised to find >>that in JScheme >> >>(/ 1 2) >> >>was returning 0. If jscheme doesn't have exact rational numbers (I'm >>assuming it doesn't), wouldn't it make more sense to return 0.5 instead? >>An implemenation is free to silently do this, it says in R4RS. > >We did this in an earlier version of Jscheme, then called Silk. >We now adapt Java's arithmetic model so (/ 1 2) is 0 >and (/ 1 2.0) is 0.5. > >Section 6.5.3 of R4RS gives some leeway in how numbers are implemented. > >>-nate >> >> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= >> Nathaniel Titterton na...@so... >> CITRIS PostDoc 341 Soda Hall, U.C. Berkeley, Berkeley, CA 94720 >> >> >>_______________________________________________________________ >> >>Don't miss the 2002 Sprint PCS Application Developer's Conference >>August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm >> >>_______________________________________________ >>Jscheme-user mailing list >>Jsc...@li... >>https://lists.sourceforge.net/lists/listinfo/jscheme-user > > >_______________________________________________________________ > >Don't miss the 2002 Sprint PCS Application Developer's Conference >August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > >_______________________________________________ >Jscheme-user mailing list >Jsc...@li... >https://lists.sourceforge.net/lists/listinfo/jscheme-user > |
From: Nathaniel T. <na...@so...> - 2002-05-31 00:07:31
|
Thanks Ken. I don't know if I will ever get used to (/ 5 2) equaling 2, though. Thats what quotient is for! It may be one of those areas where java and lisp/scheme are at cultural odds... -nate =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Nathaniel Titterton na...@so... CITRIS PostDoc 341 Soda Hall, U.C. Berkeley, Berkeley, CA 94720 On Thu, 30 May 2002, Ken Anderson wrote: > At 06:40 PM 5/30/2002, Nathaniel Titterton wrote: > > >(I've posted this on the open discussion on the sourceforge site, but read > >that I should try here as well). > > > >I was playing with a random number generator, and was surpised to find > >that in JScheme > > > >(/ 1 2) > > > >was returning 0. If jscheme doesn't have exact rational numbers (I'm > >assuming it doesn't), wouldn't it make more sense to return 0.5 instead? > >An implemenation is free to silently do this, it says in R4RS. > > We did this in an earlier version of Jscheme, then called Silk. > We now adapt Java's arithmetic model so (/ 1 2) is 0 > and (/ 1 2.0) is 0.5. > > Section 6.5.3 of R4RS gives some leeway in how numbers are implemented. > > >-nate > > > > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= > > Nathaniel Titterton na...@so... > > CITRIS PostDoc 341 Soda Hall, U.C. Berkeley, Berkeley, CA 94720 > > > > > >_______________________________________________________________ > > > >Don't miss the 2002 Sprint PCS Application Developer's Conference > >August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > > >_______________________________________________ > >Jscheme-user mailing list > >Jsc...@li... > >https://lists.sourceforge.net/lists/listinfo/jscheme-user > > > _______________________________________________________________ > > Don't miss the 2002 Sprint PCS Application Developer's Conference > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > _______________________________________________ > Jscheme-user mailing list > Jsc...@li... > https://lists.sourceforge.net/lists/listinfo/jscheme-user > |
From: Ken A. <kan...@bb...> - 2002-05-30 23:43:32
|
At 06:40 PM 5/30/2002, Nathaniel Titterton wrote: >(I've posted this on the open discussion on the sourceforge site, but read >that I should try here as well). > >I was playing with a random number generator, and was surpised to find >that in JScheme > >(/ 1 2) > >was returning 0. If jscheme doesn't have exact rational numbers (I'm >assuming it doesn't), wouldn't it make more sense to return 0.5 instead? >An implemenation is free to silently do this, it says in R4RS. We did this in an earlier version of Jscheme, then called Silk. We now adapt Java's arithmetic model so (/ 1 2) is 0 and (/ 1 2.0) is 0.5. Section 6.5.3 of R4RS gives some leeway in how numbers are implemented. >-nate > > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= > Nathaniel Titterton na...@so... > CITRIS PostDoc 341 Soda Hall, U.C. Berkeley, Berkeley, CA 94720 > > >_______________________________________________________________ > >Don't miss the 2002 Sprint PCS Application Developer's Conference >August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > >_______________________________________________ >Jscheme-user mailing list >Jsc...@li... >https://lists.sourceforge.net/lists/listinfo/jscheme-user |
From: Nathaniel T. <na...@so...> - 2002-05-30 22:40:15
|
(I've posted this on the open discussion on the sourceforge site, but read that I should try here as well). I was playing with a random number generator, and was surpised to find that in JScheme (/ 1 2) was returning 0. If jscheme doesn't have exact rational numbers (I'm assuming it doesn't), wouldn't it make more sense to return 0.5 instead? An implemenation is free to silently do this, it says in R4RS. -nate =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Nathaniel Titterton na...@so... CITRIS PostDoc 341 Soda Hall, U.C. Berkeley, Berkeley, CA 94720 |
From: Timothy H. <tim...@ma...> - 2002-05-01 17:02:48
|
On Wednesday, May 1, 2002, at 05:18 AM, Adam Shimali wrote: > Hi Tim, > Thanks, I got the full distribution working. > >>> Looking at the console output from Tomcat it appears that the relevant >>> .scm files (mail.scm and mylib.scm) are failing to load. I checked in >>> the servlets themselves and the path to the two .scm files are >>> correct, >>> so I can't see why they don't load, but I imagine that this is the >>> source of the servlet errors above. > >> I'll look into these servlet errors and get back to you. >> What platform are you using? Windows, Linux, MacOSX? >> ---Tim--- > > Re the above. I tried it win98 using Tomcat 4.0 and Java 1.3.1 > I'll try on a Linux box later of and see how I get on. The mylibdemo servlet works correctly if you start Tomcat from the MSDOS prompt rather than from the start->programs->apache->start-tomcat menu item. It is a little tricky to start from the MSDOS prompt because you need to set the default memory for the MSDOS window to its maximum (do this by right clicking on the upper left hand corner of the window, selecting "properties", and then selecting the "Memory" tab. This gives you a window where you can sent the Conventional memory both Total and Initial, to their maximum allowed values. You then need to bring up a new MS-DOS prompt to get the memory changes to take effect). I'm not sure why it doesn't work from the start menu. I think it might have something to do with default security settings, but I don't know. I'll look into it. ---Tim--- > Cheers > Adam > > |
From: Adam S. <ash...@bl...> - 2002-05-01 09:31:01
|
Hi Tim, Thanks, I got the full distribution working. >> Looking at the console output from Tomcat it appears that the relevant >> .scm files (mail.scm and mylib.scm) are failing to load. I checked in >> the servlets themselves and the path to the two .scm files are correct, >> so I can't see why they don't load, but I imagine that this is the >> source of the servlet errors above. > I'll look into these servlet errors and get back to you. > What platform are you using? Windows, Linux, MacOSX? >---Tim--- Re the above. I tried it win98 using Tomcat 4.0 and Java 1.3.1 I'll try on a Linux box later of and see how I get on. Cheers Adam |
From: Timothy H. <tim...@ma...> - 2002-05-01 00:52:50
|
On Tuesday, April 30, 2002, at 10:24 AM, Adam Shimali wrote: > Hello, > I've had problems getting jschemeFull_5_0_0.jar running (no main class=20= > error) but java jscheme.REPL works fine on the jscheme.jar that can be=20= > downloaded from here=20 > ( http://jscheme.sourceforge.net/jscheme/doc/userman.html#download ) > =A0 > Is the jscheme.jar an earlier version. Sorry, this jar file is a jar of the entire source directory, you unpack=20= it using % jar xvf jschemeFull_5_0_0.jar and you can then build jscheme using % cd jscheme % src/build/bootstrap > =A0 > Also re jschemewebapp.jar , if you download it to=20 > $CATALINA_HOME/webapps and unpack it, it creates a webapp sub = directory=20 > with jscheme directory inside it. If I move the jscheme directory up = so=20 > that it resides in the webapps directory then I can access > http://localhost:8080/jscheme/=A0and=20 > http://localhost:8080/jscheme/test=A0just fine, and the date servlet=20= > works. > =A0 > However the mailtest and mylibdemo servlets throw the following=20 > exceptions respectivley. I have only included the top lines as they=20 > wen't on for a long time. > =A0 > (SERVLET ERROR > =A0 > )SchemeException:[[ERROR: undefined variable "send-mail",#null]] > ... > =A0 > (SERVLET ERROR > =A0 > )SchemeException:[[ERROR: undefined variable "generic-page",#null]] > ... > > Looking at the console output from Tomcat it appears that the relevant=20= > .scm files (mail.scm and mylib.scm) are=A0failing to load. I checked = in=20 > the servlets themselves=A0and the path to the two .scm files are = correct,=20 > so I can't see why they don't load, but I=A0imagine that this is the=20= > source=A0of the servlet errors above.=A0 I'll look into these servlet errors and get back to you. What platform are you using? Windows, Linux, MacOSX? ---Tim--- ] > =A0 > Anyone else had similar problems and go them sorted? > =A0 > Cheers > Adam > =A0 |
From: Adam S. <ash...@bl...> - 2002-04-30 15:39:25
|
From: Adam S. <ash...@bl...> - 2002-04-30 15:25:22
|
Hello, I've had problems getting jschemeFull_5_0_0.jar running (no main class = error) but java jscheme.REPL works fine on the jscheme.jar that can be = downloaded from here ( = http://jscheme.sourceforge.net/jscheme/doc/userman.html#download ) Is the jscheme.jar an earlier version. Also re jschemewebapp.jar , if you download it to $CATALINA_HOME/webapps = and unpack it, it creates a webapp sub directory with jscheme directory = inside it. If I move the jscheme directory up so that it resides in the = webapps directory then I can access=20 http://localhost:8080/jscheme/ and http://localhost:8080/jscheme/test = just fine, and the date servlet works.=20 However the mailtest and mylibdemo servlets throw the following = exceptions respectivley. I have only included the top lines as they = wen't on for a long time. (SERVLET ERROR )SchemeException:[[ERROR: undefined variable "send-mail",#null]] ... (SERVLET ERROR )SchemeException:[[ERROR: undefined variable "generic-page",#null]] ... Looking at the console output from Tomcat it appears that the relevant = .scm files (mail.scm and mylib.scm) are failing to load. I checked in = the servlets themselves and the path to the two .scm files are correct, = so I can't see why they don't load, but I imagine that this is the = source of the servlet errors above.=20 Anyone else had similar problems and go them sorted? Cheers Adam |
From: Timothy H. <tim...@ma...> - 2002-04-14 22:03:36
|
On Sunday, April 14, 2002, at 03:41 PM, Steve Adams wrote: > Hello again, > =A0 > Are there any examples available that show database access via JDBC?=A0=20= > Thanks. I usually use the "runquery" procedure defined below it has a simple syntax (runquery host/db user pw query) It creates a connection using the host/db user pw info and then sends the query and returns a list of the headers and all result=20 rows as a list of lists. The code I use is shown at the end of this message. Here's an example of its use, where age,party, votedfor are servlet parameter and we are using the quasi-quote notation of jscheme {...[var]...[var]...} to construct strings: (runquery "jdbc:hsqldb:hsql://localhost:9009" "sa" "mynewpassword" {INSERT INTO survey VALUES([age],'[party]','[votedfor]')}) You could do this without quasi-quotes using string-append (runquery "jdbc:hsqldb:hsql://localhost:9009" "sa" "mynewpassword" (string-append "INSERT INTO survey VALUES(" age ",'" party "','" votedfor "' ")) Here is the code I use to define runquery. It uses the hsqldb database/driver. For other databases you need to change the "connect" procedure slightly. ;;;;;;;;;;;;;;;;;;;;;;;;;;; db.scm ;;;;;;;;;;;;;;;;;;;;;;;;;; (define (connect host/db user pw) (let* ((d (java.lang.Class.forName "org.hsqldb.jdbcDriver"))) (java.sql.DriverManager.getConnection host/db user pw))) (define (handlequery con query) (let* ((stmt (.createStatement con)) (rs (.executeQuery stmt query)) (rsmd (.getMetaData rs)) (cols (.getColumnCount rsmd)) (result (cons (let loop1 ((i 1)) (if (> i cols) () (cons (.getColumnLabel rsmd i) (loop1 (+ i 1))))) (let loop () (if (not (.next rs)) () (cons (let innerloop ((i 1)) (if (> i cols) () (cons (.getString rs i) (innerloop (+ i 1))))) (loop))))))) (map .close (list rs stmt)) result)) (define (runquery host/db user pw query) (let* ((con (connect host/db user pw)) (results (handlequery con query))) (.close con) results)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; I have some examples in a book I'm writing on Web Programming using Jscheme, you can get an early rough draft at http://www.cs.brandeis.edu/~tim/Download/iiwd.pdf and the jakarta-tomcat webapp with all code from the book is in http://www.cs.brandeis.edu/~tim/Download/schemewebapp.zip > =A0 > Steve Adams > =A0 |
From: Glyn T. G. <qu...@ma...> - 2002-04-12 02:55:15
|
Hello everyone, I just bought a new laptop and I am having problems getting JLIB to work properly. I downloaded and installed the newest version of jscheme from sourceforge this evening. After adding it to my classpath it works just fine as long as I do not use any of the JLIB macros. No matter what I have tried, I cannot get JLIB to work. I am running Linux Mandrake 8.2 (kernel 2.4.18) and java 1.4.0. Below is the source code for the sample programme (directly from the web site) with a few extra includes that I needed to get it to compile. (import "java.lang.*") (import "java.awt.*") (import "java.awt.event.*") (import "jlib.*") (import "jlib.JLIB") (import "jsint.*") (import "java.lang.Math") (define win (window "Hello") (border (north (label "Hello")) (center (button "Goodbye" (action (lambda (e) (.hide win) (System.exit 0))))) (south (label (string-append "sin(PI) = " (Math.sin Math.PI$)))))) (.pack win) (.show win) The runtime complains as follows: $java Hello2 Exception in thread "main" SchemeException:[[ERROR: undefined variable "window",#null]] at jsint.E.error(E.java:14) at jsint.E.error(E.java:19) at jsint.Symbol.getGlobalValue(Symbol.java:74) at Hello2.init(Hello2.java:114) at Hello2.load(Hello2.java:60) at Hello2.load(Hello2.java:65) at Hello2.main(Hello2.java:70) Any assistance will be greatly appreciated. Thanks, -glyn |