Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

No integer/float subtype: integral floats print as integers, next(t, k) with float k computed at runtime continues (#42 literal-only)

オープン
#49 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
12/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
lua
領域
compilers

調査の方向性

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).

索引モデルが issue の本文から書いたものです。

説明

bug eigenscript-gap

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).

主要言語
Lua
スター
0
フォーク
0
平均マージ
54分
マージ済み PR(30日)
19

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

InauguralSystems/EigenLua のほかの issue

InauguralSystems/EigenLua の issue をすべて見る

似ている issue

Lua の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。