-
Notifications
You must be signed in to change notification settings - Fork 2
Luau Implementation #12
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Dibri Nsofor <[email protected]>
Signed-off-by: Dibri Nsofor <[email protected]>
Signed-off-by: Dibri Nsofor <[email protected]>
Signed-off-by: Dibri Nsofor <[email protected]>
Signed-off-by: Dibri Nsofor <[email protected]>
Signed-off-by: Dibri Nsofor <[email protected]>
Signed-off-by: Dibri Nsofor <[email protected]>
Signed-off-by: Dibri Nsofor <[email protected]>
Signed-off-by: Dibri Nsofor <[email protected]>
Signed-off-by: Dibri Nsofor <[email protected]>
Signed-off-by: Dibri Nsofor <[email protected]>
Signed-off-by: Dibri Nsofor <[email protected]>
Signed-off-by: Dibri Nsofor <[email protected]>
Signed-off-by: Dibri Nsofor <[email protected]>
Signed-off-by: Dibri Nsofor <[email protected]>
Signed-off-by: Dibri Nsofor <[email protected]>
Signed-off-by: Dibri Nsofor <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ready for another review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly some format issues, and I feel like this could be merged after solving these. What do you think @bennn?
Thanks to Eric Traut for pointing out [an issue concerning narrowing and subclass of primitive types in Python](https://github.com/microsoft/pyright/issues/9395). | ||
Thanks to Eric Traut for pointing out [an issue concerning narrowing and subclass of primitive types in Python](https://github.com/microsoft/pyright/issues/9395). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why there is a diff; the two lines seem identical
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same, tried copying and pasting from master but I could not get rid of it.
When parameter `<type-checker>` is not provided, the benchmark will run all type checkers. Otherwise, it will run only the specified type checker. | ||
When parameter `<type-checker>` is not provided, the benchmark will run all type checkers. Otherwise, it will run only the specified type checker. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why there is a diff; the two lines seem identical
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto
Signed-off-by: Dibri Nsofor <[email protected]>
Luau/README.md
Outdated
- Language resources: | ||
- <https://www.luau.org/> | ||
- <https://github.com/luau-lang/luau/> | ||
- <https://github.com/luau-lang/luau/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
duplicate link, delete or replace with documentation link or something
Luau/README.md
Outdated
There are two main options: `typeof()` and `type()`. `typeof()`, comes shipped | ||
with the typechecker and works on both Roblox data types and vanilla data types. | ||
|
||
Example: `typeof(x) == "number"` or `type(x) == "number"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would replace everything in this section with:
Example: `typeof(x) == "number"`
The current description raises more questions than it answers. How are type() and typeof() different? What's the point of type() since the implementation doesn't use it? What are Roblox data types and vanilla data types, and why are they important to the benchmark?
Signed-off-by: Dibri Nsofor <[email protected]>
Signed-off-by: Dibri Nsofor <[email protected]>
Signed-off-by: Dibri Nsofor <[email protected]>
Signed-off-by: Dibri Nsofor <[email protected]>
Signed-off-by: Dibri Nsofor <[email protected]>
error("not representable in Luau (v0.657)") | ||
end | ||
|
||
-- Example predicate_1way | ||
-- success | ||
function _predicate_1way_success_f(x: string | number): never | ||
-- not representable in Luau (v0.657) | ||
-- is "implies" a stronger property than bare is? | ||
-- not representable in Luau (v0.657) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure I understand how different these two bits are: implies x is Number
and x is Number
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
implies is weaker:
implies x is Number
means "return true ==> x : Number"x is Number
means "return true ==> x : Number AND return false ==> NOT(x : Number)"
Try experimenting with the Flow implementation, see what typechecks and doesn't. link to predicate_1way_success playground
Luau implementation of the ifT benchmark with datasheet.