Talk:Bootstrapping (compilers)

Latest comment: 2 years ago by 2A00:1FA0:6DC:72AB:ECA7:98CD:74D3:86CF in topic Add an example of mentioned project for gcc

what iscompiler? edit

we the people living in this world use a language to communicate with each other and we use formal language like english. but the computer are electronics machine which understand the machine language in the form or 0 and 1 only. if we have to input some data or program ,that has to be converted in machine language, so a compiler(a program) was written to convert high level language into low level language.

Nope, you've just described the purpose of programming languages (as opposed to raw instructions. --Kjoonlee 16:59, 14 February 2008 (UTC)Reply

succinct statement of bootstrapping (compiler) edit

Recently I (Robert Maas) composed and posted this text on a newsgroup, and Pascal J. Bourguignon approved of it, so I'm thinking this text is succinct enough to appear in this article:

The point of bootstrapping (a compiler) is to provide a non-circular entry point into what would otherwise be a circular definition (a "chicken-egg" conundrum). At the entry point to the fixed-loop, there are two ways to reach that point, one of which is to enter via the bootstrap path, which typically comes from an earlier fixed-loop defined by an earlier version (of the compiler), and the other way to reach that point is to go once around the fixed-loop from itself. Without the bootstrap entry point to that fixed-loop, there's no way to ever have the fixed-loop in the first place.

Somebody expert at WikiPedia want to edit it in somewhere? —Preceding unsigned comment added by 198.144.192.42 (talk) 11:58, 27 July 2008 (UTC)Reply

Relevant Resources edit

Why bootstrap? edit

Why bootstrap? What is to be gained by writing a compiler for a language in its own language? (I found some ideas here but no reliable source).

  • By using a tool, you demonstrate the usefulness of the tool.
  • developers working on the compiler would only need to know the language being compiled. Otherwise developers would need to know the language being compiled as well as the language the compiler is written in.
  • it lets you customize and extend the language without dropping into the base language.

pgr94 (talk) 18:21, 9 October 2009 (UTC)Reply

Found a source: Patrick D. Terry 2007 pgr94 (talk) 20:25, 9 October 2009 (UTC)Reply

Bootstrap once edit

The page is very light on if bootstrapping is supposed to be something you do once(and then e.g. crosscompile), or if you keep it around to bootstrap every version. 88.159.64.210 (talk) 13:23, 26 October 2011 (UTC)Reply

When to bootstrap? edit

When to bootstrap? (I found some ideas here but no reliable source).

  • If the language being written offers utilities that are not found in the "base" language of the compiler, and the language's features are relatively well-suited for a compiler, then bootstrap. Examples for bootstrapping:C++ Examples not to bootstrap: R, MatLab, SQL

pgr94 (talk) 18:21, 9 October 2009 (UTC)Reply

Is Clojure Self-Hosting? edit

Clojure is listed as an example of a self-hosting language in the introduction. As far as I know, Clojure is not yet self-hosting. The Clojure-in-Clojure project aims to change this, but I believe that, at the moment, Clojure uses Java as a host (not the JVM, but the Java language). I am going to change this unless someone cite's a resource stating that Clojure is self-hosting. —Preceding unsigned comment added by Dbmikus (talkcontribs) 04:58, 25 January 2010 (UTC)Reply

Wirth and Pascal edit

IIRC Wirth did a first attempt to a pascal compiler in Fortran. It was never published afaik, and the wellknown seventies Pascal compilers bootstrap from a CDC macro assembler:

From [1] :

"In 1969, a bootstrap compiler using Fortran as the implementation language was completed. Although the compiler was written in Fortran, the idea was to rewrite the compiler in Pascal itself, and so bootstrap the compiler. Wirth called that project unsuccessful, and instead, a Pascal compiler was written in a subset of the full Pascal language and translated by hand to a language called SCALLOP on the CDC 6000 computer, and thus bootstrapped." 88.159.64.210 (talk) 13:23, 26 October 2011 (UTC)Reply

Chicken-and-Egg Problem section is confusing as presented edit

I find the "Chicken-and-Egg Problem" section to be confusing. The enumerated list of "different" ways to solve the problem are mostly really the same thing -- that the initial compiler must be written in some other language. The content of the section is really more like a list of examples of the specific solutions employed by various well-known languages. Maybe the section should be re-formatted to present itself as such, rather than as a list of general solutions to the problem. 99.255.254.57 (talk) 15:42, 7 December 2014 (UTC)Nick PerkinsReply

I agree. It's not as clear as it should be that the fundamental solution is building a compiler in another language.
Please nobody delete the reference to Knuth. Mgb314 (talk) 10:41, 15 April 2016 (UTC)Reply

External links modified edit

Hello fellow Wikipedians,

I have just modified 2 external links on Bootstrapping (compilers). Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:

When you have finished reviewing my changes, please set the checked parameter below to true or failed to let others know (documentation at {{Sourcecheck}}).

This message was posted before February 2018. After February 2018, "External links modified" talk page sections are no longer generated or monitored by InternetArchiveBot. No special action is required regarding these talk page notices, other than regular verification using the archive tool instructions below. Editors have permission to delete these "External links modified" talk page sections if they want to de-clutter talk pages, but see the RfC before doing mass systematic removals. This message is updated dynamically through the template {{source check}} (last update: 18 January 2022).

  • If you have discovered URLs which were erroneously considered dead by the bot, you can report them with this tool.
  • If you found an error with any archives or the URLs themselves, you can fix them with this tool.

Cheers.—InternetArchiveBot (Report bug) 01:53, 6 November 2016 (UTC)Reply

At least some material should be moved to self-hosting article edit

The list List of languages having self-hosting compilers should be moved to Self-hosting_(compilers). Bootstrapping is about the initial process of creating such compilers. There is a list of such compilers in that article that is weaker than the list here. — Preceding unsigned comment added by Timothyclethbridge (talkcontribs) 14:30, 15 August 2019 (UTC)Reply

Add an example of mentioned project for gcc edit

https://stackoverflow.com/a/65708958 2A00:1FA0:6DC:72AB:ECA7:98CD:74D3:86CF (talk) 16:15, 24 November 2021 (UTC)Reply