Questions tagged [chicken-scheme]

CHICKEN is a compiler for the Scheme programming language.

CHICKEN is a compiler for the Scheme programming language. CHICKEN produces portable, efficient C, supports almost all of the R5RS Scheme language standard, and includes many enhancements and extensions. CHICKEN runs on Linux, MacOS X, Windows, and many Unix flavours.

Important Links

185 questions
4
votes
1 answer

Chicken Scheme - Error: unbound variable: chicken-home

I'm trying to install with scheme with emacs + geiser, and get on the geiser: Starting Geiser REPL for chicken ... process-lines: ~/lisp/chicken/bin/csi exited with status 70 so I remembered that I forgot to configure what was requested…
PerduGames
  • 1,108
  • 8
  • 19
4
votes
2 answers

Data Structures in Scheme

I am learning Scheme, coming from a background of Haskell, and I've run into a pretty surprising issue - scheme doesn't seem to have custom data types??? (ie. objects, structs, etc.). I know some implementations have their own custom macros…
4
votes
3 answers

What is the benefit to use let-values instead of let?

The instance in my mind is this: what is better? Example 1: (define (foo x) ... (values a b c)) (let-values (((a b c) (foo 42))) ...) Example 2: (define (foo x) ... (list a b c)) (let ((f (foo 42))) (let ((x (first f)) (y (second…
Andrea Ciceri
  • 436
  • 6
  • 16
4
votes
2 answers

let-over-lambda in Scheme?

In Common Lisp, if I want two functions to share state, I would perform a let over lambda as follows: (let ((state 1)) (defun inc-state () (incf state)) (defun print-state () (format t "~a~%" state)) These functions are not local to the let -…
Sod Almighty
  • 1,768
  • 1
  • 16
  • 29
4
votes
1 answer

How to add indentation an inferior scheme (REPL) in emacs?

I'm using Chicken-scheme.I use M-x run-scheme to start a scheme repl, and then I use things like C-c C-l to test my work. However, this is an indentation nightmare. Things generally look like this: > (+ 1 (* 2 3) 4) instead of the desired: > (+ 1 …
Lara
  • 2,594
  • 4
  • 24
  • 36
4
votes
2 answers

filter unbound in chicken scheme. Why?

I'm starting out with chicken scheme. The code below works in the mit-scheme repl but doesn't with csi. csi has filter defined in the docs but I get an unbound variable error when I run the code below. CHICKEN (c) 2008-2015, The CHICKEN…
Brian Yeh
  • 3,119
  • 3
  • 26
  • 40
4
votes
2 answers

How to create a list of lists in scheme?

I may have missed this in the R5RS document but how do I create a list of lists in (Chicken) Scheme? I want to be able to take a list, a, invoke (list-ref a b), assign the result to c, and then invoke (list-ref c d), where b and d are index…
xuinkrbin.
  • 975
  • 2
  • 7
  • 17
4
votes
1 answer

how to access the keys in a multidimensional hash table in scheme?

I have a hash table in Chicken Scheme the hash table has keys with values corresponding to those keys are hashes with corresponding values of hashes again. The keys of the "inner hashes" have corresponding values which are strings. (For Those…
xuinkrbin.
  • 975
  • 2
  • 7
  • 17
4
votes
1 answer

How do I use an egg in a compiled environment?

This is a follow up to my previous question. It seems, unfortunately, that Chicken Scheme, by default, doesn't support complex numbers, but rather offers a numbers egg that can be installed. I have installed this egg, via chicken-install numbers,…
Miguel
  • 1,966
  • 2
  • 18
  • 32
4
votes
1 answer

Does Chicken Scheme support complex numbers? If so, why am I getting this error?

I just started learning a little Scheme, and I'm using Dorai Sitaram's Teach Yourself Scheme in Fixnum Days. In said work it is stated: Scheme numbers can be integers (eg, 42) ... or complex (2+3i). Emphasis mine. Note the form. Using the…
Miguel
  • 1,966
  • 2
  • 18
  • 32
4
votes
3 answers

Is everything a list in scheme?

Along with the book "Simply Scheme" (Second Edition) i'm watching the "Computer Science 61A - Lectures" on youtube. On the lectures , the tutor uses Stk interpreter, but i'm using chicken scheme interpreter. In the first lecture he uses the "first"…
spk
  • 153
  • 9
4
votes
1 answer

Creating a db in chicken scheme

I would like to ask if it is possible to create a db in chicken scheme; something analogous to this: http://www.gigamonkeys.com/book/practical-a-simple-database.html If it is then what predicates do i have to read/search for? Should i use an egg? In…
spk
  • 153
  • 9
3
votes
1 answer

eval macro Unbound variable (CHICKEN Scheme)

I'm trying to eval a list with variables inside a macro function that defines a variable in a lambda but the eval in it can't (define-syntax MYVAR (syntax-rules () [(_ varname value body ...) ((lambda (varname) body ...)…
shuji
  • 7,369
  • 7
  • 34
  • 49
3
votes
0 answers

Issue compiling Chicken files in Geiser/Emacs

I installed Geiser in Emacs. In a scheme buffer, if I run C-c C-s, I can choose Chicken as the implementation. If I run C-c C-z, it starts an REPL and switches to it. My buffer seems to be correctly linked to the REPL. However, if I hit C-c C-c on a…
Gradient
  • 2,253
  • 6
  • 25
  • 36
3
votes
1 answer

What is the difference between these macros?

I have some questions about how macros work in Scheme (specifically in Chicken Scheme), let's consider this example: (define (when-a condition . body) (eval `(if ,condition (begin ,@body) '()))) (define-syntax when-b …
Andrea Ciceri
  • 436
  • 6
  • 16
1
2
3
12 13