[Chicken-users] Re : Re: package fmt crash on Windows 7 64-bits

2014-12-14 Thread fuhz
Christian, The issue is not specific to fmt package. Opengl package has the same issue. Did I make an obvious mistake? C:\working-dir\chicken-portable-clean\build\bincsi CHICKEN (c) 2008-2014, The Chicken Team (c) 2000-2007, Felix L. Winkelmann Version 4.9.0.1 (stability/4.9.0) (rev 8b3189b)

Re: [Chicken-users] Re : Re: package fmt crash on Windows 7 64-bits

2014-12-14 Thread Christian Kellermann
Hi! * f...@laposte.net f...@laposte.net [141213 14:59]: I believe it's a 64-bit related issue, because I didn't reproduce this problem on Windows 32 bits with the same steps (another toolchain and ARCH=x86). On 64 bit Windows the apply hack is disabled, we need a port of that. Not having

Re: [Chicken-users] Export a defstruct - Short Version?

2014-12-14 Thread Christian Kellermann
* Bahman Movaqar bah...@bahmanm.com [141213 22:29]: This code obviously doesn't compile because the export list is wrong --if I change the export list to, for example, (make-point) it compiles fine. I'm aware a defstruct is basically a shortcut to create a bunch of functions and the

Re: [Chicken-users] Export a defstruct - Short Version?

2014-12-14 Thread Bahman Movaqar
Thanks for the information Christian. -- Bahman Movaqar http://BahmanM.com - https://twitter.com/bahman__m https://github.com/bahmanm - https://gist.github.com/bahmanm PGP Key ID: 0x6AB5BD68 (keyserver2.pgp.com) On 12/14/2014 12:09 PM, Christian Kellermann wrote: * Bahman Movaqar

Re: [Chicken-users] Chicken program: How to clean up the working directory

2014-12-14 Thread Christian Kellermann
* Bahman Movaqar bah...@bahmanm.com [141214 00:49]: I'm working on a simple project which I created using chicken-hatch. Thanks to the author of this egg, all's fine and going smoothly. However, I just wonder if there is a way to clean up the working directory of the program in a way that make

Re: [Chicken-users] Chicken program: How to clean up the working directory

2014-12-14 Thread Bahman Movaqar
On 12/14/2014 12:15 PM, Christian Kellermann wrote: * Bahman Movaqar bah...@bahmanm.com [141214 00:49]: I'm working on a simple project which I created using chicken-hatch. Thanks to the author of this egg, all's fine and going smoothly. However, I just wonder if there is a way to clean up the

[Chicken-users] Handling Errors

2014-12-14 Thread Bahman Movaqar
Consider the following simple function: (define (foo lis) (cdr lis)) Obviously LIS should neither be an empty list nor a list with only one element. What is the recommended way to deal with such constraints? Should I enforce them by writing conditionals at the beginning of the function[1]? Or

Re: [Chicken-users] Handling Errors

2014-12-14 Thread Andy Bennett
Hi, (define (foo lis) (cdr lis)) Obviously LIS should neither be an empty list nor a list with only one element. What is the recommended way to deal with such constraints? Should I enforce them by writing conditionals at the beginning of the function[1]? Or is it conventional to just

