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 > |