Re: Q about interrupt and catch

2017-06-12 Thread Alex Vong
"Mike Gran" writes: > Hi all, > > This is probably a simple question, but, I can't figure it out. > > I have a program with a big main loop like this > > (while #t > (let ((c (read-char port))) >(cond > ... many different possible operations, depending on c > ))) > > I want to make i

Re: Multiple values passed as single argument to procedure

2017-06-12 Thread Mark H Weaver
Mark H Weaver writes: > The reason that (f) is not in tail position with respect to (list (f)) > is because there is still something left to do after calling (f) but > before invoking the continuation of (list (f)). The thing remaining to > do is to apply 'list' to the returned value. > > Puttin

Re: Multiple values passed as single argument to procedure

2017-06-12 Thread Mark H Weaver
In the discussion about continuation passing style, I forgot to explain the semantics of when and how Guile discards extra return values. It's very simple: I wrote: > Here's what (lambda () (list (f 1) (f 2) (f 3))) looks like in CPS, > using the same evaluation order as I chose above: > > (lam

Re: Multiple values passed as single argument to procedure

2017-06-12 Thread Mark H Weaver
David Kastrup writes: > Mark H Weaver writes: > >> I'm sorry David, but _everything_ that you wrote below is incorrect. > > Well, let me try again. It's not all that easy to understand. You're obviously quite intelligent and knowledgeable, so it's probably my failure to explain it well more th

Re: Guile 2.2 Debian packages

2017-06-12 Thread Alex Vong
Hi Tommi, Tommi Höynälänmaa writes: > Hello > > Where can I find Guile 2.2 Debian packages for the amd64 architecture > (Intel)? > > Where can I find the Debian files (subdirectory debian) for the Guile > 2.2 source package? > > - Tommi Höynälänmaa A Debian package search[0] suggests Guile

Re: Multiple values passed as single argument to procedure

2017-06-12 Thread David Kastrup
Mark H Weaver writes: > I'm sorry David, but _everything_ that you wrote below is incorrect. Well, let me try again. It's not all that easy to understand. > David Kastrup writes: > >> Chris Marusich writes: >> >>> I think I'm missing something here. In (list (f)), the call to f >>> certainl

Re: type friction C <-> scheme

2017-06-12 Thread Matt Wette
> On Jun 12, 2017, at 1:00 AM, David Pirotte wrote: > > Hello Matt > >> ;; "FreeXL_CellValue" >> >> ;; typedef struct FreeXL_CellValue_str FreeXL_CellValue; >> (define-std-pointer-wrapper FreeXL_CellValue*) >> ... > > Your ffi-help, snarf *.h is a nice project, but it would be, maybe, > inte

Guile 2.2 Debian packages

2017-06-12 Thread Tommi Höynälänmaa
Hello Where can I find Guile 2.2 Debian packages for the amd64 architecture (Intel)? Where can I find the Debian files (subdirectory debian) for the Guile 2.2 source package? - Tommi Höynälänmaa

Re: Multiple values passed as single argument to procedure

2017-06-12 Thread Mark H Weaver
I'm sorry David, but _everything_ that you wrote below is incorrect. David Kastrup writes: > Chris Marusich writes: > >> I think I'm missing something here. In (list (f)), the call to f >> certainly looks like it's happening at a position that one might >> intuitively call a "tail" position. >

Re: Multiple values passed as single argument to procedure

2017-06-12 Thread Neil Jerram
On 12/06/17 09:55, Neil Jerram wrote: On 12/06/17 09:19, Chris Marusich wrote: I think I'm missing something here. In (list (f)), the call to f certainly looks like it's happening at a position that one might intuitively call a "tail" position. So, in this case, what disqualifies f from being i

Re: Multiple values passed as single argument to procedure

2017-06-12 Thread David Kastrup
Chris Marusich writes: > I think I'm missing something here. In (list (f)), the call to f > certainly looks like it's happening at a position that one might > intuitively call a "tail" position. It is, but list does not take multiple values and thus discards additional values returned by f. If

Re: Multiple values passed as single argument to procedure

2017-06-12 Thread Neil Jerram
On 12/06/17 09:19, Chris Marusich wrote: I think I'm missing something here. In (list (f)), the call to f certainly looks like it's happening at a position that one might intuitively call a "tail" position. So, in this case, what disqualifies f from being in tail position? Can you give me an ex

Re: Q about interrupt and catch

2017-06-12 Thread Thien-Thi Nguyen
() "Mike Gran" () Sun, 11 Jun 2017 10:50:49 -0700 I want to make it so, when the program receives a SIGINT, it aborts the operation in progress and restarts this big main loop. Use ‘sigaction’ and a periodic check. For example: foo Description: application/scheme This does not res

Re: Multiple values passed as single argument to procedure

2017-06-12 Thread Chris Marusich
Hi Mark, Regarding the Guile-specific behavior where passing multiple values as an argument to a procedure causes only the first value to be used as the argument: > I would recommend against relying on this behavior, mainly because I > would consider it a bit sloppy. However, I also think it's v

Re: type friction C <-> scheme

2017-06-12 Thread David Pirotte
Hello Matt > ;; "FreeXL_CellValue" > > ;; typedef struct FreeXL_CellValue_str FreeXL_CellValue; > (define-std-pointer-wrapper FreeXL_CellValue*) > ... Your ffi-help, snarf *.h is a nice project, but it would be, maybe, interesting that you look at a way to 'schemefy' names, like it's done for g