raybaquirin | 6 Jan 2006 10:12
Picon
Favicon

[stack] ANN: Joy in Java

Joy in Java (JoyJ), an interpreter for Joy implemented in Java, is now
available for download from
http://appforge.apc.edu.ph/frs/?group_id=114&release_id=221
Installation instructions are in the README.html file.  Ignore the
mention of a zip file in the README, the project files are directly
downloadable from the URL above.

Questions, comments, bug reports, patches welcome.  Please address to:
rayb <at> apc.edu.ph

Happy New Year!

Ray

 
Yahoo! Groups Links

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

<*> To unsubscribe from this group, send an email to:
    concatenative-unsubscribe <at> yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

John Cowan | 6 Jan 2006 19:48

Re: [stack] ANN: Joy in Java

raybaquirin scripsit:

> Joy in Java (JoyJ), an interpreter for Joy implemented in Java, is now
> available for download from
> http://appforge.apc.edu.ph/frs/?group_id=114&release_id=221
> Installation instructions are in the README.html file.  Ignore the
> mention of a zip file in the README, the project files are directly
> downloadable from the URL above.

Congratulations!  I'm especially impressed that the implementation language
is NetRexx, a language I particularly like.  I've had a soft spot for
Rexx ever since it was the only dynamic language that could bind to the OS/2 EE
database; I wrote a Smalltalk program that generated a Rexx program that
output database data in comma-separated-value format that could be loaded
back into Smalltalk or directly into Excel.

As you know but others may not, NetRexx is a statically typed language
masquerading as a dynamically typed one that compiles into JVM class files;
the masquerade is arranged by the flexible value class Rexx cooperating
with some neat assumptions by the NetRexx compiler.

--

-- 
John Cowan      cowan <at> ccil.org        http://www.reutershealth.com
        "Not to know The Smiths is not to know K.X.U."  --K.X.U.

 
Yahoo! Groups Links

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

William Tanksley, Jr | 8 Jan 2006 01:58
Picon

[stack] StrongForth is back!

http://home.vrweb.de/stephan.becher/forth/

StrongForth -- the language that adds strong polymorphic static
typechecking to Forth -- is back online, with a new version and tons
of good documentation.

-Billy

 
Yahoo! Groups Links

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

<*> To unsubscribe from this group, send an email to:
    concatenative-unsubscribe <at> yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

raybaquirin | 9 Jan 2006 04:37
Picon
Favicon

Re: [stack] ANN: Joy in Java

Hi, John,

--- In concatenative <at> yahoogroups.com, John Cowan <cowan <at> c...> wrote:
[snipped]
> Congratulations!  I'm especially impressed that the implementation
language
> is NetRexx, a language I particularly like.  
Thank you.

>I've had a soft spot for
> Rexx ever since it was the only dynamic language that could bind to
the OS/2 EE
> database; I wrote a Smalltalk program that generated a Rexx program that
> output database data in comma-separated-value format that could be
loaded
> back into Smalltalk or directly into Excel.
I also encountered Rexx on OS/2 and earlier on the AS/400.  One reason
I chose to use NetRexx is with a view to re-using the code for a pure
Rexx port of Joy.  But of course I should concentrate first on
fleshing out and improving the current implementation.

> 
> As you know but others may not, NetRexx is a statically typed language
> masquerading as a dynamically typed one that compiles into JVM class
files;
> the masquerade is arranged by the flexible value class Rexx cooperating
> with some neat assumptions by the NetRexx compiler.
I'm wondering, though, if I shouldn't just transition to a pure Java
implementation.  I have a feeling that that would lower the bar for
participation in the project for the young guns out there. 
(Continue reading)

Manfred Von Thun | 16 Jan 2006 07:23
Picon
Picon
Favicon

Re: [stack] ANN: Joy in Java

Congratulations, Ray, this looks very impressive.
Your choice of an implementation language really did pay off,
just judging by the size of the entire interpreter ­ it is very neat.

