Re: Seeking feedback for nng egg

2021-10-14 Thread Zbigniew Szadkowski
Is nng compiled as a shared library? Because it looks like it’s linking against an archive file. > On Oct 14, 2021, at 20:49, Matt Welland wrote: > >  > I added "-C" "-fPIC" and get this: > > matt@mars:~/src/chicken-nng$ ck5 chicken-install -s > building nng >

Re: [Chicken-users] multiple values in chicken

2008-02-01 Thread Zbigniew
The program is identical and generated by the same compiler (SVN head) with -Ob and the stack size is identical (128k). We saw it was very fast on a Pentium M and an Athlon 1600 on Linux, and it was very slow on a 2GHz Core 2 Duo (OS X), an unknown OS X box and a PPC (probably OS X). I wonder if

Re: [Chicken-users] multiple values in chicken

2008-02-01 Thread Zbigniew
Thanks Ivan! Thanks to your results, I reproduced the problem. I thought this might be a gcc version issue, since the fast versions were compiled with 4.2.3 and the slow ones with 4.1 (Linux) or 4.0.1 (OS X). But, recompiling with 4.1.3 on Linux did not reproduce the issue. However, on my

Re: [Chicken-users] multiple values in chicken

2008-02-01 Thread Zbigniew
Thanks Shawn. Your results are really similar to Ivan's Xeon, which was running 64-bit. You both had a huge number of major GCs, in the 6-7k range. I believe that you are seeing not only the effect of the stack frame difference we're seeing on certain 32-bit systems, but also the double word

Re: [Chicken-users] Re: A few questions

2008-01-31 Thread Zbigniew
SRFI 11 is built into Chicken. #;2 (feature? 'srfi-11) #t On 1/31/08, John Cowan [EMAIL PROTECTED] wrote: SRFI-11 (which provides let-values and let*-values) and SRFI-71 (which nicely extends let and let*) are more advanced solutions to this problem: there don't seem to be Chicken

Re: [Chicken-users] multiple values in chicken

2008-01-31 Thread Zbigniew
On 1/31/08, John Cowan [EMAIL PROTECTED] wrote: Well, as I said, in Chicken values (multiple or otherwise) become the arguments of the continuation function, so they may or may not be on the C stack depending on what gcc does with them. A multiple-value call takes the following route under

Re: [Chicken-users] multiple values in chicken

2008-01-31 Thread Zbigniew
If that last mail wasn't wrapped correctly, I apologize. It is entirely the fault of gmail. On 2/1/08, Zbigniew [EMAIL PROTECTED] wrote: A multiple-value call takes the following route under Chicken: ___ Chicken-users mailing list Chicken-users

Re: [Chicken-users] multiple values in chicken

2008-01-31 Thread Zbigniew
On 2/1/08, John Cowan [EMAIL PROTECTED] wrote: Zbigniew scripsit: I ran Alex's test on a fast machine (Intel C2D 2GHz). I got the same disparity as Alex. I would be curious as to what platform you're running on An ancient Dell Latitude D610 laptop running Ubuntu Gutsy. You mentioned you

Re: [Chicken-users] Hash table mystery

2008-01-24 Thread Zbigniew
of Chicken off your disk and reinstalling, possibly a newer version. On Jan 24, 2008 1:04 PM, Jean-Philippe Theberge [EMAIL PROTECTED] wrote: Zbigniew wrote: Because (make-hash-table 500) is not valid. The format is (make-hash-table pred? hashfunc size) where all arguments are optional. E.g

Re: [Chicken-users] printf in libchicken.a ?

2008-01-24 Thread Zbigniew
Rick, Could you try adding -lSystemStubs to the compilation line? This may be a case of mixing gcc-4.0 with g++-3.3. Zb On Jan 24, 2008 11:16 AM, Rick Taube [EMAIL PROTECTED] wrote: hi are 'printf' and friends supposed to be in libchicken.a ?? I cant tell from the documentation about unit

Re: [Chicken-users] printf in libchicken.a ?

2008-01-24 Thread Zbigniew
: zbigniew -- thank you for your help! adding -lSystemStubs doesnt fix the problem on ppc best, rick g++-3.3 -o build/grace build/Buffer.o build/Console.o build/Editor.o build/Grace.o build/Layer.o build/Help.o build/Resources.o build/ Plotter.o build/Points.o build/Syntab.o build/Syntax.o

Re: [Chicken-users] Hash table mystery

2008-01-24 Thread Zbigniew
Alex's response below informs us why you get an error on 32-bit but not on 64. The error can only occur when there's an equivalent hash in the table (in hash-table-update!). On a 32-bit system, only the last 8 string chars are significant so reg_effective_date and reg_ineffective_date hash to

