For Programmers: Free Programming Magazines  


Home > Archive > Scheme > May 2004 > Beginers's friendly Scheme IDE









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Beginers's friendly Scheme IDE
aTorres

2004-04-29, 9:12 pm

I the past few ws I have been using DR. SCHEME for windows, as my
principal development platform?. and recently discovered that the code
I was generating at college using MIT?s Scheme is not always correct
in Scheme. That made me thinks of downloading the windows version of
MIT Scheme.

But I really like Dr. Scheme?s UI!

Is there any recommendation? I have already changed the language to
R5RS.
ifconfig

2004-05-04, 3:57 pm

First, can you post an example for code that does not work with DrScheme?
Also, I suggest using DrScheme unless necessary otherwise; all schemes are
different from one another, and I found DrScheme to be the best one for me,
and very good for beginners. Unless your college requires MIT Scheme, I
would stick with PLT.

--

ifconfig
BAGOS
http://bagos.sourceforge.net


"aTorres" <alexis_o_torres@yahoo.com> wrote in message
news:178146e3.0404291607.1ddf8238@posting.google.com...
> I the past few ws I have been using DR. SCHEME for windows, as my
> principal development platform?. and recently discovered that the code
> I was generating at college using MIT?s Scheme is not always correct
> in Scheme. That made me thinks of downloading the windows version of
> MIT Scheme.
>
> But I really like Dr. Scheme?s UI!
>
> Is there any recommendation? I have already changed the language to
> R5RS.



aTorres

2004-05-04, 3:57 pm

Well, one problem I have with Dr. Scheme's Windows version (and not
the Linux one) is when I define an auxiliary function inside of
another function definition.

For example, like in:


; define my own reverse!, with tail recursion
(DEFINE (myReverse lst)
(DEFINE (myReverse-aux curr l)
(cond ((NULL? l) curr)
(else
(myReverse-aux (cons (car l) curr) (cdr l)))))
(myReverse-aux '() lst))

To be able to run this in the Window's Dr. Scheme I
have to separate them,

; reverse
(DEFINE (reverse lst)
(reverse-aux '() lst))

(DEFINE (reverse-aux curr lst)
(cond ((NULL? lst) curr)
(else (reverse-aux (cons (car lst) curr) (cdr lst)))))

Also, it seems Dr. Scheme does not have some of the functions that MIT
Scheme has, like:
reverse! -> although reverse is
square

--
- Alexis

"ifconfig" <dor@ntr.co.il> wrote in message news:<c70k6i$3n9$1@news2.netvision.net.il>...
> First, can you post an example for code that does not work with DrScheme?
> Also, I suggest using DrScheme unless necessary otherwise; all schemes are
> different from one another, and I found DrScheme to be the best one for me,
> and very good for beginners. Unless your college requires MIT Scheme, I
> would stick with PLT.
>
> --
>
> ifconfig
> BAGOS
> http://bagos.sourceforge.net

Terrence Brannon, Scheme Hacker

2004-05-04, 3:57 pm

aTorres wrote:
> Well, one problem I have with Dr. Scheme's Windows version (and not
> the Linux one) is when I define an auxiliary function inside of
> another function definition.
>


you are aware of the plt-scheme mailing list? You can also ask questions about
DrScheme there...

Jens Axel Søgaard

2004-05-04, 3:57 pm

aTorres wrote:

> Well, one problem I have with Dr. Scheme's Windows version (and not
> the Linux one) is when I define an auxiliary function inside of
> another function definition.
>
> For example, like in:
>
> ; define my own reverse!, with tail recursion
> (DEFINE (myReverse lst)
> (DEFINE (myReverse-aux curr l)
> (cond ((NULL? l) curr)
> (else
> (myReverse-aux (cons (car l) curr) (cdr l)))))
> (myReverse-aux '() lst))


You must remember that DrScheme supports several different languages.
Local definitions is not allowed in the first teaching languages.
In the advanced teaching language, local definitions are allowed, but
you have to use the LOCAL form.

(define (myReverse lst)
(local ((define (myReverse-aux curr l)
(cond
[(NULL? l) curr]
[else (myReverse-aux (cons (car l) curr)
(cdr l))])))
(myReverse-aux '() lst)))

> Also, it seems Dr. Scheme does not have some of the functions that MIT
> Scheme has, like:
> reverse! -> although reverse is
> square


Again, the teaching languages does not have REVERSE! (they do have REVERSE).

If you follow SICP you change the language used (in the "Scheme" menu),
but if you are using HTDP then stick to the language settings recommended
in the book.

--
Jens Axel Søgaard

bernard

2004-05-04, 3:57 pm

Xref: kermit comp.lang.scheme:42861

On 1 May 2004 23:08:38 -0700
alexis_o_torres@yahoo.com (aTorres) wrote:

> Well, one problem I have with Dr. Scheme's Windows version (and not
> the Linux one) is when I define an auxiliary function inside of
> another function definition.
>
> For example, like in:
>
>
> ; define my own reverse!, with tail recursion
> (DEFINE (myReverse lst)
> (DEFINE (myReverse-aux curr l)
> (cond ((NULL? l) curr)
> (else
> (myReverse-aux (cons (car l) curr) (cdr l)))))
> (myReverse-aux '() lst))
>


try

(DEFINE (myReverse lst)
(letrec ((myReverse-aux (lambda(curr l)
(cond ((NULL? l) curr)
(else
(myReverse-aux
(cons (car l) curr) (cdr l)))))))
(myReverse-aux '() lst)))

it works with a lot of scheme, if not all (MIT, DR ...)

Bernard
aTorres

2004-05-04, 3:57 pm

Thanks to all for the recommendations...

I have done what was suggested, and it worked! I can finally make code
that runs in both: my college?s MIT Scheme (which I am required to
use) and Dr. Scheme (the one I have at home and which I prefer).

- Alexis
Shriram Krishnamurthi

2004-05-04, 3:57 pm

Hi,

The problems you've been having are an artifact of DrScheme's
"language levels". Go to the DrScheme "tour" on this Web page

http://www.drscheme.org/tour/

and read the prose in red. It should solve your problem.

Thanks for your interest in DrScheme.

Shriram
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com