Kon Lovett | 1 Aug 02:32 2010
Picon

Ann: SRFI 27 release

Hi Folks,

Release 3.0.0 of the srfi-27 egg for Chicken 4 is available. Now with  
documentation ;-)

Best Wishes,
Kon
John Cowan | 1 Aug 05:48 2010

Re: getting to grips with multimethods

Martin DeMello scripsit:

> Coming from a traditional single-dispatch OOP background, one of the
> biggest problems I'm finding with coops's CLOS-style multimethods is
> that methods are no longer namespaced by their classes, but leak into
> the current namespace. Thus, when I import a module containing some
> classes, I have to be aware of all the methods and make sure I don't
> have anything clashing with them in the importing code. How do people
> generally deal with this?

By getting used to the idea that generic functions are first-class, and
that classes aren't namespaces.  Modules are namespaces, and you have
to be careful with both the generic functions and the classes within them.

--

-- 
Ambassador Trentino: I've said enough. I'm a man of few words.
Rufus T. Firefly: I'm a man of one word: scram!
        --Duck Soup                     John Cowan <cowan <at> ccil.org>
John Gabriele | 1 Aug 21:07 2010
Picon

minor build warning (twice) : runtime.c

Hi,

Just built chicken on Ubuntu 10.04 (on x86_64) and saw this warning
come up twice:

~~~~
gcc -fno-strict-aliasing -DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES -I. -I./ \
          -c -Os -fomit-frame-pointer \
           \
          -DC_BUILDING_LIBCHICKEN runtime.c -o runtime-static.o
runtime.c: In function ‘C_number_to_string’:
runtime.c:7328: warning: ignoring return value of ‘gcvt’, declared
with attribute warn_unused_result
~~~~

and

~~~~
gcc -fno-strict-aliasing -DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES -I. -I./ \
          -c -Os -fomit-frame-pointer -fPIC -DPIC \
          -DC_BUILDING_LIBCHICKEN runtime.c -o runtime.o
runtime.c: In function ‘C_number_to_string’:
runtime.c:7328: warning: ignoring return value of ‘gcvt’, declared
with attribute warn_unused_result
~~~~

---John
Thomas Chust | 1 Aug 22:48 2010
Picon

Re: minor build warning (twice) : runtime.c

2010/8/1 John Gabriele <jmg3000 <at> gmail.com>:
> [...]
> Just built chicken on Ubuntu 10.04 (on x86_64) and saw this warning
> come up twice:
> [...]
> runtime.c: In function ‘C_number_to_string’:
> runtime.c:7328: warning: ignoring return value of ‘gcvt’, declared
> with attribute warn_unused_result
> [...]

Hello,

this warning is harmless. Actually, I would consider it a bug in the
system's C headers that gcvt is declared with attribute
warn_unused_result — the return value of this function is always the
same as the target buffer parameter passed to the function and hence
it is unlikely that any information is lost by ignoring it.

But then again, gcvt is a legacy function that was removed from
the most recent POSIX standards anyway and it is probably no wonder if
strange things happen when one uses it ;-)

Ciao,
Thomas

--

-- 
When C++ is your hammer, every problem looks like your thumb.
Nicolas Pelletier | 2 Aug 06:37 2010
Picon

Re: current-time on 32-bit hardware

Hi,

On Fri, Jul 30, 2010 at 9:13 PM, Felix
<felix <at> call-with-current-continuation.org> wrote:
> I propose to use flonums for timeout values. This makes the
> representation of srfi-18 "time" values simpler and removes any
> possibility of overflow. I don't think the performance impact is all
> that heavy.

Okay, thank you. One thing that still bothers me is the use of
gettimeofday inside the scheduler. I'm not sure everything will work
nicely if an NTP server (or root) sets the date to something in the
past. And then comes the problem of having a _portable_ way to
represent monotonic time...

> If you are adventurous, you can try out the "flonum-milliseconds"
> branch in the git repository, where I made all the necessary changes
> (quite a lot, in fact). Feedback would be great, since I don't have
> decent testing code for multithreading.

Thank you, I'll try it.

> Something will break, that's for sure, but I see no way around it.

Well, it's an experimental branch, after all ;-)

--

-- 
Nicolas
Felix | 2 Aug 23:07 2010

Re: Re: chicken-doc

