Re: [Chicken-users] Multithreading test

2005-05-13 Thread Zbigniew
On a related note, I was wondering how one typically handles the case of a function that returns multiple values, but also needs to signal failure. I can think of a few ways: 1. Returning #f as one of the values, and testing for that; 2. out-of-band -- an exception or continuation to error handli

Re: [Chicken-users] Multithreading test

2005-05-13 Thread Zbigniew
meant to address. On 5/13/05, Zbigniew <[EMAIL PROTECTED]> wrote: > It makes sense to throw some kind of exception, but this seems > exceedingly rare from what I've seen. Returning #f is so much more > common. ___ Chicken-users

[Chicken-users] Return multiple values from foreign-lambda*

2005-05-13 Thread Zbigniew
I'm returning multiple values with something like C_values(4, 0, C_k, C_fix(1), C_fix(2)). Is C_values the right function to call? It works fine, but I wonder if this is for internal use only. On 5/9/05, felix winkelmann <[EMAIL PROTECTED]> wrote: > Sorry, this is currently not possible. Using

Re: [Chicken-users] Return multiple values from foreign-lambda*

2005-05-16 Thread Zbigniew
I was writing CPS code directly with foreign-declare (by studying compiled output) before discovering the much nicer foreign-primitive. It was a good way to learn the internals... ;) On 5/14/05, felix winkelmann <[EMAIL PROTECTED]> wrote: > On 5/14/05, Zbigniew <[EMAIL PROTECTED]>

Re: [Chicken-users] Return multiple values from foreign-lambda*

2005-05-17 Thread Zbigniew
nal" (i.e. not part of the documented interface). So I've just studied chicken and the eggs and used my best judgement. On 5/17/05, felix winkelmann <[EMAIL PROTECTED]> wrote: > On 5/15/05, Zbigniew <[EMAIL PROTECTED]> wrote: > > I was writing CPS code directly with

Re: [Chicken-users] regex issues

2005-05-18 Thread Zbigniew
Your example works for me on 1.935. #;18> (use regex) ; loading library regex ... #;19> (string-match-positions ".*needle.*" "hay needle stack" 2) ((2 16)) On 5/15/05, Christian Jaeger <[EMAIL PROTECTED]> wrote: > Hello > > Is this a bug?: > > (string-match-positions ".*needle.*" "hay needle

Re: [Chicken-users] regex issues

2005-05-18 Thread Zbigniew
Correct, I am using libc regex (on OS X). On 5/18/05, felix winkelmann <[EMAIL PROTECTED]> wrote: > I assume Christian uses pcre and you not right? ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken

[Chicken-users] Garbage collection

2005-05-21 Thread Zbigniew
I was wondering if csi keeps some kind of hidden reference to objects you create. Heap memory never seems to get freed, as shown below. Running this code as an executable, or compiling it into a shared library and running that in csi, does free the memory. #;1> (memory-statistics) #(50 44084

[Chicken-users] Egg documentation

2005-05-22 Thread Zbigniew
Hi, I am starting to document an egg I'm working on. I notice many of the html docs on the web page look similar and was curious if there's a script or template used to generate them. Or are they being written by hand? ___ Chicken-users mailing list C

[Chicken-users] Re: Garbage collection

2005-05-23 Thread Zbigniew
Oh, I thought that was just command history so I never tried it! That's really neat. On 5/23/05, felix winkelmann <[EMAIL PROTECTED]> wrote: > On 5/21/05, Zbigniew <[EMAIL PROTECTED]> wrote: > > I was wondering if csi keeps some kind of hidden reference to objects &g

[Chicken-users] SRFI 43: Vector library implementation

2005-05-25 Thread Zbigniew
Hello, I've ported the final reference implementation of SRFI 43 to Chicken, along with several additions/fixes described in the documentation. I hope the result is good enough to be put on the eggs page. http://jiyu.gnook.org/~zbigniew/vector-lib/vector-lib.scm [scheme source]

[Chicken-users] hostinfo egg

2005-05-27 Thread Zbigniew
sion has proved very useful to me. Source: http://jiyu.gnook.org/~zbigniew/hostinfo/hostinfo.scm HTML: http://jiyu.gnook.org/~zbigniew/hostinfo/hostinfo.html Zb ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users

[Chicken-users] [patch] libc regex case-insensitivity

