Google Groups Home
Help | Sign in
Terminology: Thunking vs Quoting
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  9 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Scott Prouty  
View profile
 More options Apr 2 2007, 4:09 pm
From: "Scott Prouty" <scott.pro...@solimarsystems.com>
Date: Mon, 02 Apr 2007 13:09:23 -0700
Local: Mon, Apr 2 2007 4:09 pm
Subject: Terminology: Thunking vs Quoting
I saw the discussion at LtU (http://lambda-the-ultimate.org/node/
2166), but I am replying here since I do not have any PLT to share on
the issue.  But, just from an end user perspective, here are some
ideas for renaming "quote":

"const" - This will let users see either "constant" or "constantly"
however they prefer.

"constf" - For me, this is more connotative of what it does, i.e.
"constant function".

"fconv" - OK, the seemingly more accurate "function that returns a
constant value".

Anyway, I do agree that "thunk" just doesn't conjure up a good picture
of what the function does (at least to a non-langauge designer).

Thanks!
Scott Prouty


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christopher Diggins  
View profile
 More options Apr 3 2007, 3:26 pm
From: "Christopher Diggins" <cdigg...@gmail.com>
Date: Tue, 3 Apr 2007 12:26:26 -0700
Local: Tues, Apr 3 2007 3:26 pm
Subject: Re: Terminology: Thunking vs Quoting
Thanks for your ideas Scott. What do you think of leaving it the name
quote? I was also playing with "qv" which stands for "quote value".

On 4/2/07, Scott Prouty <scott.pro...@solimarsystems.com> wrote:

--
http://www.cdiggins.com

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Scott Prouty  
View profile
 More options Apr 4 2007, 3:23 pm
From: "Scott Prouty" <scott.pro...@solimarsystems.com>
Date: Wed, 04 Apr 2007 12:23:00 -0700
Subject: Re: Terminology: Thunking vs Quoting

I kind of like "qv".  When I encountered just "quote", it made me
think of
what "quote" meant in other langauges and I tried to reconcile its
meaning
from other languages with how it is used in Cat.  "qv" on the other
hand
seems to have no equivalent in other languages (at least the few I
know of)
and so no "baggage" gets attached.

However, maybe "quote" in other function composition languages has the
same meaning as the one in Cat, so using "quote" may be the best
way to go.

Thanks
Scott Prouty

On Apr 3, 12:26 pm, "Christopher Diggins" <cdigg...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christopher Diggins  
View profile
 More options Apr 4 2007, 6:42 pm
From: "Christopher Diggins" <cdigg...@gmail.com>
Date: Wed, 4 Apr 2007 15:42:02 -0700
Local: Wed, Apr 4 2007 6:42 pm
Subject: Re: Terminology: Thunking vs Quoting
On 4/4/07, Scott Prouty <scott.pro...@solimarsystems.com> wrote:

> I kind of like "qv".   When I encountered just "quote", it made me
> think of what "quote" meant in other langauges and I tried to reconcile its
> meaning

Out of curiosity, what are the different interpretations you can think
of for the following statements given your previous experience of
quote:

5 quote
[f] quote

To be honest I never learned a "quote" operator in any other language
prior to adding it to Cat and asking the question. I come from a
primarily imperative background. I like Manfred von Thun's (the Joy
language designer) nomenclarature of "quotations" to refer to
anonymous functions. Joy doesn't differentiate between lists and
functions, wheras Cat does, so I had to come up with a new operator.
This lead me to create "quote", which seemed apropos given the path I
followed.

> from other languages with how it is used in Cat.  "qv" on the other
> hand
> seems to have no equivalent in other languages (at least the few I
> know of)
> and so no "baggage" gets attached.

I feel the same way.

> However, maybe "quote" in other function composition languages has the
> same meaning as the one in Cat, so using "quote" may be the best
> way to go.

I may make the "qv" the official term, and leave "quote" in the
library for posterity. Heck I will probably even add "constantly" to
the library just for the lispers. :-) Maybe programmers will come to
prefer one over another. The only concern I have with "qv" is how
cryptic it may seem (but I do like its brevity), however I am hoping
that it won't come up frequently. People would be more likely to use
"curry" than doing actual quoting, interestingly enough, given a curry
one can define "qv" as "[id] curry", but I do it the other way around
"curry = [qv] dip compose". Quoting just seems to me to be more
primitive than currying.

