Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #90569

Re: Advantages of C

From Udyant Wig <udyant.wig@gmail.com>
Newsgroups comp.lang.c
Subject Re: Advantages of C
Date 2016-07-19 11:26 +0530
Organization A noiseless patient Spider
Message-ID <nmkffb$i2c$1@dont-email.me> (permalink)
References (3 earlier) <87k2giivbd.fsf@news.bourguet.org> <nmjht3$jto$1@dont-email.me> <8c16aaf7-46a7-4c64-8133-20b915b19876@googlegroups.com> <87mvlefnvi.fsf@bsb.me.uk> <0dea296b-e65d-401a-ab10-934decf30456@googlegroups.com>

Show all headers | View raw


On 07/19/2016 08:32 AM, Malcolm McLean wrote:
> On Tuesday, July 19, 2016 at 1:55:05 AM UTC+1, Ben Bacarisse wrote:
>> I note you've pulled a sneaky switch -- it's now a "non-trivial
>> program" where before it was a "basic function in Lisp".  Can I
>> assume that you've decided that at least that piece of polemic is
>> untenable?
> 
> Here are two Lisp functions written by Paul Graham
> 
> Here's "not"
> (defun not. (x)
>   (cond (x '())
>         ('t 't)))
> 
> Ok, we can just about make that one out. If x evaluates to true,
> return the empty list. Else if true evaluates to true, return true.
> It's hard to think of a simpler function, however.
> 
> And here's "eval".
> 
> (defun eval. (e a)
>   (cond
>     ((atom e) (assoc. e a))
>     ((atom (car e))
>      (cond
>        ((eq (car e) 'quote) (cadr e))
>        ((eq (car e) 'atom)  (atom   (eval. (cadr e) a)))
>        ((eq (car e) 'eq)    (eq     (eval. (cadr e) a)
>                                     (eval. (caddr e) a)))
>        ((eq (car e) 'car)   (car    (eval. (cadr e) a)))
>        ((eq (car e) 'cdr)   (cdr    (eval. (cadr e) a)))
>        ((eq (car e) 'cons)  (cons   (eval. (cadr e) a)
>                                     (eval. (caddr e) a)))
>        ((eq (car e) 'cond)  (evcon. (cdr e) a))
>        ('t (eval. (cons (assoc. (car e) a)
>                         (cdr e))
>                   a))))
>     ((eq (caar e) 'label)
>      (eval. (cons (caddar e) (cdr e))
>             (cons (list. (cadar e) (car e)) a)))
>     ((eq (caar e) 'lambda)
>      (eval. (caddar e)
>             (append. (pair. (cadar e) (evlis. (cdr e) a))
>                      a)))))
> 
> Now are you seriously telling me that you can give that to an average
> person and expect any type of comprehension about what it is doing?

  Would you also give a random part of a core C library to an "average
  person" and expect any type of comprehension about what it is doing?

  Why would you give it to an "average person" in the first place?

> Considering that it is effectively the Lisp interpreter in self-speak,
> it's a remarkably concise piece of code. But it's just not something
> that is suitable for human beings.

  Is it then meant for superhumans?  I hope you do not mean it is meant
  for subhumans.

> It's too deeply nested, it doesn't create local names to
> auto-document, the flow control is hierarchical rather than linear
> making it hard to dry run.

  It is how _one_ Lisp programmer wrote code meant for instruction.  His
  point, as I understand it, was to only use the primitives of a Lisp to
  build up the core of a small Lisp system; it was pedagogical in
  nature.  Just as K&R did not incorporate error handling in their
  seminal book so that they could focus on teaching the concepts.  But
  they surely knew the value of error handling in real code.
  
-- 
Udyant Wig

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Advantages of C jacobnavia <jacob@jacob.remcomp.fr> - 2016-07-18 17:02 +0200
  Re: Advantages of C BartC <bc@freeuk.com> - 2016-07-18 16:16 +0100
    Re: Advantages of C jacobnavia <jacob@jacob.remcomp.fr> - 2016-07-18 19:13 +0200
    Re: Advantages of C Udyant Wig <udyant.wig@gmail.com> - 2016-07-18 23:56 +0530
  Re: Advantages of C Malcolm McLean <malcolm.mclean5@btinternet.com> - 2016-07-18 08:17 -0700
    Re: Advantages of C jacobnavia <jacob@jacob.remcomp.fr> - 2016-07-18 17:38 +0200
  Re: Advantages of C Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-07-18 16:48 +0100
    Re: Advantages of C jacobnavia <jacob@jacob.remcomp.fr> - 2016-07-18 17:58 +0200
      Re: Advantages of C Richard Heathfield <rjh@cpax.org.uk> - 2016-07-18 17:27 +0100
        Re: Advantages of C Jerry Stuckle <jstucklex@attglobal.net> - 2016-07-18 15:19 -0400
        Re: Advantages of C Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-07-18 21:49 +0100
          Re: Advantages of C Richard Heathfield <rjh@cpax.org.uk> - 2016-07-18 22:06 +0100
            Re: Advantages of C Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-07-19 01:11 +0100
              Re: Advantages of C Richard Heathfield <rjh@cpax.org.uk> - 2016-07-19 01:31 +0100
                Re: Advantages of C Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-07-19 02:29 +0100
                Re: Advantages of C Jerry Stuckle <jstucklex@attglobal.net> - 2016-07-18 21:58 -0400
          Re: Advantages of C Malcolm McLean <malcolm.mclean5@btinternet.com> - 2016-07-18 16:30 -0700
            Re: Advantages of C Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-07-19 02:06 +0100
              Re: Advantages of C Malcolm McLean <malcolm.mclean5@btinternet.com> - 2016-07-18 19:39 -0700
                Re: Advantages of C Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-07-19 15:29 +0100
                Re: Advantages of C Malcolm McLean <malcolm.mclean5@btinternet.com> - 2016-07-19 07:39 -0700
                Re: Advantages of C Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-07-19 17:19 +0100
        Re: Advantages of C luser droog <luser.droog@gmail.com> - 2016-07-18 21:16 -0700
      Re: Advantages of C Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-07-18 22:47 +0100
        Re: Advantages of C Malcolm McLean <malcolm.mclean5@btinternet.com> - 2016-07-18 16:48 -0700
      Re: Advantages of C Ian Collins <ian-news@hotmail.com> - 2016-07-19 10:21 +1200
        Re: Advantages of C raltbos@xs4all.nl (Richard Bos) - 2016-07-23 19:43 +0000
    Re: Advantages of C jacobnavia <jacob@jacob.remcomp.fr> - 2016-07-18 18:05 +0200
      Re: Advantages of C Jean-Marc Bourguet <jm@bourguet.org> - 2016-07-18 21:45 +0200
        Re: Advantages of C BartC <bc@freeuk.com> - 2016-07-18 21:16 +0100
          Re: Advantages of C Udyant Wig <udyant.wig@gmail.com> - 2016-07-19 11:00 +0530
            Re: Advantages of C BartC <bc@freeuk.com> - 2016-07-19 11:00 +0100
              Re: Advantages of C Udyant Wig <udyant.wig@gmail.com> - 2016-07-20 10:08 +0530
        Re: Advantages of C jacobnavia <jacob@jacob.remcomp.fr> - 2016-07-18 23:32 +0200
          Re: Advantages of C Malcolm McLean <malcolm.mclean5@btinternet.com> - 2016-07-18 16:54 -0700
            Re: Advantages of C Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-07-19 01:54 +0100
              Re: Advantages of C Malcolm McLean <malcolm.mclean5@btinternet.com> - 2016-07-18 20:02 -0700
                Re: Advantages of C Udyant Wig <udyant.wig@gmail.com> - 2016-07-19 11:26 +0530
                Re: Advantages of C Malcolm McLean <malcolm.mclean5@btinternet.com> - 2016-07-19 01:43 -0700
                Re: Advantages of C Udyant Wig <udyant.wig@gmail.com> - 2016-07-20 10:33 +0530
                Re: Advantages of C Malcolm McLean <malcolm.mclean5@btinternet.com> - 2016-07-20 01:07 -0700
                Re: Advantages of C Udyant Wig <udyant.wig@gmail.com> - 2016-07-21 12:53 +0530
                Re: Advantages of C Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-07-19 15:33 +0100
                Re: Advantages of C Malcolm McLean <malcolm.mclean5@btinternet.com> - 2016-07-19 08:04 -0700
                Re: Advantages of C Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-07-19 17:35 +0100
              Re: Advantages of C Gareth Owen <gwowen@gmail.com> - 2016-07-19 19:21 +0100
          Re: Advantages of C Jean-Marc Bourguet <jm@bourguet.org> - 2016-07-20 12:05 +0200
        Re: Advantages of C Malcolm McLean <malcolm.mclean5@btinternet.com> - 2016-07-18 16:51 -0700
          Re: Advantages of C raltbos@xs4all.nl (Richard Bos) - 2016-07-23 09:24 +0000
            Re: Advantages of C Malcolm McLean <malcolm.mclean5@btinternet.com> - 2016-07-23 02:33 -0700
      Re: Advantages of C Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-07-18 22:36 +0100
        Re: Advantages of C jacobnavia <jacob@jacob.remcomp.fr> - 2016-07-19 00:00 +0200
          Re: Advantages of C Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-07-19 01:46 +0100
          Re: Advantages of C Gareth Owen <gwowen@gmail.com> - 2016-07-20 19:49 +0100
            Re: Advantages of C supercat@casperkitty.com - 2016-07-20 12:02 -0700
              Re: Advantages of C Keith Thompson <kst-u@mib.org> - 2016-07-20 12:32 -0700
                Re: Advantages of C supercat@casperkitty.com - 2016-07-20 13:18 -0700
              Re: Advantages of C Gareth Owen <gwowen@gmail.com> - 2016-07-20 20:37 +0100
            Re: Advantages of C jadill33@gmail.com - 2016-07-20 13:06 -0700
            Re: Advantages of C jacobnavia <jacob@jacob.remcomp.fr> - 2016-07-20 23:07 +0200
              Re: Advantages of C jadill33@gmail.com - 2016-07-21 09:48 -0700
                Re: Advantages of C jacobnavia <jacob@jacob.remcomp.fr> - 2016-07-22 10:14 +0200
                Re: Advantages of C Ian Collins <ian-news@hotmail.com> - 2016-07-22 20:25 +1200
                Re: Advantages of C Malcolm McLean <malcolm.mclean5@btinternet.com> - 2016-07-22 02:17 -0700
                Re: Advantages of C Ian Collins <ian-news@hotmail.com> - 2016-07-22 23:56 +1200
                Re: Advantages of C jacobnavia <jacob@jacob.remcomp.fr> - 2016-07-22 11:28 +0200
                Re: Advantages of C Ian Collins <ian-news@hotmail.com> - 2016-07-22 23:49 +1200
                Re: Advantages of C jadill33@gmail.com - 2016-07-22 06:46 -0700
        Re: Advantages of C BartC <bc@freeuk.com> - 2016-07-18 23:13 +0100
          Re: Advantages of C Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-07-19 01:45 +0100
    Re: Advantages of C jacobnavia <jacob@jacob.remcomp.fr> - 2016-07-18 19:18 +0200
      Re: Advantages of C Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-07-18 22:47 +0100
        Re: Advantages of C jacobnavia <jacob@jacob.remcomp.fr> - 2016-07-19 00:07 +0200
          Re: Advantages of C Melzzzzz <mel@zzzzz.com> - 2016-07-19 00:18 +0200
            Re: Advantages of C jacobnavia <jacob@jacob.remcomp.fr> - 2016-07-19 01:36 +0200
          Re: Advantages of C Ian Collins <ian-news@hotmail.com> - 2016-07-19 10:28 +1200
            Re: Advantages of C Jerry Stuckle <jstucklex@attglobal.net> - 2016-07-18 20:34 -0400
          Re: Advantages of C Jerry Stuckle <jstucklex@attglobal.net> - 2016-07-18 20:33 -0400
            Re: Advantages of C Malcolm McLean <malcolm.mclean5@btinternet.com> - 2016-07-18 19:30 -0700
        Re: Advantages of C Malcolm McLean <malcolm.mclean5@btinternet.com> - 2016-07-18 17:01 -0700
  Re: Advantages of C Udyant Wig <udyant.wig@gmail.com> - 2016-07-18 23:51 +0530
    Re: Advantages of C Tim Rentsch <txr@alumni.caltech.edu> - 2016-07-20 09:01 -0700

csiph-web