Re: [Chicken-users] Trying to understand srfi-41 (streams)

2017-01-30 Thread Bahman Movaqar
On 01/28/2017 11:19 PM, Bahman Movaqar wrote: > I've been playing around `srfi-41` for an hour now. It seems to me, > that regardless of the operations on the stream, the `head` doesn't > advance. For example: > > (define my-stream (list->stream '(0 1 2 3))) >

[Chicken-users] Trying to understand srfi-41 (streams)

2017-01-28 Thread Bahman Movaqar
ced by 2. But this fails: (assert (equal? (stream-car my-stream) 2)) And of course, upon further investigation, the head hadn't moved an inch after `take` or `car`. What am I missing? Thanks, -- Bahman Movaqar http://BahmanM.com - https://twitter.com/bahman__m https://github.com/bahm

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

2017-01-28 Thread Bahman Movaqar
ision 243481] Installation? YES Tests? YES Eggs? YES Great job! -- 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) signature.asc Descript

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

2016-04-28 Thread Bahman Movaqar
gcc (Ubuntu 4.8.4-2ubuntu1~14.04.1) 4.8.4 Installation works?: yes Tests work?: yes Installation of eggs works?: yes Excellent job people! -- Bahman Movaqar http://BahmanM.com - https://twitter.com/bahman__m https://github.com/bahmanm - https://gist.github.com/bahmanm PGP Key ID: 0x6AB5BD68 (keyser

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

2016-04-05 Thread Bahman Movaqar
he full log of egg installation. -- 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) retrieving ... connecting to host "chicken.kitten-technologies.co.uk", port 80 ... req

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

2016-04-05 Thread Bahman Movaqar
(0x7fdfd8d6a000) > libdl.so.2 => /usr/lib/libdl.so.2 (0x7fdfd8b66000) > libc.so.6 => /usr/lib/libc.so.6 (0x7fdfd87c5000) > /lib64/ld-linux-x86-64.so.2 (0x7fdfd9740000) > Have you set `CHICKEN_PREFIX` and `CHICKEN_REPOSITORY` to point to the new

[Chicken-users] Geiser on Emacs 24.5.1

2015-06-20 Thread Bahman Movaqar
Following Geiser's giude[1], Emacs[2] keeps complaining with Symbol's function definition is void: state when doing `run-geiser`. Is this an issue with this version of Emacs or am I missing something? [1] http://www.nongnu.org/geiser/ [2] Emacs 24.5.1 -- Bahman Movaqar http://BahmanM.com

Re: [Chicken-users] How to bootstrap developing a CHICKEN application?

2015-02-01 Thread Bahman Movaqar
On 02/01/2015 03:57 AM, Bahman Movaqar wrote: A naive question but suppose I want to write an application (not an egg); an application in the sense that it will not be installed in CHICKEN repository. What is the recommended directory structure? How can I run the tests (like 'chicken-install

[Chicken-users] Status of Slime egg (aka alternatives to default Inferior Scheme mode)

2015-01-31 Thread Bahman Movaqar
The default Inferior Scheme mode in Emacs is really not the best REPL experience possible. I wonder if you people are using slime egg[1] and if yes, how do you find it? Or are there any other options besides them? [1] http://wiki.call-cc.org/eggref/4/slime -- Bahman Movaqar http://BahmanM.com

Re: [Chicken-users] Status of Slime egg (aka alternatives to default Inferior Scheme mode)

2015-01-31 Thread Bahman Movaqar
interested. Thanks for sharing this with me. I am already using chicken-scheme but haven't tried geiser yet; I'll definitely keep an eye on it and if I find some free time I'll give it a go. On 31 Jan 2015 06:12, Bahman Movaqar bah...@bahmanm.com mailto:bah...@bahmanm.com wrote: The default

[Chicken-users] How to bootstrap developing a CHICKEN application?

2015-01-31 Thread Bahman Movaqar
? Or is it just *my* conception of application and in CHICKEN there is no difference between this and an egg? I'd appreciate any help or a pointer to a relevant documentation. -- Bahman Movaqar http://BahmanM.com - https://twitter.com/bahman__m https://github.com/bahmanm - https://gist.github.com/bahmanm

[Chicken-users] Fresh CHICKEN - trouble with readline

2015-01-30 Thread Bahman Movaqar
doesn't start complaining about history-install-file-manager being unbound[2]. I'm sure '.csi.history' exists and RW by my user. What am I doing wrong? TIA, [1] http://wiki.call-cc.org/eggref/4/readline#examples [2] http://pastebin.com/LZ7hAqUU -- Bahman Movaqar http://BahmanM.com - https

Re: [Chicken-users] Fresh CHICKEN - trouble with readline

2015-01-30 Thread Bahman Movaqar
On 01/31/2015 02:21 AM, Bahman Movaqar wrote: I just compiled and installed CHICKEN 4.9.0.1 on a virtual machine (Ubuntu 64bit). Then installed 'libreadline-dev' (apt-get), followed by 'readline' egg (chicken-install). Importing readline works just fine in csi (use readline). However, when

Re: [Chicken-users] Homepage design proposal

2015-01-23 Thread Bahman Movaqar
On 01/23/2015 07:25 PM, Peter Bex wrote: On Fri, Jan 23, 2015 at 07:17:17PM +0330, Bahman Movaqar wrote: I strongly disagree with using CHICKEN for the website. Let's keep things simple by using the right tool for the job. I think you're mixing up two things. One is the tool to generate

Re: [Chicken-users] Homepage design proposal

2015-01-23 Thread Bahman Movaqar
___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users -- 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] RecordType operations and parameter types

