Church's lambda calculus

M

Merrill & Michele

Q1) Has anyone seen a treatment of Dr. Church's lambda calculus that uses C
instead of an obscure language designed for logic?

Q2) How does access the forum archives? MPJ
 
D

Dave Vandervies

Q1) Has anyone seen a treatment of Dr. Church's lambda calculus that uses C
instead of an obscure language designed for logic?

Doubtful, since C doesn't lend itself well to working with lambda
calculus (the world-view of the two models is too different).

If you want to find a treatment of the lambda calculus that uses a
programming language rather than mathematical notation, you're better
off looking at a functional language like Scheme.


dave
 
C

Chris Barts

On Fri, 10 Sep 2004 16:48:42 +0000, Dave Vandervies wrote:

If you want to find a treatment of the lambda calculus that uses a
programming language rather than mathematical notation, you're better
off looking at a functional language like Scheme.

Or, if you don't like all those parentheses, Perl:
http://perl.plover.com/lambda/
 
M

Merrill & Michele

....snip...



Thank you all for your replies. I apologize for sloppy posts, as I do not
read well off the screen and am now attempting my first pasting in of a
message that antecedently exists as a hard copy.



1) Mr. Wahler I thank for his link to the archives. My follow-up
question is: does there exist a server on which there exists the posts of
comp.lang.c for the last n years?



2) To Mr. Bart I ask: Do you know anyone outside of the academy who
uses Scheme? As for Perl, I'm too old a dog..



3) Mr. Vandervies, you don't seriously doubt the inability of C to
make Scott Nudds fly? Can the same be said of Richard Heathfield and MY
hard drive?



4) Pete: A very interesting program. Worth looking at.



Again thanks all. MPJ
 
M

Martin Ambuhl

Merrill said:
1) Mr. Wahler I thank for his link to the archives. My follow-up
question is: does there exist a server on which there exists the posts of
comp.lang.c for the last n years?

in particular said:
2) To Mr. Bart I ask: Do you know anyone outside of the academy who
uses Scheme? As for Perl, I'm too old a dog..

Both Scheme and Lisp are alive and kicking in a number of commercial
products. These products are used by people as varied as medical
diagnosticians to political campaign strategists.
 
M

Merrill & Michele

snip


As I activate the latter link and enter "foo", the search engine tells me
that I'm looking for "foo fighters". If I needed more fighters, I'd drive
two miles to the Teamsters. I refuse to believe that it hasn't dawned on
someone with minor means to serialize this forum.
Both Scheme and Lisp are alive and kicking in a number of commercial
products. These products are used by people as varied as medical
diagnosticians to political campaign strategists.

Are Scheme and Lisp basically the same things? That monkeys (=political
campaign folks) tap keyboards does not impress this Ohio native. Smear
tactics seem to win the day in the battle of the dirigibles. Do I recall
correctly from diagnostics that it ploughed through user-defined cases? MPJ
 
G

G. S. Hayes

Merrill & Michele said:
snip


As I activate the latter link and enter "foo", the search engine tells me
that I'm looking for "foo fighters".



Make sure you click on the "search only in comp.lang.c.*" button
before doing your search, otherwise it will search all newsgroups.
 
C

Chris Barts

2) To Mr. Bart I ask: Do you know anyone outside of the academy who
uses Scheme? As for Perl, I'm too old a dog..

First, my name is Barts, not Bart. I don't know why people drop the final
s.

Scheme, in the form of the Guile system, is the official extension
language of the GNU Project. That is, people are encouraged to write
programs that include the Guile Scheme interpreter so people can extend
those applications without recompiling them.

Lisp, in the form of Emacs Lisp, is the most powerful and probably the
most-used programming language included with a text editor. You can do a
web search for Emacs and Emacs extensions to find many examples of people
writing real programs in Emacs Lisp.

Scheme and Lisp are two closely related languages, in that they share a
common lineage and have many elements in common. Someone skilled in a Lisp
dialect can learn Scheme very easily, and vice-versa.
 
O

Old Wolf

Merrill & Michele said:
Q1) Has anyone seen a treatment of Dr. Church's lambda calculus that uses C
instead of an obscure language designed for logic?

You can do it in C++, eg. look at the Boost Lambda library
 
M

Merrill & Michele

snip
Thank you again for replies. To Mr. Barts I apologize for the type of
inconsideration that makes me furious. I can, in my defense, only claim
that the theologian Karl Barth is so deeply etched in my mind that my neural
pathways have hardened too much around that spelling. So we have Scheme for
linux, LISP for macs, and squat for windows?



Mr. Hayes, can a person search by date or the name who is posting in the
forum?



Old Wolf, is there something about boost lambda that makes it untopical
here? I think it says a hell of a lot about comp sci that when EBDI don't
know was extended to ascii, they included the ever useful char 190: ? and
not lambda, therewith thumbing their noses at the 20th century's greatest
physicist and logician simultaneously. MPJ
 
C

Chris Barts

snip
Thank you again for replies. To Mr. Barts I apologize for the type of
inconsideration that makes me furious. I can, in my defense, only claim
that the theologian Karl Barth is so deeply etched in my mind that my neural
pathways have hardened too much around that spelling. So we have Scheme for
linux, LISP for macs, and squat for windows?

Your misspelling doesn't annoy me, but I do like to see it spelled
correctly.

