Skip to content
This repository was archived by the owner on Sep 30, 2020. It is now read-only.

Commit 0991a3c

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents f65a787 + 74be17a commit 0991a3c

File tree

13 files changed

+167
-88
lines changed

13 files changed

+167
-88
lines changed

_config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: The Rust Programming Language
22
stable: "1.11.0"
3-
stable_date: "August 18, 2016"
3+
stable_date: "2016-08-18"
44
stable_blog: "/2016/08/18/Rust-1.11.html"
55
beta: "1.12"
6-
beta_date: "September 29, 2016"
6+
beta_date: "2016-09-29"
77
nightly: "1.13"

_data/users.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
name: ANIXE
5252
url: http://www.anixe.pl/
5353
logo: anixe.png
54-
how: "Building the next generation reservation systems for the travel industry."
54+
how: "Building the next generation travel services trading platform in Rust."
5555
-
5656
name: AppSignal
5757
url: https://appsignal.com/
@@ -71,7 +71,7 @@
7171
name: Beget
7272
url: https://beget.com
7373
logo: beget.png
74-
how: "As part of backup and resource management systems."
74+
how: "As part of backup, resource management systems and <a href='https://github.com/LTD-Beget/syncookied'>DDOS mitigation</a>"
7575
-
7676
name: Coursera
7777
url: https://www.coursera.org
@@ -162,6 +162,11 @@
162162
url: https://www.getsentry.com/
163163
logo: sentry-horizontal-black.svg
164164
how: "<a href='http://lucumr.pocoo.org/2016/7/10/rust-rest/'>A command-line client for the Sentry API.</a>"
165+
-
166+
name: Snips
167+
url: https://snips.ai/
168+
logo: snips.svg
169+
how: "<a href='https://github.com/snipsco/rust-threshold-secret-sharing'>AI assistants that are private by design</a>."
165170
-
166171
name: Stratum Security
167172
url: https://stratumsecurity.com/

_includes/editor.js

Lines changed: 32 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
var errorColor = "#F6E2E2";
2424
var warningColor = "#FFFBCB";
2525

26+
// Message to show when the program is running
27+
var runningMsg = resultDiv.getAttribute("data-msg-running") || "Running...";
28+
2629
// Error message to return when there's a server failure
2730
var errMsg = "The server encountered an error while running the program.";
2831

@@ -180,28 +183,38 @@
180183
// Getting list of ranges with problems
181184
var lines = message.split(newLineRegex);
182185

