Michal Maruška | 5 Nov 2004 03:13
Picon

bug in util.toposort


topological-sort doesn't raise an exception, if there is a cycle, but some
"minimal element" exists.

demo:

(topological-sort
 '((1)
   (2 3)
   (3 2)))
=> (1)

A quick fix might be:

  (traverse)
+ (unless (eqv? (length result) (length nodes)) (error "graph has circular dependency" nodes result
(length result) (length nodes)))
  (reverse result))

-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
Michael Campbell | 10 Nov 2004 04:01

infinite loop in class redefinition under certain circumstances

Gauche 0.8.1 (and likely others) goes into an infinite loop when all
of the following are true:

1. Some class, <A>, is defined.
2. <A> has at least one slot with an accessor method.
3. Two or more subclasses <B> and <C> are defined with <A> as their
   superclass.

and the following steps are taken:

1. <A>'s definition is evaluated.
2. <B>'s and <C>'s definitions are evaluated.
3. <A>'s definition is re-evaluated.

Example:

-------
  gosh> (define-class <a> () ((slot :accessor get-slot)) )
  <a>
  gosh> (define-class <b> (<a>) () )
  <b>
  gosh> (define-class <c> (<a>) () )
  <c>
  gosh> (define-class <a> () ((slot :accessor get-slot)) )

   ... [infinite loop] ...

-------

If <A> has fewer than two subclasses,
(Continue reading)

Shiro Kawai | 11 Nov 2004 03:09
Favicon

Re: infinite loop in class redefinition under certain circumstances

Mike, thanks for reporting.
The following patch should fix it.  There may be
some offset from 0.8.1's class.c; it's in Scm_DeleteMethod().

--shiro

Index: src/class.c
===================================================================
RCS file: /cvsroot/gauche/Gauche/src/class.c,v
retrieving revision 1.115
diff -u -r1.115 class.c
--- src/class.c	10 Oct 2004 09:52:09 -0000	1.115
+++ src/class.c	11 Nov 2004 02:07:42 -0000
 <at>  <at>  -2390,6 +2390,7  <at>  <at> 
                     method->generic = NULL;
                     break;
                 }
+                mp = SCM_CDR(mp);
             }
         }
     }

-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
Shiro Kawai | 13 Nov 2004 01:11
Favicon

www.cgi --- API change in 0.8.2

This is a head-up notice for those using rfc.mime and
the file uploading feature of www.cgi (which uses rfc.mime).

If you're not using rfc.mime's mime-parse-message, mime-body-≥string
or mime-body-≥file, or passing procedure in the PART-HANDLERS
of cgi-parse-parameters, then your code isn't affected by this change.

It was reported that there was a serious bug in rfc.mime that
cannot handle MIME body of non-encoded binary data.  It 
generally doesn't occur in mail messages, but many Web browsers
include non-encoded binary data when they upload files by
POST method.

The original approach of rfc.mime is to pass a 'reader' procedure
down to each MIME handler, and that reader procedure recognizes
MIME part boundary.  Unfortunately, this assumes all the input
can be line-oriented, and doesn't go well along binary data.

Belated but finally coming Gauche 0.8.2 has procedural ports,
with which you can customize port's behavior in Scheme.  And
I'm rewriting rfc.mime using a special procedural port that
returns EOF when it reaches MIME boundary.  So in the new
version MIME handler won't take 'reader' procedure, but only
a port, from which the handler can simply read until EOF.

--shiro

-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
(Continue reading)

Grzegorz Chrupała | 13 Nov 2004 16:19
Picon
Gravatar

www.cgi --- API change in 0.8.2

Hi,
 BTW, one feature I have missed from file upload support in Gauche is
easier access to the original filename (on the client). Currently this
information is discarded unless one uses a custom procedure to handle
uploaded contents.
--

-- 
Grzegorz Chrupała | http://pithekos.net

-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
Michal Maruška | 17 Nov 2004 03:47
Picon

md5 inefficient (patch)


I've got to use md5, and this is my improvement:
(Gauche-0.8.1/ext/digest/md5.stub:)

* Using Scm_GetStringConst is much faster than Scm_GetString.

* Also, using block I/O with u-vectors speeds up

patch at  http://maruska.dyndns.org/comp/packages/gauche-md5.patch

-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
Shiro Kawai | 18 Nov 2004 05:26
Favicon

Re: md5 inefficient (patch)

Thanks, Michal.

I'll take a look at it, and if possible I'll include it in
0.8.2 release.

--shiro

-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
Shiro Kawai | 18 Nov 2004 05:28
Favicon

www.cgi --- API change in 0.8.2

That makes sense.  Probably I can add a predefined action,
along the existing 'ignore and 'file, that preserves the
client's filename.

--shiro

From: Grzegorz Chrupała <pitekus <at> gmail.com>
Subject: Re: [Gauche-devel] rfc.mime and www.cgi --- API change in 0.8.2
Date: Sat, 13 Nov 2004 16:19:12 +0100

> Hi,
>  BTW, one feature I have missed from file upload support in Gauche is
> easier access to the original filename (on the client). Currently this
> information is discarded unless one uses a custom procedure to handle
> uploaded contents.
> -- 
> Grzegorz Chrupała | http://pithekos.net
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: InterSystems CACHE
> FREE OODBMS DOWNLOAD - A multidimensional database that combines
> robust object and relational technologies, making it a perfect match
> for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
> _______________________________________________
> Gauche-devel mailing list
> Gauche-devel <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gauche-devel
> 

(Continue reading)

Shiro Kawai | 30 Nov 2004 05:50
Favicon

Gauche-0.8.2

Release 0.8.2 is out.   This is a major feature enhancement release.

Executive summary:

- Supports condition system (srfi-35).
- Source code encoding is detected by "magic comment" (like Python).
- Virtual ports are added.
- rfc.mime and File uploading feature of www.cgi and are fixed.

For the list of detailed changes, see the News page:

http://www.shiro.dreamhost.com/scheme/gauche/index.html

Enjoy.

--shiro

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
Shiro Kawai | 30 Nov 2004 06:31
Favicon

Windows native Gauche

For those who have to work on Windows, there is a pre-compiled
Windows binary, using MinGW:

http://www.shiro.dreamhost.com/scheme/vault/Gauche-mingw-0.8.2.zip

Just extract the archive to some directory, and run Gauche\bin\gosh.

Support of windows-native Gauche is still at very early stage,
and you'll find many features are missing.  Your feedback is welcome.

To build windows-native version, you need Cygwin and MinGW, _and_
the latest Gauche compiled and installed for Cygwin.  
See doc/mingw-memo.txt in the source tree.  You can reproduce
the zip archive from CVS source tree, by typing ./DIST mingw
(The DIST script contains references to MinGW installation directory
and Cygwin version of gosh.  Modify them to suit to your environment.)

--shiro

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/

Gmane