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


Groups > comp.lang.c > #83979

Re: OT: One of Anton's papers makes Hacker News

From Keith Thompson <kst-u@mib.org>
Newsgroups comp.lang.forth, comp.lang.c
Subject Re: OT: One of Anton's papers makes Hacker News
Followup-To comp.lang.c
Date 2016-03-14 22:30 -0700
Organization None to speak of
Message-ID <lnmvq0i9yw.fsf@kst-u.example.com> (permalink)
References (13 earlier) <nc59dq$5bk$1@dont-email.me> <ln60wplotj.fsf@kst-u.example.com> <nc7esp$tsi$1@dont-email.me> <lny49kiqyc.fsf@kst-u.example.com> <nc7m5h$ckk$1@dont-email.me>

Cross-posted to 2 groups.

Followups directed to: comp.lang.c

Show all headers | View raw


Bernd Paysan <bernd.paysan@gmx.de> writes:
> Am Mon, 14 Mar 2016 16:23:55 -0700 schrieb Keith Thompson:
>> Bernd Paysan <bernd.paysan@gmx.de> writes:
>> I'll accept that it wasn't intended as an insult.  You could have made
>> your point without telling me that I'm "not familiar with human
>> expressions".
>
> Or the fact that humans have floppy, imprecise expressions, which you can 
> either willfully twist words in the mouth, or cooperatively give a 
> meaningful interpretation.  You have shown a very narrow understanding of 
> what "portable assembler" could possibly mean, and based on that narrow 
> understanding, you come to the conclusion that C isn't.

You have shown an understanding of what an "assembler" is that (a)
differs from mine, and (b) is, in my opinion, less useful than the
understanding I have of the word.

>> You seem to be saying that the word "assembler" has no specific meaning,
>> therefore it's acceptable to refer to C as an "assembler".
>
> It has a specific meaning. An assembler is a low-level programming 
> language that directly corresponds to particular machine language 
> instructions.  Now, of course, that excludes "portable", therefore, if 
> you want a "portable assembler", what do you get, what particular 
> properties do you have to remove from an assembler to fit?

For a moment, I thought you were agreeing that C is not an assembler.

C code does not directly correspond to machine language instructions.

Does i++ correspond to an "INC" instruction?  What if the target CPU
doesn't have an "INC" instruction?

> You get a low-level programming language, where the operations correspond 
> closely to machine instructions (in so far that most of them can be 
> translated into single instructions on most CPUs), but abstracting from 
> the actual mnemonics and the actual number and names of registers 
> (because those two are clearly non-portable attributes of assemblers), 
> and allow the compiler to reschedule the instructions for higher ILP 
> following an "as-if" rule (similar to the as-if rules of OoO execution 
> CPUs).
>
> C IMHO is such a language.  There are others, but less popular ones.

C abstracts away the actual mnemonics, the number and names of
registers, *and the CPU instructions*.

An assembler translates a symbolic representation of machine code into
machine code.  Some assemblers include macro facilities, but what
distinguishes an assembler from a compiler is that the assembly source
code completely specifies the sequence of CPU instructions in the
generated binary.

C doesn't do that.

I can imagine an actual "portable assembler", where the input program
specifies (for the most part) one CPU instruction per line, and the
assembler can translate it to different target instruction sets.
Register sets vary, so the choice of registers would have to be done by
the assembler, not by the programmer.  I don't know whether such a thing
has ever been done, or whether it would be useful.  But it wouldn't look
much like C.

>> In my opinion, the phrase "portable assembler" is based on a
>> misunderstanding of what C and assembly languages are.
>
> And my opinion is that you are misunderstanding what "portable assembler" 
> wants to express, and use that straw man to argue that it is not.

I think I have a pretty good idea what people who use the phrase
"portable assembler" are trying to express.  I just happen to think that
it's an incorrect use of the word "assembler".  Calling C an "assembler"
makes the word "assembler" less useful, because it no longer expresses a
particularly useful concept.

