[comp.lang.prolog] Pro4th???

jax@well.UUCP (Jack J. Woehr) (07/18/89)

	So my son asks me last night, "Can you write a Forth in
Prolog?"

	"Yes, but it would run awfully slowly." That should have been
that, but it got me to thinking, that would be a pretty amusing
demo of Prolog! I seem to recall it has been done before, but don't remember
when or by whom.

	Seems like every Forth word would be coded in a form something
like

	a_word([TOS|Rest_of_Stack],[New_TOS|New_ROS]) :-
	 whatever, this, that, the_other.

as in

	dup([TOS|Rest_of_Stack],[New_TOS|New_ROS]) :-
	 prepend(TOS,[TOS|Rest_of_Stack],[New_TOS|New_ROS]).

{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}
{}                                                                        {}
{} jax@well     ." Sysop, Realtime Control and Forth Board"      FIG      {}
{} jax@chariot  ." (303) 278-0364 3/12/2400 8-n-1 24 hrs."     Chapter    {}
{} JAX on GEnie       ." Tell them JAX sent you!"             Coordinator {}
{}                                                                        {}
{} "He who brings home ant-infested faggots must not complain when        {}
{}    lizards begin to visit" - Chinua Achebe, _Arrow of God_             {}
{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}

umrigar@bingvaxu.cc.binghamton.edu (Zerksis D. Umrigar) (07/19/89)

jax@well.UUCP (Jack J. Woehr) writes:

>	So my son asks me last night, "Can you write a Forth in
>Prolog?"
>
>	"Yes, but it would run awfully slowly." That should have been
>that, but it got me to thinking, that would be a pretty amusing
>demo of Prolog! I seem to recall it has been done before, but don't remember
>when or by whom.
>

There were several papers discussing Forth in Prolog and Prolog in
Forth in The Journal of Forth Application and Research, Vol. 4, #
4.

-zerksis umrigar (umrigar@bingvaxu.cc.binghamton.edu).