balt-dev / robot-is-chill

Modified version of RocketRace/robot-is-you
GNU General Public License v3.0
22 stars 17 forks source link

Add and update macros #160

Closed Mathman2028 closed 3 months ago

Mathman2028 commented 3 months ago

This pull request adds the ureplace macro (which unescapes the regex given), the try macro (which can execute code and catch errors), and three macros that alter case. It also makes most builtins not count toward the macro cap, with the exception of unescape and chr (since they are capable of generating brackets).

someone1065 commented 3 months ago

So how exactly can the 2 macros capable of generating brackets be the cause of recursion?

Mathman2028 commented 3 months ago

Just being safe. I'd rather some macros add to the cap unnecessarily than crash Balt's computer with infinite uncapped macros.

On Sun, Jun 16, 2024 at 9:40 PM someone1065 @.***> wrote:

So how exactly can the 2 macros capable of generating brackets be the cause of recursion?

— Reply to this email directly, view it on GitHub https://github.com/balt-dev/robot-is-chill/pull/160#issuecomment-2172526273, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYJ4FQVK3VL4HI6TVHIZMETZH2HHHAVCNFSM6AAAAABJM4NT6KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZSGUZDMMRXGM . You are receiving this because you authored the thread.Message ID: @.***>

someone1065 commented 3 months ago

Fair enough.

someone1065 commented 3 months ago

Nevermind, I found a way.

balt-dev commented 3 months ago

i feel like the ureplace macro should just replace the replace macro actually, as long as it doesn't impact too many existing macros

Mathman2028 commented 3 months ago

Didn't want to risk backwards incompatibility. I doubt many macros use escaped brackets as the pattern to replace but I can't say for sure

balt-dev commented 3 months ago

yeah i asked and it seems it'd affect quite a few so

Mathman2028 commented 3 months ago

yeah i asked and it seems it'd affect quite a few so

wait where? (just curious)

someone1065 commented 3 months ago

So will this be added

blokos0 commented 3 months ago

please add it💥

balt-dev commented 3 months ago

i thought i merged this lmao oops

837951602 commented 3 months ago

Just being safe. I'd rather some macros add to the cap unnecessarily than crash Balt's computer with infinite uncapped macros. On Sun, Jun 16, 2024 at 9:40 PM someone1065 @.> wrote: So how exactly can the 2 macros capable of generating brackets be the cause of recursion? — Reply to this email directly, view it on GitHub <#160 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYJ4FQVK3VL4HI6TVHIZMETZH2HHHAVCNFSM6AAAAABJM4NT6KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZSGUZDMMRXGM . You are receiving this because you authored the thread.Message ID: @.>

It seems a bad idea to not count them, at least now