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: Jonathan A R. <ja...@mu...> - 2003-01-07 14:11:21
|
I followed the instructions at http://jscheme.sourceforge.net/jscheme/doc/userman.html@downloadcvs, and experienced the following: jar@rosebud:~$ cvs -d:pserver:ano...@cv...:/cvsroot/jscheme login (Logging in to ano...@cv...) CVS password: jar@rosebud:~$ cvs -z3:pserver:ano...@cv...:/cvsroot/jscheme co jscheme cvs checkout: No CVSROOT specified! Please use the `-d' option cvs [checkout aborted]: or set the CVSROOT environment variable. jar@rosebud:~$ Not knowing anything about CVS, I then flailed about: jar@rosebud:~$ export CVSROOT=/tmp/cvs jar@rosebud:~$ mkdir /tmp/cvs jar@rosebud:~$ cvs -z3:pserver:ano...@cv...:/cvsroot/jscheme co jscheme cvs [checkout aborted]: /tmp/cvs/CVSROOT: No such file or directory jar@rosebud:~$ mkdir /tmp/cvs/CVSROOT jar@rosebud:~$ cvs -z3:pserver:ano...@cv...:/cvsroot/jscheme co jscheme cvs checkout: cannot find module `jscheme' - ignored jar@rosebud:~$ Can you help? Thanks Jonathan (who is trying to use Jscheme at Millennium Pharmaceuticals for miscellaneous scripting) (and by the way, when I tried to run cvs across the company's firewall, it went south, so I had to do it on my home machine.) |
From: Timothy H. <tim...@ma...> - 2003-01-07 14:00:08
|
On Monday, January 6, 2003, at 10:00 PM, david may wrote: > I found this today, and it seems usefull. > are there any gotchas to this method oc creating > new class in jscheme? Thanks for the reference and the nice simple test below! It certainly looks like a fun domain to play in! There will be problems with security violations (e.g. it won't work with unsigned applets and using Java Web Start you'll have to sign the jars). > > Sometimes you want to make a subclass just to > override the paint method. Good point. This has in fact been the only reason we need to write Java code for Jscheme applications. Have you tried to use this to create an instance of Panel (or JPanel) that overrides paint? > > the jar file is here.. > http://www.csg.is.titech.ac.jp/~chiba/javassist/ > > ------------ a simple test ----------- > (import "javassist.*") > (define pool (javassist.ClassPool.getDefault)) > (define cc (.makeClass pool "Silly")) > (define m (CtNewMethod.make > "public int silly(int dx) { return 2+dx; }" cc)) > (.addMethod cc m) > > (define cloader (Loader. pool)) > (define anewclass (.loadClass cloader "Silly")) > (define ss1 (.newInstance anewclass)) > > (.silly ss 1) shouldn't this be (.silly ss1 1) ---Tim--- |
From: <da...@da...> - 2003-01-07 03:02:35
|
I found this today, and it seems usefull. are there any gotchas to this method oc creating new class in jscheme? Sometimes you want to make a subclass just to override the paint method. the jar file is here.. http://www.csg.is.titech.ac.jp/~chiba/javassist/ ------------ a simple test ----------- (import "javassist.*") (define pool (javassist.ClassPool.getDefault)) (define cc (.makeClass pool "Silly")) (define m (CtNewMethod.make "public int silly(int dx) { return 2+dx; }" cc)) (.addMethod cc m) (define cloader (Loader. pool)) (define anewclass (.loadClass cloader "Silly")) (define ss1 (.newInstance anewclass)) (.silly ss 1) |
From: Ken A. <kan...@bb...> - 2003-01-02 22:14:12
|
I'm now having trouble building JScheme from scratch which may be related to this problem. Let me play around with this and see if i can get the build fixed by tomorrow. k At 02:06 PM 1/1/2003, david may wrote: >Happy 2003 ! > >I am have difficulty with makeing my jscheme app work with >webstart on windows. It works fine on linux. But on windows >I get the a security violation. > >I probably went about this the wrong way but in order to not have to >sign the jscheme jar and jabberbeans jar I created a java class >and started jscheme in it like this > > InputPort ip = null; > ip = Scheme.openResource("init.scm"); > if (ip == null) E.warn("(load) can't open the silly init.scm"); > else Scheme.load(ip); > >I put this and my init.scm in a jar and signed it. >and made the other jars extensions > ><extension name="jabberbeans" > href="jabberbeans.jnlp"> ></extension> ><extension name="jscheme" > href="jscheme.jnlp"> ></extension> > >and then >set > <all-permissions/> > >This all works on linux but on windows 2000 it fails. > > >Java Web Start 1.2 Console, started Wed Jan 01 10:51:34 PST 2003 >Java 2 Runtime Environment: Version 1.4.1_01 by Sun Microsystems Inc. >In openResource(init.scm): >java.lang.ExceptionInInitializerError > at jsint.Scheme.openResource(Scheme.java:197) > at JwsJscheme.<init>(JwsJscheme.java:8) > at JwsJscheme.main(JwsJscheme.java:13) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) > at java.lang.reflect.Method.invoke(Unknown Source) > at com.sun.javaws.Launcher.executeApplication(Unknown Source) > at com.sun.javaws.Launcher.executeMainClass(Unknown Source) > at com.sun.javaws.Launcher.continueLaunch(Unknown Source) > at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source) > at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source) > at com.sun.javaws.Launcher.run(Unknown Source) > at java.lang.Thread.run(Unknown Source) >Caused by: java.security.AccessControlException: access denied (java.lang.RuntimePermission setContextClassLoader) > at java.security.AccessControlContext.checkPermission(Unknown Source) > at java.security.AccessController.checkPermission(Unknown Source) > at java.lang.SecurityManager.checkPermission(Unknown Source) > at java.lang.Thread.setContextClassLoader(Unknown Source) > at jsint.Import.<clinit>(Import.java:48) > ... 14 more >** WARNING: (load) can't open the silly init.scm > > >thanks, >davud > > >------------------------------------------------------- >This sf.net email is sponsored by:ThinkGeek >Welcome to geek heaven. >http://thinkgeek.com/sf >_______________________________________________ >Jscheme-user mailing list >Jsc...@li... >https://lists.sourceforge.net/lists/listinfo/jscheme-user |
From: Ken A. <kan...@bb...> - 2003-01-02 20:54:31
|
At 03:39 PM 1/2/2003, Timothy Hickey wrote: >On Monday, December 30, 2002, at 02:45 PM, Ken Anderson wrote: > >>Tim, >> >>I think i should refactor the stringToNumber code to determine the type and size of the number and then attempt an appropriate conversion. >>readWholeNumber seems more complicated than it needs to be, for example it treats negative numbers specially were you trying to get around some limitation? >Refactoring is always a good idea if it makes to code cleaner, and in this case it probably will. >> >>Unfortunately, I've noticed that Integer.parseInt throws a numeric exception for numbers such as 0xDadaCafe 0x80000000 02000000000, while our current code returns a Long. Long.parseLong has a similar problem. So, the best thing might be to use Long.parseLong and then .intValue to get an Integer. >>I presume this has to do with numbers being signed, >We may want to make it easier for people to switch from Java syntax to R4RS syntax for contants (longs, etc.) >In this particular case, "01438" is not a valid Java number and so should probably throw and exception Yes, it did but we just returned a float. I'll fix this. >when usingJavaSyntax but should return the integer 1438 when using Scheme lexical syntax. > >---Tim--- > >> >> >>At 10:48 AM 12/30/2002, Jonathan A Rees wrote: >>>I believe the following behavior is incorrect (according to the scheme >>>report). >>> >>> Jscheme 5.0 04/05/2002 http://jscheme.sourceforge.net >>>>(string->number "01438") >>> 1438.0 >>> >>>It should be more like the following: >>> >>>>(string->number "1438") >>> 1438 >>> >>>Jonathan >>> >>> >>>------------------------------------------------------- >>>This sf.net email is sponsored by:ThinkGeek >>>Welcome to geek heaven. >>>http://thinkgeek.com/sf >>>_______________________________________________ >>>Jscheme-user mailing list >>>Jsc...@li... >>>https://lists.sourceforge.net/lists/listinfo/jscheme-user |
From: Timothy H. <tim...@ma...> - 2003-01-02 20:39:36
|
On Monday, December 30, 2002, at 02:45 PM, Ken Anderson wrote: > Tim, > > I think i should refactor the stringToNumber code to determine the type > and size of the number and then attempt an appropriate conversion. > readWholeNumber seems more complicated than it needs to be, for example > it treats negative numbers specially were you trying to get around some > limitation? Refactoring is always a good idea if it makes to code cleaner, and in this case it probably will. > > Unfortunately, I've noticed that Integer.parseInt throws a numeric > exception for numbers such as 0xDadaCafe 0x80000000 02000000000, while > our current code returns a Long. Long.parseLong has a similar > problem. So, the best thing might be to use Long.parseLong and then > .intValue to get an Integer. > I presume this has to do with numbers being signed, We may want to make it easier for people to switch from Java syntax to R4RS syntax for contants (longs, etc.) In this particular case, "01438" is not a valid Java number and so should probably throw and exception when usingJavaSyntax but should return the integer 1438 when using Scheme lexical syntax. ---Tim--- > > > At 10:48 AM 12/30/2002, Jonathan A Rees wrote: >> I believe the following behavior is incorrect (according to the scheme >> report). >> >> Jscheme 5.0 04/05/2002 http://jscheme.sourceforge.net >>> (string->number "01438") >> 1438.0 >>> >> >> It should be more like the following: >> >>> (string->number "1438") >> 1438 >>> >> >> Jonathan >> >> >> ------------------------------------------------------- >> This sf.net email is sponsored by:ThinkGeek >> Welcome to geek heaven. >> http://thinkgeek.com/sf >> _______________________________________________ >> Jscheme-user mailing list >> Jsc...@li... >> https://lists.sourceforge.net/lists/listinfo/jscheme-user > |
From: Timothy H. <tim...@ma...> - 2003-01-02 20:31:31
|
On Wednesday, January 1, 2003, at 02:06 PM, david may wrote: > Happy 2003 ! > > I am have difficulty with makeing my jscheme app work with > webstart on windows. It works fine on linux. But on windows > I get the a security violation. > > I probably went about this the wrong way but in order to not have to > sign the jscheme jar and jabberbeans jar Are you running the lastest Jscheme built from CVS. It sounds like this might be a problem with the class loader extensions that we've built into Jscheme in the past few months, but I think they were resolved recently..... I think the two calls to setContextClassLoader in the file jsint/Import.java should be enclosed in a tryCatch..... ---Tim--- > I created a java class > and started jscheme in it like this > > InputPort ip = null; > ip = Scheme.openResource("init.scm"); > if (ip == null) E.warn("(load) can't open the silly init.scm"); > else Scheme.load(ip); > > I put this and my init.scm in a jar and signed it. > and made the other jars extensions > > <extension name="jabberbeans" > href="jabberbeans.jnlp"> > </extension> > <extension name="jscheme" > href="jscheme.jnlp"> > </extension> > > and then > set > <all-permissions/> > > This all works on linux but on windows 2000 it fails. > > > Java Web Start 1.2 Console, started Wed Jan 01 10:51:34 PST 2003 > Java 2 Runtime Environment: Version 1.4.1_01 by Sun Microsystems Inc. > In openResource(init.scm): > java.lang.ExceptionInInitializerError > at jsint.Scheme.openResource(Scheme.java:197) > at JwsJscheme.<init>(JwsJscheme.java:8) > at JwsJscheme.main(JwsJscheme.java:13) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) > at java.lang.reflect.Method.invoke(Unknown Source) > at com.sun.javaws.Launcher.executeApplication(Unknown Source) > at com.sun.javaws.Launcher.executeMainClass(Unknown Source) > at com.sun.javaws.Launcher.continueLaunch(Unknown Source) > at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source) > at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source) > at com.sun.javaws.Launcher.run(Unknown Source) > at java.lang.Thread.run(Unknown Source) > Caused by: java.security.AccessControlException: access denied > (java.lang.RuntimePermission setContextClassLoader) > at java.security.AccessControlContext.checkPermission(Unknown Source) > at java.security.AccessController.checkPermission(Unknown Source) > at java.lang.SecurityManager.checkPermission(Unknown Source) > at java.lang.Thread.setContextClassLoader(Unknown Source) > at jsint.Import.<clinit>(Import.java:48) > ... 14 more > ** WARNING: (load) can't open the silly init.scm > > > thanks, > davud > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Jscheme-user mailing list > Jsc...@li... > https://lists.sourceforge.net/lists/listinfo/jscheme-user > |
From: <da...@da...> - 2003-01-01 23:49:45
|
I discovered my java Policies on my linux box were set to all permissions. Apparently I did this and forgot. Anyhow I fixed that and jscheme apps fail on linux as well with the same security problem. |
From: <da...@da...> - 2003-01-01 19:08:20
|
Happy 2003 ! I am have difficulty with makeing my jscheme app work with webstart on windows. It works fine on linux. But on windows I get the a security violation. I probably went about this the wrong way but in order to not have to sign the jscheme jar and jabberbeans jar I created a java class and started jscheme in it like this InputPort ip = null; ip = Scheme.openResource("init.scm"); if (ip == null) E.warn("(load) can't open the silly init.scm"); else Scheme.load(ip); I put this and my init.scm in a jar and signed it. and made the other jars extensions <extension name="jabberbeans" href="jabberbeans.jnlp"> </extension> <extension name="jscheme" href="jscheme.jnlp"> </extension> and then set <all-permissions/> This all works on linux but on windows 2000 it fails. Java Web Start 1.2 Console, started Wed Jan 01 10:51:34 PST 2003 Java 2 Runtime Environment: Version 1.4.1_01 by Sun Microsystems Inc. In openResource(init.scm): java.lang.ExceptionInInitializerError at jsint.Scheme.openResource(Scheme.java:197) at JwsJscheme.<init>(JwsJscheme.java:8) at JwsJscheme.main(JwsJscheme.java:13) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.sun.javaws.Launcher.executeApplication(Unknown Source) at com.sun.javaws.Launcher.executeMainClass(Unknown Source) at com.sun.javaws.Launcher.continueLaunch(Unknown Source) at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source) at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source) at com.sun.javaws.Launcher.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.security.AccessControlException: access denied (java.lang.RuntimePermission setContextClassLoader) at java.security.AccessControlContext.checkPermission(Unknown Source) at java.security.AccessController.checkPermission(Unknown Source) at java.lang.SecurityManager.checkPermission(Unknown Source) at java.lang.Thread.setContextClassLoader(Unknown Source) at jsint.Import.<clinit>(Import.java:48) ... 14 more ** WARNING: (load) can't open the silly init.scm thanks, davud |
From: Ken A. <kan...@bb...> - 2002-12-30 19:53:02
|
Tim, I think i should refactor the stringToNumber code to determine the type and size of the number and then attempt an appropriate conversion. readWholeNumber seems more complicated than it needs to be, for example it treats negative numbers specially were you trying to get around some limitation? Unfortunately, I've noticed that Integer.parseInt throws a numeric exception for numbers such as 0xDadaCafe 0x80000000 02000000000, while our current code returns a Long. Long.parseLong has a similar problem. So, the best thing might be to use Long.parseLong and then .intValue to get an Integer. I presume this has to do with numbers being signed, At 10:48 AM 12/30/2002, Jonathan A Rees wrote: >I believe the following behavior is incorrect (according to the scheme >report). > > Jscheme 5.0 04/05/2002 http://jscheme.sourceforge.net > > (string->number "01438") > 1438.0 > > > >It should be more like the following: > > > (string->number "1438") > 1438 > > > >Jonathan > > >------------------------------------------------------- >This sf.net email is sponsored by:ThinkGeek >Welcome to geek heaven. >http://thinkgeek.com/sf >_______________________________________________ >Jscheme-user mailing list >Jsc...@li... >https://lists.sourceforge.net/lists/listinfo/jscheme-user |
From: Ken A. <kan...@bb...> - 2002-12-30 18:10:09
|
Hi Johathan, What's happening here is that one of the JScheme extensions is to allow the use of Java syntax for numbers. You can turn it off with: > (set! U.useJavaSyntax$ #f) #t > (string->number "01438") 1438 Because of the leading "0" JScheme attempts to read the string in octal. Because of the "8" an exception is thrown. Our code catches the exception and simply tries to read the string as a float, which succeeds. Clearly it should throw an error, which might have at least given you a hint. I'll work to Tim to clean this up, thanks. k At 10:48 AM 12/30/2002, Jonathan A Rees wrote: >I believe the following behavior is incorrect (according to the scheme >report). > > Jscheme 5.0 04/05/2002 http://jscheme.sourceforge.net > > (string->number "01438") > 1438.0 > > > >It should be more like the following: > > > (string->number "1438") > 1438 > > > >Jonathan > > >------------------------------------------------------- >This sf.net email is sponsored by:ThinkGeek >Welcome to geek heaven. >http://thinkgeek.com/sf >_______________________________________________ >Jscheme-user mailing list >Jsc...@li... >https://lists.sourceforge.net/lists/listinfo/jscheme-user |
From: Jonathan A R. <ja...@mu...> - 2002-12-30 15:51:09
|
I believe the following behavior is incorrect (according to the scheme report). Jscheme 5.0 04/05/2002 http://jscheme.sourceforge.net > (string->number "01438") 1438.0 > It should be more like the following: > (string->number "1438") 1438 > Jonathan |
From: <da...@da...> - 2002-12-16 22:54:19
|
I am back at it again.. JScheme is a great way to explore the endless Java APIS. I just got some jscheme to play mp3s as well as transform XML, and load the DOM from a database.. So now I am trying figure out the simples way to display some images. It appears the normal java method is to override the paint() method. I looked at jlib but it did not mention images. What would be cool is to include some visual presenatations with the mp3s in a jar. Animation in jscheme?? |
From: Ken A. <kan...@bb...> - 2002-11-07 23:27:51
|
Yes, In elf/sort.scm there is (by n xs): (define (by n xs) (define (by0 i xs items so-far) (if (= i 0) (by0 n xs '() (cons (reverse items) so-far)) (if (null? xs) (finish items so-far) (by0 (- i 1) (cdr xs) (cons (car xs) items) so-far)))) (define (finish items so-far) (reverse (if (null? items) so-far (cons (reverse items) so-far)))) (assert (> n 0)) (by0 n xs '() '())) I think i got this idea from Peter Norvig: Put parens around your data any way it comes and use (by) and (map) to organize it into the way you want it. k At 05:36 PM 11/7/2002, Renu Kurien Bostwick wrote: >Ken - > >Do you know of an easy way (jscheme function perhaps) that'll break up >a list into sublists that are max of n long? > >'(a b c d e f g h i j) with n=3 would become > >'((a b c) (d e f) (g h i) (j)) > >or > >'((a) (b c d) (e f g) (h i j)) > >The ordering isn't important to me. I've been writing my own function >to do the split but it involves converting to vectors and back to >lists. Is there a more elegant solution? > >Thanks, >Renu > >-- >----------------------- >Renu Kurien Bostwick >re...@bb... >(617) 873-4543 >----------------------- |
From: Ken A. <kan...@bb...> - 2002-11-01 01:06:46
|
I think i gave you some suggestions. What seems to be working so far? At 05:29 PM 10/23/2002, david may wrote: >I am trying to learn how to user XML apis in Java 1.4 >using jscheme. What is the best way to deal with handlers. >I have been looking at the Proxy example in the jscheme src >but i am wondering if I might be better off writting a java handler. >thanks, >davud > > >------------------------------------------------------- >This sf.net email is sponsored by: Influence the future >of Java(TM) technology. Join the Java Community >Process(SM) (JCP(SM)) program now. >http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0002en > >_______________________________________________ >Jscheme-user mailing list >Jsc...@li... >https://lists.sourceforge.net/lists/listinfo/jscheme-user |
From: Ken A. <kan...@bb...> - 2002-10-24 20:02:45
|
I implemented Paul Graham's spam filter: http://www.paulgraham.com/spam.html. I'm impressed at how simple (< 160 lines) and effective it is. For training i used 290 spams and the first 500 messages in my inbox (which includes spam, though only 2 in the first 500. I then ran it on the 3200 messages in my inbox and it found 313 spams. There was one border line false positive - a Java Development bulk mailing. Not bad for 2 - 3 hours work! The code is Eudora specific, but you should be able to tailor it to your mail reader easily. It can classify about 10 emails/sec on my machine, which is plenty fast enough for playing around. Thanks, Paul! k |
From: Ken A. <kan...@bb...> - 2002-10-24 02:33:05
|
See src/dclass/SaxHandler.scm and SaxExp.scm These compile into elf/SaxHandler.java and elf/SaxExp.java SaxHandler reads an xml file and prints its components. SaxExp reads and xml file and returns an s-expression. I think i have a slightly newer version. k At 06:29 PM 10/23/2002, david may wrote: >I am trying to learn how to user XML apis in Java 1.4 >using jscheme. What is the best way to deal with handlers. >I have been looking at the Proxy example in the jscheme src >but i am wondering if I might be better off writting a java handler. >thanks, >davud > > >------------------------------------------------------- >This sf.net email is sponsored by: Influence the future >of Java(TM) technology. Join the Java Community >Process(SM) (JCP(SM)) program now. >http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0002en > >_______________________________________________ >Jscheme-user mailing list >Jsc...@li... >https://lists.sourceforge.net/lists/listinfo/jscheme-user |
From: <da...@da...> - 2002-10-23 22:30:05
|
I am trying to learn how to user XML apis in Java 1.4 using jscheme. What is the best way to deal with handlers. I have been looking at the Proxy example in the jscheme src but i am wondering if I might be better off writting a java handler. thanks, davud |
From: Ken A. <kan...@bb...> - 2002-10-22 00:41:30
|
Using {} flattens any lists and string appends the results. So, when you really want the lisp value as a string, use .toString or something. > (define data '((tokenizer.scm 1.49) (match.scm 1.47))) ((tokenizer.scm 1.49) (match.scm 1.47)) > {[data]} "tokenizer.scm1.49match.scm1.47" > (.toString data) "((tokenizer.scm 1.49) (match.scm 1.47))" > At 06:34 PM 10/21/2002, you wrote: >Ken - > >What's the simplest way in Scheme to go from a list like > >'((tokenizer.scm 1.49) (match.scm 1.47)) > >to a string like > >"((tokenizer.scm 1.49) (match.scm 1.47))" > >I thought I might be able to use the {} but it strips parens and >spaces: > >> cvsTokenizerTags >((tokenizer.scm 1.49) (match.scm 1.47)) >> {[cvsTokenizerTags]} >"tokenizer.scm1.49match.scm1.47" > >Do you know of an elegant way for me to get a string representation of >the list? > >Thanks, >Renu > >-- >----------------------- >Renu Kurien Bostwick >re...@bb... >(617) 873-4543 >----------------------- |
From: Ken A. <kan...@bb...> - 2002-10-09 18:23:34
|
Rusty has been using quasi-string syntax to generate regular expression from subparts. These expressions get pretty long (my mailer insists on folding): (define lon {((\\d\\d(\\d)*([numSplit]\\d+)??[lonDir])|([lonDir]\\d(\\d)?(\\d)? ?(DEG)?\\d(\\d)?([decimal])? ?[minutePat]?[secPat]?))}) It would be nice to have a way to ignore a newline. A clever way Rusty came up with is to use []: > {hello[ ] there} "hello there" |
From: Derek U. <Der...@on...> - 2002-09-30 22:36:49
|
A few weeks back there was some discussion on bugs in the way macros interacted with compilation. Matthew Flatt has a paper that talks about the MzScheme system for solving the problem: http://www.cs.utah.edu/plt/publications/macromod.pdf (via Lambda the Ultimate). Derek -- Derek Upham Senior Software Engineer Ontain 1750 112th Ave NE, Suite C-245 Bellevue, WA 98004-3727 Tel: 425-460-1886 der...@on... |
From: Timothy H. <tim...@ma...> - 2002-09-11 10:47:27
|
On Tuesday, September 10, 2002, at 08:11 PM, Graham Spencer wrote: > Given this file: > > ;; or.scm > (define (test-or) (or #f 1 2)) > > If I compile or.scm to a .class file, I get this behavior from > jscheme.REPL: > > > (or.load) > #null > > (test-or) > #t Whoops! You are exactly right. This is the wrong behavior. It has been corrected in the latest version of jscheme (download from CVS) which is Jscheme 5.1.2 (9/11/2002) Thanks for the bug report! ---Tim--- P.S. We're still thinking over the compiler/macros issues.... I think the idea of compiling "(load ...)" so that it scans for macros is probably a good idea.... Something similar would need to be done for (prog.load) > > (load "or.scm") > #t > > (test-or) > 1 > > I think the (load "or.scm") behavior is correct -- (or) should return > the first true value, not #t. Is that right? Thanks, > > --g > > > > ------------------------------------------------------- > In remembrance > www.osdn.com/911/ > _______________________________________________ > Jscheme-user mailing list > Jsc...@li... > https://lists.sourceforge.net/lists/listinfo/jscheme-user > |
From: Graham S. <fo...@pa...> - 2002-09-11 00:11:32
|
Given this file: ;; or.scm (define (test-or) (or #f 1 2)) If I compile or.scm to a .class file, I get this behavior from jscheme.REPL: > (or.load) #null > (test-or) #t > (load "or.scm") #t > (test-or) 1 I think the (load "or.scm") behavior is correct -- (or) should return the first true value, not #t. Is that right? Thanks, --g |
From: Ken A. <kan...@bb...> - 2002-09-09 18:18:18
|
If you need to make inner classes with behavior specialized with scheme, do it by writing a wrapper class that takes the scheme behavior you want in the constructor. Here's your example: (define-class (package foo) (public class MyFoo) (private Procedure action) (public MyFoo (Procedure action) (.action$# this action)) (public void bar () ((.action$# this))) ) Here's a sample use: > (.bar (foo.MyFoo. (lambda () (print 'hi)))) hi #null > At 01:17 PM 9/9/2002, Kyle R . Burton wrote: > > There are several ways to do this. see > > http://jscheme.sourceforge.net/jscheme/src/dclass/dclass.html > > > > The closest thing to what Jython does is > > (define-class). This requires you to declare types for all your methods, > > so it isn't as nice as Jython's way. > > > > I'd like to do it Jython's way at some point. > >Thanks for the quick reply. I have been able to create a Scheme class that >sub-classes a Java class. > >I do have another question though. Is it possible to create anonymous clases? >Java supports a syntax for declaring anonymous classes: > > Foo foo = new Foo() { > public void bar () { > System.out.println("in bar()"); > } > }; > >Is there a corresponding construct in JScheme? > > >Thank you, >Kyle R. Burton > >-- > >------------------------------------------------------------------------------ >Wisdom and Compassion are inseparable. > -- Christmas Humphreys >mo...@vo... http://www.voicenet.com/~mortis >------------------------------------------------------------------------------ > > >------------------------------------------------------- >This sf.net email is sponsored by: OSDN - Tired of that same old >cell phone? Get a new here for FREE! >https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390 >_______________________________________________ >Jscheme-user mailing list >Jsc...@li... >https://lists.sourceforge.net/lists/listinfo/jscheme-user |
From: Kyle R . B. <mo...@vo...> - 2002-09-09 17:17:35
|
> There are several ways to do this. see > http://jscheme.sourceforge.net/jscheme/src/dclass/dclass.html > > The closest thing to what Jython does is > (define-class). This requires you to declare types for all your methods, > so it isn't as nice as Jython's way. > > I'd like to do it Jython's way at some point. Thanks for the quick reply. I have been able to create a Scheme class that sub-classes a Java class. I do have another question though. Is it possible to create anonymous clases? Java supports a syntax for declaring anonymous classes: Foo foo = new Foo() { public void bar () { System.out.println("in bar()"); } }; Is there a corresponding construct in JScheme? Thank you, Kyle R. Burton -- ------------------------------------------------------------------------------ Wisdom and Compassion are inseparable. -- Christmas Humphreys mo...@vo... http://www.voicenet.com/~mortis ------------------------------------------------------------------------------ |