ldap-bind egg

2022-09-30 Thread Sven Hartrumpf
Hi all.

In a Scheme application, I have to authenticate users against an LDAP server
(the server is from Microsoft).

Is the ldap-bind egg ( https://wiki.call-cc.org/eggref/4/ldap-bind )
a good match for this task?

If so, is there a chance that it will be ported from Chicken-4 to Chicken-5?

Greetings
Sven



Re: [ANN] CHICKEN 5.3.0 release candidate available

2021-08-14 Thread Sven Hartrumpf
Hi.

The segmentation violation disappeared after cleaning my build script for 
chicken.
(It contained an old "-mpreferred-stack-boundary=4" in 
C_COMPILER_OPTIMIZATION_OPTIONS,
which I dropped now.)

So, the RC looks good to me.

Ciao
Sven



Re: [ANN] CHICKEN 5.3.0 release candidate available

2021-08-13 Thread Sven Hartrumpf
Hi.

gcc 10.3.0, amd64, Ubuntu 21.04

I am getting a new "Error: segmentation violation", when I add (time .)
around my main function mf call:
(time (mf (cons (car (argv)) (command-line-arguments
The error happens after this mf call is finished.
Worked for 5.2 (and earlier).

I hope someone has a minimal example, because mine is huge.
BTW: the chicken-compiled binary is some percent faster than the one generated 
by 5.2.

Ciao
Sven



New egg for C5: tokyocabinet

2020-03-10 Thread Sven Hartrumpf
Hello.

I published my first C5 egg: (a minimal set of) bindings to the tokyocabinet 
library.
Currenty, this covers only reading from tch files; I will extend the egg
when I need more functions.

I tested it with test-new-egg (very useful tool, Mario);
also many thanks to Felix, who helped me with technical details.
I will add documentation to the Chicken wiki later.

Gitlab page:
https://gitlab.com/svenha/tokyocabinet-tch

Release info:
https://gitlab.com/svenha/tokyocabinet-tch/-/raw/master/tokyocabinet.release-info

Ciao
Sven



srfi-19 for C5?

2020-01-15 Thread Sven Hartrumpf
Hi all.

I found http://wiki.call-cc.org/eggref/5/srfi-19
and assumed that SRFI-19 is supported by C5.
But chicken-install fails because a dependency leads to posix-utils
(and probably more eggs that are missing in C5).
Is this analysis correct or is my cache broken?

Ciao
Sven



Re: [ANN] CHICKEN 5.2.0 release candidate available

2020-01-14 Thread Sven Hartrumpf
Hi.

The RC1 generates uncompilable C code for my Scheme code.
This code worked for all previous Chicken versions (tested
today: 5.1.0).
If I use csc -O3 (-O2 is ok), I get 19 gcc errors, e.g.

nallch.c:1395027: error: void value not ignored as it ought to be
 av2[3]=C_rest_arg_out_of_bounds_error(C_fix(0),C_fix(0),C_fix(0));

If I increase the optimization level to csc -O5, the error changes
because this function call is inlined in the argument position of another
function call, e g.

'gcc-8' 'nallch.c' -o 'nallch.o' -c  -fno-strict-aliasing -fwrapv 
-DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES -O1 -march=nehalem 
-I/usr/local/chicken-5.2.0-64/include/chicken
nallch.c: In function f_574889
nallch.c:924744: error: invalid use of void expression
 
f_606388(t2,lf[908],C_rest_arg_out_of_bounds_error(C_fix(0),C_fix(0),C_fix(0)));}

As other C problems in past weeks, it is related to the
optimization of rest args. I like this optimization, but it seems to be more
and more tricky ...

Does anyone have a simple test case for such errors with rest args
when compiling with -O3 or higher?

Ciao
Sven



[Chicken-users] SRFI-38 notation

2019-07-04 Thread Sven Hartrumpf
Hi.

Are there any plans to support SRFI-38 (or similar functionality as provided
by R7RS) in Chicken 5 natively?
I use the reference implementation of SRFI-38, but reading of s-expressions 
with many
thousand sharings becomes a bottleneck, e.g. 3 hours instead of 1 second.
(The reason is the use of a list (instead of a vector) for storing pairs of
(label . datum).)

Ciao
Sven

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


Re: [Chicken-users] Segmentation violation with chicken 5.1.0

2019-06-23 Thread Sven Hartrumpf
Peter Bex wrote, 2019-06-23 14:51:
> On Sun, Jun 23, 2019 at 02:33:10PM +0200, Peter Bex wrote:
>> [panic] Low-level type assertion 
>> C_blockp((C_word)C_VAL1(C__PREV_TMPST.n1))=#t failed at chickenprob3.c:93488 
>> - execution terminated
>
> Here's a minimal reproducible testcase:
>
> (define (test-it)
>   (let loop ((done #f))
> (if done
> '()
> (cons  (or (read) 0.0) (loop #t)
>
> (print (test-it))
>
> This generates exactly the same construct:
> f0=C_flonum_magnitude((C_truep(t1)?t1:lf[1]));

Very good!

> If you type in a fixnum integer, this will break too.
>
> I've filed a bug to track this: https://bugs.call-cc.org/ticket/1624
>
>
> A quick workaround for your program might be to return the 0.0 from a
> foreign lambda, like so:
>
> (define return-zero
>   (foreign-lambda* float () "C_return(0.0);"))
>
> (define (test-it)
>   (let loop ((done #f))
> (if done
> '()
> (cons  (or (read) (return-zero)) (loop #t)
>
> (print (test-it))
>
> It's stupid, but it works.

Thanks for the suggestion. I will use another Scheme compiler
until this is fixed because there are more cases like this in
my (non-reduced) source, if I recall correctly :-)

Ciao
Sven

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


Re: [Chicken-users] Segmentation violation with chicken 5.1.0

2019-06-22 Thread Sven Hartrumpf
Felix wrote,  2019-06-22 20:42:
>> > Hello.
>> >
>> > I have a strange problem with legacy code that works in many
>> > other Schemes and Chicken 5 csi, but the binary compiled with Chicken 5 
>> > crashes.
>> > I have a reduced example: 
>> > http://sempria.de:9080/resources/chickenprob3.tar..bz2
>> > Just unpack and type make in the resulting directory.
>> > It shows "Error: segmentation violation" with gcc 8.3.0 and 9.1.0, 64 bit,
>> > Ubuntu 19.04.
>> > Interesting effect: the crash goes away if the input data structure is 
>> > reduced
>> > after reading by passing a CLI argument smaller than 228,
>> > see makefile target 'check'.
>> >
>> > Can anybody reproduce this segv?
>> >
>>
>> "chickenprob3 -:a99 228" gives "1.0" on OpenBSD 6.4 (gcc 4.2.1)
>>
>
> That (^^^) was CHICKEN 5.0.0, using a 5.1.0 with debug build gives me:
>
> chickenprob3 -:a99 228 # segv
> [panic] Low-level type assertion 
> C_blockp((C_word)C_VAL1(C__PREV_TMPST.n1))=#t failed at chickenprob3.c:94059 
> - execution terminated
>
> more...
> chickenprob3.scm:2273: pred
> chickenprob3.scm:11401: g9927
> chickenprob3.scm:11403: hash-sax-obj
> chickenprob3.scm:11460: hash-sax-list
> chickenprob3.scm:11401: g9927
> chickenprob3.scm:11403: hash-sax-obj
> chickenprob3.scm:11450: hash-sax
> chickenprob3.scm:11371: srfi-69#string-hash
> chickenprob3.scm:5810: every?
> chickenprob3.scm:2273: pred
> chickenprob3.scm:11401: g9927
> chickenprob3.scm:11403: hash-sax-obj
> chickenprob3.scm:11450: hash-sax
> chickenprob3.scm:11371: srfi-69#string-hash
> chickenprob3.scm:5810: every?
> chickenprob3.scm:2273: pred
> chickenprob3.scm:5810: every?
> chickenprob3.scm:2273: pred
> chickenprob3.scm:11401: g9927
> chickenprob3.scm:11403: hash-sax-obj
> chickenprob3.scm:11460: hash-sax-list
> chickenprob3.scm:11401: g9927
> chickenprob3.scm:11403: hash-sax-obj
> chickenprob3.scm:11450: hash-sax
> chickenprob3.scm:11371: srfi-69#string-hash
> chickenprob3.scm:5810: every?
> chickenprob3.scm:2273: pred
> chickenprob3.scm:11401: g9927
> chickenprob3.scm:11403: hash-sax-obj
> chickenprob3.scm:11450: hash-sax
> chickenprob3.scm:11371: srfi-69#string-hash
> chickenprob3.scm:5810: every?
> chickenprob3.scm:2273: pred
> chickenprob3.scm:5810: every?
> chickenprob3.scm:2273: pred
> chickenprob3.scm:5810: every?
> chickenprob3.scm:2273: pred
> chickenprob3.scm:11781: lookup_prob
> chickenprob3.scm:11586: loop
> chickenprob3.scm:11581: phashtable-get
> chickenprob3.scm:11196: phashtable-hash-val
> chickenprob3.scm:11226: g9805
> chickenprob3.scm:11460: hash-sax-list
> chickenprob3.scm:11401: g9927
> chickenprob3.scm:11403: hash-sax-obj
> chickenprob3.scm:11460: hash-sax-list
> chickenprob3.scm:11401: g9927
> chickenprob3.scm:11403: hash-sax-obj
> chickenprob3.scm:11450: hash-sax
> chickenprob3.scm:11371: srfi-69#string-hash
> chickenprob3.scm:5810: every?
> chickenprob3.scm:2273: pred
> chickenprob3.scm:11401: g9927
> chickenprob3.scm:11403: hash-sax-obj
> chickenprob3.scm:11450: hash-sax
> chickenprob3.scm:11371: srfi-69#string-hash
> chickenprob3.scm:5810: every?
> chickenprob3.scm:2273: pred
> chickenprob3.scm:5810: every?
> chickenprob3.scm:2273: pred
> chickenprob3.scm:11583: loop
> chickenprob3.scm:11581: phashtable-get
> chickenprob3.scm:11196: phashtable-hash-val
> chickenprob3.scm:11226: g9805
> chickenprob3.scm:11460: hash-sax-list
> chickenprob3.scm:11401: g9927
> chickenprob3.scm:11403: hash-sax-obj
> chickenprob3.scm:11460: hash-sax-list
> chickenprob3.scm:11401: g9927
> chickenprob3.scm:11403: hash-sax-obj
> chickenprob3.scm:11450: hash-sax
> chickenprob3.scm:11371: srfi-69#string-hash
> chickenprob3.scm:5810: every?
> chickenprob3.scm:2273: pred
> chickenprob3.scm:11401: g9927
> chickenprob3.scm:11403: hash-sax-obj
> chickenprob3.scm:11450: hash-sax
> chickenprob3.scm:11371: srfi-69#string-hash
> chickenprob3.scm:5810: every?
> chickenprob3.scm:2273: pred
> chickenprob3.scm:5810: every?
> chickenprob3.scm:2273: pred
> chickenprob3.scm:11401: g9927
> chickenprob3.scm:11403: hash-sax-obj
> chickenprob3.scm:11460: hash-sax-list
> chickenprob3.scm:11401: g9927
> chickenprob3.scm:11403: hash-sax-obj
> chickenprob3.scm:11450: hash-sax
> chickenprob3.scm:11371: srfi-69#string-hash
> chickenprob3.scm:5810: every?
> chickenprob3.scm:2273: pred
> chickenprob3.scm:11401: g9927
> chickenprob3.scm:11403: hash-sax-obj
> chickenprob3.scm:11450: hash-sax
> chickenprob3.scm:11371: srfi-69#string-hash
> chickenprob3.scm:5810: every?
> chickenprob3.scm:2273: pred
> chickenprob3.scm:5810: every?
> chickenprob3.scm:2273: pred   <--
> gmake: *** [makefile:36: check] Error 1
>
> (again OpenBSD 6.4)
>
> Perhaps interactions with the redefined `symbol->string` wrt keywords?

Hi Felix.

Good guess, but I removed the 2 redefinitiona lines  of symbol->string (and 
symbol->string!) -
no change :-(

Sven

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


[Chicken-users] Segmentation violation with chicken 5.1.0

2019-06-22 Thread Sven Hartrumpf
Hello.

I have a strange problem with legacy code that works in many
other Schemes and Chicken 5 csi, but the binary compiled with Chicken 5 crashes.
I have a reduced example: http://sempria.de:9080/resources/chickenprob3.tar.bz2
Just unpack and type make in the resulting directory.
It shows "Error: segmentation violation" with gcc 8.3.0 and 9.1.0, 64 bit,
Ubuntu 19.04.
Interesting effect: the crash goes away if the input data structure is reduced
after reading by passing a CLI argument smaller than 228,
see makefile target 'check'.

Can anybody reproduce this segv?

Sven

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


Re: [Chicken-users] SRFIs in Chicken 5

2019-06-11 Thread Sven Hartrumpf
Hi Mario.

Mario wrote, 2019-06-10 20:04:

> On Mon, 10 Jun 2019 19:50:51 +0200 (CEST) Sven wrote:
>
>> Hi.
>>
>> Is there a Chicken 5 version of the following
>> document, which seems to belong to Chicken 4 (?):
>>
>> http://wiki.call-cc.org/SRFI-conformance
>
> /SRFI-conformance is probably outdated (maybe it should be removed).
>
> http://wiki.call-cc.org/supported-standards probably reflects better the
> current state of SRFI support in CHICKEN.

Thanks for the quick help.
I have added a note and a link at the top of the old Wiki page.

Ciao
Sven

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


[Chicken-users] SRFIs in Chicken 5

2019-06-10 Thread Sven Hartrumpf
Hi.

Is there a Chicken 5 version of the following
document, which seems to belong to Chicken 4 (?):

http://wiki.call-cc.org/SRFI-conformance

Ciao
Sven

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


Re: [Chicken-users] [ANN] CHICKEN 5.1.0 release candidate available

2019-06-09 Thread Sven Hartrumpf
Operating system: Ubuntu 19.04
Hardware platform: amd64
C Compiler: gcc 9.1.0 x32-ABI
Installation works?: yes
Tests work?: yes
Installation of eggs works?: yes

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


Re: [Chicken-users] bind egg: uint8_t

2019-01-16 Thread Sven Hartrumpf
Hi Evan.

Evan, 2019-01-16 08:54:
> Basic support for [u]int8_t has been added to bind 1.2.4. These map to
> the [unsigned-]byte FFI types. Note that this means they will not check
> for overflowing values but will be truncated instead, per the warning
> here: http://api.call-cc.org/5/doc/foreign/types#def:byte. You mentioned
> you aren't accessing those struct members so hopefully this won't be a
> problem for you.
> 
> If the new version doesn't work properly for you please hit the list
> again and I'll try to help. Otherwise, enjoy!

Thanks a lot!
This version works for my project.

Ciao
Sven

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


[Chicken-users] bind egg: uint8_t

2019-01-08 Thread Sven Hartrumpf
Hi.

The bind egg knows about uint32_t and uint64_t, but not uint8_t.
Can this be added in some way to allow parsing of struct definitions
that use many uint8_t?
(At the moment, I don't need to access such struct members.)

BTW:
"Version History" in http://wiki.call-cc.org/eggref/5/bind contains
"initial release for CHICKEN 4",
which should be "CHICKEN 5".

Ciao
Sven

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


Re: [Chicken-users] pp and write ignore keyword-style

2018-11-20 Thread Sven Hartrumpf
John Cowan wrote on 2018-11-20 16:56:
> IMO, `write` should not respect `keyword-style` but use the invariant
> syntax `#:foo` for keywords, as that always works, whereas `foo:`
> and `:foo` don't.  The whole point of `write` is that you can reread
> the output with `read` and get something that is the same (in the
> sense of `equal?`) to what was written, modulo unwritable objects.

I see.
But my argument is about interoperability between implementations, e.g.
reading with Scheme implementation A code written by Scheme implementation B.
Many Schemes only support SRFI-88 keywords (arg1: , #:suffix).

Is there any Chicken function that can write code in this way?
('display' won't help here because of strings etc.)
If not, I would suggest a new parameter pretty-print-keyword-style for
the module (chicken pretty-print).

Ciao
Sven

> On Tue, Nov 20, 2018 at 4:52 PM Sven Hartrumpf  wrote:
> 
>> Hi.
>>
>> pp and write (in chicken 5) do not respect the parameter (keyword-style);
>> Only display respects keyword-style.
>>
>> #;1> (import (chicken pretty-print))
>> ; loading /usr/local/chicken-5.0.0-x32/lib/chicken/9/
>> chicken.pretty-print.import.so ...
>> #;2> (keyword-style)
>> #:suffix
>> #;3> (write '(arg1: 1))
>> (#:arg1 1)#;4> (pp '(arg1: 1))
>> (#:arg1 1)
>> #;5> (display '(arg1: 1))
>> (arg1: 1)#;6>
>>
>> Ciao
>> Sven
>>
>> ___
>> 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] pp and write ignore keyword-style

2018-11-20 Thread Sven Hartrumpf
Hi.

pp and write (in chicken 5) do not respect the parameter (keyword-style);
Only display respects keyword-style.

#;1> (import (chicken pretty-print))
; loading 
/usr/local/chicken-5.0.0-x32/lib/chicken/9/chicken.pretty-print.import.so ...
#;2> (keyword-style)
#:suffix
#;3> (write '(arg1: 1))
(#:arg1 1)#;4> (pp '(arg1: 1))
(#:arg1 1)
#;5> (display '(arg1: 1))
(arg1: 1)#;6>

Ciao
Sven

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


Re: [Chicken-users] CHICKEN 5.0.0 release candidate 4 available

2018-10-29 Thread Sven Hartrumpf
Hi.

I am testing rc4 with the X32 ABI.

Is it ok that C_COMPILER_OPTIMIZATION_OPTIONS is not respected when
building chicken-do?
I am using this make variable to pass in an -I option that is
required by Ubuntu's gcc-8 in X32 mode.
(Sorry, I have no cleaner solution right now.)
This approach fails when building chicken-do; everything else looks fine.

Ciao
Sven

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


Re: [Chicken-users] string-ci<=? and string-ci>=?

2018-09-11 Thread Sven Hartrumpf
Hi Vasilij.

VS wrote, 2018-09-11 09:26:
>> > (string-ci<=? "test" "tes")
>> #t
>> > (string-ci>=? "test" "tes")
>> #f
> 
> This is odd. Here's some source code:
> 
>   (set! scheme#string-ci<=? (lambda (s1 s2)
>   (compare
>s1 s2 'string-ci<=?
>(lambda (len1 len2 cmp)
>  (if (eq? cmp 0)
>  (fx>= len1 len2)
>  (fx< cmp 0) ) ) ) ) )
>   (set! scheme#string-ci>=? (lambda (s1 s2)
>   (compare
>s1 s2 'string-ci>=?
>(lambda (len1 len2 cmp)
>  (if (eq? cmp 0)
>  (fx<= len1 len2)
>  (fx> cmp 0) ) ) ) ) ) 
> 
> From what I can tell, `cmp` ends up being zero if the `memcmp` called by
> `compare` returns zero for both strings, with the smaller length as last
> argument.  This happens when they share the same prefix, so in this case
> you'd run into that branch, then compare `len1` against `len2`.  As
> `len1` is larger, `string-ci<=?` returns #t.  The question is, what
> should the correct comparator be here?

The line
  (fx>= len1 len2)
should be moved down to scheme#string-ci>=?, and the line
  (fx<= len1 len2)
should be moved to to scheme#string-ci<=?
Am I missing something?

Ciao
Sven

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


[Chicken-users] string-ci<=? and string-ci>=?

2018-09-11 Thread Sven Hartrumpf
Hi.

The issue reported by Nils Holm
in http://groups.google.com/group/comp.lang.scheme/t/6b8be06b84b39a7
affects chicken 5, too:

> (string-ci<=? "test" "tes")
#t
> (string-ci>=? "test" "tes")
#f

Ciao
Sven

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


Re: [Chicken-users] Porting eggs to Chicken 5

2018-08-14 Thread Sven Hartrumpf
Hi Peter.

Peter Bex  schrieb am 2018-08-14 13:08:
> On Tue, Aug 14, 2018 at 12:56:04PM +0200, Sven Hartrumpf wrote:
>> Thanks. This helped a lot.
>> There are many C library bindings relying on easyffi.
>> Are there any plans to port the easyffi egg?
> 
> This is one of those eggs that should really be left in the dust as
> things are moved to the new CHICKEN.  Bind is the supported and
> maintained way of doing FFI in an easier way than the core.

Now I remember to have read this before, sorry.
 
> Also, if at all possible, I'd argue to use the core FFI, to reduce
> dependencies.
> 
> Can you give some examples of eggs that use easyffi where it's hard
> to convert them to bind or core FFI?

No, I was just lazy when porting an egg that relied on easyffi.
I will follow your advice now and report if I run into trouble.

Ciao
Sven

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


Re: [Chicken-users] Porting eggs to Chicken 5

2018-08-14 Thread Sven Hartrumpf
Hi Christian.

ckreen, 2018-08-14 08:18:
> * Sven Hartrumpf  [180814 07:56]:
>> Hi.
>> 
>> I am trying to port some of my code from Chicken 4 to 5.
>> Is there a small guide how to port an egg from 4 to 5?
>> Is there a wish list or popularity list for eggs
>> to be ported?
> 
> There is the wiki page at
> https://wiki.call-cc.org/porting-c4-to-c5

Thanks. This helped a lot.
There are many C library bindings relying on easyffi.
Are there any plans to port the easyffi egg?

Ciao
Sven

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


Re: [Chicken-users] reachable top-level functions and variables

2017-07-13 Thread Sven Hartrumpf
Hi Marc.

SH wrote, 2017-07-12:
>> I am looking for a compiler option that will produce output
>> that could give me a start for determining a list of reachable
>> top-level functions/variables. I have tried other compilers but they
>> tend to deliver too many false positives for complex programs.

MF wrote, 2017-07-13 04:20:
> Have you tried the declaration (optimize-dead-definitions) in Gambit?
> There’s also the -report compiler option.

Thanks for the suggestions.
I could not use Gambit for my sources because they need
cond-expand AND syntax-rules AND Gambit keywords.
The interesting Gambit feature made me write a little preprocessor that
expands (top-level) cond-expand's and define-syntax (via alexpander)
so that I might be able to port my sources to Gambit again :-)

BTW (documentation of -report):
gambit.pdf (Sec. 3.3) says: "defined, referenced, mutated and called"
while the compiler uses:D A R C
Should this be matched in reading order?

Ciao
Sven

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


Re: [Chicken-users] reachable top-level functions and variables

2017-07-13 Thread Sven Hartrumpf
Hi Peter.

Peter Bex <pe...@more-magic.net> schrieb am 2017-07-13 09:05:
> On Thu, Jul 13, 2017 at 08:52:31AM +0200, Sven Hartrumpf wrote:
>> Yes, functions that can never be called from the compiled program
>> are still there.
>> Will the profile output of the compiled program (-accumulate-profile)
>> be a reliable filter if I avoid inlining and make
>> sure that all possible input cases are seen by the program?
> 
> Are you looking for a coverage/dead code elimination tool?

Exactly.
I have some compile time numbers (from bigloo) where I was able to
reduce compile time from 20 minutes to 4 minutes
by using dead code elimination as a preprocessing step.
Unfortunately, the analysis became too inaccurate over time
(I assume because the complexity in the user program source increased).
So, I am looking for alternatives.

> Something like that's been on my mind a few times, as a thing
> that would be nice to have.

Ciao
Sven

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


Re: [Chicken-users] reachable top-level functions and variables

2017-07-13 Thread Sven Hartrumpf
Hi Evan.

Evan Hanson , 2017-07-13 11:28:
> Hi Sven,
> 
> Have you tried `csc  -analyze-only -debug d`?

No, the output could be a useful start.

> This will give you a full list of value definitions, including module
> prefixes for any identifiers bound within a module. This may not be
> precisely what you mean by "reachable", but it might be a start.

Yes, functions that can never be called from the compiled program
are still there.
Will the profile output of the compiled program (-accumulate-profile)
be a reliable filter if I avoid inlining and make
sure that all possible input cases are seen by the program?

Ciao
Sven

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


[Chicken-users] reachable top-level functions and variables

2017-07-12 Thread Sven Hartrumpf
Hi all.

I am looking for a compiler option that will produce output
that could give me a start for determining a list of reachable
top-level functions/variables. I have tried other compilers but they
tend to deliver too many false positives for complex programs.

Ciao
Sven

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


[Chicken-users] Heap shrinkage, -:hs

2017-03-22 Thread Sven Hartrumpf
Hi all.

I would like to experiment with heap shrinking (-:hs) for long
running, memory/GC intensive processes.

I checked runtime.c and I read the following shrink condition:

count < percentage(percentage(heap_size, C_heap_shrinkage), 
DEFAULT_HEAP_SHRINKAGE_USED)

This shrink condition means that the _new_ heap size is used for deciding
shrinkage and not the _current_ heap size.
This would imply that heap usage must be <= 12.5 % to lead to a heap shrink
because C_heap_shrinkage is 50% and DEFAULT_HEAP_SHRINKAGE_USED is 25 %.
This is very unlikely for most applications :-)
How about:

count < percentage(heap_size, DEFAULT_HEAP_SHRINKAGE_USED)  ?

Furthermore, I would like to request a runtime option (-:hu ?) to modify
DEFAULT_HEAP_SHRINKAGE_USED leading to a variable like C_heap_shrinkage_used.

Ciao
Sven

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


[Chicken-users] libotr bindings (Off-the-Record)

2016-04-21 Thread Sven Hartrumpf
Hi.

Does anybody know (partial) FFI bindings for libotr
(Off-the-Record Messaging, https://otr.cypherpunks.ca/ )?

(I know that there is a native Scheme implementation of OTR,
but it relies on R6RS features.)

Ciao
Sven

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


Re: [Chicken-users] [ANN] CHICKEN 4.11.0 release candidate 1 available

2016-04-06 Thread Sven Hartrumpf
> we are happy to announce the first release candidate of the upcoming

Good work!
Time to go forward . (5) :-)

Operating system: Ubuntu 16.04 (Beta)
Hardware platform: x86-64
C Compiler: GCC 5.3.1 AND clang 3.8
Installation works?: yes
Tests work?: yes
Installation of eggs works?: yes

Sven

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


Re: [Chicken-users] How to avoid predefined cond-expand features in csc?

2015-12-28 Thread Sven Hartrumpf
Hi Peter.

PB wrote on 2015-12-24 11:25:
> On Thu, Dec 24, 2015 at 11:10:40AM +0100, Sven Hartrumpf wrote:
>> Hi.
>> 
>> csc seems to predefine some cond-expand feature (srfi-1, srfi-13, srfi-14,
>> srfi-69, maybe more) for the program to be compiled. How to prevent this?
> 
> These features are a bit weird: when you require a core library, it will
> register a feature with the same name (I think that's to prevent it from
> being reloaded again).  I'm not sure if this is in general for units or
> only for core units, but I think the problem here is that the compiler
> loads all of them.  So you're really cond-expanding against what's
> been loaded by the compiler, which is of course undocumented and subject
> to change.

And hopefully is changed ... in chicken 5? :-)
 
>> Example:
>>  > echo "(cond-expand (srfi-1 (print "srfi-1")) (else))" > bugchicken2.scm
>>  > csi -e '(load "bugchicken2.scm")'
>>  >-> as expected
>>  > csc bugchicken2.scm && ./bugchicken2
>> srfi-1-> unexpected; csc should behave like csi.
> 
> If you don't mind doing this at runtime, that's a solution:
> 
> (when (feature? srfi-1:) (print "srfi-1"))

Thanks for the idea.
But I need cond-expand mainly to write programs that are portable
across different Scheme implementation. So I cannot replace the
most basic SRFI-0 by some implementation-specific variant.

Ciao
Sven

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


[Chicken-users] How to avoid predefined cond-expand features in csc?

2015-12-24 Thread Sven Hartrumpf
Hi.

csc seems to predefine some cond-expand feature (srfi-1, srfi-13, srfi-14,
srfi-69, maybe more) for the program to be compiled. How to prevent this?
(I fear that this has been asked before, but I could not find the answer.)

Example:
 > echo "(cond-expand (srfi-1 (print "srfi-1")) (else))" > bugchicken2.scm
 > csi -e '(load "bugchicken2.scm")'
 >-> as expected
 > csc bugchicken2.scm && ./bugchicken2
srfi-1-> unexpected; csc should behave like csi.

Ciao
Sven

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


[Chicken-users] unary 'when' and 'unless'

2015-11-06 Thread Sven Hartrumpf
Hi.

A hidden bug in my code was uncovered by loading it into another
Scheme (guile), which enforced the limitation of 'when' and 'unless'
(in R7RS) to at least one result part.
Chicken accepts 'when' and 'unless' with only one argument:

> csi
CHICKEN
(c) 2008-2015, The CHICKEN Team
(c) 2000-2007, Felix L. Winkelmann
Version 4.10.1 (rev 9b38189)
linux-unix-gnu-x86 [ manyargs dload ]
compiled 2015-11-02 on sem14 (Linux)

#;1> (when #t)
#;2> (unless #t)

I assume that the extended definition in Chicken is R7RS-compliant,
but a stricter mode (or a harsh warning) would be helpful.

Ciao
Sven

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


[Chicken-users] x32 ABI fits Chicken very well

2015-08-31 Thread Sven Hartrumpf
Hi all.

Now that the "apply-hack" files are gone, Chicken is even more portable.
I am happy to report that Chicken 4.10.1 builds perfectly for the x32 ABI
( https://en.wikipedia.org/wiki/X32_ABI ).

Why should you try x32 that most people ignore?
- For garbage-intense Scheme program, you will see speed-ups of 10 to 30 %
  compared to x86-64 because the GC has less work to do.
- You can expect speed-ups of 20 - 30 % compared to i386 because all
  registers are available (on a 64bit CPU) and the full CPU instruction
  set is usable by Chicken's C compiler.

Here is a typical benchmark result:
x32  real  938.71s user  937.20s syst 0.56s 99% rmemKB 1456720
i386 real 1181.82s user 1180.17s syst 0.69s 99% rmemKB 1455148
x86-64   real 1100.30s user 1098.50s syst 0.81s 99% rmemKB 2235900

How to build Chicken for x32?

Caveat: You need a computer that supports x32 (in gcc, binutils, libc)!

Most linux distributions do not support x32, but Ubuntu 15.04 (64bit) does
(what other distros?).
You only need to run:

> sudo apt-get install libc6-dev-x32 libc6-x32 libx32atomic1 libx32gcc1 
> libx32gcc-4.9-dev libx32ncurses5 libx32ncurses5-dev libx32readline6 
> libx32readline6-dev libx32stdc++-4.9-dev libx32stdc++6 libx32z1 libx32z1-dev

Write a small gccx32 script like:
#!
gcc -mx32 $*

> export CC=gccx32
> export ARCH=x86-64

Build Chicken 4.10.1 in the normal way.

Confirm that the resulting binaries have the correct ABI:
> file csi
csi: ELF 32-bit LSB executable, x86-64 ...
No, this is not a contradiction, it marks x32 binaries ...

Ciao
Sven

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


[Chicken-users] vim support for s-expression comments

2015-08-25 Thread Sven Hartrumpf
Hi all.

The page http://wiki.call-cc.org/vim
is very useful for vim users, but unfortunately the patch at the
beginning does not apply cleanly to current syntax/scheme.vim
Are any newer patches around?

Ciao
Sven

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


Re: [Chicken-users] curl egg

2015-08-03 Thread Sven Hartrumpf
Peter Bex pe...@more-magic.net schrieb am Mon, 3 Aug 2015 15:00:31 +0200:
 On Mon, Aug 03, 2015 at 02:46:53PM +0200, Sven Hartrumpf wrote:
 Peter Bex pe...@more-magic.net schrieb am Mon, 3 Aug 2015 10:15:57 +0200:
  Out of curiosity, is there something important missing in the http-client
  egg, or are you trying to port some CHICKEN 3 code that used the curl egg?
 
 The former.
 I cannot find a way in http-client to specify a file attachment for 
 sendgrid's API.
 curl uses this syntax:
 curl ... -F files\[attachment.pdf\]=@attachment.pdf;type=application/pdf
 
 (see 
 https://sendgrid.com/docs/API_Reference/Web_API/mail.html#-Send-a-test-specifying-the-file-content-type-by-appending-typemime-type-to-the-file-name
  )
 
 The last line (marked *** below) is my best try so far, but it does not work:
 
  (rest-action
https://api.sendgrid.com/api/mail.send.json;
'PUT
`(
  (api_user . ...)
  (api_key . ...)
  (to . ,to-address)
  (from . info@)
  (subject . ,subject)
  (,(if html? 'html 'text) . ,text)
  (,(string-symbol (string-append files[ 
 attachment ])) file: ,attachment filename: ,attachment headers: 
 ((content-type ,attachment-type))) ; ***
  ))
 
 Have you updated to the latest intarweb and http-client eggs?  I got a
 bugreport from Ryan Senior that precisely this part wasn't working; it
 raised an exception.  This bug has been fixed in version 0.8 of
 http-client.

My versions were too old.
Thanks for the hint, Peter,
and for the bug report, Ryan.

Ciao
Sven

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


[Chicken-users] curl egg

2015-08-03 Thread Sven Hartrumpf
Hi all.

Chicken 3 had a curl egg.
It is linked in the page http://wiki.call-cc.org/eggref/3/index
as http://wiki.call-cc.org/eggref/3/curl , but
the latter page is missing.
Where is this old egg?
Any ideas what must be done to port it to Chicken 4?

Ciao
Sven

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


Re: [Chicken-users] curl egg

2015-08-03 Thread Sven Hartrumpf
Peter Bex pe...@more-magic.net schrieb am Mon, 3 Aug 2015 10:15:57 +0200:
 On Mon, Aug 03, 2015 at 10:00:28AM +0200, Sven Hartrumpf wrote:
 Hi all.
 
 Chicken 3 had a curl egg.
 It is linked in the page http://wiki.call-cc.org/eggref/3/index
 as http://wiki.call-cc.org/eggref/3/curl , but
 the latter page is missing.
 
 Hello, Sven!
 
 It looks like the documentation was never ported to the wiki,
 for some unknown reason.  Luckily, the eggdoc version is still
 available here (and in the svn repo as well):
 http://code.call-cc.org/legacy-eggs/3/curl.html
 
 Where is this old egg?
 Any ideas what must be done to port it to Chicken 4?
 
 The egg is still available from the chicken-eggs subversion repository
 under release/3.  Porting it to CHICKEN 4 may be a little trickier,
 because apparently it uses TinyCLOS, so you'd have to rework it to use
 coops:
 http://bugs.call-cc.org/browser/project/release/3/curl/trunk/curl.scm

Thanks. I will check easier ways first ...

 Out of curiosity, is there something important missing in the http-client
 egg, or are you trying to port some CHICKEN 3 code that used the curl egg?

The former.
I cannot find a way in http-client to specify a file attachment for sendgrid's 
API.
curl uses this syntax:
curl ... -F files\[attachment.pdf\]=@attachment.pdf;type=application/pdf

(see 
https://sendgrid.com/docs/API_Reference/Web_API/mail.html#-Send-a-test-specifying-the-file-content-type-by-appending-typemime-type-to-the-file-name
 )

The last line (marked *** below) is my best try so far, but it does not work:

 (rest-action
   https://api.sendgrid.com/api/mail.send.json;
   'PUT
   `(
 (api_user . ...)
 (api_key . ...)
 (to . ,to-address)
 (from . info@)
 (subject . ,subject)
 (,(if html? 'html 'text) . ,text)
 (,(string-symbol (string-append files[ attachment 
])) file: ,attachment filename: ,attachment headers: ((content-type 
,attachment-type))) ; ***
 ))

(define (rest-action url method parameters)
  (vector-list (with-input-from-request
 (make-request method: method uri: (uri-reference url)) 
parameters json-read)))

My code is based on the sendgrid egg.

Ciao
Sven

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


Re: [Chicken-users] [Chicken-announce] CHICKEN 4.10.0 release candidate 4 available

2015-07-27 Thread Sven Hartrumpf
Hi Tim.

Tim wrote:
 many arguments supported.
 testing 'apply' with 0..2048 (maximum apply argument count)...
 If this segfaults on x86-64, try updating GCC (4.5 has a code-generation bug):
 invoking directly with 0..50...
 invoking directly with 1998..2048 (maximum interpreted direct argument 
 count)...
 testing 'apply' can detect calls of too many arguments...
 testing direct invocation can detect calls of too many arguments...
 /home/tim/chicken-test/chicken-4.10.0rc4/tests/../chicken 'apply-test.scm' 
 -output-file 'a.c' -types ../types.db -ignore-repository -verbose 
 -include-path /home/tim/chicken-test/chicken-4.10.0rc4/tests/..
 'gcc' 'a.c' -o 'a.o' -c  -fno-strict-aliasing -fwrapv -DHAVE_CHICKEN_CONFIG_H 
 -DC_ENABLE_PTABLES -Os -fomit-frame-pointer 
 -I/home/tim/chicken-test/chicken-4.10.0rc4/tests/.. 
 -I/home/tim/chicken-test//include/chicken
 
 The [panic] line (marked with  in front) might be a possible failed test? 
 Furthermore, as you can see, the system does progress a bit but hangs at the 
 last line. I have let it run for 2 hours, and it did not get past this GCC 
 compiling step. Either this Atom system is too weak to run these test in a 
 timely fashion, or something else is going wrong...

This is a known problem with newer GCC versions.
Your 2nd machine will need 4 hours or more :-(

Ciao
Sven

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


[Chicken-users] sendgrid egg: support for attribute files (attachments)?

2014-12-14 Thread Sven Hartrumpf
Hi all.

The egg sendgrid is very useful already.
Does anybody know how to use the API attribute files (= attachments)
with this egg?

Ciao
Sven

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


Re: [Chicken-users] How to avoid srfi-13 bindings when using the slime egg?

2014-10-24 Thread Sven Hartrumpf
Fri, 24 Oct 2014 09:03:53 +0200, ckeen wrote:
 * Sven Hartrumpf hartru...@gmx.net [141023 19:41]:
 If I install the slime egg and start chicken-slime from inside Emacs,
 the REPL has bindings for SRFI-13 names, e.g.
 
 ; SLIME 2014-10-10
 CSI (string-count abc #\a)
 1
 
 Can this be avoided (because this conflicts with
 definitions in other projects)?
 
 The swank egg has some design flaws. For example all eval calls
 happen in the same environment as the module which in turn needs
 srfi-13. I don't think this can be fixed easily. It can probably
 be mitigated by prefixing all imports in the slime module by some
 prefix so at least it won't confuse the user code that easily.
 
 But then which should be prefixed? Maybe for your use case you will
 get away with prefixing srfi-13.
 
 I can add that to the egg if it helps

That sounds like a good idea for the egg.
Thanks for your time and thoughts.

Ciao
Sven

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


[Chicken-users] How to avoid srfi-13 bindings when using the slime egg?

2014-10-23 Thread Sven Hartrumpf
Hi all.

If I install the slime egg and start chicken-slime from inside Emacs,
the REPL has bindings for SRFI-13 names, e.g.

; SLIME 2014-10-10
CSI (string-count abc #\a)
1

Can this be avoided (because this conflicts with
definitions in other projects)?

Ciao
Sven

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


Re: [Chicken-users] Reset counters when profiling Chicken programs

2014-08-30 Thread Sven Hartrumpf
Hi Peter.

Thanks for your answers!

Fri, 29 Aug 2014 09:13:45 +0200, Peter.Bex wrote:
 On Fri, Aug 29, 2014 at 09:03:52AM +0200, Sven Hartrumpf wrote:
 Is there a Chicken function to reset all counters (to 0) when
 a program is run in profile mode?
 Background: I need profiling results, but only after my program
 reached a specific point and until it terminates.
 
 Unfortunately, there's none that I know of.
 
 A nasty trick I sometimes use is to extract interesting parts
 from a procedure and put it into a differently-named one, so that
 it shows up separate from the rest of the procedures.  Depending
 on the exact layout of your program, you could try and do that,
 like so (or perhaps improved on with some macrology):
...
 This is extremely ugly, and if you're profiling a large program that
 won't really be possible.

Exactly.
There are 5000 functions in my little program - not an option here :-)

 Perhaps we can come up with an API for interfacing with the profiler,
 for (beyond) CHICKEN 5.

That would be great.
Another useful function would be to write current profile information
with a function like (profile-write file). In this way, one could
easily determine what happened between two given profile snapshots.

Ciao
Sven

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


[Chicken-users] Reset counters when profiling Chicken programs

2014-08-29 Thread Sven Hartrumpf
Hi all.

Is there a Chicken function to reset all counters (to 0) when
a program is run in profile mode?
Background: I need profiling results, but only after my program
reached a specific point and until it terminates.

Ciao
Sven

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


[Chicken-users] Scheme jobs

2014-05-16 Thread Sven Hartrumpf
Hi all.

I just came across a job platform dedicated to Scheme  friends.
If you want to combine happy programming and money :-),
have a look:

http://functionaljobs.com/

Yes, if you read this site carefully, you might complain
that I am a customer. Yes, I am ...
but any help in a world with too much ugly language
(put you favorite here) code might be welcome to some readers,
I hope.

Ciao
Sven

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


Re: [Chicken-users] Declare large expressions as read-only and not gc-able?

2014-01-06 Thread Sven Hartrumpf
Sun, 5 Jan 2014 15:25:38 -0600, zbigniewsz wrote:

 I'll bet if you define a 100MB literal, the resulting C file would be at 
 least a gigabyte and neither CHICKEN nor gcc would be able to handle it.  You 
 could try it and let us know.

You are right.
chicken (and others like bigloo) does not compile such a beast
and crashes with an error message.

 You could evict it theoretically, but for something that big, you may have to 
 create your own data structure in C and malloc it.

With object-evict, the program runs much slower without any progress,
so Felix' warning about object-evict seems to apply in my use case.

 I'm curious what this expression is for.

It's a letter tree for a fullform lexicon of a natural language
(more than 1 million entries).
Access times are short, hence I abstained from switching to a key-value
store on disk.
But the time wasted in GC makes me think - from time to time :-)

Ciao
Sven

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


[Chicken-users] Declare large expressions as read-only and not gc-able?

2014-01-05 Thread Sven Hartrumpf
Hi all.

Is there a recommended way to declare some large expressions ( 100 MB)
in a compiled program as read-only and more importantly
as not gc-able (the garbage collector should be saved from traversing
these large structures again and again)?
Should the constant value be compiled in or should it be read from a file?
Is define-constant the right way to go?
(How do other Scheme implementation handle such cases?)

Ciao
Sven

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


[Chicken-users] Is chicken supported on 32 bit Linux?

2013-05-29 Thread Sven Hartrumpf
Hi.

Tue, 28 May 2013 23:25:35 +0200, Peter.Bex wrote:
 For now I'd say this is a problem with your particular gcc version.
 If you or someone else can reproduce this and come up with a patch
 that would be great.

I know this problem for a year or so (gcc 4.7.N, gcc 4.8.N; C optimization -O2
or higher; 32bit build on 64bit Linux boxes).
I attach a simple patch to this mail (five tests must be made via 
number-string).
I feel better now because I can test with make check again :-)

Ciao
Sven
--- library-tests.scm.orig	2013-05-29 08:21:14.325698617 +0200
+++ library-tests.scm	2013-05-29 08:18:26.22130 +0200
@@ -210,16 +210,16 @@
 (assert (= (sin 42.0) (fpsin 42.0)))
 (assert (= (cos 42.0) (fpcos 42.0)))
 (assert (= (tan 42.0) (fptan 42.0)))
-(assert (= (asin 0.5) (fpasin 0.5)))
-(assert (= (acos 0.5) (fpacos 0.5)))
-(assert (= (atan 0.5) (fpatan 0.5)))
+(assert (string=? (number-string (asin 0.5)) (number-string (fpasin 0.5 ; this test (and four others in this block) need number-string for newer gcc versions (32bit on 64bit box) to succeed
+(assert (string=? (number-string (acos 0.5)) (number-string (fpacos 0.5
+(assert (string=? (number-string (atan 0.5)) (number-string (fpatan 0.5
 (assert (= (atan 42.0 1.2) (fpatan2 42.0 1.2)))
 (assert (= (atan 42.0 1) (fpatan2 42.0 1.0)))
 (assert (= (atan 42 1.0) (fpatan2 42.0 1.0)))
 (assert (= (exp 42.0) (fpexp 42.0)))
-(assert (= (log 42.0) (fplog 42.0)))
+(assert (string=? (number-string (log 42.0)) (number-string (fplog 42.0
 (assert (= (expt 42.0 3.5) (fpexpt 42.0 3.5)))
-(assert (= (sqrt 42.0) (fpsqrt 42.0)))
+(assert (string=? (number-string (sqrt 42.0)) (number-string (fpsqrt 42.0
 (assert (= 43.0 (fpround 42.5)))
 (assert (= -43.0 (fpround -42.5)))
 (assert (= 42.0 (fpround 42.2)))
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] [PATCH] Make library tests compare numbers within epsilon

2013-05-29 Thread Sven Hartrumpf
Hi Peter.

Wed, 29 May 2013 19:06:26 +0200, Peter.Bex wrote:
 This patch should fix it, but it does in a roundabout way: converting
 the number to a string causes it to lose precision because of the default
 value of (flonum-print-precision).  It's more explicit to check whether
 the two values lie within an epsilon of eachother, like the test egg does.

I hoped that there will be a better patch. Thanks, Peter.

 Could you try whether make check on a -O3-compiled CHICKEN succeeds
 with the attached patch?

It does!
(Also for -O2.)

Ciao
Sven

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


[Chicken-users] location of chicken.h

2011-09-30 Thread Sven Hartrumpf
Hi all.

Why does chicken-install silex wants to include chicken.h, although current
chicken versions install only chicken/chicken.h ?

 chicken-install silex  
retrieving ...
connecting to host chicken.kitten-technologies.co.uk, port 80 ...
...
installing silex: ...
changing current directory to /tmp/temp70ed/silex
  /usr/local/chicken-master-64/bin/csi -bnq -setup-mode -e (require-library 
setup-api) -e (import setup-api) -e (setup-error-handling) -e 
(extension-name-and-version '(\silex\ \\)) /tmp/temp70ed/silex/silex.setup
  /usr/local/chicken-master-64/bin/csc -feature compiling-extension -setup-mode 
   -s -O2 -d1 silex.scm -j silex
silex.c:11:21: fatal error: chicken.h: No such file or directory
compilation terminated.

Error: shell command terminated with non-zero exit status 256: gcc silex.c -o 
silex.o -c  -fno-strict-aliasing -fwrapv -DHAVE_CHICKEN_CONFIG_H -Os 
-ffast-math -fomit-frame-pointer -march=core2 -m64 -Wa,-64 -fPIC -DPIC 
-DC_SHARED -I/usr/local/chicken-master-64/include/

Error: shell command failed with nonzero exit status 256:

  /usr/local/chicken-master-64/bin/csc -feature compiling-extension -setup-mode 
   -s -O2 -d1 silex.scm -j silex


Error: shell command terminated with nonzero exit code
17920
/usr/local/chicken-master-64/bin/csi -bnq -setup-mode -e \(require-library 
set...

Greetings
Sven

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


[Chicken-users] severe bug in file-exists?

2011-09-28 Thread Sven Hartrumpf
Hi all.

I have just lost some files (fortunately, they can be restored somehow)
because file-exists? returned #f for large files ( 2 GB).

Version:
CHICKEN
(c)2008-2011 The Chicken Team
(c)2000-2007 Felix L. Winkelmann
Version 4.7.4 (rev b6eba65)
linux-unix-gnu-x86 [ manyargs dload ]
compiled 2011-09-23 on sem11 (Linux)

This is a 32bit build on a 64bit machine.
(Same for 4.7.0)

Ciao
Sven

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


Re: [Chicken-users] severe bug in file-exists?

2011-09-28 Thread Sven Hartrumpf
Hi Christian.

Wed, 28 Sep 2011 15:10:46 +0200, ckeen wrote:
 I have just lost some files

 I hope the data is not lost completely.

No, it can be recovered automatically :-)

 I have filed bug #706 in the tracker.
 https://bugs.call-cc.org/ticket/706

Thanks for filing the bug.

Looking at the report, I see that file-exists? returns
the file name if the file exists.
This violates R7RS and R6RS, does not it?

Sven

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


Re: [Chicken-users] severe bug in file-exists?

2011-09-28 Thread Sven Hartrumpf
Wed, 28 Sep 2011 15:40:57 +0200, ckeen wrote:

 As I see it, this procedure needs an overhaul anyway. If fstat fails
 it returns #f regardless the reason. On IRC we have been coming
 to the understanding that we should raise an I/O exception for all
 other cases (if the fstat fails for other reasons than the file not
 being there).
 
 What does R7RS specify there?

Nothing, just this:

(file-exists? filename)
Filename must be a string. The file-exists? procedure
returns #t if the named file exists at the time the procedure
is called, #f otherwise.

Sven

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


[Chicken-users] Recommended ways to keep 32bit and 64bit chickens

2011-07-24 Thread Sven Hartrumpf
Hi all.

How do chicken users keep their 32bit chicken and their 64bit chicken
on one computer with minimal version confusion?

Any recommendations welcome.

Sven

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


[Chicken-users] ANN: Parley v0.1 released: When read-line is n^[A^W^[B

2011-07-18 Thread Sven Hartrumpf
Hi Christian.

Sun, 17 Jul 2011 22:46:34 +0200, ckeen wrote:
 I have put up a small ratinonale about it here:
 http://pestilenz.org/~ckeen/blog/posts/parley.html

Nice clean blog!
What blog software do you use?
(I checked the HTML sources but I have no idea so far ...)

Ciao
Sven

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


[Chicken-users] profiler reports strange seconds values

2011-07-06 Thread Sven Hartrumpf
Hi all.

chicken-profile reports accumulated runtime in a column
labeled seconds.
Why do I see numbers like 716254787.383, when
the program ran only 200 times with average runtime of 5 seconds?
Are the numbers in microseconds?

I compiled my Scheme program as follows:
csc -d0 -O3 -unsafe -accumulate-profile -profile-name try1.profile ...

 csi
CHICKEN
Version 4.7.3 
linux-unix-gnu-x86-64 [ 64bit manyargs dload ]

Greetings
Sven

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


[Chicken-users] Daily development snapshots?

2011-06-25 Thread Sven Hartrumpf
Hi all.

Small irritation:

In http://code.call-cc.org/, one reads
We provide tarballs with nightly development snapshots of the source code.
The nightly does not fit here because this sentence links to development 
snapshots
like the one Felix just announced.

Ciao
Sven

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


[Chicken-users] Chicken segfault

2011-06-16 Thread Sven Hartrumpf
Hi all.

When stepping from optimization level 2 to 3, I get a segmentation fault.

level 3:
 chicken r-matcher-ch.scm -output-file r-matcher-ch.c -debug-level 1 
 -optimize-level 2
Warning: redefinition of standard binding: symbol-string
Segmentation fault
[ERROR: 139] 


level 2:
 chicken r-matcher-ch.scm -output-file r-matcher-ch.c -debug-level 1 
 -optimize-level 2
Warning: redefinition of standard binding: symbol-string

The resulting C file and the binary work perfectly.

 csi
CHICKEN
(c)2008-2011 The Chicken Team
(c)2000-2007 Felix L. Winkelmann
Version 4.7.0 
linux-unix-gnu-x86-64 [ 64bit manyargs dload ptables ]
compiled 2011-06-16 on dummy (Linux)

How should I investigate this problem?
Or is this a known problem?

Greetings
Sven

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


Re: [Chicken-users] Chicken segfault

2011-06-16 Thread Sven Hartrumpf
Hi all.

Thu, 16 Jun 2011 19:12:22 +0200, Peter.Bex wrote:

 How should I investigate this problem?
 
 Tried gdb?

Good idea. I rebuilt chicken with DEBUGBUILD=1
and ran gdb on chicken:

(gdb) run r-matcher-ch.scm -output-file r-matcher-ch.c -debug-level 1 
-optimize-level 3
Program received signal SIGSEGV, Segmentation fault.
0x2b1b6ab6 in C_i_list_tail (lst=6, i=5) at runtime.c:4837
4837  if(lst != C_SCHEME_END_OF_LIST  C_block_header(lst) != C_PAIR_TAG)
(gdb) bt
#0  0x2b1b6ab6 in C_i_list_tail (lst=6, i=5) at runtime.c:4837
#1  0x2adf8aa2 in f_6485 (c=4, t0=46912838379416, t1=140737488226416, 
t2=6, t3=5) at library.c:37514
#2  0x2b202c78 in l3 () from free/chicken-4.7.0-64/lib/libchicken.so.6
#3  0x2aaabf1dec68 in ?? ()
#4  0x2b1b9e77 in C_apply (c=4, closure=0, k=140737488226416, 
fn=46912838379416) at runtime.c:5834
#5  0x00580643 in f_12524 (c=2, t0=140737488281200, t1=140737488281008) 
at support.c:5168
#6  0x2b1b9f11 in C_do_apply (n=0, fn=140737488281200, 
k=140737488281008) at runtime.c:5895
#7  0x2b1f866c in C_call_with_values (c=4, closure=0, 
k=140737488335808, thunk=140737488281200, kont=140737488281248) at 
runtime.c:6055
#8  0x0058019c in f_12518 (c=2, t0=140737488336744, t1=140737488335808) 
at support.c:5121
#9  0x2b1b9f11 in C_do_apply (n=0, fn=140737488336744, 
k=140737488335808) at runtime.c:5895
#10 0x2b1f866c in C_call_with_values (c=4, closure=0, 
k=140737488337368, thunk=140737488336744, kont=140737488336048) at 
runtime.c:6055
#11 0x2adda05e in f_10297 (c=2, t0=140737488336320, t1=140737488336704) 
at library.c:31136
#12 0x2ad8e82d in f_18581 (c=2, t0=140737488336512, t1=140737488336320) 
at library.c:17005
#13 0x2add9e54 in f_10293 (c=5, t0=46912838386128, t1=140737488337368, 
t2=140737488336512, t3=140737488336744, t4=140737488336544) at library.c:31118
#14 0x2ad8e6af in f_18575 (c=4, t0=46912838405744, t1=140737488337368, 
t2=140737488336704, t3=140737488336744) at library.c:16979
#15 0x0058000e in f_12497 (c=3, t0=140737488337392, t1=140737488337368, 
t2=140737488336912) at support.c:5107
#16 0x2add98e1 in f_10330 (c=3, t0=140737488337200, t1=140737488337368, 
t2=140737488337008) at library.c:31063
#17 0x2b1f7ef1 in C_call_cc (c=3, closure=0, k=140737488337368, 
cont=140737488337200) at runtime.c:5935
#18 0x2add97b1 in f_10324 (c=3, t0=46912838365584, t1=140737488337368, 
t2=140737488337392) at library.c:31049
#19 0x0057fdd4 in f_12570 (c=2, t0=140737488338064, t1=140737488337760) 
at support.c:5092
#20 0x0057fba7 in f_12572 (t0=140737488338128, t1=140737488338064, 
t2=14) at support.c:5075
#21 0x0057f911 in f_12486 (c=2, t0=140737488338720, t1=140737488338368) 
at support.c:5027
#22 0x0057f628 in f_12607 (t0=140737488338776, t1=140737488338720, 
t2=14) at support.c:4999
#23 0x0057f389 in f_12465 (c=5, t0=46912838392984, t1=140737488341872, 
t2=46912838205344, t3=46912903161632, t4=140737488338992) at support.c:4949
#24 0x0050fae2 in f_3096 (c=2, t0=140737488341904, t1=22) at 
optimizer.c:11796
#25 0x005113a9 in f_2834 (c=3, t0=46912839464584, t1=140737488341904, 
t2=46912879352136) at optimizer.c:12123
#26 0x2af0e715 in f_5409 (t0=140737488339760, t1=140737488341904, 
t2=46912879352136, t3=14) at srfi-1.c:4027
#27 0x2af0e843 in f_5425 (c=2, t0=140737488339648, t1=22) at 
srfi-1.c:4046
#28 0x005113a9 in f_2834 (c=3, t0=46912839464584, t1=140737488339648, 
t2=46912903161904) at optimizer.c:12123
#29 0x2af0e7c1 in f_5409 (t0=140737488339760, t1=140737488341904, 
t2=46912903161904, t3=46912903163824) at srfi-1.c:4032
#30 0x2af0e65b in f_5321r (t0=46912838355152, t1=140737488341904, 
t2=46912839464584, t3=46912903161632, t4=14) at srfi-1.c:4014
#31 0x2af0e3cf in f_5321 (c=4, t0=46912838355152, t1=140737488341904, 
t2=46912839464584, t3=46912903161632) at srfi-1.c:3983
#32 0x0050f90f in f_3156 (c=2, t0=140737488341168, t1=22) at 
optimizer.c:11776
#33 0x2ad7515e in f_21565r (t0=46912838365448, t1=140737488341168, 
t2=46912838205344, t3=46912838231728, t4=14) at library.c:12207
#34 0x2ad75060 in f_21565 (c=4, t0=46912838365448, t1=140737488341168, 
t2=46912838205344, t3=46912838231728) at library.c:12192
#35 0x0057af79 in f_13091 (c=3, t0=46912838393000, t1=140737488341168, 
t2=46912838205344) at support.c:4129
#36 0x0050f860 in f_3150 (c=2, t0=140737488341992, t1=46912838207552) 
at optimizer.c:11761
#37 0x2ad7515e in f_21565r (t0=46912838365448, t1=140737488341992, 
t2=46912838205344, t3=46912838194368, t4=14) at library.c:12207
#38 0x2ad75060 in f_21565 (c=4, t0=46912838365448, t1=140737488341992, 
t2=46912838205344, t3=46912838194368) at library.c:12192
#39 0x0050f695 in f_3016 (c=2, t0=46912903162664, t1=140737488342368) 
at optimizer.c:11737
#40 

[Chicken-users] Setting options for make test

2011-02-15 Thread Sven Hartrumpf
Hi all.

I am building chicken
(Version 4.6.5, linux-unix-gnu-x86-64 [64bit manyargs dload], git)
with special settings of C_COMPILER and C_COMPILER_OPTIMIZATION_OPTIONS
when invoking make.
For the make targets default and install, this works perfectly,
but for the make target test these variables seem to be ignored.
Feature or bug?

Greetings
Sven

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


[Chicken-users] Setting options for make test

2011-02-15 Thread Sven Hartrumpf
Hi Felix.

Tue, 15 Feb 2011 12:32:45 +0100 (CET), felix wrote:

 I am building chicken
 (Version 4.6.5, linux-unix-gnu-x86-64 [64bit manyargs dload], git)
 with special settings of C_COMPILER and C_COMPILER_OPTIMIZATION_OPTIONS
 when invoking make.
 For the make targets default and install, this works perfectly,
 but for the make target test these variables seem to be ignored.
 
 You mean check, I think?

Yes.
I never remember which project uses check and which project uses test.
I got it wrong in my mail, but in my testing I got it right :-)

Ciao
Sven

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


Re: [Chicken-users] Setting options for make test

2011-02-15 Thread Sven Hartrumpf
Tue, 15 Feb 2011 14:32:02 +0100 (CET), felix wrote:
 These settings should go into chicken-config.h and thus be respected
 by csc. Do you override these variables in your invocation of
 make ... check?

Yes.
Regenerating chicken-config.h solved my problem.
Thanks, Felix.

Sven

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


Re: [Chicken-users] Tokyo Cabinet Error

2011-01-24 Thread Sven Hartrumpf
Hello Thomas.

Your example works for me in 2 setups:

chicken 4.6.3 + tokyocabinet-egg 2.01

chicken 4.6.4(experimental) + tokyocabinet-egg 2.2 (submitted to Alex)

Two hints:
1.
Try to open with this option: mmap-size: 0

2.
If the above does not help:
I assume that 4.6.0 might be broken or that your installation
of egg dependencies is broken.
What does (use tokyocabinet) report?
What does chicken-status output?
And finally:
tchmgr inform the-db

Greetings
Sven

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


Re: [Chicken-users] Problems Installing the lookup-table Egg

2011-01-02 Thread Sven Hartrumpf
Fri, 10 Dec 2010 09:36:24 -0800, klovett wrote:

 Sorry, I suspect this is caused by the use of backwards incompatible module 
 syntax on my part.
 Specifically the string as body feature for textual inclusion.
 
 I will fix this and release a new version.

Is the lookup-table egg supposed to be fixed noew?

I am asking because I see the following error (using the experimental chicken 
branch):

 chicken-install lookup-table  
   
 
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=lookup-tablemode=default ...
reading response ...
HTTP/1.1 200 OK
Date: Sun, 02 Jan 2011 16:35:50 GMT
Server: Apache
Connection: close
Transfer-Encoding: chunked
Content-Type: text/plain
reading chunks ...
reading files ...
  ./lookup-table.scm
  ./lookup-table-unsafe-synch.scm
  ./lookup-table-synch.scm
  ./lookup-table.meta
  ./lookup-table-body.scm
  ./lookup-table.setup
  ./chicken-primitive-object-inlines.scm
  ./lookup-table-unsafe.scm
 lookup-table located at /tmp/temp9428/lookup-table
checking platform for `lookup-table' ...
checking dependencies for `lookup-table' ...
install order:
(lookup-table)
installing lookup-table: ...
changing current directory to /tmp/temp9428/lookup-table
  /programs/free/chicken-svn/bin/csi -bnq -setup-mode -e (require-library 
setup-api) -e (import setup-api) -e (setup-error-handling) -e 
(extension-name-and-version '(\lookup-table\ \\)) 
/tmp/temp9428/lookup-table/lookup-table.setup
  /programs/free/chicken-svn/bin/csc -feature compiling-extension -setup-mode   
 lookup-table.scm -shared -optimize-leaf-routines -inline -output-file 
lookup-table.so -emit-import-library lookup-table -prelude (define-constant 
MAGIC-LIMIT 12) -disable-interrupts -fixnum-arithmetic -local -inline-limit 50 
-no-procedure-checks -debug-level 1

Warning: reference to possibly unbound identifier `MAGIC-LIMIT' in:
Warning:g641
Warning:g613
Warning:g526

Error: module unresolved: lookup-table

Error: shell command terminated with non-zero exit status 256: 
/programs/free/chicken-svn/bin/chicken lookup-table.scm -output-file 
lookup-table.c -dynamic -feature chicken-compile-shared -feature 
compiling-extension -setup-mode -optimize-leaf-routines -inline -output-file 
lookup-table.so -emit-import-library lookup-table -prelude 
\\(define-constant\\ MAGIC-LIMIT\\ 12\\) -disable-interrupts 
-fixnum-arithmetic -local -inline-limit 50 -no-procedure-checks -debug-level 1

Error: shell command failed with nonzero exit status 256:

  /programs/free/chicken-svn/bin/csc -feature compiling-extension -setup-mode   
 lookup-table.scm -shared -optimize-leaf-routines -inline -output-file 
lookup-table.so -emit-import-library lookup-table -prelude (define-constant 
MAGIC-LIMIT 12) -disable-interrupts -fixnum-arithmetic -local -inline-limit 50 
-no-procedure-checks -debug-level 1


Error: shell command terminated with nonzero exit code
17920
csi -bnq -setup-mode -e \(require-library setup...

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


Re: [Chicken-users] Problems Installing the lookup-table Egg

2011-01-02 Thread Sven Hartrumpf
Hi Christian.

Sun, 2 Jan 2011 18:32:14 +0100, ckeen wrote:
 The workaround is to (define-constant MAGIC-LIMIT 12)
 in lookup-table-body.scm before the use of it.

Thanks for your quick help. Works for me too.

Now I was able to solve another issue for the experimental branch:
You need to replace getenv by get-environment-variable
in locale-timezone.scm and locale-posix.scm of the locale egg.
Who can fix this in the official egg?

Happy new year  happy coding
Sven

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


[Chicken-users] tokyocabinet egg: table API

2010-12-22 Thread Sven Hartrumpf
SH  In the uploaded version, there is only support for the hash API
SH  (tch), not for the table API (tct).
AS  I seem to recall someone working on a table API.

Better than this :-)
It's already in the current egg (thanks to Evan Eusey?).
I will test and extend the documentation wiki as needed.

Ciao
Sven

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


[Chicken-users] tokyocabinet egg: table API

2010-12-21 Thread Sven Hartrumpf
Hi all.

I use the tokyocabinet egg from time to time.
In the uploaded version, there is only support for the hash API
(tch), not for the table API (tct).
Does anybody have a table API (I need only tc-tdb-open, tc-tdb-close,
and tc-tdb-get-columns (= tctdbget3 in C))?
If not: Alex (Shinn), will you accept a patch for your egg?

Ciao
Sven

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


[Chicken-users] Re: Plans for development snapshots?

2010-12-10 Thread Sven Hartrumpf
Hi all.

Thu, 09 Dec 2010 12:40:01 +0100 (CET), hartrumpf wrote:
 Are there any plans for a new development snapshot?
 (This would save me some hours for patching several 4.6.3 installations. :-) )

I am surprised: this took me only some minutes -
due to the streamlined build process of chicken, thanks!
So, I retract my plea for a snapshot :-)

Ciao
Sven

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


[Chicken-users] chicken script with many CLI arguments

2010-12-07 Thread Sven Hartrumpf
Tue, 07 Dec 2010 08:49:36 -0500 (EST), felix wrote:
 If you add -:d before that, what is shown?

If you mean the following

#! /usr/local/bin/csi -:d -script
(write (command-line-arguments))

- no change and no additional output.

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


[Chicken-users] chicken script with many CLI arguments

2010-12-07 Thread Sven Hartrumpf
Tue, 07 Dec 2010 14:56:36 +0100 (CET), hartrumpf wrote:
 #! /usr/local/bin/csi -:d -script
 (write (command-line-arguments))
 
 - no change and no additional output.

Sorry, the output did change to:
[panic] illegal runtime option - execution terminated

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


Re: [Chicken-users] Optimizer bug

2010-09-05 Thread Sven Hartrumpf
Sat, 04 Sep 2010 20:30:07 +0200 (CEST), hartrumpf wrote:
 Sat, 04 Sep 2010 12:19:48 +0200 (CEST), felix wrote:
 Are these redefinitions genuine or are the warnings bogus?
 
 The warnings are ok because I define the three functions myself.
 Can this be a problem here? 

To answer my own question: I removed my three redefinitions (which were
intended to help the optimizer), but nothing changed.

 Error: (=) bad argument type - not a number: #f
 
   Call history:
 
   syntax (string-append (quote /) (quote #f))
   syntax (quote /)
   syntax (##core#quote /)
   syntax (quote #f)
   syntax (##core#quote #f)
   eval(string-append (quote /) (quote #f))
   syntax (string-number (quote #f))
   syntax (quote #f)
   syntax (##core#quote #f)
   eval(string-number (quote #f)) --
 
 This is during constant folding.

In the compiler output lines folding constant expression:,
the above string-append expression does not occur.

Greetings
Sven

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


[Chicken-users] Optimizer bug

2010-09-04 Thread Sven Hartrumpf
Hi all.

Some months ago -optimize-level 2 stopped working for me.
As -optimize-level 1 still works, inlining must be the culprit (?):


/usr/local/bin/chicken nallch.scm -output-file nallch.c -debug-level 0 
-optimize-level 2

Warning: redefinition of standard binding: symbol-string

Warning: redefinition of extended binding: any?

Warning: redefinition of extended binding: identity

Error: (=) bad argument type - not a number: #f

  Call history:

  syntax (string-append (quote /) (quote #f))
  syntax (quote /)
  syntax (##core#quote /)
  syntax (quote #f)
  syntax (##core#quote #f)
  eval(string-append (quote /) (quote #f))
  syntax (string-number (quote #f))
  syntax (quote #f)
  syntax (##core#quote #f)
  eval(string-number (quote #f)) --
Error: shell command terminated with non-zero exit status 17920: 
/usr/local/bin/chicken nallch.scm -output-file nallch.c -debug-level 0 
-optimize-level 2


How can I track down this problem myself (i.e. find out
which expression causes the compiler error)?

(I want to make a minimal test case that I can share.)

Greetings
Sven

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


Re: [Chicken-users] Optimizer bug

2010-09-04 Thread Sven Hartrumpf
Sat, 04 Sep 2010 12:19:48 +0200 (CEST), felix wrote:
 Are these redefinitions genuine or are the warnings bogus?

The warnings are ok because I define the three functions myself.
Can this be a problem here? 

 Error: (=) bad argument type - not a number: #f
 
   Call history:
 
   syntax (string-append (quote /) (quote #f))
   syntax (quote /)
   syntax (##core#quote /)
   syntax (quote #f)
   syntax (##core#quote #f)
   eval(string-append (quote /) (quote #f))
   syntax (string-number (quote #f))
   syntax (quote #f)
   syntax (##core#quote #f)
   eval(string-number (quote #f)) --
 
 This is during constant folding. Can you figure out the locations where
 such an expression will occur? Passing -debug o will given information
 about the optimizations done (long).

No hints :-(
 
 Alternatively you might pass -debug 5 data, but this will produce very
 large and awkward output

30 GiB of output but no hint, which line this corresponds to.

Greetings
Sven


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


[Chicken-users] Birthday present

2010-07-20 Thread Sven Hartrumpf
As a birthday present, here is a nice little bug:

library.scm contains:
 ((or (char=? c #\x00) (char=? c #\xff))
  (##sys#read-error port attempt to read expression from something that looks 
like binary data))

The second condition is too strict because it forbids to write
#\ÿ (code 255 in Latin-1) in Chicken programs.

Greetings
Sven

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


Re: [Chicken-users] Re: new egg documentation bootstrap

2009-12-17 Thread Sven Hartrumpf
Thu, 17 Dec 2009 18:12:52 -0500, ddp wrote:
 Besides, I live in emacs.  Why do I have to edit in this little weird
 box with almost none of my normal keymap?

That can be solved by using a browser with a suitable editor plugin.
For example, ViewSourceWith for Firefox allows to use any editor
for input fields (gvim, emacs, ...).

Sven


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


Re: [Chicken-users] Re: Memory limits

2009-12-03 Thread Sven Hartrumpf
Wed, 25 Nov 2009 22:48:28 +0100 (CET), hartrumpf wrote:

 I managed to avoid this segmentation fault by switching from
 -optimize-level 3 to 2.
 The gdb backtrace is not really useful, so we better forget
 this error :-)

With the changes in git of the last 2 days, higher optimize levels
also work without segmentation faults of the compiled program. Thanks!

Sven


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


Re: [Chicken-users] Re: Memory limits

2009-12-03 Thread Sven Hartrumpf
Thu, 3 Dec 2009 12:03:13 +0100, ckeen wrote:

 Sorry to jump into this discussion out of nowhere. Can you write a
 small test for this?

No :-(
It's a big file that I compile (95000 LOC) and a big mistery.
I have always failed to locate the exact error with gdb
because the stack was ruined at the time of crash.

Sven


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


[Chicken-users] types.db fix

2009-12-03 Thread Sven Hartrumpf
It seems to me that the optional third argument of
string-match-positions is not refleced in types.db

Greetings
Sven


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


Re: [Chicken-users] Re: Memory limits

2009-11-26 Thread Sven Hartrumpf
I managed to avoid this segmentation fault by switching from
-optimize-level 3 to 2.
The gdb backtrace is not really useful, so we better forget
this error :-)

Program received signal SIGSEGV, Segmentation fault.
0x082d551f in f_299293 ()
Current language:  auto
The current source language is auto; currently asm.
(gdb) bt
#0  0x082d551f in f_299293 ()
#1  0x000287a1 in ?? ()
#2  0x082d9c4f in f_268956 ()
#3  0xbffd1c80 in ?? ()
#4  0x000287a1 in ?? ()
#5  0x74f9bc48 in ?? ()
#6  0x5c3f5fc0 in ?? ()
#7  0x74f9bc30 in ?? ()
#8  0x401eeb57 in C_i_greaterp () from ...chicken/lib/libchicken.so.4
#9  0xbff9cfb0 in ?? ()
#10 0xbff9d118 in ?? ()
#11 0x0843f453 in f_299284 ()
#12 0x000287a1 in ?? ()
#13 0x2403 in ?? ()
#14 0x0804be21 in f_300838 ()
#15 0xbffe73d4 in ?? ()
#16 0x000287a1 in ?? ()
#17 0x2402 in ?? ()
#18 0x082d5503 in f_299190 ()
#19 0x0006 in ?? ()
#20 0x082aa1fe in f_113382 ()
#21 0x0876e2b8 in ?? ()
#22 0xbff9fb8c in ?? ()
#23 0x74fa9c94 in ?? ()
#24 0xbff9fb84 in ?? ()
#25 0xbff9cffc in ?? ()


Greetings
Sven


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


Re: [Chicken-users] Re: Memory limits

2009-11-26 Thread Sven Hartrumpf
Thu, 26 Nov 2009 17:52:37 +0100, Joerg.Wittenberger wrote:

 be careful about new gcc version!

Yes, I can confirm this in some rare cases.

 Does -optimize-level change Chickens optimization?

I hope so :-)
The page
http://chicken.wiki.br/man/4/Using%20the%20compiler#compiler-command-line-format
shows that level 1 and 2 are equal currently, but 3 is definitely different.
And Felix introduced even level 5 some days ago.

 Could you tell me your plattform/gcc version please.

gcc 4.4.2, i386 (and similar problems on x86_64)

Greetings
Sven


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


[Chicken-users] Memory limits

2009-11-22 Thread Sven Hartrumpf
Hi all.

I switched to a 64bit version of chicken because
I hit the 1GB limit for 32bit.
Now, it looks like there is a 2GB limit for 64bit?

Ciao
Sven


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


Re: [Chicken-users] Re: Memory limits

2009-11-22 Thread Sven Hartrumpf
Hi Felix.

Mon, 23 Nov 2009 00:33:39 + (UTC), bunny351 wrote:
 More information, please.

I was hoping to hear that these limits are well known and
can be avoided by ... :-)

OK. What setup should I investigate first?
- segmentation fault of chicken-compiled 32bit binary at 1 GB
- segmentation fault of chicken-compiled 64bit binary at 2 GB

Ciao
Sven


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


Re: [Chicken-users] chicken core moved to git

2009-10-28 Thread Sven Hartrumpf
Hi all.

I could not find the git project name ...
Could somebody provide a complete
git clone ...
command on the following page:

http://chicken.wiki.br/Development

Just for the git dummies, sorry :-(
Sven


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


[Chicken-users] OPTIMIZE_FOR_SPEED

2009-08-28 Thread Sven Hartrumpf
Hi all.

Chicken has a new build option to be passed to 'make':

OPTIMIZE_FOR_SPEED=1

It turns on -O3 instead of -Os (Linux). As I reported earlier this
summer, the 'make check' always fails for me when using -O3.
See http://lists.gnu.org/archive/html/chicken-users/2009-07/msg00029.html
for details.

Is anybody more lucky (Linux, recent gcc)?

Sven


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


[Chicken-users] Re: 4.1.0rc1

2009-07-18 Thread Sven Hartrumpf
Mon, 6 Jul 2009 14:21:31 +0200, bunny351 wrote:
 Sven Hartrumpf Sven.Hartrumpf at FernUni-Hagen.de writes:
 

 Thu, 02 Jul 2009 15:45:56 +0200 (CEST), Sven.Hartrumpf wrote:
  ~/tmp/chicken-4.1.0rc1/tests  sh runtests.sh
   compiler tests ...
  ../chicken compiler-tests.scm -output-file a.c -include-path ..
 
  Error: shell command terminated with non-zero exit status 11: ../chicken 
  compiler-tests.scm
 -output-file a.c -include-path ..

 This workaround solved the reported issue: I replaced the gcc option -O3 by 
 -O2
 (gcc 4.4.0, 32bit).

 I should have known this pitfall ..., really.

 
 So you changed the default compiler options before building, right?

Yes, by using a line like:

make C_COMPILER_OPTIMIZATION_OPTIONS=...

 Still, this should work.

Maybe :-) But this could also be a gcc bug. If anybody is interested,
try to build (and run the tests!) with -O3 for recent gcc versions.

Sven


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


Re: [Chicken-users] Re: 4.1.0rc1

2009-07-18 Thread Sven Hartrumpf
Mon, 6 Jul 2009 14:13:04 +0200, bunny351 wrote:
 On Fri, Jul 3, 2009 at 3:56 PM, Sven
 Hartrumpfsven.hartru...@fernuni-hagen.de wrote:
 
 Sorry, I have not much time the following days.
 This is what I got (not much):

 chicken-4.1.0rc1/tests  gdb ../chicken
 GNU gdb 6.8
 Copyright (C) 2008 Free Software Foundation, Inc.
 License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
 This is free software: you are free to change and redistribute it.
 There is NO WARRANTY, to the extent permitted by law.  Type show copying
 and show warranty for details.
 This GDB was configured as i586-suse-linux...
 (gdb) run compiler-tests.scm -output-file a.c -include-path .. -verbose
 Starting program: /home/sven/tmp/chicken-4.1.0rc1/chicken compiler-tests.scm 
 -output-file a.c -include-path .. -verbose
 Loading compiler extensions...
 debugging info: calltrace
 compiling `compiler-tests.scm' ...
 pass: source
 ; loading /programs/free/chicken-4.1.0/lib/chicken/4/scheme.import.so ...
 ; loading /programs/free/chicken-4.1.0/lib/chicken/4/chicken.import.so ...
 ; loading /programs/free/chicken-4.1.0/lib/chicken/4/foreign.import.so ...

 Program received signal SIGSEGV, Segmentation fault.
 0x402f0903 in C_i_car () from /programs/free/chicken-4.1.0/lib/libchicken.so
 (gdb) bt
 #0  0x402f0903 in C_i_car () from 
 /programs/free/chicken-4.1.0/lib/libchicken.so
 #1  0x40307ff4 in ?? () from /programs/free/chicken-4.1.0/lib/libchicken.so
 Backtrace stopped: previous frame inner to this frame (corrupt stack?)
 (gdb)

 
 Is this with DEBUGBUILD=1

Yes.


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


Re: [Chicken-users] Re: 4.1.0rc1

2009-07-03 Thread Sven Hartrumpf
Fri, 3 Jul 2009 11:37:23 + (UTC), bunny351 wrote:
 Damn. I had this on galinha the other day, but thought it was a
 dynamic linking problem.
 
 I have currently no access to a Linux machine with gdb, so perhaps someone
 can add DEBUGBUILD=1 to the build and give me a gdb backtrace?

Sorry, I have not much time the following days.
This is what I got (not much):

chicken-4.1.0rc1/tests  gdb ../chicken
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type show copying
and show warranty for details.
This GDB was configured as i586-suse-linux...
(gdb) run compiler-tests.scm -output-file a.c -include-path .. -verbose
Starting program: /home/sven/tmp/chicken-4.1.0rc1/chicken compiler-tests.scm 
-output-file a.c -include-path .. -verbose
Loading compiler extensions...
debugging info: calltrace
compiling `compiler-tests.scm' ...
pass: source
; loading /programs/free/chicken-4.1.0/lib/chicken/4/scheme.import.so ...
; loading /programs/free/chicken-4.1.0/lib/chicken/4/chicken.import.so ...
; loading /programs/free/chicken-4.1.0/lib/chicken/4/foreign.import.so ...

Program received signal SIGSEGV, Segmentation fault.
0x402f0903 in C_i_car () from /programs/free/chicken-4.1.0/lib/libchicken.so
(gdb) bt
#0  0x402f0903 in C_i_car () from /programs/free/chicken-4.1.0/lib/libchicken.so
#1  0x40307ff4 in ?? () from /programs/free/chicken-4.1.0/lib/libchicken.so
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb) 

Sven


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


Re: [Chicken-users] 4.1.0rc1

2009-07-02 Thread Sven Hartrumpf
Hi Felix.

Thu, 2 Jul 2009 15:03:09 +0200, bunny351 wrote:

 The release candidate for 4.1.0 is available now at
 If you have a few minutes, download it and give it a try.

This version (and all svn versions after 2009-06-25 or so)
showed the following problem (Linux, gcc440, i686):

 cd tests/
~/tmp/chicken-4.1.0rc1/tests  sh runtests.sh 
 compiler tests ...
../chicken compiler-tests.scm -output-file a.c -include-path ..

Error: shell command terminated with non-zero exit status 11: ../chicken 
compiler-tests.scm -output-file a.c -include-path .. 


Sven


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


Re: [Chicken-users] The Documentation Problem

2009-06-21 Thread Sven Hartrumpf
Fri, 19 Jun 2009 20:48:24 -0600, matt wrote:
 There are several such projects with a solid infrastructure -
 but they sometimes lack user support.
 For example, please have a look at (and consider contributing to):
 SchemeCrossReference http://practical-scheme.net/wiliki/schemexref.cgi
 
 Yes, I've seen this, and I think it's a worthy project, and I might well
 contribute to it, once I have enough expertise to do so. However, the focus
 is not quite the same. The central point I want to address is:
 
   * As an IMPLEMENTATION-X user, how can I gain a comprehensive view
 of IMPLEMENTATION-X?

SchemeCrossReference has an overview for each implementation, but I agree
that it does not match your intentions completely.

 With all that said, I would be delighted to find that something like this
 already exists. Sven, you mentioned several such projects. Can you point
 me to some others?

http://community.schemewiki.org/

http://schemecookbook.org/

Ciao
Sven


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


Re: [Chicken-users] The Documentation Problem

2009-06-19 Thread Sven Hartrumpf
Hi Matt.

Fri, 19 Jun 2009 02:25:28 -0600, matt wrote:
 And I conceived of a project that might make it easier to access all the
 various docs. I call it SUDS (Scheme Unified Documentation
 Server). Basically, there would be a lightweight Web server (maybe
 Spiffy-based?) that could be deployed either on the public internet or on
 your own computer. It would have a database of all the reference docs for a
 particular system ... so for Chicken, the DB would include R5RS, all
 supported SRFIs, the Chicken manual, and docs for all the
 eggs.

There are several such projects with a solid infrastructure -
but they sometimes lack user support.
For example, please have a look at (and consider contributing to):

SchemeCrossReference http://practical-scheme.net/wiliki/schemexref.cgi

Sven


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


Re: [Chicken-users] bootstrap on svn?

2009-04-28 Thread Sven Hartrumpf
Hi.

Mon, 27 Apr 2009 14:32:14 +0200 (CEST), Sven.Hartrumpf wrote:
 In recent weeks, bootstrapping (on svn) did not work for me.
 
 Is bootstrap.tar.gz too old (2009-01-08 or so)?

Felix, thanks for updatin the bootstrap.tar.gz,
but it was probably a different problem:
using gcc 4.3.3 plus -O3 and gcc 4.4.0 plus -O2 work, but
gcc 4.4.0 plus -O3 fails as follows:

 make C_COMPILER=gcc440 C_COMPILER_OPTIMIZATION_OPTIONS=-O3 LINKER=gcc440 
 LINKER_OPTIONS=-L. -s PLATFORM=linux PREFIX=/programs/free/chicken-svn 
 NOPTABLES=1 CHICKEN=./chicken-boot
make -f ./Makefile.linux all
make[1]: Entering directory `/home/sven/soft/chicken'
sh ./svnrevision.sh
./chicken-boot library.scm -no-trace -optimize-level 2 -include-path . 
-include-path ./ -explicit-use -output-file library.c 

Warning: library unit `library' compiled in dynamic mode
make[1]: *** [library.c] Segmentation fault
make[1]: Leaving directory `/home/sven/soft/chicken'
make: *** [all] Error 2
 
I would assume it is a problem of gcc 4.4.0 (or my gcc installation).
Can anybody build with gcc 4.4.0 plus -O3 ?

Ciao
Sven


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


[Chicken-users] bootstrap on svn?

2009-04-27 Thread Sven Hartrumpf
Hi all.

In recent weeks, bootstrapping (on svn) did not work for me.

Is bootstrap.tar.gz too old (2009-01-08 or so)?

Or did the bootstrap procedure change? I did the following:

make PLATFORM=linux bootstrap
make PLATFORM=linux confclean
make PLATFORM=linux CHICKEN=chicken-boot

output from the last step:

make -f ./Makefile.linux all
make[1]: Entering directory `soft/chicken'
sh ./svnrevision.sh
chicken-boot library.scm -no-trace -optimize-level 2 -include-path . 
-include-path ./ -explicit-use -output-file library.c 
make[1]: *** [library.c] Segmentation fault
make[1]: Leaving directory `soft/chicken'

Sven


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


[Chicken-users] chicken-primitive-inlines.scm

2009-02-02 Thread Sven Hartrumpf
Hi all.

Can anybody explain how one can exploit the following new file:

chicken-primitive-inlines.scm

Ciao
Sven


pgpxC8ALaxkuR.pgp
Description: PGP signature
___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Ugarit: A backup/archival system

2009-01-28 Thread Sven Hartrumpf
Tue, 27 Jan 2009 10:54:25 +, alaric wrote:
 I'm pleased to announce the release of the first beta release of
 Ugarit, a backup/archival system based around content-addressed
 storage, written in Chicken Scheme.

Very impressive.

Some questions and comments:

- Tiger hash: What happens in case of collisions (i.e. different
  data blocks having the same hash)?

- gdbm as a storage backend: if you want a light-weight but more
  efficient/recent variant of dbm, please consider tokyocabinet too.

- What I always wanted to add to other backup systems:
  an option to rely on mtime of directories: if the mtime of a directory
  has not changed, skip the whole directory for testing. In some scenarios
  (and with careful users/scripts that ensure update of directories' mtime!),
  this will give you a performance boost).

- I will test ugarit with 500 GB and 20 million files ...
  or is this too early?


Greetings
Sven


pgp5HsAneD7SG.pgp
Description: PGP signature
___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] symbol-string

2008-12-10 Thread Sven Hartrumpf
Wed, 10 Dec 2008 12:59:57 +0100, Joerg.Wittenberger wrote:
 In my case the following definition (in the lowest level module of my
 app) gains me a factor of two in runtime!!

 (global-set! 'symbol-string
  (lambda (s)
   (##sys#check-symbol s 'symbol-string)
   (##sys#symbol-string s)))

I have similiar experiences with some programs; I simply use:

(define (symbol-string a) (##sys#symbol-string a))


pgpbv6BNQfLD0.pgp
Description: PGP signature
___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] compiling 32bit chicken on x86_64

2008-10-30 Thread Sven Hartrumpf
Thu, 30 Oct 2008 09:25:12 +0900, daishi wrote:

 make -f Makefile.linux32 all
 make[1]: Entering directory `/home/daishi/src/chicken-3.2.0'
 gcc -m32 -shared  \
   -o libchicken.so library.o eval.o data-structures.o extras.o lolevel.o 
 utils.o tcp.o srfi-1.o srfi-4.o srfi-13.o srfi-14.o srfi-18.o srfi-69.o 
 posixunix.o regex.o scheduler.o profiler.o stub.o match.o runtime.o 
 pcre/pcre_compile.o pcre/pcre_config.o pcre/pcre_dfa_exec.o pcre/pcre_exec.o 
 pcre/pcre_fullinfo.o pcre/pcre_get.o pcre/pcre_globals.o pcre/pcre_info.o 
 pcre/pcre_maketables.o pcre/pcre_newline.o pcre/pcre_ord2utf8.o 
 pcre/pcre_refcount.o pcre/pcre_study.o pcre/pcre_tables.o 
 pcre/pcre_try_flipped.o pcre/pcre_ucp_searchfuncs.o pcre/pcre_valid_utf8.o 
 pcre/pcre_version.o pcre/pcre_xclass.o pcre/pcre_chartables.o 
 apply-hack.x86.o -lm -ldl
 /usr/bin/ld: cannot find -lgcc_s_32
 collect2: ld returned 1 exit status
 make[1]: *** [libchicken.so] Error 1
 make[1]: Leaving directory `/home/daishi/src/chicken-3.2.0'
 make: *** [all] Error 2

 I'm not sure if it's a chicken issue...

Probably, an rpm for gcc support on 32bit is missing.
On a openSUSE 11.0 64bit box, it is named  gcc43-32bit:
 rpm -q -l gcc43-32bit
...
/usr/lib64/gcc/x86_64-suse-linux/4.3/32/libgcc_s.so
/usr/lib64/gcc/x86_64-suse-linux/4.3/32/libgcc_s_32.so
...

Greetings
Sven


pgpD63LCgslkh.pgp
Description: PGP signature
___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] improved inlining

2008-10-30 Thread Sven Hartrumpf
  The resulting chicken (after clean and confclean) is not usable:
   chicken
  Error: unbound variable: ##compiler#initialize-compiler
Thu, 30 Oct 2008 09:52:47 +0100, bunny351 wrote:
 Do you use chicken-boot ?

Yes, as you told me before :-)

make C_COMPILER=gcc432 ... CHICKEN=chicken-boot

I tried again, but no change.


pgperQzQQqoUo.pgp
Description: PGP signature
___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] hygienic/trunk switch

2008-10-01 Thread Sven Hartrumpf
Hi.

Wed, 1 Oct 2008 12:08:50 +0200, bunny351 wrote:
 The svn hygienic/trunk switch has been done.

OK, I am using trunk.
I tried the following:

svn up

make distclean

make C_COMPILER=gcc432 C_COMPILER_OPTIMIZATION_OPTIONS=-O3 -ffast-math 
-fomit-frame-pointer -fno-builtin -march=pentium2 LINKER=gcc432 
LINKER_OPTIONS=-L. -s PLATFORM=linux PREFIX=/programs/free/chicken-svn 
NOAPPLYHOOK=1 NOPTABLES=1


This ends like this:

gcc432 -L. -s -L. csc.o -o csc \
  -lchicken -Wl,-R/programs/free/chicken-svn/lib -lm -ldl
chicken setup-utils.scm -quiet -no-trace -optimize-level 2 -include-path . 
-include-path ./ -feature chicken-compile-shared -dynamic -emit-import-library 
setup-utils -output-file setup-utils.c 
Warning: invalid compiler option `-emit-import-library' - ignored
Warning: invalid compiler option `setup-utils' - ignored
Syntax error: module

   modules are not supported

   Expansion history:

   syntax (begin (module setup-utils (version=? 
create-temporary-directory remove-directory yes-or-no? get-te..
   syntax(module setup-utils (version=? 
create-temporary-directory remove-directory yes-or-no? get-terminal-.. --
make[1]: *** [setup-utils.c] Error 70
make[1]: Leaving directory `/home/sven/soft/chicken'
make: *** [all] Error 2


Do I need a special chicken for bootstrapping?
(the above was an old trunk version - 3.4.0)

Sven


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


Re: [Chicken-users] chicken on linux64

2008-08-21 Thread Sven Hartrumpf
Hi Graham.

Wed, 20 Aug 2008 16:15:31 -0400, graham.fawcett wrote:
 I have some Chicken 2.x and 3.x Web applications in production on a
 32-bit Intel Linux server. We may be upgrading to a new 64-bit Intel
 machine, and I'm wondering what kind of Chicken-specific road-bumps I
 might encounter when I try to migrate the apps.

You should consider compiling it in 32bit mode: depending on
your application, this might save RAM (and hence gc-time/runtime) when you
run your chicken-compiled programs.
(For gcc, you will need extra options like -m32 -Wa,-32)

Ciao
Sven


pgpfaAph0ozQh.pgp
Description: PGP signature
___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Profiling large programs

2008-07-10 Thread Sven . Hartrumpf
Hi Felix.

Thu, 10 Jul 2008 09:10:09 +0200, bunny351 wrote:
 Enabling profiling adds considerable decorations to the code (so it's
 mostly a pure source-code-level operation). By doing more of the
 decoration on the C-level (and with the necessary changes to the
 backend), this could be reduced, but there is no quick solution

I guessed so too.

 What would perhaps be easier, is to
 allow selective profiling (say by declaring a number of procedures
 that should be profiled). Would this be acceptable for you?

Yes, that would be an interesting option!

Ciao
Sven


pgpY6aZ2ueJZ2.pgp
Description: PGP signature
___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Profiling large programs

2008-07-10 Thread Sven . Hartrumpf
Thu, 10 Jul 2008 12:39:33 +0200, bunny351 wrote:
 See trunk head. You can enable profiling for particular procedures
 like this;

 (declare (profile procedurename1 ...))

Works perfectly for me. Thanks for the fast implementation of this useful
feature, Felix!


pgpb5l0uvGrad.pgp
Description: PGP signature
___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


  1   2   >