Приступая к работе с языком программирования Go.

google golang developer team, “Getting Started with Go [golang]”, public translation into Russian from English More about this translation.

See also 28 similar translations

Translate into another language.

Participants

zyrg531 points
MadButterfly368 points
alexvrud353 points
And others...
Join Translated.by to translate! If you already have a Translated.by account, please sign in.
If you do not want to register an account, you can sign in with OpenID.
Pages: ← previous Ctrl next
1 2 3 4

Getting Started with Go [golang]

Приступая к работе с языком программирования Go.

History of edits (Latest: zyrg 1 year, 7 months ago) §

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

Introduction

Введение

History of edits (Latest: zyrg 1 year, 7 months ago) §

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-подобной лицензией . Этот документ объясняет, как получить исходные коды, скомпилировать их на своей машине и запустить.

History of edits (Latest: alexgearbox 1 year, 7 months ago) §

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).

History of edits (Latest: alexgearbox 1 year, 7 months ago) §

— два путя - oh eah zyrg

— два пути :) alexvrud

— Просто существует перевод старой версии этого документа, и там среди прочих перлом именно "два путя..." zyrg

The Go compilers support three instruction sets. There are important differences in the quality of the compilers for the different architectures.

Компилятор языка Go поддерживает три набора инструкций.
Качество компиляторов под разные архитектуры существенно отличается.

History of edits (Latest: alexvrud 1 year, 7 months ago) §

— Или три архитектуры? zyrg

Comment was deleted

amd64 (a.k.a. x86-64); 6g,6l,6c,6a

amd64 (также называемое x86-64); 6g,6l,6c,6a

History of edits (Latest: alexvrud 1 year, 7 months ago) §

The most mature implementation. The compiler has an effective optimizer (registerizer) and generates good code (although gccgo can do noticeably better sometimes).

Наиболее зрелая реализация. Компилятор имеет эффективный оптимизатор( регистровый) и генерирует хороший код (хотя компилятор gccgo иногда имеет заметное превосходство)

History of edits (Latest: zyrg 1 year, 7 months ago) §

386 (a.k.a. x86 or x86-32); 8g,8l,8c,8a

386 (a.k.a. x86 or x86-32); 8g,8l,8c,8a

History of edits (Latest: zyrg 1 year, 7 months ago) §

Comparable to the amd64 port.

Качество сравнимо с реализацией amd64.

History of edits (Latest: zyrg 1 year, 7 months ago) §

arm (a.k.a. ARM); 5g,5l,5c,5a

arm (a.k.a. ARM); 5g,5l,5c,5a

History of edits (Latest: zyrg 1 year, 7 months ago) §

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.

History of edits (Latest: alexgearbox 1 year, 7 months ago) §

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-потоков.

History of edits (Latest: alexgearbox 1 year, 7 months ago) §

— Переведено не просто криво, а очень криво. 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 находится в разработке и на данный момент не завершена.) Полный набор поддерживаемых комбинаций перечислен ниже, в разделе, посвященном обсуждению переменных окружения.

History of edits (Latest: alexgearbox 1 year, 7 months ago) §

Install C tools, if needed[Top]

Установка инструментария С, если необходимо.

History of edits (Latest: zyrg 1 year, 7 months ago) §

The Go tool chain is written in C. To build it, you need these programs installed:

Инструментарий Go написан на С. Для его сборки вам потребуются, чтобы были установлены следующие программы:

History of edits (Latest: zyrg 1 year, 7 months ago) §

GCC,

• GCC

History of edits (Latest: alexvrud 1 year, 7 months ago) §

the standard C libraries,

• стандартные библиотеки С

History of edits (Latest: alexvrud 1 year, 7 months ago) §

the parser generator Bison,

• генератор парсеров Bison

History of edits (Latest: alexvrud 1 year, 7 months ago) §

make,

• make

History of edits (Latest: alexvrud 1 year, 7 months ago) §

awk, and

• awk, и

History of edits (Latest: alexvrud 1 year, 7 months ago) §

the text editor ed.

• текстовый редактор ed.

History of edits (Latest: alexvrud 1 year, 7 months ago) §

On OS X, they can be installed as part of Xcode.

Для операционной системы OS X все это может быть установлено как часть среды разработки Xcode.

History of edits (Latest: alexgearbox 1 year, 7 months ago) §

On Ubuntu/Debian, use sudo apt-get install bison ed gawk gcc libc6-dev make.

Для операционной системы Ubuntu используйте следующую команду:
$sudo apt-get install bison ed gawk gcc libc6-dev make

History of edits (Latest: zyrg 1 year, 7 months ago) §

Install Mercurial, if needed[Top]

Установка Mercurial, если это необходимо.

History of edits (Latest: zyrg 1 year, 7 months ago) §

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:

History of edits (Latest: alexgearbox 1 year, 7 months ago) §
Pages: ← previous Ctrl next
1 2 3 4

License: Creative Commons Attribution 3.0 License.