To Hell with Lisp!

This is a discussion on To Hell with Lisp! within the lisp forums in Programming Languages category; Prolog has much fewer parentheses. But I digress. An inexcusably small sample shows frightening similarities between Norvig's and Graham's Prologs. How come? Common starting point? Same problem entails same solution? Norvig and Graham, separated at birth? Other __________________? kt ps. What /is/ the bestest mostest Lisp implementation of Prolog? (Yes, I saw the entry in the FAQ, looking for warm-blooded viewpoints here.) k pps. For those of you addicted to gavino-mode: Subject: Lisp Prologs: Norvig? Graham? Body: WTF? k -- http://www.theoryyalgebra.com/ "In the morning, hear the Way; in the evening, die content!" -- Confucius...

Go Back   Application Development Forum > Programming Languages > lisp

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 01-15-2008, 01:51 PM
Ken Tilton
Guest
 
Default To Hell with Lisp!

Prolog has much fewer parentheses. But I digress. An inexcusably small
sample shows frightening similarities between Norvig's and Graham's
Prologs. How come? Common starting point? Same problem entails same
solution? Norvig and Graham, separated at birth?

Other __________________?

kt

ps. What /is/ the bestest mostest Lisp implementation of Prolog? (Yes, I
saw the entry in the FAQ, looking for warm-blooded viewpoints here.)

k

pps. For those of you addicted to gavino-mode:

Subject: Lisp Prologs: Norvig? Graham?
Body: WTF?

k

--
http://www.theoryyalgebra.com/

"In the morning, hear the Way;
in the evening, die content!"
-- Confucius
Reply With Quote
  #2  
Old 01-15-2008, 02:25 PM
vanekl
Guest
 
Default Re: To Hell with Lisp!

On Jan 15, 6:51*pm, Ken Tilton <kennytil...@optonline.net> wrote:
> Prolog has much fewer parentheses. But I digress. An inexcusably small
> sample shows frightening similarities between Norvig's and Graham's
> Prologs. How come? Common starting point? Same problem entails same
> solution? Norvig and Graham, separated at birth?
>
> Other __________________?
>
> kt
>
> ps. What /is/ the bestest mostest Lisp implementation of Prolog? (Yes, I
> saw the entry in the FAQ, looking for warm-blooded viewpoints here.)
>
> k
>
> pps. For those of you addicted to gavino-mode:
>
> Subject: Lisp Prologs: Norvig? Graham?
> Body: WTF?
>
> k
>
> --http://www.theoryyalgebra.com/
>
> "In the morning, hear the Way;
> * in the evening, die content!"
> * * * * * * * * * * *-- Confucius


If speed is important and you are working with large data sets, don't
rule out exec-ing out a swi-prolog or xsb process and reading the
results of the query back into Lisp. The WAM is more efficient than
Lisp because all it has to do is DFS and unification.


--
The only place where success comes before work is in the dictionary -
Vidal Sassoon
Reply With Quote
  #3  
Old 01-15-2008, 03:10 PM
Edi Weitz
Guest
 
Default Re: To Hell with Lisp!

On Tue, 15 Jan 2008 13:51:09 -0500, Ken Tilton <kennytilton@optonline.net> wrote:

> What /is/ the bestest mostest Lisp implementation of Prolog? (Yes, I
> saw the entry in the FAQ, looking for warm-blooded viewpoints here.)


I don't know what the FAQ (which one, anyway?) says about this, but I
know that Christophe Rhodes has something that's based on Norvig's
Prolog (IIRC) which fixes some bugs and maybe adds features and/or has
performance improvements. I don't have a URL handy, but Google or the
CL Directory or CLiki should be your friends. If I needed a Prolog,
I'd start there.

Or maybe not. Now that I think of it, LispWorks offers a Prolog as
part of their Enterprise Edition. And so does Franz. Why don't you
use that one?

Edi.

--

European Common Lisp Meeting, Amsterdam, April 19/20, 2008

http://weitz.de/eclm2008/

Real email: (replace (subseq "spamtrap@agharta.de" 5) "edi")
Reply With Quote
  #4  
Old 01-15-2008, 04:11 PM
Mark Tarver
Guest
 
Default Re: To Hell with Lisp!

