[Chicken-users] another proposal to modify runtime.c

2011-09-28 Thread Jörg F . Wittenberger
I can't resist to propose another minor code improvement. For this one I even recall where I learned the trick: early in my CS studies, we been taken to analyse how we could do better than the straight forward implementation of double linked lists. (Which would be the implementation of e.g., the

[Chicken-users] severe bug in file-exists?

2011-09-28 Thread Sven Hartrumpf
Hi all. I have just lost some files (fortunately, they can be restored somehow) because file-exists? returned #f for large files ( 2 GB). Version: CHICKEN (c)2008-2011 The Chicken Team (c)2000-2007 Felix L. Winkelmann Version 4.7.4 (rev b6eba65) linux-unix-gnu-x86 [ manyargs dload ] compiled

Re: [Chicken-users] severe bug in file-exists?

2011-09-28 Thread Christian Kellermann
* Sven Hartrumpf hartru...@gmx.net [110928 14:57]: Hi all. I have just lost some files (fortunately, they can be restored somehow) because file-exists? returned #f for large files ( 2 GB). I am sorry to hear that. This seems to be an issue with 32bit chickens. Thanks for the report, I hope

Re: [Chicken-users] severe bug in file-exists?

2011-09-28 Thread Sven Hartrumpf
Hi Christian. Wed, 28 Sep 2011 15:10:46 +0200, ckeen wrote: I have just lost some files I hope the data is not lost completely. No, it can be recovered automatically :-) I have filed bug #706 in the tracker. https://bugs.call-cc.org/ticket/706 Thanks for filing the bug. Looking at

Re: [Chicken-users] severe bug in file-exists?

2011-09-28 Thread Christian Kellermann
* Sven Hartrumpf hartru...@gmx.net [110928 15:38]: Hi Christian. Wed, 28 Sep 2011 15:10:46 +0200, ckeen wrote: I have just lost some files I hope the data is not lost completely. No, it can be recovered automatically :-) I have filed bug #706 in the tracker.

Re: [Chicken-users] severe bug in file-exists?

2011-09-28 Thread Sven Hartrumpf
Wed, 28 Sep 2011 15:40:57 +0200, ckeen wrote: As I see it, this procedure needs an overhaul anyway. If fstat fails it returns #f regardless the reason. On IRC we have been coming to the understanding that we should raise an I/O exception for all other cases (if the fstat fails for other

Re: [Chicken-users] another proposal to modify runtime.c

2011-09-28 Thread Alan Post
On Wed, Sep 28, 2011 at 01:41:03PM +0200, Jörg F. Wittenberger wrote: I can't resist to propose another minor code improvement. For this one I even recall where I learned the trick: early in my CS studies, we been taken to analyse how we could do better than the straight forward

Re: [Chicken-users] severe bug in file-exists?

2011-09-28 Thread Thomas Chust
2011/9/28 Christian Kellermann ck...@pestilenz.org: [...] As I see it, this procedure needs an overhaul anyway. If fstat fails it returns #f regardless the reason. [...] Hello, while it is true that only an ENOENT errno indicates a missing path component in any file system operation, I also

Re: [Chicken-users] another proposal to modify runtime.c

2011-09-28 Thread John Cowan
Jörg F. Wittenberger scripsit: One consideration is: as it is now, it works quite well. But I see more simplifications ahead. Maybe it's the best to integrate the well tested state of affairs now and have me tampering later. Yes, please take this alternative. Nothing should get integrated

Re: [Chicken-users] severe bug in file-exists?

2011-09-28 Thread John Cowan
Sven Hartrumpf scripsit: (file-exists? filename) Filename must be a string. The file-exists? procedure returns #t if the named file exists at the time the procedure is called, #f otherwise. Since nothing is said about exceptions, you are free to throw one if you cannot determine the answer.

[Chicken-users] EINTR with self-pipe signal trampoline

2011-09-28 Thread Alan Post
Below is a test case for a problem I'm seeing in some multi-process code I'm writing. I'm getting the error: Error: (file-read) cannot read from file - Interrupted system call because a signal handler is going off while my main thread is in an iowait state. In C, I have always handled this

Re: [Chicken-users] two minor tweaks to runtime.c

2011-09-28 Thread Alex Shinn
On Wed, Sep 28, 2011 at 4:29 AM, Alan Post alanp...@sunflowerriver.org wrote: I don't have enough data to say that it matters in this case, but in principle it surely does. In theory, theory and practice are the same. In practice, they're different. The problem here specifically is the lack

Re: [Chicken-users] two minor tweaks to runtime.c

2011-09-28 Thread Alan Post
Will you show me this data for the current implementation? -Alan On Thu, Sep 29, 2011 at 10:30:00AM +0900, Alex Shinn wrote: On Wed, Sep 28, 2011 at 4:29 AM, Alan Post alanp...@sunflowerriver.org wrote: I don't have enough data to say that it matters in this case, but in principle it

Re: [Chicken-users] two minor tweaks to runtime.c

2011-09-28 Thread Alan Post
On Thu, Sep 29, 2011 at 12:09:19PM +0900, Alex Shinn wrote: On Thu, Sep 29, 2011 at 11:40 AM, Alan Post alanp...@sunflowerriver.org wrote: Will you show me this data for the current implementation? The first implementation doesn't need to justify itself, just be working. *nods* How

Re: [Chicken-users] two minor tweaks to runtime.c

2011-09-28 Thread Alex Shinn
On Thu, Sep 29, 2011 at 12:25 PM, Alan Post alanp...@sunflowerriver.org wrote: How did irregex, which by account is slower, replace the existing regex code? I didn't make the call, but as I understand that was motivated by portability concerns, simplifying the Chicken distribution, and

Re: [Chicken-users] two minor tweaks to runtime.c

2011-09-28 Thread Alan Post
On Thu, Sep 29, 2011 at 12:33:41PM +0900, Alex Shinn wrote: On Thu, Sep 29, 2011 at 12:25 PM, Alan Post alanp...@sunflowerriver.org wrote: How did irregex, which by account is slower, replace the existing regex code? I didn't make the call, but as I understand that was motivated by

Re: [Chicken-users] two minor tweaks to runtime.c

2011-09-28 Thread Toby Thain
On 28/09/11 11:33 PM, Alex Shinn wrote: On Thu, Sep 29, 2011 at 12:25 PM, Alan Postalanp...@sunflowerriver.org wrote: How did irregex, which by account is slower, replace the existing regex code? I didn't make the call, but as I understand that was motivated by portability concerns,

[Chicken-users] difference between ##sys#error and posix-error?

2011-09-28 Thread Alan Post
Looking at posixunix.scm, I find that some error messages are produced with ##sys#error, and others with posix-error. What distinguishes these two routines? Why would I use one but not the other? -Alan -- .i ma'a lo bradi cu penmi gi'e du ___