Felix Winkelmann | 1 Oct 07:44 2004

Re: Hashtable is behaving unexpectedly

Michael Erdmann wrote:
> Thanks,
> 
> i am realy sorry for this. I found i out my self in a quiet
> moment reading again the docu.
> 
> Any way i find the default value very strange since the
> typical use case will not be to put in the same object
> into the hashtable returning prevuously stored data for
> the same object.

If you use symbols (a common situation), eqv? (or eq?)
is sufficient and fast, since symbols are always unique.
It also works for numbers, but I agree that there is a slight
catch when strings are involved.

cheers,
felix
Felix Winkelmann | 1 Oct 07:46 2004

Re: CVS update

Alex Shinn wrote:
> At Wed, 29 Sep 2004 23:23:09 +0200, felix wrote:
> 
>>- added `C_post_gc_hook'
>>- manual: clarified blocking behaviour of I/O from ports returned by `process' [Thanks to Tim Reid]
>>- extended range of character codes from 16 to 21 bit
>>- declarations are also registered in files loaded at compile-time
>>- chicken-setup: added `-dont-ask' option
>>
>>Note: eggs can now safely override standard procedures by loading a file
>>with the required declarations ("(declare (not standard-binding ...))")
>>at compile time. I have changed the complex egg accordingly, to provide
>>an example.
> 
> 
> Thanks!  I've updated the utf8 unit accordingly and it now passes the
> tests when compiled with -O2.  I've also completed the Chicken extras
> and most of SRFI-13, and added documentation, but need a lot more
> tests.  SRFI-13 is really huge, and needs SRFI-14 for completeness so
> I may split these to a separate unit.

Indeed, SRFI-13 is big. And SRFI-14 would have to be completely
reimplemented: the current representation of charsets is rather naive.

> 
> Available at http://synthcode.com/scheme/utf8.scm
> 

Very good. I'll take a look when I'm on holiday (next week).
Thanks!
(Continue reading)

Sergey Khorev | 1 Oct 08:02 2004
Picon

Re: multilingual fowl

No doubts ;))

Also there is http://www.oksid.ch/fltk-utf/

--

-- 
Sergey Khorev
http://iamphet.nm.ru
Can anybody think of a good tagline I can steal?
Michael Erdmann | 1 Oct 09:41 2004
Picon

Expecption Handling with chicken

Dear all,

i am a little bit confused. The documentation i got together
with 1.66 says there is an execpteion handling available
according to srfi-12.
When i am calling (CURRENT-EXCEPTION-HANDLER) the function is not
known.
Do i need to install an extenstion first, but i can't find one at 
http://www.call-with-current-continuation.org/eggs/!

Michael
Felix Winkelmann | 1 Oct 10:35 2004

Re: Expecption Handling with chicken

Michael Erdmann wrote:
> Dear all,
> 
> i am a little bit confused. The documentation i got together
> with 1.66 says there is an execpteion handling available
> according to srfi-12.
> When i am calling (CURRENT-EXCEPTION-HANDLER) the function is not
> known.

Did you call "(CURRENT-EXCEPTION-HANDLER)" or "(current-exception-handler)"?
(Chicken is case sensitive)

cheers,
felix
Michael Erdmann | 1 Oct 17:12 2004
Picon

Re: Expecption Handling with chicken

Felix Winkelmann wrote:
> Michael Erdmann wrote:
> 
>> Dear all,
>>
>> i am a little bit confused. The documentation i got together
>> with 1.66 says there is an execpteion handling available
>> according to srfi-12.
>> When i am calling (CURRENT-EXCEPTION-HANDLER) the function is not
>> known.
> 
> 
> Did you call "(CURRENT-EXCEPTION-HANDLER)" or 
> "(current-exception-handler)"?
> (Chicken is case sensitive)
>
Thanks works.

The interface i a little bit funy but look very mutch
like the try...catch construct of java.

;; creating an intecepting an exception
(call-with-current-continuation
    (lambda (exit)
       (handle-exceptions exn
          (begin (put-line "Went wrong") (exit exn) )
          (put-line "Expression 1")
          (abort 'x)))
)

(Continue reading)

Michael Erdmann | 1 Oct 18:19 2004
Picon

Re: Parsing lists from external scheme intepreters

Chris Double wrote:
> On Thu, 30 Sep 2004 08:09:27 +0200, "Michael Erdmann"
> 
>>What happens, that print-hallo is never called if names is empty.
>>The result is a completly different trace fingerprint which does
>>not contain the print-hallo procedure at all. This is very confusing.
> 
> 
> I missed your original email but what you write above sounds similar to
> what is discussed in the following:
> 
> http://groups.google.com/groups?selm=7eb8ac3e.0312172046.6d817907%40posting.google.com
> http://groups.google.com/groups?selm=7eb8ac3e.0402131819.46d2bbb4%40posting.google.com
> http://okmij.org/ftp/Scheme/enumerators-callcc.html
> 
> Is the 'choice' you are talking about like 'amb'?
Yes this looks exactly like it. Unfortunatly i forgot to mention the 
term non deterministic computing.

Regards
    M.Erdmann

> 
> http://mitpress.mit.edu/sicp/full-text/sicp/book/node89.html
> 
> Chris.
Michael Erdmann | 2 Oct 08:51 2004
Picon

Q:Meaning of [ ] in the bb notes example?

Hallo,

what is the meaning of the [ ] in the let statement od the notes example
in bb extension.
In docu (sect. 5.2) it is mentioned as an alternative for ( ). But why 
has been used?

(define (change-title)
   (let ([i (bb:property item-list 'value)])
     (when (> i 0)
       (let* ([note (list-ref all-notes (sub1 i))]
	     [title (bb:get-input "Enter new title" (note-title note))] )
	(set! (bb:property (note-window note) 'text) title)
	(note-title-set! note title)
	(update-list) ) ) ) )	

Regards
    M.Erdmann
Thomas Chust | 2 Oct 16:58 2004
Picon

Re: Expecption Handling with chicken

Michael Erdmann wrote:
> [...]
> The interface i a little bit funy but look very mutch
> like the try...catch construct of java.
> 
> ;; creating an intecepting an exception
> (call-with-current-continuation
>    (lambda (exit)
>       (handle-exceptions exn
>          (begin (put-line "Went wrong") (exit exn) )
>          (put-line "Expression 1")
>          (abort 'x)))
> )
> 
> Java:
> 
> try {
>    Expression1
>    throw ..
> }
> catch(Exception e) {
> 
> }
> 
> I can even use vectors or records to build exception types. Fine! Only
> this  call-with-current-continuation is clumsy.
> [...]

If it's only the clumsy function name you dislike, you can write call/cc 
instead of call-with-current-continuation -- that's not R5RS but a very 
(Continue reading)

Michael Erdmann | 2 Oct 18:35 2004
Picon

Re: Expecption Handling with chicken

Thomas Chust wrote:
> Michael Erdmann wrote:
> 
>> [...]
>> The interface i a little bit funy but look very mutch
>> like the try...catch construct of java.
>>
>> ;; creating an intecepting an exception
>> (call-with-current-continuation
>>    (lambda (exit)
>>       (handle-exceptions exn
>>          (begin (put-line "Went wrong") (exit exn) )
>>          (put-line "Expression 1")
>>          (abort 'x)))
>> )
>>
>> Java:
>>
>> try {
>>    Expression1
>>    throw ..
>> }
>> catch(Exception e) {
>>
>> }
>>
>> I can even use vectors or records to build exception types. Fine! Only
>> this  call-with-current-continuation is clumsy.
>> [...]
> 
(Continue reading)


Gmane