[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Optimal C

From: Rick R
Subject: Re: [Chicken-users] Optimal C
Date: Sun, 22 Feb 2009 16:56:07 -0500

Thanks! This is exactly what I was looking for. I've been playing with
it a bit, and I've run into a few snags.

1. crunch.h wasn't created/copied it my std include. I had to
chicken-setup -keep and go to the directory.
The file is named "include". I'm guessing that the script expected
there to be a local directory named include but it didn't exist, so
`mv crunch.h include` failed in such a manner.

2. I tried compiling the example at the bottom of the page at and it failed with:
Error: name used in bad context
(#(define 0 6) string-reverse (#(lambda 1 5) (str) (#(let-syntax 2 7)
() (let* ((n (string-length str)) (s2 (make-string n #\space))) (do
((i 0 (add1 i))) ((>= i n)) (string-set! s2 (sub1 (- n i)) (string-ref
str i))) s2))))

I tried some simpler examples and got the same result.

$ csc -V

(c)2008 The Chicken Team
(c)2000-2007 Felix L. Winkelmann
Version 3.4.0 - linux-unix-gnu-x86      [ manyargs dload ptables applyhook ]
SVN rev. 11987  compiled 2009-02-21 on rick-desktop (Linux)


On Sun, Feb 22, 2009 at 12:12 PM, Thomas Chust <address@hidden> wrote:
> 2009-02-22 Rick R <address@hidden>:
>> I have been looking for a functional language that compiles to efficient
>> C/C++ to fufill two rather odd criteria.
>> [...]
> Hello Rick,
> you may want to have a look at crunch (,
> which is a restricted dialect of Scheme that can be compiled to
> relatively clean C++ and uses reference counting for memory
> management.
> cu,
> Thomas
> --
> When C++ is your hammer, every problem looks like your thumb.

We can't solve problems by using the same kind of thinking we used
when we created them.
    - A. Einstein

reply via email to

[Prev in Thread] Current Thread [Next in Thread]