2005-05-30 Thread Zbigniew
This should fix a small bug in libc regex where a case-insensitivity request i.e. (regexp "." #t) would be ignored. --- chicken-1.935/regex.scm.orig2005-05-30 15:39:20.0 -0500 +++ chicken-1.935/regex.scm 2005-05-30 15:39:38.0 -0500 @@ -268,7 +268,7 @@

[Chicken-users] Facilities on top of SRFI 37: args-fold

2005-06-05 Thread Zbigniew
into an egg? Is there another, better implementation somewhere? http://gnook.org/~zbigniew/args/args.scm http://gnook.org/~zbigniew/args/args-examples.scm Zb ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman

Re: [Chicken-users] Facilities on top of SRFI 37: args-fold

2005-06-06 Thread Zbigniew
I like your recipe. Given a robust enough parser and perhaps some very minimal markup to help it along, it would cover a lot of cases. The only problem is, it does not allow you to add a processor function for each option. In practice, though, I wonder how useful the processors are---the exampl

Re: [Chicken-users] Facilities on top of SRFI 37: args-fold

2005-06-06 Thread Zbigniew
lack of data vs code distinction) I would be interested in an outline of your idea even if you can't find your code. On 6/6/05, Michele Simionato <[EMAIL PROTECTED]> wrote: > On 6/6/05, Zbigniew <[EMAIL PROTECTED]> wrote: > > I like your recipe. Given a robust enough

[Chicken-users] SRFI 37: Usage generator

2005-06-07 Thread Zbigniew
ttp://gnook.org/~zbigniew/args/args.scm http://gnook.org/~zbigniew/args/args-examples.scm Here is an illustration [the output is spaced correctly under a fixed-width font]: (use args) (define opt-help (args:make-option (h help) #:none "Display this text" (usage))) (define opts (list (a

[Chicken-users] Re: SRFI 37: Usage generator

2005-06-07 Thread Zbigniew
On 6/7/05, Zbigniew <[EMAIL PROTECTED]> wrote: > (set!-values (options operands) > (args:parse '("help") opts opt-help)) Minor correction, that should have been (set!-values (options operands) (args:parse '("--help") opts opt-help)) As written, &qu

Re: [Chicken-users] Another define bug and a question

2005-06-07 Thread Zbigniew
Reed, Although it's tangential to your question, if you wind up with a macro shadowing a procedure, you can remove the binding with (undefine-macro! foo). I have used this a few times during long interpreter sessions. On 6/6/05, Reed Sheridan <[EMAIL PROTECTED]> wrote: > A self-explanatory snipp

[Chicken-users] Re: SRFI 37: Usage generator

2005-06-08 Thread Zbigniew
I made the current version into an egg: http://jiyu.gnook.org/~zbigniew/args/args.egg You may load the code (args.scm and args-support.scm, also available at that URL) into the interpreter without compiling or installing the extension. However, you must explicitly load args-support.scm (the

[Chicken-users] HP-UX patch

2005-06-08 Thread Zbigniew
http://jiyu.gnook.org/~zbigniew/patches/chicken-1.935-hpux-sl-so.patch This patch enables compilation on HP-UX (tested on 11i). It removes the -R flag to the linker (which HP does not support) and changes the shared library extension to ".sl" to match what is generated by libtool.

Re: [Chicken-users] new snapshot and latest eggs

2005-06-16 Thread Zbigniew
hostinfo egg is also available (host, service, and protocol lookup). I don't believe I officially announced that before. On 6/16/05, felix winkelmann <[EMAIL PROTECTED]> wrote: > New eggs: > > args (thanks to Zbigniew) > web-scheme (thanks to Carlos) > > Several f

[Chicken-users] close-input-pipe return value

2005-06-20 Thread Zbigniew
close-input-pipe discards the return value of the process you invoked, so you can't figure out if it failed. It only signals an error (via exception) if the system call failed. In Perl, close(pipe) will fail on a non-zero exit code (though the code is returned out of band, in $?). An easy fix is

Re: [Chicken-users] close-input-pipe return value

2005-06-20 Thread Zbigniew
On 6/20/05, Jörg F. Wittenberger <[EMAIL PROTECTED]> wrote: > Am Montag, den 20.06.2005, 11:51 -0500 schrieb Zbigniew: > > An easy fix is to have close-input-pipe return the value from pclose() > > (stored in the variable "r"), since it currently returns nothing at

Re: [Chicken-users] close-input-pipe return value

2005-06-20 Thread Zbigniew
would have to be done out of band (should it be deemed desirable.) On 6/20/05, Zbigniew <[EMAIL PROTECTED]> wrote: > Or possibly a really great idea that would even catch > non-zero return codes in with-input-from-pipe etc. ___ Chicken-u

Re: [Chicken-users] close-input-pipe return value

