1. Prolog for Euphoria?
- Posted by Ralf Nieuwenhuijsen <nieuwen at XS4ALL.NL> Dec 13, 1998
- 332 views
>I agree that the inner working of Euphoria are a bit off-topic, and I don't >intend to carry this on past this post. But I'd like to encourage someone >into considering building a Prolog engine in Euphoria - and the only way >they will do that is to look at Prolog first. I have just skimmed over the Prolog tutorial behind the link given by Hawke. It is very much like my idea, although different in some parts as well. I was personally thinking of some sort of eh.. say stack-based (forget the original definition) data flow. At certain points data can be sent to (set something to, in Prolog I guess using a variable name) another 'fact' using '>>' or something of that kind. However, only a jump would be set. (put down on a stack), Whenever that fact requires more input it simply does an '<<' ... This is thus not the part of the 'predicate name' as in Prolog, which are kept. However they are the ones that control the actual *data*, the variables. So instead of a database, we work with an input-proccesing-output modal. Totally abandoning lists, slicing. Like a lazy functional programming language. However declerations of facts and relationships are kept. Its still like 100% speculative. But, its funny how sometimes you think you have an idea, and off course always find millions have been there before, and spent a lot more time studing it problebly. So, lets not take this as critism to Prolog. >Like any other programming tool, there are some things that you can easily >do in Prolog that are difficult in any other language. If you don't need a >particular tool, you often look at it and say "why would you use something >that funky?" But when it's *just* the tool you need, you're glad you've got >it. Actually I would turn it around. I would say something like this is the ultimate OS. (when it would be made into an OS) .. which could just contain C++ or ASM code, or something much better, but you get my point. Use it as the upper layer, instead of lower layer. (have prolog use C++ rather than C++ using prolog) >And there's certainly no reason it (or a similar inference engine) can't be >added to the Euphoria toolkit. If my 'over-my-head-speculation' doesnt work, I'll love to try to make it, or at least *use* it with Euphoria. Ralf