On 15 Jan, 18:51, Ken Tilton <kennytil...@optonline.net> wrote:
> Prolog has much fewer parentheses. But I digress. An inexcusably small
> sample shows frightening similarities between Norvig's and Graham's
> Prologs. How come? Common starting point? Same problem entails same
> solution? Norvig and Graham, separated at birth?
>
> Other __________________?
>
> kt
>
> ps. What /is/ the bestest mostest Lisp implementation of Prolog? (Yes, I
> saw the entry in the FAQ, looking for warm-blooded viewpoints here.)
>
> k
>
> pps. For those of you addicted to gavino-mode:
>
> Subject: Lisp Prologs: Norvig? Graham?
> Body: WTF?
>
> k
>
> --http://www.theoryyalgebra.com/
>
> "In the morning, hear the Way;
> * in the evening, die content!"
> * * * * * * * * * * *-- Confucius


Qi includes a Prolog as part of the distro; the type theory stuff
actually compiles into Prolog. You would, however, be required to
embrace the true faith of pattern-matching and static type checking.
Brother Harrop will be on hand to administer the necessary
sacraments

AFAIK Norvig covers Prolog compilation in PAIP and I suspect thats why
Graham and he converge. The approach in Qi uses something different
called the Abstract Unification Machine (AUM) and generates Lisp code
through the following transformations.

1. Prolog
2. Extended Mu Expressions
3. AUM instructions
4. Lisp

Stages 1-2 generate expressions in an extended lambda (mu) calculus
reminiscent of the intermediate code generated from pattern-matching
FPLs in Peyton-Jones. Qi generates pretty good Lisp code from
Prolog.

Generally you will not get the same performance from Qi Prolog (or any
Prolog in Lisp) as you will from a good Prolog on its own. But if
you're happy with 100-600 KLIPs then thats not a bother. Back in the
dim days of the mid-80s, I remember CProlog clocking at 1 KLIP.

Franz do a very quick Prolog and since you're an Allegro user, their
version would seem the logical choice for you. I believe (not chasing
this up) that they based their design on Norvig.

Mark
Reply With Quote
  #5  
Old 01-15-2008, 04:19 PM
anon
Guest
 
Default Re: To Hell with Lisp!

Each Language has its pluses and its minuses. There is no perfect
Language. Period!

Yes, LISP uses parentheses, because it was original designed to use
only functions. And even though that has been altered in some cases,
LISP still primary uses functions, which means a lot of parentheses.

But most LISP programmers understand this. And in some cases
programmers use an LISP editor that help the programmers write LISP.
Like, inserting a right parentheses when the programmer type a left
parentheses.

But to go with PROLOG and type all of those Rules and use PROLOG's
syntax. I think you will feel the same about PROLOG the way you fell
about LISP in a few months.

Also, use a PROLOG that is written in PROLOG!

It is better to LEARN and USE one or two languages then to try them
all and give up because there is no prefect one. And the best way to
do that is find a job field that you like and see what languages
they use. Then learn those languages, even with the minuses at
least you will have a knowledge to get that type of job.

Also, Please use the correct syntax. This is, LISP and PROLOG
are to be capitalize.

In <478d0118$0$11562$607ed4bc@cv.net>, Ken Tilton <kennytilton@optonline.net> writes:
>Prolog has much fewer parentheses. But I digress. An inexcusably small
>sample shows frightening similarities between Norvig's and Graham's
>Prologs. How come? Common starting point? Same problem entails same
>solution? Norvig and Graham, separated at birth?
>
>Other __________________?
>
>kt
>
>ps. What /is/ the bestest mostest Lisp implementation of Prolog? (Yes, I
>saw the entry in the FAQ, looking for warm-blooded viewpoints here.)
>
>k
>
>pps. For those of you addicted to gavino-mode:
>
>Subject: Lisp Prologs: Norvig? Graham?
>Body: WTF?
>
>k
>
>--
>http://www.theoryyalgebra.com/
>
>"In the morning, hear the Way;
> in the evening, die content!"
> -- Confucius


Reply With Quote
  #6  
Old 01-15-2008, 05:17 PM
John Thingstad
Guest
 
Default Re: To Hell with Lisp!

På Tue, 15 Jan 2008 21:10:30 +0100, skrev Edi Weitz <spamtrap@agharta.de>:

> On Tue, 15 Jan 2008 13:51:09 -0500, Ken Tilton
> <kennytilton@optonline.net> wrote:
>
>> What /is/ the bestest mostest Lisp implementation of Prolog? (Yes, I
>> saw the entry in the FAQ, looking for warm-blooded viewpoints here.)

>
> I don't know what the FAQ (which one, anyway?) says about this, but I
> know that Christophe Rhodes has something that's based on Norvig's
> Prolog (IIRC) which fixes some bugs and maybe adds features and/or has
> performance improvements. I don't have a URL handy, but Google or the
> CL Directory or CLiki should be your friends. If I needed a Prolog,
> I'd start there.
>


I noticed Norvig's code didn't set the expression to a Preneks Normal Form
before Scholheimization.
This could cause variable capture for existance and forall quantors. You
might want to move all and exist quantors to the top level of the
expression and rename variables when you move them up a scope.

--------------
John Thingstad
Reply With Quote
  #7  
Old 01-15-2008, 05:35 PM
Slobodan Blazeski
Guest
 
Default Re: To Hell with Lisp!

Weird I was looking for a embedded prolog too, Allegro have it but I
prefer portable solution, beside currently weblocks is broken with
allegro. Grahams prolog implementation from OnLisp could be easily
recoded using some new continuation library like cl-cont or arnesi,
but I don't know how fast and feature complete is.

