Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Learning PROLOGUE

Name: Anonymous 2009-05-20 23:49

Good PROLOGUE books, please. I read S&A.

Name: Anonymous 2009-05-21 0:01

Name: Anonymous 2009-05-21 0:27

>>2
NO THANK YOU!

Name: Anonymous 2009-05-21 0:36

product([], 1).
product([H|T], X) :- product(T, Y), X is H * Y.

factorial(N, R) :- numlist(2, N, Ns), product(Ns, R).


that's all you need to know.

Name: Anonymous 2009-05-21 0:43

>>4
Fibs?

Name: Anonymous 2009-05-21 1:35

Bump for PROLOGUE books. Please don't tell me to google, I don't trust Google.

Name: Anonymous 2009-05-21 2:19

>>6
You don't trust Google, but you trust /prog/? OK..................

Name: Anonymous 2009-05-21 2:22

>>7
Google doesn't find S&A. You gave me S&A. I enjoyed it.

Name: Anonymous 2009-05-21 3:28

>>8
I can assure you, Google has in fact found S&A, it is you who was unable to find it. What you should be saying is "I am incapable of finding things myself and would prefer it for /prog/ to find it for me."

Name: Anonymous 2009-05-21 3:43

>>9
Please stop this.

Name: Anonymous 2009-05-21 4:23

PROLOGUE is obsolete. Learn EPILOGUE instead.

Name: Anonymous 2009-05-21 5:18

Name: Anonymous 2009-05-21 5:22

What is this PROLOGUE crap? Learn Lisp you plebes.

Name: Anonymous 2009-05-21 9:43

Name: Anonymous 2009-05-21 9:49

>>13
I know LISP, I read S&A.

Name: Anonymous 2009-05-21 9:58

>>14
Why those books? All you really need is http://mitpress.mit.edu/sicp/full-text/book/book.html

Name: Anonymous 2009-05-21 10:32

>>16
I posted the link as proof that google didn't find me S&A. I tried many queries but none did.

Name: Anonymous 2009-05-21 20:09

>>5
twofibs(0, 1, 0).
twofibs(N, F1, F0) :-
  atomic(N), N > 0,
  Q is N >> 1, R is N /\ 1, twofibs(Q, A, B),
  X is A * A + B * B, Y is B * (A << 1 + B),
  ( R =:= 0 -> F1 is X, F0 is Y; F1 is Y, F0 is X + Y ).

fib(N, F) :-
  A is abs(N),
  S is sign(N),
  R is N /\ 1,
  twofibs(A, _, F0),
  ((S =:= -1, R =:= 0) -> F is -F0; F is F0).


and here's a prime sieve for you:
:- use_module(library(chr)).
:- chr_constraint prime/1.
prime(X) \ prime(Y) <=> 0 is Y mod X | true.
primes(1). primes(N) :- prime(N), succ(M,N), primes(M).


>>13
lisp has been obsolete for almost 40 years.

Name: Anonymous 2009-05-21 20:17

ONE WORD, THE FORCED USE OF is FOR ARITHMETIC, THREAD OVER

Name: Anonymous 2009-05-21 20:24

>>19
Despite the fact that C wasn't invented yet

Name: Anonymous 2009-05-21 20:31

>>19-20
what

Name: Anonymous 2009-05-21 20:49

>>21
It's a syntax error to write PROLOGUE while not implementing an expert system or an AI

Name: Anonymous 2009-05-21 20:53

>>22
Just like it's a syntax error to write LISP while not eating oatmeal with toenail clippings in it?

Name: Anonymous 2009-05-21 22:30

>>18
[b]Lisp:[b] making all other languages obsolete for 50 years.

Name: Anonymous 2009-05-21 23:45

>>24
LISP has been obsolete since 1972.

Name: Anonymous 2009-05-21 23:49

>>18,23,25
Blasphemers!

Name: Anonymous 2009-05-21 23:59

>>25
actually, it's been obsolete since 1958.

Name: Anonymous 2009-05-22 4:42

>>26
Rhymes with ''glass femurs´´.

Name: Anonymous 2009-05-22 17:10

scheme: obsolete for 7 years before it was created.

Name: Anonymous 2009-05-22 17:12

LISP and Scheme weren't created.  They were discovered.

Name: Anonymous 2009-05-22 19:31

>>30
Scheme was created in 1975 by LISPers who were butthurt about Forth, Prolog, and ML all being more functional than LISP.

Name: Anonymous 2009-05-22 19:38

What's up with all the good languages appearing in 1972-1973 anyway? C, Forth, ML, Prolog, SASL...

Name: Anonymous 2009-05-22 19:40

>>31
butthurt
Back to /b/, please.

Name: Anonymous 2009-05-23 0:17

>>33
is butthurt because >>31 speaks the truth.

Name: Anonymous 2009-05-23 0:31

>>34
No. Because that's a /b/-esque word and both you and >>31 should head back there.

Name: Anonymous 2009-05-23 0:50

>>35
the word „butthurt“ has been around a lot longer than /b/ has.

>>33,35 should take his non-functional language back to /pr/.

Name: Anonymous 2009-05-23 1:13

>>36
IHBT. /pr/ discusses PHP and Java. Get out.

Name: Anonymous 2009-05-23 1:47

C++ is a functional programming langauge. It's working and capable of getting stuff done. (LISP isn't functional)

Name: Anonymous 2009-05-23 2:14

>>38
One word functions are not first class thread over.

Name: Anonymous 2009-05-23 2:16

>>38
Only for certain definitions of ``working''. Sepples is designed to trip you up.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List