2015-01-07 Thread Bahman Movaqar
On 01/07/2015 06:50 PM, Alex Charlton wrote: Bahman Movaqar writes: I have a record type, SOME-RT, and am implementing operations for it. As a habit, I keep putting an 'assert' expression at the beginning of each procedure. (define (some-rt-some-op param1) (assert (some-rt? param1

[Chicken-users] RecordType operations and parameter types

2015-01-06 Thread Bahman Movaqar
. Is this the approach you seasoned CHICKEN'ers would take as well? 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) signature.asc Description: OpenPGP digital signature

[Chicken-users] UNLIST a list of lists!?

2015-01-05 Thread Bahman Movaqar
is, correctly, a list of lists. (zip lis1 lis2) - ((1 10) (2 20)) However I need to pass the result of zip as 2 separate lists to foobar; I need to *un-list* it. (foobar (1 10) (2 20)) Is there any standard way to do that? TIA, -- Bahman Movaqar http://BahmanM.com - https://twitter.com

Re: [Chicken-users] UNLIST a list of lists!?

2015-01-05 Thread Bahman Movaqar
On 01/05/2015 09:37 PM, Patrick Li wrote: Hi Bahman. apply is the standard way of doing what you're looking for. Thank you! On Mon, Jan 5, 2015 at 10:25 AM, Bahman Movaqar bah...@bahmanm.com mailto:bah...@bahmanm.com wrote: Happy 2015 CHICKEN'ers! I have a procedure which

[Chicken-users] Idiomatic member? perdicate

2015-01-05 Thread Bahman Movaqar
of performance and being idiomatic? 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) signature.asc Description: OpenPGP digital signature

Re: [Chicken-users] Idiomatic member? perdicate

2015-01-05 Thread Bahman Movaqar
...the following will fail where it should pass because test expects an identical value to pass. (test #t (member a-thing list-of-things)) So how would you go around this? Bahman Movaqar writes: I need to check if a list contains an element. There are 2 approaches as far as I could gather

Re: [Chicken-users] Idiomatic member? perdicate

2015-01-05 Thread Bahman Movaqar
On 01/05/2015 10:44 PM, Alex Charlton wrote: I’d use test-assert with member: http://api.call-cc.org/doc/test/test-assert Thank you! Sometimes the quality of my questions is embarrassing :-) Bahman Movaqar writes: On 01/05/2015 10:26 PM, Alex Charlton wrote: Just use member. Member

Re: [Chicken-users] Protect against mutation

2014-12-28 Thread Bahman Movaqar
On 12/27/2014 05:30 PM, Christian Kellermann wrote: * Bahman Movaqar bah...@bahmanm.com [141227 13:51]: Consider the following snippet: (use srfi-1) (define (mutator lis n) (set! (first lis) n) lis) (define ll (list 1 2 3 4)) (mutator (cdr lis) 100) (equal? (second? lis) 100) -- #t

[Chicken-users] Protect against mutation

2014-12-27 Thread Bahman Movaqar
Consider the following snippet: (use srfi-1) (define (mutator lis n) (set! (first lis) n) lis) (define ll (list 1 2 3 4)) (mutator (cdr lis) 100) (equal? (second? lis) 100) -- #t Is there anyway to protect lis from mutation? TIA, -- Bahman Movaqar http://BahmanM.com - https://twitter.com

Re: [Chicken-users] Happy Christmas

2014-12-24 Thread Bahman Movaqar
Merry Christmas and happy new year. With best of wishes for CHICKEN'ers and their families from ancient Iran.  Bahman div Original message /divdivFrom: Felix Winkelmann felix.winkelm...@bevuta.com /divdivDate:24/12/2014 16:10 (GMT+03:30) /divdivTo: chicken-users@nongnu.org

[Chicken-users] Why there is no nil?

2014-12-17 Thread Bahman Movaqar
I'm curious to know why nil is not defined in CHICKEN and one has to use '() instead? TIA, PS: Or am I missing something ridiculously obvious!? -- Bahman Movaqar http://BahmanM.com - https://twitter.com/bahman__m https://github.com/bahmanm - https://gist.github.com/bahmanm PGP Key ID

[Chicken-users] What does (let X ...) do?

2014-12-16 Thread Bahman Movaqar
Reading on lazy-seq [1]; what exactly does the following piece of code do? (let foo ((x 10)) (* x x)) TIA, [1] http://wiki.call-cc.org/eggref/4/lazy-seq -- Bahman Movaqar http://BahmanM.com - https://twitter.com/bahman__m https://github.com/bahmanm - https://gist.github.com/bahmanm

Re: [Chicken-users] What does (let X ...) do?

2014-12-16 Thread Bahman Movaqar
On 12/17/2014 01:31 AM, Daniel Leslie wrote: It is a named let, details here: http://www.ccs.neu.edu/home/dorai/t-y-scheme/t-y-scheme-Z-H-1.html#node_toc_node_sec_6.2 Thanks Daniel. Exactly what I was looking for. On 16 Dec 2014 13:58, Bahman Movaqar bah...@bahmanm.com mailto:bah

Re: [Chicken-users] Installing combinatorics - cock missing

2014-12-15 Thread Bahman Movaqar
On 12/15/2014 07:49 PM, Mario Domenech Goulart wrote: Hi, On Mon, 15 Dec 2014 11:22:29 +0330 Bahman Movaqar bah...@bahmanm.com wrote: Has anyone recently managed to install combinatorics [1]? chicken-install (truely) keeps complaining about cock egg not exisiting. bahman@hamun:~/Work

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 bah

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

[Chicken-users] Handling Errors

2014-12-14 Thread Bahman Movaqar
]? Or is it conventional to just let the function fail and catch the error somewhere else (probably in a top-level function)? [1] This quickly leads to dirty and not-easy-to-read code. What say you seasoned schemers on this? -- Bahman Movaqar http://BahmanM.com - https://twitter.com/bahman__m https

[Chicken-users] Need help understanding include behaviour

2014-12-14 Thread Bahman Movaqar
read include docs (http://api.call-cc.org/doc/chicken/special-forms/include) to no avail. 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) signature.asc

Re: [Chicken-users] Handling Errors

2014-12-14 Thread Bahman Movaqar
, is a lot of work and you have to do it really carefully. I hardly ever do this. Never! :-) Thanks for the detailed answer. Much appreciated. -- Bahman Movaqar http://BahmanM.com - https://twitter.com/bahman__m https://github.com/bahmanm - https://gist.github.com/bahmanm PGP Key ID: 0x6AB5BD68

[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 Bahman Movaqar
a performance penalty. You can use vectors instead of list if you want to access/modify elements in constant time. If you need a vector that can dynamically grow take a look at the dyn-vector egg: http://wiki.call-cc.org/eggref/4/dyn-vector. Bahman Movaqar writes: How would a seasoned Schemer access

[Chicken-users] Multiple Modules - Cross Reference

2014-12-14 Thread Bahman Movaqar
doing wrong? 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) signature.asc Description: OpenPGP digital signature

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

2014-12-14 Thread Bahman Movaqar
it is choking on run.scm which is a very simple file: (use test) (load ../misc) (import misc) (include misc-tests) (load ../point) (import point) (include point-tests) (test-exit) good luck and no worries about 'spamming' the list. Thanks! Bahman Movaqar writes

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 Bahman Movaqar
understand it either :-) On Mon, Dec 15, 2014 at 12:12 PM, Bahman Movaqar bah...@bahmanm.com mailto:bah...@bahmanm.com wrote: 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

[Chicken-users] Installing combinatorics - cock missing

2014-12-14 Thread Bahman Movaqar
-- 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) signature.asc Description: OpenPGP digital signature ___ Chicken-users mailing

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

2014-12-13 Thread Bahman Movaqar
/hint. 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) signature.asc Description: OpenPGP digital signature ___ Chicken

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

2014-12-13 Thread Bahman Movaqar
and other compilation left-over stuff. -- 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) signature.asc Description: OpenPGP digital signature

[Chicken-users] Replace an element in a list

2014-12-13 Thread Bahman Movaqar
What is the idiomatic way of replacing the nth element in a list *without* mutating the list? Is the combination of take and take-right the right way to do it? TIA, -- Bahman Movaqar http://BahmanM.com - https://twitter.com/bahman__m https://github.com/bahmanm - https://gist.github.com/bahmanm

Re: [Chicken-users] Replace an element in a list

2014-12-13 Thread Bahman Movaqar
Thanks Daniel and John. I found split-at while reading the docs last night. Along with let-values it seems like a natural answer to my questions. What do you folks think? -- Bahman Movaqar http://BahmanM.com - https://twitter.com/bahman__m https://github.com/bahmanm - https://gist.github.com