183-
// Cleaning up the message: keeps only relevant problem output
184-
var cleanMessage = lines.map(function(line) {
185-
if (line.startsWith("<anon>") || line.indexOf("^") !== -1) {
186-
var errIndex = line.indexOf(problem + ": ");
187-
if (errIndex !== -1) {return line.slice(errIndex);}
188-
return "";
189-
}
190-
191-
// Discard playpen messages, keep the rest
192-
if (line.startsWith("playpen:")) {return "";}
193-
return line;
194-
}).filter(function(line) {
195-
return line !== "";
186+
// Cleaning up the message: keeps only relevant problem output.
187+
var cleanMessage = lines.filter(function(line) {
188+
return !line.trim().startsWith("--> <anon>")
189+
&& !line.startsWith("playpen:")
190+
&& !line.trim().startsWith("error: aborting");
196191
}).map(function(line) {
197192
return escapeHTML(line);
193+
}).filter(function(line) {
194+
return line != "";
195+
}).map(function(line) {
196+
return line.replace(/ /g, '\u00a0\u00a0');
198197
}).join("<br />");
199198

199+
// Get all of the row:col in the message.
200+
var errorLines = lines.filter(function(line) {
201+
return line.indexOf("--> <anon>") !== -1;
202+
}).map(function(line) {
203+
var lineIndex = line.indexOf(":");
204+
if (lineIndex !== -1) {
205+
return line.slice(lineIndex);
206+
}
207+
208+
return "";
209+
}).filter(function(line) {
210+
return line != "";
211+
});
212+
200213
// Setting message
201214
displayOutput(cleanMessage, editor.getValue());
202215

203216
// Highlighting the lines
204-
var ranges = parseProblems(lines);
217+
var ranges = parseProblems(errorLines);
205218
markers = ranges.map(function(range) {
206219
return editor.getSession().addMarker(range, "ace-" + problem + "-line",
207220
"fullLine", false);
@@ -220,12 +233,10 @@
220233
var ranges = [];
221234
for (var i in lines) {
222235
var line = lines[i];
223-
if (line.startsWith("<anon>:") && line.indexOf(": ") !== -1) {
224-
var parts = line.split(/:\s?|\s+/, 5).slice(1, 5);
225-
var ip = parts.map(function(p) { return parseInt(p, 10) - 1; });
226-
// console.log("line:", line, parts, ip);
227-
ranges.push(new Range(ip[0], ip[1], ip[2], ip[3]));
228-
}
236+
var parts = line.split(/:\s?|\s+/, 5).slice(1, 5);
237+
var ip = parts.map(function(p) { return parseInt(p, 10) - 1; });
238+
console.log("line:", line, parts, ip);
239+
ranges.push(new Range(ip[0], ip[1], ip[2], ip[3]));
229240
}
230241

231242
return ranges;
@@ -235,7 +246,7 @@
235246
runButton.addEventListener("click", function(ev) {
236247
resultDiv.style.display = "block";
237248
clearResultDiv();
238-
resultDiv.innerHTML = "Running...";
249+
resultDiv.innerHTML = runningMsg;
239250

240251
// clear previous markers, if any
241252
markers.map(function(id) { editor.getSession().removeMarker(id); });

_includes/set_platform.js

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,6 @@
11
(function () {
22
"use strict";
33

4-
// Returns the binary name for the given platform (Linux binary, Windows Installer, etc)
5-
function binary_name(platform) {
6-
var platforms = {
7-
"en": {"linux": "Linux binary", "windows": "Windows Installer", "mac": "Mac Installer"},
8-
"en-US": {"linux": "Linux binary", "windows": "Windows Installer", "mac": "Mac Installer"},
9-
"pt": {"linux": "Binário Linux", "windows": "Instalador Windows", "mac": "Instalador Mac"},
10-
"pt-BR": {"linux": "Binário Linux", "windows": "Instalador Windows", "mac": "Instalador Mac"},
11-
"ru": {"linux": "Исполняемые файлы для Linux", "windows": "Установщик для Windows", "mac": "Установщик для Mac"},
12-
"ru-RU": {"linux": "Исполняемые файлы для Linux", "windows": "Установщик для Windows", "mac": "Установщик для Mac"},
13-
// Add more platforms here
14-
};
15-
return platforms[get_language()][platform];
16-
}
17-
18-
function get_language() {
19-
return window.navigator.language || window.navigator.userLanguage || "en";
20-
}
21-
224
function detect_platform() {
235
if (navigator.platform === "Linux i686") { return "i686-unknown-linux-gnu";}
246
if (navigator.platform === "Linux x86_64") { return "x86_64-unknown-linux-gnu";}
@@ -41,24 +23,25 @@
4123
var rec_download_file = "rustc-{{ site.stable }}-src.tar.gz";
4224

4325
if (platform == "x86_64-unknown-linux-gnu") {
44-
rec_version_type = binary_name("linux");
26+
rec_version_type = "linux";
4527
rec_download_file = "rust-" + rec_package_name + "-x86_64-unknown-linux-gnu.tar.gz";
4628
} else if (platform == "i686-unknown-linux-gnu") {
47-
rec_version_type = binary_name("linux");
29+
rec_version_type = "linux";
4830
rec_download_file = "rust-" + rec_package_name + "-i686-unknown-linux-gnu.tar.gz";
4931
} else if (platform == "x86_64-apple-darwin") {
50-
rec_version_type = binary_name("mac");
32+
rec_version_type = "mac";
5133
rec_download_file = "rust-" + rec_package_name + "-x86_64-apple-darwin.pkg";
5234
} else if (platform == "x86_64-pc-windows-gnu") {
53-
rec_version_type = binary_name("windows");
35+
rec_version_type = "windows";
5436
rec_download_file = "rust-" + rec_package_name + "-x86_64-pc-windows-gnu.msi";
5537
} else if (platform == "i686-pc-windows-gnu") {
56-
rec_version_type = binary_name("windows");
38+
rec_version_type = "windows";
5739
rec_download_file = "rust-" + rec_package_name + "-i686-pc-windows-gnu.msi";
5840
}
5941

60-
var rec_package_desc = rec_package_name + " (<span>" + rec_version_type + "</span>)";
6142
var rec_vers_div = document.getElementById("install-version");
43+
var rec_vers_type_local = rec_vers_div.getAttribute('data-type-' + rec_version_type);
44+
var rec_package_desc = rec_package_name + " (<span>" + (rec_vers_type_local || rec_version_type) + "</span>)";
6245
rec_vers_div.innerHTML = rec_package_desc;
6346

6447
var rec_dl_addy = "https://static.rust-lang.org/dist/" + rec_download_file;

css/style.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,8 @@ ul.laundry-list {
314314
padding: 10px;
315315
display: none;
316316
border-radius: 4px;
317+
font-family: monospace;
318+
font-size: 12px;
317319
}
318320

319321
.ace-error-text, .ace-error-line, .ace-warning-text, .ace-warning-line {

en-US/downloads.html

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,12 @@ <h1>Downloads</h1>
99
<div class="row install">
1010
<div class="col-md-4 side-header">
1111
<h2 id="stable">{{ site.stable }}&nbsp;</h2>
12-
<h3>{{ site.stable_date }}</h3>
12+
<h3>{{ site.stable_date | date: "%B %-d, %Y" }}</h3>
1313
<p>
1414
The
1515
<a href="http://blog.rust-lang.org{{ site.stable_blog }}">
16-
current stable release of Rust
17-
</a>
18-
, updated every six weeks and backwards-compatible.
16+
current stable release of Rust</a>,
17+
updated every six weeks and backwards-compatible.
1918
</p>
2019
</div>
2120
<div class="col-md-8">
@@ -65,7 +64,7 @@ <h2 id="beta">Beta&nbsp; ({{ site.beta }})</h2>
6564
A preview of the upcoming stable release, intended for testing by
6665
crate authors. Updated every six weeks and as needed.
6766
</p>
68-
<p><em>Scheduled for stable release<br/>{{ site.beta_date }}</em>.<p>
67+
<p><em>Scheduled for stable release<br/>{{ site.beta_date | date: "%B %-d, %Y" }}</em>.<p>
6968
</div>
7069
<div class="col-md-8">
7170
<table class="table-features table-installers"><tbody>

en-US/index.html

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@
1717
<div class="col-md-4 install-box">
1818
<span class="version-rec-box-inner">
1919
Recommended Version:<br>
20-
<span id="install-version">
20+
<span id="install-version"
21+
data-type-linux="Linux binary"
22+
data-type-windows="Windows Installer"
23+
data-type-mac="Mac Installer"
24+
data-type-source="source">
2125
{{ site.stable }}
2226
(<span>source</span>)
2327
</span>
@@ -47,7 +51,7 @@ <h2>Featuring</h2>
4751
<div id="active-code">
4852
<button type="button" class="btn btn-primary btn-sm" id="run-code">Run</button>
4953
<div id="editor">{% include example.rs %}</div>
50-
<div id="result">
54+
<div id="result" data-msg-running="Running...">
5155
<a id="playlink"><i class="icon-link-ext"></i></a>
5256
</div>
5357
</div>

en-US/user-groups.md

Lines changed: 45 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ with over 7,000 members. Rustaceans meet periodically in Rust User
1010
Groups. Its a great introduction to the community and a great way to
1111
learn and socialize with other people with a similar interest.
1212
Meetings are usually informal and open to
13-
everyone. If you have started a new user group and with to add it to
13+
everyone. If you have started a new user group and wish to add it to
1414
this list, please contact the [Rust Community
1515
Team](./team.html#Community) or
1616
even better, open a pull request against
17-
[this website](https://github.com/rust-lang/rust-www/blob/master/user-groups.md).
17+
[this website](https://github.com/rust-lang/rust-www/blob/master/en-US/user-groups.md).
1818

1919
## Australia
2020

@@ -26,6 +26,10 @@ even better, open a pull request against
2626

2727
[Klagenfurt Rust Programmers](https://www.meetup.com/Klagenfurt-Rust/), Klagenfurt.
2828

29+
## Bolivia
30+
31+
[Rust Bolivia](http://www.mozillabolivia.org/rust/), Santa Cruz, Bolivia.
32+
2933
## Brazil
3034

3135
[Rust São Paulo](https://www.meetup.com/Rust-Sao-Paulo-Meetup/), São Paulo.
@@ -148,32 +152,60 @@ even better, open a pull request against
148152

149153
## USA
150154

151-
[The Austin Rust Meetup](https://www.meetup.com/Austin-Rust-Meetup/), Austin.
152-
153-
[Chicago Rust Meetup](https://www.meetup.com/Chicago-Rust-Meetup/), Chicago, IL.
154-
155-
[Columbus Rust Society](https://www.meetup.com/columbus-rs/), Columbus, OH.
155+
### Arizona
156156

157157
[Desert Rust](https://www.meetup.com/Desert-Rustaceans/), Phoenix, AZ.
158158

159-
[PDXRust](https://www.meetup.com/PDXRust/), Portland, OR.
159+
### California
160160

161161
[Rust Bay Area](https://www.meetup.com/Rust-Bay-Area/), San Francisco, CA.
162162

163-
[Rust Boston](https://www.meetup.com/Boston-Rust-Meetup-25317522aNpHwZdw/), Boston, MA.
163+
[Rust Learning Group](https://www.meetup.com/Rust-Learning-Group/), Oakland, CA.
164+
165+
[Rust Los Angeles](https://www.meetup.com/Rust-Los-Angeles/), Los Angeles, CA.
166+
167+
[San Diego Rust](https://www.meetup.com/San-Diego-Rust/), San Diego, CA.
168+
169+
### Colorado
164170

165171
[Rust Boulder/Denver](https://www.meetup.com/Rust-Boulder-Denver/), Boulder, CO.
166172

173+
### Illinois
174+
175+
[Chicago Rust Meetup](https://www.meetup.com/Chicago-Rust-Meetup/), Chicago, IL.
176+
177+
### Massachussets
178+
179+
[Rust Boston](https://www.meetup.com/Boston-Rust-Meetup-25317522aNpHwZdw/), Boston, MA.
180+
181+
### Michigan
182+
167183
[Rust Detroit](https://www.meetup.com/rust-detroit/), Detroit, MI.
168184

169-
[Rust Learning Group](https://www.meetup.com/Rust-Learning-Group/), Oakland, CA.
185+
### Minnesota
170186

171-
[Rust Los Angeles](https://www.meetup.com/Rust-Los-Angeles/), Los Angeles, CA.
187+
[Rust Twin Cities](https://www.meetup.com/Rust-TC/), Minneapolis, MN.
188+
189+
### New York
172190

173191
[Rust NYC](https://www.meetup.com/Rust-NYC/), New York, NY
174192

175-
[Rust Twin Cities](https://www.meetup.com/Rust-TC/), Minneapolis, MN.
193+
### Ohio
176194

177-
[San Diego Rust](https://www.meetup.com/San-Diego-Rust/), San Diego, CA.
195+
[Columbus Rust Society](https://www.meetup.com/columbus-rs/), Columbus, OH.
196+
197+
### Oregon
198+
199+
[PDXRust](https://www.meetup.com/PDXRust/), Portland, OR.
200+
201+
### Pennsylvania
202+
203+
[Pittsburgh Rust Coffee](https://www.meetup.com/Pittsburgh-Rust-Coffee/), Pittsburgh, PA.
204+
205+
### Texas
206+
207+
[The Austin Rust Meetup](https://www.meetup.com/Austin-Rust-Meetup/), Austin, TX.
208+
209+
### Washington
178210

179211
[Seattle Rust Meetup](https://www.meetup.com/Seattle-Rust-Meetup/), Seattle, WA.

pt-BR/downloads.html

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,20 @@
66
<!-- -->
77
<h1>Downloads</h1>
88

9+
{% assign months = '/janeiro/fevereiro/março/abril/maio/junho/julho/agosto/setembro/outubro/novembro/dezembro' | split: '/' -%}
10+
{% assign stable_month = site.stable_date | date: '%-m' | plus: '0' -%}
11+
{% assign beta_month = site.beta_date | date: '%-m' | plus: '0' -%}
912
<hr>
1013

1114
<div class="row install">
1215
<div class="col-md-4 side-header">
1316
<h2 id="stable">{{ site.stable }}&nbsp;</h2>
14-
<h3>{{ site.stable_date }}</h3>
17+
<h3>{{ site.stable_date | date: '%-d' }} de {{ months[stable_month] }} de {{ site.stable_date | date: '%Y' }}</h3>
1518
<p>
1619
O
1720
<a href="http://blog.rust-lang.org{{ site.stable_blog }}">
18-
atual lançamento estável de rust
19-
</a>
20-
, atualizado à cada 6 semanas e compatível com versões anteriores.
21+
atual lançamento estável de rust</a>,
22+
atualizado à cada 6 semanas e compatível com versões anteriores.
2123
</p>
2224
</div>
2325
<div class="col-md-8">
@@ -67,7 +69,7 @@ <h2 id="beta">Beta&nbsp; ({{ site.beta }})</h2>
6769
Uma preview da versão estável que virá, intencionada para teste por
6870
autores de pacotes. Atualizado à cada seis semanas e quando necessário.
6971
</p>
70-
<p><em>Esperado lançamento como estável:<br/>{{ site.beta_date }}</em>.<p>
72+
<p><em>Esperado lançamento como estável:<br/>{{ site.beta_date | date: '%-d' }} de {{ months[beta_month] }} de {{ site.beta_date | date: '%Y' }}</em>.<p>
7173
</div>
7274
<div class="col-md-8">
7375
<table class="table-features table-installers"><tbody>

pt-BR/index.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@
1717
<div class="col-md-4 install-box">
1818
<span class="version-rec-box-inner">
1919
Versão recomendada:<br>
20-
<span id="install-version">
20+
<span id="install-version"
21+
data-type-linux="Binário Linux"
22+
data-type-windows="Instalador Windows"
23+
data-type-mac="Instalador Mac"
24+
data-type-source="source">
2125
{{ site.stable }}
2226
(<span>source</span>)
2327
</span>

0 commit comments

Comments
 (0)