Both Emacs and Guile will work just fine on Windows, especially versions
newer than Windows 3.11. You need only to search the Internet to find the
files to download (http://www.google.com gives good results). Those tools
may have been born in a Unix environment, but they have not stayed there.
 
M

Mark McIntyre

snip
Thank you again for replies. To Mr. Barts I apologize for the type of
inconsideration that makes me furious. I can, in my defense, only claim
that the theologian Karl Barth is so deeply etched in my mind that my neural
pathways have hardened too much around that spelling. So we have Scheme for
linux, LISP for macs, and squat for windows?

Who knows? This is comp.lang.c
Mr. Hayes, can a person search by date or the name who is posting in the
forum?

Why not try?
Old Wolf, is there something about boost lambda that makes it untopical
here?

Its written in C++. This is comp.lang.c
 
D

Dave Vandervies

Merrill & Michele said:
3) Mr. Vandervies, you don't seriously doubt the inability of C to
make Scott Nudds fly?

I believe the code that the comment in my sig that it appears you
are responding to was made about invoked a relatively tame form of
undefined behavior. There is nothing in the standard defining the
language that directly allows code to make Scott Nudds fly; however,
one of the consequences of the definition of undefined behavior is that
there's nothing in the standard that forbids the compiler from generating
compiled code that does such a thing when presented with source code
that invokes undefined behavior.

Can the same be said of Richard Heathfield and MY
hard drive?

Well, if your implementation was made by a sufficiently talented and
creative implementor, there's nothing in the C standard preventing this
code from making Richard Heathfield fly out of your hard drive:
--------
void main(double **x)
{
int i;
printf("%u%g\n",*x,i);
}
--------
Finding an implementation from a sufficiently talented and creative
implementor (and running on hardware capable of doing such a thing)
is Left As An Exercise.


dave
 
D

Derrick Coetzee

Merrill said:
> Q1) Has anyone seen a treatment of Dr. Church's lambda calculus that
uses C instead of an obscure language designed for logic?

Embedding the lambda calculus in C directly is difficult due to its lack
of closures, but it's relatively trivial to write a lambda calculus
*simulator* in C. You simply create a tagged union of structures, one
for a lambda, one for an application, and one for variables (you may
want one for atoms too), each containing a tag field indicating which
one it is (union semantics allow this), and referencing one another. You
then create some functions to dynamically allocate and initialize the
various types of objects, and a simple recursive evaluation function,
and then you're ready to plug in lambda expressions and watch it go.
 
G

G. S. Hayes

Merrill & Michele said:
So we have Scheme for linux, LISP for macs, and squat for windows?
His example of LISP was on emacs (which is not related to the Apple
Macintosh computer).
Scheme is used by many apps, including the Guile dialect (used in many
GNU programs, including the GIMP Photoshop-style image editing
software) and other dialects.
To the best of my knowledge, all of the above applications will work
on many OSes (including Windows 95/XP/NT, Macintosh OS X, and Linux)
Mr. Hayes, can a person search by date or the name who is posting in the
forum?
Investigate the "Advanced Search" link that is right next to the area
where you enter your search terms.
Try to play around with the options--you won't break anything and you
might learn rather a lot. If you have questions, try the help page at
http://groups.google.com/help/index.html or posting questions at a
google or internet help site rather than here (which is, after all, a
C programming group).
Old Wolf, is there something about boost lambda that is offtopic here
Boost is a C++ library; this newsgroup doesn't deal with C++.
comp.lang.c++ deals with C++, but I don't know if Boost is pure C++
(in which case comp.lang.c++ is the right place to discuss it) or uses
the features of particular platforms (in which case the
platform-specific newsgroup should be used).
 
M

Michael Wojcik

http://groups.google.com/[email protected]

That post has the term "lambda calculus" in it,
in reference to a program called loader.c,
but I don't understand a lot of that post.

It appears from the post (haven't looked at the program myself) that
loader.c implements a particular lambda calculus, but not lambda
calculus in general, and the calculus it does implement is
implemented using a rather compact notation, which is to say it's not
particularly user-friendly. While it looks like an interesting
program, it's probably not what MPJ had in mind, which I imagine was
something more suitable for conveniently evaluating general lambda
calculus expressions.

Other posters have recommended LISP and Scheme, which do fit that
description, and can be implemented in C; but apparently MPJ isn't
looking for another whole programming language implemented in C, but
something that makes it convenient to perform lambda calculus in a C
program (or maybe just an interactive lambda calculus application
written in C?). Which is a perfectly reasonable thing to be looking
for, I suppose.

Sourceforge lists a project called LCI, which is supposed to be a
lambda calculus interpreter written in C; but it says that no files
have been released yet. The project home page[1], on the other hand,
has a link to download a CVS snapshot. Might be worth a look.


1. http://lci.sourceforge.net/
 
M

Michael Wojcik

I think it says a hell of a lot about comp sci that when EBDI don't
know was extended to ascii, they included the ever useful char 190: ? and
not lambda, therewith thumbing their noses at the 20th century's greatest
physicist and logician simultaneously.

What it says is that the development of ASCII was driven by commercial
computing concerns, and not computer science. ASCII (which is not
an "extension" of EBCDIC, if that's what you were referring to) is
a 7-bit code. It had to include upper- and lowercase English letters,
decimal digits, basic punctuation marks, and control codes; with only
128 code points, that doesn't leave a lot of room. You're welcome to
look at some of the documents on the history of ASCII (there are many
available on the net) and second-guess the committees that developed
it, but I don't think you'll get much agreement among computer
programmers, or computer scientists, or even physicists and logicians
that the omission of lambda was either regretable or an insult to
Alonzo Church.

That said, this is off-topic for comp.lang.c. It would be on-topic
for, say, alt.folklore.computers, where such speculations are
welcome.

--
Michael Wojcik (e-mail address removed)

Unfortunately, as a software professional, tradition requires me to spend New
Years Eve drinking alone, playing video games and sobbing uncontrollably.
-- Peter Johnson
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top