I keep seeing "bootstrapping" mentioned in discussions of application development. It seems both widespread and important, but I've yet to come across even a poor explanation of what bootstrapping actually is; rather, it seems as though everyone is just supposed to know what it means. I don't, though. Near as I can figure, it has something to do with initialization tasks required of an application upon launch, but I could be completely wrong about that. Can anyone help me to understand this idea?


参见维基百科关于引导的文章。

有一个部分和链接解释了它在计算中的含义。它在这个领域有四种不同的用途。

这里有一些引用,但要更深入的解释和其他含义,请参考上面的链接。

"...是一种技术,通过一种简单的计算机程序激活一个更复杂的程序系统。” “自举一词的另一种用法是使用编译器来编译自己,首先用现有语言编写一种新编程语言的编译器的一小部分,然后用新语言编写更多的新编译器程序。”


“Bootstrapping”来源于“靠自己的力量把自己拉起来”这个词。这些你可以从维基百科上得到。

在计算中,引导加载程序是机器启动时运行的第一段代码,负责加载操作系统的其余部分。在现代计算机中,它存储在ROM中,但我记得PDP-11上的引导过程,你可以通过前面板开关插入位来将特定的磁盘段加载到内存中,然后运行它。不用说,引导加载程序通常非常小。

“Bootstrapping”也被用作一个术语,用于构建一个使用自身的系统——或者更准确地说,是一个前身版本。例如,ANTLR版本3使用在ANTLR版本2中开发的解析器编写。


为了完整起见,它也是统计学中一个相当重要的(相对较新的)方法,它使用重采样/模拟从样本中推断总体属性。它在维基百科上有一篇关于自我引导(统计)的长篇文章。


在应用程序开发的上下文中,“引导”通常在讨论模块化和/或自动更新软件时出现。

而不是用户下载整个应用程序,包括他不需要的功能,并重新下载和手动更新它,只要有更新,用户只下载和启动一个小的“引导”可执行文件,它反过来下载和安装用户需要的应用程序的那些部分。此外,引导组件能够在每次启动时查找更新并安装它们。


亚历克斯,这和你的电脑启动时做的差不多。('Booting' a computer实际上来自于单词bootstrapping)

最初,运行BIOS中的小程序。它包含足够的机器代码来加载和运行一个更大、更复杂的程序。

第二个程序可能是类似于NTLDR(在Windows中)或LILO(在Linux中)的程序,然后执行并能够加载,然后运行操作系统的其余部分。


在一些web框架中有一个引导的例子。你调用index.php (bootstrapper),然后它加载框架的助手、模型、配置,然后加载控制器并将控制权传递给它。

正如您所看到的,这是一个启动大进程的简单文件。


Boot strapping the dictionary meaning is to start up with minimum resources. In the Context of an OS the OS should be able to swiftly load once the Power On Self Test (POST) determines that its safe to wake up the CPU. The boot strap code will be run from the BIOS. BIOS is a small sized ROM. Generally it is a jump instruction to the set of instructions which will load the Operating system to the RAM. The destination of the Jump is the Boot sector in the Hard Disk. Once the bios program checks it is a valid Boot sector which contains the starting address of the stored OS, ie whether it is a valid MBR (Master Boot Record) or not. If its a valid MBR the OS will be copied to the memory (RAM)from there on the OS takes care of Memory and Process management.


就使用流行的Twitter Bootstrap而言,我觉得这种类型的Bootstrap是一种将模块化组件集成到Web应用程序中的操作,而Web应用程序甚至不必在需要或引用它之前承认模块化组件的存在。

开发人员只需将CSS Twitter Bootstrap主题的默认副本加载(引用)到Web应用程序中,就可以无缝地集成它。Vuola !然后,您可能需要重写其中的一些更改,但是您可以这样做,即资源/组件不受影响,并且完全可重用。

Web开发人员如何实现jQuery api等也是同样的概念,但开发人员并没有真正表示为引导本身。它所做的是提高灵活性和可重用性,同时允许应用程序的不同组件/资源的隔离自由驻留在同一服务器或CDN上。

注意:在计算引导处理MBR,在UNIX中,它需要一个特殊的引导加载程序或管理器,这是ROM中的一个小程序,将操作系统加载到RAM中。如果你想一下,同样的概念发生在引导加载程序检查MBR并根据这个表加载操作系统的动作中,而操作系统对此一无所知。


恕我冒昧,没有比第一个编译器是如何编写的更好的解释了?

现在,操作系统加载是最常见的过程,称为引导


