Kooda | 23 Feb 13:57 2015

Strange memory leak with lazy-seq


I’ve been playing with lazy-seq for the past few days and found a very
strange behaviour:

The heap of the following program keeps growing rapidly in csi, running
the same program after compilation seems to slow down the growth quite a
lot but the heap isn’t constant as I was expecting it to be.

Here is a test case of the problem:

; Start this script with `csi -:D -:hi100k -:hg101` to observe heap resizing

(use lazy-seq)

(define (complex-stream seq)
  (lazy-map identity seq))

; This seems to leak:
(lazy-each void (complex-stream (lazy-numbers)))

; This doesn't:
#;(lazy-each void (lazy-map identity


Envoyé depuis ma GameBoy.

Chicken-users mailing list
(Continue reading)

Chaos Eternal | 21 Feb 07:10 2015

about egg/pty

hi all
by browsing the code of pty egg (http://wiki.call-cc.org/eggref/4/pty)

in source code http://code.call-cc.org/svn/chicken-eggs/release/4/pty/trunk/pty.scm
the procedure


uses a magic number 1024 , which used to pack master fd and slave fd
into one integer to return.

but why 1024 and what happens when the slave fd is greater than 1024?

just curious.
Chaos Eternal | 20 Feb 03:11 2015

about egg/pty

hi all
by browsing the code of pty egg (http://wiki.call-cc.org/eggref/4/pty)

in source code http://code.call-cc.org/svn/chicken-eggs/release/4/pty/trunk/pty.scm
the procedure


uses a magic number 1024 , which used to pack master fd and slave fd
into one integer to return.

but why 1024 and what happens when the slave fd is greater than 1024?

just curious.

Read/Write PNG image

Good day.
I need read/write PNG. Where i can see example fo this? which library i need use? 

Ben Brindle | 18 Feb 22:25 2015

Open Inventor


I want to access Open Inventor from Chicken.  My goal is to develop something like Ivy (http://xenia.media.mit.edu/~kbrussel/Ivy/) and put it in an egg (using coops).  Any ideas on how to go about this?  Note:  I don't want to rewrite Open Inventor in Scheme, just access what has already been developed.  I also want to integrate it with Chicken as tightly as possible (i.e. without layers like SWIG)  Thank you in advance!

Ben Brindle

Chicken-users mailing list
Chicken-users <at> nongnu.org
Hugo Arregui | 18 Feb 04:47 2015

"[panic] invalid encoded numeric literal" with gtk

Hi guys,

I'm puzzled by a strange error I found playing with gtk, it might be
something silly, but I cannot grok it. The code is pretty simple:

;-- test.scm
(import chicken scheme foreign)

#include <gtk/gtk.h>

int main(int argc, char** argv) {
    gtk_init(&argc, &argv);
    return 0;

(print "hey")

;-- output:

$ chicken
(c) 2008-2014, The Chicken Team
(c) 2000-2007, Felix L. Winkelmann
Version (stability/4.9.0) (rev 8b3189b)
linux-unix-gnu-x86-64 [ 64bit manyargs dload ptables ]
bootstrapped 2014-06-07

$ csc -e test.scm `pkg-config --cflags --libs gtk+-3.0 | sed 's/-pthread/-C -pthread/'`  

$ ./test
[panic] invalid encoded numeric literal - execution terminated


The error disappear if I remove the gtk_init line.

Any ideas?

Shawn Rutledge | 16 Feb 17:46 2015

Open Source Developers' Conference coming up in Oslo in May (osdc.no)

It would be possible to go and present about Chicken or Scheme topics in general if someone feels so inclined.

Begin forwarded message:

> From: Per Henrik Oja <per <at> oja.no>
> Subject: Communities! Participate!
> Date: 4 February 2015 11:49:44 GMT+1
> To: program <at> osdc.no, organizers <at> osdc.no
> Cc: international <at> mysociety.org, hakim <at> mysociety.org, gemma <at> mysociety.org
> Hi!
> OSDC Nordic is an upcoming open-source friendly community-oriented
> event, held May 8th - 10th in Oslo.
> Open Source Developers' Conference exists to enable the many Nordic
> open source communities to come together and share their enthusiasm.
> Read more about the event on
> http://osdc.no/cfp.html

> We want you and your friends to come together to learn, hack and share
> their enthusiasm!
> Participate by presenting a talk, hosting a workshop, involving your
> community, by volunteering, or simply by participating in this awesome
> and unique event. Register on http://goo.gl/forms/fgUhby8aU9
> Feel free to contact us with any questions on organizers <at> osdc.no
> And finally. To build a great community event we need everybody care by sharing.
> Help us spread the word! Forward this email to any of your friends you
> think might like this invitation .
> --
> Best regards
> Per Henrik Oja
> Program Commitee
> OSDC Nordic
> http://osdc.no

Chicken-users mailing list
Chicken-users <at> nongnu.org
Scott McCoid | 16 Feb 10:22 2015

Help with udp6 / socket


I'm reasonably new to chicken-scheme (and scheme in general), and I'm having trouble with the udp6 (and likewise, socket) eggs. I'm trying to run the example code, but the connection is always refused. 

Error: (socket-receive!) cannot read from socket - Connection refused: #<socket fd:4 af/inet sock/dgram>

I looked into the socket code and it seems that this is probably not the fault of these eggs per se, but probably something I'm doing wrong. For example, the %socket-receive! function makes a call to the <sys/socket.h> recv function, which always returns -1. I've tried using other port numbers to connect to, but this doesn't seem to make a difference. 

I'm on Mac OS 10.10.2 using chicken scheme v. (stability/4.9.0) (rev 8b3189b)

I'm happy to help track this down if it's a bug, just let me know. 


For reference I've tried this example as well as a simplified version using (udp-recv s 64)
(use udp6) (define s (udp-open-socket)) (udp-connect! s "localhost" 13) ; daytime service (udp-send s "\n") (receive (n data host port) (udp-recvfrom s 64) (print n " bytes from " host ":" port ": " data)) (udp-close-socket s)
Chicken-users mailing list
Chicken-users <at> nongnu.org
Ryuho Yokoyama | 14 Feb 10:19 2015

Re: How to compile chicken scheme to Windows DLL?

Thank you very much for replying.

>Do you have any special reason to be using such an old CHICKEN?

Yes, as stating in reply mail to Mr. Oleg Kolosov,  I am now converting all 
my CL code to Scheme(Chicken, Gambit).
In original code there are many "define-macro".  Because  Chicken Ver 4 does 
not support "define-macro"  I am
using the Ver 3.

>I'm not sure I understand your question.  Do you want to embed CHICKEN
>into a C application as a dll?

Please refer to reply mail to Mr. Oleg Kolosov.

-----Original Message----- 
Date: Fri, 13 Feb 2015 15:48:06 +0000
From: Mario Domenech Goulart <mario.goulart <at> gmail.com>
To: chicken-users <at> nongnu.org
Subject: Re: [Chicken-users] How to compile chicken scheme to Windows
Message-ID: <87sie9ke2x.fsf <at> email.parenteses.org>
Content-Type: text/plain


On Fri, 13 Feb 2015 21:44:08 +0900 "Ryuho Yokoyama" <ryuho8 <at> ybb.ne.jp> 

> I am attempting to compile the chicken scheme code down to C
> and then compile it into a Windows DLL.
> But I can not how to initialize chicken scheme runtime system
> in the DllMain function.
> Please someone show how to write a scheme code which produce a Windows
> and compile option etc.
> Chicken Ver 3.4.0
> MinGW(mingw-get-inst-20110802.exe)

CHICKEN 3.4.0 is very old.  We've switched to the major version 4 ~6
years ago.  The most recent release is, which you can find here:

Do you have any special reason to be using such an old CHICKEN?  If you
don't, I strongly suggest you to update to the latest release.

I'm not sure I understand your question.  Do you want to embed CHICKEN
into a C application as a dll?

Best wishes.

David Van Horn | 13 Feb 17:25 2015

ICFP 2015: Final Call for Papers


 20th ACM SIGPLAN International Conference on Functional Programming

 ICFP 2015

 Vancouver, Canada, August 31 - September 2, 2015



Important Dates

   Submissions due:  Friday, February 27 2015, 23:59 UTC-11
   Author response:  Tuesday, April 21, 2015
                     through Thursday, 23 April, 2015
      Notification:  Friday, May 1, 2015
    Final copy due:  Friday, June 12, 2015


ICFP 2015 seeks original papers on the art and science of functional
programming.  Submissions are invited on all topics from principles to
practice, from foundations to features, and from abstraction to
application.  The scope includes all languages that encourage
functional programming, including both purely applicative and
imperative languages, as well as languages with objects, concurrency,
or parallelism.  Topics of interest include (but are not limited to):

* Language Design: concurrency, parallelism, and distribution; modules;
  components and composition; metaprogramming; type systems;
  interoperability; domain-specific languages; and relations to
  imperative, object-oriented, or logic programming.

* Implementation: abstract machines; virtual machines; interpretation;
  compilation; compile-time and run-time optimization; garbage
  collection and memory management; multi-threading; exploiting
  parallel hardware; interfaces to foreign functions, services,
  components, or low-level machine resources.

* Software-Development Techniques: algorithms and data structures;
  design patterns; specification; verification; validation; proof
  assistants; debugging; testing; tracing; profiling.

* Foundations: formal semantics; lambda calculus; rewriting; type
  theory; monads; continuations; control; state; effects; program
  verification; dependent types.

* Analysis and Transformation: control-flow; data-flow; abstract
  interpretation; partial evaluation; program calculation.

* Applications: symbolic computing; formal-methods tools; artificial
  intelligence; systems programming; distributed-systems and web
  programming; hardware design; databases; XML processing;
  scientific and numerical computing; graphical user interfaces;
  multimedia and 3D graphics programming; scripting; system
  administration; security.

* Education: teaching introductory programming; parallel programming;
  mathematical proof; algebra.

* Functional Pearls: elegant, instructive, and fun essays on
  functional programming.

* Experience Reports: short papers that provide evidence that
  functional programming really works or describe obstacles that have
  kept it from working.

If you are concerned about the appropriateness of some topic, do not
hesitate to contact the program chair.

Abbreviated instructions for authors

* By Friday, 27 February 2015, 23:59 UTC-11, submit a full paper of
  at most 12 pages (6 pages for an Experience Report) in standard ACM
  conference format, including bibliography, figures, and appendices.

The deadlines will be strictly enforced and papers exceeding the page
limits will be summarily rejected.

* Authors have the option to attach supplementary material to a
  submission, on the understanding that reviewers may choose not to
  look at it.

* Each submission must adhere to SIGPLAN's republication policy, as
  explained on the web at


* Authors of resubmitted (but previously rejected) papers have the
  option to attach an annotated copy of the reviews of their previous
  submission(s), explaining how they have addressed these previous
  reviews in the present submission.  If a reviewer identifies
  him/herself as a reviewer of this previous submission and wishes to
  see how his/her comments have been addressed, the program chair will
  communicate to this reviewer the annotated copy of his/her previous
  review.  Otherwise, no reviewer will read the annotated copies of
  the previous reviews.

Overall, a submission will be evaluated according to its relevance,
correctness, significance, originality, and clarity.  It should
explain its contributions in both general and technical terms, clearly
identifying what has been accomplished, explaining why it is
significant, and comparing it with previous work.  The technical
content should be accessible to a broad audience.  Functional Pearls
and Experience Reports are separate categories of papers that need not
report original research results and must be marked as such at the
time of submission.  Detailed guidelines on both categories are on the
conference web site.

Proceedings will be published by ACM Press.  Authors of accepted
submissions will have a choice of one of three ways to manage their
publication rights.  These choices are described at


Presentations will be videotaped and released online if the presenter
consents.  The proceedings will be freely available for download from
the ACM Digital Library from one week before the start of the
conference until two weeks after the conference.

Formatting: Submissions must be in PDF format printable in black and
white on US Letter sized paper and interpretable by
Ghostscript. Papers must adhere to the standard ACM conference format:
two columns, nine-point font on a ten-point baseline, with columns
20pc (3.33in) wide and 54pc (9in) tall, with a column gutter of 2pc
(0.33in).  A suitable document template for LaTeX is available at


Submission: Submissions will be accepted on the web using a link
that will be posted at


Improved versions of a paper may be submitted at any point before
the submission deadline using the same web interface.

Author response: Authors will have a 72-hour period, starting at 0:00
UTC on Tuesday, 21 April 2015, to read reviews and respond to them.

ACM Author-Izer is a unique service that enables ACM authors to
generate and post links on either their home page or institutional
repository for visitors to download the definitive version of their
articles from the ACM Digital Library at no charge. Downloads through
Author-Izer links are captured in official ACM statistics, improving
the accuracy of usage and impact measurements. Consistently linking
the definitive version of ACM article should reduce user confusion
over article versioning. After your article has been published and
assigned to your ACM Author Profile page, please visit


to learn how to create your links for free downloads from the ACM DL.

Publication date: The official publication date of accepted papers
is the date the proceedings are made available in the ACM Digital
Library. This date may be up to two weeks prior to the first day
of the conference. The official publication date affects the deadline
for any patent filings related to published work.

General Chair:
  Kathleen Fisher            Tufts University (USA)

Program Chair:
  John Reppy                 University of Chicago (USA)

Program Committee:
  Amal Ahmed                 Northeastern University (USA)
  Jean-Philippe Bernardy     Chalmers University of Technology (Sweden)
  Matthias Blume             Google (USA)
  William Byrd               University of Utah (USA)
  Andy Gill                  University of Kansas (USA)
  Neal Glew                  Google (USA)
  Fritz Henglein             University of Copenhagen (Denmark)
  Gabriele Keller            University of New South Wales and NICTA (Australia)
  Andrew Kennedy             Microsoft Research Cambridge (UK)
  Neelakantan Krishnaswami   Birmingham University (UK)
  Daan Leijen                Microsoft Research Redmond (USA)
  Keiko Nakata               FireEye Dresden (Germany)
  Mike Rainey                INRIA Rocquencourt (France)
  Andreas Rossberg           Google (Germany)
  Manuel Serrano             INRIA Sophia Antipolis (France)
  Simon Thompson             University of Kent (UK)
  David Van Horn             University of Maryland (USA)
  Stephanie Weirich          University of Pennsylvania (USA)
Peter Achten | 13 Feb 14:37 2015

[TFP 2015] 2nd call for papers

                  S E C O N D   C A L L   F O R   P A P E R S

                         ======== TFP 2015 ===========

               16th Symposium on Trends in Functional Programming
                                June 3-5, 2015
                        Inria Sophia Antipolis, France

The symposium on Trends in Functional Programming (TFP) is an
international forum for researchers with interests in all aspects of
functional programming, taking a broad view of current and future
trends in the area. It aspires to be a lively environment for
presenting the latest research results, and other contributions (see
below). Authors of draft papers will be invited to submit revised
papers based on the feedback receive at the symposium.  A
post-symposium refereeing process will then select a subset of these
articles for formal publication.

The selected revised papers will be published as a Springer Lecture
Notes in Computer Science (www.springer.com/lncs) volume.

TFP 2015 will be the main event of a pair of functional programming
events. TFP 2015 will be accompanied by the International Workshop on
Trends in Functional Programming in Education (TFPIE), which will take
place on June 2nd.

The TFP symposium is the heir of the successful series of Scottish
Functional Programming Workshops. Previous TFP symposia were held in
   * Edinburgh (Scotland) in 2003;
   * Munich (Germany) in 2004;
   * Tallinn (Estonia) in 2005;
   * Nottingham (UK) in 2006;
   * New York (USA) in 2007;
   * Nijmegen (The Netherlands) in 2008;
   * Komarno (Slovakia) in 2009;
   * Oklahoma (USA) in 2010;
   * Madrid (Spain) in 2011;
   * St. Andrews (UK) in 2012;
   * Provo (Utah, USA) in 2013;
   * and in Soesterberg (The Netherlands) in 2014.
For further general information about TFP please see the TFP homepage.


TFP is pleased to announce a talk by the following invited speaker:

   * Laurence Rideau is a researcher at INRIA and is interested in the
     semantics of programming languages , the formal methods, and the
     verification tools for programs and mathematical proofs.  She
     participated in the beginnings of the Compcert project (certified
     compiler), and is part of the Component Mathematical team in the
     MSR-INRIA joint laboratory, who performed the formalization of the
     Feit-Thompson theorem successfully.

     Thirty years ago, computers barged in mathematics with the famous
     proof of the Four Color Theorem.  Initially limited to simple
     calculation, their role is now expanding to the reasoning whose
     complexity is beyond the capabilities of most humans, as the proof of
     the classification of finite simple groups.  We present our large
     collaborative adventure around the formalization of the Feit-Thompson
     theorem (http://en.wikipedia.org/wiki/Feit%E2%80%93Thompson_theorem)
     that is a first step to the classification of finite groups
     and that uses a palette of methods and techniques that range from
     formal logic to software (and mathematics) engineering.

== SCOPE ==

The symposium recognizes that new trends may arise through various
routes.  As part of the Symposium's focus on trends we therefore
identify the following five article categories. High-quality articles
are solicited in any of these categories:

     Research Articles: leading-edge, previously unpublished research work
     Position Articles: on what new trends should or should not be
     Project Articles: descriptions of recently started new projects
     Evaluation Articles: what lessons can be drawn from a finished project
     Overview Articles: summarizing work with respect to a trendy subject

Articles must be original and not simultaneously submitted for
publication to any other forum. They may consider any aspect of
functional programming: theoretical, implementation-oriented, or
experience-oriented.  Applications of functional programming
techniques to other languages are also within the scope of the

Topics suitable for the symposium include:

     Functional programming and multicore/manycore computing
     Functional programming in the cloud
     High performance functional computing
     Extra-functional (behavioural) properties of functional programs
     Dependently typed functional programming
     Validation and verification of functional programs
     Debugging and profiling for functional languages
     Functional programming in different application areas:
       security, mobility, telecommunications applications, embedded 
       global computing, grids, etc.
     Interoperability with imperative programming languages
     Novel memory management techniques
     Program analysis and transformation techniques
     Empirical performance studies
     Abstract/virtual machines and compilers for functional languages
     (Embedded) domain specific languages
     New implementation strategies
     Any new emerging trend in the functional programming area

If you are in doubt on whether your article is within the scope of
TFP, please contact the TFP 2015 program chair, Manuel Serrano.


To reward excellent contributions, TFP awards a prize for the best paper
accepted for the formal proceedings.

TFP traditionally pays special attention to research students,
acknowledging that students are almost by definition part of new
subject trends. A student paper is one for which the authors state
that the paper is mainly the work of students, the students are listed
as first authors, and a student would present the paper. A prize for
the best student paper is awarded each year.

In both cases, it is the PC of TFP that awards the prize. In case the
best paper happens to be a student paper, that paper will then receive
both prizes.


TFP is financially supported by <to be announced>


Acceptance of articles for presentation at the symposium is based on a
lightweight peer review process of extended abstracts (4 to 10 pages
in length) or full papers (20 pages). The submission must clearly
indicate which category it belongs to: research, position, project,
evaluation, or overview paper. It should also indicate which authors
are research students, and whether the main author(s) are students.  A
draft paper for which ALL authors are students will receive additional
feedback by one of the PC members shortly after the symposium has
taken place.

We use EasyChair for the refereeing process. Papers must be submitted at:


Papers must be written in English, and written using the LNCS
style. For more information about formatting please consult the
Springer LNCS web site:



Submission of draft papers:     March 17, 2015
Notification:                   March 24, 2015
Registration:                   April 7, 2015
TFP Symposium:                  June 3-5, 2015
Student papers feedback:        June 9, 2015
Submission for formal review:   July 1, 2015
Notification of acceptance:     September 8, 2015
Camera ready paper:             October 8, 2015


Janis Voigtländer               University of Bonn, DE
Scott Owens                     University of Kent, UK
Neil Sculthorpe                 Swansea University, UK
Colin Runciman                  University of York, UK
Manuel Serrano                  Inria (PC chair), FR
Rinus Plasmeijer                University of Nijmegen, NL
Tomas Petricek                  University of Cambridge, UK
Marco T. Morazan                Seton Hall University, USA
Wolfgang De Meuter              Vrije Universiteit Brussel, BE
Michel Mauny                    Ensta ParisTech, FR
Sam Lindley                     The University of Edinburgh, UK
Daan Leijen                     Microsoft, USA
Jurriaan Hage                   Utrecht University, NL
Andy Gill                       University of Kansas, USA
Thomas Gazagnaire               University of Cambrige, UK
Lars-Ake Fredlund               Universidad Politécnica de Madrid, ES
Jean-Christophe Filliatre       Université Paris Sud Orsay, FR
Marc Feeley                     Université de Montréal, CA
Olaf Chitil                     University of Kent, UK
Edwin Brady                     University of St Andrews, UK

Chicken-users mailing list
Chicken-users <at> nongnu.org