Wikipedia:Reference desk/Archives/Language/2017 October 28
Language desk | ||
---|---|---|
< October 27 | << Sep | October | Nov >> | October 29 > |
Welcome to the Wikipedia Language Reference Desk Archives |
---|
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages. |
October 28
editp.9
editWhy are something like fifty percent of all instances of "p." or "pp." as abbreviations of "page" or "pages" (respectively) in Wikipedia articles followed by a number with no black space before it? Thus instead of
- p. 9
we see
- p.9
Michael Hardy (talk) 06:52, 28 October 2017 (UTC)
- Perhaps because they don't know how to use a non-breaking space.--Shantavira|feed me 06:58, 28 October 2017 (UTC)
- But they could still insert a space. Are half of Wikipedia users under the impression that that is standard usage? Michael Hardy (talk) 21:18, 28 October 2017 (UTC)
- A lot of people seem to be under the impression that there should be no space between abbreviations and numbers—all over WP one sees not just "p.9" stuff but "15km" and the like. Where they are getting that impression I don't know. At least, if people use citation templates for refs, the templates will put a space after "p." or "pp." in citing page numbers. Deor (talk) 21:29, 28 October 2017 (UTC)
- "15km" with no space is pretty much standard in British writing these days, whether it violates SI usage standards or not. I would expect "p9" rather than "p.9" there, though. --69.159.60.147 (talk) 03:58, 30 October 2017 (UTC)
- A lot of people seem to be under the impression that there should be no space between abbreviations and numbers—all over WP one sees not just "p.9" stuff but "15km" and the like. Where they are getting that impression I don't know. At least, if people use citation templates for refs, the templates will put a space after "p." or "pp." in citing page numbers. Deor (talk) 21:29, 28 October 2017 (UTC)
- But they could still insert a space. Are half of Wikipedia users under the impression that that is standard usage? Michael Hardy (talk) 21:18, 28 October 2017 (UTC)
- And thus OP and anyone else reading along can easily fix these when we come across them. It doesn't bother me personally, but I do acknowledge the value of having and consistently applying our MOS. SemanticMantis (talk) 20:09, 28 October 2017 (UTC)
Are all high-level languages translated into the same Machine Language?
editC, C++, C#, Java - those are all high-level languages. Are they all translated into the same Machine Language? Is it possible to translate something from C++ to Java through Machine Language, or does the programmer have to think creatively in that language and create stuff in that language instead of doing any translation work? 50.4.236.254 (talk) 19:29, 28 October 2017 (UTC)
- You might like to read the article compiler. The process is very different from translating between human languages. Each type of processor has its own machine code so the compiler must use only codes that the processor understands. It would be very inefficient to compile from one high-level language to machine code, then try to decompile to another high-level language because decompiling doesn't really create an easily readable version. Programmers would normally just translate from one high-level language to another using their knowledge of both languages. The structures are often different, so things may be done in a different way in different languages, just as in human languages. Dbfirs 19:50, 28 October 2017 (UTC)
- To expand on Dbfirs's response, there are some interesting variations on this.
- Historically, Java, and Python and some Pascal types were not compiled into architecture-specific machine Language. They were compiled into the "machine code" for their respective abstract machines, which then "ran" on an interpreter, not on the actual hardware machine. A Java JAR file contains this "machine code" that can be interpreted (e.g. on a JVM in a browser) and that does not include the original Java source code.
- Originally, C++ was not compiled directly. Instead, the C++ translator converted the C++ into C source code, which was then compiled into machine code.
- GCC (the GNU Compiler Collection) is a suite of compilers for many languages including those you mention. GCC front-ends compile all of the languages into an intermediate abstract "machine code". GCC backends generate machine-specific object code from this intermediate representation. For L languages and M machine types, GCC has L front-ends and M back-ends, not LxM separate compilers. -Arch dude (talk) 00:14, 29 October 2017 (UTC)
- You probably want to ask that question at the computer desk rather than the language desk (which is for human languages). But generally, a program that translates one high-level language to another is called a transpiler. For example, Emscripten translates C and C++ to Javascript, so you can run C and C++ programs in your browser. Transpiler output generally looks like machine-generated gibberish, not anything that a human would want to have to study directly. 173.228.123.121 (talk) 07:03, 30 October 2017 (UTC)