Re: [Chicken-users] Re: repository branching

2008-01-19 Thread Zbigniew
Ugh. Try doing the following before running make: export MACOSX_DEPLOYMENT_TARGET=10.4 and let me know if it works. I don't know if you have to `make clean` first. On Jan 19, 2008 9:55 AM, Heinrich Taube [EMAIL PROTECTED] wrote: Hi -- the latest svn chicken doesnt build on Leopard (im trying

Re: [Chicken-users] libchicken universal support added

2008-01-17 Thread Zbigniew
Hi there, I added universal binary support to Chicken. make PLATFORM=macosx ARCH=universal Eggs built with chicken-setup will automatically be universal. On Jan 15, 2008 4:06 PM, Heinrich Taube [EMAIL PROTECTED] wrote: hi, since chicken compiles on osx ppc and intel is it possible to

Re: [Chicken-users] libchicken universal?

2008-01-15 Thread Zbigniew
No one has actually tried it to my knowledge, but you could try building two copies (one PPC, one Intel) and then using `lipo -create` to fuse the copies of each library together. The easiest way would be to build on a native i386 and a native PPC machine, but if unavailable I think you could

Re: [Chicken-users] Adding (system-string) somewhere

2008-01-14 Thread Zbigniew
Ozzi [EMAIL PROTECTED] writes: I am using the following code, which just takes a single string: (define (system-string cmd) (string-chomp (with-input-from-pipe cmd read-all))) On Jan 14, 2008 1:45 PM, Kon Lovett [EMAIL PROTECTED] wrote: See also

Re: [Chicken-users] Adding (system-string) somewhere

2008-01-14 Thread Zbigniew
On Jan 10, 2008 10:11 AM, Ozzi [EMAIL PROTECTED] wrote: I am using the following code, which just takes a single string: (define (system-string cmd) (string-chomp (with-input-from-pipe cmd read-all))) First, the string-chomp is pointless unless you're reading only one line. Why chomp just

Re: [Chicken-users] Re: Adding (system-string) somewhere

2008-01-14 Thread Zbigniew
On Jan 14, 2008 5:00 PM, John Cowan [EMAIL PROTECTED] wrote: Ivan Shmakov scripsit: Believe me or not, but the POSIX Shell behaves exactly that way. Sensibly so: what you get is a newline-separated list of lines, with no random empty line at the end to confuse matters. It is sensible

Re: [Chicken-users] Some pointers on easyffi and interfacing with C code

2008-01-10 Thread Zbigniew
On Jan 10, 2008 10:17 PM, Mark Fredrickson [EMAIL PROTECTED] wrote: 1. Many of the GEOS functions return 'char', even though the actual data should be a bool. Is there a way to tell easyffi to treat these characters as #t/#f? I'm thinking there might be a __declare() for it, but I didn't see

Re: [Chicken-users] quasiquote, unquote-splicing and cons cells