>                                                                    IMHO 
> you should try to understand what somebody who's looking for a "portable 
> assembler" actually wants: He wants to rewrite his non-portable assembler 
> code in a portable language, and still get similar output in terms of 
> performance and functionality, so the expressiveness of the "portable 
> assembler" should be roughly equal to that of an actual assembler plus 
> underlying machine model, and the compiler should produce similar code 
> quality as an assembler.

Someone who wants to rewrite his non-portable assembler code in a
portable language can do so by rewriting it *in a non-assembler
language* such as C.

>> To some extent, C was designed to replace assembly language.  That
>> doesn't mean that it is one -- any more than an automobile is a kind of
>> horse.
>
> But of course an automobile is a kind of carriage, just one with no 
> horse.  If people have demand for "a horse that does not eat hay and shit 
> on the road", you would argue that a car is not that replacement, because 
> you can't make horse meat out of it.  Have they asked for horse meat?  
> No, though they didn't specify very precise requirements.  Just "not eat 
> hay and not shit on the road".

Sure, it's a kind of carriage, but it's still not a horse.

> And "is a" in logic is a relationship which allows multiple terms to 
> apply on the left hand for the same right hand (property).  A programming 
> language can be both a portable assembler *and* a functional and object 
> oriented high-level language.  JavaScript with asm.js would be an example 
> of such a language which is both.

I'm not familiar with asm.js, so I can't comment intelligently on it.
From what little I've seen (a quick glance at the FAQ while writing
this), I'd say it's analagous to an assembler, but it isn't one.

[...]

> This is really way too much discussion about hermeneutics, and bogs down 
> to why I wrote "you don't understand enough about human expressions":  
> Assume that people produce statements with coherent meanings.  If your 
> interpretation of their words result in incoherent meanings, hermeneutics 
> suggests that you should adjust your interpretation.

If someone uses a phrase incorrectly, it's useful to understand what
they actually meant by it, but it's also useful to use the phrase
correctly.

People commonly say that C arrays are really pointers.  I understand,
more or less, what they mean by that.  But I'm not going to adjust my
interpretation, because C arrays simply are not pointers.

[...]

I've redirected followups to comp.lang.c.  If you want to continue this
discussion in comp.lang.forth for some reason, you can override it.

-- 
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something.  This is something.  Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"

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


Thread

