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
3
votes
1 answer

Can executable size be optimized?

I have created executable of following code in Racket (choosing Racket and not GRacket): #lang racket (print "Hello World!") It creates a tgz of 3.6 mb with an executable of 6.2 mb. This seems very large for this simplest program. Executable…
rnso
  • 23,686
  • 25
  • 112
  • 234
3
votes
1 answer

How to statically link a Chicken Scheme program that uses extensions?

I have need to compile and statically link a Chicken program. I expect to use many extensions, most notably http-client. I can compile the source with the following command: csc -compile-syntax -static linux-setup.scm or csc -R http-client…
Sod Almighty
  • 1,768
  • 1
  • 16
  • 29
3
votes
2 answers

Default argument in scheme lambda function?

I recently started using ChickenScheme and now I want to declare a function with default argument (if not specified). I found this example on the Racket site, I know Racket and ChickenScheme are different but I thought that these basic things were…
Andrea Ciceri
  • 436
  • 6
  • 16
3
votes
1 answer

Chicken scheme (use) and (import) in modules not working

I've experienced this problem in several projects, but this test case removes everything that is unecessary to understanding the problem. I've been using it to figure out what's wrong: So I have a directory with 2 files in it, foo.scm, and…
3
votes
1 answer

Differences between csi and csc (Chicken Scheme)

Why is the function compose defined in the interpreter csi and not in the compiler csc? I know I can easily define it by myself, but I was just wondering why there is such a difference.
Matteo
  • 539
  • 3
  • 9
3
votes
1 answer

Complex numbers in chicken scheme

Why in chicken scheme by default (i.e., without loading extensions such as the numbers egg) are defined the procedures real-part, imag-part, angle, magnitude, complex? but there aren't make-rectangular and make-polar? What should I do with them, if…
Matteo
  • 539
  • 3
  • 9
3
votes
1 answer

Unbound variable error when loading a procedure from an external file

I'm using Chicken Scheme 4.9.0.1 on a Cloud9 hosted workspace, built from source. I was trying it out with this (I mostly code with python, so I apologize for the weird parens syntax): (define load-module (lambda (filepath) (begin …
3
votes
2 answers

Namespaces in Chicken Scheme

How do namespaces work in Chicken Scheme? I am now using the parley egg, and when I define a function with the name e.g. read, that causes an error because of name clashing (actually, because my read overwrites parley's own read, and it is invoked…
Sergi Mansilla
  • 12,495
  • 10
  • 39
  • 48
3
votes
1 answer

Does a syntax-rules expression by itself evaluate to a value in Scheme?

In Chibi and CHICKEN, the following syntax-rules expression evaluates to a procedure: (syntax-rules () ((_) #f)) Is this just an artifact of how these particular implementations are written? The Scheme language specs do not seem to call out…
Justin Ethier
  • 131,333
  • 52
  • 229
  • 284
3
votes
1 answer

How to load accessory files in compiled code, Chicken Scheme

I'm currently working on a set of utilities, written in Chicken Scheme, and this is the first time I've tried writing a multi-file based program (or set of programs) in Chicken Scheme, and I'm having some trouble figuring out how to utilize code…
Alexej Magura
  • 4,833
  • 3
  • 26
  • 40
3
votes
2 answers

Converting a list to a circular list in Chicken scheme?

In trying to find how to convert such a list, I came across Scheme streams and circular lists. However, that answer requires features in Racket not available in Chicken scheme. Can Anyone point Me in the direction of how to do this in Chicken scheme…
xuinkrbin.
  • 975
  • 2
  • 7
  • 17
2
votes
3 answers

Nested ellipsis macro doesn't work in Guile and Racket

I'm trying to create a simple nested macro. It works in my Scheme implementation, but fails to run in Guile and Racket. (define-syntax foo (syntax-rules (:c) ((_ x ...) (let-syntax ((bar (syntax-rules ::: (:c) ((_…
jcubic
  • 61,973
  • 54
  • 229
  • 402
2
votes
0 answers

Calling Chicken Scheme function from SDL2 audio callback function hangs

I am trying to embed Chicken Scheme into a C program, to generate sounds to be played with SDL2's audio system. I would have liked to use the sdl2 egg, but it does not seem to support Audio yet (despite the documentation mentioning the 'audio flag…
Billy Brown
  • 2,272
  • 23
  • 25
2
votes
1 answer

List to pattern conversion in matchable (Chicken scheme)

I have a list of patterns, how can I convert them to fit into the match function? (use matchable) (define prop '(and (#t #t) #t)) (define patt '(and (X Y) Z)) ;;here is the pattern example (match prop [('and (X Y) Z) (list X Y Z)])) ;;(#t #t #t)…
shuji
  • 7,369
  • 7
  • 34
  • 49
2
votes
1 answer

Can't load any egg when embedding Chicken Scheme library into C project

I'm working on a chicken library that I use in a C project. When I try to load eggs (e.g. (use intarweb)), the runtime complains about failing to load the egg. (lldb) run Error: (require) cannot load extension: intarweb Call history: …
Antoine
  • 1,782
  • 1
  • 14
  • 32
1 2
3
12 13