Anon, lisp is big ball of mud and lispers want to carry the lisp with
them. When lisper likse something from prolog or haskell they want it
implemented as library so they could embeded prolog or whatever when
it's convenient and work with pure lisp for the rest. Take embeded
prolog found in Allegro & LW, or CLOS embedded language for OO
programming , or Pascal Constanza ContextL and AspectL embedded
languages to do context oriented or aspect oriented programming .
One of the reasons that stops me from trying Qi, though I like it from
what I read , is that is not embeded, or is I'm wrong Mark ? (*) I
don't want to program in Qi only I want to
have lisp code intermixed with embedded language. Like this
(asdf:os 'asdf:load-op :qi)
and than work with Qi and lisp like this
;;pseudo-code fallows copy pasted from Qi book
>(qi::define return-b

a -> b
c -> b )
return-b
>(mapcar #'return-b '(a b c))


cheers
Slobodan
(*)
I asked this at the correct group
http://groups.google.com/group/Qilan...fb1427c08f13d8
Reply With Quote
  #8  
Old 01-15-2008, 06:12 PM
Ken Tilton
Guest
 
Default Re: To Hell with Lisp!



Edi Weitz wrote:
> On Tue, 15 Jan 2008 13:51:09 -0500, Ken Tilton <kennytilton@optonline.net> wrote:
>
>
>>What /is/ the bestest mostest Lisp implementation of Prolog? (Yes, I
>>saw the entry in the FAQ, looking for warm-blooded viewpoints here.)

>
>
> I don't know what the FAQ (which one, anyway?) says about this, but I
> know that Christophe Rhodes has something that's based on Norvig's
> Prolog (IIRC) which fixes some bugs and maybe adds features and/or has
> performance improvements. I don't have a URL handy, but Google or the
> CL Directory or CLiki should be your friends. If I needed a Prolog,
> I'd start there.


http://www.cliki.net/Prolog, the PAIPROLOG link? I'll take a look.

>
> Or maybe not. Now that I think of it, LispWorks offers a Prolog as
> part of their Enterprise Edition. And so does Franz. Why don't you
> use that one?


Waiting on word from them on as to whether I am mistaken in concluding
that I cannot run a fancy analysis of X to generate a set Y of Prolog
rules and then solve Y. Their toplevel <- expands into a promising
run-toplevel-prove (or something) of the quoted body, but the embedded
prolog expands in place to an amazing amount of internalese. An open
question is whether eval would work, meaning whether I can do without
capture in embedded Lisp forms.

I grabbed Norvig's Lisp Prolog and that looks more friendly to the
functional thing (even the embedded prolog form expands to
something-prove the quoted body), but then Franz did some sweet things
embedding Lisp in Prolog -- well, still exploring, maybe Norvig has some
tricks up its sleeve I have not found. Then again, Bill Clementson found
ACL Prolog to be lots faster than Norvig's, and I might need that, so it
would be nice to stick with ACL.

I have Ait-Kaci warming up in the bullpen if NIH sets in. With Luck I
can kill a month rolling a KennyLog and avoid working on the Algebra
software, and then redo the Algebra engine around KennyLog, pushing the
release (PWUAHAHAHAHAHAHAA!) out even further.

kt

ps. Would someone please help anon? k

--
http://www.theoryyalgebra.com/

"In the morning, hear the Way;
in the evening, die content!"
-- Confucius
Reply With Quote
  #9  
Old 01-15-2008, 06:18 PM
Edi Weitz
Guest
 
Default Re: To Hell with Lisp!

On Tue, 15 Jan 2008 18:12:38 -0500, Ken Tilton <kennytilton@optonline.net> wrote:

> http://www.cliki.net/Prolog, the PAIPROLOG link?


That's the one I meant, yes.

> I have Ait-Kaci warming up in the bullpen if NIH sets in. With Luck
> I can kill a month rolling a KennyLog and avoid working on the
> Algebra software, and then redo the Algebra engine around KennyLog,
> pushing the release (PWUAHAHAHAHAHAHAA!) out even further.


Maybe you can incorporate this into you Amsterdam talk?



--

European Common Lisp Meeting, Amsterdam, April 19/20, 2008

http://weitz.de/eclm2008/

Real email: (replace (subseq "spamtrap@agharta.de" 5) "edi")
Reply With Quote
  #10  
Old 01-15-2008, 06:31 PM
Mark Tarver
Guest
 
Default Re: To Hell with Lisp!

On 15 Jan, 22:35, Slobodan Blazeski <slobodan.blaze...@gmail.com>
wrote:
> Weird I was looking for a embedded prolog too, Allegro have it but I
> prefer portable solution, *beside currently weblocks is broken with
> allegro. Grahams prolog implementation from OnLisp could be easily
> recoded using some new continuation library like cl-cont or arnesi,
> but I don't know how fast and feature complete is.
>
> Anon, lisp is big ball of mud and lispers want to carry the lisp with
> them. When lisper likse something from prolog or haskell they want it
> implemented as library so they could embeded prolog or whatever when
> it's convenient and work with pure lisp for the rest. Take embeded
> prolog found in Allegro & LW, or CLOS embedded language for OO
> programming , or Pascal Constanza ContextL and AspectL embedded
> languages to do context oriented or aspect oriented programming .
> One of the reasons that stops me from trying Qi, though I like it from
> what I read , is that is not embeded, or is I'm wrong Mark ? (*) I
> don't want to program in Qi only I want to
> *have lisp code intermixed with embedded language. Like this
> (asdf:os 'asdf:load-op :qi)
> and than work with Qi and lisp like this
> ;;pseudo-code fallows copy pasted from Qi book>(qi::define return-b
>
> * a -> b
> * c -> b )
> return-b
>
> >(mapcar #'return-b *'(a b c))

>
> cheers
> Slobodan
> (*)
> I asked this at the correct grouphttp://groups.google.com/group/Qilang/browse_thread/thread/dfb1427c08...


I guess you mean by 'embedded', something that can be loaded into the
Lisp environment like a regular library with no or minimal disturbance
to Lisp.

The general approach with Qi is driven by the idea that programming
should nearly always be conducted at the highest level. Qi was
designed to be in certain respects higher-level than Lisp so the model
I assumed was one where people worked in Qi and then dipped down into
Lisp when they needed to borrow on Lisp resources. If you follow that
approach then mixing Qi and Lisp is very very easy All you have to do
is to type 'LOAD' to load a Lisp file rather than 'load' to load a Qi
file.

The model that some people want, and I guess this is the problem, is
they want to work in Lisp and drop (jump?) into Qi. Its certainly
doable, its just that the default setup is not tailored for that.
Personally I hardly ever write in Lisp unless I want to use macros.
So I've had very little motivation to set things up differently.

I mean, if Qi code is more compact than bread-and-butter Lisp list
handling code and generates Lisp code that is equivalent in
performance to the most painfully hand-optimised Lisp code that a Lisp
hacker can write (see the performance shoot-out in
http://www.lambdassociates.org/studies/study10.htm) then there really
is not a rational motivation for writing large tranches of Lisp code
any more.

However, if I had to set it up in the reverse order, probably what
I'd do is have some kind of toggle key out of the Qi top level that
would put me into the Lisp top level and would simultaneously reset
the readtable to the default settings and from which I could toggle
back into Qi. That's not hard to arrange.

Mark




Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 09:49 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.