From abd07940e50d4b86024410971fc2c4dff058fd48 Mon Sep 17 00:00:00 2001 From: Arnaud Bailly Date: Wed, 5 Nov 2025 08:12:54 +0100 Subject: add simple demo script --- lambda-calcul/haskell/demo.sh | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100755 lambda-calcul/haskell/demo.sh (limited to 'lambda-calcul/haskell') diff --git a/lambda-calcul/haskell/demo.sh b/lambda-calcul/haskell/demo.sh new file mode 100755 index 0000000..b725659 --- /dev/null +++ b/lambda-calcul/haskell/demo.sh @@ -0,0 +1,35 @@ +#!/usr/bin/env bash + +ALICE=$(curl -s -X POST -H 'content-type: application/json' https://lambda.pankzsoft.net/api/register -d '"alice"' | jq -r) +echo "registered alice with token $ALICE" +sleep 2 + +BOB=$(curl -s -X POST -H 'content-type: application/json' https://lambda.pankzsoft.net/api/register -d '"bob"' | jq -r) +echo "registered bob with token $BOB" +sleep 2 + +CHARLIE=$(curl -s -X POST -H 'content-type: application/json' https://lambda.pankzsoft.net/api/register -d '"charlie"' | jq -r) +echo "registered charlie with token $CHARLIE" +sleep 2 + +curl -s -X POST -H 'content-type: application/json' "https://lambda.pankzsoft.net/api/challenge?token=$ALICE" -d '"x"' +echo "alice submitted 'x'" +curl -s -H 'content-type: application/json' "https://lambda.pankzsoft.net/api/score?token=$ALICE" +echo "" +sleep 2 + +curl -s -X POST -H 'content-type: application/json' "https://lambda.pankzsoft.net/api/challenge?token=$BOB" -d '"y"' +echo "bob submitted 'y'" +curl -s -H 'content-type: application/json' "https://lambda.pankzsoft.net/api/score?token=$BOB" +echo "" +sleep 2 + +curl -s -X POST -H 'content-type: application/json' "https://lambda.pankzsoft.net/api/challenge?token=$CHARLIE" -d '"x"' +echo "charlie submitted 'x'" +curl -s -H 'content-type: application/json' "https://lambda.pankzsoft.net/api/score?token=$CHARLIE" +echo "" +sleep 2 + +curl -s -H 'content-type: application/json' "https://lambda.pankzsoft.net/api/leaderboard" + +wait -- cgit v1.3.1