Re: [Chicken-users] Using csc with clang

2012-10-03 Thread Jim Ursetto
Upgrade to 4.7.0.6 or 4.8.0, the fix to work with clang wasn't in until after 
4.7.0.  4.6.0 is very old at this point.

Also I would build chicken with make PLATFORM=linux C_COMPILER=clang and then 
all your eggs and code will automatically be built with clang.  I doubt it is 
safe to use -cc clang just for one file.

On Oct 3, 2012, at 8:08 AM, bn wrote:

 Hello,
 
 I'd like to know if it is possible to use csc with clang as a C compiler. I 
 started with a simple scheme program hello,scm
 (write 42)
 csc hello.scm compiled fine and really printed 42 !
 csc -cc clang hello.scm
 also compiled fine but the resulting executable did nothing
 but to use almost 100% CPU.
 
 I tested this on Linux/Ubuntu with
 csc
 Version 4.6.0
 linux-unix-gnu-x86-64 [ 64bit manyargs dload ptables ]
 compiled 2011-05-01 on crested (Linux)
 
 and clang
 clang version 2.9 (tags/RELEASE_29/final)
 Target: x86_64-pc-linux-gnu
 Thread model: posix
 
 as well as on Windows 7 with cygwin.
 
 Any idea what's wrong?
 
 Burkhard
 
 ___
 Chicken-users mailing list
 Chicken-users@nongnu.org
 https://lists.nongnu.org/mailman/listinfo/chicken-users


___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] chicken-4.8.0rc4 on Solaris / SPARC - shell and rt lib issues

2012-09-18 Thread Jim Ursetto

On Sep 18, 2012, at 10:32 AM, Claude Marinier wrote:

 Hi,
 
 Just finished building 4.8.0 rc4 on Solaris 10 (SPARC) with only a few hacks.
 The check runs and finishes with this.
  done.
 make[1]: Leaving directory `/usr/local/src/chicken-4.8.0rc4'
 I assume it is happy.

Yes.

 Is finalizer-error-test.scm expected to emit a warning?
 Warning: in finalizer: unbound variable: i

Yep.  On failure it will error out and stop the tests.

 I am still having problems with the shell: the default shell on Solaris is 
 the Bourne shell.
 Would you like a list of errors and the hacks to get around them?

Not a bad idea, please do if it is no trouble.

However, what if the runtests.sh shebang line were changed
to #!/bin/bash instead?

Jim
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Debian chicken 4.7.0.6 : tests/finalizer-error-test.scm fails

2012-09-13 Thread Jim Ursetto
Claude,
I'm guessing you didn't install chicken first prior to running the tests.
The finalizer error only occurs with older chickens.  I can't reproduce
the problem with

  make PLATFORM=blah PREFIX=$PWD/tmp all install check

On Sep 13, 2012, at 8:40 AM, Claude Marinier wrote:

 IBM ThinkCenter, Debian Squeeze (updated regularly)
 gcc (Debian 4.4.5-8) 4.4.5
 chicken 4.7.0.6
 
 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 
 10 9 8 7 6 5 4 3 2 1 0
 Error: unbound variable: i
 
 Call history:
 
 finalizer-error-test.scm:9: print*  
 finalizer-error-test.scm:9: print*  
 finalizer-error-test.scm:9: print*  
 finalizer-error-test.scm:9: print*  
 finalizer-error-test.scm:9: print*  
 finalizer-error-test.scm:9: print*  
 finalizer-error-test.scm:9: print*  
 finalizer-error-test.scm:9: print*  
 finalizer-error-test.scm:9: print*  
 finalizer-error-test.scm:9: print*  
 finalizer-error-test.scm:9: print*  
 finalizer-error-test.scm:9: print*  
 finalizer-error-test.scm:9: print*  
 finalizer-error-test.scm:9: print*  
 finalizer-error-test.scm:9: print*  
 finalizer-error-test.scm:9: print*  --
 make[1]: *** [check] Error 70
 make[1]: Leaving directory `/usr/local/src/chicken-4.7.0.6'
 make: *** [check] Error 2
 
 -- 
 Claude
 ___
 Chicken-users mailing list
 Chicken-users@nongnu.org
 https://lists.nongnu.org/mailman/listinfo/chicken-users


___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Building Chicken on OS X Lion

2012-09-13 Thread Jim Ursetto
Hans,
I've verified that chicken 4.7.0.6 builds, installs and tests out correctly on 
Lion
with Xcode 4.4.1.  It works fine with either gcc or clang.  Here is my test 
line:

make PLATFORM=macosx PREFIX=$PWD/inst C_COMPILER=clang all install check

From your paste, it looks like you're not providing a PREFIX.  Can you try it 
with
a prefix, even a temporary one, such as $PWD/inst or ~/local/chicken?  Sometimes
we get strange hangs on install when you have an older (quite a bit older) 
version of
chicken already installed in the PREFIX, or hanging out somewhere weird on your
system where it's in the dynamic linker path and interfering with the install.

So I would try a temporary prefix and also, try to hunt down old
versions of chicken shared libraries hanging out on your disk.

I attached the version output of xcodebuild, clang, gcc and ld I used.

Jim

Xcode 4.4.1
Build version 4F1003

Apple clang version 4.0 (tags/Apple/clang-421.0.60) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin11.4.0
Thread model: posix

Using built-in specs.
Target: i686-apple-darwin11
Configured with: /private/var/tmp/llvmgcc42/llvmgcc42-2336.11~28/src/configure 
--disable-checking --enable-werror 
--prefix=/Applications/Xcode.app/Contents/Developer/usr/llvm-gcc-4.2 
--mandir=/share/man --enable-languages=c,objc,c++,obj-c++ 
--program-prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ 
--with-slibdir=/usr/lib --build=i686-apple-darwin11 
--enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2336.11~28/dst-llvmCore/Developer/usr/local
 --program-prefix=i686-apple-darwin11- --host=x86_64-apple-darwin11 
--target=i686-apple-darwin11 --with-gxx-include-dir=/usr/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)

@(#)PROGRAM:ld  PROJECT:ld64-133.3
configured to support archs: armv6 armv7 i386 x86_64
LTO support using: LLVM version 3.1svn, from Apple Clang 4.0 (build 421.0.60)

On Aug 31, 2012, at 7:31 AM, Hans Nowak wrote:

 Hi,
 
 I am still having problems building/installing Chicken on OS X Lion, even 
 with the new version 4.7.0.6 and 4.8rc2.
 
 Here is a paste of the output when I do make install; it hangs at loading 
 import libraries.
 
 http://paste.call-cc.org/paste?id=a7fd2260fb3540a24db2fbd703607a0555446589
 
 I am probably doing something wrong, or have the wrong version of something 
 or another, but what?
 
 Any tips welcome.
 
 Thanks,
 
 --
 Hans Nowak
 
 
 ___
 Chicken-users mailing list
 Chicken-users@nongnu.org
 https://lists.nongnu.org/mailman/listinfo/chicken-users

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Building Chicken on OS X Lion

2012-08-31 Thread Jim Ursetto
I hope this is not a problem with XCode 4.4.1.  I haven't upgraded
from XCode 4.3.2 yet.  Anyone else have a successful build with 4.4.1?

In the meantime if you have some time to kill, you could try building
with C_COMPILER=clang.  I doubt this will make a difference though.
I will try to upgrade shortly and see if I can reproduce the problem.

On Aug 31, 2012, at 11:57 AM, Hans Nowak wrote:

 On 8/31/12 11:16 AM, Stephen Eilert wrote:
 
 Have you got homebrew? It just works for me.
 
 == Downloading
 http://code.call-cc.org/releases/4.7.0/chicken-4.7.0.6.tar.gz
 
 100.0%
 == make PREFIX=/usr/local/Cellar/chicken/4.7.0.6 http://4.7.0.6
 PLATFORM=macosx C_COMPILER=cc ARCH=x86-64
 == make install PREFIX=/usr/local/Cellar/chicken/4.7.0.6
 http://4.7.0.6 PLATFORM=macosx C_COMPILER=cc ARCH=x86-64
 /usr/local/Cellar/chicken/4.7.0.6 http://4.7.0.6: 106 files, 16M,
 built in 2.8 minutes
 
 Thanks for your reply. It sort of works for me... that is, it builds, then 
 refuses to link. I had to link it manually using `brew link -f chicken`, and 
 that seems to work (i.e. csi works, installing eggs works), although I don't 
 know what caused the linking problem in the first place, or if it will bite 
 me in the future.
 
 (Still, I am curious why it was hanging on loading import libraries...)
 
 --
 Hans Nowak
 
 
 ___
 Chicken-users mailing list
 Chicken-users@nongnu.org
 https://lists.nongnu.org/mailman/listinfo/chicken-users


___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Building Chicken on OS X Lion

2012-08-31 Thread Jim Ursetto
On Aug 31, 2012, at 3:36 PM, Shawn Rutledge wrote:

 I just built the 4.8.0 rc3 on Lion with xcode 4.3.3, using clang, like this:
 
 CC=clang C_COMPILER=clang make PLATFORM=macosx install
 
 Will csc remember to use clang then?  Doesn't seem to be any trouble
 to chicken-install extensions, anyway.

Yes, the compiler options are stored away for later use by csc.

clang is supported for Chicken on OS X, I use it all the time.
But I am curious to know whether Hans sees a difference on the
failing system with XCode 4.4.1.
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] checking whether a C macro is defined

2012-08-16 Thread Jim Ursetto
Hi,
That should be foreign-declare for the whole thing, not foreign-code.
Or use # ... # which is shorthand for foreign-declare.

#
#include foo.h
#ifndef FOO
#define FOO -1
#endif
#

Another option is the feature-test egg, which is useful for complex cases,
and doesn't require that you redefine anything.

But for cases where it is safe to #define an undefined macro (in other words,
when you can guarantee there is an impossible, harmless or safe default value),
the above is easier.

