Приступая к работе с языком программирования Go. | Participants
|
- Statistics
- Participants
- Translate into Russian
- Translation result
- Translated in draft, editing and proof-reading required. Completed: 9%.
If you do not want to register an account, you can sign in with OpenID.
Getting Started with Go [golang] | ||
Introduction | ||
Go is an open source project, distributed under a BSD-style license. This document explains how to check out the sources, build them on your own machine, and run them. | Go — это проект с открытым исходным кодом, распространяемым под BSD-подобной лицензией . Этот документ объясняет, как получить исходные коды, скомпилировать их на своей машине и запустить. | |
There are two distinct ways to experiment with Go. This document focuses on the gc Go compiler and tools (6g, 8g etc.). For information on how to use gccgo, a more traditional compiler using the GCC back end, see Setting up and using gccgo. | Есть два пути для экспериментирования с Go. Этот документ сфокусирован на использовании компилятора gc и инструментов 6g, 8g и др. Для получения информации об использовании gccgo-обертки к более традиционному компилятору GCC смотрите раздел "Настройка и использование gccgo" (http://golang.org/doc/gccgo_install.html). | |
The Go compilers support three instruction sets. There are important differences in the quality of the compilers for the different architectures. | Компилятор языка Go поддерживает три набора инструкций. | — Или три архитектуры? — zyrg Comment was deleted |
amd64 (a.k.a. x86-64); 6g,6l,6c,6a | ||
The most mature implementation. The compiler has an effective optimizer (registerizer) and generates good code (although gccgo can do noticeably better sometimes). | Наиболее зрелая реализация. Компилятор имеет эффективный оптимизатор( регистровый) и генерирует хороший код (хотя компилятор gccgo иногда имеет заметное превосходство) | |
386 (a.k.a. x86 or x86-32); 8g,8l,8c,8a | ||
Comparable to the amd64 port. | ||
arm (a.k.a. ARM); 5g,5l,5c,5a | ||
Incomplete. It only supports Linux binaries, floating point is weak, it has code generation bugs, and the optimizer is not enabled. Tested against a Nexus One. | Незавершено. Поддерживает только бинарные файлы Linux, операции с плавающей точкой реализованы слабо, генерируемый код содержит баги, оптимизатор не включен. Протестировано на телефоне Nexus One. | |
Except for things like low-level operating system interface code, the runtime support is the same in all ports and includes a mark-and-sweep garbage collector (a fancier one is in the works), efficient array and string slicing, support for segmented stacks, and a strong goroutine implementation. | За исключением вещей подобных низкоуровневому системному коду, среда исполнения одинакова для всех реализаций, и включает в себя работающий по "алгоритму пометок" сборщик мусора (более продвинутый находится в разработке), эффективную работу с массивами и строками с помощью срезов. Поддержку сегментированных стеков, и строгую реализацию go-потоков. | — Переведено не просто криво, а очень криво. — zyrg |
The compilers can target the FreeBSD, Linux, Native Client, and OS X (a.k.a. Darwin) operating systems. (A port to Microsoft Windows is in progress but incomplete.) The full set of supported combinations is listed in the discussion of environment variables below. | Целью компилятора могут выступать операционные системы семейств FreeBSD, Linux, Native Client и OS X (Darwin). (Реализация для Microsoft Windows находится в разработке и на данный момент не завершена.) Полный набор поддерживаемых комбинаций перечислен ниже, в разделе, посвященном обсуждению переменных окружения. | |
Install C tools, if needed[Top] | ||
The Go tool chain is written in C. To build it, you need these programs installed: | Инструментарий Go написан на С. Для его сборки вам потребуются, чтобы были установлены следующие программы: | |
GCC, | ||
the standard C libraries, | ||
the parser generator Bison, | ||
make, | ||
awk, and | ||
the text editor ed. | ||
On OS X, they can be installed as part of Xcode. | Для операционной системы OS X все это может быть установлено как часть среды разработки Xcode. | |
On Ubuntu/Debian, use sudo apt-get install bison ed gawk gcc libc6-dev make. | Для операционной системы Ubuntu используйте следующую команду: | |
Install Mercurial, if needed[Top] | ||
To perform the next step you must have Mercurial installed. (Check that you have an hg command.) This suffices to install Mercurial on most systems: | Для следующего шага вам необходима, чтобы была установлена система управления версиями Mercurial. (Проверьте доступность вам команды hg). Для большинства систем достаточно выполнения следующей команды, чтобы установить Mercurial: |
License: Creative Commons Attribution 3.0 License.

— Ну поехали. — zyrg