summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lambda-calcul/rust/README.md20
-rw-r--r--lambda-calcul/rust/src/web.rs5
2 files changed, 24 insertions, 1 deletions
diff --git a/lambda-calcul/rust/README.md b/lambda-calcul/rust/README.md
index cf1f26b..f4bced5 100644
--- a/lambda-calcul/rust/README.md
+++ b/lambda-calcul/rust/README.md
@@ -40,3 +40,23 @@ cargo run --bin server
```
There are `--port` and `--host` arguments should one want to change the default `127.0.0.1:8080`
+
+# NOTES
+
+* make command line to register more explicit
+* `nc -l` is a simple echo server to show what's sent by the server
+* keep the readme exposed by the server
+* use JSON formatting for request/response
+* debug user address on the leaderboard page
+ * shows status of client (not connected/connected/replying correctly or not)
+* add more logs to server to help troubleshoot users access/registration
+* THE SERVER MUST NOT CRASH
+* cheatsheet λ-calcul exposed on `/help`
+* propose to send JSON or S-Exp
+* persist user state to avoid losing connections
+
+* ask people to implement something
+* prepare starter kit to overcome
+* différentes couleurs de pistes (verte/rouge/noire)
+* pair programming w/ Manu, people do their own stuff if they want
+* ne pas oublier le routeur wifi
diff --git a/lambda-calcul/rust/src/web.rs b/lambda-calcul/rust/src/web.rs
index 3f8f056..e0f0c4b 100644
--- a/lambda-calcul/rust/src/web.rs
+++ b/lambda-calcul/rust/src/web.rs
@@ -160,7 +160,7 @@ impl Client {
fn check_result(&self, expected: &String, response: &Result<String, TestResult>) -> Test {
let result = match response {
Ok(expr) => {
- let vals = parse(expr);
+ if let Ok(vals) = parse_total(expr) {
let actual = eval_all(&vals)
.iter()
.map(|v| format!("{}", v))
@@ -171,6 +171,9 @@ impl Client {
} else {
TestResult::TestFailed(actual)
}
+ } else {
+ TestResult::TestFailed("Could not parse response".to_string())
+ }
}
Err(res) => res.clone(),
};