From djp at arqux.com Wed Sep 1 21:49:06 2010 From: djp at arqux.com (Dave Penton) Date: Wed, 1 Sep 2010 21:49:06 -0400 Subject: [r6rs-discuss] Question re trace Message-ID: <73039BC1-04F7-4CFC-A71B-DCA161E1C1EC@arqux.com> I don't know if this list is an appropriate spot to ask a beginner's question. If not, send me to the right place please. I don't see a search function on the list archives, so I'll just ask: What is the status of "trace" in R6RS? I am using the Dybvig book on Scheme to learn, having started last year with Common Lisp. I need to know Scheme for some work pertaining to current topics in my grad program. The Dybvig book refers to the trace function without further explanation. Is this part of the language? I don't see any mention of it in docs on the R6RS website. I can use trace in Chez Scheme, but not for example in Racket (with language set to R6RS). I don't know how to find out why this might be so, what the status of trace is in the language, etc. Best, - Dave - From a.rottmann at gmx.at Thu Sep 2 13:03:29 2010 From: a.rottmann at gmx.at (Andreas Rottmann) Date: Thu, 02 Sep 2010 19:03:29 +0200 Subject: [r6rs-discuss] Question re trace In-Reply-To: <73039BC1-04F7-4CFC-A71B-DCA161E1C1EC@arqux.com> (Dave Penton's message of "Wed, 1 Sep 2010 21:49:06 -0400") References: <73039BC1-04F7-4CFC-A71B-DCA161E1C1EC@arqux.com> Message-ID: <8762yokrha.fsf@delenn.lan> Dave Penton writes: > I don't know if this list is an appropriate spot to ask a beginner's > question. If not, send me to the right place please. I don't see a > search function on the list archives, so I'll just ask: > > What is the status of "trace" in R6RS? > > I am using the Dybvig book on Scheme to learn, having started last > year with Common Lisp. I need to know Scheme for some work pertaining > to current topics in my grad program. > > The Dybvig book refers to the trace function without further > explanation. Is this part of the language? I don't see any mention of > it in docs on the R6RS website. > No, `trace' is not part of R6RS, but most Scheme implementations provide some facility along its lines. > I can use trace in Chez Scheme, but not for example in Racket (with > language set to R6RS). > In Racket, you should be able to use `trace' from the `racket/trace' module, which you can import as follows in R6RS programs: #!r6rs (import (rnrs) (racket trace)) (define (f x) (if (zero? x) 0 (+ 1 (f (- x 1))))) (trace f) (display (f 10)) (newline) ;;-- EOF -- Ikarus, to give another example, has `trace-define' and `trace-lambda', which work a bit differently. > I don't know how to find out why this might be so, what the status of > trace is in the language, etc. > My guess is that it's not standardized since it's a debugging aid, which will not be used in "regular" code, but just during development. Regards, Rotty -- Andreas Rottmann -- From djp at arqux.com Fri Sep 3 09:34:11 2010 From: djp at arqux.com (Dave Penton) Date: Fri, 3 Sep 2010 09:34:11 -0400 Subject: [r6rs-discuss] Question re trace In-Reply-To: <8762yokrha.fsf@delenn.lan> References: <73039BC1-04F7-4CFC-A71B-DCA161E1C1EC@arqux.com> <8762yokrha.fsf@delenn.lan> Message-ID: <38B459BC-52BB-4A00-9CA7-11F8B8CB26DE@arqux.com> On 2010-09-02, at 1:03 PM, Andreas Rottmann wrote: > Dave Penton writes: > >> I don't know if this list is an appropriate spot to ask a beginner's >> question. If not, send me to the right place please. I don't see a >> search function on the list archives, so I'll just ask: >> >> What is the status of "trace" in R6RS? >> >> I am using the Dybvig book on Scheme to learn, having started last >> year with Common Lisp. I need to know Scheme for some work pertaining >> to current topics in my grad program. >> >> The Dybvig book refers to the trace function without further >> explanation. Is this part of the language? I don't see any mention of >> it in docs on the R6RS website. >> > No, `trace' is not part of R6RS, but most Scheme implementations provide > some facility along its lines. > >> I can use trace in Chez Scheme, but not for example in Racket (with >> language set to R6RS). >> > In Racket, you should be able to use `trace' from the `racket/trace' > module, which you can import as follows in R6RS programs: > > #!r6rs > > (import (rnrs) > (racket trace)) > > (define (f x) > (if (zero? x) > 0 > (+ 1 (f (- x 1))))) > > (trace f) > (display (f 10)) > (newline) > ;;-- EOF -- > > Ikarus, to give another example, has `trace-define' and `trace-lambda', > which work a bit differently. > >> I don't know how to find out why this might be so, what the status of >> trace is in the language, etc. >> > My guess is that it's not standardized since it's a debugging aid, which > will not be used in "regular" code, but just during development. > > Regards, Rotty > -- > Andreas Rottmann -- Fantastic. Your sample code worked as intended. I have not yet learned about 'import', module libraries etc. in Scheme or Racket. But I did want to use trace as part of my learning process. Thanks a million. Best, - Dave -