2005-06-20 Thread Zbigniew
Works for me. I was about to patch my tree like that. On 6/20/05, felix winkelmann <[EMAIL PROTECTED]> wrote: > To be honest, I can't think of anything better than returning the status code > in the moment. ___ Chicken-users mailing list Chicken-users

Re: [Chicken-users] memory management for c-string values created in an external function

2005-06-24 Thread Zbigniew
Use return type c-string* and chicken will free() the memory for you. Also, your function does not perform a callback to Scheme, so you can use foreign-lambda instead of foreign-callback-lambda [which is itself deprecated in favor of foreign-safe-lambda]. On 6/24/05, Andrey Fomichev <[EMAIL PROTE

[Chicken-users] Extensions and Scheme variable visibility

2005-06-24 Thread Zbigniew
Let's say I am writing an extension and I have some common code I want available to all the .scm files in the extension, but not visible to the user. Since these functions are internal, I similarly may not want them visible to -every- .scm file in the extension. And it is possible that other exte

[Chicken-users] New egg: sxml-tools

2005-06-26 Thread Zbigniew
://jiyu.gnook.org/~zbigniew/sxml-tools/sxml-tools.egg http://jiyu.gnook.org/~zbigniew/sxml-tools/sxml-tools.html [HTML doc] Zb ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users

Re: [Chicken-users] memory management for c-string values created inan external function

2005-06-27 Thread Zbigniew
> Thank you for your irrefragable answer No, thank -you- for the vocabulary lesson. :) ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users

[Chicken-users] New egg: eggdoc

2005-07-13 Thread Zbigniew
A SXML to HTML documentation tool for eggs. http://jiyu.gnook.org/~zbigniew/eggs/eggdoc.egg http://jiyu.gnook.org/~zbigniew/eggs/eggdoc.html All of my extensions have been converted to use eggdoc, and the source code for each is contained within this egg. If Felix could also upload the new HTML

[Chicken-users] New egg: sxml-transforms

2005-07-13 Thread Zbigniew
The SXML transformations (to XML, SXML, and HTML) from the SSAX project at Sourceforge. http://jiyu.gnook.org/~zbigniew/eggs/sxml-transforms.egg http://jiyu.gnook.org/~zbigniew/eggs/sxml-transforms.html ___ Chicken-users mailing list Chicken-users

[Chicken-users] New egg: doctype

2005-07-13 Thread Zbigniew
A simple extension that provides several XHTML and HTML doctypes as strings. http://jiyu.gnook.org/~zbigniew/eggs/doctype.egg http://jiyu.gnook.org/~zbigniew/eggs/doctype.html ___ Chicken-users mailing list Chicken-users@nongnu.org http

Re: [Chicken-users] FFI unsigned long pointer

2005-07-27 Thread Zbigniew
Toby, you might want to look at the hostinfo egg for examples of passing vector data back to scheme from C. In general there are a few ways to accomplish what you want. However, note that srfi-4 values cannot be used as return types from foreign-lambda. It is definitely possible to build an obje

Re: [Chicken-users] FFI string with embedded nulls

2005-08-03 Thread Zbigniew
Thought I got rid of all those invisible embedded control chars. Let's try again. Toby, Here are two examples. In one I create the string on the heap and return it as a scheme-object from the C code. In the other I write directly into a scheme string, using a locative as the pointer. Neither

Re: [Chicken-users] FFI string with embedded nulls

2005-08-03 Thread Zbigniew
Toby, Here are two examples. In one I create the string on the heap and return it as a scheme-object from the C code. In the other I write directly into a scheme string, using a locative as the pointer. Neither probably works with UTF-8. You didn't specify how the to-len was computed, so I ass

Re: [Chicken-users] Re: first experiments with "simple-macros"

2005-08-10 Thread Zbigniew
I too am quite interested in a decent module system, especially after kludging a few things in the sxml-tools egg to get around the lack of one. I have a couple general questions/observations though: - Startup time of either simple-macros or syntax-case is very long -- 1.7s as opposed to 0.1s wit

Re: [Chicken-users] Bug in the numbers egg?

2005-08-11 Thread Zbigniew
Works for me. In fact (expt 100 1) gives the wrong magnitude, about 10^305, without the patch. Interestingly it is even faster than "calc", the "C-style arbitrary precision calculator (version 2.11.10.1)": time csi -batch -eval '(use numbers) (display (expt 100 1)) (newline)' > /dev/null

Re: [Chicken-users] current status of tinyclos?

2005-08-17 Thread Zbigniew
Also I've found if you override a built-in function such as + or length, previous behaviour will be wiped out. So after: (define-method (+ ( x) ( y)) (string-append x y)) you lose the ability to do (+ 2 3) unless you define the appropriate method on integers, and then + will only take 2 arguments

