Re: [Chicken-users] Use of Windows posix unit & process-execute/process-spawn

2007-05-08 Thread felix winkelmann

On 5/9/07, Kon Lovett <[EMAIL PROTECTED]> wrote:

Hi Folks,

Has anyone used the process-execute and/or process-spawn procs in the
Windows posix unit? My reading of the code leads me to believe they
do not function per the documentation. (And testing confirms this.)

The process-execute proc uses a DSSSL style argument list but the
body seems to assume a std Scheme style optional argument(s) (.i.e as
if (foo a b . rest)).

The process-spawn proc uses std Scheme style optional argument(s) but
the body assumes only a single optional argument (an args list) is
passed, and not the immediate list of args as the documentation
specifies.

I am especially interested in the spawn call because I am going to
modify it to follow the optional args & env list per the process-
execute signature. If the documented behavior is what is desired
please let me know.



You are right, both where incorrect. I'll push a fix for posixwin.scm in
a few moments.


cheers,
felix


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


Re: [Chicken-users] Ann: url egg 3.0

2007-05-08 Thread Kon Lovett


On May 8, 2007, at 7:25 PM, John Cowan wrote:


Kon Lovett scripsit:


I just felt a little uncomfortable having /usr/local/bin/testbase-
driver.


Why?


It's excessively generic, like calling the Chicken interpreter
"interpreter" or "scheme" or something.


Oh it is not. It is at least as specific as "libtool" or "update-egg".

It was named "chicken-testbase-driver" but I thought that  
unwarranted. Since this seems to be an issue I will choose something  
not "excessively generic".




--
You're a brave man! Go and break through theJohn Cowan
lines, and remember while you're out there  [EMAIL PROTECTED]
risking life and limb through shot and shell,   http:// 
ccil.org/~cowan

we'll be in here thinking what a sucker you are!
--Rufus T. Firefly





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


Re: [Chicken-users] Re: eval and local variables

2007-05-08 Thread John Cowan
Chicken Monk scripsit:

> The way I see it (and which is most likely incorrect :-): regular code 
> has access to variables in the current and enclosing scopes, so the 
> functionality is already there... 

Yes and no.  In particular, in compiled code the compiler can notice
exactly which procedures have access to which variables, and only
pass the variables that are actually needed, either as additional
arguments or as a data structure or (in other Schemes) in registers.
If eval were allowed to access locally bound variables, such optimizations
would be impossible.

-- 
No,  John.  I want formats that are actually   John Cowan
useful, rather than over-featured megaliths that   http://www.ccil.org/~cowan
address all questions by piling on ridiculous  [EMAIL PROTECTED]
internal links in forms which are hideously
over-complex. --Simon St. Laurent on xml-dev


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


Re: [Chicken-users] Ann: url egg 3.0

2007-05-08 Thread John Cowan
Kon Lovett scripsit:

> >I just felt a little uncomfortable having /usr/local/bin/testbase- 
> >driver.
> 
> Why?

It's excessively generic, like calling the Chicken interpreter
"interpreter" or "scheme" or something.

-- 
You're a brave man! Go and break through theJohn Cowan
lines, and remember while you're out there  [EMAIL PROTECTED]
risking life and limb through shot and shell,   http://ccil.org/~cowan
we'll be in here thinking what a sucker you are!
--Rufus T. Firefly


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


Re: [Chicken-users] Ann: url egg 3.0

2007-05-08 Thread Kon Lovett


On May 8, 2007, at 6:23 PM, Daishi Kato wrote:


On 5/9/07, Kon Lovett <[EMAIL PROTECTED]> wrote:




It depends on how testbase is the standard in Chicken, doesn't it? I'm
not sure about it, though.


We have 4 testing eggs (5 including the obsolete test-infrastructure)  
plus a number of roll your own. No standards - yet.


I just felt a little uncomfortable having /usr/local/bin/testbase- 
driver.


Why?



Just discard this issue if I'm the only guy who cares about it.


So far the only one.



Best,
Daishi


Best Wishes,
Kon




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


Re: [Chicken-users] Ann: url egg 3.0

