No integer/float subtype: integral floats print as integers, next(t, k) with float k computed at runtime continues (#42 literal-only)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 12/100
Research direction
Start with GAPS.md, which does not yet declare this gap, and with the three Lua snippets in the issue body, which show the reference output against EigenLua's current output. The next(t, k) float-key check lives on the fix-small-4 branch and only matches float literals passed at the call site. Done means either the runtime carries an integer/float subtype so the three snippets match as a Tier D row, or GAPS.md lists the consequences (integral-float printing, // and % by zero, the next cursor quirk, math.type).
Written by the indexing model from the issue text.
Description
Found by the blind critic for fix-small-4 (#40/#42/#44/#45). Reproduces on origin/main 9536f4c.
EigenLua has no integer/float subtype at runtime: every Lua number becomes an EigenScript num. Several reference behaviours depend on the subtype:
print(1.0, "10.0"+1, math.type("10.0"+1)) -- ref: 1.0 11.0 float
print("1.0" // "0") -- ref: inf
local t = {}; t[1] = "one"; t[2.0] = "two"
local k = 1.0
print(pcall(next, t, k)) -- ref: false invalid key to 'next'
eigenlua: 1 11 integer, attempt to divide by zero, true 2 two.
The fix-small-4 branch makes next(t, 1.0) match only when a float literal is passed to next(...) or pcall(next, ...), using call-site metadata. A float that is computed, stored in a variable or table, passed through a vararg or select, or sent through coroutine.wrap(next) / pcall(pcall, next, ...) still continues instead of raising. Existing D rows that diverge for this reason: int_one_vs_one, str_format_num, ops_matrix (u- gives -0 float), and others.
GAPS.md does not declare this gap.
Done when
Either the runtime carries the subtype, so that the three lines above MATCH as a Tier D row, or GAPS.md declares the gap and lists the observable consequences (integral-float printing, // and % by zero, the next cursor quirk, math.type).
- Dominant language
- Lua
- Stars
- 0
- Forks
- 0
- Avg merge
- 54m
- Merged PRs (30d)
- 19
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from InauguralSystems/EigenLua
-
documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
InauguralSystems/EigenLua#60 ·
Maintainers usually reply within 1 day
-
front-end good first issue
Difficulty 3/5 Half a day Newbie friendliness 70/100
InauguralSystems/EigenLua#62 ·
Maintainers usually reply within 1 day
-
front-end good first issue
Difficulty 3/5 Half a day Newbie friendliness 66/100
InauguralSystems/EigenLua#61 ·
Maintainers usually reply within 1 day
-
enhancement front-end help wanted
Difficulty 4/5 3-5 days Newbie friendliness 35/100
InauguralSystems/EigenLua#55 ·
Maintainers usually reply within 1 day
-
1/0 and 0/0 abort the program with 'EigenScript value error: division by zero' (ref: inf / nan)Openbug eigenscript-gap
Difficulty 3/5 1-2 days Newbie friendliness 42/100
InauguralSystems/EigenLua#50 ·
Maintainers usually reply within 1 day
All issues in InauguralSystems/EigenLua
Similar issues
-
bug good first issue ready ticket
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Domktorymysli/vclu#20 ·
-
配置文件的注释没有及时更新Open
Difficulty 1/5 Under an hour Newbie friendliness 75/100
amzxyz/rime-wanxiang#1264 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
bug
Difficulty 1/5 1-3 hours Newbie friendliness 85/100
bradcypert/plum#265 ·
Maintainers usually reply within 1 day