Skip to content

Commit a8c0c8b

Browse files
committed
update uncomment usage
1 parent 3eeb752 commit a8c0c8b

File tree

14 files changed

+37
-64
lines changed

14 files changed

+37
-64
lines changed

compiled_starters/gleam/src/main.gleam

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
import gleam/io
22

3-
// Uncomment this block to pass the first stage
4-
//
5-
// import gleam/erlang/process
6-
// import gleam/option.{None}
7-
// import gleam/otp/actor
8-
// import glisten
3+
import gleam/erlang/process
4+
import gleam/option.{None}
5+
import gleam/otp/actor
6+
import glisten
97

108
pub fn main() {
119
// You can use print statements as follows for debugging, they'll be visible when running tests.

compiled_starters/rust/src/main.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// Uncomment this block to pass the first stage
2-
// use std::net::TcpListener;
1+
use std::net::TcpListener;
32

43
fn main() {
54
// You can use print statements as follows for debugging, they'll be visible when running tests.

compiled_starters/zig/src/main.zig

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
const std = @import("std");
2-
// Uncomment this block to pass the first stage
3-
// const net = std.net;
2+
const net = std.net;
43

54
pub fn main() !void {
65
const stdout = std.io.getStdOut().writer();

solutions/gleam/01-at4/diff/src/main.gleam.diff

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
1-
@@ -1,24 +1,17 @@
1+
@@ -1,22 +1,17 @@
22
import gleam/io
33

4-
-// Uncomment this block to pass the first stage
5-
-//
6-
-// import gleam/erlang/process
7-
-// import gleam/option.{None}
8-
-// import gleam/otp/actor
9-
-// import glisten
10-
+import gleam/erlang/process
11-
+import gleam/option.{None}
12-
+import gleam/otp/actor
13-
+import glisten
4+
import gleam/erlang/process
5+
import gleam/option.{None}
6+
import gleam/otp/actor
7+
import glisten
148

159
pub fn main() {
1610
- // You can use print statements as follows for debugging, they'll be visible when running tests.

solutions/gleam/01-at4/explanation.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,6 @@ Study and uncomment the relevant code:
55
```gleam
66
// Uncomment this block to pass the first stage
77
8-
import gleam/erlang/process
9-
import gleam/option.{None}
10-
import gleam/otp/actor
11-
import glisten
12-
```
13-
14-
```gleam
15-
// Uncomment this block to pass the first stage
16-
178
let assert Ok(_) =
189
glisten.handler(fn(_conn) { #(Nil, None) }, fn(_msg, state, _conn) {
1910
io.println("Received message!")

solutions/rust/01-at4/diff/src/main.rs.diff

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
@@ -1,22 +1,16 @@
2-
-// Uncomment this block to pass the first stage
3-
-// use std::net::TcpListener;
4-
+use std::net::TcpListener;
1+
@@ -1,21 +1,16 @@
2+
use std::net::TcpListener;
53

64
fn main() {
75
- // You can use print statements as follows for debugging, they'll be visible when running tests.

solutions/rust/01-at4/explanation.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@ The entry point for your HTTP server implementation is in `src/main.rs`.
22

33
Study and uncomment the relevant code:
44

5-
```rust
6-
// Uncomment this block to pass the first stage
7-
use std::net::TcpListener;
8-
```
9-
105
```rust
116
// Uncomment this block to pass the first stage
127

solutions/zig/01-at4/diff/src/main.zig.diff

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
@@ -1,20 +1,15 @@
1+
@@ -1,19 +1,15 @@
22
const std = @import("std");
3-
-// Uncomment this block to pass the first stage
4-
-// const net = std.net;
5-
+const net = std.net;
3+
const net = std.net;
64

75
pub fn main() !void {
86
const stdout = std.io.getStdOut().writer();

solutions/zig/01-at4/explanation.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@ The entry point for your HTTP server implementation is in `src/main.zig`.
22

33
Study and uncomment the relevant code:
44

5-
```zig
6-
// Uncomment this block to pass the first stage
7-
const net = std.net;
8-
```
9-
105
```zig
116
// Uncomment this block to pass the first stage
127
const address = try net.Address.resolveIp("127.0.0.1", 4221);

starter_templates/gleam/code/src/main.gleam

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
11
import gleam/io
22

3-
// Uncomment this block to pass the first stage
4-
//
5-
// import gleam/erlang/process
6-
// import gleam/option.{None}
7-
// import gleam/otp/actor
8-
// import glisten
3+
import gleam/erlang/process
4+
import gleam/option.{None}
5+
import gleam/otp/actor
6+
import glisten
97

108
pub fn main() {
9+
// Ensures gleam doesn't complain about unused imports in stage 1 (feel free to remove this!)
10+
let _ = glisten.handler
11+
let _ = glisten.serve
12+
let _ = process.sleep_forever
13+
let _ = actor.continue
14+
let _ = None
15+
1116
// You can use print statements as follows for debugging, they'll be visible when running tests.
1217
io.println("Logs from your program will appear here!")
13-
18+
1419
// Uncomment this block to pass the first stage
1520
//
1621
// let assert Ok(_) =

0 commit comments

Comments
 (0)