I did notice that you put the ³quit² command into the main loop.
In my prototype it is just an ordinary Joy operator ­ and this has the
consequence that one can use it (deeply) inside ordinary programs,
such as 
    [stack null]  [³stack is empty ­ bye² put quit]  []  ifte
Did you put the ³quit² command inside the main loop because
Netrexx does not have an exit command or the very useful
setjmp/longjmp combination of the C language?  (Not that it
matters much, it is a trifling difference.)

Also, I was intrigued by the comments you and John Cowan made
about the way Netrexx and Java differ in their handling of types.
Would either of you care to comment further? Is this a promising
approach to take for a Joy compiler?

Again, congratulations, and best wishes for the continuing development.

  - Manfred

On 6/1/06 8:12 PM, "raybaquirin" <raybaquirin <at> yahoo.com> wrote:

> Joy in Java (JoyJ), an interpreter for Joy implemented in Java, is now
> available for download from
> http://appforge.apc.edu.ph/frs/?group_id=114&release_id=221
> Installation instructions are in the README.html file.  Ignore the
> mention of a zip file in the README, the project files are directly
(Continue reading)

John Cowan | 16 Jan 2006 10:01

Re: [stack] ANN: Joy in Java

Manfred Von Thun scripsit:

> Did you put the ³quit² command inside the main loop because
> Netrexx does not have an exit command or the very useful
> setjmp/longjmp combination of the C language?  (Not that it
> matters much, it is a trifling difference.)

Java (and therefore Netrexx) programs can exit by calling System.exit(n)
with the exit code.

> Also, I was intrigued by the comments you and John Cowan made
> about the way Netrexx and Java differ in their handling of types.
> Would either of you care to comment further? 

I'd be happy to comment further, but I don't know what on.  Ask me
a question and I'll try to answer it.

--

-- 
John Cowan  cowan <at> ccil.org  www.reutershealth.com  www.ccil.org/~cowan
This great college [Trinity], of this ancient university [Cambridge],
has seen some strange sights. It has seen Wordsworth drunk and Porson
sober. And here am I, a better poet than Porson, and a better scholar
than Wordsworth, somewhere betwixt and between.  --A.E. Housman

 
Yahoo! Groups Links

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

(Continue reading)

Greg Buchholz | 16 Jan 2006 19:23
Picon
Favicon

[stack] Concatenative Logic Programs?

    Lately I've been wondering if anyone has given thought to what
concatenative logic programming would look like.  Prolog programs seem
deeply intertwined with the idea of unifying terms and variables while
concatenative programs eschew variables altogether.  It seems like quite
a dichotomy (well, that combined with the fact that I view concatenative
programs as functional ones, with each combinator being a function from
stacks to stacks).  So I've been at a loss as to how one would write
logic programs in something Joy-like.  Let's take the "append" predicate
in a logical Joy for example...

    [a b c] [d e f] [a b c d e f] append

...that query would be true.  But how does one find the list which
results in [a b c d e f] when appended with [d e f]? (i.e. in prolog, the
X in append(X,[d,e,f],[a,b,c,d,e,f]))  If you wrote it as...

    [d e f] [a b c d e f] append

...how would you differentiate it from the other case (prolog:
append([a,b,c],X,[a,b,c,d,e,f]))? With stack shufflers (rot, swap, etc.)
somehow? Or maybe you'd have predicate modifiers which would indicate
which arguments on the stack are missing and therefore the unknowns we're
trying to find.  For lack of a better naming scheme, let's create a
family of predicate modifiers like "Xxx" and "xXx" where the capital 'X'
stands for the missing item(s).  (Below the "i" applies a modified
predicate to the stack items).  So our "append" examples might start to
look like...

    [a b c] [d e f] [a b c d e f] append.          (* True    *)
    [d e f] [a b c d e f] [append] [Xxx] modify i. (* [a b c] *)
(Continue reading)

Jonathan Burns | 16 Jan 2006 22:12
Picon
Favicon

