You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
(4) |
May
(10) |
Jun
(6) |
Jul
(1) |
Aug
(10) |
Sep
(20) |
Oct
(5) |
Nov
(2) |
Dec
(4) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(25) |
Feb
(6) |
Mar
(59) |
Apr
(9) |
May
(3) |
Jun
(13) |
Jul
(6) |
Aug
(16) |
Sep
(14) |
Oct
(12) |
Nov
(4) |
Dec
(10) |
2004 |
Jan
(16) |
Feb
(12) |
Mar
(53) |
Apr
(16) |
May
(43) |
Jun
(40) |
Jul
(48) |
Aug
(20) |
Sep
(23) |
Oct
(27) |
Nov
(33) |
Dec
(8) |
2005 |
Jan
(2) |
Feb
(20) |
Mar
(7) |
Apr
(9) |
May
(2) |
Jun
(6) |
Jul
(5) |
Aug
|
Sep
|
Oct
(3) |
Nov
(3) |
Dec
(6) |
2006 |
Jan
(6) |
Feb
(6) |
Mar
(1) |
Apr
(4) |
May
|
Jun
(1) |
Jul
|
Aug
(2) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
2007 |
Jan
(1) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
(1) |
Sep
(8) |
Oct
|
Nov
|
Dec
|
2008 |
Jan
(5) |
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
(2) |
Jul
(2) |
Aug
|
Sep
(1) |
Oct
(2) |
Nov
|
Dec
(2) |
2009 |
Jan
(2) |
Feb
|
Mar
(1) |
Apr
|
May
(4) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Ken A. <kan...@bb...> - 2004-01-05 21:33:15
|
One big advantage you get with Scheme that you don't get with Python, ... is that you can easily tailor a language to better fit your library. For a description of this, see the experience we've had with using Java libraries in JScheme: http://ll2.ai.mit.edu/talks/bbnll2/bamby/title.html I'm an old seismologist who did fortran and C until i found Common Lisp. Using Guile, you might have a profound impact on your field. k At 04:20 PM 1/5/2004 -0300, Mario Storti wrote: >Hi all, > >I'm discovering Guile, and I found it very exciting. I'm writing a GPL >C++ Finite Element code (see http://venus.ceride.gov.ar/petscfem >http://venus.ceride.gov.ar/twiki/bin/view/Cimec/PETScFEMResults >http://venus.ceride.gov.ar/~mstorti/AHMED/tex/ahmed/node27.html ) and >at a certain point I found need of a scripting language. Basically it >is an engineering code used for numerical simulations. The code runs >in parallel on Beowulf clusters using MPI/PETSc ( >http://www.mcs.anl.gov/mpich , http://www.mcs.anl.gov/petsc/ ). I >considered several choices: Perl, Python, Octave, Guile and other >Lisp-like languages. After evaluating the pros and cons, I'm now 90% >decided to choose Guile. > >The main pros of Guile are > >* It is the extension language of the GNU Project >* In my tests so far I had little difficulty (w.r.t. Perl, for > instance) in writing wrappers for the PETSc library, even if I > am more proficient with Perl. > >The cons are > >* I think it will be harder for users to learn Scheme (than > Perl/Python for instance) (this is the main con) [1] >* I didn't found any parallel implementations for Scheme. For GNU > Common Lisp I found http://www.ccs.neu.edu/home/gene/pargcl.html > I'm not able at this moment to assess the difficulty of doing this > task. (Perhaps it's trivial). > >Right now, I have some very simple code wrapper for some PETSc >functions, and so far I found relatively easy to add >functions. Congratulations to the Guile developers!! > >Coming back to [1], I have to say that the intended audience are >mainly engineers/physicists (I'm a physicist) whose programming skills >are in Fortran, Matlab and perhaps C/C++. Some of them (very few >indeed) know some Lisp from using AutoCAD. I know myself some Lisp >from using Emacs, and I have learned some Scheme in recent times (with >the scope of this extension project). > >The intended usage for the users is rather basic, setting >configuration variables, or some basic control of program execution. I >think that for these simple tasks most users will not have problems in >learning a new syntax ("I-have-to-learn-yet=another-syntax" :-( ). And >they win because they learn a new language that can be used for many >other things. I agree there. But there is one point which I find too >hard, and is the looping constructs. I think that explaining to the >users concepts like tail-call recursion, or call/cc's is an >overkill. I'm not speculating here, I have talked with many of them >(those with better programming skills). Perhaps such things may be >used by the developers, but definitely not by the average user. There >is the `while' special form, but even with this some simple looping >constructs, like the following in C/C++ > >while (cond0) { > // body1 0; > // ... > if (cond1) break; > // body 1 > // ... > if (cond2) continue; > // body 2 > // ... >} > >are hard to write, due to the lack of `break' and `continue' in >Scheme. I think that one can do that with catch/throw bu it also seems >an overkill. I found some flame wars between some other Lisp dialects >and Scheme and I anticipate that I'm not interested in starting such a >discussion. So: > >Question 1: I ask simply if there is some simple way of writing code >like this previous one in Scheme. > >Question 2: I have learned that in Scheme it is considered bad >practice to `set!' variables, or in general to use side-effects. In >our applications we manipulate huge structures (mainly vectors, sparse >matrices, graphs, with sizes in the order of several hundredths MBs, >and running for weeks), and it seems much more efficient to code this way >(using side-effects). Am I right? > >Question 3: Does anyone knows of some previous development regarding >Guile/Scheme in a parallel environment? (I mean using message >passing). > >Best regards, > >Mario > >------------------------- >Mario Alberto Storti >Centro Internacional de Metodos Computacionales > en Ingenieria - CIMEC (INTEC/CONICET-UNL) >INTEC, Guemes 3450 - 3000 Santa Fe, Argentina >Tel/Fax: +54-342-4511594 >e-mail: ms...@in... >http://www.cimec.org.ar/mstorti, http://www.cimec.org.ar >------------------------- > > > >_______________________________________________ >Guile-user mailing list >Gui...@gn... >http://mail.gnu.org/mailman/listinfo/guile-user |
From: Ken A. <kan...@bb...> - 2004-01-05 21:24:01
|
Just to make it clear, you can do your computation with Longs easily. Just use 0L for example, as in Java. So to sum a large pile of integers you can do something like: (apply + (cons 0L data)) k |
From: Ken A. <kan...@bb...> - 2004-01-05 21:19:40
|
At 03:44 PM 1/5/2004 -0500, Timothy John Hickey wrote: >So, you are messing around with the undocumented implementation of String, so as to make strings mutable! >This is clever, but violates all sorts of information hiding rules and fundamental precepts about object-oriented programming. Yes, and add threads and hashtables and you have a booby trap construction set! >Very cool! > >Sounds good! > >Lets use it! > > >> >>I've put this in jsint/primproc.scm because it is part of r4rs, but maybe it should >>get located with slib/ i can't decide. >> >>k > >But maybe put it in the slib code since we only really need strings to be mutable inside slib and there may be >unforseen consequences (e.g. it might not work on all JDKs now and in the future...) > >Eventually, we might need to make it uglier by having it check which Java version it is using before mucking around with >the internal undocumented representation.... > >---Tim--- > > > >> >> >> >>------------------------------------------------------- >>This SF.net email is sponsored by: IBM Linux Tutorials. >>Become an expert in LINUX or just sharpen your skills. Sign up for IBM's >>Free Linux Tutorials. Learn everything from the bash shell to sys admin. >>Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click >>_______________________________________________ >>Jscheme-user mailing list >>Jsc...@li... >>https://lists.sourceforge.net/lists/listinfo/jscheme-user > > > >------------------------------------------------------- >This SF.net email is sponsored by: IBM Linux Tutorials. >Become an expert in LINUX or just sharpen your skills. Sign up for IBM's >Free Linux Tutorials. Learn everything from the bash shell to sys admin. >Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click >_______________________________________________ >Jscheme-user mailing list >Jsc...@li... >https://lists.sourceforge.net/lists/listinfo/jscheme-user |
From: Ken A. <kan...@bb...> - 2004-01-05 21:02:32
|
At 02:56 PM 1/5/2004 -0500, bor...@ko... wrote: >Hi all, > >This is more of a question to Jscheme developers. Are there any plans to >support arbitrary precision integers? A simple way would be by using the >java.math.BigInteger class. I read a bit the source code and it doesn't >seem such a huge modification. However, this is probably not the most >efficient implementation. For example, I tried something like this: > >(define (fact n) > (let ((one (BigInteger. "1"))) > (if (= 0 (.intValue n)) > one > (fact (.mulitply n (.subtract n one)))))) Your definition is wrong. Try this: (define fact (let ((one (BigInteger. "1"))) (lambda (n) (if (= 0 (.intValue n)) one (.multiply n (fact (.subtract n one))))))) >And then I had to stop the evaluation of (fact (BigInteger "1000")) after >20 minutes on a 1.6GHZ, 512MB laptop. Scheme implementations that I've >played with in the past would return the result almost right away on much >slower machines. > >Anyway, the concern is really practical, not just for the sake of it. I'm >getting integer overflows while trying to solve a very practical problem. Have you tried using longs? >If you have thought about this and have ideas about what to do, I am >willing to help with coding, testing etc. > >BTW, I think Jscheme is great! Thanks! I've been thinking there should be an extension library that would let you do this. Perhaps we can develop one. Here's a simple one that provides big integers and big rational numbers, i've been playing with. (import "java.math.BigInteger") (load "elf/basic.scm") (define (big n) (if (instanceof n BigInteger.class) n (BigInteger. (.toString n)))) (define (bop1 f) (lambda (n) (f (big n)))) (define (bop2 f) (lambda (a b) (f (big a) (big b)))) (define babs (bop1 .abs)) (define b+ (bop2 .add)) (define b/ (bop2 .divide)) (define b= (bop2 .equals)) (define bgcd (bop2 .gcd)) (define bmax (bop2 .max)) (define bmin (bop2 .min)) (define mod (bop2 .mod)) (define b* (bop2 .multiply)) (define bminus (bop1 .negate)) (define (bexp n e) (.pow (big n) e)) (define bremainder (bop2 .remainder)) (define bsignum (bop1 .signum)) (define b- (bop2 .subtract)) (define (Rat n d) (let* ((n (big n)) (d (big d)) (g (.gcd n d))) (cons (.divide n g) (.divide d g)))) ;;; Structure and Interpration o Computer Programs, Second Edition, p. 84. (define numer car) (define denom cdr) (define (r+ x y) (Rat (b+ (b* (numer x) (denom y)) (b* (numer y) (denom x))) (b* (denom x) (denom y)))) (define (r- x y) (Rat (b- (b* (numer x) (denom y)) (b* (numer y) (denom x))) (b* (denom x) (denom y)))) (define (r* x y) (Rat (b* (numer x) (numer y)) (b* (denom x) (denom y)))) (define (r/ x y) (Rat (r* (numer x) (denom y)) (r* (denom x) (numer y)))) (define (r= x y) (b= (b* (numer x) (denom y)) (b* (numer y) (denom x)))) |
From: Timothy J. H. <ti...@cs...> - 2004-01-05 20:44:44
|
On Monday, January 5, 2004, at 03:19 PM, Ken Anderson wrote: > Is this a good idea? > > I've checked in a version of string-set! to allow for better use of > slib. > The definition is: > > (define (string-set! s i v) > (.hash$# s 0) > (vector-set! (.value$# s) i v)) Is this going to create a problem with interned strings? I seem to remember that we were interning literal strings by default in Jscheme. > > So when a character is set the hashcode is set to 0 so it will be > recomputed when needed. So as long as you stop calling string-set! on > a string before putting it in a hashtable you'll be OK. Using > string-set! on a string that in a hashtable will of course be a bad > thing to do. I wasn't sure what you were doing until I went into Jscheme and played around a little, as follows: > (define s "abcdef") "abcdef" > (.hash$# s) 0 > (.value$# s) [C@dc9766 > (load "elf/basic.scm") #t > (describe s) abcdef is an instance of java.lang.String // from java.lang.String value: [C@dc9766 offset: 0 count: 6 hash: 0 () > So, you are messing around with the undocumented implementation of String, so as to make strings mutable! This is clever, but violates all sorts of information hiding rules and fundamental precepts about object-oriented programming. Very cool! Sounds good! Lets use it! > > I've put this in jsint/primproc.scm because it is part of r4rs, but > maybe it should > get located with slib/ i can't decide. > > k But maybe put it in the slib code since we only really need strings to be mutable inside slib and there may be unforseen consequences (e.g. it might not work on all JDKs now and in the future...) Eventually, we might need to make it uglier by having it check which Java version it is using before mucking around with the internal undocumented representation.... ---Tim--- > > > > ------------------------------------------------------- > This SF.net email is sponsored by: IBM Linux Tutorials. > Become an expert in LINUX or just sharpen your skills. Sign up for > IBM's > Free Linux Tutorials. Learn everything from the bash shell to sys > admin. > Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click > _______________________________________________ > Jscheme-user mailing list > Jsc...@li... > https://lists.sourceforge.net/lists/listinfo/jscheme-user |
From: Ken A. <kan...@bb...> - 2004-01-05 20:19:36
|
Is this a good idea? I've checked in a version of string-set! to allow for better use of slib. The definition is: (define (string-set! s i v) (.hash$# s 0) (vector-set! (.value$# s) i v)) So when a character is set the hashcode is set to 0 so it will be recomputed when needed. So as long as you stop calling string-set! on a string before putting it in a hashtable you'll be OK. Using string-set! on a string that in a hashtable will of course be a bad thing to do. I've put this in jsint/primproc.scm because it is part of r4rs, but maybe it should get located with slib/ i can't decide. k |
From: <bor...@ko...> - 2004-01-05 19:56:32
|
Hi all, This is more of a question to Jscheme developers=2E Are there any plans to= support arbitrary precision integers? A simple way would be by using the java=2Emath=2EBigInteger class=2E I read a bit the source code and it does= n't seem such a huge modification=2E However, this is probably not the most efficient implementation=2E For example, I tried something like this: (define (fact n)=20 (let ((one (BigInteger=2E "1"))) =09 (if (=3D 0 (=2EintValue n))=20 =09 one =09 (fact (=2Emulitply n (=2Esubtract n one)))))) And then I had to stop the evaluation of (fact (BigInteger "1000")) after 20 minutes on a 1=2E6GHZ, 512MB laptop=2E Scheme implementations that I've= played with in the past would return the result almost right away on much slower machines=2E Anyway, the concern is really practical, not just for the sake of it=2E I'= m getting integer overflows while trying to solve a very practical problem=2E= =20 If you have thought about this and have ideas about what to do, I am willing to help with coding, testing etc=2E=20 BTW, I think Jscheme is great! Best, Boris -------------------------------------------------------------------- mail2web - Check your email from the web at http://mail2web=2Ecom/ =2E |
From: Ken A. <kan...@bb...> - 2003-12-29 17:09:19
|
Thanks for your work on JScheme in Eclipse! I have downloaded your plugin, and put it in the eclispe plugin directory. Is that all i need to do? I such a beginner. I can't seem to get the update manager to show me new plugins i can download. Is there a way to do that, or do i just find them in at the plugin website and install them myself? I seem to have JScheme hilighting, but i can't find the runas jscheme application. How do i get to it? How hard would it be to run JScheme inside Eclipse, like i do in EMACS? At 12:30 PM 12/28/2003 -0900, Michael R Head wrote: >I've been spending some time with my JScheme plugin for Eclipse again (I >just added matching parenthesis highlighting to the version in CVS), and >I've come to a point at which I have to really parse the input buffer to >add the next features on my TODO: >http://cvs.zclipse.org/viewcvs.py/zclipse/org.zclipse.jscheme/TODO?view=markup One of the things on your todo list is a code formatter. Why don't you use the pretty printer, src/elf/eopl2/jscheme/genwrite.scm >For details on the plugin: http://www.zclipse.org/projects/jscheme > >I've toyed with rolling my own parser (which I've started twice: once >ad-hoc, and once from the r4rs spec), writing a SableCC grammar for Yes, i've tried it from the spec too. >JScheme, and using the jsint.InputPort.read() function. > >None of these has struck me as quite perfect. > >Rolling my own gives me the most control over error reporting and >recovery, and I would have full access to all parts of the input >(including comments), but it's a lot of work that has already been done >in JScheme itself, and it would likely be less sharable with other >projects that might have similar needs. > >Writing a SableCC grammar is less work, more sharable in some ways >(possibly directly contributable to the jscheme project itself), and >generates a very pleasant AST for traversal, but isn't so good at error >reporting or recovery during the parse (at least in the current release >of SableCC). Personally, i void tools like this because it takes a long time for me to learn how to use them. Instead i use a simpler technique i can remember. I first got the idea from Henry Baker: http://citeseer.nj.nec.com/cache/papers/cs/24786/http:zSzzSzlinux.rice.eduzSz~rahulzSzhbakerzSzPrag-Parse.pdf/baker91pragmatic.pdf I now tend to use a functional state machine style. See the read-case macro in http://openmap.bbn.com/~kanderso/lisp/performing-lisp/pl-io.ps I wrote a corba idl tokenizer in this style in 274 lines while Sun's input to lex was 353. >Using InputPort.read() is great because I would be using precisely the >same parsing mechanism as JScheme itself, and it's already been written. >However, to my mind, API isn't quite amenable for general use. Since it >returns Object, I have to use Java's RTTI features to examine and >process the parsed data (or I have to write parts of my code in JScheme >to process the input) -- I'd prefer a syntax tree that I implements the >Visitor design pattern for traversal so I don't have to do any >downcasting. My understanding is also that because it's meant for I don't see why JScheme isn't perfect for this. You don't need downcasts or the visitor pattern. http://norvig.com/design-patterns/ shows that in Lisp many patterns are unnecessary or trivial. >execution, the InputPort throws away comments and will print errors to >System.err. Basically, in my understanding, it's not meant to be a Java >API for parsing JScheme. Right, (read) just returns an object, and skips comments. >It might not be too bad to cause the InputPort.read() to return an AST, >instead of Object, possibly adding comments to the syntax tree. It would >probably be harder to push error handling into the API level. > >Does anyone have any other recommendations for this? Once I have an AST >that I can work with, it should be easy to add a TreeView of the source >and a source formatter, the two major remaining features I want before I >release 1.0.0 of the plugin. I've been thinking that InputPort has grown to be a fairly big mess. I've been thinking about rewriting it in a (read-case) like macro in JScheme that expands to Java code. If you'd like to work on that with me, we can add stuff to better support Eclipse. Keeping track of file and line numbers would even help in reporting JScheme errors. |
From: Michael R H. <bu...@zc...> - 2003-12-28 21:31:38
|
I've been spending some time with my JScheme plugin for Eclipse again (I just added matching parenthesis highlighting to the version in CVS), and I've come to a point at which I have to really parse the input buffer to add the next features on my TODO: http://cvs.zclipse.org/viewcvs.py/zclipse/org.zclipse.jscheme/TODO?view=markup For details on the plugin: http://www.zclipse.org/projects/jscheme I've toyed with rolling my own parser (which I've started twice: once ad-hoc, and once from the r4rs spec), writing a SableCC grammar for JScheme, and using the jsint.InputPort.read() function. None of these has struck me as quite perfect. Rolling my own gives me the most control over error reporting and recovery, and I would have full access to all parts of the input (including comments), but it's a lot of work that has already been done in JScheme itself, and it would likely be less sharable with other projects that might have similar needs. Writing a SableCC grammar is less work, more sharable in some ways (possibly directly contributable to the jscheme project itself), and generates a very pleasant AST for traversal, but isn't so good at error reporting or recovery during the parse (at least in the current release of SableCC). Using InputPort.read() is great because I would be using precisely the same parsing mechanism as JScheme itself, and it's already been written. However, to my mind, API isn't quite amenable for general use. Since it returns Object, I have to use Java's RTTI features to examine and process the parsed data (or I have to write parts of my code in JScheme to process the input) -- I'd prefer a syntax tree that I implements the Visitor design pattern for traversal so I don't have to do any downcasting. My understanding is also that because it's meant for execution, the InputPort throws away comments and will print errors to System.err. Basically, in my understanding, it's not meant to be a Java API for parsing JScheme. It might not be too bad to cause the InputPort.read() to return an AST, instead of Object, possibly adding comments to the syntax tree. It would probably be harder to push error handling into the API level. Does anyone have any other recommendations for this? Once I have an AST that I can work with, it should be easy to add a TreeView of the source and a source formatter, the two major remaining features I want before I release 1.0.0 of the plugin. mike -- Michael R Head <bu...@zc...> ZClipse -- OpenSource Eclipse plugins |
From: Ken A. <kan...@bb...> - 2003-12-26 20:44:57
|
I've just checked in a new directory src/slib/ that provides support for the SLIB library. See the instructions in src/slib/jscheme.init. To do this is generalized open-input-file and call-with-input-file to open a file, resource, or url, just as load has been able to do for a long time. This lets up package slib as a jar. k |
From: Ken A. <kan...@bb...> - 2003-12-22 18:06:10
|
In src/using i've added 2 files that implement Dan Friedman's Object Oriented Style: http://www.cs.indiana.edu/~dfried/ooo.pdf It is a very good example of using macros to extend Scheme. I think this is as import as Gregor's Tiny CLOS: ftp://parcftp.xerox.com/pub/mops/tiny |
From: Geoffrey K. <ge...@kn...> - 2003-12-19 07:58:26
|
I like this very much. It was one of the features I loved most about Smalltalk. Geoffrey -- Geoffrey S. Knauth | http://knauth.org/gsk On Dec 16, 2003, at 15:22, Timothy John Hickey wrote: > Nice! > > We might want to build a little GUI that provides graphical access to > some of the elf/describe features. You've got quite a bit of a Jscheme > IDE already built! > > On Tuesday, December 16, 2003, at 03:05 PM, Ken Anderson wrote: > >> I've just added a whocalls capability to help me refactor some code. >> Here's how to use it: >> >>> (load "elf/basic.scm") >> #t >>> (buildWhoCallsTable) ;; Build the whocalls database >> #f >>> (whoCalls '+) >> (entropy array run-tests count class-name-name dotimes generic-write >> quasiquote needs-quoting? inspect-array-data) >>> (whoCalls 'needs-quoting?) >> (maybe-quote-value needs-quoting?) >>> (length (whoCalls 'car)) >> 26 >> >> >> >> ------------------------------------------------------- >> This SF.net email is sponsored by: IBM Linux Tutorials. >> Become an expert in LINUX or just sharpen your skills. Sign up for >> IBM's >> Free Linux Tutorials. Learn everything from the bash shell to sys >> admin. >> Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click >> _______________________________________________ >> Jscheme-user mailing list >> Jsc...@li... >> https://lists.sourceforge.net/lists/listinfo/jscheme-user > > > > ------------------------------------------------------- > This SF.net email is sponsored by: IBM Linux Tutorials. > Become an expert in LINUX or just sharpen your skills. Sign up for > IBM's > Free Linux Tutorials. Learn everything from the bash shell to sys > admin. > Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click > _______________________________________________ > Jscheme-user mailing list > Jsc...@li... > https://lists.sourceforge.net/lists/listinfo/jscheme-user > |
From: Timothy J. H. <ti...@cs...> - 2003-12-16 20:22:18
|
Nice! We might want to build a little GUI that provides graphical access to some of the elf/describe features. You've got quite a bit of a Jscheme IDE already built! On Tuesday, December 16, 2003, at 03:05 PM, Ken Anderson wrote: > I've just added a whocalls capability to help me refactor some code. > Here's how to use it: > >> (load "elf/basic.scm") > #t >> (buildWhoCallsTable) ;; Build the whocalls database > #f >> (whoCalls '+) > (entropy array run-tests count class-name-name dotimes generic-write > quasiquote needs-quoting? inspect-array-data) >> (whoCalls 'needs-quoting?) > (maybe-quote-value needs-quoting?) >> (length (whoCalls 'car)) > 26 > > > > ------------------------------------------------------- > This SF.net email is sponsored by: IBM Linux Tutorials. > Become an expert in LINUX or just sharpen your skills. Sign up for > IBM's > Free Linux Tutorials. Learn everything from the bash shell to sys > admin. > Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click > _______________________________________________ > Jscheme-user mailing list > Jsc...@li... > https://lists.sourceforge.net/lists/listinfo/jscheme-user |
From: Ken A. <kan...@bb...> - 2003-12-16 20:05:20
|
I've just added a whocalls capability to help me refactor some code. Here's how to use it: > (load "elf/basic.scm") #t > (buildWhoCallsTable) ;; Build the whocalls database #f > (whoCalls '+) (entropy array run-tests count class-name-name dotimes generic-write quasiquote needs-quoting? inspect-array-data) > (whoCalls 'needs-quoting?) (maybe-quote-value needs-quoting?) > (length (whoCalls 'car)) 26 |
From: Robert J. B. <ru...@bb...> - 2003-12-04 22:26:28
|
But will usable bandwidth be twice as available... Ken Anderson wrote: >Here's some code for reading and writing data from a zipped file. >It assumes the zipped file has only one element, the file you want to read. >I though Geoffrey might like this, but Rusty would say "wait a year and space will be twice as cheap". >k > >(import "java.util.zip.ZipFile") >(import "java.util.zip.ZipOutputStream") >(import "java.util.zip.ZipEntry") > >;;; withZipWriter: String File (PrintWriter -> void) -> void >(define (withZipWriter name outputFile f) > ;; outputFile will be a zip file with one element in it, named name. > (let* ((out (ZipOutputStream. (FileOutputStream. outputFile))) > (w (PrintWriter. (BufferedWriter. (OutputStreamWriter. out))))) > (.putNextEntry out (ZipEntry. name)) > (f w) > (.flush w) > (.closeEntry out) > (.close out))) > >;;; withZipReader: ZipFile (BufferedReader -> Object) -> Object >(define (withZipReader zipFile f) > (let* ((zip (ZipFile. zipFile)) > (r (BufferedReader. > (InputStreamReader. > (.getInputStream zip (.nextElement (.entries zip)))))) > (result (f r))) > (.close r) > result)) > > > >------------------------------------------------------- >This SF.net email is sponsored by: IBM Linux Tutorials. >Become an expert in LINUX or just sharpen your skills. Sign up for IBM's >Free Linux Tutorials. Learn everything from the bash shell to sys admin. >Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click >_______________________________________________ >Jscheme-user mailing list >Jsc...@li... >https://lists.sourceforge.net/lists/listinfo/jscheme-user > > > > |
From: Ken A. <kan...@bb...> - 2003-12-04 22:17:59
|
Here's some code for reading and writing data from a zipped file. It assumes the zipped file has only one element, the file you want to read. I though Geoffrey might like this, but Rusty would say "wait a year and space will be twice as cheap". k (import "java.util.zip.ZipFile") (import "java.util.zip.ZipOutputStream") (import "java.util.zip.ZipEntry") ;;; withZipWriter: String File (PrintWriter -> void) -> void (define (withZipWriter name outputFile f) ;; outputFile will be a zip file with one element in it, named name. (let* ((out (ZipOutputStream. (FileOutputStream. outputFile))) (w (PrintWriter. (BufferedWriter. (OutputStreamWriter. out))))) (.putNextEntry out (ZipEntry. name)) (f w) (.flush w) (.closeEntry out) (.close out))) ;;; withZipReader: ZipFile (BufferedReader -> Object) -> Object (define (withZipReader zipFile f) (let* ((zip (ZipFile. zipFile)) (r (BufferedReader. (InputStreamReader. (.getInputStream zip (.nextElement (.entries zip)))))) (result (f r))) (.close r) result)) |
From: Robert J. B. <ru...@bb...> - 2003-12-04 22:11:20
|
http://www.shiro.dreamhost.com/scheme/docs/ILC2002.pdf |
From: Ken A. <kan...@bb...> - 2003-11-20 22:44:24
|
This is a very nice talk. A compiler for a simple "make" domain specific langauge (DSL) in 400 lines of code is very impressive. Makes me wonder how many lines of code ANT is. I think people estimate that metaprogramming takes a lot more code than it really does. It does take planning. I think this is in part because we learn that parsing and compile writing is hard because there's all this computer science around it. His description of quasiquote is good. We might be able to write something similar to it with even less code in JScheme, for example by avoiding parsing and not having a compiler. k At 05:23 AM 11/20/2003 -0500, Geoffrey Knauth wrote: >Found this via LL1-discuss. Looks interesting: > >http://www.venge.net/graydon/talks/mkc/html/index.html > >Geoffrey >-- >Geoffrey S. Knauth | http://knauth.org/gsk |
From: Ken A. <kan...@bb...> - 2003-11-18 15:49:30
|
At 02:05 PM 11/7/2003 +0100, Alex Greif wrote: >hi, >I have two questions concerning classspaths: > >- Is it possible to determine all classes in the complete classpath which implement a specific interface? Yes. If your ClassLoader is a subclass of URLClassLoader, which it often is, you can ask it for it's URL's with getURLs(), and get the URL's of its parent..., and get all the jars mentioned in the "sun.boot.class.path" System.property. Then read all the jars to get class names, then load all the classes and see which ones implement the interface you're interested in. I can send you code that does this if you're interested. >- is it possible to get a list of all classes/ interfaces in a package? I don't think Java reflection allows this, but you can use the above technique to find this information. >thanks >alex. >______________________________________________________________________________ >WEB.DE FreeMail wird 5 Jahre jung! Feiern Sie mit uns und >nutzen Sie die neuen Funktionen http://f.web.de/features/?mc=021130 > > > >------------------------------------------------------- >This SF.net email is sponsored by: SF.net Giveback Program. >Does SourceForge.net help you be more productive? Does it >help you create better code? SHARE THE LOVE, and help us help >YOU! Click Here: http://sourceforge.net/donate/ >_______________________________________________ >Beanshell-users mailing list >Bea...@li... >https://lists.sourceforge.net/lists/listinfo/beanshell-users |
From: Timothy J. H. <tim...@ma...> - 2003-11-09 00:39:26
|
Here is an interesting application of Jscheme. Its a Jscheme interpreter applet with a preloaded program for computing some mathematical objects (Artin combing of braids...) http://www.math.ubc.ca/~liam/combing.html It was implemented by just modifying the Demorunner.scm code by adding the new procedures to the source code: http://www.math.ubc.ca/~liam/Demorunner.scm ---Tim--- |
From: Ken A. <kan...@bb...> - 2003-11-05 15:28:42
|
(Scheme.interrupt Thread) will interrupt a thread executing JScheme at the next procedure call. However, you're problem may be in Java code. You need to use the "cooperating processes" technique R@y mentioned, that periodically checks (Thread.interrupted). Here's an example. default is returned when the thread is interrupted: (define (process i default) (print i) (if (Thread.interrupted) default (if (> i 0) (process (- i 1) default) 'done))) This will run a cooperating thunk for a given number of milliseconds: (define (withTimeLimit millis thunk) (let* ((finished #f) (ct (Thread.currentThread)) (t (Thread. (delay (tryCatch (begin (Thread.sleep (+ millis 0L)) (.interrupt ct)) identity))))) (Thread.interrupted) (.setDaemon t #t) (.start t) (let ((result (thunk))) (.interrupt t) result))) Here's an example. Adjust the numbers to get it to time out or not. (define x (withTimeLimit 5000 (delay (process 40000 'timeout)))) At 07:31 AM 11/5/2003 -0500, Ray Tomlinson wrote: >You can't do it without the cooperation of the running thread which must check periodically to see if it has been interrupted. Thread.stop() is deprecated. If you ignore this, then do: >Thread t = new Thread("Compute") { > public void run() { > compute(); > } >}; >t.start(); >t.join(MAX_COMPUTE_TIME); >if (t.isAlive()) t.stop(); > >If the thread is cooperative, replace the stop with interrupt and do another join. > >Ray > >Robert J. Bobrow wrote: > >>Folks, >>I am looking for a code snippet to borrow -- I want to take an existing method and convert it so that it can be forced to return some specific value if the computation lasts for more than a given length of time. I imagine that what is needed is to have the method compute in one thread, while another thread runs a timer, and the second thread kills the first thread if the timer goes off. I have a felling that there are some gotcha's in this, so I was hoping to find a piece of code to copy that has already been debugged. >> >>Any pointers? >>Thanks, >>--Rusty > |
From: Ken A. <kan...@bb...> - 2003-10-29 22:23:02
|
While PLT Scheme is an incredible system compared to JScheme, sometimes it's sure nice to run in a browser. I think some people at Berkeley were interested in using JScheme to teach Scheme, or programming, but may have switched to PLT Scheme. Tim of course, teaches with JScheme. k At 03:58 PM 10/29/2003 -0500, Geoffrey Knauth wrote: >In case you didn't see the 2nd to last paragraph. > >Geoffrey >-- >Geoffrey S. Knauth | http://knauth.org/gsk > > >Begin forwarded message: > >>From: Jerzy Karczmarczuk <ka...@in...> >>Date: October 29, 2003 9:16:18 AM EST >>To: plt...@li... >>Subject: Re: [plt-scheme] NetScheme >> >> For list-related administrative tasks: >> http://list.cs.brown.edu/mailman/listinfo/plt-scheme >> >>Matthias Felleisen wrote: >>>Samuel Tobin-Hochstadt is working on it. -- Matthias >>It was a response to Dor Kleiman: >> >>> I would like to see DrScheme on-line, as such. >>> Using https protocol and a specific port you would go to a secure >>> password-protected web page on your pc. >>> Then, you will see a DrScheme like interface (html, of course) where >>> you would be able to program on your own pc from afar. >> >>As somebody mentioned, it is always possible to use DrScheme or any other >>program from a remote shell. It would be nice to know better what really >>needs Katsmall T. Wise, Esquire ... >> >>But I know what I would like to have - just for teaching: an interactive Scheme >>e-book. Like in Smalltalk. Like in Scheme/Curl before they decided to make >>money. >> >>For the moment I had shown some slides (PDF or HTML), having the DrScheme inter- >>face open in another Vdesktop, and I switched. Now I am preparing a more serious >>course (for almost beginners, they finally got me...), and the course notes >>should be more autonomous, with all examples accessible by the students working >>alone. >> >>I won't abandon DrScheme, on the contrary, but some parts will use the known >>JScheme applet which gives you a Java-assembled Scheme interface directly on >>your browser. For standard exercices (including several exercices from HDTP) >>it is sufficient. >> >>So, I began to wonder... Would it be possible *in principle* to make a MzScheme >>plugin for Netscape? We know that MrEd is a memory hog, but perhaps the >>possibility to make some Schemplets (Schrapnlets) would be interesting and not >>entirely in the realm of Harry Potter? Just Scheme, without the wx bazaar... >> >>Jerzy Karczmarczuk |
From: Jeremy H. <je...@al...> - 2003-10-26 05:09:22
|
Call for Participation Lightweight Languages Workshop 2003 (LL3) ========================================= Saturday, November 8, 2003 MIT, Room 34-101, Cambridge, Mass. http://ll3.ai.mit.edu/ LL3 will be an intense, exciting, one-day forum bringing together the best programming language implementors and researchers, from both academia and industry, to exchange ideas and information, to challenge one another, and to learn from one another. If you plan to attend, please register as soon as possible. There is no cost to attend, but we need to know how much food to order. The workshop will also be broadcast live on the Internet. We are grateful to Microsoft Research for sponsoring the workshop and Internet broadcast. Program ======= Session I: 10:00-11:00 ---------------------- ACME: Toward a LL Testing Framework for Large Distributed Systems Dana Moore and Bill Wright Interactive Web Programming using WASH/CGI Matthias Neubauer Session II: 11:30-12:30 ----------------------- XS: Lisp on Lego MindStorms Taiichi Yuasa Posters and demos -- details will be posted on the web site Session III: 2:00-3:30 ---------------------- Bluespec, Language Support for Next-Generation Hardware Design Rishiyur S. Nikhil The Virtual Machine of Lua Luiz Henrique de Figueiredo Embedding an interpreted language using higher-order functions and types Norman Ramsey Session IV: 4:00-5:00 --------------------- Functional Reactive Programming in Scheme Gregory Cooper Boundaries Dan Sugalski Program Committee ================= Ken Anderson, BBN (co-chair) Jeremy Hylton, Python Software Foundation (co-chair) Geoffrey Knauth, BAE Systems Shriram Krishnamurthi, Brown University Erik Meijer, Microsoft WebData Dan Sugalski, Perl Foundation Greg Sullivan, MIT CSAIL |
From: Ken A. <kan...@bb...> - 2003-10-25 08:01:04
|
I'm sending this again. I think BBN had mailer trouble for a while. At 11:16 AM 10/22/2003 -0400, Matthew W. Bilotti wrote: >Dear JScheme developers, > >We were wondering what this error means. It seems to come up after our >program has been doing what it is supposed to for awhile, and it is >accompanied by no other error message or Java exception. We were hoping >you could shed some light on this: > >Fatal error allocating 12 bytesAborted I have not seen this error before. It may be related to your stack overflow. >Also, in a slightly related question, we were wondering if there is any >way to tell how deep we are recursing or what the limit is. It seems as >if we blow the stack a lot like this: > >> java.lang.StackOverflowError >> at jsint.DynamicEnvironment.getValue(DynamicEnvironment.java:95) >> at >jsint.DynamicVariable.getDynamicValue(DynamicVariable.java:13) >> at jsint.Scheme.execute(Scheme.java:484) >> at jsint.Scheme.execute(Scheme.java:514) >> at jsint.Procedure.makeArgArray(Procedure.java:142) >> at jsint.Scheme.execute(Scheme.java:521) >> at jsint.Scheme.execute(Scheme.java:497) >> * at jsint.Procedure.makeArgArray(Procedure.java:142) >> * at jsint.Scheme.execute(Scheme.java:521) > >Where the two starred lines repeat over and over again a great many times. >Rewriting our procedure iteratively had no effect. I only got it to work >by rewriting it in Java. I am sure there is no hidden infinite recursion >somewhere in our code because it works for a short input. The code also You can run this program to see how deep your stack is: (define (grow n) (set! *n* n) (cons 1 (grow (+ n 1)))) (grow 1) I get *n* to have values between 1050 and 1100. If you write the same program in Java: package using; import jsint.Pair; public class Stack { public static Object grow(int n) { System.out.println(n); return new Pair("1", grow(n+1)); } public static void main(String[] args) { grow(1); } } You get 5600. So your Java version may be working because it makes better use of the stack, or you write it some other way that avoids recursion. While on windows at least, there is a -Xssn command line argument to java that sets the thread stack size, i've not been able to effect the stack size with it. My guess is you're doing something that's recursive, try rewriting it to use tail calls. Send me some code if you need more help. >allocates a lot of data on the heap. Is JScheme efficient with its memory JScheme is as efficient with memory and GC as Java is. >and garbage collection? Do the heap and the stack share memory? Could >this be the problem? We are running with -Xmx1024m. The -Xmx only effects the heap size, not the stack size. >Any insight you have would be greatly appreciated. > >Regards, > >Matthew Bilotti > >-- >matthew w. bilotti >artificial intelligence laboratory >massachusetts institute of technology > > > > >------------------------------------------------------- >This SF.net email is sponsored by OSDN developer relations >Here's your chance to show off your extensive product knowledge >We want to know what you know. Tell us and you have a chance to win $100 >http://www.zoomerang.com/survey.zgi?HRPT1X3RYQNC5V4MLNSV3E54 >_______________________________________________ >Jscheme-devel mailing list >Jsc...@li... >https://lists.sourceforge.net/lists/listinfo/jscheme-devel |
From: Anton v. S. <an...@ap...> - 2003-10-17 18:36:44
|
> At the International Lisp Conference, > http://www.international-lisp-conference.org/ > there was a nice presentation about Linj a Lisp to Java compiler. > The code is not available yet, but there is a nice tutorial: > http://www.evaluator.pt/downloads/tutorial.html > > One of the goals is to make human readable Java code, so your > clients can't tell that you're not programming in Java (though > some suspect that something strange is going on). This got my attention too, although the first thing that went through my head was "pity there's no Scheme version of this!" Anton |