Re: Question about an error with ports

2022-03-11 Thread Chris Vine
On Sat, 12 Mar 2022 00:10:36 + Chris Vine wrote: > On Fri, 11 Mar 2022 20:49:53 +0100 > Maxime Devos wrote: > > Chris Vine schreef op vr 11-03-2022 om 18:13 [+]: > > > code has changed.  I have yet to re-equip my tests to test the write and > > > display procedures, > > > > Those aren't

Re: Question about an error with ports

2022-03-11 Thread Chris Vine
On Fri, 11 Mar 2022 20:49:53 +0100 Maxime Devos wrote: > Chris Vine schreef op vr 11-03-2022 om 18:13 [+]: > > code has changed.  I have yet to re-equip my tests to test the write and > > display procedures, > > Those aren't rewritten in Scheme (yet?). I believe not. Unfortunately this kind

Re: Question about an error with ports

2022-03-11 Thread Maxime Devos
Chris Vine schreef op vr 11-03-2022 om 18:13 [+]: > Interestingly the read procedure remains unsafe in guile-2.2.6, but > seems to be safe in guile-3.0.8 even though I cannot see what in the This is probably due to the rewrite of the 'read' procedure in Scheme (see module/ice-9/read.scm (canno

Re: Question about an error with ports

2022-03-11 Thread Maxime Devos
Chris Vine schreef op vr 11-03-2022 om 18:13 [+]: > code has changed.  I have yet to re-equip my tests to test the write and > display procedures, Those aren't rewritten in Scheme (yet?). Greetings, Maxime. signature.asc Description: This is a digitally signed message part

Re: Question about an error with ports

2022-03-11 Thread Chris Vine
On Fri, 11 Mar 2022 17:26:50 + Chris Vine wrote: > Notable procedures which it appears remain as non-suspendable are > get-bytevector-all, get-string-n, read, write and display, but to be > sure about the first two of those I would also need to read the source > again. A few years ago I had s

Re: Question about an error with ports

2022-03-11 Thread Olivier Dion via General Guile related discussions
On Fri, 11 Mar 2022, Chris Vine wrote: > On Fri, 11 Mar 2022 09:58:59 -0500 > Olivier Dion wrote: >> I'm not sure this is related to the functions themself but instead the >> underlying filedescriptor opened iwth ON_NONBLOCK? > > The problem I am referring to is different: it is that delimited >

Re: Question about an error with ports

2022-03-11 Thread Chris Vine
On Fri, 11 Mar 2022 09:58:59 -0500 Olivier Dion wrote: > On Fri, 11 Mar 2022, Chris Vine wrote: [snip] > > Avoid using get-bytevector-n!, get-bytevector-some and > > get-bytevector-all if you are going to use something like fibers or > > some other asynchronous i/o, as those procedures are not su

Re: Question about an error with ports

2022-03-11 Thread Olivier Dion via General Guile related discussions
On Fri, 11 Mar 2022, Maxime Devos wrote: > Olivier Dion via General Guile related discussions schreef op do 10-03- > 2022 om 18:46 [-0500]: >> I haven't check the implementation details, but I think it's just a >> question of buffering.  `get-bytevector-n` will block just like >> `get-bytevector-s

Re: Question about an error with ports

2022-03-11 Thread Olivier Dion via General Guile related discussions
On Fri, 11 Mar 2022, Chris Vine wrote: > On Thu, 10 Mar 2022 18:46:34 -0500 > Olivier Dion via General Guile related discussions > wrote: >> On Thu, 10 Mar 2022, Zelphir Kaltstahl wrote: >> >> > Just one question: Why is get-bytevector-some better than >> > get-bytevector-n and specifying a num

Re: Question about an error with ports

2022-03-11 Thread Maxime Devos
Olivier Dion via General Guile related discussions schreef op do 10-03- 2022 om 18:46 [-0500]: > I haven't check the implementation details, but I think it's just a > question of buffering.  `get-bytevector-n` will block just like > `get-bytevector-some` when the port is empty.  The former will ret

Re: Question about an error with ports

2022-03-11 Thread Chris Vine
On Thu, 10 Mar 2022 18:46:34 -0500 Olivier Dion via General Guile related discussions wrote: > On Thu, 10 Mar 2022, Zelphir Kaltstahl wrote: > > > Just one question: Why is get-bytevector-some better than > > get-bytevector-n and specifying a number of bytes? > > I haven't check the implementat

Re: Question about an error with ports

2022-03-10 Thread Olivier Dion via General Guile related discussions
On Thu, 10 Mar 2022, Zelphir Kaltstahl wrote: > Just one question: Why is get-bytevector-some better than > get-bytevector-n and specifying a number of bytes? I haven't check the implementation details, but I think it's just a question of buffering. `get-bytevector-n` will block just like `get-

Re: Question about an error with ports

2022-03-10 Thread Zelphir Kaltstahl
Hello Olivier! On 3/10/22 16:05, Olivier Dion wrote: On Thu, 10 Mar 2022, Zelphir Kaltstahl wrote: I have the following questions: (1) Is the read-from-write-to procedure useful at all, or is there a better way to get all stuff from an input port and output it to an output port, avoiding pos

Re: Question about an error with ports

2022-03-10 Thread Olivier Dion via General Guile related discussions
On Thu, 10 Mar 2022, Zelphir Kaltstahl wrote: > I have the following questions: > > (1) Is the read-from-write-to procedure useful at all, or is there a better > way > to get all stuff from an input port and output it to an output port, avoiding > possibly large string values? On Linux, there