2008-01-05 Thread Zbigniew
Hans, If I understand correctly, you're asking whether this is valid: `(,@'() . x) ;= x According to Quasiquotation in Lisp (Alan Bawden), ... the most useful expansion of `(,@anything) is (append anything). So in order to give nested splicing a useful semantics, the code constructed by read

Re: [Chicken-users] Re: Debian slander?

2007-12-26 Thread Zbigniew
On Dec 23, 2007 2:34 AM, John Cowan [EMAIL PROTECTED] wrote: felix winkelmann scripsit: Chicken's interpreter is not strongly performant, but does provide strong debugging facilities. I'd remove that last sentence above. I think it's true: if you want a fast interpreter, you wouldn't

Re: [Chicken-users] Re: Strange observation: Chicken, C, C++: Joe Average does benchmarking

2007-12-19 Thread Zbigniew
On Dec 19, 2007 5:48 AM, Alex Queiroz [EMAIL PROTECTED] wrote: On x86-64 GCC uses -m64 by default, unless Apple changed something. This may be true on other platforms, but on OS X it has always defaulted to 32 bits on 64-bit capable systems. -m64 is required.

Re: [Chicken-users] Problems using meroon

2007-12-18 Thread Zbigniew
Great. I have added this tidbit to the meroon wiki page. On Dec 18, 2007 8:30 AM, Luke McCarthy [EMAIL PROTECTED] wrote: I am using chicken instead of csc but your suggestion works fine with: chicken -extend meroon I didn't see this mentioned anywhere on the wiki.

Re: [Chicken-users] Postscript: (Reading binary files)

2007-12-18 Thread Zbigniew
However, if you are on Mac OS X Leopard with a Core 2 Duo processor (i.e. any reasonably recent system), you could try building Chicken in 64-bit mode: make PLATFORM=macosx ARCH=x86-64 This is still a bit experimental, but should overcome that problem. On Dec 18, 2007 5:08 AM, felix winkelmann

Re: [Chicken-users] Postscript: (Reading binary files)

2007-12-18 Thread Zbigniew
The password should be blank. Try: $ svn co --username anonymous --password https://galinha.ucpel.tche.br/svn/chicken-eggs/chicken/trunk You do need the latest SVN checkout to enable 64-bit on OS X. On Dec 18, 2007 12:43 PM, Siegfried Gonzi [EMAIL PROTECTED] wrote: Hi: Felix wrote me some

[Chicken-users] Re: Strange observation: Chicken, C, C++: Joe Average does benchmarking

2007-12-18 Thread Zbigniew
I take it the 64-bit build works, then? :) The optimization options for Chicken on OS X are pretty conservative: only -Os -fomit-frame-pointer. Your options are probably better. But, I noticed you didn't add -m64 to your C++ compile to activate 64-bit mode, which adds a bunch of extra CPU

Re: [Chicken-users] Getting disk space

2007-12-18 Thread Zbigniew
Normally I use the output of df when writing a system script. The statfs approach looks good too. Here's an example of grabbing output from df on Linux. The main issue is dealing with platform-dependent output and command-line options. Below I used the -P flag because on Linux it ensures there

Re: [Chicken-users] Problems using meroon

2007-12-16 Thread Zbigniew
If you have not done so already, try: csc -X meroon file.scm ./file I think this error will occur if you leave the -X meroon out. On Dec 14, 2007 8:06 PM, Luke McCarthy [EMAIL PROTECTED] wrote: I have installed Meroon with chicken-setup meroon. I am using Chicken 2.6 on Linux. I have tried a

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

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

Re: [Chicken-users] make clean doesn't remove chicken-config.h and chicken-defaults.h

2007-12-05 Thread Zbigniew
Use `make confclean`. On 12/4/07, Matthew Welland [EMAIL PROTECTED] wrote: However, although I did a make clean before rebuilding I still couldn't get chicken-setup to work because it was trying to run sillyhostname-gcc instead of gcc! This was due to the chicken*.h files not being removed by

Re: [Chicken-users] make clean doesn't remove chicken-config.h and chicken-defaults.h

2007-12-05 Thread Zbigniew
] wrote: On Wednesday 05 December 2007 03:50:21 pm Zbigniew wrote: Use `make confclean`. Wish I'd known about that! Thanks. On 12/4/07, Matthew Welland [EMAIL PROTECTED] wrote: However, although I did a make clean before rebuilding I still couldn't get chicken-setup to work because

Re: [Chicken-users] Runtime error while testing ncurses

2007-11-29 Thread Zbigniew
. On 11/28/07, Stephan Lukits [EMAIL PROTECTED] wrote: Zbigniew schrieb: Use csc -X easyffi filename.scm to compile something that uses the easyffi. Doesn't help. However, if you're running an example which itself uses the ncurses egg, I don't see why you would need the FFI at all. Please

Re: [Chicken-users] Runtime error while testing ncurses

2007-11-28 Thread Zbigniew
Use csc -X easyffi filename.scm to compile something that uses the easyffi. However, if you're running an example which itself uses the ncurses egg, I don't see why you would need the FFI at all. Please post a link to your example program if possible. On Nov 28, 2007 10:34 AM, Stephan Lukits

Re: [Chicken-users] foreign-lambda - how to declare double array as argument and how to pass things to it?

2007-11-12 Thread Zbigniew
srfi-4 doc is a good place to look for info on number-vectors. All you need do there is replace vector with f64vector and vector-length with f64vector-length. I think this should work. On 11/12/07, Terrence Brannon [EMAIL PROTECTED] wrote: Well, no here is what I did: (let ([vec (vector 0 1

Re: [Chicken-users] foreign-lambda - how to declare double array as argument and how to pass things to it?

2007-11-11 Thread Zbigniew
Did you try passing in an f64vector instead of a vector? On 11/11/07, Terrence Brannon [EMAIL PROTECTED] wrote: My guess was f64vector. That compiled, but passing a Scheme vector in failed: #;2 (let ([vec (vector 0 1 1)]) (polevl 42 vec (vector-length vec))) Error: bad argument type - not a

Re: [Chicken-users] print returns void

2007-11-01 Thread Zbigniew
That is certainly true. I do not mind creating a convenience function to simulate the old behaviour. On 11/1/07, felix winkelmann [EMAIL PROTECTED] wrote: I found it annyoing to see stuff twice in the repl, for example when piping expressions into csi (I somehow knew this change would come

[Chicken-users] print returns void

2007-10-31 Thread Zbigniew
In svn r6219 print was changed to return void at all times. Just wondering what prompted this change as it was useful for quick debugging, i.e. replace x with (print x) without affecting your results. ___ Chicken-users mailing list

Re: [Chicken-users] Compile -o option in .setup files

2007-10-30 Thread Zbigniew
##sys#load-dynamic-extension will give you the suffix. e.g. (define (dynld-name fn) (make-pathname #f fn ##sys#load-dynamic-extension) ) (dynld-name random-mtzig) On 10/30/07, Ivan Raikov [EMAIL PROTECTED] wrote: Hi all, In some of the eggs I have created, I use a compile command along

Re: [Chicken-users] Wrapping C's printf

2007-10-30 Thread Zbigniew
what about http://chicken.wiki.br/dollar On 10/30/07, Ozzi [EMAIL PROTECTED] wrote: I'd like to wrap C's printf so that I can do something like this: (c-printf The %s of %d and %d is %d sum 1 1 2) ___ Chicken-users mailing list

Re: [Chicken-users] (use foo) versus (declare (uses foo)), csi versus csc

2007-10-21 Thread Zbigniew
On 10/21/07, John Cowan [EMAIL PROTECTED] wrote: Peter Bex scripsit: Why is the difference between compiled and interpreted mode there? The meaning of these things isn't fundamentally different between the two modes, is it? Can't (declare) statements be parsed by the interpreter as

Re: [Chicken-users] (use foo) versus (declare (uses foo)), csi versus csc

2007-10-19 Thread Zbigniew
OK, try this. bar.scm: (define-extension bar) (define (fac n) (if (zero? n) 1 (* n (fac (- n 1))) ) ) foo.scm: #+compiling (declare (uses bar)) (use bar) (write (fac 10)) (newline) bar.scm can now be compiled as a shared library or a regular .o unit. foo.scm can

Re: [Chicken-users] numbers egg - (angle y) feedback

2007-10-11 Thread Zbigniew
I believe you are misunderstanding what angle is supposed to do. ANGLE should return 0 (positive reals) or pi (negative reals) when its argument has a zero imaginary component. The R5RS is abundantly clear that the result of angle is a real number x s.t. -pi x = pi. The current behavior of

Re: [Chicken-users] Compiling readline.egg on Mac OS X 10.4.10

2007-10-04 Thread Zbigniew
Done: http://chicken.wiki.br/readline On 10/4/07, felix winkelmann [EMAIL PROTECTED] wrote: Putting this on the wiki would be helpful indeed. ___ Chicken-users mailing list Chicken-users@nongnu.org

Re: [Chicken-users] Choosing a programming language for a web project

2007-10-01 Thread Zbigniew
This is the kind of user experience that needs to be publicized. :) On 9/29/07, Houman Zolfaghari [EMAIL PROTECTED] wrote: I've been using Chicken for 2 years for one of our NLP projects along with our C++ tools. It's used for some heavy computational work, binding some very big C++ libraries,

Re: [Chicken-users] build on Windows with cygwin

2007-10-01 Thread Zbigniew
That's funny. :) The u prefix means the library was compiled in unsafe mode (-unsafe). On 10/1/07, Shawn Rutledge [EMAIL PROTECTED] wrote: What is the difference between libchicken.a and libuchicken.a? (hope the answer is not accusative case. :-)

Re: [Chicken-users] emacs editing mode for chicken ?

2007-09-21 Thread Zbigniew
All this can be done from the Quack-Options menu, or with M-x quack-customize. No need to edit quack.el. Quack can even remember new interpreter commands (Options - Remember New Programs) on the fly without customization. On 9/19/07, Tony Sidaway [EMAIL PROTECTED] wrote: (defcustom

Re: [Chicken-users] (no subject)

2007-09-17 Thread Zbigniew
I grabbed SVN head and can confirm this problem. I have not built a new Chicken since 2.637 (which worked) so I will try to find the last working revision and track this down. If I can't fix the problem, you are welcome to have ssh access into this box. On 9/17/07, felix winkelmann [EMAIL

Re: [Chicken-users] (no subject)

2007-09-17 Thread Zbigniew
. Handling of library paths changed with the new build system, which has had some interesting effects. On 9/17/07, Zbigniew [EMAIL PROTECTED] wrote: I grabbed SVN head and can confirm this problem. I have not built a new Chicken since 2.637 (which worked) so I will try to find the last working

Re: [Chicken-users] (no subject)

2007-09-15 Thread Zbigniew
Did you try rebuilding any of the eggs? On 9/15/07, Todd Ingalls [EMAIL PROTECTED] wrote: i built snapshot chicken-2.708 on intel mac, and now every egg i try to use results in a segmentation fault ___ Chicken-users mailing list

Re: [Chicken-users] BOM in a Scheme source file

2007-09-09 Thread Zbigniew
BOM breaks the UNIX shebang mechanism. To me, this is good enough reason to avoid prepending a BOM to scripts, and to detect encoding via heuristic, user directive or current locale. On 9/9/07, John Cowan [EMAIL PROTECTED] wrote: Shawn Rutledge scripsit: It would be nice if Chicken was

Re: [Chicken-users] Bug in chicken-2.636

2007-09-01 Thread Zbigniew
Hi Felix, Although I haven't been able to track this down (compilation works for me), this is the output for Benedikt's ldd: $ ldd `which csi` linux-gate.so.1 = (0xe000) libchicken.0 = not found libdl.so.2 = /lib/libdl.so.2 (0xb7f75000) libm.so.6 = /lib/libm.so.6

Re: [Chicken-users] Bug in chicken-2.636

2007-09-01 Thread Zbigniew
Benedikt, Elf mentioned to me that this could be a libtool problem. Could you report the version number returned by these commands: libtool --version libtoolize --version aclocal --version autoheader --version automake --version autoconf --version The build output you provided to me shows that

Re: [Chicken-users] Bug in chicken-2.636

2007-08-30 Thread Zbigniew
We need more information--installation should work without a problem, and has been tested to work. What path did you install Chicken into? What options did you provide to configure? What steps did you follow to build it, exactly? On 8/30/07, Benedikt Rosenau [EMAIL PROTECTED] wrote: Hi Mario,

Re: [Chicken-users] Returning a value from foreign-lambda*

2007-08-28 Thread Zbigniew
This is strange. What it used to say, at some point, was that the argument to return had to be wrapped in parentheses, i.e. return(x). That's because return() itself is a macro which does all the proper cleanup and calls the current continuation. C_return() is just an alias to the return()

Re: [Chicken-users] Bug in chicken-2.636

2007-08-27 Thread Zbigniew
This issue should now be fixed in SVN head. The culprit was the use of the 'optional' macro, which was introduced (renamed) in 2.622, preventing bootstrap by earlier compilers. On 8/26/07, Zbigniew [EMAIL PROTECTED] wrote: There was a change made in SVN r5529 which caused this error

Re: [Chicken-users] Bug in chicken-2.636

2007-08-27 Thread Zbigniew
, Thanks to Zbigniew, I got a newer version of Chicken to work. To spell it out in detail: Install chicken-2.6 from the webpage. Download the snapshot chicken-2.636. Go to a directory and execute the following: $ svn co -r 5361 https://galinha.ucpel.tche.br/svn/chicken-eggs/chicken/trunk

Re: [Chicken-users] Bug in chicken-2.636

2007-08-26 Thread Zbigniew
Hi there. There was a change made to the blob-handling code in SVN r5529 (2007-08-19) which caused this error. You cannot build 5529 or later unless you already have a pretty recent compiler installed for the bootstrap phase. I don't know exactly how recent yet, but it's definitely sometime

Re: [Chicken-users] syntax-case and #!rest, second attempt

2007-08-25 Thread Zbigniew
Mark, The #!rest syntax is supported directly by Chicken and it appears the extra indirection involved in syntax-case is causing the #!rest keyword to be renamed before Chicken sees it (as you've probably surmised). I do not know an easy way to fix this offhand, although some syntax-case wizard

Re: [Chicken-users] read / write floats

2007-08-25 Thread Zbigniew
The Chicken core and the vast majority of eggs are BSD or MIT licensed; only 43 of 364 eggs are GPL. It is not unreasonable to point this out, in case a new user is unaware that different eggs come with a wide variety of licenses (unlike some more homogeneous languages). I did not interpret

[Chicken-users] Re: location and c-string*

2007-08-17 Thread Zbigniew
I documented this issue at http://chicken.wiki.br/location-and-c-string-star On 8/11/07, Zbigniew [EMAIL PROTECTED] wrote: Hi, just want to make sure this code is legal. I have a C function which allocates a string and returns it via one of its arguments, expecting the caller to free

Re: [Chicken-users] location and c-string*

2007-08-13 Thread Zbigniew
Thanks! I need to remember to look at the -macro- expansion next time. I was looking at the C translation, which is a bit harder, though still understandable :) On 8/13/07, felix winkelmann [EMAIL PROTECTED] wrote: I tihnk it is, look at the expansion: csc x.scm -debug 2

[Chicken-users] location and c-string*

2007-08-11 Thread Zbigniew
Hi, just want to make sure this code is legal. I have a C function which allocates a string and returns it via one of its arguments, expecting the caller to free it. The following code works as expected, but I want to make sure it is valid. (let-location ((out c-string*)) (let ((rv (my-func

Re: [Chicken-users] Native (pre-emptive) thread support

2007-08-11 Thread Zbigniew
http://chicken.wiki.br/faq#Does%20CHICKEN%20support%20native%20threads? Short answer: use multiple processes or SRFI-18 threads instead. On 8/11/07, Blake McBride [EMAIL PROTECTED] wrote: What would it take to get Chicken to support true, pre-emptive threads

Re: [Chicken-users] all bound symbols?

2007-08-03 Thread Zbigniew
All this time and I didn't know about apropos. Thanks! On 8/3/07, felix winkelmann [EMAIL PROTECTED] wrote: Try apropos fom the utils unit. ___ Chicken-users mailing list Chicken-users@nongnu.org

Re: [Chicken-users] wxWidgets

2007-07-31 Thread Zbigniew
On 7/31/07, Harri Haataja [EMAIL PROTECTED] wrote: wx I recall as something that tries hard to advertise as cross platform and native look and fails miserably in the latter. You might be thinking of wx 1, which was terrible. wx2, when I used it, did a good job of native look on Linux and

Re: [Chicken-users] List - C strings

2007-07-09 Thread Zbigniew
$ pwd ~/build/chicken $ grep string-length library.scm (define (string-length s) (##core#inline C_i_string_length s)) $ grep C_i_string_length runtime.c C_regparm C_word C_fcall C_i_string_length(C_word s) Hope that helps. Zb On 7/9/07, Robin Lee Powell [EMAIL PROTECTED] wrote: Except:

Re: [Chicken-users] ffi - the right way to return a list holding integers and strings

2007-07-06 Thread Zbigniew
hostinfo egg also contains an example array0-string-vector which takes a NULL-terminated array of char* and returns a vector of scheme strings. It also points you to how to construct a list instead. Drawback is you have to be careful that you don't allocate too much data or you'll overflow the

Re: [Chicken-users] How to FFI?

2007-07-05 Thread Zbigniew
Hello, Could you post the actual function name, signature and description. It may be better to write a small wrapper here but we can't know that from just the signature. For example does this function malloc a string and return the pointer, expect you to malloc enough space for a string and

Re: [Chicken-users] Noob question: (re)compile FFI-accessing code within REPL

2007-07-02 Thread Zbigniew
The manual gives more details in case you're interested: http://chicken.wiki.br/Non%20standard%20macros%20and%20special%20forms#require-extension When in doubt as to best practices, check out some of the existing egg code. On 7/2/07, felix winkelmann [EMAIL PROTECTED] wrote: On 7/2/07, Martin

Re: [Chicken-users] lighter weight alternatives to s11n?

2007-07-01 Thread Zbigniew
Two options come to mind. 1) Use a database. 2) Write the data out as a Scheme expression; e.g. (write (hash-table-alist dict)), then read it back in with (alist-hash-table (read)). #1 will almost certainly be faster for large datasets, and will use much less memory. On 7/1/07, Martin DeMello

Re: [Chicken-users] Issues with the blas library

2007-07-01 Thread Zbigniew
You're absolutely right: enums are not generating any test for validity. I would expect to see a C_i_foreign_integer_argumentp test there. I don't know if this behaviour is intentional. You could try this patch to Chicken, which adds a test for integer. (Patch is against darcs HEAD but

Re: [Chicken-users] Issues with the blas library

2007-07-01 Thread Zbigniew
Heh, Felix already patched this issue 10 minutes before I did, so you're all set! ;) On 7/2/07, Zbigniew [EMAIL PROTECTED] wrote: You could try this patch to Chicken, which adds a test for integer. On 7/1/07, Ivan Raikov [EMAIL PROTECTED] wrote: I accidentally discovered

Re: [Chicken-users] Syntactic sugar for regular expressions and URIs

2007-06-28 Thread Zbigniew
/27/07, Arto Bendiken [EMAIL PROTECTED] wrote: Jim, On 6/27/07, Zbigniew [EMAIL PROTECTED] wrote: The drawback over Perl is that nestable delimiters don't nest Yes. This means there are still two more features this egg could use in order to be perfect (i.e. on par with Perl's and Ruby's regex

Re: [Chicken-users] parameter limit

2007-06-26 Thread Zbigniew
Hi Kon, If you make your code available in SVN, I would be happy to help out, if you don't mind me messing around =). I've wanted to update this egg for a while but lacked the impetus as the current version still works perfectly for my purposes. On 5/15/07, Kon Lovett [EMAIL PROTECTED] wrote:

Re: [Chicken-users] args-doc: formatting help messages in a GNU way

2007-06-21 Thread Zbigniew
Not a big deal, since args and tool already need 37, so the only external extension is srfi-95. On 6/21/07, Ivan Shmakov [EMAIL PROTECTED] wrote: (require-extension (srfi 1)) (require-extension (srfi 13)) (require-extension (srfi 14)) (require-extension (srfi 37)) (require-extension (srfi 39))

Re: [Chicken-users] using Texinfo for documenting an egg

2007-06-19 Thread Zbigniew
If you don't want to put your documentation on the wiki, why don't you just use eggdoc? It can render to .pdf, .info and .html. On 6/19/07, Ivan Shmakov [EMAIL PROTECTED] wrote: Since I wish to produce the documentation in either ``printable'' (.ps), ``emacsable'' (.info), or

Re: [Chicken-users] ANN: free-gettext

2007-06-14 Thread Zbigniew
Very cool. In addition to a , prefix for strings via define-syntax, you can use set-read-syntax!, which is more flexible but specific to Chicken. On 6/14/07, Alex Shinn [EMAIL PROTECTED] wrote: Hi all, There's an alternative to the gettext egg now available as free-gettext

Re: [Chicken-users] a file system using Chicken

2007-06-09 Thread Zbigniew
Hi Dan, You mention on your webpage that Scheme functions cannot serve as C callbacks ... was the showstopper the multithreaded - cooperative-threaded impedance difference, or was there another issue with calling back into Scheme from C? On 6/9/07, Dan Muresan [EMAIL PROTECTED] wrote: My

Re: [Chicken-users] chicken and stalin

2007-06-05 Thread Zbigniew
Bryan, I'd like to know from what perspective you are approaching this. Do you already have code written for Stalin that you need to interface to Chicken? Or are you interested in the optimizations Stalin does purely as a research problem and would like to see if they are applicable to

Re: [Chicken-users] Chicken manual in Texinfo format

2007-06-05 Thread Zbigniew
Not that this solves your problem, but you can do a one-time, one-way eggdoc-wiki transformation using the eggdoc-svnwiki egg. (http://chicken.wiki.br/eggdoc-svnwiki, generated using itself :) But there is no way to retain the semantic information during the conversion. If some support were

Re: [Chicken-users] Large vector

2007-05-10 Thread Zbigniew
On 5/10/07, Mark Voortman [EMAIL PROTECTED] wrote: I have an urgent need to create a vector with a capacity of over 100 million elements. However, I get an out of range exception when I call make-array since the numbers of elements is limited to 16777215. 1. Which is it, vector or array? If

Re: [Chicken-users] problems with datatype and eopl 3-5

2007-04-23 Thread Zbigniew
Neither one works. I think datatype.egg may be incompatible with the EOPL code. On 4/23/07, felix winkelmann [EMAIL PROTECTED] wrote: To use the datatype extension, then use require-extension (or use) to load the macros, require-for-syntax is for obscure special uses, and should normally not

Re: [Chicken-users] problems with datatype and eopl 3-5

2007-04-21 Thread Zbigniew
I can't answer your first question, unfortunately. But I can try answering your second. Scheme48 generates bytecode that runs on a highly-tuned virtual machine, and is geared for interpretation. Chicken generates very fast compiled C code but interpretation is relatively slow, sometimes very

Re: [Chicken-users] Chicken 2.6 available from MacPorts

2007-04-04 Thread Zbigniew
In fact these options are fine with me for a general build. However, when I `sudo port -v install chicken` I get lines such as the following: /usr/bin/gcc-4.0 -DHAVE_CONFIG_H -I/opt/local/include -DC_BUILDING_LIBCHICKEN -Ipcre -DSUPPORT_UTF8 -DSUPPORT_UCP -DPCRE_STATIC -I/opt/local/include

Re: [Chicken-users] noobie question about chicken/swig/csi

2007-04-03 Thread Zbigniew
Hi. Only the basic # ... # (or foreign-declare) is built into Chicken; all this does is include the contents directly into the generated C file. If you use this method, you still have to write a foreign-lambda so Scheme can see it. If you want Chicken to do this for you, you can use #? .. #

Re: [Chicken-users] noobie question about chicken/swig/csi

2007-04-02 Thread Zbigniew
I know what you mean. The other day, while writing a pure assembly module coded to the C++ ABI, I found myself thinking, this just isn't tedious enough. So saying, I renounced all foreign function interface interfaces, and plunged into the murky and unfathomable depths of Chicken's C.Time

Re: [Chicken-users] noobie question about chicken/swig/csi

2007-04-02 Thread Zbigniew
, Zbigniew [EMAIL PROTECTED] wrote: Finally, some time passed and--well, you know how these things go--I had inadvertantly Greenspun my pure C module into a Lisp interpreter. I was just about to put the finishing touches on the FFI when I saw your post. Your sarcasm is utterly unnecessary

Re: [Chicken-users] Return value of `system'