As a humble beginner in the world of programming, and flicking through all the answers here after seeing this word used a lot in apparently slightly different ways in different places, I found reading the Wikipedia page on Bootstrapping (duh! I didn't think of it either at first) is very informative to understand differences in use of this word. Could it be......on extremely rare occasions......Wikipedia might even have better explanations of certain terms than....(redacted)? Will they bring in rep points on Wikipedia though?

对我来说,似乎所有的意义都与:从尽可能简单的东西开始,用Thing2做一些稍微复杂的东西,现在你可以用Thing2比原来的Thing1更有效、更快地完成某些任务。然后从第二件事重复到第三件事,直到无限……

I see it as closely connected to both biological evolution and 'Layers of Abstraction' (newbies like me see, ahem, Wikipedia, cough) - the evolution from 1940's computers with switches, machine code, Assembly, C, Python, AIs you can give all kinds of complex instructions to like "make the %4^% dinner to my default &^$% requirements and clean the floor you %$£"@:~" in drunken slang English or Amazon tribal dialect without them 'raising an exception' (for newbies again...you guessed it) - missed out lot of links there due to simple ignorance.

那么在某些特定的软件意义上: 含义1:Thing1用于加载Thing2的最新版本(因为Thing2当然会比Thing1大,就像Thing3会比Thing2大一样)。

Meaning2: Thing1 is a lower level language (closer to 1001011100....011001 than print("Hello, ", user.name)) used to write a little bit of the higher language of Thing2, then this little bit of Thing2 is used to expand Thing2 itself from baby vocabulary level towards adult vocabulary level (Thing2 starts to be processed, or to use correct technical term 'compiled', by the baby version of itself (it's a clever baby!), whereas the baby version of Thing2 itself could of course only be compiled by Thing1, cause it can't exist before it exists, right duh!), then child version of Thing2 compiles Surly Teenager version of Thing2, at which point programming community decides whether Surly Teenager's 'issues' (software term and metaphor term!) are worth spending enough time resolving to be accepted long term, or to abandon them to (not sure where to take the analogy here).

如果是,那么Thing2已经“bootstrap”自己(可能有几次)从婴儿到成年:“孩子是男人的父亲”(华兹华斯,建议不要试图在Stack Overflow上查找引用或作者)。


术语“自举”通常适用于系统依赖自身启动的情况,有点像鸡和蛋的问题。

例如:

如何编译用C编写的C编译器? 如果操作系统还没有运行,如何启动操作系统初始化进程? 如何启动一个分布式(点对点)系统,在这个系统中,客户端依赖于它们当前已知的对等点来查找系统中的新对等点?

在这种情况下,bootstrapping指的是一种打破循环依赖关系的方法,通常借助外部实体的帮助。

您可以使用另一个C编译器来编译(引导)您自己的编译器,然后您可以使用它来重新编译自己 您使用一段单独的代码来设置初始进程,而不依赖于操作系统提供的任何函数 您使用硬编码的初始对等体列表或提供对等体列表的硬编码跟踪器URL

etc.


除了它在软件开发中的应用(例如kdgregory给出的答案)和Dirk Eddelbuettel所讨论的在统计学中的应用之外,在强化学习的上下文中,Bootstrapping还有另一个对开发人员有用的含义。

来自萨顿和巴托:

Widrow, Gupta, and Maitra (1973) modified the Least-Mean-Square (LMS) algorithm of Widrow and Hoff (1960) to produce a reinforcement learning rule that could learn from success and failure signals instead of from training examples. They called this form of learning “selective bootstrap adaptation” and described it as “learning with a critic” instead of “learning with a teacher.” They analyzed this rule and showed how it could learn to play blackjack. This was an isolated foray into reinforcement learning by Widrow, whose contributions to supervised learning were much more influential.

这本书描述了各种强化算法,其中目标值是基于先前的近似作为bootstrap方法:

最后,我们注意到 DP[动态规划]方法的最后一个特殊性质。所有这些都更新了估计 基于对继承者价值的估计的状态值 州。也就是说,他们在其他数据的基础上更新估计 估计。我们把这叫做引导。许多钢筋 学习方法执行引导,即使是那些没有引导的方法 要求,正如DP要求,一个完整和准确的模型 环境。

请注意,这不同于维基百科页面上提到的自举聚合和智能爆炸。


I belong to the generation who flipped switches to enter a boot program. In the early 1980s, I worked on a microcomputer called Micro-78, developed by Electronics Corporation of India Ltd (ECIL). It was a sort of clone of Altair 8800. I distinctly remember what happens when a small boot program was entered using the toggle switches and executed by pressing a button. The program reads a second boot program contained in the 1st track of the floppy disk and overwrites it on itself in such a way that the second boot program starts executing to load a disk operating system. I think the term "bootstrap" refers to this process of the first boot program reading and overwriting the second boot program on itself, in a way "pulling itself up" with the additional functionality of the second boot program. That may be the origin of the original meaning of "the bootstrap program".


问题已经回答了。用于网页开发。 到目前为止,我在Laravel文档中找到了一个关于引导的很好的解释。这是链接

一般来说,我们指的是注册事物,包括注册服务 容器绑定、事件监听器、中间件,甚至路由。

希望对学习web应用程序开发的人有所帮助。


引导文件负责加载主文件的内容。它是主文件的包装器。这样,如果由于某种原因加载文件不成功,我们就可以捕获错误。


推荐文章