Web Images Videos Maps News Shopping Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
John Backus and function level programming
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  8 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
gavino  
View profile  
(2 users)  More options Mar 3, 4:49 am
Newsgroups: comp.lang.lisp
From: gavino <gavcom...@gmail.com>
Date: Tue, 3 Mar 2009 01:49:21 -0800 (PST)
Local: Tues, Mar 3 2009 4:49 am
Subject: John Backus and function level programming
Hello I was wondering if lispers even implemented the Ideas john
backus had about function level progarmming...there does not seem to
be an implementation of his ideas on the web and since lisp is good at
implementing paradigms of programming I was curious.
http://www.archive.org/details/JohnBack1987

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Pascal J. Bourguignon  
View profile  
 More options Mar 3, 8:26 am
Newsgroups: comp.lang.lisp
From: p...@informatimago.com (Pascal J. Bourguignon)
Date: Tue, 03 Mar 2009 14:26:22 +0100
Local: Tues, Mar 3 2009 8:26 am
Subject: Re: John Backus and function level programming

gavino <gavcom...@gmail.com> writes:
> Hello I was wondering if lispers even implemented the Ideas john
> backus had about function level progarmming...

There's already higher level functions in lisp.  For example (see the
paper of which the url is given below), insert is reduce, apply-to-all
is mapcar & apply.  So you can easily write your functions in
functional style:

