John Cowan | 1 Nov 01:06 2006

Re: [stack] ANNOUNCE: Joy-in-Scheme version 0.80 (no Scheme required; please test!)

Manfred Von Thun scripsit:

> But my studying is hampered by the fact that I come in to
> my office at most twice a week, and I have quite a few
> things to do in  very short time. So please be patient with
> me; but you should also recognise that so far Scheme has
> been little more that a spectator sport for me.

/me delicately suggests a printout.

> Maybe there is some Schemer in the concatenative group
> who is willing to contribute to your Scheme implementation?

That would be great.  So far, I haven't been able to interest
anyone.

--

-- 
Income tax, if I may be pardoned for saying so,         John Cowan
is a tax on income.  --Lord Macnaghten (1901)           cowan <at> ccil.org

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/concatenative/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
(Continue reading)

Christopher Diggins | 1 Nov 03:55 2006
Picon

Re: [stack] New Cat Tutorial

On 10/31/06, Manfred Von Thun <m.vonthun <at> latrobe.edu.au> wrote:
>
> On 31/10/06 5:56 PM, "Christopher Diggins" <cdiggins <at> gmail.com> wrote:
>
> > I just posted a tutorial on the Cat programming language to
> > http://www.cat-language.com/tutorial.html . There is also some new
> > enhancement to the Cat interpreter (bug fixes, more commands, and more
> > tests). Test coverage is now up to 175 tests.
>
> [..]
>
> Looks very interesting, well done.

Thank you very much! I think you did an excellent thing with the
design of Joy as well. It is one of my all time favourite languages.

> Just one quibble, and I think it is an important one:
> You obviously want to avoid having a terminator (such
> as "." in Joy), and instead take end-of-line to mean
> "end of input, run interpreter".

Except in the case of function definitions. In such case as "define x
{ ... }" the closing curly brace indicate the end of the input in the
case of working with the interpreter. This is not working though in
the current version.

In the light of this, do you still feel that a termination character
is neccessary?

I can't imagine any scenario where this wouldn't be adequate, so any
(Continue reading)

Christopher Diggins | 3 Nov 03:59 2006
Picon

[stack] [ANN] Cat Version 0.9.5

