From 07abc8709a5dd0082e699c749418b617d6fc3d3b Mon Sep 17 00:00:00 2001 From: braxtonhall Date: Wed, 30 Nov 2022 12:23:26 -0800 Subject: Minor cleanup for the actual exhibition --- entries/braxtonhall/hitl2/fib.js | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) (limited to 'entries') diff --git a/entries/braxtonhall/hitl2/fib.js b/entries/braxtonhall/hitl2/fib.js index e050d96..429abc2 100644 --- a/entries/braxtonhall/hitl2/fib.js +++ b/entries/braxtonhall/hitl2/fib.js @@ -139,11 +139,24 @@ const number = () => : slow(hedge()).then(() => slow(innumerable())).then(number))); const choose = () => - prompt("would you like to use my iteration optimization??? yes????") - .then((response) => ["y", "yes"].includes(response.trim().toLowerCase())) - .then((should) => should - ? fast("yes!").then(() => hitlfibiter) - : fast("oh.").then(() => slow("okay.")).then(() => slow("we can take it slow.")).then(() => hitlfib)); + prompt("would you like to use my iteration optimization??? yes???? .. or.. no?") + .then((response) => Promise.resolve(["yes", "no", "y", "n"].includes(response.trim().toLowerCase())) + .then((formed) => !formed + ? slow("um. sorry. one more time..").then(choose) + : ["yes", "y"].includes(response.trim().toLowerCase()) + ? fast("yes!").then(() => hitlfibiter) + : fast("oh.").then(() => slow("okay.")).then(() => slow("we can take it slow.")).then(() => hitlfib))); + +const optimize = (n) => + n < 4 + ? hitlfib + : n > 25 + ? slow(hedge()) + .then(() => fast("acutally..")) + .then(() => fast("i need to use my iteration optimization for this.")) + .then(() => slow("i hope that's okay.")) + .then(() => hitlfibiter) + : choose(); const flow = () => slow("\nwhat's the fib you'd like to compute? i can help u out") @@ -151,7 +164,7 @@ const flow = () => .then((n) => slow(confirmation()) .then(() => fast(hedge())) .then(() => slow(`i will help u compute ${green(`fib ${n}`)}`)) - .then(choose) + .then(() => optimize(n)) .then((fib) => fib(n)) .then((fibn) => slow(hedge()) .then(() => fast(done())) -- cgit v1.2.3-70-g09d2 From 1fe3de57d5aed6efc9701e93004a13247c51798f Mon Sep 17 00:00:00 2001 From: braxtonhall Date: Wed, 30 Nov 2022 12:31:57 -0800 Subject: Make hitl2 a littler chattier --- entries/braxtonhall/hitl2/fib.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'entries') diff --git a/entries/braxtonhall/hitl2/fib.js b/entries/braxtonhall/hitl2/fib.js index 429abc2..abefe70 100644 --- a/entries/braxtonhall/hitl2/fib.js +++ b/entries/braxtonhall/hitl2/fib.js @@ -29,6 +29,12 @@ const hedges = [ "um. okay.", "uh okay..", "so..", + "yeah...", + "yes. so. um..", + "okay. so. um..", + "yeah. right. next..", + "uh so. right. next..", + "next. right. okay..", ]; const confirmations = [ "o right. ofc.", @@ -37,6 +43,18 @@ const confirmations = [ "thanks.", "um right. yes.", "right.", + "exactly. thanks.", + "yes. thank u.", + "right. um thank u.", + "right. uh thanks.", + "great.", + "great. um thanks..", + "right right. cool.", + "cool. cool thank you.", + "cool.", + "cool. cool cool. thanks..", + "okay yes. cool..", + "right thank you. okay..", ]; const innumerables = [ "yeah i don't think we can do that one", @@ -56,6 +74,9 @@ const dones = [ "oh!", "wait you did it all.", "oh that's it?", + "ah! yes!", + "ah! yes! we're done!", + "oh! yes! that's it!", ]; const thinkings = [ "let me just think a second..", -- cgit v1.2.3-70-g09d2 From 9c3c4d726fcf69fc5ec0fa342a40e4a26e06b10a Mon Sep 17 00:00:00 2001 From: braxtonhall Date: Thu, 1 Dec 2022 10:16:55 -0800 Subject: Add a fib command so volunteers at the gallery can easily start fib --- entries/braxtonhall/hitl2/fib.command | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 entries/braxtonhall/hitl2/fib.command (limited to 'entries') diff --git a/entries/braxtonhall/hitl2/fib.command b/entries/braxtonhall/hitl2/fib.command new file mode 100755 index 0000000..f43a542 --- /dev/null +++ b/entries/braxtonhall/hitl2/fib.command @@ -0,0 +1,10 @@ +if curl https://raw.githubusercontent.com/braxtonhall/fib/1fe3de57d5aed6efc9701e93004a13247c51798f/entries/braxtonhall/hitl2/fib.js >> ~/download.js; then + echo "download successful"; + rm ~/hitl.js || 0; + mv ~/download.js ~/hitl.js; +else + echo "download not successful. hopefully there is a backup"; +fi + +clear; +node ~/hitl.js; -- cgit v1.2.3-70-g09d2