Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tilde: runtime compiled & comptime checked regex #152

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

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