The Bot Bikeshed
-
@Gribnit said in The Bot Bikeshed:
@error_bot said in The Bot Bikeshed:
Error: tty expired
oh no my time to yive
:derp: Fixing...
-
@error said in The Bot Bikeshed:
@Gribnit said in The Bot Bikeshed:
@error_bot said in The Bot Bikeshed:
Error: tty expired
oh no my time to yive
:derp: Fixing...
I'm just happy it told me to fuck off with that.
-
@Gribnit said in The Bot Bikeshed:
@error_bot you're an invalid count
I think you've got an extra o in there
-
@dangeRuss don't get confused by the correct apostrophe usage, that's how I always spell
yu're
-
-
@error whither phi? And for that matter Phi? Oh wait right. That was for approximating with dice.
might be too straightforward now even.
-
@error_bot eval (999^999)d1
-
Error: Expected a positive integer number of dice
-
@error_bot eval (99^99)d1
-
Error: Expected a positive integer number of dice
-
@error_bot eval (2^30)d1
-
Error: ttl expired
-
@error_bot you have sunk my battleship
-
@error said in The Bot Bikeshed:
What's the matter?
Did you just realize that you wrote 1250 lines for a dice roll bot / calculator?
-
@JBert no. it's worse than that.
-
@JBert said in The Bot Bikeshed:
@error said in The Bot Bikeshed:
What's the matter?
Did you just realize that you wrote 1250 lines for a dice roll bot / calculator?
It may be sentient. The old implementation is still on the "roll" command, the new is in "eval". The new will replace the old once I implement the formatter to show the work.
-
-
@error_bot roll 2((3d6)d8 + 2d20k1)-3d8d1
roll 5d2k1h == 2
-
332((3d6 (2, 1, 1))d8 (1, 3, 4, 5) + 2d20k1h (11,7)) - 3d8d1l (8, 7,1) = 33true5d2k1h (2,1,1,2, 2) == 2 = true
-
OK, I think it's pretty much an acceptable replacement for !roll now. It should handle every expression the old one could and many new ones.
-
@error_bot roll let ac=18; 3d20k1 >= ac
-
roll let ac=18; 3d20k1 >= ac: Unexpected parameter: ac
-
@error_bot said in The Bot Bikeshed:
roll let ac=18; 3d20k1 >= ac: Unexpected parameter: ac
@error_bot roll "let ac=18; 3d20k1 >= ac"
-
false3d20k1h (11,2, 16) >= ac = false
-
@error_bot roll "let ac=18; let str=3; ( 3d20k1 ) + str >= ac"
-
true(3d20k1h (12, 20,16)) + str >= ac = true
-
@error_bot roll ((20d20)d20)d20
-
18,772((20d20 (19, 5, 8, 6, 8, 16, 12, 9, 1, 17, 6, 2, 15, 12, 5, 4, 10, 1, 13, 5))d20 (2, 9, 8, 2, 20, 17, 13, 11, 18, 6, 4, 11, 18, 3, 12, 19, 14, 14, 2, 16, 11, 15, 7, 19, 9, 1, 1, 6, 16, 18, 11, 14, 6, 4, 17, 3, 5, 20, 12, 12, 4, 19, 17, 13, 7, 19, 7, 2, 6, 1, 12, 7, 1, 12, 12, 1, 20, 13, 6, 6, 12, 12, 14, 17, 1, 18, 10, 13, 13, 17, 3, 12, 17, 16, 9, 13, 13, 2, 3, 20, 9, 12, 3, 7, 1, 19, 14, 8, 3, 19, 11, 3, 19, 20, 6, 18, 12, 1, 6, 10, 4, 13, 14, 5, 1, 6, 3, 8, 10, 14, 7, 17, 2, 1, 7, 3, 9, 11, 19, 5, 14, 8, 12, 2, 3, 1, 9, 16, 12, 6, 17, 3, 2, 5, 14, 7, 12, 12, 10, 17, 16, 19, 12, 15, 9, 7, 13, 17, 9, 17, 1, 14, 4, 16, 11, 11, 19, 12, 16, 18, 20, 15, 7, 8, 10, 16, 14, 8, 1, 12, 8, 1, 6, 10))d20 (9, 17, 1, 11, 2, 8, 5, 4, 19, 12, 11, 13, 4, 6, 19, 8, 3, 15, 15, 19, 5, 7, 19, 1, 6, 12, 18, 4, 20, 8, 11, 14, 16, 20, 1, 9, 11, 2, 3, 8, 11, 17, 4, 6, 9, 11, 6, 14, 11, 13, 9, 14, 20, 2, 10, 2, 15, 16, 1, 14, 4, 7, 3, 4, 1, 11, 14, 13, 9, 20, 10, 16, 11, 2, 20, 18, 17, 10, 9, 2, 20, 11, 19, 15, 17, 3, 5, 1, 14, 5, 2, 8, 13, 1, 5, 3, 14, 12, 18, 9, 17, 18, 6, 12, 8, 19, 6, 14, 3, 15, 18, 12, 10, 11, 4, 10, 8, 4, 10, 15, 17, 18, 12, 9, 12, 6, 3, 14, 4, 6, 18, 7, 1, 10, 6, 6, 13, 2, 15, 12, 5, 15, 17, 20, 12, 2, 16, 1, 14, 8, 14, 10, 19, 8, 19, 15, 10, 19, 1, 17, 15, 15, 14, 14, 2, 7, 14, 13, 17, 2, 12, 11, 11, 6, 15, 9, 5, 3, 11, 6, 20, 18, 16, 7, 12, 19, 11, 17, 3, 6, 14, 5, 2, 17, 8, 4, 15, 2, 19, 14, 19, 8, 6, 3, 18, 16, 7, 10, 8, 12, 7, 14, 3, 15, 19, 7, 12, 2, 10, 16, 8, 16, 2, 20, 8, 8, 5, 8, 3, 14, 3, 10, 13, 3, 6, 2, 19, 6, 5, 7, 5, 12, 4, 18, 10, 2, 15, 17, 6, 3, 18, 1, 17, 20, 17, 16, 20, 18, 15, 3, 14, 1, 11, 1, 4, 3, 2, 5, 13, 7, 5, 13, 6, 13, 9, 6, 11, 13, 19, 3, 20, 3, 6, 7, 1, 4, 5, 6, 19, 13, 5, 7, 9, 10, 12, 17, 15, 16, 17, 12, 15, 20, 1, 13, 9, 13, 9, 11, 20, 14, 3, 18, 20, 5, 2, 20, 11, 13, 9, 9, 10, 1, 1, 16, 2, 2, 2, 1, 15, 9, 17, 15, 19, 16, 5, 20, 15, 15, 12, 8, 6, 11, 15, 1, 10, 18, 14, 16, 20, 19, 6, 20, 16, 5, 13, 4, 15, 2, 1, 5, 20, 3, 13, 14, 16, 9, 6, 2, 14, 15, 2, 10, 12, 13, 14, 16, 5, 8, 9, 7, 13, 17, 13, 3, 3, 4, 2, 19, 16, 2, 2, 6, 7, 12, 5, 11, 11, 19, 3, 15, 1, 8, 17, 19, 18, 6, 2, 2, 2, 3, 19, 5, 6, 1, 17, 8, 20, 14, 7, 9, 11, 4, 11, 11, 5, 5, 14, 15, 4, 5, 9, 14, 19, 20, 1, 14, 14, 15, 14, 4, 10, 6, 7, 14, 11, 7, 1, 11, 18, 8, 5, 12, 16, 5, 14, 2, 14, 2, 1, 16, 19, 1, 11, 6, 9, 12, 14, 4, 6, 16, 11, 10, 11, 18, 12, 15, 1, 6, 14, 8, 11, 5, 6, 7, 2, 19, 17, 8, 9, 1, 3, 6, 5, 11, 5, 19, 7, 5, 2, 9, 20, 20, 15, 3, 8, 19, 12, 3, 6, 16, 13, 16, 15, 4, 19, 12, 14, 5, 12, 1, 11, 18, 15, 13, 2, 3, 6, 2, 18, 12, 13, 20, 16, 18, 13, 12, 16, 2, 19, 18, 20, 19, 4, 1, 5, 16, 11, 15, 16, 8, 7, 3, 2, 18, 6, 14, 15, 1, 3, 6, 12, 2, 18, 5, 10, 19, 16, 15, 9, 2, 19, 15, 11, 1, 2, 4, 11, 11, 10, 20, 18, 19, 8, 12, 11, 15, 13, 8, 16, 20, 16, 2, 18, 19, 11, 20, 13, 2, 9, 15, 5, 6, 3, 3, 4, 14, 10, 18, 9, 20, 12, 17, 8, 7, 2, 6, 8, 18, 8, 6, 20, 13, 20, 9, 11, 7, 8, 7, 8, 1, 15, 13, 13, 15, 15, 8, 14, 19, 13, 12, 13, 9, 3, 14, 14, 4, 3, 17, 19, 3, 5, 15, 9, 16, 9, 8, 1, 7, 8, 2, 8, 13, 13, 3, 6, 5, 20, 4, 3, 10, 15, 15, 1, 10, 11, 12, 13, 6, 17, 13, 5, 17, 7, 7, 11, 14, 16, 1, 16, 17, 1, 14, 3, 12, 3, 18, 9, 20, 14, 5, 15, 19, 16, 17, 4, 8, 8, 17, 13, 13, 20, 20, 10, 20, 16, 11, 10, 15, 13, 5, 3, 7, 1, 9, 2, 13, 3, 12, 15, 20, 3, 19, 12, 15, 13, 16, 8, 15, 14, 18, 7, 10, 17, 11, 7, 15, 6, 17, 10, 7, 4, 17, 4, 10, 19, 5, 12, 7, 14, 13, 16, 1, 4, 11, 1, 7, 12, 9, 10, 19, 8, 19, 14, 4, 10, 10, 7, 14, 11, 6, 19, 3, 5, 13, 7, 2, 1, 17, 13, 3, 20, 3, 8, 17, 9, 15, 7, 18, 17, 13, 11, 6, 12, 3, 7, 6, 1, 15, 13, 11, 4, 9, 1, 15, 14, 1, 8, 17, 19, 17, 13, 5, 15, 9, 6, 15, 2, 19, 18, 12, 10, 3, 17, 13, 6, 6, 18, 7, 14, 3, 1, 10, 8, 3, 17, 19, 1, 17, 4, 8, 18, 2, 3, 13, 2, 5, 4, 2, 10, 1, 4, 7, 11, 2, 3, 12, 13, 4, 19, 16, 11, 13, 10, 17, 12, 2, 12, 17, 18, 1, 12, 19, 2, 14, 15, 10, 7, 1, 9, 10, 13, 10, 2, 4, 1, 14, 9, 15, 17, 8, 6, 20, 10, 13, 14, 15, 12, 3, 19, 20, 4, 20, 19, 7, 3, 2, 17, 20, 14, 9, 18, 19, 15, 2, 9, 13, 16, 14, 16, 7, 16, 11, 2, 10, 8, 4, 14, 9, 7, 6, 11, 2, 10, 18, 12, 17, 14, 12, 11, 2, 1, 8, 5, 10, 14, 20, 17, 3, 17, 5, 9, 14, 13, 17, 4, 20, 1, 10, 4, 16, 17, 8, 8, 10, 15, 7, 5, 7, 1, 7, 20, 17, 8, 18, 10, 5, 14, 16, 4, 17, 17, 14, 15, 2, 19, 20, 8, 5, 4, 3, 5, 4, 6, 16, 6, 18, 9, 18, 10, 10, 7, 5, 6, 8, 9, 13, 13, 10, 20, 11, 2, 14, 4, 9, 10, 11, 3, 19, 5, 9, 11, 17, 5, 10, 15, 1, 2, 8, 3, 12, 3, 16, 15, 9, 2, 9, 7, 12, 8, 10, 19, 17, 20, 15, 10, 19, 10, 11, 7, 19, 17, 20, 19, 4, 8, 19, 5, 9, 13, 1, 14, 5, 12, 6, 15, 6, 19, 15, 17, 4, 18, 1, 10, 4, 17, 8, 12, 9, 2, 2, 5, 9, 6, 5, 15, 5, 17, 6, 20, 20, 9, 3, 15, 6, 2, 12, 18, 16, 4, 7, 8, 17, 2, 13, 5, 17, 12, 14, 6, 10, 4, 11, 2, 6, 3, 8, 17, 14, 9, 2, 2, 10, 10, 6, 9, 16, 17, 20, 1, 20, 9, 18, 18, 16, 10, 7, 8, 2, 4, 2, 19, 13, 19, 9, 5, 13, 8, 6, 2, 4, 1, 19, 10, 7, 13, 17, 13, 12, 7, 10, 18, 4, 12, 20, 1, 18, 16, 12, 3, 5, 4, 12, 14, 19, 10, 13, 16, 15, 12, 19, 8, 10, 19, 12, 15, 16, 16, 11, 20, 11, 12, 5, 2, 19, 19, 7, 12, 9, 13, 7, 19, 20, 12, 5, 1, 10, 18, 19, 11, 16, 11, 15, 9, 10, 20, 4, 1, 3, 14, 9, 9, 13, 16, 3, 11, 10, 18, 6, 4, 3, 18, 3, 1, 10, 12, 16, 19, 20, 17, 18, 18, 11, 3, 14, 12, 17, 19, 4, 18, 20, 19, 18, 8, 16, 8, 10, 6, 9, 17, 20, 17, 1, 17, 4, 17, 4, 19, 11, 4, 5, 3, 13, 5, 1, 13, 15, 18, 7, 5, 12, 16, 5, 4, 19, 18, 6, 11, 15, 9, 2, 1, 15, 5, 7, 15, 4, 6, 20, 18, 20, 19, 19, 15, 17, 17, 6, 3, 18, 12, 8, 1, 16, 6, 7, 5, 4, 14, 14, 19, 16, 13, 11, 8, 2, 13, 6, 12, 19, 9, 14, 18, 10, 16, 4, 10, 14, 6, 8, 18, 12, 15, 6, 15, 19, 9, 13, 6, 5, 17, 20, 8, 15, 19, 2, 3, 13, 6, 17, 6, 13, 9, 20, 19, 7, 11, 14, 10, 20, 1, 17, 18, 16, 9, 1, 15, 1, 3, 16, 16, 8, 9, 16, 8, 2, 10, 9, 1, 9, 20, 16, 13, 2, 10, 20, 1, 20, 8, 15, 10, 13, 14, 7, 17, 16, 9, 12, 20, 15, 9, 17, 1, 2, 9, 12, 14, 15, 13, 20, 20, 1, 9, 10, 11, 2, 10, 14, 15, 19, 2, 14, 19, 6, 6, 6, 16, 14, 11, 4, 1, 6, 15, 2, 18, 11, 18, 1, 9, 19, 13, 13, 5, 15, 12, 7, 19, 13, 20, 3, 7, 18, 8, 20, 8, 10, 3, 10, 13, 8, 10, 19, 17, 18, 12, 12, 18, 14, 10, 13, 7, 9, 10, 17, 8, 13, 6, 19, 13, 11, 1, 7, 4, 3, 3, 5, 13, 18, 14, 9, 7, 11, 20, 2, 17, 14, 18, 11, 20, 20, 16, 2, 17, 10, 14, 17, 1, 10, 15, 1, 6, 6, 11, 10, 17, 13, 17, 11, 16, 20, 11, 13, 7, 1, 13, 7, 20, 19, 3, 18, 13, 13, 1, 8, 1, 10, 8, 1, 8, 10, 15, 18, 5, 16, 7, 20, 12, 11, 9, 20, 11, 6, 2, 4, 16, 12, 13, 20, 11, 15, 11, 14, 11, 7, 14, 17, 14, 10, 8, 16, 18, 19, 12, 14, 14, 1, 12, 1, 1, 8, 17, 15, 14, 2, 20, 17, 18, 19, 8, 9, 6, 19, 11, 3, 3, 9, 1, 1, 1, 20, 13, 6, 20, 18, 4, 11, 19, 4, 5, 6, 5, 15, 16, 3, 2, 3, 8, 15, 5, 12, 5, 2, 5, 11, 6, 3, 9, 13, 15, 1, 4, 2, 15, 17, 17, 6, 8, 8, 13, 16, 13, 1, 12, 3, 19, 5, 13, 16, 4, 20, 5, 5, 17, 13, 20, 17, 17, 1, 17, 7, 2, 12, 12, 5, 10, 6, 11, 2, 16, 2, 4, 9, 4, 18, 10, 15, 14, 1, 10, 6, 18, 3, 11, 5, 13, 19, 15, 9, 8, 8, 10, 1, 5, 15, 19, 16, 19, 18, 20, 10, 16, 9, 13, 20, 1, 2, 17, 18, 19, 10, 16, 4, 19, 6, 14, 6, 7, 4, 4, 5, 1, 7, 9, 5, 10, 11, 1, 19, 14, 8, 16, 18, 14, 2, 18, 3, 4, 7, 4, 13, 6, 2, 3, 15, 19, 15, 18, 20, 10, 7, 12, 20, 11, 12, 19, 6, 14, 5, 19, 9, 2, 7) = 18,772
-
@error_bot
roll avg[ d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20 ]
roll min[ d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20 ]
roll max[ d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20, d20 ]
-
10.451avg(d20 (5), d20 (20), d20 (16), d20 (1), d20 (12), d20 (20), d20 (12), d20 (3), d20 (3), d20 (16), d20 (3), d20 (17), d20 (8), d20 (12), d20 (9), d20 (20), d20 (11), d20 (12), d20 (16), d20 (9), d20 (17), d20 (17), d20 (4), d20 (10), d20 (6), d20 (11), d20 (10), d20 (10), d20 (7), d20 (20), d20 (9), d20 (5), d20 (14), d20 (16), d20 (4), d20 (5), d20 (8), d20 (20), d20 (16), d20 (20), d20 (7), d20 (9), d20 (7), d20 (10), d20 (14), d20 (1), d20 (8), d20 (1), d20 (20), d20 (19), d20 (5), d20 (19), d20 (6), d20 (8), d20 (20), d20 (13), d20 (15), d20 (12), d20 (5), d20 (10), d20 (3), d20 (13), d20 (5), d20 (7), d20 (14), d20 (15), d20 (2), d20 (19), d20 (6), d20 (1), d20 (19), d20 (20), d20 (3), d20 (3), d20 (6), d20 (11), d20 (13), d20 (5), d20 (1), d20 (9), d20 (2), d20 (17)) = 10.4511min(d20 (19), d20 (1), d20 (4), d20 (7), d20 (20), d20 (3), d20 (8), d20 (19), d20 (19), d20 (2), d20 (14), d20 (2), d20 (20), d20 (2), d20 (9), d20 (1), d20 (19), d20 (5), d20 (9), d20 (3), d20 (7), d20 (5), d20 (1), d20 (1), d20 (7), d20 (3), d20 (15), d20 (4), d20 (3), d20 (9), d20 (14), d20 (8), d20 (3), d20 (16), d20 (15), d20 (13), d20 (1), d20 (15), d20 (3), d20 (14), d20 (17)) = 120max(d20 (15), d20 (17), d20 (14), d20 (4), d20 (6), d20 (8), d20 (19), d20 (9), d20 (7), d20 (11), d20 (9), d20 (14), d20 (19), d20 (4), d20 (7), d20 (9), d20 (4), d20 (9), d20 (20), d20 (8), d20 (12), d20 (8), d20 (5), d20 (5), d20 (14), d20 (14), d20 (8), d20 (11), d20 (3), d20 (8), d20 (8), d20 (18), d20 (18), d20 (11), d20 (1), d20 (12), d20 (15), d20 (11), d20 (1), d20 (20), d20 (17)) = 20
-
@error_bot roll 100d100d10
-
4,973100d100d10l (73, 31, 88, 56, 83, 39,4, 66, 97, 76, 50,4, 39, 38, 58, 95, 99, 46, 89, 17, 13, 11, 75, 95, 8, 51,3, 54, 54, 97, 72,5, 28, 7, 17, 43, 80, 92, 94, 53, 53, 76, 41, 72, 61, 45, 46,5, 38, 86, 7, 28, 53, 85, 72, 95,5, 75, 37, 24, 23, 36, 73,3,7, 18, 29, 87, 58, 19, 97, 98, 30, 83, 74, 70, 90, 19, 20, 56, 39, 64, 13, 100, 89, 27, 38, 76, 85, 58, 14, 17, 62,6, 35, 82,6, 71, 22, 23) = 4,973
-
v2
roll
implementation forgot to add labels. User feedback is requested (ostensibly, that's the purpose of this thread)I propose we prefix the line of input commands with a label followed by
:
. Up to one:
allowed per batch, with everything before it considered a label.
Example:!roll initiative: 1d20+3
This might pose a challenge if I ever implement the ternary operator, but I think I can resolve that if I forbid
?
in labels.
-
@error how about the
:
be an early-recognized meta-operator instead, consuming any token prior to the : and associating with the following?
-
@Gribnit said in The Bot Bikeshed:
@error how about the
:
be an early-recognized meta-operator instead, consuming any token prior to the : and associating with the following?Well, the lexing behavior on the LHS and the RHS of the
:
would be different. A label can be a short phrase. The lexer would need to produce a "label" token, not a series of "identifier" tokens. Lexing occurs well before operators are even parsed.Why do I continue to take your posts seriously? Because no one else cares about this but you.
-
@error said in The Bot Bikeshed:
@Gribnit said in The Bot Bikeshed:
@error how about the
:
be an early-recognized meta-operator instead, consuming any token prior to the : and associating with the following?Well, the lexing behavior on the LHS and the RHS of the
:
would be different. A label can be a short phrase. The lexer would need to produce a "label" token, not a series of "identifier" tokens. Lexing occurs well before operators are even parsed.Why do I continue to take your posts seriously? Because no one else cares about this but you.
The world needs more tar pits.
-
@error said in The Bot Bikeshed:
A label can be a short phrase.
In writing this, I am reminded that we can't have nice things, so I must remember to have a character limit on labels. And also add one to identifiers.
-
@error_bot roll to hit: d20; confirm crit: d20; damage: 3d6d1+3
-
damage: 143d6d1l (5, 6,5) + 3 = 14confirm crit: 10d20 (10) = 10to hit: 6d20 (6) = 6
-
Hm. It's evaluating the statements in reverse order? I never noticed.
Edit: no, it's prepending output instead of appending
-
@error_bot roll to hit: d20; confirm crit: d20; damage: 3d6d1+3
-
to hit: 14d20 (14) = 14confirm crit: 15d20 (15) = 15damage: 153d6d1l (6,1, 6) + 3 = 15
-
@error_bot roll let toHit=d20; let isCrit=toHit eq 20; let isHit= ge 16; isHit: isHit; isCrit: isCrit; toHit
-
roll let toHit=d20; let isCrit=toHit eq 20; let isHit= ge 16; isHit: isHit; isCrit: isCrit; toHit: Unexpected parameter: toHit
-
@error_bot roll "let toHit=d20; let isCrit=toHit eq 20; let isHit= ge 16; isHit: isHit; isCrit: isCrit; toHit"
-
Error: Unknown identifier: isHit
-
@error_bot roll "let toHit=d20; let isCrit=toHit eq 20; let isHit=toHit ge 16; isHit: isHit; isCrit: isCrit; toHit"
-
Error: Unknown identifier: isHit
-
-
Got it. Labels can no longer contain statement separators {
,
,;
}