[Chicken-users] Re: Update for SQLite3 egg, new AquaTerm egg

2005-09-12 Thread Zbigniew
[re: Aquaterm adapter] Nice-- I have made heavy use of gnuplot's AquaTerm driver and the possibility of writing to AquaTerm directly from Scheme is enticing. Thanks. On 9/12/05, Thomas Christian Chust <[EMAIL PROTECTED]> wrote: > Hello, > > I have updated my sqlite3 egg with a minor bugfix to

Re: [Chicken-users] re: mingw_libdir bug

2005-09-26 Thread Zbigniew
The list got all three of your messages. On 9/25/05, Brandon J. Van Every <[EMAIL PROTECTED]> wrote: > [apologies if this is a repost. I've tried to send this 2 times now and > am still not seeing it. Black hole?] ___ Chicken-users mailing list Chick

Re: [Chicken-users] What does #!key mean?

2005-09-26 Thread Zbigniew
Note that Campbell's proposal only covers the functionality of DSSSL #!optional, not #!key [which Shawn liked I presume because of the out-of-order named parameters]. One might also consider using get-keyword on the rest-list (see section 5.7.6, Keywords). I used this method in args.egg for named

Re: [Chicken-users] mailing list trouble

2005-09-26 Thread Zbigniew
The web interface to gmail will show (in your inbox) your replies to a thread already in your inbox. Thus it was surprising that no messages would appear at all, since the first response to a thread you initiate will pull that thread into your inbox. Now it makes sense, if the web client isn't be

Re: [Chicken-users] numbers egg slow?

2005-09-29 Thread Zbigniew
You could use fx+ if you're guaranteed to be operating on fixnums. (You probably knew this already though) On 9/29/05, Daishi Kato <[EMAIL PROTECTED]> wrote: > Original Subject: wishlist: numbers egg (random) support > > At Wed, 28 Sep 2005 20:09:03 +0200, > felix winkelmann wrote: > > > > That s

Re: [Chicken-users] 2.207 snapshot

2005-11-03 Thread Zbigniew
These changes---is someone looking at adding Cocoa support, or otherwise interfacing with OS X stuff? On 11/2/05, felix winkelmann <[EMAIL PROTECTED]> wrote: > - csc: > * new option `-objc' compiles generated C files in Objective-C mode > * accepts .m files > * new option `-framework' is pas

[Chicken-users] s11n + rpc

2005-11-11 Thread Zbigniew
I was testing out the RPC egg and noticed it didn't work between a Mac and a PC. This stems from endian issues in the s11n egg. Now, I don't know if serialization was ever intended to work across architectures, but I went ahead and made a simple patch [attached] to the s11n egg. With this, the R

Re: [Chicken-users] s11n + rpc

2005-11-13 Thread Zbigniew
I think you're describing a more complicated version of WRITE and READ. On 11/12/05, Sean Doran <[EMAIL PROTECTED]> wrote: > One approach would be to translate the binary output into a tagged/ > marked-up format like *gasp* XML... > > A sender would do something like write a tagged/marked-up (numb

Re: [Chicken-users] tagging pointers.

2005-11-16 Thread Zbigniew
Pupeno, although I didn't try your code, the tagged pointer functionality seems to work for me (for artificially-generated pointers). E.g. Version 2, Build 207 - macosx-unix-gnu-ppc - [ dload ptables ] ... #;9> (address->pointer #x80bf740) # #;10> (tag-pointer # 'x-display) # Could you try this

Re: [Chicken-users] tagging pointers.

2005-11-16 Thread Zbigniew
Please try the following patch: --- runtime.c.orig 2005-11-16 19:53:45.0 -0600 +++ runtime.c 2005-11-16 19:53:49.0 -0600 @@ -7308,7 +7308,7 @@ void C_make_tagged_pointer(C_word c, C_word closure, C_word k, C_word tag) { - C_word ab[ 2 ], *a = ab, + C_word ab[ 3 ], *a =

Re: [Chicken-users] hostinfo egg on windows

2005-11-18 Thread Zbigniew
This might answer your question: http://www.mail-archive.com/users@ipv6.org/msg02107.html On 11/18/05, Daishi Kato <[EMAIL PROTECTED]> wrote: > Hi, > > I'm trying to compile hostinfo egg on windows. > What I have done so far: > - add #include and #if _WIN32 > - add ws2_32.lib for link > > howeve

Re: [Chicken-users] hostinfo egg on windows

2005-11-21 Thread Zbigniew
cense) > or just to use inet_ntoa instead and does not support IPv6? > > It is currently not easy to send you a patch, > because the egg is single scm file, which does not > include hostinfo.setup. Would you update it so that > the egg will be hostinfo.egg, or I could do it. &g