(defmacro compose (&rest functions)
  (labels ((compose-sexp (functions var)
             (cond
               ((null functions) var)
               ((symbolp (car functions))
                (list (car functions) (compose-sexp (cdr functions) var)))
               (t
                (list 'funcall (car functions) (compose-sexp (cdr functions) var))))))
    `(lambda (x) ,(compose-sexp functions 'x))))

(defmacro define (name expression)
  `(progn (setf (symbol-function ',name) ,expression)
          (setf (documentation ',name 'function)
                ',(format nil "~S is a function defined with DEFINE~%Source: ~S"
                          name expression))
          ',name))

;; These ones still use parameters; you only need to write more utility functions
;; to be able to easily write them in functional style too.
(defun transpose    (x) (apply (function mapcar) (function list) x))
(defun apply-to-all (f) (lambda (x) (mapcar (lambda (y) (apply f y)) x)))
(defun insert       (f) (lambda (x) (reduce f x)))

;; Here is inner-product = (insert +) o (apply-to-all x) o transpose

(define inner-product
    (compose (insert (function +))  (apply-to-all (function *))  transpose))

(inner-product '((1 2 3) (4 5 6)))
 --> 32

> there does not seem to
> be an implementation of his ideas on the web

Yes, some stuff is not on the web, you have to work them out yourself if you want them.

> and since lisp is good at
> implementing paradigms of programming I was curious.
> http://www.archive.org/details/JohnBack1987

Read the corresponding paper:
http://www.thocp.net/biographies/papers/backus_turingaward_lecture.pdf
and implement the utility routines that are missing in CL.

--
__Pascal Bourguignon__


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
William James  
View profile  
(1 user)  More options Mar 3, 12:48 pm
Newsgroups: comp.lang.lisp
From: "William James" <>
Date: 3 Mar 2009 17:48:43 GMT
Local: Tues, Mar 3 2009 12:48 pm
Subject: Re: John Backus and function level programming

Pascal J. Bourguignon wrote:
> ;; Here is inner-product = (insert +) o (apply-to-all x) o transpose

> (define inner-product
>     (compose (insert (function +))  (apply-to-all (function *))
> transpose))

> (inner-product '((1 2 3) (4 5 6)))
>  --> 32

Clojure:

user=> (defn inner-product [x] (apply + (apply map * x)))

user=> (inner-product '((1 2 3) (4 5 6)))
32


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
André Thieme  
View profile  
 More options Mar 3, 1:40 pm
Newsgroups: comp.lang.lisp
From: André Thieme <address.good.until.2009.may...@justmail.de>
Date: Tue, 03 Mar 2009 19:40:11 +0100
Local: Tues, Mar 3 2009 1:40 pm
Subject: Re: John Backus and function level programming
William James schrieb:

It’s not very typical for Clojure users to use Lists here.
(inner-product [[1 2 3] [4 5 6]]) is fine and one quote shorter.

André
--
Lisp is not dead. It’s just the URL that has changed:
http://clojure.org/


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Xah Lee  
View profile  
(4 users)  More options Mar 3, 10:47 pm
Newsgroups: comp.lang.lisp, comp.lang.functional, comp.lang.scheme
From: Xah Lee <xah...@gmail.com>
Date: Tue, 3 Mar 2009 19:47:07 -0800 (PST)
Local: Tues, Mar 3 2009 10:47 pm
Subject: Re: John Backus and function level programming
On Mar 3, 5:26 am, p...@informatimago.com (Pascal J. Bourguignon)
wrote:

> gavino <gavcom...@gmail.com> writes:
> > Hello I was wondering if lispers even implemented the Ideas john
> > backus had about function level progarmming...

> There's already higher level functions in lisp.  For example (see the
> paper of which the url is given below), insert is reduce, apply-to-all
> is mapcar & apply.  So you can easily write your functions in
> functional style:

Boy, lisp IDIOTS are quick.

Lisp does not do functional level programing. Can't. Nor does almost
all the well known functional langs such as Ocaml, Haskell,
Mathematica.

See:
http://en.wikipedia.org/wiki/Function-level_programming

I learned about it last year. See:
http://groups.google.com/group/comp.lang.lisp/browse_frm/thread/87935...

I quote:

hard to summarize in one sentence... but basically like functional
programing but with one characteristic formalism that sets it apart,
namely: creation of functions are limited to a particular set of
higher-order functions, and you cannot arbitrary birth functions
(e.g.  the moronicity of lisp's macros).

The force of this particular formalism is that it makes it more
subject to mathematical analysis (and thus makes it more powerful and
flexible), similar to for example to the clear separation of features
in 2nd order logic from first order logic. Wikipedia said it best,
quote:

«This restriction means that functions in FP are a module (generated
by the built-in functions) over the algebra of functional forms, and
are thus algebraically tractable. For instance, the general question
of equality of two functions is equivalent to the halting problem, and
is undecidable, but equality of two functions in FP is just equality
in the algebra, and thus (Backus imagines) easier.»

«Even today, many users of lambda style languages often misinterpret
Backus' function-level approach as a restrictive variant of the lambda
style, which is a de facto value-level style. In fact, Backus would
not have disagreed with the 'restrictive' accusation: he argued that
it was precisely due to such restrictions that a well-formed
mathematical space could arise, in a manner analogous to the way
structured programming limits programming to a restricted version of
all the control-flow possibilities available in plain, unrestricted
unstructured programs.»

--------------------------------

This thread, illustrates, how often comp lang fanatics propagate
patently false things, in their fanaticism. This, includes those
lispers who are regulars at comp.lang.lisp. (other similar issues, is
how lisp syntax is regular, and how lisp are adept at lisp
manipulation)

  Xah
http://xahlee.org/



    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
namekuseijin  
View profile  
 More options Mar 4, 1:54 am
Newsgroups: comp.lang.lisp, comp.lang.functional, comp.lang.scheme
From: namekuseijin <namekusei...@gmail.com>
Date: Tue, 3 Mar 2009 22:54:52 -0800 (PST)
Local: Wed, Mar 4 2009 1:54 am
Subject: Re: John Backus and function level programming
Codd and Backus were brilliant men, but their ideas are not that much
practical, being set more like a high standard against which to
measure practical implementations of crippled down versions of said
ideas.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
namekuseijin  
View profile  
 More options Mar 4, 1:55 am
Newsgroups: comp.lang.lisp
From: namekuseijin <namekusei...@gmail.com>
Date: Tue, 3 Mar 2009 22:55:51 -0800 (PST)
Local: Wed, Mar 4 2009 1:55 am
Subject: Re: John Backus and function level programming
On Mar 3, 2:48 pm, "William James" <> wrote:

See, guys?  He's already half way to Lisp from Ruby. ;)

didn't take that long...


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Pillsy  
View profile  
 More options Mar 4, 7:43 am
Newsgroups: comp.lang.lisp, comp.lang.functional, comp.lang.scheme
From: Pillsy <pillsb...@gmail.com>
Date: Wed, 4 Mar 2009 04:43:14 -0800 (PST)
Local: Wed, Mar 4 2009 7:43 am
Subject: Re: John Backus and function level programming
On Mar 3, 10:47 pm, Xah Lee <xah...@gmail.com> wrote:
[...]

> Lisp does not do functional level programing. Can't. Nor does almost
> all the well known functional langs such as Ocaml, Haskell,
> Mathematica.
[...]
> hard to summarize in one sentence... but basically like functional
> programing but with one characteristic formalism that sets it apart,
> namely: creation of functions are limited to a particular set of
> higher-order functions, and you cannot arbitrary birth functions
> (e.g.  the moronicity of lisp's macros).

This is a silly objection. There are quite a few languages where it's
not all that hard to limit yourself to a small set of operators via
one namespacing mechanism or another. Common Lisp's packages (or
Mathematica's virtually identical "contexts") would certainly be
adequate for the task.

And yeah, you don't need to have DEFMACRO in your function-level
programming package either. Why would you?

Cheers,
Pillsy


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google