2007-05-08 Thread Daishi Kato

On 5/9/07, Kon Lovett <[EMAIL PROTECTED]> wrote:


On May 8, 2007, at 1:16 AM, Daishi Kato wrote:

>> 

>> You need to get the testbase-driver egg, which will pull in testbase-
>> results & testbase.
>
> Oh, I only setup'd the testbase egg.
>
> Could the name of the executable be something like "chicken-
> testbase-driver"?

Are you asking for a name change? "chicken-testbase" is a bit
presumptuous. :-)


It depends on how testbase is the standard in Chicken, doesn't it? I'm
not sure about it, though.
I just felt a little uncomfortable having /usr/local/bin/testbase-driver.

Just discard this issue if I'm the only guy who cares about it.

Best,
Daishi


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


[Chicken-users] Use of Windows posix unit & process-execute/process-spawn

2007-05-08 Thread Kon Lovett

Hi Folks,

Has anyone used the process-execute and/or process-spawn procs in the  
Windows posix unit? My reading of the code leads me to believe they  
do not function per the documentation. (And testing confirms this.)


The process-execute proc uses a DSSSL style argument list but the  
body seems to assume a std Scheme style optional argument(s) (.i.e as  
if (foo a b . rest)).


The process-spawn proc uses std Scheme style optional argument(s) but  
the body assumes only a single optional argument (an args list) is  
passed, and not the immediate list of args as the documentation  
specifies.


I am especially interested in the spawn call because I am going to  
modify it to follow the optional args & env list per the process- 
execute signature. If the documented behavior is what is desired  
please let me know.


Best Wishes,
Kon




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


Re: [Chicken-users] Re: eval and local variables

2007-05-08 Thread Graham Fawcett

On 5/8/07, Graham Fawcett <[EMAIL PROTECTED]> wrote:

