Fields that look like numbers compare as strings
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start with the three one-liners in the report and confirm the byte-wise comparison. Then find where AwkValue::StrNum is defined and where record fields are turned into plain strings, since the report says nothing creates StrNum yet. Agree on the approach with the maintainers before editing, because the report asks whether StrNum is the intended design. Done when the three commands match gawk and fields like 1.0 and 50 compare numerically.
索引モデルが issue の本文から書いたものです。
説明
$1 > 100 keeps 50, and $1 == 1 drops 1.0:
$ printf '50 150\n1.0 2\n10 9\n' | awk '$1 > 100'
50 150
$ printf '50 150\n1.0 2\n10 9\n' | awk '$1 == 1'
$ printf '50 150\n1.0 2\n10 9\n' | awk '$1 < $2'
1.0 2
10 9
gawk 5.3.2, mawk and nawk print nothing, 1.0 2, and 50 150 / 1.0 2.
POSIX makes a field that looks like a number a numeric string, so it compares numerically with a number or with another numeric string. Here every field is a plain string (typeof($2) on x 10 prints string; gawk prints strnum), so these comparisons are done byte by byte. The same rule covers getline var, split() elements, ARGV, ENVIRON and -v values.
AwkValue::StrNum exists but nothing creates it yet, so this looks like the planned place for it. Is that the plan? I can send a PR for fields if a direction is agreed.
Checked on main 8f8cf8d.
- 主要言語
- Rust
- スター
- 31
- フォーク
- 13
- 平均マージ
- 23時間 42分
- マージ済み PR(30日)
- 29
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
uutils/awk のほかの issue
-
bug gnu-compat good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
bug crash gnu-compat good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
bug gnu-compat good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
bug gnu-compat good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
awk: `-f missing-file` and `--source` panic対応中かも @VanshajPoonia が 4 日前に担当しました。 オープンbug crash gnu-compat good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 半日 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
code-quality parser
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
eventflux-io/eventflux#218 ·
メンテナーはふだん 1 日以内に返信
-
StartSso docs say an option requires the built-in AuthnRequest renderer, which is now the only oneオープンdocumentation needs-triage
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
marketing
難易度 2/5 半日 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信