On Aug 16, 2012, at 6:37 PM, Antony Lee wrote:

 Hi all,
 I am looking for a way to check if a symbol is #defined as a C macro or 
 not... something like
 
 (declare (foreign-declare #include foo.h))
 (foreign-code #EOF
 #ifndef FOO
 #define FOO -1
 #endif
 EOF
 )
 (define-foreign-variable FOO int)
 
 which doesn't work (because I cannot put C macros in foreign-code?).
 
 My second try was to use the bind egg:
 (bind* #EOF
 #ifndef FOO
 #define FOO -1
 #endif
 EOF
 )
 
 but now FOO is always redefined (i.e. #ifndef FOO always evaluates to true).
 
 Any suggestions?  (I guess I could always put all that in an actual header 
 file full of #ifndef's and #include *that* one but I am looking for something 
 more... elegant if possible.)
 Thanks,
 Antony
 ___
 Chicken-users mailing list
 Chicken-users@nongnu.org
 https://lists.nongnu.org/mailman/listinfo/chicken-users

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Unbounded stack growth

2012-07-11 Thread Jim Ursetto
It seems that compiling with clang (llvm 3.0)
prevents the crash, at least for values up to 20 million, on
OS X and Linux.  Any higher and I start to hit swap.
I don't know why this works.

Plain gcc on linux, and llvm-gcc (llvm 2.7) on OS X 10.7, do crash
at about 600k here w/ stack ulimit 8M.  Based on your results
I am guessing your stack ulimit is 4M.

Tried removing __attribute__((noreturn)) from chicken.h, as is done
for clang and it made no difference, as you'd expect.  Only
other difference from gcc is the stack pointer retrieval code but
that is identical between clang and llvm-gcc.  So I have to
assume LLVM 3.0 has something to do with the crash avoidance,
which could very well be luck.

Tested with Chicken 4.7.0.6.

Jim

On Jul 11, 2012, at 12:23 PM, Marc Feeley wrote:

 I have been experimenting with the Spock Scheme to JavaScript compiler.  I 
 encountered a bug in its implementation of the Cheney on the MTA approach to 
 tail-calls and continuations.  The bug also exists for Chicken.
 
 In the Cheney on the MTA approach there needs to be a check, at regular 
 intervals, of the stack size, so that the stack can be GC'd using a 
 throw/catch or longjmp/setjmp.  Chicken (and Spock) perform this check at the 
 entry of Scheme functions.  For correctness, it must also be performed at the 
 *return point* of every non-tail call.  This is because the code has been CPS 
 converted, so a Scheme return is actually a C (or JS) *call* to the 
 continuation function, which grows the stack.
 
 Here's a simple example where this matters :
 
 ;; File: even.scm
 
 (define (even n)
  (if (= n 0)
  #t
  (if (even (- n 1)) #f #t)))
 
 (print (even (string-number (car (command-line-arguments)
 
 and a shell transcript of the behavior on a Mac OS X machine :
 
 % csc even.scm
 % ./even 11
 #f
 % ./even 20
 #t
 % ./even 30
 Segmentation fault: 11
 
 The segmentation fault is due to a C stack overflow.
 
 In this example, there will be an arbitrarily long sequence of C calls (in 
 the unwinding of the recursion to even) with no Scheme call, so stack size 
 checks will not be performed during the unwinding, yet the C stack grows 
 during the unwinding.  There is no stack overflow during the winding phase of 
 the recursion because the stack size checks are performed at regular 
 intervals (at each entry to even).
 
 I believe the fix should be simple (i.e. a stack size check should be added 
 to return points).
 
 Marc
 
 
 ___
 Chicken-users mailing list
 Chicken-users@nongnu.org
 https://lists.nongnu.org/mailman/listinfo/chicken-users


___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Unbounded stack growth

2012-07-11 Thread Jim Ursetto
On Jul 11, 2012, at 2:47 PM, Marc Feeley wrote:
 
 I'm pretty sure LLVM is simply implementing the tail-call itself.  So there 
 is no stack growth in the unwinding phase.

That is possible.  We do currently disable __attribute__((noreturn))
on functions across the board when using clang, and last I checked
this caused it to generate a bunch of (unreachable) return code.
But perhaps LLVM 3 is optimizing the tall-call anyway.

Jim
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] ANN: lazy-seq, a port of Clojure's lazy sequence API

2012-06-04 Thread Jim Ursetto
On Jun 3, 2012, at 5:06 AM, Christian Kellermann wrote:

 * Peter Danenberg p...@roxygen.org [120603 11:30]:
 Quoth Christian Kellermann on Prickle-Prickle, the 8th of Confusion:
 Which version of chicken is this? I get the arity error for both csi
 and compiled version for chicken master.
 
 It's a vanilla 4.7.0:

 In your case however, this seems to be an old bug that has been fixed
 in master.

Works ok for me in stability as well.  Could be the list-tail bug fixed in 
4.7.0.1-st (e03847a).

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Emacs and Chicken on Windows

2012-04-03 Thread Jim Ursetto
Cool.  You might also want to have a look at 
http://synthcode.com/wiki/scheme-complete.

On Apr 3, 2012, at 10:06 PM, Daniel Leslie wrote:

 Perhaps of some interest is the work I've put into my Emacs scripts for 
 Chicken.
 
 I've had consistent problems with SLIME and Chicken on Windows, which may or 
 may not be the result of my (heavily) modified Emacs environment. Moreover, 
 on my Ubuntu netbook SLIME is just a little too sluggish for my tastes; when 
 all I really want is auto-complete completions as I type away on a shaky bus 
 ride.
 
 As such, I wrote some scripts to use chicken-status and csi to produce a list 
 of available bindings from your installed modules and the base chicken 
 environment, and it in turn produces an auto-complete source. It also 
 provides font-locking for these symbols.
 
 Anyhow, more info is on the wiki:
 http://wiki.call-cc.org/dans-custom-emacs
 
 Likewise, I occasionally do some work on Eggs which involves a lot of 
 intermixed C and Scheme in the same source file. Here's my (ugly) multi-mode 
 hack to do C and Scheme major modes in the same buffer:
 http://wiki.call-cc.org/emacs-multi-mode
 
 Thanks for Chicken!
 -Dan
 ___
 Chicken-users mailing list
 Chicken-users@nongnu.org
 https://lists.nongnu.org/mailman/listinfo/chicken-users

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Posix realpath

2012-04-01 Thread Jim Ursetto
On Apr 1, 2012, at 11:15 AM, Matt Welland wrote:

 Note that normalize-path is not the same as realpath and that although 
 realpath would be nice to have calling the system realpath works just fine 
 and so this is a suggestion and not a request 

What is the system realpath?

Jim
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Posix realpath

2012-04-01 Thread Jim Ursetto

On Apr 1, 2012, at 12:22 PM, Jim Ursetto wrote:

 On Apr 1, 2012, at 11:15 AM, Matt Welland wrote:
 
 Note that normalize-path is not the same as realpath and that although 
 realpath would be nice to have calling the system realpath works just fine 
 and so this is a suggestion and not a request 
 
 What is the system realpath?

Specifically, I don't understand from your mail whether you have successfully 
bound realpath(3) in your own code, whether you want this binding to be added 
to the posix unit, or whether you wanted a reimplementation in pure Scheme.  
I'm quite confused, sorry.


___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Posix realpath

2012-04-01 Thread Jim Ursetto
In case it helps, I've added resolve-pathname to the posix-extras egg in 
version 0.1.2.

On Apr 1, 2012, at 12:54 PM, Jim Ursetto wrote:

 
 On Apr 1, 2012, at 12:22 PM, Jim Ursetto wrote:
 
 On Apr 1, 2012, at 11:15 AM, Matt Welland wrote:
 
 Note that normalize-path is not the same as realpath and that although 
 realpath would be nice to have calling the system realpath works just fine 
 and so this is a suggestion and not a request 
 
 What is the system realpath?
 
 Specifically, I don't understand from your mail whether you have successfully 
 bound realpath(3) in your own code, whether you want this binding to be added 
 to the posix unit, or whether you wanted a reimplementation in pure Scheme.  
 I'm quite confused, sorry.
 


___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Regexp egg compilation error

2012-03-12 Thread Jim Ursetto
On Mar 12, 2012, at 10:19 PM, Kon Lovett wrote:

 
 I think the extension is called regex: 
 http://wiki.call-cc.org/eggref/4/regex
 
 BTW, this is for temporary backwards-compatibility. New code should use 
 irregex: http://wiki.call-cc.org/man/4/Unit%20irregex

Not just back-compat, regex also provides some convenience functions which can 
be more user-friendly (IMO) than irregex.  It also accepts irregex SREs.
Jim___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Making stack-allocated Chicken-managed objects from C

2012-03-06 Thread Jim Ursetto
On Mar 6, 2012, at 10:31 AM, Kristian Lein-Mathisen wrote:

 (define %make-point (foreign-primitive void
(((c-pointer (struct point)) dest) 
 (float x) (float y))
 #END
 dest-x = x;
 dest-y = y;
 C_return();
 END
 ))
 
 (define (make-point x y) 
 (let ((loc (location (make-blob %get struct-size somehow%
(%make-point loc x y)
 loc))


%get struct-size somehow%
 - (foreign-value sizeof(struct point) int)

Avoid the locative by using scheme-pointer instead of c-pointer.

There's no reason I can think of to use foreign-primitive there instead of 
foreign-lambda*.

Ideally wrap the blob in a define-record for safety issues (not done below,
we stick with a bare pointer as in your example).

Code:

#
struct point { float x; float y; };
#

(define %make-point (foreign-lambda* void
((scheme-pointer b) (float x) (float y))
#END
((struct point *)b)-x = x;
((struct point *)b)-y = y;
END
))

(define (make-point x y)
  (let ((b (make-blob (foreign-value sizeof(struct point) int
(%make-point b x y)
b))

(define point-y (foreign-lambda* float ((scheme-pointer b))
 return(((struct point *)b)-y);))

(print (point-y (make-point 1.5 2.5)))

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] case vs. eq? - just curious ....

2012-03-02 Thread Jim Ursetto
eqv?, to be exact.  Your case statement works fine for me, with for example 
(comp-text '=).  (eq? comp =) compares against the value of the procedure =, 
whereas the case compares against the symbol =.  So you are doing two different 
comparisons.

You can use ,x (case ...) at the REPL to see what the case expands to.

Fake edit: Kon said this more succinctly than I did.
Jim

On Mar 2, 2012, at 5:52 PM, Matt Welland wrote:

 I expected this to work:
 
 (define (comp-text comp)
   (case comp
((=)=)
(())
(())
((=)  =)
((=)  =)
(else unk)))
 
 But had to convert to a cond with (eq? comp =) etc...
 
 I thought case was supposed to use eq? to do the compare?

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] case vs. eq? - just curious ....

2012-03-02 Thread Jim Ursetto

On Mar 2, 2012, at 7:57 PM, Matt Welland wrote:

 I'm trying to convert a comparison operator to the equivalent text. These are 
 not symbols. I think case treats the target list as if it was created with a 
 quote: '().

That's what case does.

You want `select`: http://api.call-cc.org/doc/chicken/special-forms/select .

 The cond does what I need just fine, I just didn't understand why case didn't 
 also work.

Expand it with ,x and you'll see.

Jim
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] llvm patches integrated (was: Installing on Mac OS 10.7.3)

2012-02-18 Thread Jim Ursetto
All LLVM patches are now integrated into stability 4.7.0.5-st and the stability 
tarball (http://wiki.call-cc.org/stability), as well as master.  So the dance 
below is no longer necessary.

Additionally, these patches fix llvm-gcc and clang builds on Linux as well.

Users are encouraged to test this out if interested.  At the least, it seems to 
speed up the build process, along with the chicken compiler.

Jim

On Feb 14, 2012, at 9:26 AM, Jim Ursetto wrote:

 If you have already upgraded to XCode 4.2, then they have removed plain gcc 
 completely and this will fail.  In this case you will need a couple patches 
 to enable compilation with LLVM, which are not yet in the core:  
 https://bugs.call-cc.org/ticket/771
 
 Also, you will need to build using the latest master or, probably better, 
 latest stability/4.7.0 from git.  There are a couple of other critical LLVM 
 patches which are in master and stability/4.7.0 HEAD, but not in the 
 4.7.0.4-st stability tarball yet.
 
 Sorry for the complicated instructions, but Apple very suddenly dropped 
 regular gcc recently and we haven't integrated the fixes into an easy build 
 yet.


___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Installing on Mac OS 10.7.3

2012-02-16 Thread Jim Ursetto
Assuming you installed it with make install ;) then it's in /usr/local/bin by 
default, so make sure that's in your path. 

On Feb 16, 2012, at 2:41 AM, James Abbott wrote:

 Jim  Toby: thanks for your help. My system doesn't seem to recognize the csi 
 command:
 
 $ csi -s test.scm
 -bash: csi: command not found

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Installing on Mac OS 10.7.3

2012-02-15 Thread Jim Ursetto
Ok, then also add ARCH=x86-64 like you had originally.  It was my understand 
this wasn't needed on 10.6 or 10.7 and I thought I confirmed that, but maybe 
not.  Let me know if it works, and if so, what the output of `uname -a` on your 
system is.
 
On Feb 15, 2012, at 2:49 AM, James Abbott wrote:

 Hi all,-
 
 thanks for the replies. I have Xcode 4.1. So the make PLATFORM=macosx 
 C_COMPILER=gcc-4.2 command should work. However I get this message:
 
 make -f ./Makefile.macosx CONFIG= all
 gcc-4.2  -c apply-hack.x86.S -o apply-hack.x86.o
 apply-hack.x86.S:35:suffix or operands invalid for `call'
 make[1]: *** [apply-hack.x86.o] Error 1
 make: *** [all] Error 2
 
 Here's what gcc -v returned:
 
 Using built-in specs.
 Target: i686-apple-darwin11
 Configured with: 
 /private/var/tmp/llvmgcc42/llvmgcc42-2335.15~25/src/configure 
 --disable-checking --enable-werror --prefix=/Developer/usr/llvm-gcc-4.2 
 --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ 
 --program-prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ 
 --with-slibdir=/usr/lib --build=i686-apple-darwin11 
 --enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2335.15~25/dst-llvmCore/Developer/usr/local
  --program-prefix=i686-apple-darwin11- --host=x86_64-apple-darwin11 
 --target=i686-apple-darwin11 --with-gxx-include-dir=/usr/include/c++/4.2.1
 Thread model: posix
 gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)
 
 
 Seems like I'll need to build from git anyway!
 
 Cheers,
 James
 
 
 
 On Wed, Feb 15, 2012 at 5:16 AM, Jim Ursetto zbignie...@gmail.com wrote:
 Check out the latest code, apply the ticket patches, make a boot chicken, 
 then build chicken with the chicken-boot binary. Normal procedure in other 
 words when building from git.
 
 
 On Feb 14, 2012, at 19:23, Stephen Eilert spedr...@gmail.com wrote:
 
 
 On Tue, Feb 14, 2012 at 12:28 PM, Jim Ursetto zbignie...@gmail.com wrote:
 On Feb 14, 2012, at 9:26 AM, Jim Ursetto wrote:
 
  This works with XCode 4.2 on Lion.  If this works without hanging, you're 
  done.
  If you have already upgraded to XCode 4.3...
 
 Oops.  I meant it works until XCode 4.2, and if you upgraded to XCode 4.2 
 already (which you probably have) then you have to follow the other 
 alternate instructions.  Even I am confused.
 Jim
 
 So, in case one has upgraded to XCode 4.3 already and doesn't have a chicken 
 binary anymore... 
 
 
 
 -- Stephen
 
 Kids these days.
 Whatever happened to hard work?
 
-- Joel Spolsky, The perils of javaschools
  
 

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Installing on Mac OS 10.7.3

2012-02-15 Thread Jim Ursetto
OK, I need to update the docs to say the workaround is needed on 10.7 as well 
then.  Thanks.

Use 'csi -script myfile.scm' to run a .scm file at the command line, or 'csi' 
to enter the interpreter.

On Feb 15, 2012, at 11:16 AM, James Abbott wrote:

 Hi Jim,-
 
 running:
  
 make PLATFORM=macosx C_COMPILER=gcc-4.2 PLATFORM=macosx ARCH=x86-64
 
 built the source. Output of uname -a:
  
 Darwin james-abbotts-macbook.local 11.3.0 Darwin Kernel Version 11.3.0: Thu 
 Jan 12 18:48:32 PST 2012; root:xnu-1699.24.23~1/RELEASE_I386 i386
 
 Now, is there a command-line tool for running Scheme files that comes with 
 Chicken? Ie, can I run something like:
 
 scheme myfile.scm
 chicken myfile.scm
 bok myfile.scm
 
 ?
 
 Thanks,
 James
 
 
 On Wed, Feb 15, 2012 at 4:21 PM, Jim Ursetto zbignie...@gmail.com wrote:
 Ok, then also add ARCH=x86-64 like you had originally.  It was my understand 
 this wasn't needed on 10.6 or 10.7 and I thought I confirmed that, but maybe 
 not.  Let me know if it works, and if so, what the output of `uname -a` on 
 your system is.
  
 On Feb 15, 2012, at 2:49 AM, James Abbott wrote:
 
 Hi all,-
 
 thanks for the replies. I have Xcode 4.1. So the make PLATFORM=macosx 
 C_COMPILER=gcc-4.2 command should work. However I get this message:
 
 make -f ./Makefile.macosx CONFIG= all
 gcc-4.2  -c apply-hack.x86.S -o apply-hack.x86.o
 apply-hack.x86.S:35:suffix or operands invalid for `call'
 make[1]: *** [apply-hack.x86.o] Error 1
 make: *** [all] Error 2
 
 Here's what gcc -v returned:
 
 Using built-in specs.
 Target: i686-apple-darwin11
 Configured with: 
 /private/var/tmp/llvmgcc42/llvmgcc42-2335.15~25/src/configure 
 --disable-checking --enable-werror --prefix=/Developer/usr/llvm-gcc-4.2 
 --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ 
 --program-prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ 
 --with-slibdir=/usr/lib --build=i686-apple-darwin11 
 --enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2335.15~25/dst-llvmCore/Developer/usr/local
  --program-prefix=i686-apple-darwin11- --host=x86_64-apple-darwin11 
 --target=i686-apple-darwin11 --with-gxx-include-dir=/usr/include/c++/4.2.1
 Thread model: posix
 gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)
 
 
 Seems like I'll need to build from git anyway!
 
 Cheers,
 James
 
 
 
 On Wed, Feb 15, 2012 at 5:16 AM, Jim Ursetto zbignie...@gmail.com wrote:
 Check out the latest code, apply the ticket patches, make a boot chicken, 
 then build chicken with the chicken-boot binary. Normal procedure in other 
 words when building from git.
 
 
 On Feb 14, 2012, at 19:23, Stephen Eilert spedr...@gmail.com wrote:
 
 
 On Tue, Feb 14, 2012 at 12:28 PM, Jim Ursetto zbignie...@gmail.com wrote:
 On Feb 14, 2012, at 9:26 AM, Jim Ursetto wrote:
 
  This works with XCode 4.2 on Lion.  If this works without hanging, you're 
  done.
  If you have already upgraded to XCode 4.3...
 
 Oops.  I meant it works until XCode 4.2, and if you upgraded to XCode 4.2 
 already (which you probably have) then you have to follow the other 
 alternate instructions.  Even I am confused.
 Jim
 
 So, in case one has upgraded to XCode 4.3 already and doesn't have a 
 chicken binary anymore... 
 
 
 
 -- Stephen
 
 Kids these days.
 Whatever happened to hard work?
 
-- Joel Spolsky, The perils of javaschools
  
 
 
 

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Installing on Mac OS 10.7.3

2012-02-14 Thread Jim Ursetto
Use these instructions instead, from the stability branch.
http://code.call-cc.org/cgi-bin/gitweb.cgi?p=chicken-core.git;a=blob_plain;f=README;hb=1144d803cc214758be60ba09ae4de34ebff7cb63

In short,
$ make PLATFORM=macosx C_COMPILER=gcc-4.2

This works with XCode 4.2 on Lion.  If this works without hanging, you're done.

If you have already upgraded to XCode 4.3, then they have removed plain gcc 
completely and this will fail.  In this case you will need a couple patches to 
enable compilation with LLVM, which are not yet in the core:  
https://bugs.call-cc.org/ticket/771

Also, you will need to build using the latest master or, probably better, 
latest stability/4.7.0 from git.  There are a couple of other critical LLVM 
patches which are in master and stability/4.7.0 HEAD, but not in the 4.7.0.4-st 
stability tarball yet.

Sorry for the complicated instructions, but Apple very suddenly dropped regular 
gcc recently and we haven't integrated the fixes into an easy build yet.

Jim

On Feb 14, 2012, at 7:41 AM, James Abbott wrote:

 Hi,-
 
 I recently discovered Chicken Scheme through a podcast pick 
 (http://rubyrogues.com/databases-sql-nosql/ - thanks, Aaron!). I had 
 previously been searching for a Scheme implementation to run on a Mac, but 
 Chicken didn't even show on the radar. Racket looks all right, but is slow - 
 so I'm stocked to try out this project!
 
 Anyway, I'm about to install and just wanted to make sure I go the right way 
 about this. I run Mac OS X 10.7.3, Intel Core Duo. I want to enable the 
 64-bit mode. According to the README this is the way to go:
 
 Step 1: $ export MACOSX_DEPLOYMENT_TARGET=10.4
 Step 1: $ make C_COMPILER=gcc-4.0 PLATFORM=macosx ARCH=x86-64
 
 Correct? 
 
 Also, do I need to move my installation folder to any particular location on 
 the system prior to installing? (Currently, the archive is extracted to a 
 folder on Desktop).
 
 Thanks in advance!
 
 Cheers,
 James
 
 ___
 Chicken-users mailing list
 Chicken-users@nongnu.org
 https://lists.nongnu.org/mailman/listinfo/chicken-users

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Installing on Mac OS 10.7.3

2012-02-14 Thread Jim Ursetto
On Feb 14, 2012, at 9:26 AM, Jim Ursetto wrote:

 This works with XCode 4.2 on Lion.  If this works without hanging, you're 
 done.
 If you have already upgraded to XCode 4.3...

Oops.  I meant it works until XCode 4.2, and if you upgraded to XCode 4.2 
already (which you probably have) then you have to follow the other alternate 
instructions.  Even I am confused.
Jim
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Installing on Mac OS 10.7.3

2012-02-14 Thread Jim Ursetto
Check out the latest code, apply the ticket patches, make a boot chicken, then 
build chicken with the chicken-boot binary. Normal procedure in other words 
when building from git.

On Feb 14, 2012, at 19:23, Stephen Eilert spedr...@gmail.com wrote:

 
 On Tue, Feb 14, 2012 at 12:28 PM, Jim Ursetto zbignie...@gmail.com wrote:
 On Feb 14, 2012, at 9:26 AM, Jim Ursetto wrote:
 
  This works with XCode 4.2 on Lion.  If this works without hanging, you're 
  done.
  If you have already upgraded to XCode 4.3...
 
 Oops.  I meant it works until XCode 4.2, and if you upgraded to XCode 4.2 
 already (which you probably have) then you have to follow the other alternate 
 instructions.  Even I am confused.
 Jim
 
 So, in case one has upgraded to XCode 4.3 already and doesn't have a chicken 
 binary anymore... 
 
 
 
 -- Stephen
 
 Kids these days.
 Whatever happened to hard work?
 
-- Joel Spolsky, The perils of javaschools
  
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Dynamic wind problem in with-input-from-file

2011-12-20 Thread Jim Ursetto
Thanks for noticing this.  It may also happen if you catch an exception raised 
in the body.

We applied a fix to the master branch and also to stability (and 4.7.0.4-st has 
now been released).

Jim

On Dec 19, 2011, at 9:40 AM, obscurolocon...@googlemail.com wrote:

 I tried the following:
 
 (define (ignore . args)
  (if #f #f))
 
 (define (x)
  (call-with-current-continuation
   (lambda (return)
 (with-input-from-file /etc/motd
   (lambda ()
(return (ignore)))
 
 (ignore (x))
 
 This maks csi reading the contents of /etc/motd as source input:


___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] unbound variable: sxml:sxml-xml

2011-12-07 Thread Jim Ursetto
On Dec 7, 2011, at 10:41 AM, Peter Bex wrote:

 Actually, the main reason is that SSAX is a horrible mess which has
 many completely unrelated procedures all mixed together.
 There are several egg that provide different sets of procedures
 from the SSAX project.  Most eggs include all files from the SSAX
 project to make it easy to update them, but they don't install them
 all.
 
 The proper place to do this is in the sxml-serializer egg, and
 we definitely should *not* be adding random procedures to sxpath.

In fact it's already in sxml-serializer, which is what I recommend you use.  
Please see http://api.call-cc.org/doc/sxml-serializer#sec:Changes_from_stock, 
in which it's described that srl:sxml-xml is in there but renamed to 
serialize-sxml.

As Peter said, we took the SSAX project and split it into manageable chunks; 
the code that isn't used simply isn't compiled in.  That was one way we adapted 
it to Chicken.  Other ways were to regularize and improve some of the 
identifier names, make things more idiomatic, and in sxml-serializer's case, 
add some feature enhancements.

Jim
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Correct behavior of SRFI-1 any

2011-11-28 Thread Jim Ursetto
On Nov 28, 2011, at 9:01 PM, Nick Zarr wrote:

 I've been testing my implementation against Chicken for correctness and 
 here's what I get on Chicken:
 
 #;2 (any (lambda (x) (if (even? x) x)) '(1 2 3))
 #;3 (any (lambda (x) (even? x)) '(1 2 3))
 #t
 #;4 (any even? '(1 3 5))
 #f
 
 For #3 and #4 any correctly returns #t and #f respectively.  However for #2 
 shouldn't any return 2 instead of, what I'm assuming is, (void)?  What is the 
 correct behavior here?

Nick,

 #;2 (any (lambda (x) (if (even? x) x)) '(1 2 3))


Change that to

(any (lambda (x) (if (even? x) x #f)) '(1 2 3))

or more idiomatically

(any (lambda (x) (and (even? x) x)) '(1 2 3))

Your if statement returns void in the false case (technically, an unspecified 
value; in Chicken, it's void).   But the only false value in Scheme is #f.  
Therefore your predicate always returns a true value for the first value it 
hits, so it will return void for 1.  It would have returned 2 if the first 
value were 2:

#;7 (any (lambda (x) (if (even? x) x)) '(2 3))
2

Replacing if with and is the way we usually handle that. 

Jim___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] BUG, list-ref bug found in chicken version 4.7.0

2011-11-21 Thread Jim Ursetto
It's also fixed as of 4.7.0.1-st (commit faa97a3)
 
On Nov 21, 2011, at 4:39 AM, Christian Kellermann wrote:

 Hi Markus!
 
 Thanks for your detailed report.
 
 * Markus Klotzbuecher m...@marumbi.de [21 11:22]:
 #;1 (list-ref 2 '(1 5 2))
 Segmentation fault
 xudifsd@xudifsd-laptop:~$ csi -v
 
 I feel a bit dumb (and trolled) by this.
 
 The correct syntax for list-ref is (list-ref '(1 5 2) 2) of course.
 The segmentation fault you encounter is indeed a bug and has been
 fixed in master. I will look up the commit.
 
 Sorry for all the confusion.
 
 Kind regards,
 
 Christian
 
 -- 
 Who can (make) the muddy water (clear)? Let it be still, and it will
 gradually become clear. Who can secure the condition of rest? Let
 movement go on, and the condition of rest will gradually arise.
 -- Lao Tse. 
 
 ___
 Chicken-users mailing list
 Chicken-users@nongnu.org
 https://lists.nongnu.org/mailman/listinfo/chicken-users


___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Chicken objc egg on OSX Lion

2011-11-19 Thread Jim Ursetto

On Nov 19, 2011, at 11:01 AM, Achint Sandhu wrote:

   The cleanest option I have found so far is the objective-C extension 
 for Chicken Scheme (http://wiki.call-cc.org/eggref/4/objc), which I'm having 
 trouble installing on 10.7.
 
   A quick google search reveals 
 http://lists.gnu.org/archive/html/chicken-users/2010-12/msg00041.html and 
 http://comments.gmane.org/gmane.lisp.scheme.chicken/12638 which seem to 
 indicate that the objc extension isn't being actively developed and/or 
 maintained.

Correct, objc is not supported on 10.6 or higher, due to significant internal 
changes from Objective C 1.0 to 2.0 in that version.

Jim
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Chicken objc egg on OSX Lion

2011-11-19 Thread Jim Ursetto
On Nov 19, 2011, at 4:05 PM, Achint Sandhu wrote:

 Is there something that would prevent the support for Objective C 2.0 or is 
 it the case that no one has got around to it yet ?

No, not as far as I know -- it's just a matter of coding.  It's just that no 
one has been interested enough to do so yet.

Jim
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] 64-bit SPARC build - Re: [4.7.0.3-st] Compiling on Solaris 10

2011-11-10 Thread Jim Ursetto
Toby,

On Nov 10, 2011, at 6:40 AM, Toby Thain wrote:
 3) It's really sad to see 25% CPU utilisation on this quad-CPU system 
 throughout the long build. Is the parallel make patch coming? :)

The patch in ticket 526 
(http://bugs.call-cc.org/raw-attachment/ticket/526/parallel-build-2.diff.txt) 
still works fine with 4.7.0.3-st, although I've never tried it on solaris.  It 
is just not applied by default.

Jim
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] gmake check fails on OpenBSD 5.0

2011-11-05 Thread Jim Ursetto
On Nov 4, 2011, at 1:37 PM, Pekka Niiranen wrote:

Hi Pekka.

 port-fileno...FAIL [ 8 ]
 gmake[1]: Leaving directory `/home/pekka/compile/chicken-4.7.0.3-st'
 gmake: *** [check] Error 2
 
 I commented out the following two lines from port-tests.scm
 
   (check (port-fileno out))
   (check (port-fileno in))

You found the correct solution--the test is erroneous.  The fix was applied to 
the stability branch in commit 6097b12 after the 4.7.0.3-st release.

 and the test sequence continued up to the next error:
 
 starting with 1232 symbols
 interning 1 symbols ...
 Segmentation fault (core dumped)

This one I am not sure of, we will have to look into it.  I assume this is 
occurring only on OpenBSD; I don't know if it's been fixed in the master branch.

In the meantime I created a ticket for you:
https://bugs.call-cc.org/ticket/724
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] c-string return question

2011-10-13 Thread Jim Ursetto
On Oct 13, 2011, at 11:02 AM, Jörg F. Wittenberger wrote:

 ages ago I wrote these simple lines:

Out of curiosity, would this suit your purposes instead:

(##sys#char-utf8-string (integer-char x))
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] sandbox egg: C_emit_trace_info

2011-10-01 Thread Jim Ursetto
Patch looks good to me but should be ACKed by the egg author (Felix)

On Oct 1, 2011, at 5:01 PM, Alan Post wrote:

 The sandbox egg makes a call to the runtime.c procedure:
 
  C_emit_trace_info
 
 In commit 2d5244dd01d4e91ed6f73bb566e92f04a2ab6361 of core,
 this procedure was deprecated in favor of:
 
  C_emit_eval_trace_info
   C_emit_syntax_trace_info
 
 Below is the patch bringing the sandbox egg up-to-date with
 this API change.  I noted that the C_emit_trace_info was
 mapped to C_emit_eval_trace_info, so I changed all of the
 calls in the sandbox egg to C_emit_eval_trace_info.
 
 Would someone that better understands this egg verify that
 none of the calls should instead be to C_emit_syntax_trace_info?
 
 Will someone with access rights apply this patch to the trunk
 branch of the sandbox egg?
 
 -Alan
 
 ++ sandbox-trace-info.patch
 Index: sandbox.scm
 ===
 --- sandbox.scm   (revision 25270)
 +++ sandbox.scm   (working copy)
 @@ -455,8 +455,8 @@
 (and (list? lst)
(length lst) ) )
 
 -  (define (emit-trace-info info)
 -(##core#inline C_emit_trace_info info #f ##sys#current-thread) )
 +  (define (emit-eval-trace-info info)
 +(##core#inline C_emit_eval_trace_info info #f ##sys#current-thread) )
 
   (define (compile-call x e)
 (let* ([fn (compile (car x) e #f)]
 @@ -466,25 +466,25 @@
   (case argc
   [(#f) (##sys#syntax-error-hook syntax error - malformed expression x)]
   [(0) (lambda (v)
 -(emit-trace-info info)
 +(emit-eval-trace-info info)
  (check-point fuel/lambda)
  ((##core#app fn v)) ) ]
   [(1) (let ([a1 (compile (car args) e #f)])
  (lambda (v)
 -  (emit-trace-info info)
 +  (emit-eval-trace-info info)
(check-point fuel/lambda)
((##core#app fn v) (##core#app a1 v))) ) ]
   [(2) (let* ([a1 (compile (car args) e #f)]
   [a2 (compile (list-ref args 1) e #f)] )
  (lambda (v)
 -  (emit-trace-info info)
 +  (emit-eval-trace-info info)
(check-point fuel/lambda)
((##core#app fn v) (##core#app a1 v) (##core#app a2 v))) ) ]
   [(3) (let* ([a1 (compile (car args) e #f)]
   [a2 (compile (list-ref args 1) e #f)]
   [a3 (compile (list-ref args 2) e #f)] )
  (lambda (v)
 -  (emit-trace-info info)
 +  (emit-eval-trace-info info)
(check-point fuel/lambda)
((##core#app fn v) (##core#app a1 v) (##core#app a2 v) 
 (##core#app a3 v))) ) ]
   [(4) (let* ([a1 (compile (car args) e #f)]
 @@ -492,12 +492,12 @@
   [a3 (compile (list-ref args 2) e #f)]
   [a4 (compile (list-ref args 3) e #f)] )
  (lambda (v)
 -  (emit-trace-info info)
 +  (emit-eval-trace-info info)
(check-point fuel/lambda)
((##core#app fn v) (##core#app a1 v) (##core#app a2 v) 
 (##core#app a3 v) (##core#app a4 v))) ) ]
   [else (let ([as (map (lambda (a) (compile a e #f)) args)])
   (lambda (v)
 -   (emit-trace-info info)
 +   (emit-eval-trace-info info)
 (check-point fuel/lambda)
 (apply (##core#app fn v) (map (lambda (a) (##core#app a v)) 
 as))) ) ] ) ) )
 
 --
 -- 
 .i ma'a lo bradi cu penmi gi'e du
 
 ___
 Chicken-users mailing list
 Chicken-users@nongnu.org
 https://lists.nongnu.org/mailman/listinfo/chicken-users


___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] file-read and let-values

2011-09-19 Thread Jim Ursetto
On Sep 19, 2011, at 9:59 AM, Sascha Ziemann wrote:

 Is this the prefered way to use the return values of file-read?
 
 (let-values (((data bytes)) (apply values (file-read fileno size)))

No, just destructure the returned list:

(let* ((rc (file-read fileno size))
   (data (car rc))
   (bytes (cadr rc)))
 ...)

More conveniently, use matchable like:

(use matchable)
(match-let (((data bytes) (file-read fileno size)))
  ...)


___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] chicken hangs and uses 100% cpu (mac os x lion)

2011-09-13 Thread Jim Ursetto

On Sep 13, 2011, at 7:56 PM, Topher Cyll wrote:

 Hey everyone,
 
 Like a previous poster, I'm having issues with Chicken on Mac OS X
 (although for me the issues are on Lion, not Snow Leopard).

Add C_COMPILER=gcc-4.2 to the make line.  E.g.

make C_COMPILER=gcc-4.2 PLATFORM=macosx

This switches from LLVM to plain gcc.

 I've also tried building from HomeBrew (4.7.0) and it also hangs while
 updating the db.

Try `brew install --use-gcc chicken`.

Jim

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] wiki pages and h1 title

2011-09-10 Thread Jim Ursetto
Hi John,

On Sep 10, 2011, at 11:56 AM, John Gabriele wrote:

 I've noticed that some of the wiki pages have an h2 title at the top,
 some don't. For the ones that have have a table of contents, some have
 an h2 above the toc, some have it below.
 
 I think pages look a bit odd if they have no title at the very top.
 
 Looking at the source for a few pages, I haven't seen any h1 tags anywhere.
 
 The [editing help](https://wiki.call-cc.org/edit-help) page says not
 to use = title, as h1's are reserved for use by the wiki itself.

 I think it would make sense for every page to have an h1 (= Page
 Title) at the top, which would not be part of a toc (if present),
 which would be rendered at the top of the page body (above the toc, if
 present), and which would be used to generate the first portion of the
 page's title. What do you think?

As Peter mentioned, this is a historical quirk of the original svnwiki which 
was preserved in the new code.  What you propose (h1 tag counts for page title 
but not in TOC) is probably better behavior overall, but we would first need to 
go through and fix all wiki pages and coordinate an upgrade, and educate all 
users on the new usage.  However, the position of the TOC is up to the user and 
I'm not sure we should override that by automatically promoting the h1 contents 
to top of page.

I too dislike h2's dual use as a page title and a section header (in which all 
sections are typically nested at h3, giving the TOC one useless indent).  In 
the meantime for my own pages I have started using h2 as the page title, placed 
perhaps a short description in that section, then put all subsequent sections 
under h2 (not h3).  This removes the silly indent, although you still 
unfortunately see the section in the TOC.

For an example of this style, see http://wiki.call-cc.org/eggref/4/pathfinder 
or http://api.call-cc.org/doc/pathfinder.

Jim
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] wiki pages and h1 title

2011-09-10 Thread Jim Ursetto
On Sep 10, 2011, at 5:46 PM, John Gabriele wrote:
 The stopgap measure though, would appear to be this:
 
 https://wiki.call-cc.org/eggs%20tutorial (I just now added the h2
 heading to it.)

I think this looks reasonable

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] MacPorts and Chicken

2011-09-10 Thread Jim Ursetto
On Sep 10, 2011, at 5:28 PM, Jimmy Coyne wrote:

 Hi,
 Trying to use Chicken for the first time and having some install issues on 
 Snow leopard (10.6.8).
 
 Followed the wiki macport instructions  -  sudo port install chicken

 ---  Attempting to fetch chicken-4.4.0_0.darwin_10.x86_64.tbz2 from 
 http://packages.macports.org/chicken

4.4.0 is about a hundred years old.

Not sure if it helps any, but the version from homebrew 
(http://mxcl.github.com/homebrew/) is 4.7.0 and installs perfectly with `brew 
install chicken` on 10.6, or `brew install --use-gcc chicken` on 10.7.

Jim

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] process-wait

2011-09-02 Thread Jim Ursetto
On Sep 2, 2011, at 3:50 PM, Felix wrote:

 The signal handlers that you set with set-signal-handler! are not
 executed at interrupt time. They just save the signal number and
 provoke a GC on the next heap-check that happens to execute. Then the
 interrrupt-processing wraps up the execution state and invokes
 ##sys#interrupt-hook.

On a related note:
http://3e8.org/blog/2011/08/02/take-off-every-sigterm/

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] script to generate html from wiki-formatted text?

2011-08-30 Thread Jim Ursetto
John,
Another option is to look at manual-labor, which uses svnwiki-sxml and 
chicken-doc-html under the hood.

A further option is hyde.
Jim

On Aug 30, 2011, at 3:13 PM, Mario Domenech Goulart wrote:

 Hi John,
 
 On Tue, 30 Aug 2011 16:15:20 -0400 John Gabriele jmg3...@gmail.com wrote:
 
 Does anyone have (or would anyone whip up?) a script for converting
 wiki markup to html? Something to be used like:
 
chicken-wiki-to-html foo.txt  foo.html
 
 Here's one: http://parenteses.org/mario/misc/wiki2html.scm
 
 
 (BTW, the Chicken wiki uses qwiki, correct?)
 
 Correct.
 
 Best wishes.
 Mario
 -- 
 http://parenteses.org/mario
 
 ___
 Chicken-users mailing list
 Chicken-users@nongnu.org
 https://lists.nongnu.org/mailman/listinfo/chicken-users


___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] script to generate html from wiki-formatted text?

2011-08-30 Thread Jim Ursetto
On Aug 30, 2011, at 8:10 PM, John Gabriele wrote:

 On Tue, Aug 30, 2011 at 6:23 PM, Jim Ursetto zbignie...@gmail.com wrote:
 
 Another option is to look at manual-labor, which uses svnwiki-sxml and 
 chicken-doc-html under the hood.
 
 Thanks. That also works nicely for me. The styling reminds me of chickadee.

Yep, chickadee uses the same backend, and manual-labor uses chickadee's CSS.

 A further option is hyde.
 
 At the moment, I only need a simple tool to use as a previewer for a
 potential wiki doc, but thanks for pointing it out.

Indeed, I mentioned hyde because you can put it in dynamic serving mode and let 
it do the conversion automatically for you, while you preview the results in a 
web browser.  (I.e. hit reload and it will convert the wiki doc to HTML.)  As a 
downside, you have to include a spurious empty sexpr () at the beginning of the 
document, as expected by hyde, which has to be deleted when you upload.

Actually, when I want to do previews for wiki documents, I usually just use 
chickadee.  In other words you start a local chickadee server, then run 
`chicken-doc-admin -E filename` whenever your source changes.  The rendering 
engine differs between qwiki (multidoc) and chickadee (chicken-doc-html) but 
this is rarely an issue.  They both do use the same wiki parser (svnwiki-sxml) 
as well.

Jim
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Egg - Chicken version compatibility

2011-08-20 Thread Jim Ursetto
On Aug 20, 2011, at 17:32, Alaric Snell-Pym ala...@snell-pym.org.uk wrote:

 * How about, when interfaces change in the manual, writing something
 along the lines of added in version X, so that people writing code
 using those interfaces who are concerned about compatability are given
 pause for thought, and can take appropriate actions (SRFI-0 etc)

This doesn't come up too terribly often, but whenever I question when an 
interface was added, and the question is likely to come up again, I add the 
info to the wiki.

Jim
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] configuring readline support; cannot import from undefined module: regex

2011-08-16 Thread Jim Ursetto
On Aug 15, 2011, at 10:47 PM, John Gabriele wrote:

 Hi,
 
 Following the instructions at
 http://wiki.call-cc.org/man/3/Using%20the%20interpreter#auto-completion-and-edition
 to set up readline support, I get:
 
Error: (import) during expansion of (import ...) - cannot import
 from undefined module: regex
 
 Changing regex to irregex makes readline seem to work though.

I don't see the reason for using regex or irregex there in the first place.  
Anybody know why it's there?  If not it should be removed.

Jim
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] My code doesn't float

2011-08-16 Thread Jim Ursetto
Better solution is probably to declare these in test1.h and then include it 
from stest1.scm via

# #include test1.h # 

and also #include it from test1.c for good measure.  Same would be true if you 
had implemented stest1 directly in C.

On Aug 17, 2011, at 12:04 AM, Paul Colby wrote:

 Got it,
 
 I finally resorted to clang and got a warning about implicit declarations in 
 c compilation. 
 Apparently, one needs something to the effect,
 
 (foreign-declare float testFloat(float);) 
 (foreign-declare double testDouble(double);)
 
 in stest1.scm to tell c that testFloat and it's argument are floats. Well, 
 that only took most
 of a day to learn
 
 On Aug 16, 2011, at 9:15 PM, Paul Colby wrote:
 
 Hi,
 
 I'm running v4.7.0 installed with brew on my mac running 10.6. Before I do a 
 complete reinstall of my operating system I'd like to know if foreign works 
 for
 anyone? I've made a c-file,
 
 -- test1.c ---
 #include stdio.h
 
 float testFloat(float f)
 {
 printf(Float: %f\n,f);
 return 2.0*f;
 }
 
 double testDouble(double d)
 {
 printf(Double: %lf\n,d);
 return 2.0*d;
 }
 -- end of file -
 These functions are compiled into a scheme 
 file using
 csc stest2.scm test1.c
 where the scheme file is,
  stest2.scm --
 (import foreign)
 (define testFloat (foreign-lambda float testFloat float))
 (define testDouble (foreign-lambda double testDouble double))
 (print (testFloat 3.2))
 (print (testDouble 3.2))
 --- end of file 
 running ./stest2 gives
  output  ---
 Float: -0.00
 17.0
 Double: 3.20
 17.0
  end of output ---
 
 Am I missing something fundamental or is 3.2 == -0.0 and 
 17==6.4? 
 
 Thanks
 Paul C.
 
 
 ___
 Chicken-users mailing list
 Chicken-users@nongnu.org
 https://lists.nongnu.org/mailman/listinfo/chicken-users
 
 
 ___
 Chicken-users mailing list
 Chicken-users@nongnu.org
 https://lists.nongnu.org/mailman/listinfo/chicken-users


___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] LLVM fails on Mac OS X 10.7

2011-08-05 Thread Jim Ursetto
To add, llvm-gcc is now the default on 10.7, so any Lion user would probably 
see this issue.  That is why it was necessary to set gcc-4.2 explicitly.

On Aug 5, 2011, at 11:32 PM, Josh Chaney wrote:

 I have a similar, or same issue as reported here ( 
 http://lists.gnu.org/archive/html/chicken-users/2010-12/msg00159.html ) from 
 David Dreisigmeyer. Running make appears to work fine, but when I run make 
 install it hangs at chicken-update -update-db. Also running 'csi' does 
 nothing ( no errors, just sits there ). Running 'csi -:d' gives me:
 
 [debug] application startup...
 [debug] heap resized to 50 bytes
 [debug] stack bottom is 0x0.  Someone I spoke to on IRC said this was 
 odd, and probably important.
 [debug] entering toplevel toplevel...
 [debug] stack resized to 131072 bytes
 [debug] entering toplevel library_toplevel…
 
 Output of gcc -v:
 Using built-in specs.
 Target: i686-apple-darwin11
 Configured with: 
 /private/var/tmp/llvmgcc42/llvmgcc42-2335.15~25/src/configure 
 --disable-checking --enable-werror --prefix=/Developer/usr/llvm-gcc-4.2 
 --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ 
 --program-prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ 
 --with-slibdir=/usr/lib --build=i686-apple-darwin11 
 --enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2335.15~25/dst-llvmCore/Developer/usr/local
  --program-prefix=i686-apple-darwin11- --host=x86_64-apple-darwin11 
 --target=i686-apple-darwin11 --with-gxx-include-dir=/usr/include/c++/4.2.1
 Thread model: posix
 gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)
 
 
 I was able to successfully install using the below params thanks to 
 zbigniew's help on #chicken:
 
 make C_COMPILER=gcc-4.2 PLATFORM=macosx  
 
 --  
 Josh Chaney
 
 
 ___
 Chicken-users mailing list
 Chicken-users@nongnu.org
 https://lists.nongnu.org/mailman/listinfo/chicken-users


___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Problem w/ a new egg

2011-07-06 Thread Jim Ursetto
On Jul 5, 2011, at 10:05 PM, Kon Lovett wrote:

 My initial save did not list the .meta in the files manifest so the above msg 
 made some sense. I quickly remedied the oversight. But I still get the msg.

Just so you know, the files entry isn't used anymore.
Jim
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Solaris 10 / SPARC - PsTK and manyargs

2011-07-06 Thread Jim Ursetto
On Jul 6, 2011, at 8:02 AM, Claude Marinier wrote:

 I asked chicken-install to save the temporary files and moved them to 
 /usr/local/src. Applied the patch; had fun with carriage returns. Built with
 
chicken-install -l /usr/local/src -t local pstk

Sorry about the CRs, the original file uses CRs and they may have gotten 
garbled.

For future reference, another way to apply a patch and rebuild would be:

chicken-install -r pstk
cd pstk
patch  my.patch
chicken-install

 Excellent! the hello and C° converter example programs work both interpreted 
 and compiled.

Great.  I've filed a ticket (http://bugs.call-cc.org/ticket/635) for the 
maintainer.

Jim
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] reload .so in csi?

2011-07-01 Thread Jim Ursetto
On Jul 1, 2011, at 1:38 PM, Christian Kellermann wrote:

 A convenient way is to define a system comprising your source for the
 .so with the system egg (http://api.call-cc.org/doc/system). This uses
 the compile-file procedure to create a new .so name each time it is
 compiled.

That is probably the best solution.  The other solution is to use (load 
foo.so) but it may not work on all platforms.  (I sent that last bit in 
private mail but forgot to copy the list)
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] where move-file is?

2011-06-30 Thread Jim Ursetto
On Jun 30, 2011, at 8:30 AM, Mario Domenech Goulart wrote:

 Maybe Jim can provide a good explanation for the api.call-cc.org path.
 I suppose the Extensions section from the manual is mapped as `eggs' in
 chicken-doc.  I'm not sure.

It's an unfortunate exception.  The pages mapped under chicken are either 
plain manual pages like deployment or acknowledgements, or alternatively, 
describe identifiers you bring in when you (import chicken), like the 
exceptions and macros pages.

However, the eggs (Extensions) manpage contains some stuff that is actually 
from setup-api.  Normally that stuff would go in Unit setup-api and appear in 
chicken-doc under the setup-api page.  But setup-api is not an official unit, 
I guess.  Instead the page just states procedures for use in setup scripts.

I don't know if there's any desire to change this to make it clearer in the 
manual and/or prevent misunderstandings in chicken-doc.

Jim
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Problems with csc 4.7.0 on x86_64

2011-06-14 Thread Jim Ursetto
On Jun 14, 2011, at 2:11 AM, Vesa Kaihlavirta wrote:

 Excerpts from Jim Ursetto's message of 2011-06-14 03:35:48 +0300:
 FYI, there is a patch to enable parallel builds
 
 Full chicken build, single process, ran through bash's time on our build 
 machine:
 
 real 3m11.415s
 user 3m5.0568s

You haven't lived until you have achieved sub-minute build times.

real0m51.932s
user3m3.829s

Jim ;)
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Problems with csc 4.7.0 on x86_64

2011-06-13 Thread Jim Ursetto
FYI, there is a patch to enable parallel builds at 
http://bugs.call-cc.org/attachment/ticket/526/parallel-build-2.diff.txt .  It's 
not officially supported yet, but if you want to test it out, please do.
Jim
  
On Jun 13, 2011, at 10:20 AM, Vesa Kaihlavirta wrote:

 Excerpts from Jim Pryor's message of 2011-06-13 15:51:21 +0300:
 On Mon, Jun 13, 2011 at 12:56:42PM +0200, Thomas Chust wrote:
 2011/6/13 Jim Pryor lists+chic...@jimpryor.net:
 
 I'm cc'ing Vesa Kaihlavirta, who's listed as the current maintainer for
 the Chicken package in Arch. Vesa, some of us on the Chicken Scheme
 mailing list determined that successfully building and installing
 Chicken 4.7.0 requires -j2, -j3, etc flags to be turned off in the
 package() portion of the PKGBUILD script, as well as in the build()
 portion. Also, the manual symlinking to the library at the end of the
 current PKGBUILD can and should be deleted.
 
 Here is my working PKGBUILD:
 ...
 
 Thank you! I'll merge this in the next version.
 
 --vk
 
 ___
 Chicken-users mailing list
 Chicken-users@nongnu.org
 https://lists.nongnu.org/mailman/listinfo/chicken-users


___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Problems with csc 4.7.0 on x86_64

2011-06-12 Thread Jim Ursetto
I think Thomas is right, it looks like the system can't find the shared library 
as it is perhaps installed incorrectly, and is falling back to the static 
library which will fail.

On Jun 12, 2011, at 2:44 PM, Jim Pryor wrote:
 
 $ csc -s hello.scm
 /usr/bin/ld: /usr/lib/libchicken.a(library-static.o): relocation R_X86_64_32S 
 against `.text' can not be used when making a shared object; recompile with 
 -fPIC
 /usr/lib/libchicken.a: could not read symbols: Bad value
 collect2: ld returned 1 exit status


___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Different factorial results

2011-06-03 Thread Jim Ursetto

On Jun 3, 2011, at 11:49 AM, John Cowan wrote:

 Steve Graham scripsit:
 
 Thanks, Mario.  Worked like a charm.  Why is that not part of the base
 package?
 
 Licensing.  The numbers egg has to be GPL, because it depends on the GMP
 (GNU Multi-precision Library) which is GPL.

numbers is BSD and hasn't depended on GMP since Peter rewrote it to use a 
heavily modified version of Scheme48's bignum code.

numbers isn't in core mainly because Chicken tries to push functionality into 
eggs when possible.

Jim
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] [wish list] chicken-install: show available eggs, upgrade all installed eggs?

2011-05-05 Thread Jim Ursetto
On May 5, 2011, at 9:58 AM, William Xu wrote:

 Felix felix at call-with-current-continuation.org writes:
 What editor are you using?
 
 Emacs.  You mentioned in the other mail it has no problem with default setup. 
  i
 think that may be due to my emacs config then, i will check my config.  
 However,
 eliminating use of tabs would still be much better, where the indention will 
 be
 the same in all editors.

Hi there,
Try putting the following in .dir-locals.el in the root directory of your git 
checkout:

((nil . ((indent-tabs-mode . t)
 (tab-width . 8

This will cause your emacs to maintain Felix's indentation conventions when 
editing any file under that directory, without changing your preferred defaults.

Jim
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Difficulty installing Hyde egg

2011-04-05 Thread Jim Ursetto
Hi John,

On Apr 5, 2011, at 2:12 PM, John Magolske wrote:

 If building chicken from source, could there be a way of doing
 something like:
 
  SET(BINPATH /home/john/.chicken/bin) 

If building from source, you might as well just do

make PREFIX=/home/john/.chicken

and dispense with all the CHICKEN_REPOSITORY stuff.

Jim

___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Generic RDBMS Interface [Was: Re: Creating Windows GUI App]

2011-04-01 Thread Jim Ursetto
On Apr 1, 2011, at 7:47 AM, Thomas Chust wrote:

 There is at least one small point that I would want to do differently,
 though: In my opinion it has some value if the procedure establishing
 the database connection has a fixed signature and driver specific
 information is encoded in a single argument. I'm pondering about using
 an URI for that purpose.

Just use an alist.
Jim

___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Big Randoms

2011-03-11 Thread Jim Ursetto
On Mar 11, 2011, at 8:55 AM, David N Murray wrote:
 Looking at the difference between your csi announcement and mine, I notice
 that I'm building the 64bit version.  If I try the same thing on a 32-bit
 build, I don't have the problem.


Not that this helps much but I can reproduce the SIGFPE (on the same platform).

Version 4.6.6 
macosx-unix-gnu-x86-64 [ 64bit manyargs dload ptables ]



___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] getenv

2011-03-11 Thread Jim Ursetto
Hi Dave,
The wiki manual tracks the latest stable release of Chicken, which is 4.6.0 and 
still contains getenv.  It should be removed when 4.7.0 comes out.
Jim

On Mar 11, 2011, at 3:33 PM, David N Murray wrote:

 Hi all,
 
 I'm not sure fixing the docs is the correct thing here, but I'll be happy
 to do it.
 
 http://wiki.call-cc.org/man/4/Unit%20library#get-environment-variable
 
 [procedure] (get-environment-variable STRING)
 [procedure] (getenv STRING)
 
 Returns the value of the environment variable STRING or #f if that
 variable is not defined. See also SRFI-98. getenv is an alias for
 get-environment-variable.
 
 sauron:~ dnm$ csi -n
 
 CHICKEN
 (c)2008-2011 The Chicken Team
 (c)2000-2007 Felix L. Winkelmann
 Version 4.6.5
 macosx-unix-gnu-x86-64 [ 64bit manyargs dload ptables ]
 compiled 2011-03-11 on sauron.local (Darwin)
 
 #;1 (import scheme)
 ; loading /usr/local/lib/chicken/6/scheme.import.so ...
 #;2 (get-environment-variable HOME)
 /Users/dnm
 #;3 (getenv HOME)
 
 Error: unbound variable: getenv
 
   Call history:
 
   syntax  (getenv HOME)
   eval(getenv HOME)   --
 #;3
 
 TIA,
 Dave
 
 
 ___
 Chicken-users mailing list
 Chicken-users@nongnu.org
 http://lists.nongnu.org/mailman/listinfo/chicken-users


___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] No... but it is... interesting...

2011-03-10 Thread Jim Ursetto

On Mar 10, 2011, at 10:57 AM, John Cowan wrote:

 I get one failure running on Chrome 10.0.648.127 beta for Windows:
 (every-of #t) returns #f instead of #t.

Same here on Safari 5.0.4

___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] foreign-lambda* question

2011-03-09 Thread Jim Ursetto
John,
Presuming you no longer need the contents of values after the call to 
window-property-set, you can then use free from unit lolevel to free the 
memory. Is that the case?

On Mar 9, 2011, at 21:35, John J Foerch jjfoe...@earthlink.net wrote:

 Hello,
 
 I'm writing a program that uses xlib and have hit a question that I
 cannot make heads or tails of from the web docs.  I have a procedure
 that takes a window and a list of numbers and sets a property on the
 window which is an array of those numbers.  The array must be an array
 of unsigned long, and foreign-lambda* seems to be the tool for the job
 to make this object.  In an earlier version, I hardcoded the length of
 the array (commented out in the version below), but in the interest of
 code-reuse, I want to generalize it to work on any size list.  I malloc
 memory and copy the data into the block, then return the pointer to the
 block for use in scheme.  My question is, what is the idiomatic way in
 Chicken to free the allocated memory, or turn it over to the garbage
 collector?  Code follows:
 
 (define (set-struts win strut-spec)
  (let ((values ((foreign-lambda* c-pointer ((u32vector s) (int length))
   ;;unsigned long strut[12] =
   ;;{ s[0], s[1], s[2], s[3], s[4], s[5],
   ;;  s[6], s[7], s[8], s[9], s[10], s[11] };
   unsigned long * strut = malloc(sizeof(unsigned long) * 
 length);
   int i;
   for (i = 0; i  length; i++) {
   strut[i] = s[i];
   }
   C_return(strut);)
 (list-u32vector strut-spec)
 (length strut-spec
(window-property-set win _NET_WM_STRUT_PARTIAL
 (vector CARDINAL 32 values
 (length strut-spec)
 
 Thank you,
 
 -- 
 John Foerch
 
 
 ___
 Chicken-users mailing list
 Chicken-users@nongnu.org
 http://lists.nongnu.org/mailman/listinfo/chicken-users

___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Problem OS X Snow Leopard installation/Compilation

2011-03-08 Thread Jim Ursetto
Hi Francis,
The readme instructions you refer to are only to be used for *universal* 
builds, which are not possible on snow leopard.  Nor are they really desirable 
even on tiger or leopard unless you absolutely must support PPC and Intel in 
the same install.

Simply build normally without specifying universal arch or gcc-4.0:
  make PLATFORM=macosx

It may be necessary to add ARCH=x86-64 to this line, only if you are using a 
32-bit kernel and 64-bit userspace -- such as may occur with earlier Intel 
Macs. On fully 32 or 64 bit machines, that is not necessary.

Hope this helps,
Jim


On Mar 8, 2011, at 11:06, Francis Lavoie lav.fran...@gmail.com wrote:

 Hi,
 
 I had some problem installing chicken on my Macs(2) running Snow Leopard. I 
 read the wiki/README and search the mailing list without finding anything 
 that helps resolve the issue.
 
 After some reading and try and error, I found a solution. Maybe someone here 
 can validate what I said and update the documentation to help others.
 
 Problem :
 Can't compile, unable to find stdio.c and all the other basic library.
 
 Solution :
 Don't use ARCH=universal specified in the documentation but instead 
 ARCHFLAGS='-arch x86_64'
 
 ex :
 make C_COMPILER=gcc-4.0 PLATFORM=macosx ARCHFLAGS='-arch x86_64'
 sudo make C_COMPILER=gcc-4.0 PLATFORM=macosx ARCHFLAGS='-arch x86_64' install
 
 I hope it can helps someone. It probably only works for machine with a 64 bit 
 cpu, but It would be nice to update the documentation, because it's a bit 
 frustrating.
 
 Thanks 
 
 Francis
 
 ___
 Chicken-users mailing list
 Chicken-users@nongnu.org
 http://lists.nongnu.org/mailman/listinfo/chicken-users

___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] readline egg (OS X 10.6.6 / Chicken 4.6.0)

2011-03-04 Thread Jim Ursetto
On Wed, Jan 26, 2011 at 18:33, Jim Ursetto zbignie...@gmail.com wrote:
 The readline egg build system (which determines which libraries to use
 for readline) has been rewritten around 9,996 times and I think a
 recent change broke it, deleting the code which honored CSC_OPTIONS.

 I have checked in a fix (again...) to trunk.  If you have access, can
 you try it (with the procedure from the wiki, using CSC_OPTIONS)?

 Also any other interested party is invited to test out trunk before I
 tag it as 1.993.

 So far I have tested it on OS X (Leopard w/ MacPorts) and Linux.

Someone else reported a problem with a normal build in 1.992 and so I
have tagged 1.993 which fixes the problem.
Jim

___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Chicken Scheme 3 extension dependency problem

2011-02-15 Thread Jim Ursetto
I looked into it some more and it appears that simple-logging is indeed present 
in the chicken 3 repository, but for some reason, chicken-setup claims it 
cannot be found.  I have never seen this before, any ideas anyone?

In the meantime you might like to try qwiki with chicken 4, which is what we 
use for the project wiki and is therefore actively maintained.
Jim

On Feb 15, 2011, at 16:25, Paul Nelson pablo...@salientblue.com wrote:

 I'm not sure. I'm very new to Chicken Scheme. All I can assert is that when I 
 tried to use chicken-setup from a Chicken Scheme 3 instance to install an Egg 
 (e.g. stream-parser or scheme-dissect), it fails due to a broken dependency 
 on simple-logging.
 
 When I reviewed the available Eggs for Scheme 3 and available Eggs for Scheme 
 4, simple-logging was listed in the latter but not in the former. However, I 
 looked at it again today while looking up the URL's and none of the Eggs for 
 svnwiki are listed on the Scheme 4 Eggs page anymore, including 
 simple-logging. I'm certain they were in that list several days ago.
 
 Perhaps the removal of the svnwiki Eggs from Scheme 4 also means the 
 simple-logging dependency has been removed from the Scheme 3 Eggs. I may try 
 an svnwiki install again eventually.
 
 On Mon, Feb 14, 2011 at 1:12 PM, Jim Ursetto zbignie...@gmail.com wrote:
 If only the Chicken 4 versions added a dependency on simple-logging, why is 
 it a problem for Chicken 3?
___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Chicken Scheme 3 extension dependency problem

2011-02-14 Thread Jim Ursetto
If only the Chicken 4 versions added a dependency on simple-logging, why is it 
a problem for Chicken 3?

On Feb 14, 2011, at 10:58, Paul Nelson pablo...@salientblue.com wrote:

 I have been working on installing svnwiki using Chicken Scheme 3. 
 Unfortunately, several of the extensions (Eggs) appear to have been updated 
 to Chicken Scheme 4 and have a dependency on the simple-logging extension. 
 The simple-logging extension does not seem to be available for Chicken Scheme 
 3.
 
 Is there a way to verify this? For the Eggs that require simple-logging, is 
 there a previous version of the egg that is compatible with Chicken Scheme 3 
 and, if so, is there a way to force chicken-setup to load the old version of 
 the Egg?
 
 If this is not possible, what would it take to back-port simple-logging to 
 Chicken Scheme 3?
 
 Cheers,
 Paul Nelson
 ___
 Chicken-users mailing list
 Chicken-users@nongnu.org
 http://lists.nongnu.org/mailman/listinfo/chicken-users

___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] C_word type / Cython (warning: passing argument 2 from incompatible pointer type)

2011-02-12 Thread Jim Ursetto
C_word is the fundamental scheme object type.  The underlying type of int or 
long is just used to make the width of this type 32-bit or 64-bit, and the 
actual representation is indicated by a type tag (some subset of bits in that 
word).  So it actually can return an arbitrary result.  See Data Representation 
in the manual for details.

Jim

On Feb 12, 2011, at 6:47, David Dreisigmeyer dwdreisigme...@gmail.com wrote:

 Thanks Felix,
 
 Mt question wasn't clear.  What about C_word's use here:
 
 int CHICKEN_eval_string (char *str, C_word *result)
 
 Wouldn't this be able to return arbitrary results?  I was thinking
 that this is like CHICKEN_eval_string_to_string except an actual
 scheme expression is returned instead of a string.
 
 
 On Sat, Feb 12, 2011 at 5:11 AM, Felix
 fe...@call-with-current-continuation.org wrote:
 From: David Dreisigmeyer dwdreisigme...@gmail.com
 Subject: [Chicken-users] C_word type / Cython (warning: passing argument 2 
 from incompatible pointer type)
 Date: Fri, 11 Feb 2011 17:47:24 -0500
 
 Here's the solution on the Cython side.
 
 Is C_word a long (or int) though?
 
 
 A long on 64-bit platforms and an int on 32-bit systems.
 
 
 cheers,
 felix
 
 
 ___
 Chicken-users mailing list
 Chicken-users@nongnu.org
 http://lists.nongnu.org/mailman/listinfo/chicken-users

___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] How can I get an offline version of the manual

2011-02-07 Thread Jim Ursetto
In addition you can use the command-line version of manual-labor
directly to build the manual from a Chicken snapshot, or as shown
below, a copy of the manual from the wiki:

$ chicken-install manual-labor
$ svn co --username anonymous --password 
http://code.call-cc.org/svn/chicken-eggs/wiki/man/4 manual
$ manual-labor manual manual-html

The top page is The User's Manual.html.  The makefile recipe Felix
provided will include a nice launch page as index.html; otherwise,
for convenience you can just link or copy The User's Manual to
index.html.

$ cd manual-html
$ ln -s The User's Manual.html index.html

Jim

On Mon, Feb 7, 2011 at 04:12, Felix
fe...@call-with-current-continuation.org wrote:
 From: pmarin pmarin.m...@gmail.com
 Subject: [Chicken-users] How can I get an offline version of the manual
 Date: Tue, 1 Feb 2011 12:00:17 +0100

 Is there any way to get an offline version of the manual?
 I know that the source is in ./manual but I don't know how can i build
 it. Is there any 'make' option for that?

 You need the manual-labor egg, which converts the wiki-syntax manual
 to html. You can create it like this (assuming you have a git checkout
 of the core system):

 make PLATFORM=... html

 This should produce the HTML version of the manual in the manual-html
 directory.


 cheers,
 felix

 ___
 Chicken-users mailing list
 Chicken-users@nongnu.org
 http://lists.nongnu.org/mailman/listinfo/chicken-users


___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] readline egg (OS X 10.6.6 / Chicken 4.6.0)

2011-01-26 Thread Jim Ursetto
David,

The readline egg build system (which determines which libraries to use
for readline) has been rewritten around 9,996 times and I think a
recent change broke it, deleting the code which honored CSC_OPTIONS.

I have checked in a fix (again...) to trunk.  If you have access, can
you try it (with the procedure from the wiki, using CSC_OPTIONS)?

Also any other interested party is invited to test out trunk before I
tag it as 1.993.

So far I have tested it on OS X (Leopard w/ MacPorts) and Linux.

Jim

On Wed, Jan 26, 2011 at 05:02, David Dreisigmeyer
dwdreisigme...@gmail.com wrote:
 Using Macports, I had to do the following in order to get the readline
 egg to install:

 $ sudo ln -s /opt/local/lib/libreadline.dylib /usr/local/lib/
 $ sudo ln -s /opt/local/include/readline/ /usr/local/include/readline

 The procedure on the wiki didn't work.

 ___
 Chicken-users mailing list
 Chicken-users@nongnu.org
 http://lists.nongnu.org/mailman/listinfo/chicken-users


___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] The following code causes a segfault in the chicken interpreter (forwarded)

2011-01-17 Thread Jim Ursetto
Works fine on Ubuntu 10.10, csi 4.5.2 (once you change syntax rules
to syntax-rules).

4.2.0 is pretty ancient.

 -- Forwarded message --
 From: Tom Ostojich tostoj...@gmail.com

 Using csi version 4.2.0 on GNU/Linux (Ubuntu 10.04) built for x86
 causes a segfault when the following code is evaluated:

 (define-syntax ∫
        (syntax rules ()
                ((∫ x ...) '(x ...

 (∫ x ^2 + x + 1 dx)

 Considering that segfaults are fairly serious, I figured that it I
 should let you know.

___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Re: sqlite3 egg patches for chicken experimental branch

2011-01-13 Thread Jim Ursetto
On Jan 13, 2011, at 4:11, Felix fe...@call-with-current-continuation.org 
wrote:

 From: Jim Ursetto zbignie...@gmail.com
 Subject: Re: [Chicken-users] Re: sqlite3 egg patches for chicken experimental 
 branch
 Date: Wed, 12 Jan 2011 23:16:21 -0600

 I am wondering why milliseconds-time is deprecated in the first
 place.  The internal #time object stores times in milliseconds
 itself, so to simulate milliseconds-time, we have to do a floating
 point division by 1000 just to have Chicken multiply it back by 1000.
 What is the justification for that?
 
 Do you see this as a performance problem? Somehow, the milliseconds
 operations appear to be redundant, since seconds is the more natural
 (to me) time-unit. Probably this was a mistake.

I doubt there is any significant performance issue; it just seemed redundant to 
me to do the unnecessary unit conversions.  I assumed srfi-19 included 
milliseconds and nanoseconds-time just for this reason, so that the user could 
stay in the units he has and possibly gain a (small) efficiency boost.  
Although perhaps arguing from srfi-19 is not helping my case.  If you want to 
remove it I will not cry, too much. 
Jim___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Re: sqlite3 egg patches for chicken experimental branch

2011-01-12 Thread Jim Ursetto
On Wed, Jan 5, 2011 at 21:05, Thomas Chust ch...@web.de wrote:
 the patch replacing noop by void is fine, of course. Concerning the
 change of thread-sleep!/ms I have the same doubts as you: It should
 really be possible to sleep less than a second waiting for database
 locks, so the computation inside thread-sleep!/ms would have to be
 changed to return a floating point number.

I am wondering why milliseconds-time is deprecated in the first
place.  The internal #time object stores times in milliseconds
itself, so to simulate milliseconds-time, we have to do a floating
point division by 1000 just to have Chicken multiply it back by 1000.
What is the justification for that?

Jim

___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] New salmonella features

2010-12-16 Thread Jim Ursetto
On Sun, Oct 24, 2010 at 11:26, Mario Domenech Goulart
mario.goul...@gmail.com wrote:
 For those using the test egg (http://wiki.call-cc.org/eggref/4/test),
 here's a simple trick to set the exit status according to the existence
 of test failures:

  (unless (zero? (test-failure-count)) (exit 1))

In fact, you can just use (test-exit), which is built-in to the test egg.

Jim

___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Re: seg fault

2010-12-01 Thread Jim Ursetto
I swear this was documented in the README, but I can't find it now.

Anyway, instead of changing the Makefile, you just need to pass
ARCH=x86-64 to the make command, like:

make PLATFORM=macosx ARCH=x86-64

Sorry for the inconvenience.
Jim

On Mon, Nov 29, 2010 at 17:44, David Dreisigmeyer
dwdreisigme...@gmail.com wrote:
 It's i386.  This ia a problem with Snow Leopard.  Chicken wouldn't
 compile otherwise, with an error for apply-hack.

 On Mon, Nov 29, 2010 at 4:02 PM, Felix
 fe...@call-with-current-continuation.org wrote:
 From: David Dreisigmeyer dwdreisigme...@gmail.com
 Subject: [Chicken-users] Re: seg fault
 Date: Mon, 29 Nov 2010 13:25:02 -0500

 If I compiled version 4.6.3 everything works fine.  I did have to make
 the following change in Makefile.macosx:

 # platform configuration

 #ARCH ?= $(shell sh $(SRCDIR)/config-arch.sh)
 ARCH = x86-64

 David, what is the output of

  uname -m

 on your machine?


 cheers,
 felix


 ___
 Chicken-users mailing list
 Chicken-users@nongnu.org
 http://lists.nongnu.org/mailman/listinfo/chicken-users


___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Re: seg fault

2010-12-01 Thread Jim Ursetto
We've been over this a few times and haven't found a reliable solution, mainly 
because no devs have 10.6.   The issue is not the kernel but the default output 
format of gcc itself. If anyone has a reliable way to determine that for all 
10.6 installs, and which still works for all 10.4 and 10.5, please let us know. 
 Undoubtedly some project has gotten this right. 

Barring that, you have to manually set ARCH on 10.6. 

Jim

On Dec 1, 2010, at 7:31, Felix fe...@call-with-current-continuation.org wrote:

 From: Stephen Eilert spedr...@gmail.com
 Subject: Re: [Chicken-users] Re: seg fault
 Date: Wed, 1 Dec 2010 09:50:59 -0300
 
 On Tue, Nov 30, 2010 at 11:51 AM, David Dreisigmeyer
 dwdreisigme...@gmail.com wrote:
 You can do this to default to 64-bit, versus 32-bit:
 
 http://www.overclock.net/mac/564147-how-enable-64-bit-default-os.html
 
 Does it help with this specific issue?
 
 Even with a 32-bit kernel (and extensions), OSX will run 64bit
 applications just fine.
 
 Furthermore, some machines cannot enable the 64-bit kernel (my White
 Macbook doesn't seem to be able to, for instance).
 
 What we need is a way to determine the correct ARCH settings via
 shell commands, so that the makefile can take care of this.
 
 
 cheers,
 felix
 
 ___
 Chicken-users mailing list
 Chicken-users@nongnu.org
 http://lists.nongnu.org/mailman/listinfo/chicken-users

___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] objc install error on OS X 10.6.5

2010-12-01 Thread Jim Ursetto
It's not supported on 10.6, I apologize. For this one there is no workaround. 

On Dec 1, 2010, at 12:09, David Dreisigmeyer dwdreisigme...@gmail.com wrote:

 I can't install the objc egg (see below).  Thanks again. -Dave
 
 P.S. Sorry for all of the emails.
 
 
 
 Last login: Wed Dec  1 13:02:29 on ttys003
 new-host:~ daviddreisigmeyer$ sudo chicken-install objc
 Password:
 retrieving ...
 resolving alias `kitten-technologies' to:
 http://chicken.kitten-technologies.co.uk/henrietta.cgi
 connecting to host chicken.kitten-technologies.co.uk, port 80 ...
 requesting /henrietta.cgi?name=objcmode=default ...
 reading response ...
 HTTP/1.1 200 OK
 Date: Wed, 01 Dec 2010 18:06:01 GMT
 Server: Apache
 Connection: close
 Transfer-Encoding: chunked
 Content-Type: text/plain
 reading chunks ...
 reading files ...
  ./objc-cocoa.scm
  ./LICENSE
  ./objc-runtime.h
  ./debug/
  ./debug/low.scm
  ./debug/notes.txt
  ./debug/foreign-types.scm
  ./debug/locations.scm
  ./debug/closure.scm
  ./objc-class-proxies.scm
  ./objc-class-proxies-bin.scm
  ./objc.scm
  ./scheme-object.h
  ./alignment.scm
  ./array.scm
  ./convert.scm
  ./objc.meta
  ./scheme-object.m
  ./doc/
  ./doc/eggdoc-zb.scm
  ./doc/objc-04-changes.txt
  ./doc/eggdoc-objc.scm
  ./doc/impl-notes.txt
  ./doc/Makefile
  ./objc-support.scm
  ./objc.setup
  ./classes.scm
 objc located at /tmp/tempcf07/objc
 checking platform for `objc' ...
 checking dependencies for `objc' ...
 install order:
 (objc)
 installing objc: ...
 changing current directory to /tmp/tempcf07/objc
  /usr/local/bin/csi-4.6.0 -bnq -setup-mode -e (require-library
 setup-api) -e (import setup-api) -e (setup-error-handling) -e
 (extension-name-and-version '(\objc\ \\))
 /tmp/tempcf07/objc/objc.setup
  /usr/local/bin/csc-4.6.0 -feature compiling-extension -setup-mode
 objc.scm scheme-object.m -s -objc -O2 -d1 -j objc -extend easyffi
 -lffi -I/usr/include/ffi -framework Foundation
 objc.m: In function ‘objc_method_dealloc’:
 objc.m:35: error: ‘struct objc_super’ has no member named ‘class’
 objc.m:35: error: ‘struct objc_class’ has no member named ‘super_class’
 objc.m: In function ‘objc_release’:
 objc.m:97: error: ‘struct objc_class’ has no member named ‘name’
 objc.m: At top level:
 objc.m:111: error: ‘objc_class’ is unavailable (declared at built-in:0)
 objc.m: In function ‘find_ivar’:
 objc.m:127: error: ‘struct objc_class’ has no member named ‘super_class’
 objc.m: In function ‘alignof_type’:
 objc.m:228: warning: passing argument 2 of ‘NSGetSizeAndAlignment’
 from incompatible pointer type
 objc.m:228: warning: passing argument 3 of ‘NSGetSizeAndAlignment’
 from incompatible pointer type
 objc.m: In function ‘sizeof_type’:
 objc.m:340: warning: passing argument 2 of ‘NSGetSizeAndAlignment’
 from incompatible pointer type
 objc.m:340: warning: passing argument 3 of ‘NSGetSizeAndAlignment’
 from incompatible pointer type
 objc.m: At top level:
 objc.m:350: error: ‘objc_class’ is unavailable (declared at built-in:0)
 objc.m:350: error: ‘objc_class’ is unavailable (declared at built-in:0)
 objc.m: In function ‘register_class’:
 objc.m:351: error: ‘objc_class’ is unavailable (declared at built-in:0)
 objc.m:351: error: ‘objc_class’ is unavailable (declared at built-in:0)
 objc.m:351: error: ‘objc_class’ is unavailable (declared at built-in:0)
 objc.m:355: error: ‘struct objc_class’ has no member named ‘super_class’
 objc.m:356: error: ‘struct objc_class’ has no member named ‘super_class’
 objc.m:359: error: ‘objc_class’ is unavailable (declared at built-in:0)
 objc.m:364: error: ‘struct objc_class’ has no member named ‘info’
 objc.m:364: error: ‘CLS_CLASS’ undeclared (first use in this function)
 objc.m:364: error: (Each undeclared identifier is reported only once
 objc.m:364: error: for each function it appears in.)
 objc.m:365: error: ‘struct objc_class’ has no member named ‘info’
 objc.m:365: error: ‘CLS_META’ undeclared (first use in this function)
 objc.m:372: error: ‘struct objc_class’ has no member named ‘name’
 objc.m:373: error: ‘struct objc_class’ has no member named ‘name’
 objc.m:373: error: ‘struct objc_class’ has no member named ‘name’
 objc.m:373: error: ‘struct objc_class’ has no member named ‘name’
 objc.m:373: error: ‘struct objc_class’ has no member named ‘name’
 objc.m:374: error: ‘struct objc_class’ has no member named ‘name’
 objc.m:374: error: ‘struct objc_class’ has no member named ‘name’
 objc.m:378: error: ‘struct objc_class’ has no member named ‘methodLists’
 objc.m:379: error: ‘struct objc_class’ has no member named ‘methodLists’
 objc.m:382: error: ‘struct objc_class’ has no member named ‘methodLists’
 objc.m:382: error: ‘struct objc_class’ has no member named ‘methodLists’
 objc.m:389: error: ‘struct objc_class’ has no member named ‘super_class’
 objc.m:390: error: ‘struct objc_class’ has no member named ‘super_class’
 objc.m:394: error: ‘struct objc_class’ has no member named ‘ivars’
 objc.m:395: error: ‘struct objc_class’ has no member named 

Re: [Chicken-users] Re: seg fault

2010-12-01 Thread Jim Ursetto
Maybe!  I'll check it out.

On Dec 1, 2010, at 18:47, Thomas Chust ch...@web.de wrote:

 2010/12/2 Jim Ursetto zbignie...@gmail.com:
 No, this is not a kernel issue but a gcc output issue.
 
 On Dec 1, 2010, at 7:48, David Dreisigmeyer dwdreisigme...@gmail.com wrote:
 
 Would this help(?):
 
 ioreg -l -p IODeviceTree | grep firmware-abi
 
 [...]
 
 Hmm, shouldn't `gcc -dumpmachine` be useful in that case?
 
 Ciao,
 Thomas
 
 
 -- 
 When C++ is your hammer, every problem looks like your thumb.

___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Scheme Code beautifier

2010-11-30 Thread Jim Ursetto
Sure Joe, you can use indent-region, which is bound to M-C-\.  It
won't change your linebreaks, but it will reindent your code.

2010/11/29 Joe Python jopyt...@gmail.com:
 Is there a 'Scheme Code beautifier' where I can call within emacs to tidy up
 existing code with correct indentations?

 ___
 Chicken-users mailing list
 Chicken-users@nongnu.org
 http://lists.nongnu.org/mailman/listinfo/chicken-users



___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Can an egg have a library and executable with the same name?

2010-11-25 Thread Jim Ursetto


On Nov 25, 2010, at 2:09, Peter Bex peter@xs4all.nl wrote:

 On Wed, Nov 24, 2010 at 08:16:55PM -0700, Alan Post wrote:
 If it isn't, can someone point me to an egg that has
 a library and an executable named after the egg?
 
 awful does this.

And chicken-doc, chicken-doc-admin, and chickadee. 
Jim

___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Re: on the hardship of upgrading chicken from 4.6.1 to 4.6.3 -- what I forgot

2010-11-17 Thread Jim Ursetto
On Wed, Nov 17, 2010 at 15:35, Jörg F. Wittenberger
joerg.wittenber...@softeyes.net wrote:
 * A lot of changes are about white space / reformatting or insignificant
 things as replacing angle brackets with round ones.  Especially in LISP
 languages, where this amounts to large line wise diff's for no
 structural reason.

`git diff --color-words` is your best friend.

Jim

___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] Chicken Gazette - Issue 9

2010-10-25 Thread Jim Ursetto
 _/_/_/  _/_/_/ /
  _/_/_/_/  _/_/_/  _/  _/  _/_/_/_/_/ /
 _/_/_/  _/  _/_/_/  _/_/_/_/  _/_/   /
_/_/_/  _/  _/_/  _/_/_/_/   /
 _/_/_/  _/_/  _/_/_/_/  _/_/_/_/_/  _/_/   .

--[ Issue 9 ]-- G A Z E T T E
   brought to you by the Chicken Team


== 0. Introduction

Welcome to issue 9 of the Chicken Gazette, brought to you by the
letter `k` and the procedure `call/cc`.

== 1. The Hatching Farm

First off, this week's egg news.

  * http-session (http://wiki.call-cc.org/egg/http-session): fix a
bug in session ID generation for long-lived processes, due to a
timer overflow in `current-milliseconds`;
  * estraier (http://wiki.call-cc.org/egg/estraier-client):
performance improvement and regex dependency dropped;
  * wiki-parse (http://wiki.call-cc.org/egg/wiki-parse): deleted,
as it was unused and had diverged too far from upstream to be
maintained;
  * chickadee (http://wiki.call-cc.org/egg/chickadee): added a
wrapper program which simplifies installing and running a server;
  * shell (http://wiki.call-cc.org/egg/shell): a thin wrapper around
a turtle;
  * salmonella (http://wiki.call-cc.org/egg/salmonella): now checks
that eggs are documented and executes egg tests; also something
you can find on a turtle

To take advantage of the new salmonella egg testing, a proper exit
code was added to `tests/run.scm` in many eggs, reflecting whether a
test failure occurred.

Additionally, explicit dependencies on the new `regex` egg were added
to yet more eggs for compatibility with 4.6.2 and later.

And now a public service announcement. Egg authors, now hear this.
When your egg installs both library files via `install-extension` and
also an executable via `install-program`, you need to use different
IDs for each. By convention, the library files should use the name
of the egg (such as `chicken-doc`) and the executable should use this
same name with something appended, such as `chicken-doc-cmd`. This
prevents the uninstaller from losing track of files. Specifically,
the .setup-info files created by `chicken-install` to track extension
metadata will clobber each other if the IDs are identical.

== 2. Yolklore

Chicken core development was relatively active this week. Dare I say
excitingly so? Yes, I dare it.

Peter Bex committed a patch to the irregex-bugfixes branch that fixes
ticket 411 (https://bugs.call-cc.org/ticket/411), correcting an issue
introduced in 4.6.2.  It makes submatch accessors return `#f` instead
of throwing an error when the submatch is in range but non-matching.
For example, this no longer errors out:

  (string-search-positions (foo)|(bar)|(baz) bar)
  ;= ((0 3) (#f #f) (0 3) (#f #f))

The new blob literal syntax mentioned in the last issue was changed
from #{HEX ...} to #${HEX ...} after concerns were voiced about the
loss of valuable ASCII real-estate. The use of $ to mean hex is of
course well-known to assembly-language programmers of a certain age.

`integer64` and `unsigned-integer64` are now supported as FFI
return values, including in `let-location`, fixing ticket 413
(https://bugs.call-cc.org/ticket/413).

When fed a non-link argument, `read-symbolic-link` in `Unit posix`
now returns that argument when told to resolve symlinks recursively.
Previously it threw an error.

`delete-directory` in `Unit posix` now accepts an optional argument
telling it to delete recursively.

Optional per-slot SRFI-17 setters have been added to `define-record`.

And there were a few `types.db` fixes, as occur from time to time.
`types.db` is a database of procedure signatures for the core, and
is used by the scrutinizer to check procedure argument types at
compile-time.

== 3. Chicken Talk

In which I summarize our last week of mail.

Enwin Thun wrote in
(http://www.mail-archive.com/chicken-users@nongnu.org/msg12297.html)
with a problem installing eggs after upgrading to Ubuntu Maverick.
The cause is that the Chicken infrastructure migrated to new
servers between 4.5.0 and 4.6.0, but Maverick is still on 4.5.0
which points to the old servers. The solution is to provide the
`-l` option to `chicken-install` to override the remote repository
location or, preferably, to change its configuration file.
The changes are detailed at the infrastructure migration page
(http://wiki.call-cc.org/infrastructure-migration).

Discussion is ongoing about the proper procedure to install datafiles
(http://www.mail-archive.com/chicken-users@nongnu.org/msg12208.html)
for eggs, as well as the proper place for compliance with the
Filesystem Hierarchy Standard and BSD's hier(7).  The only eggs known
to the author to be affected are slatex, chicken-doc, and chickadee,
but egg authors are advised to keep an eye on this breaking issue.

On a related note, Kon Lovett recommended 

Re: [Chicken-users] Chicken Gazette - Issue 9

2010-10-25 Thread Jim Ursetto
Hi Alan.

On Mon, Oct 25, 2010 at 18:06, Alan Post alanp...@sunflowerriver.org wrote:
  $ sudo chicken-doc-admin -m man/4

  Error: (irregex-match-start-index) not a valid index
  #regexp-match (8 submatches)
  8

It's a problem with irregex in 4.6.2 (the one that was fixed by
Peter).  You have to pull the irregex-bugfixes branch or downgrade to
4.6.1 or earlier.

Jim

___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] using mmap files as strings?

2010-10-23 Thread Jim Ursetto
On Sat, Oct 23, 2010 at 05:04, Peter Bex peter@xs4all.nl wrote:
 On Fri, Oct 22, 2010 at 05:58:02PM -0600, Alan Post wrote:
 This is excellent, I've learned a lot more about how all of this
 works together now.

 What method would I use to convert a pointer and a length to a
 string?  Even though I'm copying the memory, how do I do it at
 all?

 Something like this:

 {
  C_word *scheme_string;

  scheme_string = C_alloc(C_SIZEOF_STRING(the_length));
  C_string(scheme_string, the_length, the_pointer);
  C_kontinue(the_continuation, scheme_string);
 }

I think this might be better:

(let ((to (make-string len))
 (move-memory! from to len))

Using your original example,

(use posix lolevel)

(let* ((fd (file-open mmap.scm (+ open/rdonly open/nonblock)))
   (size (file-size fd))
   (mmap (map-file-to-memory #f size prot/read (+ map/file map/shared) fd))
   (buf  (memory-mapped-file-pointer mmap)))
  (let* ((len 10)
  (str (make-string len)))
(move-memory! buf str len)
(print str)))

$ csi -script mmap.scm
(use posix

___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] Re: New directory during extension install

2010-10-22 Thread Jim Ursetto
Oh, thank you.  That's the first good explanation I got regarding the
difference between (posix create-directory) and (chicken eggs
create-directory/parents).

That means I can't create directories without creating their parents
then, right?  Say out of some misguided safety precaution I don't want
to accidentally create a large directory tree if I make a typo.

On Fri, Oct 22, 2010 at 19:21, Kon Lovett klov...@mac.com wrote:
 Hi,

 Probably better to use the 'setup-api' routine 'create-directory/parents'
 instead of the 'posix' 'create-directory' since the former will obey
 chicken-install -sudo.

 Best Wishes,
 Kon




___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Installing data files for eggs

2010-10-21 Thread Jim Ursetto
On Thu, Oct 21, 2010 at 01:11, Felix
fe...@call-with-current-continuation.org wrote:

 IIRC, debian only allows post-installation changes to VARDIR. Does this
 apply to DATADIR as well? Where do you (Peter, Jim) see this data files
 to be copied to on egg-installation?

I have no idea about either VARDIR or DATADIR.  I have just been
installing stuff
into directories under (chicken-home), which on my system is e.g.
/usr/local/chicken-4/share/chicken.  So chicken-doc stuff goes into
(chicken-home)/chicken-doc.  That's not done by the installer of
course, but I'd like
to get chickadee installing stuff in the same area via the installer.

I see Peter is using (installation-prefix), like (list
(installation-prefix) share chicken slatex).  I am not sure if
(list (chicken-home) slatex) is always correct but it seems to
produce the same results in this case.

Jim

___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] /sbin/ldconfig: libchicken.so not a symbolic link

2010-10-20 Thread Jim Ursetto
Hi there.
Did you happen to install over an older version of chicken, one which
may have left a libchicken.so remnant there?  From your mail, it
sounds like libchicken.so already existed and it was a real file
instead of a symlink, is that correct?

Jim

2010/10/18 Yi DAI plm@gmail.com:
 Hi,

 After installing 4.6.0 to /usr. It seems that /usr/lib/libchicken.so is not
 a symbolic link to /usr/lib/libchicken.so.5 which causes ldconfig to
 complain on my system. I change it to a symbolic link solving the problem.
 Just report it here. Thanks

 Best,

 --
 DAY
 ___
 Chicken-users mailing list
 Chicken-users@nongnu.org
 http://lists.nongnu.org/mailman/listinfo/chicken-users



___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] /sbin/ldconfig: libchicken.so not a symbolic link

2010-10-20 Thread Jim Ursetto
Ok, thanks. Could you redirect your entire build output from 4.6 to a file and 
send it along (or upload it somewhere if you don't want to send to the whole 
list).  Maybe that will provide a clue. 
Jim

On Oct 20, 2010, at 16:52, Yi DAI plm@gmail.com wrote:

 
 
 On Wed, Oct 20, 2010 at 10:23 PM, Jim Ursetto zbignie...@gmail.com wrote:
 Hi there.
 Did you happen to install over an older version of chicken, one which
 may have left a libchicken.so remnant there? From your mail, it
 sounds like libchicken.so already existed and it was a real file
 instead of a symlink, is that correct?
 
 yes and NO. I did install 4.6 over 4.5 for the first time and got the 
 complaint. Then I suspected as you do it was caused by the left libchicken.so 
 from 4.5. Then I tried to reinstall 4.5 from the repos (btw, I am on Arch, in 
 whose repos still lies the older 4.5) and removed it to see if `pacman' (the 
 package manager of Arch) did a bad job. But the answer is NO, it removed 
 everything, no such libchicken.so left in /usr/lib/. Then I built 4.6 and 
 installed it. After the installation, the complaint appeared. An `ls -l 
 /usr/lib/libchicken.*' showed that libchicken.so was **indeed** not a 
 symbolic link to libchicken.so.5 but a real file.
 
 
 
  
 
 Jim
 
 2010/10/18 Yi DAI plm@gmail.com:
  Hi,
 
  After installing 4.6.0 to /usr. It seems that /usr/lib/libchicken.so is not
  a symbolic link to /usr/lib/libchicken.so.5 which causes ldconfig to
  complain on my system. I change it to a symbolic link solving the problem.
  Just report it here. Thanks
 
  Best,
 
  --
  DAY
  ___
  Chicken-users mailing list
  Chicken-users@nongnu.org
  http://lists.nongnu.org/mailman/listinfo/chicken-users
 
 
 
 
 
 -- 
 DAI Yi
 (代 毅)
 ___
 Chicken-users mailing list
 Chicken-users@nongnu.org
 http://lists.nongnu.org/mailman/listinfo/chicken-users
___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Installing data files for eggs

2010-10-18 Thread Jim Ursetto
On Sat, Oct 2, 2010 at 13:55, Peter Bex peter@xs4all.nl wrote:
 Hi all,

 Is there a proper way to install data files from egg .setup-files?
 I couldn't find anything at http://wiki.call-cc.org/manual/Extensions
 so I rolled my own for the slatex egg:
 [...]
 The disadvantages are obvious: these files don't get uninstalled by
 chicken-uninstall and Chicken's data files aren't necessarily installed
 under $PREFIX/share/chicken  (the user can override $DATADIR on the Make
 invocation when building Chicken).

 So, I think it would be a good idea to add something like this to
 setup-api:

 (define style-path (data-path-for-extension 'slatex))
 (install-data 'slatex
              '(slatex.sty slatex-chicken.sty cltl.sty)
              `((version ,slatex-version))) ;; If this makes sense?

 The data-path-for-extension would return a unique directory for
 this extension in which it is free to dump its files.  I think this would
 make it easier to keep track of where everything is, especially if some
 extensions install a lot of files.

I am all for this because I am about to do something similar for
chickadee.  However a couple notes:
* you didn't use style-path in your example, was that intentional?
* I'd prefer it if install-data were able to install files into
arbitrary directories under the data path (because you might want to
create a tree, e.g. for a webserver root).  It might be ok to require
this tree to be mirrored from the source (e.g. dir/slatex.sty is
always installed in $DATADIR/slatex/dir/slatex.sty, not in an
arbitrary directory), because otherwise the syntax has to change.

This change is in nice-to-have but not critical status for me
because there are situations which it doesn't cover, for example
chicken-doc will install data files into the data directory but only
after install (so they cannot be tracked).  Maybe that is an abuse of
the data directory, I don't know.  What might be interesting (I am
about to get carried away) is a pre/post-remove mechanism that would
be called when you uninstall.

There is already a slight issue with installing different types of
files because the groups all have to be named differently, for example
'slatex (install-extension), 'slatex-cmd (install-program) and
'slatex-data (install-data).  Just pointing out for those unaware that
when you chicken-uninstall slatex, it only uninstalls everything
because chicken-uninstall does a match on everything named *slatex*.
In fact there exist a few eggs which use identical group names and for
which chicken-uninstall won't uninstall everything.

Jim

___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Using irregex safely responsibly

2010-10-11 Thread Jim Ursetto
On Mon, Oct 11, 2010 at 02:51, Peter Bex peter@xs4all.nl wrote:
 On Mon, Oct 11, 2010 at 01:17:49PM +0900, Alex Shinn wrote:

 However, in case of substring and index operations, the result is
 always an integer/a string.  Returning #f is completely unambiguous
 in those cases, so I don't see the need to add yet another procedure.

 It would be preferable to have this behaviour:

  (irregex-match-substring m invalid-i)    = error
  (irregex-match-substring m unmatched-i)  = #f

  (irregex-match-start-index m invalid-i)    = error
  (irregex-match-start-index m unmatched-i)  = #f

I agree with Peter, the /default procedures seem like a needless
abstraction as a totally unambiguous #f is common practice.  For
example, srfi-13 string-index.  Unless this practice is going to be
deprecated somehow by R7RS.

___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Using irregex safely responsibly [Was: Re: dev-snapshot 4.6.3]

2010-10-08 Thread Jim Ursetto
On Fri, Oct 8, 2010 at 02:09, Peter Bex peter@xs4all.nl wrote:
 That's not quite true; some of the compatibility code is still necessary
 to make up for the changes in the API.

If that's the case, it means that eggs compiled with 4.6.0 aren't
compatible with those compiled with 4.6.2, because that compatibility
code is selected at compile-time.  It's looking to me more and more
that the binversion should be bumped from 5 to 6 (as much as I dislike
this).

Why can't the compatibility code be included in the new irregex unit?
In other words, the old procedure names and behavior could be
deprecated but left in so that 1) we don't have to add a blob of
compatibility code to every egg, and 2) eggs using the old irregex API
would be compatible with all Chicken versions without rebuilding.
It's not very nice to the end-user to just remove procedures without
going through a deprecation phase.

Thoughts?
Jim

___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Using irregex safely responsibly [Was: Re: dev-snapshot 4.6.3]

2010-10-08 Thread Jim Ursetto
Eh, let me clarify #2.  Eggs built with 4.6.0 need to be recompiled
with 4.6.2 regardless due to the C_regex_toplevel linking issues.
However, once they are, they would also work with 4.6.0 again, as long
as they stuck to the old irregex API.  I think.  This is pretty
confusing.  Maybe we should bump binversion to 6 after all. :(

On Fri, Oct 8, 2010 at 16:00, Jim Ursetto zbignie...@gmail.com wrote:
 2) eggs using the old irregex API would be compatible with all Chicken 
 versions without rebuilding.

___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] dev-snapshot 4.6.3

2010-10-07 Thread Jim Ursetto
On Wed, Oct 6, 2010 at 07:58, Felix
fe...@call-with-current-continuation.org wrote:
 - the `regex' library unit has been removed and is separately
  available as an extension which should be fully backwards-
  compatible

Just wanted to clarify that if you are upgrading over an older version
in the same install location, you will have to rebuild any eggs that
relied on regex.  Otherwise at load time you will get an error
regarding an undefined reference to C_regex_toplevel (at least on OS
X).  Once the eggs are rebuilt they appear to work with both older and
newer Chicken versions.

___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Using irregex safely responsibly [Was: Re: dev-snapshot 4.6.3]

2010-10-07 Thread Jim Ursetto
On Thu, Oct 7, 2010 at 15:53, Peter Bex peter@xs4all.nl wrote:
 In your egg's file, where you would previously use this idiom:

 (require-library regex)      ; or (use regex) for the lazy  sloppy
 (import irregex)

 you can now replace it with this block (you can delete emulation of
 procedures you are sure you aren't using):

 (cond-expand
  (total-irregex
  (use irregex))
  (else
  (require-library regex)
  (import (rename irregex
                  (irregex-match-start irregex-match-start-index)
                  (irregex-match-end irregex-match-end-index)))
  (define irregex-num-submatches irregex-submatches)
  (define irregex-match-num-submatches irregex-submatches)
  (define (irregex-match-valid-index? m i)
    (and (irregex-match-start-index m i) #t))
  (define (maybe-string-sre obj)
    (if (string? obj) (string-sre obj) obj

Does this mean for every egg that uses the irregex API directly, I
need to insert this blob of code?

There is some inconsistency in the docs:

irregex-match-num-submatches: Returns the number of numbered
submatches that are defined in the
irregex or match object.
irregex-match-valid-index?: Returns {{#t}} iff the {{index-or-name}}
named submatch or index is defined in the {{match}} object.

But below, *-valid-index? says undefined when *-num-submatches says defined:

#;1 (define m (irregex-search (irregex (abc)|(def)|(ghi)) ghi))
#;2 (irregex-match-num-submatches m)
3
#;3 (irregex-match-valid-index? m 2)
#f

The valid-index? predicate does not return a boolean #t value:

#;9 (irregex-match-valid-index? m 3)
0
#;9 (irregex-match-substring m 3)
ghi

Failure behavior for match-start-index and match-substring is
unspecified in the docs.  The former throws an error and the latter
returns #f:

#;3 (irregex-match-start-index m 2)
Error: (irregex-match-start-index) not a valid index
#regexp-match (3 submatches)
2

#;6 (irregex-match-substring m 2)
#f

I prefer the old behavior for consistency because if irregex tells me
that 3 submatches exist, I expect to be able to access them without an
exception being thrown.

___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] More on Packaging eggs

2010-09-29 Thread Jim Ursetto
On Sep 29, 2010, at 16:10, Peter Bex peter@xs4all.nl wrote:

 
 wiki-parse was and initial attempt to tweak what was originally a parser
 by Alex Shinn for mediawiki syntax, so that it could read svnwiki syntax.
 
 If Alex still wants to support it (I wouldn't recommend it, we've hacked
 this egg beyond all recognition), he could remove this marking.

I'd just delete the egg from the repo.  It makes Alex look bad and it's not 
even his fault.___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] 4.6.1 performance boost

2010-09-24 Thread Jim Ursetto
Felix,
Which commit is this in?  I would like to try before and after
tests to confirm.
Jim

On Fri, Sep 24, 2010 at 11:50, Felix
fe...@call-with-current-continuation.org wrote:
 From: Mario Domenech Goulart mario.goul...@gmail.com
 Subject: [Chicken-users] 4.6.1 performance boost
 Date: Fri, 24 Sep 2010 09:17:20 -0400

 Hi

 I don't know what kind of magic Felix is doing, but for a very quick,
 simple and limited benchmark I can see a BIG performance improvement
 when comparing 4.5.0 and 4.6.1.


 There has been an improvement to the garbage collector, which is likely
 to have caused this: the function that marks each live value performs
 a test for immediate data (which doesn't have to be marked). This
 test has been manually inlined and that improves GC speed considerably
 under heavy load. So, no magic involved...


 cheers,
 felix

 ___
 Chicken-users mailing list
 Chicken-users@nongnu.org
 http://lists.nongnu.org/mailman/listinfo/chicken-users


___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Incremental build, tricks or tips anyone?

2010-09-05 Thread Jim Ursetto
Matthew,
Would it be possible for you to use the make macro that is built into setup-api 
(and therefore chicken-install), along with 'csc -t' for example to do the 
translation from .c to .o, rather than manually invoking gcc? csc can also be 
called in a separate step to link your object files together.  And you should 
be able to obtain the names of your source files via scheme calls.
Jim

On Sep 5, 2010, at 16:52, Matthew Welland m...@kiatoa.com wrote:

 I am updating some old code and the build broke because chicken-config no 
 longer exists.  It took a while but I finally found that all I had to do was 
 replace chicken-config with csc. I.e. csc -cflags in place of 
 chicken-config 
 -cflags.
 
 My question is, does anyone have a nicer way of doing this? I sometimes work 
 on very weak machines such as single board computers and really appreciate 
 build times of seconds instead of minutes when only one file has changed. 
 
 src_code  := laedlib tc_laedlib re-route 
 scm_files := $(addprefix ../scm/,$(addsuffix .scm,$(src_code)))
 c_files   := $(addprefix src/,$(addsuffix .c,$(src_code)))
 o_files   := $(addprefix src/,$(addsuffix .o,$(src_code)))
 
 $(c_files): src/%.c: ../scm/%.scm ../scm/macros.scm
   chicken $ -output-file $@
 
 $(o_files): src/%.o: src/%.c
   gcc -c $ `chicken-config -cflags` -o $@
 
 $(src_code): %: src/%.o src/laedlib.o
   gcc src/$*.o src/laedlib.o -o $* `chicken-config -libs`
 
 ___
 Chicken-users mailing list
 Chicken-users@nongnu.org
 http://lists.nongnu.org/mailman/listinfo/chicken-users

___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] tinyclos fails to install ...

2010-09-05 Thread Jim Ursetto
On Sep 5, 2010, at 17:24, Matthew Welland m...@kiatoa.com wrote:

 I don't see any options to force chicken-install to use an older version of 
 an egg. Is my only option to either manually get the older egg or manually 
 make a new chicken?

chicken-install tinyclos:1.6.4
___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] Re: chicken-doc

2010-09-02 Thread Jim Ursetto
On Fri, Jul 30, 2010 at 12:34, Jim Ursetto zbignie...@gmail.com wrote:
 Hi all.  Pre-built documentation tarballs are now being generated
 daily from the latest wiki documentation.

Hi chicken-doc-u-hens,

chicken-doc 0.4 is now in the wild and sports a more efficient
repository format which decreases a full install from 60MB to 10MB.
This required a repository version bump, which means existing
repositories must be deleted and rebuilt.  No upgrade option is
provided because life is cruel.

Prebuilt tarballs use the new format, starting now.  If you have an
existing repository, you should delete your repository directory
before extracting the new tarball.  Instructions on doing so are at

http://3e8.org/chickadee/chicken-doc#sec:Cleaning_up_old_repository_crust .

If you are a chicken-doc-admin user and haven't upgraded in a while,
you will notice that reindexing is now fully automatic and much
faster, and incremental updates are now performed thanks to a source
file timestamp stored in each node.  This means updating your
repository after an `svn up` is extremely fast.

Jim

___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Initial release of epoll egg

2010-08-18 Thread Jim Ursetto


On Aug 18, 2010, at 12:10, Peter Bex peter@xs4all.nl wrote:

 On Wed, Aug 18, 2010 at 10:05:50AM -0700, David Reynolds wrote:
 If you've seen my last email, you know I'm working on some server technology
 called Rooster. I broke out the epoll stuff into its own egg and put it on
 github here: http://github.com/davidreynolds/epoll
 
 It's nice that you made it easily installable by making an egg out
 of it.  However, it would be even more easily installable if you
 requested a svn account and put it in the egg repository.

David,
I normally develop in a git or hg repo and then upload to svn only full version 
releases, since it's much easier (and the history is much cleaner!).  You can 
just consider the egg repository a place to distribute your egg rather than a 
place to develop it.
Jim 
___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Scheme code to be read

2010-08-18 Thread Jim Ursetto

On Aug 18, 2010, at 12:21, Mario Domenech Goulart mario.goul...@gmail.com 
wrote:
 
 That's indeed a good idea (as long as the eggs are not mine).

That's awful___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


<    1   2   3   4   >