Skip to content

lua safe getOutput POC#721

Merged
mck1117 merged 14 commits intoFOME-Tech:masterfrom
dynfer:lua
Jan 27, 2026
Merged

lua safe getOutput POC#721
mck1117 merged 14 commits intoFOME-Tech:masterfrom
dynfer:lua

Conversation

@dynfer
Copy link
Copy Markdown
Contributor

@dynfer dynfer commented Jan 24, 2026

@mck1117
Copy link
Copy Markdown
Collaborator

mck1117 commented Jan 24, 2026

discussed offline:

  • make the switch look up by hash, like

switch (hash(inputStr)) {
case hash(“foo”): return fooVar;
}

(I think this is legal if the hash is constexpr)

  • rename to getChannel as it's not just outputs

@mck1117
Copy link
Copy Markdown
Collaborator

mck1117 commented Jan 25, 2026

yup that strategy works: https://godbolt.org/z/5h4vz51hn

It makes the compiler generate a jump table similar to what you have implemented here.

@mck1117 mck1117 merged commit 288be69 into FOME-Tech:master Jan 27, 2026
16 of 17 checks passed
@mck1117 mck1117 mentioned this pull request Feb 7, 2026
@dynfer dynfer deleted the lua branch April 26, 2026 08:46
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.

2 participants