Re: [Chicken-users] define-foreign-enum with a typedef

2007-12-13 Thread felix winkelmann
On Dec 13, 2007 8:36 AM, Shawn Rutledge <[EMAIL PROTECTED]> wrote: > On Dec 13, 2007 12:34 AM, felix winkelmann <[EMAIL PROTECTED]> wrote: > > "define-foreign-enum" expands into "define-foreign-variable", which > > are not exported, they can be considered something similar to syntax. > > OK. What'

[Chicken-users] UTF-8 support

2007-12-13 Thread Tobia Conforto
Hello I recently discovered (to my expense) that the default chicken configuration is not Unicode-aware. After digging a bit in the documentation and mailing list archives though, I found out (to my joy) that it can be made so by placing the following two directives before anything else, or in .c

Re: [Chicken-users] UTF-8 support

2007-12-13 Thread felix winkelmann
On Dec 13, 2007 1:46 PM, Tobia Conforto <[EMAIL PROTECTED]> wrote: > > For example, the following fails without the directives and succeeds > with them, at least in a UTF-8 terminal / source code file: > > (string=? "à" (string (integer->char 224))) > > Question: is this the recommended app

[Chicken-users] Re: UTF-8 support

2007-12-13 Thread Tobia Conforto
felix winkelmann wrote: > Good idea. You could help us by adding an entry to the FAQ yourself. Done, to the best of my knowledge... > > Also, does anybody know whether and how is the 4th parameter of > > (regexp) to be used? > > AFAIK, if the 4th parameter is true, then the regexp is treated as

[Chicken-users] how to load define-record and define-macro ?

2007-12-13 Thread Rick Taube
how do i get define-macro and define-record available at runtime so i can load some interpreted code that uses them? im in an app that launches chicken, ie im not using csi... ive tried evalling the following exprs but none of them works and the docs for define-macro and define-record dont

Re: [Chicken-users] how to load define-record and define-macro ?

2007-12-13 Thread Rick Taube
thank you that seems to have worked! Add this to your application: (declare (run-time-macros)) (include "chicken-more-macros") Cheers, -alex ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/ch

Re: [Chicken-users] Re: UTF-8 support

2007-12-13 Thread Zbigniew
Example: #;38> (define str (string-append "abc" (string #\u3bb) "def")) #;39> str "abcλdef" #;40> (string-split-fields (regexp "." #f #f #t) str) ("a" "b" "c" "λ" "d" "e" "f") #;41> (string-split-fields (regexp "." #f #f #f) str) ("a" "b" "c" "\316" "\273" "d" "e" "f") On Dec 13, 2007 8:32 AM, To

Re: [Chicken-users] UTF-8 support

2007-12-13 Thread John Cowan
Tobia Conforto scripsit: > As far as I could grasp they modify the behaviour of scheme primitives, > string functions and other eggs (such as regex), so that they operate on > UTF-8 strings internally and are fully Unicode-aware. This is by no means true. If you load the utf8 egg into the interp

[Chicken-users] repository-path problem

2007-12-13 Thread Jean-Philippe Theberge
Hi, Because it is an app in development and the library I use may be modified, I use an alternate path (set with repository-path) where I copy over the libraries. This work fine on my machine. but when I move the app on the server (both computers are debian/amd64) I got this error in my err

Re: [Chicken-users] define-foreign-enum with a typedef

2007-12-13 Thread Hans Bulfone
hi, On Wed, Dec 12, 2007 at 11:48:48PM -0700, Shawn Rutledge wrote: > > > (define-foreign-enum (dbus:bus (enum "DBusBusType")) > > > (dbus:session-bus DBUS_BUS_SESSION) > > > (dbus:system-bus DBUS_BUS_SYSTEM) > > > (dbus:starter-bus DBUS_BUS_STARTER) ) > > > > i've been using >

Re: [Chicken-users] how to load define-record and define-macro ?