The hardest part of designing a language might simply be finding names
for things!

:-)

> Thanks
> Scott Prouty

Thank you very much for your feedback,
Christopher

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Scott Prouty  
View profile
 More options Apr 5 2007, 3:30 pm
From: "Scott Prouty" <scott.pro...@solimarsystems.com>
Date: Thu, 05 Apr 2007 12:30:01 -0700
Local: Thurs, Apr 5 2007 3:30 pm
Subject: Re: Terminology: Thunking vs Quoting

On Apr 4, 3:42 pm, "Christopher Diggins" <cdigg...@gmail.com> wrote:

> On 4/4/07, Scott Prouty <scott.pro...@solimarsystems.com> wrote:

> > I kind of like "qv".   When I encountered just "quote", it made me
> > think of what "quote" meant in other langauges and I tried to reconcile its
> > meaning

> Out of curiosity, what are the different interpretations you can think
> of for the following statements given your previous experience of
> quote:

> 5 quote
> [f] quote

Actually, since I have no experience of an operator named "quote",
my mind grabbed for the next closest thing which was that quotes
(i.e. the ") are used to delimit strings.  That thought kept getting
in the way of what "quote" really is in Cat.

The "qv" seems to not evoke any connotations, so it is easier
for me to just concentrate on what it is...

> To be honest I never learned a "quote" operator in any other language
> prior to adding it to Cat and asking the question. I come from a
> primarily imperative background. I like Manfred von Thun's (the Joy
> language designer) nomenclarature of "quotations" to refer to
> anonymous functions. Joy doesn't differentiate between lists and
> functions, wheras Cat does, so I had to come up with a new operator.
> This lead me to create "quote", which seemed apropos given the path I
> followed.

Well, looking at the Cat documentation, you do say that [ and ]
are quotation constructs.  Hence, "quote" would follow from that
description.  But for me, in PostScript, this would be
called constructing an "executable array" (or more
commonly called a "procedure").

> I may make the "qv" the official term, and leave "quote" in the
> library for posterity. Heck I will probably even add "constantly" to
> the library just for the lispers. :-) Maybe programmers will come to
> prefer one over another. The only concern I have with "qv" is how
> cryptic it may seem (but I do like its brevity), however I am hoping
> that it won't come up frequently. People would be more likely to use
> "curry" than doing actual quoting, interestingly enough, given a curry
> one can define "qv" as "[id] curry", but I do it the other way around
> "curry = [qv] dip compose". Quoting just seems to me to be more
> primitive than currying.

I agree.  However, I do have a question about this.  It seems that
everything on the stack in Cat is a function, correct?  So a 5 on
the stack is really a function that returns the integer 5.  So what
use would "quote" really be?  Or is there really a distinction between
what kind of objects are on the stack?

> The hardest part of designing a language might simply be finding names
> for things!

It is your language, so you can be as creative as you want.  Sometimes
it might be good to signal that some functionality is really
different, so
a quirky name like "qv" or "fconv" might be just the ticket...

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christopher Diggins  
View profile
 More options Apr 5 2007, 5:34 pm
From: "Christopher Diggins" <cdigg...@gmail.com>
Date: Thu, 5 Apr 2007 14:34:44 -0700
Local: Thurs, Apr 5 2007 5:34 pm
Subject: Re: Terminology: Thunking vs Quoting

> I agree.  However, I do have a question about this.  It seems that
> everything on the stack in Cat is a function, correct?  So a 5 on
> the stack is really a function that returns the integer 5.  So what
> use would "quote" really be?  Or is there really a distinction between
> what kind of objects are on the stack?

This is not quite correct, everything you write is a function, or more
precisely a function call:

5 = call the function that pushes the value 5 on the stack
f = call the function f, and let it do it's thing
[5] = call the function that pushes the 5 function on the stack or in
other words quote the 5 function.
[f g] = call the function that pushes the [f g] function onto the
stack (quote f g).

When you push a function onto the stack, you are actually pushing a
function value on the stack.

So everything on the stack is a value.

Does this make sense?

> > The hardest part of designing a language might simply be finding names
> > for things!

> It is your language, so you can be as creative as you want.  Sometimes
> it might be good to signal that some functionality is really
> different, so
> a quirky name like "qv" or "fconv" might be just the ticket...

I think so.

