Skip to content

Conversation

nitely
Copy link
Owner

@nitely nitely commented Jan 17, 2025

Adds the tilde proc which compiles regex at runtime and stores it in a global for caching. Also, it validates the regex at comptime.

import pkg/regex

doAssert ~"abc" in "abc"

@nitely nitely changed the title Sigil regex runtime compiled Sigil: runtime compiled regex Jan 17, 2025
@nitely nitely changed the title Sigil: runtime compiled regex Sigil: runtime compiled & comptime checked regex Jan 17, 2025
@nitely
Copy link
Owner Author

nitely commented Jan 18, 2025

it breaks when using threads on orc nim-lang/Nim#24621

@nitely nitely closed this Jan 18, 2025
@nitely nitely reopened this Jan 18, 2025
@nitely nitely changed the title Sigil: runtime compiled & comptime checked regex Tilde: runtime compiled & comptime checked regex Jan 18, 2025
@nitely
Copy link
Owner Author

nitely commented Jan 19, 2025

I think imma wait for nim-lang/Nim#17552 to be fixed, and implement this with globals for orc/arc only. Not sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant