Questions tagged [r6rs]

The 6th Revised Report on the Algorithmic Language Scheme.

The 6th Revised Report on the Algorithmic Language Scheme was completed in 2007 and is intended to be the latest standard for implementations of the Scheme language. However, there was significant dissent among the Scheme community (informed arguments for and against can be read here), with the development teams of some Scheme compilers refusing to adopt the standard.

61 questions
30
votes
6 answers

Can someone explain the concept of 'hygiene' to me (I'm a scheme programmer)?

So... I'm new to scheme r6rs, and am learning macros. Can somebody explain to me what is meant by 'hygiene'? Thanks in advance.
Cam
  • 14,930
  • 16
  • 77
  • 128
26
votes
2 answers

As of 2016, is there a Scheme implementation which supports 100% of R7RS (small) with no deviations?

I am willing to learn Scheme. I want to stick to R7RS since it's the last standard. However, it seems that there is a lot of fragmentation on the Scheme current implementations, and most of them staying at R5RS or part of R6RS. The only one I have…
15
votes
1 answer

R6RS vs. R5RS scheme

I'm relatively new to scheme and am having a hard time finding a concrete document online overviewing the major changes that happened with R6RS. Anyone care to elaborate?
Chris Bolton
  • 2,878
  • 6
  • 38
  • 57
15
votes
1 answer

Differences between Guile Scheme and Standard Scheme (in Racket IDE)?

I've got a bunch of "legacy" Guile Scheme code that I want to get running in the Racket Scheme IDE. There appear to be enough differences to make this a non-trivial exercise. (My level of Scheme knowledge is the level to complete the The Little…
hawkeye
  • 34,745
  • 30
  • 150
  • 304
12
votes
1 answer

difference between free-identifier=? and bound-identifier=?

Trying to understand free-identifier=? and bound-identifier=?. Can anyone give me equivalent code examples where using free-identifier=? would return true and using bound-identifier=? would return false. Thanks
jahhaj
  • 763
  • 4
  • 9
11
votes
7 answers

Scheme pass-by-reference

How can I pass a variable by reference in scheme? An example of the functionality I want: (define foo (lambda (&x) (set! x 5))) (define y 2) (foo y) (display y) ;outputs: 5 Also, is there a way to return by reference?
Cam
  • 14,930
  • 16
  • 77
  • 128
9
votes
2 answers

Is there a digest for different "RnRS" Scheme standards?

I need to choose a Scheme standard for an academic compiler implementation. It has to be simple enough, but should still be a powerful language. There are several (RRS–R7RS) standards of Scheme. Is there a public comparison of these reports for…
Necto
  • 2,594
  • 1
  • 20
  • 45
7
votes
2 answers

In R6RS Scheme, is there a way to get the current environment for use with eval?

Is there any way in R6RS Scheme to obtain the current environment and then pass it as the second argument to eval? For example, what should the question marks be for the following expression to return 9? (let ((x 4) (y 5)) (eval '(+ x y)…
Matt
  • 21,026
  • 18
  • 63
  • 115
6
votes
1 answer

Chez Scheme: macro import at top level

I'm running Chez Scheme 9.5 and am trying to define a syntax transformer in a library. Here's an example: (library (forlib) (export for) (import (rnrs (6))) (define-syntax for (syntax-rules (in) [(for x in lst body1 body2 ...) …
5
votes
6 answers

Is it possible to "extend" a function / lambda / macro in Scheme?

For example: if I want the function equal? recognize my own type or record, can I add a new behavior of equal?? without erasing or overwriting the old one? Or for example if I want to make the function "+" accept also string?
Felipe
  • 16,649
  • 11
  • 68
  • 92
5
votes
1 answer

What's the difference between R6RS's `letrec`, `letrec*` and Racket's `letrec`?

Both letrec and letrec* are in R6RS, but there's only letrec in Racket, no letrec*. What are the differences between these?
Ben
  • 3,612
  • 3
  • 19
  • 24
5
votes
1 answer

How to catch syntax exception

I want to extend srfi-78 by a macro that tests for syntax exception. I want something like this: #! /usr/bin/env scheme-script #!r6rs (import (rnrs) (srfi :78 lightweight-testing)) ; the macros I want to test (define-syntax some-macros …
amakarov
  • 524
  • 3
  • 16
4
votes
2 answers

Platform (OS) detection in scheme

That must be something like that : (if (= system-type 'gnu/linux) (system "make")) To be honest I think my scheme implementation even can't do it in anyways but I'm free to add realization for it. What is usual scheme syntax for Platform…
cnd
  • 32,616
  • 62
  • 183
  • 313
4
votes
2 answers

Scheme to C translator

I tried to generate C code starting from a scheme function and I do not manage to find any translator from scheme to C. I tried to convert this function to C. (define f (lambda(n) (if (= n 0) 1 (* n (f (- n 1)))))) (display (f…
alinsoar
  • 15,386
  • 4
  • 57
  • 74
4
votes
1 answer

Code a continuation that does nothing

Maybe my question has a really simple answer, but I cannot find it. In Scheme R6RS how can I built a continuation that does nothing and requires any arguments? My goal is to have a continuation, let's name it QUIT such that if I have the following…
Aslan986
  • 9,984
  • 11
  • 44
  • 75
1
2 3 4 5