Cheers,
Christopher


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Scott Prouty  
View profile
 More options Apr 9 2007, 4:31 pm
From: "Scott Prouty" <scott.pro...@solimarsystems.com>
Date: Mon, 09 Apr 2007 13:31:29 -0700
Local: Mon, Apr 9 2007 4:31 pm
Subject: Re: Terminology: Thunking vs Quoting

On Apr 5, 2:34 pm, "Christopher Diggins" <cdigg...@gmail.com> wrote:

I think so, thanks, Christopher.

I just looked at the write-up on the interpreter, and I think what
you refer to as a value is really the CatStack object.  It seems
that the CatStack object can be one of three items: Literals,
Function Names, or Quotations.  This makes things a little
clearer.

It also seems that the [ starts what I would call "defered execution"
mode until ] is encountered.  So if function f is [ 5 ], [ f ] is
[ [ 5 ] ] and
not just [ 5 ], i.e. after the [ the function name f is not executed
but
rather the function name is left on the stack and the ] quotes the
function.
Is the function name dereferenced in this case, or is it left intact
and
only derefernced upon execution?

I also noticed a mention of an "executing stack".  Is this distinct
from
the "normal" stack?  As you may know, in PostScript there is more
that one stack, i.e. operand stack, execution stack, dictionary stack,
etc.

BTW, the graphics stuff you just added looks fun.  Is there any
possibility
of adding some simple file I/O so that arbitrary binary files can be
read and
written to?  A little project I have in mind is to create a file
compressor
like WinZIP (not with GUI interface, just simple command line).

Thanks
Scott Prouty


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christopher Diggins  
View profile
 More options Apr 11 2007, 5:26 pm
From: "Christopher Diggins" <cdigg...@gmail.com>
Date: Wed, 11 Apr 2007 14:26:55 -0700
Local: Wed, Apr 11 2007 5:26 pm
Subject: Re: Terminology: Thunking vs Quoting

> I think so, thanks, Christopher.

My pleasure. I appreciate your interest.

> I just looked at the write-up on the interpreter, and I think what
> you refer to as a value is really the CatStack object.  It seems
> that the CatStack object can be one of three items: Literals,
> Function Names, or Quotations.  This makes things a little
> clearer.

> It also seems that the [ starts what I would call "defered execution"
> mode until ] is encountered.  So if function f is [ 5 ], [ f ] is
> [ [ 5 ] ] and
> not just [ 5 ], i.e. after the [ the function name f is not executed
> but
> rather the function name is left on the stack and the ] quotes the
> function.

Yes.

> Is the function name dereferenced in this case, or is it left intact
> and
> only derefernced upon execution?

This varies from release to release. 8-(
The plan is to dereference immediately.

> I also noticed a mention of an "executing stack".  Is this distinct
> from
> the "normal" stack?  As you may know, in PostScript there is more
> that one stack, i.e. operand stack, execution stack, dictionary stack,
> etc.

In Cat there is only one explicit stack. During parallel execution of
certain primitives other stacks may be created. In order for dip to
work, there is another stack used.

> BTW, the graphics stuff you just added looks fun.  Is there any
> possibility
> of adding some simple file I/O so that arbitrary binary files can be
> read and
> written to?  A little project I have in mind is to create a file
> compressor
> like WinZIP (not with GUI interface, just simple command line).

I hope to add this feature next week. I will be out of town for a few
days, and unable to work on it, but I'll bump the feature to the top
of the request list.

Cheers,
Christopher


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Scott Prouty  
View profile
 More options Apr 13 2007, 7:18 pm
From: "Scott Prouty" <scott.pro...@solimarsystems.com>
Date: Fri, 13 Apr 2007 16:18:22 -0700
Local: Fri, Apr 13 2007 7:18 pm
Subject: Re: Terminology: Thunking vs Quoting

> > BTW, the graphics stuff you just added looks fun.  Is there any
> > possibility
> > of adding some simple file I/O so that arbitrary binary files can be
> > read and
> > written to?  A little project I have in mind is to create a file
> > compressor
> > like WinZIP (not with GUI interface, just simple command line).

> I hope to add this feature next week. I will be out of town for a few
> days, and unable to work on it, but I'll bump the feature to the top
> of the request list.

> Cheers,
> Christopher

Thanks!
I also just realized that the graphics stuff you added would help
with PostScript emulation.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google