[HN Gopher] Common Lisp names all sixteen binary logic gates
       ___________________________________________________________________
        
       Common Lisp names all sixteen binary logic gates
        
       Author : optimalsolver
       Score  : 43 points
       Date   : 2022-09-11 19:03 UTC (3 hours ago)
        
 (HTM) web link (www.cs.cmu.edu)
 (TXT) w3m dump (www.cs.cmu.edu)
        
       | [deleted]
        
       | tromp wrote:
       | The only thing that stood out to me is that bitwise or is called
       | logior, short for logical _inclusive_ or. As if programmers are
       | not familiar with dozens of other programming languages using
       | plain or...
        
         | samatman wrote:
         | In other words, what C does with absolutely monstrous glyphs,
         | CL does with consistently-named functions. It has logior,
         | lognor, and logxor.
         | 
         | I briefly read that five minutes ago and will probably remember
         | it next week.
        
         | saghm wrote:
         | To be fair, I've often found that outside of programming
         | contexts, people generally use/interpret "or" to mean xor, and
         | otherwise will use more specific language (e.g. "and/or", "X,
         | Y, or both"). It depends on context of course, but I think a
         | big part of it is that it's somewhat common for the options
         | presented to be literally impossible to both hold true (e.g. "I
         | think either team A or B will win the Superbowl this year") or
         | at least can reasonably assumed to be ("Have you decided what
         | to order?" "I think I'm going to get either the steak or the
         | salmon"). I don't think it's crazy to be willing to experiment
         | with thinking outside the box when it comes to naming things
         | given how hard we always talk about coming up with good names
         | is.
        
         | zetalyrae wrote:
         | Explicit is, as they say, better than implicit.
        
         | gavmor wrote:
         | > Work on Common Lisp started in 1981 (wikipedia)
         | 
         | Is it possible that, then, programmers were _not_ familiar with
         | dozens of other languages? I notice this about the R language
         | (1993), a derivation of S (1976): it is like a language from an
         | alternate timeline in which syntax settled on other conventions
         | but, at the time, the question wasn 't closed.
        
         | thefifthsetpin wrote:
         | Common lisp is from 1980.
        
           | [deleted]
        
         | zem wrote:
         | it keeps the naming scheme consistent
        
       | phoe-krk wrote:
       | To save everyone a click:                   integer1        0
       | 0       1       1          integer2        0       1       0
       | 1       Operation Performed
       | ----------------------------------------------------------------
       | boole-clr       0       0       0       0       always 0
       | boole-set       1       1       1       1       always 1
       | boole-1         0       0       1       1       integer1
       | boole-2         0       1       0       1       integer2
       | boole-c1        1       1       0       0       complement of
       | integer1          boole-c2        1       0       1       0
       | complement of integer2          boole-and       0       0       0
       | 1       and          boole-ior       0       1       1       1
       | inclusive or          boole-xor       0       1       1       0
       | exclusive or          boole-eqv       1       0       0       1
       | equivalence (exclusive nor)          boole-nand      1       1
       | 1       0       not-and          boole-nor       1       0
       | 0       0       not-or          boole-andc1     0       1       0
       | 0       and complement of integer1 with integer2          boole-
       | andc2     0       0       1       0       and integer1 with
       | complement of integer2          boole-orc1      1       1       0
       | 1       or complement of integer1 with integer2          boole-
       | orc2      1       0       1       1       or integer1 with
       | complement of integer2
        
         | zachbeane wrote:
         | Also, some context from comp.lang.lisp is available at
         | https://www.xach.com/naggum/articles/3250122499743574%40nagg...
        
       | math-dev wrote:
       | Marvellous language
        
       ___________________________________________________________________
       (page generated 2022-09-11 23:00 UTC)