2007-03-14 Thread Zbigniew
Exit values should be distinguishable from signals (and even from signals+core dumps). Either use the C macros, or assume bits 15-8 are the exit return code, bit 7 is the core dump, and bits 6-0 are the signal number (with 127 being shell exec failure). It's the same as in Perl unless Chicken

Re: [Chicken-users] Return value of `system'

2007-03-14 Thread Zbigniew
I appreciate your insight, but please, please do not cripple (system) any further by making the return value a boolean--it reduces its utility immensely. 'process' is not always a good substitute [and has the same signal/exit code conflation issue]. And 'osprocess' is just far too heavy for

Re: [Chicken-users] hash-table-walk + hash-table-delete!

2007-03-05 Thread Zbigniew
SRFI-69 appears to provide no guarantee of safety, so for maximum portability (including to future implementations) you might want to iterate manually over a copy of the keys obtained via hash-table-keys. Obviously this is wasteful for large hashes, and I'm sure that's why you're asking in the

Re: [Chicken-users] hash-table-walk + hash-table-delete!

2007-03-05 Thread Zbigniew
Just be careful of future updates to Chicken's implementation. Alternatively, this behavior could be made to be guaranteed in Chicken. It sounds like a good idea to me, but I am not an expert. On 3/5/07, Kon Lovett [EMAIL PROTECTED] wrote: Zbigniew is right but you could conditionally expand

Re: Re : [Chicken-users] opengl egg naming scheme

2007-03-02 Thread Zbigniew
Isn't the only difference the lack of a colon? It would be trivial to auto-generate a shim file with all the defines in it that you could simply include with your code.Certainly no more difficult than renaming the opengl egg in the first place. *If* I started using the opengl egg seriously,

Re: Re : [Chicken-users] opengl egg naming scheme

2007-03-02 Thread Zbigniew
Yes. I don't think the egg generates any syntax either (but am not positive). Anyway, I attached a define shim for the opengl egg converting it to use the native C syntax in case you want to use it. Completely untested. At http://3e8.org/pub/opengl-shim.scm -- it was too large (50kb) to

Re: Re : [Chicken-users] opengl egg naming scheme

2007-03-02 Thread Zbigniew
an example anyway. http://3e8.org/pub/opengl-hyphen-shim.scm On 3/2/07, Zbigniew [EMAIL PROTECTED] wrote: Yes. I don't think the egg generates any syntax either (but am not positive). Anyway, I attached a define shim for the opengl egg converting it to use the native C syntax in case you want to use

Re: [Chicken-users] Re: I need some help to edit a tree

2007-03-01 Thread Zbigniew
As far as structured text editors for Scheme go, there is Emacs + paredit.el, which I like a lot. Though written in elisp, paredit could certainly give you ideas if you are looking to write your own editor in Scheme.See http://mumble.net/~campbell/emacs/, especially paredit.release,

Re: [Chicken-users] Allocation of data for use in return values

2007-01-23 Thread Zbigniew
Felix had mentioned using callbacks for allocation in this message as well. http://lists.gnu.org/archive/html/chicken-users/2003-10/msg00027.html I didn't mention this and other advanced techniques because, basically, while looking at the Gauche Objective C bridge a while ago, I came up with

Re: [Chicken-users] Can't get exit values of (process...)?

2007-01-17 Thread Zbigniew
Robin, Did you try using process-fork to create the process, as Felix suggested? The process can't end until you actually call process-wait. In fact, you normally should call process-wait to properly reap your children. If you are noticing your children are being reaped automatically on your

Re: [Chicken-users] Can't get exit values of (process...)?

2007-01-17 Thread Zbigniew
I would agree with Kon on this---osprocess should work and give you more options. To me the overall problem is that opening both a read and write pipe to a process contains a bit of magic, and is not as easy as one might suppose. For example, many times you are better opening a pseudo tty,

Re: [Chicken-users] Can't get exit values of (process...)?

2007-01-17 Thread Zbigniew
On 1/17/07, John Cowan [EMAIL PROTECTED] wrote: What do people think? Should the wait() be removed from process? Yes, I'd say so; it's not hard to insert a call to wait right after closing the input port. Note that Perl behaves this way w/r/t bi-directional pipes as well, requiring an

Re: [Chicken-users] Building chicken on Mac OS X

2007-01-17 Thread Zbigniew
Have you tried simply building chicken? libdl is present by default on 10.4. If you're getting an error, post it here. On 1/17/07, John Haskey [EMAIL PROTECTED] wrote: I'm attempting to build chicken on Mac OS X 10.4.8. In the README under platform issues there is a mention that chicken

  1   2   >