[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

[Chicken-users] Need help understanding include behaviour

2014-12-14 Thread Bahman Movaqar
Since the number of tests in my program is growing, I decided to break the tests into separate files --one file per module. So, for example, I have a file named misc.scm with misc module defined inside. In the tests/ folder I have a misc-tests.scm file. So in run.scm I do something like:

Re: [Chicken-users] Handling Errors

2014-12-14 Thread Bahman Movaqar
On 12/14/2014 05:13 PM, Andy Bennett wrote: Hi, (define (foo lis) (cdr lis)) Obviously LIS should neither be an empty list nor a list with only one element. What is the recommended way to deal with such constraints? Should I enforce them by writing conditionals at the beginning of the

[Chicken-users] Idiomatic way to access nth element of a list

2014-12-14 Thread Bahman Movaqar
How would a seasoned Schemer access the nth element of a list? (drop)? Does it have any performance penalty? TIA, -- Bahman Movaqar http://BahmanM.com - https://twitter.com/bahman__m https://github.com/bahmanm - https://gist.github.com/bahmanm PGP Key ID: 0x6AB5BD68 (keyserver2.pgp.com)

Re: [Chicken-users] Idiomatic way to access nth element of a list

2014-12-14 Thread Shawn Wagner
list-ref On Sun, 14 Dec 2014 20:08:09 +0330 Bahman Movaqar bah...@bahmanm.com wrote: How would a seasoned Schemer access the nth element of a list? (drop)? Does it have any performance penalty? TIA, -- Shawn Wagner sha...@speakeasy.org ___

Re: [Chicken-users] Idiomatic way to access nth element of a list

2014-12-14 Thread Richard
Forgot to CC the list, and now I lost my original message :( ... trying again Hello Bayren, To access the nth-element of a list one would use list-ref. For example: (list-ref (list 1 2 3 4) - 3) The problem with linked-lists is that in order to access an element the list has to be traversed.

Re: [Chicken-users] Idiomatic way to access nth element of a list

2014-12-14 Thread Bahman Movaqar
On 12/14/2014 09:18 PM, Richard wrote: Hello Bayman, The get to the nth element of a list one would use list-ref. For example: (list-ref (list 1 2 3 4) 2) - 3 The problem with linked lists is that in order to get to the nth element the list has to be traversed, which does bring a

[Chicken-users] Multiple Modules - Cross Reference

2014-12-14 Thread Bahman Movaqar
First of all, sorry for spamming the list :-) So, I've got two modules: ;; misc.scm (module misc ...) ;; point.scm (load misc) (module point (...) (import scheme chicken) (use srfi-1 misc) ...) And I've setup the project like below:

Re: [Chicken-users] Multiple Modules - Cross Reference

2014-12-14 Thread Richard
Hello Bahman, You have to emit (and compile) the import library for misc.scm, like you did for touka.scm i.e: (compile -d0 -O2 -J -s misc.scm) (compile -d0 -O2 -J -s misc.import.scm) all should work now. good luck and no worries about 'spamming' the list. greetings, Richard Bahman Movaqar

Re: [Chicken-users] Multiple Modules - Cross Reference

2014-12-14 Thread Richard
sorry, correction, do not put -J in the second line: (compile -d0 -O2 -s misc.import.scm) Richard writes: Hello Bahman, You have to emit (and compile) the import library for misc.scm, like you did for touka.scm i.e: (compile -d0 -O2 -J -s misc.scm) (compile -d0 -O2 -J -s

Re: [Chicken-users] Multiple Modules - Cross Reference

2014-12-14 Thread Bahman Movaqar
On 12/14/2014 09:55 PM, Richard wrote: Hello Bahman, You have to emit (and compile) the import library for misc.scm, like you did for touka.scm i.e: Thanks for the hint. So the rule is to compile the .import.scm for any module that is supposed to be imported by others? (compile -d0 -O2 -J

Re: [Chicken-users] Need help understanding include behaviour

2014-12-14 Thread Bahman Movaqar
On 12/14/2014 10:19 PM, John Cowan wrote: Bahman Movaqar scripsit: (use test) (load ../misc) (import misc) (test-group misc ... However when running `chicken-install -test` I get the following error: Error: (import) during expansion of (import ...) - cannot

Re: [Chicken-users] Multiple Modules - Cross Reference

2014-12-14 Thread Bahman Movaqar
On 12/14/2014 08:44 PM, Bahman Movaqar wrote: First of all, sorry for spamming the list :-) So, I've got two modules: ;; misc.scm (module misc ...) ;; point.scm (load misc) (module point (...) (import scheme chicken) (use srfi-1 misc)

[Chicken-users] SRFI-99 - What is a variant type?

2014-12-14 Thread Bahman Movaqar
Reading the docs on SRFI-99 [1], I need some help understanding what is a variant type. Would someone please pass me a relevant link to read? -- Bahman Movaqar http://BahmanM.com - https://twitter.com/bahman__m https://github.com/bahmanm - https://gist.github.com/bahmanm PGP Key ID: 0x6AB5BD68

Re: [Chicken-users] SRFI-99 - What is a variant type?

2014-12-14 Thread Alex Shinn
This appears to be a chicken-specific extension: http://www.chust.org/fossils/srfi-99/wiki?name=variant+types I'm not sure I understand that description, but appears to be something like a union type? -- Alex On Mon, Dec 15, 2014 at 12:12 PM, Bahman Movaqar bah...@bahmanm.com wrote: Reading

Re: [Chicken-users] SRFI-99 - What is a variant type?

2014-12-14 Thread Bahman Movaqar
On 12/15/2014 08:38 AM, Alex Shinn wrote: This appears to be a chicken-specific extension: http://www.chust.org/fossils/srfi-99/wiki?name=variant+types I'm not sure I understand that description, but appears to be something like a union type? Thanks for your answer Alex. I didn't

Re: [Chicken-users] SRFI-99 - What is a variant type?

2014-12-14 Thread Daniel Leslie
I'll chime in that I also find it a little clumsily written, but that it reads to me like variant types are, in practice, little more than different ways of identifying the same data. Which seems like something you could do with an additional field, but perhaps you aren't interested in exposing

[Chicken-users] Installing combinatorics - cock missing

2014-12-14 Thread Bahman Movaqar
Has anyone recently managed to install combinatorics [1]? chicken-install (truely) keeps complaining about cock egg not exisiting. bahman@hamun:~/Work/Touka$ chicken-install combinatorics retrieving ... connecting to host chicken.kitten-technologies.co.uk, port 80 ... requesting