Re: [stack] Concatenative Logic Programs?

On Tuesday 17 January 2006 05:23, Greg Buchholz wrote:

>      Lately I've been wondering if anyone has given thought to what
>  concatenative logic programming would look like.  Prolog programs seem
>  deeply intertwined with the idea of unifying terms and variables while
>  concatenative programs eschew variables altogether.  It seems like quite
>  a dichotomy (well, that combined with the fact that I view concatenative
>  programs as functional ones, with each combinator being a function from
>  stacks to stacks).  So I've been at a loss as to how one would write
>  logic programs in something Joy-like.  

[ Snipping the append sketch.]

>  Thoughts?

Hi, Greg. Only some thoughts, vague and tangential.

I have been thinking lately about categories and logic programming...

1. "Do category theory (CT) in Prolog." Meaning, make a systematic
list of CT definitions, so as to express them somehow as Prolog
predicates. Thence, produce a base of identities between arrow
compositions; these would be combinators in a typed concatenative
language. Prolog searching should be able (one would think) to
find the right arrow to complete a path, the right functor to express
an arrow as an equivalent with the right valence.

2. "Do Prolog in CT."  This is more like what you're reaching for.
I find it harder to think about than the other way. I ask, "What
kind of morphism is a Prolog term?" The answer seems to be,
(Continue reading)

Manfred Von Thun | 18 Jan 2006 09:52
Picon
Picon
Favicon

Re: [stack] Concatenative Logic Programs?


On 17/1/06 5:23 AM, "Greg Buchholz" <sleepingsquirrel <at> yahoo.com> wrote:

>     Lately I've been wondering if anyone has given thought to what
> concatenative logic programming would look like.

[..]

One of (possibly many) answers is along these lines:
In logic programming we generally, though by no means always, want answers
in the form X = ... Y = ..., we really need those variables to give answers.
Consider a simple stereotyped data base, here written in postfix notation:
    john rich. jane rich. john mary loves.
    likes :- loves              (* note no parameters,
                                   so this is short for X Y likes :- X Y
loves *)
    is-liked-by :- swap likes.  (* again no parameters *)
    paul X likes :- X rich.
Now some queries and answers:
    mary rich.         no
    jane rich.         yes
    X rich.            X = john;
                       X = jane.
    X Y likes.         X = john, Y = mary
                       X = paul, Y = john
                       X = paul, Y = jane
    X john is-liked-by. X = mary
The two ³no parameter² cases in the definitions indicate some trivial
concatenative usages, hardly persuasive. But for the queries and answers
we really seem to need Prolog variables.
(Continue reading)

raybaquirin | 19 Jan 2006 03:54
Picon
Favicon

Re: [stack] ANN: Joy in Java

--- In concatenative <at> yahoogroups.com, Manfred Von Thun
<m.vonthun <at> l...> wrote:
>
> Congratulations, Ray, this looks very impressive.
Thank you.

> Your choice of an implementation language really did pay off,
> just judging by the size of the entire interpreter � it is very neat.
I would call this a case of serendipity--I chose NetRexx because, of
all the languages that run in the JVM, it is the one I am most
comfortable with. And since it uses Rexx strings for most things, that
was what I used too.

> 
> I did notice that you put the �quit� command into the main loop.
> In my prototype it is just an ordinary Joy operator � and this has the
> consequence that one can use it (deeply) inside ordinary programs,
> such as 
>     [stack null]  [�stack is empty � bye� put quit]  []  ifte
> Did you put the �quit� command inside the main loop because
> Netrexx does not have an exit command or the very useful
> setjmp/longjmp combination of the C language?  (Not that it
> matters much, it is a trifling difference.)
No, that was just me dropping the ball.  Anyway, s John Cowan said in
his post, that's easy to fix and will be in the next release.  I am
just struggling with subversion at the moment and would like to get
that running first.

> 
> Also, I was intrigued by the comments you and John Cowan made
(Continue reading)


Gmane