Re: OT: One of Anton's papers makes Hacker News Albert van der Horst <albert@spenarnc.xs4all.nl> - 2016-03-13 12:27 +0000
  Re: OT: One of Anton's papers makes Hacker News raltbos@xs4all.nl (Richard Bos) - 2016-03-13 13:50 +0000
    Re: OT: One of Anton's papers makes Hacker News Albert van der Horst <albert@spenarnc.xs4all.nl> - 2016-03-13 19:52 +0000
      Re: OT: One of Anton's papers makes Hacker News Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-03-13 16:08 -0400
      Re: OT: One of Anton's papers makes Hacker News Keith Thompson <kst-u@mib.org> - 2016-03-13 13:40 -0700
        Re: OT: One of Anton's papers makes Hacker News Bernd Paysan <bernd.paysan@gmx.de> - 2016-03-14 00:41 +0000
          Re: OT: One of Anton's papers makes Hacker News Keith Thompson <kst-u@mib.org> - 2016-03-13 18:23 -0700
            Re: OT: One of Anton's papers makes Hacker News Bernd Paysan <bernd.paysan@gmx.de> - 2016-03-14 02:59 +0000
              Re: OT: One of Anton's papers makes Hacker News Keith Thompson <kst-u@mib.org> - 2016-03-13 20:29 -0700
                Re: OT: One of Anton's papers makes Hacker News Bernd Paysan <bernd.paysan@gmx.de> - 2016-03-14 22:44 +0000
                Re: OT: One of Anton's papers makes Hacker News Keith Thompson <kst-u@mib.org> - 2016-03-14 16:23 -0700
                Re: OT: One of Anton's papers makes Hacker News Jan Coombs <jenfhaomndgfwutc@murmic.plus.com> - 2016-03-14 23:55 +0000
                Re: OT: One of Anton's papers makes Hacker News Keith Thompson <kst-u@mib.org> - 2016-03-14 17:19 -0700
                Re: OT: One of Anton's papers makes Hacker News Malcolm McLean <malcolm.mclean5@btinternet.com> - 2016-03-15 03:06 -0700
                Re: OT: One of Anton's papers makes Hacker News Keith Thompson <kst-u@mib.org> - 2016-03-15 08:47 -0700
                Re: OT: One of Anton's papers makes Hacker News Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-03-15 11:59 -0400
                Re: OT: One of Anton's papers makes Hacker News Malcolm McLean <malcolm.mclean5@btinternet.com> - 2016-03-15 09:34 -0700
                Re: OT: One of Anton's papers makes Hacker News supercat@casperkitty.com - 2016-03-15 11:17 -0700
                Re: OT: One of Anton's papers makes Hacker News Jerry Stuckle <jstucklex@attglobal.net> - 2016-03-15 12:41 -0400
                Re: OT: One of Anton's papers makes Hacker News Malcolm McLean <malcolm.mclean5@btinternet.com> - 2016-03-15 10:54 -0700
                Re: OT: One of Anton's papers makes Hacker News supercat@casperkitty.com - 2016-03-15 11:18 -0700
                Re: OT: One of Anton's papers makes Hacker News Jerry Stuckle <jstucklex@attglobal.net> - 2016-03-15 14:42 -0400
                Re: OT: One of Anton's papers makes Hacker News supercat@casperkitty.com - 2016-03-15 11:54 -0700
                Re: OT: One of Anton's papers makes Hacker News Jerry Stuckle <jstucklex@attglobal.net> - 2016-03-15 16:11 -0400
                Re: OT: One of Anton's papers makes Hacker News Jerry Stuckle <jstucklex@attglobal.net> - 2016-03-15 16:13 -0400
                Re: OT: One of Anton's papers makes Hacker News Robert Wessel <robertwessel2@yahoo.com> - 2016-03-15 16:18 -0500
                Re: OT: One of Anton's papers makes Hacker News Stephen Sprunk <stephen@sprunk.org> - 2016-03-15 15:37 -0500
                Re: OT: One of Anton's papers makes Hacker News Jerry Stuckle <jstucklex@attglobal.net> - 2016-03-15 16:42 -0400
                Re: OT: One of Anton's papers makes Hacker News Robert Wessel <robertwessel2@yahoo.com> - 2016-03-14 19:26 -0500
                Re: OT: One of Anton's papers makes Hacker News Bernd Paysan <bernd.paysan@gmx.de> - 2016-03-15 00:48 +0000
                Re: OT: One of Anton's papers makes Hacker News Keith Thompson <kst-u@mib.org> - 2016-03-14 22:30 -0700
                Re: OT: One of Anton's papers makes Hacker News anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-03-15 07:23 +0000
                Re: OT: One of Anton's papers makes Hacker News Albert van der Horst <albert@spenarnc.xs4all.nl> - 2016-03-15 10:09 +0000
                Re: OT: One of Anton's papers makes Hacker News Richard Damon <Richard@Damon-Family.org> - 2016-03-15 08:19 -0400
                Re: OT: One of Anton's papers makes Hacker News Keith Thompson <kst-u@mib.org> - 2016-03-15 08:56 -0700
                Re: OT: One of Anton's papers makes Hacker News Albert van der Horst <albert@spenarnc.xs4all.nl> - 2016-03-15 19:33 +0000
                Re: OT: One of Anton's papers makes Hacker News Rosario19 <Ros@invalid.invalid> - 2016-03-17 09:46 +0100
                Re: OT: One of Anton's papers makes Hacker News Jerry Stuckle <jstucklex@attglobal.net> - 2016-03-17 09:37 -0400
                Re: OT: One of Anton's papers makes Hacker News Rosario19 <Ros@invalid.invalid> - 2016-03-17 18:40 +0100
                Re: OT: One of Anton's papers makes Hacker News Jerry Stuckle <jstucklex@attglobal.net> - 2016-03-17 13:53 -0400
                Re: OT: One of Anton's papers makes Hacker News supercat@casperkitty.com - 2016-03-17 11:53 -0700
                Re: OT: One of Anton's papers makes Hacker News Jerry Stuckle <jstucklex@attglobal.net> - 2016-03-17 19:58 -0400
                Re: OT: One of Anton's papers makes Hacker News Rosario19 <Ros@invalid.invalid> - 2016-03-17 18:37 +0100
                Re: OT: One of Anton's papers makes Hacker News Albert van der Horst <albert@spenarnc.xs4all.nl> - 2016-03-18 14:36 +0000
                Re: OT: One of Anton's papers makes Hacker News Tim Rentsch <txr@alumni.caltech.edu> - 2016-03-18 08:14 -0700
              Re: OT: One of Anton's papers makes Hacker News David Brown <david.brown@hesbynett.no> - 2016-03-14 09:17 +0100
                Re: OT: One of Anton's papers makes Hacker News supercat@casperkitty.com - 2016-03-14 14:14 -0700
                Re: OT: One of Anton's papers makes Hacker News Malcolm McLean <malcolm.mclean5@btinternet.com> - 2016-03-14 14:26 -0700
                Re: OT: One of Anton's papers makes Hacker News supercat@casperkitty.com - 2016-03-14 14:46 -0700
                Re: OT: One of Anton's papers makes Hacker News David Brown <david.brown@hesbynett.no> - 2016-03-15 10:39 +0100
                Re: OT: One of Anton's papers makes Hacker News David Brown <david.brown@hesbynett.no> - 2016-03-15 10:38 +0100
                Re: OT: One of Anton's papers makes Hacker News supercat@casperkitty.com - 2016-03-15 07:47 -0700
                Re: OT: One of Anton's papers makes Hacker News Bernd Paysan <bernd.paysan@gmx.de> - 2016-03-14 22:56 +0000
                Re: OT: One of Anton's papers makes Hacker News Robert Wessel <robertwessel2@yahoo.com> - 2016-03-14 20:00 -0500
                Re: OT: One of Anton's papers makes Hacker News David Brown <david.brown@hesbynett.no> - 2016-03-15 11:22 +0100
            Re: OT: One of Anton's papers makes Hacker News Malcolm McLean <malcolm.mclean5@btinternet.com> - 2016-03-14 00:43 -0700
              Re: OT: One of Anton's papers makes Hacker News Richard Heathfield <rjh@cpax.org.uk> - 2016-03-14 08:06 +0000
            Re: OT: One of Anton's papers makes Hacker News supercat@casperkitty.com - 2016-03-14 14:01 -0700
              Re: OT: One of Anton's papers makes Hacker News Keith Thompson <kst-u@mib.org> - 2016-03-14 14:55 -0700
                Re: OT: One of Anton's papers makes Hacker News supercat@casperkitty.com - 2016-03-14 15:17 -0700
                Re: OT: One of Anton's papers makes Hacker News raltbos@xs4all.nl (Richard Bos) - 2016-03-14 22:40 +0000
                Re: OT: One of Anton's papers makes Hacker News Jerry Stuckle <jstucklex@attglobal.net> - 2016-03-14 20:12 -0400
                Re: OT: One of Anton's papers makes Hacker News Keith Thompson <kst-u@mib.org> - 2016-03-14 16:17 -0700
                Re: OT: One of Anton's papers makes Hacker News supercat@casperkitty.com - 2016-03-14 23:28 -0700
                Re: OT: One of Anton's papers makes Hacker News Keith Thompson <kst-u@mib.org> - 2016-03-15 00:05 -0700
                Re: OT: One of Anton's papers makes Hacker News Richard Heathfield <rjh@cpax.org.uk> - 2016-03-15 08:29 +0000
          Re: OT: One of Anton's papers makes Hacker News raltbos@xs4all.nl (Richard Bos) - 2016-03-14 22:38 +0000
      Re: OT: One of Anton's papers makes Hacker News Randy Howard <rhoward.mx@EverybodyUsesIt.com> - 2016-03-14 01:40 -0500
    Re: OT: One of Anton's papers makes Hacker News fir <profesor.fir@gmail.com> - 2016-03-15 09:24 -0700

csiph-web