* read-header procedure of (web http) module has a bug?
@ 2012-04-24 23:09 Sunjoong Lee
2012-04-24 23:17 ` Noah Lavine
0 siblings, 1 reply; 7+ messages in thread
From: Sunjoong Lee @ 2012-04-24 23:09 UTC (permalink / raw)
To: guile-user
[-- Attachment #1: Type: text/plain, Size: 129 bytes --]
Hello,
I wonder I found a bug;
read-header procedure use parse-header procedure but parse-header is
defined after read-header!!
[-- Attachment #2: Type: text/html, Size: 182 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: read-header procedure of (web http) module has a bug?
2012-04-24 23:09 read-header procedure of (web http) module has a bug? Sunjoong Lee
@ 2012-04-24 23:17 ` Noah Lavine
2012-04-24 23:43 ` Sunjoong Lee
0 siblings, 1 reply; 7+ messages in thread
From: Noah Lavine @ 2012-04-24 23:17 UTC (permalink / raw)
To: Sunjoong Lee; +Cc: guile-user
Hello,
That's actually perfectly legal. The procedure definitions at the top
level of a module can all call each other.
(This also applies to all of the procedures inside a 'let' or similar.)
Noah
On Tue, Apr 24, 2012 at 7:09 PM, Sunjoong Lee <sunjoong@gmail.com> wrote:
> Hello,
>
> I wonder I found a bug;
> read-header procedure use parse-header procedure but parse-header is defined
> after read-header!!
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: read-header procedure of (web http) module has a bug?
2012-04-24 23:17 ` Noah Lavine
@ 2012-04-24 23:43 ` Sunjoong Lee
2012-04-24 23:52 ` Noah Lavine
0 siblings, 1 reply; 7+ messages in thread
From: Sunjoong Lee @ 2012-04-24 23:43 UTC (permalink / raw)
To: Noah Lavine; +Cc: guile-user
[-- Attachment #1: Type: text/plain, Size: 633 bytes --]
Thanks Noah.
2012/4/25 Noah Lavine <noah.b.lavine@gmail.com>
> Hello,
>
> That's actually perfectly legal. The procedure definitions at the top
> level of a module can all call each other.
>
> (This also applies to all of the procedures inside a 'let' or similar.)
I see. You mean the procedures of the same level can call each other. Right?
I have another question; What if the macro case?
Suppose there is a procedure to use another macro and definition of the
macro is after the procedure, is it illegal?
Oh, another one; each procedure call of the same level is legal on other
language like Chicken? I'm confused.
Thanks.
[-- Attachment #2: Type: text/html, Size: 1085 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: read-header procedure of (web http) module has a bug?
2012-04-24 23:43 ` Sunjoong Lee
@ 2012-04-24 23:52 ` Noah Lavine
2012-04-25 0:07 ` Sunjoong Lee
2012-04-25 23:57 ` Sunjoong Lee
0 siblings, 2 replies; 7+ messages in thread
From: Noah Lavine @ 2012-04-24 23:52 UTC (permalink / raw)
To: Sunjoong Lee; +Cc: guile-user
Hello,
> I see. You mean the procedures of the same level can call each other. Right?
Yes, that's right. And procedures at one level can always call to
procedures at a higher level, but not the other way around.
> I have another question; What if the macro case?
> Suppose there is a procedure to use another macro and definition of the
> macro is after the procedure, is it illegal?
Good question. I don't know the answer to that.
> Oh, another one; each procedure call of the same level is legal on other
> language like Chicken? I'm confused.
Yes, I think this should be legal in all Scheme implementations,
including Guile and Chicken.
I hope this helps.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: read-header procedure of (web http) module has a bug?
2012-04-24 23:52 ` Noah Lavine
@ 2012-04-25 0:07 ` Sunjoong Lee
2012-04-25 0:12 ` Noah Lavine
2012-04-25 23:57 ` Sunjoong Lee
1 sibling, 1 reply; 7+ messages in thread
From: Sunjoong Lee @ 2012-04-25 0:07 UTC (permalink / raw)
To: Noah Lavine; +Cc: guile-user
[-- Attachment #1: Type: text/plain, Size: 1016 bytes --]
It's very pleasure to know something new.
2012/4/25 Noah Lavine <noah.b.lavine@gmail.com>
>
> Yes, that's right. And procedures at one level can always call to
> procedures at a higher level, but not the other way around.
I understood.
> > I have another question; What if the macro case?
> > Suppose there is a procedure to use another macro and definition of the
> > macro is after the procedure, is it illegal?
>
> Good question. I don't know the answer to that.
>
I think it illegal; you know, I groused about the definition order
of test-apply procedure and test-with-runner macro to Per.
> Oh, another one; each procedure call of the same level is legal on other
> > language like Chicken? I'm confused.
>
> Yes, I think this should be legal in all Scheme implementations,
> including Guile and Chicken.
>
Very confused; I saw many compile errors and it disappeared after
re-ordering definitions on Chicken. But this is not a Guile problem.
> I hope this helps.
>
Very helpful and thank you again.
[-- Attachment #2: Type: text/html, Size: 1902 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: read-header procedure of (web http) module has a bug?
2012-04-25 0:07 ` Sunjoong Lee
@ 2012-04-25 0:12 ` Noah Lavine
0 siblings, 0 replies; 7+ messages in thread
From: Noah Lavine @ 2012-04-25 0:12 UTC (permalink / raw)
To: Sunjoong Lee; +Cc: guile-user
>> > Oh, another one; each procedure call of the same level is legal on other
>> > language like Chicken? I'm confused.
>>
>> Yes, I think this should be legal in all Scheme implementations,
>> including Guile and Chicken.
>
>
> Very confused; I saw many compile errors and it disappeared after
> re-ordering definitions on Chicken. But this is not a Guile problem.
Then either I am wrong or Chicken does not follow the standard right
now. I don't know which.
Noah
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: read-header procedure of (web http) module has a bug?
2012-04-24 23:52 ` Noah Lavine
2012-04-25 0:07 ` Sunjoong Lee
@ 2012-04-25 23:57 ` Sunjoong Lee
1 sibling, 0 replies; 7+ messages in thread
From: Sunjoong Lee @ 2012-04-25 23:57 UTC (permalink / raw)
To: guile-user
[-- Attachment #1: Type: text/plain, Size: 842 bytes --]
This is not a question; are examples. Yesterday, Noah gave me an answer and
I tanks.
2012/4/25 Noah Lavine <noah.b.lavine@gmail.com>
>
> Yes, that's right. And procedures at one level can always call to
> procedures at a higher level, but not the other way around.
;;; filename: called1.scm
(define (calling arg) (called arg))
(define (called arg) arg)
(display (calling 10))
(newline)
> Suppose there is a procedure to use another macro and definition of the
> > macro is after the procedure, is it illegal?
>
> Good question. I don't know the answer to that.
;;; filename: called2.scm
(define-syntax called (syntax-rules () ((_ arg) arg)))
(define (calling arg) (called arg))
(display (calling 10))
(newline)
In called1.scm, the order of calling and called are not a problem.
In called2.scm, called should be defined before calling.
[-- Attachment #2: Type: text/html, Size: 1497 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-04-25 23:57 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-24 23:09 read-header procedure of (web http) module has a bug? Sunjoong Lee
2012-04-24 23:17 ` Noah Lavine
2012-04-24 23:43 ` Sunjoong Lee
2012-04-24 23:52 ` Noah Lavine
2012-04-25 0:07 ` Sunjoong Lee
2012-04-25 0:12 ` Noah Lavine
2012-04-25 23:57 ` Sunjoong Lee
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).