Questions tagged [chez-scheme]

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

The Chez Scheme compiler, interpreter and REPL is an R6RS compliant Scheme programming language compiler and interpreter. Written primarily by R. Kent Dybwig, formerly professor (now professor emeritus) at Indiana University, now currently at Cisco. The compiler was previously a commercial product, but has been "open-sourced" under an Apache license.

88 questions
0
votes
1 answer

Racket Settings and Libraries for Working Through Dorai Sitaram's Teach Yourself Scheme in Fixnum Days?

I am trying to brush up on Scheme by going through Dorai Sitaram's Teach Yourself Scheme in Fixnum Days. Problem is the syntax used by that tutorial deviates from current Scheme syntax, particularly with regards to macros and structs. Is there a way…
haziz
  • 12,994
  • 16
  • 54
  • 75
0
votes
1 answer

Previous result in Chez Scheme

In the Chez Scheme REPL, is it possible to get the previous result? For example in ruby's irb repl, underscore can be used. For example can I do the following? > (+ 2 3) 5 > (+ 1 ) And get 6?
kristianp
  • 5,496
  • 37
  • 56
0
votes
1 answer

Macros for generating functions

I'm trying to write some macros for constraint programming on integers and specifically I'm trying to expand (int-constr (x y z) (< 10 (+ (* x 4) (* y 5) (* z 6))) (> 10 (+ (* x 1) …
user9937189
0
votes
0 answers

scheme - display won't print on screen in a recursive function

I have the function getBoundedVars which uses the function boundsInLambda. In the end of it all the box bBox should contain all bounded variables in the expression exp. I'm trying to debug this function and in order to do so I want to print the…
Tamarcuse
  • 53
  • 1
  • 6
0
votes
1 answer

scheme- writing a foldl /fold-left like function that works on first 3 items of the given list

I would like to write a function that gets and infix expression and changes it to prefix. at first let's assume we only deal with + operator, so I want to change the expression 1+1+1 into: (+ (+ 1 1) 1) I want to do it using foldl or foldl-like…
Tamarcuse
  • 53
  • 1
  • 6
0
votes
1 answer

Emacs, Geiser and Chez Scheme with transcript-on

I am working my way through Dybvig's "The Scheme Programming Language" book. I am using Chez Scheme 9.4.1 as my REPL. I am running said REPL within Emacs using Geiser. Chez Scheme has a transcript-on function that records the input and output of the…
haziz
  • 12,994
  • 16
  • 54
  • 75
0
votes
2 answers

chez scheme - load-shared-object based on platform

The OpenGL library for Chez Scheme (currently only setup for Linux) loads the GLUT library as follows: (define no-op (load-shared-object "libglut.so.3")) Here's a link to that code. Of course, we'd like the library to load libglut.so.3 on Linux but…
dharmatech
  • 8,979
  • 8
  • 42
  • 88
0
votes
1 answer

Petite chez scheme confusing function with variable? (variable ___ is not bound)

I've just started learning Scheme and I'm having some trouble. I am using petite chez scheme (64-bit) with Windows. I have been reading up on examples using the functions 'every' , 'keep' and 'accumulate' , which I understand are built in and known…
0
votes
1 answer

use chez scheme to execute current s-expression

I want to pass the current line of s-expression to scheme interpreter and execute it , how should I do ? I use Chez Scheme Petite as the interpreter , however , if I pass a file to it , it just sets up the environment , I just want to pass the code…
wlz
  • 563
  • 1
  • 4
  • 9
0
votes
1 answer

compile package is not loaded in chez scheme

I have installed petite chez scheme and used a .el config file as follows- my .emacs file: (add-to-list 'load-path "/home/lambda/slime-2013-04-05") ; your SLIME directory (setq inferior-lisp-program "/usr/bin/clisp") ; your Lisp system …
category
  • 2,113
  • 2
  • 22
  • 46
0
votes
2 answers

Petite Chez Scheme (threaded) what is the difference between the two lists?

In Petite Chez Scheme (threaded) . I defined two lists named myq and myqq. (define make-queue (lambda () (let ((end (cons 'ignored '()))) (cons end end)))) (define myqq (make-queue)) (define myq '((ignored) ignored)) ;this shows…
tcpiper
  • 2,456
  • 2
  • 28
  • 41
0
votes
2 answers

How to run (interpret) a Scheme program stored in a file?

At the moment I am using the REPL-feature of Petite-Chez Scheme. This is working fine for small examples etc. However, how can I store an entire program in a file ".scm", and then run (interpret) it from the command-line ? I am familiar with the…
Shuzheng
  • 11,288
  • 20
  • 88
  • 186
-1
votes
1 answer

Issue unbound variable in chez scheme

I am defining a function replaceOccurrence that replaces the first occurrence of either of two symbols. I don't understand why list variable is not bound Chez Scheme Version 9.5 (define replaceOcurrence (λ (new ocurrence1 ocurrence2 lista) …
1 2 3 4 5
6