2007-12-13 Thread felix winkelmann
On Dec 13, 2007 4:54 PM, Rick Taube <[EMAIL PROTECTED]> wrote: > > (require-extension chicken-more-macros) Try (eval '(require-extension chicken-more-macros)) cheers, felix ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.

Re: [Chicken-users] repository-path problem

2007-12-13 Thread felix winkelmann
On Dec 13, 2007 7:47 PM, Jean-Philippe Theberge <[EMAIL PROTECTED]> wrote: > Hi, > > Because it is an app in development and the library I use may be > modified, I use an alternate path (set with repository-path) where I > copy over the libraries. > > This work fine on my machine. but when I move t

Re: [Chicken-users] define-foreign-enum with a typedef

2007-12-13 Thread felix winkelmann
On Dec 13, 2007 8:36 AM, Shawn Rutledge <[EMAIL PROTECTED]> wrote: > On Dec 13, 2007 12:34 AM, felix winkelmann <[EMAIL PROTECTED]> wrote: > > "define-foreign-enum" expands into "define-foreign-variable", which > > are not exported, they can be considered something similar to syntax. > > OK. What'

Re: [Chicken-users] Re: UTF-8 support

2007-12-13 Thread Alex Shinn
On Dec 13, 2007 11:32 PM, Tobia Conforto <[EMAIL PROTECTED]> wrote: > > Can you (or anybody else) give an example of different behaviour with > the option turned on and off? I did a couple of tests and can't see any > difference, but I admit I have yet to look at the source code. The only two dif

[Chicken-users] Re: chicken lottery!

2007-12-13 Thread Alex Shinn
On Dec 11, 2007 10:56 PM, Alex Shinn <[EMAIL PROTECTED]> wrote: > Ladies, gentlemen and other, we've reached 350 eggs, > which means some lucky contributor is going to be the > proud owner of their very own Chicken T-shirt! This > time we're inviting you all to witness the choosing live. ... and

Re: [Chicken-users] define-foreign-enum with a typedef

2007-12-13 Thread Shawn Rutledge
On Dec 13, 2007 2:03 PM, Hans Bulfone <[EMAIL PROTECTED]> wrote: > afaik the dbus:bus foreign-type is only available in the same compilation > unit as the define-foreign-enum, so you need to have the foreign-lambdas > that use dbus:bus in the same file (but you can use the foreign functions > from

Re: [Chicken-users] define-foreign-enum with a typedef

2007-12-13 Thread Zbigniew
Well, there is the define-enum macro in miscmacros. It does use define-constant, but could be tweaked. On Dec 13, 2007 4:59 PM, felix winkelmann <[EMAIL PROTECTED]> wrote: > Yet another option is to use easyffi, which uses "define-constant" > internally and > which has an "export_constants" decl

Re: [Chicken-users] define-foreign-enum with a typedef

2007-12-13 Thread Shawn Rutledge
On Dec 13, 2007 3:59 PM, felix winkelmann <[EMAIL PROTECTED]> wrote: > Yet another option is to use easyffi, which uses "define-constant" > internally and > which has an "export_constants" declaration. Do you think I should write the dbus egg with easyffi? ___

Re: [Chicken-users] define-foreign-enum with a typedef

2007-12-13 Thread Shawn Rutledge
On Dec 13, 2007 6:35 PM, Zbigniew <[EMAIL PROTECTED]> wrote: > Well, there is the define-enum macro in miscmacros. It does use > define-constant, but could be tweaked. Then you're counting on the Scheme enum definition to be manually kept in sync with the C one, aren't you? Sure I can just write

Re: [Chicken-users] define-foreign-enum with a typedef

2007-12-13 Thread Shawn Rutledge
On Dec 13, 2007 6:28 PM, Shawn Rutledge <[EMAIL PROTECTED]> wrote: > On Dec 13, 2007 3:59 PM, felix winkelmann <[EMAIL PROTECTED]> wrote: > > Yet another option is to use easyffi, which uses "define-constant" > > internally and > > which has an "export_constants" declaration. > > Do you think I sho