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

Handle nan and inf in von #3170

Merged
merged 3 commits into from
Nov 8, 2024
Merged

Conversation

Denneisk
Copy link
Member

@Denneisk Denneisk commented Nov 8, 2024

Fixes #3168

Von could stand to have a rewrite. If we do a clean-room rewrite, we can even get rid of the ugly license.

@Vurv78
Copy link
Contributor

Vurv78 commented Nov 8, 2024

Von shouldn't really be used but would be cool if it was done ala qjson if anyone wanted to put in the effort.

@Denneisk
Copy link
Member Author

Denneisk commented Nov 8, 2024

What do you mean precisely by that?

@thegrb93
Copy link
Contributor

thegrb93 commented Nov 8, 2024

There's plenty of serialization deserialization options. sfs is another. I'd have preferred json, but I don't know if json always handles numbers correctly either. If json works, I'd prefer switching to that.

@thegrb93
Copy link
Contributor

thegrb93 commented Nov 8, 2024

If you want to replace von with sfs, that'd be a good effort too, but we can also just merge this if this works.

@Denneisk
Copy link
Member Author

Denneisk commented Nov 8, 2024

I'm fine with deprecating von but unfortunately for now it needs to stay for backwards compat with dupes that use it.

If we wanted to be surreptitious about it, we could detour the von serializer to another one and make the von deserializer branch between the new and von. That way there would be no API changes. SFS, for example, can be discriminated by it always starting with a non-printing character when given a table.

@thegrb93
Copy link
Contributor

thegrb93 commented Nov 8, 2024

I don't think sfs data should be mixed in as if it's von. Better to just give users a tool to convert their von to sfs and phase out the von functions.

The problem is once von is fully removed, people will have no idea why their old data stops working.

lua/wire/von.lua Outdated Show resolved Hide resolved
Add case for "nan" being interpreted as "n" followed by "an"
lua/wire/von.lua Outdated Show resolved Hide resolved
@thegrb93 thegrb93 merged commit b541f31 into wiremod:master Nov 8, 2024
1 check failed
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.

vON issue
3 participants