Skip to main content

Questions tagged [chez-scheme]

Use this tag for questions about the Chez-Scheme dialect of the Scheme programming language.

chez-scheme
0 votes
2 answers
56 views

Why is (atom? (car '('bacon 'and 'eggs))) different from (atom? 'bacon) in ChezScheme?

I'm going through The Little Schemer in ChezScheme and in chapter 2 I run through the following problem. I write the definition of lat? according to the book. (define lat? (lambda (l) (...
user25245804's user avatar
2 votes
1 answer
126 views

Encode "ä", "ö", "ü" and "ß" in scheme (get german text from file)

I'm new to scheme and try to build a simple application in scheme. I want to use simple text files as a database, so the program basically load text from a file, do something with it and save the ...
Sem-Joe's user avatar
  • 21
1 vote
1 answer
123 views

Chez Scheme FFI Procedure Doesn't Work After Change to Apple Silicon

I have been using a simple piece of FFI code in Chez Scheme to obtain the number of rows and columns of the terminal emulator where a program is running. The procedure used to work when running with ...
clartaq's user avatar
  • 5,362
1 vote
0 answers
85 views

In Scheme, is there a built-in function called "ref"?

In Scheme, is there a built-in function called "ref"? I am reading "The Little Learner" and came across the following code: (define line (lambda (x) (lambda (θ) (+ (* (...
clark's user avatar
  • 11
0 votes
0 answers
32 views

Chezscheme says "Exception: attempt to apply non-procedure #<void>" when I tried to print a pascal triangle [duplicate]

I'm new to scheme and I'm learning sicp. I'm working on exercise 1.12 and tried to print a pascal triangle with the code below. Cause I don't know much about scheme IO, I only used display procedure. (...
Van Young's user avatar
1 vote
1 answer
144 views

Why is my (chez) scheme symbol not visible when running with --program, but is with --script?

I'm trying to get my head around using Chez Scheme and running programs with it, and I encountered a thing I can't quite make sense of. Lets say I wanted to have a scheme program that did some stuff, ...
Oskar's user avatar
  • 899
1 vote
0 answers
341 views

Compatibility with both Chez and Chicken Scheme

I'm trying to write a program compatible with both Chez and Chicken Scheme. Starting with something maximally simple: (c1) R:\>type hello.ss (display "hello, world\n") (c1) R:\>csc ...
rwallace's user avatar
  • 32.7k
2 votes
1 answer
204 views

How to find line causing exception in Chez Scheme

I have a couple of files written in Chez Scheme, each about a thousand lines. When I try to load a file into the REPL: > (load "filexxx.scm") ... Exception: variable A is not bound Type (...
brj's user avatar
  • 373
0 votes
1 answer
114 views

How and when to use ChezScheme's timer interrupt?

The document of Chez mentioned set-timer and timer-interrupt-handler, but how to "kick off" or combine them? Is it used to implement things like periodic events or just some delayed ...
shenlebantongying's user avatar
0 votes
2 answers
144 views

How can I run scheme?

1( import ( chezscheme ) ) 2 3 4 ( define ( bigger a b ) 5 ( if ( > a b ) 6 a 7 b 8 ) 9 ) 10 11 ( define ( smaller a b ) 12 ( if ( < a b ) ...
Marcos's user avatar
  • 111
1 vote
2 answers
113 views

Literals in syntax-rules don't work in libraries in Scheme

I want to define new syntax. If I define it without a library, just (define-syntax sample1 (syntax-rules (:times) [(_ n :times body ...) (list n (sample1 body ...))] [(c body ...) '...
VOID404's user avatar
  • 35
0 votes
2 answers
281 views

Capturing the output of an external call as a string (in Chez Scheme)

Using Chez Scheme, I tried to capture the output of an external command into a string port (see https://www.scheme.com/csug8/io.html): (define output (with-output-to-string (lambda () (system "...
AlQuemist's user avatar
  • 1,206
1 vote
2 answers
590 views

A question about cond expressions in Scheme

With Chez Scheme version 9.5.5, consider the two examples of cond: (cond #t (else 2)) (cond (> 2 1) (else 2)) The first expression evaluates to #t, while the second expression evaluates to 1. It ...
John Z. Li's user avatar
  • 1,955
0 votes
0 answers
141 views

Mixed programming between scheme and C

I'm reading the CSUG to learn the FFI of chez-scheme. So I may have some beginner's error. I just want to know is there some question of FFI. C have some type of data, just like char, float, double, ...
Novice's user avatar
  • 1
0 votes
1 answer
101 views

Is it possible to get the current raise continuation in debug mode in Chez-Scheme?

I have the following program: debugging.scm (define (fn1 x) (printf "fn1/ x=~a\n" x) (fn2 x) (printf "fn1/ end\n")) (define (fn2 x) (printf "fn2/ x=~a\n" ...
chansey's user avatar
  • 1,399

15 30 50 per page
1
2 3 4 5
7