From: Jim Ursetto <zbigniewsz <at> gmail.com>
Subject: [Chicken-users] Re: chicken-doc
Date: Fri, 30 Jul 2010 12:34:35 -0500

> Hi all.  Pre-built documentation tarballs are now being generated
> daily from the latest wiki documentation.  You can download and
> extract one, generally into your chicken-home directory, and you do
> not need chicken-doc-admin to do so.
> 

Great - works like a charm. Thank you, Jim!

cheers,
felix
Jeronimo Pellegrini | 3 Aug 22:03 2010

Printing circular lists

Hello,

In the REPL, the following:

(define a (list 1 2))
(set-cdr! a a)
a

shows some elements of a, then prints an ellipsis:

(a a a a a a a a ...

But "(print a)" enters an infinite loop (so does display and
pretty-print).

I was wondering how to get Chicken to print cyclic structures
using references to previous elements instead of looping, like
this, for example (this is what Gauche does on the REPL, and
what Guile's display implementation does):

 > a
 #0=(1 . #0#)

Is there some way to configure Chicken to do that? (I've searched
the wiki but found nothing)

Thanks!
J.
Taylor Venable | 3 Aug 23:38 2010
Picon

Re: Printing circular lists

On Tue, Aug 3, 2010 at 4:03 PM, Jeronimo Pellegrini <jpn <at> aleph0.info> wrote:
> I was wondering how to get Chicken to print cyclic structures
> using references to previous elements instead of looping, like
> this, for example (this is what Gauche does on the REPL, and
> what Guile's display implementation does):
>
>  > a
>  #0=(1 . #0#)
>
> Is there some way to configure Chicken to do that? (I've searched
> the wiki but found nothing)

If you're open to using a different method to do so, both the fmt and
srfi-38 eggs provide such a means via fmt and
write-with-shared-structure, respectively.

#;1> (use fmt)
; loading /opt/chicken/lib/chicken/5/fmt.import.so ...
; loading /opt/chicken/lib/chicken/5/srfi-1.import.so ...
; loading /opt/chicken/lib/chicken/5/srfi-13.import.so ...
; loading /opt/chicken/lib/chicken/5/srfi-69.import.so ...
; loading /opt/chicken/lib/chicken/5/extras.import.so ...
; loading /opt/chicken/lib/chicken/5/fmt.so ...
#;2> (define a (list 1 2))
#;3> (set-cdr! a a)
#;4> (fmt #f a)
"#0=(1 . #0#)"

#;1> (use srfi-38)
; loading /opt/chicken/lib/chicken/5/srfi-38.import.so ...
(Continue reading)

Christian Kellermann | 4 Aug 09:59 2010

Re: Printing circular lists

Hi there!

* Taylor Venable <taylor <at> metasyntax.net> [100803 23:39]:
> On Tue, Aug 3, 2010 at 4:03 PM, Jeronimo Pellegrini <jpn <at> aleph0.info> wrote:
> > I was wondering how to get Chicken to print cyclic structures
> > using references to previous elements instead of looping, like
> > this, for example (this is what Gauche does on the REPL, and
> > what Guile's display implementation does):
> >
> >  > a
> >  #0=(1 . #0#)
> >
> > Is there some way to configure Chicken to do that? (I've searched
> > the wiki but found nothing)
> 
> If you're open to using a different method to do so, both the fmt and
> srfi-38 eggs provide such a means via fmt and
> write-with-shared-structure, respectively.

Also note that csi's describe command will show you the circular
structure.  Maybe the notation is not the best atm but it seems not
many people use this anyway (maybe because out of ignorance of this
feature).

Kind regards,

Christian
Alex Shinn | 4 Aug 12:43 2010
Picon

Re: Printing circular lists

Taylor Venable <taylor <at> metasyntax.net> writes:

> If you're open to using a different method to do so, both
> the fmt and srfi-38 eggs provide such a means via fmt and
> write-with-shared-structure, respectively.

Note Chicken's SRFI-38 implementation also provides
`make-repl-support-shared-structure' to automatically print
results with `write-with-shared-structure':

$ csi -qR srfi-38
#;1> (make-repl-support-shared-structure)
#;2> (define a (list 1 2))
#;3> (set-cdr! a a)
#;4> a
#=0(1 . #0#)
#;5> 

--

-- 
Alex

Gmane