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: Timothy J H. <tjh...@br...> - 2005-07-15 18:57:42
|
Hi Kyle, On Jul 13, 2005, at 2:27 PM, Kyle R. Burton wrote: > When using dclass it emits some diagnostic information using display. > Is there a standard method for suppressing this? I see that it uses > display, but don't see a way of turning off the output. You'd have to comment out the lines in dclass.scm .... If you put in a switch for turning on/off the output we can add it to the next release... > > Also, does anyone know of any other library code for declaring classes > in JScheme? I don't know of any other automatic code, but I have developed some general approaches that work well using the jscheme.JScheme class to add a Scheme environment to a Java class. For example, this week I was working on a Java component for plotting various data coming from a Neuron simulattion program and I wanted to do the GUI layout and mouse handling (zoom/unzoom, etc.) in Java, but wrap it in Java so we could include it in other Java libraries easily. The approach I used was to add a static JScheme object (js) to the class and then load the relevant Scheme code in a static declaration. Finally, one can use js.call(....) to call JScheme code from the java methods... This executes the code in an interpreter belonging only to this class. In this particular case, the Java constructor calls a Scheme procedure that creates a GUI for the Neuron trace plotter and returns a Scheme procedure that can be used in Java to control the GUI and to access GUI field values, as well as to call any Scheme code that operates on the GUI. Here are some snippets of the Java and Scheme code for this Neuron Visualization tool > /** > PlotPanel represents a panel that provides a view of the data stored > in a Neuron object. > The GUI is created by a JScheme program plotpanelGUI.scm > > **/ > > > import javax.swing.JPanel; > import java.awt.Graphics; > import java.awt.Color; > > > public class PlotPanel { > public static jscheme.JScheme js = new jscheme.JScheme(); // here is a jscheme interpreter for interpreting Scheme code associated to this class > > public CompressedNeuron cNeuron; > public Neuron aNeuron; > > private jsint.Procedure handler; // this is a scheme procedure to > access the GUI > > > static { > js.call("load","plotpanelGUI.scm"); > } // here we load the scheme code into the interpreter (it can reside in the Jar file and will be loaded correctly) // this happens when the Java class is initially loaded > > > public void setNeuron(Neuron n) { this.aNeuron = n;} > public void setCompressedNeuron(CompressedNeuron n) {this.cNeuron=n;} > > public PlotPanel() { > handler = (jsint.Procedure) js.call("make-plot-panel", this); // here we make a scheme call in the Java constructor to create a GUI component for plotting // and we get back a procedure (handler) that can be called to control the GUI // and to read/write GUI component values > } > > private Object guiLookup(String s) { return js.call(handler,s); } > private double doubleLookup(String s){ return ((Number) > js.call(handler,s)).doubleValue(); } > private int intLookup(String s){ return ((Number) > js.call(handler,s)).intValue(); } // here are some help procedures for returning doubles, integers, or general objects from Scheme into Java // next is an example of getting the graphics component from Scheme, doing some painting, and the repainting the GUI // the guiLookup calls are calls to Scheme > public void clearScreen() { > Graphics g = (Graphics) guiLookup("g"); > g.setColor(Color.BLUE); > g.fillRect(0,0,10000,10000); > guiLookup("repaint"); > } The Scheme code looks like this ... > > ;; plotpanelGUI.scm > ;; This code creates a GUI for a PlotPanel > ;; It is meant to be called from PlotPanel.java > ;; all of the state variables and actions are stored in the java object > ;; This class just sets up the GUI > > (use-module "jlib/Swing.scm") // load the jlib library > > ;; return a plot panel for putting into the table ... this is the Java > object that creates this GUI > (define (make-plot-panel this) > > ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; > ;; Create the GUI > ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; > (define plots > (choice "MembranePotential" "intracellularCa" "NaActivation" > "NaInactivation" > "CaTActivation" "CaTInactivation" "CaSActivation" > "CaSInactivation" > "AActivation" "AInactivation" "KCaActivation" > "KdActivation" "HActivation")) > > (define c (canvas 400 600)) ----snip--- .... we continue creating the GUI > > (define the-panel (border (center c) (south (col 'none 'north > preference_selector)))) > ;; finally we end with a Scheme procedure that is passed back to Java that lets us control ;; the Scheme-built GUI from Java > (define (H msg) > (case msg > (("panel") the-panel) > (("canvas") the-canvas) > (("plotChoice") plots) > (("xmin") (readexpr xminTF)) > (("xmax") (readexpr xmaxTF)) > (("ymin") (readexpr yminTF)) > (("ymax") (readexpr ymaxTF)) > (("xminTF") xminTF) > (("xmaxTF") xmaxTF) > (("yminTF") yminTF) > (("ymaxTF") ymaxTF) > (("width") (.getWidth c)) > (("height") (.getHeight c)) > (("colorTF") (list->array int.class (readexpr colorTF))) > (("g") (.bufferg$ c)) > (("c") c) > (("repaint") (.repaint c)) > (("cNeuron") cNeuron) > (("aNeuron") aNeuron) > (("plotMethod") (readstring plotMethodChoice)) > (else "error?"))) > > > H > > > ) ; end of make-plot-panel > > This is not an automatic generation approach like the dclass method, but it does provide a nice pattern for writing programs that mix Java and Scheme. I often like to use Scheme to do the GUI (including adding mouse listeners, layout managers, etc.) and then use Java to do some of the tight numeric loops (analyzing plots, etc.) I hope this is helpful Best, ---Tim--- > > > Thanks, > > Kyle R. Burton > > -- > ----------------------------------------------------------------------- > ------- > Wisdom and Compassion are inseparable. > -- Christmas Humphreys > kyl...@gm... > http://www.neverlight.com/~mortis > ----------------------------------------------------------------------- > ------- > > > ------------------------------------------------------- > This SF.Net email is sponsored by the 'Do More With Dual!' webinar > happening > July 14 at 8am PDT/11am EDT. We invite you to explore the latest in > dual > core and dual graphics technology at this free one hour event hosted > by HP, > AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar > _______________________________________________ > Jscheme-user mailing list > Jsc...@li... > https://lists.sourceforge.net/lists/listinfo/jscheme-user |
From: Timothy J H. <tjh...@br...> - 2005-07-15 18:33:45
|
Hi Kyle, The cookbook idea sounds great. On Jul 12, 2005, at 12:09 AM, Kyle R. Burton wrote: > I'm re-introducing JScheme where I work and I'm looking for references > to help refresh my memory and to help my coworkers get productive as > quickly as possible. Towards that end, the example code that comes > with the distribution [1] provides some good examples, but is most > useful if you already have an idea about what you're looking for. > > For some of the initial barriers, things as simple as concatenating > two strings (string-append) or creating an array of a specified type > (array ClassName.class item1 item2 ... item N) - or (make-array > ClassName.class numInstances), time often gets spent searching through > the source tree or Googling with varying levels of success. > > The cook book style references do a fairly good job of filling this > kind of role. Have there been any thoughts towads starting a cookbook > for JScheme? I've seen reference to http://schemecookbook.org/ though > they don't have any JScheme related content. > > There are other cookbook projects on source forge, it would be easy > enough to start a jscheme-cookbook project. Lets do this! > > Any thoughts? Maybe the best approach would be to create a jschemecookbook wiki (a la wikipedia) with discussion/history pages. I'll look into setting up a cookbook wiki for jscheme next week. The cookbook model would work well for Jscheme as often you just want to have a simple interface to some Java library ... Best, ---Tim--- > > > Kyle R. Burton > > -- > ----------------------------------------------------------------------- > ------- > Wisdom and Compassion are inseparable. > -- Christmas Humphreys > kyl...@gm... > http://www.neverlight.com/~mortis > ----------------------------------------------------------------------- > ------- > > > ------------------------------------------------------- > This SF.Net email is sponsored by the 'Do More With Dual!' webinar > happening > July 14 at 8am PDT/11am EDT. We invite you to explore the latest in > dual > core and dual graphics technology at this free one hour event hosted > by HP, > AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar > _______________________________________________ > Jscheme-user mailing list > Jsc...@li... > https://lists.sourceforge.net/lists/listinfo/jscheme-user |
From: Kyle R. B. <kyl...@gm...> - 2005-07-13 18:27:44
|
When using dclass it emits some diagnostic information using display.=20 Is there a standard method for suppressing this? I see that it uses display, but don't see a way of turning off the output. Also, does anyone know of any other library code for declaring classes in JScheme? Thanks, Kyle R. Burton --=20 ---------------------------------------------------------------------------= --- Wisdom and Compassion are inseparable. -- Christmas Humphreys kyl...@gm... =20 http://www.neverlight.com/~mortis ---------------------------------------------------------------------------= --- |
From: Kyle R. B. <kyl...@gm...> - 2005-07-12 04:10:03
|
I'm re-introducing JScheme where I work and I'm looking for references to help refresh my memory and to help my coworkers get productive as quickly as possible. Towards that end, the example code that comes with the distribution [1] provides some good examples, but is most useful if you already have an idea about what you're looking for. For some of the initial barriers, things as simple as concatenating two strings (string-append) or creating an array of a specified type (array ClassName.class item1 item2 ... item N) - or (make-array ClassName.class numInstances), time often gets spent searching through the source tree or Googling with varying levels of success. The cook book style references do a fairly good job of filling this kind of role. Have there been any thoughts towads starting a cookbook for JScheme? I've seen reference to http://schemecookbook.org/ though they don't have any JScheme related content. There are other cookbook projects on source forge, it would be easy enough to start a jscheme-cookbook project. Any thoughts? Kyle R. Burton --=20 ---------------------------------------------------------------------------= --- Wisdom and Compassion are inseparable. -- Christmas Humphreys kyl...@gm... =20 http://www.neverlight.com/~mortis ---------------------------------------------------------------------------= --- |
From: Timothy J. H. <ti...@cs...> - 2005-06-28 19:30:58
|
Hi Boris, On Jun 28, 2005, at 12:26 AM, Borislav Iordanov wrote: > Hi, > =A0 > I=92m trying to use the Java2D API from a Scheme applet. But I=92m = getting =20 > an permissions error: > =A0 > (.getTransform graphics ) > =A0 graphics =3D =20 > = sun.java2d.SunGraphics2D[font=3Djava.awt.Font[family=3DDialog,name=3DDialo= g,s=20 > tyle=3Dplain,size=3D12],color=3Djav... > =A0 bird =3D ((233 . 501) 2 . -1) > =A0 color =3D java.awt.Color[r=3D0,g=3D0,b=3D255] > =A0 > =A0 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > java.security.AccessControlException: access denied =20 > (java.lang.RuntimePermission accessClassInPackage.sun.awt) I think the problem is that Applets have a default security model that =20= prevents them from finding the class of an object. The way (.getTransform graphics) is implemented in javadot notation, is =20= that it first finds the class of the "graphics" object and then looks for a "getTransform" method. You can simplify the process and avoid the access error by using the =20 extended javadot notation in which you explicity provide the class information: (.java.awt.Graphics2D.getTransform graphics) or if you have imported the class earlier in the code (import "java.awt.Graphics2D") you can provide just the classname, not the full package+class name (.Graphics2D.getTransform graphics) The javadot imiplementation of this extended notation, goes directly =20= to the specified class and looks for all methods with the name "getTransform" =20= and then finds the most specific method with the right number of parameters that match the =20 arguments. This can all be done without explicitly asking the system for the types of the objects (i.e. =20= it uses .instanceOf rather than .getClass) > =A0 > It seems that the applet support in Jscheme is geared towards JDK 1.1. = =20 > So I modified SchemeApplet.java to extend JApplet instead of Applet. We should probably have two of these SchemeApplet and SchemeJApplet ... > Same result. I implemented the =91paint(Graphics g)=92 method in =20 > SchemeApplet using the API that is yielding those access control =20 > exceptions, and in this case it works. If, instead, my =20 > SchemeApplet.paint method calls a scheme proc for painting (in the =20 > same way that the =91start=92 and =91init=92 procs are called for = example), =20 > then I get the access control problem above. This would make sense if my analysis above is correct.... > Conclusion: looks like the permissions block happens only when those =20= > APIs are used through reflection (I don=92t think it has anything to = do =20 > with class loading issues), by the Scheme interpreter=85 > =A0 > Any idea? I think it can be solved using the extended javadot notation =20 (.CLASSNAME.METHODNAME OBJ A1 ... An) where the initial "." before the CLASSNAME is critical!! > =A0 > Best, > Borislav > Please tell me if this helps! You may have to do this for all of the =20 javadot instance method calls in your applet. Best, ---Tim--- |
From: Borislav I. <bor...@ko...> - 2005-06-28 04:28:59
|
Hi, I'm trying to use the Java2D API from a Scheme applet. But I'm getting an permissions error: (.getTransform graphics ) graphics = sun.java2d.SunGraphics2D[font=java.awt.Font[family=Dialog,name=Dialog,st yle=plain,size=12],color=jav... bird = ((233 . 501) 2 . -1) color = java.awt.Color[r=0,g=0,b=255] ==================================== java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.sun.awt) It seems that the applet support in Jscheme is geared towards JDK 1.1. So I modified SchemeApplet.java to extend JApplet instead of Applet. Same result. I implemented the 'paint(Graphics g)' method in SchemeApplet using the API that is yielding those access control exceptions, and in this case it works. If, instead, my SchemeApplet.paint method calls a scheme proc for painting (in the same way that the 'start' and 'init' procs are called for example), then I get the access control problem above. Conclusion: looks like the permissions block happens only when those APIs are used through reflection (I don't think it has anything to do with class loading issues), by the Scheme interpreter. Any idea? Best, Borislav |
From: Michael S. <sp...@in...> - 2005-06-06 16:11:05
|
---------------------------------------------------------------------- CALL FOR PAPERS ACM SIGPLAN 2005 Workshop on Scheme and Functional Programming http://www.deinprogramm.de/scheme-2005/ Tallinn, Estonia 24 September 2005 The workshop will be held in conjunction with ICFP 2005. http://www.brics.dk/~danvy/icfp05/ ---------------------------------------------------------------------- Important dates Submission Deadline: June 13, 2005, 0:00 UTC Author notfication: July 29, 2005 Final paper due: August 22, 2005, 0:00 UTC ---------------------------------------------------------------------- Purpose The 2005 Scheme Workshop provides a forum for discussing experience with and future development of the Scheme programming language. The scope of the workshop includes all aspects of the design, implementation, theory, and application of Scheme. Past workshops have been held in Snowbird (2004), Boston (2003), Pittsburgh (2002), Florence (2001), and Montréal (2000). We encourage everyone interested in Scheme to participate. ---------------------------------------------------------------------- Scope We invite submissions in the following categories: Technical papers Papers on all technical aspects of the Scheme programming language, including language design, implementation, theory, and tools. Practice and experience Papers about using Scheme for practical applications and large systems. Proposals for language changes, extensions and libraries Papers containing proposals for changes in the language, language extensions, and libraries, including SRFIs past, present and future. Where applicable, the content of such a paper should be submitted as a SRFI draft, if that isn't already the case. Scheme pearls Papers about elegant, instructive or surprising Scheme programs. Education Papers about uses of Scheme in all aspects of education. System demonstrations Proposals for demonstrations of Scheme systems or applications written in Scheme. ---------------------------------------------------------------------- Submission guidelines Authors should submit - a 100-200 word abstract - some indication on the desired length of the presentation at the workshop - a full paper electronically to Mike Sperber <sperber at deinprogramm.de>, or via some other means to the organizers by the beginning of Monday, June 13, Universal Coordinated Time. (The beginning of the day UTC corresponds to 8:00 PM EDT on Sunday, June 12, 6:00 PM MDT, and 5:00 PM PDT.) Papers must be submitted in either PDF format or as PostScript documents that are interpretable by Ghostscript. Papers must be printable on US Letter sized paper. Submissions should be typeset in 10 point font on 12 point baseline in two columns 20pc (3.33in) wide and 54pc (9in) tall with a column gutter of 2pc (0.33in). Submissions should be no more than 15 pages including text, figures, and bibliography. Authors wishing to supply additional material to the reviewers beyond the 15 page limit may do so in clearly marked appendices, on the understanding that reviewers are not required to read the appendices. Authors using LaTeX should use the new SIGPLAN LaTeX class file, available from the Scheme 2005 workshop site. Submitted papers must have content that has not previously been published in other conferences or refereed venues. Simultaneous submission to other conferences or refereed venues is unacceptable. ------------------------------------------------------------------------------- Organizers Program committee J. Michael Ashley (co-chair) (Beckman Coulter, Inc.) Martin Gasbichler (University of Tübingen) Jonathan Rees (Millennium Pharmaceuticals) Dorai Sitaram (Verizon) Jonathan Sobel (Indiana University) Michael Sperber (co-chair) (DeinProgramm) |
From: Peter H. <pe...@ex...> - 2005-06-03 21:18:47
|
hi Tim, > It looks to me as if you are using jscheme servlets on a tomcat server > that is connected to an apache server using an > org.apache.catalina.connector > I have only ever tried running the servlets on a straight tomcat server > (on port 8080 or 8088 or some such...) I had played with it using Jetty on my desktop and had hoped I could develop servlets using this and upload them directly to the Tomcat server. > It appears that the servlet is running in a sandbox which disallows access > to non-public classes..... > How about just running a tomcat (or jetty or resin) servlet container on > port 8080? If you have to do it through the > connector, then we'll have to dig a little deeper to see what the java > security model for the servlets are in that situation.... Unfortunately it is hosted webspace I have, so I can't run anything additional on the server. The server administrator has said: "You should test your application with a security manager enabled. Catalina's default policy file is ok. E.g. use options like this with the default tomcat installlation; startup.sh -security or startup.bat -security if You're running windows." I guess I need to setup a local Apache/Tomcat installation and play with security settings. I'd hoped this would be easy! Any tips/guidance would be very very much appreciated! On a different subject, sorry I haven't sent you the JScheme/Antlr 'bridge' yet, it is working fine but I haven't packaged it neatly on it's own [though if anyone wants it right now email and I'll send undocumented source!]. I believe there is an Antlr version 3.0 on it's way which might change it a bit also. Peter |
From: Timothy J H. <tjh...@br...> - 2005-06-03 20:53:33
|
Hi Peter, On Jun 3, 2005, at 4:17 PM, Peter Harman wrote: > hi, > > I'm having some issues getting the jscheme webapp to run on a > webserver (and the server administrator is getting frustrated with > me), I have the demo servlets installed, permissions set, Apache told > of the servlet mappings, but Tomcat is still spewing out a nice stack > trace: > http://wedding.deltatheta.com/demo0.servlet > Is there any chance someone could point me in the right direction > please? It looks to me as if you are using jscheme servlets on a tomcat server that is connected to an apache server using an org.apache.catalina.connector I have only ever tried running the servlets on a straight tomcat server (on port 8080 or 8088 or some such...) It appears that the servlet is running in a sandbox which disallows access to non-public classes..... How about just running a tomcat (or jetty or resin) servlet container on port 8080? If you have to do it through the connector, then we'll have to dig a little deeper to see what the java security model for the servlets are in that situation.... Best, ---Tim--- > > Sorry for being off-topic and for what is probably a real > schoolboy-error! > > Peter > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: NEC IT Guy Games. How far can you > shotput > a projector? How fast can you ride your desk chair down the office > luge track? > If you want to score the big prize, get to know the little guy. Play > to win an NEC 61" plasma display: http://www.necitguy.com/?r=20 > _______________________________________________ > Jscheme-user mailing list > Jsc...@li... > https://lists.sourceforge.net/lists/listinfo/jscheme-user |
From: Peter H. <pe...@ex...> - 2005-06-03 20:18:01
|
hi, I'm having some issues getting the jscheme webapp to run on a webserver (and the server administrator is getting frustrated with me), I have the demo servlets installed, permissions set, Apache told of the servlet mappings, but Tomcat is still spewing out a nice stack trace: http://wedding.deltatheta.com/demo0.servlet Is there any chance someone could point me in the right direction please? Sorry for being off-topic and for what is probably a real schoolboy-error! Peter |
From: Michael S. <sp...@in...> - 2005-05-22 09:37:22
|
---------------------------------------------------------------------- CALL FOR PAPERS ACM SIGPLAN 2005 Workshop on Scheme and Functional Programming http://www.deinprogramm.de/scheme-2005/ Tallinn, Estonia 24 September 2005 The workshop will be held in conjunction with ICFP 2005. http://www.brics.dk/~danvy/icfp05/ ---------------------------------------------------------------------- Important dates Submission Deadline: June 13, 2005, 0:00 UTC Author notfication: July 29, 2005 Final paper due: August 22, 2005, 0:00 UTC ---------------------------------------------------------------------- Purpose The 2005 Scheme Workshop provides a forum for discussing experience with and future development of the Scheme programming language. The scope of the workshop includes all aspects of the design, implementation, theory, and application of Scheme. Past workshops have been held in Snowbird (2004), Boston (2003), Pittsburgh (2002), Florence (2001), and Montréal (2000). We encourage everyone interested in Scheme to participate. ---------------------------------------------------------------------- Scope We invite submissions in the following categories: Technical papers Papers on all technical aspects of the Scheme programming language, including language design, implementation, theory, and tools. Practice and experience Papers about using Scheme for practical applications and large systems. Proposals for language changes, extensions and libraries Papers containing proposals for changes in the language, language extensions, and libraries, including SRFIs past, present and future. Where applicable, the content of such a paper should be submitted as a SRFI draft, if that isn't already the case. Scheme pearls Papers about elegant, instructive or surprising Scheme programs. Education Papers about uses of Scheme in all aspects of education. System demonstrations Proposals for demonstrations of Scheme systems or applications written in Scheme. ---------------------------------------------------------------------- Submission guidelines Authors should submit - a 100-200 word abstract - some indication on the desired length of the presentation at the workshop - a full paper electronically to Mike Sperber <sperber at deinprogramm.de>, or via some other means to the organizers by the beginning of Monday, June 13, Universal Coordinated Time. (The beginning of the day UTC corresponds to 8:00 PM EDT on Sunday, June 12, 6:00 PM MDT, and 5:00 PM PDT.) Papers must be submitted in either PDF format or as PostScript documents that are interpretable by Ghostscript. Papers must be printable on US Letter sized paper. Submissions should be typeset in 10 point font on 12 point baseline in two columns 20pc (3.33in) wide and 54pc (9in) tall with a column gutter of 2pc (0.33in). Submissions should be no more than 15 pages including text, figures, and bibliography. Authors wishing to supply additional material to the reviewers beyond the 15 page limit may do so in clearly marked appendices, on the understanding that reviewers are not required to read the appendices. Authors using LaTeX should use the new SIGPLAN LaTeX class file, available from the Scheme 2005 workshop site. Submitted papers must have content that has not previously been published in other conferences or refereed venues. Simultaneous submission to other conferences or refereed venues is unacceptable. ------------------------------------------------------------------------------- Organizers Program committee J. Michael Ashley (co-chair) (Beckman Coulter, Inc.) Martin Gasbichler (University of Tübingen) Jonathan Rees (Millennium Pharmaceuticals) Dorai Sitaram (Verizon) Jonathan Sobel (Indiana University) Michael Sperber (co-chair) (DeinProgramm) |
From: Noel W. <noe...@ya...> - 2005-05-20 09:20:29
|
Scheme UK Meeting: 1 June 2005 The next meeting of the Scheme UK user's group will be held on 1 June 2005 from 7pm till we leave for the pub. The meeting will take place at the offices of LShift (see http://www.lshift.net/contact.html for directions). This meeting will be held in conjuction with UK Lispers. Nigel Walker: Computational modelling of communication networks Network protocols can sometimes be interpreted as solving distributed optimisation problems. For example, a routing algorithm minimises the total cost of flow, given a certain demand pattern. This perspective opens up a unifying view of many processes and interactions occuring within communications networks. I will briefly explain the background theory, and will show how it leads to a programming idiom for models of network processes. I will describe a prototype implemented as an extension of Scheme. ========================================================= Scheme UK is a UK based group of people interested in the Scheme programming language in particular, and advanced programming languages in general. We are interested in both practical and theoretic aspects. We meet on the first Wednesday of each month. Newcomers are welcome. For more details see: http://schematics.sourceforge.net/scheme-uk/ Email: noelwelsh <at> yahoo <dot> com AIM: noelhwelsh __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |
From: Robert M. <rma...@bb...> - 2005-04-26 22:38:20
|
> I'm having second thoughts about using the static variable here. > If it would be possible to use a local variable (e.g. associated to > an Evaluator) or a thread local variable (which could be inherited > by children threads) that would be better.... Turns out this is the big thing I had changed in my local tree since the time I sent my last message. In my revised implementation, REPL print length is controlled by an instance variable on Evaluator called "replPrintLength". It defaults to -1 (unlimited), and I've changed our project interactive startup routine to set it to 10. The syntax is a bit ugly, but it seems to work. (The tryCatch is there in case the current jscheme jar doesn't have the variable. Could probably make this a bit prettier by providing a method on the java side.) (tryCatch (begin (.replPrintLength$ (Scheme.currentEvaluator) 10) (display {(print length set to [(.replPrintLength$ (Scheme.currentEvaluator))])\n})) (lambda (e) (display "(unable to set print length limit)\n"))) > The problem I take it is that you don't want to have your interactive > sessions print out large result expressions.. Exactly. I was concerned that my original implementation had effects outside the REPL loop, so that's why I changed it. My changes now affect more central functions (like readEvalWriteLoop and write) but I think they're much safer and cleaner than before. > > I'd rather have the REPL assume interactive by default, if it won't > > break too much legacy stuff out there. > > On the other hand, if you use a switch "--interactive" > % java -jar jscheme.jar --interactive > or just a "-i" switch > % java -cp lib/jscheme.jar jscheme.REPL -i file1.scm ... '(command a1 > a2 ...)' > > then it won't break any legacy stuff and will only be marginally more > complex to handle.... I'm mostly concerned with new jscheme users here -- is there some way that we can make it so that if they do the obvious thing "out of the box" to start up an interactive jscheme session, they get the interactive-style REPL, without breaking legacy scripts? > I think it looks fine, but my only request would be to have it be > off by default, but allow a simple switch "-i" to turn in on. This > would make the code fully backward compatible. We can let users try > it out on their code bases (we've got three fairly large projects > using JScheme) and if noone reports any problems we could make it > the default behavior later. Sounds like a good plan in general. I think change #2 (normal toString for BacktraceException) can stand on its own, and shouldn't be affected by -i. I'm backing off turning on change #3 (generalized to replPrintLength) by default, although I'd like to figure out a way that doesn't require new users to know about "-i". Not sure about change #1 (avoid stack trace when nameResults is on). It shouldn't affect normal non-interactive results much more than nameResults already does (and that's on by default). Error logs may end up with less information, but how much do people depend on the top-level error handler for offline debugging (instead of having their own error handler)? Sigh, probably more than they should. So, do I need to add an interactive flag in addition to nameResults? I think exception handling control needs to be separate from replPrintLength. Regards, Rob |
From: Timothy J. H. <ti...@cs...> - 2005-04-26 18:00:10
|
Hi Rob, On Apr 20, 2005, at 6:46 PM, Robert MacIntyre wrote: > Hi, Tim, > > Sorry I've let this languish so long. Basically, I went off and did > something quick that worked for me, but now Rusty wants it too so it's > time to think about folding back in my changes, if the community likes > them. > > Tim wrote: >> The easiest thing to do as a first step is to create a public static >> int >> variable to that gives the global print depth (zero for infinite >> depth? >> zero by default?) The REPL could set it to a reasonable value for >> interactive sessions. We could specify an interactive session on >> the command line: >> >> % java -cp jscheme.jar jscheme.REPL -interactive >> >> One could also change the depth at runtime: >> >>> (set! jsint.Scheme.printDepth$ 10) I'm having second thoughts about using the static variable here. If it would be possible to use a local variable (e.g. associated to an Evaluator) or a thread local variable (which could be inherited by children threads) that would be better.... The problem I take it is that you don't want to have your interactive sessions print out large result expressions.. > > I like this, and it's pretty much what I had started to implement on > my own before writing to you, but I'd rather have the REPL assume > interactive by default, if it won't break too much legacy stuff out > there. On the other hand, if you use a switch "--interactive" % java -jar jscheme.jar --interactive or just a "-i" switch % java -cp lib/jscheme.jar jscheme.REPL -i file1.scm ... '(command a1 a2 ...)' then it won't break any legacy stuff and will only be marginally more complex to handle.... > My current solution is somewhere in between -- I hush errors > by default (actually, based on nameResults, which is on by defaul) but > set a very high limit (Integer.MAX_VALUE) for list-print length. > > I've made three changes in my version I'd like to propose to share: > > 1. When nameResults is on in readEvalWriteLoop, just return the > Throwable object when eval throws an exception. The user can then > call printStackTrace for more information, but in most cases the > toString you get is all you need. This sounds reasonable ... > > 2. Remove special toString from BacktraceException. The current > toString prints a whole stack trace. If I'd wanted that, I > woulda called printStackTrace. The default toString (class name > and message) tells you plenty, most of the time. (Sometimes the > message comes out blank, but I don't have a great fix for that > yet. Currently, I just call printStackTrace or getBaseException, > but I'd rather fix the constructor to avoid them.) This shouldn't be a problem ... > > 3. Change stringifyPair to have a maximum print length. This is sort > of like the printDepth variable Tim proposed, but more limited in > scope. In my current implementation, I have to set the max length > manually (set! Pair.maxlistprint$ 10). This should only happen when nameResults in on .. > > What do you (all) think? I think it looks fine, but my only request would be to have it be off by default, but allow a simple switch "-i" to turn in on. This would make the code fully backward compatible. We can let users try it out on their code bases (we've got three fairly large projects using JScheme) and if noone reports any problems we could make it the default behavior later. I would like to think about another way to do it that does not involve static variables ... Best, ---Tim--- > > Robert > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real > users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Jscheme-user mailing list > Jsc...@li... > https://lists.sourceforge.net/lists/listinfo/jscheme-user |
From: Robert M. <rma...@bb...> - 2005-04-20 22:47:46
|
Hi, Tim, Sorry I've let this languish so long. Basically, I went off and did something quick that worked for me, but now Rusty wants it too so it's time to think about folding back in my changes, if the community likes them. Tim wrote: > The easiest thing to do as a first step is to create a public static int > variable to that gives the global print depth (zero for infinite depth? > zero by default?) The REPL could set it to a reasonable value for > interactive sessions. We could specify an interactive session on > the command line: > > % java -cp jscheme.jar jscheme.REPL -interactive > > One could also change the depth at runtime: > > > (set! jsint.Scheme.printDepth$ 10) I like this, and it's pretty much what I had started to implement on my own before writing to you, but I'd rather have the REPL assume interactive by default, if it won't break too much legacy stuff out there. My current solution is somewhere in between -- I hush errors by default (actually, based on nameResults, which is on by defaul) but set a very high limit (Integer.MAX_VALUE) for list-print length. I've made three changes in my version I'd like to propose to share: 1. When nameResults is on in readEvalWriteLoop, just return the Throwable object when eval throws an exception. The user can then call printStackTrace for more information, but in most cases the toString you get is all you need. 2. Remove special toString from BacktraceException. The current toString prints a whole stack trace. If I'd wanted that, I woulda called printStackTrace. The default toString (class name and message) tells you plenty, most of the time. (Sometimes the message comes out blank, but I don't have a great fix for that yet. Currently, I just call printStackTrace or getBaseException, but I'd rather fix the constructor to avoid them.) 3. Change stringifyPair to have a maximum print length. This is sort of like the printDepth variable Tim proposed, but more limited in scope. In my current implementation, I have to set the max length manually (set! Pair.maxlistprint$ 10). What do you (all) think? Robert |
From: Timothy J. H. <ti...@cs...> - 2005-04-05 20:45:54
|
Hi Peter, On Apr 5, 2005, at 4:08 PM, Peter Harman wrote: >> Maybe we should have a section of the JScheme website >> that shows how to extend JScheme by combining open source java jar >> files with simple Scheme programs (like this one). >> >> Does anyone think this would be a worthwhile effort? > > Definitely! > >> Does anyone know any other examples of jar files/scheme interfaces >> that we could use? > > I have a simple interface to the Antlr (http://www.antlr.org) parser > generator to allow an Antlr-generated parser to output JScheme lists. > It consists of a few Java classes and a few scheme functions. I think > this would fit your idea of maximum functionality with minimum code, Yes, maximum functionality with minimum code is definitely the catch phrase for this idea! > as it allows any of the many grammars available to be used, > potentially just with one or two lines of scheme, and I'm quite happy > to add this to the collection. > > In what form should this, and/or other interfaces to libraries, be put? What about having a section of the website containing a folder for each of these extensions. Each folder would contain: * a documentation file explaining - where to get the most recent jar files, - how the Scheme interface works - simple and interesting examples of using the scheme interface * the scheme library and any associated Java helper classes ... * the jar files themselves?? (or perhaps we could write a Scheme program to download the latest jar files from wherever they are....) * the licenses for the jar files * the licenses for the scm and helper java code ... Then we could have a main page which links to each of these folders with a brief explanation of what the jar/scm code does? How does that sound? we could do antlr and jogl and a few others as demonstrations to see how well it works. Best, ---Tim--- > > Peter > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real > users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Jscheme-user mailing list > Jsc...@li... > https://lists.sourceforge.net/lists/listinfo/jscheme-user |
From: Peter H. <pe...@ex...> - 2005-04-05 20:08:58
|
> Maybe we should have a section of the JScheme website > that shows how to extend JScheme by combining open source java jar files > with simple Scheme programs (like this one). > > Does anyone think this would be a worthwhile effort? Definitely! > Does anyone know any other examples of jar files/scheme interfaces > that we could use? I have a simple interface to the Antlr (http://www.antlr.org) parser generator to allow an Antlr-generated parser to output JScheme lists. It consists of a few Java classes and a few scheme functions. I think this would fit your idea of maximum functionality with minimum code, as it allows any of the many grammars available to be used, potentially just with one or two lines of scheme, and I'm quite happy to add this to the collection. In what form should this, and/or other interfaces to libraries, be put? Peter |
From: Timothy J. H. <tim...@ma...> - 2005-04-04 22:44:41
|
On Apr 3, 2005, at 2:44 PM, Geoffrey Knauth wrote: > This makes JScheme + Lava3 Printf easier still: Cool!! Maybe we should have a section of the JScheme website (and the jscheme.zip download) that shows how to extend JScheme by combining open source java jar files (like lava3-*.jar) with simple Scheme programs (like this one). For example, we could also add * jdbc jar files with code for accessing databases * jogl.jar file with code for doing 3d graphics (though this requires some installation) * smath.jar file with code for doing interval arithmetic (this we have already) * jetty.jar files with code for running an html server To minimize download space we could include an installer that would download the needed jar from the appropriate URL ... Does anyone think this would be a worthwhile effort? Does anyone know any other examples of jar files/scheme interfaces that we could use? I like the idea of building simple scheme interfaces to Java libraries that add useful functionality with only a little bit of code (big jar, small scheme interface) Geoff's sprintf example captures 90% of the desired usage of lava-core and one can still use straight javadot to get the last 10%! Best, ---Tim--- > > ; from Tim > (load "elf/classpath.scm") > (addClasspathUrl "lava3-core.jar") > (addClasspathUrl "lava3-printf.jar") > (import "com.sharkysoft.printf.Printf") > > ; new > (define (sprintf fmt . args) > (Printf.format fmt (list->array Object.class args))) > > (sprintf "%s, the answer to everything is %d" "Geoff" 42) > => "Geoff, the answer to everything is 42" > > On Mar 31, 2005, at 09:13, Timothy John Hickey wrote: >> (define (for n N by L) >> (if (> n N) #f >> (begin (L n) (for (+ n by) N by L)))) >> >> (for 3 20000 3 (lambda(i) >> (Printf.out "(%5d, %6.2f, %#10x)\n" >> (list->array Object.class (list i >> (.floatValue (Math.sqrt i)) (* i i) >> ))))) > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real > users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Jscheme-user mailing list > Jsc...@li... > https://lists.sourceforge.net/lists/listinfo/jscheme-user |
From: Geoffrey K. <ge...@kn...> - 2005-04-04 10:34:38
|
I should have mentioned the keyword `deduct', as in (x tuition deduct) or (x cgift deduct), which was the whole motivation for having JScheme help the accountant this year. Geoffrey -- Geoffrey S. Knauth | http://knauth.org/gsk On Apr 4, 2005, at 06:28, GSK wrote: > reconciliation is a bit funky. using the checkbook account as an > example: > (a chk !) means the entry is in my computer but not my checkbook > (a chk) means the entry is recorded in the checkbook > (a chk 2) means the entry was seen in the February statement > (a chk :) means the entry was seen in online recent activity but not > yet in a statement > (a chk !:) means the bank has seen the transaction already but I > still haven't recorded it in the checkbook |
From: Geoffrey K. <ge...@kn...> - 2005-04-04 10:29:16
|
I used JScheme this year to do my taxes, or rather, to help my accountant get the numbers he needed. My ledger is a big list of s-expressions, because there's a lot of flexibility available between parentheses (...). Taxes, for me, are nothing less than parenthetical statements about the year's activities. Each transaction looks like: (yymmdd opt-tag amount debit credit info) opt-tag is usually (), but sometimes it is a token useful to Unix `sort', for grouping transactions. amount is a non-negative amount in dollars and cents. debit is account-info. credit is account-info. account-info looks like: ([alerx] name reconciliation) [alerx] is one of a=asset, l=liability, e=equity, r=revenue, x=expense name is the name of the account, i.e., (a chk) is asset, checking reconciliation is a bit funky. using the checkbook account as an example: (a chk !) means the entry is in my computer but not my checkbook (a chk) means the entry is recorded in the checkbook (a chk 2) means the entry was seen in the February statement (a chk :) means the entry was seen in online recent activity but not yet in a statement (a chk !:) means the bank has seen the transaction already but I still haven't recorded it in the checkbook info, if it exists, is a list the first element is the payee the second element, if it exists, is descriptive information the third element, if it exists, is a reference number I have JScheme routines that do account summaries, balance statements, account reconciliations, etc. For tax preparation, I wrote routines to build and load MySQL tables from my ledger of s-expressions. For editing transactions, there's nothing quicker for me than Emacs and s-expressions. MySQL queries do what the accountant asked. JScheme, JDBC and JFreeChart draw pretty pictures. Geoffrey -- Geoffrey S. Knauth | http://knauth.org/gsk |
From: Geoffrey K. <ge...@kn...> - 2005-04-03 18:44:20
|
This makes JScheme + Lava3 Printf easier still: ; from Tim (load "elf/classpath.scm") (addClasspathUrl "lava3-core.jar") (addClasspathUrl "lava3-printf.jar") (import "com.sharkysoft.printf.Printf") ; new (define (sprintf fmt . args) (Printf.format fmt (list->array Object.class args))) (sprintf "%s, the answer to everything is %d" "Geoff" 42) => "Geoff, the answer to everything is 42" On Mar 31, 2005, at 09:13, Timothy John Hickey wrote: > (define (for n N by L) > (if (> n N) #f > (begin (L n) (for (+ n by) N by L)))) > > (for 3 20000 3 (lambda(i) > (Printf.out "(%5d, %6.2f, %#10x)\n" > (list->array Object.class (list i > (.floatValue (Math.sqrt i)) (* i i) > ))))) |
From: Geoffrey K. <ge...@kn...> - 2005-03-31 20:05:13
|
Great detective work! Thanks! Geoffrey -- Geoffrey S. Knauth | http://knauth.org/gsk On Mar 31, 2005, at 08:33, Timothy John Hickey wrote: > Hi Geoffrey, > > Luckily this has one has an easy solution. > The addClasspathUrl is working fine, the problem was that > the class you were interested in had a private constructor... > Details below ... > >> On Mar 31, 2005, at 7:08 AM, Geoffrey Knauth wrote: >> >>> I'm puzzled. This code works in one app: >>> >>> > (load "elf/jdbc.scm") >>> > (load "elf/classpath.scm") >>> > (addClasspathUrl "csvdriver.jar") >>> > (DriverManager.registerDriver (jstels.jdbc.csv.CsvDriver.)) >>> StelsCSV JDBC Driver 2.1 (Trial version) >>> $4 = #null >>> >>> But this code does not in another: >>> >>> > (load "elf/classpath.scm") >>> > (addClasspathUrl "lava3-printf.jar") >>> > com.sharkysoft.printf.Printf >>> SchemeException: ERROR: undefined variable >>> "com.sharkysoft.printf.Printf" > > There are two problems with the code that doesn't work: > 1) com.sharkysoft.printf.Printf needs a "." after it so that it > becomes a javadot constructor > 2) this Printf class has a private constructor, so if you want to > access the constructor you > you need to add a "#" after the "." > >> tim% java -jar jscheme.jarJScheme 7.2 (3/7/05 2:23 PM) >> http://jscheme.sourceforge.net >> > (load "elf/classpath.scm") >> $1 = #t >> >> > (addClasspathUrl "lava3-printf.jar") >> $2 = #null >> >> > com.sharkysoft.printf.Printf.# >> $3 = {jsint.JavaConstructor com.sharkysoft.printf.Printf[0]} >> >> > com.sharkysoft.print.Printf. >> SchemeException: ERROR: undefined variable >> "com.sharkysoft.print.Printf." >> at jsint.E.error(E.java:14) >> at jsint.E.error(E.java:19) >> at >> jsint.DynamicVariable.getDynamicValue(DynamicVariable.java:27) >> at jsint.Evaluator.execute(Evaluator.java:361) >> at jsint.Evaluator.eval(Evaluator.java:283) >> at jsint.Evaluator.eval(Evaluator.java:272) >> at jsint.Evaluator.readEvalWriteLoop(Evaluator.java:129) >> at jsint.Evaluator.runJscheme(Evaluator.java:106) >> at jsint.Scheme.runJscheme(Scheme.java:170) >> at jsint.Scheme.defaultMain(Scheme.java:134) >> at jsint.Scheme.main(Scheme.java:109) >> at jscheme.REPL.main(REPL.java:156) >> > (exit). >> $4 = #t >> >> [dsl092-074-053:~/Desktop/jschemetest/demo] tim% >> > > You can see that it has a private constructor using the > (describe CLASSNAME) procedure ... > >> > (load "elf/basic.scm") >> $3 = #t >> >> > (describe com.sharkysoft.printf.Printf.class) >> class: class com.sharkysoft.printf.Printf >> public final class com.sharkysoft.printf.Printf extends >> java.lang.Object >> HashCode: 6584281 >> ClassLoader: sun.misc.Launcher$AppClassLoader@c2391a >> Package: package com.sharkysoft.printf >> Name: "com.sharkysoft.printf.Printf" >> >> // Constructors >> private Printf() > ********* Note the private constructor here!! >> >> // Fields >> // Methods >> // from java.lang.Object >> public native int hashCode() >> public final native Class getClass() >> public boolean equals(Object) >> public String toString() >> protected void finalize() >> protected native Object clone() >> public final void wait(long, int) >> public final native void wait(long) >> public final void wait() >> private static native void registerNatives() >> public final native void notify() >> public final native void notifyAll() >> >> // from com.sharkysoft.printf.Printf >> public static int out(String, Object[]) >> public static int out(PrintfTemplate, Object[]) >> public static int out(String, PrintfData) >> public static int out(String) >> public static int write(Writer, String, Object[]) >> public static int write(Writer, String, PrintfData) >> public static int write(Writer, String) >> public static int write(Writer, PrintfTemplate, Object[]) >> public static String format(String) >> public static String format(PrintfTemplate, Object[]) >> public static String format(String, Object[]) >> public static String format(String, PrintfData) >> >> $4 = #t > > Cheers, > ---Tim--- > > >>> >>> In both cases the .jar file in question is in the same directory as >>> the .scm file (for testing). >>> >>> StelsCSV (trial version) came from: http://www.csv-jdbc.com/ >>> Lava3 Printf came from: >>> http://sharkysoft.com/software/java/lava3/printf/ >>> >>> Geoffrey >>> -- >>> Geoffrey S. Knauth | http://knauth.org/gsk >>> >>> >>> >>> ------------------------------------------------------- >>> This SF.net email is sponsored by Demarc: >>> A global provider of Threat Management Solutions. >>> Download our HomeAdmin security software for free today! >>> http://www.demarc.com/info/Sentarus/hamr30 >>> _______________________________________________ >>> Jscheme-user mailing list >>> Jsc...@li... >>> https://lists.sourceforge.net/lists/listinfo/jscheme-user > > > > ------------------------------------------------------- > This SF.net email is sponsored by Demarc: > A global provider of Threat Management Solutions. > Download our HomeAdmin security software for free today! > http://www.demarc.com/info/Sentarus/hamr30 > _______________________________________________ > Jscheme-user mailing list > Jsc...@li... > https://lists.sourceforge.net/lists/listinfo/jscheme-user > |
From: Timothy J. H. <tim...@ma...> - 2005-03-31 14:13:36
|
Hi Geoffrey, The Printf package from sharksoft you linked to is quite nice! http://sharkysoft.com/software/java/lava3/printf/ Just to double check that JScheme was working with that package I ran the following example from their documentation page: > > for (int i = 3; i <= 20000; i *= 3) > Printf.out > ( "(%5d, %6.2f, %#10x)\n", > new Object[] > { new Integer(i), > new Float((float) Math.sqrt((double) i)), > new Integer(i * i) > } > ); Which translates in to JScheme pretty easily ... > tim% java -jar jscheme.jar > JScheme 7.2 (3/7/05 2:23 PM) http://jscheme.sourceforge.net > > (load "elf/classpath.scm") > $1 = #t > > > (addClasspathUrl "lava3-core.jar") > $2 = #null > > > (addClasspathUrl "lava3-printf.jar") > $3 = #null > > > (import "com.sharkysoft.printf.Printf") > $4 = #t > > > (define (for n N by L) > (if (> n N) #f > (begin (L n) (for (+ n by) N by L)))) > $5 = (lambda for (n N by L)...) > > > (for 3 20000 3 (lambda(i) > (Printf.out "(%5d, %6.2f, %#10x)\n" > (list->array Object.class (list i > (.floatValue (Math.sqrt i)) (* i i) > ))))) > ( 3, 1.73, 0x9) > ( 6, 2.45, 0x24) > ( 9, 3.00, 0x51) > ( 12, 3.46, 0x90) > ( 15, 3.87, 0xe1) > ( 18, 4.24, 0x144) > ( 21, 4.58, 0x1b9) > ( 24, 4.90, 0x240) > ( 27, 5.20, 0x2d9) |
From: Timothy J. H. <tim...@ma...> - 2005-03-31 13:33:40
|
Hi Geoffrey, Luckily this has one has an easy solution. The addClasspathUrl is working fine, the problem was that the class you were interested in had a private constructor... Details below ... > On Mar 31, 2005, at 7:08 AM, Geoffrey Knauth wrote: > >> I'm puzzled. This code works in one app: >> >> > (load "elf/jdbc.scm") >> > (load "elf/classpath.scm") >> > (addClasspathUrl "csvdriver.jar") >> > (DriverManager.registerDriver (jstels.jdbc.csv.CsvDriver.)) >> StelsCSV JDBC Driver 2.1 (Trial version) >> $4 = #null >> >> But this code does not in another: >> >> > (load "elf/classpath.scm") >> > (addClasspathUrl "lava3-printf.jar") >> > com.sharkysoft.printf.Printf >> SchemeException: ERROR: undefined variable >> "com.sharkysoft.printf.Printf" There are two problems with the code that doesn't work: 1) com.sharkysoft.printf.Printf needs a "." after it so that it becomes a javadot constructor 2) this Printf class has a private constructor, so if you want to access the constructor you you need to add a "#" after the "." > tim% java -jar jscheme.jarJScheme 7.2 (3/7/05 2:23 PM) > http://jscheme.sourceforge.net > > (load "elf/classpath.scm") > $1 = #t > > > (addClasspathUrl "lava3-printf.jar") > $2 = #null > > > com.sharkysoft.printf.Printf.# > $3 = {jsint.JavaConstructor com.sharkysoft.printf.Printf[0]} > > > com.sharkysoft.print.Printf. > SchemeException: ERROR: undefined variable > "com.sharkysoft.print.Printf." > at jsint.E.error(E.java:14) > at jsint.E.error(E.java:19) > at > jsint.DynamicVariable.getDynamicValue(DynamicVariable.java:27) > at jsint.Evaluator.execute(Evaluator.java:361) > at jsint.Evaluator.eval(Evaluator.java:283) > at jsint.Evaluator.eval(Evaluator.java:272) > at jsint.Evaluator.readEvalWriteLoop(Evaluator.java:129) > at jsint.Evaluator.runJscheme(Evaluator.java:106) > at jsint.Scheme.runJscheme(Scheme.java:170) > at jsint.Scheme.defaultMain(Scheme.java:134) > at jsint.Scheme.main(Scheme.java:109) > at jscheme.REPL.main(REPL.java:156) > > (exit). > $4 = #t > > [dsl092-074-053:~/Desktop/jschemetest/demo] tim% > You can see that it has a private constructor using the (describe CLASSNAME) procedure ... > > (load "elf/basic.scm") > $3 = #t > > > (describe com.sharkysoft.printf.Printf.class) > class: class com.sharkysoft.printf.Printf > public final class com.sharkysoft.printf.Printf extends > java.lang.Object > HashCode: 6584281 > ClassLoader: sun.misc.Launcher$AppClassLoader@c2391a > Package: package com.sharkysoft.printf > Name: "com.sharkysoft.printf.Printf" > > // Constructors > private Printf() ********* Note the private constructor here!! > > // Fields > // Methods > // from java.lang.Object > public native int hashCode() > public final native Class getClass() > public boolean equals(Object) > public String toString() > protected void finalize() > protected native Object clone() > public final void wait(long, int) > public final native void wait(long) > public final void wait() > private static native void registerNatives() > public final native void notify() > public final native void notifyAll() > > // from com.sharkysoft.printf.Printf > public static int out(String, Object[]) > public static int out(PrintfTemplate, Object[]) > public static int out(String, PrintfData) > public static int out(String) > public static int write(Writer, String, Object[]) > public static int write(Writer, String, PrintfData) > public static int write(Writer, String) > public static int write(Writer, PrintfTemplate, Object[]) > public static String format(String) > public static String format(PrintfTemplate, Object[]) > public static String format(String, Object[]) > public static String format(String, PrintfData) > > $4 = #t Cheers, ---Tim--- >> >> In both cases the .jar file in question is in the same directory as >> the .scm file (for testing). >> >> StelsCSV (trial version) came from: http://www.csv-jdbc.com/ >> Lava3 Printf came from: >> http://sharkysoft.com/software/java/lava3/printf/ >> >> Geoffrey >> -- >> Geoffrey S. Knauth | http://knauth.org/gsk >> >> >> >> ------------------------------------------------------- >> This SF.net email is sponsored by Demarc: >> A global provider of Threat Management Solutions. >> Download our HomeAdmin security software for free today! >> http://www.demarc.com/info/Sentarus/hamr30 >> _______________________________________________ >> Jscheme-user mailing list >> Jsc...@li... >> https://lists.sourceforge.net/lists/listinfo/jscheme-user |
From: Geoffrey K. <ge...@kn...> - 2005-03-31 12:08:40
|
I'm puzzled. This code works in one app: > (load "elf/jdbc.scm") > (load "elf/classpath.scm") > (addClasspathUrl "csvdriver.jar") > (DriverManager.registerDriver (jstels.jdbc.csv.CsvDriver.)) StelsCSV JDBC Driver 2.1 (Trial version) $4 = #null But this code does not in another: > (load "elf/classpath.scm") > (addClasspathUrl "lava3-printf.jar") > com.sharkysoft.printf.Printf SchemeException: ERROR: undefined variable "com.sharkysoft.printf.Printf" In both cases the .jar file in question is in the same directory as the .scm file (for testing). StelsCSV (trial version) came from: http://www.csv-jdbc.com/ Lava3 Printf came from: http://sharkysoft.com/software/java/lava3/printf/ Geoffrey -- Geoffrey S. Knauth | http://knauth.org/gsk |