1 Aug 2010 02:32
1 Aug 2010 05:48
Re: getting to grips with multimethods
John Cowan <cowan <at> mercury.ccil.org>
2010-08-01 03:48:00 GMT
2010-08-01 03:48:00 GMT
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>
1 Aug 2010 21:07
minor build warning (twice) : runtime.c
John Gabriele <jmg3000 <at> gmail.com>
2010-08-01 19:07:47 GMT
2010-08-01 19:07:47 GMT
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
1 Aug 2010 22:48
Re: minor build warning (twice) : runtime.c
Thomas Chust <chust <at> web.de>
2010-08-01 20:48:38 GMT
2010-08-01 20:48:38 GMT
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 itCiao, Thomas -- -- When C++ is your hammer, every problem looks like your thumb.
2 Aug 2010 06:37
Re: current-time on 32-bit hardware
Nicolas Pelletier <sxatrxtfxcrwamvjkaga <at> gmail.com>
2010-08-02 04:37:05 GMT
2010-08-02 04:37:05 GMT
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
2 Aug 2010 23:07
Re: Re: chicken-doc
Felix <felix <at> call-with-current-continuation.org>
2010-08-02 21:07:31 GMT
2010-08-02 21:07:31 GMT
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
3 Aug 2010 22:03
Printing circular lists
Jeronimo Pellegrini <jpn <at> aleph0.info>
2010-08-03 20:03:56 GMT
2010-08-03 20:03:56 GMT
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.
3 Aug 2010 23:38
Re: Printing circular lists
Taylor Venable <taylor <at> metasyntax.net>
2010-08-03 21:38:31 GMT
2010-08-03 21:38:31 GMT
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)
4 Aug 2010 09:59
Re: Printing circular lists
Christian Kellermann <ckeen <at> pestilenz.org>
2010-08-04 07:59:26 GMT
2010-08-04 07:59:26 GMT
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
4 Aug 2010 12:43
Re: Printing circular lists
Alex Shinn <alexshinn <at> gmail.com>
2010-08-04 10:43:20 GMT
2010-08-04 10:43:20 GMT
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
Best Wishes,
Kon
RSS Feed