-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathindex_CN.html
201 lines (191 loc) · 11 KB
/
index_CN.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<head>
<meta charset="utf-8">
<title>Red 编程语言</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="The world's first full-stack programming language">
<link href="static/bootstrap-combined.min.css" rel="stylesheet">
<link href="static/app.css" rel="stylesheet">
<link href="static/app-theme.css" rel="stylesheet">
<!--[if lt IE 9]><script src="static/html5shiv.min.js"></script><![endif]-->
<!-- Added Baidu Analytics -->
<script>
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "//hm.baidu.com/hm.js?7b7e95fa9956a7c090c1d68887f3fe8c";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
</head>
<body data-target=".content-nav">
<header>
<div class="container">
<div class="row">
<div class="span5">
<h1><img src="static/red-logo.png" alt="Square"/> Red</h1>
</div>
<div class="span7">
<menu>
<ul>
<li><a href="#download" class="menu download">下载 v0.6.4</a></li>
<li><a href="https://github.com/red/red" data-title="GitHub 项目" class="menu github"><img src="static/icon-github.png" alt="GitHub"/></a></li>
<li><a href="https://www.red-lang.org/" data-title="官方网站" class="menu square"><img src="static/icon-square.png" alt="Blog"/></a></li>
<li><a href="index_CN.html" class="menu">中文</a>|<a href="index_TR.html" class="menu">TR</a>|<a href="index.html" class="menu">EN</a></li>
</ul>
</menu>
</div>
</div>
</header>
<section id="subtitle">
<div class="container">
<div class="row">
<div class="span12">
<h2>让软件开发再次<strong>简单有趣</strong></h2>
</div>
</div>
</div>
</section>
<section id="body">
<div class="container">
<div class="row">
<div class="span9">
<h3 id="introduction">简介</h3>
<p><span style="color: red">R</span>ed 是一门新的编程语言,它受到了 <a href="http://rebol.com/">REBOL</a> 很大的启发,但由于它有本地代码编译器,Red 的应用领域更加广泛——下到系统编程上到高级脚本,同时提供了对现代的多核 CPU 并发编程的支持。</p>
<p>主要特点为:</p>
<ul>
<li>函数式、声明式、符号式编程</li>
<li>支持基于原型的对象</li>
<li><a href="https://en.wikipedia.org/wiki/Homoiconicity">同像性</a> (<span style="color: red">R</span>ed 是它自身的元语言)</li>
<li>类型声明可选,有丰富的数据类型(50+)</li>
<li>支持静态编译或 JIT 编译成本地代码</li>
<li>强大的并发和并行编程支持(actors、并行集合)</li>
<li>以内建的 <span style="color: red;">R</span>ed/System <a href="https://en.wikipedia.org/wiki/Domain-specific_language">DSL</a> 提供底层系统编程的能力</li>
<li>支持高级脚本和 <a href="https://en.wikipedia.org/wiki/Read-eval-print_loop">REPL</a> 控制台</li>
<li>高度<a href="https://doc.red-lang.org/zh-hans/libred.html">可嵌入</a></li>
<li>内存占用少,带有垃圾回收</li>
<li>磁盘占用少(1MB)</li>
</ul>
<h4>写一个 Red 版“Hello World”</h4>
<p>Red 工具链仅是单个可执行文件,你可以从<a href="#download">这里</a>下载,它支持三大平台。</p>
<ol>
<li><p>将下载来的 <b>red</b> 二进制文件放入工作目录。</p></li>
<li>
<p>在代码编辑器或文本编辑器中,键入以下的 Hello World 程序:</p>
<pre class="prettyprint"><code>Red [
Title: "Simple hello world script"
]
print "Hello World!"</code></pre>
</li>
<li><p>保存为:<b>hello.red</b></p></li>
<li>
<p>从终端(或者在 Windows 下使用 CMD)用以下命令运行它:</p>
<pre><code>$ ./red hello.red</code></pre>
</li>
<li><p>你应该会看到输出了 Hello World!。</p></li>
<li>
<p>想由这个程序生成一个编译过的可执行文件?</p>
<pre><code>$ ./red -c hello.red
$ ./hello</code></pre>
</li>
<li>
<p>想交叉编译到另一个支持的平台?</p>
<pre><code>$ ./red -t Windows hello.red
$ ./red -t Darwin hello.red
$ ./red -t Linux-ARM hello.red</code></pre>
</li>
</ol>
<h3 id="download">下载</h3>
<h4>最新稳定版(v0.6.4)</h4>
<p><a href="https://static.red-lang.org/dl/win/red-064.exe" class="dl version-href">↓ Windows</a>
<a href="https://static.red-lang.org/dl/linux/red-064" class="dl version-href">↓ GNU/Linux</a>
<a href="https://static.red-lang.org/dl/mac/red-064" class="dl version-href">↓ Mac OS X</a></p>
<h4>master 分支的自动构建版本</h4>
<p><a href="https://static.red-lang.org/dl/auto/win/red-latest.exe" class="dl version-href">↓ Windows</a>
<a href="https://static.red-lang.org/dl/auto/linux/red-latest" class="dl version-href">↓ GNU/Linux</a>
<a href="https://static.red-lang.org/dl/auto/mac/red-latest" class="dl version-href">↓ Mac OS X</a></p>
<h4>Linux 注意事项</h4>
<p>对于 Linux 64 位发行版,你需要安装 32 位支持库。基于 Debian 的发行版用以下命令安装:</p>
<pre><code>$ sudo apt-get install ia32-libs libc6-i386 libcurl3-i386</code></pre>
<p>如果你用的是 Debian 7+ 或 Ubuntu 13.10+ 版本,你应该采用 multiarch 方式:</p>
<pre><code>$ dpkg --add-architecture i386
$ apt-get update
$ apt-get install libc6:i386 libcurl3:i386</code></pre>
<p>CentOS 发行版用以下命令安装:</p>
<pre><code>$ sudo yum install glibc.i686
$ sudo yum install libcurl.i686</code></pre>
<h3 id="contributing">贡献</h3>
<p>像这样的项目会有很多事情要做,我们欢迎所有愿意帮助我们的人。这个项目依然处于开发的早期阶段,所以不要期待环境会很稳定,我们正以尽可能快的速度前行。</p>
<p>我们刚用团队组织工具“Trello”制作了卡片看板,这是<a href="https://trello.com/b/tCypaglW/ideas-for-red-contributors" target="_blank">给 Red 贡献者们的灵感</a>。去看看它吧,它可能会比这个页面更新得更频繁!</p>
<p>不过一般来说,如果你想要在源代码级别上贡献的话:</p>
<ul>
<li>我们在自举前阶段,整个编译工具链是采用 <a href="http://www.rebol.com/" target="_blank">Rebol v2</a> 编写的,所以必须要了解这门语言才能向编译器或链接器贡献代码。好消息是 <span style="color: red">R</span>ed 将会非常接近 Rebol 的语法,你新学到的知识不会被浪费……一旦 <span style="color: red">R</span>ed 可用,还能帮助你即可使用它。</li>
<li>底层的 <span style="color: red">R</span>ed/System DSL 正在 beta 阶段,不过我们仍然需要:</li>
<ul>
<li>测试:编写小型应用程序,报告问题,编写更多的单元测试……</li>
<li>有用的底层库的绑定</li>
<li>更大型的应用程序(帮助改进 <span style="color: red">R</span>ed/System 大规模编程的能力)</li>
</ul>
<li>安装 Git,学习如何使用它,注册一个 <a href="https://github.com" target="_blank">Github</a> 账号,然后 fork <a href="https://github.com/red/red" target="_blank"><span style="color: red">R</span>ed 代码仓库</a>。当你准备好提出一些新的源代码或补丁时,提交一个 Pull Request。</li>
</ul>
<p>不过致力于代码库的贡献并不是我们所需要的唯一的帮助。你发现到这个网站还不是很漂亮了吗?我们正在把内容从 blogger 中迁移出来,重建一个网站,这里是抓取内容的<a href="http://red.reb4.me/" target="_blank">测试版部署</a>。这只是一个开始……你是 HTML+CSS 大师吗?你能帮助我们使它变得更好吗?我们希望把全部东西都转移到 GitHub 上维护,Ruby 语言就是这样做的。</p>
<p>如果您想要加入,首选通过上面列举的方式之一联系我们,或者发邮件到:contrib (at) red-lang.org</p>
</div>
<div class="span3">
<div class="content-nav" data-spy="affix" data-offset-top="80">
<ul class="nav nav-tabs nav-stacked primary">
<li><a href="#introduction">简介</a></li>
<li><a href="#download">下载</a></li>
<li><a href="#contributing">贡献</a></li>
</ul>
<ul class="nav nav-pills nav-stacked secondary">
<li><a href="https://groups.google.com/group/red-lang?hl=en">邮件列表</a></li>
<li><a target="_blank" href="http://shang.qq.com/wpa/qunwpa?idkey=3dd0730478500ce5f4bfc0f8a1ed9e067824b31ec114f68d75b385a1f61cf692"><img border="0" src="http://pub.idqqimg.com/wpa/images/group.png" alt="Redlang技术交流群" title="Redlang技术交流群"></a></li>
<li><a href="https://gitter.im/red/red/Chinese?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge"><img src="https://badges.gitter.im/Join%20Chat.svg" alt="GITTER JOIN CHAT" /></a></li>
<li><a><img src="https://travis-ci.org/red/red.svg?branch=master" alt="" /></a></li>
</ul>
</div>
</div>
</div>
<div class="row">
<div class="span12 logo">
由 <a href="https://pages.github.com">Pages</a> 托管。
</div>
</div>
</div>
</section>
<script src="https://ajax.proxy.ustclug.org/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="static/bootstrap.min.js"></script>
<script src="static/jquery.smooth-scroll.min.js"></script>
<script src="static/jquery-maven-artifact.min.js"></script>
<script src="static/prettify.js"></script>
<script type="text/javascript">
$(function() {
// Syntax highlight code blocks.
prettyPrint();
// Spy on scroll position for real-time updating of current section.
$('body').scrollspy();
// Use smooth-scroll for internal links.
$('a').smoothScroll();
// Enable tooltips on the header nav image items.
$('.menu').tooltip({
placement: 'bottom',
trigger: 'hover',
container: 'body',
delay: {
show: 500,
hide: 0
}
});
// Look up the latest version of the library.
//$.fn.artifactVersion('com.squareup.picasso', 'picasso', function(version, url) {
// $('.version').text(version);
// $('.version-tag').text('v' + version);
// $('.version-href').attr('href', url);
//});
});
</script>
</body>
</html>