[Chicken-users] call-with-values speed

2005-11-22 Thread Zbigniew
I would like to pass along an observation on returning multiple values. I wrote a C function that needed to return two values to scheme, an int and a pointer. Ultimately, I allocated a scheme object for the pointer prior to the call, passed it as an argument, then manipulated the contents in C, "

Re: [Chicken-users] call-with-values speed

2005-11-22 Thread Zbigniew
: > On 11/22/05, Zbigniew <[EMAIL PROTECTED]> wrote: > > > > Unfortunately, I found that handling multiple values is very slow. In > > fact, if you cannot use the method I mentioned above (the fastest), it > > is much faster to construct and deconstruct a list or

Re: [Chicken-users] Dynamic loading foreign C library problem

2005-11-22 Thread Zbigniew
Try the readline egg at http://www.call-with-current-continuation.org/eggs/readline.html. On 11/22/05, Matthew David Parker <[EMAIL PROTECTED]> wrote: > PS. On a side question, is there some thing you can do in the csi chicken > interpreter to make it so you can press the "up" arrow and cycle thr

[Chicken-users] Returning a scheme object inside another

2005-11-22 Thread Zbigniew
I have a C function which calls another C function that creates and returns a scheme-object. Because it returns (rather than continuing) I cannot allocate this on the stack, rather I use malloc. The original caller itself returns this object, along with a c-pointer that can later be freed. As th

[Chicken-users] Returning a void * by reference

2005-11-23 Thread Zbigniew
Here's another interesting performance note, and I assure you everything is compiled this time. I have a C function which returns a void * by reference (i.e. it takes a void ** as argument). I was using let-location, but I found that if you pass a # object as a scheme-pointer, it works just as we

Re: [Chicken-users] Objective-C interface (sort of...)

2005-11-24 Thread Zbigniew
It looks like everybody is working on the same thing. I have been porting and improving the gauche-objc bridge. It takes a highly dynamic (read: slow but very interactive) approach, handling everything at runtime. Method calls work fine; but I am currently working on solving a memory allocation

Re: [Chicken-users] Handling unstandard reader macros.

2005-11-24 Thread Zbigniew
That's odd, the chicken.info file has the correct signature of (set-read-syntax! CHAR PROC). On 11/24/05, felix winkelmann <[EMAIL PROTECTED]> wrote: > On 11/24/05, Pupeno <[EMAIL PROTECTED]> wrote: > > Note: > > http://www.call-with-current-continuation.org/manual/Reader-extensions.html#index-set

Re: [Chicken-users] Returning a void * by reference

2005-11-24 Thread Zbigniew
OS X on PPC. Compilation flags are -O3 -fomit-frame-pointer -fno-strict-aliasing -mcpu=7450 -DC_ENABLE_PTABLES. I will try on my x86 box later. On 11/24/05, felix winkelmann <[EMAIL PROTECTED]> wrote: > On 11/24/05, Zbigniew <[EMAIL PROTECTED]> wrote: > > Here's anoth

Re: [Chicken-users] Handling unstandard reader macros.

2005-11-24 Thread Zbigniew
Both signatures are correct in the info file. On 11/24/05, Pupeno <[EMAIL PROTECTED]> wrote: > On Thursday 24 November 2005 12:29, you wrote: > > That's odd, the chicken.info file has the correct signature of > > (set-read-syntax! CHAR PROC). > But we are talking about set-dispatch-read-syntax! >

Re: [Chicken-users] Objective-C interface (sort of...)

2005-11-25 Thread Zbigniew
sable ideas into your code. Of course, if the past is any guide, you should have a fully-functional implementation inside of 3 days anyway. :D On 11/25/05, felix winkelmann <[EMAIL PROTECTED]> wrote: > On 11/24/05, Zbigniew <[EMAIL PROTECTED]> wrote: > > > > If you want I

Re: [Chicken-users] Objective-C interface (sort of...)

2005-11-26 Thread Zbigniew
Oh, to clarify---unsigned char is always a character. So uchar return / arg types do not accept or convert to predicate values, i.e. an unsigned char always returns C_make_character(*(unsigned char *)obj); On 11/26/05, Zbigniew <[EMAIL PROTECTED]> wrote: > Yes, they use th

Re: [Chicken-users] Objective-C interface (sort of...)

2005-11-26 Thread Zbigniew
Yes, they use the natural representation, so if you know from the methodReturnType call that a return type is _C_DBL, you can cast the return value directly to a double. E.g. C_flonum(&a, *(double *)rbuf); And _C_CLASS is a Class (struct objc_class *) and _C_ID is an id (struct objc_object *).

