[Chicken-users] How to get the kind list of a condition?

2011-12-09 Thread Vok Vojwo
Is there a way to get the kind list of a condition without converting the whole condition into a list? This example: (let* ((fail (lambda () (open-input-file ))) (exn (call/cc (lambda (return) (with-exception-handler return fail) (map car (condition-list

[Chicken-users] Syslog without format

2011-12-09 Thread Vok Vojwo
The attached patch adds a syslog-str function to the syslog egg. The function does not use sprintf. It requires an already formated string. This is useful if one wants to use the fmt egg to format syslog messages. --- syslog.orig/syslog.scm 2011-12-09 13:27:31.0 +0100 +++ syslog/syslog.scm

[Chicken-users] Syslog string protection error

2011-12-08 Thread Vok Vojwo
I think there seems to be a string protection error in the syslog egg. The C function openlog requires a const string and relies on the fact that the string does not change. Normally Scheme strings are moved around by the garbage collector. This is a problem for openlog. The result are random

Re: [Chicken-users] Syslog string protection error

2011-12-08 Thread Vok Vojwo
The code of the syslog egg uses syslog(prio,\%s\,msg); to send the message. On Linux the above code is about 30% slower than this: syslog(prio, msg); Some time ago I did a performance test: http://superuser.com/questions/305029/why-is-syslog-so-much-slower-than-file-io And on Linux

Re: [Chicken-users] Syslog string protection error

2011-12-08 Thread Vok Vojwo
It is possible to avoid the ident parameter: (program-name people-bridge) (openlog #f opt/pid facility/local0) But setting the program name does not have any effect on the generated syslog message: Dec 8 10:51:53 t4mshpapl104 csi[7448]: Starting program. It does not have any effect on the

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

2011-12-07 Thread Vok Vojwo
2011/12/7 Peter Bex peter@xs4all.nl: Try this instead: csi -R sxpath-lolevel -e (print (sxml:sxml-xml '())) Thanks. This works but not as expected ;-) I was looking for the srl:sxml-xml function: http://modis.ispras.ru/Lizorkin/Apidoc/index.html#docfunc15826 Is it also available?

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

2011-12-07 Thread Vok Vojwo
2011/12/7 Vok Vojwo cev...@gmail.com: I was looking for the srl:sxml-xml function: http://modis.ispras.ru/Lizorkin/Apidoc/index.html#docfunc15826 I got it. I had to include sxml-tools/serializer.scm in sxpath-lolevel.scm. After that it is possible to export srl:sxml-xml. And it seems to work

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

2011-12-07 Thread Vok Vojwo
2011/12/7 Peter Bex peter@xs4all.nl: Actually, the main reason is that SSAX is a horrible mess which has many completely unrelated procedures all mixed together. There are several egg that provide different sets of procedures from the SSAX project.  Most eggs include all files from the

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

2011-12-07 Thread Vok Vojwo
2011/12/7 Jim Ursetto zbignie...@gmail.com: Other ways were to regularize and improve some of the identifier names, make things more idiomatic, and in sxml-serializer's case, add some feature enhancements. Where is the improvement? Writing sxml-serializer instead of srl:sxml-xml does not

[Chicken-users] Spiffy SSL Connection handshake error

2011-12-05 Thread Vok Vojwo
I got the following error while trying to use Spiffy with SSL: primordial: Connection handshake error: argument is not a port This is my simple test program: #! /usr/local/bin/csi -s (use spiffy openssl) (server-port 8000) (access-log (current-error-port)) (debug-log (current-error-port))

Re: [Chicken-users] Sendfile error on Red Hat 5.5 64 Bit

2011-12-01 Thread Vok Vojwo
2011/12/1 David Krentzlin da...@lisp-unleashed.de: As a quick fix you can adjust the sendfile.setup to include the features that are present. Something like: (compile -s -O2 -d0 -D sendfile -D mmap -D madvise sendfile.scm -j sendfile) instead of: (compile -s -O2 -d0 ,@features

Re: [Chicken-users] Sendfile error on Red Hat 5.5 64 Bit

2011-12-01 Thread Vok Vojwo
2011/12/1 David Krentzlin da...@lisp-unleashed.de: i think i might have found the culprit. Do you mind trying current tip from https://bitbucket.org/certainty/sendfile ? Same error: sendfile.c: In function `stub205': sendfile.c:78: error: `POSIX_FADV_SEQUENTIAL' undeclared (first use in this

[Chicken-users] Sendfile error on Red Hat 5.5 64 Bit

2011-11-30 Thread Vok Vojwo
I was able to compile sendfile on Red Hat 5.5 32 Bit but it fails on 64 Bit with the following error: # chicken-install -t local -l . sendfile retrieving ... deleting stale file `sendfile.import.so' from local build directory deleting stale file `sendfile.so' from local build directory

Re: [Chicken-users] chicken-install and proxy authentication

2011-11-30 Thread Vok Vojwo
Vok Vojwo cev...@gmail.com: I get an error during the proxy authentication of chicken-install: $ chicken-install -debug -n -proxy host:port -username me -password mypw http-client retrieving ... resolving alias `kitten-technologies' to: http://chicken.kitten-technologies.co.uk/henrietta.cgi

Re: [Chicken-users] json-abnf fails to parse booleans

2011-11-28 Thread Vok Vojwo
2011/11/28 Ivan Raikov ivan.g.rai...@gmail.com: - due to a limitation in abnf/lexgen-derived parsers, #f cannot be a  value returned by a parser. So the JSON true and false values are  represented by '(#t) and '(#f). Can you explain this? I tried my patch with some booleans and it seems to

[Chicken-users] Why does the JSON egg map JSON structs to Scheme vectors instead of alists?

2011-11-27 Thread Vok Vojwo
I am a bit confused by the way the JSON egg maps JSON structures to Scheme values. The JSON egg maps a structure to a vector: (use json) (with-input-from-string {\pi\:3.14,\e\:2.71} json-read) ;; = #((pi . 3.14) (e . 2.71)) This makes it impossible to use the standard Scheme function assoc to

Re: [Chicken-users] Why does the JSON egg map JSON structs to Scheme vectors instead of alists?

2011-11-27 Thread Vok Vojwo
2011/11/27 Christian Kellermann ck...@pestilenz.org: My guess is that it makes it possible to write back to json, since alists are already used for representing a different datatype. But json-write does not accept alists as values. This (json-write (vector (cons x (list (cons a 1) (cons b

Re: [Chicken-users] Why does the JSON egg map JSON structs to Scheme vectors instead of alists?

2011-11-27 Thread Vok Vojwo
2011/11/27 Moritz Heidkamp mor...@twoticketsplease.de: You may be interested in two alternative JSON eggs, namely json-abnf egg (GPLed) which represents both JSON objects as tagged lists alists (i.e. they have a symbol `object' their car) and arrays as vectors or the medea egg (BSD licensed)

[Chicken-users] json-abnf fails to parse booleans

2011-11-27 Thread Vok Vojwo
The json-abnf module creates some strange results for booleans: (use json-abnf) (pp (parser {\str\:\a\,\true\:true,\false\:false})) prints: (object (str a) (true (#t)) (false)) true is a list and false is '(). ___ Chicken-users mailing list

Re: [Chicken-users] json-abnf fails to parse booleans

2011-11-27 Thread Vok Vojwo
2011/11/27 Vok Vojwo cev...@gmail.com: The json-abnf module creates some strange results for booleans: (use json-abnf) (pp (parser {\str\:\a\,\true\:true,\false\:false})) prints: (object (str a) (true (#t)) (false)) true is a list and false is '(). I think the attached patch fixes

[Chicken-users] chicken-install and proxy authentication

2011-11-25 Thread Vok Vojwo
I get an error during the proxy authentication of chicken-install: $ chicken-install -debug -n -proxy host:port -username me -password mypw http-client retrieving ... resolving alias `kitten-technologies' to: http://chicken.kitten-technologies.co.uk/henrietta.cgi connecting to host

[Chicken-users] chicken-install: how to retrieve with dependencies

2011-11-25 Thread Vok Vojwo
How can I retrieve an egg with all dependencies? I have the problem, that I have to retrieve the eggs on system1 in order to build them on system2. ___ Chicken-users mailing list Chicken-users@nongnu.org

Re: [Chicken-users] chicken-install: how to retrieve with dependencies

2011-11-25 Thread Vok Vojwo
2011/11/25 Mario Domenech Goulart mario.goul...@gmail.com: It's far from being a definitive solution, but you can find a quick hack here: http://parenteses.org/mario/misc/fetch-eggs.scm Just call it like:   $ csi -s fetch-eggs.scm egg1 egg2 ... Thanks! I did already something similar:

[Chicken-users] How to deploy http-client?

2011-11-25 Thread Vok Vojwo
I tried to deploy an application which uses http-client, but I get the following error: ./client: symbol lookup error: /home/.../client/http-client.so: undefined symbol: C_srfi_2d1_toplevel What I did so far: I wrote a simple test program client.scm: (use http-client) (pp