On 5/8/07, Graham Fawcett <[EMAIL PROTECTED]> wrote:
> Here's a cheap-and-dirty way to do it; it's not perfect (especially
> because there's some redundant typing involved) but you can have it
> today:
>
> (define-macro (eval-with-locals locals expr)
>   `((eval '(lambda ,locals ,(eval expr))) ,@locals))


Try this instead:

(define-macro (eval-with-locals locals expr)
 `((eval (list 'lambda ',locals ,expr)) ,@locals))

Example:

(define z 1000)
(let ((x 10)
 (y 100)
 (expr '(+ x y z)))
 (eval-with-locals (x y) expr))
==> 1110

Graham


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


Chicken performance (was Re: [Chicken-users] Re: Set! question - long example)

2007-05-08 Thread Kon Lovett


On May 8, 2007, at 5:34 AM, felix winkelmann wrote:


On 5/8/07, William Ramsay <[EMAIL PROTECTED]> wrote:


PS.   How does adding a SRFI to your code affect performance?



You mean, as in "(require-extension srfi-1)"? It's compiled code as
well, so it should be acceptable. If you need maximum performance,
it may be worthwhile to include the source in your program and declare
them hidden, to allow more inlining and constant folding, but only
do that if you are really desperate.


Compiling unsafe also helps. I tend to do the following:

- For private but shared procedures the file is compiled unsafe (-O3)  
& inlined, with very unlikely global variable names.


- For public procedures with arguments that are explicitly checked I  
add (no-procedure-checks) & (no-bound-checks) declarations to the  
file, often with inlining.


- Otherwise the (no-procedure-checks-for-usual-bindings) declaration  
at a minimum.


Note that all of the above is conditional during development.

Also checkout the 'crunch' egg for a statically typed Scheme subset.

Best Wishes,
Kon




cheers,
felix


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


Best Wishes,
Kon




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


Re: [Chicken-users] Ann: url egg 3.0

2007-05-08 Thread Kon Lovett


On May 8, 2007, at 1:16 AM, Daishi Kato wrote:






You need to get the testbase-driver egg, which will pull in testbase-
results & testbase.


Oh, I only setup'd the testbase egg.

Could the name of the executable be something like "chicken- 
testbase-driver"?


Are you asking for a name change? "chicken-testbase" is a bit  
presumptuous. :-)


Best Wishes,
Kon




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


Re: [Chicken-users] Re: eval and local variables

2007-05-08 Thread Graham Fawcett

On 5/8/07, Graham Fawcett <[EMAIL PROTECTED]> wrote:

Here's a cheap-and-dirty way to do it; it's not perfect (especially
because there's some redundant typing involved) but you can have it
today:

(define-macro (eval-with-locals locals expr)
  `((eval '(lambda ,locals ,(eval expr))) ,@locals))


Except that this fails:

(let ((x 10)
 (y 100)
 (expr '(+ x y z)))
 (eval-with-locals (x y) expr))
==> Error: during expansion of (eval-with-locals ...) - unbound variable: expr

...and this is what you really want to work. Sorry, don't have time to
fix it right now. :-(

G


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


Re: [Chicken-users] Re: eval and local variables

2007-05-08 Thread Graham Fawcett

On 5/8/07, Chicken Monk <[EMAIL PROTECTED]> wrote:

You'll have to pardon my ignorance... I am used to Python, where "eval"
and "exec" have access to all the variables that regular code has, even
in nested scopes.  So I was wondering if something similar could be done
in Scheme.


Here's a cheap-and-dirty way to do it; it's not perfect (especially
because there's some redundant typing involved) but you can have it
today:

(define-macro (eval-with-locals locals expr)
 `((eval '(lambda ,locals ,(eval expr))) ,@locals))

As an example:

(define z 1000)
(let ((x 10)
 (y 100))
 (eval-with-locals (x y) '(+ x y z)))
==> 1110

This uses (eval) to create an anonymous function that takes our
"locals" list as arguments. Then we call the anonymous function with
the actual values of the specified local values.

Actually, the redundancy of typing (x y) isn't a bad thing; there's no
guesswork involved, and no chance that you're accidentally binding to,
e.g., some global value of x.

Cheers,
Graham


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


[Chicken-users] Re: eval and local variables

2007-05-08 Thread Chicken Monk

felix winkelmann wrote:


2. Is it possible to get the "local environment" (which should have
access to b and c)?  Is there even such a thing, or am I seeing this
completely wrong?


This is not possible in general, unless you really want to peek
into the internal representation of a closure.


Thank you for your reply, Felix.

You'll have to pardon my ignorance... I am used to Python, where "eval" 
and "exec" have access to all the variables that regular code has, even 
in nested scopes.  So I was wondering if something similar could be done 
in Scheme.


The way I see it (and which is most likely incorrect :-): regular code 
has access to variables in the current and enclosing scopes, so the 
functionality is already there... so maybe it would be possible to have 
a function (local-environment) that returns an environment containing 
the local variables?  Of course it would need a parent environment, 
which I don't think environments.egg supports.


I will probably need to take a look at the Chicken source code to see 
how it's *really* implemented. :)


Oh, which leads me to another question: I am currently using Chicken 
2.6.  Judging from the change log, a lot has been changed/added since 
then.  Is the development version stable enough to use for everyday 
coding, or should I stick with the "official" 2.6 for a while?


Thanks,

--
Chicken Monk
"God loves ya. And she loves me too."



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


[Chicken-users] z3:encode-buffer hanging

2007-05-08 Thread Mario Domenech Goulart
Hi folks,

Maybe I'm misunderstanding the proper usage of z3:encode-buffer, but
it seems to hang when I use certain strings as argument.

Here are some examples:

(use z3 (srfi 1))

;(z3:encode-buffer "")   ; hangs
;(z3:encode-buffer "0")  ; hangs
;(z3:encode-buffer "00") ; hangs
;(z3:encode-buffer "000"); hangs
;(z3:encode-buffer "")   ; ok
;(z3:encode-buffer "0")  ; ok
;(z3:encode-buffer "00") ; ok

;(z3:encode-buffer "abcdef"); hangs
;(z3:encode-buffer "abcdefab")  ; hangs
;(z3:encode-buffer "abcdefabc") ; ok

(define (data n)
  (apply conc (iota n)))

;(z3:encode-buffer (data 10))  ; hangs
;(z3:encode-buffer (data 15))  ; hangs
;(z3:encode-buffer (data 20))  ; ok
;(z3:encode-buffer (data 50))  ; ok

PS: "hangs" means the code seems to be in an endless loop.  Looks like
z is never NULL in encode_all (z3.scm) for the problem-strings.

>From encode_all (z3.scm): 

  do {
z = z3d_encode(z, str + start, len, &taken, ptr, destlen, &given);
start += taken;
destlen -= given;
ptr += given;
len -= taken;
  } while(z != NULL);

Any hint?

Best wishes,
Mario


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


Re: [Chicken-users] Re: Set! question - long example

2007-05-08 Thread John Cowan
Graham Fawcett scripsit:

> Hm. If I don't start proof-reading my posts, Google is going to
> associate me with "hard-core chicken performance"; and I'm not sure
> that's a good thing...

It's interesting what a diversity of topics you get when you actually
google for those words (no quotation marks):  motorcycles, skateboards,
PC hardware, nutrition, radio antennas, American Idol, Star Wars, and
punk rock -- and that's just the first Google page.

-- 
John Cowan  [EMAIL PROTECTED]   ccil.org/~cowan
Dievas dave dantis; Dievas duos duonos  --Lithuanian proverb
Deus dedit dentes; deus dabit panem --Latin version thereof
Deity donated dentition;
  deity'll donate doughnuts --English version by Muke Tever
God gave gums; God'll give granary  --Version by Mat McVeagh


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


[Chicken-users] Re: Set! question - long example

2007-05-08 Thread Graham Fawcett

On 5/8/07, Graham Fawcett <[EMAIL PROTECTED]> wrote:

...seems like a pretty *hard-core* introduction to me.
Unless you're doing *hard-core* numerical stuff, I doubt Chicken's

performance will ever disappoint you.

Hm. If I don't start proof-reading my posts, Google is going to
associate me with "hard-core chicken performance"; and I'm not sure
that's a good thing...

G


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


[Chicken-users] Re: Set! question - long example

2007-05-08 Thread Graham Fawcett

On 5/8/07, William Ramsay <[EMAIL PROTECTED]> wrote:

Thanks for the help. I now fully understand what was going on.


Great!


Most people wouldn't learn am new language with a problem quite as
difficult as what I'm taking on, but I have found from experience
that that's the BEST way to learn a language.  It makes no sense to
put a lot of time into learning a language only to find way down the
road that it doesn't meet your needs.


Whatever's right for you. Writing a GTK text-editor seems like a
pretty hard-core introduction to me. ;-)


(One problem is that you discover cadr after writing (car (cdr x))
all over the place!!!)  So far Chicken is doing everything I've ever
done in Ruby and doing it four times faster.


Unless you're doing hard-core numerical stuff, I doubt Chicken's
performance will ever disappoint you.

Best of luck, and keep the questions coming.

Graham


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


[Chicken-users] Re: (address->pointer)

2007-05-08 Thread felix winkelmann

On 5/8/07, William Ramsay <[EMAIL PROTECTED]> wrote:

Hi Felix,

Using (address->pointer number) does indeed do what I want.It allows
me to
pick up a user supplied integer in my  "define-external" code.
However, it has
a rather bad side-effect.The code is handled in a dialog box.   Using

(g_signal_connect cbut "color-set" #$setColor (address->pointer 1))

will send a 1 to setColor, but it also wipes out my dialog pointer and
crashes the
system on Cancel or Save when I try to destroy it.

Using   (g_signal_connect cbut "color-set" #$setColor #f) works fine.
Adding
(address->pointer 1) is the only  difference.



Sorry, but what exactly is expected in the g_signal_connect call?
As I understand it, the last argument is an arbitrary pointer (userdata)
pass to the callback uninterpreted. If the callback (setColor) just
prints the number, shouldn't it work.

I apologize for being such a Gtk dolt, but I'm just guessing here.


cheers,
felix


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


Re: [Chicken-users] Re: Set! question - long example

2007-05-08 Thread felix winkelmann

On 5/8/07, William Ramsay <[EMAIL PROTECTED]> wrote:


PS.   How does adding a SRFI to your code affect performance?



You mean, as in "(require-extension srfi-1)"? It's compiled code as
well, so it should be acceptable. If you need maximum performance,
it may be worthwhile to include the source in your program and declare
them hidden, to allow more inlining and constant folding, but only
do that if you are really desperate.


cheers,
felix


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


[Chicken-users] (address->pointer)

2007-05-08 Thread William Ramsay

Hi Felix,

Using (address->pointer number) does indeed do what I want.It allows 
me to
pick up a user supplied integer in my  "define-external" code.   
However, it has

a rather bad side-effect.The code is handled in a dialog box.   Using

   (g_signal_connect cbut "color-set" #$setColor (address->pointer 1))

will send a 1 to setColor, but it also wipes out my dialog pointer and 
crashes the

system on Cancel or Save when I try to destroy it.

Using   (g_signal_connect cbut "color-set" #$setColor #f) works fine.
Adding

(address->pointer 1) is the only  difference.

Bill 



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


[Chicken-users] Re: Set! question - long example

2007-05-08 Thread William Ramsay



Graham Fawcett wrote:

On 5/6/07, William Ramsay <[EMAIL PROTECTED]> wrote:

Graham,

This is a long example, but it's my actual code that now does exactly
what I want.


Thanks for posting your code. (A Chicken-based text editor would be a
great tool!) Forgive the long response, but it's not clear to me where
I've confused you, so I'd like to cover the same ground a couple of
different ways.

I think that your example is consistent with what I was talking about
in my last message, though I'm not 100% certain. Your (set-color)
procedure has calls like this:

 (set-foreground (car (list-tail cb4 2)) hexcolor)
 (vector-set! backup C_KEY1 hexcolor)

The first line updates a gtk widget, the second updates your data
structure, "backup" (which is really your working-copy). Right?

Right

Since you're using vector-set! here, what's really getting changed is
the vector, "backup" --- you're swapping out some value in the vector
at some position, and replacing it with another. Running with the
building analogy, you're scratching a building off your list, and
pencilling in a new one; but you're not modifying any of the
buildings.

Similarly, given two copies of a vector, e.g.:

 (set! a (get-some-vector))
 (define b (make-vector (vector-length a)))
 (vector-copy! a b)

Calling (vector-set! a ...) will alter the membership of the "a"
vector, but will leave "b"unchanged. Does that make sense?

Yes
In your earlier message, you wrote:


The colors are kept in a vector.  What I tried was setting a
variable for each color by referencing it's match in the vector.
This failed because changing the variable changed the vector.


I know you didn't post that older code. But when you say "changing the
variable", were you talking about using "set!"? e.g.

 ;; initally set the variable
 (define v1 (vector-ref backup 0))
 ;; ...
 ;; later on, change the variable
 (set! v1 something-else)

In this case, the set! will not have changed the vector in any
way. You're just making v1 refer to something else. Agreed?

However, this code would alter the vector -- at least, it would alter
one of its members:

 (mutate-thing! v1)

...where (mutate-thing!) is some procedure that acts on the object,
v1, and changes it in some way. Since the object in question is both
the referent of the variable v1, and also a member of the backup
vector, the mutation would be observable from either place. In this
particular case, calling (mutate-thing! (vector-ref backup 0)) would
have done exactly the same thing. Does that make sense?
Yes

Please forgive my code it it seems bloated.   The first priority in
programming is always to get it to work first.


Agreed. I won't give a critique, since you didn't ask for one, but
here are a couple things you might not be aware of:


  (gtk_entry_get_text (car (cdr line2)))
  (gtk_entry_get_text (car (cdr line3)))
  (gtk_entry_get_text (car (cdr line4)))
  (gtk_entry_get_text (car (cdr line5)))


The expression (car (cdr something)) can also be spelled (cadr
something). Or, if you call (use srfi-1) to include the SRFI-1
list-manipulation procedures, you can spell it (second
something). Similarly:


(car (list-tail cb4 2))


is equivalent to (list-ref cb4 2), or (third cb4) if you use
SRFI-1. The SRFI-1 library defines list accessors from (first) through
(tenth), by the way. If you're not familiar with this SRFI,

  http://srfi.schemers.org/srfi-1/srfi-1.html

is worth a read.

Best,
Graham

Thanks for the help. I now fully understand what was going on.
Most people wouldn't
learn am new language with a problem quite as difficult as what I'm 
taking on, but I have
found from experience that that's the BEST way to learn a language.
It makes no sense
to put a lot of time into learning a language only to find way down the 
road that it doesn't
meet your needs. (One problem is that you discover cadr after 
writing (car (cdr x)) all
over the place!!!)   So far Chicken is doing everything I've ever done 
in Ruby and doing it

four times faster.

Bill

PS.   How does adding a SRFI to your code affect performance?


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


Re: [Chicken-users] easyffi missing foreign-parse

2007-05-08 Thread felix winkelmann

On 4/30/07, John Cowan <[EMAIL PROTECTED]> wrote:


--
We are lost, lost.  No name, no business, no Precious, nothing.  Only empty.
Only hungry: yes, we are hungry.  A few little fishes, nassty bony little
fishes, for a poor creature, and they say death.  So wise they are; so just,
so very just.  --Gollum[EMAIL PROTECTED]  http://ccil.org/~cowan


Oh boy, I feel like that sometimes...


cheers,
felix


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


Re: [Chicken-users] display function that shows sharing

2007-05-08 Thread felix winkelmann

On 4/27/07, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:

Hi all.

Does chicken have a function that shows sharing in s-exps?
SRFI-38 can do this:
> (use srfi-38)
> (define a '(1 2))
> (define b (list a a))
> (write-with-shared-structure b)
(#1=(1 2) #1#)

The problem with SRFI-38 is that I don't want too see sharing
between strings!
So, is there a parameter for SRFI-38?
Or is there a more adequate function in Chicken? (like display-circle
in bigloo)



I have added an optional argument ("ignore-strings:" or "#:ignore-strings")
to "write-with-shared-structure" (version 1.2).


cheers,
felix


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


Re: [Chicken-users] build irritations on windows xp

2007-05-08 Thread felix winkelmann

On 4/30/07, bryan rasmussen <[EMAIL PROTECTED]> wrote:

okay well, I started building with msys, had some problems with CMAKE
at first, when building got to the following part:

Linking C static library libchicken-boot.a
[ 62%] Built target libchicken-boot
Scanning dependencies of target libpcre-for-static
[ 66%] Building C object pcre/CMakeFiles/libpcre-for-static.dir/chartables.obj
[ 66%] Building C object pcre/CMakeFiles/libpcre-for-static.dir/pcre_compile.obj
c:/programminglanguages/scheme/chicken-2.6/pcre/pcre_compile.c: In
function `compile_branch':
c:/programminglanguages/scheme/chicken-2.6/pcre/pcre_compile.c:3263:
`MAX_DUPLENGTH' undeclared (first use in this function)
c:/programminglanguages/scheme/chicken-2.6/pcre/pcre_compile.c:3263:
(Each undeclared identifier is reported only once
c:/programminglanguages/scheme/chicken-2.6/pcre/pcre_compile.c:3263:
for each function it appears in.)
c:/programminglanguages/scheme/chicken-2.6/pcre/pcre_compile.c:3869:
`MAX_NAME_COUNT' undeclared (first use in this function)
c:/programminglanguages/scheme/chicken-2.6/pcre/pcre_compile.c:3877:
`MAX_NAME_SIZE' undeclared (first use in this function)
make[2]: *** [pcre/CMakeFiles/libpcre-for-static.dir/pcre_compile.obj] Error 1
make[1]: *** [pcre/CMakeFiles/libpcre-for-static.dir/all] Error 2
make: *** [all] Error 2



This is indeed rather strange: I can't find any occurrence of MAX_DUPLENGTH
or MAX_NAME_COUNT in the mentioned source file. Can you send me
your version of pcre_compile.c, please?


cheers,
felix


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


Re: [Chicken-users] (declare (block))

2007-05-08 Thread felix winkelmann

On 5/2/07, Shawn W. <[EMAIL PROTECTED]> wrote:


So what does block actually do?



"(declare (block))" is essentially like "static" in C: it means that
the toplevel variables of a compiled library unit are not accessible
(and thus can not be modified) from outside of the current compilation
unit. It also may give hints to the compiler that toplevel variables
have a fixed value and can be more easily inlined.


cheers,
felix


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


Re: [Chicken-users] Ann: url egg 3.0

2007-05-08 Thread Daishi Kato

On 5/8/07, Kon Lovett <[EMAIL PROTECTED]> wrote:


On May 7, 2007, at 10:05 PM, Daishi Kato wrote:

> Done moving code, except for:
> - docs are just gone (I'm not yet familiar with wiki doc)

Still there. I copied, edited & renamed.


Thanks.


> - test code would not run (couldn't find out how to make testbase
> work)

You need to get the testbase-driver egg, which will pull in testbase-
results & testbase.


Oh, I only setup'd the testbase egg.

Could the name of the executable be something like "chicken-testbase-driver"?


I put back the deprecated uri stuff & made global some procs needed
by url.

Thank you,
Kon


Also thank you,
Daishi


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


Re: [Chicken-users] Syntax Egg Question

2007-05-08 Thread felix winkelmann

On 4/29/07, Joshua Griffith <[EMAIL PROTECTED]> wrote:


I'm attempting to package one low-level macro as a syntax egg.  This macro
uses other helper functions and low-level macros to perform its task.  Is it
possible to hide these other macros and functions, so that only the main
macro is exposed to the top-level?



Any functions and macros that a macro definitiion expands into must be
externally visible, so I suggest prefixing these internal macros/functions
with something to distinguish them. An alternative is to use syntax-case
modules (but you said this is a low-level macro, so this probably doesn't
apply).

If the macro uses code directly (i.e. not in the expansion, but while computing
the expansion), you can also compile the support code into a shared library
and load it at expansion time (and thus for example having a macro in a source
file that uses support functions in a compiled .so of which the entry-points
must be visible, but which may use non-visible/hidden internal functions).

Now this latter paragraph has confused me probably just as much as you,
so I again recommend using a prefix...


cheers,
felix


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


Re: [Chicken-users] Passing parameters to C

2007-05-08 Thread felix winkelmann

On 5/2/07, William Ramsay <[EMAIL PROTECTED]> wrote:


Can anyone explain how I pass a pointer from Scheme into C. Oddly
enough #f is treated as a pointer, but nothing else seems to be.



#f is just a special case that allows or more convenient handling
of NULL pointers. As I wrote in a previous message, consider address->pointer
from the lolevel library unit.


cheers,
felix


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


Re: [Chicken-users] SVN Account for SO(3,1) Group Manipulation Egg?

2007-05-08 Thread felix winkelmann

On 5/3/07, Will M Farr <[EMAIL PROTECTED]> wrote:

John,

> I'm a little unhappy with the generic nature of the names "matrix"
> and "params", as one might be using some other matrix package at
> the same time.

That's originally why I put it into a syntax-case module---can't
people import that module with a prefix or something if they want?


I think this is only possible using some deep syntax-case hacks.
But the lexically scoped import form is usually enough for limiting
the amount of namespace pollution.


Do you think I should still put some prefix (SO31-... I imagine) on
the code, or is using syntax-case renaming good enough?


I think a syntax-case module is sufficient and keeps the names readable.
As I said, syntax-case allows for very flexible importing at the lexical
level, so I don't think this is an issue.

BTW, Thanks for your contributions!


cheers,
felix


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


Re: [Chicken-users] Problems with chicken-setup in MinGW

2007-05-08 Thread felix winkelmann

On 5/7/07, Alex Queiroz <[EMAIL PROTECTED]> wrote:

Hallo,

 I tried to install the crunch egg. It requires the format-modular
egg, which tries to install an object file (format-modular.o).
Chicken-setup, unfortunately, translates the file name to
format-modular.obj, which does not work with MinGW. So I guess this is
a bug. :-)



Please try to current darcs head - the mistranslation has been removed.


cheers,
felix


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