Article View: comp.lang.prolog
Article #248Pro4th???
From: Jack J. Woehr
Date: Tue, 18 Jul 1989 04:21
Date: Tue, 18 Jul 1989 04:21
29 lines
1730 bytes
1730 bytes
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_ {}
{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}
Technical Details
Message-ID:
<12746@well.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!hplabs!well!jaxShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!hplabs!well!jax From: jax@well.UUCP (Jack J. Woehr) Newsgroups: comp.lang.prolog Subject: Pro4th??? Summary: Probably Useless but Veddy Interesting Keywords: forth, forlog, foobar Message-ID: <12746@well.UUCP> Date: 18 Jul 89 04:21:16 GMT Reply-To: jax@well.UUCP (Jack J. Woehr) Organization: Committee for Grindingly Slow Software Emulations Lines: 29