Re: [Chicken-users] Fwd: libffi

2005-11-28 Thread Zbigniew
I got libffi to work, and ran some tests on the objc egg. In my opinion, if lazy-ffi is the way you choose to go, it will need some modifications to arg and return value conversion, because the current state acts unexpectedly as compared to the native FFI. I appended some test results below (I se

[Chicken-users] testeez egg updated

2005-11-28 Thread Zbigniew
I have updated the testeez egg to the latest upstream version (0.3) and made a couple small additions. A new eggdoc is included. Get it at: http://jiyu.gnook.org/~zbigniew/eggs/testeez.egg ___ Chicken-users mailing list Chicken-users@nongnu.org http

[Chicken-users] zobjc egg

2005-12-09 Thread Zbigniew
the first Cocoa application for Chicken. :) That code is included below, and also in the egg (cd tests/; make). Get zobjc at: http://jiyu.gnook.org/~zbigniew/eggs/zobjc.egg Oh, and it's a cold, snowy 19F here... or -7.222 C. ;;; -- ;;; test f->

[Chicken-users] objc egg

2005-12-12 Thread Zbigniew
I renamed zobjc to objc, and added an eggdoc. http://jiyu.gnook.org/~zbigniew/eggs/objc.egg http://jiyu.gnook.org/~zbigniew/eggs/objc.html Zb ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken

Re: [Chicken-users] objc egg

2005-12-13 Thread Zbigniew
Thanks Raffael. The unit test was for internal use only at the moment and I forgot to fix it. I wrote it when this egg was a port of the Gauche-ObjC bridge. Later I rewrote from scratch but kept the unit test for verification. That particular test is expected to "fail" right now, so no worries.

[Chicken-users] Creating a cocoa app in chicken

2005-12-18 Thread Zbigniew
I've written up a document which walks you through creating the Currency Converter application in Apple's Objective C tutorial, using the objc egg. It uses XCode to create the application skeleton, but would be easily tweaked for Project Builder. A completed application is included, which has its

[Chicken-users] objc and cocoa updated

2005-12-23 Thread Zbigniew
I have updated the objc egg to support NSRect, NSPoint, NSSize, and NSRange, fixed a few bugs and done a bit of renaming. I have also added a new application, Color View, which demonstrates creating a custom NSView (NSRect support was required for this). I'll update the SVN repository as soon as

[Chicken-users] Re: objc and cocoa updated

2005-12-27 Thread Zbigniew
I have updated the objc egg in the SVN repository. On 12/23/05, Zbigniew <[EMAIL PROTECTED]> wrote: > I have updated the objc egg to support NSRect, NSPoint, NSSize, and > NSRange, fixed a few bugs and done a bit of renaming. I have also > added a new application, Color View, whi

[Chicken-users] macro aliases

2005-12-28 Thread Zbigniew
Previously (and as per the manual) I could define a macro alias with (define-macro new-name old-name) This doesn't work any more---now, old-name is evaluated as a variable. Has this been changed? Of course, one can still get the effect of an alias with (define-macro (new-name . args) `(old-name

[Chicken-users] sxml-transforms updated

2005-12-28 Thread Zbigniew
Hi all. I updated the sxml-transforms egg (SVN repo) with the following two changes: 1. Do not prefix inline elements with a newline--fixes a problem with extraneous whitespace. E.g. (p "in" (em "cred") "ible") no longer renders as "in credible". 2. Add (& ENTITY-NAME ...) rule. Allows quoting

Re: [Chicken-users] macro aliases

2006-01-01 Thread Zbigniew
wrote: > On 12/28/05, Zbigniew <[EMAIL PROTECTED]> wrote: > > Previously (and as per the manual) I could define a macro alias with > > (define-macro new-name old-name) > > > > This doesn't work any more---now, old-name is evaluated as a variable. > >

[Chicken-users] Re: sxml-transforms updated

2006-01-04 Thread Zbigniew
t;Use the". This is the same behaviour as seen in HTML. So, if you regenerate an eggdoc after updating sxml-transforms, watch for words thatrun together. On 12/28/05, Zbigniew <[EMAIL PROTECTED]> wrote: > Hi all. I updated the sxml-transforms egg (SVN repo) with the > following two chan

Re: [Chicken-users] length performance

2006-01-05 Thread Zbigniew
Additionally, it would become infeasible to splice a pair into or out of the list [an O(1) operation], given only a pointer into the middle of the list, because you cannot update the counts of earlier list elements. This would be "possible" with a doubly-linked list---but insert and remove would n