I've just posted a new version of the Cat programming language to
http://www.cat-language.com/download.html. I've also updated the
related research page (http://www.cat-language.com/related.html) so it
contains relatively useful links to related langauge projects, rather
than to a random bunch of papers I hadn't read. It must have been
really late at night when I first made that page, because in
retrospect it is garbage.

I have recieved many encouraging emails lately, and helpful tips and
suggestions for which I am very greatful. It is extremely nice to know
that this work is appreciated. Keep the comments coming!

Cheers,
Christopher

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/concatenative/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/concatenative/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:concatenative-digest <at> yahoogroups.com 
(Continue reading)

Manfred Von Thun | 3 Nov 03:22 2006
Picon
Picon

Re: [stack] New Cat Tutorial


On 1/11/06 1:55 PM, "Christopher Diggins" <cdiggins <at> gmail.com> wrote:
> 
> On 10/31/06, Manfred Von Thun <m.vonthun <at> latrobe.edu.au
> <mailto:m.vonthun%40latrobe.edu.au> > wrote:
> 
> [..]
>> > Just one quibble, and I think it is an important one:
>> > You obviously want to avoid having a terminator (such
>> > as "." in Joy), and instead take end-of-line to mean
>> > "end of input, run interpreter".
> 
> Except in the case of function definitions. In such case as "define x
> { ... }" the closing curly brace indicate the end of the input in the
> case of working with the interpreter. This is not working though in
> the current version.
> 
> In the light of this, do you still feel that a termination character
> is neccessary?
> 
> I can't imagine any scenario where this wouldn't be adequate, so any
> counter-examples would be helpful.

counterexample: suppose that I have defined all sorts of functions, and
I now want to use them to do something to a list of lists. Pretend that
Joy needs a continuation character ³\².
>> [ [1 2 3]                     \
>>   [5 6 7]                     \
>>   [4 9 8] ]                   \
>> [ [ f ] map ] map         \
(Continue reading)

Christopher Diggins | 3 Nov 05:19 2006
Picon

Re: [stack] New Cat Tutorial

Hi Manfred,

Thanks for the example. First, even if the "\" were neccessary for the case
of unterminated lists or quotations, the placement of it after map is
artificial.

>> [ [ f ] map ] map
>> [ g ] filter

should have precisely the same meaning as:

>> [ [ f ] map ] map [ g ] filter

At least this is how Cat works, and is my understanding of how the Joy
interpreter should work as well.

In theory the Cat interpreter can infer that the current expression is not
complete, i.e. when a square bracket, paranthesis or curly brace remain
unclosed. In which case the session might look like:

>> [ [1 2 3]
\ [5 6 7]
\ [4 9 8] ]
>> [ [ f ] map ] map
>> [ g ] filter

The "\" character would be a prompt generated by the interpreter which means
"finish your expression". As I mentioned earlier the other line breaks
wouldn't change the meaning of the code.

(Continue reading)

Christopher Diggins | 4 Nov 21:47 2006
Picon

[stack] Cat article at CodeProject.com

I just recently posted the most recent  C# source code for the Cat
interpreter (version 0.9.6) to CodeProject.com (
http://www.codeproject.com/useritems/cat.asp ) along with an article
which explains how the interpreter and type inference algorithm is
implemented. CodeProject.com is a popular site for C++, C#, and VB
developers and contains lots of open source code and interesting
articles.

The goal of the article is to help people extend or modify Cat for
their own purposes. The Cat code base is public domain, which I want
to point out is very rare for programming languages. This means that
Cat can be easily used for commercial purposes without any
restrictions or requirement whatsoever.

For those interested, there is a flag now in the source code, which
can be used to turn off static checking effectively creating a new
dialect of Cat called Kitten. Kitten has no type checking, and thus
allows a wider range of programs. Kitten is even closer to the Joy
programming language than Cat, and I would be interested to see if
anyone wants to modify the Cat source to enable a Joy compatbility
mode, or simply write a Joy interpreter. (hint: the easiest way is to
wrap the Cat interpreter with a Joy to Kitten translator).

On the subject of Joy compatibility, what level of interest would
there be in a complete Joy interpreter in C#? Also Is anyone doing any
commercial or academic work on or with Joy? I ask because I was
wondering if there were any career opportunities working on or with
Joy or similar languages.

I hope the article and source code is of some use to you. I'd love to
(Continue reading)

Manfred Von Thun | 6 Nov 06:36 2006
Picon
Picon

Re: [stack] ANNOUNCE: Joy-in-Scheme version 0.80 (no Scheme required; please test!)


I have been thinking about Joy in Scheme, especially how to
write Scheme code for the combinators. Here is what I came
up with for the map combinator. I am supposing that we
already have a Scheme function which does the equivalent
of ³exeterm² in my Joy-in C. Its type is
> exeterm:  quotation * stack  ->  stack
This means it takes two parameter, a quotation and a stack
(really the remainder of what is below the quotation) as
parameters and produces a stack as result. The body of
exeterm must do this: step through the quotation, look
at each item ­ if it is a literal (number, char, list ..) push
if onto the stack, if it is an inbuilt, call that code, if it is
user defined, look up its body and exeterm that.

For map we need a Scheme function which checks that
there is a quotation on top of the stack, and below that
an aggregate, and possibly below that further items.
It has the type
> map:  stack  ->  stack
Very roughly the code will look like this:

(define (map s)
>> ( here check that there are two items on stack
>>   and check that top is a quotation )
>> (cond
>>> ((= (type (second s)) list)
>>>  (cons (maplist (first s) (second s) (rest (rest s))))
>>> ((= (type (second s)) string)
>>>  ( call the special function for mapping strings)
(Continue reading)

Christopher Diggins | 8 Nov 18:15 2006
Picon

[stack] Cat version 0.9.7

Cat version 0.9.7 has been posted to http://www.cat-language.com/downloads.html

The latest Cat version introduces a significant new change: stack
state descriptors now describe the stack reading left to right, where
the left most element is the top of the stack. The documentation
doesn't reflect this yet, except for the documentation on primitives
(http://www.cat-language.com/primitives.html).

A subtle but important new addition is the inclusion of linear
recursion combinator, which allows you to write recursive functions.
The Cat type inference algorithm currently can't handle
self-referential functions, but you implement recursive algorithms
using "rec".

Here is an example of the factorial program:

>> define f { [dup 1 <=] [*] [pop 1] [dup --] rec }
inferred type for program 'f' as ( int ) -> ( int )
main stack: _empty_
>> 5 f
main stack: 120
>> 6 f
main stack: 120 720

The type of the rec combinator is interesting (at least I thought so):

(
  (A:any*)->(A A) // argument relation
  (A)->(B:any*) // on termination
  (A B)->(B) // result relation
(Continue reading)

William Tanksley, Jr | 9 Nov 01:54 2006
Picon

Re: [stack] Cat version 0.9.7

Christopher Diggins <cdiggins <at> gmail.com> wrote:
> The latest Cat version introduces a significant new change: stack
> state descriptors now describe the stack reading left to right, where
> the left most element is the top of the stack. The documentation
> doesn't reflect this yet, except for the documentation on primitives
> (http://www.cat-language.com/primitives.html).

Why was this done? It's your language and your right, but this is
backwards from how most other notations show the stack (and backwards
from how things would be pushed on the stack). Is it more efficient to
implement? I could see that being the case...

Anyhow, very nice.

> Christopher

-Billy

__._,_.___
SPONSORED LINKS
Need traffic?

Drive customers

With search ads

on Yahoo!

Your Story

Opened in the 2020

The Yahoo! Time

Capsule Project

Yahoo! Groups

Start a group

in 3 easy steps.

Connect with others.

.

__,_._,___
Christopher Diggins | 9 Nov 02:30 2006
Picon

Re: [stack] Cat version 0.9.7

Hi Billy,

Thanks for the compliment and the feedback. Efficiency wasn't a concern of
mine, the issue I encountered was while working on a paper to describe the
type system that the stack state descriptor (i.e. everything between two
parantheses) mapped directly to the concept of a tuple in the ML based
languages. I found myself having to explain that Cat types were tuples
written backwards, but didn't feel I had a strong justification for such a
break from convention (at least from the POV of type theory).

There is also the issue of when you introduce type variables into the mix.
In the old way type variable declarations would have to appear in the
rightmost position. For example previously the type of dup was:

dup : (A A:any) -> (A)

Now it is:

dup : (A:any A) -> (A)

Which I find easier to explain to people when talking about type variables.

However, I have my doubts. I have trouble peering into the minds of other
programmers.
Do you think I made things more or less muddled, by changing the order of
types?

Anyone else have feedback?

Thanks again,
Christopher

[Non-text portions of this message have been removed]

__._,_.___
SPONSORED LINKS
Ads on Yahoo!

Learn more now.

Reach customers

searching for you.

In Year 2020

Where Will You Be?

The Yahoo! Time

Capsule Project

Yahoo! Groups

Start a group

in 3 easy steps.

Connect with others.

.

__,_._,___

Gmane