[Chicken-users] set-finalizer! and cons

2006-01-17 Thread Zbigniew
I'm in the middle of adding a bunch of stuff to the objc egg, and have encountered a problem. For the first time, I happened to write some code which consed together a few thousand Objective C objects (#) into a list. Suddenly, I took a gigantic speed hit using cons, as compared to code which sim

Re: [Chicken-users] FFI with callbacks for gnu readline

2006-01-18 Thread Zbigniew
It looks like Thomas is right about the callback, although I can't get your example to crash. I'm running Mac OS X PPC, which sometimes allows memory accesses that would cause segfaults elsewhere, so I have another possibility if you still get crashes. Before testing for the scheme string length

Re: [Chicken-users] set-finalizer! and cons

2006-01-20 Thread Zbigniew
6, felix winkelmann <[EMAIL PROTECTED]> wrote: > On 1/18/06, Zbigniew <[EMAIL PROTECTED]> wrote: > The current solution is to increase the size of the pending-finalizers > buffer, done with the "-:fXXX" runtime option. You can also run your > code with "-:d"

[Chicken-users] objc egg v0.4

2006-01-21 Thread Zbigniew
I've updated the objc egg to v0.4 in the SVN repository. An eggdoc is forthcoming, hopefully very soon. In the meantime, here's a summary of changes: - Class proxies. The objc:class wrapper for each class is now unique (rather than simply containing a pointer) and contains metadata useful to th

Re: [Chicken-users] objc egg v0.4

2006-01-21 Thread Zbigniew
On 1/21/06, Kon Lovett <[EMAIL PROTECTED]> wrote: > objc:box/unbox instead of objc:wrap/unwrap That's not a bad idea. > obj-c:* instead of objc:*)? The "objc" prefix is, near as I can tell, universal in Lisp--OpenMCL, Gauche--and other implementations---Python, Ruby, even Emacs'

Re: [Chicken-users] set-finalizer! and cons

2006-01-21 Thread Zbigniew
bug] running 1 finalizers (0 live, 7 allocated) ... bye 169284 #;14> On 1/20/06, felix winkelmann <[EMAIL PROTECTED]> wrote: > On 1/18/06, Zbigniew <[EMAIL PROTECTED]> wrote: > Ok. Finalizers work like this: > > There is a list of "live" finalizers, that is fin

Re: [Chicken-users] syntax-case on mac os x [reposted]

2006-01-22 Thread Zbigniew
Your other message came through. I was able to compile syntax case on 10.4.4 without a problem (and I can't figure out what exit code 10 is). Perhaps run the chicken command (not chicken-setup, but the failing invocation of chicken) by hand, removing -quiet and adding -verbose instead. On 1/22/0

Re: [Chicken-users] set-finalizer! and cons

2006-01-22 Thread Zbigniew
Sorry if I'm being dense---why does it need to release any finalizers at all, if the pending buffer is totally empty? I thought the size of the pending buffer was the issue here. On 1/23/06, felix winkelmann <[EMAIL PROTECTED]> wrote: > The runtime system doesn't know at that time how many of the

Re: [Chicken-users] set-finalizer! and cons

2006-01-23 Thread Zbigniew
zers (5623 live, 5624 allocated) ... 594284 #;7> (define L '()) #;8> (gc #t) [debug] running 5617 finalizers (6 live, 5624 allocated) ... [debug] resizing heap dynamically from 1e8688 tof4344 bytes... 272588 On 1/23/06, felix winkelmann <[EMAIL PROTECTED]> wrote: > On 1/

[Chicken-users] Re: objc egg v0.4

2006-01-25 Thread Zbigniew
I've updated the eggdoc now in SVN and at http://3e8.org/zb/eggs/objc.html. I'm curious if updating the egg repository automatically results in stuff being updated on the web page, or if someone (like Felix) needs to push an update by hand. On 1/21/06, Zbigniew <[EMAIL PROTECTED]&g

[Chicken-users] find-files

2006-02-01 Thread Zbigniew
Just noticed that find-files traverses symbolic links to directories (since directory? returns true for a directory symlink). I'm not sure this behaviour is desirable---at least there should be the option to skip symlinks or treat them strictly as files. _

Re: [Chicken-users] find-files

2006-02-01 Thread Zbigniew
You're right about limit, of course. I looked at using the predicate---which isn't called for directories---and forgot limit, which is. On 2/1/06, felix winkelmann <[EMAIL PROTECTED]> wrote: > On 2/1/06, Zbigniew <[EMAIL PROTECTED]> wrote: > > Just noticed tha

[Chicken-users] Manipulating the iTunes plist file

2006-02-11 Thread Zbigniew
I uploaded an article about reading and modifying the iTunes Music Library property list using the objc egg. It's saturated with commentary and builds a simple library from the ground up, so it might also be useful outside the domain of plists and iTunes, and to beginning Schemers as well. http:/

[Chicken-users] Re: ObjC egg build problem

2006-02-12 Thread Zbigniew
Hi Arto. That is very strange. string-upcase is included in SRFI-13, which I included in cocoa.scm (hopefully correctly) using (require-for-syntax 'srfi-13). This works for me on 2.207 and there have been at least a couple people successfully building it on 2.216. I just built it again as I wro

Re: [Chicken-users] A patch for the patch for the http egg ``+'' problem...

2006-02-15 Thread Zbigniew
I believe there is a serious regression in this patch. The URL is being canonicalized in its entirety at the beginning of http:decode-url, before it is taken apart. This is not correct, because escaped characters should only be unescaped -after- breaking the URL down into pathname and key/value p

Re: [Chicken-users] A patch for the patch for the http egg ``+'' problem...

2006-02-17 Thread Zbigniew
The patch works for me--in fact it is critical for decoding complex referer URLs, such as from Google Images--but I want to be sure I did not miss something (like a problem with http-server). The "url" egg also should probably be changed to remove the + to space translation, as this translation sh

[Chicken-users] Re: [sqlite] Update to the CHICKEN <-> SQLite3 bindings (v1.2.0)

2006-02-18 Thread Zbigniew
Very nice! Thanks very much to both of you. On 2/18/06, Thomas Chust <[EMAIL PROTECTED]> wrote: > On Sat, 18 Feb 2006, [EMAIL PROTECTED] wrote: > > > [...] SQLite has been fixed so that IF EXISTS and IF NOT EXISTS always > > generate a non-NULL statement if there are no errors. [...] > > Wow, tha

[Chicken-users] searches.cgi

2006-02-18 Thread Zbigniew
I have written a CGI script using Chicken, along with a backend script which parses Apache logs and deposits search data in a SQLite database. This was partially a feasibility test, as most people are using Spiffy for page generation, and only plain CGI is allowed at my webhost. If anyone is inte

[Chicken-users] Re: ObjC egg with Chicken 2.3 (define-record setters)

2006-02-19 Thread Zbigniew
Arto: please download another copy of the objc egg. This problem was fixed a week ago. Thanks! On 2/19/06, Arto Bendiken <[EMAIL PROTECTED]> wrote: > Hi, > > I ran into a small glitch trying to use the objc egg with the brand > new Chicken 2.3 (though this also applies to 2.216): > > #;1> (use o

Re: [Chicken-users] (use posix) on mac os x

2006-03-10 Thread Zbigniew
I don't recall seeing a response here and someone else had the same problem. The "solution" is to set DYLD_LIBRARY_PATH=~/scheme/chicken/lib [or wherever your chicken libs are]. It seems that when the chicken libraries are not installed in a standard search path such as /usr/local/lib, dlopen w

Re: [Chicken-users] objc/cocoa and deploying

2006-03-20 Thread Zbigniew
Ben, I haven't yet attacked the problem of distributing binaries to people without a copy of Chicken installed, and I've never been able to get -static working on OS X. Hopefully we can get something working starting with Felix's instructions. It is possible that copies of Chicken's dynamic lib

Re: [Chicken-users] Adding a free slot to Chicken symbols

2006-04-10 Thread Zbigniew
For what it's worth, I put a snapshot of darcs HEAD at http://3e8.org/pub/chicken-darcs-20060410.tar.gz [3.2M] On 4/10/06, John Cowan <[EMAIL PROTECTED]> wrote: > felix winkelmann scripsit: > > > Adding an extra slot to symbols would be pretty handy, and would make > > it easy to implement diffe

Re: [Chicken-users] Deploying objc apps

2006-04-21 Thread Zbigniew
-Excellent- work! As usual. On 4/21/06, felix winkelmann <[EMAIL PROTECTED]> wrote: > Hi! > > I have put together a walkthrough for creating a self-contained > cocoa application that does not need specially compiled eggs. > The idea is to put all required libraries and eggs into the application b

Re: [Chicken-users] Constant for maximum number of arguments?

2006-04-21 Thread Zbigniew
I thought the non-FFI limit was 126? Not that it applies to Reed's question. On 4/18/06, felix winkelmann <[EMAIL PROTECTED]> wrote: > Currently the limit is 120 vs 1000 with libffi installed (the latter > is a completely arbitrary limit). ___ Chicken

  1   2   3   >